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 |
|---|---|---|---|---|---|---|
When adding a new task | @Test
public void clickOnFab_ShowsAddTaskUi() {
mPlaylistPresenter.addNewTask();
// Then add task UI is shown
verify(mTasksView).showAddTask();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void addTask(Task task) {\n\t\t\n\t}",
"String addTask(Task task);",
"void addTask(Task task);",
"public void add(Task task){ this.tasks.add(task);}",
"public void add(final Task task) {\n }",
"public void addTask(Task task) {\n\t\tSystem.out.println(\"Inside createTask()\");\n\t\t\n\t\ttoDoList.add(task);\n\t\tdisplay();\n\t}",
"void add(final Task task);",
"public void newTask() {\r\n\r\n todoTaskGui(\"Create\", null);\r\n }",
"public void add(Task task)\n {\n this.tasks.add(task);\n }",
"@Override\n\tpublic void addTask(Teatask ta)\n\t{\n\t\tteataskMapper.addTask(ta);\n\t}",
"boolean addTask(Task newTask);",
"void addTask(Task person) throws UniqueTaskList.DuplicateTaskException;",
"public void addTask(Task task){\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_ID, task.getId());\n values.put(KEY_LABEL, task.getLabel());\n values.put(KEY_TIME, task.getTime());\n db.insert(TABLE_NAME, null, values);\n db.close();\n }",
"public void add(Task t)\n {\n\ttoDo.add(t);\n }",
"public void addTask(Task newTask) {\n recordedTask.add(newTask);\n updateTaskToFile();\n }",
"void addTask(Task<?> task) {\n tasks.addFirst(task);\n }",
"int insertTask(TaskInfo taskInfo);",
"public void addTask(View v) {\n int taskId = Integer.parseInt(txtId.getText().toString());\n String tskName = txtTaskName.getText().toString();\n String taskDesc = txtTaskDescription.getText().toString();\n ContentValues values = new ContentValues();\n values.put(\"taskId\", taskId);\n values.put(\"taskName\", tskName);\n values.put(\"taskDescription\", taskDesc);\n try {\n taskManager.addTask(values);\n Toast.makeText(this, \"Data Inserted\", Toast.LENGTH_LONG).show();\n } catch (Exception e) {\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }",
"public void createTask() {\n \tSystem.out.println(\"Inside createTask()\");\n \tTask task = Helper.inputTask(\"Please enter task details\");\n \t\n \ttoDoList.add(task);\n \tSystem.out.println(toDoList);\n }",
"public void addTask(Task task) {\n list.add(task);\n }",
"public void addTask(Task task)\n {\n tasks.add(task);\n }",
"public void add(Task newTask) {\n tasks.add(newTask);\n }",
"@FXML\n void addTaskClicked(ActionEvent event)\n {\n createTask();\n }",
"public AddCommand(Task task){\r\n this.task = task;\r\n }",
"@Override\r\n\tpublic Task addTask(Task task) {\n\t\treturn taskRepository.save(task);\r\n\t}",
"public void add(Task task) {\r\n tasks.add(task);\r\n }",
"public void addNewTask(String taskName) {\n\t\tCommand cmdAdd = new CmdAdd();\n\t\tcmdAdd.setParameter(CmdParameters.PARAM_NAME_TASK_NAME, taskName);\n\t\tcmdAdd.execute();\n\t}",
"public void addTask(Task task) {\n tasks.add(task);\n }",
"public void addTask(Task task) {\n tasks.add(task);\n }",
"public void addTask(Task task) {\n tasks.add(task);\n }",
"@RequestMapping(method = RequestMethod.POST, value = \"/add-task\",consumes = MediaType.APPLICATION_JSON_VALUE,headers = {\r\n \"content-type=application/json\" })\r\n\tpublic Task addTask(@RequestBody Task task) {\r\n\t\tinvokeNotification();\r\n\t\treturn task;\r\n\r\n\t}",
"private void newTask()\n {\n \t//TODO add alarm\n \tTask task = new Task(taskName.getText().toString(), taskDetails.getText().toString());\n \tdb.createTask(task);\n \t//TODO Tie notification to an alarm\n \t//Create notification\n \tIntent notifyIntent = new Intent(this, TaskNotification.class);\n \tnotifyIntent.putExtra(\"title\", task.name); //add title name\n \tnotifyIntent.putExtra(\"id\", (int) task.id); //add id\n \tstartActivity(notifyIntent); //create the intent\n \t\n \trefreshData();\n }",
"public void createTask(Task task) {\n ContentValues values = new ContentValues();\n values.put(SQLiteHelper.COLUMN_NAME, task.getName());\n database.insert(SQLiteHelper.TABLE_TASKS, null, values);\n }",
"org.oasis_open.docs.ns.bpel4people.ws_humantask.types._200803.TTaskAbstract addNewTaskAbstract();",
"public void addTask(Task task) {\n this.tasks.add(task);\n }",
"public void createTask()\n {\n boolean copy = false;\n if(check.checkTask(taskName.getText()))\n {\n // Go through list and make sure task isnt already there\n // If there is one already in list, then tell user there it is on list\n if(!(Item.getToDoList().isEmpty()))\n {\n for(Item task : Item.getToDoList())\n {\n if(task.getTask().equals(taskName.getText()))\n {\n status.setText(\"Task is already on the list. \");\n copy = true;\n }\n }\n\n if(!copy)\n {\n // If not copy, add the task to the list by calling method\n addTaskAndDisplay(taskName.getText(), completionDate.getText(), taskCompletedCheckBox.isSelected());\n }\n }\n\n // If list is empty, then no need to check if task is copy\n else\n {\n addTaskAndDisplay(taskName.getText(), completionDate.getText(), taskCompletedCheckBox.isSelected());\n }\n\n }\n\n // If task is invalid, alert user\n else\n {\n status.setText(\"Task invalid. Try again. \");\n }\n\n }",
"void addToList(Task task) throws InvalidCommandException;",
"public void addTask(Task t){\n\t\ttry {\n\t\t\taction.put(t);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public Task getTaskToAdd() {\n return taskToAdd;\n }",
"public String addTask(Task t) {\n tasks.add(t);\n return tasks.get(tasks.size() - 1).toString();\n }",
"void addSubTask(AuctionTask task);",
"void addDoneTask(Task task);",
"public void saveTask() {\r\n if (validateTask(textFieldName, textFieldDescription, textFieldDueDate, comboPriority)) {\r\n if (myTask == null) {\r\n myTask = new Task(textFieldName.getText(), textFieldDescription.getText(),\r\n LocalDate.parse(textFieldDueDate.getText()),\r\n Priority.valueOf(Objects.requireNonNull(comboPriority.getSelectedItem()).toString()));\r\n } else {\r\n myTask.setName(textFieldName.getText());\r\n myTask.setDescription(textFieldDescription.getText());\r\n myTask.setDueDate(LocalDate.parse(textFieldDueDate.getText()));\r\n myTask.setPriority(Priority.valueOf(Objects.requireNonNull(\r\n comboPriority.getSelectedItem()).toString()));\r\n }\r\n myTodo.getTodo().put(myTask.getHashKey(), myTask);\r\n todoListGui();\r\n }\r\n }",
"@Override\n\tpublic void addTask(ISimpleTask task) {\n\t\ttry {\n\t\t\tqueue.put(task);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void doAddTask() {\n System.out.println(\n \"Kindly enter the time, description and date of the task you would like to add on separate lines.\");\n String time = input.nextLine();\n String description = input.nextLine();\n String date = input.nextLine();\n todoList.addTask(new Task(time,description,date));\n System.out.println(time + \" \" + description + \" \" + date + \" \" + \"has been added.\");\n }",
"private static void addTask() {\n Task task = new Task();\n System.out.println(\"Podaj tytuł zadania\");\n task.setTitle(scanner.nextLine());\n System.out.println(\"Podaj datę wykonania zadania (yyyy-mm-dd)\");\n\n while (true) {\n try {\n LocalDate parse = LocalDate.parse(scanner.nextLine(), DateTimeFormatter.ISO_LOCAL_DATE);\n task.setExecuteDate(parse);\n break;\n } catch (DateTimeParseException e) {\n System.out.println(\"Nieprawidłowy format daty. Spróbuj YYYY-MM-DD\");\n }\n }\n\n task.setCreationDate(LocalDate.now());\n\n queue.offer(task);\n System.out.println(\"tutuaj\");\n }",
"public void addTask(Task task) {\n\t\tMessage msg=new Message(null, null, task);\n\t\ttry {\n\t\t\tchannel.send(msg);\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\t//Runtime exception with info for use in debugging\n\t\t\tthrow new RuntimeException(ex.getMessage());\n\t\t}\n\t}",
"public void AddTaskToDB(View view){\n\t\tif (TASK_CREATED == true){\n\t\t\tString name = taskName.getText().toString();\n\t\t\tString desc = taskDescription.getText().toString();\n//\t\t\tlong millisecondsToReminder = 0;\n\t\t\tlong millisecondsToCreated = 0;\n//\t\t\tyear = taskDatePicker.getYear();\n//\t\t\tmonth = taskDatePicker.getMonth() + 1;\n//\t\t\tday = taskDatePicker.getDayOfMonth();\n//\t\t\thour = taskTimePicker.getCurrentHour();\n//\t\t\tminute = taskTimePicker.getCurrentMinute();\n\t\t\ttry {\n\t\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\tDate dateCreated = cal.getTime();\n\t\t\t\tmillisecondsToCreated = dateCreated.getTime();\n//\t\t\t\tString dateToParse = day + \"-\" + month + \"-\" + year + \" \" + hour + \":\" + minute;\n//\t\t\t\tSimpleDateFormat dateFormatter = new SimpleDateFormat(\"d-M-yyyy hh:mm\");\n//\t\t\t\tDate date = dateFormatter.parse(dateToParse);\n//\t\t\t\tmillisecondsToReminder = date.getTime();\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} // You will need try/catch around this\n\n\t\t\tBujoDbHandler taskHandler = new BujoDbHandler(view.getContext());\n\t\t\tcurrentTask = new Task(name, desc, millisecondsToCreated);\n\t\t\ttaskHandler.addTask(currentTask);\n\t\t}\n\t}",
"public void addTask(View v) {\n EditText field = (EditText) findViewById(R.id.list_edittext);\n String task = field.getText().toString().trim();\n\n // Do not add empty tasks\n if(!task.equals(\"\")) {\n database.addTask(task);\n field.setText(\"\");\n Toast.makeText(this, String.format(getResources().getString(R.string.list_add_toast),\n task), Toast.LENGTH_LONG).show();\n }\n }",
"public void populateTaskList(String _task){\n\t\ttaskList.getItems().add(_task);\n\t}",
"public void addElement(DemoTask task) {\n\t\tdata.add(task);\n\t}",
"void onNewTaskComplete(String name, String notes, int position);",
"public static void addTask(Task taskToAdd)\n\t{\n\t\tStatement statement = dbConnect.createStatement();\n\t\t\n\t\tCalendar cal = taskToAdd.getCal();\n\t\tint year = cal.get(YEAR);\n\t\tint month = cal.get(MONTH);\n\t\tint day = cal.get(DAY_OF_MONTH);\n\t\tint hour = cal.get(HOUR_OF_DAY);\n\t\tint minute = cal.get(MINUTE);\n\t\t\n\t\tString descrip = taskToAdd.getDescription();\n\t\tboolean recur = taskToAdd.getRecurs();\n\t\tint recurI;\n\t\tif(recur) recurI = 1;\n\t\telse recurI = 0;\n\t\tint recursDays = taskToAdd.getRecurIntervalDays();\n\t\t\n\t\tstatement.executeUpdate(\"INSERT INTO tasks (Year, Month, Date, Hour, Minute, Description, Recursion, RecursionDays) VALUES(\" +year+\", \"+month+\", \"+day+\", \"+hour+\", \"+minute+\", '\"+descrip+\"', \"+recurI+\", \"+recursDays+\")\");\n\t\tstatement.close();\n\t\treturn;\n\t}",
"@Test\r\n\tpublic void testAddTask() {\n\t\ttodo.addTask(new Task(\"Test task1\"));\r\n\t\t\r\n\t\tCollection<Task> col = todo.getAllTasks();\r\n\t\tassertTrue(\"Expected collectioon to contain 1 task object\", col.size() == 1);\t\t\r\n\t\t\r\n\t\tTask[] tasks = new Task[] {};\r\n\t\tTask t = col.toArray(tasks)[0];\r\n\t\t\r\n\t\tassertEquals(\"Test task1\", t.getDescription());\t\t\r\n\t}",
"@Override\r\n\tpublic void eventReceived(TaskEvent event) \r\n\t{\r\n\t\t//Add new Item\r\n\t\tif (event.getOperationType() == TaskEvent.ADD_NEW_TASK_EVENT)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Add a new item to the List\");\r\n\t\t\tModelLocator.getInstance().getTaskList().add((makeTaskFromArray((String[]) event.parametersToCommand())));\r\n\t\t\tSystem.out.println(ModelLocator.getInstance().getTaskList());\r\n\t\t}\r\n\t\telse if (event.getOperationType() == TaskEvent.REMOVE_TASK_EVENT)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Remove Item from the List\");\r\n\t\t\tModelLocator.getInstance().getTaskList().removeElementAt(Integer.parseInt((String)(event.parametersToCommand())));\r\n\t\t\tSystem.out.println(ModelLocator.getInstance().getTaskList());\r\n\t\t}\r\n\t\telse if(event.getOperationType() == TaskEvent.SET_TASK_DONE_EVENT)\r\n\t\t{\r\n\t\t\t//To be implemented\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Error!!!!!\");\r\n\t\t\r\n\t}",
"public void onAddTaskButtonPressed(View view) {\n\t\tString taskName = taskNameField.getText().toString();\n\t\tif (taskName.equals(\"\"))\n\t\t\treturn;\n\t\ttaskNameField.setText(\"\");\n\t\ttodoList.addTask(taskName);\n\t}",
"public void addToTaskList(Task task) {\n taskList.add(task);\n }",
"public static void add(Tasks currentTask) {\n tasks.add(currentTask);\n tasksCount++;\n }",
"@Override\n public CommandResult execute() {\n tasks.add(taskToAdd);\n try {\n storage.appendToFile(taskToAdd);\n return new CommandResult(String.format(MESSAGE_SUCCESS, taskToAdd));\n } catch (IOException e) {\n return new CommandResult(e.getMessage());\n }\n }",
"public long addTask(Task task) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_TASKNAME, task.getTaskName()); // task name\n // status of task- can be 0 for not done and 1 for done\n values.put(KEY_STATUS, task.getStatus());\n values.put(KEY_DATE,task.getDateAt());\n\n // Inserting Row\n long task_id= db.insert(TABLE_TASKS, null, values);\n // insert row\n\n return task_id;\n\n }",
"@Override\n public boolean add(Task task) {\n return tasks.add(task);\n }",
"public void addedTask(ArrayList<Task> tasks) {\n System.out.println(\"Got it. I've added this task:\\n \"\n + tasks.get(tasks.size()-1).printTask()\n + \"\\nNow you have \"\n + tasks.size()\n + \" tasks in the list\");\n }",
"@Override\n\tpublic void add(ScheduleTask st) {\n\t\tsave(st);\n\n\t}",
"public void addTask(Task task) {\n tasks.add(task);\n notifyObservers();\n }",
"protected abstract void createTasks();",
"TaskDetail add() {\n taskDetails.put(task, this);\n return this;\n }",
"public void addTask(final BTask t) {\n\t\tbloc.addLast(t);\n\t}",
"@Override\n\t\tprotected String doInBackground(Task... arg0) {\n\t\t\tString taskID = TfTaskRepository.addTask(arg0[0], \n\t\t\t getApplicationContext());\n\t\t\t\n\t\t\ttaskID = taskID + \"\\n\";\n\t\t\t\n\t\t\t//saving the ID local\n\t\t\tlt.saveTaskId(taskID, getApplicationContext());\n\t\t\t\n\t\t\treturn null;\n\t\t}",
"void addTasks(List<Task> tasks);",
"public void add(Task var) {\n\t\tif (tasks.size() < numOfTasks) {\n\t\t\ttasks.add(var);\n\t\t}\n\t}",
"private void addTask(ToDoList toDoList, JSONObject jsonObject) {\n String name = jsonObject.getString(\"title\");\n LocalDate dueDate = LocalDate.parse(jsonObject.getString(\"dueDate\"));\n boolean complete = jsonObject.getBoolean(\"complete\");\n boolean important = jsonObject.getBoolean(\"important\");\n Task newTask = new Task(name, dueDate);\n newTask.setComplete(complete);\n newTask.setImportant(important);\n\n toDoList.addTask(newTask);\n }",
"public void createNewTask(View view) {\n try{\n newTaskLayout.checkTaskLayoutIsValid();\n ImageView taskImage = (ImageView) findViewById(R.id.imageViewBoard);\n String layoutImagePath = takeScreenshot(taskImage);\n newTaskLayout.setImagePath(layoutImagePath);\n\n // save new task\n HashMap<String, Integer> instructions = convertSpinnersToHashMap();\n Task newTask = new Task(newTaskLayout, instructions);\n Task.saveTask(getApplicationContext(), newTask);\n\n // alert user task created and return to task menu.\n Toast.makeText(this, \"new task created\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(getApplicationContext(), TaskOptionsActivity.class));\n } catch (TaskLayoutException | InstructionsRequiredException e) {\n // layout was not valid on insufficient instructions set.\n makeMessageDialogue(e.getMessage());\n }\n }",
"@Override\n public <T> void onCreate(Task<T> task) {\n\n final String taskId = task.getTaskId();\n\n if (!StringUtils.isEmpty(taskId)) {\n if (inProgressQueue.containsKey(taskId)) {\n// task.setSkipExecution(true);\n } else {\n inProgressQueue.put(taskId, task);\n// task.setSkipExecution(false);\n }\n } else {\n logger.warn(\"Task Id can not be null for qnqueing task\");\n }\n }",
"@Insert\n long insert(Task task);",
"@Override\n\tpublic void addScheduleTask(ScheduleTask st) {\n\t\tscheduleTaskDAO.add(st);\n\t}",
"private void saveNewTask(int taskId, int catId) {\n Task task = new Task();\n task.setCategoryId(catId);\n task.setTaskId(taskId);\n task.setTaskContent(mTaskContent.getText().toString());\n task.setDueDate(dueDate);\n if (setReminder)\n task.setReminder(1);\n else\n task.setReminder(0);\n task.setStatus(0);\n task.setTaskTitle(mTaskTile.getText().toString());\n task.save();\n if (setReminder)\n setAlarm(task);\n }",
"public void addTask(String type, String name) {\n Task taskToAdd = new Task(type, name);\n storage.add(taskToAdd);\n if (taskToAdd.hasDate()) {\n if (!dateStorage.containsKey(taskToAdd.getDate())) {\n dateStorage.put(taskToAdd.getDate(), new ArrayList<>());\n }\n dateStorage.get(taskToAdd.getDate()).add(taskToAdd);\n }\n taskAdded(taskToAdd, storage);\n }",
"@Test\n public void confirmTaskAdded() {\n TaskList tasks = new TaskList(\"./test/junit.txt\");\n LocalDateTime date = LocalDateTime.parse(\"2015-10-20 1800\");\n String taskDescription = \"read a book\";\n tasks.addDeadline(taskDescription, date);\n Task addedTask = tasks.get(0);\n assertEquals(\"[D][ ] read a book by: 2015-10-20 18:00\", addedTask.toString());\n }",
"long addTask(Task task) {\n SQLiteDatabase db = this.getWritableDatabase();\n double time;\n\n ContentValues values = new ContentValues();\n values.put(KEY_INFO, task.getInfo()); // task info\n if (task.calendarExists()) {\n time = task.getCalendar().getTimeInMillis();\n } else {\n time = 0;\n }\n values.put(KEY_CALENDAR, time); // Task calendar\n values.put(KEY_LATITUDE, task.getLatitude());\n values.put(KEY_LONGITUDE, task.getLongitude());\n\n // Inserting Row\n long id;\n id = db.insert(TABLE_TASKS, null, values);\n Log.d(TAG, \"ID: \" + Long.toString(id));\n db.close(); // Closing database connection\n return id;\n }",
"public int addTask(Task task) {\n\t\treturn (Integer)getHibernateTemplate().save(task);\n\t}",
"void addDoneTasks(List<Task> task);",
"public void addTask(String task, String... args) {\r\n\t\ttasks.add(new String[][]{new String[]{task}, args});\r\n\t}",
"private void addTask(JPanel panel,Tasks task){\n Task taskPane = new Task(task, this.agenda.getConnector());\n this.setUpSize(taskPane,1920,50,AgendaConstants.ALL);\n panel.add(taskPane);\n if(add) {\n agenda.getConnector().addTask(task);\n }\n this.updateComponent(panel);\n }",
"public void addCommandMutable(ListItem task) {\n this.listItems.add(task);\n }",
"public static void printTaskAdded(){\n ui.showToUser(\n ui.DIVIDER,\n \" Got it. I've added this task:\\n\" + Tasks.get(Tasks.size()-1).toString(),\n \"Now you have \" + Tasks.size() + \" tasks in the list.\",\n ui.DIVIDER);\n }",
"public void addTask(Task task) {\n tasks.add(task);\n cachedTasks.push(new CachedTask(task, \"add\", getTasksSize() - 1));\n }",
"Task(String name) {\n this.name = name;\n }",
"public void add(MiningTask mt) {\n miningTasks.add(mt);\n }",
"@Override\n public void saveTask(TaskEntity task) {\n this.save(task);\n }",
"public synchronized void addTask(AnimatorTask task) {\r\n\r\n\t\tif (!running) {\r\n\t\t\ttasks.add(task);\r\n\t\t}\r\n\t}",
"public void createTask(){\n final String name = newTaskNameField.getText().toString();\n final String description = newTaskDescriptionField.getText().toString();\n\n if (name.isEmpty()){\n newTaskNameField.setText(\"Please Enter a name\");\n newTaskNameField.requestFocus();\n newTaskNameField.selectAll();\n return;\n }\n\n if (description.isEmpty()){\n newTaskDescriptionField.setText(\"Please Enter a Description\");\n newTaskDescriptionField.requestFocus();\n newTaskDescriptionField.selectAll();\n return;\n }\n\n if(!getValidDate(newtaskDateField.getText().toString())) {\n handleInvalidDate();\n return;\n }\n\n if(newTaskAssignee == null) {\n newTaskAssigneeField.setText(\"Please assign a user\");\n newTaskAssigneeField.selectAll();\n return;\n }\n\n TaskManager.sharedInstance().CreateTask(name, description, newTaskAssignee, DueDate, false);\n newTaskDialog.dismiss();\n }",
"public void addNewTask() {\n Intent i = new Intent(this, StartNewActivity.class);\n startActivityForResult(i, REQUEST_CODE);\n }",
"public void handleCreateTask(SelectEvent event) {\n\t}",
"@Test\n void addTask() {\n }",
"private void addTask(String line, ArrayList<Task> tasks) {\n String[] info = line.split(\" \\\\| \");\n String type = info[0];\n int complete = Integer.parseInt(info[1]);\n String title = info[2];\n switch(type) {\n case \"T\":\n Todo newTodo = new Todo(title, complete);\n tasks.add(newTodo);\n break;\n case \"D\":\n String deadline = info[3];\n LocalDate deadlineInLocalDate = LocalDate.parse(deadline);\n Deadline newDeadline = new Deadline(title, complete, deadlineInLocalDate);\n tasks.add(newDeadline);\n break;\n case \"E\":\n String time = info[3];\n LocalDate timeInLocalDate = LocalDate.parse(time);\n Event newEvent = new Event(title, complete, timeInLocalDate);\n tasks.add(newEvent);\n break;\n case \"P\":\n String start = info[3];\n String end = info[4];\n LocalDate startInLocalDate = LocalDate.parse(start);\n LocalDate endLocalDate = LocalDate.parse(end);\n PeriodTask periodTask = new PeriodTask(title, complete, startInLocalDate, endLocalDate);\n tasks.add(periodTask);\n break;\n default:\n throw new AssertionError(type);\n }\n }",
"int insertDptTask(DptTaskInfo dptTaskInfo);",
"public void addTask(View view) {\n // Model of the list data\n ListModel model = ListModel.getInstance();\n\n // String for the date in \"mm/dd/yyyy\" format\n String date;\n\n // Get the name of the task\n EditText text = (EditText) findViewById(R.id.taskInput);\n String taskName = text.getText().toString();\n\n // Add list to model\n model.addTask(listName, taskName);\n\n\n // Return to the single list activity\n Log.i(TAG, \"Creating intent to return to the single list activity\");\n Intent intent = new Intent(this, SingleListActivity.class);\n intent.putExtra(Extra.LIST, listName);\n Log.i(TAG, \"Intent created with extra message (list name).\");\n Log.i(TAG, \"Starting single list activity\");\n startActivity(intent);\n }",
"private void addProjectTask(ActionEvent e) {\n Calendar dueDate = dueDateModel.getValue();\n String title = titleEntry.getText();\n String description = descriptionEntry.getText();\n Project parent = (Project) parentEntry.getSelectedItem();\n addProjectTask(title, description, parent, dueDate);\n }",
"public AddTasks() {\n }",
"private void saveTask(){\n \tZadatakApp app = (ZadatakApp)getApplicationContext();\n \t\n \tTask task = new Task();\n \ttask.set(Task.Attributes.Name, nameText);\n \ttask.set(Task.Attributes.Duedate, datePicker);\n \ttask.set(Task.Attributes.Hours, lengthText);\n \ttask.set(Task.Attributes.Progress, progressBar);\n \ttask.set(Task.Attributes.Priority, priorityBox);\n \t\n \t// Save it to the database either as a new task or over an old task\n \tif (editmode) { app.dbman.editTask(id, task); }\n \telse { app.dbman.insertTask(task); }\n \t\n \t// A task has been added or changed, rescedule\n \tapp.schedule();\n \t\n \tapp.toaster(\"NEW / EDITED TASK\");\n \t\n \t// Quit the activity\n \tfinish();\n }",
"int insert(_task record);"
] | [
"0.8156947",
"0.8023396",
"0.7994112",
"0.79764205",
"0.7829173",
"0.7804236",
"0.7762965",
"0.7672904",
"0.76724714",
"0.764868",
"0.7641237",
"0.758967",
"0.7586607",
"0.7535516",
"0.75331795",
"0.7513303",
"0.75066787",
"0.748412",
"0.7446214",
"0.74351496",
"0.74209493",
"0.7415032",
"0.73752916",
"0.737142",
"0.7361098",
"0.735481",
"0.73265797",
"0.73205227",
"0.73205227",
"0.73205227",
"0.73202544",
"0.73132885",
"0.7298563",
"0.72814137",
"0.72577894",
"0.72534335",
"0.723928",
"0.7222899",
"0.7198975",
"0.7197498",
"0.7156905",
"0.7135593",
"0.7091323",
"0.70884216",
"0.7088165",
"0.70685357",
"0.70485014",
"0.7021563",
"0.69915247",
"0.69909143",
"0.69907",
"0.6981734",
"0.6964819",
"0.69644403",
"0.69316506",
"0.6928751",
"0.69242257",
"0.6917688",
"0.6916492",
"0.69073755",
"0.69005173",
"0.6893042",
"0.6891176",
"0.689092",
"0.687289",
"0.6862511",
"0.6862434",
"0.68490374",
"0.684502",
"0.6841319",
"0.6823473",
"0.6816",
"0.67868596",
"0.6782715",
"0.6776816",
"0.6768158",
"0.6755864",
"0.675047",
"0.6744131",
"0.67367285",
"0.6724792",
"0.6710416",
"0.66962045",
"0.6655975",
"0.6639207",
"0.6636016",
"0.6631238",
"0.66245276",
"0.6622982",
"0.6619299",
"0.66189533",
"0.66131353",
"0.66117597",
"0.6609708",
"0.66053116",
"0.6593691",
"0.65917856",
"0.65845156",
"0.65803933",
"0.65785253",
"0.6570648"
] | 0.0 | -1 |
Given a stubbed active task | @Test
public void clickOnTask_ShowsDetailUi() {
Song requestedSong = new Song("Details Requested", "For this task", SOURCE);
Playlist playlist = new Playlist(requestedSong);
// When open task details is requested
mPlaylistPresenter.openSongPlayer(playlist);
// Then task detail UI is shown
verify(mTasksView).showSongPlayerUI(any(Playlist.class));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void setupTask(Task task) {\n }",
"@VisibleForTesting(otherwise = VisibleForTesting.NONE)\r\n LiveData<Task> getActiveTask();",
"Task createTask();",
"Task createTask();",
"Task createTask();",
"public abstract void task();",
"public Task getTask() { return task; }",
"public Task getTask(Integer tid);",
"public void setTask(Task task) {\n this.task = task;\n }",
"@Override\n public void activateTask(@NonNull String taskId) {\n }",
"public void setTask(Task inTask){\n punchTask = inTask;\n }",
"public void run(Task task) {\n try {\n // inject before serializing, to check that all fields are serializable as JSON\n injectionService.injectMembers(task);\n\n String s = objectMapper.writeValueAsString(task);\n log.info(\"Executing \" + s);\n\n // inject after deserializing, for proper execution\n AbstractTask deserialized = objectMapper.readValue(s, AbstractTask.class);\n injectionService.injectMembers(deserialized);\n setupTask(task);\n\n try {\n ((AbstractTask)deserialized).run(this);\n incCompletedTaskCount(task.getQueueName());\n } finally {\n teardownTask(task);\n }\n\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"public void checkTask(String task){\r\n\t\t\r\n\t}",
"abstract boolean shouldTaskActivate();",
"@Override\n\t\t\tpublic void subTask(String name) {\n\t\t\t\t\n\t\t\t}",
"public Task(String description){\n this.description = description;\n this.isDone = false;\n }",
"public Task(String description){\n this.description = description;\n this.isDone = false;\n }",
"public TaskProvider getTaskProvider();",
"public interface TaskBase {\n\t/**\n\t * @return Returns the name of the task\n\t */\n\tpublic String GetName();\n\n\t/**\n\t * Called upon entering autonomous mode\n\t */\n\tpublic void Initialize();\n\n\t/**\n\t * Called every autonomous update\n\t * \n\t * @return Return task result enum\n\t */\n\tpublic TaskReturnType Run();\n\n}",
"TaskFactory getTaskFactory();",
"WorkingTask getWorkingTask();",
"boolean setTask(UUID uuid, IAnimeTask task);",
"public abstract SystemTask getTask(Project project);",
"public void get(final Task task) {\n }",
"@Test\n public void testTaskNeedingOtherTasksToCheckIfDoneWithTimeout() throws InterruptedException, TaskException {\n final ScheduledPoolingTask<Integer> scheduledPoolingTask = this.createFakeScheduledPoolingTask(1, 1, 7, 8, 100);\n\n final Task<Integer> simpleTask = this.createFakeSimpleTask(2);\n\n final TaskDependingOnOtherTasksExample task = new TaskDependingOnOtherTasksExample.Builder()\n .willTake(2)\n .withTimeout(10)\n .withDependingTask(simpleTask)\n .withDependingTask(scheduledPoolingTask)\n .build();\n\n task.execute();\n\n assertTrue(\"The task should be finished ok\", task.isDone());\n\n assertTrue(\"The simple should be finished NO ok\", simpleTask.isDone());\n assertTrue(\"The scheduled should be finished ok\", !scheduledPoolingTask.isDone());\n\n assertTrue(\"The task should be finished ok\", task.getResult()==0);\n assertTrue(\"The simpleTask should be finished ok\", simpleTask.getResult()==0);\n assertTrue(\"The scheduledPoolingTask should be finished ok\", scheduledPoolingTask.getResult()==1);\n\n\n }",
"@Override\n public void activateFlower(@NonNull String taskId) {\n }",
"@Override\r\n\tpublic void subTask(String name) {\n\t}",
"@Override\r\n\tpublic void doTask() {\n\t}",
"@Test\n\t@Deployment(resources=\"process.bpmn\")\n\tpublic void testCompletionOftask() {\n\t\tProcessInstanceWithVariables processInstance = (ProcessInstanceWithVariables) processEngine().getRuntimeService().startProcessInstanceByKey(PROCESS_DEFINITION_KEY);\n\t\t\n\t\t//Obtain a reference to the current task\n\t\tTaskAssert taskAssert = assertThat(processInstance).task();\n\t\tTaskEntity task = (TaskEntity) taskAssert.getActual();\n\t\ttask.delegate(\"user\");\n\t\ttask.resolve();\n\t\n\t\t\n\t}",
"public static void launchTask(Task tsk)\n {\n getInstance().doExecute(tsk);\n }",
"public void testGetTaskActorE(){\n }",
"boolean updateActiveTask(Task task);",
"public Task(){}",
"public void setTask(PickingRequest task) {\n this.task = task;\n }",
"public Task(String task, boolean isDone) {\n this.task = task;\n this.isDone = isDone;\n }",
"public abstract void execute(Task t);",
"protected abstract Version executeTaskLocal(Version theTask);",
"@Override\n\tpublic void addTask(Task task) {\n\t\t\n\t}",
"@Test(groups = { \"wso2.esb\" }, description = \"agilezen {getTask} integration test with mandatory parameters.\", dependsOnMethods = { \"testCreateTaskWithOptionalParameters\" })\n public void testGetTaskWithMandatoryParameters() throws IOException, JSONException {\n \n esbRequestHeadersMap.put(\"Action\", \"urn:getTask\");\n \n RestResponse<JSONObject> esbRestResponse =\n sendJsonRestRequest(proxyUrl, \"POST\", esbRequestHeadersMap, \"esb_getTask_mandatory.json\");\n \n final String apiEndPoint =\n apiRequestUrl + \"/projects/\" + connectorProperties.getProperty(\"projectId\") + \"/stories/\"\n + connectorProperties.getProperty(\"storyId\") + \"/tasks/\"\n + connectorProperties.getProperty(\"taskIdOptional\");\n RestResponse<JSONObject> apiRestResponse = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n \n Assert.assertEquals(esbRestResponse.getBody().getString(\"id\"), apiRestResponse.getBody().getString(\"id\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"text\"), apiRestResponse.getBody().getString(\"text\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"createTime\"), apiRestResponse.getBody().getString(\n \"createTime\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"status\"), apiRestResponse.getBody()\n .getString(\"status\"));\n }",
"abstract void doTaskOnRun();",
"@Test\n public void testTaskClass() {\n PowerMock.replayAll();\n connector.start(sampleConfig);\n assertEquals(XenonSinkTask.class, connector.taskClass());\n PowerMock.verifyAll();\n }",
"@Override\n public void execute(final Task<T> task) {\n }",
"@Test\n\tpublic void addTaskOutput(){\n\t}",
"@Override\n\t\t\tpublic void beginTask(String name, int totalWork) {\n\t\t\t\t\n\t\t\t}",
"void startTask( org.openxdata.server.admin.model.TaskDef task, AsyncCallback<java.lang.Boolean> callback );",
"Task(String name) {\n this.name = name;\n }",
"public abstract TaskResult runTask(TaskKey taskKey) throws JobException;",
"public Task getTask() {\n return task;\n }",
"public TaskReturnType Run();",
"@Override\n\tpublic void preExecuteTask(Task t,Map context) {\n\t\tlog.info(\"Task Id:\"+t.getTaskId()+\"--Task Name:\"+t.getTaskName()+\"--Task begin execute!\");\n\t}",
"public Task(String taskDescription) {\n this.taskDescription = taskDescription;\n this.isDone = false;\n }",
"String addTask(Task task);",
"public interface TaskCallback extends RunningTaskCallback {\r\n\r\n\r\n /**\r\n * Calling when the task is preparing to start .\r\n */\r\n void onTaskStart();\r\n\r\n @Override\r\n void onTaskRunning(PreTaskResult preTaskResult, int numerator, int denominator);\r\n\r\n /**\r\n * Calling while the task is completed.\r\n *\r\n * @param taskResult TaskResult bean\r\n */\r\n void onTaskCompleted(TaskResult taskResult);\r\n}",
"@Test\n void removeTask() {\n }",
"@Override\n public void afterExecute(Task task, TaskState taskState) {\n String taskImpl = task.getClass().getSimpleName();\n if (taskImpl.endsWith(\"_Decorated\")) {\n taskImpl = taskImpl.substring(0, taskImpl.length() - \"_Decorated\".length());\n }\n String potentialExecutionTypeName = \"TASK_\" +\n CaseFormat.LOWER_CAMEL.converterTo(CaseFormat.UPPER_UNDERSCORE).\n convert(taskImpl);\n ExecutionType executionType;\n try {\n executionType = ExecutionType.valueOf(potentialExecutionTypeName);\n } catch (IllegalArgumentException ignored) {\n executionType = ExecutionType.GENERIC_TASK_EXECUTION;\n }\n\n List<Recorder.Property> properties = new ArrayList<Recorder.Property>();\n properties.add(new Recorder.Property(\"project\", task.getProject().getName()));\n properties.add(new Recorder.Property(\"task\", task.getName()));\n\n if (task instanceof DefaultAndroidTask) {\n String variantName = ((DefaultAndroidTask) task).getVariantName();\n if (variantName == null) {\n throw new IllegalStateException(\"Task with type \" + task.getClass().getName() +\n \" does not include a variantName\");\n }\n if (!variantName.isEmpty()) {\n properties.add(new Recorder.Property(\"variant\", variantName));\n }\n }\n\n TaskRecord taskRecord = taskRecords.get(task.getName());\n mRecorder.closeRecord(new ExecutionRecord(\n taskRecord.recordId,\n 0 /* parentId */,\n taskRecord.startTime,\n System.currentTimeMillis() - taskRecord.startTime,\n executionType,\n properties));\n }",
"public interface Task extends Runnable {\n\n /**\n * Get the task name\n *\n * @return\n */\n public String getTaskName();\n\n /**\n *\n * @return true if the task is in active, else false\n */\n public boolean isActive();\n\n /**\n * @return priority of the task\n */\n public int getPriority();\n\n /**\n *\n * @return the sequence number of the task. If two tasks has same priority,\n * then the task with less sequence number executes first.\n */\n public int getSequenceNumber();\n}",
"@Override\n\t\tpublic void subTask(String arg0) {\n\n\t\t}",
"public void subTask(String name) {\n\r\n\t}",
"public void beginTask(String tr) {\n\t\t\n\t}",
"@Override\n public Class<? extends Task> taskClass() {\n return AmpoolSourceTask.class;\n }",
"protected void teardownTask(Task task) {\n }",
"public Task(String taskDescription) {\n this.taskDescription = taskDescription;\n this.isDone = false;\n this.completed = \"0\";\n }",
"public T caseTask(Task object) {\n\t\treturn null;\n\t}",
"protected TaskFlow( ) { }",
"void handleTask(ITaskType pTaskType, Object pParam) throws IllegalArgumentException;",
"public Task(String description) {\n this.description = description;\n this.isDone = false;\n }",
"public Task(String description) {\n this.description = description;\n this.isDone = false;\n }",
"public interface ITaskHandler {\n\n\t/**\n\t * It is called in a separate thread to handle the task.\n\t * Parameters are thoes given in the addTask()\n\t * This method should not been called directly.\n\t * \n\t * @param pTaskType\n\t * @param pParam\n\t * @throws IllegalArgumentException\n\t */\n\tvoid handleTask(ITaskType pTaskType, Object pParam) throws IllegalArgumentException;\n}",
"@Test\n void addTask() {\n }",
"@Test\n\tpublic void testUpdateTask() {\n\t}",
"protected abstract TaskNode verify();",
"@Test\n void displayCompletedTasks() {\n }",
"@Override\n public void completeFlower(@NonNull String taskId) {\n }",
"public TimedTask(String task) {\n this.task = task;\n timeStart = System.currentTimeMillis();\n }",
"public void startTask() {\n\t}",
"public interface ITask {\n\n String getId();\n boolean isComplete();\n\n}",
"public interface TaskBase {\n public void executeTask();\n\n}",
"public void setTask(TaskDTO task) {\n\t\tthis.task = task;\r\n\t\t\r\n\t\t\r\n\t}",
"public Task(String name) {\n this.name = name;\n this.isDone = false;\n }",
"public abstract boolean dispatch(final CallRunner callTask) throws InterruptedException;",
"private Task getFirstTestTask() {\n Task task = new Task();\n task.setName(\"Buy Milk\");\n task.setCalendarDateTime(TODAY);\n task.addTag(\"personal\");\n task.setCompleted();\n return task;\n }",
"public ITask getTask() {\n \t\treturn task;\n \t}",
"@Test(groups = { \"wso2.esb\" }, description = \"agilezen {listTasks} integration test with optional parameters.\", dependsOnMethods = {\n \"testCreateTaskWithOptionalParameters\", \"testCreateTaskWithMandatoryParameters\" })\n public void testListTasksWithOptionalParameters() throws IOException, JSONException {\n \n esbRequestHeadersMap.put(\"Action\", \"urn:listTasks\");\n \n RestResponse<JSONObject> esbRestResponse =\n sendJsonRestRequest(proxyUrl, \"POST\", esbRequestHeadersMap, \"esb_listTasks_optional.json\");\n final JSONObject esbItemObject = esbRestResponse.getBody().getJSONArray(\"items\").getJSONObject(0);\n \n final String apiEndPoint =\n apiRequestUrl + \"/projects/\" + connectorProperties.getProperty(\"projectId\") + \"/stories/\"\n + connectorProperties.getProperty(\"storyId\") + \"/tasks?page=1&pageSize=1\";\n \n RestResponse<JSONObject> apiRestResponse = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n final JSONObject apiItemObject = apiRestResponse.getBody().getJSONArray(\"items\").getJSONObject(0);\n \n Assert.assertEquals(esbRestResponse.getBody().getInt(\"page\"), 1);\n Assert.assertEquals(apiRestResponse.getBody().getInt(\"page\"), 1);\n \n Assert.assertEquals(esbRestResponse.getBody().getInt(\"pageSize\"), 1);\n Assert.assertEquals(apiRestResponse.getBody().getInt(\"pageSize\"), 1);\n \n Assert.assertEquals(esbItemObject.getString(\"id\"), apiItemObject.getString(\"id\"));\n Assert.assertEquals(esbItemObject.getString(\"text\"), apiItemObject.getString(\"text\"));\n Assert.assertEquals(esbItemObject.getString(\"createTime\"), apiItemObject.getString(\"createTime\"));\n Assert.assertEquals(esbItemObject.getString(\"status\"), apiItemObject.getString(\"status\"));\n }",
"public interface Task {\n void execute() ;\n}",
"void addSubTask(AuctionTask task);",
"@Override\n public void taskStarting() {\n\n }",
"public String getTask() {\n return task;\n }",
"public String getTask() {\n return task;\n }",
"@Override\n\tpublic void addTask(Teatask ta)\n\t{\n\t\tteataskMapper.addTask(ta);\n\t}",
"@Test(groups = { \"wso2.esb\" }, description = \"agilezen {listTasks} integration test with mandatory parameters.\", dependsOnMethods = {\n \"testCreateTaskWithOptionalParameters\", \"testCreateTaskWithMandatoryParameters\" })\n public void testListTasksWithMandatoryParameters() throws IOException, JSONException {\n \n esbRequestHeadersMap.put(\"Action\", \"urn:listTasks\");\n \n RestResponse<JSONObject> esbRestResponse =\n sendJsonRestRequest(proxyUrl, \"POST\", esbRequestHeadersMap, \"esb_listTasks_mandatory.json\");\n final JSONObject esbItemObject = esbRestResponse.getBody().getJSONArray(\"items\").getJSONObject(0);\n \n final String apiEndPoint =\n apiRequestUrl + \"/projects/\" + connectorProperties.getProperty(\"projectId\") + \"/stories/\"\n + connectorProperties.getProperty(\"storyId\") + \"/tasks\";\n RestResponse<JSONObject> apiRestResponse = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n final JSONObject apiItemObject = apiRestResponse.getBody().getJSONArray(\"items\").getJSONObject(0);\n \n Assert.assertEquals(esbRestResponse.getBody().getInt(\"totalItems\"), apiRestResponse.getBody().getInt(\n \"totalItems\"));\n Assert.assertEquals(esbItemObject.getString(\"id\"), apiItemObject.getString(\"id\"));\n Assert.assertEquals(esbItemObject.getString(\"text\"), apiItemObject.getString(\"text\"));\n Assert.assertEquals(esbItemObject.getString(\"createTime\"), apiItemObject.getString(\"createTime\"));\n Assert.assertEquals(esbItemObject.getString(\"status\"), apiItemObject.getString(\"status\"));\n }",
"@Test\n public void testInvokeEffectorStartFailing_MethodInDynamicTask() {\n Task<Void> task = app.getExecutionContext().submit(Tasks.<Void>builder().dynamic(true).body(new Callable<Void>() {\n @Override public Void call() throws Exception {\n testInvokeEffectorStartFailing_Method();\n return null;\n }\n }).build());\n \n assertTaskSucceeds(task);\n assertTaskHasFailedChild(task);\n }",
"@Override\n public <T> void onCreate(Task<T> task) {\n\n final String taskId = task.getTaskId();\n\n if (!StringUtils.isEmpty(taskId)) {\n if (inProgressQueue.containsKey(taskId)) {\n// task.setSkipExecution(true);\n } else {\n inProgressQueue.put(taskId, task);\n// task.setSkipExecution(false);\n }\n } else {\n logger.warn(\"Task Id can not be null for qnqueing task\");\n }\n }",
"public void executeTask(Version theTask) {\n\n\tif (_stoppedTasks.contains(theTask)) {\n\t // todo: what to do here???\n\t // this task obviously didn't perform well .. \n\t // and now, there's another request to run it!\n\t if (true) {\n\t\t// either try the task again ... \n\t\t_stoppedTasks.remove(theTask);\n\t } else {\n\t\t// or, refuse to run it at all \n\t\treturn;\n\t }\n\t}\n\t\n\t// System.out.println(\" - - - - - - - - - - - PSL! entered executeTask, parameter version> \" + theTask);\n\t// if (_versionCache.contains(theTask)) return;\n\n\n\t// add the pre-execution task to our knowledge base\n\t// replicate it so that in case of a crash we may recover\n\t_versionCache.addVersion(theTask);\n\treplicate(theTask);\n\n\t// tell replicators that we are about to start executing\n\talertReplicatorsExecutingTask(theTask);\n\n\tString taskName = ((TaskDefinition)theTask.data()).getName();\n\n\t// execute the task and get the next task\n\tVersion nextTask = executeTaskLocal(theTask);\n\t_log.completedTaskLocal(theTask);\n\n\tif (_stoppedTasks.contains(theTask)) {\n\t // this task was supposed to be stopped .. can ignore result\n\t _stoppedTasks.remove(theTask);\n\t _log.ignoreResultsOfStoppedTask(theTask);\n\t} else if (nextTask == null) { \n\t // this only happens if we have reached\n\t // the end of the workflow execution \n\t // tell replicators that everything is done.\n\t System.out.println(\"WORKFLOW IS DONE\");\n\t alertReplicatorsDoneExecutingTask(theTask);\n\t} else {\n\t nextTask.append(taskName);\n\t // todo: we need to find a way to replicate the \n\t // post-execution task in a clean way. The here-under\n\t // commented code does not work as it creates a version clash.\n\t // todo: 16-Feb maybe uncomment this??\n\t // _versionCache.addVersion(nextTask);\n\n\t // set the next task for execution\n\t queueTask(nextTask);\n\t // tell the replicators we are done executing the task, they\n\t // don't have to worry about things anymore.\n\t alertReplicatorsDoneExecutingTask(theTask);\n\t}\n }",
"public TaskCurrent() {\n\t}",
"@Test\n void editTask() {\n }",
"protected abstract void createTasks();",
"public void setupTask(TaskAttemptContext context) throws IOException {\n }",
"TaskDependency createTaskDependency();",
"public void subTask(String tr) {\n\t\t\n\t}",
"public void setUp() {\n instance = new Task();\n }",
"void saveTask( org.openxdata.server.admin.model.TaskDef task, AsyncCallback<Void> callback );"
] | [
"0.6824366",
"0.65195966",
"0.6499881",
"0.6499881",
"0.6499881",
"0.6291848",
"0.62914276",
"0.6290011",
"0.6274623",
"0.62694097",
"0.6251926",
"0.6247543",
"0.6210405",
"0.62051374",
"0.61714864",
"0.616935",
"0.616935",
"0.6167069",
"0.6160105",
"0.6157496",
"0.6156164",
"0.61421007",
"0.6138352",
"0.6138119",
"0.61363584",
"0.6135469",
"0.61317563",
"0.611965",
"0.60992074",
"0.6063149",
"0.60454404",
"0.6036086",
"0.6019248",
"0.60066473",
"0.6002255",
"0.5998563",
"0.5997824",
"0.59924823",
"0.59877783",
"0.59798974",
"0.5974882",
"0.5974374",
"0.5970442",
"0.5970223",
"0.59630984",
"0.5957561",
"0.59479994",
"0.5944263",
"0.59423536",
"0.5942107",
"0.5941166",
"0.5940339",
"0.59358",
"0.59143645",
"0.5908448",
"0.5899633",
"0.5898583",
"0.58884716",
"0.588617",
"0.5884757",
"0.5884162",
"0.58829373",
"0.5872844",
"0.5871423",
"0.58704233",
"0.58693",
"0.58693",
"0.5864796",
"0.58640516",
"0.586064",
"0.58511674",
"0.5846756",
"0.5843264",
"0.5840198",
"0.5836755",
"0.58305615",
"0.5827294",
"0.58266115",
"0.5826205",
"0.582138",
"0.5816085",
"0.5808748",
"0.58065724",
"0.5796625",
"0.5792539",
"0.57900876",
"0.5788981",
"0.5788981",
"0.5787008",
"0.5785851",
"0.5785482",
"0.57820594",
"0.5781791",
"0.578092",
"0.57785916",
"0.5763845",
"0.57625616",
"0.57621646",
"0.5759075",
"0.57558906",
"0.5754979"
] | 0.0 | -1 |
When tasks are loaded | @Test
public void unavailableTasks_ShowsError() {
mPlaylistPresenter.setFiltering(PlaylistFilterType.ALL_TASKS);
mPlaylistPresenter.loadTasks(true);
// And the tasks aren't available in the repository
verify(mSongsRepository).getSongs(mLoadTasksCallbackCaptor.capture());
mLoadTasksCallbackCaptor.getValue().onDataNotAvailable();
// Then an error message is shown
verify(mTasksView).showLoadingTasksError();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onInitializeTasks() {\n }",
"private void loadTasks() {\n try {\n List<Task> tasks = Reader.readTasks(new File(TASKS_FILE));\n for (Task t1 : tasks) {\n todoList.addTask(t1);\n }\n } catch (IOException e) {\n System.err.println(\"No file exists\");\n }\n }",
"@Override\n public void onTaskLoaded(Task task) {\n if(mCachedTasks == null) {\n mCachedTasks = new HashMap<String, Task>();\n mCachedTasks.put(task.getId(),task);\n callBack.onTaskLoaded(task);\n }\n }",
"void onTaskPrepare();",
"@Override\n public void onTaskLoaded(Task task) {\n if(mCachedTasks == null) {\n mCachedTasks = new HashMap<String, Task>();\n }\n mCachedTasks.put(task.getId(),task);\n callBack.onTaskLoaded(task);\n\n }",
"void onTaskStart();",
"@Override\n public void taskStarting() {\n\n }",
"@PostConstruct\n public void setUpTasks() {\n final Iterable<Task> findAll = taskService.findAll();\n if (findAll != null) {\n findAll.forEach(task -> {\n\n final RunnableTask runnableTask = new RunnableTask(task.getId(), runTaskService);\n\n if (task.getCronExpression() != null) {\n log.info(\"Adding cron schedule for {} : {}\", task.getId(), task.getCronExpression());\n threadPoolTaskScheduler.schedule(runnableTask, new CronTrigger(task.getCronExpression()));\n }\n else if (task.getDelayPeriod() > 0) {\n log.info(\"Adding periodic schedule for {} : {}\", task.getId(), task.getDelayPeriod());\n threadPoolTaskScheduler.schedule(runnableTask, new PeriodicTrigger(task.getDelayPeriod()));\n }\n else {\n log.error(\"Invalid task {}\", task.getId());\n }\n\n });\n }\n }",
"public void myTasks() {\n mMyTasks = true;\n onResume();\n }",
"@Override\r\n\tpublic void PreExecute(TaskConfig config){\n\t}",
"private void initTaskViews(){\n for (Task t : taskManager.getTasksList()){\n submit(t.getName(), t.getIdInView(), t.getTimeForTask(), t.isFinished());\n }\n }",
"public void notifyLoaded();",
"@Override\n public void init() throws IOException {\n ToDoData.getInstance().loadTasks();\n }",
"public void loadTasks()\r\n\t{\n\t\ttable = loadTable(\"../data/tasks.csv\", \"header\");\r\n\t\t\r\n\t\t//gets amount of data rows in table\r\n\t\trow_count = table.getRowCount();\r\n\t\t//println(row_count);\r\n\t\t\r\n\t\t//put each row in table into Task class objects and initialise them\r\n\t\tfor(TableRow r : table.rows()){\r\n\t\t\ttasks.add(new Task(r));\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\n public void addTasksToRun() {\n //gets the tasks that are ready for execution from the list with new tasks\n List<Task> collect = tasks.stream().filter((task) -> (task.getDate() == TIME))\n .collect(Collectors.toList());\n //sort the tasks inserted. The sort is based in \"priority\" value for all the tasks.\n collect.sort(new Comparator<Task>() {\n @Override\n public int compare(Task o1, Task o2) {\n return o1.getPriority() - o2.getPriority();\n }\n });\n //Change the status of tasks for READY\n collect.stream().forEach((task) -> {\n task.setStatus(Task.STATUS_READY);\n });\n //Adds the tasks to the queue of execution\n tasksScheduler.addAll(collect);\n\n //Removes it from list of new tasks\n tasks.removeAll(collect);\n }",
"public void startTask() {\n\t}",
"@Override\r\n public void tasksFinished()\r\n {\n }",
"protected void onStartLoading() { forceLoad();}",
"public void loaded(){\n\t\tloaded=true;\n\t}",
"public abstract void loaded();",
"@Override\n protected void setup(final TaskBundle bundle, final List<Task<?>> taskList) {\n this.bundle = bundle;\n //taskNotificationDispatcher.setBundle(bundle);\n this.taskList = taskList;\n this.taskWrapperList = new ArrayList<>(taskList.size());\n this.dataProvider = taskList.get(0).getDataProvider();\n this.uuidList = bundle.getUuidPath().getList();\n ClassLoader taskClassLoader = null;\n try {\n taskClassLoader = getTaskClassLoader(taskList.get(0));\n usedClassLoader = threadManager.useClassLoader(taskClassLoader);\n } catch (final Exception e) {\n final String msg = ExceptionUtils.getMessage(e) + \" - class loader lookup failed for uuidPath=\" + uuidList;\n if (debugEnabled) log.debug(msg, e);\n else log.warn(msg);\n }\n accumulatedElapsed.set(0L);\n }",
"@Override\n protected void onStartLoading() {\n if (mTaskData != null) {\n // Delivers any previously loaded data immediately\n deliverResult(mTaskData);\n } else {\n // Force a new load\n forceLoad();\n }\n }",
"@Override\n protected void onStartLoading() {\n if (mTaskData != null) {\n // Delivers any previously loaded data immediately\n deliverResult(mTaskData);\n } else {\n // Force a new load\n forceLoad();\n }\n }",
"@Override\n public void onRefresh() {\n new LoadScholsTask(this).execute();\n }",
"protected void setupTask(Task task) {\n }",
"@Override\n protected void onStartLoading() {\n Utils.postToMainLoop(new Runnable() {\n @Override\n public void run() {\n if (mResult != null) // If we currently have a result available, deliver it immediately.\n deliverResult(mResult);\n\n if (isReload() || mResult == null)\n forceLoad();\n }\n });\n }",
"@Override\n protected void onStart(){\n taskCollectors = getLocallyStoredData(storeRetrieveData);\n int size = taskCollectors.size();\n if (size<3){\n switch (size){\n case 0:\n taskCollectors.add(new TaskCollector(\"today\",new ArrayList<Task>()));\n case 1:\n taskCollectors.add(new TaskCollector(\"collection\",new ArrayList<Task>()));\n case 2:\n taskCollectors.add(new TaskCollector(\"courses\",new ArrayList<Task>()));\n default:\n break;\n }\n }\n if (taskCollectors.size()>0&&index<taskCollectors.size()){\n tasks = taskCollectors.get(index).getTasks();\n switch (index){\n case 0:\n taskCollectors.get(0).setName(\"today\");\n case 1:\n taskCollectors.get(1).setName(\"collection\");\n case 2:\n taskCollectors.get(2).setName(\"courses\");\n default:\n break;\n }\n mFloatingNavView.setImageBitmap(textAsBitmap(taskCollectors.get(index).getName(), 40, Color.parseColor(\"#515151\")));\n }\n //闹钟操作\n installAlarms(getApplicationContext(),taskCollectors);\n super.onStart();\n }",
"@Override\n\tpublic void loadEvents() {\n\t\t\n\t}",
"public void setLoaded();",
"public List<Task> loadDependentTasks(Task task) {\n\t\treturn null;\r\n\t}",
"public List<Task> load(){\n try {\n List<Task> tasks = getTasksFromFile();\n return tasks;\n }catch (FileNotFoundException e) {\n System.out.println(\"☹ OOPS!!! There is no file in the path: \"+e.getMessage());\n List<Task> tasks = new ArrayList();\n return tasks;\n }\n }",
"@Override\n\tpublic void onTaskPreExecute() {\n\t\tLog.i(TAG, \"pre executing\");\n\t}",
"void loadJobDetails() {\n if (!enabled.get()) {\n LOGGER.info(\"Skip loading scheduled jobs\");\n return;\n }\n loadJobsInCurrentChunk()\n .filter(j -> !scheduler.scheduled(j.getId()).isPresent())//not consider already scheduled jobs\n .flatMapRsPublisher(t -> ErrorHandling.skipErrorPublisher(scheduler::schedule, t))\n .forEach(a -> LOGGER.debug(\"Loaded and scheduled job {}\", a))\n .run()\n .whenComplete((v, t) -> Optional.ofNullable(t)\n .map(ex -> {\n LOGGER.error(\"Error Loading scheduled jobs!\", ex);\n return null;\n })\n .orElseGet(() -> {\n LOGGER.info(\"Loading scheduled jobs completed !\");\n return null;\n }));\n }",
"public abstract boolean isLoadCompleted();",
"void registerTasks(Object taskClassObject);",
"@Override\n public void getTasks(@NonNull final LoadTasksCallback callback) {\n if(mCachedTasks != null && !mCacheIsDirty) {\n callback.onTasksLoaded(new ArrayList<Task>(mCachedTasks.values()));\n return;\n }\n if(mCacheIsDirty) {\n // If cache is dirty fetch data from the remote source again\n getTaskFromRemoteDataSource(callback);\n } else {\n // Query the Local Storage is available . If not query the network\n mTasksLocalDataSource.getTasks(new LoadTasksCallback() {\n @Override\n public void onTasksLoaded(List<Task> tasks) {\n refreshCache(tasks);\n callback.onTasksLoaded(new ArrayList<Task>(mCachedTasks.values()));\n }\n\n @Override\n public void onDataNotAvailable() {\n getTaskFromRemoteDataSource(callback);\n }\n });\n }\n\n }",
"void refreshTaskInformation();",
"@Override\n public void init() {\n this.log.pri1(LoggingInterface.INIT_START, \"\");\n // Any task initialization code goes here.\n this.log.pri1(LoggingInterface.INIT_END, \"\");\n }",
"private void refreshList() {\n if (loadStepsTask != null) {\n loadStepsTask.cancel(false);\n }\n loadStepsTask = new LoadStepsTask(this, dbManager);\n loadStepsTask.execute();\n }",
"@Override\n\tpublic void preExecuteTask(Task t,Map context) {\n\t\tlog.info(\"Task Id:\"+t.getTaskId()+\"--Task Name:\"+t.getTaskName()+\"--Task begin execute!\");\n\t}",
"abstract void doTaskOnRun();",
"boolean hasTask();",
"@Override\n protected void onStartLoading() {\n\n forceLoad();\n }",
"public boolean isLoaded(){return true;}",
"public void load() {\n handleLoad(false, false);\n }",
"@Override\n protected void onStartLoading() {\n forceLoad();\n\n }",
"@Override\n protected void onResume() {\n super.onResume();\n\n // Don't retrieve tasks if it's still running\n if (mTaskRetriever != null) {\n return;\n }\n\n // get tasks\n mTaskRetriever = new TaskRetriever();\n mTaskRetriever.execute((Void) null);\n }",
"@Override\r\n\tpublic void doTask() {\n\t}",
"boolean isLoaded();",
"@Override\n protected void onPreExecute(){\n //do before task doing in background\n }",
"private void registerTaskInstances() {\n\t\t// For all tasks from DB\n\t\tfor (TaskFromDBTrigger trigger : tasksList) {\n\t\t\tif (trigger.isValid()) {\n\t\t\t\ttrigger.initTrigger();\n\t\t\t} else {\n\t\t\t\tlog.error(\"Invalid task from db with ID: \" + trigger.getTaskId());\n\t\t\t}\n\t\t}\n\t}",
"@Override\n protected void onResume() {\n super.onResume();\n // loading dispositius via AsyncTask\n new LoadDispositiusTask().execute();\n }",
"public void processTasks (List tasks) {\n if (!allNecessaryAssetsReported()) { // if need subordinates aren't there yet, way 10 seconds\n getAllAssets ();\n delayedTasks.addAll (tasks);\n\n if (logger.isInfoEnabled()) {\n\tlogger.info (getName() + \" - necessary subords have not reported, so waiting \" + waitTime + \n\t\t \" millis to process \" + delayedTasks.size () + \n\t\t \" tasks.\");\n\treportMissingAssets ();\n }\n\n examineBufferAgainIn (waitTime); // wait 10 seconds and check again\n }\n else { // ok, all subords are here, lets go!\n if (logger.isInfoEnabled()) {\n\tlogger.info (getName() + \" - all necessary subords have reported, so processing \" + tasks.size() + \n\t\t \" tasks.\");\n }\n\n tasks.addAll (delayedTasks);\n delayedTasks.clear();\n super.processTasks (tasks);\n }\n }",
"@Override\n public void start(int totalTasks) {\n }",
"public void doAllTasks() throws Exception {\n final GenericInitializer<E,T> initializer = config.getInitializer();\n final TaskFactory<E,T,GenericInitializer<E,T>> initTaskFac = config.getInitFactory();\n final ObjectCache<GenericInitializer<E,T>> initCache = new ObjectCache<>(2*threads,initializer);\n \n final long sT = System.currentTimeMillis();\n List<Task<T>> initTasks = comm.getInitialTasks(maxTasks,myID);\n final long mT = System.currentTimeMillis();\n initFetchTimeMS += mT-sT;\n initChunksGotten++;\n \n do{\n noInits = initTasks.size();\n if(noInits == 0){\n // nothing to be done, kinda weird.\n System.out.println(\"WARNING: No tasks gotten for threading backend \" + myID + \" continuing but wondering...\");\n break;\n }\n // kind of subptimal but we need to get the ID offset\n currIDStart = (int) initTasks.get(0).getDummyAnswer(myID).getResult().getID();\n \n if(DEBUG){System.out.println(\"DEBUG: Starting with ID \" + currIDStart + \" we have \" + initTasks.size() + \" tasks to init.\");}\n\n final long tOff = System.currentTimeMillis();\n doXXX(threads, initTaskFac, initCache, initTasks);\n final long tMid = System.currentTimeMillis();\n initWorkTimeMS += (tMid-tOff);\n \n final boolean doneYet = synchronizePools(true);\n if(!doneYet){\n initTasks = comm.getInitialTasks(maxTasks,myID);\n initChunksGotten++;\n } else {\n initTasks.clear(); // not strictly necessary, I think\n }\n final long tEnd = System.currentTimeMillis();\n initFetchTimeMS += (tEnd-tMid);\n \n } while(!initTasks.isEmpty());\n \n // merge pools, technically this should have happened before already. However, this does not hurt and synchronizes even further.\n synchronizePools(false);\n \n ISINIT = false;\n \n // then do globopt tasks (setup task factory and cachers)\n final GenericGlobalOptimization<E,T> globopt = config.getGlobalOptimization();\n final ObjectCache<GenericGlobalOptimization<E,T>> globCache = new ObjectCache<>(2*threads,globopt);\n TaskFactory<E,T,GenericGlobalOptimization<E,T>> globTasks = new GlobTaskFactory<>();\n\n while(!comm.isEverythingDone()){\n \n final long tOff = System.currentTimeMillis();\n doXXX(threads, globTasks, globCache, (int) currIDStart, (int) tasksGotten);\n final long tMid = System.currentTimeMillis();\n optWorkTimeMS += (tMid-tOff);\n \n final boolean done = synchronizePools(false);\n final long tEnd = System.currentTimeMillis();\n optFetchTimeMS += (tEnd-tMid);\n \n if(done) {break;}\n }\n }",
"public void taskStarted(BuildEvent event) {\n }",
"public void ondemandSetupIsDone();",
"protected abstract void createTasks();",
"public void loadFields() {\n \tsuper.loadFields();\n \tif(getUIContext().get(\"taskId\")!=null){\n \t\teditData.setRelateTask((FDCScheduleTaskInfo) getUIContext().get(\"taskId\"));\n \t}\n \tfillPnlTaskInfo();\n \t\n }",
"public void doIdleTasks();",
"public interface ITaskFactoryLoader {\n\n\t/**\n\t * Dynamically load an ITaskFactory instance given its class name. \n\t * @param classname The fully qualified class name of the desired ITaskFactory class.\n\t * @return An ITaskFactory instance.\n\t */\n\tITaskFactory<?> load(String classname);\n\n}",
"public ArrayList<Task> load() {\n assert tasks != null : \"tasks cannot be null\";\n try {\n File myFile = new File(\"duke.txt\");\n myFile.createNewFile();\n decideTaskType(myFile);\n } catch (IOException e) {\n System.out.println(\"An error occurred\");\n e.printStackTrace();\n }\n return tasks;\n }",
"public void setUp() {\n instance = new Task();\n }",
"public boolean isLoaded();",
"public void handleLoad() throws IOException {\n File file = new File(this.path);\n\n // creates data directory if it does not exist\n file.getParentFile().mkdirs();\n\n // creates tasks.txt if it does not exist\n if (!file.exists()) {\n file.createNewFile();\n }\n\n Scanner sc = new Scanner(file);\n\n while (sc.hasNext()) {\n String longCommand = sc.nextLine();\n String[] keywords = longCommand.split(\" \\\\|\\\\| \");\n Task cur = null;\n switch (keywords[1]) {\n case \"todo\":\n cur = new Todo(keywords[2]);\n break;\n case \"deadline\":\n cur = new Deadline(keywords[2], keywords[3]);\n break;\n case \"event\":\n cur = new Event(keywords[2], keywords[3]);\n break;\n default:\n System.out.println(\"error\");\n break;\n }\n if (keywords[0].equals(\"1\")) {\n cur.markAsDone();\n }\n TaskList.getTaskLists().add(cur);\n }\n sc.close();\n }",
"public void loadStatus (){\n\t}",
"@Override\n public void run() {\n ArticleHeaders.loadData(getApplicationContext());\n CustomerHeaders.loadData(getApplicationContext());\n OrderReasons.loadData(getApplicationContext());\n }",
"private static void load(){\n }",
"public TaskManager() {\n\t\tcompletedTasks = new ArrayList<Tasks>();\n\t}",
"public void updateTask() {}",
"public void onStart(LoadScenarioInfo loadScenarioInfo){\n }",
"public interface TaskLoadedCallback {\n void onTaskDone(Object... values);\n}",
"public interface TaskLoadedCallback {\n void onTaskDone(Object... values);\n}",
"public static void SelfCallForLoading() {\n\t}",
"abstract void run(TaskList tasks, MainWindow ui, Storage storage);",
"abstract boolean shouldTaskActivate();",
"protected void scheduleLoading()\n {\n if (!valid)\n return;\n\n if (!scheduled) {\n Handler handler = new Handler(getLooper());\n handler.post(this::updateLoading);\n }\n }",
"@PostConstruct\n\tpublic void init()\n\t{\n\t\tlogModule.info(TaskGenerator.class, \"初始化 Task generator...\");\n\t}",
"private void wGetDepStart(Map<String, Object> obj) {\n Task task = new GetDepTask(context, obj);\n AsyncExecutant executant = new AsyncExecutant(context, task, R.string.loading, this, wGetDepSuccess, wGetDepFailed);\n executant.execute();\n }",
"@Test\n public void loadActiveTasksFromRepositoryAndLoadIntoView() {\n mPlaylistPresenter.setFiltering(PlaylistFilterType.ACTIVE_TASKS);\n mPlaylistPresenter.loadTasks(true);\n\n // Callback is captured and invoked with stubbed tasks\n verify(mSongsRepository).getSongs(mLoadTasksCallbackCaptor.capture());\n mLoadTasksCallbackCaptor.getValue().onSongsLoaded(TASKS);\n\n // Then progress indicator is hidden and active tasks are shown in UI\n verify(mTasksView).setLoadingIndicator(false);\n ArgumentCaptor<List> showTasksArgumentCaptor = ArgumentCaptor.forClass(List.class);\n verify(mTasksView).showTasks(showTasksArgumentCaptor.capture());\n assertTrue(showTasksArgumentCaptor.getValue().size() == 1);\n }",
"protected abstract void scheduler_init();",
"private void waitForBackgroupTasks() {\n this.objectStore.getAllObjectIDs();\n this.objectStore.getAllEvictableObjectIDs();\n this.objectStore.getAllMapTypeObjectIDs();\n }",
"@Override\n\t protected void onPreExecute() {\n\t }",
"private void loadLists() {\n loadSavedCourses();\n loadSavedSchedules();\n }",
"@Test\n public void loadCompletedTasksFromRepositoryAndLoadIntoView() {\n mPlaylistPresenter.setFiltering(PlaylistFilterType.COMPLETED_TASKS);\n mPlaylistPresenter.loadTasks(true);\n\n // Callback is captured and invoked with stubbed tasks\n verify(mSongsRepository).getSongs(mLoadTasksCallbackCaptor.capture());\n mLoadTasksCallbackCaptor.getValue().onSongsLoaded(TASKS);\n\n // Then progress indicator is hidden and completed tasks are shown in UI\n verify(mTasksView).setLoadingIndicator(false);\n ArgumentCaptor<List> showTasksArgumentCaptor = ArgumentCaptor.forClass(List.class);\n verify(mTasksView).showTasks(showTasksArgumentCaptor.capture());\n assertTrue(showTasksArgumentCaptor.getValue().size() == 2);\n }",
"@Override\n\tprotected void onStartLoading() {\n\t\tif (mData != null) {\n\t\t\tdeliverResult(mData);\n\t\t}\n\t\t// Now we're in start state so we need to monitor for data changes.\n\t\t// To do that we start to observer the data\n\t\t// Register for changes which is Loader dependent\n\t\tregisterObserver();\n\t\t// Now if we're in the started state and content is changes we have\n\t\t// a flag that we can check with the method takeContentChanged()\n\t\t// and force the load\t\t\t\t\t\n\t\tif (takeContentChanged() || mData == null) {\n\t\t\tforceLoad();\n\t\t}\n\t}",
"private void loadLists() {\n }",
"@Test\n public void loadAllTasksFromRepositoryAndLoadIntoView() {\n mPlaylistPresenter.setFiltering(PlaylistFilterType.ALL_TASKS);\n mPlaylistPresenter.loadTasks(true);\n\n // Callback is captured and invoked with stubbed tasks\n verify(mSongsRepository).getSongs(mLoadTasksCallbackCaptor.capture());\n mLoadTasksCallbackCaptor.getValue().onSongsLoaded(TASKS);\n\n // Then progress indicator is shown\n InOrder inOrder = inOrder(mTasksView);\n inOrder.verify(mTasksView).setLoadingIndicator(true);\n // Then progress indicator is hidden and all tasks are shown in UI\n inOrder.verify(mTasksView).setLoadingIndicator(false);\n ArgumentCaptor<List> showTasksArgumentCaptor = ArgumentCaptor.forClass(List.class);\n verify(mTasksView).showTasks(showTasksArgumentCaptor.capture());\n assertTrue(showTasksArgumentCaptor.getValue().size() == 3);\n }",
"@Override\n\tpublic void addTask(Task task) {\n\t\t\n\t}",
"public void prepareForDeferredProcessing() {\n\n }",
"public void onLoad() {\n\t}",
"TaskFactory getTaskFactory();",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t}",
"public interface OnTaskLoadRunningAppListener {\n void onTaskLoading(AppInfo appInfo, int sizeList);\n void onTaskLoading(AppInfo appInfo);\n void onTaskLoaded(List<AppInfo> list);\n}",
"protected void init() {\n new AsyncTask<Void, Void, Void>() {\n @Override\n protected Void doInBackground(Void... params) {\n RosFragmentActivity.this.init(nodeMainExecutorService);\n //Let everyone know that init is called\n synchronized (mNodeInitListeners) {\n for (final NodeInitListener nodeInitListener : mNodeInitListeners) {\n nodeInitListener.onNodeInit(nodeMainExecutorService, getMasterUri());\n }\n mNodeInitListeners.clear();\n }\n return null;\n }\n }.execute();\n }",
"@Override\n protected void onPreExecute()\n {\n }",
"@Override\n protected void onPreExecute()\n {\n }",
"@Override\n protected void onPreExecute()\n {\n }",
"@Override\n protected void onPreExecute()\n {\n }",
"@Override\n protected void onPreExecute()\n {\n }",
"@Override\n protected void onPreExecute()\n {\n }"
] | [
"0.75070864",
"0.7030403",
"0.6886005",
"0.6866301",
"0.67833114",
"0.6780113",
"0.6768373",
"0.6649555",
"0.6542632",
"0.6441297",
"0.6434637",
"0.6430089",
"0.6415783",
"0.6400705",
"0.63950217",
"0.63926446",
"0.6257337",
"0.6253249",
"0.6249249",
"0.6199102",
"0.6191081",
"0.6177699",
"0.6177699",
"0.6155271",
"0.61195934",
"0.61192256",
"0.6116397",
"0.6112865",
"0.6105563",
"0.60804653",
"0.60681516",
"0.6062471",
"0.60383904",
"0.6034148",
"0.6022851",
"0.6007781",
"0.60001785",
"0.5991271",
"0.59791034",
"0.5937321",
"0.59333354",
"0.5929131",
"0.5921431",
"0.59150046",
"0.5910808",
"0.59068173",
"0.5906004",
"0.5900001",
"0.5893853",
"0.5874462",
"0.5871351",
"0.5864442",
"0.5852567",
"0.5849011",
"0.5845922",
"0.58252674",
"0.58019507",
"0.57969487",
"0.5792697",
"0.5780339",
"0.57749623",
"0.5774906",
"0.57694066",
"0.575846",
"0.57551193",
"0.57508105",
"0.57482255",
"0.57045615",
"0.56922364",
"0.5683236",
"0.56771517",
"0.5677025",
"0.5677025",
"0.5676022",
"0.5672742",
"0.56610024",
"0.5659587",
"0.5650097",
"0.5648792",
"0.5646763",
"0.56435525",
"0.5643133",
"0.56419516",
"0.56297857",
"0.5624877",
"0.56247854",
"0.5614254",
"0.5613549",
"0.56117713",
"0.5609499",
"0.5609211",
"0.56045574",
"0.56041473",
"0.5598223",
"0.5595779",
"0.55940616",
"0.55940616",
"0.55940616",
"0.55940616",
"0.55940616",
"0.55940616"
] | 0.0 | -1 |
A basic interface that can be implemented to select EObject based of their location in a text resource. | public interface ISelector {
boolean accept(int startOffset, int endOffset);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface IContentSelection\n{\n \n /**\n * Returns true if this object has a selected part, false otherwise.\n * \n * @return true if a selected part is within this object, false otherwise.\n */\n public abstract boolean hasSelection();\n \n /**\n * Returns the selection start within this object.\n * \n * @return start position in atoms.\n */\n public abstract int getSelectionStart();\n \n /**\n * Returns the selection end within this object.\n * \n * @return end position in atoms.\n */\n public abstract int getSelectionEnd();\n \n /**\n * Removes all selections from this object. No content is removed.\n */\n public abstract void clearSelection(TextAppearance appearance);\n \n /**\n * Removes everything that is selected including the content of this object.\n */\n public abstract void removeSelection(IContentFactory factory,\n TextAppearance appearance);\n \n /**\n * Selected the parts between the to atom positions.\n * \n * @param start\n * start position in atoms\n * @param end\n * end position in atoms\n */\n public abstract void setSelection(int start, int end,\n TextAppearance appearance);\n \n}",
"public abstract LocalAbstractObject getObject(String locator) throws NoSuchElementException;",
"public Object getObjectAtLocation(Point p);",
"ResourceSelection createResourceSelection();",
"GeometricalObject getObject(int index);",
"public void select(String data, String objectName) {\n\t\n}",
"public GeometricalObject getObject(int index);",
"ObjectSelectionRule createObjectSelectionRule();",
"public abstract LocalAbstractObject getObject(UniqueID objectID) throws NoSuchElementException;",
"Object getSelection();",
"public ISelection getSelection(IClientContext context) throws Exception;",
"public interface LocatedItem<E> {\r\n /**\r\n * Get the item.\r\n * \r\n * @return\r\n */\r\n public E getItem();\r\n\r\n /**\r\n * Get the ontology URI to which the item belongs.\r\n * \r\n * @return\r\n */\r\n public String getOntologyURI();\r\n}",
"public void getByPropertyemployee(String textToFind){\n\t\t// ejemplo buscar por propiedad direccion\n\t\tEmployeeResult employeeResult = getJerseyClient().resource(getBaseUrl() + \"/employee/search/\"+textToFind).get(EmployeeResult.class);\n\t\tfor (EmployeeDTO c : employeeResult.getEmployees()) {\n\t\t\tSystem.out.println(\"Nombre: \"+c.getName());\n\t\t\tSystem.out.println(\"Apellido: \"+c.getSurname());\n\t\t\tSystem.out.println(\"Direccion: \"+c.getAddress());\n\t\t\tSystem.out.println(\"RUC: \"+c.getRUC());\n\t\t\tSystem.out.println(\"Telefono: \"+c.getCellphone());\n\t\t}\n\t\t\n\t}",
"public int indexOf(GeometricalObject object);",
"public CObject get_ExpressionObjects(short expoi)\r\n {\r\n if (rh2ActionOn)\t\t\t\t\t// On est dans les actions ?\r\n {\r\n // Dans une action\r\n rh2EnablePick = false;\t\t\t\t\t// En cas de chooseflag\r\n return get_CurrentObjects(expoi);\t// Pointe l'oiList\r\n }\r\n\r\n // Dans un evenement\r\n // -----------------\r\n CObjInfo oilPtr;\r\n if (expoi >= 0)\r\n {\r\n oilPtr = rhPtr.rhOiList[expoi];\r\n if (oilPtr.oilEventCount == rh2EventCount)\t\t// Selection actuelle?\r\n {\r\n if (oilPtr.oilListSelected >= 0)\t\t\t// Le premier\r\n {\r\n return rhPtr.rhObjectList[oilPtr.oilListSelected];\r\n }\r\n if (oilPtr.oilObject >= 0)\t\t\t\t\t// Prend le premier objet\r\n {\r\n return rhPtr.rhObjectList[oilPtr.oilObject];\r\n }\r\n\r\n // Pas d'objet!\r\n // ~~~~~~~~~~~~\r\n return null;\r\n }\r\n else\r\n {\r\n if (oilPtr.oilObject >= 0)\t\t\t\t\t// Prend le premier objet\r\n {\r\n return rhPtr.rhObjectList[oilPtr.oilObject];\r\n }\r\n\r\n // Pas d'objet!\r\n // ~~~~~~~~~~~~\r\n return null;\r\n }\r\n }\r\n\r\n // Un qualifier: trouve la premiere liste selectionnee\r\n // ---------------------------------------------------\r\n CQualToOiList pQoi = qualToOiList[expoi & 0x7FFF];\r\n int qoi = 0;\r\n if (qoi >= pQoi.qoiList.length)\r\n {\r\n return null;\r\n }\r\n // Recherche un objet selectionne\r\n do\r\n {\r\n oilPtr = rhPtr.rhOiList[pQoi.qoiList[qoi + 1]];\r\n if (oilPtr.oilEventCount == rh2EventCount)\r\n {\r\n if (oilPtr.oilListSelected >= 0)\t// Le premier selectionne?\r\n {\r\n return rhPtr.rhObjectList[oilPtr.oilListSelected];\r\n }\r\n }\r\n qoi += 2;\r\n } while (qoi < pQoi.qoiList.length);\r\n\r\n // Pas trouve: prend le premier de la premiere liste disponible\r\n qoi = 0;\r\n do\r\n {\r\n oilPtr = rhPtr.rhOiList[pQoi.qoiList[qoi + 1]];\r\n if (oilPtr.oilObject >= 0)\t\t\t\t\t\t\t// Le premier selectionne?\r\n {\r\n return rhPtr.rhObjectList[oilPtr.oilObject];\r\n }\r\n qoi += 2;\r\n } while (qoi < pQoi.qoiList.length);\r\n\r\n return null;\r\n }",
"int indexOf(GeometricalObject object);",
"public interface IDBSelection{\n\t\tpublic String getSelection();\n\t\tpublic String[] getArgs();\n\t}",
"protected abstract void beginTextObject();",
"protected boolean findObject(Object obj){\n \n }",
"protected EObject getEObject(URI uri) {\n\t\tXtextEditor xtextEditor = EditorUtils.getActiveXtextEditor();\n\t\treturn xtextEditor.getDocument().readOnly(resource -> {\n\t\t\treturn resource.getResourceSet().getEObject(uri, true);\n\t\t});\n\t}",
"public interface Selectable {\n\n /**\n * Initializes the current selection to begin with the character at (x, y).\n * @return true if action resulted in change of selection.\n */\n boolean selectAt(double x, double y);\n\n /**\n * Extends the current selection to the character at (x, y)..\n * @return true if action resulted in change of selection.\n */\n boolean selectTo(double x, double y);\n\n /**\n * Selects the entire contents of the GraphicsNode at (x, y).\n * @return true if action resulted in change of selection.\n */\n boolean selectAll(double x, double y);\n\n /**\n * Get the current text selection.\n * @return an object containing the selected content.\n */\n Object getSelection();\n\n /**\n * Return a shape in user coords which encloses the current selection.\n */\n Shape getHighlightShape();\n}",
"void search( RealLocalizable reference );",
"public void select(Object obj, boolean selectionFlag);",
"@Override\r\n\tpublic void searchObjectListener(ActionEvent e) {\n\t\t\r\n\t}",
"E getByName(String name);",
"public Object read(Object object) {\n EntityManager em = getEntityManager();\n em.getTransaction().begin();\n Object result = null;\n try {\n result = em.find(object.getClass(), \"id\");\n LOG.debug(\"Found \" + object);\n } catch (Exception e) {\n LOG.error(\"Could not find Object\", e);\n } finally {\n em.close();\n }\n return result;\n }",
"public XMLEleObject getObject() {\n if (Location != null) {\n SecName newName = new SecName(Location);\n newName.setAll(Name, Location, MyFont);\n return newName;\n }\n return null;\n }",
"public static void lookupObject(Object object, String... params) {\n // identify which object to lookup and then set the menu appropriately\n if (Lead.class.equals(object.getClass())) {\n Lead lead = (Lead) object;\n setMenuLines(\"\", 1, 7, 9, 11, 13, 14, 15, 16, 17, 18, 19, 21);\n setMenuLines(HIGHLIGHT_COLOR + \"Information of Lead with id \" + lead.getId() + HIGHLIGHT_COLOR, 4);\n setMenuLines(\"Name: \" + INSERT_HIGHLIGHT_COLOR + lead.getName() + ANSI_RESET, 6);\n setMenuLines(\"Phone Number: \" + INSERT_HIGHLIGHT_COLOR + lead.getPhoneNumber() + ANSI_RESET, 8);\n setMenuLines(\"Email: \" + INSERT_HIGHLIGHT_COLOR + lead.getEmail() + ANSI_RESET, 10);\n setMenuLines(\"Company Name: \" + INSERT_HIGHLIGHT_COLOR + lead.getCompanyName() + ANSI_RESET, 12);\n setMenuLines(HIGHLIGHT_COLOR + \"ENTER \" + ANSI_RESET + \"- return to the main menu\", 20);\n\n } else if (Contact.class.equals(object.getClass())) {\n Contact contact = (Contact) object;\n setMenuLines(\"\", 1, 7, 9, 11, 13, 14, 15, 16, 17, 18, 19, 21);\n setMenuLines(HIGHLIGHT_COLOR + \"Information of Contact with id \" + contact.getId() + HIGHLIGHT_COLOR, 4);\n setMenuLines(\"Name: \" + INSERT_HIGHLIGHT_COLOR + contact.getName() + ANSI_RESET, 6);\n setMenuLines(\"Phone Number: \" + INSERT_HIGHLIGHT_COLOR + contact.getPhoneNumber() + ANSI_RESET, 8);\n setMenuLines(\"Email: \" + INSERT_HIGHLIGHT_COLOR + contact.getEmail() + ANSI_RESET, 10);\n setMenuLines(\"Company Name: \" + INSERT_HIGHLIGHT_COLOR + contact.getCompanyName() + ANSI_RESET, 12);\n setMenuLines(HIGHLIGHT_COLOR + \"ENTER \" + ANSI_RESET + \"- return to the main menu\", 20);\n\n } else if (Opportunity.class.equals(object.getClass())) {\n Opportunity opportunity = (Opportunity) object;\n if (params.length == 0) {\n setMenuLines(\"\", 1, 7, 9, 11, 13, 14, 15, 16, 17, 18, 19, 21);\n setMenuLines(HIGHLIGHT_COLOR + \"Information of Opportunity with id \" + opportunity.getId() + HIGHLIGHT_COLOR, 4);\n setMenuLines(\"Product: \" + INSERT_HIGHLIGHT_COLOR + opportunity.getProduct() + ANSI_RESET, 6);\n setMenuLines(\"Quantity: \" + INSERT_HIGHLIGHT_COLOR + opportunity.getQuantity() + ANSI_RESET, 8);\n setMenuLines(\"Decision Maker: \" + INSERT_HIGHLIGHT_COLOR + opportunity.getDecisionMaker().getName() + ANSI_RESET, 10);\n setMenuLines(\"Status: \" + INSERT_HIGHLIGHT_COLOR + opportunity.getStatus() + ANSI_RESET, 12);\n setMenuLines(HIGHLIGHT_COLOR + \"ENTER\" + ANSI_RESET + \"- expand contact | \" + HIGHLIGHT_COLOR + \"back \" + ANSI_RESET + \"- return to the main menu\", 20);\n } else if (params.length == 1 && params[0].toLowerCase().equals(\"contact\")) {\n setMenuLines(\"Decision Maker: Id: \" + INSERT_HIGHLIGHT_COLOR + opportunity.getDecisionMaker().getId() + ANSI_RESET, 10);\n setMenuLines(\" Name: \" + INSERT_HIGHLIGHT_COLOR + opportunity.getDecisionMaker().getName() + ANSI_RESET, 11);\n setMenuLines(\" Phone Number: \" + INSERT_HIGHLIGHT_COLOR + opportunity.getDecisionMaker().getPhoneNumber() + ANSI_RESET, 12);\n setMenuLines(\" Email: \" + INSERT_HIGHLIGHT_COLOR + opportunity.getDecisionMaker().getEmail() + ANSI_RESET, 13);\n setMenuLines(\" Company Name: \" + INSERT_HIGHLIGHT_COLOR + opportunity.getDecisionMaker().getCompanyName() + ANSI_RESET, 14);\n setMenuLines(\"Status: \" + INSERT_HIGHLIGHT_COLOR + opportunity.getStatus() + ANSI_RESET, 16);\n setMenuLines(HIGHLIGHT_COLOR + \"ENTER \" + ANSI_RESET + \"- return to the main menu\", 20);\n }\n\n } else if (Account.class.equals(object.getClass())) {\n Account account = (Account) object;\n if (params.length == 0) {\n setMenuLines(\"\", 1, 7, 9, 11, 13, 15, 17, 18, 19, 21);\n setMenuLines(HIGHLIGHT_COLOR + \"Information of Account with id \" + account.getId() + HIGHLIGHT_COLOR, 4);\n setMenuLines(\"Industry: \" + INSERT_HIGHLIGHT_COLOR + account.getIndustry() + ANSI_RESET, 6);\n setMenuLines(\"Employee Count: \" + INSERT_HIGHLIGHT_COLOR + account.getEmployeeCount() + ANSI_RESET, 8);\n setMenuLines(\"Number of Contacts: \" + INSERT_HIGHLIGHT_COLOR + account.getContactList().size() + ANSI_RESET, 10);\n setMenuLines(\"Number of Opportunities: \" + INSERT_HIGHLIGHT_COLOR + account.getOpportunityList().size() + ANSI_RESET, 12);\n setMenuLines(\"City: \" + INSERT_HIGHLIGHT_COLOR + account.getCity() + ANSI_RESET, 14);\n setMenuLines(\"Country: \" + INSERT_HIGHLIGHT_COLOR + account.getCountry() + ANSI_RESET, 16);\n setMenuLines(HIGHLIGHT_COLOR + \"contacts \" + ANSI_RESET + \"- show Account's Contacts | \" +\n HIGHLIGHT_COLOR + \"opportunities \" + ANSI_RESET + \"- show Account's Opportunities | \" + HIGHLIGHT_COLOR +\n \"back \" + ANSI_RESET + \"- return to the main menu\", 20);\n } else if (params.length == 1) {\n switch (params[0].toLowerCase()) {\n case \"contacts\":\n break;\n case \"opportunities\":\n break;\n case \"both\":\n break;\n }\n }\n } else {\n throw new IllegalArgumentException(\"There is no class \" + object.getClass());\n }\n\n PrinterMenu.printMenu(\"\");\n }",
"public abstract SmartObject findIndividualName(String individualName);",
"@Override\r\n\tpublic String getText(Object object) {\r\n\t\treturn super.getText(object);\r\n\t}",
"@Override\n\tpublic Editore getOneByName(String name) {\n\t\treturn null;\n\t}",
"@Test\n public void testGetObject() throws java.sql.SQLException {\n // Get the NaturalKey by using the key factory,\n // supplying the appropriate key attributes using\n // test accessor methods. \n com.poesys.db.pk.NaturalPrimaryKey key = \n (com.poesys.db.pk.NaturalPrimaryKey)org.tair.db.locusdetail.LocusdetailFactory.getLocusDetailPrimaryKey(getTestKeyLocusTairObjectId(0));\n assertTrue(\"No key generated from concrete implementation\", key != null);\n \n // Query the object.\n BsLocusDetail object = delegate.getObject(key);\n assertTrue(\"Couldn't get object\", object != null);\n \n // Testing lazy loading of annotation Collection property\n java.util.Collection<org.tair.bs.locusdetail.BsAnnotation> annotation = \n object.getAnnotation();\n assertTrue(\"annotation not lazily loaded\", annotation != null);\n \n // Testing lazy loading of references Collection property\n java.util.Collection<org.tair.bs.locusdetail.BsReference> references = \n object.getReferences();\n assertTrue(\"references not lazily loaded\", references != null);\n }",
"public interface Text {\n \n /**\n * Method find name of class which object are instance\n * @return \n */\n String getStringClass();\n\n @Override\n public String toString();\n \n \n \n}",
"public interface Finder {\n /**\n * @param context The starting UiAutomationElement, used as search context\n * @return The matching elements on the current context\n */\n NodeInfoList find(UiElement context);\n\n /**\n * {@inheritDoc}\n * <p>\n * <p> It is recommended that this method return the description of the finder, for example,\n * \"{text=OK}\".\n */\n @Override\n String toString();\n}",
"eu.learnpad.transformations.metamodel_corpus.xwiki.Object getObject();",
"protected TextGuiTestObject edittext() \n\t{\n\t\treturn new TextGuiTestObject(\n getMappedTestObject(\"edittext\"));\n\t}",
"public Object getObject()\n {\n if (currentObject == null)\n \t return null;\n else\n return AL.indexOf(currentObject);\n }",
"ISObject loadContent(ISObject sobj);",
"interface Literals\n {\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.DocumentoImpl <em>Documento</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.DocumentoImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getDocumento()\n * @generated\n */\n EClass DOCUMENTO = eINSTANCE.getDocumento();\n\n /**\n * The meta object literal for the '<em><b>Path Modelo</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute DOCUMENTO__PATH_MODELO = eINSTANCE.getDocumento_PathModelo();\n\n /**\n * The meta object literal for the '<em><b>Path Ocl</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute DOCUMENTO__PATH_OCL = eINSTANCE.getDocumento_PathOcl();\n\n /**\n * The meta object literal for the '<em><b>Oraciones</b></em>' containment reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference DOCUMENTO__ORACIONES = eINSTANCE.getDocumento_Oraciones();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.OracionImpl <em>Oracion</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.OracionImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getOracion()\n * @generated\n */\n EClass ORACION = eINSTANCE.getOracion();\n\n /**\n * The meta object literal for the '<em><b>Contenido</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference ORACION__CONTENIDO = eINSTANCE.getOracion_Contenido();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.SimpleImpl <em>Simple</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.SimpleImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getSimple()\n * @generated\n */\n EClass SIMPLE = eINSTANCE.getSimple();\n\n /**\n * The meta object literal for the '<em><b>Determinante</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SIMPLE__DETERMINANTE = eINSTANCE.getSimple_Determinante();\n\n /**\n * The meta object literal for the '<em><b>Atributo</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SIMPLE__ATRIBUTO = eINSTANCE.getSimple_Atributo();\n\n /**\n * The meta object literal for the '<em><b>Sintagma</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SIMPLE__SINTAGMA = eINSTANCE.getSimple_Sintagma();\n\n /**\n * The meta object literal for the '<em><b>Contexto</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SIMPLE__CONTEXTO = eINSTANCE.getSimple_Contexto();\n\n /**\n * The meta object literal for the '<em><b>Obligacion</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SIMPLE__OBLIGACION = eINSTANCE.getSimple_Obligacion();\n\n /**\n * The meta object literal for the '<em><b>Operacion</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SIMPLE__OPERACION = eINSTANCE.getSimple_Operacion();\n\n /**\n * The meta object literal for the '<em><b>Literal</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute SIMPLE__LITERAL = eINSTANCE.getSimple_Literal();\n\n /**\n * The meta object literal for the '<em><b>Fin Oracion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute SIMPLE__FIN_ORACION = eINSTANCE.getSimple_FinOracion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.DeterminanteImpl <em>Determinante</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.DeterminanteImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getDeterminante()\n * @generated\n */\n EClass DETERMINANTE = eINSTANCE.getDeterminante();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute DETERMINANTE__DESCRIPCION = eINSTANCE.getDeterminante_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.AtributoImpl <em>Atributo</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.AtributoImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getAtributo()\n * @generated\n */\n EClass ATRIBUTO = eINSTANCE.getAtributo();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute ATRIBUTO__NAME = eINSTANCE.getAtributo_Name();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.SintagmaPreposicionalImpl <em>Sintagma Preposicional</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.SintagmaPreposicionalImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getSintagmaPreposicional()\n * @generated\n */\n EClass SINTAGMA_PREPOSICIONAL = eINSTANCE.getSintagmaPreposicional();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute SINTAGMA_PREPOSICIONAL__DESCRIPCION = eINSTANCE.getSintagmaPreposicional_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.ObligacionImpl <em>Obligacion</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.ObligacionImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getObligacion()\n * @generated\n */\n EClass OBLIGACION = eINSTANCE.getObligacion();\n\n /**\n * The meta object literal for the '<em><b>Negacion</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference OBLIGACION__NEGACION = eINSTANCE.getObligacion_Negacion();\n\n /**\n * The meta object literal for the '<em><b>Obligacion Deber</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference OBLIGACION__OBLIGACION_DEBER = eINSTANCE.getObligacion_ObligacionDeber();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.ObligacionDeberImpl <em>Obligacion Deber</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.ObligacionDeberImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getObligacionDeber()\n * @generated\n */\n EClass OBLIGACION_DEBER = eINSTANCE.getObligacionDeber();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute OBLIGACION_DEBER__DESCRIPCION = eINSTANCE.getObligacionDeber_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.NegacionImpl <em>Negacion</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.NegacionImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getNegacion()\n * @generated\n */\n EClass NEGACION = eINSTANCE.getNegacion();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute NEGACION__DESCRIPCION = eINSTANCE.getNegacion_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.OperacionImpl <em>Operacion</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.OperacionImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getOperacion()\n * @generated\n */\n EClass OPERACION = eINSTANCE.getOperacion();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute OPERACION__DESCRIPCION = eINSTANCE.getOperacion_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.ClaseImpl <em>Clase</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.ClaseImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getClase()\n * @generated\n */\n EClass CLASE = eINSTANCE.getClase();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute CLASE__NAME = eINSTANCE.getClase_Name();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.CompuestaImpl <em>Compuesta</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.CompuestaImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getCompuesta()\n * @generated\n */\n EClass COMPUESTA = eINSTANCE.getCompuesta();\n\n /**\n * The meta object literal for the '<em><b>Simple Inicial</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPUESTA__SIMPLE_INICIAL = eINSTANCE.getCompuesta_SimpleInicial();\n\n /**\n * The meta object literal for the '<em><b>Nexo</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPUESTA__NEXO = eINSTANCE.getCompuesta_Nexo();\n\n /**\n * The meta object literal for the '<em><b>Simple Final</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPUESTA__SIMPLE_FINAL = eINSTANCE.getCompuesta_SimpleFinal();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.NexoImpl <em>Nexo</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.NexoImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getNexo()\n * @generated\n */\n EClass NEXO = eINSTANCE.getNexo();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute NEXO__DESCRIPCION = eINSTANCE.getNexo_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.ComplejaImpl <em>Compleja</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.ComplejaImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getCompleja()\n * @generated\n */\n EClass COMPLEJA = eINSTANCE.getCompleja();\n\n /**\n * The meta object literal for the '<em><b>Determinante</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__DETERMINANTE = eINSTANCE.getCompleja_Determinante();\n\n /**\n * The meta object literal for the '<em><b>Atr</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__ATR = eINSTANCE.getCompleja_Atr();\n\n /**\n * The meta object literal for the '<em><b>Sintagma</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__SINTAGMA = eINSTANCE.getCompleja_Sintagma();\n\n /**\n * The meta object literal for the '<em><b>Contexto</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__CONTEXTO = eINSTANCE.getCompleja_Contexto();\n\n /**\n * The meta object literal for the '<em><b>Conect</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__CONECT = eINSTANCE.getCompleja_Conect();\n\n /**\n * The meta object literal for the '<em><b>Operacion Coleccion</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__OPERACION_COLECCION = eINSTANCE.getCompleja_OperacionColeccion();\n\n /**\n * The meta object literal for the '<em><b>Determinante1</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__DETERMINANTE1 = eINSTANCE.getCompleja_Determinante1();\n\n /**\n * The meta object literal for the '<em><b>Clase</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__CLASE = eINSTANCE.getCompleja_Clase();\n\n /**\n * The meta object literal for the '<em><b>Conect1</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__CONECT1 = eINSTANCE.getCompleja_Conect1();\n\n /**\n * The meta object literal for the '<em><b>Atr1</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__ATR1 = eINSTANCE.getCompleja_Atr1();\n\n /**\n * The meta object literal for the '<em><b>Ope3</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__OPE3 = eINSTANCE.getCompleja_Ope3();\n\n /**\n * The meta object literal for the '<em><b>Lit1</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute COMPLEJA__LIT1 = eINSTANCE.getCompleja_Lit1();\n\n /**\n * The meta object literal for the '<em><b>Atr2</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__ATR2 = eINSTANCE.getCompleja_Atr2();\n\n /**\n * The meta object literal for the '<em><b>Ope4</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__OPE4 = eINSTANCE.getCompleja_Ope4();\n\n /**\n * The meta object literal for the '<em><b>Atr4</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__ATR4 = eINSTANCE.getCompleja_Atr4();\n\n /**\n * The meta object literal for the '<em><b>Ope5</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__OPE5 = eINSTANCE.getCompleja_Ope5();\n\n /**\n * The meta object literal for the '<em><b>Lit2</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute COMPLEJA__LIT2 = eINSTANCE.getCompleja_Lit2();\n\n /**\n * The meta object literal for the '<em><b>Atr5</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__ATR5 = eINSTANCE.getCompleja_Atr5();\n\n /**\n * The meta object literal for the '<em><b>Conec1</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__CONEC1 = eINSTANCE.getCompleja_Conec1();\n\n /**\n * The meta object literal for the '<em><b>Ope Col</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__OPE_COL = eINSTANCE.getCompleja_OpeCol();\n\n /**\n * The meta object literal for the '<em><b>Ope6</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__OPE6 = eINSTANCE.getCompleja_Ope6();\n\n /**\n * The meta object literal for the '<em><b>Lit3</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute COMPLEJA__LIT3 = eINSTANCE.getCompleja_Lit3();\n\n /**\n * The meta object literal for the '<em><b>Atr3</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__ATR3 = eINSTANCE.getCompleja_Atr3();\n\n /**\n * The meta object literal for the '<em><b>Fin Oracion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute COMPLEJA__FIN_ORACION = eINSTANCE.getCompleja_FinOracion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.ConectorImpl <em>Conector</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.ConectorImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getConector()\n * @generated\n */\n EClass CONECTOR = eINSTANCE.getConector();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute CONECTOR__DESCRIPCION = eINSTANCE.getConector_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.OperacionColeccionImpl <em>Operacion Coleccion</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.OperacionColeccionImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getOperacionColeccion()\n * @generated\n */\n EClass OPERACION_COLECCION = eINSTANCE.getOperacionColeccion();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute OPERACION_COLECCION__DESCRIPCION = eINSTANCE.getOperacionColeccion_Descripcion();\n\n }",
"slco.Object getObject1();",
"public interface ComboPropertiesEditionPart {\n\n\t/**\n\t * @return the combo\n\t */\n\tpublic Object getCombo();\n\n\t/**\n\t * Init the combo\n\t * @param eClass the eClass to manage\n\t * @param current the current value\n\t */\n\tpublic void initCombo(ResourceSet allResources, EObject current);\n\n\t/**\n\t * Defines a new combo\n\t * @param newValue the new combo to set\n\t */\n\tpublic void setCombo(Object newValue);\n\n\t/**\n\t * Adds the given filter to the combo edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t */\n\tpublic void addFilterToCombo(ViewerFilter filter);\n\n\n\n\n\n\n\t/**\n\t * @return the comboRO\n\t */\n\tpublic Object getComboRO();\n\n\t/**\n\t * Init the comboRO\n\t * @param eClass the eClass to manage\n\t * @param current the current value\n\t */\n\tpublic void initComboRO(ResourceSet allResources, EObject current);\n\n\t/**\n\t * Defines a new comboRO\n\t * @param newValue the new comboRO to set\n\t */\n\tpublic void setComboRO(Object newValue);\n\n\t/**\n\t * Adds the given filter to the comboRO edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t */\n\tpublic void addFilterToComboRO(ViewerFilter filter);\n\n\n\n\n\n\n\n\n\n\n\t/**\n\t * Returns the internationalized title text.\n\t * \n\t * @return the internationalized title text.\n\t */\n\tpublic String getTitle();\n\n\t// Start of user code for additional methods\n\t\n\t// End of user code\n\n}",
"public XMLFindTagHandeler() {super(Object.class, \"FIND\", false);}",
"Object find(String name);",
"E find(final ID identifier) throws ResourceNotFoundException;",
"String objectRead();",
"@Override\n public String findIn(CopierData data) {\n return text;\n }",
"public abstract LocalAbstractObject getObject(AbstractObjectKey key) throws NoSuchElementException;",
"slco.Object getObject2();",
"public abstract int indexFor(Object obj);",
"public CObject evt_FirstObject(short sEvtOiList)\r\n {\r\n CObject pHo;\r\n\r\n evtNSelectedObjects = 0;\r\n rh2EventQualPos = null;\r\n rh2EventQualPosNum = -1;\r\n\r\n if (sEvtOiList < 0)\r\n {\r\n // Selectionne TOUS les objets ��� partir d'un qualifier\r\n // ---------------------------------------------------\r\n if (sEvtOiList == (short) -1)\t// -1: pas d'objet du tout dans le jeu!\r\n {\r\n return null;\r\n }\r\n // Appel de la procedure\r\n return qualProc(sEvtOiList);\r\n }\r\n\r\n CObjInfo oilPtr = rhPtr.rhOiList[sEvtOiList];\r\n if (oilPtr.oilEventCount == rh2EventCount)\t\t// Deja selectionne dans cet event?\r\n {\r\n // Prend la liste deja exploree dans un event precedent\r\n // ----------------------------------------------------\r\n if (oilPtr.oilListSelected < 0)\r\n {\r\n return null;\r\n }\r\n pHo = rhPtr.rhObjectList[oilPtr.oilListSelected];\r\n rh2EventPrev = null;\r\n rh2EventPrevOiList = oilPtr;\r\n rh2EventPos = pHo;\r\n rh2EventPosOiList = sEvtOiList;\r\n evtNSelectedObjects = oilPtr.oilNumOfSelected;\r\n return pHo;\r\n }\r\n else\r\n {\r\n // Selectionne TOUS les objets de meme type, retourne le premier dans EAX\r\n // ----------------------------------------------------------------------\r\n oilPtr.oilEventCount = rh2EventCount;\r\n\r\n // Si condition OR et conditions fausse, ne selectionne aucun objet\r\n if (rh4ConditionsFalse)\r\n {\r\n oilPtr.oilListSelected = -1;\r\n oilPtr.oilNumOfSelected = 0;\r\n return null;\r\n }\r\n\r\n // Ajoute les objets\r\n oilPtr.oilListSelected = oilPtr.oilObject;\r\n if (oilPtr.oilObject < 0)\r\n {\r\n oilPtr.oilNumOfSelected = 0;\r\n return null;\r\n }\r\n short num = oilPtr.oilObject;\r\n do\r\n {\r\n pHo = rhPtr.rhObjectList[num];\r\n num = pHo.hoNumNext;\r\n pHo.hoNextSelected = num;\r\n } while (num >= 0);\r\n\r\n pHo = rhPtr.rhObjectList[oilPtr.oilObject];\r\n rh2EventPrev = null;\r\n rh2EventPrevOiList = oilPtr;\r\n rh2EventPos = pHo;\r\n rh2EventPosOiList = sEvtOiList;\r\n oilPtr.oilNumOfSelected = oilPtr.oilNObjects;\r\n evtNSelectedObjects = oilPtr.oilNumOfSelected;\r\n return pHo;\r\n }\r\n }",
"@Override\r\n\tpublic void objectSelectListener(SelectEvent event) {\n\t\t\r\n\t}",
"public void getByPropertyStudyType(String textToFind){\n\t\tStudyTypeResult studyTypeResult = getJerseyClient().resource(getBaseUrl() + \"/study_type/search/\"+textToFind).get(StudyTypeResult.class);\r\n\t\tfor (StudyTypeDTO c : studyTypeResult.getStudies()) {\r\n\t\t\tSystem.out.println(c.getName());\r\n\t\t\tSystem.out.println(c.getDescription());\r\n\t\t}\r\n\t}",
"E getObject(int ID) throws DatabaseObjectNotFoundException, DatabaseNotAccessibleException;",
"public Object selectOneObject(String sqlText) {\n\r\n\t\tSqlCommand sqlCommand = new SqlCommand(Context.getDbConnection());\r\n\t\treturn sqlCommand.queryForValue(ExpressionMgmt.execute(sqlText, this).toString());\r\n\r\n\t}",
"public <E extends Retrievable> E getObject(String sql, Class<E> clazz);",
"public abstract org.omg.CORBA.Object read_Object();",
"AppStandard selectById(String id);",
"protected abstract void doSelection() throws IOException;",
"public AdvObject getObject(int index) {\n\t\treturn objects.get(index); // Replace with your code\n\t}",
"public void setSelectedItem(Object object) {\r\n\t\tfor (Export export : exportFilter) {\r\n\t\t\tif (export.toString().equals((String) object)) {\r\n\t\t\t\tlog.info(\"Export with name \" + (String) object + \" found.\");\r\n\t\t\t\tselectedItem = export;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setObjectName(String text) {\n\t\tif (selectedObjects.size() > 0)\n\t\t\tselectedObjects.get(0).changeName(text);\n\n\t}",
"public T caseExquery(Exquery object)\n {\n return null;\n }",
"public Object getObject() ;",
"public T caseText(Text object) {\n\t\treturn null;\n\t}",
"@Override\n public IDataCursor getCursor() {\n return new CaseInsensitiveElementListIDataCursor();\n }",
"@Override\r\n\tpublic T findEntity(String hql, Object[] obj) throws Exception {\n\t\tList<T> list = this.find(hql, obj);\r\n\t\tif (list != null && list.size() > 0) {\r\n\t\t\treturn list.get(0);\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic Object getAsObject(FacesContext arg0, UIComponent arg1, String string) {\n\t\t\n\t\tif (string == null || string.equals(\"Selecione um funcionario\")){\n\t\t\treturn null;\n\t\t}\n\t\treturn EntityManagerUtil.getEntityManager().find(Funcionario.class, Integer.parseInt(string));\n\t}",
"public Objects getObject(String itemName)\n {\n return items.get(itemName);\n }",
"private Object getFeature (EObject o, String feature) {\n\n if(o == null){\n System.out.println(\"Null object given\");\n }\n\n return o.eGet(o.eClass().getEStructuralFeature(feature));\n }",
"public CObject get_CurrentObjectQualifier(short qoil)\r\n {\r\n CObject pHo;\r\n short next, num;\r\n\r\n CQualToOiList pqoi = qualToOiList[qoil & 0x7FFF];\r\n if (pqoi.qoiActionCount != rh2ActionCount)\t\t\t//; Premiere exploration?\r\n {\r\n // PREMIERE EXPLORATION\r\n // --------------------\r\n pqoi.qoiActionCount = rh2ActionCount;\t\t\t//; C'est fait pour cette action\r\n pqoi.qoiActionLoopCount = rh2ActionLoopCount;\r\n\r\n // On recherche le premier dans les liste courantes\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n num = qoi_GetFirstListSelected(pqoi);\t\t\t\t\t//; La premiere liste avec objet selectionne\r\n if (num >= 0)\r\n {\r\n pqoi.qoiCurrentOi = num;\r\n pHo = rhPtr.rhObjectList[num];\r\n if (pHo == null)\r\n {\r\n pqoi.qoiCurrentRoutine = 0; // qoi2ndNone;\r\n pqoi.qoiCurrentOi = -1;\t\t\t\t\t\t// Pas de suivant!\r\n return null;\r\n }\r\n next = pHo.hoNextSelected;\r\n if (next < 0)\r\n {\r\n next = qoi_GetNextListSelected(pqoi);\r\n if (next < 0)\r\n {\r\n pqoi.qoiCurrentRoutine = 1; // qoi2ndOneOnly;\r\n pqoi.qoiNextFlag = false;\r\n repeatFlag = false;\r\n return pHo;\r\n }\r\n }\r\n pqoi.qoiNext = next;\r\n pqoi.qoiCurrentRoutine = 2; // qoi2ndCurrent;\r\n pqoi.qoiNextFlag = true;\t\t\t\t\t\t\t// Un suivant!\r\n repeatFlag = true;\r\n return pHo;\r\n }\r\n\r\n // Prendre tous?\r\n // ~~~~~~~~~~~~~\r\n if (rh2EnablePick)\t\t\t\t\t\t// Pick autoris���?\r\n {\r\n if (pqoi.qoiSelectedFlag)\t\t\t\t\t//; Une des listes a ete vue pendant les conditions\r\n {\r\n pqoi.qoiCurrentRoutine = 0; // qoi2ndNone;\r\n pqoi.qoiCurrentOi = -1;\t\t\t\t\t\t// Pas de suivant!\r\n return null;\r\n }\r\n }\r\n num = qoi_GetFirstList(pqoi);\r\n if (num >= 0)\r\n {\r\n pqoi.qoiCurrentOi = num;\t\t\t\t\t\t\t//; Stocke le numero de l'objet courant\r\n pHo = rhPtr.rhObjectList[num];\r\n if (pHo != null)\r\n {\r\n num = pHo.hoNumNext;\r\n if (num < 0)\r\n {\r\n num = qoi_GetNextList(pqoi);\r\n if (num < 0)\r\n {\r\n pqoi.qoiCurrentRoutine = 1; // qoi2ndOneOnly;\r\n pqoi.qoiNextFlag = false;\r\n repeatFlag = false;\r\n return pHo;\r\n }\r\n }\r\n pqoi.qoiNext = num;\t\t\t\t\t\t\t// Numero de l'objet\r\n pqoi.qoiCurrentRoutine = 3; // qoi2ndAll;\r\n pqoi.qoiNextFlag = true;\t\t\t\t\t\t// Un suivant\r\n repeatFlag = true;\r\n return pHo;\r\n }\r\n }\r\n pqoi.qoiCurrentRoutine = 0; // qoi2ndNone;\r\n pqoi.qoiCurrentOi = -1;\t\t\t\t\t\t// Pas de suivant!\r\n return null;\r\n }\r\n\r\n if (pqoi.qoiActionLoopCount != rh2ActionLoopCount)\t\t//; Premiere fois dans la boucle?\r\n {\r\n pqoi.qoiActionLoopCount = rh2ActionLoopCount;\t\t//; C'est fait pour cette boucle\r\n switch (pqoi.qoiCurrentRoutine)\r\n {\r\n // Pas d'objet\r\n case 0: // qoi2ndNone\r\n repeatFlag = pqoi.qoiNextFlag;\r\n return null;\r\n // Un seul objet\r\n case 1: // qoi2ndOneOnly\r\n pHo = rhPtr.rhObjectList[pqoi.qoiCurrentOi];\r\n repeatFlag = pqoi.qoiNextFlag;\r\n return pHo;\r\n // Objet suivant dans la liste courante\r\n case 2: // qoi2ndCurrent\r\n pqoi.qoiCurrentOi = pqoi.qoiNext;\t\t\t\t\t// Numero de l'objet suivant\r\n pHo = rhPtr.rhObjectList[pqoi.qoiNext];\r\n if (pHo != null)\r\n {\r\n next = pHo.hoNextSelected;\r\n if (next < 0)\r\n {\r\n next = qoi_GetNextListSelected(pqoi);\r\n if (next < 0)\r\n {\r\n pqoi.qoiNextFlag = false;\t\t\t\t\t// Plus de suivant!\r\n next = qoi_GetFirstListSelected(pqoi); // Repart au debut\r\n }\r\n }\r\n pqoi.qoiNext = next;\r\n }\r\n repeatFlag = pqoi.qoiNextFlag;\r\n return pHo;\r\n // Objet suivant global\r\n case 3: // qoi2ndAll\r\n pqoi.qoiCurrentOi = pqoi.qoiNext;\t\t\t\t\t// Numero de l'objet suivant\r\n pHo = rhPtr.rhObjectList[pqoi.qoiNext];\r\n if (pHo != null)\r\n {\r\n next = pHo.hoNumNext;\r\n if (next < 0)\r\n {\r\n next = qoi_GetNextList(pqoi);\r\n if (next < 0)\r\n {\r\n pqoi.qoiNextFlag = false;\t\t\t\t\t// Plus de suivant\r\n next = qoi_GetFirstList(pqoi);\t\t\t// Repart au debut\r\n }\r\n }\r\n pqoi.qoiNext = next;\r\n }\r\n repeatFlag = pqoi.qoiNextFlag;\r\n return pHo;\r\n }\r\n }\r\n\r\n if (pqoi.qoiCurrentOi < 0)\r\n {\r\n return null;\r\n }\r\n pHo = rhPtr.rhObjectList[pqoi.qoiCurrentOi];\r\n repeatFlag = pqoi.qoiNextFlag;\r\n return pHo;\r\n }",
"public abstract String getListItem (Object obj, int i, String itemProp) \n throws SAFSException;",
"@Override\n public String getText(Object object) {\n String label = ((Reference)object).getName();\n return label == null || label.length() == 0 ?\n getString(\"_UI_Reference_type\") :\n getString(\"_UI_Reference_type\") + \" \" + label;\n }",
"public int indexOfObject(Object obj);",
"public FileObject findResource(String name) {\n Enumeration en = getFileSystems ();\n while (en.hasMoreElements ()) {\n FileSystem fs = (FileSystem)en.nextElement ();\n FileObject fo = fs.findResource(name);\n if (fo != null) {\n // object found\n return fo;\n }\n }\n return null;\n }",
"@Test\n\tpublic void testSearchSelection() throws Exception {\n\t\t// select an area known to have some strings\n\t\tAddressSet set = new AddressSet();\n\t\tset.addRange(addr(0x405d80), addr(0x405dc0));\n\n\t\t// select the address set\n\t\ttool.firePluginEvent(\n\t\t\tnew ProgramSelectionPluginEvent(\"Test\", new ProgramSelection(set), program));\n\n\t\twaitForSwing();\n\n\t\tdialog = getDialog();\n\t\tContainer container = dialog.getComponent();\n\n\t\t// check to make sure the search selection button is checked and enabled\n\t\tJRadioButton rb = (JRadioButton) findButton(container, \"Search Selection\");\n\t\tassertTrue(rb.isSelected());\n\t\tassertTrue(rb.isEnabled());\n\n\t\tStringTableProvider provider = performSearch();\n\t\tStringTableModel model = (StringTableModel) getInstanceField(\"stringModel\", provider);\n\t\ttoggleDefinedStateButtons(provider, false, true, false, false);\n\t\twaitForTableModel(model);\n\n\t\tassertEquals(3, model.getRowCount());\n\n\t\t// test the results size and that the correct strings are found\n\t\tint row = findRow(model, addr(0x405d81));\n\t\tassertEquals(\"00405d81\", getModelValue(model, row, addressColumnIndex).toString());\n\t\trow = findRow(model, addr(0x405d9c));\n\t\tassertEquals(\"00405d9c\", getModelValue(model, row, addressColumnIndex).toString());\n\t\trow = findRow(model, addr(0x405db4));\n\t\tassertEquals(\"00405db4\", getModelValue(model, row, addressColumnIndex).toString());\n\t}",
"public interface InternalLinkReferencePropertiesEditionPart {\n\n\t/**\n\t * @return the referencedLink\n\t * \n\t */\n\tpublic EObject getReferencedLink();\n\n\t/**\n\t * Init the referencedLink\n\t * @param settings the combo setting\n\t */\n\tpublic void initReferencedLink(EObjectFlatComboSettings settings);\n\n\t/**\n\t * Defines a new referencedLink\n\t * @param newValue the new referencedLink to set\n\t * \n\t */\n\tpublic void setReferencedLink(EObject newValue);\n\n\t/**\n\t * Defines the button mode\n\t * @param newValue the new mode to set\n\t * \n\t */\n\tpublic void setReferencedLinkButtonMode(ButtonsModeEnum newValue);\n\n\t/**\n\t * Adds the given filter to the referencedLink edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addFilterToReferencedLink(ViewerFilter filter);\n\n\t/**\n\t * Adds the given filter to the referencedLink edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addBusinessFilterToReferencedLink(ViewerFilter filter);\n\n\n\n\n\n\t/**\n\t * Returns the internationalized title text.\n\t * \n\t * @return the internationalized title text.\n\t * \n\t */\n\tpublic String getTitle();\n\n\t// Start of user code for additional methods\n\t\n\t// End of user code\n\n}",
"@Override\n\tpublic String getText(Object object) {\n\t\treturn getString(\"_UI_DocumentRoot_type\");\n\t}",
"Q findFrom(C context, Description notFoundDescription);",
"@Override\n\tpublic String getText(Object object) {\n\t\tString label = ((CompositeNode)object).getName();\n\t\treturn label == null || label.length() == 0 ?\n\t\t\tgetString(\"_UI_CompositeNode_type\") :\n\t\t\tgetString(\"_UI_CompositeNode_type\") + \" \" + label;\n\t}",
"public Object getObject();",
"private void readObject() {}",
"private void readObject() {}",
"private void readObject() {}",
"GameObject getObject();",
"@Override\r\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tString ttText = item.getText();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t//recupero la view el\r\n\t\t\t\tBMQResourceView bmResource = (BMQResourceView) PlatformUI.getWorkbench().getActiveWorkbenchWindow()\r\n\t\t\t\t.getActivePage().findView(\"bi.bmm.views.bmq.bmqresource\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//inserisco i dati nella view el\r\n\t\t\t\t\r\n\t\t\t\t//chiedo conferma \r\n\t\t\t\tif (MessageDialog.openConfirm(new Shell(), \"Extract BM\",\"Would you extract entities from this BM?\")){\r\n\t\t\t\t\tbmResource.addResource(bcList,cbcList,ttText);\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}",
"public Object getResource(String id) {\n\t\tint idx = rks.indexOf(id);\n\t\tif (idx < 0) throw new NoSuchElementException(id);\n\t\telse return rvs.get(idx);\n\t}",
"@Override\npublic void findElement(String by) {\n\t\n}",
"boolean objectInDatabase(E object) throws DatabaseNotAccessibleException;",
"public interface EmployeeQueryByDisplayNameView extends ViewObject {\n void query(String userName);\n}",
"@Override\n\t\tpublic boolean matches(EObject eObject) {\n\t\t\treturn false;\n\t\t}",
"public T caseExprString(ExprString object)\n {\n return null;\n }",
"public interface EventDefinition extends EObject {\r\n}",
"public MenuItem findItem(int id);",
"public void pickObject(int mouseX, int mouseY, MouseEvent e)\r\n {\r\n \tPickCanvas pickCanvas = new PickCanvas(canvas, getMBLocale());\r\n \tpickCanvas.setMode(PickCanvas.BOUNDS);\r\n \t\r\n pickCanvas.setShapeLocation(e);\r\n PickResult result = pickCanvas.pickClosest();\r\n \r\n if (result == null) \r\n {\r\n System.out.println(\"Nothing picked\");\r\n } \r\n else\r\n {\r\n \t// das is der teil den ich nicht sehr nett finde. hier müssen theoretisch alle 3d typen rein.\r\n \t// d.h. man muss auch dementsprechend viele if clauses einbauen.\r\n Primitive p = (Primitive)result.getNode(PickResult.PRIMITIVE);\r\n Shape3D s = (Shape3D)result.getNode(PickResult.SHAPE3D);\r\n parent.getLocale();\r\n if (p != null) \r\n {\r\n // System.out.println(\"result: \"+result.getGeometryArray().getInitialNormalIndex());\r\n System.out.println(p.getClass().getName());\r\n } \r\n else if (s != null) \r\n {\r\n System.out.println(s.getClass().getName());\r\n }\r\n else\r\n {\r\n System.out.println(\"null\");\r\n }\r\n } \r\n }",
"public interface LoadTemplateVO extends ViewObject {\n void proecssLoadTemplate(String loc);\n}",
"public interface IRange extends EObject\n{\n}",
"private void checkTextAnnotation(MGraph g, UriRef textAnnotation, String content) {\n Iterator<Triple> selectedTextIterator = g.filter(textAnnotation,\n Properties.ENHANCER_SELECTED_TEXT, null);\n // check if the selected text is added\n assertTrue(selectedTextIterator.hasNext());\n // test if the selected text is part of the TEXT_TO_TEST\n Resource object = selectedTextIterator.next().getObject();\n assertTrue(object instanceof Literal);\n Literal selectedText = (Literal)object;\n object = null;\n assertTrue(content.indexOf(selectedText.getLexicalForm()) >= 0);\n // test if context is added\n //context not present for Zemanta\n// Iterator<Triple> selectionContextIterator = g.filter(textAnnotation,\n// Properties.ENHANCER_SELECTION_CONTEXT, null);\n// assertTrue(selectionContextIterator.hasNext());\n// // test if the selected text is part of the TEXT_TO_TEST\n// object = selectionContextIterator.next().getObject();\n// assertTrue(object instanceof Literal);\n// assertTrue(content.indexOf(((Literal)object).getLexicalForm()) >= 0);\n// object = null;\n //test start/end if present\n Iterator<Triple> startPosIterator = g.filter(textAnnotation,\n ENHANCER_START, null);\n Iterator<Triple> endPosIterator = g.filter(textAnnotation,\n ENHANCER_END, null);\n //start end is optional, but if start is present, that also end needs to be set\n if(startPosIterator.hasNext()){\n Resource resource = startPosIterator.next().getObject();\n //only a single start position is supported\n assertTrue(!startPosIterator.hasNext());\n assertTrue(resource instanceof TypedLiteral);\n TypedLiteral startPosLiteral = (TypedLiteral) resource;\n resource = null;\n int start = LiteralFactory.getInstance().createObject(Integer.class, startPosLiteral);\n startPosLiteral = null;\n //now get the end\n //end must be defined if start is present\n assertTrue(endPosIterator.hasNext());\n resource = endPosIterator.next().getObject();\n //only a single end position is supported\n assertTrue(!endPosIterator.hasNext());\n assertTrue(resource instanceof TypedLiteral);\n TypedLiteral endPosLiteral = (TypedLiteral) resource;\n resource = null;\n int end = LiteralFactory.getInstance().createObject(Integer.class, endPosLiteral);\n endPosLiteral = null;\n //check for equality of the selected text and the text on the selected position in the content\n //System.out.println(\"TA [\"+start+\"|\"+end+\"]\"+selectedText.getLexicalForm()+\"<->\"+content.substring(start,end));\n assertTrue(content.substring(start, end).equals(selectedText.getLexicalForm()));\n } else {\n //if no start position is present, there must also be no end position defined\n assertTrue(!endPosIterator.hasNext());\n }\n }",
"@Override\n public Object visit(ASTResource node, Object data) {\n if (node.getNumChildren() == 1) {\n ASTName nameNode = (ASTName) node.getChild(0);\n for (StringTokenizer st = new StringTokenizer(nameNode.getImage(), \".\"); st.hasMoreTokens();) {\n JavaNameOccurrence occ = new JavaNameOccurrence(nameNode, st.nextToken());\n new Search(occ).execute();\n }\n }\n\n return super.visit(node, data);\n }",
"public interface IdentifiableObject {\n\n\n public String getSubtitle();\n\n public String getTitle();\n\n public int getIdentifier();\n\n public int getRecourseId();\n}",
"public T caseText(Text object)\n {\n return null;\n }",
"public String getObjSelect() {\n return mobjSelect;\n }"
] | [
"0.6226075",
"0.59308267",
"0.5841997",
"0.5834035",
"0.5830546",
"0.57696444",
"0.5736557",
"0.5683915",
"0.5567929",
"0.55613905",
"0.55461913",
"0.55452543",
"0.5495373",
"0.5458447",
"0.5382725",
"0.5349048",
"0.53224474",
"0.53081703",
"0.53014517",
"0.5270376",
"0.52479875",
"0.5240837",
"0.52321255",
"0.5187586",
"0.51531535",
"0.5151814",
"0.5146714",
"0.51146656",
"0.510486",
"0.5093422",
"0.5091048",
"0.50753343",
"0.50705004",
"0.5069487",
"0.50604594",
"0.5043534",
"0.50185865",
"0.4993326",
"0.49866262",
"0.49787113",
"0.4973536",
"0.49705973",
"0.49663857",
"0.49650803",
"0.49607635",
"0.49607623",
"0.4960472",
"0.49356174",
"0.49330074",
"0.49316138",
"0.49300647",
"0.49233449",
"0.49191424",
"0.49182907",
"0.49133477",
"0.49109963",
"0.49015975",
"0.48848727",
"0.4881447",
"0.4879463",
"0.48681182",
"0.4868053",
"0.48630768",
"0.48551285",
"0.48481956",
"0.48439944",
"0.48424295",
"0.48362502",
"0.4832928",
"0.48304334",
"0.4829127",
"0.48207787",
"0.48201442",
"0.4809709",
"0.48012495",
"0.47998405",
"0.47977868",
"0.47896674",
"0.4775638",
"0.47735846",
"0.4772491",
"0.4772491",
"0.4772491",
"0.47701928",
"0.47690305",
"0.47689041",
"0.47630298",
"0.47583097",
"0.47574106",
"0.47523597",
"0.4742847",
"0.4742802",
"0.47386608",
"0.47376776",
"0.47322232",
"0.4722138",
"0.4716598",
"0.4714893",
"0.47141764",
"0.4713169",
"0.47100165"
] | 0.0 | -1 |
there might be more than one element at the given offset thus, we collect all of them and sort them afterwards | private List<EObject> getElements(ISelector s) {
List<EObject> result = new ArrayList<EObject>();
for (EObject next : charStartMap.keySet()) {
int start = charStartMap.get(next);
int end = charEndMap.get(next);
if (s.accept(start, end)) {
result.add(next);
}
}
Collections.sort(result, new Comparator<EObject>() {
public int compare(EObject objectA, EObject objectB) {
int lengthA = getCharEnd(objectA) - getCharStart(objectA);
int lengthB = getCharEnd(objectB) - getCharStart(objectB);
return lengthA - lengthB;
}
});
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static <E> void siftDown(E[] array, Comparator<E> comparator, int offset, int start, int end) {\n int root = start, child = (root-offset)*2+1+offset;\n while (child <= end) {\n if (child+1<=end && comparator.compare(array[child], array[child+1])<0) {\n child = child+1;\n }\n if (comparator.compare(array[root], array[child])<0) {\n DataManipulator.swapData(array, root, child);\n root = child;\n child = (root-offset)*2+1+offset;\n } else {\n return;\n }\n }\n }",
"@Override\r\n\tpublic void sort() {\r\n\t\tint minpos;\r\n\t\tfor (int i = 0; i < elements.length-1; i++) {\r\n\t\t\tminpos=AuxMethods.minPos(elements, i);\r\n\t\t\telements=AuxMethods.swapElements(elements, i, minpos);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"private ArrayList<AbstractCard> sortOffsets(ArrayList<AbstractCard> deck) {\n for (int i = 0; deck.size() > i; i++) {\n // Checks if card needs to be moved\n if (deck.get(i).getOffset() > 0) {\n // Gets new possition in the deck the card should be get a copy of the card and\n // removes card from the deck\n int newPos = deck.get(i).getOffset() + i;\n AbstractCard cardToMove = deck.get(i);\n cardToMove.setOffset(0);\n deck.remove(i);\n\n // If the new position of the card is past the end of the deck then just add it to\n // the end of the deck otherwise add it to the new position\n if (newPos >= deck.size()) {\n deck.add(cardToMove);\n } else {\n // Checks if card is being placed in the middle of a multi card event, if it is try puting it\n // a card later\n while(newPos < deck.size() - 1 && deck.get(newPos - 1).getEvent() == deck.get(newPos).getEvent()) {\n newPos++;\n }\n deck.add(newPos, cardToMove);\n }\n }\n }\n return deck;\n }",
"Vector<NewsArticle> insertionSort(Vector<NewsArticle> articles) {\n int i, j;\n int size = articles.size();\n NewsArticle sortedList[] = new NewsArticle[articles.size()];\n\n articles.copyInto(sortedList);\n NewsArticle temp;\n\n for (i = 1; i < size; i++) {\n temp = sortedList[i];\n\n j = i;\n while ((j > 0) && (sortedList[j - 1].getScore(filterType) < temp.getScore(filterType))) {\n sortedList[j] = sortedList[j - 1];\n j = j - 1;\n }\n sortedList[j] = temp;\n }\n Vector<NewsArticle> outList = new Vector<NewsArticle>();\n\n for (i = 0; i < size; i++) {\n temp = sortedList[i];\n outList.addElement(temp);\n }\n return outList;\n }",
"public Collection<EclipseEditorTag> getEditorTagsAtOffset(int offset, Comparator<EclipseEditorTag> comparator){\r\n \t\t// build a predicate that checks if the EditorTag includes the offset:\r\n \t\tSafePredicate<EclipseEditorTag> predicate = new EclipseEditorTag.SurroundsOffsetPredicate(offset);\r\n \t\tCollection<EclipseEditorTag> tags = new TreeSet<EclipseEditorTag>(comparator);\r\n \t\tgetEditorTagsWithPredicate(predicate, tags);\r\n \t\treturn tags;\r\n \t}",
"ArrayList <Integer> nearlySorted(int arr[], int num, int k)\n {\n PriorityQueue<Integer> pq = new PriorityQueue<>();\n ArrayList<Integer> res = new ArrayList<>();\n for(int i=0;i<k+1;i++){\n pq.add(arr[i]);\n }\n \n for(int i=k+1;i<num;i++){\n res.add(pq.remove());\n pq.add(arr[i]);\n }\n \n while(pq.size()>0){\n res.add(pq.remove());\n }\n \n return res;\n }",
"private void sortMedApts(List<MedicationAppointment> medApts2) {\n \t}",
"public static WordFrq[] sort(WordFrq b[]){\n WordFrq temp;\n int i=0;\n while (i < 3) {\n for (i = 1; i < 3; i++) {\n if (b[i-1].count > b[i].count) {\n temp = b[i];\n b[i] = b[i-1];\n b[i-1] = temp;\n break;\n }\n }\n }\n\n\n return b;\n\n\n\n\n\n }",
"private static ArrayList<Integer> mergKsort(int[][] arr) {\n\t\tArrayList<Integer> rv = new ArrayList<>();\r\n\t\tPriorityQueue<Pair> pq= new PriorityQueue<>();\r\n\t\t\t\t\r\n\t\tfor (int i=0;i<arr.length;i++) {\r\n\t\tPair p = new Pair(i,0,arr[i][0]);\r\n\t\t\tpq.add(p);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\twhile(pq.size()>0) {\r\n\t\t\tPair p=pq.remove();\r\n\t\t\trv.add(p.val);\r\n\t\t\tp.di++;\r\n\t\t\tif(p.di<arr[p.li].length) {\r\n\t\t\t\tp.val=arr[p.li][p.di];\r\n\t\t\t\tpq.add(p);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn rv;\r\n\r\n\t}",
"private static void sort1(int x[], int[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x, a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tint v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2,a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x, a2,c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x, a2,off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x, a2,n-s, s);\n\t}",
"private T[] sortArray() {\n \n int middleIndex = elements.length / 2;\n\n T[] sArr1 = Arrays.copyOfRange(elements, 0, middleIndex);\n T[] sArr2 = Arrays.copyOfRange(elements, middleIndex, elements.length);\n\n Arrays.sort(sArr1);\n Arrays.sort(sArr2);\n\n return merge(sArr1, sArr2);\n }",
"public List<List<RecordBean>> splitRecordBeans(List<RecordBean> recordBeans){\n\n recordBeans.sort(RecordBeanComparator);\n List<List<RecordBean>> totalList = new ArrayList();\n for (int i = 0; i < recordBeans.size(); i++){\n Time beginTime = getTimeValueFromRecordBean(recordBeans.get(i));\n if(beginTime != null){\n List<RecordBean> tempList = new ArrayList<>();\n tempList.add(recordBeans.get(i));\n for (int j = i+1; j < recordBeans.size(); j++){\n Time currentTime = getTimeValueFromRecordBean(recordBeans.get(j));\n if(currentTime != null){\n long timeDifference = getTimeDifference(beginTime, currentTime);\n if(timeDifference >= 2){\n totalList.add(new ArrayList<>(tempList));\n beginTime = currentTime;\n tempList.clear();\n tempList.add(recordBeans.get(j));\n }else{\n tempList.add(recordBeans.get(j));\n }\n }\n }\n break;\n }\n }\n return totalList;\n }",
"public void sort() {\r\n int k = start;\r\n for (int i = 0; i < size - 1; i++) {\r\n int p = (k + 1) % cir.length;\r\n for (int j = i + 1; j < size; j++) {\r\n if ((int) cir[p] < (int) cir[k % cir.length]) {\r\n Object temp = cir[k];\r\n cir[k] = cir[p];\r\n cir[p] = temp;\r\n }\r\n p = (p + 1) % cir.length;\r\n }\r\n k = (k + 1) % cir.length;\r\n }\r\n }",
"List<SurveyQuestion> sortByPageAndPosition(List<SurveyQuestion> questions);",
"private static <T> void sort1(byte x[], T[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x, a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tbyte v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2, n-s, s);\n\t}",
"public static void mergeSortedArrays(final int MEM_SIZE, ArrayList<Integer []> inputChunks, HeapTuple[] minHeap, String outfile, final boolean ENABLE_DEBUG){\n\n FileOutputStream out;\n try{\n out = new FileOutputStream(outfile);\n }\n catch (FileNotFoundException e){\n System.err.println(e);\n return;\n }\n PrintWriter sortedFiles = new PrintWriter(out, true);\n\n int tempLength = 0;\n FHbinHeap<Integer> heap = new FHbinHeap<>();\n for (int i = 0; i < inputChunks.size(); i++) {\n Integer[] temp = inputChunks.get(i).clone();\n for(int j = 0; j < temp.length; j++){\n //Integer[] temp = inputChunks.get(i).clone();\n //System.out.print(temp[j] + \",\");\n int hi = temp[j];\n heap.insert(hi);\n }\n tempLength += temp.length;\n }\n System.out.println();\n for(int i = 0; i < tempLength; i++){\n int removal = heap.remove();\n System.out.print(removal + \",\");\n sortedFiles.print(removal + \",\");\n }\n sortedFiles.close();\n\n\n\n\n\n/* FAILED CODE\n\n Due to our sorting of the arrays, the minimum of the entire set must be the minimum of the set of the first element for all chunks\n By adding an offset to the array whose\n\n\n FHbinHeap<HeapTuple> metaHeap = null;\n HeapTuple[] heapElement = null;\n // Probably should just be a FHbinheap\n for (int i = 0; i < inputChunks.size(); i++) {\n for (int j = 0; j < MEM_SIZE; i++) {\n heapElement[i] = new HeapTuple(inputChunks.get(i)[j], i, j);\n metaHeap.insert(heapElement[i]);\n System.out.println(metaHeap.remove());\n //sortedFiles.println(metaHeap.remove());\n }\n }\n\n*/\n\n\n //First MEM_SIZE minima, no order\n /*/*\n int removed = 0;\n int [] arrayShift = new int[MEM_SIZE];\n //int innerIndex = 0;\n\n int tempLength = 0;\n\n int tempMin = 0;\n int tempMinIndex = 0;\n FHbinHeap<Integer> heap = new FHbinHeap<>();\n for (int j = 0; j < 5; j++) {\n //System.out.println(arrayShift[0] + \"ARRAYSHIFT\");\n for (int i = 0; i < inputChunks.size(); i++) {\n //FHbinHeap<Integer> heap = new FHbinHeap<>();\n Integer[] temp = inputChunks.get(i).clone();\n //System.out.println(temp[arrayShift[i]] + \",\");\n if (temp[arrayShift[i]] < tempMin) {\n tempMin = temp[arrayShift[i]];\n tempMinIndex = i;\n }\n\n\n for(int j = arrayShift[i]; j < temp.length; j++){\n //Integer[] temp = inputChunks.get(i).clone();\n System.out.print(temp[j] + \",\");\n //int hi = temp[j];\n //heap.insert(hi);\n }\n\n tempLength += temp.length;\n heap.insert(temp[arrayShift[i]]);\n //System.out.print(temp[arrayShift[i]]+ \",\");\n\n\n //int heapRemove = heap.remove();\n if (i == inputChunks.size() - 1) {\n removed = heap.remove();\n System.out.println();\n System.out.println(removed + \",MINIMUM\");\n arrayShift[tempMinIndex] = (arrayShift[tempMinIndex] + 1);\n }\n\n }\n }\n */\n\n\n\n\n }",
"static List<Integer> getBySorting(Integer[] arr) {\n //copy of n elems => n\n List<Integer> sortedArr = Arrays.asList(arr);\n //n OR n log(n) => n + n OR n + n log(n)\n Collections.sort(sortedArr);\n //constant speed\n return Stream.of(sortedArr.get(sortedArr.size() - 1), sortedArr.get(sortedArr.size() - 2), sortedArr.get(sortedArr.size() - 3)).collect(Collectors.toList());\n }",
"@Test\n public void testItem_Ordering() {\n OasisList<Integer> baseList = new SegmentedOasisList<>(2, 2);\n\n List<Integer> expResult = Arrays.asList(1, 2, 6, 8);\n baseList.addAll(expResult);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), baseList.get(i));\n }\n }",
"private static void sort1(int x[], double[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x, a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tint v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2,a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x, a2,c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x, a2,off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x, a2,n-s, s);\n\t}",
"private GeofenceInfoContent[] sortByDate(GeofenceInfoContent[] geofenceInfoContents){\n GeofenceInfoContent infoContent = null;\n for(int j = 0; j < geofenceInfoContents.length; j++) {\n for (int i = 0; i < geofenceInfoContents.length; i++) {\n infoContent = geofenceInfoContents[i];\n if (i < geofenceInfoContents.length - 1) {\n String year1 = infoContent.getYear();\n String year2 = geofenceInfoContents[i + 1].getYear();\n int year1Int = Integer.parseInt(year1);\n int year2Int = Integer.parseInt(year2);\n if (year1Int < year2Int) {\n geofenceInfoContents[i] = geofenceInfoContents[i + 1];\n geofenceInfoContents[i + 1] = infoContent;\n }\n }\n }\n }\n return geofenceInfoContents;\n }",
"private static <T,P> void sort1(List<T> x, List<P> a2, Comparator<T> comp, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && comp.compare(x.get(j-1),x.get(j))>0; j--)\n\t\t\t\t\tswap(x, a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x,comp, l, l+s, l+2*s);\n\t\t\t\tm = med3(x,comp, m-s, m, m+s);\n\t\t\t\tn = med3(x,comp, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x,comp, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tT v = x.get(m);\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && comp.compare(x.get(b),v)<=0) {\n\t\t\t\tif (x.get(b) == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && comp.compare(x.get(c),v)>=0) {\n\t\t\t\tif (x.get(c) == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2,comp, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2,comp, n-s, s);\n\t}",
"private static <T> void sort1(long x[], T[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x, a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tlong v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2, n-s, s);\n\t}",
"private void shiftElements() {\n RadarContent[] tempArr = new RadarContent[length - 1];\n for (int i = 0; i < length - 1; i++) {\n tempArr[i] = arrProfiles[i + 1];\n }\n arrProfiles = tempArr;\n length--;\n }",
"private static <T> void sort1(int x[], T[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x, a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tint v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2,a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x, a2,c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x, a2,off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x, a2,n-s, s);\n\t}",
"private void sortByAmount(){\n int stopPos = 0;\n while(colours.size()-stopPos > 0){\n int inARow = 1;\n for(int i = colours.size() - 1; i > stopPos; i--){\n if(colours.get(i-1).getAmount() < colours.get(i).getAmount()){\n rgb temp = new rgb(colours.get(i-1));\n colours.set(i-1, colours.get(i));\n colours.set(i, temp);\n }else{\n inARow++;\n }\n }\n stopPos++;\n if(inARow == colours.size()){\n break;\n }\n }\n }",
"@Override\r\n public void run() {\r\n \r\n while (listsOfSorted.size() > 1) {\r\n \r\n int[] list1 = listsOfSorted.poll();\r\n int[] list2 = listsOfSorted.poll();\r\n int[] newSortedList = new int[list1.length + list2.length];\r\n\r\n int current1 = 0;\r\n int current2 = 0;\r\n int current3 = 0;\r\n\r\n while (current1 < list1.length && current2 < list2.length) {\r\n if (list1[current1] < list2[current2]) {\r\n newSortedList[current3++] = list1[current1++];\r\n } else {\r\n newSortedList[current3++] = list2[current2++];\r\n }\r\n }\r\n\r\n while (current1 < list1.length) {\r\n newSortedList[current3++] = list1[current1++];\r\n }\r\n\r\n while (current2 < list2.length) {\r\n newSortedList[current3++] = list2[current2++];\r\n \r\n }\r\n \r\n listsOfSorted.offer(newSortedList);\r\n \r\n }\r\n System.out.println(Arrays.toString(listsOfSorted.peek()));\r\n \r\n }",
"protected void sort1(double x[], int off, int len) {\r\n // Insertion sort on smallest arrays\r\n if (len < 7) {\r\n for (int i = off; i < len + off; i++) {\r\n for (int j = i; j > off && x[j - 1] > x[j]; j--) {\r\n swap(x, j, j - 1);\r\n }\r\n }\r\n return;\r\n }\r\n\r\n // Choose a partition element, v\r\n int m = off + (len >> 1); // Small arrays, middle element\r\n if (len > 7) {\r\n int l = off;\r\n int n = off + len - 1;\r\n if (len > 40) { // Big arrays, pseudomedian of 9\r\n int s = len / 8;\r\n l = med3(x, l, l + s, l + 2 * s);\r\n m = med3(x, m - s, m, m + s);\r\n n = med3(x, n - 2 * s, n - s, n);\r\n }\r\n m = med3(x, l, m, n); // Mid-size, med of 3\r\n }\r\n double v = x[m];\r\n\r\n // Establish Invariant: v* (<v)* (>v)* v*\r\n int a = off, b = a, c = off + len - 1, d = c;\r\n while (true) {\r\n while (b <= c && x[b] <= v) {\r\n if (x[b] == v) {\r\n swap(x, a++, b);\r\n }\r\n b++;\r\n }\r\n while (c >= b && x[c] >= v) {\r\n if (x[c] == v) {\r\n swap(x, c, d--);\r\n }\r\n c--;\r\n }\r\n if (b > c) {\r\n break;\r\n }\r\n swap(x, b++, c--);\r\n }\r\n\r\n // Swap partition elements back to middle\r\n int s, n = off + len;\r\n s = Math.min(a - off, b - a);\r\n vecswap(x, off, b - s, s);\r\n s = Math.min(d - c, n - d - 1);\r\n vecswap(x, b, n - s, s);\r\n\r\n // Recursively sort non-partition-elements\r\n if ((s = b - a) > 1) {\r\n sort1(x, off, s);\r\n }\r\n if ((s = d - c) > 1) {\r\n sort1(x, n - s, s);\r\n }\r\n }",
"private static void sort1(double x[], int[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x,a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tdouble v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x, a2,off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x, a2,b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2, n-s, s);\n\t}",
"private static <T> void quickSort(@Nonnull List<T> x, @Nonnull Comparator<? super T> comparator, int off, int len) {\n if (len < 7) {\n for (int i = off; i < len + off; i++) {\n for (int j = i; j > off && comparator.compare(x.get(j), x.get(j - 1)) < 0; j--) {\n swapElements(x, j, j - 1);\n }\n }\n return;\n }\n\n // Choose a partition element, v\n int m = off + (len >> 1); // Small arrays, middle element\n if (len > 7) {\n int l = off;\n int n = off + len - 1;\n if (len > 40) { // Big arrays, pseudomedian of 9\n int s = len / 8;\n l = med3(x, comparator, l, l + s, l + 2 * s);\n m = med3(x, comparator, m - s, m, m + s);\n n = med3(x, comparator, n - 2 * s, n - s, n);\n }\n m = med3(x, comparator, l, m, n); // Mid-size, med of 3\n }\n T v = x.get(m);\n\n // Establish Invariant: v* (<v)* (>v)* v*\n int a = off;\n int b = a;\n int c = off + len - 1;\n int d = c;\n while (true) {\n while (b <= c && comparator.compare(x.get(b), v) <= 0) {\n if (comparator.compare(x.get(b), v) == 0) {\n swapElements(x, a++, b);\n }\n b++;\n }\n while (c >= b && comparator.compare(v, x.get(c)) <= 0) {\n if (comparator.compare(x.get(c), v) == 0) {\n swapElements(x, c, d--);\n }\n c--;\n }\n if (b > c) break;\n swapElements(x, b++, c--);\n }\n\n // Swap partition elements back to middle\n int n = off + len;\n int s = Math.min(a - off, b - a);\n vecswap(x, off, b - s, s);\n s = Math.min(d - c, n - d - 1);\n vecswap(x, b, n - s, s);\n\n // Recursively sort non-partition-elements\n if ((s = b - a) > 1) quickSort(x, comparator, off, s);\n if ((s = d - c) > 1) quickSort(x, comparator, n - s, s);\n }",
"public void triCollection(){\r\n Collections.sort(collection);\r\n }",
"private void fillList(final int offset) {\n final int bottomEdge = getChildBottom(getChildAt(getChildCount() - 1));\n fillListDown(bottomEdge, offset);\n\n final int topEdge = getChildTop(getChildAt(0));\n fillListUp(topEdge, offset);\n }",
"private Collection<IndexedDiskElementDescriptor> createPositionSortedDescriptorList()\r\n {\r\n final List<IndexedDiskElementDescriptor> defragList = new ArrayList<>(keyHash.values());\r\n defragList.sort(Comparator.comparing(ded1 -> ded1.pos));\r\n\r\n return defragList;\r\n }",
"private void fillListUp(int topEdge, final int offset) {\n while (topEdge + offset > 0 && mFirstItemPosition > 0) {\n mFirstItemPosition--;\n final View newTopCild = mAdapter.getView(mFirstItemPosition, getCachedView(), this);\n addAndMeasureChild(newTopCild, LAYOUT_MODE_ABOVE);\n final int childHeight = getChildHeight(newTopCild);\n topEdge -= childHeight;\n\n // update the list offset (since we added a view at the top)\n mListTopOffset -= childHeight;\n }\n }",
"private void fillList(final int offset)\n\t{\n\t\t// Log.v(TAG, \".fillList: offset = \" + offset);\n\n\t\tfinal int rightEdge = getChildAt(getChildCount() - 1).getRight();\n\t\tfillListRight(rightEdge, offset);\n\n\t\tfinal int leftEdge = getChildAt(0).getLeft();\n\t\tfillListLeft(leftEdge, offset);\n\t}",
"public Map<TopicAndPartition, Long> getOffsets() {\n Map<TopicAndPartition, Long> returnOffsetsMap = new HashMap<>();\n\n for (String topic : topicList) {\n\n Map<TopicAndPartition, Long> resMap = dao.getOffsets(groupid, topic);\n if (!resMap.isEmpty()) {\n\n Map<TopicAndPartition, Long> earliestMap = getEarliestOffsets();\n for (Map.Entry<TopicAndPartition, Long> entry : earliestMap.entrySet()) {\n\n TopicAndPartition currentTAP = entry.getKey();\n String currentEarliestTopicName = entry.getKey().topic();\n Long currentEarliestOffset = entry.getValue();\n\n /*\n Using kafka's EarliestOffsetMap, run through all TAPs.\n 1. If tap in stored offsets, and storedOffset>=earliestOffset, add to results\n else add with earliest offset\n 2. If TAP not in stored offsetMap, add from earliestMap\n */\n\n //stay on topic (lol)\n if (currentEarliestTopicName.equals(topic)) {\n\n if (resMap.containsKey(currentTAP)) {\n Long currentStoredOffset = resMap.get(currentTAP);\n if (currentStoredOffset >= currentEarliestOffset) {\n Log.debug(\"Found stored partition: {}:{}, adding to map\", currentTAP.topic(), currentTAP.partition());\n returnOffsetsMap.put(currentTAP, currentStoredOffset);\n } else {\n Log.info(\"Stored partition offset lower than earliest, adding as earliest: {}:{}\", currentTAP.topic(), currentTAP.partition());\n Log.info(\"\\tstored:{}, earliest:{}\", currentStoredOffset, currentEarliestOffset);\n returnOffsetsMap.put(currentTAP, currentEarliestOffset);\n }\n } else { // Stored offsets dit not contain this TAP at all\n Log.info(\"Found new partition: {}:{}, adding to map\", currentTAP.topic(), currentTAP.partition());\n returnOffsetsMap.put(currentTAP, currentEarliestOffset);\n }\n }\n }\n\n } else {\n //There are no offsets for this groupid/topic combo, revert to\n if (startFrom.equals(\"latest\")) {\n Log.info(\"No offsets found for {}:{}, reverting to 'latest'\", groupid, topic);\n returnOffsetsMap.putAll(getLatestOffsets(topic));\n } else if (startFrom.equals(\"earliest\")){\n Log.info(\"No offsets found for {}:{}, reverting to 'earliest'\", groupid, topic);\n returnOffsetsMap.putAll(getEarliestOffsets(topic));\n } else {\n //This sould not occur as values are checked in the builder\n throw new IllegalArgumentException(\"startFrom cannot be anything other than 'earliest' or 'latest'\");\n }\n }\n }\n return returnOffsetsMap;\n }",
"private static ArrayList<Quest> sortAfterTimestamp(ArrayList<Quest> questListToSort) {\n\t\tfor (int i = 0; i < questListToSort.size() - 1; i++) {\n\t\t\tint index = i;\n\t\t\tfor (int j = i + 1; j < questListToSort.size(); j++) {\n\t\t\t\tif (questListToSort.get(j).getTimestamp() > questListToSort.get(index).getTimestamp()) {\n\t\t\t\t\tindex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tCollections.swap(questListToSort, index, i);\n\t\t}\n\t\treturn questListToSort;\n\t}",
"private static void sort1(double x[], double[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x,a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tdouble v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x, a2,off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x, a2,b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2, n-s, s);\n\t}",
"private static List<Integer> reorganize(List<Integer> result){\n List<Integer> outcome=new ArrayList<>();\n result.sort(Comparator.comparingInt(o -> o));\n if(!result.isEmpty()){\n outcome.add(result.get(0));\n for(int i=1;i<result.size();i++){\n if(!result.get(i).equals(result.get(i-1)))\n outcome.add(result.get(i));\n }\n }\n return outcome;\n }",
"@Override\n public void sort() {\n for (int i = 0; i < size; i++) {\n for (int j = i + 1; j < size; j++) {\n if (((Comparable) data[i]).compareTo(data[j]) > 0) {\n E c = data[i];\n data[i] = data[j];\n data[j] = c;\n\n }\n }\n }\n }",
"private static void sort1(int[] x, IntComparator comp, int off, int len) {\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && comp.compare(x[j-1],x[j])>0; j--)\n\t\t\t\t\tswap(x, j, j-1);\n\t\t}\n\t\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x,comp, l, l+s, l+2*s);\n\t\t\t\tm = med3(x,comp, m-s, m, m+s);\n\t\t\t\tn = med3(x,comp, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x,comp, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tint v = x[m];\n\t\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && comp.compare(x[b],v)<=0) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && comp.compare(x[c],v)>=0) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x, b++, c--);\n\t\t}\n\t\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,b, n-s, s);\n\t\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,comp, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,comp, n-s, s);\n\t}",
"private void sortByDateOpen() {\n //selection sort\n for (int i = 0; i < size - 1; i++) {\n int earliestDateIndex = i;\n for (int j = i + 1; j < size; j++)\n if (accounts[j].getDateOpen().compareTo(accounts[earliestDateIndex].getDateOpen()) < 0) {\n earliestDateIndex = j;\n }\n Account acc = accounts[earliestDateIndex];\n accounts[earliestDateIndex] = accounts[i];\n accounts[i] = acc;\n }\n }",
"public void sortOccurred() {\n //SET ALL THE ROWS TO -1, (THEY INITIALIZE TO 0).\n \tfor(int i = 0; i < data.length; i++) {\n \t\tdata[i] = null;\n \t\trowIndexLookup[i] = -1;\n \t}\t\t\n }",
"@Override\n \tpublic void sort() {\n \t\tArrays.sort(data);\n \t}",
"private static <T> void sort1(float x[], T[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x, a2,j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tfloat v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x, a2,b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2, n-s, s);\n\t}",
"public static void main(String[] args) {\n\t\tint[]a = {10,45,8,32,9,5};\n\t\tArrays.sort(a);\n\t\tSystem.out.println(\"Elements after sorting\");\n\t\tfor(int i:a)\n\t\t{\n\t\t\tSystem.out.print(i+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Element found At index \"+Arrays.binarySearch(a,5));\n int[]b =Arrays.copyOf(a,3);\n System.out.println(\"Elements after copied\");\n for(int i:b)\n\t\t{\n\t\t\tSystem.out.print(i+\" \");\n\t\t}\n \n\t}",
"private void sortResults(){\r\n this.sortedPlayers = new ArrayList<>();\r\n int size = players.size();\r\n while (size > 0) {\r\n Player lowestPointsPlayer = this.players.get(0);\r\n for(int i = 0; i<this.players.size(); i++){\r\n if(lowestPointsPlayer.getPoints() <= this.players.get(i).getPoints()){\r\n lowestPointsPlayer = this.players.get(i);\r\n }\r\n }\r\n this.sortedPlayers.add(lowestPointsPlayer);\r\n this.players.remove(lowestPointsPlayer);\r\n size--;\r\n }\r\n\r\n\r\n }",
"public void sortElements(){\n\t\tgetInput();\n\t\tPeople[] all = countAndSort(people, 0, people.length-1);\n\t\t//PrintArray(all);\n\t\tSystem.out.println(InversionCount);\n\t}",
"private void sortByX() {\n\t\tCollections.sort(pointList, getXComparator());\n\t}",
"public static List<Sample> sortResults(final Map<Long, Sample> map, final Integer currentOffsetMillis) {\n\n final Sample[] samples = map.values().toArray(new Sample[0]);\n Arrays.sort(samples, new Comparator<Sample>() {\n @Override\n public int compare(Sample o1, Sample o2) {\n return Long.compare(o1.dateTime, o2.dateTime);\n }\n });\n\n int lastOffsetMillis = -1;\n for(final Sample sample : samples) {\n if(sample.offsetMillis == null) {\n if(lastOffsetMillis == -1) {\n sample.offsetMillis = currentOffsetMillis;\n } else {\n sample.offsetMillis = lastOffsetMillis;\n }\n }\n\n lastOffsetMillis = sample.offsetMillis;\n }\n return Lists.newArrayList(samples);\n }",
"public static void main(String[] args) {\n\t\tArrayList<Integer> al=new ArrayList<Integer>();\n\t\tfor(int i=10;i<20;i++)\n\t\t{\n\t\t\tal.add(i);\n\t\t\tif(i==15)\n\t\t\t{\n\t\t\t\tfor(int j=101;j<107;j++)\n\t\t\t\t{\n\t\t\t\t\tal.add(j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint a=al.size();\n\t\tSystem.out.println(al);\n\t\tSystem.out.println(a);\n\t\tInteger arr[]=new Integer[a];\n\t\tint j=0;\n\t\tfor(Integer i:al)\n\t\t{\n\t\t\tSystem.out.println(i);\n\t\t\tarr[j]=i;\n\t\t\tj++;\n\t\t}\n\t\tfor(int i=0;i<a;i++)\n\t\t{\n\t\t\tSystem.out.println(arr[i]);\n\t\t}\n\t\tSystem.out.println(Arrays.binarySearch(arr, 14));\n\t\tInteger[] q=Arrays.copyOfRange(arr, 4, 9);\n\t\tSystem.out.println(\"copy of range method\");\n\t\tfor(Integer co:q)\n\t\t{\n\t\t\tSystem.out.println(co);\n\t\t}\n\t\tSystem.out.println(Arrays.equals(arr, q));\n\t\tSystem.out.println(Arrays.deepHashCode(arr));\n\t\tSystem.out.println(Arrays.hashCode(arr));\n\t\tArrays.parallelSort(arr);\n\t\tfor(int i=0;i<a;i++)\n\t\t{\n\t\t\tSystem.out.println(arr[i]);\n\t\t}\n\t\tSystem.out.println(Arrays.spliterator(arr));\n\t}",
"private void resolveSortingItems(ArrayList<String> out,\n ArrayList<CldrNode> nodesForLastItem,\n ArrayList<CldrItem> sortingItems)\n throws IOException, ParseException {\n ArrayList<CldrItem> arrayItems = new ArrayList<CldrItem>();\n String lastLeadingArrayItemPath = null;\n\n if (!sortingItems.isEmpty()) {\n Collections.sort(sortingItems);\n for (CldrItem item : sortingItems) {\n Matcher matcher = LdmlConvertRules.ARRAY_ITEM_PATTERN.matcher(\n item.getPath());\n if (matcher.matches()) {\n String leadingArrayItemPath = matcher.group(1);\n if (lastLeadingArrayItemPath != null &&\n !lastLeadingArrayItemPath.equals(leadingArrayItemPath)) {\n resolveArrayItems(out, nodesForLastItem, arrayItems);\n }\n lastLeadingArrayItemPath = leadingArrayItemPath;\n arrayItems.add(item);\n } else {\n outputCldrItem(out, nodesForLastItem, item);\n }\n }\n sortingItems.clear();\n resolveArrayItems(out, nodesForLastItem, arrayItems);\n }\n }",
"public void merge(paintIntegers[] arr, int lidx, int midx, int ridx){\n int leftn = midx - lidx + 1;\n int rightn = ridx - midx;\n\n //instantiating the left and right arrays\n int Left[] = new int [leftn];\n int Right[] = new int [rightn];\n\n //copies the data from original to the left and right\n for (int i=0; i < leftn; ++i) {\n Left[i] = arr[lidx + i].val;\n }\n for (int j=0; j < rightn; ++j) {\n Right[j] = arr[midx + 1 + j].val;\n }\n\n //merges the two arrays and updates the original array\n //initializes leftIndex and rightIndex to iterate over the left and right arrays\n //if it is added to the original array, then where it came from, it would increment\n int leftIndex = 0;\n int rightIndex = 0;\n int k = lidx; //to properly align where the elements to go, left\n //System.out.println(k);\n //while it hasnt gone through all the elements in the left and right array\n //between the two arrays check which one is lowest, and then updates original array\n while (leftIndex < leftn && rightIndex < rightn)\n {\n if (Left[leftIndex] <= Right[rightIndex])\n {\n arr[k].val = Left[leftIndex];\n sorting.add(paintIntegers.deepCopy(arr));//adds current array to list\n leftIndex++;\n }\n else\n {\n arr[k].val = Right[rightIndex];\n sorting.add(paintIntegers.deepCopy(arr));//adds current array to list\n rightIndex++;\n }\n k++;\n }\n //if there are some left on the left array then just adds to original array\n //possible because all the elements in right array have been added\n //all thats left is the sorted elements from the left array\n while (leftIndex < leftn)\n {\n arr[k].val = Left[leftIndex];\n sorting.add(paintIntegers.deepCopy(arr));//adds current array to list\n leftIndex++;\n k++;\n }\n //same explanation as above but with the right array\n while (rightIndex < rightn)\n {\n arr[k].val = Right[rightIndex];\n sorting.add(paintIntegers.deepCopy(arr));//adds current array to list\n rightIndex++;\n k++;\n }\n }",
"private void mergeSortRecords(int numOverflowRecords) {\n\n for (int i = 0; i < numOverflowRecords; i++) {\n byte [] overflowRecord = getRecordBytes(\"overflow\", i);\n String overflowRecordCompanyName = getRecordCompanyName(\"overflow\", i);\n\n if (!overflowRecordCompanyName.equals(\"MISSING-RECORD\")) {\n // Find the closest record alphabetically so the overflow record can be merged\n int closest = binarySearchToFindClosest(overflowRecordCompanyName, 0, Integer.parseInt(getNumberOfRecords(\"normal\")) - 1);\n \n if (overflowRecordCompanyName.compareTo(getRecordCompanyName(\"normal\", closest)) < 1) {\n byte [] temp = getRecordBytes(\"normal\", closest);\n updateRecords(\"normal\", overflowRecord, closest);\n rearrangeRestOfDatabase(temp, closest + 1);\n } else {\n rearrangeRestOfDatabase(overflowRecord, closest + 1);\n }\n }\n }\n }",
"public void testSortedList() {\r\n List<InfoNode> sortedList = MapUtils.sortByDistance(exampleList, node3.getTitle());\r\n assertTrue(sortedList.size() == 2);\r\n assertTrue(sortedList.get(0) == node2);\r\n assertTrue(sortedList.get(1) == node1);\r\n assertTrue(sortedList.contains(node1));\r\n assertTrue(sortedList.contains(node2));\r\n assertFalse(sortedList.contains(node3));\r\n\r\n sortedList = MapUtils.sortByDistance(exampleList, node1.getTitle());\r\n assertTrue(sortedList.size() == 2);\r\n assertTrue(sortedList.get(0) == node2);\r\n assertTrue(sortedList.get(1) == node3);\r\n assertFalse(sortedList.contains(node1));\r\n assertTrue(sortedList.contains(node2));\r\n assertTrue(sortedList.contains(node3));\r\n\r\n sortedList = MapUtils.sortByDistance(exampleList, \" \");\r\n assertTrue(sortedList.equals(exampleList));\r\n }",
"@Test\n public void testItem_Ordering_With_Holes() {\n OasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n\n List<Integer> expResult = Arrays.asList(1, 6, 8, 19);\n instance.addAll(Arrays.asList(1, 2, 6, 8));\n\n instance.remove(1);\n instance.add(19);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), instance.get(i));\n }\n }",
"public static void customSort(List<Integer> array) {\n Map<Integer, Integer> map = new HashMap<>();\n List<Integer> outputArray = new ArrayList<>();\n int ii = 0;\n for (int current : array) {\n if (ii==0){\n ii++;\n continue;\n }\n int count = map.getOrDefault(current, 0);\n map.put(current, count + 1);\n outputArray.add(current);\n ii++;\n }\n\n Set<Map.Entry<Integer, Integer>> entries = map.entrySet();\n for (Map.Entry<Integer, Integer> entry : entries) {\n entry.getKey();\n }\n\n // Compare the map by value\n SortComparator comp = new SortComparator(map);\n\n // Sort the map using Collections CLass\n Collections.sort(outputArray,comp);\n\n // Final Output\n for (Integer i : outputArray) {\n System.out.print(i + \" \");\n }\n System.out.println();\n\n }",
"public void sort() {\n\t\tfor (int i = 1; i < this.dataModel.getLength(); i++) {\n\t\t\tfinal int x = this.dataModel.get(i);\n\n\t\t\t// Find location to insert using binary search\n\t\t\tfinal int j = Math.abs(this.dataModel.binarySearch(0, i, x) + 1);\n\n\t\t\t// Shifting array to one location right\n\t\t\tthis.dataModel.arrayCopy(j, j + 1, i - j);\n\n\t\t\t// Placing element at its correct location\n\t\t\tthis.dataModel.set(j, x);\n\t\t\tthis.repaint(this.count++);\n\t\t}\n\t}",
"private static <T,P> void sort1(T x[], int[] a2, Comparator<T> comp, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && comp.compare(x[j-1],x[j])>0; j--)\n\t\t\t\t\tswap(x, a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x,comp, l, l+s, l+2*s);\n\t\t\t\tm = med3(x,comp, m-s, m, m+s);\n\t\t\t\tn = med3(x,comp, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x,comp, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tT v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && comp.compare(x[b],v)<=0) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && comp.compare(x[c],v)>=0) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2,comp, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2,comp, n-s, s);\n\t}",
"public abstract List<T> findWithOffsetFromPosition(int from, int amount);",
"private List<MyPair> sortAndTrim(int k, List<MyPair> neighbours) {\n\n for (int i = 0; i <= neighbours.size() - 2; i++) {\n for (int j = 0; j <= neighbours.size() - 2 - i; j++) {\n if (neighbours.get(j + 1).getValue() > neighbours.get(j).getValue()) {\n Collections.swap(neighbours, j, j + 1);\n }\n }\n }\n if (k != -1) {\n try {\n neighbours = neighbours.subList(0, k);\n } catch (IndexOutOfBoundsException e) {\n return neighbours;\n }\n }\n return neighbours;\n }",
"private static void sortingArrayList() {\n Collections.sort(allMapData, new Comparator<MapDataModel>() {\n public int compare(MapDataModel d1, MapDataModel d2) {\n return valueOf(d1.getDateTime().compareTo(d2.getDateTime()));\n }\n });\n }",
"@VisibleForTesting\n private void arrangeContactsByPinnedPosition(ArrayList<ContactEntry> toArrange) {\n final PriorityQueue<ContactEntry> pinnedQueue =\n new PriorityQueue<>(PIN_LIMIT, contactEntryComparator);\n\n final List<ContactEntry> unpinnedContacts = new LinkedList<>();\n\n final int length = toArrange.size();\n for (int i = 0; i < length; i++) {\n final ContactEntry contact = toArrange.get(i);\n // Decide whether the contact is hidden(demoted), pinned, or unpinned\n if (contact.pinned > PIN_LIMIT || contact.pinned == PinnedPositions.UNPINNED) {\n unpinnedContacts.add(contact);\n } else if (contact.pinned > PinnedPositions.DEMOTED) {\n // Demoted or contacts with negative pinned positions are ignored.\n // Pinned contacts go into a priority queue where they are ranked by pinned\n // position. This is required because the contacts provider does not return\n // contacts ordered by pinned position.\n pinnedQueue.add(contact);\n }\n }\n\n final int maxToPin = Math.min(PIN_LIMIT, pinnedQueue.size() + unpinnedContacts.size());\n\n toArrange.clear();\n for (int i = 1; i < maxToPin + 1; i++) {\n if (!pinnedQueue.isEmpty() && pinnedQueue.peek().pinned <= i) {\n final ContactEntry toPin = pinnedQueue.poll();\n toPin.pinned = i;\n toArrange.add(toPin);\n } else if (!unpinnedContacts.isEmpty()) {\n toArrange.add(unpinnedContacts.remove(0));\n }\n }\n\n // If there are still contacts in pinnedContacts at this point, it means that the pinned\n // positions of these pinned contacts exceed the actual number of contacts in the list.\n // For example, the user had 10 frequents, starred and pinned one of them at the last spot,\n // and then cleared frequents. Contacts in this situation should become unpinned.\n while (!pinnedQueue.isEmpty()) {\n final ContactEntry entry = pinnedQueue.poll();\n entry.pinned = PinnedPositions.UNPINNED;\n toArrange.add(entry);\n }\n\n // Any remaining unpinned contacts that weren't in the gaps between the pinned contacts\n // now just get appended to the end of the list.\n toArrange.addAll(unpinnedContacts);\n }",
"private static <T> void sort1(char x[], char[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x,a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tchar v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x, a2,off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x, a2,b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2, n-s, s);\n\t}",
"private static <T> void sort1(char x[], T[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x,a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tchar v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x, a2,off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x, a2,b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2, n-s, s);\n\t}",
"public Collection<Item> getSortedItems() {\n\t\tint i, j, first;\n\t int numLength = items.size();\n\t for (i= numLength - 1; i > 0; i--)\n\t {\n\t first = 0; // initialize to subscript of first element\n\t for (j=1; j<=i; j++) // locate smallest between positions 1 and i.\n\t {\n\t if (getQuantityOfItem(items.get(j).getItem()) < \n\t \t\t getQuantityOfItem(items.get(first).getItem()) )\n\t first = j;\n\t }\n\t //temp = items.get(first); // Swap smallest found with element in position i.\n\t //items.get(first)=items.get(i);\n\t ItemPair itemI = items.get(i);\n\t ItemPair firstitem = items.get(first);\n\t ItemPair temp = itemI;\n\t itemI = firstitem;\n\t firstitem = temp;\n\t \n\t // items.get(i)=temp;\n\t //num[first] = num[i];\n\t // num[i] = temp;\n\t }\n\t \n\t}",
"public void sortMarkers() {\n\t\tCollections.sort(getMarkerSet().getMarkers(),\r\n\t\t\t\tnew MarkerTimeComparator());\r\n\t\t// log.debug(\"[sortMarkers]after: \" + getMarkerSet().getMarkers());\r\n\r\n\t}",
"public void sort() {\n documents.sort();\n }",
"private void updateOrder() {\n Arrays.sort(positions);\n }",
"private static <T> void sort1(short x[], T[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x, a2,j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tshort v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x, a2,c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x, a2,off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x, a2,n-s, s);\n\t}",
"private void sortViewEntries() {\n runOnUiThread(new Runnable() {\n public void run() {\n try {\n Collections.sort(viewEntries, new DateComparator());\n } catch (final Exception ex) {\n // Log.i(\"sortViewEntries\", \"Exception in thread\");\n }\n }\n });\n }",
"private static <T,P> void sort1(T x[], P[] a2, Comparator<T> comp, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && comp.compare(x[j-1],x[j])>0; j--)\n\t\t\t\t\tswap(x, a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x,comp, l, l+s, l+2*s);\n\t\t\t\tm = med3(x,comp, m-s, m, m+s);\n\t\t\t\tn = med3(x,comp, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x,comp, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tT v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && comp.compare(x[b],v)<=0) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && comp.compare(x[c],v)>=0) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2,comp, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2,comp, n-s, s);\n\t}",
"private static void sort(Object[] a, Object[] tmp,\n int from, int to, Fun isLess) {\n int split = (from + to) / 2;\n if (split - from > 1)\n sort(tmp, a, from, split, isLess);\n if (to - split > 1)\n sort(tmp, a, split, to, isLess);\n int i = from, j = split;\n while (i < split && j < to) {\n if (isLess.apply(tmp[i], tmp[j]) == Boolean.TRUE)\n a[from] = tmp[i++];\n else\n a[from] = tmp[j++];\n ++from;\n }\n if (i < split)\n System.arraycopy(tmp, i, a, from, split - i);\n else if (j < to)\n System.arraycopy(tmp, j, a, from, to - j);\n }",
"protected void arrangeBestOrder ()\n \t{\n \t\tObject[] duplLoans = null;\n \t\ttry\n \t\t{\n \t\t\tduplLoans = theLoanList.popFirstDuplicates();\n \t\t}\n \t\tcatch (NoSuchElementException ex)\n \t\t{\n \t\t\tlog.error(\"The list of duplicate loan lists is empty\");\n \t\t\treturn;\n \t\t}\n \n \t\tDuplicateLoanDataVO bestSourceLoan = null;\n \t\tDuplicateLoanDataVO firstDataVO = null;\n \t\tDuplicateLoanDataVO nextDataVO = null;\n \t\tString xmlValue = null;\n \t\tString apsId1 = null;\n \t\tString providerType1 = null;\n \t\tString apsId2 = null;\n \t\tString providerType2 = null;\n \n \t\tfor (int ndx = 1; ndx < duplLoans.length; ndx++)\n \t\t{\n \t\t\tfirstDataVO = (DuplicateLoanDataVO)duplLoans[0];\n \t\t\tnextDataVO = (DuplicateLoanDataVO)duplLoans[ndx];\n \n \t\t\tapsId1 = firstDataVO.getAwardId();\n \t\t\tproviderType1 = firstDataVO.getProviderType();\n \t\t\tapsId2 = nextDataVO.getAwardId();\n \t\t\tproviderType2 = nextDataVO.getProviderType();\n \n \t\t\tif (apsId1 == null)\n \t\t\t{\n \t\t\t\tapsId1 = XMLParser.getNodeValue(firstDataVO.getDocument(), \"APSUniqueAwardID\");\n \t\t\t\tfirstDataVO.setAwardId(apsId1);\n \t\t\t}\n \n \t\t\tif (providerType1 == null)\n \t\t\t{\n \t\t\t\tproviderType1 = XMLParser.getNodeValue(firstDataVO.getDocument(), \"DataProviderType\");\n \t\t\t\tfirstDataVO.setProviderType(providerType1);\n \t\t\t}\n \n \t\t\tif (apsId2 == null)\n \t\t\t{\n \t\t\t\tapsId2 = XMLParser.getNodeValue(nextDataVO.getDocument(), \"APSUniqueAwardID\");\n \t\t\t\tnextDataVO.setAwardId(apsId2);\n \t\t\t}\n \n \t\t\tif (providerType2 == null)\n \t\t\t{\n \t\t\t\tproviderType2 = XMLParser.getNodeValue(nextDataVO.getDocument(), \"DataProviderType\");\n \t\t\t\tnextDataVO.setProviderType(providerType2);\n \t\t\t}\n \n \t\t\tif (log.isDebugEnabled())\n \t\t\t{\n \t\t\t\tlog.debug(\"Comparing Award ID: \" + apsId1 + \" with provider type '\" + providerType1 +\n \t\t\t\t \"' to Award ID: \" + apsId2 + \" with provider type '\" + providerType2 + \"' \");\n \t\t\t}\n \n \t\t\tbestSourceLoan = determineBestSource(firstDataVO, nextDataVO);\n \t\t\tif (bestSourceLoan != null && bestSourceLoan == nextDataVO)\n \t\t\t{\n \t\t\t\t// we need to rearrange things so that the \"best\" is at\n \t\t\t\t// the \"head\" of the array (element 0).\n \n \t\t\t\tDuplicateLoanDataVO best = (DuplicateLoanDataVO)duplLoans[ndx];\n \t\t\t\tduplLoans[ndx] = duplLoans[0];\n \t\t\t\tduplLoans[0] = best;\n \n \t\t\t\tif (log.isDebugEnabled())\n \t\t\t\t{\n \t\t\t\t\tString apsId = nextDataVO.getAwardId();\n \t\t\t\t\tString providerType = nextDataVO.getProviderType();\n \t\t\t\t\tlog.debug(\"Award ID: \" + apsId + \" with provider type '\" + providerType + \"' is now the 'best' source\");\n \t\t\t\t}\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tif (log.isDebugEnabled())\n \t\t\t\t{\n \t\t\t\t\tString apsId = firstDataVO.getAwardId();\n \t\t\t\t\tString providerType = firstDataVO.getProviderType();\n \t\t\t\t\tlog.debug(\"Award ID: \" + apsId + \" with provider type '\" + providerType + \"' is still the 'best' source\");\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\ttheLoanList.pushLastDuplicates(duplLoans);\n \t}",
"private void sortByDateOpen() {\r\n\t\tfor ( int i = 0; i < size-1; i++ ) {\r\n\t\t\tint minIndex = i; \r\n\t\t\tfor ( int j = i + 1; j < size; j++) { \r\n\t\t\t\t//returns -1 if the date is less than\r\n\t\t\t\tif ( accounts[j].getDateOpen().compareTo(accounts[minIndex].getDateOpen()) == -1 ) {\r\n\t\t\t\t\tminIndex = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tAccount temp = accounts[minIndex];\r\n\t\t\taccounts[minIndex] = accounts[i];\r\n\t\t\taccounts[i] = temp;\r\n\t\t}\r\n\t\treturn;\r\n\t}",
"private void sortArticleByViews() {\n final DatabaseReference database;\n database = FirebaseDatabase.getInstance().getReference();\n\n database.child(\"Views\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Map<Integer,ArrayList<Article>> articlesTreeMap;\n articlesTreeMap = new TreeMap<>(Collections.reverseOrder());\n for(Article a : articles) {\n DataSnapshot viewArticleSnapShot = null;\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n if (a.getLink() != null && a.getLink() != \"\" && snapshot.child(\"Link\").getValue().equals(a.getLink())) {\n viewArticleSnapShot = snapshot;\n break;\n }\n }\n int views = 0;\n if (viewArticleSnapShot != null) {\n views = Integer.parseInt(viewArticleSnapShot.child(\"Count\").getValue().toString());\n }\n if(!articlesTreeMap.containsKey(views)) {\n articlesTreeMap.put(views, new ArrayList<Article>());\n }\n articlesTreeMap.get(views).add(a);\n }\n\n articles.clear();\n for(Map.Entry<Integer,ArrayList<Article>> entry : articlesTreeMap.entrySet()) {\n ArrayList<Article> list = entry.getValue();\n articles.addAll(list);\n }\n mSectionsPagerAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(DatabaseError d) {\n Log.d(\"Login DbError Msg ->\", d.getMessage());\n Log.d(\"Login DbError Detail ->\", d.getDetails());\n }\n });\n }",
"public void f6(List<Book> a) {\r\n double min = a.get(0).getPrice();\r\n for (Book o : a) {\r\n if (o.getPrice() < min) {\r\n min = o.getPrice();\r\n }\r\n }\r\n int acc = a.size();\r\n for (int i = acc-1; i > 0; i--) {\r\n a.remove(i);\r\n break;\r\n }\r\n }",
"private static void sortingMemo() {\n\t\t\n\t}",
"private void sortEntities(){\n for (int i = 1; i < sorted.size; i++) {\n for(int j = i ; j > 0 ; j--){\n \tEntity e1 = sorted.get(j);\n \tEntity e2 = sorted.get(j-1);\n if(getRL(e1) < getRL(e2)){\n sorted.set(j, e2);\n sorted.set(j-1, e1);\n }\n }\n }\n }",
"public List<Room> sortBySize() {\n List<Room> result = new ArrayList<>();\n for (Room o : rooms)\n result.add(o);\n for (int i = 0; i < result.size(); i++) {\n for (int j = 0; j < result.size() - 1; j++) {\n if (result.get(j).getSize() > result.get(j + 1).getSize()) {\n\n Room temp = result.get(j);\n result.set(j, result.get(j + 1));\n result.set(j + 1, temp);\n }\n\n }\n }\n return result;\n }",
"private static <T> void sort1(double x[], T[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x,a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tdouble v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x, a2,off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x, a2,b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2, n-s, s);\n\t}",
"public static ArrayList<PersonDate> sort(ArrayList<PersonDate> arr)\n { \n for (int i = 0; i < arr.size() - 1; i++)\n {\n int index = i;\n for (int j = i + 1; j < arr.size(); j++)\n if (arr.get(j).compareTo(arr.get(index))>0) \n index = j;\n \n PersonDate smallerNumber = arr.get(index); \n arr.set(index,arr.get(i));\n arr.set(i,smallerNumber);\n }\n return arr;\n }",
"public void sortByAndser() {\r\n\t\tQuestion[][] question2DArray = new Question[displayingList.size()][];\r\n\t\tfor (int i = 0; i < displayingList.size(); i++) {\r\n\t\t\tquestion2DArray[i] = new Question[1];\r\n\t\t\tquestion2DArray[i][0] = displayingList.get(i);\r\n\t\t}\r\n\r\n\t\twhile (question2DArray.length != 1) {\r\n\t\t\tquestion2DArray = (Question[][]) merge2DArray(question2DArray);\r\n\t\t}\r\n\t\tdisplayingList.removeAll(displayingList);\r\n\t\tfor (int i = 0; i < question2DArray[0].length; i++) {\r\n\t\t\tdisplayingList.add(question2DArray[0][i]);\r\n\t\t}\r\n\t}",
"private int partition (List<Event> filteredEvents, int low, int high) {\n\n Event pivot = filteredEvents.get(high);\n int i = low;\n int j = low;\n\n while (i <= high) {\n\n String name1 = filteredEvents.get(j).getName();\n double distance1 = map.get(name1);\n String name2 = filteredEvents.get(j+1).getName();\n double distance2 = map.get(name2);\n\n if (distance1 == distance2) {\n // If name2 comes alphabetically before name1\n if (name2.compareToIgnoreCase(name1) > 0) {\n i++;\n }else {\n\n Event temp = filteredEvents.get(i);\n filteredEvents.set(i, filteredEvents.get(j));\n filteredEvents.set(j, temp);\n i++;\n j++;\n }\n\n } else {\n i++;\n continue;\n }\n\n }\n\n return j;\n }",
"public void SortByPrice() {\n for (int i = 1; i < LastIndex; i++) {\n int x = i;\n while (x >= 1) {\n if (ForChild[x - 1].getPrice() > ForChild[x].getPrice()) {\n Confectionery sweets = ForChild[x - 1];\n ForChild[x - 1] = ForChild[x];\n ForChild[x] = sweets;\n\n }\n x -= 1;\n }\n }\n }",
"public void sortMarc()\r\n {\r\n\t/* Make sure each element in marc_out is a complete string with more than 4 characters */\r\n\tfor(int a = 0; a < marc_out.size(); a++)\r\n\t {\r\n\t\tif(marc_out.get(a).length() < 5){\r\n\t\t System.out.println(\"Warning (sortMarc): marc line \" + marc_out.get(a) + \" too short, must have least 4 characters.\");\r\n\t\t return;\r\n\t\t}\r\n\t }\r\n\r\n\tfor(int a = 0; a < (marc_out.size() - 1); a++)\r\n\t {\r\n\t\tint field_a = 0;\r\n\t\tString value_a = (marc_out.get(a)).substring(1, 4);\r\n\t\ttry{\r\n\t\t field_a = (Integer.valueOf(value_a)).intValue();\r\n\t\t}\r\n\t\tcatch(NumberFormatException nfe) { }\r\n\r\n\t\tfor(int b = a + 1; b < marc_out.size(); b++)\r\n\t\t {\r\n\t\t\tint field_b = 0;\r\n\t\t\tString value_b = (marc_out.get(b)).substring(1, 4);\r\n\t\t\ttry{\r\n\t\t\t field_b = (Integer.valueOf(value_b)).intValue();\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException nfe){ }\r\n\r\n\t\t\tif(field_b < field_a)\r\n\t\t\t {\r\n\t\t\t\tString temp_field = marc_out.get(b);\r\n\t\t\t\tmarc_out.set(b, marc_out.get(a));\r\n\t\t\t\tmarc_out.set(a, temp_field);\r\n\r\n\t\t\t\tfield_a = field_b;\r\n\t\t\t }\r\n\t\t }\r\n \t }\r\n }",
"public void sortGivenArray_popularity() { \n int i, j, k; \n for(i = movieList.size()/2; i > 0; i /= 2) {\n for(j = i; j < movieList.size(); j++) {\n Movie key = movieList.get(j);\n for(k = j; k >= i; k -= i) {\n if(key.rents > movieList.get(k-i).rents) {\n movieList.set(k, movieList.get(k-i));\n } else {\n break; \n }\n }\n movieList.set(k, key);\n }\n } \n }",
"public void sort() {\n\t\tArrayList<Medication> dayList = new ArrayList<Medication>();\n\t\tupcomingMedsLabel.setText(\"\");\n\t\tDate dt = new Date();\n\t\tDateFormat df = new SimpleDateFormat(\"EEEE\");\n\t\tString currentDay = df.format(dt);\n\t\t\n\t\t//Runs through all elements in the array\n\t\tfor(int i = 0; i < medList.size(); i++) {\n\t\t\t//Checks to see if the medication needs to be taken today\n\t\t\tif(medList.get(i).getMedDateTime().contains(currentDay)) {\n\t\t\t\tboolean added = false;\n\t\t\t\t//If no other element has been added, added the element\n\t\t\t\tif(dayList.size() == 0) {\n\t\t\t\t\tdayList.add(medList.get(i));\n\t\t\t\t} else {\n\t\t\t\t\t//Checks all other medications in the dayList to order them chronologicaly\n\t\t\t\t\tfor(int j = 0; j < dayList.size(); j++) {\n\t\t\t\t\t\t//Get the hour of element at j and compare it again element at i of medList\n\t\t\t\t\t\tint hour = Integer.parseInt(dayList.get(j).getHour());\n\t\t\t\t\t\t//If < add at j, if equal check minutes else add later\n\t\t\t\t\t\tif(Integer.parseInt(medList.get(i).getHour()) < hour) {\n\t\t\t\t\t\t\tdayList.add(j, medList.get(i));\n\t\t\t\t\t\t\tadded = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if (Integer.parseInt(medList.get(i).getHour()) == hour) {\n\t\t\t\t\t\t\tadded = true;\n\t\t\t\t\t\t\t//Checks against minutes\n\t\t\t\t\t\t\tint minute = Integer.parseInt(dayList.get(j).getMinute());\n\t\t\t\t\t\t\tif(Integer.parseInt(medList.get(i).getMinute()) < minute) {\n\t\t\t\t\t\t\t\tdayList.add(j, medList.get(i));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif(dayList.size() > (j + 1)) {\n\t\t\t\t\t\t\t\t\tdayList.add(j+1, medList.get(i));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tdayList.add(medList.get(i));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(added == false) {\n\t\t\t\t\t\tdayList.add(medList.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Update the upcomingMedsLabel\n\t\tfor(int i = 0; i < dayList.size(); i++) {\n\t\t\tupcomingMedsLabel.setText(upcomingMedsLabel.getText() + \"\\n\\n\" + dayList.get(i));\n\t\t}\n\t}",
"@Override\n\tpublic List<Spittle> findAllSorted() {\n\t\treturn null;\n\t}",
"private static void getSortedusinStream(String[]...array) {\n\t\t\n\n\n\t\tList<String> result = new ArrayList<>();\n\n\t\tStream.of(array)\n\t\t\t\t.flatMap(Stream::of)\n\t\t\t\t.map(x -> (String)x)\n\t\t\t\t.sorted()\n\t\t\t\t.forEach(result::add);\n\n\t\tSystem.out.println(Arrays.toString(result.toArray(new String[0])));\n\t\t\n//\t\tList<String> list = new ArrayList<>();\n//\n//\t\tfor (String[] arra : array)\n//\t\t\tCollections.addAll(list, arra);\n//\n//\t\tCollections.sort(list);\n//\t\tSystem.out.println(Arrays.toString( list.toArray(new String[0])));\n\t\t\n\t\t\n\t\t // Function to merge two arrays of \n// // same type \n// return Stream.concat(Arrays.stream(a), \n// Arrays.stream(b)) \n// .toArray();\n\t\t\n\t\t\n//\t\treturn IntStream.concat(Arrays.stream(array1), Arrays.stream(array2))\n// .sorted()\n// .toArray();\n\n\t}",
"private void computeFeatureOffsets(TypeImpl ti, int next) {\n\n for (FeatureImpl fi : ti.getMergedStaticFeaturesIntroducedByThisType()) {\n fi.setOffset(next++);\n }\n\n ti.highestOffset = next - 1; // highest index value, 0 based index\n\n for (TypeImpl sub : ti.getDirectSubtypes()) {\n computeFeatureOffsets(sub, next);\n }\n }",
"public static void sort(Comparable[] a) {\n for (int i = 0 ; i < a.length ; i++) { // each position scan\n int min = i;\n for (int j = i+1; j < a.length; j++) { // each time we have to scan through remaining entry\n if (HelperFunctions.less(a[j], a[min])) {\n min = j ;\n }\n HelperFunctions.exch(a, i, min);\n }\n }\n }",
"private List<BlockPoint> getTopPlattforms(BlockType[][] chunk){\n\t// Find the upmost row with atleast one plattform in it\n\t// and save the position of all plattforms in said row.\n\tList<BlockPoint> topPlattforms = new ArrayList<>(boardWidth);\n\tfor(int r = 0; r < chunk.length; r++){\n boolean foundTopRow = false;\n for(int c = 0; c < boardWidth; c++){\n if(chunk[r][c].solid){\n \t\t topPlattforms.add(new BlockPoint(c,r));\n \t\t foundTopRow = true;\n \t\t}\n \t }\n \t if(foundTopRow) break;\n \t}\n return topPlattforms;\n }",
"public void oldSort()\n\t{\n\t\tfor (int index = 0; index < arraySize; index++) {\n\t\t\tfor (int secondIndex = index + 1; secondIndex < arraySize; secondIndex++) {\n\t\t\t\tint temp = 0;\n\t\t\t\tif (array[index] > array[secondIndex]) {\n\t\t\t\t\ttemp = array[index];\n\t\t\t\t\tarray[index] = array[secondIndex];\n\t\t\t\t\tarray[secondIndex] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"private void sortIntoCars(ArrayList<FileEntry> batch) {\n ArrayList<FileEntry> res = new ArrayList<>(); // prevents ConcurrentModificationException\n for (FileEntry dir : batch) {\n try {\n res.addAll(CarSorterImpl.getInstance().sortIntoCars(dir));\n } catch (IOException e) {\n LOGGER.error(\"Failed to load images in FileEntry at \" + dir.getCarImages().get(0).getFilepath());\n e.printStackTrace();\n }\n }\n\n batch.clear();\n batch.addAll(res); // puts the new entries back to original ArrayList\n }",
"List<T> getAllByRange(int firstItemNumber,\n int itemsCount,\n String sortBy,\n String sortTo);",
"public void sortGivenArray_date(){\n movieList = mergeSort(movieList);\n }",
"static void mergesort(MappedByteBuffer A, MappedByteBuffer result, \r\n\t\t\tint start, int end) throws IOException {\r\n\r\n\t\tif (end - start < 8) { \r\n\t\t\treturn; \r\n\t\t}\r\n\r\n\t\tif (end - start == 8) {\r\n\t\t\tresult.position(start);\r\n\t\t\tint left = result.getInt();\r\n\t\t\tint right = result.getInt();\r\n\t\t\tif (left > right) {\r\n\t\t\t\tresult.position (start);\r\n\t\t\t\tresult.putInt (right);\r\n\t\t\t\tresult.putInt (left);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tint mid = (end + start)/8*4;\r\n\t\tmergesort (result, A, start, mid);\r\n\t\tmergesort (result, A, mid, end);\r\n\r\n\t\tresult.position(start);\r\n\t\tfor (int i = start, j = mid, idx=start; idx < end; idx += 4) {\r\n\t\t\tint Ai = A.getInt (i);\r\n\t\t\tint Aj = 0;\r\n\t\t\tif (j < end) { Aj = A.getInt (j); }\r\n\t\t\tif (j >= end || (i < mid && Ai < Aj)) { \r\n\t\t\t\tresult.putInt (Ai);\r\n\t\t\t\ti += 4;\r\n\t\t\t} else {\r\n\t\t\t\tresult.putInt (Aj);\r\n\t\t\t\tj += 4;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void sortElements(Comparator<TLProperty> comparator);",
"private static SortedEventList sortEvents(LinkedList<Event> events) {\n\t\tSortedEventList sorted = new SortedEventList(); // Creates a new SortedEventList.\n\t\tfor (Event event : events) { // Iterates foreach Event.\n\t\t\tsorted.insertInOrder(event); // Adds the Event into the new SortedEventList.\n\t\t}\n\t\treturn sorted; // Returns the SortedEventList.\n\t}",
"public void testSortAndDedup() {\n assertDeduped(List.<String>of(), Comparator.naturalOrder(), 0);\n // test no elements in an integer array\n assertDeduped(List.<Integer>of(), Comparator.naturalOrder(), 0);\n // test unsorted array\n assertDeduped(List.of(-1, 0, 2, 1, -1, 19, -1), Comparator.naturalOrder(), 5);\n // test sorted array\n assertDeduped(List.of(-1, 0, 1, 2, 19, 19), Comparator.naturalOrder(), 5);\n // test sorted\n }",
"k value.\nFor 2nd tallest group (and the rest), insert each one of them into (S) by k value. So on and so forth.\n\npublic class Solution {\n public int[][] reconstructQueue(int[][] people) {\n Arrays.sort(people,new Comparator<int[]>() {\n @Override\n public int compare(int[] o1, int[] o2){\n return o1[0] != o2[0]? -o1[0] + o2[0]: o1[1] - o2[1];\n }\n });\n\n List<int[]> res = new ArrayList<>();\n for (int[] cur : people) {\n res.add(cur[1], cur); \n }\n return res.toArray(new int[people.length][]);\n }"
] | [
"0.55117404",
"0.5480804",
"0.5435451",
"0.5286226",
"0.525723",
"0.52363133",
"0.5215634",
"0.51563114",
"0.51552254",
"0.51544106",
"0.5153203",
"0.51452893",
"0.5136006",
"0.51263034",
"0.5077894",
"0.5075561",
"0.50563794",
"0.50547916",
"0.5032465",
"0.50289243",
"0.5027145",
"0.50257176",
"0.5023848",
"0.5015727",
"0.50066024",
"0.50035363",
"0.5002162",
"0.49930203",
"0.49856135",
"0.4983485",
"0.49827042",
"0.49791798",
"0.49789488",
"0.4974766",
"0.496895",
"0.49552652",
"0.49463114",
"0.49304974",
"0.49254414",
"0.49149436",
"0.49116716",
"0.49024826",
"0.4883016",
"0.48802003",
"0.4872201",
"0.4871115",
"0.48706362",
"0.48671225",
"0.48603046",
"0.48600438",
"0.48570493",
"0.48560247",
"0.48525396",
"0.48468566",
"0.48455635",
"0.4838171",
"0.48269507",
"0.48240605",
"0.48238537",
"0.48234025",
"0.48231557",
"0.4819539",
"0.4813828",
"0.48108602",
"0.48096833",
"0.48095888",
"0.48083",
"0.48063552",
"0.48020002",
"0.48002076",
"0.4797927",
"0.47899115",
"0.4787663",
"0.4777204",
"0.47734427",
"0.47593832",
"0.47534662",
"0.47531304",
"0.47496158",
"0.47411337",
"0.47323996",
"0.4724531",
"0.47126403",
"0.4707878",
"0.4706218",
"0.46901387",
"0.46898177",
"0.4689702",
"0.46893975",
"0.4687473",
"0.4686239",
"0.46800798",
"0.46783337",
"0.46772468",
"0.46734685",
"0.4667749",
"0.46650058",
"0.465683",
"0.46567625",
"0.46419",
"0.46284935"
] | 0.0 | -1 |
Created by Mandy on 4/17/16. | public interface Interaction {
JsonNode create(ObjectNode node);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"private void m50366E() {\n }",
"protected boolean func_70814_o() { return true; }",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"public void mo38117a() {\n }",
"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\n\tprotected void getExras() {\n\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public void method_4270() {}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"private void strin() {\n\n\t}",
"@Override\n public void init() {\n }",
"private void init() {\n\n\t}",
"public void skystonePos4() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"private void m50367F() {\n }",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\n protected void init() {\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void m23075a() {\n }",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public void mo12628c() {\n }",
"@Override\r\n\tpublic void init() {}",
"@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 }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"@Override\n public void init() {}",
"@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 public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void skystonePos6() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"public void mo21779D() {\n }",
"public abstract void mo70713b();",
"public void mo21877s() {\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n protected void getExras() {\n }",
"public final void mo91715d() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"public void mo6081a() {\n }"
] | [
"0.5939398",
"0.5877512",
"0.5766441",
"0.5748635",
"0.5737847",
"0.5717512",
"0.5692617",
"0.5688796",
"0.56818765",
"0.56818765",
"0.5655911",
"0.56520545",
"0.56233406",
"0.56110066",
"0.55869406",
"0.5581256",
"0.55785966",
"0.55506486",
"0.5548722",
"0.55217105",
"0.5518905",
"0.5518905",
"0.5518905",
"0.5518905",
"0.5518905",
"0.55015904",
"0.54822993",
"0.54814726",
"0.5473906",
"0.5465964",
"0.54641706",
"0.5459398",
"0.5455681",
"0.5451154",
"0.5442386",
"0.5441489",
"0.5438971",
"0.54322904",
"0.5428443",
"0.5428443",
"0.53965634",
"0.53936124",
"0.5390395",
"0.5390113",
"0.53750664",
"0.53745633",
"0.5373809",
"0.53619176",
"0.53616005",
"0.5361363",
"0.53605986",
"0.5345808",
"0.53409594",
"0.533857",
"0.53314304",
"0.53314304",
"0.53314304",
"0.53314304",
"0.53314304",
"0.53314304",
"0.53314304",
"0.5331212",
"0.53294116",
"0.53294116",
"0.53294116",
"0.53291315",
"0.53291315",
"0.53291315",
"0.53214604",
"0.5318589",
"0.5316512",
"0.5316512",
"0.5316512",
"0.5316512",
"0.5316512",
"0.5316512",
"0.53122824",
"0.5311819",
"0.5310764",
"0.5310014",
"0.5310014",
"0.5310014",
"0.53097695",
"0.5301497",
"0.5301497",
"0.5298821",
"0.52931",
"0.5288875",
"0.52874094",
"0.5287292",
"0.5278753",
"0.5278166",
"0.5276901",
"0.52700037",
"0.5259536",
"0.5259008",
"0.52576417",
"0.5257316",
"0.52506435",
"0.5249536",
"0.5241608"
] | 0.0 | -1 |
The run() method has the required logic for handling the receiver, sender, timer and heartbeat thread. The timer thread waits for 7 seconds to receive a response. If it receives an OK but doesn't receive a leader then it starts an election process again. The receiver thread accepts all the incoming requests. | public void run() {
switch( operation )
{
case "Timer":
System.out.println( "INFO : Timer started" );
try {
// wait 7 seconds
Thread.sleep( 7000 );
if( !receivedOk )
{
// OK not received. Set self as leader
LeaderState.getInstance().setLeaderID( ServerState.getInstance().getSelfID() );
electionInProgress = false; // allow another election request to come in
leaderFlag = true;
System.out.println( "INFO : Server s" + LeaderState.getInstance().getLeaderID()
+ " is selected as leader! " );
LeaderState.getInstance().resetLeader(); // reset leader lists when newly elected
Runnable sender = new BullyAlgorithm( "Sender", "coordinator" );
new Thread( sender ).start();
}
if( receivedOk && !leaderFlag )
{
System.out.println( "INFO : Received OK but coordinator message was not received" );
electionInProgress = false;
receivedOk = false;
Runnable sender = new BullyAlgorithm( "Sender", "election" );
new Thread( sender ).start();
}
}
catch( Exception e ) {
System.out.println( "INFO : Exception in timer thread" );
}
break;
case "Heartbeat":
while( true ) {
try {
Thread.sleep(10);
if( leaderFlag && ServerState.getInstance().getSelfID() != LeaderState.getInstance().getLeaderID() ) {
Thread.sleep( 1500 );
Server destServer = ServerState.getInstance().getServers()
.get( LeaderState.getInstance().getLeaderID() );
MessageTransfer.sendServer(
ServerMessage.getHeartbeat( String.valueOf(ServerState.getInstance().getSelfID()) ),
destServer
);
//System.out.println( "INFO : Sent heartbeat to leader s" + destServer.getServerID() );
}
}
catch( Exception e ) {
leaderFlag = false;
leaderUpdateComplete = false;
System.out.println( "WARN : Leader has failed!" );
// send election request
Runnable sender = new BullyAlgorithm( "Sender", "election" );
new Thread( sender ).start();
}
}
case "Sender":
switch( reqType ) {
case "election":
try {
sendElectionRequest();
} catch( Exception e ) {
System.out.println( "WARN : Server has failed, election request cannot be processed" );
}
break;
case "ok":
try {
sendOK();
} catch( Exception e ) {
e.printStackTrace();
}
break;
case "coordinator":
try {
sendCoordinatorMsg();
} catch( Exception e ) {
e.printStackTrace();
}
break;
}
break;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"final public void run() {\n connectionEstablished();\n\n // The message from the server\n int msg;\n\n // Loop waiting for data\n\n try {\n // messageTimer.schedule(new TimerTask() {\n // @Override\n // public void run() {\n // try {\n // sendFromMessageQueue();\n // } catch (IOException e) {}\n // }\n // }, 0, 100);\n while (!readyToStop) {\n // Get data from Server and send it to the handler\n // The thread waits indefinitely at the following\n // statement until something is received from the server\n\n try { // added in version 2.31\n\n // String cur = input.readLine();\n // handleBig5String(cur + \"\\n\");\n readByte();\n\n } catch (RuntimeException ex) { // thrown by handleMessageFromServer\n\n connectionException(ex);\n }\n }\n } catch (Exception exception) {\n if (!readyToStop) {\n try {\n closeAll();\n } catch (Exception ex) {\n }\n\n clientReader = null;\n connectionException(exception);\n }\n } finally {\n\n clientReader = null;\n connectionClosed(); // moved here in version 2.31\n }\n }",
"public void run() {\n\t\t// System.out.println(\"ReplyLogListener running\");\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tchimeraRead();\n\t\t\t} catch (IOException e) {\n\t\t\t\tlogger.info(\"UCSF Chimera has exited: \"+e.getMessage());\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void run() {\n android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_BACKGROUND);\n try {\n try {\n selector = Selector.open();\n channel = SocketChannel.open();\n channel.configureBlocking(false);\n channel.register(selector, SelectionKey.OP_CONNECT);\n channel.connect(new InetSocketAddress(HOSTNAME, PORT));\n\n } catch (IOException e) {\n new IOException(\"Connection failed. Hostname : \" + HOSTNAME + \", port : \" + PORT, e).printStackTrace();\n }\n\n while (!Thread.interrupted()) {\n selector.select();\n Iterator<SelectionKey> keys = selector.selectedKeys().iterator();\n\n while (keys.hasNext()) {\n SelectionKey key = keys.next();\n keys.remove();\n\n if (!key.isValid()) {\n continue;\n }\n if (key.isConnectable()) {\n connect(key);\n }\n if (key.isReadable()) {\n String str = read(key);\n /*if(!str.equals(score)) {\n String nonStrange = str.replaceAll(\"\\\\p{Cntrl}\", \"\"); // gets rid of special character (diamond question mark)\n score = Integer.valueOf(nonStrange);\n Score();\n }*/\n Log.d(\"Received a message\", str);\n }\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n close();\n }\n }",
"@Override\n public void run(){\n while(true){\n ArrayList<Thread> threads = new ArrayList<Thread>();\n \n //construct the string\n String message = String.format(\"hb|%d|%d\", serverPort, sequence);\n\n //have a thread to send heart beat\n for(ServerInfo peer : serverStatus.keySet()){\n //pass it to the client runnable\n Thread thread = new Thread(new SenderRunnable(peer, message));\n threads.add(thread);\n thread.start();\n }\n\n //wait for the completion\n for(Thread thread : threads){\n try{\n thread.join();\n }catch(Exception e){}\n \n \n }\n\n //increment the sequence by 1\n sequence += 1;\n\n //sleep for 2 secs\n try{\n Thread.sleep(2000);\n }catch(InterruptedException e){\n //System.err.println(e);\n }\n\n }\n }",
"@Override\n public void run() {\n if (_running) {\n return;\n }\n _running = true;\n\n byte[] buf = new byte[8192];\n DatagramPacket dp = new DatagramPacket(buf, buf.length);\n\n //to enable stopping of receive\n try {\n _listenSocket.setSoTimeout(1000);\n } catch (SocketException ex) {\n ex.printStackTrace();\n// Logger.getLogger(NetworkNode.class.getName()).log(Level.SEVERE, \"Error in starting network node\", ex);\n }\n\n while (_running) {\n try {\n //System.out.println(_listenSocket.getLocalSocketAddress() + \"->\" + _listenSocket.getRemoteSocketAddress());\n _listenSocket.receive(dp);\n handlePacket(dp);\n } catch (SocketTimeoutException e) {\n // listen timeout. do nothing.\n } catch (Exception ex) {\n ex.printStackTrace();\n// Logger.getLogger(NetworkNode.class.getName()).log(Level.SEVERE, \"Error in receiving packet in network node\", ex);\n }\n }\n System.out.println(\"Listen thread finished!\");\n _runningThread = null;\n }",
"public void run() { // Custom run function for the main thread\n\t\twhile (true) { // Infinite loop \n\t\t\t\n\t\t\tassignLane(); // It keeps assigning lanes to parties if lanes are available \n\t\t\t\n\t\t\ttry {\n\t\t\t\tsleep(250);\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}",
"public void run() {\n\n\t\tinitListen(new OnReceivedListener() {\n\t\t\t@Override\n\t\t\tpublic void onReceived() throws Exception {\n\n\t\t\t\tmSocket.receive(new DatagramPacket(mQuickBuffer, mQuickBuffer.length));\n\t\t\t\tPacket packet = (Packet) deserialization(mQuickBuffer);\n\t\t\t\tif (packet.isAck()) {\n\t\t\t\t\tSR.updateBufferSlotTimerSender(packet.getSeq(), BufferSlotTimer.ACKED);\n\t\t\t\t\tSR.output.append(\"(S) - Acknowledgment for Packet \" + packet.getSeq() + \" has been Received \\n\");\n\t\t\t\t\tSR.updateBaseSnd();\n\t\t\t\t\tSR.getBufferSlotTimerSender(packet.getSeq()).stopTimerTimeout();\n\t\t\t\t\tSR.output.append(\"(S) - Timer for Packet \" + packet.getSeq() + \" has been stopped \\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"@Override\n\t\tpublic void run()\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\twhile (keepListening)\n\t\t\t\t{\n\t\t\t\t\tString rcvStr = is.readLine();\n\t\t\t\t\t\n\t\t\t\t\t//We must make sure that this packet has been sent here correctly.\n\t\t\t\t\tif (rcvStr != null)\n\t\t\t\t\t{\n\t\t\t\t\t\t//TO-DO parse message here and notify controller\n\t\t\t\t\t\t//just transmit it to controller.\n\t\t\t\t\t\tSystem.out.println(\"receive reply : \" + rcvStr);\n\t\t\t\t\t\tmyController.parseResponse(rcvStr);\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t//The receive String is null means that this connection is broken.\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"at ControlChannel listenRunnable : receive null response\");\n\t\t\t\t\t\tkeepListening = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"@Override\n public void run() {\n final long currentTimeMillis = System.currentTimeMillis();\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(heartbeat + \" HeartbeatProcessor ...\");\n }\n if (!heartbeat.getSkillState().equals(State.READY)) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"No heartbeat because this skill has not yet joined the network.\");\n }\n return;\n }\n\n // send heartbeats after waiting at least the specified duration\n final long outboundHeartbeatReceivedThresholdMillis = currentTimeMillis - OUTBOUND_HEARTBEAT_PERIOD_MILLIS;\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\" \" + outboundParentHeartbeatInfo);\n }\n if (outboundParentHeartbeatInfo.heartbeatSentMillis < outboundHeartbeatReceivedThresholdMillis) {\n sendHeartbeat(outboundParentHeartbeatInfo, heartbeat);\n }\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tif (!terminateThread.get()) {\n\t\t\t\t\tComponentLogger.getInstance().log(LogMessageType.LOAD_BALANCER_PROMPTED_RE_ELECTION);\n\t\t\t\t\tSystem.out.println(\"Prompting for a re-election\");\n\t\t\t\t\tinitiatePreElection();\n\t\t\t\t}\n\t\t\t}",
"@Override\n public void run() {\n if (!this.m_running) {\n this.m_running = true;\n this.pollingLooper();\n }\n }",
"@Override\n public void run() {\n //System.out.println(\"TCPReceiver is running\");\n logger.debug(\"TCPReceiver is running\");\n //receivePackage(DataHandler.inQueue);\n while (true){\n try {\n socket = serverSocket.accept();\n multiReceivePackage(this.inQueue);\n } catch (Exception e) {\n //System.out.println(\"[\" + Thread.currentThread().getName() + \"] Receiver 线程内出错。\");\n logger.error(\"[\" + Thread.currentThread().getName() + \"] Receiver 线程内出错。\");\n e.printStackTrace();\n }\n }\n\n\n }",
"@Override\r\n\tpublic void run() {\n\t\tbyte[] buffer = new byte[YapttaConstants.Network.DEFAULT_PACKET_BUFFER_SIZE];\r\n\t\tDatagramPacket packet = new DatagramPacket(buffer, buffer.length);\r\n\t\t\r\n\t\t// Loop until we're disconnected/stopped/etc\r\n\t\twhile(!haltRequested && socket != null && socket.isBound() && !socket.isClosed())\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\t// Block the socket until data is received\r\n\t\t\t\tsocket.receive(packet);\r\n\t\t\t\t\r\n\t\t\t\t// Deserialize the data\r\n\t\t\t\tByteArrayInputStream bais = new ByteArrayInputStream(packet.getData(), 0, packet.getLength());\r\n\t\t\t\tObjectInputStream ois = new ObjectInputStream(bais);\r\n\t\t\t\tAbstractMessage am = (AbstractMessage) ois.readObject();\r\n\t\t\t\t\r\n\t\t\t\t// Save who the sender was\r\n\t\t\t\tam.setSender(packet.getAddress());\r\n\t\t\t\t\r\n\t\t\t\t// Call the data received handler as appropriate\r\n\t\t\t\tif(callback != null) callback.messageReceived(am);\r\n\t\t\t\t\r\n\t\t\t\t// Clean-up\r\n\t\t\t\tois.close();\r\n\t\t\t\tbais.close();\r\n\t\t\t\t\r\n\t\t\t\t// ... then do it again!\r\n\t\t\t\t\r\n\t\t\t} catch (SocketTimeoutException e) {\r\n\t\t\t\t// just try to roll with the error (but at least log it)... it's likely due to\r\n\t\t\t\t// disconnection and will end the thread when it checks the condition of the loop\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// if something other than timeout occurred, give more info\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\tsuper.run();\n\t\t\tThread thisThread = currentThread();\n\t\t\ttry {\n\t\t\t\tLog.i(\"con\", \"worked3\");\n\t\t\t\tconnectToServer();\n\t\t\t\tif (connected) {\n\t\t\t\t\tsetUpStreams();\n\t\t\t\t\tsendProfile();\n\t\t\t\t\tLog.i(\"con\", \"worked8\");\n\t\t\t\t\twhile (blinker == thisThread) {\n\t\t\t\t\t\tstartListening();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tLog.e(\"cl\", \"Found IO Exception!: \" + e);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tLog.e(\"cl\", \"Found class not found exception!: \" + e);\n\t\t\t}\n\n\t\t}",
"@Override\n\t public void run() {\n\t String messageLine = \"\";\n\n while(allowRun()) {\n \ttry {\n\t \n\t\t if (sessionTelnet==null) {\n\t\t\t\t\t\t\t\tconnect();\n\t\t }\n\t\t while ((sessionTelnet!=null) && (allowRun())) {\n\t\t \tmessageLine = sessionTelnet.pollTelnet();\n\t\t \tif (messageLine == null) {\n\t\t \t\tsessionTelnet = null;\n\t\t \t\tconnect();\n\t\t \t}\n\t\t \telse if (messageLine != \"\") {\n\t\t ZoneMinderTriggerEvent event = new ZoneMinderTriggerEvent( messageLine );\n\t\t \ttripMonitor(event);\n\t\t \n\t\t }\n\t\t \tThread.yield();\n\t\t }\n\t\t \n\t\t \t//Don't expect any of these exceptions (Telnet son't fail login\n\t\t } catch (FailedLoginException | IllegalArgumentException \n\t\t\t\t\t\t| ZoneMinderUrlNotFoundException e) {\n\t\t \t\n\t\t \t} catch(IOException ioe) {\n\t\t \t\tsessionTelnet = null;\n\t\t \t\ttry {\n\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t}\n\t\t \t}\n \t\n\t }\n\t }",
"public void run () {\r\n\t\ttry {\r\n\t\t\tsendData = new DatagramSocket();\r\n\t\t\tString controlString= new String(control.getData(), 0, control.getLength()) ;\r\n\t\t\tString[] msgParts = controlString.split(\";;\") ;\r\n\t\t\t\r\n\t\t\t// Get operation code and determine operation to be performed\r\n\t\t\tint operationCode = Integer.parseInt(msgParts[0]) ;\r\n\t\t\t\r\n\t\t\t// reserveInterLibrary book\r\n\t\t\tif ( operationCode == 0 ) {\r\n\t\t\t\treserveBook ( msgParts[1], msgParts[2] ) ;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// get non returners\r\n\t\t\telse if ( operationCode == 1 ) {\r\n\t\t\t\tint days = Integer.parseInt(msgParts[1]) ;\r\n\t\t\t\tgetNonReturners ( days ) ;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch ( SocketException e ) {\r\n\t\t\tString message = \"A socket exception happened \" + e.getMessage() ;\r\n\t\t\tlib.writeLog(message);\r\n\t\t} catch ( IOException e ) {\r\n\t\t\tString message = \"An IOException happened \" + e.getMessage() ;\r\n\t\t\tlib.writeLog(message);\r\n\t\t}finally {\r\n\t\t\r\n\t\t\tif ( sendData != null ) {\r\n\t\t\t\tsendData.close();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void run() {\n\t\tLog.i(\"here\",\"listener\");\n\t\twhile(true){\n\t\t\t\n\t\t\ttry {\n\t\t\t\tif((cs=s.accept())!=null)new Thread(new Worker(context,cs)).start();\n\t\t\t\t\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}\n\t\t\t\n\t\t}\n }",
"public void run(){\n\t\t\n\t\twhile(true){\n\t\t\ttry {\n\t\t\t\tSocket s = listener.accept();\n\t\t\t\tnew ServerConnection(chatServ, s).start();\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn; // stop listening\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void run() {\n if (isV6())\n while (!interrupted()) {\n try {\n handleMessage(serverSocket.accept());\n } catch (SocketTimeoutException ignore) {\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n try {\n serverSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void run() {\n\t\tThread t = Thread.currentThread();\n\t\twhile (!t.isInterrupted()) {\n\t\t\ttry {\n\t\t\t\t//boolean status = process();\n\t\t\t\tMessage message = receive();\n\t\t\t\tif (t.isInterrupted())\n\t\t\t\t\treturn;\n\t\t\t\t//if (!status)\n\t\t\t\t//\treturn;\n\t\t\t\tif (socket == null)\n\t\t\t\t\treturn;\n\t\t\t\tThread.yield();\n\t\t\t} catch (Exception e) {\n\t\t\t\t//_monitor.log(e);\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void run() {\n\t\tlog(\"Running on port \" + serverSocket.getLocalPort());\n\t\twhile(true) {\n\t\t\ttry {\n\t\t\t\t// accept incomming connections\n\t\t\t\tSocket clientSocket = serverSocket.accept();\n\t\t\t\t//log(\"New connection from \" + client_socket.getRemoteSocketAddress());\n\t\t\t\t// create a new connection handler and run in a separate thread\n\t\t\t\tTrackerRequestHandler handler = new TrackerRequestHandler(this, clientSocket);\n\t\t\t\texecutor.execute(handler);\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog(\"Problem accepting a connection\");\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void run() {\n String message = router.toString() + \"/\" + router.toString() + \"/\" + 0 + \"/\" + router.getPort() + \"/\";\n Set<Map.Entry<Node, Double>> neighbours = router.getNeighbours().entrySet();\n for (Map.Entry<Node, Double> m : neighbours) {\n Node n = m.getKey();\n message += n.toString() + \" \" + m.getValue() + \" \" + n.getPort() + \"/\";\n }\n buffer.initLSA(router.toString(), message);\n\n Processor p = new Processor(network, processing_buffer, router, nodeSequence);\n new Thread(p).start();\n\n for (Node n : router.getNeighbours().keySet()) {\n heartBeat.put(n.toString(), 0);\n }\n\n receive();\n }",
"@Override\n\tpublic synchronized void run() {\n\t\tif ((infoMessage.getStoredValue() > node.getLeaderValue())\n\t\t\t\t|| ((infoMessage.getStoredValue() == node.getStoredValue())\n\t\t\t\t\t\t&& (infoMessage.getLeaderId() > node.getLeaderID()))) {\n\n\t\t\tnode.setLeaderID(infoMessage.getLeaderId());\n\t\t\tnode.setLeaderValue(infoMessage.getStoredValue());\n\t\t\tnode.setStoredId(node.getNodeID());\n\t\t\tnode.setStoredValue(node.getNodeValue());\n\t\t\tSystem.out.println(\"INFO HANDLER: 1) Leader changed in Node \" + node.getNodeID() + \" to: \"\n\t\t\t\t\t+ node.getLeaderID() + \" due to exchanging messages with \" + infoMessage.getIncomingId());\n\n\t\t\t// End to Exchanging Leaders Timer && Processing\n\t\t\tnode.networkEvaluation.setEndExchangingLeadersTimer(infoMessage.getIncomingId());\n\t\t\tnode.networkEvaluation.getExchangingLeaderTimer(infoMessage.getIncomingId());\n\n\t\t\t// Metric 3 - Without Leader Timer\n\t\t\tnode.networkEvaluation.setEndWithoutLeaderTimer();\n\t\t\tnode.networkEvaluation.getWithoutLeaderTimer();\n\n\t\t\t// send \"special \"Leader message to all neighbours except one that passed the\n\t\t\t// info to me\n\t\t\tIterator<Integer> i = node.getNeighbors().iterator();\n\n\t\t\tHashSet<Integer> toSend = new HashSet<Integer>();\n\t\t\twhile (i.hasNext()) {\n\t\t\t\tInteger temp = i.next();\n\t\t\t\tif (temp != infoMessage.getIncomingId()) {\n\t\t\t\t\ttoSend.add(temp);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If I have no neighbours except node I exchanged info messages with, no need\n\t\t\t// to send leader messages\n\t\t\tif (!(toSend.isEmpty())) {\n\n\t\t\t\tif (DEBUG)\n\t\t\t\t\tSystem.out.println(\"INFO HANDLER: 2) Sending special leader to all nodes.\");\n\n\t\t\t\tsendMessage(logic.MessageType.LEADER_SPECIAL, toSend);\n\t\t\t}\n\t\t\treturn;\n\n\t\t} else if ((infoMessage.getStoredValue() == node.getLeaderValue()) // Prevents infinite message passing\n\t\t\t\t&& (infoMessage.getLeaderId() == node.getLeaderID())) {\n\t\t\tif (DEBUG)\n\t\t\t\tSystem.out.println(\"INFO HANDLER: 3) Same Leader! Agreement Reached.\");\n\n\t\t\t// End to Exchanging Leaders Timer && Processing\n\t\t\tnode.networkEvaluation.setEndExchangingLeadersTimer(infoMessage.getIncomingId());\n\t\t\tnode.networkEvaluation.getExchangingLeaderTimer(infoMessage.getIncomingId());\n\n\t\t\t// Metric 3 - Without Leader Timer\n\t\t\tnode.networkEvaluation.setEndWithoutLeaderTimer();\n\t\t\tnode.networkEvaluation.getWithoutLeaderTimer();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// If not, send a message back saying that the other node should send the leader\n\t\t// message instead with my leader\n\t\telse {\n\n\t\t\tif (DEBUG)\n\t\t\t\tSystem.out.println(\"INFO HANDLER: 4) Sending back stronger leader.\\n-----------------------------\");\n\n\t\t\tsendMessage(logic.MessageType.INFO, infoMessage.getIncomingId());\n\n\t\t}\n\t}",
"@Override\n\tpublic void run() {\n\t\tString result = null;\n\t\twhile (checkToStart()) {\n\t\t\tresult = doRun();\n\t\t\tsendResult(result);\n\t\t}\n\t\t// System.out.println(\"Thread - \" + name + \" is dead\");\n\t}",
"public void run() throws InterruptedException {\n while(running) {\n DatagramPacket udpPacket = new DatagramPacket(buf, buf.length);\n try {\n // Receive message\n udpSocket.receive(udpPacket);\n\n //connection accept TCP\n socket = serverSocket.accept();\n\n //Print some packet data.\n savePaketdata(udpPacket);\n\n //print by server console\n printActualSensorData();\n\n //start Web Server\n showWeb();\n\n // Start Tests\n if(TEST_BOOL){\n orderTest();\n }\n\n\n } catch (IOException e) {\n System.out.println(\"Could not receive datagram.\\n\" + e.getLocalizedMessage());\n }\n }\n }",
"public void run()\n {\n // open selector\n try\n {\n _selector = Selector.open();\n }\n catch (Exception exception)\n {\n System.out.println(\"selector open \");\n System.exit(-1);\n }\n \n // create reactor\n if (ProviderPerfConfig.useReactor()) // use UPA VA Reactor\n {\n _reactorOptions.clear();\n if ((_reactor = ReactorFactory.createReactor(_reactorOptions, _errorInfo)) == null)\n {\n System.out.printf(\"Reactor creation failed: %s\\n\", _errorInfo.error().text());\n System.exit(ReactorReturnCodes.FAILURE);\n }\n \n // register selector with reactor's reactorChannel.\n try\n {\n _reactor.reactorChannel().selectableChannel().register(_selector,\n SelectionKey.OP_READ,\n _reactor.reactorChannel());\n }\n catch (ClosedChannelException e)\n {\n System.out.println(\"selector register failed: \" + e.getLocalizedMessage());\n System.exit(ReactorReturnCodes.FAILURE);\n }\n }\n \n _directoryProvider.serviceName(ProviderPerfConfig.serviceName());\n _directoryProvider.serviceId(ProviderPerfConfig.serviceId());\n _directoryProvider.openLimit(ProviderPerfConfig.openLimit());\n _directoryProvider.initService(_xmlMsgData);\n\n _loginProvider.initDefaultPosition();\n _loginProvider.applicationId(applicationId);\n _loginProvider.applicationName(applicationName);\n\n if (!_dictionaryProvider.loadDictionary(_error))\n {\n System.out.println(\"Error loading dictionary: \" + _error.text());\n System.exit(CodecReturnCodes.FAILURE);\n }\n \n getProvThreadInfo().dictionary(_dictionaryProvider.dictionary());\n \n _reactorInitialized = true;\n\n // Determine update rates on per-tick basis\n long nextTickTime = initNextTickTime();\n \n // this is the main loop\n while (!shutdown())\n {\n if (!ProviderPerfConfig.useReactor()) // use UPA Channel\n {\n \tif (nextTickTime <= currentTime())\n \t{\n \t nextTickTime = nextTickTime(nextTickTime);\n \t\tsendMsgBurst(nextTickTime);\n \t\t_channelHandler.processNewChannels();\n \t}\n\t \t_channelHandler.readChannels(nextTickTime, _error);\n\t \t_channelHandler.checkPings();\n }\n else // use UPA VA Reactor\n {\n if (nextTickTime <= currentTime())\n {\n nextTickTime = nextTickTime(nextTickTime);\n sendMsgBurst(nextTickTime);\n }\n\n Set<SelectionKey> keySet = null;\n\n // set select time \n try\n {\n int selectRetVal;\n long selTime = (long)(selectTime(nextTickTime) / _divisor);\n \n if (selTime <= 0)\n selectRetVal = _selector.selectNow();\n else\n selectRetVal = _selector.select(selTime);\n \n if (selectRetVal > 0)\n {\n keySet = _selector.selectedKeys();\n }\n }\n catch (IOException e1)\n {\n System.exit(CodecReturnCodes.FAILURE);\n }\n\n // nothing to read or write\n if (keySet == null)\n continue;\n\n Iterator<SelectionKey> iter = keySet.iterator();\n while (iter.hasNext())\n {\n SelectionKey key = iter.next();\n iter.remove();\n if(!key.isValid())\n continue;\n if (key.isReadable())\n {\n int ret;\n \n // retrieve associated reactor channel and dispatch on that channel \n ReactorChannel reactorChnl = (ReactorChannel)key.attachment();\n \n /* read until no more to read */\n while ((ret = reactorChnl.dispatch(_dispatchOptions, _errorInfo)) > 0 && !shutdown()) {}\n if (ret == ReactorReturnCodes.FAILURE)\n {\n if (reactorChnl.state() != ReactorChannel.State.CLOSED &&\n reactorChnl.state() != ReactorChannel.State.DOWN_RECONNECTING)\n {\n System.out.println(\"ReactorChannel dispatch failed\");\n reactorChnl.close(_errorInfo);\n System.exit(CodecReturnCodes.FAILURE);\n }\n }\n }\n }\n }\n }\n\n shutdownAck(true);\n }",
"public void run() {\n\t\t\twhile (true) {// 保持连接直到异常发生或套接字返回\n\t\t\t\ttry {\n\t\t\t\t\tif (serverSocket != null) {\n\t\t\t\t\t\tmTempSocket = serverSocket.accept(); // 如果一个连接同意\n\t\t\t\t\t}\n\t\t\t\t\t// If a connection was accepted\n\t\t\t\t\tif (mTempSocket != null) {\n\t\t\t\t\t\t// Do work to manage the connection (in a separate\n\t\t\t\t\t\t// thread)\n\t\t\t\t\t\tmanageConnectedSocket(); // 管理一个已经连接的RFCOMM通道在单独的线程。\n\t\t\t\t\t\tserverSocket.close();\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlisten();\n\t\t\t\t}",
"@Override\n public void run() {\n P.print(\"Receive thread starts up.\");\n try {\n ObjectInputStream ois = new ObjectInputStream(socket.getInputStream());\n while (P.choke_thread_running) { //read input forever.\n try{\n Object o = ois.readObject(); //blocking.\n if (o instanceof Handshake) { // this is a Handshake.\n Handshake hs = (Handshake)o;\n P.print(\"Received handshake from \"+hs.pid);\n }\n else if(o instanceof Message){ //this is a Message.\n Message M = (Message) o;\n if(M.type==0){\n P.print(\"Received choke from \"+t.getName());\n }\n else if(M.type==1){\n P.print(\"Received unchoke from \"+t.getName());\n }\n else if(M.type==2){\n P.print(\"Received interested from \"+t.getName());\n }\n else if(M.type ==3){\n P.print(\"Received not_interested from \"+t.getName()); \n }\n else if(M.type==4){\n P.print(\"Received have from \"+t.getName());\n }\n else if(M.type==5){\n P.print(\"Received bitfield from \"+t.getName());\n }\n else if(M.type==6){\n P.print(\"Received request from \"+t.getName());\n }\n else if(M.type==7){\n P.print(\"Received piece from \"+t.getName());\n }\n else{\n P.print(\"Error: undefined message type: \"+M.type);\n }\n }\n else {\n System.out.println(\"Class not found.\");\n }\n }\n catch(ClassNotFoundException ex){\n ex.printStackTrace();\n }\n }\n ois.close();\n socket.close();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"@Override\r\n public void run() {\r\n byte[] buffer = new byte[1024];\r\n int bytes;\r\n int times = 0;\r\n\r\n while (!mStopped) {\r\n try {\r\n if (times == 0) {\r\n try {\r\n \t// Sometimes lag occurs. Therefore, from time to time\r\n \t// we just ignore a large chunk of data from input stream\r\n \t// in order to synchronize the communication.\r\n mInputStream.skip(1024000);\r\n } catch (Exception e) {}\r\n times = LAG_CUT_TIMEOUT;\r\n }\r\n times--;\r\n\r\n // Read from socket and send to the handler\r\n bytes = mInputStream.read(buffer);\r\n mReceiveHandler.receiveData(buffer, bytes);\r\n\r\n } catch (IOException ioe) {\r\n Log.e(Common.TAG, \"Error receiving from the socket: \" + ioe.getMessage());\r\n mPeer.communicationErrorOccured();\r\n break;\r\n }\r\n }\r\n }",
"public void run() {\n try {\n int i = 0;\n while (running) {\n try {\n TimeUnit.MILLISECONDS.sleep(250);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n if (requests.size() > 0) {\n external_socket_out = new Socket(target_address, outside_port);\n Request r = requests.first();\n \n if (r.getStatus(secretKey).equals(\"na\")) {\n r.setStatus(\"ad\",secretKey);\n System.out.println(\"> Speaker: Found request!\");\n\n\n System.out.println(\"> TCPSpeaker: Sent request to server\");\n // Envia o pedido ao servidor de destino\n PrintWriter pw = new PrintWriter(external_socket_out.getOutputStream());\n pw.println(r.getMessage(secretKey));\n pw.println();\n pw.flush();\n\n\n System.out.println(\"> TCPSpeaker: Getting response from server\");\n // Recebe a resposta do servidor de destino\n BufferedReader br = new BufferedReader(new InputStreamReader(external_socket_out.getInputStream()));\n String t;\n while ((t = br.readLine()) != null)\n r.concatenateResponse(t,secretKey);\n r.setStatus(\"sd\",secretKey);\n\n System.out.println(\"> TCPSpeaker: Request has been served at destination!\");\n br.close();\n\n external_socket_out.close();\n\n //enviar o request via udp de volta\n String ip = InetAddress.getLocalHost().getHostAddress();\n i++;\n startRequestHandler(this.UDPsocket,r,i,ip);\n\n //remover o request da fila de espera deste nodo\n requests.remove(r);\n }\n }\n\n }\n } catch(Exception e){\n e.printStackTrace();\n }\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tsuper.run();\n\t\t\t\ttry {\n\t\t\t\t\tinputStream = new DataInputStream(mSocket.getInputStream());// 2.23此处报空。崩\n\t\t\t\t\t// --使能常连接探测\n\t\t\t\t\tmSocket.setKeepAlive(true);\n\t\t\t\t\t// --设置心跳时间\n\t\t\t\t\tmSocket.setSoTimeout(1500);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\twhile (!interrupted()) {\n\t\t\t\t\tint ret = 0;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tret = inputStream.read(recvBuf);\n\t\t\t\t\t\tif (ret > 0 && udpSocket != null) {\n\t\t\t\t\t\t\tDEBUG(\"recvlen:\" + ret);\n\n\t\t\t\t\t\t\t// --将接收到的TCP数据发送给UDP\n\n\t\t\t\t\t\t\tDatagramPacket packet = new DatagramPacket(recvBuf, 0, ret, address, iDstPort);\n\t\t\t\t\t\t\tudpSocket.send(packet);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (SocketTimeoutException e) {// 2.18甘\n\t\t\t\t\t\tDEBUG(\"read timeout!\");\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tDEBUG(\"=== IOException ===\");\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t// --断开链路\n\t\t\t\t\t\tstopTask();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"@Override\r\n\tpublic void run() {\r\n\t\twhile (closer) {\r\n\t\t\ttry {\r\n\t\t\t\tObjectInputStream ois = new ObjectInputStream(client.getInputStream());\r\n\t\t\t\tObject object = ois.readObject();\r\n\t\t\t\tArrayList<String> input = (ArrayList<String>) object;\r\n\t\t\t\tInteger election = inputTransformer(input);\r\n\t\t\t\tif (election == 1) {\r\n\t\t\t\t\tsl.getLogger().info(\"IncomingMessage on Client Type 1 - For Chat\");\r\n\t\t\t\t}\r\n\t\t\t\tif (election == 2) {\r\n\t\t\t\t\tsl.getLogger().info(\"IncomingMessage on Client Type 2 - For Points\");\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} catch (ClassNotFoundException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void run() {\n\t\ttry {\n\t\t\ttryToConnect();\n\t\t\tif(!fromServer.equals(null) && fromServer.equals(\"VALIDATED\")){\n\t\t\t\tmsg(\"Connected Successfully and was Validated\");\n\t\t\t\tClient.updateConnectedClients(id);\n\t\t\t\tmsg(\"connectedClients array index = \" +id+ \" \" +Client.connectedClients[id]);\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tmsg(\"Waiting for another session to connect\");\n\t\t\t\twhile(!fromServer.equals(\"VALIDATED\")) tryToConnect();\n\t\t\t}\n\t\t\t\n\t\t\t//validated threads should continue\n\t\t\tfromServer = in.readLine();\n\t\t\twhile(!fromServer.equals(null)){\n\t\t\t\tif(fromServer.equals(\"sorry\"))return; //it's the end of the day, go home\n\t\t\t\tif(fromServer.equals(\"MOVIEPLAYING\")){\n\t\t\t\t\tmsg(\"Am watching movie now.\");\n\t\t\t\t}\n\t\t\t\tif(fromServer.equals(\"done\"))return;\n\t\t\t\tfromServer = in.readLine();\n\t\t\t}\n\t\t\t\t\n\t\n\t\t}catch (UnknownHostException 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\t}",
"@Override\n\tpublic void run() {\n\t\tsuper.run();\n\t\twhile(isrun&&handler!=null){\n\t\t\ttry {\n\t\t\t\tMessage msg=handler.obtainMessage(timeupdate, new Date());\n\t\t\t\thandler.sendMessage(msg);\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public void run(){\n\tSystem.out.println(\"ServerListenerThread started!\");\n\t\t\t\twhile (parent.isWorking)\n\t\t\t\t{\n\n\t\t\t\t\tint t=0;\n\t\t\t\t\tString user = null,message=null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tt =Integer.parseInt(parent.inputStream.readLine());\n\t\t\t\t\t\tuser=parent.inputStream.readLine();\n\t\t\t\t\t\tmessage=parent.inputStream.readLine();\n\t\t\t\t\t\tif(t==MessageType.WILL)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\">\"+user+\" wants to play!\");\n\t\t\t\t\t\t\tparent.parent.addWaiter(parent,user);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(t==MessageType.PRIVATE || t==MessageType.MOVE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"Inside message from: \"+user);\n\t\t\t\t\t\t\tparent.parent.sendPlayed(t,user,message);\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\tparent.parent.sendMessage(t, user, message);\n\t\t\t\t\t\t\tif(!parent.socket.isConnected())break;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\n\t\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(\"Recevied a message from: \"+user+\": \"+message);\n\n\t\t\t\t}\n\t\t\t//END\n\t\t\tsynchronized(this)\n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\tparent.inputStream.close();\n\t\t\t\t\tparent.outputStream.close();\n\t\t \tparent.socket.close();\n\t\t \tSystem.out.println(\"ServerListenerThread closed!\");\n\t\t }\n\t\t catch (IOException e) {\n\t\t e.printStackTrace();\n\t\t }\n\t\t\t}\n}",
"public void run() {\r\n\r\n\t\tServerSocket serverSocket = null;\r\n\t\tSocket clientSocket = null;\r\n\r\n\t\tSystem.out.println(\"Creating ServerSocket...\");\r\n\r\n\t\ttry {\r\n\t\t\tserverSocket = new ServerSocket(this.listenerPort);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\twhile(true){\r\n\r\n\t\t\tSystem.out.println(LOG_TAG + \"waiting connection...\");\r\n\r\n\t\t\ttry {\r\n\t\t\t\tclientSocket = serverSocket.accept();\r\n\t\t\t\tString message = null;\r\n\r\n\t\t\t\tDataInputStream is = new DataInputStream(clientSocket.getInputStream());\r\n\t\t\t\tDataOutputStream os = new DataOutputStream(clientSocket.getOutputStream());\r\n\r\n\t\t\t\twhile(true){\r\n\r\n\t\t\t\t\tint current = 0;\r\n\t\t\t\t\tbyte[] buf = new byte[100000];\r\n\r\n\t\t\t\t\twhile (current < 1) {\r\n\r\n\t\t\t\t\t\tint reader = is.read(buf);\r\n\r\n\t\t\t\t\t\tif (reader != -1){\r\n\t\t\t\t\t\t\tmessage = new String(buf);\r\n\r\n\t\t\t\t\t\t\tcurrent++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tcheckIncomingMessage(message, os);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\tSystem.err.println(\"ClusterPeerListener InterruptedException\");\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tis.close();\r\n\t\t\t\t\tSystem.out.println(\"connection closed\");\r\n\t\t\t\t\tos.close();\r\n\t\t\t\t\tclientSocket.close();\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tSystem.err.println(\"Connection aborted\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}",
"public void run() {\r\n\t\ttry {\r\n\t\t\tListenForHandshakes();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void requestThread() {\n while (true) {\n long elapsedMillis = System.currentTimeMillis() - lastHeartbeatTime;\n long remainingMillis = heartbeatMillis - elapsedMillis;\n if (remainingMillis <= 0) {\n sendHeartbeats();\n } else {\n try {\n Thread.sleep(Math.max(remainingMillis, 3));\n } catch (InterruptedException e) {\n }\n }\n }\n }",
"public void run() {\n try {\n this.listener = new ServerSocket(port);\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n // On new connections, start a new thread to handle communications.\n try {\n while(true) {\n new Handler(this.listener.accept()).start();\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n this.listener.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"public void run() \n { \n String message; // String for incoming messages\n \n // listen for messages until stopped\n while ( keepListening ) \n { \n try \n { \n message = input.readLine(); // read message from client\n } // end try\n catch ( SocketTimeoutException socketTimeoutException ) \n {\n continue; // continue to next iteration to keep listening\n } // end catch\n catch ( IOException ioException ) \n {\n ioException.printStackTrace(); \n break;\n } // end catch\n\n // ensure non-null message\n if ( message != null ) \n {\n // tokenize message to retrieve user name and message body\n StringTokenizer tokenizer = new StringTokenizer( \n message, MESSAGE_SEPARATOR );\n\n // ignore messages that do not contain a user\n // name and message body\n if ( tokenizer.countTokens() == 2 ) \n {\n // send message to MessageListener\n messageListener.messageReceived( \n tokenizer.nextToken(), // user name\n tokenizer.nextToken() ); // message body\n } // end if\n else\n {\n // if disconnect message received, stop listening\n if ( message.equalsIgnoreCase(\n MESSAGE_SEPARATOR + DISCONNECT_STRING ) ) \n stopListening();\n } // end else\n } // end if\n } // end while \n \n try\n { \n input.close(); // close BufferedReader (also closes Socket)\n } // end try\n catch ( IOException ioException ) \n {\n ioException.printStackTrace(); \n } // end catch \n }",
"@Override\n\tpublic void run() {\n\n\t\tprogressivNumber++;\n\t\tStoRMStatus status = detective.haveaLook();\n\t\tstatus.setPulseNumber(progressivNumber);\n\t\tHEALTH_LOG.debug(\"*** HEARTHBEAT ***\");\n\t\tHEALTH_LOG.info(status.toString());\n\t}",
"public void run() {\n\t\t\t\t\tSystem.out.println(Thread.currentThread().getName()+\"准备。。。\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tp.await();//等待\n\t\t\t\t\t\tSystem.out.println(Thread.currentThread().getName()+\"已接受。。。\");\n\t\t\t\t\t\tThread.sleep((long)(Math.random()*10000));\n\t\t\t\t\t\tSystem.out.println(Thread.currentThread().getName()+\"完成。。。\");\n\t\t\t\t\t\ts.countDown();//三次后为0 释放主线程中的等待\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tbyte[] receive = new byte[1];\n\n\t\t\t\t\tDatagramSocket stopSocket = new DatagramSocket(35000);\n\t\t\t\t\tDatagramPacket stopPacket = new DatagramPacket(receive,\n\t\t\t\t\t\t\treceive.length);\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tstopSocket.receive(stopPacket);\n\t\t\t\t\t\ttalkingName.setText(\"\");\n\t\t\t\t\t\tif (iname != -1) {\n\t\t\t\t\t\t\tb[iname].setBackground(Color.BLUE);\n\t\t\t\t\t\t\tstatus = false;\n\t\t\t\t\t\t\tstatusPanel.repaint();\n\t\t\t\t\t\t\tre();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} catch (SocketException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"public void run() {\n\t\ttry {\n\t\t\tObjectInputStream in = new ObjectInputStream(socket.getInputStream());\n\t\t\treceivedPacket = (Packet) in.readObject();\n this.handleReceivedPacket(receivedPacket);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\tLOGGER.log(Level.INFO, \"Timer started\");\n\t\t\ttry {\n\t\t\t\tThread.sleep(TIMEOUT);\n\t\t\t\tif (gameCanStart()) {\n\t\t\t\t\tstartNewGame(players);\n\t\t\t\t} else {\n\t\t\t\t\tLOGGER.log(Level.INFO, \"No players available right now...\");\n\t\t\t\t}\n\t\t\t\tLOGGER.log(Level.INFO, \"Timer stopped\");\n\t\t\t\tactiveConnections = 0;\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// Non fa nulla, può essere interrotto\n\t\t\t\tLOGGER.log(Level.INFO, \"Timer interrupted\", e);\n\t\t\t}\n\t\t}",
"@Override\n public void run() {\n this.running.set(true);\n Socket socket = null;\n // if flag is set to listen, keep listening for client connection request and keep accepting connections\n while (this.running.get()) {\n try {\n if (connectionCount.get() < Constants.MAX_CLIENT_CONNECTIONS) {\n socket = serverSocket.accept();\n socket.setSoTimeout(30000); // timeout set to 30,000 ms\n socket.setKeepAlive(true);\n log.info(\"Connection Accepted: Local Add {} Remote Add {}\", socket.getLocalAddress(),\n socket.getRemoteSocketAddress());\n // add the connected socket to the list\n socketList.add(socket);\n // Pass the socket to the RequestHandler thread for processing\n IncomingMessageHandler messageHandler = new IncomingMessageHandler(socket, logWriter, fileWriterQueue,\n periodicReportingService, orderShutdown);\n messageHandler.start();\n connectionCount.getAndIncrement();// increment connection count\n log.debug(\"Current number of connections {}\", connectionCount.get());\n } else {\n if(maxConnWarnCount < 4) {\n log.warn(\"Reached maximum connection limit {}; Stopping to accept more client connections\"\n , connectionCount.get());\n maxConnWarnCount++;\n }\n }\n } catch (IOException e) {\n log.error(\"Error in accepting connections\", e);\n if (e instanceof SocketException) {\n log.error(\"SocketException for remote connection\");\n }\n }\n }\n }",
"@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tRecieveSocketOfClient(SocketForClient);\r\n\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}",
"public void run() {\n\t\t\twhile (running) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsocket = mmServerSocket.accept();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tbluetooth_show_message(\"Bluetooth Error! Accepting a connection failed. Reason:\" + e);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If a connection was accepted\r\n\t\t\t\t// Do work to manage the connection (in a separate thread)\r\n\t\t\t\tif (socket != null) {\r\n\t\t\t\t\t//System.out.println(\"=========> Bluetooth Connected as Server <===========\");\r\n\t\t\t\t\tdata_thread = new Data_Thread(socket);\r\n\t\t\t\t\tdata_thread.start();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tmmServerSocket.close();\r\n\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tbluetooth.this.server_connect_thread = null;\r\n\t\t}",
"@Override\n\t\t\t\tpublic void run() {\n\n\t\t\t\t\ttry{\n\t\t\t\t\t\tLog.d(\"Lavish\",\"Receive Thread running\");\n\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\trecSocket= new ServerSocket(5570);\n\t\t\t\t\t\t\n\t\t\t\t\twhile(runningFlag==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tclient_speak=recSocket.accept();\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 // connect to the server\n\t\t\t\t\t//final DataOutputStream rdos=new DataOutputStream(recSocket.getOutputStream());\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t rdis=new DataInputStream(client_speak.getInputStream());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tqueue=rdis.readUTF();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tLog.e(\"I Got\",\"Data:\"+queue);\n\t\t\t\t\t//Toast.makeText(gh.getApplicationContext(), \"Read kar liya\", Toast.LENGTH_LONG).show();\n\n\t\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t\t@SuppressWarnings(\"deprecation\")\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif((queue.equals(\"start_speaking\")))\n\t\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t\t\tispeak=1;\t\n\t\t\t\t\t\t\t\t\t\tLog.e(\"Inside got \",\"Data:\"+queue);\n\t\t\t\t\t\t\t\t\t\tqueuePos.setVisibility(View.GONE);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tstartsp.setVisibility(View.VISIBLE);\n\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\t\t/////// Notification starts//////////\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(isbackground==1)//&&AudioMainActivity.mainback==0){\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tNotificationManager NM=(NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\tNotification notify=new Notification(R.drawable.mic_logo_small,\"Classroom Interaction\",System.currentTimeMillis());\n\t\t\t\t\t\t\t\t\t\t\tnotify.flags |= Notification.FLAG_AUTO_CANCEL;\n\t\t\t\t\t\t\t\t\t\t\tIntent nmintent=new Intent(getApplicationContext(),DummyActivity.class);\n\t\t\t\t\t\t\t\t\t\t\t//nmintent.setAction(Intent.ACTION_MAIN);\n\t\t\t\t\t\t\t\t\t\t\t//nmintent.addCategory(Intent.CATEGORY_LAUNCHER);\n\t\t\t\t\t\t\t\t\t\t\tnmintent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);\n\t\t\t\t\t\t\t\t\t\t PendingIntent pending=PendingIntent.getActivity(getApplicationContext(),0, nmintent,0);\n\t\t\t\t\t\t\t\t\t\t notify.setLatestEventInfo(getApplicationContext(),\"Permission Granted\",\"Click to start speaking...\",pending);\n\t\t\t\t\t\t\t\t\t\t NM.notify(0, notify);\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\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//////////Notification ends///////\n\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\telse if(queue.equals(\"kick_you\"))\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\tispeak=0;\n\t\t\t\t\t\t\t\tLog.e(\"inside if\", \"inside if block\");\n\t\t\t\t\t\t\t\trunningFlag=0;\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\trecSocket.close();\n\t\t\t\t\t\t\t\t\tLog.e(\"closing\", \"socket closed\");\n\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tLog.e(\"Inside got \",\"Data:\"+queue);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(as!=null)\n\t\t\t \t\t\t\t\t\t{as.onWithdrawPress();\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\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\tfinal Dialog dialog = new Dialog(context);\n\t\t\t\t\t\t\t\t\tdialog.setContentView(R.layout.kickdialog);\n\t\t\t\t\t\t\t\t\tdialog.setTitle(\"OOOPS...\");\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t// set the custom dialog components - text, image and button\n\t\t\t\t\t\t\t\t\tTextView text = (TextView) dialog.findViewById(R.id.kicktext);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tButton dialogButton = (Button) dialog.findViewById(R.id.kickok);\n\t\t\t\t\t\t\t\t\t// if button is clicked, close the custom dialog\n\t\t\t\t\t\t\t\t\tdialogButton.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t\t\t\tfinish();\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 \n\t\t\t\t\t\t\t\t\tdialog.show();\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}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tLog.e(\"inside else\", \"inside else block\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\tLog.e(\"Inside got \",\"Data:\"+queue);\n\t\t\t\t\t\t\t\t\tqueuePos.setText(\"Your position is \"+queue);\n\t\t\t\t\t\t\t\t\tstartsp.setVisibility(View.GONE);\n\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\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\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}\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\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\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcatch(Exception e)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(e.toString());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfinally\n\t\t\t\t\t{\n\t\t\t\t\t\tLog.e(\"INSIDE FINALLY\",\"HURRAYYYY\");\n\t\t\t\t\t\t//finish();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void run() {\n if (timerValidFlag)\n gSeconds++;\n Message message = new Message();\n message.what = 1;\n handler.sendMessage(message);\n }",
"public void run() {\n\t\tInputStream istream = null;\n\t\ttry {\n\t\t\tistream = (this.socket).getInputStream();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t DataInputStream dstream = new DataInputStream(istream);\n\t \n\t username = null;\n\t try {\n\t \tusername = dstream.readLine();\n\t \tSystem.out.println(username + \" on server side! (username)\");\n\t \tthis.masterServer.addUserName(username);\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 // pause thread to read in from client.\n\t\tString friendUsername = null;\n\t try {\n\t \tfriendUsername = dstream.readLine();\n\t \tSystem.out.println(friendUsername + \" on server side!!!!! (friendUsername)\");\n\t \tfindFriendsThread(friendUsername);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t try {\n\t\t\tdstream.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t try {\n\t\t\tistream.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t //this.masterServer.addUserName(username);\n\t \n\t}",
"@Override\n\tpublic void run() {\n\t\tL = new Listener(this.port);\n\t\tthis.listener = new Thread(L);\n\t\tthis.listener.start();\n\n\t\twhile (true) {\n\t\t\twhile (this.workQueue.isEmpty()) {\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(10);\n\t\t\t\t} catch (InterruptedException 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\tClientRequest req = this.workQueue.poll();\n\t\t\tif (req.getType() == ClientRequestType.START) {\n\t\t\t\tsynchronized (nextWorkerLock) {\n\t\t\t\t\tthis.workers[this.nextWorker++].sendToWorker(req);\n\t\t\t\t\tthis.nextWorker %= this.workers.length;\n\t\t\t\t}\n\t\t\t} else if (req.getType() == ClientRequestType.KILLALL) {\n\t\t\t\tfor (WorkerInfo wi : workers) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\twi.sendControlMessage(new ProcessControlMessage(0,\n\t\t\t\t\t\t\t\tProcessControlCommand.KILLALL, \"\"));\n\t\t\t\t\t\tSystem.out.println(\"Killed one\");\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tSystem.exit(0);\n\t\t\t} else {\n\t\t\t\tpidsToWorkers.get(req.getProcessId()).sendToWorker(req);\n\t\t\t}\n\t\t}\n\t}",
"public void run()\r\n/* 49: */ {\r\n/* 50:170 */ if (!TrafficCounter.this.monitorActive) {\r\n/* 51:171 */ return;\r\n/* 52: */ }\r\n/* 53:173 */ TrafficCounter.this.resetAccounting(TrafficCounter.milliSecondFromNano());\r\n/* 54:174 */ if (TrafficCounter.this.trafficShapingHandler != null) {\r\n/* 55:175 */ TrafficCounter.this.trafficShapingHandler.doAccounting(TrafficCounter.this);\r\n/* 56: */ }\r\n/* 57:177 */ TrafficCounter.this.scheduledFuture = TrafficCounter.this.executor.schedule(this, TrafficCounter.this.checkInterval.get(), TimeUnit.MILLISECONDS);\r\n/* 58: */ }",
"@Override\n public void run() {\n\n startPingTimer();\n String read = \"\";\n\n try {\n while ((read = in.readLine()) != null){\n\n //System.out.println(\"[CLIENT] Received: \" + read);\n messageHandler(read);\n\n }\n closeConnection();\n\n }catch (IOException e){\n\n System.out.println(\"[CLIENT] \" + e.getMessage());\n System.out.println(\"[CLIENT] Connection closed.\");\n\n }\n\n }",
"public void run() {\n // System.out.println(\"bsid\\tiid\\tid\\tmethod name\");\n\n while (true) {\n // get interaction\n Hashtable<Integer, ArrayList<Request>> interaction = father\n .getInteraction();\n\n if (interaction == null) {\n break;\n }\n\n // execute interaction\n executeInteraction(interaction);\n if (reqIndex >= maxNoOfRequests)\n break;\n }\n\n // System.out.println(\"Thread \" + threadId + \" is ending\");\n father.replayFinished();\n }",
"@Override\r\n\t\tpublic void run() {\n\t\t\twhile(bLinked &&!isExit()){\r\n\t\t\t\tLog.d(\"123\", \"set heart beat threadid:\"+Thread.currentThread().getId());\r\n\t\t\t\tjni.talkSetHeartBeat();\r\n\t\t\t\tif(jni.talkGetRegisterState()!=1 ){\r\n\t\t\t\t\tLog.e(\"123\", \"心跳停止了\");\r\n\t\t\t\t\tbLinked = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbLinked = true;\r\n\t\t\t\t}\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(interval*1000);\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!bLinked){\r\n\t\t\t\thandler.sendEmptyMessage(MSG_NOT_LINK);\r\n\t\t\t}\r\n\t\t\theartThread = null;\r\n\t\t\tsuper.run();\r\n\t\t}",
"@Override\r\n public void run() {\r\n while (b) {\r\n String message = checkServerOnOutageStatus();\r\n if (message != null) {\r\n logger.info(\"Server \" + serverName + \" --->Status ---> \" + message);\r\n } else {\r\n logger.info(\"Server Running ==> \" + serverName + \"--- port --> \" + serverSocket.getLocalPort());\r\n }\r\n try {\r\n sleep(1000);\r\n } catch (InterruptedException e) {\r\n System.out.println(e);\r\n }\r\n }\r\n }",
"public void run()\n {\n try {\n clientSocket = serverSocket.accept();\n System.out.println(\"Client connected.\");\n clientOutputStream = new PrintWriter(clientSocket.getOutputStream(), true);\n clientInputStream = new BufferedReader( new InputStreamReader(clientSocket.getInputStream()));\n\n while(isRunning)\n {\n try {\n serverTick(clientSocket, clientOutputStream, clientInputStream);\n } catch (java.net.SocketException e)\n {\n //System.out.println(\"Network.Client closed connection. Ending server\");\n this.closeServer();\n }\n }\n } catch (Exception e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n\n /***Legacy Code for allowing multiple users. No point in spending time implementing\n * When this is just suppose to be one way communication\n\n try {\n acceptClients.join();\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n closeServer();\n */ }",
"@Override\r\n\tpublic void run() {\n\t\trunClient();\r\n\t}",
"@Override\n\tpublic void run() {\n\t\trespond();\n\t\tlisten();\n\t}",
"@Override\n\tpublic void run() {\n\t\tsuper.run();\n\n\t\twhile (onWork) {\n\n\t\t\tswitch (state) {\n\t\t\tcase connect:\n\t\t\t\tconnect();\n\t\t\t\tbreak;\n\t\t\tcase running:\n\t\t\t\treceiveMsg();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t}",
"@Override\n\tpublic void run() {\n\n\t\tServerSocket sSocket;\n\t\ttry {\n\t\t\tsSocket = new ServerSocket(15001);\n\t\t\tSystem.out.println(\"server listening at \" + sSocket.getLocalPort());\n\t\t\twhile (true) {\n\t\t\t\t// this is an unique socket for each client\n\t\t\t\tSocket socket = sSocket.accept();\n\t\t\t\tSystem.out.println(\"Client with port number: \" + socket.getPort() + \" is connected\");\n\t\t\t\t// start a new thread for handling requests from the client\n\t\t\t\tClientRequestHandler requestHandler = new ClientRequestHandler(sketcher, socket, scene, playerMap);\n\t\t\t\tnew Thread(requestHandler).start();\n\t\t\t\t// start a new thread for handling responses for the client\n\t\t\t\tClientResponseHandler responseHandler = new ClientResponseHandler(socket, scene, playerMap);\n\t\t\t\tnew Thread(responseHandler).start();\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t}\n\t}",
"public void run() {\n\t\t\tPrintWriter out = null;\n\t\t\ttry {\n\n\t\t\t\t/*\n\t\t\t\t * byte[] buf = new byte[2048]; DatagramPacket packet = new\n\t\t\t\t * DatagramPacket(buf, buf.length);\n\t\t\t\t * System.out.print(\"Server: Receiving\\n\");\n\t\t\t\t * incomingUDP.receive(packet);\n\t\t\t\t * \n\t\t\t\t * System.out.print(\"Receiving successful packet with :\" +\n\t\t\t\t * packet.getLength() + \"kb\");\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tout = new PrintWriter(new OutputStreamWriter(\n\t\t\t\t\t\tincoming.getOutputStream()));\n\n\t\t\t\t// inform the server of this new client\n\t\t\t\tServerNMS.this.addClient(out);\n\n\t\t\t\tout.print(\"Welcome to AndyChat! \");\n\t\t\t\tout.println(\"Enter BYE to exit.\");\n\t\t\t\tout.flush();\n\n\t\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\tincoming.getInputStream()));\n\t\t\t\tfor (;;) {\n\t\t\t\t\tString msg = in.readLine();\n\t\t\t\t\tif (msg == null) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (msg.trim().equals(\"BYE\"))\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tSystem.out.println(\"Received: \" + msg\n\t\t\t\t\t\t\t\t+ \"With size is: \" + msg.getBytes().length\n\t\t\t\t\t\t\t\t+ \"bytes\");\n\t\t\t\t\t\t// broadcast the receive message\n\t\t\t\t\t\tServerNMS.this.broadcast(msg);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tincoming.close();\n\n\t\t\t\tServerNMS.this.removeClient(out);\n\t\t\t} catch (Exception e) {\n\t\t\t\tif (out != null) {\n\t\t\t\t\tServerNMS.this.removeClient(out);\n\t\t\t\t}\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"public void run() {\r\n String request = \"\";\r\n\r\n try {\r\n /**\r\n * The ClientConnectionHandler constantly waits for requests from the client. Requests are the initial message\r\n * that the client sends. This initial message determines how the server receives the messages that come after\r\n * it (if there are any).\r\n */\r\n while (isOpen) {\r\n request = readMessage();\r\n processRequest(request);\r\n }\r\n clientSocket.close();\r\n System.out.println(\"Client #\" + clientNumber + \" has closed\");\r\n } catch (Exception e) {}\r\n }",
"public void run() {\n\t\t// TODO Auto-generated method stub\n\t\twhile(true){\n\t\t\t\n\t\t\tif (DEBUG){\n\t\t\t\tSystem.out.println(\"Server_thread\");\n\t\t\t}\n\t\t\t\n\t\t\ttry{\t\n\t\t\t\trun_list.add(new ClientHandler(serversocket.accept()));\n\t\t\t\tnew Thread (run_list.get(run_list.size()-1)).start();;\n\t\t\t\n\t\t\t\n\t\t}\t\n\t\tcatch (IOException ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\ttry{\n\t\t\tThread.sleep(10);\n\t\t}\n\t\tcatch (InterruptedException ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void run() {\n\t\tif (FrameworkHandler.DEBUG_MODE){\n\t\t\tString strType = \"\";\n\t\t\tif (type == RULE_CONNECTION) strType = \"New RemoteRule Listener\";\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(strType + \" LISTENING on port: \" + listeningSocket.getLocalPort());\n\t\t}\n\t\ttry {\n\t\t\twhile (running) {\n\t\t\t\tSocket newSocket = listeningSocket.accept();\n\t\t\t\t\n\t\t\t\tif (FrameworkHandler.DEBUG_MODE)\n\t\t\t\t\tSystem.out.println(\"New request obtained on \" + newSocket.getPort() + \"|\" + newSocket.getLocalPort());\n\t\t\t\t\n\t\t\t\tcreateNewConnection(newSocket);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tFrameworkHandler.exceptionLog(FrameworkHandler.LOG_ERROR, this, e);\n\t\t}\n\t}",
"public void run() {\n try {\n BufferedReader serverInput = new BufferedReader(\n new InputStreamReader(connectionSock.getInputStream()));\n while (running) {\n // Get data sent from the server\n String serverText = serverInput.readLine();\n if (serverInput != null) {\n //System.out.println(\"CLIENT DEBUG: \" + serverText);\n parseResponse(serverText);\n }\n }\n } catch (Exception e) {\n System.out.println(\"Error: \" + e.toString());\n }\n }",
"public void run() {\n\n // Attempt to connect and exit the thread if it failed\n try {\n connect();\n sendToReadHandler(\"CONNECTED\");\n } catch (Exception e) {\n Log.e(TAG, \"Failed to connect!\", e);\n sendToReadHandler(\"CONNECTION FAILED\");\n disconnect();\n return;\n }\n\n // Loop continuously, reading data, until thread.interrupt() is called\n while (!this.isInterrupted()) {\n\n // Make sure things haven't gone wrong\n if ((inStream == null) || (outStream == null)) {\n Log.e(TAG, \"Lost bluetooth connection!\");\n break;\n }\n\n // Read data and add it to the buffer\n String s = read();\n if (s.length() > 0)\n rx_buffer += s;\n\n // Look for complete messages\n parseMessages();\n }\n\n // If thread is interrupted, close connections\n disconnect();\n sendToReadHandler(\"DISCONNECTED\");\n }",
"public void run(){\n\n\t\t/*\n\t\t* Keep on reading from the socket till we receive from the\n\t\t* server. Once we received that then we want to break.\n\t\t*/\n\t\tString responseLine;\n\t\ttry{\n\t\t\twhile((responseLine = is.readLine()) != null){\n\t\t\t\tSystem.out.println(responseLine);\n\t\t\t\tif(responseLine.indexOf( \"* * * Bye \") != -1){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosed = true;\n\t\t}\n\t\tcatch(IOException e){\n\t\t\tSystem.err.println(\"IOException : \" + e);\n\t\t}\n\t}",
"public void run() {\n\t\t\twhile (running || !messages_to_send.isEmpty()) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsend();\r\n\t\t\t\t\tread();\r\n\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tbluetooth_show_message(\"Error! Sending or Reading failed. Reason: \" + e);\r\n\t\t\t\t\tcancel();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tsocket.close();\r\n\t\t\t} catch(IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}",
"public void run() {\n try {\n while (!socket.isClosed()) {\n Message message = socket.receiveMessage();\n if (message != null) {\n logger.info(\"Received: \" + message);\n socket.sendMessage(message);\n logger.info(\"Sent: \" + message);\n } else {\n // Close socket if no messages were received.\n // NOTE: This is a simplifying assumption that no messages means the client has been shutdown\n // and the application lifecyle has come to an end. Otherwise a shutdown message should be\n // detected and handled accordingly.\n socket.close();\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n executorService.shutdown();\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tLog.e(\"timer\",\"calling\");\n\t\t\t\tMessage message = mHandler.obtainMessage();\n\t\t\t\tmessage.sendToTarget();\n\n\t\t\t}",
"public void run()\n\t{\n\t\twhile (!this.isFinished)\n\t\t{\n\t\t\tMessage request = this.mBuff.get(); // get request from own mailbox\n\n\t\t\t// how many times has the follower danced with the requester.\n\t\t\t// might be faster with an array of timesDanced values for each leader known\n\t\t\tint count = 0;\n\t\t\tfor (int i=0; i<mDanceCard.length; i++)\n\t\t\t{\n\t\t\t\tif (mDanceCard[i] == request.dancer.getDancerID())\n\t\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(mNumber + \" Being asked to dance: \" + request.dance_number + \" by \" \n\t\t\t//\t\t\t\t\t+ request.dancer.getDancerID());\n\n\t\t\tLeader leader = (Leader)request.dancer;\n\t\t\tif (mDanceCard[request.dance_number] != 0 || count >= 2) // nope.\n\t\t\t{\n\t\t\t\trequest.dance_number = -1;\n\t\t\t\tthis.put(request, leader); \t// send back request with -1 for dance_number\n\t\t\t}\n\t\t\telse // say yes! mark card and see if you're done\n\t\t\t{\n\t\t\t\tthis.markCard(request.dance_number, request.dancer.getDancerID());\n\t\t\t\trequest.dancer = this;\n\t\t\t\tthis.put(request, leader);\t// send back request, but with the follower's own number\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\"Follower \" + mNumber + \" is finished.\");\n\t\t\n\t\t// still check requests, but refuse them all.\n\t\twhile (this.isFinished)\n\t\t{\n\t\t\tMessage request = this.mBuff.get();\n\n\t\t\tLeader leader = (Leader)request.dancer;\n\t\t\trequest.dance_number = -1;\n\t\t\tthis.put(request, leader);\n\t\t}\n\t}",
"public void run(){\n long startTime = System.nanoTime();\n long elapsedTime = System.nanoTime() - startTime;\n while(elapsedTime<500000000 && p.acknowledged == false){\n //echo(\"Waiting\");\n elapsedTime = System.nanoTime() - startTime;\n if(p.acknowledged == true){\n return;\n }\n }\n if(elapsedTime>= 500000000)\n {\n p.timed = true;\n //System.out.println(\"thread timed out at packet \"+ p.getSeq());\n for(int i=p.getSeq(); i<p.getSeq()+window; i++){\n if(i<packets.size()){\n packets.get(i).sent = false;\n }\n }\n //p.sent = false;\n }\n\n\n }",
"public void run() {\n\t\t\t// Add the loop back to the handler\n\t\t\thandler.postDelayed(this, LoopTimeSeparation);\n\t\t\t\n\t\t\t// If we have a bound\n\t\t\tif(mBound == true ) {\n\t\t\t\t// See if service has anything to tell us\n\t\t\t\tArrayList<Message> queue = mService.getMessageQueue();\n\t\t\t\tint c = mService.getConnectedStatus();\n\t\t\t\tconnectedVisible( c != NOT_CONNECTED );\n\t\t\t\t\t\n\t\t\t\tif( queue != null ) {\n\t\t\t\t\tdisplayMessages( queue );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tArrayList<Message> q = new ArrayList<Message>();\n\t\t\t\tq.add(new Message(getString(R.string.MESSAGE_lostconeectiontoservice), \"warning\"));\n\t\t\t\tdisplayMessages(q);\n\t\t\t\tdoBindService();\n\t\t\t}\n\t\t}",
"@Override\n\tpublic void run() {\n\n\t\treceiveClients();\n\n\t\tbeginLogging();\n\t}",
"@Override\n\t\t\t\tpublic void run() {\n//\t\t\t\t\t\n//\t\t\t\t\tSystem.out.printf(\"Ausgangs-Puffer: \");\n//\t\t\t\t\tfor(int i=0; i<Message.length; i++)\tSystem.out.printf(\"0x%02X \", eeipClient.O_T_IOData[i]);\n//\t\t\t\t\tSystem.out.printf(\"\\n\\n\");\n\t\t\t\t\tk++;\n\t\t\t\t\t\n\t\t\t\t\tif(k>=10) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\teeipClient.ForwardClose();\n\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\ttimerflag1=false;\n\t\t\t\t\t\tstatus_write=true;\n\t\t\t\t\t\tstate=3;\n\t\t\t\t\t\tk=0;\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}",
"public void run() {\n\t\t\tSystem.err.println(\"inside run\");\n//\t\t byte[] tmp=new byte[1024];\n\t\t\t\n//\t\t\ttry {\n//\t\t\t\twhile(in.available()>0){\n//\t\t\t int i=in.read(tmp, 0, 1024);\n//\t\t\t System.out.print(new String(tmp, 0, i));\n//\t\t\t }\n//\t\t\t} catch (IOException e1) {\n//\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\te1.printStackTrace();\n//\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n//\t\t\ttry {\n//\t\t\t\treceive = read.readLine();\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}\n//\t\t\tSystem.err.println(receive);\n\t\t\tif (receive != null) {\n\t\t\t\t// message.setText(receive);\n\t\t\t\tSystem.err.println(receive);\n\t\t\t\tMessages m = new Messages();\n\t\t\t\tint msgType = m.AnalyseMgetChargetCharsg(receive);\n\t\t\t\tswitch (msgType) {\n\t\t\t\tcase 0:\n\t\t\t\t\treturn;\n\t\t\t\tcase 1:\n\t\t\t\tcase 2:\n\t\t\t\t\tSharedPreferences preferences = getSharedPreferences(\n\t\t\t\t\t\t\t\"FANCY\", 0);\n\t\t\t\t\tEditor editor = preferences.edit();\n\t\t\t\t\teditor.putInt(\"current_state\", m.Getrun());\n\t\t\t\t\teditor.commit();\n\t\t\t\t\tif (m.Getrun() == 0)\n\t\t\t\t\t\tisRunning = false;\n\t\t\t\t\telse\n\t\t\t\t\t\tisRunning = true;\n\t\t\t\t\tupdateControl();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tint settingId = m.Getid();\n\t\t\t\t\tdouble temperature = m.Gettem();\n\t\t\t\t\tint totalRunTime = m.Gettime();\n\t\t\t\t\tint fanSpeed = m.Getfan();\n\t\t\t\t\tsetState(m.Getrun(), settingId, temperature, totalRunTime,\n\t\t\t\t\t\t\tfanSpeed);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\ttemperature = m.Getcurtem();\n\t\t\t\t\tint currentRunTime = m.Getcurtime();\n\t\t\t\t\tint exist = m.Getexist();\n\t\t\t\t\tstatusUpdate(temperature, currentRunTime,\n\t\t\t\t\t\t\t(exist == 0) ? false : true);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tPattern p = Pattern.compile(\"\\\\s(\\\\d+\\\\.*\\\\d*)\\\\s\");\n\t\t\t\tMatcher matcher = p.matcher(receive);\n\t\t\t\tString result = null;\n\t\t\t\tif (matcher.find()) {\n\t\t\t\t\tresult = matcher.group(1);\n\t\t\t\t\tSystem.out.println(result);\n\t\t\t\t}\n\t\t\t\tif (result != null) {\n\t\t\t\t\ttimeSeries.add(new Date(), Double.valueOf(result));\n\t\t\t\t\tview.repaint();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}",
"@Override\r\n\tpublic void run() {\r\n\t\ttry {\r\n\t\t\tthis.inputStream = socket.getInputStream();\r\n\t\t\tthis.outputStream = socket.getOutputStream();\r\n\t\t\t// Get the peer that is asking me for fragments.\r\n\t\t\tpeerState = torrentClient.getPeerStateList().getByAddress(\r\n\t\t\t\t\tsocket.getInetAddress().getHostAddress(), socket.getPort());\r\n\t\t\t// read handhake\r\n\t\t\tbyte[] received = new byte[68];\r\n\t\t\tinputStream.read(received);\r\n\t\t\t//Parse the handshake received\r\n\t\t\tHandsake handshakeMessage = Handsake\r\n\t\t\t\t\t.parseStringToHandsake(new String(received));\r\n\t\t\t// validate hash\r\n\t\t\tString torrentHash = new String(torrentClient.getMetainf()\r\n\t\t\t\t\t.getInfo().getInfoHash());\r\n\t\t\t//if the received handshake is correct send my handshake\r\n\t\t\tif (Handsake.isValidHandsakeForBitTorrentProtocol(handshakeMessage,\r\n\t\t\t\t\ttorrentHash)) {\r\n\t\t\t\t// send handshake\r\n\t\t\t\tHandsake handShakeToSend = new Handsake(torrentHash,\r\n\t\t\t\t\t\tthis.torrentClient.getPeerId());\r\n\t\t\t\tthis.outputStream.write(handShakeToSend.getBytes());\r\n\t\t\t\t// enviar bitfield\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.sendBitfield();\r\n\t\t\t\t\t// leer\r\n\t\t\t\t\tPeerProtocolMessage message = this.readNormalMessage();\r\n\t\t\t\t\t// Check if I have received an interested message\r\n\t\t\t\t\tif (message.getType().equals(\r\n\t\t\t\t\t\t\tPeerProtocolMessage.Type.INTERESTED)) {\r\n\t\t\t\t\t\tif (this.peerState != null) {\r\n\t\t\t\t\t\t\tpeerState = torrentClient.getPeerStateList()\r\n\t\t\t\t\t\t\t\t\t.getByAddress(\r\n\t\t\t\t\t\t\t\t\t\t\tsocket.getInetAddress()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getHostAddress(),\r\n\t\t\t\t\t\t\t\t\t\t\tsocket.getPort());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//Set the peer status\r\n\t\t\t\t\t\tif (this.peerState != null) {\r\n\t\t\t\t\t\t\tthis.peerState.setPeer_interested(true);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// send unchoke to the peer\r\n\t\t\t\t\t\tthis.outputStream.write(new UnChokeMsg().getBytes());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//set the peer status\r\n\t\t\t\t\t\tif (this.peerState != null) {\r\n\t\t\t\t\t\t\tthis.peerState.setAm_choking(false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Continue receiveing messages if the message type is Keep_alive, Request or Have.\r\n\t\t\t\t\t\tboolean continueReading = true;\r\n\t\t\t\t\t\twhile (continueReading) {\r\n\t\t\t\t\t\t\tmessage = this.readNormalMessage();\r\n\t\t\t\t\t\t\tcontinueReading = processMessage(message);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// if I have not received interested send unchoke\r\n\t\t\t\t\t\tthis.outputStream.write(new ChokeMsg().getBytes());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} catch (IOException ioe) {\r\n\t\t\t\t\tioe.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// close connection\r\n\t\t\tthis.inputStream.close();\r\n\t\t\tthis.outputStream.close();\r\n\t\t\tsocket.close();\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\tSystem.out.println(\"Sending thread closed\");\r\n\t\t\te.printStackTrace();\r\n\t\t\ttry {\r\n\t\t\t\tthis.inputStream.close();\r\n\t\t\t\tthis.outputStream.close();\r\n\t\t\t\tsocket.close();\r\n\t\t\t} catch (IOException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\t\t\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tinitBroadCastClient();\n\t\t\t\t\t\t\t\t\tReceivePublicKey();\n\t\t\t\t\t\t\t\t\tReceiveEncryptPrice();\n\t\t\t\t\t\t\t\t\tgenerateEProduct();\n\t\t\t\t\t\t\t\t\tsendEProduct();\n\t\t\t\t\t\t\t\t\tGarbleCircuits();\n\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}",
"public void run(){\n\t\t\tObjectReader readerClient = new ObjectReader(in, clientInetAddress);\r\n\t\t\treaderClient.start();\r\n\t\t\t\r\n\t\t\t// Constantly checks msgToSend for messages and sends them\r\n\t\t\twhile(true){\r\n\t\t\t\ttry{\r\n\t\t\t\t\t// Send message\r\n\t\t\t\t\tif(msgToSend.length() != 0){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tout.writeObject(new DataObject(DataObject.STRING, msgToSend.toString()));\r\n\t\t\t\t\t\tout.flush();\r\n\t\t\t\t\t\tmsgToSend.setLength(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tcatch(IOException ioe){\r\n\t\t\t\t\tioe.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tfileparser(configPath, identifier);\n\t\t\tinivclock(number_of_nodes);\n\t\t\tstate = type;\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\trunServer(hostname,port);\n\t\tterminated=false;\n\t\tif(identifier == 0){\n\t\t\tinivfinish();\n\t\t\tsnapshot s = new snapshot(neighborlist,snapshotDelay,all_nodes);\n\t\t\tThread t1 = new Thread(s);\n\t\t\tt1.start();\n\t\t\tif(type == \"active\"){\n\t\t\t\ttry {\n\t\t\t\t\trunActive();\n\t\t\t\t} catch (InterruptedException 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\telse if(type == \"passive\"){\n\t\t\t\ttry {\n\t\t\t\t\trunPassive();\n\t\t\t\t} catch (InterruptedException 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\t\n\t\t}\n\t\telse if(identifier != 0){\n\t\tif(type == \"active\"){\n\t\t\ttry {\n\t\t\t\trunActive();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse if(type == \"passive\"){\n\t\t\ttry {\n\t\t\t\trunPassive();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t}\n\t}",
"private void run() throws IOException {\n\n Socket socket = new Socket(\"localhost\", 8678);\n in = new BufferedReader(new InputStreamReader(\n socket.getInputStream()));\n\n // Process all messages from server, according to the protocol.\n\n while (true) {\n String line = in.readLine();\n if (line.startsWith(\"SUBMIT\")) {\n new MessageThread(socket).start();\n }\n else if (line.startsWith(\"NAMEACCEPTED\")) {\n System.out.println(\"Success\");;\n } else if (line.startsWith(\"MESSAGE\")) {\n System.out.println(line);\n }\n }\n }",
"@Override\n public void run() {\n UpnpService upnpService = new UpnpServiceImpl(listener);\n\n // Send a search message to all devices and services, they should respond soon\n upnpService.getControlPoint().search(new STAllHeader());\n\n // Let's wait 10 seconds for them to respond\n// System.out.println(\"Waiting 10 seconds before shutting down...\");\n try {\n Thread.sleep(10000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n // Release all resources and advertise BYEBYE to other UPnP devices\n// System.out.println(\"Stopping Cling...\");\n upnpService.shutdown();\n\n\n }",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlong nowTime = System.currentTimeMillis();\n\t\t\t\t\t//Logger.debug(\"测试主动回答线程================================系统时间\" + nowTime);\n\t\t\t\t\tif (nowTime - mIStartTime <= timeNum + 1000 && nowTime - mIStartTime >= timeNum) {\n\t\t\t\t\t\tmICount++;\n\t\t\t\t\t\tcall.OnEnd();\n\t\t\t\t\t\tsetStartTime(nowTime);\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t}\n\t\t\t\t}",
"public void run() {\n\t\tMisc.log(\"Server waiting for client...\");\r\n\r\n\t\ttry {\r\n\t\t\tserver = socket.accept();\r\n\t\t\tMisc.log(server.getRemoteSocketAddress() + \" has connected.\");\r\n\t\t\t\r\n\t\t\t//get the input and output streams which are used to send and receive messages from the client\r\n\t\t\tin = new DataInputStream(server.getInputStream());\r\n\t\t\tout = new DataOutputStream(server.getOutputStream());\r\n\t\t\t\r\n\t\t\t//send host's username to the connected client by creating a hello packet with the username\r\n\t\t\tsendData(new HelloPacket(serverHost.getUsername()).getData());\r\n\t\t\t\r\n\t\t} catch(IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//server is listening until the serverRunning flag is set to false\r\n\t\twhile(serverRunning) {\t\t\t\r\n\t\t\t//construct packet object to save received data into\r\n\t\t\tbyte[] data = new byte[1024];\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t//wait to receive a packet\r\n\t\t\t\tin.read(data);\r\n\t\t\t\t//handle packet\r\n\t\t\t\tpacketHandler.handlePacket(data);\r\n\t\t\t} catch(Exception e) {\r\n\t\t\t\tMisc.log(\"Exception in server.\");\r\n\t\t\t\tserverRunning = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//we are done and it has been requested that the server turns off\r\n\t\tcloseServer();\r\n\t\t\r\n\t\t//end of thread\r\n\t}",
"public void run() {\n\t\twhile (true) {\n\t\t\tOverlayNodeSendsData relayMsg;\n\t\t\tsynchronized (relayQueue) {\n\t\t\t\trelayMsg = relayQueue.poll();\n\t\t\t}\n\t\t\tif (relayMsg != null) {\n\t\t\t\ttry {\n\t\t\t\t\tbyte[] bytesToSend = relayMsg.getBytes();\n\t\t\t\t\t// send the bytes through the appropriate TCPSender\n\t\t\t\t\tnodesToSendTo.getConnections()\n\t\t\t\t\t\t\t.get(relayPayloadDestination(relayMsg)).getSender()\n\t\t\t\t\t\t\t.sendData(bytesToSend);\n\t\t\t\t\t// Increment the relay counter\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\tbyte[] data = new byte[1024];\n\t\t\tByteBuffer buffer = ByteBuffer.allocate(2048);\n\n\t\t\ttry {\n\t\t\t\twhile(!isInterrupted()) {\n\t\t\t\t\tDatagramPacket packet = new DatagramPacket(data, data.length);\n\t\t\t\t\tUDPSocket.receive(packet);\n\n\t\t\t\t\tcheckPacket(buffer, data, packet.getLength());\n\t\t\t\t}\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\tif(!UDPSocket.isClosed()) {\n\t\t\t\t\tUDPSocket.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tLog.v(TAG, \"udp read Thread exit\");\n\t\t}",
"public void run() {\n try {\n // accepts the connection request.\n SelectableChannel peerHandle = this._handle.accept();\n if (peerHandle != null) {\n // now, create a service handler object to serve the\n // the client.\n ServiceHandler handler =\n this._factory.createServiceHandler(\n this._reactor,\n peerHandle);\n if (handler != null)\n // give the service handler object a chance to initialize itself.\n handler.open();\n }\n } catch (IOException ex) {\n MDMS.ERROR(ex.getMessage());\n }\n }",
"public void run() {\n try {\n String receivedMessage = \"\";\n \t\twhile (!receivedMessage.startsWith(this.PSEUDO+\" left.\")) {\n \n byte[] buf = new byte[256];\n DatagramPacket packet = new DatagramPacket(buf, buf.length);\n \n clientSocket.receive(packet);\n receivedMessage = new String(packet.getData(), packet.getOffset(), packet.getLength());\n\n conversation.append(receivedMessage + \"\\n\");\n\n \t\t}\n \t\tSystem.exit(0);\n\n \t} catch (Exception e) {\n \tSystem.err.println(\"Error in ReceptionClientThread:\" + e); \n }\n }",
"public void run() {\n readFromClient();\n }",
"public void run() {\n\t\tDate curTime;\n\t\twhile(true) {\n\t\t\tcurTime = new Date();\n\t\t\t\n\t\t\t//System.out.println(\"currentTime: \"+ curTime.getTime() +\" prevTime: \"+ _prevPingRequestTime.getTime() +\" diff: \" + (curTime.getTime() - _prevPingRequestTime.getTime()) +\" interval: \"+ _scsynthPingInterval);\n\n\t\t\t//if the previous status request is still pending...\n\t\t\tif (_serverLive && (_prevPingRequestTime.getTime() > _prevPingResponseTime.getTime())) {\n\t\t\t\t//We've not yet heard back from the previous status request.\n\t\t\t\t//Have we timed out?\n\t\t\t\tif (curTime.getTime() - _prevPingRequestTime.getTime() > _serverResponseTimeout) {\n\t\t\t\t\t//We've timed out on the previous status request.\n\t\t\t\t\tSystem.out.println(\"Timed out on previous status request.\");\n\n\t\t\t\t\tif (_notifyListener != null) {\n\t\t\t\t\t\t_notifyListener.receiveNotification_ServerStopped();\n\t\t\t\t\t}\n\t\t\t\t\tif (_controlPanel != null && _controlPanel._statsDisplay != null) {\n\t\t\t\t\t\t_controlPanel._statsDisplay.receiveNotification_ServerStopped();\n\t\t\t\t\t\t_scsclogger.receiveNotification_ServerStopped();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\t_serverLive = false;\n\t\t\t\t\t_serverBooted = false;\n\t\t\t\t}\n\t\t\t\t//else we just keep waiting for a response or a timeout\n\t\t\t}\n\t\t\t//the previous status request is NOT still pending. Is it time to send another?\n\t\t\telse if (curTime.getTime() - _prevPingRequestTime.getTime() > _scsynthPingInterval) {\n\t\t\t\t//It's time to send another status request.\n\t\t\t\t\n\t\t\t\t//generally, ping with a /status message.\n\t\t\t\t//but, if we're live but not booted, query node 1 (the sign that init completed)\n\t\t\t\tif (_serverLive && !_serverBooted) { \n\t\t\t\t\tsendMessage(\"/notify\", new Object[] { 1 });\n\t\t\t\t\tsendMessage(\"/n_query\", new Object[]{_motherGroupID});\n\t\t\t\t\t//System.out.println(\"Querying SCSC mother node\");\n\t\t\t\t\t//debugPrintln(\"Querying SCSC mother node\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//if the server's booted, request a status update.\n\t\t\t\t\tsendMessage(\"/status\"); \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t_prevPingRequestTime = new Date();\n\t\t\t}\n\t\t\t//it's not time to send, and we're not watching \n\t\t\t//for a reply, so go to sleep until it's time to ping again\n\t\t\telse {\n\t\t\t\tlong sleeptime = Math.max(_scsynthPingInterval - (curTime.getTime() - _prevPingRequestTime.getTime()), 0);\n\t\t\t\t//System.out.println(\"sleep \" + sleeptime);\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(sleeptime);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t//NOTE this thread shouldn't get interrupted.\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}",
"@Override\n\tpublic void run() {\n\t\n\t\tboolean finMsg = false;\n\n \n \n\t\ttry {\n\t\t\t\n\t\t DataInputStream is = new DataInputStream(socket.getInputStream());\n DataOutputStream os = new DataOutputStream(socket.getOutputStream()); \n\t\t\t\n\t\t\twhile (!finMsg) {\n\t\t\t\t\n\t\t\tString[] client_Msg = is.readUTF().split(\" \");\n\t\t\t\t\n\t\t\tswitch (client_Msg[1]) {\n\t\t\t\n\t\t\t\tcase \"REG\":\n\t\t\t\t\thandleRegister(client_Msg, os);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"RDY\":\n\t\t\t\t\thandleReady(client_Msg, os);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"MOV\":\n\t\t\t\t\thandleMove(client_Msg, os);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\tcase \"FIN\":\n\t\t\t\t\tsocket.close();\n\t\t\t\t\tfinMsg=true;\n\t\t\t\t\tbreak;\n\t\t\t \n\t\t\t\n\t\t\t\t}\n\t\t\n\t\t \n\t\t\t}\n\t\t\t\t\n\t\t}catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tsendSocket = new DatagramSocket();\n\t\t} catch (SocketException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\n\t\t\n\t\ttry {\n\t\t\tsendSocket.send(sendPacket);\t\n\t\t\tsendSocket.setSoTimeout(2000);\n\t\t\tsendSocket.receive(receivePacket);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\t\n\t\ttry {\n\t\t\treturnStr = new String(receivePacket.getData(),\"ASCII\");\n\t\t} catch (UnsupportedEncodingException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tif (returnStr != null) {\n\t\t\tLauncher.selectIp = regexIP(returnStr);\n\t\t} \t\t\t\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\tServerSocket serverSocket;\n\t\tSocket socket;\n\t\tDataInputStream dis;\n\t\tDataOutputStream dos;\n\n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(portNo);\n\t\t\tserverSocket.setSoTimeout(10000000);\n\n\t\t\twhile (true) {\n\t\t\t\tSystem.out.println(COORDINATOR_WAIT_MSG);\n\t\t\t\tsocket = serverSocket.accept();\n\t\t\t\tdis = new DataInputStream(socket.getInputStream());\n\t\t\t\tdos = new DataOutputStream(socket.getOutputStream());\n\n\t\t\t\t// Check if threads are available in thread pool\n\t\t\t\tif (threadpool.getPoolSize() == MAX_THREADS) {\n\t\t\t\t\tSystem.out.println(PARTICIPANT_UNABLE_ACCEPT);\n\t\t\t\t\tdos.writeUTF(PARTICIPANT_UNABLE_ACCEPT);\n\t\t\t\t\tdos.flush();\n\t\t\t\t\tdos.close();\n\t\t\t\t\tdis.close();\n\t\t\t\t\tsocket.close();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Connected to participant: \" + socket);\n\t\t\t\tdos.writeUTF(PARTICIPANT_CONN_ACCEPT);\n\t\t\t\tdos.flush();\n\t\t\t\tthreadpool.execute(new CoordinatorWorker(socket, dis, dos));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tthreadpool.shutdown();\n\t\t\ttry {\n\t\t\t\tthreadpool.awaitTermination(2, TimeUnit.MINUTES);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void run ()\n {\n travelToAirport();\t\t\t\t//Passenger takes some time to arrive to the departure airport\n da.waitInQueue();\t\t\t\t//Passenger enters the queue and then waits for is turn to be checked\n da.showDocuments();\t\t\t\t//Passenger starts preparing to show his documents to the hostess, waking her when this thread is ready\n da.boardThePlane();\t\t\t //Passenger goes to the plane after the end of the check stage\n pl.waitForEndOfFlight();\t\t//Passenger sleeps while the plane has not arrived the destination airport\n pl.leaveThePlane();\t\t\t\t//Passenger wakes up, and leaves the plane, arriving also to the destination airport\n }",
"public void run(){\n //wait for clients to connect to the server and start a new thread,\n //then continue waiting.\n while(true) {\n //create the packet to accept a message\n byte[] buf = new byte[bufSize];\n DatagramPacket packet = new DatagramPacket(buf, buf.length);\n try {\n //receive a message from the client\n datagramSocket.receive(packet);\n } catch (IOException e) {\n System.err.println(\"Error receiving datagram packet\");\n } catch (Exception e){\n serverGUI.displayText(\"Error: There is an issue with your connection. Please restart the program.\");\n }\n //Start a new thread for this client\n ServerThread servant = new ServerThread(mainServer, packet, serverGUI);\n servant.start();\n }\n }",
"@Override\n\tpublic void run() {\n\t\t\n\t\twhile(connected) {\n\t\t\tif(GameActivity.getInstance() == null)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\ttry {\n\t\t\t\t// Read first 4 bytes (int, messageType) from stream\n\t\t\t\t//in.read(bytes, 0, 4);\n\t\t\t\tint messageType = in.readInt();\n\t\t\t\t//intByteBuffer.clear(); // Clear buffer so we can read from it again\n\t\t\t\t\n\t\t\t\t// Receive appropriate message based on received messageType\n\t\t\t if(messageType == Message.CHARACTERS.value()) {\n\t\t\t\t\treceiveCharacters();\n\t\t\t\t} else if(messageType == Message.ID.value()) {\n\t\t\t\t\treceiveId();\n\t\t\t\t} else {\n\t\t\t\t\tSystem.err.println(\"Received message with unknown id: \" + messageType);\n\t\t\t\t}\n\t\t\t \n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Connection to server lost\");\n\t\t\t\te.printStackTrace();\n\t\t\t\tclose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\tbyte[] buff = new byte[HFConfigration.macTMsgPacketSize];\n\t\t\twhile (isAppRunning) {\n\t\t\t\ttry {\n\t\t\t\t\tDatagramPacket recv = new DatagramPacket(buff, buff.length);\n//\t\t\t\t\trecv.setPort(HFConfigration.localUDPPort);\n\t\t\t\t\tlocalBeatSocket.receive(recv);\n\t\t\t\t\tbyte[] data = ByteTool.copyOfRange(buff, 0,\n\t\t\t\t\t\t\trecv.getLength());\n\t\t\t\t\tString ip = recv.getAddress().getHostAddress();\n\t\t\t\t\tdecode(data, ip); Log.d(\"HFModuleManager:\", \"ip:\" + ip);\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} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}"
] | [
"0.68288785",
"0.68235934",
"0.67778945",
"0.6710437",
"0.66967815",
"0.6641081",
"0.6639779",
"0.6614991",
"0.6597099",
"0.6579623",
"0.6554708",
"0.655127",
"0.64811677",
"0.6473596",
"0.6463612",
"0.6457874",
"0.6422519",
"0.6396907",
"0.63761026",
"0.63705534",
"0.63679653",
"0.6358573",
"0.63454777",
"0.6340041",
"0.633071",
"0.6317807",
"0.63042265",
"0.63021195",
"0.62986314",
"0.6290181",
"0.62722343",
"0.625598",
"0.62478906",
"0.6240139",
"0.62381744",
"0.6235286",
"0.62334716",
"0.6208204",
"0.62036514",
"0.62002796",
"0.6199945",
"0.6197609",
"0.6192474",
"0.6192321",
"0.61885273",
"0.6187564",
"0.61838245",
"0.6169537",
"0.61671704",
"0.6162877",
"0.61549705",
"0.6152826",
"0.6152523",
"0.61486804",
"0.6141745",
"0.6140143",
"0.61380976",
"0.61319935",
"0.6131806",
"0.61294526",
"0.61240333",
"0.61205786",
"0.6119175",
"0.61171806",
"0.61155057",
"0.6093374",
"0.60841143",
"0.60755426",
"0.6066598",
"0.60609835",
"0.60601664",
"0.60586685",
"0.605576",
"0.6055143",
"0.6051938",
"0.60483307",
"0.6045635",
"0.6045256",
"0.60435444",
"0.6041638",
"0.6035815",
"0.6034012",
"0.60324097",
"0.6029038",
"0.6027625",
"0.602064",
"0.6019546",
"0.60147756",
"0.6014576",
"0.6014402",
"0.6013811",
"0.5993996",
"0.5989566",
"0.59866357",
"0.59818697",
"0.5979017",
"0.5968655",
"0.5958893",
"0.5955621",
"0.5954236"
] | 0.8093226 | 0 |
The sendCoordinatorMsg() method broadcasts the leader to all the servers. If the server has failed then a message is displayed to indicate the failure. | public static void sendCoordinatorMsg() {
int numberOfRequestsNotSent = 0;
for ( int key : ServerState.getInstance().getServers().keySet() ) {
if ( key != ServerState.getInstance().getSelfID() ){
Server destServer = ServerState.getInstance().getServers().get(key);
try {
MessageTransfer.sendServer(
ServerMessage.getCoordinator( String.valueOf(ServerState.getInstance().getSelfID()) ),
destServer
);
System.out.println("INFO : Sent leader ID to s"+destServer.getServerID());
}
catch(Exception e) {
numberOfRequestsNotSent += 1;
System.out.println("WARN : Server s"+destServer.getServerID()+
" has failed, it will not receive the leader");
}
}
}
if( numberOfRequestsNotSent == ServerState.getInstance().getServers().size()-1 ) {
// add self clients and chat rooms to leader state
List<String> selfClients = ServerState.getInstance().getClientIdList();
List<List<String>> selfRooms = ServerState.getInstance().getChatRoomList();
for( String clientID : selfClients ) {
LeaderState.getInstance().addClientLeaderUpdate( clientID );
}
for( List<String> chatRoom : selfRooms ) {
LeaderState.getInstance().addApprovedRoom( chatRoom.get( 0 ),
chatRoom.get( 1 ), Integer.parseInt(chatRoom.get( 2 )) );
}
leaderUpdateComplete = true;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void sendmessage(int new_offset[], int[] port_list) {\n\t\ttry {\n\n\t\t\t/**\n\t\t\t * \n\t\t\t * port_list has the port of all processes. Message will be sent to\n\t\t\t * all process.\n\t\t\t * \n\t\t\t */\n\n\t\t\tfor (int i = 0; i < port_list.length; i++) {\n\t\t\t\tSocket processClient = new Socket(\"localhost\", port_list[i]);\n\t\t\t\tprocessClient.setReuseAddress(true);\n\t\t\t\tOutputStream processStream = processClient.getOutputStream();\n\t\t\t\tBufferedWriter processWriter = new BufferedWriter(\n\t\t\t\t\t\tnew OutputStreamWriter(processStream));\n\n\t\t\t\tprocessWriter.write(\"Master: Offset =\" + new_offset[i]);\n\n\t\t\t\t// System.out.println(\"Sending data from Master to other process running on \"\n\t\t\t\t// + port_list[i]);\n\n\t\t\t\tprocessWriter.flush();\n\t\t\t\t// processWriter.close();\n\t\t\t\tprocessClient.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"@Override\n\tpublic synchronized void run() {\n\t\tif ((infoMessage.getStoredValue() > node.getLeaderValue())\n\t\t\t\t|| ((infoMessage.getStoredValue() == node.getStoredValue())\n\t\t\t\t\t\t&& (infoMessage.getLeaderId() > node.getLeaderID()))) {\n\n\t\t\tnode.setLeaderID(infoMessage.getLeaderId());\n\t\t\tnode.setLeaderValue(infoMessage.getStoredValue());\n\t\t\tnode.setStoredId(node.getNodeID());\n\t\t\tnode.setStoredValue(node.getNodeValue());\n\t\t\tSystem.out.println(\"INFO HANDLER: 1) Leader changed in Node \" + node.getNodeID() + \" to: \"\n\t\t\t\t\t+ node.getLeaderID() + \" due to exchanging messages with \" + infoMessage.getIncomingId());\n\n\t\t\t// End to Exchanging Leaders Timer && Processing\n\t\t\tnode.networkEvaluation.setEndExchangingLeadersTimer(infoMessage.getIncomingId());\n\t\t\tnode.networkEvaluation.getExchangingLeaderTimer(infoMessage.getIncomingId());\n\n\t\t\t// Metric 3 - Without Leader Timer\n\t\t\tnode.networkEvaluation.setEndWithoutLeaderTimer();\n\t\t\tnode.networkEvaluation.getWithoutLeaderTimer();\n\n\t\t\t// send \"special \"Leader message to all neighbours except one that passed the\n\t\t\t// info to me\n\t\t\tIterator<Integer> i = node.getNeighbors().iterator();\n\n\t\t\tHashSet<Integer> toSend = new HashSet<Integer>();\n\t\t\twhile (i.hasNext()) {\n\t\t\t\tInteger temp = i.next();\n\t\t\t\tif (temp != infoMessage.getIncomingId()) {\n\t\t\t\t\ttoSend.add(temp);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If I have no neighbours except node I exchanged info messages with, no need\n\t\t\t// to send leader messages\n\t\t\tif (!(toSend.isEmpty())) {\n\n\t\t\t\tif (DEBUG)\n\t\t\t\t\tSystem.out.println(\"INFO HANDLER: 2) Sending special leader to all nodes.\");\n\n\t\t\t\tsendMessage(logic.MessageType.LEADER_SPECIAL, toSend);\n\t\t\t}\n\t\t\treturn;\n\n\t\t} else if ((infoMessage.getStoredValue() == node.getLeaderValue()) // Prevents infinite message passing\n\t\t\t\t&& (infoMessage.getLeaderId() == node.getLeaderID())) {\n\t\t\tif (DEBUG)\n\t\t\t\tSystem.out.println(\"INFO HANDLER: 3) Same Leader! Agreement Reached.\");\n\n\t\t\t// End to Exchanging Leaders Timer && Processing\n\t\t\tnode.networkEvaluation.setEndExchangingLeadersTimer(infoMessage.getIncomingId());\n\t\t\tnode.networkEvaluation.getExchangingLeaderTimer(infoMessage.getIncomingId());\n\n\t\t\t// Metric 3 - Without Leader Timer\n\t\t\tnode.networkEvaluation.setEndWithoutLeaderTimer();\n\t\t\tnode.networkEvaluation.getWithoutLeaderTimer();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// If not, send a message back saying that the other node should send the leader\n\t\t// message instead with my leader\n\t\telse {\n\n\t\t\tif (DEBUG)\n\t\t\t\tSystem.out.println(\"INFO HANDLER: 4) Sending back stronger leader.\\n-----------------------------\");\n\n\t\t\tsendMessage(logic.MessageType.INFO, infoMessage.getIncomingId());\n\n\t\t}\n\t}",
"@Override\n\tpublic void establishCoordinatorConn() throws InterruptedException {\n\t\tList<Thread> tList= new ArrayList<Thread>();\n\t\tfor (int i = 0; i < nProc-1; i++) {\n\t\t\tint clientPid = i + 2;\n\t\t\tThread t = new Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tServerConnection conn = new ServerConnection();\n\t\t\t\t\t\tsynchronized (pidToConnMap) {\n\t\t\t\t\t\t\tpidToConnMap.put(clientPid, conn);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tint port = 20000 + (100 * 1) + (clientPid);\n\t\t\t\t\t\tconn.connectRetry(coordinatorHostname, port);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\ttList.add(t);\n\t\t\tt.start();\n\t\t}\n\t\tfor (Thread t : tList) {\n\t\t\tt.join();\n\t\t}\n\t\tSystem.out.println(pidToConnMap.toString());\n\t}",
"static void sendMsg(String msg){\r\n for(ServerThread t: threads){\r\n t.sendMsgToClient(msg);\r\n }\r\n }",
"private void informCoordinator(int coord, int procNo, int elector){\r\nSystem.out.println(\"found\" + elector);\r\nif(procNo>6) {\r\n\tprocNo = procNo - 6;\r\n}\r\n\r\nString token = \"COORDINATOR\" + coord;\r\ntry {\r\n socket = new Socket(\"127.0.0.1\", 8080+procNo);\r\n out = new PrintWriter(socket.getOutputStream());\r\n out.println(token);\r\n out.flush();\r\n out.close();\r\n socket.close();\r\n if(elector!=procNo){\r\n \tinformCoordinator(coord, procNo+1, elector); \r\n } \r\n \r\n}catch(Exception ex) {\r\n\tinformCoordinator(coord, procNo+1, elector); // inform to next next if the next one was unavailable\r\n} \r\n}",
"private void signalAndCreateCoordinator(Cluster pCluster)\n \t{\n \t\tRandom tRandom = new Random(System.currentTimeMillis());\n \t\tHRMController tHRMController = pCluster.getHRMController();\n \t\tNode tNode = tHRMController.getPhysicalNode();\n \t\tint tToken = tRandom.nextInt();\n \t\t\n \t\tpCluster.setToken(tToken);\n \t\tLogging.log(this, \"INIT COORDINATOR functions for cluster \" + pCluster);\n \n \t\tif(pCluster.getHRMController().getIdentity() == null) {\n \t\t\tString tName = tNode.getName();\n \t\t\tHRMIdentity tIdentity= new HRMIdentity(tName);\n \t\t\tpCluster.getHRMController().setIdentity(tIdentity);\n \t\t}\n \t\t\n \n \t\t/**\n \t\t * Create signature of cluster\n \t\t */\n \t\tHRMSignature tSignature = null;\n \t\ttry {\n \t\t\ttSignature = tHRMController.getIdentity().createSignature(tNode.toString(), null, pCluster.getHierarchyLevel());\n \t\t} catch (AuthenticationException tExc) {\n \t\t\tpCluster.getHRMController().getLogger().err(this, \"Unable to create signature for coordinator\", tExc);\n \t\t}\n \t\t\n \t\t/**\n \t\t * Send BULLY ANNOUNCE in order to signal that we are the coordinator\n \t\t */\n \t\tBullyAnnounce tAnnounce = new BullyAnnounce(tNode.getCentralFN().getName(), pCluster.getBullyPriority(), tSignature, pCluster.getToken());\n \t\tfor(CoordinatorCEPChannel tCEP : pCluster.getParticipatingCEPs()) {\n \t\t\ttAnnounce.addCoveredNode(tCEP.getPeerName());\n \t\t}\n \t\tif(tAnnounce.getCoveredNodes() == null || (tAnnounce.getCoveredNodes() != null && tAnnounce.getCoveredNodes().isEmpty())) {\n \t\t\tpCluster.getHRMController().getLogger().log(this, \"Sending announce that does not cover anyhting\");\n \t\t}\n \t\tpCluster.sendClusterBroadcast(tAnnounce, null);\n \t\tName tAddress = tNode.getRoutingService().getNameFor(tNode.getCentralFN());; \n \t\tpCluster.setCoordinatorCEP(null, tSignature, tNode.getCentralFN().getName(), (L2Address)tAddress);\n \t\tLinkedList<HRMSignature> tSignatures = tHRMController.getApprovedSignatures();\n \t\ttSignatures.add(tSignature);\n \t\tif(getHierarchLevel().isHigherLevel()) {\n \t\t\tpCluster.getHRMController().getLogger().log(pCluster, \"has the coordinator and will now announce itself\");\n \t\t\tfor(ICluster tToAnnounce : pCluster.getNeighbors()) {\n //\t\t\t\t\tList<VirtualNode> tNodesBetween = pCluster.getCoordinator().getClusterMap().getIntermediateNodes(pCluster, tToAnnounce);\n \t\t\t\t/*\n \t\t\t\t * OK: Because of the formerly sent \n \t\t\t\t */\n \t\t\t\tif(tToAnnounce instanceof NeighborCluster) {\n \t\t\t\t\tBullyAnnounce tBullyAnnounce = new BullyAnnounce(tNode.getCentralFN().getName(), pCluster.getBullyPriority(), tSignature, pCluster.getToken());\n \t\t\t\t\tfor(CoordinatorCEPChannel tCEP: pCluster.getParticipatingCEPs()) {\n \t\t\t\t\t\ttBullyAnnounce.addCoveredNode(tCEP.getPeerName());\n \t\t\t\t\t}\n \t\t\t\t\tfor(CoordinatorCEPChannel tCEP : ((NeighborCluster)tToAnnounce).getAnnouncedCEPs()) {\n \t\t\t\t\t\ttCEP.sendPacket(tBullyAnnounce);\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\tif(!mPleaseInterrupt) {\n \t\t\t/*\n \t\t\t * synchronized(mPleaseInterrupt) {\n \t\t\t *\n \t\t\t\ttry {\n \t\t\t\t\tmPleaseInterrupt.wait(WAIT_BEFORE_ADDRESS_DISTRIBUTION);\n \t\t\t\t} catch (InterruptedException tExc) {\n \t\t\t\t\tLogging.trace(this, \"interrupted before address distribution\");\n \t\t\t\t}\n \t\t\t}\n \t\t\t */\n \t\t\t\n \t\t\t\n \t\t\tCoordinator tElectedCoordinator = new Coordinator(pCluster, pCluster.getHierarchyLevel(), pCluster.getHrmID());\n \t\t\tint tClusterHierLvl = pCluster.getHierarchyLevel().getValue() + 1;\n \t\t\t\n \t\t\tpCluster.setCoordinator(tElectedCoordinator);\n \t\t\tpCluster.getHRMController().setSourceIntermediateCluster(tElectedCoordinator, pCluster);\n \t\t\ttElectedCoordinator.setPriority(pCluster.getBullyPriority());\n \t\t\tpCluster.getHRMController().addCluster(tElectedCoordinator);\n \t\t\tif(tClusterHierLvl != HRMConfig.Hierarchy.HEIGHT) {\n \t\t\t\t// stepwise hierarchy creation\n \t\t\t\tLogging.log(this, \"Will now wait because hierarchy build up is done stepwise\");\n \t\t\t\tmWillInitiateManager = true;\n \t\t\t\tLogging.log(this, \"Reevaluating whether other processes settled\");\n \t\t\t\tElectionManager.getElectionManager().reevaluate(pCluster.getHierarchyLevel().getValue());\n \t\t\t\tsynchronized(this) {\n \t\t\t\t\ttry {\n \t\t\t\t\t\twait();\n \t\t\t\t\t} catch (InterruptedException tExc) {\n \t\t\t\t\t\tLogging.err(this, \"Unable to fulfill stepwise hierarchy preparation\", tExc);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\ttElectedCoordinator.prepareAboveCluster(tClusterHierLvl);\n \t\t\t} else {\n \t\t\t\tLogging.log(this, \"Beginning address distribution\");\n \t\t\t\ttry {\n \t\t\t\t\ttElectedCoordinator.setHRMID(new HRMID(0));\n \t\t\t\t\tsynchronized(mPleaseInterrupt) {\n \t\t\t\t\t\tLogging.log(this, \"ACTIVE WAITING (init) - \" + WAIT_BEFORE_ADDRESS_DISTRIBUTION);\n \t\t\t\t\t\tmPleaseInterrupt.wait(WAIT_BEFORE_ADDRESS_DISTRIBUTION);\n \t\t\t\t\t}\n \t\t\t\t\ttElectedCoordinator.distributeAddresses();\n \t\t\t\t} catch (RemoteException tExc) {\n \t\t\t\t\tLogging.err(this, \"Remoe problem - error when trying to distribute addresses\", tExc);\n \t\t\t\t} catch (RoutingException tExc) {\n \t\t\t\t\tLogging.err(this, \"Routing problem - error when trying to distribute addresses\", tExc);\n \t\t\t\t} catch (RequirementsException tExc) {\n \t\t\t\t\tLogging.err(this, \"Requirements problem - error when trying to distribute addresses\", tExc);\n \t\t\t\t} catch (InterruptedException tExc) {\n \t\t\t\t\tLogging.err(this, \"interrupt problem - error when trying to distribute addresses\", tExc);\n \t\t\t\t}\n \t\t\t}\n \t\t}\t\n \t}",
"public void sendMessage() {\n\t\tString myPosition=this.agent.getCurrentPosition();\n\t\tif (myPosition!=null){\n\t\t\t\n\t\t\tList<String> wumpusPos = ((CustomAgent)this.myAgent).getStenchs();\n\t\t\t\n\t\t\tif(!wumpusPos.isEmpty()) {\n\t\t\t\tList<String> agents =this.agent.getYellowpage().getOtherAgents(this.agent);\n\t\t\t\t\n\t\t\t\tACLMessage msg=new ACLMessage(ACLMessage.INFORM);\n\t\t\t\tmsg.setSender(this.myAgent.getAID());\n\t\t\t\tmsg.setProtocol(\"WumpusPos\");\n\t\t\t\tmsg.setContent(wumpusPos.get(0)+\",\"+myPosition);\n\t\t\t\t\n\t\t\t\tfor(String a:agents) {\n\t\t\t\t\tif(this.agent.getConversationID(a)>=0) {\n\t\t\t\t\t\tif(a!=null) msg.addReceiver(new AID(a,AID.ISLOCALNAME));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.agent.sendMessage(msg);\n\t\t\t\tthis.lastPos=myPosition;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}",
"public void broadcastmsg(String msg){\r\n Server.getUsers().forEach((user) -> {\r\n user.sendmsg(msg);\r\n });\r\n }",
"@Override\n public void broadcast(T msg) {\n for (Integer i : activeUsers.keySet()) {\n this.send(Integer.valueOf(i), msg);\n }\n\n }",
"private int electCoordinator(int[] processes, int elector) {\r\n int newCoord = processes[0];\r\n //Check the first process number and compare with other live processes and elect Coordinator with highest process number\r\n for(int i = 1; i<processes.length; i++) {\r\n if(processes[i]>newCoord) {\t\t\t\t\t\r\n \tnewCoord = processes[i];\r\n }\r\n } \r\n \r\n // assign the variables with the new coordinator value\r\n ring.coordinator = newCoord;\r\n coordinator = newCoord;\r\n ring.messageArea.append(\"\\nNew Co-ordinator : \" + ring.coordinator);\r\n if(ring.coordinator != 0) {\r\n \t// Announce the coordinator to other processes\r\n \r\n \tinformCoordinator(newCoord, processNo+1, elector);\r\n }\r\n return newCoord;\r\n}",
"public static void sendOK() {\n try {\n Server destServer = ServerState.getInstance().getServers().get(sourceID);\n MessageTransfer.sendServer(\n ServerMessage.getOk( String.valueOf(ServerState.getInstance().getSelfID()) ),\n destServer\n );\n System.out.println(\"INFO : Sent OK to s\"+destServer.getServerID());\n }\n catch(Exception e) {\n System.out.println(\"INFO : Server s\"+sourceID+\" has failed. OK message cannot be sent\");\n }\n }",
"public void sendMessageToAll(String msg) {\n try {\n if (socket == null){\n JOptionPane.showMessageDialog(null, \"SSLSocket is not connected to server. Connect before sending message.\",Env.ChatClientMessageBoxTitle, JOptionPane.ERROR_MESSAGE);\n return;\n }\n PrintWriter writer = new PrintWriter(new OutputStreamWriter(socket.getOutputStream(), \"UTF-8\"), true);\n writer.println(passUtil.toHexString(\"msg|split|\" + user.getUsername() + \"|split|\" + msg));\n writer.flush();\n chatClientController.appendToPane(new Date(System.currentTimeMillis()) + \": You (\" + user.getUsername() + \"): \" + msg , \"BLUE\", null);\n } catch (Exception ex){\n ex.printStackTrace();\n if (ex.toString().toLowerCase().contains(\"socket output is already shutdown\")){\n disconnectFromServer(false);\n }\n JOptionPane.showMessageDialog(null, \"Error sending message: \" + ex.toString(),Env.ChatClientMessageBoxTitle, JOptionPane.ERROR_MESSAGE);\n }\n }",
"@Override\n\tpublic void communicateNeighborHostnames() throws InterruptedException {\n\t\tList<Thread> tList= new ArrayList<Thread>();\n\t\tfor (int i = 0; i < nProc-1; i++) {\n\t\t\tint clientPid = i + 2;\n\t\t\tThread t = new Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tConnection conn = pidToConnMap.get(clientPid);\n\t\t\t\t\tList<Integer> clientNeighborPids = neighborMap.get(clientPid);\n\t\t\t\t\tfor (int clientNeighborPid : clientNeighborPids) {\n\t\t\t\t\t\tString neighborHostname;\n\t\t\t\t\t\tif (clientNeighborPid == 1)\n\t\t\t\t\t\t\tneighborHostname = coordinatorHostname;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tneighborHostname = pidToHostnameMap.get(clientNeighborPid);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconn.send(neighborHostname);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\ttList.add(t);\n\t\t\tt.start();\n\t\t}\n\t\tfor (Thread t : tList) {\n\t\t\tt.join();\n\t\t}\n\t}",
"private void broadcast(String msg) {\n\t\tfor (PrintWriter out : clients) {\n\t\t\tout.println(msg);\n\t\t\tout.flush();\n\t\t}\n\t}",
"public void sendHelloMessage() {\n getSocketController().send(getMessageController().createHelloMessage(\"Сервер\", getUser().getName()));\n }",
"public void doSendMsg() {\n FacesContext fctx = FacesContext.getCurrentInstance();\n HttpSession sess = (HttpSession) fctx.getExternalContext().getSession(false);\n SEHRMessagingListener chatHdl = (SEHRMessagingListener) sess.getAttribute(\"ChatHandler\");\n if (chatHdl.isSession()) {\n //TODO implement chat via sehr.xnet.DOMAIN.chat to all...\n if (room.equalsIgnoreCase(\"public\")) {\n //send public inside zone\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PUBLIC, moduleCtrl.getLocalZoneID(), -1, -1);\n } else {\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PRIVATE_USER, moduleCtrl.getLocalZoneID(), -1, curUserToChat.getUsrid());\n }\n this.text = \"\";\n }\n //return \"pm:vwChatRoom\";\n }",
"private void sendNotifications() {\n for (long sid : self.getCurrentAndNextConfigVoters()) {\n QuorumVerifier qv = self.getQuorumVerifier();\n ToSend notmsg = new ToSend(\n ToSend.mType.notification,\n proposedLeader,\n proposedZxid,\n logicalclock.get(),\n QuorumPeer.ServerState.LOOKING,\n sid,\n proposedEpoch,\n qv.toString().getBytes(UTF_8));\n\n LOG.debug(\n \"Sending Notification: {} (n.leader), 0x{} (n.zxid), 0x{} (n.round), {} (recipient),\"\n + \" {} (myid), 0x{} (n.peerEpoch) \",\n proposedLeader,\n Long.toHexString(proposedZxid),\n Long.toHexString(logicalclock.get()),\n sid,\n self.getMyId(),\n Long.toHexString(proposedEpoch));\n\n sendqueue.offer(notmsg);\n }\n }",
"public void broadcastMsg(String msg) {\n for (Client c : sockets) {\n c.sendMessage(msg);\n }\n }",
"void sendMsg(String msg) {\n if (this.server.getOwnClientName().equals(username)) {\n StringJoiner joiner = new StringJoiner(Constants.MSG_DELIMETER);\n joiner.add(MsgType.UNICAST.toString());\n joiner.add(msg);\n toClient.println(joiner.toString());\n }\n }",
"public void broadcastInfo(String msg){\n\t\tfor (User u : Servidor.users) {\n\t\t\ttry {\t\t\t\t\n\t\t\t\tDataOutputStream o = new DataOutputStream(u.getSocket().getOutputStream());\n\t\t\t\to.writeUTF(msg);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void run() {\n\t\tServerSocket serverSocket;\n\t\tSocket socket;\n\t\tDataInputStream dis;\n\t\tDataOutputStream dos;\n\n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(portNo);\n\t\t\tserverSocket.setSoTimeout(10000000);\n\n\t\t\twhile (true) {\n\t\t\t\tSystem.out.println(COORDINATOR_WAIT_MSG);\n\t\t\t\tsocket = serverSocket.accept();\n\t\t\t\tdis = new DataInputStream(socket.getInputStream());\n\t\t\t\tdos = new DataOutputStream(socket.getOutputStream());\n\n\t\t\t\t// Check if threads are available in thread pool\n\t\t\t\tif (threadpool.getPoolSize() == MAX_THREADS) {\n\t\t\t\t\tSystem.out.println(PARTICIPANT_UNABLE_ACCEPT);\n\t\t\t\t\tdos.writeUTF(PARTICIPANT_UNABLE_ACCEPT);\n\t\t\t\t\tdos.flush();\n\t\t\t\t\tdos.close();\n\t\t\t\t\tdis.close();\n\t\t\t\t\tsocket.close();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Connected to participant: \" + socket);\n\t\t\t\tdos.writeUTF(PARTICIPANT_CONN_ACCEPT);\n\t\t\t\tdos.flush();\n\t\t\t\tthreadpool.execute(new CoordinatorWorker(socket, dis, dos));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tthreadpool.shutdown();\n\t\t\ttry {\n\t\t\t\tthreadpool.awaitTermination(2, TimeUnit.MINUTES);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"protected abstract void sendMessage(UUID[] players, BaseComponent[][] messages, IntConsumer response);",
"@Override\n public void onMessageReceived(String sender, ChatMetadataRecord chatMetadataRecord) {\n System.out.println(\"*** StressAppActor has received a message from \"+sender);\n receivedMessages++;\n System.out.println(\"*** StressAppActor has registered \"+receivedMessages+\" received messages\");\n report(ReportType.RECEIVED_MESSAGE);\n String receiverPk = chatMetadataRecord.getRemoteActorPublicKey();\n int responds;\n if(messagesCount.get(receiverPk)==null){\n responds = 0;\n } else {\n responds = messagesCount.get(receiverPk);\n }\n ActorProfile actorSender = actorsMap.get(receiverPk);\n if(responds<RESPONDS){\n try {\n ActorProfile actorReceiver = actorsMap.get(chatMetadataRecord.getLocalActorPublicKey());\n String nsPublicKey = actorNesMap.get(actorSender.getIdentityPublicKey());\n ChatNetworkServicePluginRoot networkServicePluginRoot;\n\n //If the actor public key is not registered any NS, I'll try to send the message from a random NS.\n if(nsPublicKey==null){\n //throw new CannotRespondMessageException(\"The Network Service public key is not registered\");\n networkServicePluginRoot = getRandomChatNs();\n } else {\n networkServicePluginRoot = nsPublicKeyMap.get(nsPublicKey);\n }\n\n String messageToSend = \"StressAppActor responds you a \"+generateRandomHexString();\n System.out.println(\"*** StressAppActor is trying to respond \"+messageToSend);\n messagesCount.put(receiverPk, responds++);\n networkServicePluginRoot.sendMessage(messageToSend, actorSender.getIdentityPublicKey(), actorReceiver.getIdentityPublicKey());\n messagesSent++;\n System.out.println(\"*** StressAppActor has registered \"+messagesSent+\" messages sent\");\n report(ReportType.MESSAGE_SENT);\n report(ReportType.RESPOND_MESSAGES);\n } catch (Exception e) {\n report(ReportType.EXCEPTION_DETECTED);\n System.out.println(actorSender.getIdentityPublicKey()+\" cannot respond a message:\\n\"+e.getMessage());\n //e.printStackTrace();\n }\n }\n }",
"public void serverSendMessageToAllUsers(String message) {\r\n \t\tServerCommand serverCommand = new MessageServerCommand(message, \"server\", null);\r\n \r\n \t\tthis.sendCommandToClient(this.clients.getClients(), serverCommand);\r\n \t}",
"private void sendUpdates() {\n\n List<PeerUpdateMessage.Part> parts = new ArrayList<PeerUpdateMessage.Part>();\n for (ActivePlayer peer : player.getSavedNeighbors()) {\n PeerUpdateMessage.Part part = new PeerUpdateMessage.Part(\n peer.character.id, peer.character.getExtrapolatedMotionState());\n parts.add(part);\n }\n\n if (!parts.isEmpty()) {\n PeerUpdateMessage msg = new PeerUpdateMessage(parts);\n new ToClientMessageSink(player.session).sendWithoutConfirmation(msg);\n }\n }",
"private void broadcast(String msg) {\n\t\tIterator i = onlineUsers.entrySet().iterator();\n\t\t\n\t\twhile (i.hasNext()) {\n\t\t\tMap.Entry p = (Map.Entry)i.next();\n\t\t\tUser u = (User)p.getValue();\n\t\t\t\n\t\t\tu.output.println(msg);\n\t\t}\n\t}",
"public void sendMessages(List<String> messages) {\n if (!this.isConnectedToClientServer){return;}\n for (String message : messages){\n try {\n outputQueue.put(message);\n break;\n //board is sending a ball message about this ball, which means this ball is leaving the board\n } catch (InterruptedException e) {\n //don't do anything --> queue to server is interrupted, but single-machine play still happens\n }\n }\n }",
"private void broadcast(String message)\n \t{\n \t\tfor(int i = 0; i < players.length; i++)\n \t\t{\n // PROTOCOL\n \t\t\tplayers[i].sendMessage(message);\n // PROTOCOL\n \t\t}\n \t}",
"@Override\n\tpublic void takeLeadership(CuratorFramework curator) throws Exception\n\t{\n\n\t\tLOG.info(\"a new leader has been elected: kaboom.id={}\", config.getKaboomId());\n\t\n\t\tThread.sleep(30 * 1000);\n\n\t\twhile (true)\n\t\t{\n\t\t\tMap<String, String> partitionToHost = new HashMap<String, String>();\n\t\t\tMap<String, List<String>> hostToPartition = new HashMap<String, List<String>>();\n\t\t\tfinal Map<String, KaBoomNodeInfo> clients = new HashMap<String, KaBoomNodeInfo>();\n\t\t\tMap<String, List<String>> clientToPartitions = new HashMap<String, List<String>>();\n\t\t\tMap<String, String> partitionToClient = new HashMap<String, String>();\n\t\t\tList<String> topics = new ArrayList<String>();\n\n\t\t\t// Get a full set of metadata from Kafka\n\t\t\tStateUtils.readTopicsFromZooKeeper(config.getKafkaZkConnectionString(), topics);\n\n\t\t\t// Map partition to host and host to partition\n\t\t\tStateUtils.getPartitionHosts(config.getKafkaSeedBrokers(), topics, partitionToHost, hostToPartition);\n\n\t\t\t// Get a list of active clients from zookeeper\n\t\t\tStateUtils.getActiveClients(curator, clients);\n\n\t\t\t// Get a list of current assignments\n\t\t\t// Get a list of current assignments\n\t\t\t\n\t\t\tfor (String partition : partitionToHost.keySet())\n\t\t\t{\n\t\t\t\tStat stat = curator.checkExists().forPath(\"/kaboom/assignments/\" + partition);\n\t\t\t\t\n\t\t\t\tif (stat != null)\n\t\t\t\t{\n\t\t\t\t\t// check if the client is still connected, and delete node if it is not.\n\t\t\t\t\t\n\t\t\t\t\tString client = new String(curator.getData().forPath(\"/kaboom/assignments/\" + partition), UTF8);\n\t\t\t\t\t\n\t\t\t\t\tif (clients.containsKey(client))\n\t\t\t\t\t{\n\t\t\t\t\t\tLOG.debug(\"Partition {} : client {} is connected\", partition, client);\n\t\t\t\t\t\t\n\t\t\t\t\t\tpartitionToClient.put(partition, client);\t\t\t\t\t\t\n\t\t\t\t\t\tList<String> parts = clientToPartitions.get(client);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (parts == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparts = new ArrayList<String>();\n\t\t\t\t\t\t\tclientToPartitions.put(client, parts);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparts.add(partition);\n\t\t\t\t\t} \n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tLOG.debug(\"Partition {} : client {} is not connected\", partition, client);\n\t\t\t\t\t\tcurator.delete().forPath(\"/kaboom/assignments/\" + partition);\n\t\t\t\t\t\tstat = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tStateUtils.calculateLoad(partitionToHost, clients, clientToPartitions);\n\n\t\t\t// If any node is over its target by at least one, then unassign partitions until it is at or below its target\n\t\t\t\n\t\t\tfor (Entry<String, KaBoomNodeInfo> e : clients.entrySet())\n\t\t\t{\n\t\t\t\tString client = e.getKey();\n\t\t\t\tKaBoomNodeInfo info = e.getValue();\n\n\t\t\t\tif (info.getLoad() >= info.getTargetLoad() + 1)\n\t\t\t\t{\n\t\t\t\t\tList<String> localPartitions = new ArrayList<String>();\n\t\t\t\t\tList<String> remotePartitions = new ArrayList<String>();\n\n\t\t\t\t\tfor (String partition : clientToPartitions.get(client))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (partitionToHost.get(partition).equals(info.getHostname()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlocalPartitions.add(partition);\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\tremotePartitions.add(partition);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (info.getLoad() > info.getTargetLoad())\n\t\t\t\t\t{\n\t\t\t\t\t\tString partitionToDelete;\n\t\t\t\t\t\tif (remotePartitions.size() > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpartitionToDelete = remotePartitions.remove(rand.nextInt(remotePartitions.size()));\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\tpartitionToDelete = localPartitions.remove(rand.nextInt(localPartitions.size()));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tLOG.info(\"Unassgning {} from overloaded client {}\", partitionToDelete, client);\n\t\t\t\t\t\tpartitionToClient.remove(partitionToDelete);\n\t\t\t\t\t\tclientToPartitions.get(client).remove(partitionToDelete);\n\t\t\t\t\t\tinfo.setLoad(info.getLoad() - 1);\n\n\t\t\t\t\t\tcurator.delete().forPath(\"/kaboom/assignments/\" + partitionToDelete);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Sort the clients by percent load, then add unassigned clients to the lowest loaded client\t\t\t\n\t\t\t{\n\t\t\t\tList<String> sortedClients = new ArrayList<String>();\n\t\t\t\tComparator<String> comparator = new Comparator<String>()\n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(String a, String b)\n\t\t\t\t\t{\n\t\t\t\t\t\tKaBoomNodeInfo infoA = clients.get(a);\n\t\t\t\t\t\tdouble valA = infoA.getLoad() / infoA.getTargetLoad();\n\n\t\t\t\t\t\tKaBoomNodeInfo infoB = clients.get(b);\n\t\t\t\t\t\tdouble valB = infoB.getLoad() / infoB.getTargetLoad();\n\n\t\t\t\t\t\tif (valA == valB)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn 0;\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\tif (valA > valB)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn -1;\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\tsortedClients.addAll(clients.keySet());\n\n\t\t\t\tfor (String partition : partitionToHost.keySet())\n\t\t\t\t{\n\t\t\t\t\t// If it's already assigned, skip it\n\t\t\t\t\t\n\t\t\t\t\tif (partitionToClient.containsKey(partition))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tCollections.sort(sortedClients, comparator);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * \n\t\t\t\t\t * Iterate through the list until we find either a local client below capacity, or we reach the ones that are \n\t\t\t\t\t * above capacity. If we reach clients above capacity, then just assign it to the first node.\n\t\t\t\t\t */\n\t\t\t\t\t\n\t\t\t\t\tLOG.info(\"Going to assign {}\", partition);\n\t\t\t\t\tString chosenClient = null;\n\t\t\t\t\t\n\t\t\t\t\tfor (String client : sortedClients)\n\t\t\t\t\t{\n\t\t\t\t\t\tLOG.info(\"- Checking {}\", client);\t\t\t\t\t\t\n\t\t\t\t\t\tKaBoomNodeInfo info = clients.get(client);\t\t\t\t\t\t\n\t\t\t\t\t\tLOG.info(\"- Current load = {}, Target load = {}\", info.getLoad(), info.getTargetLoad());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (info.getLoad() >= info.getTargetLoad())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tchosenClient = sortedClients.get(0);\n\t\t\t\t\t\t\tbreak;\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\tif (clients.get(client).getHostname().equals(partitionToHost.get(partition)))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tchosenClient = client;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (chosenClient == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tchosenClient = sortedClients.get(0);\n\t\t\t\t\t}\n\n\t\t\t\t\tLOG.info(\"Assigning partition {} to client {}\", partition, chosenClient);\n\n\t\t\t\t\tcurator\n\t\t\t\t\t\t .create()\n\t\t\t\t\t\t .withMode(CreateMode.PERSISTENT)\n\t\t\t\t\t\t .forPath(\"/kaboom/assignments/\" + partition,\n\t\t\t\t\t\t\t chosenClient.getBytes(UTF8));\n\n\t\t\t\t\tList<String> parts = clientToPartitions.get(chosenClient);\n\t\t\t\t\t\n\t\t\t\t\tif (parts == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tparts = new ArrayList<String>();\n\t\t\t\t\t\tclientToPartitions.put(chosenClient, parts);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tparts.add(partition);\n\n\t\t\t\t\tpartitionToClient.put(partition, chosenClient);\n\n\t\t\t\t\tclients.get(chosenClient).setLoad(clients.get(chosenClient).getLoad() + 1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Check to see if the kafka_ready flag writer thread exists and is alive:\n\t\t\t * \n\t\t\t * If it doesn't exist or isn't running, start it. This is designed to \n\t\t\t * work well when the load balancer sleeps for 10 minutes after assigning \n\t\t\t * work. If that behavior changes then additional logic will be required\n\t\t\t * to ensure this isn't executed too often \n\t\t\t */\n\t\t\t\n\t\t\tif (readyFlagThread == null || !readyFlagThread.isAlive())\n\t\t\t{\n\t\t\t\tLOG.info(\"[ready flag writer] thread doesn't exist or is not running\");\t\t\t\t\n\t\t\t\treadyFlagWriter = new ReadyFlagWriter(config, curator);\n\t\t\t\treadyFlagWriter.addListener(this);\n\t\t\t\treadyFlagThread = new Thread(readyFlagWriter);\n\t\t\t\treadyFlagThread.start();\n\t\t\t\tLOG.info(\"[ready flag writer] thread created and started\");\n\t\t\t}\n\n\t\t\tThread.sleep(10 * 60 * 1000);\n\t\t}\n\t}",
"public void sendNameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDNM\" + lobby.getNameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}",
"public void sendMessage(String msg) {\n\t\tfor (MessagingServer server : servers) {\n\t\t\tserver.messages.add(msg + \" (received from \" + this.serverId + \")\");\n\t\t}\n\t}",
"@Override\n\tpublic void execute() {\n\t\tif (!(messageText == null || messageText.isEmpty())) {\n\n\t\t\tMessage message = new Message();\n\t\t\tMessage.Type messageType;\n\t\t\tif (recipientsIds.isEmpty())\n\t\t\t\tmessageType = Type.USER_BROADCAST;\n\t\t\telse\n\t\t\t\tmessageType = Type.USER_PERSONAL;\n\n\t\t\tmessage.setSender(PlayersRegister.getInstance().getPlayerById(getUserId()));\n\t\t\tmessage.setText(messageText);\n\t\t\tmessage.setType(messageType);\n\n\t\t\tArrayList<Player> recipients = PlayersRegister.getInstance().getPlayersById(recipientsIds);\n\t\t\tif (!recipientsIds.isEmpty())\n\t\t\t\trecipients.add(message.getSender()); // echo the message to the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// sender as well\n\n\t\t\tmessage.setRecipients(recipients);\n\t\t\tmessage.send();\n\n\t\t}\n\n\t}",
"protected abstract void sendMessage(UUID[] players, String[] messages, IntConsumer response);",
"private void sendMessage(CommandSender p, String msg) {\n\t\tif (p instanceof Player) {\n\t\t\tif (!((Player) p).isOnline()) return;\n\t\t}\n\t\t_.msg(p, GameMode.Sonic, msg);\n\t}",
"public void messageToAll(String s) {\n\t\tfor(ClientThread player: players) {\n\t\t\tplayer.send(new Package(\"MESSAGE\",s));\n\t\t}\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic synchronized boolean doActivity() {\n\t\tJSONObject json = new JSONObject();\n\t\tjson.put(\"command\", SERVER_ANNOUNCE);\n\t\tjson.put(\"id\", id);\n\t\tjson.put(\"load\", loadConnections.size());\n\t\tjson.put(\"hostname\", Settings.getLocalHostname());\n\t\tjson.put(\"port\", Settings.getLocalPort());\n\t\tfor (Connection cons : broadConnections) {\n\t\t\tcons.writeMsg(json.toJSONString());\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n public void run(){\n ServerConnection[] clients = new ServerConnection[]{client2, client3, client1};\n\n for( ServerConnection c : clients ) {\n if ( c != null ){\n if ( client3 == null ){\n c.send(\"Game has started with code:\" + gameID + \".\\n\" + \"Current players are \" +\n client1.getName() + \", \" + client2.getName());\n }\n else {\n c.send(\"Game has started with code:\" + gameID + \".\\n\" + \"Current players are \" +\n client1.getName() + \", \" + client2.getName() + \", \" + client3.getName());\n }\n c.setGameID(gameID);\n }\n }\n\n String[] gods = readChallengerMessage();\n\n for (int i=0; i<2 && currClient != client1; i++){\n currClient.send(Arrays.toString(gods) );\n clientMessage = readClientMessage();\n if (i == 0) {\n gameMessage.setGod2(clientMessage.getGod());\n gameMessage.setName2(clientMessage.getName());\n } else if (i == 1) {\n gameMessage.setGod3(clientMessage.getGod());\n gameMessage.setName3(clientMessage.getName());\n }\n List<String> list = new ArrayList<String>(Arrays.asList(gods));\n list.remove( clientMessage.getGod().name());\n gods = list.toArray(new String[0]);\n currClient.send(\"Choice confirmed\");\n updateCurrClient();\n }\n\n currClient.send(gods[0]);\n gameMessage.setGod1(God.valueOf(gods[0]));\n gameMessage.setName1(client1.getName());\n updateCurrClient();\n resetUpdate();\n gameMessage.notify(gameMessage);\n sendLiteGame();\n\n for( ServerConnection c : clients ) {\n resetUpdate();\n if ( c != null ) {\n while ( !updateModel) {\n sendToCurrClient(\"Placing workers\");\n clientMessage = readClientMessage();\n gameMessage.setSpace1(clientMessage.getSpace1());\n gameMessage.setSpace2(clientMessage.getSpace2());\n gameMessage.notify(gameMessage);\n if (!updateModel) {\n sendLiteGame();\n }\n }\n updateCurrClient();\n liteGame.setPlayer(currClient.getName());\n sendLiteGame();\n }\n }\n\n\n while ( !endOfTheGame ) {\n sendToCurrClient(\"Next action\");\n clientMessage = readClientMessage();\n\n if ( \"Choose Worker\".equals(clientMessage.getAction()) ) {\n chooseWorker();\n }\n else if ( \"Charon Switch\".equals(clientMessage.getAction()) ) {\n charonSwitch();\n }\n else if ( \"Prometheus Build\".equals(clientMessage.getAction()) ) {\n build();\n }\n else if ( \"Move\".equals(clientMessage.getAction()) ) {\n move();\n }\n else if ( \"Build\".equals(clientMessage.getAction()) ) {\n build();\n }\n\n if ( \"End\".equals(clientMessage.getAction()) ) {\n gameMessage.resetGameMessage();\n updateCurrClient();\n liteGame.setCurrWorker(5,5);\n liteGame.setPlayer(currClient.getName());\n sendLiteGame();\n }\n else {\n sendLiteGame();\n if ( !endOfTheGame && !playerRemoved ) {\n if (!updateModel) {\n currClient.send(\"Invalid action\");\n } else currClient.send(\"Action performed\");\n }\n else playerRemoved = false;\n }\n }\n\n sendToCurrClient(\"You won the match.\");\n server.endMatch(gameID, null);\n }",
"public void sendToManager(){\n String receiveMessage;\n while((receiveMessage=receiveFrom(messageReader)) != null){\n manager.manage(receiveMessage);\n }\n }",
"public boolean sendLeaderboard(final CommandSender p, final boolean monthly) {\n\t\tfinal String playername = p.getName();\n\t\tif (doingCommand.contains(playername)) {\n\t\t\treturn false;\n\t\t}\n\t\tdoingCommand.add(playername);\n\t\tif (!monthly) { //Send the player a message\n\t\t\t_.msg(p, GameMode.Sonic, \"Gathering leaderboard\");\n\t\t} else {\n\t\t\t_.msg(p, GameMode.Sonic, \"Gathering monthly leaderboard\");\n\t\t}\n\t\t_T.run_ASync(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tHashSet<String> foundPlayers = new HashSet<>();\n\t\t\t\ttry {\n\t\t\t\t\tif (con.isClosed() || !isAlive) {\n\t\t\t\t\t\tif (!connect()) {\n\t\t\t\t\t\t\tthrow new SQLException(\"Failed to connect with SQL.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tString between = \"\";\n\t\t\t\t\tif (monthly) { //If monthly add the between SQL statement\n\t\t\t\t\t\tbetween = \"WHERE `finish_timestamp` BETWEEN ? AND ? \";\n\t\t\t\t\t}\n\t\t\t\t\tPreparedStatement prep = con.prepareStatement( //Create the statement\n\t\t\t\t\t\t\"SELECT `player`, `finish` \" +\n\t\t\t\t\t\t\"FROM `sonicleaderboard` \" +\n\t\t\t\t\t\tbetween +\n\t\t\t\t\t\t\"ORDER BY `sonicleaderboard`.`finish` ASC \" +\n\t\t\t\t\t\t\"LIMIT 0, 1000;\"\n\t\t\t\t\t);\n\t\t\t\t\tif (monthly) { //If monthly set the parameter\n\t\t\t\t\t\tprep.setDate(1, startDateSQL);\n\t\t\t\t\t\tprep.setDate(2, endDateSQL);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tResultSet leaderboardRS = prep.executeQuery(); //Execute the query\n\t\t\t\t\t\n\t\t\t\t\tint rank = 1;\n\t\t\t\t\twhile (leaderboardRS.next()) {\n\t\t\t\t\t\tString foundPlayer = leaderboardRS.getString(1);\n\t\t\t\t\t\tif (foundPlayers.contains(foundPlayer)) { //Check if already processed a time of this player\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfoundPlayers.add(foundPlayer);\n\t\t\t\t\t\tif (rank == 1) {\n\t\t\t\t\t\t\tif (monthly) { //Send top string\n\t\t\t\t\t\t\t\tsendMessage(p, ChatColor.YELLOW + \" --- \" + ChatColor.GOLD + \"Sonic Monthly (\" + monthString + \") Leaderboard \" + ChatColor.YELLOW + \"---\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsendMessage(p, ChatColor.YELLOW + \" --- \" + ChatColor.GOLD + \"Sonic All-Time Leaderboard \" + ChatColor.YELLOW + \"---\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsendMessage(p, rank + \". \" + ChatColor.YELLOW + foundPlayer + ChatColor.WHITE + \" - Time: \" + ChatColor.YELLOW + _.getGameController().getTimeString(0, leaderboardRS.getLong(2))); //Send time\n\t\t\t\t\t\trank++;\n\t\t\t\t\t\tif (rank > 10) {\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\tif (rank == 1) {\n\t\t\t\t\t\t_.badMsg(p, \"There are no records yet..\");\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t_.log(Level.SEVERE, GameMode.Sonic, \"Failed to generate leaderboard! Monthly: \" + monthly + \". SQLException: \" + e.getMessage());\n\t\t\t\t\t_.badMsg(p, \"Something went wrong generating the leaderboard. Contact Stoux!\");\n\t\t\t\t\tcheckConnection();\n\t\t\t\t}\n\t\t\t\tdoingCommand.remove(playername);\n\t\t\t}\n\t\t});\n\t\treturn true;\n\t}",
"@Override\n protected Void doInBackground(String... msgs) {\n Socket socket = null;\n\n try {\n Log.d(TAG, msgs[0]+\" \"+msgs[1]);\n String msgToSend = msgs[0];\n\n ArrayList<Integer> sequenceNumberList = new ArrayList<Integer>(); //Array list to store the list of sequence numbers\n\n for(String portSck: socketPortStore){\n Log.d(\"Failed Node : \",failedNode);\n Log.d(\"Client->Server Port: \",portSck);\n if(!portSck.equals(failedNode)) {\n\n socket = new Socket(InetAddress.getByAddress(new byte[]{10, 0, 2, 2}), Integer.parseInt(portSck));\n try {\n String msg = msgToSend.trim() + \"::\" + CURRENT_PORT + \"::\" + portSck + \"::false\";\n Log.d(\"Message sent : \", msg);\n\n PrintWriter out = new PrintWriter(socket.getOutputStream(), true); //Writing a OK back to clients\n out.println(msg);\n out.flush();\n\n //Acknowledgement from the Server that message has been delivered successfully\n BufferedReader inputStream = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n int sequenceNum = Integer.valueOf(inputStream.readLine());\n Log.d(\"Sequence No. received \", String.valueOf(sequenceNum));\n sequenceNumberList.add(sequenceNum);\n\n out.close();\n inputStream.close();\n\n //Close the socket\n socket.close();\n }catch (NumberFormatException e){\n Log.d(\"EXCEPTION \",\"NumberFormatException found!\");\n for (String port : socketPortStore) {\n try {\n if (!port.equals(portSck)) {\n Log.d(\"Broadcast done to : \", port);\n Socket failureMessengerSocket = new Socket(InetAddress.getByAddress(new byte[]{10, 0, 2, 2}), Integer.parseInt(port));\n String msg_fail = \"FAILED\" + \"::\" + portSck + \"::\" + CURRENT_PORT + \"::\" + port + \"::false\";\n Log.d(\"BROADCAST \",msg_fail);\n PrintWriter out_failure = new PrintWriter(failureMessengerSocket.getOutputStream(), true); //Writing a OK back to clients\n out_failure.println(msg_fail);\n out_failure.flush();\n Log.d(\"BROADCAST \",\"MSG SENT\");\n\n BufferedReader inputStream_failure = new BufferedReader(new InputStreamReader(failureMessengerSocket.getInputStream()));\n String ack = inputStream_failure.readLine();\n Log.d(\"BROADCAST (ack) \",ack);\n if (ack != null) {\n Log.d(\"Message Status : \", \"Removed Successfully.\");\n }\n\n out_failure.close();\n inputStream_failure.close();\n\n failureMessengerSocket.close();\n }\n } catch (Exception e1) {\n e1.printStackTrace();\n }\n }\n }catch (Exception e){\n e.printStackTrace();\n }\n }\n }\n\n int maxSequenceNum = Collections.max(sequenceNumberList) + 1;\n Log.d(\"MAX SEQ No. \",String.valueOf(maxSequenceNum));\n\n for(String soc: socketPortStore){\n if(!soc.equals(failedNode)) {\n socket = new Socket(InetAddress.getByAddress(new byte[]{10, 0, 2, 2}), Integer.parseInt(soc));\n String msg = msgToSend.trim()+\"::\"+maxSequenceNum+\"::\"+CURRENT_PORT+\"::\"+soc+\"::true\";\n\n PrintWriter out = new PrintWriter(socket.getOutputStream(), true); //Writing a OK back to clients\n out.println(msg);\n out.flush();\n\n // Receiving the ack\n BufferedReader inputStream = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n String ack = inputStream.readLine();\n if (ack != null) {\n Log.d(\"Recd after agreement: \", ack);\n }else{ //a node has failed because it did not respond with a valid ACK\n String failedPort = String.valueOf(socket.getPort());\n //Broadcasting the failure information to all others\n }\n\n out.close();\n inputStream.close();\n\n // close the socket\n socket.close();\n }\n }\n\n } catch (SocketTimeoutException e){\n Log.e(TAG, \"Socket timed out!\");\n e.printStackTrace();\n }\n catch (UnknownHostException e) {\n Log.e(TAG, \"ClientTask UnknownHostException\");\n } catch (IOException e) {\n Log.e(TAG, \"ClientTask socket IOException\");\n e.printStackTrace();\n } catch(NumberFormatException e){\n Log.e(TAG, \"Number format exception is found !\");\n }\n catch (Exception e){\n Log.e(TAG, \"Some Exception in Client Call\");\n e.printStackTrace();\n }\n\n return null;\n }",
"@Override\n\tpublic synchronized void ping() {\n\t\tDatagramPacket packet = table.toDatagramPacket();\n\t\tfor(Router routerSendingTo : listOfRouters){\n\t\t\tInetSocketAddress dstAddress = new InetSocketAddress(DEFAULT_DST_NODE, routerSendingTo.getPort());\n\t\t\tpacket.setSocketAddress(dstAddress);\n\t\t\ttry {\n\t\t\t\tsocket.send(packet);\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}\n\t\t}\n\t}",
"protected abstract void sendInternal(List<String> messages) throws NotificationException;",
"private void sendMessageToClient(String messageToClient){\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n output.println(\"\\n\" + \"Server: \" + messageToClient);\n output.flush();\n }\n });\n }",
"private void sendMessage() {\n\n // Get the right Prefix\n String prefix = null;\n\n if ( !messageGroup.getPrefix().equalsIgnoreCase(\"\") ) {\n prefix = messageGroup.getPrefix();\n } else {\n prefix = Announcer.getInstance().getConfig().getString(\"Settings.Prefix\");\n }\n\n Announcer.getInstance().getCaller().sendAnnouncment( messageGroup, prefix, counter);\n\n counter();\n\n }",
"public void tellEveryone(String message) \r\n\t{\r\n\t\tIterator it = Output_Streams_Client.iterator();\r\n\t\twhile (it.hasNext()) \r\n\t\t{\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tPrintWriter writer = (PrintWriter) it.next();\r\n\t\t\t\twriter.println(message);\r\n\t\t\t\tChat.append(\"Sending : \" + message + \"\\n\");\r\n\t\t\t\twriter.flush();\r\n\t\t\t\tChat.setCaretPosition(Chat.getDocument().getLength());\r\n\r\n\t\t\t} \r\n\t\t\tcatch (Exception ex) \r\n\t\t\t{\r\n\t\t\t\tChat.append(\"Mistake to tell everyone \\n\");\r\n\t\t\t}\r\n\t\t} \r\n\t}",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tObject server = serverDefinition.getServerFlag().getFlag();\n\t\t\t\t\tif (server == null) {\n\t\t\t\t\t\tshowPanel(CONNECTING_PANEL);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowPanel(CONNECTED_PANEL);\n\t\t\t\t\t}\n\t\t\t\t}",
"public void sendAnnouncement(String announce) throws RemoteException {\n System.out.print(\" Announcement received Hello client\");\n for (ClientInt cint : vclient) {\n try {\n cint.receiveAnnouncement(announce);\n } catch (RemoteException e) {\n System.out.println(\"do not send msg to client\");\n e.printStackTrace();\n }\n }\n }",
"private void sendMessage(Collection<? extends ClusterNode> nodes, GridTopic topic,\n GridEventStorageMessage msg, byte plc) throws IgniteCheckedException {\n ClusterNode locNode = F.find(nodes, null, F.localNode(ctx.localNodeId()));\n\n Collection<? extends ClusterNode> rmtNodes = F.view(nodes, F.remoteNodes(ctx.localNodeId()));\n\n if (locNode != null)\n ctx.io().sendToGridTopic(locNode, topic, msg, plc);\n\n if (!rmtNodes.isEmpty()) {\n msg.responseTopicBytes(U.marshal(marsh, msg.responseTopic()));\n\n ctx.io().sendToGridTopic(rmtNodes, topic, msg, plc);\n }\n }",
"@Override\n\tpublic void onSendPrivateChatDone(byte result) {\n\t\tif(WarpResponseResultCode.SUCCESS==result){\n\t\t\tLog.d(\"Receiver\", \"He is Online\");\n\t\t\tChatActivity.this.runOnUiThread(new Runnable() {\n\t\t\t\t public void run() {\n\t\t\t\t\t sa = ((SharingAtts)getApplication());\n\t\t\t\t\t ItemTest it = new ItemTest();\n\t\t\t\t\t String colNames = it.printData(\"chat\")[1];\n\t\t\t\t\t DBManager dbm = new DBManager(ChatActivity.this, colNames,\"chat\",it.printData(\"chat\")[0]);\n\t\t\t\t\t dbm.openToWrite();\n\t\t\t\t\t dbm.cretTable();\n\t\t\t\t\t msg = msg.replace(\" \", \"?*\");\n\t\t\t\t\t dbm.insertQuery(sa.name+\" \"+msg+\" \"+challenged, colNames.split(\" \")[1]+\" \"+colNames.split(\" \")[2]+\" \"+colNames.split(\" \")[3]);\n\t\t\t\t\t dbm.close();\n\t\t\n\t\t\t\t }\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\tChatActivity.this.runOnUiThread(new Runnable() {\n\t\t\t\t public void run() {\n\t\t\t\t\t Toast.makeText(ChatActivity.this, \"Receiver is offline. Come back later\", Toast.LENGTH_SHORT).show();\t\n\t\t\t\t\t \n\t\t\t\t }\n\t\t\t});\n\t\t}\n\t}",
"public void sendGameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDGM\" + lobby.getGameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void BroadcastMessage(String message) {\n\t\t\n\t\ttry\n\t\t{\n\t\tfor(Socket s : clients)\n\t\t{\n\t\t\tprintWriters.get(s).println(message);\n\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void sendHeartbeats() {\n\t\tHashSet<InetAddress> addresses = new HashSet<>(nodes.keySet());\n\t\t\n for (InetAddress addr : addresses) {\n\t\t\t// Take the mutex to ensure that no modifications are made to nodes\n\t\t\t// or channels while checking this node\n\t\t\tmutexLock.lock();\n\n // Check if the last heartbeat was responded to\n if (!nodes.containsKey(addr)) {\n mutexLock.unlock();\n continue;\n }\n\n NodeStatus node = nodes.get(addr);\n if (!(node.getLastResponse() == heartbeat.get())) {\n\n if (node.isAvailable()) {\n node.setAvailable(false);\n System.out.println(\"[\" + System.currentTimeMillis() + \" :: Node at \" + addr + \" is not available\");\n }\n }\n\n // Send the new heartbeat\n if (!channels.containsKey(addr)) {\n mutexLock.unlock();\n continue;\n }\n\n HeartbeatRequestMessage hrm = new HeartbeatRequestMessage(heartbeat.get()+1);\n SocketChannel channel = channels.get(addr);\n byte[] message = hrm.serialize();\n\n try {\n channel.write(ByteBuffer.wrap(message));\n } catch (ClosedChannelException cce) {\n channels.remove(addr);\n } catch (IOException e) {\n // Do something?\n }\n\n\t\t\t// Release the mutex\n\t\t\tmutexLock.unlock();\n }\n\n heartbeat.getAndIncrement();\n lastHeartbeatTime = System.currentTimeMillis();\n }",
"public void run() {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"SERVER: all players connected!\");\n\t\t\t\t\n\t\t\t\t//build the info message for clients\n\t\t\t\tString gameConfig = \"INFO \" + Integer.toString(pitsPerPlayer) + \" \" + Integer.toString(seedsPerPit)\n\t\t\t\t + \" \" + Integer.toString(timerValMils);\n\t\t\t\t\n\t\t\t\t//append first/second character\n\t\t\t\tif (playerNum == 1) {\n\t\t\t\t\tgameConfig += \" F\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tgameConfig += \" S\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//append random/uniform distro character\n\t\t\t\tif (randomDistro) {\n\t\t\t\t\tgameConfig += \" R\";\n\t\t\t\t\tcurrentGame = new kalah(pitsPerPlayer, seedsPerPit, randomDistro);\n\t\t\t\t\t\n\t\t\t\t\tArrayList<Integer> randomSeeds = currentGame.getP1pits();\n\t\t\t\t\tfor (int i = 0; i < randomSeeds.size(); i++) {\n\t\t\t\t\t\tgameConfig += \" \" + Integer.toString(randomSeeds.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tgameConfig += \" S\";\n\t\t\t\t\tcurrentGame = new kalah(pitsPerPlayer, seedsPerPit, randomDistro);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//send to server \n\t\t\t\twriter.println(gameConfig);\n\t\t\t\t\n\t\t\t\t//process client commands (game loop for each client)\n\t\t\t\twhile (true) {\n\t\t\t\t\t\n\t\t\t\t\tString clientMessage = reader.readLine();\n\t\t\t\t\t\n\t\t\t\t\t//ignore empty commands\n\t\t\t\t\tif (!clientMessage.equals(null) && !clientMessage.equals(\"\")) {\n\t\t\t\t\t\tif (clientMessage.startsWith(\"MOVE\")) {\n\t\t\t\t\t\t\tSystem.out.println(\"SERVER: Client \" + playerNum + \" sent move: \" + clientMessage.substring(5));\n\n\t\t\t\t\t\t\tint clientMove = Integer.parseInt(clientMessage.substring(5));\n\n\t\t\t\t\t\t\tif (currentGame.move(clientMove)) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"SERVER: acknowledged client \" + playerNum + \"'s \" + \"move: \" + clientMessage.substring(5));\n\t\t\t\t\t\t\t\twriter.println(\"OK\");\n\n\t\t\t\t\t\t\t\t//send move to other client to keep their game in sync\n\t\t\t\t\t\t\t\topponent.writer.println(\"MOVE \" + clientMessage.substring(5));\n\t\t\t\t\t\t\t\tSystem.out.println(\"SERVER: Sent move \" + clientMessage.substring(5) + \" to client \" + opponent.playerNum);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//check for winner \n\t\t\t\t\t\t\t\tcurrentGame.checkGameOver();\n\t\t\t\t\t\t\t\tif (currentGame.gameOver) {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"SERVER: GAME OVER\");\n\t\t\t\t\t\t\t\t\tif (currentGame.winner == 0) {\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SERVER: Tie!\");\n\t\t\t\t\t\t\t\t\t\twriter.println(\"TIE\");\n\t\t\t\t\t\t\t\t\t\topponent.writer.println(\"TIE\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (playerNum == currentGame.winner) {\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SERVER: Player \" + playerNum + \" wins!\");\n\t\t\t\t\t\t\t\t\t\twriter.println(\"WINNER\");\n\t\t\t\t\t\t\t\t\t\topponent.writer.println(\"LOSER\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SERVER: Player \" + playerNum + \" wins!\");\n\t\t\t\t\t\t\t\t\t\twriter.println(\"LOSER\");\n\t\t\t\t\t\t\t\t\t\topponent.writer.println(\"WINNER\");\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} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\"SERVER: rejected client's move: \" + clientMessage.substring(5));\n\t\t\t\t\t\t\t\twriter.println(\"ILLEGAL\");\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\tcatch (IOException e) {\n\t\t\t\tSystem.out.println(\"Player error: \" + e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\ttry {\n\t\t\t\t\tsocket.close();\n\t\t\t\t}\n\t\t\t\tcatch (IOException e) {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"@Override\n\tprotected Object doInBackground(Object... params){\n\t\tif(socketSet == 0){\n\t\t\ttry{\n\t\t\t\tif(socket == null){\n\t\t\t\t\tsocket = new Socket(ip,Room.PORT);\n\t\t\t\t}\n\t\t\t\tobjIn = new ObjectInputStream(socket.getInputStream());\n\t\t\t\tboard.addClient(socket);\n\t\t\t\tsocketSet = 2;\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tpublishProgress(\"ERROR: Couldn't establish receiver: \"+e.getClass());\n\t\t\t}\n\t\t}\n\t\telse if(socketSet == 1){\n\t\t\ttry{\n\t\t\t\tobjIn = new ObjectInputStream(socket.getInputStream());\n\t\t\t\tboard.addClient(socket);\n\t\t\t\tsocketSet = 2;\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tpublishProgress(\"ERROR: Couldn't establish server receiver: \"+e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\twhile(true){\n\t\t\tif(isCancelled())\n\t\t\t\tbreak;\n\t\t\ttry{\n\t\t\t\tMove m = (Move)objIn.readObject();\n\t\t\t\t//Add the move to this board\n\t\t\t\tboard.makeMove(m);\n\t\t\t\t//If on the server - send to everyone else\n\t\t\t\t\n\t\t\t\t/*if(recId != -1){\n\t\t\t\t\tm.id = recId;\n\t\t\t\t\tfor(int i = 0; i < ServerThread.clients.size(); i++){\n\t\t\t\t\t\t(new ObjectOutputStream(ServerThread.clients.get(i).getOutputStream())).writeObject(m);\n\t\t\t\t\t}\n\t\t\t\t}*/\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tpublishProgress(\"ERROR: Receiver connection error: \"+e.getClass());\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}",
"public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}",
"private void sendTextMessageToFriend(String friendsPhoneNumber) {\n String newMsg = \"I am nearing your location. (Now ending trip and automatic text notifications)\";\n Toast.makeText(this, \"Notifying: \" + friendsPhoneNumber, Toast.LENGTH_SHORT).show();\n SmsManager smsManager = SmsManager.getDefault();\n smsManager.sendTextMessage(friendsPhoneNumber, null, newMsg, null, null);\n showEndOfTripNotification();\n stopServiceAndLocationUpdates();\n }",
"public void sendMessageToSpecific() {\n try {\n if (socket == null){\n JOptionPane.showMessageDialog(null, \"SSLSocket is not connected to server. Connect before sending message.\",Env.ChatClientMessageBoxTitle, JOptionPane.ERROR_MESSAGE);\n return;\n }\n String usernameSendTo = JOptionPane.showInputDialog(null, \"Enter username to send message to\");\n String msg = JOptionPane.showInputDialog(null, \"Enter message to send to client with username: \" + usernameSendTo);\n if (usernameSendTo.trim().equals(user.getUsername().trim())){\n JPanel jp = new JPanel();\n jp.setLayout(new BorderLayout());\n JLabel jl = new JLabel(\n \"<html><font color=red><b>Are you sure that you want to send a message to yourself? </font>:\"\n + \"</b><br><br></html>\");\n Font font = new Font(\"Arial\", java.awt.Font.PLAIN, 14);\n jl.setFont(font);\n jp.add(jl, BorderLayout.NORTH);\n if (JOptionPane.showConfirmDialog(null, jp, Env.ChatClientMessageBoxTitle,\n JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE, null) == 0) {\n PrintWriter writer = new PrintWriter(new OutputStreamWriter(socket.getOutputStream(), \"UTF-8\"), true);\n writer.println(passUtil.toHexString(\"msgspecific|split|\" + usernameSendTo + \"|split|\" + user.getUsername() + \"|split|\" + msg));\n writer.flush();\n chatClientController.appendToPane(new Date(System.currentTimeMillis()) + \": You (\" + user.getUsername() + \"): To: \" + usernameSendTo + \": \" + msg, \"BLUE\", null);\n } else {\n System.out.println(\"Input cancelled\");\n }\n } else {\n PrintWriter writer = new PrintWriter(new OutputStreamWriter(socket.getOutputStream(), \"UTF-8\"), true);\n writer.println(passUtil.toHexString(\"msgspecific|split|\" + usernameSendTo + \"|split|\" + user.getUsername() + \"|split|\" + msg));\n writer.flush();\n chatClientController.appendToPane(new Date(System.currentTimeMillis()) + \": You (\" + user.getUsername() + \"): To: \" + usernameSendTo + \": \" + msg, \"BLUE\", null);\n }\n } catch (Exception ex){\n ex.printStackTrace();\n if (ex.toString().toLowerCase().contains(\"socket output is already shutdown\")){\n disconnectFromServer(false);\n }\n JOptionPane.showMessageDialog(null, \"Error sending message: \" + ex.toString(),Env.ChatClientMessageBoxTitle, JOptionPane.ERROR_MESSAGE);\n }\n }",
"public void sendToCurrClient ( String message ){\n currClient.send( message );\n ServerConnection[] clients = new ServerConnection[]{client1, client2, client3};\n for(ServerConnection c: clients){\n if(c != currClient && c != null )\n if ( !message.contains(\"You won\") )\n c.send(\"Wait for \" + currClient.getName() + \" to end his turn\" );\n else c.send(\"You lost the match. \" + currClient.getName() + \" won the game.\");\n }\n }",
"public void broadcast() {\n for (int i = 1; i <= nbMessagesToBroadcast; i++) {\n Message broadcastMsg = new Message(pid, pid, i,false, null);\n lcb.broadcast(broadcastMsg);\n logs.add(String.format(\"b %d\\n\",i));\n }\n }",
"private void sendTextToAllClients(String text) {\n\t\tfor (ClientManager cm : serverHolder.findAllClientManagers()) {\n\t\t\tcm.sendText(name, text);\n\t\t}\n\t}",
"protected void sendMessage() throws IOException {\r\n\t\tif (smscListener != null) {\r\n\t\t\tint procCount = processors.count();\r\n\t\t\tif (procCount > 0) {\r\n\t\t\t\tString client;\r\n\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\tlistClients();\r\n\t\t\t\tif (procCount > 1) {\r\n\t\t\t\t\tSystem.out.print(\"Type name of the destination> \");\r\n\t\t\t\t\tclient = keyboard.readLine();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(0);\r\n\t\t\t\t\tclient = proc.getSystemId();\r\n\t\t\t\t}\r\n\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\tif (proc.getSystemId().equals(client)) {\r\n\t\t\t\t\t\tif (proc.isActive()) {\r\n\t\t\t\t\t\t\tSystem.out.print(\"Type the message> \");\r\n\t\t\t\t\t\t\tString message = keyboard.readLine();\r\n\t\t\t\t\t\t\tDeliverSM request = new DeliverSM();\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trequest.setShortMessage(message);\r\n\t\t\t\t\t\t\t\tproc.serverRequest(request);\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Message sent.\");\r\n\t\t\t\t\t\t\t} catch (WrongLengthOfStringException e) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Message sending failed\");\r\n\t\t\t\t\t\t\t\tevent.write(e, \"\");\r\n\t\t\t\t\t\t\t} catch (IOException ioe) {\r\n\t\t\t\t\t\t\t} catch (PDUException pe) {\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tSystem.out.println(\"This session is inactive.\");\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} else {\r\n\t\t\t\tSystem.out.println(\"No client connected.\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"You must start listener first.\");\r\n\t\t}\r\n\t}",
"private void sendToAll(String msg){\r\n for(ClientHandler ch: clientThreads){\r\n try{\r\n //Get the client's ObjectOutputStream\r\n ObjectOutputStream oos = ch.getOOS();\r\n //Print the message to the client\r\n oos.writeObject(new DataWrapper(DataWrapper.STRINGCODE, msg, false));\r\n } catch(IOException ioe) {\r\n System.out.println(\"IOException occurred: \" + ioe.getMessage());\r\n ioe.printStackTrace();\r\n }\r\n }\r\n }",
"public void sendDirectedPresence() {\n Cursor cursor = getContentResolver().query(\n Roster.CONTENT_URI,\n new String[]{Roster.LAST_UPDATED},\n null, null, \"last_updated desc\"\n );\n if (cursor.moveToFirst()) {\n long after = cursor.getLong(\n cursor.getColumnIndex(Roster.LAST_UPDATED));\n Presence presence = new Presence(Type.available);\n presence.setTo(\"broadcaster.buddycloud.com\");\n client.sendFromAllResources(presence);\n }\n cursor.close();\n }",
"public synchronized void broadcast(String message, String username)\r\n {\r\n\r\n\r\n if (username == \"server\")\r\n {\r\n\r\n }\r\n //this was for private chat\r\n else\r\n {\r\n int k = 0;\r\n while (k < clientList.size())\r\n {\r\n if(clientList.get(k).username.equals(username))\r\n {\r\n try \r\n {\r\n OutputStream os = clientList.get(k).socket.getOutputStream();\r\n OutputStreamWriter osw = new OutputStreamWriter(os);\r\n BufferedWriter bw = new BufferedWriter(osw);\r\n bw.write(message);\r\n bw.flush();\r\n }\r\n catch(IOException e)\r\n {\r\n System.out.println(\"Error setting up private chat\");\r\n }\r\n }\r\n }\r\n }\r\n String messageLf = \" \" + message + \"\\n\";\r\n\r\n\r\n System.out.print(messageLf);\r\n for(int i = clientList.size(); --i >= 0;)\r\n {\r\n ClientProcess ct = clientList.get(i);\r\n\r\n if(!ct.writeMessage(messageLf))\r\n {\r\n clientList.remove(i);\r\n displayMessage(\"Disconnected Client \" + ct.username + \" removed from list.\");\r\n }\r\n }\r\n }",
"public void broadcastMessage(ArrayList<Client> clients, String message) {\n\t\tfor (Client client : clients) {\n\t\t\tsendClientMsg(client, message);\n\t\t}\n\t}",
"private void sendMsg()\n {\n try {\n spauldingApp.println(\"AckRequest.sendMsg() - sending request to nodeID= \" + node.getNodeID() + \" ...\");\n this.nbrTransmits++;\n //spauldingApp.eventLogger.writeMsgSentPing(fetchReqMsg);\n spauldingApp.getMoteIF().send(node.getNodeID(), requestMsg);\n } catch (Exception e) {\n spauldingApp.println(\"ERROR: Can't send message: \" + e);\n e.printStackTrace();\n }\n }",
"private void manageClients() {\n manage = new Thread(\"Manage\") {\n public void run() {\n //noinspection StatementWithEmptyBody\n while (running) {\n sendToAll(\"/p/server ping/e/\".getBytes());\n try {\n Thread.sleep(1500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n //noinspection ForLoopReplaceableByForEach\n for (int i = 0; i < clients.size(); i++) {\n ServerClient tempClient = clients.get(i);\n if (!clientResponse.contains(tempClient.getID())) {\n if (tempClient.getAttempt() >= MAX_ATTEMPTS)\n disconnect(tempClient.getID(), false);\n else\n tempClient.setAttempt(tempClient.getAttempt() + 1);\n } else {\n clientResponse.remove(new Integer(tempClient.getID()));\n tempClient.setAttempt(0);\n }\n }\n }\n }\n };\n manage.start();\n }",
"@Override\n\tpublic void forceStateBroadcast() {\n\t\tpeerDiscoveryService.sendStateMulticast();\n\t}",
"public void sendMessages(String[] messages)\r\n\t{\r\n\t\tfor(Player player: this.players)\r\n\t\t{\r\n\t\t\tif(player != null)\r\n\t\t\t{\r\n\t\t\t\tplayer.sendMessages(messages);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void main(String[] args) throws Exception {\n JFrame frame = new JFrame (\"Chatting Server\");\r\n frame.setLayout(null);\r\n frame.setBounds(100, 100, 300, 300);\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\r\n JLabel connectionStatusLabel = new JLabel(\"No Clients Connected\");\r\n connectionStatusLabel.setBounds(80, 30, 200, 30);\r\n connectionStatusLabel.setForeground(Color.red);\r\n frame.getContentPane().add(connectionStatusLabel);\r\n\r\n // create the welcoming server's socket\r\n ServerSocket welcomeSocket = new ServerSocket(6789);\r\n\r\n // thread to always listen for new connections from clients\r\n new Thread (new Runnable(){ @Override\r\n public void run() {\r\n\r\n Socket connectionSocket;\r\n DataOutputStream outToClient;\r\n\r\n while (!welcomeSocket.isClosed()) {\r\n\r\n try {\r\n // when a new client connect, accept this connection and assign it to a new connection socket\r\n connectionSocket = welcomeSocket.accept();\r\n\r\n // create a new output stream and send the message \"You are connected\" to the client\r\n outToClient = new DataOutputStream(connectionSocket.getOutputStream());\r\n outToClient.writeBytes(\"-Connected\\n\");\r\n\r\n clientCount++;\r\n\r\n // add the new client to the client's array\r\n Clients.add(new ClientThread(clientCount, connectionSocket, Clients));\r\n // start the new client's thread\r\n Clients.get(Clients.size() - 1).start();\r\n\r\n }\r\n catch (Exception ex) {\r\n\r\n }\r\n\r\n }\r\n\r\n }}).start();\r\n\r\n\r\n\r\n // thread to always get the count of connected clients and update the label\r\n new Thread (new Runnable(){ @Override\r\n public void run() {\r\n\r\n try {\r\n\r\n while (true) {\r\n\r\n if (Clients.size() > 0)\r\n {\r\n if (Clients.size() == 1)\r\n connectionStatusLabel.setText(\"1 Client Connected\");\r\n else\r\n connectionStatusLabel.setText(Clients.size() + \" Clients Connected\");\r\n\r\n connectionStatusLabel.setForeground(Color.blue);\r\n }\r\n else { //if there are no clients connected, print \"No Clients Connected\"\r\n\r\n connectionStatusLabel.setText(\"No Clients Connected\");\r\n connectionStatusLabel.setForeground(Color.red);\r\n\r\n }\r\n\r\n\r\n Thread.sleep(1000);\r\n\r\n }\r\n\r\n } catch (Exception ex) {\r\n\r\n }\r\n\r\n }}).start();\r\n\r\n\r\n\r\n frame.setVisible(true);\r\n\r\n }",
"private void broadcast(ArrayList<Integer> update){\n for (Player p : players.values()){\n p.sendModel(update);\n }\n }",
"@Override\n\tpublic void assignPids() {\n\t\tThread t = new Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\twhile (nPidsAssigned < nProc -1) {\n\t\t\t\t\t\tinitConn.connectRetry(coordinatorHostname, 20000);\n\n\t\t\t\t\t\tnPidsAssigned++;\n\t\t\t\t\t\t// Pid 1 is reserved for the coordinator.\n\t\t\t\t\t\tint newPid = nPidsAssigned + 1;\n\t\t\t\t\t\tString hostname = initConn.getHostName();\n\t\t\t\t\t\tinitConn.send(((Integer)newPid).toString());\n\t\t\t\t\t\tinitConn.send(pidToHolderMap.get(newPid).toString());\n\t\t\t\t\t\tsynchronized (pidToHostnameMap) {\n\t\t\t\t\t\t\tpidToHostnameMap.put(newPid, hostname);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"PID: \" + newPid + \" sent\\n\");\n\n\t\t\t\t\t\tinitConn.close();\n\t\t\t\t\t}\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(pidToHostnameMap.toString());\n\t\t\t}\n\t\t});\n\t\tt.start();\n\t}",
"public void sendUdpMessageToDrone() {\n\n DatagramPacket packet = null;\n try {\n packet = new DatagramPacket(message.getBytes(), message.length(), InetAddress.getByName(\"127.0.0.1\"), 6000);\n sender.send(packet);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic String execute() throws Exception {\n\t\treturn \"send\";\n\t}",
"@Override\n\tpublic void execute() {\n\t\tlog.info(\"running...\");\n\n\n\t\t/* example for finding the server agent */\n\t\tIAgentDescription serverAgent = thisAgent.searchAgent(new AgentDescription(null, \"ServerAgent\", null, null, null, null));\n\t\tif (serverAgent != null) {\n\t\t\tthis.server = serverAgent.getMessageBoxAddress();\n\n\t\t\t// TODO\n\t\t\tif (!hasGameStarted) {\n\t\t\t\tStartGameMessage startGameMessage = new StartGameMessage();\n\t\t\t\tstartGameMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\tstartGameMessage.gridFile = \"/grids/h_01.grid\";\n\t\t\t\t// Send StartGameMessage(BrokerID)\n\t\t\t\tsendMessage(server, startGameMessage);\n\t\t\t\treward = 0;\n\t\t\t\tthis.hasGameStarted = true;\n\t\t\t}\n\n\t\t} else {\n\t\t\tSystem.out.println(\"SERVER NOT FOUND!\");\n\t\t}\n\n\n\t\t/* example of handling incoming messages without listener */\n\t\tfor (JiacMessage message : memory.removeAll(new JiacMessage())) {\n\t\t\tObject payload = message.getPayload();\n\n\t\t\tif (payload instanceof StartGameResponse) {\n\t\t\t\t/* do something */\n\n\t\t\t\t// TODO\n\t\t\t\tStartGameResponse startGameResponse = (StartGameResponse) message.getPayload();\n\n\t\t\t\tthis.maxNum = startGameResponse.initialWorkers.size();\n\t\t\t\tthis.agentDescriptions = getMyWorkerAgents(this.maxNum);\n\t\t\t\tthis.gameId = startGameResponse.gameId;\n\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + startGameResponse.toString());\n\n\t\t\t\t// TODO handle movements and obstacles\n\t\t\t\tthis.gridworldGame = new GridworldGame();\n\t\t\t\tthis.gridworldGame.obstacles.addAll(startGameResponse.obstacles);\n\n\n\n\t\t\t\t// TODO nicht mehr worker verwenden als zur Verfügung stehen\n\n\t\t\t\t/**\n\t\t\t\t * Initialize the workerIdMap to get the agentDescription and especially the\n\t\t\t\t * MailBoxAdress of the workerAgent which we associated with a specific worker\n\t\t\t\t *\n\n\t\t\t\tfor (Worker worker: startGameResponse.initialWorkers) {\n\t\t\t\t\tworkerIdMap.put(worker.id, this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)));\n\t\t\t\t\tworkerIdReverseAId.put(this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)).getAid(), worker.id);\n\t\t\t\t} */\n\n\t\t\t\t/**\n\t\t\t\t * Send the Position messages to each Agent for a specific worker\n\t\t\t\t * PositionMessages are sent to inform the worker where it is located\n\t\t\t\t * additionally put the position of the worker in the positionMap\n\t\t\t\t */\n\t\t\t\tfor (Worker worker: startGameResponse.initialWorkers) {\n\t\t\t\t\tpositionMap.put(worker.id, worker.position);\n\n\t\t\t\t\tworkerIdMap.put(worker.id, this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)));\n\t\t\t\t\tworkerIdReverseAID.put(this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)).getAid(), worker.id);\n\n\t\t\t\t\tIAgentDescription agentDescription = workerIdMap.get(worker.id);\n\t\t\t\t\tICommunicationAddress workerAddress = agentDescription.getMessageBoxAddress();\n\n\t\t\t\t\t// Send each Agent their current position\n\t\t\t\t\tPositionMessage positionMessage = new PositionMessage();\n\t\t\t\t\tpositionMessage.workerId = agentDescription.getAid();\n\t\t\t\t\tpositionMessage.gameId = startGameResponse.gameId;\n\t\t\t\t\tpositionMessage.position = worker.position;\n\t\t\t\t\tpositionMessage.workerIdForServer = worker.id;\n\t\t\t\t\t//System.out.println(\"ADDRESS IS \" + workerAddress);\n\n\t\t\t\t\tsendMessage(workerAddress, positionMessage);\n\t\t\t\t\t//break;\n\t\t\t\t}\n\n\t\t\t\thasAgents = true;\n\n\t\t\t\tfor (Order order: savedOrders) {\n\t\t\t\t\t// 3 Runden anfangs zum Initialisieren\n\t\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(order);\n\t\t\t\t\tPosition workerPosition = null;\n\t\t\t\t\tfor (IAgentDescription agentDescription: agentDescriptions) {\n\t\t\t\t\t\tif (agentDescription.getMessageBoxAddress().equals(workerAddress)) {\n\t\t\t\t\t\t\tString workerId = workerIdReverseAID.get(agentDescription.getAid());\n\t\t\t\t\t\t\tworkerPosition = positionMap.get(workerId);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tint steps = workerPosition.distance(order.position) + 2;\n\t\t\t\t\tint rewardMove = (steps > order.deadline)? 0 : order.value - steps * order.turnPenalty;\n\n\t\t\t\t\tSystem.out.println(\"REWARD: \" + rewardMove);\n\n\t\t\t\t\tif(rewardMove > 0) {\n\t\t\t\t\t\tTakeOrderMessage takeOrderMessage = new TakeOrderMessage();\n\t\t\t\t\t\ttakeOrderMessage.orderId = order.id;\n\t\t\t\t\t\ttakeOrderMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\t\t\ttakeOrderMessage.gameId = gameId;\n\t\t\t\t\t\tsendMessage(server, takeOrderMessage);\n\n\t\t\t\t\t\t// Save order into orderMap\n\t\t\t\t\t\tthis.orderMap.put(order.id, order);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (payload instanceof PositionConfirm) {\n\t\t\t\tPositionConfirm positionConfirm = (PositionConfirm) message.getPayload();\n\t\t\t\tif(positionConfirm.state == Result.FAIL) {\n\t\t\t\t\tString workerId = workerIdReverseAID.get(positionConfirm.workerId);\n\t\t\t\t\tIAgentDescription agentDescription = workerIdMap.get(workerId);\n\t\t\t\t\tICommunicationAddress workerAddress = agentDescription.getMessageBoxAddress();\n\n\t\t\t\t\tPositionMessage positionMessage = new PositionMessage();\n\n\t\t\t\t\tpositionMessage.workerId = agentDescription.getAid();\n\t\t\t\t\tpositionMessage.gameId = positionConfirm.gameId;\n\t\t\t\t\tpositionMessage.position = positionMap.get(workerId);\n\t\t\t\t\tpositionMessage.workerIdForServer = workerId;\n\n\t\t\t\t\tsendMessage(workerAddress, positionMessage);\n\t\t\t\t} else {\n\t\t\t\t\tactiveWorkers.add(message.getSender());\n\t\t\t\t\tfor (String orderId: orderMessages) {\n\t\t\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(this.orderMap.get(orderId));\n\t\t\t\t\t\tif(workerAddress.equals(message.getSender())){\n\t\t\t\t\t\t\tAssignOrderMessage assignOrderMessage = new AssignOrderMessage();\n\t\t\t\t\t\t\tassignOrderMessage.order = this.orderMap.get(orderId);\n\t\t\t\t\t\t\tassignOrderMessage.gameId = gameId;\n\t\t\t\t\t\t\tassignOrderMessage.server = this.server;\n\t\t\t\t\t\t\tif(activeWorkers.contains(workerAddress)){\n\t\t\t\t\t\t\t\tsendMessage(workerAddress, assignOrderMessage);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t\tif (payload instanceof OrderMessage) {\n\n\t\t\t\t// TODO entscheide, ob wir die Order wirklich annehmen wollen / können\n\n\t\t\t\tOrderMessage orderMessage = (OrderMessage) message.getPayload();\n\n\t\t\t\tif (!hasAgents){\n\t\t\t\t\tsavedOrders.add(orderMessage.order);\n\t\t\t\t\tcontinue;\n\t\t\t\t}else {\n\t\t\t\t\tOrder thisOrder = orderMessage.order;\n\n\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(thisOrder);\n\t\t\t\tPosition workerPosition = null;\n\t\t\t\tfor (IAgentDescription agentDescription: agentDescriptions) {\n\t\t\t\t\tif (agentDescription.getMessageBoxAddress().equals(workerAddress)) {\n\t\t\t\t\t\tString workerId = workerIdReverseAID.get(agentDescription.getAid());\n\t\t\t\t\t\tworkerPosition = positionMap.get(workerId);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// 3 Runden anfangs zum Initialisieren\n\t\t\t\t\tint steps = workerPosition.distance(thisOrder.position) + 1;\n\t\t\t\t\tint rewardMove = (steps > thisOrder.deadline)? 0 : thisOrder.value - steps * thisOrder.turnPenalty;\n\n\n\t\t\t\t\tSystem.out.println(\"REWARD: \" + rewardMove);\n\n\t\t\t\tif(rewardMove > 0) {\n\t\t\t\t\tTakeOrderMessage takeOrderMessage = new TakeOrderMessage();\n\t\t\t\t\ttakeOrderMessage.orderId = orderMessage.order.id;\n\t\t\t\t\ttakeOrderMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\t\ttakeOrderMessage.gameId = orderMessage.gameId;\n\t\t\t\t\tsendMessage(server, takeOrderMessage);\n\n\t\t\t\t\t// Save order into orderMap\n\t\t\t\t\tOrder order = ((OrderMessage) message.getPayload()).order;\n\t\t\t\t\tthis.orderMap.put(order.id, order);\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 * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + orderMessage.toString());\n\n\t\t\t\t// Save order into orderMap\n\n\t\t\t}\n\n\t\t\tif (payload instanceof TakeOrderConfirm) {\n\n\t\t\t\t// TODO\n\t\t\t\t// Got Order ?!\n\t\t\t\tTakeOrderConfirm takeOrderConfirm = (TakeOrderConfirm) message.getPayload();\n\t\t\t\tResult result = takeOrderConfirm.state;\n\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + takeOrderConfirm.toString());\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// Handle failed confirmation\n\n\t\t\t\t\t// Remove order from orderMap as it was rejected by the server\n\t\t\t\t\tthis.orderMap.remove(takeOrderConfirm.orderId);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\n\t\t\t\t// TODO send serverAddress\n\t\t\t\t// Assign order to Worker(Bean)\n\t\t\t\t// Send the order to the first agent\n\t\t\t\tAssignOrderMessage assignOrderMessage = new AssignOrderMessage();\n\t\t\t\tassignOrderMessage.order = this.orderMap.get(takeOrderConfirm.orderId);\n\t\t\t\tassignOrderMessage.gameId = takeOrderConfirm.gameId;\n\t\t\t\tassignOrderMessage.server = this.server;\n\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(assignOrderMessage.order);\n\t\t\t\tif(activeWorkers.contains(workerAddress)){\n\t\t\t\t\tsendMessage(workerAddress, assignOrderMessage);\n\t\t\t\t} else {\n\t\t\t\t\torderMessages.add(takeOrderConfirm.orderId);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (payload instanceof AssignOrderConfirm) {\n\n\t\t\t\t// TODO\n\t\t\t\tAssignOrderConfirm assignOrderConfirm = (AssignOrderConfirm) message.getPayload();\n\t\t\t\tResult result = assignOrderConfirm.state;\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// Handle failed confirmation\n\t\t\t\t\t// TODO\n\t\t\t\t\tICommunicationAddress alternativeWorkerAddress = getAlternativeWorkerAddress(((AssignOrderConfirm) message.getPayload()).workerId);\n\t\t\t\t\treassignOrder(alternativeWorkerAddress, assignOrderConfirm);\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\torderMessages.remove(assignOrderConfirm.orderId);\n\n\t\t\t\t// TODO Inform other workers that this task is taken - notwendig??\n\n\t\t\t}\n\n\t\t\tif (payload instanceof OrderCompleted) {\n\n\t\t\t\tOrderCompleted orderCompleted = (OrderCompleted) message.getPayload();\n\t\t\t\tResult result = orderCompleted.state;\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// TODO Handle failed order completion -> minus points for non handled rewards\n\t\t\t\t\treward += orderCompleted.reward;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\treward += orderCompleted.reward;\n\t\t\t\t// TODO remove order from the worker specific order queues\n\n\t\t\t}\n\n\t\t\tif (payload instanceof PositionUpdate) {\n\n\t\t\t\tPositionUpdate positionUpdate = (PositionUpdate) message.getPayload();\n\t\t\t\tupdateWorkerPosition(positionUpdate.position, positionUpdate.workerId);\n\n\t\t\t}\n\n\t\t\tif (payload instanceof EndGameMessage) {\n\n\t\t\t\tEndGameMessage endGameMessage = (EndGameMessage) message.getPayload();\n\t\t\t\t// TODO lernen lernen lernen lol\n\t\t\t\tSystem.out.println(\"Reward: \" + endGameMessage.totalReward);\n\t\t\t}\n\n\t\t}\n\t}",
"public void sendMessage()throws Exception{\r\n\r\n\t\ttry{\r\n\r\n\t\t\tintiSettings();\r\n\r\n\t\t\tproducer = new KafkaProducer(prop);\r\n\r\n\t\t\tSystem.out.println(\"Message to be sent from Producer:\");\r\n\t\t\tfor(int i=0;i<messageList.size();i++){\r\n\t\t\t\tSystem.out.println(messageList.get(i));\r\n\t\t\t\tproducer.send(new ProducerRecord(topicName, messageList.get(i)));\r\n\t\t\t}\r\n\t\t}catch(ProducerFencedException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}catch(OutOfOrderSequenceException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}catch(AuthorizationException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}catch(KafkaException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\tproducer.abortTransaction();\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tproducer.close();\r\n\t\t}\r\n\t}",
"private void sendMsgToClient(String msg) {\n controlOutWriter.println(msg);\n }",
"public static void server(String... messages) {\n\t\tString finalmessage = \"\";\n\t\tfor (String message : messages) {\n\t\t\tfinalmessage += message;\n\t\t}\n\t\tSystem.out.println(\"[SERVER] \" + finalmessage);\n\t}",
"public void onConnected() {\n userName = conn.getUsername();\n tellManagers(\"I have arrived.\");\n tellManagers(\"Running {0} version {1} built on {2}\", BOT_RELEASE_NAME, BOT_RELEASE_NUMBER, BOT_RELEASE_DATE);\n command.sendCommand(\"set noautologout 1\");\n command.sendCommand(\"set style 13\");\n command.sendCommand(\"-notify *\");\n Collection<Player> players = tournamentService.findScheduledPlayers();\n for (Player p : players) {\n command.sendCommand(\"+notify {0}\", p);\n }\n conn.addDatagramListener(conn, Datagram.DG_NOTIFY_ARRIVED);\n conn.addDatagramListener(conn, Datagram.DG_NOTIFY_LEFT);\n\n Runnable task = new SafeRunnable() {\n\n @Override\n public void safeRun() {\n onConnectSpamDone();\n }\n };\n //In 2 seconds, call onConnectSpamDone().\n scheduler.schedule(task, 4, TimeUnit.SECONDS);\n System.out.println();\n }",
"@Override\n public void sendMessage(Message m) {\n commSender.sendMessage(m);\n }",
"public void sendSCMessage(CommandSender sender, Player receiver, StringPlaceholders placeholders) {\n if (sender instanceof Player) {\n receiver.spigot().sendMessage(TextComponent.fromLegacyText(HexUtils.colorify(this.parsePlaceholders(sender, placeholders.apply(ConfigManager.Setting.STAFFCHAT_FORMAT.getString())))));\n }\n }",
"public void sendMessage( MessagingV2 friend )\n {\n if( msg.length() == 0 )\n System.err.println( \"There is no message to send\" );\n else\n {\n System.out.println( user + \", your message has been sent\" );\n friend.receiveMessage( msg, user );\n msg = \"\";\n }\n }",
"@Test\n\tpublic void notifiesOnSendChatToServer() throws AlreadyBoundException, NotBoundException\n\t{\n\t\tClientPlayerManager.getSingleton().initiateLogin(\"X\", \"X\");\n\t\tClientPlayer p = ClientPlayerManager.getSingleton().finishLogin(1);\n\t\tp.setPosition(new Position(5,5));\n\t\tp.setName(\"my name\");\n\t\t\n\t\tQualifiedObserver obs = EasyMock.createMock(QualifiedObserver.class);\n\t\tChatSentReport report = new ChatSentReport(\"message\", \"my name\", p.getPosition(), ChatType.Local);\n\t\tQualifiedObservableConnector.getSingleton().registerObserver(obs,\n\t\t\t\tChatSentReport.class);\n\t\tobs.receiveReport(EasyMock.eq(report));\n\t\tEasyMock.replay(obs);\n\n\t\tChatManager.getSingleton().sendChatToServer(\"message\", ChatType.Local);\n\n\t\tEasyMock.verify(obs);\n\t}",
"private void sendUpdatePartitionInfoRpcCall(\n\t\t\tfinal Iterable<PartitionInfo> partitionInfos) {\n\n\t\tfinal LogicalSlot slot = assignedResource;\n\n\t\tif (slot != null) {\n\t\t\tfinal TaskManagerGateway taskManagerGateway = slot.getTaskManagerGateway();\n\t\t\tfinal TaskManagerLocation taskManagerLocation = slot.getTaskManagerLocation();\n\n\t\t\tCompletableFuture<Acknowledge> updatePartitionsResultFuture = taskManagerGateway.updatePartitions(attemptId, partitionInfos, rpcTimeout);\n\n\t\t\tupdatePartitionsResultFuture.whenCompleteAsync(\n\t\t\t\t(ack, failure) -> {\n\t\t\t\t\t// fail if there was a failure\n\t\t\t\t\tif (failure != null) {\n\t\t\t\t\t\tfail(new IllegalStateException(\"Update to task [\" + getVertexWithAttempt() +\n\t\t\t\t\t\t\t\"] on TaskManager \" + taskManagerLocation + \" failed\", failure));\n\t\t\t\t\t}\n\t\t\t\t}, getVertex().getExecutionGraph().getJobMasterMainThreadExecutor());\n\t\t}\n\t}",
"@Override\n\tpublic void establishNeighborConn() throws Exception {\n\t\tList <Thread> tList = new ArrayList<Thread>();\n\t\tList<Integer> neighborPids = neighborMap.get(pid);\n\t\tnNeighbors = neighborPids.size();\n\t\tfor (int neighborPid : neighborPids) {\n\t\t\tThread t = new Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString neighborHostname = pidToHostnameMap.get(neighborPid);\n\t\t\t\t\t\tConnection neighborConn = new ServerConnection();\n\t\t\t\t\t\tint port = 10000 + (100*pid) + neighborPid;\n\t\t\t\t\t\tneighborConn.connectRetry(coordinatorHostname, port);\n\t\t\t\t\t\tneighborPidToHostnameMap.put(neighborPid, neighborHostname);\n\t\t\t\t\t\tneighborPidToConnMap.put(neighborPid, neighborConn);\n\t\t\t\t\t\tsendQueues.put(neighborPid, new LinkedList<String>());\n\t\t\t\t\t\tsayHelloToNeighbor(neighborConn);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\ttList.add(t);\n\t\t\tt.start();\n\t\t}\n\t\tfor (Thread t : tList) {\n\t\t\tt.join();\n\t\t}\n\t\tSystem.out.println(neighborPidToHostnameMap);\n\t\tSystem.out.println(neighborPidToConnMap);\n\t}",
"private void individualSend(UserLogic t) {\n if(t != UserLogic.this && t != null && ((String)UI.getContacts().getSelectedValue()).equals(t.username)){\r\n if(((String)t.UI.getContacts().getSelectedValue()).equals(username)) { //If both users are directly communicating\r\n t.UI.getProperList().addElement(username + \"> \" + UI.getMessage().getText()); //Send message\r\n t.UI.getContacts().setCellRenderer(clearNotification); //Remove notification\r\n }\r\n else{ //If the user are not directly communicating\r\n t.UI.getContacts().setCellRenderer(setNotification); //Set notification\r\n }\r\n if(t.chats.containsKey(username)){ //Store chats in other users database (When database exists)\r\n ArrayList<String> arrayList = t.chats.get(username); //Get data\r\n arrayList.add(username + \"> \" + UI.getMessage().getText()); //Add new message to the database\r\n t.chats.put(username, arrayList); //Store data\r\n }\r\n else { //When database doesn't exist\r\n ArrayList<String> arrayList = new ArrayList<>(); //create new database\r\n arrayList.add(username + \"> \" + UI.getMessage().getText()); //Add new message to the database\r\n t.chats.put(username, arrayList); //Store data\r\n }\r\n }\r\n //This writes on my screen\r\n if(t == UserLogic.this && t!=null){ //On the current user side\r\n UI.getProperList().addElement(\"Me> \" + UI.getMessage().getText()); //Write message to screen\r\n String currentChat = (String) UI.getContacts().getSelectedValue(); //Get selected user\r\n if(chats.containsKey(currentChat)){ //check if database exists\r\n ArrayList<String> arrayList = chats.get(currentChat);\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(currentChat, arrayList);\r\n }\r\n else { //When database doesn't exist\r\n ArrayList<String> arrayList = new ArrayList<>();\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(currentChat, arrayList);\r\n }\r\n }\r\n }",
"public void alertManagers(String msg, Object... args) {\n broadcast(ChatType.PERSONAL_TELL, monitorRole, \"!!!!!!!!! IMPORTANT ALERT !!!!!!!!!\");\n tellManagers(msg, args);\n }",
"@Override\n\tpublic void sendMsg(String msg) {\n\n\t}",
"public void run() {\n\n switch( operation )\n {\n case \"Timer\":\n System.out.println( \"INFO : Timer started\" );\n try {\n // wait 7 seconds\n Thread.sleep( 7000 );\n if( !receivedOk )\n {\n // OK not received. Set self as leader\n LeaderState.getInstance().setLeaderID( ServerState.getInstance().getSelfID() );\n electionInProgress = false; // allow another election request to come in\n leaderFlag = true;\n System.out.println( \"INFO : Server s\" + LeaderState.getInstance().getLeaderID()\n + \" is selected as leader! \" );\n\n LeaderState.getInstance().resetLeader(); // reset leader lists when newly elected\n\n Runnable sender = new BullyAlgorithm( \"Sender\", \"coordinator\" );\n new Thread( sender ).start();\n }\n\n if( receivedOk && !leaderFlag )\n {\n System.out.println( \"INFO : Received OK but coordinator message was not received\" );\n\n electionInProgress = false;\n receivedOk = false;\n\n Runnable sender = new BullyAlgorithm( \"Sender\", \"election\" );\n new Thread( sender ).start();\n }\n }\n catch( Exception e ) {\n System.out.println( \"INFO : Exception in timer thread\" );\n }\n break;\n\n case \"Heartbeat\":\n while( true ) {\n try {\n Thread.sleep(10);\n if( leaderFlag && ServerState.getInstance().getSelfID() != LeaderState.getInstance().getLeaderID() ) {\n Thread.sleep( 1500 );\n Server destServer = ServerState.getInstance().getServers()\n .get( LeaderState.getInstance().getLeaderID() );\n\n MessageTransfer.sendServer(\n ServerMessage.getHeartbeat( String.valueOf(ServerState.getInstance().getSelfID()) ),\n destServer\n );\n //System.out.println( \"INFO : Sent heartbeat to leader s\" + destServer.getServerID() );\n }\n }\n\n catch( Exception e ) {\n leaderFlag = false;\n leaderUpdateComplete = false;\n System.out.println( \"WARN : Leader has failed!\" );\n // send election request\n Runnable sender = new BullyAlgorithm( \"Sender\", \"election\" );\n new Thread( sender ).start();\n }\n }\n\n case \"Sender\":\n switch( reqType ) {\n case \"election\":\n try {\n sendElectionRequest();\n } catch( Exception e ) {\n System.out.println( \"WARN : Server has failed, election request cannot be processed\" );\n }\n break;\n\n case \"ok\":\n try {\n sendOK();\n } catch( Exception e ) {\n e.printStackTrace();\n }\n break;\n\n case \"coordinator\":\n try {\n sendCoordinatorMsg();\n } catch( Exception e ) {\n e.printStackTrace();\n }\n break;\n }\n break;\n }\n }",
"public void syncMessages() {\n\t\tArrayList<ChatEntity> nonSyncedChatEntities = new ArrayList<>();\n\t\tnonSyncedChatEntities.addAll(chatViewModel.loadChatsWithSyncStatus(false, nameID));\n\n\t\tif (nonSyncedChatEntities.size() > 0) {\n\t\t\tfor (int i = 0; i < nonSyncedChatEntities.size(); i++) {\n\t\t\t\tChatEntity chatEntity = nonSyncedChatEntities.get(i);\n\t\t\t\tchatEntity.setSynced(true);\n\t\t\t\tchatViewModel.updateSource(chatEntity);\n\t\t\t\tgetChatResult(nonSyncedChatEntities.get(i).getMessage());\n\t\t\t}\n\t\t}\n\t}",
"private void sendActionBar(@NonNull final String message) {\n for(UUID playerID : getNewsRecipient()) {\n if(isOnline(playerID)) {\n @NonNull final CraftPlayer player = (CraftPlayer) Bukkit.getPlayer(playerID);\n final String actionMsg = \"{\\\"text\\\":\\\"\" + message + \"\\\"}\";\n final PacketPlayOutChat PACKET = new PacketPlayOutChat(IChatBaseComponent.ChatSerializer.a(actionMsg), (byte) 2);\n player.getHandle().playerConnection.sendPacket(PACKET);\n } else {\n getNewsRecipient().remove(playerID);\n }}\n\n }",
"public interface RemoteCoordinator extends Remote, Identify {\n /**\n * a method to add a Peer to this RemoteCoordinator's list of available Peers\n * called by a MembershipManager\n *\n * @param peer the Uuid of the Peer to be added\n */\n void addPeer(Uuid peer) throws RemoteException;\n\n /**\n * a method to remove a Peer from this RemoteCoordinator's list of available Peers\n * called by a MembershipManager\n *\n * @param peer the Uuid of the Peer to be removed\n */\n void removePeer(Uuid peer) throws RemoteException;\n\n /**\n * a method to get the Uuid of a live Peer in this Coordinator's list of active Peers,\n * removing any dead Peers encountered along the way from the service\n *\n * @return the Uuid of a live Peer\n */\n Uuid getActivePeer() throws RemoteException, NotBoundException;\n\n /**\n * a method to get the list of active Peers from this RemoteCoordinator\n * called by the MembershipManager when bringing new RemoteCoordinators online\n *\n * @return the list of available Uuids from this RemoteCoordinator\n */\n List<Uuid> getActivePeers() throws RemoteException;\n\n /**\n * a method to set the map of active Peers for this RemoteCoordinator\n * called by the MembershipManager when bringing new RemoteCoordinators online\n */\n void setActivePeers(List<Uuid> activePeers) throws RemoteException;\n\n /**\n * a method to assign a JobId to a JobCoordinator\n * called by a User\n * delegates responsibility to its corresponding Coordinator method\n *\n * @param jobId the JobId of the Job being assigned\n * @return true if the job was successfully assigned, false otherwise\n * @throws RemoteException\n */\n boolean assignJob(JobId jobId) throws RemoteException;\n\n /**\n * a method to get an allocation of TaskManagers\n * called by a JobManager\n *\n * @param numRequested the number of TaskManagers being requested by the JobManager\n * @return a list of Uuids to be used by the calling JobManager as TaskManagers\n * @throws RemoteException\n */\n List<Uuid> getTaskManagers(int numRequested) throws RemoteException;\n}",
"@Override\n\tpublic void send(String msg) {\n\t\t\n\t\t\n\t\n\t}",
"public static void broadcastFormattedMessage(List<String> messageList, World world) {\r\n for (Player p : world.getPlayers()) {\r\n sendFormattedMessage(p, messageList);\r\n }\r\n sendFormattedMessage(Bukkit.getConsoleSender(), messageList);\r\n }",
"public Boolean makeLeader(Integer controllerId,\n PartitionStateInfo partitionStateInfo, Integer correlationId,\n kafka.server.OffsetManager offsetManager) {\n return Utils.inWriteLock(leaderIsrUpdateLock, () -> {\n Set<Integer> allReplicas = partitionStateInfo.allReplicas;\n LeaderIsrAndControllerEpoch leaderIsrAndControllerEpoch = partitionStateInfo.leaderIsrAndControllerEpoch;\n LeaderAndIsr leaderAndIsr = leaderIsrAndControllerEpoch.leaderAndIsr;\n // record the epoch of the controller that made the leadership decision. This is useful while updating the isr;\n // to maintain the decision maker controller's epoch in the zookeeper path;\n Integer controllerEpoch = leaderIsrAndControllerEpoch.controllerEpoch;\n // add replicas that are new;\n allReplicas.forEach(replica -> getOrCreateReplica(replica));\n Set<Replica> newInSyncReplicas = Sc.toSet(Sc.map(leaderAndIsr.isr, r -> getOrCreateReplica(r)));\n // remove assigned replicas that have been removed by the controller;\n// (assignedReplicas().stream().map(r->r.brokerId)-- allReplicas).foreach(removeReplica(_));\n Set<Integer> replicaBrokerIdList = Sc.map(assignedReplicas(), r -> r.brokerId);\n allReplicas.stream().filter(r -> !replicaBrokerIdList.contains(r)).forEach(this::removeReplica);\n inSyncReplicas = newInSyncReplicas;\n leaderEpoch = leaderAndIsr.leaderEpoch;\n zkVersion = leaderAndIsr.zkVersion;\n leaderReplicaIdOpt = Optional.of(localBrokerId);\n // construct the high watermark metadata for the new leader replica;\n Replica newLeaderReplica = getReplica().get();\n newLeaderReplica.convertHWToLocalOffsetMetadata();\n // reset log end offset for remote replicas;\n assignedReplicas().forEach(r -> {\n if (r.brokerId != localBrokerId) {\n r.logEndOffset_(LogOffsetMetadata.UnknownOffsetMetadata);\n }\n });\n // we may need to increment high watermark since ISR could be down to 1;\n maybeIncrementLeaderHW(newLeaderReplica);\n if (topic == OffsetManager.OffsetsTopicName)\n offsetManager.loadOffsetsFromLog(partitionId);\n return true;\n });\n }",
"public void relay(Message msg) {\n if (roles.containsKey(msg.dst)) {\n roles.get(msg.dst).deliver(msg);\n //System.out.println(msg.print());\n } else {\n if (debug) {\n System.out.print(\"\\nServer: \" + index + \": Dst not found: \" + msg.print());\n }\n }\n }",
"@Override\n public void execute() {\n vars.setState(\"Teleporting...\");\n Methods.teleToFlameKing();\n }",
"private void sendGMToAll(String msg){\r\n for(ClientHandler ch: clientThreads){\r\n try{\r\n //Get the client's ObjectOutputStream\r\n ObjectOutputStream oos = ch.getOOS();\r\n //Print the message to the client\r\n oos.writeObject(new DataWrapper(0, msg, true));\r\n } catch(IOException ioe) {\r\n System.out.println(\"IOException occurred: \" + ioe.getMessage());\r\n ioe.printStackTrace();\r\n }\r\n }\r\n }",
"@Override\n public Boolean call() throws Exception {\n \tMySocket socket = new MySocket(node);\n socket.writeLine(listOfActivePeers);\n socket.close();\n return true;\n }",
"public synchronized void sendMessage (String msg, ServerThread current) {\n\t\tcurrent.send (msg);\n\t}"
] | [
"0.53455794",
"0.5227699",
"0.51483643",
"0.50596243",
"0.50400376",
"0.5033935",
"0.5018477",
"0.5009335",
"0.5002646",
"0.49921542",
"0.4990781",
"0.49896303",
"0.49881172",
"0.49714044",
"0.4934812",
"0.4930567",
"0.4917711",
"0.4915311",
"0.4893942",
"0.48935136",
"0.4861639",
"0.48564923",
"0.48528108",
"0.4813825",
"0.48109403",
"0.4788558",
"0.47881094",
"0.4787947",
"0.47460392",
"0.4721438",
"0.47113234",
"0.4671002",
"0.46431237",
"0.46387473",
"0.4631277",
"0.46212542",
"0.46071732",
"0.45975566",
"0.45970905",
"0.45925042",
"0.45905328",
"0.45900917",
"0.45861447",
"0.45823547",
"0.4575504",
"0.45666432",
"0.45657167",
"0.45651585",
"0.45522943",
"0.45464095",
"0.4545253",
"0.45448813",
"0.4533743",
"0.4531651",
"0.45235556",
"0.45185393",
"0.45171267",
"0.45118117",
"0.45095313",
"0.45083955",
"0.45054775",
"0.45032546",
"0.44901088",
"0.44892308",
"0.44727418",
"0.4469553",
"0.44681025",
"0.44670472",
"0.44636968",
"0.4460942",
"0.4460253",
"0.44597962",
"0.44560304",
"0.4452336",
"0.44518334",
"0.44501308",
"0.4434616",
"0.4429169",
"0.44284293",
"0.4427141",
"0.44243672",
"0.4422921",
"0.44150227",
"0.441125",
"0.44066808",
"0.44052932",
"0.44020692",
"0.44015527",
"0.44006735",
"0.4398655",
"0.43971255",
"0.4390397",
"0.43837896",
"0.4377211",
"0.43770027",
"0.43753636",
"0.43743438",
"0.43742943",
"0.43630832",
"0.43607736"
] | 0.8056972 | 0 |
The sendOK() method sends OK message to the incoming server which has requested an election | public static void sendOK() {
try {
Server destServer = ServerState.getInstance().getServers().get(sourceID);
MessageTransfer.sendServer(
ServerMessage.getOk( String.valueOf(ServerState.getInstance().getSelfID()) ),
destServer
);
System.out.println("INFO : Sent OK to s"+destServer.getServerID());
}
catch(Exception e) {
System.out.println("INFO : Server s"+sourceID+" has failed. OK message cannot be sent");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized void sendOk() {\r\n\t\tbeginMessage();\r\n\t\tsend(ServerConst.ANS + ServerConst.ANS_YES);\r\n\t\tendMessage();\r\n\t}",
"public static void sendElectionRequest()\n {\n System.out.println(\"INFO : Election initiated\");\n int numberOfFailedRequests = 0;\n for ( int key : ServerState.getInstance().getServers().keySet() ) {\n if( key > ServerState.getInstance().getSelfID() ){\n Server destServer = ServerState.getInstance().getServers().get(key);\n try {\n MessageTransfer.sendServer(\n ServerMessage.getElection( String.valueOf(ServerState.getInstance().getSelfID()) ),\n destServer\n );\n System.out.println(\"INFO : Sent election request to s\"+destServer.getServerID());\n }\n catch(Exception e){\n System.out.println(\"WARN : Server s\"+destServer.getServerID() +\n \" has failed, cannot send election request\");\n numberOfFailedRequests++;\n }\n }\n\n }\n if (numberOfFailedRequests == ServerState.getInstance().getNumberOfServersWithHigherIds()) {\n if(!electionInProgress){\n //startTime=System.currentTimeMillis();\n electionInProgress = true;\n receivedOk = false;\n Runnable timer = new BullyAlgorithm(\"Timer\");\n new Thread(timer).start();\n }\n }\n }",
"public void serverSideOk();",
"public synchronized void alertOK() {\n\t\ttry {\n\t\t\tvListen.sendOK();\n\t\t} catch (IOException exc) {\n\t\t\terrorIOError();\n\t\t}\n\t}",
"protected void reply_ok() throws java.io.IOException {\n byte[] ok = PushCacheProtocol.instance().okPacket();\n _socket.getOutputStream().write(ok, 0, ok.length);\n }",
"private void handleBlockOk(BlockOk ok) throws AppiaEventException {\n \t\t//Get the necessary arguments\n \t\tList<VsClient> allMyClients = VsClientManagement.getClientstAttachedTo(listenAddress);\n \n \t\t//Enter flush mode\n \t\tflushMode = true;\n \t\tSystem.out.println(\"Received a BlockOk ( a normal one )\");\n \n \t\t//Lock clientsViewManagement here with a lock\n \t\tacquireClientsViewUpdateLock(); //So no new clients/servers can join the group\n \n \t\t//Clean the update controls I have received\n \t\tUpdateManager.cleanUpdateViews();\n \n \t\t//Send to all client in all groups a blockOk request\n \t\t//I ask if I have some client in that group\n \n \t\t//If I have at least one client to shut\n \t\tif(allMyClients.size() >= 1){\n \t\t\t//I will store the block ok event\n \t\t\tpendingBlockOk = ok;\n \t\t\tSystem.out.println(\"I have a pending blockOk to send. Wait for client to shut upo\");\n \n \t\t\t//And for each client, i'll ask them to shut up\n \t\t\tfor (VsClient client : allMyClients){\n \t\t\t\tVsGroup group = VsClientManagement.getVsGroup(client.getGroup().id);\n \t\t\t\tShutUpStubEvent shutUpEvent = new ShutUpStubEvent(client.getGroup().id);\n \t\t\t\tsendStubEvent(shutUpEvent, group);\n \t\t\t}\n \t\t}\n \n \t\t//If I have no clients to warn\n \t\telse{\n \t\t\t//I may send right way the block OK\n \t\t\tok.go();\n \t\t\tSystem.out.println(\"I have no clients, sending blockOk\");\n \t\t}\n \t}",
"public static void replyWithOK(final OutputStream out) throws IOException {\n out.write(OK);\n out.flush();\n }",
"public void alertTheWaiter(){\n Chef c = (Chef) Thread.currentThread();\n CommunicationChannel com = new CommunicationChannel(serverHostName, serverPortNumb);\n Object[] params = new Object[0];\n \tObject[] state_fields = new Object[2];\n state_fields[0] = c.getChefID();\n \tstate_fields[1] = c.getChefState();\n\n Message m_toServer = new Message(1, params, 0, state_fields, 2, null); \n Message m_fromServer;\n\n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n \t}\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n\n c.setState((int) m_fromServer.getStateFields()[1]);\n \n com.close ();\n }",
"public void ok() {\n\t\tstate.ok();\n\t}",
"public void receivedOkayMessage();",
"@Override\n public void processElection() {\n if (context.getState().equals(LEADER) || !context.getActive()) {\n return;\n }\n\n log.info(\"Peer #{} Start election\", context.getId());\n\n context.setState(CANDIDATE);\n Long term = context.incCurrentTerm();\n context.setVotedFor(context.getId());\n\n List<Integer> peersIds = context.getPeers().stream().map(Peer::getId).collect(Collectors.toList());\n long voteGrantedCount = 1L;\n long voteRevokedCount = 0L;\n\n //while didn't get heartbeat from leader or new election started\n while (checkCurrentElectionStatus(term)) {\n List<AnswerVoteDTO> answers = getVoteFromAllPeers(term, peersIds);\n peersIds = new ArrayList<>();\n for (AnswerVoteDTO answer : answers) {\n if (answer.getStatusCode().equals(OK)) {\n if (answer.getTerm() > context.getCurrentTerm()) {\n //• If RPC request or response contains term T > currentTerm: set currentTerm = T, convert to follower (§5.1)\n context.setTermGreaterThenCurrent(answer.getTerm());\n return;\n }\n if (answer.isVoteGranted()) {\n log.info(\"Peer #{} Vote granted from {}\", context.getId(), answer.getId());\n context.getPeer(answer.getId()).setVoteGranted(true);\n voteGrantedCount++;\n } else\n log.info(\"Peer #{} Vote revoked from {}\", context.getId(), answer.getId());\n voteRevokedCount++;\n } else {\n log.info(\"Peer #{} No vote answer from {}\", context.getId(), answer.getId());\n peersIds.add(answer.getId());\n }\n }\n if (voteGrantedCount >= context.getQuorum()) {\n winElection(term);\n return;\n } else if (voteRevokedCount >= context.getQuorum()) {\n loseElection(term);\n return;\n } //else retry\n delay();\n }\n }",
"private void responseToServer() throws ReversiException {\n try {\n while (!done) {\n int msg = fromServer.readInt();\n report(\"Msg from server: \" + msg);\n switch (msg) {\n case ENTERROOM:\n othersEnterRoom();\n break;\n case ASSIGN:\n assign();\n break;\n case TURN:\n turn();\n break;\n case DRAWBLACK:\n drawBlack();\n break;\n case DRAWWHITE:\n drawWhite();\n break;\n case READY:\n ready();\n break;\n case INVALIDTRY:\n invalidTry();\n break;\n case INVALID:\n invalidMove();\n break;\n case WIN:\n win();\n break;\n case RESIGN:\n resign();\n break;\n case NEWGAME:\n startGame();\n break;\n case QUIT:\n othersQuit();\n break;\n case DONE:\n doQuit();\n break;\n case RETRIEVE:\n retrieve();\n break;\n case CHAT:\n showMessage();\n break;\n default:\n report(\"uncaught: \" + msg);\n }\n }\n } catch (IOException e){\n\n throw new ReversiException(\"Quit, unsolved exception catch.\");\n\n }\n }",
"public void run() {\n\n switch( operation )\n {\n case \"Timer\":\n System.out.println( \"INFO : Timer started\" );\n try {\n // wait 7 seconds\n Thread.sleep( 7000 );\n if( !receivedOk )\n {\n // OK not received. Set self as leader\n LeaderState.getInstance().setLeaderID( ServerState.getInstance().getSelfID() );\n electionInProgress = false; // allow another election request to come in\n leaderFlag = true;\n System.out.println( \"INFO : Server s\" + LeaderState.getInstance().getLeaderID()\n + \" is selected as leader! \" );\n\n LeaderState.getInstance().resetLeader(); // reset leader lists when newly elected\n\n Runnable sender = new BullyAlgorithm( \"Sender\", \"coordinator\" );\n new Thread( sender ).start();\n }\n\n if( receivedOk && !leaderFlag )\n {\n System.out.println( \"INFO : Received OK but coordinator message was not received\" );\n\n electionInProgress = false;\n receivedOk = false;\n\n Runnable sender = new BullyAlgorithm( \"Sender\", \"election\" );\n new Thread( sender ).start();\n }\n }\n catch( Exception e ) {\n System.out.println( \"INFO : Exception in timer thread\" );\n }\n break;\n\n case \"Heartbeat\":\n while( true ) {\n try {\n Thread.sleep(10);\n if( leaderFlag && ServerState.getInstance().getSelfID() != LeaderState.getInstance().getLeaderID() ) {\n Thread.sleep( 1500 );\n Server destServer = ServerState.getInstance().getServers()\n .get( LeaderState.getInstance().getLeaderID() );\n\n MessageTransfer.sendServer(\n ServerMessage.getHeartbeat( String.valueOf(ServerState.getInstance().getSelfID()) ),\n destServer\n );\n //System.out.println( \"INFO : Sent heartbeat to leader s\" + destServer.getServerID() );\n }\n }\n\n catch( Exception e ) {\n leaderFlag = false;\n leaderUpdateComplete = false;\n System.out.println( \"WARN : Leader has failed!\" );\n // send election request\n Runnable sender = new BullyAlgorithm( \"Sender\", \"election\" );\n new Thread( sender ).start();\n }\n }\n\n case \"Sender\":\n switch( reqType ) {\n case \"election\":\n try {\n sendElectionRequest();\n } catch( Exception e ) {\n System.out.println( \"WARN : Server has failed, election request cannot be processed\" );\n }\n break;\n\n case \"ok\":\n try {\n sendOK();\n } catch( Exception e ) {\n e.printStackTrace();\n }\n break;\n\n case \"coordinator\":\n try {\n sendCoordinatorMsg();\n } catch( Exception e ) {\n e.printStackTrace();\n }\n break;\n }\n break;\n }\n }",
"@Override\r\n\tpublic void run() {\r\n\t\ttry {\r\n\t\t\tthis.inputStream = socket.getInputStream();\r\n\t\t\tthis.outputStream = socket.getOutputStream();\r\n\t\t\t// Get the peer that is asking me for fragments.\r\n\t\t\tpeerState = torrentClient.getPeerStateList().getByAddress(\r\n\t\t\t\t\tsocket.getInetAddress().getHostAddress(), socket.getPort());\r\n\t\t\t// read handhake\r\n\t\t\tbyte[] received = new byte[68];\r\n\t\t\tinputStream.read(received);\r\n\t\t\t//Parse the handshake received\r\n\t\t\tHandsake handshakeMessage = Handsake\r\n\t\t\t\t\t.parseStringToHandsake(new String(received));\r\n\t\t\t// validate hash\r\n\t\t\tString torrentHash = new String(torrentClient.getMetainf()\r\n\t\t\t\t\t.getInfo().getInfoHash());\r\n\t\t\t//if the received handshake is correct send my handshake\r\n\t\t\tif (Handsake.isValidHandsakeForBitTorrentProtocol(handshakeMessage,\r\n\t\t\t\t\ttorrentHash)) {\r\n\t\t\t\t// send handshake\r\n\t\t\t\tHandsake handShakeToSend = new Handsake(torrentHash,\r\n\t\t\t\t\t\tthis.torrentClient.getPeerId());\r\n\t\t\t\tthis.outputStream.write(handShakeToSend.getBytes());\r\n\t\t\t\t// enviar bitfield\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.sendBitfield();\r\n\t\t\t\t\t// leer\r\n\t\t\t\t\tPeerProtocolMessage message = this.readNormalMessage();\r\n\t\t\t\t\t// Check if I have received an interested message\r\n\t\t\t\t\tif (message.getType().equals(\r\n\t\t\t\t\t\t\tPeerProtocolMessage.Type.INTERESTED)) {\r\n\t\t\t\t\t\tif (this.peerState != null) {\r\n\t\t\t\t\t\t\tpeerState = torrentClient.getPeerStateList()\r\n\t\t\t\t\t\t\t\t\t.getByAddress(\r\n\t\t\t\t\t\t\t\t\t\t\tsocket.getInetAddress()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getHostAddress(),\r\n\t\t\t\t\t\t\t\t\t\t\tsocket.getPort());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//Set the peer status\r\n\t\t\t\t\t\tif (this.peerState != null) {\r\n\t\t\t\t\t\t\tthis.peerState.setPeer_interested(true);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// send unchoke to the peer\r\n\t\t\t\t\t\tthis.outputStream.write(new UnChokeMsg().getBytes());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//set the peer status\r\n\t\t\t\t\t\tif (this.peerState != null) {\r\n\t\t\t\t\t\t\tthis.peerState.setAm_choking(false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Continue receiveing messages if the message type is Keep_alive, Request or Have.\r\n\t\t\t\t\t\tboolean continueReading = true;\r\n\t\t\t\t\t\twhile (continueReading) {\r\n\t\t\t\t\t\t\tmessage = this.readNormalMessage();\r\n\t\t\t\t\t\t\tcontinueReading = processMessage(message);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// if I have not received interested send unchoke\r\n\t\t\t\t\t\tthis.outputStream.write(new ChokeMsg().getBytes());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} catch (IOException ioe) {\r\n\t\t\t\t\tioe.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// close connection\r\n\t\t\tthis.inputStream.close();\r\n\t\t\tthis.outputStream.close();\r\n\t\t\tsocket.close();\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\tSystem.out.println(\"Sending thread closed\");\r\n\t\t\te.printStackTrace();\r\n\t\t\ttry {\r\n\t\t\t\tthis.inputStream.close();\r\n\t\t\t\tthis.outputStream.close();\r\n\t\t\t\tsocket.close();\r\n\t\t\t} catch (IOException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void handleBlockOkProxyEvent(BlockOkProxyEvent event) throws AppiaEventException {\n \t\tevent.loadMessage();\n \t\tSystem.out.println(\"Received a BlockOkProxyEvent from: \" + event.getServerThatShutUpEndpt());\n \n \t\t//Get the arguments\n \t\tString groupId = event.getGroupId();\n \t\tEndpt serverThatShupUp = event.getServerThatShutUpEndpt();\n \t\tint remoteViewVersion = event.getViewVersion();\n \n \t\t//Check if it is a blockOk from a view already decided\n \t\t//This means the decide event has already come and the block oks were late to me\n \t\tint localViewVersion = VsClientManagement.getVsGroup(groupId).getCurrentVersion();\n \t\tif(remoteViewVersion < localViewVersion ){\n \t\t\treturn; //Discard this event\n \t\t}\n \n \t\t//Mark the server as already sent the block ok\n \t\tControlManager.addControlMessageReceived(groupId, serverThatShupUp);\n \n \t\t//Ask if all the other servers are quiet\n \t\tboolean allMuted = ControlManager.receivedFromAllLiveServers(groupId, vs.view);\n \n \t\t//If all the servers present in the current view are blocked\n \t\tif(allMuted){\n \t\t\tSystem.out.println(\"All servers have responded to me that they are quiet\");\n \n \t\t\t//Check if I am the leader\n \t\t\tif(amIleader()){\n \t\t\t\tSystem.out.println(\"I am the leader so I will decide the view on group:\" + groupId);\n \t\t\t\tVsGroup group = VsClientManagement.getVsGroup(groupId);\n \n \t\t\t\t//Lets increment the version\n \t\t\t\tgroup.incrementGroupViewVersion();\n \n \t\t\t\t//And some clients (if they exist)\n \t\t\t\tgroup.insertFutureClientsIntoPresent();\n \n \t\t\t\t//Send the Decide message to the other servers\n \t\t\t\tDecidedProxyEvent decidedEvent = new DecidedProxyEvent(group);\n \t\t\t\tsendToOtherServers(decidedEvent);\n \n \t\t\t\t//Sent to me also\n \t\t\t\tsendToMyself(decidedEvent);\n \t\t\t}\n \t\t}\n \n \t\telse{\n \t\t\tSystem.out.println(\"There are still server to whom I didn't receive no blockOK\");\n \t\t}\n \t}",
"private void receiveVote() {\n\t\t//Se la postazione termina la connessione informiamo lo staff con un messaggio di errore\n\t\tif(!link.hasNextLine()) {\n\t\t\tcontroller.printError(\"Errore di Comunicazione\", \"La postazione \"+ ip.getHostAddress() + \" non ha inviato i pacchetti di voto.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Vengono recuperati i voti cifrati\n\t\tMessage request;\n\t\tWrittenBallot[] encryptedBallots;\n\t\ttry {\n\t\t\trequest = (Message) Message.fromB64(link.read(), \"postazione \" + ip.getHostAddress());\n\t\t\tString[] required = {\"encryptedBallots\"};\n\t\t\tClass<?>[] types = {WrittenBallot[].class};\n\t\t\t\n\t\t\trequest.verifyMessage(Protocol.sendVoteToStation, required, types, \"postazione \" + ip.getHostAddress());\n\t\t\tencryptedBallots = request.getElement(\"encryptedBallots\");\n\t\t\t\n\t\t\t//I voti vengono memorizzati nel seggio in attesa dell'invio all'urna\n\t\t\tif(((Controller) controller).storeVoteLocally(encryptedBallots, ip))\n\t\t\t\tlink.write(Protocol.votesReceivedAck);\n\t\t\telse\n\t\t\t\tlink.write(Protocol.votesReceivedNack);\n\t\t\t\n\t\t} catch (PEException e) {\n\t\t\tlink.write(Protocol.votesReceivedNack);\n\t\t\tcontroller.printError(e);\n\t\t}\n\t}",
"public void ok() {\n btOK().push();\n }",
"protected abstract void handleOk();",
"private void handleBlockOkStubEvent(BlockOkStubEvent event) throws AppiaEventException {\n \t\tevent.loadMessage();\n \t\tSystem.out.println(\"Received BlockOkStubEvent from: \" + event.source);\n \n \t\t//Get the parameters\n \t\tString groupId = event.getGroupId();\n \t\tEndpt clientEndpt = event.getEndpoint();\n \t\tint viewVersion = VsClientManagement.getVsGroup(groupId).getCurrentVersion();\n \n \t\t//Mute the client\n \t\tVsClientManagement.muteClient(groupId, clientEndpt);\n \n \t\t//Servers enconter themselfs in mute mode\n \t\tif(this.flushMode == true){\n \t\t\t//We need to check if EVERY client attached to me is quiet\t\n \t\t\tboolean allMuted = VsClientManagement.checkIfEveryAllAttachedToMeClientAreMute(listenAddress);\n \n \t\t\tif(allMuted == true){\n \t\t\t\tSystem.out.println(\"All my clients are muted\");\n \n \t\t\t\t//I may send the pending block ok\n \t\t\t\tpendingBlockOk.go();\n \n \t\t\t}\n \t\t}\n \n \t\telse if(this.flushMode == false){\n \n \t\t\t//Let's see if all clients have said BlockOk\n \t\t\tboolean allGroupMuted = VsClientManagement.checkIfAllInGroupAttachedToMeClientAreMute(groupId, listenAddress);\n \n \t\t\t//If all clients in the group are muted\n \t\t\tif(allGroupMuted){\n \t\t\t\tSystem.out.println(\"Hurray every client in group: \" + groupId +\" is muted\");\n \n \t\t\t\t// We may send our leaveProxyEvent to the other servers\t\n \t\t\t\tBlockOkProxyEvent blockedOkProxy = new BlockOkProxyEvent(groupId, myEndpt, viewVersion);\n \t\t\t\tsendToOtherServers(blockedOkProxy);\n \n \t\t\t\t//And also send to myself\n \t\t\t\tsendToMyself(blockedOkProxy);\n \n \t\t\t\treturn;\n \t\t\t}\n \n \t\t\t//In this case we still have to wait on other clients\n \t\t\telse{\n \t\t\t\tSystem.out.println(\"Still waiting on other clients\");\n \t\t\t}\n \t\t}\n \t}",
"private void verifyAlive(int coordID, int procID, int electedID, String token) {\r\n\tSystem.out.println(\"so im here now\" + coordID);\r\n\t\tlong time = 3000;\r\n\t\ttry {\r\n\t\t\tThread.sleep(time);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tif(procID>6) {\r\n \tprocID = procID - 6;\r\n }\r\n try {\r\n socket = new Socket(\"127.0.0.1\", 8080+procID);\r\n out = new PrintWriter(socket.getOutputStream());\r\n out.println(token);\r\n out.flush();\r\n out.close();\r\n socket.close();\r\n //ring.currentAlive = electedID;\r\n } catch(Exception ex) {\r\n \tverifyAlive(coordID, procID+1, electedID, token); // pass to next next if next was unavailable\r\n }\r\n\t//}\r\n}",
"public void sayGoodbye(){\n Waiter w = (Waiter) Thread.currentThread();\n CommunicationChannel com = new CommunicationChannel(serverHostName, serverPortNumb);\n Object[] params = new Object[0];\n \tObject[] state_fields = new Object[3];\n state_fields[0] = w.getWaiterID();\n \tstate_fields[1] = w.getWaiterState();\n\n Message m_toServer = new Message(5, params, 0, state_fields, 2, null); \n Message m_fromServer;\n\n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n }\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n\n w.setState((int) m_fromServer.getStateFields()[1]);\n w.setCanGoHome();\n com.close ();\n }",
"public void getServerResponse() {\n\t\twhile (true) {\n\t\t\ttheMessage = readObject.readMessage();\n\t\t\tif (theMessage != null) {\n\t\t\t\tSystem.out.println(\"Server response is: \" + theMessage.getChoice());\n\t\t\t\tswitchBoard(theMessage.getChoice(), theMessage);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void action() \n\t{\n\t\tif(this.user.arrivedToFinalStation())\n\t\t{\n\t\t\tthis.user.stablishDesiredVehicle();\n\t\t\tthis.user.stablishDesiredStation();\n\t\t}\n\t\t\n\t\t//printing info\n\t\tSystem.out.println(\"\\nI'm \" + this.user.getLocalName() + \": I'm on \" + this.user.getCurrentStation() + \" and I want to go to \" + this.user.desiredStation + \" by \" + this.user.desiredVehicle +\".\\n\");\n\t\t//this.mensaje=scanner.nextLine(); //debug\n\t\t\n\t\t//PetitionRequest\n\t\tSystem.out.println(\"I make a vehicle request to \" + this.user.getCurrentStation() + \": I'm on \" + this.user.getCurrentStation() + \" and I want to go to \" + this.user.desiredStation + \" by \" + this.user.desiredVehicle + \".\");\n\t\tthis.msgObject = new Capsule(null,this.user.getDesiredVehicle(),this.user.getDesiredStation(),null);\n\t\tUtils.enviarMensaje(myAgent, this.user.getCurrentStation(), this.msgObject, \"VEHICLE_REQUEST\");\n\t\t\n\t\t//Waiting for answer\n\t\tACLMessage msg=this.myAgent.blockingReceive(\n\t\t\t\tMessageTemplate.and(\n\t\t\t\t\t\tMessageTemplate.MatchPerformative(ACLMessage.REQUEST), \n\t\t\t\t\t\tMessageTemplate.MatchOntology(\"ontologia\"))\n\t\t\t\t);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tthis.comment = msg.getEnvelope().getComments();\n\t\t\tthis.msgObject = (Capsule) msg.getContentObject();\n\t\t\tSystem.out.println(\"\\t\" + this.user.getCurrentStation() + \" told me \" + this.comment + \". \");\n\t\t\t\n\t\t\tswitch(this.comment)\n\t\t\t{\n\t\t\tcase \"VEHICLE_DELIVERY\":\n\t\t\t\t//1. The station give to the user the vehicle normaly\n\t\t\t\tif(msgObject.getVehicle() != null) {\n\t\t\t\t\tthis.user.takeVehicle(msgObject.getVehicle());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//2. The user goes to the final station\n\t\t\t\tthis.notifyMonitor(\"moving\");\n\t\t\t\tthis.user.goToStation();\n\t\t\t\tthis.notifyMonitor(\"waiting\");\n\n\t\t\t\t//3. Leaves the vehicle on the final station\n\t\t\t\tif(this.user.hasVehicle())\n\t\t\t\t{\n\t\t\t\t\tthis.vehicleTemp = this.user.leaveVehicle();\n\t\t\t\t\tmsgObject = new Capsule(this.vehicleTemp,null, null, null);\n\t\t\t\t\tUtils.enviarMensaje(myAgent, this.user.getCurrentStation(), this.msgObject, \"VEHICLE_RETURN\");\n\t\t\t\t}\n\n\t\t\t\t//4. The user waits a bit\n\t\t\t\tthis.user.waitSomeTime(8000);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"UNSATISFACTORY_REQUEST\":\n\t\t\t\t// The station reports that the request couldn't be completed properly\n\t\t\t\t//1. The capsule can cointain: alternativeStation and alternativeVehicle\n\t\t\t\tif(msgObject.getStation() != null) {\t//checks if there's an alternative reserved station\n\t\t\t\t\tSystem.out.println(\"\\t\"+this.user.getCurrentStation() + \" told me that there's an alternative route -> \" + msgObject.getStation() + \". \");\n\t\t\t\t\tthis.user.stablishDestinationStation(msgObject.getStation());\n\t\t\t\t}\n\t\t\t\tif(msgObject.getVehicle() != null) { //checks if the station gave an alternative vehicle\n\t\t\t\t\tSystem.out.println(\"\\t\"+this.user.getCurrentStation() + \" gived to me an alternative vehicle -> \" + msgObject.getVehicle().getType() + \". \");\n\t\t\t\t\tthis.user.takeVehicle(msgObject.getVehicle());\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"\\tI have to go walking. \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//2. Moving to the destination station\n\t\t\t\tthis.notifyMonitor(\"moving\");\n\t\t\t\tthis.user.goToStation();\n\t\t\t\tthis.notifyMonitor(\"waiting\");\n\n\t\t\t\t//3. If has a vehicle, the user leaves it\n\t\t\t\tif(this.user.hasVehicle()) \n\t\t\t\t{\n\t\t\t\t\t//send the vehicle to the station\n\t\t\t\t\tthis.vehicleTemp = this.user.leaveVehicle();\n\t\t\t\t\tmsgObject = new Capsule(this.vehicleTemp,null, null, null);\n\t\t\t\t\tUtils.enviarMensaje(myAgent, this.user.getCurrentStation(), this.msgObject, \"VEHICLE_RETURN\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//4. the user waits before restarting the behavior\n\t\t\t\tthis.user.waitSomeTime(4000);\n\t\t\t}\n\t\t}\n\t\tcatch (UnreadableException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"void onChoke(boolean state)\n {\n peerChoke = state;\n //if (DEBUG) System.out.println(peer.address + \" onChoke: \" + state);\n\n if (peerChoke) {\n // remove all enqueued requests as they will be dropped by the remote peer\n for (int i = sendQueue.size() - 1; 0 <= i; i--) {\n StdPeerMessage pm = sendQueue.get(i);\n if (pm.type == StdPeerMessage.REQUEST) {\n sendQueue.remove(i);\n // notify torrent about cancelled request\n torrent.cancelBlockRequest(pm.index, pm.begin);\n pmCache.release(pm);\n }\n }\n // it's possible that we have requests that were already sent to external peer,\n // notify torrent - they are cancelled too [who knows, maybe data will arrive]\n for (int i = 0; i < blockRequests.size(); i++) {\n StdPeerMessage pm = blockRequests.get(i);\n torrent.cancelBlockRequest(pm.index, pm.begin);\n pmCache.release(pm);\n }\n blockRequests.clear();\n }\n }",
"@Ignore\n\t@Test\n\tpublic void testAgentAccepts() {\n\t\tparty.connect(connection);\n\t\tparty.notifyChange(settings);\n\n\t\tBid bid = makeBid(\"1\", \"1\");// best pssible\n\t\tparty.notifyChange(new ActionDone(new Offer(otherparty, bid)));\n\t\tparty.notifyChange(new YourTurn());\n\t\tassertEquals(1, connection.getActions().size());\n\t\tassertTrue(connection.getActions().get(0) instanceof Accept);\n\n\t}",
"public void saluteTheClient(){\n Waiter w = (Waiter) Thread.currentThread();\n CommunicationChannel com = new CommunicationChannel(serverHostName, serverPortNumb);\n Object[] params = new Object[0];\n \tObject[] state_fields = new Object[2];\n state_fields[0] = w.getWaiterID();\n \tstate_fields[1] = w.getWaiterState();\n\n Message m_toServer = new Message(0, params, 0, state_fields, 2, null); \n Message m_fromServer;\n\n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n\t\t\t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n \t}\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n\n w.setState((int) m_fromServer.getStateFields()[1]);\n \n com.close ();\n }",
"@Override\n\tpublic void networkIsOk() {\n\n\t}",
"public void sendRequest() {\r\n\t\t\r\n\t\tclient.join(this, isHost, gameCode, playerName, playerNumber);\r\n\t\t\r\n\t}",
"public void setOkForAgent(boolean okForAgent) {\r\n this.okForAgent = okForAgent;\r\n }",
"private void waitForConnection() throws IOException{\n\t\tshowMessage(\"\\n Waiting for a Punk Ass Bitch to connection... \\n \");\n\t\tConnection = server.accept();\n\t\tshowMessage(\"Now connected to \" + Connection.getInetAddress().getHostName() + \". Punk.\");\n\t\t//this is your own IP address, the machine running the the code\n\t\t//\n\t\t\n\t}",
"private static void esperarCliente() {\n try {\n socket = serverSocket.accept();\n System.out.println(\"Cliente conectado...\");\n } catch (IOException ex) {\n Logger.getLogger(ServidorUnicauca.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private void sendOption() throws IOException, InterruptedException {\n Object[] pValue = { WED_ZERO.lang.getInstruct().get(1)[4], WED_ZERO.lang.getInstruct().get(1)[5]};\n Object selectedValue = JOptionPane.showInputDialog(null,\n WED_ZERO.lang.getInstruct().get(1)[3], WED_ZERO.lang.getInstruct().get(1)[0], JOptionPane.INFORMATION_MESSAGE, null, pValue, pValue[0]);\n if(selectedValue==null)\n return;\n if(selectedValue.equals(pValue[0])) {\n this.processButtonState();\n if(Button.size()==0) {\n JOptionPane.showMessageDialog(Launch.frame, WED_ZERO.lang.getInstruct().get(1)[32]);\n return;\n }\n Object[] o2={WED_ZERO.lang.getInstruct().get(1)[7], WED_ZERO.lang.getInstruct().get(1)[8]};\n selectedValue = JOptionPane.showInputDialog(null,\n WED_ZERO.lang.getInstruct().get(1)[33], WED_ZERO.lang.getInstruct().get(1)[0], JOptionPane.INFORMATION_MESSAGE, null, o2, o2[0]);\n \n if(selectedValue==null) {\n this.sendOption();\n } else if(selectedValue.equals(o2[0])) {\n this.sendLAN();\n this.resetButton();\n } else if(selectedValue.equals(o2[1])) {\n this.compileFile();\n this.resetButton();\n }\n } else if(selectedValue.equals(pValue[1])) {\n Object[] o2={WED_ZERO.lang.getInstruct().get(1)[7], WED_ZERO.lang.getInstruct().get(1)[8]};\n selectedValue = JOptionPane.showInputDialog(null,\n WED_ZERO.lang.getInstruct().get(1)[6], WED_ZERO.lang.getInstruct().get(1)[0], JOptionPane.INFORMATION_MESSAGE, null, o2, o2[0]);\n if(selectedValue==null) {\n this.sendOption();\n } else if(selectedValue.equals(o2[0])) {\n this.recieveData();\n } else if(selectedValue.equals(o2[1])) {\n this.readFile();\n }\n }\n }",
"public NegotiationReturn workAsServer() {\n this.isClient = false;\n\n peer_mac_address = null;\n ServerSocket serverSocket = null;\n Socket socket = null;\n int code = 0;\n NegotiationReturn negReturn;\n boolean restartAfterwards = false;\n\n try {\n // use the port to start\n serverSocket = new ServerSocket(PORT);\n serverSocket.setSoTimeout(serverTimeoutMillis);\n Log.d(TAG, \"doInBackground: Server is waiting for connection\");\n\n // accept one connection\n socket = serverSocket.accept();\n socket.setSoTimeout(serverTimeoutMillis);\n\n // wrap the socket\n socketWrapper = new SocketWrapper(socket);\n\n // WAIT FOR CLIENT\n String hello = socketWrapper.getLine();\n\n if (hello == null || hello.contains(\"java.net.SocketException\")) {\n return error(R.string.no_hello_received, true);\n }\n\n // Check: Is the peer in the same role as we are\n // server and server or client and client MAKES NO SENSE\n if (hello.contains(\"SERVER\") && !isClient || hello.contains(\"CLIENT\") && isClient){\n return error(R.string.err_pairing_roles_broken, true);\n }\n\n // Whether we want to provide a hotspot or use one\n if (isConsumer) {\n negReturn = runConsumerProtocol(socketWrapper.getClientAddress().getHostAddress());\n } else {\n negReturn = runHotspotProtocol(socketWrapper.getClientAddress().getHostAddress());\n }\n peer_mac_address = negReturn.mac;\n code = negReturn.code;\n restartAfterwards = negReturn.restartAfterwards;\n\n } catch (SocketTimeoutException ste) {\n Log.d(TAG, \"workAsServer: ### Timed out\");\n code = R.string.err_timeout;\n peer_mac_address = null;\n restartAfterwards = true;\n } catch (IOException e) {\n Log.d(TAG, e.getMessage());\n code = R.string.err_io_exception;\n peer_mac_address = null;\n restartAfterwards = true;\n } finally {\n if (socket != null) {\n try {\n socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (serverSocket != null) {\n try {\n serverSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return new NegotiationReturn(code, peer_mac_address, restartAfterwards);\n }",
"public void talk() {\n\t try{\t\n\t \twhile(exit) {\n\t\t \t\t//Definizione stream per la comunicazione\n\t\t \t\ttastiera = new BufferedReader(new InputStreamReader(System.in));\n\t\t \t\tout = new DataOutputStream(connection.getOutputStream());\n\t\t\t\t in = new DataInputStream(connection.getInputStream());\n\t\t\t\t \n\t\t \t\t//Invio messaggio\n\t\t\t\t System.out.println(\"Inserisci il messaggio da mandare al server: \\n\");\n\t\t\t\t mess = tastiera.readLine();\n\t\t\t\t\tout.writeUTF(mess + \"\\n\");\n\t\t\t\t\t\n\t\t\t\t\t//Ricezione risposta server\n\t\t\t\t\tservermess = in.readUTF();\n\t\t\t System.out.println(\"Risposta dal server: \"+servermess);\n\t\t\t if(mess.equals(\"FINE\")) {\n\t\t\t \texit = false;\n\t\t\t }\n\t\t\t\t}\n\t\t }\n\t\t catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t }\n\t \tfinally {\n\t\t\t try {\n\t\t\t\t if (connection!=null)\n\t\t\t\t {\n\t\t\t\t connection.close();\n\t\t\t\t System.out.println(\"Connessione chiusa!\");\n\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t catch(IOException e){\n\t\t\t System.err.println(\"Errore nella chiusura della connessione!\");\n\t\t\t }\n\t \t}\t\n \t}",
"public void receiveInfoFromServer() throws IOException\n\t{\n\t\tstatus = fromServer.readInt();\n\n\t\tif (status == PLAYER1WINS)\n\t\t{\t\n\t\t\tif (player == PLAYER1) \n\t\t\t{ \tsetMove(currentToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"You've won!\")); \n\t\t\t} \n\t\t\telse if (player == PLAYER2) { \n\t\t\t\tsetMove(otherToken);\n\t\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Game over - Player X has won!\"));\n\t\t\t}\n\n\t\t\tcontinueToPlay = false;\n\t\t}\n\n\t\telse if (status == PLAYER2WINS)\n\t\t{\n\n\t\t\tif (player == PLAYER2) \n\t\t\t{ \n\t\t\t\tPlatform.runLater(() -> lblStatus.setText(\"You've won!\")); \n\t\t\t\tsetMove(currentToken);\n\n\t\t\t}\n\t\t\telse if (player == PLAYER1) { \n\t\t\t\tsetMove(otherToken);\n\t\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Game over - Player O has won!\")); \n\t\t\t}\n\t\t\tcontinueToPlay = false;\n\t\t}\n\n\t\telse if (status == DRAW)\n\t\t{\n\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Game over - It's a tie!\"));\n\t\t\tsetMove(otherToken);\n\t\t\tcontinueToPlay = false;\n\n\t\t}\n\t\telse if (status == WAIT)\n\t\t{\n\n\t\t\tsetMove(currentToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Other player's turn.\"));\n\t\t\tmyTurn = false; \n\n\t\t}\n\n\t\telse if (status == CONTINUE)\n\t\t{\n\t\t\tsetMove(otherToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Your turn.\"));\n\t\t\tmyTurn = true;\n\t\t}\n\t}",
"public void callTheWaiter(){\n Student s = (Student) Thread.currentThread();\n\n \tCommunicationChannel com = new CommunicationChannel (serverHostName, serverPortNumb);\n \tObject[] params = new Object[0];\n \tObject[] state_fields = new Object[2];\n \tstate_fields[0] = s.getID();\n \tstate_fields[1] = s.getStudentState();\n \t\n Message m_toServer = new Message(7, params, 0, state_fields, 2, null); \n Message m_fromServer; \n \n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n }\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n \n s.setState((int) m_fromServer.getStateFields()[1]);\n \n com.close ();\n }",
"public boolean testConnection() {\r\n boolean toReturn = true;\r\n\r\n String[] paramFields = {};\r\n SocketMessage request = new SocketMessage(\"admin\", \"ping\", SocketMessage.PriorityType.EMERGENCY, SocketMessage.TransferType.BI_WAY, \"\", paramFields);\r\n SocketMessage response = handleMessage(request);\r\n if (isSuccessful(response)) {\r\n toReturn = true;\r\n } else {\r\n toReturn = false;\r\n }\r\n\r\n return toReturn;\r\n }",
"public void conectServer() {\n\n\t}",
"@Override\r\n\t\t\tpublic void onSuccess() {\n\t\t\t\tLog.d(TAG, \"onSucess()\");\r\n\t\t\t\tToast.makeText(getApplicationContext(), \"Peers Avaliable!\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\r\n\t\t\t}",
"public void test0() {\r\n\t\t// step 1. create a dialog with empty leaderDrawStatus\r\n\t\tString urlString = \"http://localhost:8082/Slot/createdialog?userId=dialogpostest\";\r\n\t\tString dialogId = null;\r\n\t\ttry {\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection) \r\n\t\t\t\t\t(new URL(urlString)).openConnection();\r\n\t\t\tconn.setRequestMethod(\"POST\");\r\n\t\t\tconn.setDoOutput(true);\r\n\t\t\tconn.setDoInput(true);\r\n\t\t\tJsonObject obj = Json.createObjectBuilder()\r\n\t\t\t\t\t.add(\"weekdayLine\", \"0101010\")\r\n\t\t\t\t\t.add(\"startTime\", 8)\r\n\t\t\t\t\t.add(\"endTime\", 20)\r\n\t\t\t\t\t.add(\"numOfMembers\", 2)\r\n\t\t\t\t\t.add(\"leaderDrawStatus\", \"000\").build();\r\n\t\t\tPrintWriter writer = new PrintWriter(conn.getOutputStream());\r\n\t\t\twriter.write(obj.toString()); writer.flush();\r\n\t\t\tdialogId = Networks.getResponseFromHttpConnection(conn);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tfail();\r\n\t\t}\r\n\t\tif (dialogId == null) fail(\"fail to get dialogId\");\r\n\t\t\r\n\t\t// step 2. publish your availability as memeber1 (your userId)\r\n\t\tStringBuffer postUrl = new StringBuffer();\r\n\t\tpostUrl.append(\"http://localhost:8082/Slot/dialog?id=\");\r\n\t\tpostUrl.append(dialogId);\r\n\t\tString myAvailability = \"011\";\r\n\t\tpostUrl.append(\"&userId=member1&drawStatus=\");\r\n\t\tpostUrl.append(myAvailability);\r\n\t\ttry {\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection) \r\n\t\t\t\t\t(new URL(postUrl.toString())).openConnection();\r\n\t\t\tconn.setDoInput(true);\r\n\t\t\tString response = Networks.getResponseFromHttpConnection(conn);\r\n\t\t\tSystem.out.println(\"Response from /dialog post request is: \" + response);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tfail();\r\n\t\t}\r\n\t\t\r\n\t\t// step 3. refresh the page, assert that drawStatus is your availability\r\n\t\tStringBuffer getUrl = new StringBuffer();\r\n\t\tgetUrl.append(\"http://localhost:8082/Slot/dialog?id=\");\r\n\t\tgetUrl.append(dialogId);\r\n\t\tgetUrl.append(\"&userId=member1\");\r\n\t\ttry {\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection) \r\n\t\t\t\t\t(new URL(getUrl.toString())).openConnection();\r\n\t\t\tconn.setDoInput(true);\r\n\t\t\tString jsonString = Networks.getResponseFromHttpConnection(conn);\r\n\t\t\tJSONObject jsonObj = (JSONObject) (new JSONParser()).parse(jsonString);\r\n\t\t\tassertTrue(((String) jsonObj.get(\"drawStatus\")).startsWith(myAvailability));\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"boolean remoteOfficeOk() throws UnavailableMethodException, IOException {\r\n\r\n\t\tif (isChanged) {\r\n\t\t\tlogTrace(this.getClass().getName(), \"loadremoteOfficecomponents()\", \"Ok button action is going to start\");\r\n\t\t\tif (objRemoteOfficeEnableJCheckBox.isSelected()) {\r\n\t\t\t\tString phoneNumber = objRemoteOfficeJTextField.getText();\r\n\t\t\t\tif ((phoneNumber.equalsIgnoreCase(\"\"))) {\r\n\r\n\t\t\t\t\tshowInfoDialog(getremoteOfficeNumberError());\r\n\r\n\t\t\t\t\tsuccess = false;\r\n\t\t\t\t\treturn success;\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse {\r\n\r\n\t\t\t\t\tApplication.UNITY_CLIENT_APPLICATION.getreRemoteOffice().setActive(true);\r\n\t\t\t\t\tApplication.UNITY_CLIENT_APPLICATION.getreRemoteOffice().setPhoneNumber(phoneNumber);\r\n\r\n\t\t\t\t\tisChanged = false;\r\n\t\t\t\t\tApplication.UNITY_CLIENT_APPLICATION.getObjBWXSIAction().setRemoteoffice(true, phoneNumber);\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\tString phoneNumber = objRemoteOfficeJTextField.getText();\r\n\r\n\t\t\t\tApplication.UNITY_CLIENT_APPLICATION.getreRemoteOffice().setActive(false);\r\n\t\t\t\tApplication.UNITY_CLIENT_APPLICATION.getreRemoteOffice().setPhoneNumber(phoneNumber);\r\n\t\t\t\tisChanged = false;\r\n\t\t\t\tApplication.UNITY_CLIENT_APPLICATION.getObjBWXSIAction().setRemoteoffice(false, phoneNumber);\r\n\t\t\t}\r\n\t\t\tlogTrace(this.getClass().getName(), \"remoteOfficeOk()\", \"Ok button action completed successfully\");\r\n\t\t}\r\n\r\n\t\treturn success;\r\n\r\n\t}",
"private static void testServer() {\r\n\t\ttry {\r\n\t\t\tserverSocket=new ServerSocket(portno);\r\n\t\t\tSocket temp=serverSocket.accept();\r\n\t\t\tint x=cryptoMessaging.recvInt(temp.getInputStream());\r\n\t\t\tSystem.out.println(\"Got this int: \"+x);\r\n\t\t\tx++;\r\n\t\t\tcryptoMessaging.sendInt(temp.getOutputStream(), x);\r\n\t\t\tx=cryptoMessaging.recvInt(temp.getInputStream());\r\n\t\t\tSystem.out.println(\"Got this int: \"+x);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"IO Error\");\r\n\t\t\tgiveUp();\r\n\t\t}\r\n\t\tSystem.out.println(\"Test complete.\");\r\n\t\tgiveUp();\r\n\t}",
"void clientReady();",
"public void announcePeer() throws Exception{\n \n Socket socket = new Socket(connect, inPort);\n\n BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())),true);\n //System.out.println(\"Sending \" + cmd); \n // Tells another peer what is given in cmd\n pw.println(cmd);\n //System.out.println(\"Command sent\");\n String answer = br.readLine();\n System.out.println(answer);\n PeerConfig.writeInLogs(answer);\n\n pw.close();\n //br.close();\n socket.close();\n\n return ;\n }",
"private void handleReady(String[] msg, DataOutputStream os) throws IOException {\n\t\t\n\n\t\tif(msg[0] != null) {\n\t\t\t\n\t\t\tE_Direction newDirection = RoadPart.getDirectionBetweenTwoParts(entity.getFrontCell(), entity.getBackCell());\n\t\t os.writeUTF(\"ACK\"+\" \"+\"RDY\"+\" \"+\"CDR:\"+newDirection.toString()+\" \"+\"PDR:\"+getPossibleDirections());\n\t\t \n\t\t}\n\t\t\n\t\telse \n\t\t\tos.writeUTF(\"NACK\"+\" \"+\"RDY\");\n\t\t\n\t}",
"public void waitClient() {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"wait connect\");\n\t\t\t\tsocket = server.accept();\n\t\t\t\tSystem.out.println(\"Server connect successed\");\n\t\t\t\tSystem.out.println(\"gethost : InetAddress = \" + socket.getInetAddress());\n\t\t\t\tserver.close();\n\t\t\t} catch (java.io.IOException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}",
"private void processInviteToEstablishControlSocket(final Message msg) {\n final String readString = \n (String) msg.getProperty(P2PConstants.SECRET_KEY);\n final byte[] readKey = Base64.decodeBase64(readString);\n final byte[] writeKey = CommonUtils.generateKey();\n final String sdp = (String) msg.getProperty(P2PConstants.SDP);\n final ByteBuffer offer = ByteBuffer.wrap(Base64.decodeBase64(sdp));\n final String offerString = MinaUtils.toAsciiString(offer);\n log.info(\"Processing offer: {}\", offerString);\n \n final OfferAnswer offerAnswer;\n try {\n offerAnswer = this.offerAnswerFactory.createAnswerer(\n new ControlSocketOfferAnswerListener(msg.getFrom(), readKey, writeKey), false);\n }\n catch (final OfferAnswerConnectException e) {\n // This indicates we could not establish the necessary connections \n // for generating our candidates.\n log.warn(\"We could not create candidates for offer: \" + sdp, e);\n \n final Message error = newError(msg);\n xmppConnection.sendPacket(error);\n return;\n }\n final byte[] answer = offerAnswer.generateAnswer();\n final long tid = (Long) msg.getProperty(P2PConstants.TRANSACTION_ID);\n \n // TODO: This is a throwaway key here since the control socket is not\n // encrypted as of this writing.\n final Message inviteOk = newInviteOk(tid, answer, writeKey);\n final String to = msg.getFrom();\n inviteOk.setTo(to);\n log.info(\"Sending CONTROL INVITE OK to {}\", inviteOk.getTo());\n XmppUtils.goOffTheRecord(to, xmppConnection);\n xmppConnection.sendPacket(inviteOk);\n \n offerAnswer.processOffer(offer);\n log.debug(\"Done processing CONTROL XMPP INVITE!!!\");\n }",
"public void printSuccess() {\n LOGGER.info(\"PACKMAN: Client connection success\");\n }",
"private void newGame() {\n try {\n toServer.writeInt(READY);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void b_sendActionPerformed(java.awt.event.ActionEvent evt) { \r\n\t\tString nothing = \"\";\r\n\t\tif ((b_sendText.getText()).equals(nothing)) {\r\n\t\t\tb_sendText.setText(\"\");\r\n\t\t\tb_sendText.requestFocus();\r\n\t\t}\r\n\t\telse {\r\n\t\t\ttry {\r\n\t\t\t\ttellEveryone(\"Server\" + \":\" + b_sendText.getText() + \":\" + \"Chat\");\r\n\t\t\t\tPrint_Writer.flush(); // flushes the buffer\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t}\r\n\t\t\tb_sendText.setText(\"\");\r\n\t\t\tb_sendText.requestFocus();\r\n\t\t}\r\n\r\n\t\tb_sendText.setText(\"\");\r\n\t\tb_sendText.requestFocus();\r\n\r\n\t}",
"public void talk() throws IOException, InterruptedException{\n\t\ttoServer.println(\"PICKUP\");\n\t\ttoServer.println(\"HELLO\");\n\t\ttoServer.println(\"LOOK\");\n\t\twhile (!gameOver){\n\t\t\tThread.sleep(500);\n\t\t\ttoServer.println(queue.take());\n\t\t\ttoServer.println(\"LOOK\");\n\t\t}\n\t}",
"private void setup_client_socket()\n {\n try\n {\n System.out.println(\"Setting up client socket\");\n final InetAddress addr = InetAddress.getByAddress(serverIP);\n //if you request a socket to a nonexistent addr, then\n requestSocket = new Socket(addr, 2008);\n \n out = new ObjectOutputStream(requestSocket.getOutputStream());\n out.flush();\n in = new ObjectInputStream(requestSocket.getInputStream());\n \n out.writeObject(\"confour\");\n System.out.println(\"waiting for response from server\");\n String msg = (String)in.readObject(); //waiting or starting\n System.out.println(\"readin: \"+ msg);\n\n if(msg.equals(\"waiting\"))\n {\n System.out.println(\"waiting for \\\"starting\\\"\");\n\n //create window\n\n wait_window.setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n JButton accept = new JButton(\"CANCEL\");\n\n accept.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) \n {\n iquit = true;\n wait_window.dispose();\n }\n });\n\n wait_window.add(accept);\n wait_window.setLocation(300, 300);\n wait_window.setSize(400, 200);\n wait_window.setVisible(true);\n wait_window.paintAll(wait_window.getGraphics());\n //window done\n\n myTurn = true;\n System.out.println(\"its my turn\");\n }\n else\n {\n myTurn = false; \n System.out.println(\"its NOT my turn\");\n }\n }\n catch(ConnectException ce)\n {\n System.err.println(\"Connection timed out - invalid ip most like\");\n final JFrame quit_window = new JFrame(\"Unable to connect to given IP\");\n JButton accept = new JButton(\"OK\");\n accept.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n quit_window.dispose();\n\n }\n });\n quit_window.add(accept);\n quit_window.setLocation(300, 300);\n quit_window.setSize(400, 200);\n quit_window.setVisible(true);\n this.dispose();\n }\n catch(ClassNotFoundException classNot)\n { \n System.err.println(\"data received in unknown format\"); \n }\n catch(UnknownHostException unknownHost)\n {\n System.err.println(\"You are trying to connect to an unknown host!\");\n final JFrame quit_window = new JFrame(\"Unable to connect to given IP - Unknown Host\");\n JButton accept = new JButton(\"OK\");\n accept.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n quit_window.dispose();\n\n }\n });\n quit_window.add(accept);\n quit_window.setLocation(300, 300);\n quit_window.setSize(400, 200);\n quit_window.setVisible(true);\n this.dispose();\n }\n catch(IOException ioException)\n {\n ioException.printStackTrace();\n }\n }",
"public void receiveInfoFromServerC() throws IOException\n\t{\n\t\tstatus = fromServer.readInt();\n\n\t\tif (status == PLAYER1WINS)\n\t\t{\t\n\t\t\tsetMove(currentToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"You've won!\")); \n\t\t\tcontinueToPlay = false;\n\t\t}\n\n\t\telse if (status == PLAYER2WINS)\n\t\t{\n\t\t\tsetMove(otherToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Game over - Player O has won!\"));\n\t\t\tcontinueToPlay = false;\n\t\t}\n\n\t\telse if (status == DRAW)\n\t\t{\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Game over - It's a tie!\"));\n\t\t\tsetMove(otherToken);\n\t\t\tcontinueToPlay = false;\n\t\t}\n\t\telse if (status == WAIT)\n\t\t{\n\t\t\tsetMove(currentToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Other player's turn.\"));\n\t\t\tmyTurn = false; \n\t\t}\n\t\telse if (status == CONTINUE)\n\t\t{\n\t\t\tsetMove(otherToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Your turn.\"));\n\t\t\tmyTurn = true;\n\t\t}\n\t}",
"public void setAccepted() {\r\n\t\tstatus = \"Accepted\";\r\n\t}",
"public boolean pingServer() {\n WifiMouseApplication.KnownServer selected = WifiMouseApplication.getSelectedServer();\n if(this.server.name != selected.name || this.server.bluetooth != selected.bluetooth)\n return false;\n\n sendStringOverNetwork(\"PING\", true);\n //Log.d(\"Waiting for ping...\", \"count: \"+(++count) +\", sessionIv: \"+sessionIV);\n String response = readStringFromNetwork(true);\n //Log.d(\"PingResponse\", \" \"+response);\n\n return response.equals(\"PING\");\n }",
"public void ack() {\n //disable current awaiting handler\n testFuture.cancel(false);\n //reset number of tryies;\n tryCount = 0;\n //shcedule next ping\n testFuture = mtpTimer.schedule(this, Mtp3.TIMEOUT_T2_SLTM, TimeUnit.SECONDS);\n if (logger.isDebugEnabled()) {\n \tlogger.debug(String.format(\"(%s) Test message acknowledged, Link test passed\", link.name));\n }\n }",
"pb4server.SendNoticeToLeaderAskReq getSendNoticeToLeaderAskReq();",
"private void doOK() {\n final JPPFWebSession session = (JPPFWebSession) getPage().getSession();\n final TableTreeData data = session.getTopologyData();\n final List<DefaultMutableTreeNode> selectedNodes = data.getSelectedTreeNodes();\n final CollectionMap<TopologyDriver, String> map = new ArrayListHashMap<>();\n for (final DefaultMutableTreeNode treeNode: selectedNodes) {\n final AbstractTopologyComponent comp = (AbstractTopologyComponent) treeNode.getUserObject();\n if ((comp.getParent() != null) && comp.isNode()) {\n final JPPFManagementInfo info = comp.getManagementInfo();\n if (info != null) map.putValue((TopologyDriver) comp.getParent(), comp.getUuid());\n }\n }\n for (final Map.Entry<TopologyDriver, Collection<String>> entry: map.entrySet()) {\n final TopologyDriver parent = entry.getKey();\n final NodeSelector selector = new UuidSelector(entry.getValue());\n try {\n parent.getForwarder().updateThreadPoolSize(selector, modalForm.getNbThreads());\n parent.getForwarder().updateThreadsPriority(selector, modalForm.getPriority());\n } catch(final Exception e) {\n log.error(e.getMessage(), e);\n }\n }\n }",
"public FutureResult sendToServer(String onTheWireFormat) throws IOException;",
"public void run(){\r\n\r\n\t\tString message = new String();\r\n\t\t\r\n\t\t\r\n\t\twhile(escoltant){\r\n\t\t\ttry{\r\n\t\t\t\t\r\n\t\t\t\tsClient = sServer.accept();\r\n\t\t\t\t\r\n\t\t\t\tdataIn = new ObjectInputStream(sClient.getInputStream());\r\n\t\t\t\t\r\n\t\t\t\tdataOut = new ObjectOutputStream(sClient.getOutputStream());\r\n\t\t\t\t//objectOut = new ObjectOutputStream(sClient.getOutputStream());\r\n\t\t\t\t\r\n\t\t\t\tmessage = (String)dataIn.readObject();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (message.startsWith(\"ADD\")){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(Logica.addUser(message)){\r\n\t\t\t\t\t\tdataOut.writeObject(\"OK\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tdataOut.writeObject(\"KO\");\r\n\t\t\t\t\t}\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (message.startsWith(\"LOG\")){\r\n\t\t\t\t\tdataOut.writeObject(Logica.checkUser(message));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(message.equals(\"MAPES\")){\r\n\t\t\t\r\n\t\t\t\t\tdataOut.writeObject(Logica.enviaEscenaris());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(message.startsWith(\"GUANYADA\")){\r\n\t\t\t\t\t\r\n\t\t\t\t\tConectorDB.insertPartidaGuanyada();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(message.startsWith(\"PERDUDA\")){\r\n\t\t\t\t\t\r\n\t\t\t\t\tConectorDB.insertPartidaPerduda();\r\n\t\t\t\t}\r\n\t\t\t\tdataIn.close();\r\n\t\t\t\tdataOut.close();\r\n\t\t\t\t\r\n\t\t\t\tsClient.close();\r\n\t\t\t}catch(IOException e){\r\n\t\t\t\t\r\n\t\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\r\n\t\t}\r\n\t}",
"void setOk();",
"public void finalResult() {\n ConnectionSockets.getInstance().sendMessage(Integer.toString(points)+\"\\n\");\n System.out.println(\"escreveu para o oponente\");\n opponentPoints = Integer.parseInt(ConnectionSockets.getInstance().receiveMessage());\n System.out.println(\"leu do oponente\");\n if(points != opponentPoints) {\n if (points > opponentPoints) {// Won\n MatchController.getInstance().getSets().add(1);\n MatchController.getInstance().increaseSet();\n } else { //Lost\n MatchController.getInstance().getSets().add(0);\n MatchController.getInstance().increaseSet();\n }\n }\n }",
"private void sendMsg()\n {\n try {\n spauldingApp.println(\"AckRequest.sendMsg() - sending request to nodeID= \" + node.getNodeID() + \" ...\");\n this.nbrTransmits++;\n //spauldingApp.eventLogger.writeMsgSentPing(fetchReqMsg);\n spauldingApp.getMoteIF().send(node.getNodeID(), requestMsg);\n } catch (Exception e) {\n spauldingApp.println(\"ERROR: Can't send message: \" + e);\n e.printStackTrace();\n }\n }",
"@Test\n public void serverPingsClient() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.sendFrame().ping(false, 2, 0);\n peer.acceptFrame();// PING\n\n peer.play();\n // play it back\n connect(peer);\n // verify the peer received what was expected\n MockHttp2Peer.InFrame ping = peer.takeFrame();\n Assert.assertEquals(0, ping.streamId);\n Assert.assertEquals(2, ping.payload1);\n Assert.assertEquals(0, ping.payload2);\n Assert.assertTrue(ping.ack);\n }",
"private void askForAPizza() {\n\t\tconnectToServer();\n\t\tout.println(\"Give me a pizza\");\n\t\tout.flush();\n\t\tdisconnectFromServer();\n\t}",
"@Override\n\tpublic void run() {\n\t\tPrintWriter out;\n\t\ttry {\n\t\t\tout = new PrintWriter(s.getOutputStream());\n\t\t\tout.print(\"HTTP/1.1 200 Ok\\n\\r\"+ \n\"Server: nginx/1.8.0\\n\\r\"+\n\"Date: Mon, 07 Dec 2015 09:11:39 GMT\\n\\r\"+ \n\"Content-Type: text/html\\n\\r\"+\n\"Connection: close\\n\\r\\n\\r\"+\n\"<html>\"+ \n\"<head><title>Test ok</title></head>\"+\n\"<body bgcolor=\\\"white\\\"> \"+\n\"<center><h1>HELLO</h1></center>\"+ \n\"</body>\"+\n\"</html>\"); \n\t\t\tout.close();\n\t\t\ts.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\n\n\t\n\t\t\n\t}",
"public void run() {\n\t\tPrintWriter out = null;\r\n\t\ttry {\r\n\t\t\tout = new PrintWriter(clientSocket.getOutputStream(), true);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tBufferedReader in = null;\r\n\t\ttry {\r\n\t\t\tin = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));\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\t\tString inputLine, outputLine;\r\n\t\tProtocol kkp = new Protocol();\r\n\r\n\t\toutputLine = kkp.processInput(null);\r\n\t\tout.println(outputLine);\r\n\t\t// Leo continuamente e interactuo\r\n\t\ttry {\r\n\t\t\twhile ((inputLine = in.readLine()) != null) {\r\n//\t\t\t\toutputLine = kkp.processInput(inputLine);\r\n\t\t\t\toutputLine = inputLine;\r\n\t\t\t\tout.println(outputLine);\r\n\t\t\t\tif (outputLine.equals(\"Bye.\")){\r\n\t\t\t\t\tbreak;\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\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\t\ttry {\r\n\t\t\t// Cierro la entrada y salida\r\n\t\t\tout.close();\r\n\t\t\tin.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally{\r\n\t\t\tlog.info(\"Clientes activos: \"+ (taskExecutor.getThreadPoolExecutor().getActiveCount()-1));\t\t\t\r\n\t\t}\r\n\t}",
"public void onServerSucceeded() {\n if (offline) {\n statusObserver.onServerCameBack();\n offline = false;\n }\n }",
"public void pingToClient() {\n Thread t = new Thread(() -> {\n while (connected) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n try {\n socketOut.writeObject(\"\");\n } catch (IOException e) {\n //e.printStackTrace();\n }\n }\n });\n t.start();\n }",
"public void run() {\r\n\t\ttry {\r\n\t\t\toutput = clientSocket.getOutputStream();\r\n\t\t\tinput = clientSocket.getInputStream();\r\n\t\t// send initial message on connect\r\n\t\t\tsendMessage(new common.messages.KVAdminMessage(\"connect\", \"CONNECT_SUCCESS\", \"\", \"\")); \r\n\r\n\t\t\r\n\t\t\twhile(isOpen) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// Receive the KV Message from Client and check if it is valid\r\n\t\t\t\t\tcommon.messages.KVMessage latestMsg = receiveMessage();\r\n\t\t\t\t\tif (latestMsg.validityCheck() == null) {\r\n\t\t\t\t\t\t// If it is valid Handle the message by calling the function in KVServer\r\n\t\t\t\t\t\tcommon.messages.KVMessage returnMsg = m_server.handleClientMessage(latestMsg);\r\n\t\t\t\t\t\tif (returnMsg.validityCheck() == null) {\r\n\t\t\t\t\t\t\t// If returned KVMessage was valid send it back to the client\r\n\t\t\t\t\t\t\tif (returnMsg.getStatus().equals(\"SERVER_STOPPED\") || returnMsg.getStatus().equals(\"SERVER_WRITE_LOCK\") || returnMsg.getStatus().equals(\"SERVER_NOT_RESPONSIBLE\")){\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Last command from client \" + latestMsg.getHeader() + \" was not processed by Server.\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Last command from client \" + latestMsg.getHeader() + \" was Successfully Processed by Server!\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tsendMessage(returnMsg);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// If returned KVMessage is not valid it will have all blank fields\r\n\t\t\t\t\t\t\tSystem.out.println(\"Last command from client \" + latestMsg + \" encountered a problem on Server side!\");\r\n\t\t\t\t\t\t\tsendMessage(returnMsg);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} \r\n\t\t\t\t\telse if (latestMsg.getHeader().trim().equals(\"\")) {\r\n\t\t\t\t\t\t//echo empty messages\r\n\t\t\t\t\t\tsendMessage(latestMsg);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t// If it is a bad message output error and echo it back to the client\r\n\t\t\t\t\t\tlogger.debug(\"Message from Client was not valid, sending errorous message back to client\");\r\n\t\t\t\t\t\tlogger.debug(latestMsg.getError());\r\n\t\t\t\t\t\tsendMessage(new common.messages.KVAdminMessage(latestMsg.getHeader(), \"FAILED\", latestMsg.getKey(), latestMsg.getValue()));\r\n\t\t\t\t\t}\r\n\t\t\t\t/* connection either terminated by the client or lost due to \r\n\t\t\t\t * network problems*/\t\r\n\t\t\t\t} catch (IOException ioe) {\r\n\t\t\t\t\tlogger.error(\"Connection lost!\");\r\n\t\t\t\t\tisOpen = false;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tlogger.error(\"Error! Connection could not be established!\", ioe);\r\n\t\t\t\r\n\t\t} finally {\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tif (clientSocket != null) {\r\n\t\t\t\t\tinput.close();\r\n\t\t\t\t\toutput.close();\r\n\t\t\t\t\tclientSocket.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException ioe) {\r\n\t\t\t\tlogger.error(\"Error! Unable to tear down connection!\", ioe);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private String httpOk() {\n return \"HTTP/1.1 200 OK\\r\\n\"\n + \"Content-Type: text/html\\r\\n\"\n + \"\\r\\n\";\n }",
"@Override\r\n\tpublic void run() {\r\n\t\twhile (closer) {\r\n\t\t\ttry {\r\n\t\t\t\tObjectInputStream ois = new ObjectInputStream(client.getInputStream());\r\n\t\t\t\tObject object = ois.readObject();\r\n\t\t\t\tArrayList<String> input = (ArrayList<String>) object;\r\n\t\t\t\tInteger election = inputTransformer(input);\r\n\t\t\t\tif (election == 1) {\r\n\t\t\t\t\tsl.getLogger().info(\"IncomingMessage on Client Type 1 - For Chat\");\r\n\t\t\t\t}\r\n\t\t\t\tif (election == 2) {\r\n\t\t\t\t\tsl.getLogger().info(\"IncomingMessage on Client Type 2 - For Points\");\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} catch (ClassNotFoundException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void awaitConnection(){\n System.out.println(\"Waiting for connection from client\");\n\n try {\n socket = server.accept();\n System.out.println(\"Client Connected!\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic void action() {\n\n\t\tif(this.step.equals(STATE_INIT))\n\t\t{\n\t\t\tthis.nbVoters = 0;\n\t\t\tthis.nbAsynchronousPlayers = 0;\n\t\t\tthis.globalResults = new VoteResults();\n\t\t\tthis.agentSender = null;\n\t\t\tthis.request = null;\n\t\t\tthis.currentTime = -1;\n\t\t\tthis.results = new VoteResults();\n\t\t\tthis.nextStep = STATE_RECEIVE_REQUEST;\n\n\n\t\t}\n\n\t\telse if(this.step.equals(STATE_RECEIVE_REQUEST))\n\t\t{\n\t\t\t/*** reception demande de vote **/\n\t\t\tMessageTemplate mt = MessageTemplate.and(\n\t\t\t\t\tMessageTemplate.MatchPerformative(ACLMessage.REQUEST),\n\t\t\t\t\tMessageTemplate.MatchConversationId(\"VOTE_REQUEST\"));\n\n\t\t\tACLMessage message = this.myAgent.receive(mt);\n\t\t\tif(message != null)\n\t\t\t{\n\t\t\t\tthis.agentSender = message.getSender();\n\n\t\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\t\ttry {\n\n\t\t\t\t\t//System.err.println(\"[RQST INITIAL] \"+message.getContent());\n\n\t\t\t\t\tthis.request = mapper.readValue(message.getContent(), VoteRequest.class);\n\t\t\t\t\tthis.request.setLocalVoteResults(this.results);\n\t\t\t\t\tthis.results.initWithChoice(this.request.getChoices());\n\n\t\t\t\t\tFunctions.newActionToLog(\"Début vote \"+this.request.getRequest(),this.myAgent, this.controllerAgent.getGameid());\n\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tthis.nextStep = SEND_REQUEST_GLOBAL_VOTE_RESULTS;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tblock(1000);\n\t\t\t}\n\n\t\t}\n\t\telse if(this.step.equals(SEND_REQUEST_GLOBAL_VOTE_RESULTS))\n\t\t{\n\t\t\tList<AID> agents = DFServices.findGameControllerAgent(\"ENVIRONMENT\", this.myAgent, this.controllerAgent.getGameid());\n\t\t\tif(!agents.isEmpty())\n\t\t\t{\n\t\t\t\tACLMessage message = new ACLMessage(ACLMessage.REQUEST);\n\t\t\t\tmessage.setSender(this.myAgent.getAID());\n\t\t\t\tfor(AID aid : agents)\n\t\t\t\t{\n\t\t\t\t\tmessage.addReceiver(aid);\n\t\t\t\t}\n\t\t\t\tmessage.setConversationId(\"GLOBAL_VOTE_RESULTS\");\n\n\t\t\t\tthis.myAgent.send(message);\n\t\t\t}\n\n\t\t\tthis.nextStep = RECEIVE_REQUEST_GLOBAL_VOTE_RESULTS;\n\t\t}\n\t\telse if(this.step.equals(RECEIVE_REQUEST_GLOBAL_VOTE_RESULTS))\n\t\t{\n\t\t\t/*** reception demande de vote **/\n\t\t\tMessageTemplate mt = MessageTemplate.and(\n\t\t\t\t\tMessageTemplate.MatchPerformative(ACLMessage.REQUEST),\n\t\t\t\t\tMessageTemplate.MatchConversationId(\"GLOBAL_VOTE_RESULTS\"));\n\n\t\t\tACLMessage message = this.myAgent.receive(mt);\n\t\t\tif(message != null)\n\t\t\t{\n\n\t\t\t\t//System.out.println(\"CTRL Reception de global results\");\n\t\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\t\ttry {\n\t\t\t\t\tthis.globalResults = mapper.readValue(message.getContent(), VoteResults.class);\n\t\t\t\t\tthis.request.setGlobalCitizenVoteResults(this.globalResults);\n\t\t\t\t} \n\t\t\t\tcatch (IOException e) \n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tthis.nextStep = STATE_GET_SIMPLE_SUSPICION;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tblock(1000);\n\t\t\t}\n\t\t}\t\t\n\t\telse if(this.step.equals(STATE_SEND_REQUEST))\n\t\t{\n\t\t\tACLMessage messageRequest = new ACLMessage(ACLMessage.REQUEST);\n\t\t\tmessageRequest.setSender(this.myAgent.getAID());\n\t\t\tmessageRequest.setConversationId(\"VOTE_REQUEST\");\n\n\t\t\tint reste = this.request.getAIDVoters().size()-this.nbVoters;\n\t\t\tif(false )// reste >= Data.MAX_SYNCHRONOUS_PLAYERS)\n\t\t\t{\n\t\t\t\t/** hybrid synchronous mode **/\n\t\t\t\tthis.nbAsynchronousPlayers = (int) (Math.random()*Math.min(Data.MAX_SYNCHRONOUS_PLAYERS-1, (reste-1)))+1;\n\t\t\t\t//System.err.println(\"HYDBRID ASYNCRHONOUS ENABLED BECAUSE TOO MANY PARTICIPANTS \"+this.nbAsynchronousPlayers+\" in //\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.nbAsynchronousPlayers = 1;\n\t\t\t}\n\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\n\t\t\tString json =\"\";\n\n\t\t\ttry {\t\t\n\t\t\t\tjson = mapper.writeValueAsString(this.request);\t\n\t\t\t\tSystem.err.println(\"[RQST] \"+json);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tmessageRequest.setContent(json);\n\t\t\tfor(int i = 0; i<this.nbAsynchronousPlayers; ++i)\n\t\t\t{\n\t\t\t\t//System.err.println(\"DK ENVOI REQUEST \"+this.request.getAIDVoters().get(this.nbVoters+i).getLocalName());\n\t\t\t\tmessageRequest.addReceiver(this.request.getAIDVoters().get(this.nbVoters+i));\t\n\t\t\t}\n\n\t\t\tthis.myAgent.send(messageRequest);\n\n\t\t\tthis.nextStep = STATE_RECEIVE_INFORM;\n\t\t}\n\t\telse if(this.step.equals(STATE_RECEIVE_INFORM))\n\t\t{\n\t\t\tif(this.currentTime == -1)\n\t\t\t{\n\t\t\t\tthis.currentTime = System.currentTimeMillis();\n\t\t\t}\n\n\t\t\tif(System.currentTimeMillis() - this.currentTime > 3000)\n\t\t\t{\n\t\t\t\tthis.currentTime = -1;\n\t\t\t\tACLMessage wakeup = new ACLMessage(ACLMessage.UNKNOWN);\n\t\t\t\twakeup.setSender(this.myAgent.getAID());\n\t\t\t\tif(nbVoters < this.request.getVoters().size())\n\t\t\t\t{\n\t\t\t\t\twakeup.addReceiver(this.request.getAIDVoters().get(nbVoters));\n\t\t\t\t\twakeup.setConversationId(\"WAKEUP\");\n\t\t\t\t\tthis.myAgent.send(wakeup);\n\n\t\t\t\t\tSystem.out.println(\"Relance du joueur \"+this.request.getAIDVoters().get(nbVoters).getLocalName()+\" ...\");\n\t\t\t\t}\n\n\n\t\t\t}\n\n\t\t\tMessageTemplate mt = MessageTemplate.and(\n\t\t\t\t\tMessageTemplate.MatchPerformative(ACLMessage.INFORM),\n\t\t\t\t\tMessageTemplate.MatchConversationId(\"VOTE_INFORM\"));\n\n\t\t\tACLMessage message = this.myAgent.receive(mt);\n\t\t\tif(message!=null)\n\t\t\t{\n\t\t\t\tthis.currentTime = -1;\n\t\t\t\t++this.nbVoters;\n\t\t\t\t--this.nbAsynchronousPlayers;\n\n\t\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\t\tVoteResults res = new VoteResults();\n\t\t\t\ttry {\n\t\t\t\t\tres = mapper.readValue(message.getContent(), VoteResults.class);\n\t\t\t\t} \n\t\t\t\tcatch (IOException e) \n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tAID aidPlayer = message.getSender();\n\n\t\t\t\tthis.results.add(res);\n\n\t\t\t\tif(this.request.getRequest().equals(\"CITIZEN_VOTE\")&&\n\t\t\t\t\t\tDFServices.containsGameAgent(aidPlayer, \"PLAYER\", \"MAYOR\", this.myAgent, this.controllerAgent.getGameid()))\n\t\t\t\t{\n\t\t\t\t\t/** poids double **/\n\t\t\t\t\tthis.results.add(res);\n\t\t\t\t\tthis.globalResults.add(res);\n\t\t\t\t}\n\n\n\t\t\t\t//envoi du resultat partiel \n\t\t\t\tString json = \"\";\n\t\t\t\tmapper = new ObjectMapper();\n\t\t\t\ttry {\n\t\t\t\t\tjson = mapper.writeValueAsString(this.results);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tACLMessage msg = new ACLMessage(ACLMessage.AGREE);\n\t\t\t\tmsg.setContent(json);\n\t\t\t\tmsg.setSender(this.myAgent.getAID());\n\t\t\t\tmsg.setConversationId(\"NEW_VOTE_RESULTS\");\n\n\t\t\t\tList<AID> agents = DFServices.findGameControllerAgent(\"ENVIRONMENT\", this.myAgent, this.controllerAgent.getGameid());\n\t\t\t\tif(!agents.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tfor(AID aid : agents)\n\t\t\t\t\t{\n\t\t\t\t\t\tmsg.addReceiver(aid);\n\t\t\t\t\t}\n\t\t\t\t\tthis.myAgent.send(msg);\n\t\t\t\t}\n\n\t\t\t\t///\tSystem.err.println(\"\\nSV : \"+this.nbVoters+\"/\"+this.request.getAIDVoters().size());\n\n\t\t\t\tif(this.nbVoters >= this.request.getAIDVoters().size())\n\t\t\t\t{\n\t\t\t\t\tthis.nbVoters = 0;\n\t\t\t\t\t//System.err.println(\"SV next step\");\n\t\t\t\t\tthis.nextStep = STATE_RESULTS;\n\t\t\t\t}\n\t\t\t\telse if(this.nbAsynchronousPlayers > 0)\n\t\t\t\t{\n\t\t\t\t\t//System.err.println(\"SV waiting other\");\n\t\t\t\t\tthis.nextStep = STATE_RECEIVE_INFORM;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tSystem.err.println(\"SV send request to other\");\n\t\t\t\t\tthis.nextStep = STATE_SEND_REQUEST;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tblock(1000);\t\n\t\t\t}\n\t\t}\n\n\n\t\telse if(this.step.equals(STATE_GET_SIMPLE_SUSPICION))\n\t\t{\n\t\t\tACLMessage messageRequest = new ACLMessage(ACLMessage.REQUEST);\n\t\t\tmessageRequest.setSender(this.myAgent.getAID());\n\t\t\tmessageRequest.setConversationId(\"GET_SIMPLE_SUSPICION\");\n\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\n\t\t\tString json =\"\";\n\n\t\t\ttry {\t\t\n\t\t\t\tjson = mapper.writeValueAsString(this.request);\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tmessageRequest.setContent(json);\n\t\t\tfor(AID aid : this.request.getAIDVoters()){\n\t\t\t\tmessageRequest.addReceiver(aid);\t\n\t\t\t}\n\n\t\t\tthis.nbVoters = 0;\n\t\t\tthis.myAgent.send(messageRequest);\n\t\t\tthis.nextStep = STATE_ADD_SIMPLE_SUSPICION;\n\t\t}\n\t\telse if(this.step.equals(STATE_ADD_SIMPLE_SUSPICION))\n\t\t{\n\t\t\tMessageTemplate mt = MessageTemplate.and(\n\t\t\t\t\tMessageTemplate.MatchPerformative(ACLMessage.INFORM),\n\t\t\t\t\tMessageTemplate.MatchConversationId(\"GET_SIMPLE_SUSPICION\"));\n\n\t\t\tACLMessage message = this.myAgent.receive(mt);\n\t\t\tif(message!=null)\n\t\t\t{\n\t\t\t\t++this.nbVoters;\n\n\t\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\t\tSuspicionScore suspicionScore = new SuspicionScore();\n\t\t\t\ttry {\n\t\t\t\t\tsuspicionScore = mapper.readValue(message.getContent(), SuspicionScore.class);\n\t\t\t\t\t//System.err.println(\"ADD PARTIAL SUSPICION \\n\"+message.getContent());\n\t\t\t\t} \n\t\t\t\tcatch (IOException e) \n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tAID aidPlayer = message.getSender();\n\t\t\t\tthis.request.getCollectiveSuspicionScore().addSuspicionScoreGrid(aidPlayer.getName(), suspicionScore);\n\n\t\t\t\tif(this.nbVoters>= this.request.getAIDVoters().size())\n\t\t\t\t{\n\t\t\t\t\tthis.nbVoters = 0;\n\t\t\t\t\tSystem.err.println(\"SUSPICION COLLECTIVE \\n \"+this.request.getCollectiveSuspicionScore().getScore());\n\n\t\t\t\t\t//sort random\n\t\t\t\t\tCollections.shuffle(this.request.getVoters());\n\t\t\t\t\tthis.nextStep = STATE_SEND_REQUEST;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.nextStep = STATE_ADD_SIMPLE_SUSPICION;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.nextStep = STATE_ADD_SIMPLE_SUSPICION;\n\t\t\t\tblock(1000);\n\t\t\t}\n\t\t}\n\n\t\telse if(this.step.equals(STATE_RESULTS))\n\t\t{\n\t\t\tthis.finalResults = this.results.getFinalResults();\n\n\t\t\t/** equality ? **/\n\t\t\tif(this.finalResults.size() == 1)\n\t\t\t{\n\t\t\t\tthis.nextStep = STATE_SEND_RESULTS;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//defavorisé le bouc emmissaire\n\t\t\t\tList<AID> scapegoats = DFServices.findGamePlayerAgent(Roles.SCAPEGOAT, this.myAgent, this.controllerAgent.getGameid());\n\t\t\t\tList<String> nameScapegoats = new ArrayList<String>();\n\t\t\t\tfor(AID scapegoat : scapegoats)\n\t\t\t\t{\n\t\t\t\t\tnameScapegoats.add(scapegoat.getName());\n\t\t\t\t}\n\t\t\t\tfor(String scapegoat : nameScapegoats)\n\t\t\t\t{\n\t\t\t\t\tif(this.finalResults.contains(scapegoat))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(this.request.isVoteAgainst())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.finalResults = nameScapegoats;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(this.finalResults.size()>1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.finalResults.remove(scapegoat);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(this.lastResults != null && this.lastResults.equals(this.finalResults))\n\t\t\t\t{\n\t\t\t\t\t/** interblocage **/\n\t\t\t\t\tArrayList<String> tmp = new ArrayList<String>();\n\n\t\t\t\t\t//System.err.println(\"INTERBLOCAGE\");\n\n\t\t\t\t\t/** random choice **/\n\t\t\t\t\ttmp.add(this.finalResults.get((int)Math.random()*this.finalResults.size()));\t\t\t\t\n\t\t\t\t\tthis.finalResults = tmp;\n\n\t\t\t\t\tthis.nextStep = STATE_SEND_RESULTS;\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// new vote with finalists\n\t\t\t\t\tthis.request.setChoices(this.finalResults);\n\n\t\t\t\t\t//sort random\n\t\t\t\t\tCollections.shuffle(this.request.getVoters());\n\n\t\t\t\t\tthis.results = new VoteResults();\n\t\t\t\t\tthis.results.initWithChoice(this.request.getChoices());\n\t\t\t\t\tthis.request.setLocalVoteResults(this.results);\n\t\t\t\t\tthis.lastResults = this.finalResults;\n\t\t\t\t\tthis.nbVoters = 0;\n\t\t\t\t\tthis.nextStep = STATE_SEND_REQUEST;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if(this.step.equals(STATE_SEND_RESULTS))\n\t\t{\n\t\t\tif(this.finalResults.isEmpty())\n\t\t\t{\n\t\t\t\tSystem.err.println(\"ERROR\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"RESULTS => \"+this.finalResults.get(0));\n\t\t\t}\n\n\t\t\t//envoi resultat final + maj global vote\n\t\t\tif(this.request.getRequest().equals(\"CITIZEN_VOTE\"))\n\t\t\t{\n\t\t\t\tString json = \"\";\n\t\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\t\ttry {\n\t\t\t\t\tjson = mapper.writeValueAsString(this.results);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tACLMessage message = new ACLMessage(ACLMessage.AGREE);\n\t\t\t\tmessage.setContent(json);\n\t\t\t\tmessage.setSender(this.myAgent.getAID());\n\t\t\t\tmessage.setConversationId(\"NEW_CITIZEN_VOTE_RESULTS\");\n\n\t\t\t\tList<AID> agents = DFServices.findGameControllerAgent(\"ENVIRONMENT\", this.myAgent, this.controllerAgent.getGameid());\n\t\t\t\tif(!agents.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tfor(AID aid : agents)\n\t\t\t\t\t{\n\t\t\t\t\t\tmessage.addReceiver(aid);\n\t\t\t\t\t}\n\t\t\t\t\tthis.myAgent.send(message);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tACLMessage message = new ACLMessage(ACLMessage.INFORM);\n\t\t\tmessage.setSender(this.myAgent.getAID());\n\t\t\tmessage.addReceiver(this.agentSender);\n\t\t\tmessage.setConversationId(\"VOTE_RESULTS\");\n\t\t\tmessage.setContent(this.finalResults.get(0));\n\n\n\t\t\tString name = this.finalResults.get(0);\n\n\t\t\tif(!this.request.isAskRequest()){\n\t\t\t\tint index = name.indexOf(\"@\");\n\t\t\t\tname = name.substring(0, index);\n\t\t\t\tFunctions.newActionToLog(\"Vote : \"+name, this.getAgent(), this.controllerAgent.getGameid());\n\t\t\t}\n\t\t\t\n\n\t\t\tthis.myAgent.send(message);\t\n\t\t\tthis.nextStep = STATE_INIT;\n\t\t}\n\n\n\n\t\tif(!this.nextStep.isEmpty())\n\t\t{\n\t\t\tthis.step = this.nextStep;\n\t\t\tthis.nextStep =\"\";\n\t\t}\n\n\n\t}",
"void reply(Server server);",
"@Override\n\t\tprotected Object doInBackground(Object... params) {\n\t\t\tServerInterface.sendCorrectAnswerResponse();\n\t\t\treturn null;\n\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\t\t\tObjectNode objectNode = mapper.createObjectNode();\n\t\t\t\t\tobjectNode.put(\"type\", \"PING\");\n\n\t\t\t\t\twebSocket.sendText(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(objectNode));\n\n\t\t\t\t\tlog.debug(\"Send Ping to Twitch PubSub. (Keep-Connection-Alive)\");\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tlog.error(\"Failed to Ping Twitch PubSub. ({})\", ex.getMessage());\n\t\t\t\t\treconnect();\n\t\t\t\t}\n\n\t\t\t}",
"public boolean isOkForAgent() {\r\n return okForAgent;\r\n }",
"public void run() {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"SERVER: all players connected!\");\n\t\t\t\t\n\t\t\t\t//build the info message for clients\n\t\t\t\tString gameConfig = \"INFO \" + Integer.toString(pitsPerPlayer) + \" \" + Integer.toString(seedsPerPit)\n\t\t\t\t + \" \" + Integer.toString(timerValMils);\n\t\t\t\t\n\t\t\t\t//append first/second character\n\t\t\t\tif (playerNum == 1) {\n\t\t\t\t\tgameConfig += \" F\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tgameConfig += \" S\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//append random/uniform distro character\n\t\t\t\tif (randomDistro) {\n\t\t\t\t\tgameConfig += \" R\";\n\t\t\t\t\tcurrentGame = new kalah(pitsPerPlayer, seedsPerPit, randomDistro);\n\t\t\t\t\t\n\t\t\t\t\tArrayList<Integer> randomSeeds = currentGame.getP1pits();\n\t\t\t\t\tfor (int i = 0; i < randomSeeds.size(); i++) {\n\t\t\t\t\t\tgameConfig += \" \" + Integer.toString(randomSeeds.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tgameConfig += \" S\";\n\t\t\t\t\tcurrentGame = new kalah(pitsPerPlayer, seedsPerPit, randomDistro);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//send to server \n\t\t\t\twriter.println(gameConfig);\n\t\t\t\t\n\t\t\t\t//process client commands (game loop for each client)\n\t\t\t\twhile (true) {\n\t\t\t\t\t\n\t\t\t\t\tString clientMessage = reader.readLine();\n\t\t\t\t\t\n\t\t\t\t\t//ignore empty commands\n\t\t\t\t\tif (!clientMessage.equals(null) && !clientMessage.equals(\"\")) {\n\t\t\t\t\t\tif (clientMessage.startsWith(\"MOVE\")) {\n\t\t\t\t\t\t\tSystem.out.println(\"SERVER: Client \" + playerNum + \" sent move: \" + clientMessage.substring(5));\n\n\t\t\t\t\t\t\tint clientMove = Integer.parseInt(clientMessage.substring(5));\n\n\t\t\t\t\t\t\tif (currentGame.move(clientMove)) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"SERVER: acknowledged client \" + playerNum + \"'s \" + \"move: \" + clientMessage.substring(5));\n\t\t\t\t\t\t\t\twriter.println(\"OK\");\n\n\t\t\t\t\t\t\t\t//send move to other client to keep their game in sync\n\t\t\t\t\t\t\t\topponent.writer.println(\"MOVE \" + clientMessage.substring(5));\n\t\t\t\t\t\t\t\tSystem.out.println(\"SERVER: Sent move \" + clientMessage.substring(5) + \" to client \" + opponent.playerNum);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//check for winner \n\t\t\t\t\t\t\t\tcurrentGame.checkGameOver();\n\t\t\t\t\t\t\t\tif (currentGame.gameOver) {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"SERVER: GAME OVER\");\n\t\t\t\t\t\t\t\t\tif (currentGame.winner == 0) {\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SERVER: Tie!\");\n\t\t\t\t\t\t\t\t\t\twriter.println(\"TIE\");\n\t\t\t\t\t\t\t\t\t\topponent.writer.println(\"TIE\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (playerNum == currentGame.winner) {\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SERVER: Player \" + playerNum + \" wins!\");\n\t\t\t\t\t\t\t\t\t\twriter.println(\"WINNER\");\n\t\t\t\t\t\t\t\t\t\topponent.writer.println(\"LOSER\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SERVER: Player \" + playerNum + \" wins!\");\n\t\t\t\t\t\t\t\t\t\twriter.println(\"LOSER\");\n\t\t\t\t\t\t\t\t\t\topponent.writer.println(\"WINNER\");\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} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\"SERVER: rejected client's move: \" + clientMessage.substring(5));\n\t\t\t\t\t\t\t\twriter.println(\"ILLEGAL\");\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\tcatch (IOException e) {\n\t\t\t\tSystem.out.println(\"Player error: \" + e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\ttry {\n\t\t\t\t\tsocket.close();\n\t\t\t\t}\n\t\t\t\tcatch (IOException e) {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"void send();",
"void ok();",
"public void send(int highOption, int option) throws InstantiationException, IllegalAccessException, IOException, InterruptedException, ClassNotFoundException, RemoteReadException\n\t{\n\t\tint index = 0;\n\t\tClientHelloWorldBroadcastResponse broadcastResponse;\n\t\tClientHelloWorldAnycastResponse anycastResponse;\n\t\tClientHelloWorldUnicastResponse unicastResponse;\n\t\tswitch (option)\n\t\t{\n\t\t\tcase ChatOptions.TYPE_CHAT:\n\t\t\t\tSystem.out.println(\"Please type your message: \");\n\t\t\t\tString message = in.nextLine();\n\t\t\t\tswitch (highOption)\n\t\t\t\t{\n\t\t\t\t\tcase MulticastOptions.BROADCAST_NOTIFICATION:\n\t\t\t\t\t\tMulticastClient.FRONT().syncNotify(new HelloWorldBroadcastNotification(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You notification is broadcast!\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase MulticastOptions.ANYCAST_NOTIFICATION:\n\t\t\t\t\t\tMulticastClient.FRONT().syncNotify(new HelloWorldAnycastNotification(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You notification is anycast!\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase MulticastOptions.UNICAST_NOTIFICATION:\n\t\t\t\t\t\tMulticastClient.FRONT().syncNotify(new HelloWorldUnicastNotification(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You notification is unicast!\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase MulticastOptions.BROADCAST_REQUEST:\n\t\t\t\t\t\tbroadcastResponse = (ClientHelloWorldBroadcastResponse)MulticastClient.FRONT().read(new ClientHelloWorldBroadcastRequest(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You request is broadcast!\");\n\t\t\t\t\t\tSystem.out.println(\"You got \" + broadcastResponse.getResponses().size() + \" responses\");\n\t\t\t\t\t\tfor (HelloWorldBroadcastResponse response : broadcastResponse.getResponses())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(++index + \") response = \" + response.getHelloWorld().getHelloWorld());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase MulticastOptions.UNICAST_REQUEST:\n\t\t\t\t\t\tunicastResponse = (ClientHelloWorldUnicastResponse)MulticastClient.FRONT().read(new ClientHelloWorldUnicastRequest(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You request is unicast!\");\n\t\t\t\t\t\tSystem.out.println(\"You got \" + unicastResponse.getResponses().size() + \" responses\");\n\t\t\t\t\t\tfor (HelloWorldUnicastResponse response : unicastResponse.getResponses())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(++index + \") response = \" + response.getHelloWorld().getHelloWorld());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase MulticastOptions.ANYCAST_REQUEST:\n\t\t\t\t\t\tanycastResponse = (ClientHelloWorldAnycastResponse)MulticastClient.FRONT().read(new ClientHelloWorldAnycastRequest(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You request is anycast!\");\n\t\t\t\t\t\tSystem.out.println(\"You got \" + anycastResponse.getResponses().size() + \" responses\");\n\t\t\t\t\t\tfor (HelloWorldAnycastResponse response : anycastResponse.getResponses())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(++index + \") response = \" + response.getHelloWorld().getHelloWorld());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase ChatOptions.QUIT_CHAT:\n\t\t\t\tbreak;\n\t\t}\n\t}",
"@Override\n\tpublic void run(){\n\t\tInetAddress IPAddress = serverTcpSocket.getInetAddress();\n\t\tfor (ClientObj c: clients)\n\t\t\tif (c.getId() == client.getId()){\n\t\t\t\tSystem.out.print(IPAddress + \" Client already connected!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\ttry{\n\t\t\t// Check handshake received for correctness\n\t\t\t//(connect c->s) [herader | \"JUSTIN\\0\" | connection port] (udp)\n\t\t\t//(connect response s->c) [header | client id | port] (udp)\n\t \n\t // open the connection\n\t\t clientSocket = null;\n\t\t Socket clientListener = null;\n\t\t // wait for client connection on tcp port\n\t\t //serverTcpSocket.setSoTimeout(5000);\n\t \tSystem.out.println (\" Waiting for tcp connection.....\");\n\t \tclientSocket = serverTcpSocket.accept();\n\t \tclientListener = serverTcpSocket.accept();\n\t \tclient.setListenerSocket(clientListener);\n\t\t\tIPAddress = clientSocket.getInetAddress();\n\t\t\tint recv_port = clientSocket.getPort();\n\t\t\tSystem.out.println(IPAddress + \": Client connected @ port \" + recv_port);\n\n\t\t // handle tcp connection\n\t\t\tclientSocket.setSoTimeout(Constants.ACK_TIMEOUT);\n\t\t out = new BufferedOutputStream(clientSocket.getOutputStream());\n\t\t\tin = new BufferedInputStream(clientSocket.getInputStream());\n\t\t\tclient.setAddress(clientSocket.getInetAddress());\n\t\t\tclient.setPort(clientSocket.getPort());\n\t\t clients.add(client);\n\t\t\t\n\t\t // handle requests\n\t\t\twhile (!shutdown_normally) {\n\t\t\t\t// read just the header, then handle the req based on the info in the header\n\t\t\t\tif ((buf = Utility.readIn(in, Constants.HEADER_LEN)) == null)\n\t\t\t\t\tbreak;\n\t\t\t\tint flag = buf.getInt(0);\n\t\t\t\tint len2 = buf.getInt(4);\n\t\t\t\tint id = buf.getInt(8);\n\t\t\t\t\n\t\t\t\t// check for correctness of header\n\t\t\t\t\n\t\t\t\tif (flag < Constants.OPEN_CONNECTION || \n\t\t\t\t\t\tflag > Constants.NUM_FLAGS || \n\t\t\t\t\t\tid != client.getId() || \n\t\t\t\t\t\tlen2 < 0){\n\t\t\t\t\tout.close(); \n\t\t\t\t\tin.close(); \n\t\t\t\t\tclientSocket.close(); \n\t\t\t\t\tserverTcpSocket.close();\n\t\t\t\t\tclients.remove(client);\n\t\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\t\t\"Connection - FAILURE! (malformed header)\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// read payload\n\t\t\t\tif ((buf = Utility.readIn(in, Utility.getPaddedLength(len2))) == null)\n\t\t\t\t\tthrow new IOException(\"read failed.\");\n\t\t\t\t// update address (necessary?)\n\t\t\t\tclients.get(clients.indexOf(client)).setAddress(clientSocket.getInetAddress());\n\t\t\t\tclient.setAddress(clientSocket.getInetAddress());\n\t\t\t\tswitch (flag){\n\t\t\t\t\tcase Constants.ACK:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.VIEW_REQ:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing view request...\");\n\t\t\t\t\t\tViewFiles(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.DOWNLOAD_REQ:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing download request...\");\n\t\t\t\t\t\tDownload(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.UPLOAD_REQ:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing upload request...\");\n\t\t\t\t\t\tUpload(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.DOWNLOAD_ACK:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing download acknowledgment...\");\n\t\t\t\t\t\tDownloadCompleted(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.CLOSE_CONNECTION:\n\t\t\t\t\t\tshutdown_normally = true;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// close all open sockets\n\t\t out.close(); \n\t\t in.close(); \n\t\t clientSocket.close(); \n\t\t serverTcpSocket.close();\n\t\t} catch (SocketTimeoutException e) {\n\t\t\tSystem.err.println(IPAddress + \": Timeout waiting for response.\");\n\t\t} catch (UnknownHostException e) {\n\t\t\t// IPAdress unknown\n\t\t\tSystem.err.println(\"Don't know about host \" + IPAddress);\n\t\t} catch (IOException e) {\n\t\t\t// Error in communication\n\t\t\tSystem.err.println(\"Couldn't get I/O for the connection to \" +\n\t\t\t\t\tIPAddress);\n\t\t} catch (RuntimeException e){\n\t\t\t// Malformed Header or payload most likely\n\t\t\tSystem.err.println(IPAddress + \": Connection - FAILURE! (\" + e.getMessage() + \")\");\n\t\t} finally {\n\t\t\t// remove this client from active lists, close all (possibly) open sockets\n\t\t\tSystem.out.println(IPAddress + \": Connection - Closing!\");\n\t\t\tclients.remove(client);\n\t\t\ttry {\n\t\t\t\tSocket clientConnection = client.getListenerSocket();\n\t\t\t\tOutputStream out_c = new BufferedOutputStream(clientConnection.getOutputStream());\n\t\t\t\tbuf = Utility.addHeader(Constants.CLOSE_CONNECTION, 0, client.getId());\n\t\t\t\tout_c.write(buf.array());\n\t\t\t\tout_c.flush();\n\t\t\t\tout_c.close();\n\t\t\t\tclientConnection.close();\n\n\t\t\t\tif (out != null)\n\t\t\t\t\tout.close();\n\t\t\t\tif (in != null)\n\t\t\t\t\tin.close();\n\t\t\t\tif (!clientSocket.isClosed())\n\t\t\t\t\tclientSocket.close();\n\t\t\t\tif (!serverTcpSocket.isClosed())\n\t\t\t\t\tserverTcpSocket.close();\n\t\t\t} catch (IOException e){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\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 registerAgentSuccessTest() throws Exception {\n EventHandler eventHandler = new EventHandler();\n\n PinpointServerAcceptor serverAcceptor = new PinpointServerAcceptor();\n serverAcceptor.addStateChangeEventHandler(eventHandler);\n serverAcceptor.setMessageListenerFactory(testServerMessageListenerFactory);\n serverAcceptor.bind(\"127.0.0.1\", bindPort);\n\n TestRawSocket testRawSocket = new TestRawSocket();\n try {\n testRawSocket.connect(bindPort);\n\n sendAndReceiveSimplePacket(testRawSocket);\n Assertions.assertEquals(eventHandler.getCode(), SocketStateCode.RUN_WITHOUT_HANDSHAKE);\n\n int code = sendAndReceiveRegisterPacket(testRawSocket, PinpointRPCTestUtils.getParams());\n Assertions.assertEquals(eventHandler.getCode(), SocketStateCode.RUN_DUPLEX);\n\n sendAndReceiveSimplePacket(testRawSocket);\n } finally {\n testRawSocket.close();\n PinpointRPCTestUtils.close(serverAcceptor);\n }\n }",
"public void send() {\n\t}",
"@Test\n @SuppressWarnings({\"PMD.JUnitTestsShouldIncludeAssert\"})\n public void testSubscribeToRoomOkResponse() {\n // given\n final SubscribeRequest subscribeRequest = SubscribeRequest.builder()\n .user(TEST_USER + \"/\" + TEST_USER).nick(TEST_NICK).room(TEST_ROOM + \"@null\").build();\n given(clientResponseProvider.sendPostRequest(\n MultiUserChatConstants.MULTI_USER_CHAT_SUBSCRIBE_COMMAND, subscribeRequest))\n .willReturn(OK_RESPONSE);\n\n // when\n multiUserChatService.subscribeToRoom(TEST_USER, TEST_NICK, TEST_ROOM);\n\n // then\n }",
"public void go(){\n\n Socket client = null;\n try{\n serverSock = new ServerSocket(this.port);\n serverSock.setSoTimeout(0);\n while(Server.running){\n if((this.scp == null) || (this.town == null)){\n client = serverSock.accept();\n System.out.println(\"Client\");\n \n //both scp and town null, meaning first player to connect\n if((this.scp == null) && (this.town == null)){\n //assign at random\n double rand = Math.random(); \n if(rand > 0.5){\n this.scp = new ClientHandler(client);\n this.scpThread = new Thread(this.scp);\n this.scpThread.start();\n this.scp.sendMessage(\"<w>\");\n System.out.println(\"SCP\");\n }else{\n this.town = new ClientHandler(client);\n this.townThread = new Thread(this.town);\n this.townThread.start();\n this.town.sendMessage(\"<w>\");\n System.out.println(\"Town\");\n }\n //if scp is not taken\n }else if(this.scp == null){\n //assigns scp\n this.scp = new ClientHandler(client);\n this.scpThread = new Thread(this.scp);\n this.scpThread.start();\n this.scp.sendMessage(\"<w>\");\n System.out.println(\"SCP\");\n startGame();\n //if town is not taken\n }else if(this.town == null){\n //assigns town\n this.town = new ClientHandler(client);\n this.townThread = new Thread(this.town);\n this.townThread.start();\n this.town.sendMessage(\"<w>\");\n System.out.println(\"Town\");\n startGame();\n }\n }\n System.out.println(\"Server is running\");\n }\n System.out.println(\"Game finished\");\n }catch(Exception e){ \n System.out.println(\"Error accepting connection\");\n e.printStackTrace();\n }\n try{\n client.close();\n }catch (Exception e){ \n System.out.println(\"Failed to close socket\");\n }\n System.exit(-1);\n }",
"public boolean performOk() {\r\n\t\treturn super.performOk();\r\n\t}",
"@Override\r\n\tpublic void doMessage(InnerMessage msg, IConnect session) throws Exception {\n\t\tGameGateEnterGameSuccessResponse resq = GameGateEnterGameSuccessResponse.parseFrom(msg.getBody());\r\n\t\tIConnect con = ConnectorManage.getMinaConnect(msg.getClientSessionId());\r\n\t\tif (con != null) {\r\n\t\t\tcon.setRoleId(resq.getRoleId());\r\n\t\t\tMessageSend.sendGateToClient(createEnterGameResponse(resq.getRoleId()), msg.getClientSessionId());\r\n\t\t\tlog.error(\"send client ok\" + msg.getClientSessionId());\r\n\t\t} else {\r\n\t\t\tlog.error(\"不存在id\" + msg.getClientSessionId());\r\n\t\t}\r\n\t}",
"public void actionPerformed(ActionEvent event) {\n String command = event.getActionCommand();\n if (OK.equals(command)) {\n setResponse(new Integer(-1));\n } else {\n UnitType unitType = getSpecification().getUnitType(command);\n getController().trainUnitInEurope(unitType);\n initialize();\n }\n }",
"public void actionPerformed(ActionEvent e) {\n try {\r\n if (roomOrUser == 1) {\r\n // send message to a room\r\n sock.executeCommand(new RoomMessageCommand(new LongInteger(name), textArea_1.getText()\r\n .getBytes()));\r\n textArea_2.setText(textArea_2.getText() + textField.getText() + \": \" + textArea_1.getText()\r\n + \"\\n\");\r\n } else if (roomOrUser == 2) {\r\n // send message to a user\r\n sock.executeCommand(new UserMessageCommand(new LongInteger(name), textArea_1.getText()\r\n .getBytes(), true));\r\n textArea_2.setText(textArea_2.getText() + textField.getText() + \": \" + textArea_1.getText()\r\n + \"\\n\");\r\n }\r\n } catch (InvalidCommandException ex) {\r\n JOptionPane.showMessageDialog(null, \"Unable to join or leave room.\", \"alert\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n }",
"public boolean isOK() {\r\n return getPayload().getString(\"status\").equals(\"ok\");\r\n }",
"public void accept()\n { ua.accept();\n changeStatus(UA_ONCALL);\n if (ua_profile.hangup_time>0) automaticHangup(ua_profile.hangup_time); \n printOut(\"press 'enter' to hangup\"); \n }",
"public static Packet waitForACK() throws Exception {\r\n System.out.println(\"Waiting for ACK\");\r\n byte[] receiveData = new byte[Packet.maxPacketSize];\r\n DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);\r\n serverSocket.receive(receivePacket);\r\n receiveData = receivePacket.getData();\r\n \r\n Packet ACKvector = new Packet(receiveData);\r\n \r\n return ACKvector;\r\n }",
"private void declareWinner(){\r\n System.out.println(\"All proposals received\");\r\n AID best = proposals.get(0).getSender();\r\n for(ACLMessage proposal: proposals){\r\n String time = proposal.getContent().replaceFirst(\"bid\\\\(\", \"\");\r\n time = time.replaceFirst(\" sec\\\\)\", \"\");\r\n String bestTimeString = \r\n proposal.getContent().\r\n replaceFirst(\"bid\\\\(\", \"\").\r\n replaceFirst(\" sec\\\\)\", \"\");\r\n int bestTime = Integer.parseInt(bestTimeString);\r\n int propTime = Integer.parseInt(time);\r\n if (bestTime > propTime) {\r\n best = proposal.getSender();\r\n }\r\n }\r\n sendMessage(best, \"\", ACLMessage.ACCEPT_PROPOSAL);\r\n Object[] ob = new Object[2];\r\n ob[0] = best;\r\n ob[1] = currentPartial;\r\n expectedReturn.add(ob);\r\n System.out.println(\"Accepting proposal from \" + best.getLocalName());\r\n for(ACLMessage proposal: proposals){\r\n if(!proposal.getSender().equals(best)){\r\n sendMessage(proposal.getSender(), \"\", ACLMessage.REJECT_PROPOSAL);\r\n }\r\n }\r\n proposals.clear();\r\n solvables.remove(0);\r\n if(!solvables.isEmpty()){\r\n \r\n auctionJob(solvables.get(0));\r\n }\r\n }",
"public void requestAccepted(String username)\n\t{\n\t\t// Player otherPlayer = TcpProtocolHandler.getPlayer(username);\n\t\tPlayer otherPlayer = ActiveConnections.getPlayer(username);\n\t\tif(otherPlayer != null)\n\t\t{\n\t\t\tif(m_requests.containsKey(username))\n\t\t\t\tswitch(m_requests.get(username))\n\t\t\t\t{\n\t\t\t\t\tcase BATTLE:\n\t\t\t\t\t\t/* First, ensure both players are on the same map */\n\t\t\t\t\t\tif(otherPlayer.getMap() != getMap())\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t/* Based on the map's pvp type, check this battle is possible If pvp is enforced, it will be started when the offer is made */\n\t\t\t\t\t\tif(getMap().getPvPType() != null)\n\t\t\t\t\t\t\tswitch(getMap().getPvPType())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcase DISABLED:\n\t\t\t\t\t\t\t\t\t/* Some maps have pvp disabled */\n\t\t\t\t\t\t\t\t\tServerMessage sendNotOther = new ServerMessage(ClientPacket.PVP_PACKETS);\n\t\t\t\t\t\t\t\t\tsendNotOther.addInt(2);\n\t\t\t\t\t\t\t\t\totherPlayer.getSession().Send(sendNotOther);\n\t\t\t\t\t\t\t\t\tServerMessage sendNot = new ServerMessage(ClientPacket.PVP_PACKETS);\n\t\t\t\t\t\t\t\t\tsendNot.addInt(2);\n\t\t\t\t\t\t\t\t\tgetSession().Send(sendNot);\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\tcase ENABLED:\n\t\t\t\t\t\t\t\t\t/* This is a valid battle, start it */\n\t\t\t\t\t\t\t\t\tensureHealthyPokemon();\n\t\t\t\t\t\t\t\t\totherPlayer.ensureHealthyPokemon();\n\t\t\t\t\t\t\t\t\tm_battleField = new PvPBattleField(DataService.getBattleMechanics(), this, otherPlayer);\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\tcase ENFORCED:\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tm_battleField = new PvPBattleField(DataService.getBattleMechanics(), this, otherPlayer);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase TRADE:\n\t\t\t\t\t\tif(canTrade() && otherPlayer.canTrade())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* Set the player as talking so they can't move */\n\t\t\t\t\t\t\tm_isTalking = true;\n\t\t\t\t\t\t\t/* Create the trade */\n\t\t\t\t\t\t\tm_trade = new Trade(this, otherPlayer);\n\t\t\t\t\t\t\totherPlayer.setTrade(m_trade);\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\tServerMessage sendNotOther = new ServerMessage(ClientPacket.PVP_PACKETS);\n\t\t\t\t\t\t\tsendNotOther.addInt(4);\n\t\t\t\t\t\t\totherPlayer.getSession().Send(sendNotOther);\n\t\t\t\t\t\t\tServerMessage sendNot = new ServerMessage(ClientPacket.PVP_PACKETS);\n\t\t\t\t\t\t\tsendNot.addInt(4);\n\t\t\t\t\t\t\tgetSession().Send(sendNot);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tServerMessage sendNot = new ServerMessage(ClientPacket.PVP_PACKETS);\n\t\t\tsendNot.addInt(0);\n\t\t\tgetSession().Send(sendNot);\n\t\t}\n\t}",
"public static void sendDetections(String ip, String puerto) {\n\n\t\ttry {\n\n\t\t\tSocket clientSocket = new Socket(ip, Integer.parseInt(puerto));\n\t\t\tSystem.out.println(\"Ready to send confirmations...\");\n\t\t\tint imagecont = 1;\n\n\t\t\t//Send confirmations all time\n\t\t\twhile(true) {\n\n\t\t\t\tif(checkDection(imagecont)) {\n\n\t\t\t\t\tsendResponse(clientSocket,imagecont);\n\t\t\t\t}\n\n\t\t\t\telse{\n\t\t\t\t\tsendNoResponse(clientSocket,imagecont);\n\t\t\t\t}\n\n\t\t\t\timagecont++;\n\t\t\t}\n\t\t}\n\n\t\tcatch(UnknownHostException e) {\n\n\t\t\tSystem.out.println(e);\n\t\t}\n\n\t\tcatch(IOException e) {\n\n\t\t\tSystem.out.println(\"Server is disconnected\");\n\t\t}\n\t}",
"@Override\n\tpublic void execute() {\n\t\tlog.info(\"running...\");\n\n\n\t\t/* example for finding the server agent */\n\t\tIAgentDescription serverAgent = thisAgent.searchAgent(new AgentDescription(null, \"ServerAgent\", null, null, null, null));\n\t\tif (serverAgent != null) {\n\t\t\tthis.server = serverAgent.getMessageBoxAddress();\n\n\t\t\t// TODO\n\t\t\tif (!hasGameStarted) {\n\t\t\t\tStartGameMessage startGameMessage = new StartGameMessage();\n\t\t\t\tstartGameMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\tstartGameMessage.gridFile = \"/grids/h_01.grid\";\n\t\t\t\t// Send StartGameMessage(BrokerID)\n\t\t\t\tsendMessage(server, startGameMessage);\n\t\t\t\treward = 0;\n\t\t\t\tthis.hasGameStarted = true;\n\t\t\t}\n\n\t\t} else {\n\t\t\tSystem.out.println(\"SERVER NOT FOUND!\");\n\t\t}\n\n\n\t\t/* example of handling incoming messages without listener */\n\t\tfor (JiacMessage message : memory.removeAll(new JiacMessage())) {\n\t\t\tObject payload = message.getPayload();\n\n\t\t\tif (payload instanceof StartGameResponse) {\n\t\t\t\t/* do something */\n\n\t\t\t\t// TODO\n\t\t\t\tStartGameResponse startGameResponse = (StartGameResponse) message.getPayload();\n\n\t\t\t\tthis.maxNum = startGameResponse.initialWorkers.size();\n\t\t\t\tthis.agentDescriptions = getMyWorkerAgents(this.maxNum);\n\t\t\t\tthis.gameId = startGameResponse.gameId;\n\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + startGameResponse.toString());\n\n\t\t\t\t// TODO handle movements and obstacles\n\t\t\t\tthis.gridworldGame = new GridworldGame();\n\t\t\t\tthis.gridworldGame.obstacles.addAll(startGameResponse.obstacles);\n\n\n\n\t\t\t\t// TODO nicht mehr worker verwenden als zur Verfügung stehen\n\n\t\t\t\t/**\n\t\t\t\t * Initialize the workerIdMap to get the agentDescription and especially the\n\t\t\t\t * MailBoxAdress of the workerAgent which we associated with a specific worker\n\t\t\t\t *\n\n\t\t\t\tfor (Worker worker: startGameResponse.initialWorkers) {\n\t\t\t\t\tworkerIdMap.put(worker.id, this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)));\n\t\t\t\t\tworkerIdReverseAId.put(this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)).getAid(), worker.id);\n\t\t\t\t} */\n\n\t\t\t\t/**\n\t\t\t\t * Send the Position messages to each Agent for a specific worker\n\t\t\t\t * PositionMessages are sent to inform the worker where it is located\n\t\t\t\t * additionally put the position of the worker in the positionMap\n\t\t\t\t */\n\t\t\t\tfor (Worker worker: startGameResponse.initialWorkers) {\n\t\t\t\t\tpositionMap.put(worker.id, worker.position);\n\n\t\t\t\t\tworkerIdMap.put(worker.id, this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)));\n\t\t\t\t\tworkerIdReverseAID.put(this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)).getAid(), worker.id);\n\n\t\t\t\t\tIAgentDescription agentDescription = workerIdMap.get(worker.id);\n\t\t\t\t\tICommunicationAddress workerAddress = agentDescription.getMessageBoxAddress();\n\n\t\t\t\t\t// Send each Agent their current position\n\t\t\t\t\tPositionMessage positionMessage = new PositionMessage();\n\t\t\t\t\tpositionMessage.workerId = agentDescription.getAid();\n\t\t\t\t\tpositionMessage.gameId = startGameResponse.gameId;\n\t\t\t\t\tpositionMessage.position = worker.position;\n\t\t\t\t\tpositionMessage.workerIdForServer = worker.id;\n\t\t\t\t\t//System.out.println(\"ADDRESS IS \" + workerAddress);\n\n\t\t\t\t\tsendMessage(workerAddress, positionMessage);\n\t\t\t\t\t//break;\n\t\t\t\t}\n\n\t\t\t\thasAgents = true;\n\n\t\t\t\tfor (Order order: savedOrders) {\n\t\t\t\t\t// 3 Runden anfangs zum Initialisieren\n\t\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(order);\n\t\t\t\t\tPosition workerPosition = null;\n\t\t\t\t\tfor (IAgentDescription agentDescription: agentDescriptions) {\n\t\t\t\t\t\tif (agentDescription.getMessageBoxAddress().equals(workerAddress)) {\n\t\t\t\t\t\t\tString workerId = workerIdReverseAID.get(agentDescription.getAid());\n\t\t\t\t\t\t\tworkerPosition = positionMap.get(workerId);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tint steps = workerPosition.distance(order.position) + 2;\n\t\t\t\t\tint rewardMove = (steps > order.deadline)? 0 : order.value - steps * order.turnPenalty;\n\n\t\t\t\t\tSystem.out.println(\"REWARD: \" + rewardMove);\n\n\t\t\t\t\tif(rewardMove > 0) {\n\t\t\t\t\t\tTakeOrderMessage takeOrderMessage = new TakeOrderMessage();\n\t\t\t\t\t\ttakeOrderMessage.orderId = order.id;\n\t\t\t\t\t\ttakeOrderMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\t\t\ttakeOrderMessage.gameId = gameId;\n\t\t\t\t\t\tsendMessage(server, takeOrderMessage);\n\n\t\t\t\t\t\t// Save order into orderMap\n\t\t\t\t\t\tthis.orderMap.put(order.id, order);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (payload instanceof PositionConfirm) {\n\t\t\t\tPositionConfirm positionConfirm = (PositionConfirm) message.getPayload();\n\t\t\t\tif(positionConfirm.state == Result.FAIL) {\n\t\t\t\t\tString workerId = workerIdReverseAID.get(positionConfirm.workerId);\n\t\t\t\t\tIAgentDescription agentDescription = workerIdMap.get(workerId);\n\t\t\t\t\tICommunicationAddress workerAddress = agentDescription.getMessageBoxAddress();\n\n\t\t\t\t\tPositionMessage positionMessage = new PositionMessage();\n\n\t\t\t\t\tpositionMessage.workerId = agentDescription.getAid();\n\t\t\t\t\tpositionMessage.gameId = positionConfirm.gameId;\n\t\t\t\t\tpositionMessage.position = positionMap.get(workerId);\n\t\t\t\t\tpositionMessage.workerIdForServer = workerId;\n\n\t\t\t\t\tsendMessage(workerAddress, positionMessage);\n\t\t\t\t} else {\n\t\t\t\t\tactiveWorkers.add(message.getSender());\n\t\t\t\t\tfor (String orderId: orderMessages) {\n\t\t\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(this.orderMap.get(orderId));\n\t\t\t\t\t\tif(workerAddress.equals(message.getSender())){\n\t\t\t\t\t\t\tAssignOrderMessage assignOrderMessage = new AssignOrderMessage();\n\t\t\t\t\t\t\tassignOrderMessage.order = this.orderMap.get(orderId);\n\t\t\t\t\t\t\tassignOrderMessage.gameId = gameId;\n\t\t\t\t\t\t\tassignOrderMessage.server = this.server;\n\t\t\t\t\t\t\tif(activeWorkers.contains(workerAddress)){\n\t\t\t\t\t\t\t\tsendMessage(workerAddress, assignOrderMessage);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t\tif (payload instanceof OrderMessage) {\n\n\t\t\t\t// TODO entscheide, ob wir die Order wirklich annehmen wollen / können\n\n\t\t\t\tOrderMessage orderMessage = (OrderMessage) message.getPayload();\n\n\t\t\t\tif (!hasAgents){\n\t\t\t\t\tsavedOrders.add(orderMessage.order);\n\t\t\t\t\tcontinue;\n\t\t\t\t}else {\n\t\t\t\t\tOrder thisOrder = orderMessage.order;\n\n\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(thisOrder);\n\t\t\t\tPosition workerPosition = null;\n\t\t\t\tfor (IAgentDescription agentDescription: agentDescriptions) {\n\t\t\t\t\tif (agentDescription.getMessageBoxAddress().equals(workerAddress)) {\n\t\t\t\t\t\tString workerId = workerIdReverseAID.get(agentDescription.getAid());\n\t\t\t\t\t\tworkerPosition = positionMap.get(workerId);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// 3 Runden anfangs zum Initialisieren\n\t\t\t\t\tint steps = workerPosition.distance(thisOrder.position) + 1;\n\t\t\t\t\tint rewardMove = (steps > thisOrder.deadline)? 0 : thisOrder.value - steps * thisOrder.turnPenalty;\n\n\n\t\t\t\t\tSystem.out.println(\"REWARD: \" + rewardMove);\n\n\t\t\t\tif(rewardMove > 0) {\n\t\t\t\t\tTakeOrderMessage takeOrderMessage = new TakeOrderMessage();\n\t\t\t\t\ttakeOrderMessage.orderId = orderMessage.order.id;\n\t\t\t\t\ttakeOrderMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\t\ttakeOrderMessage.gameId = orderMessage.gameId;\n\t\t\t\t\tsendMessage(server, takeOrderMessage);\n\n\t\t\t\t\t// Save order into orderMap\n\t\t\t\t\tOrder order = ((OrderMessage) message.getPayload()).order;\n\t\t\t\t\tthis.orderMap.put(order.id, order);\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 * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + orderMessage.toString());\n\n\t\t\t\t// Save order into orderMap\n\n\t\t\t}\n\n\t\t\tif (payload instanceof TakeOrderConfirm) {\n\n\t\t\t\t// TODO\n\t\t\t\t// Got Order ?!\n\t\t\t\tTakeOrderConfirm takeOrderConfirm = (TakeOrderConfirm) message.getPayload();\n\t\t\t\tResult result = takeOrderConfirm.state;\n\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + takeOrderConfirm.toString());\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// Handle failed confirmation\n\n\t\t\t\t\t// Remove order from orderMap as it was rejected by the server\n\t\t\t\t\tthis.orderMap.remove(takeOrderConfirm.orderId);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\n\t\t\t\t// TODO send serverAddress\n\t\t\t\t// Assign order to Worker(Bean)\n\t\t\t\t// Send the order to the first agent\n\t\t\t\tAssignOrderMessage assignOrderMessage = new AssignOrderMessage();\n\t\t\t\tassignOrderMessage.order = this.orderMap.get(takeOrderConfirm.orderId);\n\t\t\t\tassignOrderMessage.gameId = takeOrderConfirm.gameId;\n\t\t\t\tassignOrderMessage.server = this.server;\n\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(assignOrderMessage.order);\n\t\t\t\tif(activeWorkers.contains(workerAddress)){\n\t\t\t\t\tsendMessage(workerAddress, assignOrderMessage);\n\t\t\t\t} else {\n\t\t\t\t\torderMessages.add(takeOrderConfirm.orderId);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (payload instanceof AssignOrderConfirm) {\n\n\t\t\t\t// TODO\n\t\t\t\tAssignOrderConfirm assignOrderConfirm = (AssignOrderConfirm) message.getPayload();\n\t\t\t\tResult result = assignOrderConfirm.state;\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// Handle failed confirmation\n\t\t\t\t\t// TODO\n\t\t\t\t\tICommunicationAddress alternativeWorkerAddress = getAlternativeWorkerAddress(((AssignOrderConfirm) message.getPayload()).workerId);\n\t\t\t\t\treassignOrder(alternativeWorkerAddress, assignOrderConfirm);\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\torderMessages.remove(assignOrderConfirm.orderId);\n\n\t\t\t\t// TODO Inform other workers that this task is taken - notwendig??\n\n\t\t\t}\n\n\t\t\tif (payload instanceof OrderCompleted) {\n\n\t\t\t\tOrderCompleted orderCompleted = (OrderCompleted) message.getPayload();\n\t\t\t\tResult result = orderCompleted.state;\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// TODO Handle failed order completion -> minus points for non handled rewards\n\t\t\t\t\treward += orderCompleted.reward;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\treward += orderCompleted.reward;\n\t\t\t\t// TODO remove order from the worker specific order queues\n\n\t\t\t}\n\n\t\t\tif (payload instanceof PositionUpdate) {\n\n\t\t\t\tPositionUpdate positionUpdate = (PositionUpdate) message.getPayload();\n\t\t\t\tupdateWorkerPosition(positionUpdate.position, positionUpdate.workerId);\n\n\t\t\t}\n\n\t\t\tif (payload instanceof EndGameMessage) {\n\n\t\t\t\tEndGameMessage endGameMessage = (EndGameMessage) message.getPayload();\n\t\t\t\t// TODO lernen lernen lernen lol\n\t\t\t\tSystem.out.println(\"Reward: \" + endGameMessage.totalReward);\n\t\t\t}\n\n\t\t}\n\t}",
"public final void setOk(final boolean ok) {\n this.ok = ok;\n }"
] | [
"0.7163991",
"0.7004556",
"0.63312024",
"0.6284284",
"0.625656",
"0.5936699",
"0.580771",
"0.5794258",
"0.57021016",
"0.5686726",
"0.5683635",
"0.5629169",
"0.5627464",
"0.55953544",
"0.55842996",
"0.5522175",
"0.5508916",
"0.55059",
"0.54843056",
"0.54669327",
"0.54646695",
"0.5425223",
"0.5414137",
"0.53995687",
"0.5396592",
"0.53741616",
"0.5342759",
"0.533279",
"0.5331041",
"0.5280638",
"0.527103",
"0.5258273",
"0.52558756",
"0.5251676",
"0.5242242",
"0.52416813",
"0.5238559",
"0.5235701",
"0.5230103",
"0.52291036",
"0.5225584",
"0.52238804",
"0.52187765",
"0.52134806",
"0.5206347",
"0.52056193",
"0.52053773",
"0.51917595",
"0.5167668",
"0.5166699",
"0.51643217",
"0.5162646",
"0.5157605",
"0.5154483",
"0.5151676",
"0.5150548",
"0.51499027",
"0.51443785",
"0.5131426",
"0.5131358",
"0.5131037",
"0.5124294",
"0.51168185",
"0.5116382",
"0.5111146",
"0.510419",
"0.51015747",
"0.5097941",
"0.50944793",
"0.50930566",
"0.5092374",
"0.50876695",
"0.50847703",
"0.50781786",
"0.5069149",
"0.5067864",
"0.5067309",
"0.50657827",
"0.50611794",
"0.50601184",
"0.5059546",
"0.50593275",
"0.5057701",
"0.5056558",
"0.5056421",
"0.50550663",
"0.505385",
"0.5053784",
"0.50403076",
"0.5038884",
"0.50316775",
"0.5030744",
"0.50278455",
"0.5026713",
"0.50240844",
"0.50232935",
"0.5018463",
"0.5015687",
"0.50135165",
"0.5012399"
] | 0.7125979 | 1 |
The sendElectionRequest() method sends an election request to all the servers with higher IDs | public static void sendElectionRequest()
{
System.out.println("INFO : Election initiated");
int numberOfFailedRequests = 0;
for ( int key : ServerState.getInstance().getServers().keySet() ) {
if( key > ServerState.getInstance().getSelfID() ){
Server destServer = ServerState.getInstance().getServers().get(key);
try {
MessageTransfer.sendServer(
ServerMessage.getElection( String.valueOf(ServerState.getInstance().getSelfID()) ),
destServer
);
System.out.println("INFO : Sent election request to s"+destServer.getServerID());
}
catch(Exception e){
System.out.println("WARN : Server s"+destServer.getServerID() +
" has failed, cannot send election request");
numberOfFailedRequests++;
}
}
}
if (numberOfFailedRequests == ServerState.getInstance().getNumberOfServersWithHigherIds()) {
if(!electionInProgress){
//startTime=System.currentTimeMillis();
electionInProgress = true;
receivedOk = false;
Runnable timer = new BullyAlgorithm("Timer");
new Thread(timer).start();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public com.google.common.util.concurrent.ListenableFuture<grpc.CommunicationServiceOuterClass.Elected> election(\n grpc.CommunicationServiceOuterClass.Election request) {\n return futureUnaryCall(\n getChannel().newCall(METHOD_ELECTION, getCallOptions()), request);\n }",
"public grpc.CommunicationServiceOuterClass.Elected election(grpc.CommunicationServiceOuterClass.Election request) {\n return blockingUnaryCall(\n getChannel(), METHOD_ELECTION, getCallOptions(), request);\n }",
"public void sendVoteRequests() {\n for(int i = 1; i <= mConfig.getNumServers(); i++) {\n this.remoteRequestVote(i, mConfig.getCurrentTerm(), mID, mLog.getLastIndex(), mLog.getLastTerm());\n }\n //Initiate count vote timer\n voteCountTimer = scheduleTimer((long) 5, 2);\n }",
"@Override\n public void processElection() {\n if (context.getState().equals(LEADER) || !context.getActive()) {\n return;\n }\n\n log.info(\"Peer #{} Start election\", context.getId());\n\n context.setState(CANDIDATE);\n Long term = context.incCurrentTerm();\n context.setVotedFor(context.getId());\n\n List<Integer> peersIds = context.getPeers().stream().map(Peer::getId).collect(Collectors.toList());\n long voteGrantedCount = 1L;\n long voteRevokedCount = 0L;\n\n //while didn't get heartbeat from leader or new election started\n while (checkCurrentElectionStatus(term)) {\n List<AnswerVoteDTO> answers = getVoteFromAllPeers(term, peersIds);\n peersIds = new ArrayList<>();\n for (AnswerVoteDTO answer : answers) {\n if (answer.getStatusCode().equals(OK)) {\n if (answer.getTerm() > context.getCurrentTerm()) {\n //• If RPC request or response contains term T > currentTerm: set currentTerm = T, convert to follower (§5.1)\n context.setTermGreaterThenCurrent(answer.getTerm());\n return;\n }\n if (answer.isVoteGranted()) {\n log.info(\"Peer #{} Vote granted from {}\", context.getId(), answer.getId());\n context.getPeer(answer.getId()).setVoteGranted(true);\n voteGrantedCount++;\n } else\n log.info(\"Peer #{} Vote revoked from {}\", context.getId(), answer.getId());\n voteRevokedCount++;\n } else {\n log.info(\"Peer #{} No vote answer from {}\", context.getId(), answer.getId());\n peersIds.add(answer.getId());\n }\n }\n if (voteGrantedCount >= context.getQuorum()) {\n winElection(term);\n return;\n } else if (voteRevokedCount >= context.getQuorum()) {\n loseElection(term);\n return;\n } //else retry\n delay();\n }\n }",
"public void election(grpc.CommunicationServiceOuterClass.Election request,\n io.grpc.stub.StreamObserver<grpc.CommunicationServiceOuterClass.Elected> responseObserver) {\n asyncUnaryCall(\n getChannel().newCall(METHOD_ELECTION, getCallOptions()), request, responseObserver);\n }",
"public void election(grpc.CommunicationServiceOuterClass.Election request,\n io.grpc.stub.StreamObserver<grpc.CommunicationServiceOuterClass.Elected> responseObserver) {\n asyncUnimplementedUnaryCall(METHOD_ELECTION, responseObserver);\n }",
"public static void sendCoordinatorMsg() {\n int numberOfRequestsNotSent = 0;\n for ( int key : ServerState.getInstance().getServers().keySet() ) {\n if ( key != ServerState.getInstance().getSelfID() ){\n Server destServer = ServerState.getInstance().getServers().get(key);\n\n try {\n MessageTransfer.sendServer(\n ServerMessage.getCoordinator( String.valueOf(ServerState.getInstance().getSelfID()) ),\n destServer\n );\n System.out.println(\"INFO : Sent leader ID to s\"+destServer.getServerID());\n }\n catch(Exception e) {\n numberOfRequestsNotSent += 1;\n System.out.println(\"WARN : Server s\"+destServer.getServerID()+\n \" has failed, it will not receive the leader\");\n }\n }\n }\n if( numberOfRequestsNotSent == ServerState.getInstance().getServers().size()-1 ) {\n // add self clients and chat rooms to leader state\n List<String> selfClients = ServerState.getInstance().getClientIdList();\n List<List<String>> selfRooms = ServerState.getInstance().getChatRoomList();\n\n for( String clientID : selfClients ) {\n LeaderState.getInstance().addClientLeaderUpdate( clientID );\n }\n\n for( List<String> chatRoom : selfRooms ) {\n LeaderState.getInstance().addApprovedRoom( chatRoom.get( 0 ),\n chatRoom.get( 1 ), Integer.parseInt(chatRoom.get( 2 )) );\n }\n\n leaderUpdateComplete = true;\n }\n }",
"private void initiatePreElection() {\n\t\tpreElectionInProgress = true;\n\t\tbackupHeartbeatTimer.cancel();\n\t\tif (reElectionTimer != null) {\n\t\t\treElectionTimer.cancel();\n\t\t}\n\t\tif (backupHeartbeatBroadcaster != null) {\n\t\t\tbackupHeartbeatBroadcaster.cancel();\n\t\t}\n\t\t// Broadcast election ordinality and reset isElectedFlag for all nodes\n\t\tfor (RemoteLoadBalancer remoteLoadBalancer : remoteLoadBalancers) {\n\t\t\tif (remoteLoadBalancer.isConnected() && remoteLoadBalancer.getState().equals(LoadBalancerState.PASSIVE)) {\n\t\t\t\tByteBuffer buffer = ByteBuffer.allocate(9);\n\t\t\t\tbuffer.put((byte) MessageType.ELECTION_MESSAGE.getValue());\n\t\t\t\tbuffer.putDouble(averageServerLatency);\t\n\t\t\t\tbuffer.flip();\n\t\t\t\ttry {\n\t\t\t\t\twhile (buffer.hasRemaining()) {\n\t\t\t\t\t\tremoteLoadBalancer.getSocketChannel().write(buffer);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t}\n\t\t\t}\n\t\t\tremoteLoadBalancer.setIsElectedBackup(false);\n\t\t}\n\n\t\t// TimerTask created that will determine the election results after the\n\t\t// timeout occurs.\n\t\tTimerTask timerTask = new TimerTask() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tRemoteLoadBalancer lowestLatencyCandidate = null;\n\t\t\t\tfor (RemoteLoadBalancer remoteLoadBalancer : remoteLoadBalancers) {\n\t\t\t\t\tif (remoteLoadBalancer.getState().equals(LoadBalancerState.PASSIVE)\n\t\t\t\t\t\t\t&& remoteLoadBalancer.getCandidacyValue() != null) {\n\t\t\t\t\t\tif (lowestLatencyCandidate == null\n\t\t\t\t\t\t\t\t&& remoteLoadBalancer.getCandidacyValue() < averageServerLatency) {\n\t\t\t\t\t\t\tlowestLatencyCandidate = remoteLoadBalancer;\n\t\t\t\t\t\t} else if (lowestLatencyCandidate != null && remoteLoadBalancer\n\t\t\t\t\t\t\t\t.getCandidacyValue() < lowestLatencyCandidate.getCandidacyValue()) {\n\t\t\t\t\t\t\tlowestLatencyCandidate = remoteLoadBalancer;\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Didn't get a lowest latency election message so assume this\n\t\t\t\t// load balancer is now the backup\n\t\t\t\tif (lowestLatencyCandidate == null) {\n\t\t\t\t\tbackupHeartbeatTimer.cancel();\n\t\t\t\t\tisElectedBackup = true;\n\t\t\t\t\tbackupHeartbeatBroadcaster = new HeartbeatBroadcaster(remoteLoadBalancers, backupHeartbeatIntervalMillis,\n\t\t\t\t\t\t\tLoadBalancerState.PASSIVE);\n\t\t\t\t\tnew Thread(backupHeartbeatBroadcaster).start();\n\t\t\t\t\t\n\t\t\t\t\t// Start timer for next pre-election\n\t\t\t\t\tstartReElectionTimer();\n\t\t\t\t\t\n\t\t\t\t\tComponentLogger.getInstance().log(LogMessageType.LOAD_BALANCER_ELECTED_AS_BACKUP);\n\t\t\t\t\tSystem.out.println(\"Elected as backup\");\n\t\t\t\t} else {\n\t\t\t\t\tlowestLatencyCandidate.setIsElectedBackup(true);\n\t\t\t\t\tisElectedBackup = false;\n\t\t\t\t\tresetBackupHeartbeatTimer();\n\t\t\t\t\tSystem.out.println(\"Election winner:\" + lowestLatencyCandidate.getAddress().getHostString());\n\t\t\t\t}\n\n\t\t\t\t// Clear candidacy values for future elections\n\t\t\t\tfor (RemoteLoadBalancer remoteLoadBalancer : remoteLoadBalancers) {\n\t\t\t\t\tremoteLoadBalancer.setCandidacyValue(null);\n\t\t\t\t}\n\t\t\t\tpreElectionInProgress = false;\n\t\t\t}\n\t\t};\n\n\t\tpreElectionTimeoutTimer = new Timer();\n\t\tpreElectionTimeoutTimer.schedule(timerTask, defaultTimeoutMillis);\n\t}",
"public void run() {\n\n switch( operation )\n {\n case \"Timer\":\n System.out.println( \"INFO : Timer started\" );\n try {\n // wait 7 seconds\n Thread.sleep( 7000 );\n if( !receivedOk )\n {\n // OK not received. Set self as leader\n LeaderState.getInstance().setLeaderID( ServerState.getInstance().getSelfID() );\n electionInProgress = false; // allow another election request to come in\n leaderFlag = true;\n System.out.println( \"INFO : Server s\" + LeaderState.getInstance().getLeaderID()\n + \" is selected as leader! \" );\n\n LeaderState.getInstance().resetLeader(); // reset leader lists when newly elected\n\n Runnable sender = new BullyAlgorithm( \"Sender\", \"coordinator\" );\n new Thread( sender ).start();\n }\n\n if( receivedOk && !leaderFlag )\n {\n System.out.println( \"INFO : Received OK but coordinator message was not received\" );\n\n electionInProgress = false;\n receivedOk = false;\n\n Runnable sender = new BullyAlgorithm( \"Sender\", \"election\" );\n new Thread( sender ).start();\n }\n }\n catch( Exception e ) {\n System.out.println( \"INFO : Exception in timer thread\" );\n }\n break;\n\n case \"Heartbeat\":\n while( true ) {\n try {\n Thread.sleep(10);\n if( leaderFlag && ServerState.getInstance().getSelfID() != LeaderState.getInstance().getLeaderID() ) {\n Thread.sleep( 1500 );\n Server destServer = ServerState.getInstance().getServers()\n .get( LeaderState.getInstance().getLeaderID() );\n\n MessageTransfer.sendServer(\n ServerMessage.getHeartbeat( String.valueOf(ServerState.getInstance().getSelfID()) ),\n destServer\n );\n //System.out.println( \"INFO : Sent heartbeat to leader s\" + destServer.getServerID() );\n }\n }\n\n catch( Exception e ) {\n leaderFlag = false;\n leaderUpdateComplete = false;\n System.out.println( \"WARN : Leader has failed!\" );\n // send election request\n Runnable sender = new BullyAlgorithm( \"Sender\", \"election\" );\n new Thread( sender ).start();\n }\n }\n\n case \"Sender\":\n switch( reqType ) {\n case \"election\":\n try {\n sendElectionRequest();\n } catch( Exception e ) {\n System.out.println( \"WARN : Server has failed, election request cannot be processed\" );\n }\n break;\n\n case \"ok\":\n try {\n sendOK();\n } catch( Exception e ) {\n e.printStackTrace();\n }\n break;\n\n case \"coordinator\":\n try {\n sendCoordinatorMsg();\n } catch( Exception e ) {\n e.printStackTrace();\n }\n break;\n }\n break;\n }\n }",
"public void leaderElection () {\n leaderID++;\n if (leaderID > numServers) {\n leaderID = 1;\n }\n if (isLeader()) {\n leader = new Leader(combine(index, Constants.LEADER), this,\n acceptors, replicas);\n leader.start();\n } else {\n leader = null;\n }\n }",
"private static void startSocket() throws MutexException {\n\t\tThread t1 = new ClientServerSockets();\n\t\tt1.start();\n\t\tboolean deadlock = false;\n\t\twhile(requestsCount != 20) {\n\t\t\t// for 2.3.a\n\t\t\trandomWait(2, 5);\n//\t\t\tMutex.fixedWait(5);\n\t\t\tMetrics.criticalSectionStartMsgSnapshot();\n\t\t\tMetrics.criticalSectionStartTimeSnapshot();\n\t\t\tArrayList<Integer> randomQuorum = Quorum.getRandomQuorum();\n//\t\t\trandomQuorum = new ArrayList<Integer>(Arrays.asList(4, 5, 6, 7));\n\t\t\tLogger.info(\"Selected a quorum: \" + randomQuorum);\n\n\t\t\tcurrentQuorum = randomQuorum;\n\t\t\tenteredCriticalSection = false;\t\t\t\n\t\t\tif(Client.requestsCount != 0) {\n\t\t\t\tMetrics.exitAndReEntry(Client.requestsCount);\n\t\t\t}\n\t\t\tfor(Integer id: randomQuorum) {\n\t\t\t\tMap<String, String> serverById = Host.getServerById(id);\n\t\t\t\tEntry<String, String> entry = serverById.entrySet().iterator().next();\n\t\t\t\tString serverName = entry.getKey();\n\t\t\t\tint serverPort = Integer.valueOf(entry.getValue());\n\t\t\t\tlong currentTimeStamp = System.currentTimeMillis();\n\t\t\t\tString clientId = String.valueOf(Host.getId());\n\t\t\t\tString formattedRequestMessage = Client.prepareRequestMessage(currentTimeStamp, clientId);\n\t\t\t\tLogger.info(\"Sending REQUEST to quorum member: \" + serverById + \", i.e., server name:\" + serverName);\n\t\t\t\tMutex.sendMessage(serverName, serverPort, formattedRequestMessage);\n\t\t\t}\n\t\t\tint waitingTimeinSeconds = 0;\n\t\t\twhile(!enteredCriticalSection) {\n\t\t\t\tLogger.info(\"Waiting for the old REQUEST to get COMPLETED before generating a new quorum.\");\n\t\t\t\tMutex.fixedWait(3);\n\t\t\t\twaitingTimeinSeconds+=3;\n\t\t\t\tif(waitingTimeinSeconds >= 90) {\n\t\t\t\t\tLogger.info(\"Looks like a DEADLOCK situation. Preparing to ABORT.\");\n\t\t\t\t\tdeadlock = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(deadlock) {\n\t\t\t\tMutex.sendMessage(Host.getname(), Integer.valueOf(Host.getPort()), MutexReferences.ABORT);\n\t\t\t}\n\t\t\tMetrics.criticalSectionEndMsgSnapshot(requestsCount);\n\t\t\trequestsCount++;\n\t\t\tif(requestsCount < 20) {\n\t\t\t\tLogger.info(\"Last request successfully completed. Generating a new request.\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tLogger.info(\"Completed 20 requests. Preparing to send COMPLETE to master.\");\n\t\t\t}\n\t\t}\n\t\t\t\n\t}",
"public void setElection(Election election) {\r\n this.election = election;\r\n }",
"@Override\n\tpublic void action() {\n\n\t\tif(this.step.equals(STATE_INIT))\n\t\t{\n\t\t\tthis.nbVoters = 0;\n\t\t\tthis.nbAsynchronousPlayers = 0;\n\t\t\tthis.globalResults = new VoteResults();\n\t\t\tthis.agentSender = null;\n\t\t\tthis.request = null;\n\t\t\tthis.currentTime = -1;\n\t\t\tthis.results = new VoteResults();\n\t\t\tthis.nextStep = STATE_RECEIVE_REQUEST;\n\n\n\t\t}\n\n\t\telse if(this.step.equals(STATE_RECEIVE_REQUEST))\n\t\t{\n\t\t\t/*** reception demande de vote **/\n\t\t\tMessageTemplate mt = MessageTemplate.and(\n\t\t\t\t\tMessageTemplate.MatchPerformative(ACLMessage.REQUEST),\n\t\t\t\t\tMessageTemplate.MatchConversationId(\"VOTE_REQUEST\"));\n\n\t\t\tACLMessage message = this.myAgent.receive(mt);\n\t\t\tif(message != null)\n\t\t\t{\n\t\t\t\tthis.agentSender = message.getSender();\n\n\t\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\t\ttry {\n\n\t\t\t\t\t//System.err.println(\"[RQST INITIAL] \"+message.getContent());\n\n\t\t\t\t\tthis.request = mapper.readValue(message.getContent(), VoteRequest.class);\n\t\t\t\t\tthis.request.setLocalVoteResults(this.results);\n\t\t\t\t\tthis.results.initWithChoice(this.request.getChoices());\n\n\t\t\t\t\tFunctions.newActionToLog(\"Début vote \"+this.request.getRequest(),this.myAgent, this.controllerAgent.getGameid());\n\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tthis.nextStep = SEND_REQUEST_GLOBAL_VOTE_RESULTS;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tblock(1000);\n\t\t\t}\n\n\t\t}\n\t\telse if(this.step.equals(SEND_REQUEST_GLOBAL_VOTE_RESULTS))\n\t\t{\n\t\t\tList<AID> agents = DFServices.findGameControllerAgent(\"ENVIRONMENT\", this.myAgent, this.controllerAgent.getGameid());\n\t\t\tif(!agents.isEmpty())\n\t\t\t{\n\t\t\t\tACLMessage message = new ACLMessage(ACLMessage.REQUEST);\n\t\t\t\tmessage.setSender(this.myAgent.getAID());\n\t\t\t\tfor(AID aid : agents)\n\t\t\t\t{\n\t\t\t\t\tmessage.addReceiver(aid);\n\t\t\t\t}\n\t\t\t\tmessage.setConversationId(\"GLOBAL_VOTE_RESULTS\");\n\n\t\t\t\tthis.myAgent.send(message);\n\t\t\t}\n\n\t\t\tthis.nextStep = RECEIVE_REQUEST_GLOBAL_VOTE_RESULTS;\n\t\t}\n\t\telse if(this.step.equals(RECEIVE_REQUEST_GLOBAL_VOTE_RESULTS))\n\t\t{\n\t\t\t/*** reception demande de vote **/\n\t\t\tMessageTemplate mt = MessageTemplate.and(\n\t\t\t\t\tMessageTemplate.MatchPerformative(ACLMessage.REQUEST),\n\t\t\t\t\tMessageTemplate.MatchConversationId(\"GLOBAL_VOTE_RESULTS\"));\n\n\t\t\tACLMessage message = this.myAgent.receive(mt);\n\t\t\tif(message != null)\n\t\t\t{\n\n\t\t\t\t//System.out.println(\"CTRL Reception de global results\");\n\t\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\t\ttry {\n\t\t\t\t\tthis.globalResults = mapper.readValue(message.getContent(), VoteResults.class);\n\t\t\t\t\tthis.request.setGlobalCitizenVoteResults(this.globalResults);\n\t\t\t\t} \n\t\t\t\tcatch (IOException e) \n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tthis.nextStep = STATE_GET_SIMPLE_SUSPICION;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tblock(1000);\n\t\t\t}\n\t\t}\t\t\n\t\telse if(this.step.equals(STATE_SEND_REQUEST))\n\t\t{\n\t\t\tACLMessage messageRequest = new ACLMessage(ACLMessage.REQUEST);\n\t\t\tmessageRequest.setSender(this.myAgent.getAID());\n\t\t\tmessageRequest.setConversationId(\"VOTE_REQUEST\");\n\n\t\t\tint reste = this.request.getAIDVoters().size()-this.nbVoters;\n\t\t\tif(false )// reste >= Data.MAX_SYNCHRONOUS_PLAYERS)\n\t\t\t{\n\t\t\t\t/** hybrid synchronous mode **/\n\t\t\t\tthis.nbAsynchronousPlayers = (int) (Math.random()*Math.min(Data.MAX_SYNCHRONOUS_PLAYERS-1, (reste-1)))+1;\n\t\t\t\t//System.err.println(\"HYDBRID ASYNCRHONOUS ENABLED BECAUSE TOO MANY PARTICIPANTS \"+this.nbAsynchronousPlayers+\" in //\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.nbAsynchronousPlayers = 1;\n\t\t\t}\n\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\n\t\t\tString json =\"\";\n\n\t\t\ttry {\t\t\n\t\t\t\tjson = mapper.writeValueAsString(this.request);\t\n\t\t\t\tSystem.err.println(\"[RQST] \"+json);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tmessageRequest.setContent(json);\n\t\t\tfor(int i = 0; i<this.nbAsynchronousPlayers; ++i)\n\t\t\t{\n\t\t\t\t//System.err.println(\"DK ENVOI REQUEST \"+this.request.getAIDVoters().get(this.nbVoters+i).getLocalName());\n\t\t\t\tmessageRequest.addReceiver(this.request.getAIDVoters().get(this.nbVoters+i));\t\n\t\t\t}\n\n\t\t\tthis.myAgent.send(messageRequest);\n\n\t\t\tthis.nextStep = STATE_RECEIVE_INFORM;\n\t\t}\n\t\telse if(this.step.equals(STATE_RECEIVE_INFORM))\n\t\t{\n\t\t\tif(this.currentTime == -1)\n\t\t\t{\n\t\t\t\tthis.currentTime = System.currentTimeMillis();\n\t\t\t}\n\n\t\t\tif(System.currentTimeMillis() - this.currentTime > 3000)\n\t\t\t{\n\t\t\t\tthis.currentTime = -1;\n\t\t\t\tACLMessage wakeup = new ACLMessage(ACLMessage.UNKNOWN);\n\t\t\t\twakeup.setSender(this.myAgent.getAID());\n\t\t\t\tif(nbVoters < this.request.getVoters().size())\n\t\t\t\t{\n\t\t\t\t\twakeup.addReceiver(this.request.getAIDVoters().get(nbVoters));\n\t\t\t\t\twakeup.setConversationId(\"WAKEUP\");\n\t\t\t\t\tthis.myAgent.send(wakeup);\n\n\t\t\t\t\tSystem.out.println(\"Relance du joueur \"+this.request.getAIDVoters().get(nbVoters).getLocalName()+\" ...\");\n\t\t\t\t}\n\n\n\t\t\t}\n\n\t\t\tMessageTemplate mt = MessageTemplate.and(\n\t\t\t\t\tMessageTemplate.MatchPerformative(ACLMessage.INFORM),\n\t\t\t\t\tMessageTemplate.MatchConversationId(\"VOTE_INFORM\"));\n\n\t\t\tACLMessage message = this.myAgent.receive(mt);\n\t\t\tif(message!=null)\n\t\t\t{\n\t\t\t\tthis.currentTime = -1;\n\t\t\t\t++this.nbVoters;\n\t\t\t\t--this.nbAsynchronousPlayers;\n\n\t\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\t\tVoteResults res = new VoteResults();\n\t\t\t\ttry {\n\t\t\t\t\tres = mapper.readValue(message.getContent(), VoteResults.class);\n\t\t\t\t} \n\t\t\t\tcatch (IOException e) \n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tAID aidPlayer = message.getSender();\n\n\t\t\t\tthis.results.add(res);\n\n\t\t\t\tif(this.request.getRequest().equals(\"CITIZEN_VOTE\")&&\n\t\t\t\t\t\tDFServices.containsGameAgent(aidPlayer, \"PLAYER\", \"MAYOR\", this.myAgent, this.controllerAgent.getGameid()))\n\t\t\t\t{\n\t\t\t\t\t/** poids double **/\n\t\t\t\t\tthis.results.add(res);\n\t\t\t\t\tthis.globalResults.add(res);\n\t\t\t\t}\n\n\n\t\t\t\t//envoi du resultat partiel \n\t\t\t\tString json = \"\";\n\t\t\t\tmapper = new ObjectMapper();\n\t\t\t\ttry {\n\t\t\t\t\tjson = mapper.writeValueAsString(this.results);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tACLMessage msg = new ACLMessage(ACLMessage.AGREE);\n\t\t\t\tmsg.setContent(json);\n\t\t\t\tmsg.setSender(this.myAgent.getAID());\n\t\t\t\tmsg.setConversationId(\"NEW_VOTE_RESULTS\");\n\n\t\t\t\tList<AID> agents = DFServices.findGameControllerAgent(\"ENVIRONMENT\", this.myAgent, this.controllerAgent.getGameid());\n\t\t\t\tif(!agents.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tfor(AID aid : agents)\n\t\t\t\t\t{\n\t\t\t\t\t\tmsg.addReceiver(aid);\n\t\t\t\t\t}\n\t\t\t\t\tthis.myAgent.send(msg);\n\t\t\t\t}\n\n\t\t\t\t///\tSystem.err.println(\"\\nSV : \"+this.nbVoters+\"/\"+this.request.getAIDVoters().size());\n\n\t\t\t\tif(this.nbVoters >= this.request.getAIDVoters().size())\n\t\t\t\t{\n\t\t\t\t\tthis.nbVoters = 0;\n\t\t\t\t\t//System.err.println(\"SV next step\");\n\t\t\t\t\tthis.nextStep = STATE_RESULTS;\n\t\t\t\t}\n\t\t\t\telse if(this.nbAsynchronousPlayers > 0)\n\t\t\t\t{\n\t\t\t\t\t//System.err.println(\"SV waiting other\");\n\t\t\t\t\tthis.nextStep = STATE_RECEIVE_INFORM;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tSystem.err.println(\"SV send request to other\");\n\t\t\t\t\tthis.nextStep = STATE_SEND_REQUEST;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tblock(1000);\t\n\t\t\t}\n\t\t}\n\n\n\t\telse if(this.step.equals(STATE_GET_SIMPLE_SUSPICION))\n\t\t{\n\t\t\tACLMessage messageRequest = new ACLMessage(ACLMessage.REQUEST);\n\t\t\tmessageRequest.setSender(this.myAgent.getAID());\n\t\t\tmessageRequest.setConversationId(\"GET_SIMPLE_SUSPICION\");\n\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\n\t\t\tString json =\"\";\n\n\t\t\ttry {\t\t\n\t\t\t\tjson = mapper.writeValueAsString(this.request);\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tmessageRequest.setContent(json);\n\t\t\tfor(AID aid : this.request.getAIDVoters()){\n\t\t\t\tmessageRequest.addReceiver(aid);\t\n\t\t\t}\n\n\t\t\tthis.nbVoters = 0;\n\t\t\tthis.myAgent.send(messageRequest);\n\t\t\tthis.nextStep = STATE_ADD_SIMPLE_SUSPICION;\n\t\t}\n\t\telse if(this.step.equals(STATE_ADD_SIMPLE_SUSPICION))\n\t\t{\n\t\t\tMessageTemplate mt = MessageTemplate.and(\n\t\t\t\t\tMessageTemplate.MatchPerformative(ACLMessage.INFORM),\n\t\t\t\t\tMessageTemplate.MatchConversationId(\"GET_SIMPLE_SUSPICION\"));\n\n\t\t\tACLMessage message = this.myAgent.receive(mt);\n\t\t\tif(message!=null)\n\t\t\t{\n\t\t\t\t++this.nbVoters;\n\n\t\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\t\tSuspicionScore suspicionScore = new SuspicionScore();\n\t\t\t\ttry {\n\t\t\t\t\tsuspicionScore = mapper.readValue(message.getContent(), SuspicionScore.class);\n\t\t\t\t\t//System.err.println(\"ADD PARTIAL SUSPICION \\n\"+message.getContent());\n\t\t\t\t} \n\t\t\t\tcatch (IOException e) \n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tAID aidPlayer = message.getSender();\n\t\t\t\tthis.request.getCollectiveSuspicionScore().addSuspicionScoreGrid(aidPlayer.getName(), suspicionScore);\n\n\t\t\t\tif(this.nbVoters>= this.request.getAIDVoters().size())\n\t\t\t\t{\n\t\t\t\t\tthis.nbVoters = 0;\n\t\t\t\t\tSystem.err.println(\"SUSPICION COLLECTIVE \\n \"+this.request.getCollectiveSuspicionScore().getScore());\n\n\t\t\t\t\t//sort random\n\t\t\t\t\tCollections.shuffle(this.request.getVoters());\n\t\t\t\t\tthis.nextStep = STATE_SEND_REQUEST;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.nextStep = STATE_ADD_SIMPLE_SUSPICION;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.nextStep = STATE_ADD_SIMPLE_SUSPICION;\n\t\t\t\tblock(1000);\n\t\t\t}\n\t\t}\n\n\t\telse if(this.step.equals(STATE_RESULTS))\n\t\t{\n\t\t\tthis.finalResults = this.results.getFinalResults();\n\n\t\t\t/** equality ? **/\n\t\t\tif(this.finalResults.size() == 1)\n\t\t\t{\n\t\t\t\tthis.nextStep = STATE_SEND_RESULTS;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//defavorisé le bouc emmissaire\n\t\t\t\tList<AID> scapegoats = DFServices.findGamePlayerAgent(Roles.SCAPEGOAT, this.myAgent, this.controllerAgent.getGameid());\n\t\t\t\tList<String> nameScapegoats = new ArrayList<String>();\n\t\t\t\tfor(AID scapegoat : scapegoats)\n\t\t\t\t{\n\t\t\t\t\tnameScapegoats.add(scapegoat.getName());\n\t\t\t\t}\n\t\t\t\tfor(String scapegoat : nameScapegoats)\n\t\t\t\t{\n\t\t\t\t\tif(this.finalResults.contains(scapegoat))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(this.request.isVoteAgainst())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.finalResults = nameScapegoats;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(this.finalResults.size()>1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.finalResults.remove(scapegoat);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(this.lastResults != null && this.lastResults.equals(this.finalResults))\n\t\t\t\t{\n\t\t\t\t\t/** interblocage **/\n\t\t\t\t\tArrayList<String> tmp = new ArrayList<String>();\n\n\t\t\t\t\t//System.err.println(\"INTERBLOCAGE\");\n\n\t\t\t\t\t/** random choice **/\n\t\t\t\t\ttmp.add(this.finalResults.get((int)Math.random()*this.finalResults.size()));\t\t\t\t\n\t\t\t\t\tthis.finalResults = tmp;\n\n\t\t\t\t\tthis.nextStep = STATE_SEND_RESULTS;\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// new vote with finalists\n\t\t\t\t\tthis.request.setChoices(this.finalResults);\n\n\t\t\t\t\t//sort random\n\t\t\t\t\tCollections.shuffle(this.request.getVoters());\n\n\t\t\t\t\tthis.results = new VoteResults();\n\t\t\t\t\tthis.results.initWithChoice(this.request.getChoices());\n\t\t\t\t\tthis.request.setLocalVoteResults(this.results);\n\t\t\t\t\tthis.lastResults = this.finalResults;\n\t\t\t\t\tthis.nbVoters = 0;\n\t\t\t\t\tthis.nextStep = STATE_SEND_REQUEST;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if(this.step.equals(STATE_SEND_RESULTS))\n\t\t{\n\t\t\tif(this.finalResults.isEmpty())\n\t\t\t{\n\t\t\t\tSystem.err.println(\"ERROR\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"RESULTS => \"+this.finalResults.get(0));\n\t\t\t}\n\n\t\t\t//envoi resultat final + maj global vote\n\t\t\tif(this.request.getRequest().equals(\"CITIZEN_VOTE\"))\n\t\t\t{\n\t\t\t\tString json = \"\";\n\t\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\t\ttry {\n\t\t\t\t\tjson = mapper.writeValueAsString(this.results);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tACLMessage message = new ACLMessage(ACLMessage.AGREE);\n\t\t\t\tmessage.setContent(json);\n\t\t\t\tmessage.setSender(this.myAgent.getAID());\n\t\t\t\tmessage.setConversationId(\"NEW_CITIZEN_VOTE_RESULTS\");\n\n\t\t\t\tList<AID> agents = DFServices.findGameControllerAgent(\"ENVIRONMENT\", this.myAgent, this.controllerAgent.getGameid());\n\t\t\t\tif(!agents.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tfor(AID aid : agents)\n\t\t\t\t\t{\n\t\t\t\t\t\tmessage.addReceiver(aid);\n\t\t\t\t\t}\n\t\t\t\t\tthis.myAgent.send(message);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tACLMessage message = new ACLMessage(ACLMessage.INFORM);\n\t\t\tmessage.setSender(this.myAgent.getAID());\n\t\t\tmessage.addReceiver(this.agentSender);\n\t\t\tmessage.setConversationId(\"VOTE_RESULTS\");\n\t\t\tmessage.setContent(this.finalResults.get(0));\n\n\n\t\t\tString name = this.finalResults.get(0);\n\n\t\t\tif(!this.request.isAskRequest()){\n\t\t\t\tint index = name.indexOf(\"@\");\n\t\t\t\tname = name.substring(0, index);\n\t\t\t\tFunctions.newActionToLog(\"Vote : \"+name, this.getAgent(), this.controllerAgent.getGameid());\n\t\t\t}\n\t\t\t\n\n\t\t\tthis.myAgent.send(message);\t\n\t\t\tthis.nextStep = STATE_INIT;\n\t\t}\n\n\n\n\t\tif(!this.nextStep.isEmpty())\n\t\t{\n\t\t\tthis.step = this.nextStep;\n\t\t\tthis.nextStep =\"\";\n\t\t}\n\n\n\t}",
"private void sendSetRequest() {\r\n\t\tnumOfSets++;\r\n\t\ttype = \"0\";\r\n\t\tnumOfRecipients = servers.size();\r\n\t\tfor(ServerHandler s : servers) {\r\n\t\t\ts.send(this, input);\r\n\t\t}\r\n\t\tsendTime = System.nanoTime();\r\n\r\n\t\tworkerTime = sendTime - pollTime;\r\n\t\t\r\n\t\tfor(ServerHandler s : servers) {\r\n\t\t\tString ricevuto = s.receive();\r\n\t\t\treplies.add(ricevuto);\r\n\t\t}\r\n\t\treceiveTime = System.nanoTime();\r\n\t\tprocessingTime = receiveTime - sendTime;\r\n\t\t\r\n\t\t\r\n\t\tfor(String reply : replies) {\r\n\t\t\tif(!(\"STORED\".equals(reply))) {\r\n\t\t\t\tunproperRequests.add(reply);\r\n\t\t\t\tsendBack(currentJob.getClient(), reply);\r\n\t\t\t\treplies.clear();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tsendBack(currentJob.getClient(), \"STORED\");\r\n\t\treplies.clear();\r\n\t\t\r\n\t}",
"@Override\n public void run() {\n if (nearMe.size() < HelperConstants.MAX_BYZANTINE_USERS + 1) {\n // If there are less nearby neighbors than required, there is no need to ask for proofs\n return;\n }\n\n for (GridUser gridUser: nearMe) {\n int targetPort = Utils.getListenerServicePortFromId(gridUser.getId());\n\n Thread t = new Thread(() -> sendRecordAndReceive(myRequest, gridUser, targetPort));\n t.start();\n ongoingProofRequests.add(t);\n }\n\n try {\n for (Thread t: ongoingProofRequests) {\n t.join();\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n for (Thread t: ongoingProofRequests) t.interrupt();\n }\n }",
"public void sendRequest() {\r\n\t\t\r\n\t\tclient.join(this, isHost, gameCode, playerName, playerNumber);\r\n\t\t\r\n\t}",
"private void signalElectionStart()\n \t{\n \t\tLogging.log(this, \"SENDELECTIONS()-START, electing cluster is \" + mParentCluster);\n \t\tLogging.log(this, \"SENDELECTIONS()-CEPs: \" + mParentCluster.getParticipatingCEPs().size());\n \n \t\tfor(CoordinatorCEPChannel tCEP : mParentCluster.getParticipatingCEPs()) {\n \t\t\t//TODO: enforce sending of BullyElect in any case\n \t\t\tif(tCEP.getPeerPriority().isUndefined() && ! tCEP.isEdgeCEP()/* || tCEP.getPeerPriority() > tCluster.getPriority()*/) {\n \t\t\t\tNode tNode = mParentCluster.getHRMController().getPhysicalNode();\n \t\t\t\t\n \t\t\t\ttCEP.sendPacket(new BullyElect(tNode.getCentralFN().getName(), mParentCluster.getBullyPriority()));\n \t\t\t}\n \t\t}\n \t\tLogging.log(this, \"SENDELECTIONS()-END\");\n \t}",
"@Override\n\tpublic void run(){\n\t\tConcurrentHashMap<String,String> destView;\n\t\tDouble numProbability = 0.0;\n\t\tDouble randomProbability = 0.0;\n\t\twhile(true){\t\n\t\t\tConcurrentHashMap<String, String> activeServerViewMap= ViewManager.getActiveServersList(ServerView.serverView);\n\t\t\tSystem.out.println(\"Active server view size \" + activeServerViewMap.size());\n\t\t\ttry {\n\t\t\t\tnumProbability = (double) (1.0/(activeServerViewMap.size()+1.0)); //plus 1 coz self has been excluded but we need this list\n\t\t\t\tRandom random = new Random();\n\t\t\t\trandomProbability = random.nextDouble();\n\t\t\t\tSystem.out.println(\"Num probab \" + numProbability);\n\t\t\t\tSystem.out.println(\"Random probab \" + randomProbability);\n\n\t\t\t\tSystem.out.println(\"View daemon running\");\n\t\t\t\tString[] arr = EnterServlet.serverID.toString().split(\"/\");\n\t\t\t\tString serverId = arr[arr.length-1];\n\t\t\t\tServerView.serverView.put(serverId,upState+DELIMITER_LEVEL2+System.currentTimeMillis());\n\n\t\t\t\tif (numProbability < randomProbability) {\n\t\t\t\t\t//updating self\n\t\t\t\t\tSystem.out.println(\"Should send exchange views now\");\n\t\t\t\t\tArrayList<String> serversList = new ArrayList<String>();\n\t\t\t\t\tfor(String key : ServerView.serverView.keySet()){\n\t\t\t\t\t\tserversList.add(key);\n\t\t\t\t\t}\n\t\t\t\t\tserversList.remove(serverId);\n\t\t\t\t\t/*java.util.Collections.shuffle((List<?>) serverSet);\n\t\t\t\t\tIterator<String> serverIterator = serverSet.iterator();\n\t\t\t\t\tString chosenServer = (String) serverIterator.next();*/\n\t\t\t\t\tCollections.shuffle(serversList);\n\t\t\t\t\tString chosenServer = serversList.get(0);\n\t\t\t\t\tSystem.out.println(\"Chosen server \" + chosenServer);\n\t\t\t\t\t\n\t\t\t\t\tdestView=new ConcurrentHashMap<String,String>(RPC.RPCClient.ExchangeViewClient(chosenServer, ServerView.serverView));\n\t\t\t\t\tConcurrentHashMap<String,String> mergedView=new ConcurrentHashMap<String,String>(ViewManager.mergeViews(ServerView.serverView,destView));\n\t\t\t\t\tViewManager.mergeViewWithSelf(mergedView);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Gossip with another server\");\n\t\t\t\t\t\n\t\t\t\t} else {\n//\t\t\t\t\t//call simpleDB\n\t\t\t\t\tSystem.out.println(\"Gossip with simple DB\");\n\t\t\t\t\tSimpleDbAccess.gossipWithSimpleDb();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tThread.sleep((GOSSIP_SECS/2) + new Random().nextInt(GOSSIP_SECS));\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}",
"private void requestServerId() {\n connection.startClient(lbInfo.getIp(), lbInfo.getPort());\n System.out.println(\"Connected!\");\n connection.sendMessage(connectionInfo);\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tif (!terminateThread.get()) {\n\t\t\t\t\tComponentLogger.getInstance().log(LogMessageType.LOAD_BALANCER_PROMPTED_RE_ELECTION);\n\t\t\t\t\tSystem.out.println(\"Prompting for a re-election\");\n\t\t\t\t\tinitiatePreElection();\n\t\t\t\t}\n\t\t\t}",
"public void setAllRequestForVotes(DownstreamMessage request) {\n\t\tfor (DownstreamPeerState peer : _downstreamPeerByNode.values()) {\n\t\t\tpeer.nextIntentionOffsetToSend = DownstreamPeerState.NO_NEXT_INTENTION;\n\t\t\tpeer.pendingVoteRequest = request;\n\t\t}\n\t}",
"public void countVotes() {\n int[] voteResponses = RaftResponses.getVotes(mConfig.getCurrentTerm());\n int numVotes = 0;\n if(voteResponses == null) {\n //System.out.println(mID + \" voteResponses null\");\n //System.out.println(\"cur \" + mConfig.getCurrentTerm() + \" RR: \" + RaftResponses.getTerm());\n }\n else {\n for(int i = 1; i <= mConfig.getNumServers(); i++) {\n //If vote has not been received yet, resend request\n //if(voteResponses[i] == -1)\n //this.remoteRequestVote(i, mConfig.getCurrentTerm(), mID, mLog.getLastIndex(), mLog.getLastTerm());\n if(voteResponses[i] == 0)\n numVotes++;\n }\n }\n //If election is won, change to leader\n if(numVotes >= (mConfig.getNumServers()/2.0)) {\n electionTimer.cancel();\n voteCountTimer.cancel();\n RaftServerImpl.setMode(new LeaderMode());\n }\n else {\n voteCountTimer = scheduleTimer((long) 5, 2);\n }\n }",
"@Override\n public void run(){\n ServerConnection[] clients = new ServerConnection[]{client2, client3, client1};\n\n for( ServerConnection c : clients ) {\n if ( c != null ){\n if ( client3 == null ){\n c.send(\"Game has started with code:\" + gameID + \".\\n\" + \"Current players are \" +\n client1.getName() + \", \" + client2.getName());\n }\n else {\n c.send(\"Game has started with code:\" + gameID + \".\\n\" + \"Current players are \" +\n client1.getName() + \", \" + client2.getName() + \", \" + client3.getName());\n }\n c.setGameID(gameID);\n }\n }\n\n String[] gods = readChallengerMessage();\n\n for (int i=0; i<2 && currClient != client1; i++){\n currClient.send(Arrays.toString(gods) );\n clientMessage = readClientMessage();\n if (i == 0) {\n gameMessage.setGod2(clientMessage.getGod());\n gameMessage.setName2(clientMessage.getName());\n } else if (i == 1) {\n gameMessage.setGod3(clientMessage.getGod());\n gameMessage.setName3(clientMessage.getName());\n }\n List<String> list = new ArrayList<String>(Arrays.asList(gods));\n list.remove( clientMessage.getGod().name());\n gods = list.toArray(new String[0]);\n currClient.send(\"Choice confirmed\");\n updateCurrClient();\n }\n\n currClient.send(gods[0]);\n gameMessage.setGod1(God.valueOf(gods[0]));\n gameMessage.setName1(client1.getName());\n updateCurrClient();\n resetUpdate();\n gameMessage.notify(gameMessage);\n sendLiteGame();\n\n for( ServerConnection c : clients ) {\n resetUpdate();\n if ( c != null ) {\n while ( !updateModel) {\n sendToCurrClient(\"Placing workers\");\n clientMessage = readClientMessage();\n gameMessage.setSpace1(clientMessage.getSpace1());\n gameMessage.setSpace2(clientMessage.getSpace2());\n gameMessage.notify(gameMessage);\n if (!updateModel) {\n sendLiteGame();\n }\n }\n updateCurrClient();\n liteGame.setPlayer(currClient.getName());\n sendLiteGame();\n }\n }\n\n\n while ( !endOfTheGame ) {\n sendToCurrClient(\"Next action\");\n clientMessage = readClientMessage();\n\n if ( \"Choose Worker\".equals(clientMessage.getAction()) ) {\n chooseWorker();\n }\n else if ( \"Charon Switch\".equals(clientMessage.getAction()) ) {\n charonSwitch();\n }\n else if ( \"Prometheus Build\".equals(clientMessage.getAction()) ) {\n build();\n }\n else if ( \"Move\".equals(clientMessage.getAction()) ) {\n move();\n }\n else if ( \"Build\".equals(clientMessage.getAction()) ) {\n build();\n }\n\n if ( \"End\".equals(clientMessage.getAction()) ) {\n gameMessage.resetGameMessage();\n updateCurrClient();\n liteGame.setCurrWorker(5,5);\n liteGame.setPlayer(currClient.getName());\n sendLiteGame();\n }\n else {\n sendLiteGame();\n if ( !endOfTheGame && !playerRemoved ) {\n if (!updateModel) {\n currClient.send(\"Invalid action\");\n } else currClient.send(\"Action performed\");\n }\n else playerRemoved = false;\n }\n }\n\n sendToCurrClient(\"You won the match.\");\n server.endMatch(gameID, null);\n }",
"private synchronized void trySendToServer() throws SecurityException, KeyPoolException, IdentityException, IOException {\n if (Thread.currentThread().isInterrupted()) return;\n\n // Wait for enough proofs (don't forget we included our proof)\n if (proofs.size() >= HelperConstants.MAX_BYZANTINE_USERS + 1 + 1) {\n // Send records to all known servers\n this.user.trySendLocationReport(new Report(this.myRecord, List.copyOf(proofs)));\n // System.out.printf(\"[epoch %d] Got OK from quorum of servers\\n\", this.myRecord.getEpoch());\n\n // kill all threads\n for(Thread t: ongoingProofRequests) {\n // I will kill myself last\n if (t.isAlive() && Thread.currentThread().getId() != t.getId()) t.interrupt();\n }\n }\n }",
"public void sendId() {\n for (int i = 0; i < numberOfPlayers; i++) {\n try {\n // s = ss.accept();\n oos = new ObjectOutputStream(sockets.get(i).getOutputStream());\n game.getOne().setID(0);\n game.getTwo().setID(1);\n oos.writeObject(i);\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }",
"public void tryCancelAllElections() {\n if (zkClient.isClosed()) {\n return;\n }\n Collection<ElectionContext> values = electionContexts.values();\n synchronized (electionContexts) {\n values.forEach(\n context -> {\n try {\n context.cancelElection();\n context.close();\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n } catch (KeeperException e) {\n log.warn(\"Error on cancelling elections of {}\", context.leaderPath, e);\n }\n });\n }\n }",
"public Vote lookForLeader() throws InterruptedException {\n try {\n self.jmxLeaderElectionBean = new LeaderElectionBean();\n MBeanRegistry.getInstance().register(self.jmxLeaderElectionBean, self.jmxLocalPeerBean);\n } catch (Exception e) {\n LOG.warn(\"Failed to register with JMX\", e);\n self.jmxLeaderElectionBean = null;\n }\n\n self.start_fle = Time.currentElapsedTime();\n try {\n /*\n * The votes from the current leader election are stored in recvset. In other words, a vote v is in recvset\n * if v.electionEpoch == logicalclock. The current participant uses recvset to deduce on whether a majority\n * of participants has voted for it.\n */\n Map<Long, Vote> recvset = new HashMap<>();\n\n /*\n * The votes from previous leader elections, as well as the votes from the current leader election are\n * stored in outofelection. Note that notifications in a LOOKING state are not stored in outofelection.\n * Only FOLLOWING or LEADING notifications are stored in outofelection. The current participant could use\n * outofelection to learn which participant is the leader if it arrives late (i.e., higher logicalclock than\n * the electionEpoch of the received notifications) in a leader election.\n */\n Map<Long, Vote> outofelection = new HashMap<>();\n\n int notTimeout = minNotificationInterval;\n\n synchronized (this) {\n logicalclock.incrementAndGet();\n updateProposal(getInitId(), getInitLastLoggedZxid(), getPeerEpoch());\n }\n\n LOG.info(\n \"New election. My id = {}, proposed zxid=0x{}\",\n self.getMyId(),\n Long.toHexString(proposedZxid));\n sendNotifications();\n\n SyncedLearnerTracker voteSet = null;\n\n /*\n * Loop in which we exchange notifications until we find a leader\n */\n\n while ((self.getPeerState() == ServerState.LOOKING) && (!stop)) {\n /*\n * Remove next notification from queue, times out after 2 times\n * the termination time\n */\n Notification n = recvqueue.poll(notTimeout, TimeUnit.MILLISECONDS);\n\n /*\n * Sends more notifications if haven't received enough.\n * Otherwise processes new notification.\n */\n if (n == null) {\n if (manager.haveDelivered()) {\n sendNotifications();\n } else {\n manager.connectAll();\n }\n\n /*\n * Exponential backoff\n */\n notTimeout = Math.min(notTimeout << 1, maxNotificationInterval);\n\n /*\n * When a leader failure happens on a master, the backup will be supposed to receive the honour from\n * Oracle and become a leader, but the honour is likely to be delay. We do a re-check once timeout happens\n *\n * The leader election algorithm does not provide the ability of electing a leader from a single instance\n * which is in a configuration of 2 instances.\n * */\n if (self.getQuorumVerifier() instanceof QuorumOracleMaj\n && self.getQuorumVerifier().revalidateVoteset(voteSet, notTimeout != minNotificationInterval)) {\n setPeerState(proposedLeader, voteSet);\n Vote endVote = new Vote(proposedLeader, proposedZxid, logicalclock.get(), proposedEpoch);\n leaveInstance(endVote);\n return endVote;\n }\n\n LOG.info(\"Notification time out: {} ms\", notTimeout);\n\n } else if (validVoter(n.sid) && validVoter(n.leader)) {\n /*\n * Only proceed if the vote comes from a replica in the current or next\n * voting view for a replica in the current or next voting view.\n */\n switch (n.state) {\n case LOOKING:\n if (getInitLastLoggedZxid() == -1) {\n LOG.debug(\"Ignoring notification as our zxid is -1\");\n break;\n }\n if (n.zxid == -1) {\n LOG.debug(\"Ignoring notification from member with -1 zxid {}\", n.sid);\n break;\n }\n // If notification > current, replace and send messages out\n if (n.electionEpoch > logicalclock.get()) {\n logicalclock.set(n.electionEpoch);\n recvset.clear();\n if (totalOrderPredicate(n.leader, n.zxid, n.peerEpoch, getInitId(), getInitLastLoggedZxid(), getPeerEpoch())) {\n updateProposal(n.leader, n.zxid, n.peerEpoch);\n } else {\n updateProposal(getInitId(), getInitLastLoggedZxid(), getPeerEpoch());\n }\n sendNotifications();\n } else if (n.electionEpoch < logicalclock.get()) {\n LOG.debug(\n \"Notification election epoch is smaller than logicalclock. n.electionEpoch = 0x{}, logicalclock=0x{}\",\n Long.toHexString(n.electionEpoch),\n Long.toHexString(logicalclock.get()));\n break;\n } else if (totalOrderPredicate(n.leader, n.zxid, n.peerEpoch, proposedLeader, proposedZxid, proposedEpoch)) {\n updateProposal(n.leader, n.zxid, n.peerEpoch);\n sendNotifications();\n }\n\n LOG.debug(\n \"Adding vote: from={}, proposed leader={}, proposed zxid=0x{}, proposed election epoch=0x{}\",\n n.sid,\n n.leader,\n Long.toHexString(n.zxid),\n Long.toHexString(n.electionEpoch));\n\n // don't care about the version if it's in LOOKING state\n recvset.put(n.sid, new Vote(n.leader, n.zxid, n.electionEpoch, n.peerEpoch));\n\n voteSet = getVoteTracker(recvset, new Vote(proposedLeader, proposedZxid, logicalclock.get(), proposedEpoch));\n\n if (voteSet.hasAllQuorums()) {\n\n // Verify if there is any change in the proposed leader\n while ((n = recvqueue.poll(finalizeWait, TimeUnit.MILLISECONDS)) != null) {\n if (totalOrderPredicate(n.leader, n.zxid, n.peerEpoch, proposedLeader, proposedZxid, proposedEpoch)) {\n recvqueue.put(n);\n break;\n }\n }\n\n /*\n * This predicate is true once we don't read any new\n * relevant message from the reception queue\n */\n if (n == null) {\n setPeerState(proposedLeader, voteSet);\n Vote endVote = new Vote(proposedLeader, proposedZxid, logicalclock.get(), proposedEpoch);\n leaveInstance(endVote);\n return endVote;\n }\n }\n break;\n case OBSERVING:\n LOG.debug(\"Notification from observer: {}\", n.sid);\n break;\n\n /*\n * In ZOOKEEPER-3922, we separate the behaviors of FOLLOWING and LEADING.\n * To avoid the duplication of codes, we create a method called followingBehavior which was used to\n * shared by FOLLOWING and LEADING. This method returns a Vote. When the returned Vote is null, it follows\n * the original idea to break swtich statement; otherwise, a valid returned Vote indicates, a leader\n * is generated.\n *\n * The reason why we need to separate these behaviors is to make the algorithm runnable for 2-node\n * setting. An extra condition for generating leader is needed. Due to the majority rule, only when\n * there is a majority in the voteset, a leader will be generated. However, in a configuration of 2 nodes,\n * the number to achieve the majority remains 2, which means a recovered node cannot generate a leader which is\n * the existed leader. Therefore, we need the Oracle to kick in this situation. In a two-node configuration, the Oracle\n * only grants the permission to maintain the progress to one node. The oracle either grants the permission to the\n * remained node and makes it a new leader when there is a faulty machine, which is the case to maintain the progress.\n * Otherwise, the oracle does not grant the permission to the remained node, which further causes a service down.\n *\n * In the former case, when a failed server recovers and participate in the leader election, it would not locate a\n * new leader because there does not exist a majority in the voteset. It fails on the containAllQuorum() infinitely due to\n * two facts. First one is the fact that it does do not have a majority in the voteset. The other fact is the fact that\n * the oracle would not give the permission since the oracle already gave the permission to the existed leader, the healthy machine.\n * Logically, when the oracle replies with negative, it implies the existed leader which is LEADING notification comes from is a valid leader.\n * To threat this negative replies as a permission to generate the leader is the purpose to separate these two behaviors.\n *\n *\n * */\n case FOLLOWING:\n /*\n * To avoid duplicate codes\n * */\n Vote resultFN = receivedFollowingNotification(recvset, outofelection, voteSet, n);\n if (resultFN == null) {\n break;\n } else {\n return resultFN;\n }\n case LEADING:\n /*\n * In leadingBehavior(), it performs followingBehvior() first. When followingBehavior() returns\n * a null pointer, ask Oracle whether to follow this leader.\n * */\n Vote resultLN = receivedLeadingNotification(recvset, outofelection, voteSet, n);\n if (resultLN == null) {\n break;\n } else {\n return resultLN;\n }\n default:\n LOG.warn(\"Notification state unrecognized: {} (n.state), {}(n.sid)\", n.state, n.sid);\n break;\n }\n } else {\n if (!validVoter(n.leader)) {\n LOG.warn(\"Ignoring notification for non-cluster member sid {} from sid {}\", n.leader, n.sid);\n }\n if (!validVoter(n.sid)) {\n LOG.warn(\"Ignoring notification for sid {} from non-quorum member sid {}\", n.leader, n.sid);\n }\n }\n }\n return null;\n } finally {\n try {\n if (self.jmxLeaderElectionBean != null) {\n MBeanRegistry.getInstance().unregister(self.jmxLeaderElectionBean);\n }\n } catch (Exception e) {\n LOG.warn(\"Failed to unregister with JMX\", e);\n }\n self.jmxLeaderElectionBean = null;\n LOG.debug(\"Number of connection processing threads: {}\", manager.getConnectionThreadCount());\n }\n }",
"@Override\n\tpublic void run() {\n\t\tServerSocket serverSocket;\n\t\tSocket socket;\n\t\tDataInputStream dis;\n\t\tDataOutputStream dos;\n\n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(portNo);\n\t\t\tserverSocket.setSoTimeout(10000000);\n\n\t\t\twhile (true) {\n\t\t\t\tSystem.out.println(COORDINATOR_WAIT_MSG);\n\t\t\t\tsocket = serverSocket.accept();\n\t\t\t\tdis = new DataInputStream(socket.getInputStream());\n\t\t\t\tdos = new DataOutputStream(socket.getOutputStream());\n\n\t\t\t\t// Check if threads are available in thread pool\n\t\t\t\tif (threadpool.getPoolSize() == MAX_THREADS) {\n\t\t\t\t\tSystem.out.println(PARTICIPANT_UNABLE_ACCEPT);\n\t\t\t\t\tdos.writeUTF(PARTICIPANT_UNABLE_ACCEPT);\n\t\t\t\t\tdos.flush();\n\t\t\t\t\tdos.close();\n\t\t\t\t\tdis.close();\n\t\t\t\t\tsocket.close();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Connected to participant: \" + socket);\n\t\t\t\tdos.writeUTF(PARTICIPANT_CONN_ACCEPT);\n\t\t\t\tdos.flush();\n\t\t\t\tthreadpool.execute(new CoordinatorWorker(socket, dis, dos));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tthreadpool.shutdown();\n\t\t\ttry {\n\t\t\t\tthreadpool.awaitTermination(2, TimeUnit.MINUTES);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tprivate void sendDialRequest(IQRequest request, String platformId, List<RayoNode> nodesDialed, int dialRetries) throws Exception {\n\t\tJID fromJidInternal = getXmppFactory().createJID(getInternalDomain());\n\t\tElement payload = request.getElement();\n\n\t\tint maxDialRetries = ((GatewayAdminService)getAdminService()).getMaxDialRetries();\n\t\tRayoNode firstChoice = null;\n\t\tif (nodesDialed.size() > 0) {\n\t\t\tfirstChoice = nodesDialed.get(0);\n\t\t}\n\t\tdo {\n\t\t\tRayoNode rayoNode = loadBalancer.pickRayoNode(platformId);\n\t\t\tif (rayoNode == null) {\n\t\t\t\tsendIqError(request, Type.CANCEL, Condition.SERVICE_UNAVAILABLE, \n\t\t\t\t\t\tString.format(\"Could not find an available Rayo Node in platform %s\", platformId));\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (rayoNode.equals(firstChoice)) {\n\t\t\t\tList<RayoNode> nodes = gatewayStorageService.getRayoNodes(platformId);\n\t\t\t\tif (nodesDialed.size() < nodes.size()) {\n\t\t\t\t\tCollection<RayoNode> missing = CollectionUtils.subtract(nodes, nodesDialed);\n\t\t\t\t\trayoNode = missing.iterator().next();\n\t\t\t\t} else {\n\t\t\t\t\t// done. No more nodes to dial.\n\t\t\t\t\tlog.error(\"We could not dispatch the dial request [%s] to any of the available Rayo Nodes.\", request);\n\t\t\t\t\tsendIqError(request, Type.CANCEL, Condition.SERVICE_UNAVAILABLE, \n\t\t\t\t\t\t\tString.format(\"Could not find an available Rayo Node in platform %s\", platformId));\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tJID to = getXmppFactory().createJID(rayoNode.getHostname());\n\t\t\ttry {\n\t\t\t\tnodesDialed.add(rayoNode);\n\t\t\t\tdialRetries++;\n\t\t\t\tlog.debug(\"Dialing node [%s]. Dial attempts: [%s]. Maximum attempts: [%s].\", rayoNode, dialRetries, maxDialRetries);\n\t\t\t\tforwardIQRequest(fromJidInternal, to, request, payload, platformId, dialRetries, nodesDialed);\n\t\t\t\tlog.debug(\"Dial request [%s] dispatched successfully\", request);\n\t\t\t\treturn;\n\t\t\t} catch (Exception e) {\n\t\t\t\tlog.error(\"Error while sending dial request: \" + e.getMessage(), e);\n\t\t\t\tlog.debug(\"Resending dial request to a different node\");\n\t\t\t\tloadBalancer.nodeOperationFailed(rayoNode);\n\t\t\t}\n\t\t} while (dialRetries < maxDialRetries);\n\t\t\n\t\tlog.error(\"The maximum number of [%s] dial retries was reached for dial request [%s]. This dial request is going to be discarded\");\n\t\tsendIqError(request, Type.CANCEL, Condition.SERVICE_UNAVAILABLE, \n\t\t\t\tString.format(\"Could not find an available Rayo Node in platform %s\", platformId));\t\t\t\t\t\t\n\t}",
"public void sendGetRequest() {\r\n\t\tString[] requests = this.input.substring(4, this.input.length()).split(\" \"); \r\n\t\t\r\n\t\tif(requests.length <= 1 || !(MyMiddleware.readSharded)){\r\n\t\t\tnumOfRecipients = 1;\r\n\t\t\trecipient = servers.get(loadBalance());\r\n\r\n\t\t\trecipient.send(this, input);\r\n\t\t\tsendTime = System.nanoTime();\r\n\r\n\t\t\tworkerTime = sendTime - pollTime;\r\n\r\n\t\t\t\r\n\t\t\tif(requests.length <= 1) {\r\n\t\t\t\tnumOfGets++;\r\n\t\t\t\ttype= \"10\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tnumOfMultiGets++;\r\n\t\t\t\ttype = requests.length+\"\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tString reply = recipient.receive();\r\n\t\t\treceiveTime = System.nanoTime();\r\n\t\t\tprocessingTime = receiveTime - sendTime;\r\n\t\t\t\r\n\t\t\tint hit = 0;\r\n\t\t\thit += reply.split(\"VALUE\").length - 1;\r\n\t\t\tmiss += requests.length-hit;\r\n\r\n\t\t\tif(!(reply.endsWith(\"END\"))) {\r\n\t\t\t\tunproperRequests.add(reply);\r\n\t\t\t\tsendBack(currentJob.getClient(), reply);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tsendBack(currentJob.getClient(), reply);\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnumOfMultiGets++;\r\n\t\t\ttype = requests.length+\"\";\r\n\t\t\tnumOfRecipients = servers.size();\r\n\t\t\trequestsPerServer = requests.length / servers.size();\r\n\t\t\tremainingRequests = requests.length % servers.size() ;\r\n\t\t\t\r\n\t\t\t//The worker thread sends a number of requests to each server equal to requestsPerServer \r\n\t\t\t//and at most requestsPerServer + remainingRequests\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < servers.size(); i++) {\r\n\t\t\t\tmessage = requestType;\r\n\t\t\t\tfor(int j = 0; j < requestsPerServer; j++){\r\n\t\t\t\t\tmessage += \" \";\r\n\t\t\t\t\tmessage += requests[requestsPerServer*i+j];\r\n\t\t\t\t\tif(i < remainingRequests) {\r\n\t\t\t\t\t\tmessage += \" \";\r\n\t\t\t\t\t\tmessage += requests[requests.length - remainingRequests + i];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tservers.get(i).send(this, message);\r\n\t\t\t}\r\n\t\t\tsendTime = System.nanoTime();\r\n\r\n\t\t\tworkerTime = sendTime - pollTime;\r\n\r\n\t\t\tint hit = 0;\r\n\t\t\tfor(ServerHandler s : servers) {\r\n\t\t\t\tString ricevuto = s.receive();\r\n\t\t\t\thit += ricevuto.split(\"VALUE\").length - 1;\r\n\t\t\t\treplies.add(ricevuto);\r\n\t\t\t}\r\n\t\t\treceiveTime = System.nanoTime();\r\n\t\t\tprocessingTime = receiveTime - sendTime;\r\n\r\n\t\t\tmiss += requests.length-hit;\r\n\t\t\t\r\n\t\t\tfinalReply = \"\";\r\n\t\t\tfor(String reply : replies) {\r\n\t\t\t\tif(!(reply.endsWith(\"END\"))) {\r\n\t\t\t\t\tunproperRequests.add(reply);\r\n\t\t\t\t\tsendBack(currentJob.getClient(), reply);\r\n\t\t\t\t\treplies.clear();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treply = reply.substring(0, reply.length() - 3);\r\n\t\t\t\t\tfinalReply += reply;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinalReply += \"END\";\r\n\t\t\tsendBack(currentJob.getClient(), finalReply);\r\n\t\t\treplies.clear();\r\n\r\n\t\t}\r\n\t\t\r\n\t}",
"private void refreshServerList() {\n\t\tcurrentRequestId++;\n\t\tserverNames.clear();\n\t\tserverTable.clear();\n\t\tnew Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\taddresses = client.discoverHosts(WifiHelper.UDP_PORT, 1000);\n\t\t\t\tint removed = 0;\n\t\t\t\tfor(int i = 0; i + removed < addresses.size(); i++) {\n\t\t\t\t\tsynchronized(client) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tclient.connect(1000, addresses.get(i - removed), WifiHelper.TCP_PORT, WifiHelper.UDP_PORT);\n\t\t\t\t\t\t\tclient.sendTCP(new NameRequest(currentRequestId, addresses.size()));\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tclient.wait(5000);\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\taddresses.remove(i);\n\t\t\t\t\t\t\tremoved++;\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}).start();\n\t}",
"public void run() throws InterruptedException {\n\tSystem.out.println(\"Discovering Hudson master\");\n\n\t// wait until we get the ACK back\n\twhile (true) {\n\t try {\n\t\tList<Candidate> candidates = new ArrayList<Candidate>();\n\t\tfor (DatagramPacket recv : discover()) {\n\n\t\t String responseXml = new String(recv.getData(), 0,\n\t\t\t recv.getLength());\n\n\t\t Document xml;\n\t\t System.out.println();\n\n\t\t try {\n\t\t\txml = DocumentBuilderFactory\n\t\t\t\t.newInstance()\n\t\t\t\t.newDocumentBuilder()\n\t\t\t\t.parse(new ByteArrayInputStream(recv.getData(),\n\t\t\t\t\t0, recv.getLength()));\n\t\t } catch (SAXException e) {\n\t\t\tSystem.out.println(\"Invalid response XML from \"\n\t\t\t\t+ recv.getAddress() + \": \" + responseXml);\n\t\t\tcontinue;\n\t\t }\n\t\t String swarm = getChildElementString(\n\t\t\t xml.getDocumentElement(), \"swarm\");\n\t\t if (swarm == null) {\n\t\t\tSystem.out.println(recv.getAddress()\n\t\t\t\t+ \" doesn't support swarm\");\n\t\t\tcontinue;\n\t\t }\n\n\t\t String url = master == null ? getChildElementString(\n\t\t\t xml.getDocumentElement(), \"url\") : master;\n\t\t if (url == null) {\n\t\t\tSystem.out\n\t\t\t\t.println(recv.getAddress()\n\t\t\t\t\t+ \" doesn't have the configuration set yet. Please go to the sytem configuration page of this Hudson and submit it: \"\n\t\t\t\t\t+ responseXml);\n\t\t\tcontinue;\n\t\t }\n\t\t candidates.add(new Candidate(url, swarm));\n\t\t}\n\n\t\tif (candidates.size() == 0)\n\t\t throw new RetryException(\n\t\t\t \"No nearby Hudson supports swarming\");\n\n\t\tSystem.out.println(\"Found \" + candidates.size()\n\t\t\t+ \" eligible Hudson.\");\n\t\t// randomly pick up the Hudson to connect to\n\t\ttarget = candidates\n\t\t\t.get(new Random().nextInt(candidates.size()));\n\t\tif (password == null && username == null) {\n\t\t verifyThatUrlIsHudson();\n\t\t}\n\n\t\t// create a new swarm slave\n\t\tcreateSwarmSlave();\n\t\tconnect();\n\t } catch (IOException e) {\n\t\te.printStackTrace();\n\t } catch (ParserConfigurationException e) {\n\t\te.printStackTrace();\n\t } catch (RetryException e) {\n\t\tSystem.out.println(e.getMessage());\n\t\tif (e.getCause() != null)\n\t\t e.getCause().printStackTrace();\n\t }\n\n\t // retry\n\t System.out.println(\"Retrying in 10 seconds\");\n\t Thread.sleep(10 * 1000);\n\t}\n\n }",
"private static void getClients() throws IOException {\r\n\t\tbidders=new ArrayList<Socket>();\r\n\t\tserverSocket=new ServerSocket(portno);\r\n\t\twhile ((bidders.size()<numBidders)&&(auctioneer==null)) {\r\n\t\t\tSocket temp=serverSocket.accept();\r\n\t\t\t//if (this client is a bidder)\r\n\t\t\t\tbidders.add(temp);\r\n\t\t\t//if (this client is the auctioneer)\r\n\t\t\t\tauctioneer=temp;\r\n\t\t}\r\n\t}",
"public void requestLeaderboard() {\r\n connection.requestLeaderboard();\r\n }",
"public static void getId() {\n\t\tnew Thread() {\n\t\t\tpublic void run() {\n\t\t\t\tString info = \"\";\n\t\t\t\ttry {\n\n\t\t\t\t\tserverSocket3 = new ServerSocket(51000);\n\t\t\t\t\twhile (yes) {\n\t\t\t\t\t\tSocket client = serverSocket3.accept();\n\t\t\t\t\t\tBufferedReader input = new BufferedReader(\n\t\t\t\t\t\t\t\tnew InputStreamReader(client.getInputStream()));\n\t\t\t\t\t\tinfo = input.readLine();\n\t\t\t\t\t\tSystem.out.println(info);\n\t\t\t\t\t\tString name[] = info.split(\"::\");\n\n\t\t\t\t\t\tSystem.out.print(client.getInetAddress());\n\t\t\t\t\t\tbu = Integer.parseInt(name[0]);\n\t\t\t\t\t\tb[bu].setText(name[1]);\n\t\t\t\t\t\tclientIP[bu] = client.getInetAddress();\n\t\t\t\t\t\tb[bu].setFont(new Font(\"sansserif\", Font.BOLD, 12));\n\t\t\t\t\t\tb[bu].setHorizontalAlignment(JButton.LEFT);\n\t\t\t\t\t\tb[bu].setBackground(Color.blue);\n\t\t\t\t\t\tseatTableSpace.repaint();\n\t\t\t\t\t\tfor (int i = 0; i < count; i++)\n\t\t\t\t\t\t\tb[i].setLocation(arrX[i], arrY[i]);\n\t\t\t\t\t}\n\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t}\n\t\t}.start();\n\t}",
"private void receiveVote() {\n\t\t//Se la postazione termina la connessione informiamo lo staff con un messaggio di errore\n\t\tif(!link.hasNextLine()) {\n\t\t\tcontroller.printError(\"Errore di Comunicazione\", \"La postazione \"+ ip.getHostAddress() + \" non ha inviato i pacchetti di voto.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Vengono recuperati i voti cifrati\n\t\tMessage request;\n\t\tWrittenBallot[] encryptedBallots;\n\t\ttry {\n\t\t\trequest = (Message) Message.fromB64(link.read(), \"postazione \" + ip.getHostAddress());\n\t\t\tString[] required = {\"encryptedBallots\"};\n\t\t\tClass<?>[] types = {WrittenBallot[].class};\n\t\t\t\n\t\t\trequest.verifyMessage(Protocol.sendVoteToStation, required, types, \"postazione \" + ip.getHostAddress());\n\t\t\tencryptedBallots = request.getElement(\"encryptedBallots\");\n\t\t\t\n\t\t\t//I voti vengono memorizzati nel seggio in attesa dell'invio all'urna\n\t\t\tif(((Controller) controller).storeVoteLocally(encryptedBallots, ip))\n\t\t\t\tlink.write(Protocol.votesReceivedAck);\n\t\t\telse\n\t\t\t\tlink.write(Protocol.votesReceivedNack);\n\t\t\t\n\t\t} catch (PEException e) {\n\t\t\tlink.write(Protocol.votesReceivedNack);\n\t\t\tcontroller.printError(e);\n\t\t}\n\t}",
"private void verifyAlive(int coordID, int procID, int electedID, String token) {\r\n\tSystem.out.println(\"so im here now\" + coordID);\r\n\t\tlong time = 3000;\r\n\t\ttry {\r\n\t\t\tThread.sleep(time);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tif(procID>6) {\r\n \tprocID = procID - 6;\r\n }\r\n try {\r\n socket = new Socket(\"127.0.0.1\", 8080+procID);\r\n out = new PrintWriter(socket.getOutputStream());\r\n out.println(token);\r\n out.flush();\r\n out.close();\r\n socket.close();\r\n //ring.currentAlive = electedID;\r\n } catch(Exception ex) {\r\n \tverifyAlive(coordID, procID+1, electedID, token); // pass to next next if next was unavailable\r\n }\r\n\t//}\r\n}",
"private void run() throws IOException, InterruptedException {\n\n\t// Make connection and initialize streams\n\t// TODO - need to close this socket\n\tSocket socket = new Socket(SERVER_ADDRESS, PORT_ADDRESS); // set port\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// here\n\tin = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\tout = new PrintWriter(socket.getOutputStream(), true);\n\n\t// ******************* SET UP COMMUNICATION MODULE by Shay\n\t// *********************\n\t/* Your Group Info */\n\tGroup group = new Group(rovername, SERVER_ADDRESS, 53702, RoverDriveType.WALKER, RoverToolType.RADIATION_SENSOR,\n\t\t\tRoverToolType.CHEMICAL_SENSOR);\n\n\t/* Setup communication, only communicates with gatherers */\n\trocom = new RoverCommunication(group);\n\trocom.setGroupList(Group.getGatherers());\n\n\t// ******************************************************************\n\n\t// Gson gson = new GsonBuilder().setPrettyPrinting().create();\n\n\t// Process all messages from server, wait until server requests Rover ID\n\t// name\n\twhile (true) {\n\t\tString line = in.readLine();\n\t\tif (line.startsWith(\"SUBMITNAME\")) {\n\t\t\tout.println(rovername); // This sets the name of this instance\n\t\t\t\t\t\t\t\t\t// of a swarmBot for identifying the\n\t\t\t\t\t\t\t\t\t// thread to the server\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// ******** Rover logic *********\n\t// int cnt=0;\n\tString line = \"\";\n\n\tint counter = 0;\n\n\tboolean stuck = false; // just means it did not change locations between\n\t\t\t\t\t\t\t// requests,\n\t\t\t\t\t\t\t// could be velocity limit or obstruction etc.\n\tboolean blocked = false;\n\n\tCoord currentLoc = null;\n\tCoord previousLoc = null;\n\n\ttargetLocations[0] = new Coord(0, 0);\n\n\t// out.println(\"START_LOC\");\n\t// line = in.readLine();\n\t// if (line == null) {\n\t// System.out.println(\"ROVER_02 check connection to server\");\n\t// line = \"\";\n\t// }\n\t// if (line.startsWith(\"LOC\")) {\n\t// // loc = line.substring(4);\n\t// Coord Loc = extractLOC(line);\n\t// targetLocations[2] = new Coord(Loc.xpos, Loc.ypos);\n\t// }\n\n\tSystem.out.println(\"getting target loc\");\n\t\n\t out.println(\"TARGET_LOC\");\n\t line = in.readLine();\n\t System.out.println(\"line =\" + line);\n\t if (line == null) {\n\t System.out.println(\"ROVER_02 check connection to server\");\n\t line = \"\";\n\t }\n\t if (line.startsWith(\"TARGET_LOC\")) {\n\t // loc = line.substring(4);\n\t\t System.out.println(\"inside if\");\n\tSystem.out.println(line);\n\ttarget = extractLOC(line);\n//\t target = Loc;\n\t// target = new Coord(Loc.xpos,Loc.ypos);\n\t }\n//\t System.out.println(target.xpos + \" , \" + target.ypos);\n\n\t//target = new Coord(49, 49);\n\t// start Rover controller process\n\twhile (true) {\n\n\t\t// currently the requirements allow sensor calls to be made with no\n\t\t// simulated resource cost\n\n\t\t// **** location call ****\n\t\tout.println(\"LOC\");\n\t\tline = in.readLine();\n\t\tif (line == null) {\n\t\t\tSystem.out.println(\"ROVER_02 check connection to server\");\n\t\t\tline = \"\";\n\t\t}\n\t\tif (line.startsWith(\"LOC\")) {\n\t\t\t// loc = line.substring(4);\n\t\t\tcurrentLoc = extractLOC(line);\n\t\t}\n//\t\tSystem.out.println(\"ROVER_02 currentLoc at start: \" + currentLoc);\n\n\t\t// after getting location set previous equal current to be able to\n\t\t// check for stuckness and blocked later\n\t\tpreviousLoc = currentLoc;\n\n\t\t// **** get equipment listing ****\n\t\tArrayList<String> equipment = new ArrayList<String>();\n\t\tequipment = getEquipment();\n\t\t// System.out.println(\"ROVER_02 equipment list results drive \" +\n\t\t// equipment.get(0));\n//\t\tSystem.out.println(\"ROVER_02 equipment list results \" + equipment + \"\\n\");\n\n\t\t// ***** do a SCAN *****\n//\t\tSystem.out.println(\"ROVER_02 sending SCAN request\");\n\t\tthis.doScan();\n//\t\tSystem.out.println(\"debug\");\n\t\tscanMap.debugPrintMap();\n\n\t\t// MOVING\n\t\tSystem.out.println(\"moving\");\n\t\tMapTile[][] scanMapTiles = scanMap.getScanMap();\n\t//\tSystem.out.println(\"calling make a star\");\n\t\t\n\t//\tmakeAStarmove(scanMapTiles, currentLoc, target);\n\n\t//\tSystem.out.println(\"Astar done\");\n\n\t\tout.println(\"LOC\");\n\t\tline = in.readLine();\n\t\tif (line == null) {\n\t\t\t\t\t\t\tline = \"\";\n\t\t}\n\t\tif (line.startsWith(\"LOC\")) {\n\t\t\t// loc = line.substring(4);\n\t\t\tcurrentLoc = extractLOC(line);\n\t\t}\n\t\t\n\t\tif(currentLoc.equals(target))\n\t\t{\n\t\t\tout.println(\"START_LOC\");\n\t\t\t line = in.readLine();\n\t\t\t if (line == null) {\n\t\t\t System.out.println(\"ROVER_02 check connection to server\");\n\t\t\t line = \"\";\n\t\t\t }\n\t\t\t if (line.startsWith(\"START_LOC\")) {\n\t\t\t // loc = line.substring(4);\n\t\t\t Coord Loc = extractLOC(line);\n\t\t\t target = Loc;\n\t\t\t }\n\t\t\t continue;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tout.println(\"LOC\");\n\t\t\tline = in.readLine();\n\t\t\tif (line == null) {\n\t\t\t\t\t\t\t\tline = \"\";\n\t\t\t}\n\t\t\tif (line.startsWith(\"LOC\")) {\n\t\t\t\t// loc = line.substring(4);\n\t\t\t\tcurrentLoc = extractLOC(line);\n\t\t\t}\n\t\t\t//System.out.println(\"ROVER_02 currentLoc at start: \" + currentLoc);\n\t\t\tmake_a_move(scanMapTiles, currentLoc);\n\t\t}\n\n\t\t// test for stuckness\n\n\t\tSystem.out.println(\"ROVER_02 stuck test \" + stuck);\n\t\t// System.out.println(\"ROVER_02 blocked test \" + blocked);\n\n\t\t/* ********* Detect and Share Science by Shay ***************/\n\t\tdoScan();\n\t\trocom.detectAndShare(scanMap.getScanMap(), currentLoc, 3);\n\t\t/* *************************************************/\n\n\t\t// Thread.sleep(sleepTime);\n\n\t\t// System.out.println(\"ROVER_02 ------------ bottom process control\n\t\t// --------------\");\n\n\t}\n\n}",
"public synchronized void tryExecuteRequests(){\n Object lpid = getLocalProcessID();\n\n JDSUtility.debug(\"[PBFTSever:handle(token)] s\" + lpid + \", at time \" + getClockValue() + \", is going to execute requests.\");\n\n //if(isValid(proctoken)){\n long startSEQ = getStateLog().getNextExecuteSEQ();\n long finalSEQ = getHCWM();//proctoken.getSequenceNumber();\n long lcwm = getLCWM();\n\n PBFTRequestInfo rinfo = getRequestInfo();\n\n int viewn = getCurrentViewNumber();\n\n int f = getServiceBFTResilience();\n\n for(long currSEQ = startSEQ; currSEQ <= finalSEQ && currSEQ > lcwm; currSEQ ++){\n\n if(!(getPrepareInfo().count(viewn, currSEQ) >= (2* f) && getCommitInfo().count(viewn, currSEQ) >= (2 * f +1))){\n return;\n }\n\n if(rinfo.hasSomeRequestMissed(currSEQ)){\n JDSUtility.debug(\"[tryExecuteRequests()] s\" + lpid+ \", at time \" + getClockValue() + \", couldn't executed \" + currSEQ + \" because it has a missed request.\");\n return;\n }\n\n if(rinfo.wasServed(currSEQ)){\n continue;\n }\n\n executeSequencedComand(currSEQ);\n//\n// PBFTPrePrepare preprepare = getPrePrepareInfo().get(viewn, currSEQ);\n//\n// for(String digest : preprepare.getDigests()){\n// StatedPBFTRequestMessage loggedRequest = rinfo.getStatedRequest(digest);\n// PBFTRequest request = loggedRequest.getRequest();//rinfo.getRequest(digest); //statedReq.getRequest();\n//\n// IPayload result = lServer.executeCommand(request.getPayload());\n//\n// PBFTReply reply = createReplyMessage(request, result);\n// loggedRequest.setState(RequestState.SERVED);\n// loggedRequest.setReply(reply);\n//\n// JDSUtility.debug(\n// \"[tryExecuteRequests()] s\" + lpid + \", at time \" + getClockValue() + \", executed \" + request + \" (CURR-VIEWN{ \" + viewn + \"}; SEQN{\" + currSEQ + \"}).\"\n// );\n//\n// JDSUtility.debug(\"[tryExecuteRequests()] s\" + lpid + \", at time \" + getClockValue() + \", has the following state \" + lServer.getCurrentState());\n//\n// loggedRequest.setReplySendTime(getClockValue());\n//\n// if(rinfo.isNewest(request)){\n// IProcess client = new BaseProcess(reply.getClientID());\n// emit(reply, client);\n// }\n//\n// }//end for each leafPartDigest (tryExecuteRequests and reply)\n \n IRecoverableServer lServer = (IRecoverableServer)getServer();\n JDSUtility.debug(\n \"[tryExecuteRequests()] s\" + lpid + \", at time \" + getClockValue() + \", after execute SEQN{\" + currSEQ + \"} has the following \" +\n \"state \" + lServer.getCurrentState()\n );\n\n getStateLog().updateNextExecuteSEQ(currSEQ);\n\n long execSEQ = getStateLog().getNextExecuteSEQ() -1;\n long chkPeriod = getCheckpointPeriod();\n\n\n if(execSEQ > 0 && (((execSEQ+1) % chkPeriod) == 0)){\n PBFTCheckpoint checkpoint;\n try {\n checkpoint = createCheckpointMessage(execSEQ);\n getDecision(checkpoint);\n rStateManager.addLogEntry(\n new CheckpointLogEntry(\n checkpoint.getSequenceNumber(),\n rStateManager.byteArray(),\n checkpoint.getDigest()\n )\n );\n\n\n emit(checkpoint, getLocalGroup().minus(getLocalProcess()));\n handle(checkpoint);\n } catch (Exception ex) {\n Logger.getLogger(PBFTServer.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n\n if(rinfo.hasSomeWaiting()){\n if(isPrimary()){\n batch();\n }else{\n scheduleViewChange();\n }\n }\n }\n }",
"@Override\n\tpublic void run() {\n\t\tSocket s = null;\n\t\tDataOutputStream dos = null;\n\t\tDataInputStream dis = null;\n\t\tString clientName = \"\";\n\t\tString userid = null;\n\t\tString password = null;\n\t\t\n\t\ttry {\n\t\t\ts = ss.accept(); // wait for a client\n\t\t\tnew Thread(this).start(); // make a thread to connect the NEXT client - somewhat recursive\n\t\t\tdis = new DataInputStream(s.getInputStream());\n\t\t\tString firstMsg = dis.readUTF();\n\t\t\tdos = new DataOutputStream(s.getOutputStream());\n\t\t\t\n\t\t\t// validate connection \n\t\t\tif (firstMsg.charAt(0) == '\\u0274') { // char startsWith()\n\t\t\t\tfirstMsg = firstMsg.substring(1); // drop unicode char\n\t\t\t\tint slashOffset = firstMsg.indexOf(\"/\");\n\t\t\t\tuserid = firstMsg.substring(0, slashOffset).toLowerCase();\n\t\t\t\tpassword = firstMsg.substring(slashOffset + 1);\n\t\t\t\tSystem.out.println(userid + \" is attempting to join with password \" + password);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdos.writeUTF(\"Invalid protocol. \" + \"Are you calling the right address and port?\");\n\t\t\t\tdos.close(); // close connection\n\t\t\t\tSystem.out.println(\"Invalid 1st msg received: \" + firstMsg);\n\t\t\t\treturn; // kill this client thread\n\t\t\t}\n\t\t\t\n\t\t\t// validate username then get chatName from this collection: \n\t\t\tif (authorizedClients.containsKey(userid)) clientName = authorizedClients.get(userid);\n\t\t\t else { //The submitted userid is not in the collection...\n\t\t\t\t dos.writeUTF(\"user id \" + userid + \" is not authorized to join the PrivateChatRoom.\");\n\t\t\t\t System.out.println(userid + \" is not authorized to join.\");\n\t\t\t\t dos.close(); // hang up.\n\t\t\t\t return; // and kill this client thread\n\t\t\t }\n\t\t\tif (clients.containsKey(clientName)) {\n\t\t\t\t dos.writeUTF(clientName + \" is already in the chat room. Cannot be joined from two locations concurrently.\");\n\t\t\t\t System.out.println(\"Received join request for a userid (\" + userid + \"=\" + clientName + \" that is already in the chat room.\" );\n\t\t\t\t dos.close(); // hang up.\n\t\t\t\t return; // and kill this client thread\n\t\t\t}\n\t\t\telse { // process this request\n\t\t\t\tSystem.out.println(clientName + \" is joining.\"); // trace\n\t\t\t\tsendToAllClients(\"Welcome to \" + clientName + \" who has just joined the chat room!\"); // let everyone know you're flossing\n\t\t\t\tclients.put(clientName, dos); // add to collection\n\t\t\t}\n\t\t\tObjectOutputStream oos = null;\n\t\t\tif (!passwords.containsKey(userid)) // stored password not found\n\t\t\t\t\t { // That's OK! This is just a first-time join!\n\t\t\t\t\t passwords.put(userid, password);//add to collection\n\t\t\t\t\t //And save the updated passwords collection to disk:\n\t\t\t\t\t oos= new ObjectOutputStream(new FileOutputStream(\"ChatRoomPasswords.ser\"));\n\t\t\t\t\t oos.writeObject(passwords);\n\t\t\t\t\t oos.close();\n\t\t\t\t\t }\n\t\t\t\t\t else // a stored password for this userid is found\n\t\t\t\t\t {\n\t\t\t\t\t String storedPassword = passwords.get(userid);\n\t\t\t\t\t if(!storedPassword.equals(password))\n\t\t\t\t\t {\n\t\t\t\t\t dos.writeUTF(\"Join rejected. The submitted password does not match the password stored for this user id.\");\n\t\t\t\t\t return; // and kill this client's thread.\n\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\tdos.writeUTF(\"Welcome to the chat room \" + clientName + \"!\");\t\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Client connection failure: \" + e);\n\t\t\tif (s.isConnected()) {\n\t\t\t\ttry {\n\t\t\t\t\ts.close(); // hang up\n\t\t\t\t}\n\t\t\t\tcatch (IOException ioe){\n\t\t\t\t\t// Already hung up\n\t\t\t\t}\n\t\t\t} // end if\n\t\t} // end catch\n\t\t\n\t\t// Send Receive loop\n\t\ttry {\n\t\t\twhile (true) {\n\t\t\t\tString inChat = dis.readUTF();\n\t\t\t\tString outChat = clientName + \" says: \" + inChat;\n\t\t\t\tSystem.out.println(outChat); // trace\n\t\t\t\tsendToAllClients(outChat); // send it to everyone\n\t\t\t}\n\t\t}\n\t\tcatch (IOException ioe){ // leave processing\n\t\t\tSystem.out.println(clientName + \" is leaving.\"); // trace\n\t\t\tsendToAllClients(\"Goodbye to \" + clientName + \" who has just left the chat room!\"); // let everyone know you're leaving\n\t\t\tclients.remove(clientName); // remove from collection\n\t\t\treturn; // kill thread since we're done now for w/e reason\n\t\t}\n\t}",
"@Override\n\tpublic void run(){\n\t\tInetAddress IPAddress = serverTcpSocket.getInetAddress();\n\t\tfor (ClientObj c: clients)\n\t\t\tif (c.getId() == client.getId()){\n\t\t\t\tSystem.out.print(IPAddress + \" Client already connected!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\ttry{\n\t\t\t// Check handshake received for correctness\n\t\t\t//(connect c->s) [herader | \"JUSTIN\\0\" | connection port] (udp)\n\t\t\t//(connect response s->c) [header | client id | port] (udp)\n\t \n\t // open the connection\n\t\t clientSocket = null;\n\t\t Socket clientListener = null;\n\t\t // wait for client connection on tcp port\n\t\t //serverTcpSocket.setSoTimeout(5000);\n\t \tSystem.out.println (\" Waiting for tcp connection.....\");\n\t \tclientSocket = serverTcpSocket.accept();\n\t \tclientListener = serverTcpSocket.accept();\n\t \tclient.setListenerSocket(clientListener);\n\t\t\tIPAddress = clientSocket.getInetAddress();\n\t\t\tint recv_port = clientSocket.getPort();\n\t\t\tSystem.out.println(IPAddress + \": Client connected @ port \" + recv_port);\n\n\t\t // handle tcp connection\n\t\t\tclientSocket.setSoTimeout(Constants.ACK_TIMEOUT);\n\t\t out = new BufferedOutputStream(clientSocket.getOutputStream());\n\t\t\tin = new BufferedInputStream(clientSocket.getInputStream());\n\t\t\tclient.setAddress(clientSocket.getInetAddress());\n\t\t\tclient.setPort(clientSocket.getPort());\n\t\t clients.add(client);\n\t\t\t\n\t\t // handle requests\n\t\t\twhile (!shutdown_normally) {\n\t\t\t\t// read just the header, then handle the req based on the info in the header\n\t\t\t\tif ((buf = Utility.readIn(in, Constants.HEADER_LEN)) == null)\n\t\t\t\t\tbreak;\n\t\t\t\tint flag = buf.getInt(0);\n\t\t\t\tint len2 = buf.getInt(4);\n\t\t\t\tint id = buf.getInt(8);\n\t\t\t\t\n\t\t\t\t// check for correctness of header\n\t\t\t\t\n\t\t\t\tif (flag < Constants.OPEN_CONNECTION || \n\t\t\t\t\t\tflag > Constants.NUM_FLAGS || \n\t\t\t\t\t\tid != client.getId() || \n\t\t\t\t\t\tlen2 < 0){\n\t\t\t\t\tout.close(); \n\t\t\t\t\tin.close(); \n\t\t\t\t\tclientSocket.close(); \n\t\t\t\t\tserverTcpSocket.close();\n\t\t\t\t\tclients.remove(client);\n\t\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\t\t\"Connection - FAILURE! (malformed header)\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// read payload\n\t\t\t\tif ((buf = Utility.readIn(in, Utility.getPaddedLength(len2))) == null)\n\t\t\t\t\tthrow new IOException(\"read failed.\");\n\t\t\t\t// update address (necessary?)\n\t\t\t\tclients.get(clients.indexOf(client)).setAddress(clientSocket.getInetAddress());\n\t\t\t\tclient.setAddress(clientSocket.getInetAddress());\n\t\t\t\tswitch (flag){\n\t\t\t\t\tcase Constants.ACK:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.VIEW_REQ:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing view request...\");\n\t\t\t\t\t\tViewFiles(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.DOWNLOAD_REQ:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing download request...\");\n\t\t\t\t\t\tDownload(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.UPLOAD_REQ:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing upload request...\");\n\t\t\t\t\t\tUpload(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.DOWNLOAD_ACK:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing download acknowledgment...\");\n\t\t\t\t\t\tDownloadCompleted(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.CLOSE_CONNECTION:\n\t\t\t\t\t\tshutdown_normally = true;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// close all open sockets\n\t\t out.close(); \n\t\t in.close(); \n\t\t clientSocket.close(); \n\t\t serverTcpSocket.close();\n\t\t} catch (SocketTimeoutException e) {\n\t\t\tSystem.err.println(IPAddress + \": Timeout waiting for response.\");\n\t\t} catch (UnknownHostException e) {\n\t\t\t// IPAdress unknown\n\t\t\tSystem.err.println(\"Don't know about host \" + IPAddress);\n\t\t} catch (IOException e) {\n\t\t\t// Error in communication\n\t\t\tSystem.err.println(\"Couldn't get I/O for the connection to \" +\n\t\t\t\t\tIPAddress);\n\t\t} catch (RuntimeException e){\n\t\t\t// Malformed Header or payload most likely\n\t\t\tSystem.err.println(IPAddress + \": Connection - FAILURE! (\" + e.getMessage() + \")\");\n\t\t} finally {\n\t\t\t// remove this client from active lists, close all (possibly) open sockets\n\t\t\tSystem.out.println(IPAddress + \": Connection - Closing!\");\n\t\t\tclients.remove(client);\n\t\t\ttry {\n\t\t\t\tSocket clientConnection = client.getListenerSocket();\n\t\t\t\tOutputStream out_c = new BufferedOutputStream(clientConnection.getOutputStream());\n\t\t\t\tbuf = Utility.addHeader(Constants.CLOSE_CONNECTION, 0, client.getId());\n\t\t\t\tout_c.write(buf.array());\n\t\t\t\tout_c.flush();\n\t\t\t\tout_c.close();\n\t\t\t\tclientConnection.close();\n\n\t\t\t\tif (out != null)\n\t\t\t\t\tout.close();\n\t\t\t\tif (in != null)\n\t\t\t\t\tin.close();\n\t\t\t\tif (!clientSocket.isClosed())\n\t\t\t\t\tclientSocket.close();\n\t\t\t\tif (!serverTcpSocket.isClosed())\n\t\t\t\t\tserverTcpSocket.close();\n\t\t\t} catch (IOException e){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n }",
"@Override\n public void run() {\n List<Integer> list = new ArrayList<Integer>();\n int num_peer = P.peer_port.length;\n int ind = -1;\n for (int i = 0; i < num_peer; i++) {\n list.add(i);\n }\n while (P.choke_thread_running) {\n synchronized (P.lock_current_neighbors) { //lock the object\n\n if(P.current_neighbors==null) continue;\n\n int[] cn = P.current_neighbors.clone(); //current neighbor.\n Arrays.sort(cn);\n if (P.own_file || P.finished) { //select randomly.\n java.util.Collections.shuffle(list);\n int cnt = 0; //#peers selected.\n for (int i = 0; i < num_peer && cnt < P.num_preferred_neighbors; i++) {\n ind = list.get(i);\n if (P.is_interested[ind] && P.peer_id[ind] != P.id) {\n P.current_neighbors[cnt++] = P.peer_id[ind];\n //send unchoke message to previously choked peer.\n if (Arrays.binarySearch(cn, P.peer_id[ind]) < 0) {\n Message msg = new Message();\n msg.length = 0; //no payload.\n msg.type = 1; //unchoke.\n msg.payload = null; //no payload.\n P.send(P.peer_id[ind], msg);\n }\n }\n }\n P.print(\"Choke selected \" + cnt + \" neighbors randomly.\");\n } else { //select according to the download rates.\n int[] order = getIndices(P.download_rates);\n int cnt = 0; //#peers selected.\n for (int i = 0; i < num_peer && cnt < P.num_preferred_neighbors; i++) {\n ind = order[i];\n if (P.is_interested[ind] && P.peer_id[ind] != P.id) {\n P.current_neighbors[cnt++] = P.peer_id[ind];\n //send unchoke message to previously choked peer.\n if (Arrays.binarySearch(cn, P.peer_id[ind]) < 0) {\n Message msg = new Message();\n msg.length = 0; //no payload.\n msg.type = 1; //unchoke.\n msg.payload = null; //no payload.\n P.send(P.peer_id[ind], msg);\n }\n }\n }\n //print debugging info.\n P.print(\"Choke selected \" + cnt + \" neighbors according to download rates.\");\n }\n //send choke message to peers previously unchoked but currently choked.\n Arrays.sort(Arrays.copyOfRange(P.current_neighbors, 0, P.num_preferred_neighbors - 1));\n for (int i = 0; i < P.num_preferred_neighbors; i++) {\n if (Arrays.binarySearch(P.current_neighbors, cn[i]) < 0) { //cn[i] not in current neighbor list.\n Message msg = new Message();\n msg.length = 0; //no payload.\n msg.type = 0; //choke.\n msg.payload = null; //no payload.\n P.send(P.peer_id[ind], msg);\n }\n }\n }\n //sleep some interval.\n try {\n Thread.sleep(1000 * P.unchoking_internal);\n } catch (InterruptedException ex) {\n Thread.currentThread().interrupt();\n }\n }\n }",
"public void run() {\n GlobalLogger.log(this, LogLevel.INFO, \"STARTING RequestThread\");\n while(true) {\n int request = client.recvInt();\n if (request == -2147483648) {\n return;\n }\n int i;\n int d;\n int id;\n int x;\n int y;\n switch(request) {\n case 0xC0:\n mustSync = true;\n break;\n case 1:\n i = receiveUntilNotSync();\n d = receiveUntilNotSync();\n GlobalLogger.log(this, LogLevel.INFO, \"Updating direction of client %d to %d\",i, d);\n if(getOpponentByClientId(i) != null) getOpponentByClientId(i).setDirection(d);\n break;\n case 2:\n id = receiveUntilNotSync();\n x = receiveUntilNotSync();\n y = receiveUntilNotSync();\n MySnakeMultiplayerOpponent newopponent = new MySnakeMultiplayerOpponent(id);\n GlobalLogger.log(this, LogLevel.INFO, \"New opponent at id %d, on pos (%d,%d)\",id,x,y);\n newopponent.addPiece(new MySnakePiece(x,y));\n newopponent.addPiece(new MySnakePiece(x+1,y));\n opponents.add(newopponent);\n break;\n case 3:\n id = receiveUntilNotSync();\n GlobalLogger.log(this, LogLevel.INFO, \"Apple eaten by opponent %d!\", id);\n if(getOpponentByClientId(id) != null) getOpponentByClientId(id).addPiece(new MySnakePiece(getOpponentByClientId(id).getSnake().get(getOpponentByClientId(id).getSnake().size()-1).getX(), getOpponentByClientId(id).getSnake().get(getOpponentByClientId(id).getSnake().size()-1).getY()));\n break;\n case 4:\n x = receiveUntilNotSync();\n y = receiveUntilNotSync();\n GlobalLogger.log(this, LogLevel.INFO, \"New apple pos is (%d,%d)\",x,y);\n apple.x = x;\n apple.y = y;\n break;\n case 5:\n int playern = receiveUntilNotSync();\n // GlobalLogger.log(this, LogLevel.INFO, \"Global sync received\");\n // GlobalLogger.log(this, LogLevel.INFO, \"%d players currently connected (besides you)\", playern);\n for(int k=0; k<playern; k++) {\n id = receiveUntilNotSync();\n MySnakeMultiplayerOpponent currentOpponent = getOpponentByClientId(id);\n if(currentOpponent != null) {\n currentOpponent.setDirection(client.recvInt());\n int tailsn = receiveUntilNotSync();\n for(int j=0; j<tailsn; j++) {\n int tailx = receiveUntilNotSync();\n int taily = receiveUntilNotSync();\n currentOpponent.getSnake().get(j).setX(tailx);\n currentOpponent.getSnake().get(j).setY(taily);\n }\n }\n }\n\n int controlcode = receiveUntilNotSync();\n if(controlcode != 1908) {\n GlobalLogger.log(this, LogLevel.SEVERE, \"Something went horribly wrong. Got %d for control code\", controlcode);\n } else {\n // GlobalLogger.log(this, LogLevel.INFO, \"Seems like everything went smoothly :D! Noice!\");\n }\n break;\n case 6:\n fuckingDead = true;\n break;\n\n case 7:\n id = receiveUntilNotSync();\n opponents.remove(getOpponentByClientId(id));\n break;\n\n default:\n GlobalLogger.log(this, LogLevel.SEVERE, \"Invalid request %d received from server\", request);\n this.stop();\n break;\n }\n }\n }",
"public synchronized void processReq() throws UnknownHostException, IOException, InterruptedException{\n\t\tsynchronized(quorum.locked){\n\n\t\t\tString words[] = msgFromClient.split(\" \");\n\t\t\tint reqNode = Integer.parseInt(words[1]);\n\t\t\tint reqPriority = Integer.parseInt(words[2]);\n\t\t\t\n\t\t\t//Ticking clock for reciept of request\n\t\t\ttry {\n\t\t\t\tclock.tick(0, reqPriority);\n\t\t\t} catch (InterruptedException 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\t\t\tif(quorum.locked.get()){\n\t\t\t\tSystem.out.println(t.getName() + \"\\t ****** Quorum is LOCKED for \"+ quorum.getPermissionGivenTo() + \" ****** \");\n\t\t\t\t//**************** If locked, then add to the queue and send INQ or FAIL msgs ***********************\n\t\t\t\t\n\t\t\t\t//Putting in queue\n\t\t\t\tsynchronized(q){\n\t\t\t\t\tq.put(msgFromClient);\n\t\t\t\t\tSystem.out.println(t.getName() + \"\\tSize of queue: \" + q.getQueue().size());\n\t\t\t\t\tSystem.out.println(t.getName() + \"\\tCONTENTS OF THE QUEUE: \");\n\t\t\t\t\tq.printQueue();\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t//Check whether to send INQ or FAIl\t\t\t\t\t\t\n\t\t\t\tint currNode = quorum.getPermissionGivenTo();\n\t\t\t\tint currPriority = quorum.getPermissionGivenToPriority();\n\t\t\t\t\n\t\t\t\t//If new request has higher priority, send INQ to the node with the token, JUST ONCE\n\t\t\t\tif(reqPriority < currPriority && quorum.isCanSendInq()){\n\t\t\t\t\tSystem.out.println(t.getName() + \"\\t___New REQ has HIGHER priority___\");\n\t\t\t\t\tsendInq(myNodeId, currNode, quorum, clock);\n\t\t\t\t\t\n\t\t\t\t\t//Sent an INQ already to node whose is request is being processed. Can't send anymore INQ\n\t\t\t\t\tquorum.setCanSendInq(false);\n\t\t\t\t}\n\t\t\t\telse if(reqPriority == currPriority && reqNode < currNode && quorum.isCanSendInq()){\n\t\t\t\t\tSystem.out.println(t.getName() + \"\\t_____ New REQ has SAME priority but LOWER NodeId___\");\n\t\t\t\t\tsendInq(myNodeId, currNode, quorum, clock);\n\t\t\t\t\t\n\t\t\t\t\t//Sent an INQ already to node whose is request is being processed. Can't send anymore INQ\n\t\t\t\t\tquorum.setCanSendInq(false);\n\t\t\t\t}\n\t\t\t\t//If new request has lower priority, send FAIL to requesting node, JUST ONCE\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(t.getName() + \"\\t___FAILED__\");\n\t\t\t\t\tsendFail(myNodeId, reqNode, quorum, clock);\n\t\t\t\t\t\n\t\t\t\t\t//If a fail has been sent to the node, further fails can't be sent\n\t\t\t\t\t//quorum.getSentFailTo().add(reqNode);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(t.getName() + \"\\t ****** Quorum is NOT LOCKED for \"+ quorum.getPermissionGivenTo() + \" ****** \");\n\t\t\t\t\n\t\t\t\t//Sending TOKEN to self\n\t\t\t\tif(reqNode == myNodeId){\n\t\t\t\t\tSystem.out.println(t.getName()+\"\\t********* Received TOKEN of OWN node *********\");\n\t\t\t\t\t\n\t\t\t\t\t//Remove the nodeId from the list of tokenPending\n\t\t\t\t\tquorum.removePermissionPending(reqNode);\n\t\t\t\t\t\n\t\t\t\t\t//Check if it can enter critical section\n\t\t\t\t\tif(quorum.canEnterCritSec())\n\t\t\t\t\t\tcritSecExec(myNodeId, quorum, file, clock);\n\t\t\t\t\telse{\n\t\t\t\t\t\tSystem.out.println(t.getName() + \"\\tCAN'T ENTER CRITICAL SECTION YET. PERMISSIONS PENDING FROM: \");\n\t\t\t\t\t\tquorum.printPermissionsPendingList();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//Setting details of request for which the TOKEN was sent\n\t\t\t\t\tquorum.setReqWithToken(msgFromClient);\n\t\t\t\t\tquorum.setPermissionGivenTo(reqNode);\n\t\t\t\t\tquorum.setPermissionGivenToPriority(reqPriority);\n\t\t\t\t\t\n\t\t\t\t\t//New TOKEN granted and so canSendInq and canSendFail booleans should be allowed\n\t\t\t\t\tquorum.setCanSendInq(true);\n\t\t\t\t\t//quorum.setCanSendFail(true);\n\t\t\t\t\t\n\t\t\t\t\t//Locking node for current request\n\t\t\t\t\tquorum.locked.compareAndSet(false, true);\n\n\t\t\t\t\t//continue;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//Sending TOKEN to others\n\t\t\t\t\tString destIpAdd = file.getIpAddressList().get(reqNode);\n\t\t\t\t\tint destPort = file.getPortList().get(reqNode);\n\t\t\t\t\tSystem.out.println(t.getName() + \"\\tDestIpAdd: \" + destIpAdd + \" DestPortNo: \" + destPort);\n\t\t\t\t\t\n\t\t\t\t\t//Setting client according to the quorum hashMap\n\t\t\t\t if(quorum.getQuorumSockets().containsKey(reqNode)){\n\t\t\t\t \tSystem.out.println(t.getName() + \"\\tGetting old socket\");\n\t\t\t\t\t\tclient = quorum.getQuorumSockets().get(reqNode);\n\t\t\t\t }\n\t\t\t\t\telse{\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tSystem.out.println(t.getName() + \"\\tCreating new socket\");\n\t\t\t\t\t\t\tclient = new Socket(destIpAdd, destPort);\n\t\t\t\t\t\t\tquorum.getQuorumSockets().put(reqNode, client);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t \n\t\t\t\t //Ticking clock for SEND event\n\t\t\t\t /*try {\n\t\t\t\t\t\tclock.tick(0, 0);\n\t\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}*/\n\t\t\t\t \n\t\t\t\t\t//****************** If unlocked, check for no pending requests ***********************\n\n\t\t\t\t\toutToClient = new DataOutputStream(client.getOutputStream());\n\t\t\t\t\tString msgToSend = \"TOK \" + myNodeId + \" \" + clock.getClockVal();\n\t\t\t\t\t\n\t\t\t\t\tsynchronized(outToClient){\n\t\t\t\t\t\toutToClient.writeBytes(msgToSend+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(t.getName()+ \"\\t***************** PERMISSION GRANTED TOKEN TO: \" + reqNode + \" ******************\");\n\t\t\t\t\t\n\t\t\t\t\t//Setting details of request for which the TOKEN was sent\n\t\t\t\t\tquorum.setReqWithToken(msgFromClient);\n\t\t\t\t\tquorum.setPermissionGivenTo(reqNode);\n\t\t\t\t\tquorum.setPermissionGivenToPriority(reqPriority);\n\t\t\t\t\t\n\t\t\t\t\t//New TOKEN granted and so canSendInq and canSendFail booleans should be allowed\n\t\t\t\t\tquorum.setCanSendInq(true);\n\t\t\t\t\t\n\t\t\t\t\t//Locking node for current request\n\t\t\t\t\tquorum.locked.compareAndSet(false, true);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t}",
"public void sentRecieve() throws UnknownHostException, IOException, ClassNotFoundException, InterruptedException {\n InetAddress host = InetAddress.getLocalHost();\r\n Socket socket = null;\r\n ObjectOutputStream output = null;\r\n ObjectInputStream input = null;\r\n \r\n LinkedList client = new LinkedList();\r\n client.add(\"Elifas\");\r\n client.add(\"Andrew\");\r\n client.add(\"Claudia\");\r\n client.add(\"Ester\");\r\n client.add(\"Emilie\");\r\n \r\n for (int i = 0; i < client.size(); i++) {\r\n int size = client.size();\r\n //establishing socket connection to a server\r\n socket = new Socket(host.getHostName(), 2535);\r\n //write to the socket using ObjectOutputStream\r\n output = new ObjectOutputStream(socket.getOutputStream());\r\n System.out.println(client.get(i)+\" sending request to the server\");\r\n if (size > 5) {\r\n output.writeObject(\"exit\");\r\n }\r\n else{\r\n output.writeObject(\" \"+ client.get(i));\r\n }\r\n //reading the server response\r\n input = new ObjectInputStream(socket.getInputStream());\r\n String message = (String) input.readObject();\r\n System.out.println(\"Response: \"+message);\r\n \r\n //close resources\r\n input.close();\r\n output.close();\r\n Thread.sleep(2000);\r\n }\r\n }",
"private static void runServer(InetAddress address, int port, int nclients, int broadcastClock, int uid, Game game, int level){\t\t\n\t\t// Listen for connections\n\t\tSystem.out.println(\"SERVER LISTENING ON PORT \" + port);\n\t\tSystem.out.println(\"SERVER AWAITING \" + nclients + \" CLIENTS\");\n\t\ttry {\n\t\t\tMaster[] connections = new Master[nclients];\n\t\t\t//Add a new connection for the number of clients requested\n\t\t\tServerSocket ss = new ServerSocket(port);\n\t\t\tSystem.out.println(ss.getInetAddress());\n\t\t\tSystem.out.println(\"SERVER HOST INET ADDRESS\" + ss.getInetAddress().getLocalHost().getHostAddress());\n\t\t\tfor(int i=0; i < nclients; i++){\n\t\t\t\tSocket s = ss.accept();\n\t\t\t\t//game.addPlayer(uid++);\n\t\t\t\tconnections[i] = new Master(broadcastClock, s, uid, game, level);\n\t\t\t\tconnections[i].start();\n\t\t\t\tnclients--;\n\t\t\t}\t\t\t\n\t\t\t\tif(nclients == 0) {\n\t\t\t\t\tSystem.out.println(\"ALL CLIENTS ACCEPTED --- GAME BEGINS\");\n\t\t\t\t\treturn; // done\n\t\t\t\t}\n\t\t} \n\t\tcatch(IOException e) {\n\t\t\tSystem.err.println(\"I/O error: \" + e.getMessage());\n\t\t} \n\t}",
"public void run() {\n\t\tString choice = null;\n\t\tBufferedReader inFromClient = null;\n\t\tDataOutputStream outToClient = null;\n\t\t\n\t\ttry {\n\t\t\tinFromClient = new BufferedReader(new InputStreamReader(client.getInputStream()));\n\t\t\toutToClient = new DataOutputStream(client.getOutputStream());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\t// Loops until the client's connection is lost\n\t\t\twhile (true) {\t\n\t\t\t\t// Request that was sent from the client\n\t\t\t\tchoice = inFromClient.readLine();\n\t\t\t\tif(choice != null) {\n\t\t\t\t\tSystem.out.println(choice);\n\t\t\t\t\tswitch (choice) {\n\t\t\t\t\t\t// Calculates the next even fib by creating a new\n\t\t\t\t\t\t// thread to handle that calculation\n\t\t\t\t\t\tcase \"NEXTEVENFIB\":\n\t\t\t\t\t\t\tnew EvenFib(client).run();\n\t\t\t\t\t\t\t// Increments the fib index tracker so no duplicates\n\t\t\t\t\t\t\t// are sent\n\t\t\t\t\t\t\tServer.fib++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// Calculates the next even nextLargerRan by creating a new\n\t\t\t\t\t\t// thread to handle that calculation\n\t\t\t\t\t\tcase \"NEXTLARGERRAND\":\n\t\t\t\t\t\t\tnew NextLargeRan(client).run();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// Calculates the next prime by creating a new\n\t\t\t\t\t\t// thread to handle that calculation\n\t\t\t\t\t\tcase \"NEXTPRIME\":\n\t\t\t\t\t\t\tnew NextPrime(client).run();\n\t\t\t\t\t\t\t// Increments the prime index tracker so no duplicates\n\t\t\t\t\t\t\t// are sent\n\t\t\t\t\t\t\tServer.prime++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// Displays that the client it was connected to\n\t\t\t// has disconnected\n\t\t\tSystem.out.println(\"Client Disconnected\");\n\t\t}\n\n\t}",
"public void testRingElection() {\n \t\tfinal RingElection model = new RingElection();\n \t\tfinal Formula checkAtMostOneElected = model.declsAndFacts().and(model.atMostOneElected().not());\n \t\tfinal Solution sol = solve(checkAtMostOneElected, model.bounds(5,10));\n //\t\tUNSATISFIABLE\n //\t\tp cnf 8665 29590 \n //\t\tprimary variables: 325\n \t\tassertEquals(Solution.Outcome.UNSATISFIABLE, sol.outcome());\n \t\tassertEquals(325, sol.stats().primaryVariables());\n \t\tassertEquals(8665, sol.stats().variables());\n \t\tassertEquals(29590, sol.stats().clauses());\n \t}",
"@Override\n\tpublic void run() {\n\t\tint port = socket.getPort();\n\t\ttry (DataOutputStream outputStream = new DataOutputStream(socket.getOutputStream())) {\n\t\t\tStringBuffer buffer = new StringBuffer();\n\t\t\tScorer scorer = new Scorer();\n\t\t\twhile (true) {\n\t\t\t\t// send all scene objects and player objects to all clients\n\t\t\t\tfor (GameObject gameObject : scene.values()) {\n\n\t\t\t\t\tif (gameObject instanceof SpaceInvaders) {\n\t\t\t\t\t\t((SpaceInvaders) gameObject).addEnemiesToScene(buffer);\n\t\t\t\t\t} else\n\t\t\t\t\t\tbuffer.append(gameObject.toGameObjectString() + \"~~\");\n\n\t\t\t\t\t// If the game Object is of type space Invaders we add the enemies rather than\n\t\t\t\t\t// the\n\t\t\t\t\t// space invaders\n\n\t\t\t\t}\n\t\t\t\t// System.out.println(\"scene : \"+playerMap.values().size());\n\t\t\t\tfor (Player gameObject : playerMap.values()) {\n\t\t\t\t\tbuffer.append(gameObject.toGameObjectString() + \"~~\");\n\t\t\t\t\tif (gameObject.clientId == socket.getPort()) // if this is the player of this socket\n\t\t\t\t\t{\n\t\t\t\t\t\tgameObject.updateScorer(scorer);\n\t\t\t\t\t\tif (!gameObject.isAlive())\n\t\t\t\t\t\t\tscorer.alive = false;\n\t\t\t\t\t\t// System.out.println(\"scorer\"+scorer.toGameObjectString());\n\t\t\t\t\t\tbuffer.append(scorer.toGameObjectString() + \"~~\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toutputStream.writeUTF(buffer.toString());\n\t\t\t\tbuffer.delete(0, buffer.length());\n\t\t\t\toutputStream.flush();\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(\"Client [\" + port + \"]Response handler is closed\");\n\t\t}\n\t}",
"public static void main(String[] args) {\n int id = Integer.parseInt(args[0]);\n String hostname = args[1];\n int port = Integer.parseInt(args[2]);\n int timeBetweenRequests = Integer.parseInt(args[3]);\n int timeInCriticalSection = Integer.parseInt(args[4]);\n int numTotalRequests = Integer.parseInt(args[5]);\n String mutexAlgorithmName = args[6];\n String neighborString = args[7];\n\n System.out.println(\"Id: \" + id);\n System.out.println(\"Hostname: \" + hostname);\n System.out.println(\"Port: \" + port);\n\n Node node = new Node(id, hostname, port, mutexAlgorithmName, timeBetweenRequests,\n timeInCriticalSection, numTotalRequests);\n\n String[] neighbors = neighborString.split(\",\");\n\n for (String n : neighbors) {\n String[] neighborParams = n.split(\":\");\n\n int neighborId = Integer.parseInt(neighborParams[0]);\n String neighborHostname = neighborParams[1];\n int neighborPort = Integer.parseInt(neighborParams[2]);\n\n if (neighborId != id) {\n node.addNeighbor(neighborId, neighborHostname, neighborPort);\n }\n }\n\n node.startServer();\n\n try {\n TimeUnit.SECONDS.sleep(10);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n node.run();\n\n node.stopServer();\n\n\t\tSystem.out.printf(\"%d finished\\n\", id);\n }",
"void elect() {\n leader = self;\n state = InstanceState.LEADER;\n }",
"LargestSubsequenceConcurrentServer(Socket clientSocket, int clientIdNumber) {\n this.clientSocket = clientSocket;\n this.clientIdNumber = clientIdNumber;\n }",
"@Override\n public void sendAddressExchangeRequest(String walletPublicKey, CryptoCurrency cryptoCurrency, Actors identityTypeRequesting, Actors identityTypeResponding, final String identityPublicKeyRequesting, final String identityPublicKeyResponding, CryptoAddressDealers cryptoAddressDealer, BlockchainNetworkType blockchainNetworkType) throws CantSendAddressExchangeRequestException {\n\n try {\n\n System.out.println(\"********* Crypto Addresses: Creating Address Exchange Request. \");\n\n UUID newId = UUID.randomUUID();\n\n ProtocolState state = ProtocolState.PROCESSING_SEND;\n RequestType type = RequestType .SENT ;\n RequestAction action = RequestAction.REQUEST ;\n\n cryptoAddressesNetworkServiceDao.createAddressExchangeRequest(\n newId,\n walletPublicKey,\n cryptoCurrency,\n identityTypeRequesting,\n identityTypeResponding,\n identityPublicKeyRequesting,\n identityPublicKeyResponding,\n state,\n type,\n action,\n cryptoAddressDealer,\n blockchainNetworkType,\n 1,\n System.currentTimeMillis(),\n AddressesConstants.OUTGOING_MESSAGE,\n false\n );\n\n final CryptoAddressRequest cryptoAddressRequest = cryptoAddressesNetworkServiceDao.getPendingRequest(newId);\n\n executorService.submit(new Runnable() {\n @Override\n public void run() {\n try {\n sendNewMessage(\n getProfileSenderToRequestConnection(\n cryptoAddressRequest.getIdentityPublicKeyRequesting(),\n NetworkServiceType.UNDEFINED,\n platformComponentTypeSelectorByActorType(cryptoAddressRequest.getIdentityTypeRequesting())\n ),\n getProfileDestinationToRequestConnection(\n cryptoAddressRequest.getIdentityPublicKeyResponding(),\n NetworkServiceType.UNDEFINED,\n platformComponentTypeSelectorByActorType(cryptoAddressRequest.getIdentityTypeResponding())\n ),\n buildJsonRequestMessage(cryptoAddressRequest));\n } catch (CantSendMessageException | InvalidParameterException e) {\n reportUnexpectedException(e);\n }\n }\n });\n\n\n\n System.out.println(\"********* Crypto Addresses: Successful Address Exchange Request creation. \");\n\n } catch (CantCreateRequestException e){\n\n errorManager.reportUnexpectedPluginException(this.getPluginVersionReference(), UnexpectedPluginExceptionSeverity.DISABLES_SOME_FUNCTIONALITY_WITHIN_THIS_PLUGIN, e);\n throw new CantSendAddressExchangeRequestException(e, null, \"Error trying to create the request.\");\n } catch (Exception e){\n\n errorManager.reportUnexpectedPluginException(this.getPluginVersionReference(), UnexpectedPluginExceptionSeverity.DISABLES_SOME_FUNCTIONALITY_WITHIN_THIS_PLUGIN, e);\n throw new CantSendAddressExchangeRequestException(FermatException.wrapException(e), null, \"Unhandled Exception.\");\n }\n\n }",
"public void sendRRequests() {\n\n }",
"public void sendMatch() {\n for (int i = 0; i < numberOfPlayers; i++) {\n try {\n // s = ss.accept();\n oos = new ObjectOutputStream(sockets.get(i).getOutputStream());\n oos.writeObject(game);\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }",
"public void run()\n {\n try\n {\n logger.debug(\"Starting server-side thread\");\n while (active)\n {\n List<Node> nodesFromQuery = null;\n if (clients.size() > 0)\n {\n nodesFromQuery = BeanLocator.getRouterService().findNodesWithNumberOfMessages(routerId);\n logger.debug(\"Number of nodesFromQuery for this routerId :\" + routerId + \" is:\" + nodesFromQuery.size());\n\n for (Node node : nodesFromQuery)\n {\n // if node exists in map\n if (this.nodes.get(node.getId()) != null)\n {\n logger.debug(\"Node already in map\");\n // check if something has been updated on the node - using hashcode\n\n logger.debug(this.nodes.get(node.getId()).getNumberOfMessagesHandled().toString());\n logger.debug(node.getNumberOfMessagesHandled().toString());\n boolean hasNumberOfMessagesChanged = !this.nodes.get(node.getId()).getNumberOfMessagesHandled().equals(node.getNumberOfMessagesHandled());\n if (hasNumberOfMessagesChanged)\n {\n logger.debug(\"Fire update event..\");\n // if something has changed fire update event\n this.nodes.put(node.getId(), node);\n fireNodeUpdatedEvent(node);\n } else\n {\n // nothing changed - ignore and log\n logger.info(\"Nothing changed on node :\" + node.getId());\n }\n } else\n {\n // else if node does not exist store the node in the map\n logger.debug(\"Storing node in map\");\n this.nodes.put(node.getId(), node);\n fireNodeUpdatedEvent(node);\n }\n }\n } else\n {\n logger.info(\"Thread running but no registered clients\");\n }\n Thread.sleep(CALLBACK_INTERVALL);\n }\n logger.debug(\"Stopping server-side thread. Clearing nodes and clients.\");\n clients.clear();\n nodes.clear();\n }\n catch (InterruptedException ex)\n {\n logger.warn(\"Thread interrupted.\", ex);\n }\n }",
"@GetMapping(path = \"/submitVote/{poll_id}/{worker_id}/{voter_id}\")\n public String sendVotingPage(@PathVariable(value = \"poll_id\") String poll_id,\n @PathVariable(value = \"worker_id\") String worker_id,\n @PathVariable(value = \"voter_id\") String voter_id,\n HttpServletRequest request,\n Model model) {\n\n // for multiple elections, we would use the election hash to differentiate\n\n request.setAttribute(\"voter_id\",voter_id);\n if(electionService.checkIfWorkerAndVoterAlign(worker_id,voter_id) &&\n electionService.voterHasNotVoted(worker_id,voter_id)){\n //Poll poll = electionService.getPoll(poll_id);\n // List<Candidate> candidateList = electionService.getCandidates(poll);\n //String ballotFilename = this.electionService.createAndSaveUserHtmlPage(poll,candidateList,voter_id,worker_id);\n model.addAttribute(\"worker_id\",worker_id);\n model.addAttribute(\"voter_id\",voter_id);\n model.addAttribute(\"poll_id\",poll_id);\n model.addAttribute(\"url\", electionService.getUrl(\"ew\"));\n return \"poll1_ballot\";\n }\n return \"alryVoted\";\n }",
"private void startFedServer(){\r\n \r\n try {\r\n System.out.println(\"Start server to listen for client connection....\");\r\n FedLog.writeLog(this.getPeerIP().split(\":\")[1], \"masterLog%g-\" + this.getPeerIP().substring(2) + \".log\", \"Start server to listen for client connection....\", \"info\");\r\n sSocket = new ServerSocket(serverPort);\r\n sSocket.setReuseAddress(true);\r\n //System.out.println(\"FedServer is launching\");\r\n } catch (IOException ex) {\r\n FedLog.writeLog(this.getPeerIP().split(\":\")[1], \"masterLog%g-\" + this.getPeerIP().substring(2) + \".log\", \"Error listening on port \" + serverPort, \"severe\");\r\n FedLog.writeLog(this.getPeerIP().split(\":\")[1], \"masterLog%g-\" + this.getPeerIP().substring(2) + \".log\", FedLog.getExceptionStack(ex), \"severe\");\r\n }\r\n List<Thread> proc_list = new ArrayList();\r\n while (FLAG) {\r\n if (proc_list.size() == PROC_MAX) {\r\n boolean full = true;\r\n //check if thread number reach the maximum number, if yes, sleep; \r\n while (full) {\r\n for (int i = proc_list.size() - 1; i >= 0; i--) {\r\n if (!proc_list.get(i).isAlive()) {\r\n proc_list.remove(i);\r\n full = false;\r\n }\r\n }\r\n if (full) {\r\n try {\r\n Thread.sleep(1000);\r\n } catch (InterruptedException ex) {\r\n FedLog.writeLog(this.getPeerIP().split(\":\")[1], \"masterLog%g-\" + this.getPeerIP().substring(2) + \".log\", FedLog.getExceptionStack(ex), \"severe\");\r\n }\r\n }\r\n }\r\n }\r\n //if not full, accpet new client connection\r\n try {\r\n cSocket = sSocket.accept();\r\n //System.out.println(\"[C4C-Notification] Accept connection from client\");\r\n FedLog.writeLog(this.getPeerIP().split(\":\")[1], \"masterLog%g-\" + this.getPeerIP().substring(2) + \".log\", \"Accept connection from client\", \"info\");\r\n //create new thread to process client request\r\n // System.out.println(\"Accept connection from client -step 1\");\r\n Thread request = new Thread(new processRequest(cSocket));\r\n request.start();\r\n proc_list.add(request);\r\n } catch (IOException ex) {\r\n FedLog.writeLog(this.getPeerIP().split(\":\")[1], \"masterLog%g-\" + this.getPeerIP().substring(2) + \".log\", FedLog.getExceptionStack(ex), \"severe\");\r\n }\r\n\r\n }\r\n closeFedSockets();\r\n }",
"private void publishRequest(int number) throws MqttException {\n for (int i = 1; i < number+1; i++) {\n for (int j = 1; j < NUMBER_OF_USERS+1; j++) {\n sendRequest(fakeBooking(j, i));\n }\n }\n }",
"@Override\n\tpublic void assignPids() {\n\t\tThread t = new Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\twhile (nPidsAssigned < nProc -1) {\n\t\t\t\t\t\tinitConn.connectRetry(coordinatorHostname, 20000);\n\n\t\t\t\t\t\tnPidsAssigned++;\n\t\t\t\t\t\t// Pid 1 is reserved for the coordinator.\n\t\t\t\t\t\tint newPid = nPidsAssigned + 1;\n\t\t\t\t\t\tString hostname = initConn.getHostName();\n\t\t\t\t\t\tinitConn.send(((Integer)newPid).toString());\n\t\t\t\t\t\tinitConn.send(pidToHolderMap.get(newPid).toString());\n\t\t\t\t\t\tsynchronized (pidToHostnameMap) {\n\t\t\t\t\t\t\tpidToHostnameMap.put(newPid, hostname);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"PID: \" + newPid + \" sent\\n\");\n\n\t\t\t\t\t\tinitConn.close();\n\t\t\t\t\t}\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(pidToHostnameMap.toString());\n\t\t\t}\n\t\t});\n\t\tt.start();\n\t}",
"@Override\n public void run() {\n for (int i = 0; i < numberOfPlayers; i++) {\n addPlayer();\n controller\n .getSpf()\n .getLabel1()\n .setText(\n \"\" +\n players.get(players.size() - 1).getName() +\n \" Jugador # \" +\n (players.size() - 1)\n );\n }\n\n controller\n .getSpf()\n .getLabel1()\n .setText(\"Jugadores listos, iniciando partida\");\n\n startMatch();\n\n sendId();\n\n UpdateMatchThread umt = new UpdateMatchThread(this, 0);\n umt.start();\n\n UpdateMatchThread umt1 = new UpdateMatchThread(this, 1);\n umt1.start();\n\n UpdateServerThread upt = new UpdateServerThread(this);\n upt.start();\n }",
"public void send(int id, Object o){\r\n\t\tclients[findClient(id)].send(o);\r\n\t}",
"private void manageClients() {\n manage = new Thread(\"Manage\") {\n public void run() {\n //noinspection StatementWithEmptyBody\n while (running) {\n sendToAll(\"/p/server ping/e/\".getBytes());\n try {\n Thread.sleep(1500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n //noinspection ForLoopReplaceableByForEach\n for (int i = 0; i < clients.size(); i++) {\n ServerClient tempClient = clients.get(i);\n if (!clientResponse.contains(tempClient.getID())) {\n if (tempClient.getAttempt() >= MAX_ATTEMPTS)\n disconnect(tempClient.getID(), false);\n else\n tempClient.setAttempt(tempClient.getAttempt() + 1);\n } else {\n clientResponse.remove(new Integer(tempClient.getID()));\n tempClient.setAttempt(0);\n }\n }\n }\n }\n };\n manage.start();\n }",
"public void callTheWaiter(){\n Student s = (Student) Thread.currentThread();\n\n \tCommunicationChannel com = new CommunicationChannel (serverHostName, serverPortNumb);\n \tObject[] params = new Object[0];\n \tObject[] state_fields = new Object[2];\n \tstate_fields[0] = s.getID();\n \tstate_fields[1] = s.getStudentState();\n \t\n Message m_toServer = new Message(7, params, 0, state_fields, 2, null); \n Message m_fromServer; \n \n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n }\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n \n s.setState((int) m_fromServer.getStateFields()[1]);\n \n com.close ();\n }",
"private void notifyRequestors(ArrayList<Request> reqL, Offer offer) throws SQLException {\n\t\tfor(Request request : reqL){\n\t\t\tPoolUser rider = db.getUser(request.getUserName());\n\t\t\tPoolUser driver = db.getUser(offer.getUserName());\n\t\t\tString content = HtmlUtility.getMsgBody(\"Hello\", rider, offer, request, 3, driver);\t\n\t\t\tSendMail send = new SendMail(rider.getEmail(),\"NeedARide-A Matching Ride offer found\", content);\n\t\t\tsend.sender();\n\t\t}\n\t\t\n\t}",
"private void checkRequests()\n\t{\n\t\t// to be honest I don't see why this can't be 5 seconds, but I'm trying 1 second\n\t\t// now as the existing 0.1 second is crazy given we're checking for events that occur\n\t\t// at 60+ second intervals\n\n\t\tif ( mainloop_loop_count % MAINLOOP_ONE_SECOND_INTERVAL != 0 ){\n\n\t\t\treturn;\n\t\t}\n\n\t\tfinal long now =SystemTime.getCurrentTime();\n\n\t\t//for every connection\n\t\tfinal ArrayList peer_transports = peer_transports_cow;\n\t\tfor (int i =peer_transports.size() -1; i >=0 ; i--)\n\t\t{\n\t\t\tfinal PEPeerTransport pc =(PEPeerTransport)peer_transports.get(i);\n\t\t\tif (pc.getPeerState() ==PEPeer.TRANSFERING)\n\t\t\t{\n\t\t\t\tfinal List expired = pc.getExpiredRequests();\n\t\t\t\tif (expired !=null &&expired.size() >0)\n\t\t\t\t{ // now we know there's a request that's > 60 seconds old\n\t\t\t\t\tfinal boolean isSeed =pc.isSeed();\n\t\t\t\t\t// snub peers that haven't sent any good data for a minute\n\t\t\t\t\tfinal long timeSinceGoodData =pc.getTimeSinceGoodDataReceived();\n\t\t\t\t\tif (timeSinceGoodData <0 ||timeSinceGoodData >60 *1000)\n\t\t\t\t\t\tpc.setSnubbed(true);\n\n\t\t\t\t\t//Only cancel first request if more than 2 mins have passed\n\t\t\t\t\tDiskManagerReadRequest request =(DiskManagerReadRequest) expired.get(0);\n\n\t\t\t\t\tfinal long timeSinceData =pc.getTimeSinceLastDataMessageReceived();\n\t\t\t\t\tfinal boolean noData =(timeSinceData <0) ||timeSinceData >(1000 *(isSeed ?120 :60));\n\t\t\t\t\tfinal long timeSinceOldestRequest = now - request.getTimeCreated(now);\n\n\n\t\t\t\t\t//for every expired request \n\t\t\t\t\tfor (int j = (timeSinceOldestRequest >120 *1000 && noData) ? 0 : 1; j < expired.size(); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\t//get the request object\n\t\t\t\t\t\trequest =(DiskManagerReadRequest) expired.get(j);\n\t\t\t\t\t\t//Only cancel first request if more than 2 mins have passed\n\t\t\t\t\t\tpc.sendCancel(request);\t\t\t\t//cancel the request object\n\t\t\t\t\t\t//get the piece number\n\t\t\t\t\t\tfinal int pieceNumber = request.getPieceNumber();\n\t\t\t\t\t\tPEPiece\tpe_piece = pePieces[pieceNumber];\n\t\t\t\t\t\t//unmark the request on the block\n\t\t\t\t\t\tif ( pe_piece != null )\n\t\t\t\t\t\t\tpe_piece.clearRequested(request.getOffset() /DiskManager.BLOCK_SIZE);\n\t\t\t\t\t\t// remove piece if empty so peers can choose something else, except in end game\n\t\t\t\t\t\tif (!piecePicker.isInEndGameMode())\n\t\t\t\t\t\t\tcheckEmptyPiece(pieceNumber);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}",
"private void newLeaseRequest(Messenger messenger) throws IOException {\r\n \r\n if (null == messenger) {\r\n if (LOG.isEnabledFor(Priority.WARN)) {\r\n LOG.warn(\"Could not get messenger for seed RDV\");\r\n }\r\n throw new IOException(\"Could not connect to seed RDV\");\r\n }\r\n\r\n Message msg = new Message();\r\n // The request simply includes the local peer advertisement.\r\n msg.replaceMessageElement(\"jxta\", new TextDocumentMessageElement(ConnectRequest, getPeerAdvertisementDoc(), null));\r\n messenger.sendMessage(msg, pName, pParam);\r\n }",
"@Override\n\tpublic void getUsersInSelectedCity(Long cityID) {\n\t\tint counterProxy = 0;\n\t\tint firstElement = 0;\n\t\tint lastElement = 0;\n\n\t\tList<ProxyServer> proxyServerList = proxyServerService.getProxyServerByDestiny(\"user\");\n\n\t\t/**\n\t\t * 366 days in year max. Dividing birthdays into two sexes - 732\n\t\t */\n\t\tint requestOnProxy = 732 / proxyServerList.size();\n\t\tint remainingRequests = 732 % proxyServerList.size();\n\n\t\tList<String> queries = getListOfQueries(requestOnProxy, remainingRequests, cityID);\n\n\t\tList<UserFromVK> userFromVKList = userFromVkService.getAllUsersOfVk();\n\n\t\tExecutorService executorService = Executors.newFixedThreadPool(proxyServerList.size());\n\n\t\tfor (ProxyServer proxyServer : proxyServerList) {\n\t\t\tRestTemplate proxyTemplate = getRestTemplate(proxyServerList.get(counterProxy).getIp(), proxyServerList.get(counterProxy).getPort());\n\t\t\tlastElement += requestOnProxy;\n\t\t\tif (remainingRequests > 0) {\n\t\t\t\tremainingRequests--;\n\t\t\t\tlastElement += 1;\n\t\t\t}\n\n\t\t\tfinal int start = firstElement;\n\t\t\tfinal int finish = lastElement;\n\n\n\t\t\tFuture future = executorService.submit(new Thread(() -> {\n\t\t\t\t/**\n\t\t\t\t * Sending requests with the necessary delays to vk.api\n\t\t\t\t */\n\t\t\t\tfor (int i = start; i < finish; i++) {\n\t\t\t\t\tif (i > 0 && i % 3 == 0) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (i > 0 && i % 100 == 0) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tThread.sleep(300_000);\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tUsersRootObject usersRootObject = proxyTemplate.getForObject(queries.get(i), UsersRootObject.class);\n\t\t\t\t\tList<UserFromVK> foundedUsersFromVk = usersRootObject.getResponse().getItems();\n\n\t\t\t\t\tif (!userFromVKList.containsAll(foundedUsersFromVk)) {\n\t\t\t\t\t\tuserFromVkService.addListOfUsersOfVK(foundedUsersFromVk);\n\t\t\t\t\t} else if (userFromVKList.containsAll(foundedUsersFromVk) && foundedUsersFromVk.size() != 0) {\n\t\t\t\t\t\tList<UserFromVK> usersWhichNotInDB = new ArrayList<>();\n\n\t\t\t\t\t\tfor (UserFromVK user : foundedUsersFromVk) {\n\t\t\t\t\t\t\tif (!userFromVKList.contains(user)) {\n\t\t\t\t\t\t\t\tusersWhichNotInDB.add(user);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tuserFromVkService.addListOfUsersOfVK(usersWhichNotInDB);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}));\n\t\t\tfirstElement += lastElement;\n\t\t\tcounterProxy++;\n\t\t}\n\n\t\texecutorService.shutdown();\n\t}",
"public static void main(String[] args) {\n try {\r\n ServerSocket server=new ServerSocket(port);\r\n System.out.println(\"Waiting for a client...\");\r\n\r\n connections=new ArrayList<>();\r\n ExecutorService es = Executors.newFixedThreadPool(max_clients);\r\n\r\n Connection tmp;\r\n while(true) {\r\n\r\n\r\n Socket socket = server.accept();\r\n if(max_clients<=clients){\r\n OutputStream out = socket.getOutputStream();\r\n BufferedWriter rout= new BufferedWriter(new OutputStreamWriter(out));\r\n rout.write(\"Chat is full(\"+max_clients+\" users). You can't join. Try again later.\");\r\n rout.write(\"\\n\");\r\n rout.flush();\r\n socket.close();\r\n out.close();\r\n continue;\r\n }\r\n\r\n tmp=new Connection(socket);\r\n es.submit(tmp);\r\n clients++;\r\n System.out.println(\"New user has joined. Number of users - \"+clients);\r\n connections.add(tmp);\r\n }\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public static void sendDetections(String ip, String puerto) {\n\n\t\ttry {\n\n\t\t\tSocket clientSocket = new Socket(ip, Integer.parseInt(puerto));\n\t\t\tSystem.out.println(\"Ready to send confirmations...\");\n\t\t\tint imagecont = 1;\n\n\t\t\t//Send confirmations all time\n\t\t\twhile(true) {\n\n\t\t\t\tif(checkDection(imagecont)) {\n\n\t\t\t\t\tsendResponse(clientSocket,imagecont);\n\t\t\t\t}\n\n\t\t\t\telse{\n\t\t\t\t\tsendNoResponse(clientSocket,imagecont);\n\t\t\t\t}\n\n\t\t\t\timagecont++;\n\t\t\t}\n\t\t}\n\n\t\tcatch(UnknownHostException e) {\n\n\t\t\tSystem.out.println(e);\n\t\t}\n\n\t\tcatch(IOException e) {\n\n\t\t\tSystem.out.println(\"Server is disconnected\");\n\t\t}\n\t}",
"public List<Candidates> getMultiWinnerCandidates() {\n List<Candidates> singleCandidates = getWinningSingleCandidates();\n List<Candidates> multiWinners = new ArrayList<>();\n Map<Integer, Integer> partyResult = multiService.mandatesByParty();\n for (Entry<Integer, Integer> partyMandateCount : partyResult.entrySet()) {\n int numberMandates = partyMandateCount.getValue();\n int counter=0;\n for (Candidates partyCandidates : candidateService.findByPartyId(partyMandateCount.getKey())) { \n while (numberMandates >= 1) { \n Candidates newPartyCandidate = candidateService.findByPartyAndSeat(partyMandateCount.getKey(),\n counter + 1);\n// Candidates newAlsoPartyCandidate = candidateService.findByPartyAndSeat(partyMandateCount.getKey(),\n// counter+2);\n counter++; \n if (singleCandidates.contains(newPartyCandidate)) {\n while(singleCandidates.contains(newPartyCandidate)==false){\n multiWinners.add(newPartyCandidate);\n counter++;\n break;\n }\n } else {\n multiWinners.add(newPartyCandidate);\n break;\n } \n \n }\n numberMandates--;\n \n }\n }\n\n System.out.println(multiWinners.size());\n\n for (Candidates candidate : multiWinners) {\n candidate.setCandidate_elected(\"multi\");\n candidateService.saveOrUpdate(candidate);\n }\n return multiWinners;\n }",
"public RequestVoteRsp RequestVote(RequestVoteReq candidate) {\n boolean voted = false;\n //if term > currentTerm\n if (candidate.getTerm() > this.persistentState.getCurrentTerm()) {\n // currentTerm = term;\n this.persistentState.setCurrentTerm(candidate.getTerm());\n //step down if leader or candidate\n if (this.role != Role.FOLLOWER) {\n this.role = Role.FOLLOWER;\n }\n }\n //if term = currentTerm, voteFor is null or candidateId, and candidate's log is at least as complete as local log\n if (candidate.getTerm() == this.persistentState.getCurrentTerm() && (this.persistentState.getVotedFor() == 0 || this.persistentState.getVotedFor() == candidate.getCandidateId())\n && candidate.getLastLogIndex() >= this.lastEntry.getIndex()) {\n //grant vote\n voted = true;\n //reset election timeout\n resetElectionTimeout();\n }\n return new RequestVoteRsp(this.persistentState.getCurrentTerm(), voted);\n }",
"public void initiate() {\n // all we know is neighbours\n Set<Integer> idsToSend = neighbours.stream().map(Bunker::getId).collect(Collectors.toSet());\n sendGetCount(idsToSend);\n }",
"@SuppressWarnings(\"java:S2189\")\n public static void main(String[] args) {\n ExecutorService executorService = Executors.newFixedThreadPool(4);\n try (ServerSocket serverSocket = new ServerSocket(8080)) {\n log.info(\"Waiting For New Clients...\");\n while (true) {\n Socket sock = serverSocket.accept();\n log.info(\"Connected to a client...\");\n executorService.execute(new ServeRequests(sock));\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void executeRequest() throws CloneNotSupportedException {\n\t\t\n\t\tfor (BookingRequest bookingRequest : bookingRequestList) {\n\t\t\tCab assignedCab = null;\n\t\t\tdouble bestProfitMargin = 0;\n\t\t\tfor (Cab cabDetail : cabDetailList) {\n\t\t\t\t//check the business logic for booking cabs\n\t\t\t\tboolean checkCabReachability = checkCabReachability(bookingRequest, cabDetail);\n\t\t\t\tdouble cabProfitMargin = checkCabProfitMargin(bookingRequest, cabDetail);\n\t\t\t\t\n\t\t\t\tif (checkCabReachability && (cabProfitMargin > bestProfitMargin)) {\n\t\t\t\t\t assignedCab = cabDetail;\n\t\t\t\t\t bestProfitMargin = cabProfitMargin;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (assignedCab != null) {\n\t\t\t\tbookingRequest.setAssignedCab(assignedCab.clone());\n\t\t\t\t//adding o calculate profit\n\t\t\t\tbookingRequest.setProfit(bestProfitMargin);\n\t\t\t\tCalendar newCabTime = bookingRequest.getPickUpTime();\n\t\t\t\tInteger tripDistance = Utils.calculateDistance(bookingRequest.getPickUpArea(), bookingRequest.getDropArea());\n\t\t\t\tnewCabTime.add(Calendar.MINUTE, tripDistance * Constants.DISTANCE_BETWEEN_AREA);\n\t\t\t\tassignedCab.setCurrentLocationTime(newCabTime);\n\t\t\t\tassignedCab.setInitialLocation((Area)bookingRequest.getDropArea().clone());\n\t\t\t}\n\t\t}\n\t\t//finally displaying the response from the application\n\t\tdisplayMappingOfCabs(bookingRequestList);\n\t}",
"private void sendActivesRequestPacketToPrimary(String name, String primaryID, int requestID) {\n JSONObject sendJson;\n try {\n RequestActiveReplicas packet = new RequestActiveReplicas(null, name, 0);\n ((ClientRequestHandlerInterface) handler).addActivesRequestNameToIDMapping(name, requestID);\n sendJson = packet.toJSONObject();\n handler.sendToNS(sendJson, primaryID);\n if (handler.getParameters().isDebugMode()) {\n GNS.getLogger().info(\"Send RequestActivesPacket for \" + name + \" to \" + primaryID.toString());\n }\n } catch (JSONException e) {\n GNS.getLogger().severe(\"JSON Exception in sending RequestActives packet for \" + name + \": \" + e);\n }\n\n }",
"void askLobbyID(ArrayList<Lobby> lobbies);",
"private void getEKIDs() {\n if (!CloudSettingsManager.getUserID(getContextAsync()).isEmpty()) {\n DataMessenger.getInstance().getEkIds(CloudSettingsManager.getUserID(getContextAsync()), new RestApi.ResponseListener() {\n @Override\n public void start() {\n Log.i(TAG, \"Request started\");\n }\n\n @Override\n public void success(HttpResponse rsp) {\n if (rsp != null) {\n if (rsp.statusCode == 200) {\n if (rsp.body != null) {\n MgmtGetEKIDRsp result = new Gson().fromJson(rsp.body, MgmtGetEKIDRsp.class);\n if (result.getDevices().size() == 0) {\n Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_empty);\n } else {\n updateAdapter(result.getDevices());\n }\n } else {\n Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_error);\n }\n } else {\n GenericRsp genericRsp = new Gson().fromJson(rsp.body, GenericRsp.class);\n if (genericRsp != null && !genericRsp.isResult()) {\n Utils.showToast(getContextAsync(), genericRsp.getReasonCode());\n } else {\n Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_error);\n }\n }\n } else {\n Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_error);\n }\n }\n\n @Override\n public void failure(Exception error) {\n if (error instanceof UnknownHostException) {\n Utils.showToast(getContextAsync(), R.string.connectivity_error);\n } else {\n Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_error);\n }\n }\n\n @Override\n public void complete() {\n Log.i(TAG, \"Request completed\");\n }\n });\n } else {\n Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_empty_userid);\n }\n }",
"@Override\n public void opponentSurrender(int id) {\n try {\n if (getClientInterface() != null)\n getClientInterface().notifyOpponentSurrender(id);\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending opponent surrender error\");\n }\n }",
"public void updateServer(Identity identity, ServerInvokerMetadata invokers[]);",
"private void sendHeartbeats() {\n\t\tHashSet<InetAddress> addresses = new HashSet<>(nodes.keySet());\n\t\t\n for (InetAddress addr : addresses) {\n\t\t\t// Take the mutex to ensure that no modifications are made to nodes\n\t\t\t// or channels while checking this node\n\t\t\tmutexLock.lock();\n\n // Check if the last heartbeat was responded to\n if (!nodes.containsKey(addr)) {\n mutexLock.unlock();\n continue;\n }\n\n NodeStatus node = nodes.get(addr);\n if (!(node.getLastResponse() == heartbeat.get())) {\n\n if (node.isAvailable()) {\n node.setAvailable(false);\n System.out.println(\"[\" + System.currentTimeMillis() + \" :: Node at \" + addr + \" is not available\");\n }\n }\n\n // Send the new heartbeat\n if (!channels.containsKey(addr)) {\n mutexLock.unlock();\n continue;\n }\n\n HeartbeatRequestMessage hrm = new HeartbeatRequestMessage(heartbeat.get()+1);\n SocketChannel channel = channels.get(addr);\n byte[] message = hrm.serialize();\n\n try {\n channel.write(ByteBuffer.wrap(message));\n } catch (ClosedChannelException cce) {\n channels.remove(addr);\n } catch (IOException e) {\n // Do something?\n }\n\n\t\t\t// Release the mutex\n\t\t\tmutexLock.unlock();\n }\n\n heartbeat.getAndIncrement();\n lastHeartbeatTime = System.currentTimeMillis();\n }",
"@Override\n public void gotoFloor(int elevatorId, int floor) {\n if (elevatorId > elevators.size() - 1) {\n System.out.println(\"Incorrect request. Elevator = \" + elevatorId + \" is not a valid elevator\");\n }\n elevators.get(elevatorId).getRequests().offer(floor);\n }",
"public void onlinerequest() {\r\n int size = Server.getUsers().size();\r\n \r\n try {\r\n this.output.flush();\r\n this.output.writeUTF(\"ONLINE\");\r\n this.output.flush();\r\n this.output.writeUTF(Integer.toString(size));\r\n this.output.flush();\r\n// Log.print(\"Sending the data\");\r\n for(int x = 0; x < Server.getUsers().size(); x++){\r\n if(Server.getUsers().get(x).getName().equals(this.name)){\r\n this.output.writeUTF(Server.getUsers().get(x).getName() + \" (You)\");\r\n }\r\n else{\r\n this.output.writeUTF(Server.getUsers().get(x).getName());\r\n this.output.flush();\r\n }\r\n \r\n \r\n }\r\n// Log.print(\"Successfully sent\");\r\n } catch (IOException ex) {\r\n Log.error(ex.getMessage());\r\n }\r\n }",
"public void requestServerData() throws IOException {\n Iterator it = gameServers.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry<InetSocketAddress, GameServer> pair = (Map.Entry) it.next();\n pair.getValue().requestAll();\n }\n }",
"public void run() {\n\t\ttry {\n\t\t\tin = new BufferedReader(new InputStreamReader(cliente.getInputStream()));\n\t\t\tmOut = new PrintWriter(new BufferedWriter(new OutputStreamWriter(cliente.getOutputStream())), true);\n\n\t\t\tint comparar = idCliente(); //recibe id del cliente\n\t\t\tif(comparar==0) { \n\t\t\t\t//ENVIA id PARA EL CLIENTE\n\t\t\t\tthis.tcpServidor.maxCliente++;\n\t\t\t\tenviarMensaje(\"ID;\"+this.tcpServidor.maxCliente);\n\t\t\t\t//ENVIA maxCliente A TODAS LAS REPLICAS\n\t\t\t\tfor (HiloReplica h : this.tcpServidor.hiloReplica) {\n\t\t\t\t\th.enviarMensaje(\"MAXCLIENTE;\"+this.tcpServidor.maxCliente);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.idCliente = comparar; //GUARDA id DEL CLIENTE\n\t\t\t}\n\t\n\t\t\tSystem.out.println(\"Cliente \"+this.idCliente+\" conectado a Balanceado \"+this.tcpServidor.id);\n\t\t\t\n\t\t\tpeticionDeCliente();\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t//System.out.println(\"HiloCliente\" + \": Error\" + e);\n\t\t}\n\t}",
"@Test\n void testVersionSelection() throws Exception {\n for (SqlGatewayRestAPIVersion version : SqlGatewayRestAPIVersion.values()) {\n if (version != SqlGatewayRestAPIVersion.V0) {\n CompletableFuture<TestResponse> versionResponse =\n restClient.sendRequest(\n serverAddress.getHostName(),\n serverAddress.getPort(),\n headerNot0,\n EmptyMessageParameters.getInstance(),\n EmptyRequestBody.getInstance(),\n Collections.emptyList(),\n version);\n\n TestResponse testResponse =\n versionResponse.get(timeout.getSize(), timeout.getUnit());\n assertThat(testResponse.getStatus()).isEqualTo(version.name());\n }\n }\n }",
"void schedule(List<Queue<Integer>> requests, List<Elevator> elevators, int floors);",
"public ElectionNode (Election election) {\r\n this.setElection(election);\r\n }",
"public void setCandidates(List<Candidate> candidates) {\n this.candidates = candidates;\n }",
"@Override\n public void run() {\n List<Integer> list = new ArrayList<Integer>();\n int num_peer = P.peer_port.length;\n int ind = -1;\n while (P.choke_thread_running) {\n synchronized (P.lock_current_neighbors) { //lock the object\n for (int i = 0; i < num_peer; i++) {\n list.add(i);\n }\n //select randomly.\n java.util.Collections.shuffle(list);\n int[] cn = P.current_neighbors.clone();\n Arrays.sort(cn);\n for (int i = 0; i < num_peer; i++) {\n int ind2 = list.get(i);\n if (P.is_interested[ind2] && Arrays.binarySearch(cn, P.peer_id[ind2]) < 0 && P.peer_id[ind2] != P.id && P.sockets[ind2]!=null) {\n ind = ind2;\n P.current_neighbors[P.current_neighbors.length - 1] = P.peer_id[ind];\n break;\n }\n\n }\n }\n //send unchoke message.\n Message msg = new Message();\n msg.length = 0; //no payload.\n msg.type = 1; //unchoke.\n msg.payload = null; //no payload.\n \n if (ind >= 0) //there is someone interested in my data.\n {\n P.send(P.peer_id[ind], msg);\n P.print(\"OptChoke unchoked peer with id \" + P.peer_id[ind]);\n }\n ind = -1;\n //print debugging info.\n \n //sleep some interval.\n try {\n Thread.sleep(1000 * P.optimistic_unchoking_interval);\n } catch (InterruptedException ex) {\n Thread.currentThread().interrupt();\n }\n }\n }",
"void saveOrUpdateElective(Long id, String meetingName, Long lecturerId,\r\n\t\t\tList<Long> roomIds, Long cohortId, int numberOfAppointments,\r\n\t\t\tDate startDate, Date endDate);",
"private void query(){\n synchronized (slaveList) {\n for (Integer ID : slaveList.keySet()) {\n SDSlave slaveNode = slaveList.get(ID);\n slaveNode.out.write(\"Alive?\\n\");\n slaveNode.out.flush();\n }\n }\n }",
"public void start() {\n logger.info(\"LeaderSelector start racing for leadership\");\n leaderElection();\n }",
"public static void main (String args[]){\n\t\ttry{\n\t\tfinal String magicNumber = \"15540\";\n\t\tString id;\n\t\tDatagramSocket listenSocket = new DatagramSocket();\t\n\t\tSystem.out.println(\"Port: \" + listenSocket.getLocalPort());\n\t\tint portServer = Integer.parseInt(args[1]);\n\t\tInetAddress ipServer = InetAddress.getByName(args[0]);\n\t\tString message = \"REQUEST_TO_JOIN/\";\n\t\tbyte[] sendData = new byte[1024];\n\t\tsendData = message.getBytes();\n\t\tDatagramPacket sendPacket = new DatagramPacket(sendData, sendData.length, ipServer, portServer);\n\t\tlistenSocket.send(sendPacket);\n\t\tSystem.out.println(\"REQUEST_TO_JOIN\");\n\t\tlistenSocket.setSoTimeout(5000);\n\t\tArrayList<Job> jobQueue = new ArrayList<Job>();\n\n\t\t//Now waiting for server to acknowledge the Request\n\n\t\tbyte[] receiveData = new byte[1024];\n \t\tDatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);\n \t\tStringTokenizer st = null;\n \t\twhile (true){\n \t\t\ttry {\n\t \t\t\n\t \t\tlistenSocket.receive(receivePacket);\n\t \t\tSystem.out.println(\"Check1\");\n\t \t\tString fromServer = new String(receivePacket.getData());\n\t \t\tif (receivePacket.getAddress().toString().substring(1).equals(args[0]) && receivePacket.getPort() == portServer) // Checking if packet is received from server\n\t \t\t{\n\t \t\t\tst = new StringTokenizer(fromServer, \"/\");\n\t \t\t\tmessage = st.nextToken();\n\t \t\t\tid = st.nextToken();\n\t \t \t\tSystem.out.println(id);\t\n\t \t\t\tbreak;\n\t \t\t}\t\n\t\t\t}catch (SocketTimeoutException e) \n\t\t\t{\n\t \t\t\tSystem.out.println(\"Connection to Server: Timed out\");\n\t \t\t\treturn;\n\t\t\t}\n\t\t\t catch (Exception e) {e.printStackTrace();}\n\t\t\t}\n\t \t\t\n\t \t\t\n\t \tSystem.out.println(\"Connection to Server Established\");\n\t\tlistenSocket.setSoTimeout(100);\n\t\tboolean initFlag = true; // true if a job is currently \n\n\t\tJob currentJob = new Job();\n\t\t// waiting for commands from the server\n\t\twhile (true){\n\n\t\t\ttry {\n\t\t\tlistenSocket.receive(receivePacket);\n\t\t\tString fromServer = new String(receivePacket.getData());\n\t\t\tst = new StringTokenizer(fromServer, \"/\");\n\t\t\tmessage = st.nextToken();\n\n\t\t\tif (!message.equals(magicNumber))\n\t\t\t\tcontinue;\n\t\t\tmessage = st.nextToken();\n\n\t\t\t}catch (SocketTimeoutException e) {message = \"\";}\n\n\t\t\n\t\t\t// if not magic number, continue to next iteration\n\n\n\t\t\tif (!jobQueue.isEmpty() && !currentJob.running)\n\t\t\t{\n\t\t\t\t// System.out.println(\"Job Thread starting\");\n\t\t\t\tcurrentJob = jobQueue.remove(0);\n\t\t\t\tSystem.out.println(currentJob.rangeEnd);\n\t\t\t\tThread thread = new Thread(new WorkerThread(currentJob, ipServer, portServer, id));\n\t\t\t\tthread.start();\n\t\t\t}\n\n//=======================================================================================================================================================================\n// New job being assigned. Send JOB_ACK only if the current job is complete\n//=======================================================================================================================================================================\n\t\t\tif (message.equals(\"JOB\"))\n\t\t\t{\n\t\t\t\tif (!jobQueue.isEmpty())\n\t\t\t\t\tcontinue;\n\t\t\t\tString rangeStart = st.nextToken();\n\t\t\t\tString rangeEnd = st.nextToken();\n\t\t\t\tString hash = st.nextToken();\n\t\t\t\tSystem.out.println(\"=============== New Job Received ===============\");\n\t\t\t\tSystem.out.println(rangeStart);\n\t\t\t\tSystem.out.println(rangeEnd);\n\t\t\t\tSystem.out.println(\"=============== New Job Received ===============\");\t\t\t\t\n\t\t\t\tJob newJob = new Job(rangeStart, rangeEnd, hash);\n\t\t\t\tjobQueue.add(newJob);\n\t\t\t\tmessage = \"ACK_JOB/\" + rangeStart + '/' + rangeEnd + '/' + hash + '/';\n\t\t\t\tsendData = new byte[1024];\n\t\t\t\tsendData = message.getBytes();\n\t\t\t\tInetAddress ip = InetAddress.getByName(receivePacket.getAddress().toString().substring(1));\n\t\t\t\tint port = receivePacket.getPort();\n\t\t\t\tsendPacket = new DatagramPacket(sendData, sendData.length, ip, port);\n\t\t\t\tlistenSocket.send(sendPacket);\n\t\t\t}\n\t\t\t\n//=====================================================================================================================================\n// Do I make the server send additional details such as rangeStart, rangeEnd and hash while sending the cancel command?\n// Currently, working under the assumption that only CANCEL_JOB is being sent\n//=====================================================================================================================================\n\t\t\telse if (message.equals(\"CANCEL_JOB\"))\n\t\t\t{\t\n\t\t\t\tString hash = st.nextToken();\n\t\t\t\tif (currentJob.hash.equals(hash) && currentJob.running){\n\t\t\t\t\tcurrentJob.running = false;\n\t\t\t\tif (!jobQueue.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tJob queued = jobQueue.get(0);\n\t\t\t\t\tif (queued.hash.equals(hash))\n\t\t\t\t\t\tjobQueue.remove(0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n//=====================================================================================================================================\n// Send the Server the status of the current job\n//=====================================================================================================================================\n\n\t\t\telse if (message.equals(\"PING\"))\n\t\t\t{\n\n\t\t\t\tSystem.out.println(\"Ping Received\");\n\t\t\t\tif (!currentJob.running)\n\t\t\t\t{\n\t\t\t\t\tmessage = \"NO_JOB/\";\n\t\t\t\t}\n\t\t\t\tInetAddress ip = InetAddress.getByName(receivePacket.getAddress().toString().substring(1));\n\t\t\t\tint port = receivePacket.getPort();\n\n\t\t\t\tif (currentJob.running){\n\t\t\t\t\tString speed = Integer.toString(currentJob.speed);\n\t\t\t\t\tString rangeEnd = new String(currentJob.rangeEnd);\n\t\t\t\t\tString completed = new String(currentJob.completed);\n\t\t\t\t\tString command = \"1/\";\n\t\t\t\t\tmessage = Integer.toString(currentJob.speed) + '/' + currentJob.completed + '/' + rangeEnd + '/' + currentJob.hash + '/';\n\t\t\t\t\tif (!jobQueue.isEmpty()){\n\t\t\t\t\t\tJob queued = jobQueue.get(0);\n\t\t\t\t\t\tcommand = \"2/\";\n\t\t\t\t\t\tcompleted = new String(queued.rangeStart);\n\t\t\t\t\t\trangeEnd = new String(queued.rangeEnd);\n\t\t\t\t\t\tmessage = message + completed + '/' + rangeEnd + '/' + queued.hash + '/';\n\t\t\t\t\t}\n\n\t\t\t\t\tmessage = command + message;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(message);\n\t\t\t\tsendData = new byte[1024];\n\t\t\t\tsendData = message.getBytes();\n\t\t\t\tsendPacket = new DatagramPacket(sendData, sendData.length, ip, port);\n\t\t\t\tlistenSocket.send(sendPacket);\n\t\t\t}\n//=====================================================================================================================================\n// When timeout occurs code gets directly to this point\n//=====================================================================================================================================\n\t\t}\n\n\t} catch (Exception e) {e.printStackTrace();}\n}",
"public void alertTheWaiter(){\n Chef c = (Chef) Thread.currentThread();\n CommunicationChannel com = new CommunicationChannel(serverHostName, serverPortNumb);\n Object[] params = new Object[0];\n \tObject[] state_fields = new Object[2];\n state_fields[0] = c.getChefID();\n \tstate_fields[1] = c.getChefState();\n\n Message m_toServer = new Message(1, params, 0, state_fields, 2, null); \n Message m_fromServer;\n\n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n \t}\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n\n c.setState((int) m_fromServer.getStateFields()[1]);\n \n com.close ();\n }",
"@Override\n\tpublic void takeLeadership(CuratorFramework curator) throws Exception\n\t{\n\n\t\tLOG.info(\"a new leader has been elected: kaboom.id={}\", config.getKaboomId());\n\t\n\t\tThread.sleep(30 * 1000);\n\n\t\twhile (true)\n\t\t{\n\t\t\tMap<String, String> partitionToHost = new HashMap<String, String>();\n\t\t\tMap<String, List<String>> hostToPartition = new HashMap<String, List<String>>();\n\t\t\tfinal Map<String, KaBoomNodeInfo> clients = new HashMap<String, KaBoomNodeInfo>();\n\t\t\tMap<String, List<String>> clientToPartitions = new HashMap<String, List<String>>();\n\t\t\tMap<String, String> partitionToClient = new HashMap<String, String>();\n\t\t\tList<String> topics = new ArrayList<String>();\n\n\t\t\t// Get a full set of metadata from Kafka\n\t\t\tStateUtils.readTopicsFromZooKeeper(config.getKafkaZkConnectionString(), topics);\n\n\t\t\t// Map partition to host and host to partition\n\t\t\tStateUtils.getPartitionHosts(config.getKafkaSeedBrokers(), topics, partitionToHost, hostToPartition);\n\n\t\t\t// Get a list of active clients from zookeeper\n\t\t\tStateUtils.getActiveClients(curator, clients);\n\n\t\t\t// Get a list of current assignments\n\t\t\t// Get a list of current assignments\n\t\t\t\n\t\t\tfor (String partition : partitionToHost.keySet())\n\t\t\t{\n\t\t\t\tStat stat = curator.checkExists().forPath(\"/kaboom/assignments/\" + partition);\n\t\t\t\t\n\t\t\t\tif (stat != null)\n\t\t\t\t{\n\t\t\t\t\t// check if the client is still connected, and delete node if it is not.\n\t\t\t\t\t\n\t\t\t\t\tString client = new String(curator.getData().forPath(\"/kaboom/assignments/\" + partition), UTF8);\n\t\t\t\t\t\n\t\t\t\t\tif (clients.containsKey(client))\n\t\t\t\t\t{\n\t\t\t\t\t\tLOG.debug(\"Partition {} : client {} is connected\", partition, client);\n\t\t\t\t\t\t\n\t\t\t\t\t\tpartitionToClient.put(partition, client);\t\t\t\t\t\t\n\t\t\t\t\t\tList<String> parts = clientToPartitions.get(client);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (parts == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparts = new ArrayList<String>();\n\t\t\t\t\t\t\tclientToPartitions.put(client, parts);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparts.add(partition);\n\t\t\t\t\t} \n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tLOG.debug(\"Partition {} : client {} is not connected\", partition, client);\n\t\t\t\t\t\tcurator.delete().forPath(\"/kaboom/assignments/\" + partition);\n\t\t\t\t\t\tstat = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tStateUtils.calculateLoad(partitionToHost, clients, clientToPartitions);\n\n\t\t\t// If any node is over its target by at least one, then unassign partitions until it is at or below its target\n\t\t\t\n\t\t\tfor (Entry<String, KaBoomNodeInfo> e : clients.entrySet())\n\t\t\t{\n\t\t\t\tString client = e.getKey();\n\t\t\t\tKaBoomNodeInfo info = e.getValue();\n\n\t\t\t\tif (info.getLoad() >= info.getTargetLoad() + 1)\n\t\t\t\t{\n\t\t\t\t\tList<String> localPartitions = new ArrayList<String>();\n\t\t\t\t\tList<String> remotePartitions = new ArrayList<String>();\n\n\t\t\t\t\tfor (String partition : clientToPartitions.get(client))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (partitionToHost.get(partition).equals(info.getHostname()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlocalPartitions.add(partition);\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\tremotePartitions.add(partition);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (info.getLoad() > info.getTargetLoad())\n\t\t\t\t\t{\n\t\t\t\t\t\tString partitionToDelete;\n\t\t\t\t\t\tif (remotePartitions.size() > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpartitionToDelete = remotePartitions.remove(rand.nextInt(remotePartitions.size()));\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\tpartitionToDelete = localPartitions.remove(rand.nextInt(localPartitions.size()));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tLOG.info(\"Unassgning {} from overloaded client {}\", partitionToDelete, client);\n\t\t\t\t\t\tpartitionToClient.remove(partitionToDelete);\n\t\t\t\t\t\tclientToPartitions.get(client).remove(partitionToDelete);\n\t\t\t\t\t\tinfo.setLoad(info.getLoad() - 1);\n\n\t\t\t\t\t\tcurator.delete().forPath(\"/kaboom/assignments/\" + partitionToDelete);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Sort the clients by percent load, then add unassigned clients to the lowest loaded client\t\t\t\n\t\t\t{\n\t\t\t\tList<String> sortedClients = new ArrayList<String>();\n\t\t\t\tComparator<String> comparator = new Comparator<String>()\n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(String a, String b)\n\t\t\t\t\t{\n\t\t\t\t\t\tKaBoomNodeInfo infoA = clients.get(a);\n\t\t\t\t\t\tdouble valA = infoA.getLoad() / infoA.getTargetLoad();\n\n\t\t\t\t\t\tKaBoomNodeInfo infoB = clients.get(b);\n\t\t\t\t\t\tdouble valB = infoB.getLoad() / infoB.getTargetLoad();\n\n\t\t\t\t\t\tif (valA == valB)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn 0;\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\tif (valA > valB)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn -1;\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\tsortedClients.addAll(clients.keySet());\n\n\t\t\t\tfor (String partition : partitionToHost.keySet())\n\t\t\t\t{\n\t\t\t\t\t// If it's already assigned, skip it\n\t\t\t\t\t\n\t\t\t\t\tif (partitionToClient.containsKey(partition))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tCollections.sort(sortedClients, comparator);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * \n\t\t\t\t\t * Iterate through the list until we find either a local client below capacity, or we reach the ones that are \n\t\t\t\t\t * above capacity. If we reach clients above capacity, then just assign it to the first node.\n\t\t\t\t\t */\n\t\t\t\t\t\n\t\t\t\t\tLOG.info(\"Going to assign {}\", partition);\n\t\t\t\t\tString chosenClient = null;\n\t\t\t\t\t\n\t\t\t\t\tfor (String client : sortedClients)\n\t\t\t\t\t{\n\t\t\t\t\t\tLOG.info(\"- Checking {}\", client);\t\t\t\t\t\t\n\t\t\t\t\t\tKaBoomNodeInfo info = clients.get(client);\t\t\t\t\t\t\n\t\t\t\t\t\tLOG.info(\"- Current load = {}, Target load = {}\", info.getLoad(), info.getTargetLoad());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (info.getLoad() >= info.getTargetLoad())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tchosenClient = sortedClients.get(0);\n\t\t\t\t\t\t\tbreak;\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\tif (clients.get(client).getHostname().equals(partitionToHost.get(partition)))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tchosenClient = client;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (chosenClient == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tchosenClient = sortedClients.get(0);\n\t\t\t\t\t}\n\n\t\t\t\t\tLOG.info(\"Assigning partition {} to client {}\", partition, chosenClient);\n\n\t\t\t\t\tcurator\n\t\t\t\t\t\t .create()\n\t\t\t\t\t\t .withMode(CreateMode.PERSISTENT)\n\t\t\t\t\t\t .forPath(\"/kaboom/assignments/\" + partition,\n\t\t\t\t\t\t\t chosenClient.getBytes(UTF8));\n\n\t\t\t\t\tList<String> parts = clientToPartitions.get(chosenClient);\n\t\t\t\t\t\n\t\t\t\t\tif (parts == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tparts = new ArrayList<String>();\n\t\t\t\t\t\tclientToPartitions.put(chosenClient, parts);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tparts.add(partition);\n\n\t\t\t\t\tpartitionToClient.put(partition, chosenClient);\n\n\t\t\t\t\tclients.get(chosenClient).setLoad(clients.get(chosenClient).getLoad() + 1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Check to see if the kafka_ready flag writer thread exists and is alive:\n\t\t\t * \n\t\t\t * If it doesn't exist or isn't running, start it. This is designed to \n\t\t\t * work well when the load balancer sleeps for 10 minutes after assigning \n\t\t\t * work. If that behavior changes then additional logic will be required\n\t\t\t * to ensure this isn't executed too often \n\t\t\t */\n\t\t\t\n\t\t\tif (readyFlagThread == null || !readyFlagThread.isAlive())\n\t\t\t{\n\t\t\t\tLOG.info(\"[ready flag writer] thread doesn't exist or is not running\");\t\t\t\t\n\t\t\t\treadyFlagWriter = new ReadyFlagWriter(config, curator);\n\t\t\t\treadyFlagWriter.addListener(this);\n\t\t\t\treadyFlagThread = new Thread(readyFlagWriter);\n\t\t\t\treadyFlagThread.start();\n\t\t\t\tLOG.info(\"[ready flag writer] thread created and started\");\n\t\t\t}\n\n\t\t\tThread.sleep(10 * 60 * 1000);\n\t\t}\n\t}",
"@Override\n\tpublic void updateAll() {\n\t\tList<Request> requests = peer.getRequests();\n\t\tfor(Request request : requests){\t\t\t\n\t\t\tupdateAccounting(request);\t\t\t\t\n\t\t}\n\t\t\n\t\t/**\n\t\t * Once the accounting for all requests of each peer was performed, \n\t\t * we now update the lastUpdatedTime of each accounting info. \n\t\t */\n\t\tfor(AccountingInfo accInfo : accountingList)\n\t\t\taccInfo.setLastUpdated(TimeManager.getInstance().getTime());\n\t\t\t\t\n\t\tfinishRequests();\n\t}",
"@Override\n\tpublic void run() {\n\t\twhile(!Server.killServer){\n\t\t\ttry {\n\t\t\t\tThread.sleep(Constants.BROADCAST_BATTLEFIELD_PERIOD_TO_CLIENTS);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t//send to EACH client\n\t\t\tfor(Node client : Server.getClientList().keySet()){\n\t\t\t\t//get client's RMI instance\n\t\t\t\tClientServer clientComm = null;\n\t\t\t\tclientComm = Server.getClientReg(client); \n\t\t\t\t//create Message\n\t\t\t\tClientServerMessage sendBattlefieldMessage = new ClientServerMessage(\n\t\t\t\t\t\t\tMessageType.GetBattlefield,\n\t\t\t\t\t\t\tthis.serverOwner.getName(),\n\t\t\t\t\t\t\tthis.serverOwner.getIP(),\n\t\t\t\t\t\t\tclient.getName(),\n\t\t\t\t\t\t\tclient.getIP());\n\t\t\t\tsendBattlefieldMessage.setBattlefield(Server.getBattlefield());\n\t\t\t\t\n\t\t\t\tif(clientComm==null){\n\t\t\t\t\tSystem.out.println(\"clientComm is null\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(\"Server: Battlefield sent\");\n\n\t\t\t\ttry {\n\t\t\t\t\tclientComm.onMessageReceived(sendBattlefieldMessage);\n\t\t\t\t} catch (RemoteException e) {\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t} catch (NotBoundException e) {\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t}\n\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public void askForPeers() {\n\t\tif(peers.size() < maximumConnections) {\n\t\t\tpropagateToAllPeers(new PeerAskMessage());\n\t\t}\n\t}",
"@Override\n\tpublic void communicateNeighborHostnames() throws InterruptedException {\n\t\tList<Thread> tList= new ArrayList<Thread>();\n\t\tfor (int i = 0; i < nProc-1; i++) {\n\t\t\tint clientPid = i + 2;\n\t\t\tThread t = new Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tConnection conn = pidToConnMap.get(clientPid);\n\t\t\t\t\tList<Integer> clientNeighborPids = neighborMap.get(clientPid);\n\t\t\t\t\tfor (int clientNeighborPid : clientNeighborPids) {\n\t\t\t\t\t\tString neighborHostname;\n\t\t\t\t\t\tif (clientNeighborPid == 1)\n\t\t\t\t\t\t\tneighborHostname = coordinatorHostname;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tneighborHostname = pidToHostnameMap.get(clientNeighborPid);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconn.send(neighborHostname);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\ttList.add(t);\n\t\t\tt.start();\n\t\t}\n\t\tfor (Thread t : tList) {\n\t\t\tt.join();\n\t\t}\n\t}"
] | [
"0.6598917",
"0.64577687",
"0.63300985",
"0.6167466",
"0.61040294",
"0.6035104",
"0.53435934",
"0.52578133",
"0.5226238",
"0.51964897",
"0.5184202",
"0.5104979",
"0.50761706",
"0.50587845",
"0.5040107",
"0.50300026",
"0.50239223",
"0.49831063",
"0.4979477",
"0.4952311",
"0.48728633",
"0.48546574",
"0.48293957",
"0.4805005",
"0.48044497",
"0.47591594",
"0.4738753",
"0.47289833",
"0.47173283",
"0.46964976",
"0.46677154",
"0.46457788",
"0.4614182",
"0.45845184",
"0.45595017",
"0.4550808",
"0.45424923",
"0.45296532",
"0.4523616",
"0.4522153",
"0.45220485",
"0.4515356",
"0.45003524",
"0.44951013",
"0.44895908",
"0.4483496",
"0.44752404",
"0.44443455",
"0.44329512",
"0.443181",
"0.44298378",
"0.44243842",
"0.4421563",
"0.44213843",
"0.44098866",
"0.43944287",
"0.43914858",
"0.43792987",
"0.43719658",
"0.43674254",
"0.43671417",
"0.4353067",
"0.43481562",
"0.43427855",
"0.43425465",
"0.43404284",
"0.43397072",
"0.4334541",
"0.43343616",
"0.43339795",
"0.433265",
"0.43156555",
"0.43151593",
"0.43146417",
"0.43047333",
"0.43041632",
"0.43034273",
"0.43021414",
"0.4299283",
"0.42969364",
"0.42968276",
"0.42944103",
"0.42904308",
"0.4288366",
"0.4287682",
"0.4280281",
"0.4278884",
"0.4275443",
"0.42751423",
"0.42723233",
"0.426389",
"0.42632896",
"0.42542782",
"0.42481816",
"0.42423972",
"0.42405918",
"0.42404202",
"0.4229587",
"0.42291012",
"0.42219293"
] | 0.8503308 | 0 |
The initialize() method makes a newly started or recovered server to initiate an election to update the leader | public static void initialize()
{
// Initiate election
Runnable sender = new BullyAlgorithm("Sender","election");
new Thread(sender).start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void leaderElection () {\n leaderID++;\n if (leaderID > numServers) {\n leaderID = 1;\n }\n if (isLeader()) {\n leader = new Leader(combine(index, Constants.LEADER), this,\n acceptors, replicas);\n leader.start();\n } else {\n leader = null;\n }\n }",
"public void start() {\n logger.info(\"LeaderSelector start racing for leadership\");\n leaderElection();\n }",
"public void init(){\n\t\tmultiplexingClientServer = new MultiplexingClientServer(selectorCreator);\n\t}",
"@Override\n\tpublic void initialize() {\n\t\ttransportManager = newServerTransportManager();\n\t\ttransportServer = newTransportServer();\n\t\tserverStateMachine = newTransportServerStateMachine();\n\n\t\tserverStateMachine.setServerTransportComponentFactory(this);\n\t\ttransportManager.setServerTransportComponentFactory(this);\n\t\ttransportServer.setServerTransportComponentFactory(this);\n\t\ttransportServer.setServerHostConfig(getServerHostConfig());\n\n\t\tsetInitialized(true);\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 }",
"@PostConstruct\n public void init() {\n System.out.println(\"\\n \\n \\n \\n \\n \\n \\n\");\n System.out.println(\"I AM THE SERVER STARTING BE WAARE :::::::\");\n System.out.println(\"\\n \\n \\n \\n \\n \\n \\n\");\n boolean updateMatches = true;\n if (updateMatches) {\n System.out.println(\"Updating local database...\");\n try {\n System.out.println(\"=====================================\");\n String authTokenRaw = requestToornamentAuthToken();\n String requestURL = \"https://api.toornament.com/v1/tournaments\" + \"?name=\" + URLEncoder.encode(tournamentName, \"UTF-8\");\n String tournamentInfoRaw = getTournamentInfo(authTokenRaw, requestURL);\n String matchesRaw = getTournamentMatches(authTokenRaw, tournamentInfoRaw);\n insertTournamentMatchesToDB(matchesRaw);\n } catch (JSONException | MalformedJsonException | JsonSyntaxException | UnsupportedEncodingException ex) {\n Logger.getLogger(SocketServer.class.getName()).log(Level.SEVERE, null, ex);\n ex.printStackTrace();\n }\n }\n }",
"@PostConstruct\n public void init() {\n rest.put(\"http://authenticationServer:8080/bot\", info);\n AuthServerChecker checker = new AuthServerChecker(name);\n checker.start();\n }",
"void elect() {\n leader = self;\n state = InstanceState.LEADER;\n }",
"@Override\n public void initialize(ServerConfiguration config) {\n }",
"private void initPeers() {\n this.servers.clear();\n this.clients.clear();\n\n if (SharedPrefUtils.isConnectionNfcEnabled(this)) {\n clients.add(new NFCClient(this, walletServiceBinder));\n servers.add(new NFCServerACSCLTV(this, walletServiceBinder));\n servers.add(new NFCServerCLTV(this, walletServiceBinder));\n\n }\n\n if (SharedPrefUtils.isConnectionBluetoothLeEnabled(this)) {\n clients.add(new BluetoothLEClient(this, walletServiceBinder));\n servers.add(new BluetoothLEServer(this, walletServiceBinder));\n }\n\n if (SharedPrefUtils.isConnectionWiFiDirectEnabled(this)) {\n clients.add(new WiFiClient(this, walletServiceBinder));\n servers.add(new WiFiServer(this, walletServiceBinder));\n }\n\n for (AbstractServer server : servers) {\n server.setPaymentRequestDelegate(getClientPaymentRequestDelegate());\n }\n\n for (AbstractClient client : clients) {\n client.setPaymentRequestDelegate(getClientPaymentRequestDelegate());\n if(client instanceof NFCClient) {\n client.start();\n }\n }\n\n }",
"public static void initializeServer() {\n\t\tServer.initializeServerGUI();\n\t}",
"private void initiatePreElection() {\n\t\tpreElectionInProgress = true;\n\t\tbackupHeartbeatTimer.cancel();\n\t\tif (reElectionTimer != null) {\n\t\t\treElectionTimer.cancel();\n\t\t}\n\t\tif (backupHeartbeatBroadcaster != null) {\n\t\t\tbackupHeartbeatBroadcaster.cancel();\n\t\t}\n\t\t// Broadcast election ordinality and reset isElectedFlag for all nodes\n\t\tfor (RemoteLoadBalancer remoteLoadBalancer : remoteLoadBalancers) {\n\t\t\tif (remoteLoadBalancer.isConnected() && remoteLoadBalancer.getState().equals(LoadBalancerState.PASSIVE)) {\n\t\t\t\tByteBuffer buffer = ByteBuffer.allocate(9);\n\t\t\t\tbuffer.put((byte) MessageType.ELECTION_MESSAGE.getValue());\n\t\t\t\tbuffer.putDouble(averageServerLatency);\t\n\t\t\t\tbuffer.flip();\n\t\t\t\ttry {\n\t\t\t\t\twhile (buffer.hasRemaining()) {\n\t\t\t\t\t\tremoteLoadBalancer.getSocketChannel().write(buffer);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t}\n\t\t\t}\n\t\t\tremoteLoadBalancer.setIsElectedBackup(false);\n\t\t}\n\n\t\t// TimerTask created that will determine the election results after the\n\t\t// timeout occurs.\n\t\tTimerTask timerTask = new TimerTask() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tRemoteLoadBalancer lowestLatencyCandidate = null;\n\t\t\t\tfor (RemoteLoadBalancer remoteLoadBalancer : remoteLoadBalancers) {\n\t\t\t\t\tif (remoteLoadBalancer.getState().equals(LoadBalancerState.PASSIVE)\n\t\t\t\t\t\t\t&& remoteLoadBalancer.getCandidacyValue() != null) {\n\t\t\t\t\t\tif (lowestLatencyCandidate == null\n\t\t\t\t\t\t\t\t&& remoteLoadBalancer.getCandidacyValue() < averageServerLatency) {\n\t\t\t\t\t\t\tlowestLatencyCandidate = remoteLoadBalancer;\n\t\t\t\t\t\t} else if (lowestLatencyCandidate != null && remoteLoadBalancer\n\t\t\t\t\t\t\t\t.getCandidacyValue() < lowestLatencyCandidate.getCandidacyValue()) {\n\t\t\t\t\t\t\tlowestLatencyCandidate = remoteLoadBalancer;\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Didn't get a lowest latency election message so assume this\n\t\t\t\t// load balancer is now the backup\n\t\t\t\tif (lowestLatencyCandidate == null) {\n\t\t\t\t\tbackupHeartbeatTimer.cancel();\n\t\t\t\t\tisElectedBackup = true;\n\t\t\t\t\tbackupHeartbeatBroadcaster = new HeartbeatBroadcaster(remoteLoadBalancers, backupHeartbeatIntervalMillis,\n\t\t\t\t\t\t\tLoadBalancerState.PASSIVE);\n\t\t\t\t\tnew Thread(backupHeartbeatBroadcaster).start();\n\t\t\t\t\t\n\t\t\t\t\t// Start timer for next pre-election\n\t\t\t\t\tstartReElectionTimer();\n\t\t\t\t\t\n\t\t\t\t\tComponentLogger.getInstance().log(LogMessageType.LOAD_BALANCER_ELECTED_AS_BACKUP);\n\t\t\t\t\tSystem.out.println(\"Elected as backup\");\n\t\t\t\t} else {\n\t\t\t\t\tlowestLatencyCandidate.setIsElectedBackup(true);\n\t\t\t\t\tisElectedBackup = false;\n\t\t\t\t\tresetBackupHeartbeatTimer();\n\t\t\t\t\tSystem.out.println(\"Election winner:\" + lowestLatencyCandidate.getAddress().getHostString());\n\t\t\t\t}\n\n\t\t\t\t// Clear candidacy values for future elections\n\t\t\t\tfor (RemoteLoadBalancer remoteLoadBalancer : remoteLoadBalancers) {\n\t\t\t\t\tremoteLoadBalancer.setCandidacyValue(null);\n\t\t\t\t}\n\t\t\t\tpreElectionInProgress = false;\n\t\t\t}\n\t\t};\n\n\t\tpreElectionTimeoutTimer = new Timer();\n\t\tpreElectionTimeoutTimer.schedule(timerTask, defaultTimeoutMillis);\n\t}",
"void initialise() {\n this.sleep = false;\n this.owner = this;\n renewNeighbourClusters();\n recalLocalModularity();\n }",
"public void initialize() {\n\n getStartUp();\n }",
"public void initialize() throws InterruptedException, UnknownHostException;",
"private void initServer() throws IOException {\r\n \t\tLogger.logMessage(\"Binding Server to \" + this.serverIpAddress + \":\" + this.serverPort);\r\n \r\n \t\tthis.isAlive = true;\r\n \t\tthis.serverSocket = new ServerSocket(this.serverPort, this.backLog, this.serverIpAddress);\r\n \t\tthis.dataLayer = DataLayerFactory.getDataLayer();\r\n \r\n \t\t// Generate the grouplist\r\n \t\tCollection<String> dbGroupList = this.dataLayer.getGroups();\r\n \r\n \t\tfor (String group : dbGroupList) {\r\n \t\t\tthis.groupList.addGroup(group);\r\n \t\t}\r\n \r\n \t\tLogger.logMessage(\"Server successfuly bound!\");\r\n \t}",
"private void initialize(){\n\t\ttry\n\t\t{\n\t\t\tString[] packet = setPacket();\n\t\t\tif (validatePacket(packet))\n\t\t\t{\n\t\t\t\tsend(packet);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tSystem.out.println(\"Something went wrong...\");\n\t\t\tresetClient();\n\t\t}\n\t}",
"public static void initialize()\n {\n localPeerIDCount = 0;\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 }",
"public void setup(){\n\t\ttry{\n\t\t\tSocket serverSocket;\n\t\t\tboolean serverRunning = true;\n\t\t\twhile(serverRunning == true){\n\t\t\t\t serverSocket = server.accept();\n\t\t\t\t System.out.println(\"Connected to the server!\");\n\t\t\t\t DungeonClient connectedClient = new DungeonClient(serverSocket, game);\n\t\t\t\t connectedClient.start();\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e){\n\t\t\tSystem.out.println(\"Sorry, there was an IOException!\");\n\t\t}\n\t}",
"public void init() throws Exception {\n if (\"local\".equalsIgnoreCase(cluster.provisioningMethod)) {\n zookeeper = new LocalZookeeper();\n int initValue = zookeeper.start();\n if (initValue != 0) {\n log.error(\"Failed to start Zookeeper!\");\n throw new RuntimeException(\"Failed to start Zookeeper!\");\n }\n\n ExecutorService executor = Executors.newFixedThreadPool(1, new ThreadFactoryBuilder().setNameFormat(\"nodestarter-threadpool\").build()); \n \t\t //Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()/2+1, new ThreadFactoryBuilder().setNameFormat(\"nodestarter-threadpool\").build()); \n\n int basePort = Util.getFreePort(cluster.numSolrNodes);\n\n for (int i = 1; i <= cluster.numSolrNodes; i++) {\n \t int nodeIndex = i;\n \t Callable c = () -> {\n \t\t SolrNode node = new LocalSolrNode(solrPackagePath, nodeIndex, String.valueOf(basePort + nodeIndex - 1), cluster.startupParams, cluster.startupParamsOverrides, zookeeper);\n \t\t \n \t\t try {\n\t \t\t node.init();\n\t \t\t node.start();\n\t \t\t nodes.add(node);\n\t \t\t \n\t \t\t log.info(\"Nodes started: \"+nodes.size());\n\t \t\t \n\t \t\t //try (HttpSolrClient client = new HttpSolrClient.Builder(node.getBaseUrl()).build();) {\n\t \t\t\t //log.info(\"Health check: \"+ new HealthCheckRequest().process(client) + \", Nodes started: \"+nodes.size());\n\t \t\t //} catch (Exception ex) {\n\t \t\t\t// log.error(\"Problem starting node: \"+node.getBaseUrl());\n\t \t\t\t //throw new RuntimeException(\"Problem starting node: \"+node.getBaseUrl());\n\t \t\t //}\n\t \t\t return node;\n \t\t } catch (Exception ex) {\n \t\t\t ex.printStackTrace();\n \t\t\t log.error(\"Problem starting node: \"+node.getBaseUrl());\n \t\t\t return null;\n \t\t }\n \t };\n \t executor.submit(c);\n }\n \n executor.shutdown();\n executor.awaitTermination(1, TimeUnit.HOURS);\n\n log.info(\"Looking for healthy nodes...\");\n List<SolrNode> healthyNodes = new ArrayList<>();\n for (SolrNode node: nodes) {\n \t\ttry (HttpSolrClient client = new HttpSolrClient.Builder(node.getBaseUrl().substring(0, node.getBaseUrl().length()-1)).build();) {\n \t\t\tHealthCheckRequest req = new HealthCheckRequest();\n \t\t\tHealthCheckResponse rsp;\n \t\t\ttry {\n \t\t\t\trsp = req.process(client);\n \t\t\t} catch (Exception ex) {\n \t\t\t\tThread.sleep(100);\n \t\t\t\trsp = req.process(client);\n \t\t\t}\n \t\t\tif (rsp.getNodeStatus().equalsIgnoreCase(\"ok\") == false) {\n \t\t\t\tlog.error(\"Couldn't start node: \"+node.getBaseUrl());\n \t\t\t\tthrow new RuntimeException(\"Couldn't start node: \"+node.getBaseUrl());\n \t\t\t} else {\n \t\t\t\thealthyNodes.add(node);\n \t\t\t}\n \t\t} catch (Exception ex) {\n \t\t\tex.printStackTrace();\n \t\t\tlog.error(\"Problem starting node: \"+node.getBaseUrl());\n \t\t}\n }\n \n this.nodes = healthyNodes;\n log.info(\"Healthy nodes: \"+healthyNodes.size());\n \n try (CloudSolrClient client = new CloudSolrClient.Builder().withZkHost(getZookeeperUrl()).build();) {\n\t log.info(\"Cluster state: \" + client.getClusterStateProvider().getClusterState());\n\t log.info(\"Overseer: \" + client.request(new OverseerStatus()));\n }\n\n \n } else if (\"terraform-gcp\".equalsIgnoreCase(cluster.provisioningMethod)) {\n \tSystem.out.println(\"Solr nodes: \"+getSolrNodesFromTFState());\n \tSystem.out.println(\"ZK node: \"+getZkNodeFromTFState());\n \tzookeeper = new GenericZookeeper(getZkNodeFromTFState());\n \tfor (String host: getSolrNodesFromTFState()) {\n \t\tnodes.add(new GenericSolrNode(host, cluster.terraformGCPConfig.get(\"user\").toString()));\n \t}\n } else if (\"vagrant\".equalsIgnoreCase(cluster.provisioningMethod)) {\n \tSystem.out.println(\"Solr nodes: \"+getSolrNodesFromVagrant());\n \tSystem.out.println(\"ZK node: \"+getZkNodeFromVagrant());\n \tzookeeper = new GenericZookeeper(getZkNodeFromVagrant());\n \tfor (String host: getSolrNodesFromVagrant()) {\n \t\tnodes.add(new GenericSolrNode(host, null)); // TODO fix username for vagrant\n \t}\n } else if (\"external\".equalsIgnoreCase(cluster.provisioningMethod)) {\n log.info(\"ZK node: \" + cluster.externalSolrConfig.zkHost);\n String[] tokens = cluster.externalSolrConfig.zkHost.split(\":\");\n zookeeper = new GenericZookeeper(tokens[0], tokens.length > 1 ? Integer.parseInt(tokens[1]) : null, cluster.externalSolrConfig.zkAdminPort, cluster.externalSolrConfig.zkChroot);\n\n try (CloudSolrClient client = new CloudSolrClient.Builder().withZkHost(cluster.externalSolrConfig.zkHost).withZkChroot(cluster.externalSolrConfig.zkChroot).build()) {\n for (String liveNode : client.getClusterStateProvider().getLiveNodes()) {\n nodes.add(new ExternalSolrNode(\n liveNode.split(\"_solr\")[0].split(\":\")[0],\n Integer.valueOf(liveNode.split(\"_solr\")[0].split(\":\")[1]),\n cluster.externalSolrConfig.sshUserName,\n cluster.externalSolrConfig.restartScript));\n }\n List<SolrNode> dataNodes = getExternalDataNodes(client).stream().map(dataNode -> new ExternalSolrNode(\n dataNode.split(\"_solr\")[0].split(\":\")[0],\n Integer.valueOf(dataNode.split(\"_solr\")[0].split(\":\")[1]),\n cluster.externalSolrConfig.sshUserName,\n cluster.externalSolrConfig.restartScript)).collect(Collectors.toList());\n if (!dataNodes.isEmpty()) {\n nodesByRole.put(NodeRole.DATA, dataNodes);\n }\n List<SolrNode> queryNodes = getExternalQueryNodes(client).stream().map(queryNode -> new ExternalSolrNode(\n queryNode.split(\"_solr\")[0].split(\":\")[0],\n Integer.valueOf(queryNode.split(\"_solr\")[0].split(\":\")[1]),\n cluster.externalSolrConfig.sshUserName,\n cluster.externalSolrConfig.restartScript)).collect(Collectors.toList());\n if (!queryNodes.isEmpty()) {\n nodesByRole.put(NodeRole.COORDINATOR, queryNodes);\n }\n List<SolrNode> overseerNodes = getExternalPreferredOverseerNodes(client).stream().map(overseerNode -> new ExternalSolrNode(\n overseerNode.split(\"_solr\")[0].split(\":\")[0],\n Integer.valueOf(overseerNode.split(\"_solr\")[0].split(\":\")[1]),\n cluster.externalSolrConfig.sshUserName,\n cluster.externalSolrConfig.restartScript)).collect(Collectors.toList());\n if (!queryNodes.isEmpty()) {\n nodesByRole.put(NodeRole.OVERSEER, overseerNodes);\n }\n }\n log.info(\"Cluster initialized with nodes: \" + nodes + \", zkHost: \" + zookeeper + \", nodes by role: \" + nodesByRole);\n }\n\n\n }",
"public void start(){\n log.debug(\"Starting Host Router\");\n lobbyThread = pool.submit(new Runnable() {\n public void run() {\n waitForClients();\n }\n });\n }",
"@Override\r\n \tpublic void initialize() {\n \t\tThreadRenamingRunnable.setThreadNameDeterminer(ThreadNameDeterminer.CURRENT);\r\n \r\n \t\tInetSocketAddress address;\r\n \r\n \t\tif (m_host == null) {\r\n \t\t\taddress = new InetSocketAddress(m_port);\r\n \t\t} else {\r\n \t\t\taddress = new InetSocketAddress(m_host, m_port);\r\n \t\t}\r\n \r\n \t\tm_queue = new LinkedBlockingQueue<ChannelBuffer>(m_queueSize);\r\n \r\n \t\tExecutorService bossExecutor = Threads.forPool().getCachedThreadPool(\"Cat-TcpSocketReceiver-Boss-\" + address);\r\n \t\tExecutorService workerExecutor = Threads.forPool().getCachedThreadPool(\"Cat-TcpSocketReceiver-Worker\");\r\n \t\tChannelFactory factory = new NioServerSocketChannelFactory(bossExecutor, workerExecutor);\r\n \t\tServerBootstrap bootstrap = new ServerBootstrap(factory);\r\n \r\n \t\tbootstrap.setPipelineFactory(new ChannelPipelineFactory() {\r\n \t\t\tpublic ChannelPipeline getPipeline() {\r\n \t\t\t\treturn Channels.pipeline(new MyDecoder(), new MyHandler());\r\n \t\t\t}\r\n \t\t});\r\n \r\n \t\tbootstrap.setOption(\"child.tcpNoDelay\", true);\r\n \t\tbootstrap.setOption(\"child.keepAlive\", true);\r\n \t\tbootstrap.bind(address);\r\n \r\n \t\tm_logger.info(\"CAT server started at \" + address);\r\n \t\tm_factory = factory;\r\n \t}",
"@Override\n public void initialize(URL location, ResourceBundle resources) {\n new Thread( ()-> {\n try {\n //Start the server\n ServerSocket serverSocket = new ServerSocket(8080);\n\n //show in terminal server has started\n System.out.println(\"Server Started: at \" + new Date() + \"\\n\");\n\n //main loop that will accept connections\n while (true) {\n //accept a new socket connection, this socket comes from client\n Socket clientSocket = serverSocket.accept();\n\n //thread that will handle what to do with new socket\n new Thread(new HandleAclient(clientSocket)).start();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }).start();\n\n }",
"public Server() {\n print_addr();\n follow_updates();\n }",
"@Override\r\n\tpublic void initial() {\n\t\ttry {\r\n\t\t\tserverSocket = new ServerSocket(port);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t// System.out.println(\"LocalProxy run on \" + port);\r\n\t}",
"public void StartReplicationMgr()\n\t{\n\t\tif( hostIP.equals(m_oElection.GetLeaderIP()))\n\t\t{\n\t\t\tm_oSDFSMaster.StartReplicationMgr();\n\t\t}\n\t}",
"void convertToLeader() {\n state = InstanceState.LEADER;\n controller = new LeaderController(this, executor, clock, transport);\n }",
"public void init() {\n configuration.init();\n \n //Connections connections = configuration.getBroker().getConnections(\"topic\");\n Connections connections = configuration.getBrokerPool().getBroker().getConnections(\"topic\");\n \n if (connections == null) {\n handleException(\"Couldn't find the connection factor: \" + \"topic\");\n }\n \n sensorCatalog = new SensorCatalog();\n clientCatalog = new ClientCatalog();\n \n nodeCatalog = new NodeCatalog();\n \n updateManager = new UpdateManager(configuration, sensorCatalog, this);\n updateManager.init();\n \n endpointAllocator = new EndpointAllocator(configuration, nodeCatalog);\n\n registry = new JCRRegistry(this);\n registry.init();\n\n // Initialize Public-End-Point\n if(!isPublicEndPointInit) {\n \tinitPublicEndpoint();\n }\n }",
"@Override\n public void preStart() {\n cluster.subscribe(getSelf(), RoleLeaderChanged.class);\n }",
"protected void init(Iterable<String> servers) {}",
"@SubscribeEvent\n public void onServerStarting(FMLServerStartingEvent event) {\n LOGGER.log(Level.INFO, \"starting fabric server mods\");\n FabricLoaderImpl.INSTANCE.getEntrypoints(\"server\", DedicatedServerModInitializer.class).forEach(DedicatedServerModInitializer::onInitializeServer);\n }",
"public static void startServer() {\n clientListener.startListener();\n }",
"public void init(){\n taskClient.connect(\"127.0.0.1\", 9123);\n }",
"private void establishServerConnection() {\n int lb_port = Integer.parseInt(gui.getLBPort_Text().getText());\n gui.getLBPort_Text().setEnabled(false);\n String lb_ip = gui.getLBIP_Text().getText();\n gui.getLBIP_Text().setEnabled(false);\n int server_port = Integer.parseInt(gui.getServerPort_Text().getText());\n gui.getServerPort_Text().setEnabled(false);\n String server_ip = gui.getServerIP_Text().getText();\n gui.getServerIP_Text().setEnabled(false);\n obtainId(server_ip, server_port);\n lbInfo = new ConnectionInfo(lb_ip, lb_port, 3);\n\n if (connection.startServer(server_port)) {\n connectionHandler = new ServerConnections(connection, lbInfo, requestsAnswered, processingRequests, gui.getCompleted_Text(), gui.getProcessing_Text());\n new Thread(connectionHandler).start();\n\n requestServerId();\n scheduler.scheduleAtFixedRate(heartbeat, 10, 10, TimeUnit.SECONDS);\n } else {\n gui.getLBPort_Text().setEnabled(true);\n gui.getLBIP_Text().setEnabled(true);\n gui.getServerPort_Text().setEnabled(true);\n gui.getServerIP_Text().setEnabled(true);\n gui.getButton_Connect().setEnabled(true);\n }\n }",
"public void init() {\r\n\t\tthis.initWebAndSocketServer();\r\n\r\n\t\t/*\r\n\t\t * Set/update server info\r\n\t\t */\r\n\t\ttry {\r\n\t\t\tServerInfo serverInfo = Info.getServerInfo();\r\n\t\t\tserverInfo.setPort(Integer.parseInt(SettingsManager.getStringValue(GeneralController.getInstance().getIdentifier(), GeneralController.Settings.NET_HTTP_PORT.get())));\r\n\t\t\tserverInfo.setName(SettingsManager.getStringValue(GeneralController.getInstance().getIdentifier(), GeneralController.Settings.SERVER_NAME.get(), \"Home server\"));\r\n\t\t\tserverInfo.setVersion(BuildConfig.VERSION);\r\n\t\t\tInfo.writeServerInfo(serverInfo);\r\n\t\t} catch (IOException | JSONException e1) {\r\n\t\t\tServer.log.error(\"Could not update server info. Designer might not work as expected: \" + e1.getMessage());\r\n\t\t}\r\n\r\n\t\tRuleManager.init();\r\n\t}",
"@Override\r\n\tpublic void startup() {\n\t\t\r\n\t\tString wechatID = \"gh_f49bb9a333b3\";\r\n\t\tString Token = \"spotlight-wechat\";\r\n\t\t\r\n\t\tNoIOClient client = new NoIOClient(\"mg.protel.com.hk\",5010);\r\n\t\tclient.addCRouter(wechatID, Token,null,null);\r\n\t\t\r\n\t\tclient.startup();\r\n\r\n\t}",
"public ServerService(){\n\t\tlogger.info(\"Initilizing the ServerService\");\n\t\tservers.put(1001, new Server(1001, \"Test Server1\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1002, new Server(1002, \"Test Server2\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1003, new Server(1003, \"Test Server3\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1004, new Server(1004, \"Test Server4\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tlogger.info(\"Initilizing the ServerService Done\");\n\t}",
"protected void initialize() {\r\n\r\n Robot.pneumatics.pneuOpen();\r\n }",
"void startToPerformAsLeader();",
"@Environment\n public static void initialize() throws MarathonException {\n URI zkUri = startZookeeperInstance();\n startBookkeeperInstances(zkUri);\n URI controllerUri = ensureControllerRunning(zkUri);\n ensureSegmentStoreRunning(zkUri, controllerUri);\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n dbManager = new DatabaseManager();\n\n try {\n updateIncomingOrders();\n } catch (Exception ex) {\n Logger.getLogger(FXMLChefGUIController.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n Timer timer = new Timer();\n timer.schedule(new UpdateChef(this), 0, 1000);\n\n }",
"public FastLeaderElection(QuorumPeer self, QuorumCnxManager manager) {\n this.stop = false;\n this.manager = manager;\n starter(self, manager);\n }",
"public static void init() {\n startTime = System.currentTimeMillis();\n if (clientExecutorEngine == null) {\n clientExecutorEngine = new ClientExecutorEngine();\n HzClient.initClient();\n }\n }",
"public void onServerStart(MinecraftServer server)\n\t{\n\t\t// WARNING : integrated server work whit proxy on ClienSide.\n\t\tJLog.info(\" --- SERVER START --- \");\n\t\tElementalIntegrationHelper.initializeClass();\n\t}",
"@Override\n\tpublic boolean init()\n\t{\n\t\tentityMap = new EntityIDMap();\n\t\t\n\t\tServerBootstrap bootstrap = new ServerBootstrap();\n\t\tbootstrap.group(bossGroup, workerGroup)\n\t\t\t\t.channel(NioServerSocketChannel.class) // Channel type\n\t\t\t\t.childHandler(new ChannelInitializer<SocketChannel>() // Setup ChannelInitializer\n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected void initChannel(SocketChannel ch)\n\t\t\t\t\t{\n\t\t\t\t\t\t// On client connect:\n\t\t\t\t\t\t// Send back client-id\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Client side:\n\t\t\t\t\t\t// Send back position of player\n\t\t\t\t\t\t// client id | pos x | pos y | pos z\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Server side:\n\t\t\t\t\t\t// Broadcast all player positions\n\t\t\t\t\t\tch.pipeline().addLast(new LengthFieldPrepender(2));\n\t\t\t\t\t\tch.pipeline().addLast(new LengthFieldBasedFrameDecoder(0xFFFF, 0, 2));\n\t\t\t\t\t\tch.pipeline().addLast(new PacketCodec());\n\t\t\t\t\t\tch.pipeline().addLast(new ServerChannelHandler(instance));\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.option(ChannelOption.SO_BACKLOG, 128)\n\t\t\t\t.childOption(ChannelOption.SO_KEEPALIVE, true);\n\t\t\n\t\t// Bind & start accepting connections\n\t\ttry\n\t\t{\n\t\t\tChannelFuture f = bootstrap.bind(this.hostPort).sync();\n\t\t\tserverChannel = f.channel();\n\t\t}\n\t\tcatch (InterruptedException e)\n\t\t{\n\t\t\tSystem.err.println(\"Unable to bind to the requested port\");\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"void init() {\n CometUtils.printCometSdkVersion();\n validateInitialParams();\n this.connection = ConnectionInitializer.initConnection(\n this.apiKey, this.baseUrl, this.maxAuthRetries, this.getLogger());\n this.restApiClient = new RestApiClient(this.connection);\n // mark as initialized\n this.alive = true;\n }",
"public ServerConnecter() {\r\n\r\n\t}",
"@BeforeAll\n static void initClass() {\n // start the program\n server = MpSecurityClientMain.startTheServer();\n }",
"public Cinit(String server_ip) {\n this.server_ip=server_ip;\n start();\n }",
"private void initialize() {\r\n\r\n\t\tserverNode = new TreeParent(\"Servers\", \"Servers\", \"AA\", this);\r\n\t\tserverNode.setImageKey(\"System.gif\");\r\n\r\n\t\tnewServerNode = new TreeParent(\"NewServerWizard\", \"New Server\", \"AA\", this);\r\n\t\tnewServerNode.setImageKey(\"ApplicationFilter.gif\");\r\n\t\tnewServerNode.setExpandable(false);\r\n\t\tserverNode.addChild(newServerNode);\r\n\t\tnewServerNode.addChild(new TreeObject(\"Dummy\"));\r\n\t\r\n\t\tloadServers(serverNode);\r\n\r\n\t\tpreferenceNode = new TreeParent(\"Systems\", \"Preferences\", \"BB\", this);\r\n\t\tpreferenceNode.setImageKey(\"preference_page.gif\");\r\n\t\tpreferenceNode.addChild(new TreeObject(\"Dummy\"));\r\n\r\n\t\tinvisibleRoot = new TreeParent(\"\", \"InvisibleRoot\", \"AA\", this);\r\n\t\tinvisibleRoot.addChild(serverNode);\r\n\t\tinvisibleRoot.addChild(preferenceNode);\r\n\r\n\t}",
"GameHandler(ClientHandler theLeader) {\n leader = theLeader;\n leader.setHandler(this);\n leader.start();\n }",
"public Server() {\n\t\tinit(new Config());\n\t}",
"public void initMultiPlayer() {\r\n\t\tnew ConnectThread().start();\r\n\t}",
"@Override\n\tpublic void initialize() {\n\t\tSystem.out.println(\"TestClient initialization\");\n\t\tsubscribe(\"Scalars\");\n\t\tsubscribe(\"Triggers\");\n\t\tsubscribe(\"Alarms\");\n\n\t\t//If I'm a sender, run some tests\n\t\tif (_sender) {\n//\t\t\ttestIntArray();\n//\t\t\ttestSerializedObject();\n//\t\t\ttestStringArray();\n//\t\t\ttestDoubleArray();\n//\t\t\ttestString();\n//\t\t\ttestByteArray();\n//\t\t\ttestStreamedMessage();\n\t\t\tstressTest();\n\t\t}\n\t}",
"public void initializeRPC(){\n try{XmlRpcClientConfigImpl configuration = new XmlRpcClientConfigImpl();\n configuration.setServerURL(new URL(\"http://\"+RunnerRepository.host+\n \":\"+RunnerRepository.getCentralEnginePort()+\"/ra/\"));\n configuration.setEnabledForExtensions(true);\n configuration.setBasicPassword(RunnerRepository.password);\n configuration.setBasicUserName(RunnerRepository.user);\n client = new XmlRpcClient();\n client.setConfig(configuration);\n System.out.println(\"XMLRPC Client for testbed initialized: \"+client);}\n catch(Exception e){System.out.println(\"Could not conect to \"+\n RunnerRepository.host+\" :\"+RunnerRepository.getCentralEnginePort()+\"/ra/\"+\n \"for RPC client initialization\");}\n }",
"private void initialize() {\n if (!stopped.get()) {\n \tSystem.out.printf(\"Starting Red5 with args: %s\\n\", Arrays.toString(commandLineArgs));\n // start\n try {\n\t\t\t\tBootstrap.main(commandLineArgs);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n }\n }",
"public synchronized void start() {\n\t\tif(isStarted) {\n\t\t\treturn;\n\t\t}\n\t\tif(isStopped) {\n\t\t\tthrow new IllegalStateException(\"Cannot restart a TorClient instance. Create a new instance instead.\");\n\t\t}\n\t\tlogger.info(\"Starting Orchid (version: \"+ Tor.getFullVersion() +\")\");\n\t\tverifyUnlimitedStrengthPolicyInstalled();\n\t\tdirectoryDownloader.start(directory);\n\t\tcircuitManager.startBuildingCircuits();\n\t\tif(dashboard.isEnabledByProperty()) {\n\t\t\tdashboard.startListening();\n\t\t}\n\t\tisStarted = true;\n\t}",
"public void startListener() throws IOException {\n\t\tthis.listener = new ServerSocket(this.port);\n\n Runnable serverThread = new Runnable() {\n @Override\n public void run() {\n try {\n System.out.println(\"Waiting for clients to connect...\");\n\n while (true) {\n \t// Wait for connections\n Socket newSocket = listener.accept();\n\n // Init new peer and add it to our list\n PeerCommunicator newCommunication = new PeerCommunicator(id, \"\", newSocket);\n activePeers.add(newCommunication);\n\n // Span new thread\n Thread clientThread = new Thread(new ReceivedConnection(newCommunication, fm));\n clientThread.start();\n }\n } catch (Exception e) {\n System.err.println(\"Unable to process incoming client\");\n e.printStackTrace();\n }\n }\n };\n\n // Start it up\n (new Thread(serverThread)).start();\n\n // Once everything's good, mark server as running\n //this.status = Status.RUNNING;\n\t}",
"public void initialize() {\n // add direct connections to routing table\n for (Bunker neighbour : neighbours) {\n routing.put(neighbour.getId(), neighbour);\n }\n // add yourself\n routing.put(id, this);\n bunkerIdToCount.put(id, count);\n // kick off the algo\n initiate();\n }",
"public Vote lookForLeader() throws InterruptedException {\n try {\n self.jmxLeaderElectionBean = new LeaderElectionBean();\n MBeanRegistry.getInstance().register(self.jmxLeaderElectionBean, self.jmxLocalPeerBean);\n } catch (Exception e) {\n LOG.warn(\"Failed to register with JMX\", e);\n self.jmxLeaderElectionBean = null;\n }\n\n self.start_fle = Time.currentElapsedTime();\n try {\n /*\n * The votes from the current leader election are stored in recvset. In other words, a vote v is in recvset\n * if v.electionEpoch == logicalclock. The current participant uses recvset to deduce on whether a majority\n * of participants has voted for it.\n */\n Map<Long, Vote> recvset = new HashMap<>();\n\n /*\n * The votes from previous leader elections, as well as the votes from the current leader election are\n * stored in outofelection. Note that notifications in a LOOKING state are not stored in outofelection.\n * Only FOLLOWING or LEADING notifications are stored in outofelection. The current participant could use\n * outofelection to learn which participant is the leader if it arrives late (i.e., higher logicalclock than\n * the electionEpoch of the received notifications) in a leader election.\n */\n Map<Long, Vote> outofelection = new HashMap<>();\n\n int notTimeout = minNotificationInterval;\n\n synchronized (this) {\n logicalclock.incrementAndGet();\n updateProposal(getInitId(), getInitLastLoggedZxid(), getPeerEpoch());\n }\n\n LOG.info(\n \"New election. My id = {}, proposed zxid=0x{}\",\n self.getMyId(),\n Long.toHexString(proposedZxid));\n sendNotifications();\n\n SyncedLearnerTracker voteSet = null;\n\n /*\n * Loop in which we exchange notifications until we find a leader\n */\n\n while ((self.getPeerState() == ServerState.LOOKING) && (!stop)) {\n /*\n * Remove next notification from queue, times out after 2 times\n * the termination time\n */\n Notification n = recvqueue.poll(notTimeout, TimeUnit.MILLISECONDS);\n\n /*\n * Sends more notifications if haven't received enough.\n * Otherwise processes new notification.\n */\n if (n == null) {\n if (manager.haveDelivered()) {\n sendNotifications();\n } else {\n manager.connectAll();\n }\n\n /*\n * Exponential backoff\n */\n notTimeout = Math.min(notTimeout << 1, maxNotificationInterval);\n\n /*\n * When a leader failure happens on a master, the backup will be supposed to receive the honour from\n * Oracle and become a leader, but the honour is likely to be delay. We do a re-check once timeout happens\n *\n * The leader election algorithm does not provide the ability of electing a leader from a single instance\n * which is in a configuration of 2 instances.\n * */\n if (self.getQuorumVerifier() instanceof QuorumOracleMaj\n && self.getQuorumVerifier().revalidateVoteset(voteSet, notTimeout != minNotificationInterval)) {\n setPeerState(proposedLeader, voteSet);\n Vote endVote = new Vote(proposedLeader, proposedZxid, logicalclock.get(), proposedEpoch);\n leaveInstance(endVote);\n return endVote;\n }\n\n LOG.info(\"Notification time out: {} ms\", notTimeout);\n\n } else if (validVoter(n.sid) && validVoter(n.leader)) {\n /*\n * Only proceed if the vote comes from a replica in the current or next\n * voting view for a replica in the current or next voting view.\n */\n switch (n.state) {\n case LOOKING:\n if (getInitLastLoggedZxid() == -1) {\n LOG.debug(\"Ignoring notification as our zxid is -1\");\n break;\n }\n if (n.zxid == -1) {\n LOG.debug(\"Ignoring notification from member with -1 zxid {}\", n.sid);\n break;\n }\n // If notification > current, replace and send messages out\n if (n.electionEpoch > logicalclock.get()) {\n logicalclock.set(n.electionEpoch);\n recvset.clear();\n if (totalOrderPredicate(n.leader, n.zxid, n.peerEpoch, getInitId(), getInitLastLoggedZxid(), getPeerEpoch())) {\n updateProposal(n.leader, n.zxid, n.peerEpoch);\n } else {\n updateProposal(getInitId(), getInitLastLoggedZxid(), getPeerEpoch());\n }\n sendNotifications();\n } else if (n.electionEpoch < logicalclock.get()) {\n LOG.debug(\n \"Notification election epoch is smaller than logicalclock. n.electionEpoch = 0x{}, logicalclock=0x{}\",\n Long.toHexString(n.electionEpoch),\n Long.toHexString(logicalclock.get()));\n break;\n } else if (totalOrderPredicate(n.leader, n.zxid, n.peerEpoch, proposedLeader, proposedZxid, proposedEpoch)) {\n updateProposal(n.leader, n.zxid, n.peerEpoch);\n sendNotifications();\n }\n\n LOG.debug(\n \"Adding vote: from={}, proposed leader={}, proposed zxid=0x{}, proposed election epoch=0x{}\",\n n.sid,\n n.leader,\n Long.toHexString(n.zxid),\n Long.toHexString(n.electionEpoch));\n\n // don't care about the version if it's in LOOKING state\n recvset.put(n.sid, new Vote(n.leader, n.zxid, n.electionEpoch, n.peerEpoch));\n\n voteSet = getVoteTracker(recvset, new Vote(proposedLeader, proposedZxid, logicalclock.get(), proposedEpoch));\n\n if (voteSet.hasAllQuorums()) {\n\n // Verify if there is any change in the proposed leader\n while ((n = recvqueue.poll(finalizeWait, TimeUnit.MILLISECONDS)) != null) {\n if (totalOrderPredicate(n.leader, n.zxid, n.peerEpoch, proposedLeader, proposedZxid, proposedEpoch)) {\n recvqueue.put(n);\n break;\n }\n }\n\n /*\n * This predicate is true once we don't read any new\n * relevant message from the reception queue\n */\n if (n == null) {\n setPeerState(proposedLeader, voteSet);\n Vote endVote = new Vote(proposedLeader, proposedZxid, logicalclock.get(), proposedEpoch);\n leaveInstance(endVote);\n return endVote;\n }\n }\n break;\n case OBSERVING:\n LOG.debug(\"Notification from observer: {}\", n.sid);\n break;\n\n /*\n * In ZOOKEEPER-3922, we separate the behaviors of FOLLOWING and LEADING.\n * To avoid the duplication of codes, we create a method called followingBehavior which was used to\n * shared by FOLLOWING and LEADING. This method returns a Vote. When the returned Vote is null, it follows\n * the original idea to break swtich statement; otherwise, a valid returned Vote indicates, a leader\n * is generated.\n *\n * The reason why we need to separate these behaviors is to make the algorithm runnable for 2-node\n * setting. An extra condition for generating leader is needed. Due to the majority rule, only when\n * there is a majority in the voteset, a leader will be generated. However, in a configuration of 2 nodes,\n * the number to achieve the majority remains 2, which means a recovered node cannot generate a leader which is\n * the existed leader. Therefore, we need the Oracle to kick in this situation. In a two-node configuration, the Oracle\n * only grants the permission to maintain the progress to one node. The oracle either grants the permission to the\n * remained node and makes it a new leader when there is a faulty machine, which is the case to maintain the progress.\n * Otherwise, the oracle does not grant the permission to the remained node, which further causes a service down.\n *\n * In the former case, when a failed server recovers and participate in the leader election, it would not locate a\n * new leader because there does not exist a majority in the voteset. It fails on the containAllQuorum() infinitely due to\n * two facts. First one is the fact that it does do not have a majority in the voteset. The other fact is the fact that\n * the oracle would not give the permission since the oracle already gave the permission to the existed leader, the healthy machine.\n * Logically, when the oracle replies with negative, it implies the existed leader which is LEADING notification comes from is a valid leader.\n * To threat this negative replies as a permission to generate the leader is the purpose to separate these two behaviors.\n *\n *\n * */\n case FOLLOWING:\n /*\n * To avoid duplicate codes\n * */\n Vote resultFN = receivedFollowingNotification(recvset, outofelection, voteSet, n);\n if (resultFN == null) {\n break;\n } else {\n return resultFN;\n }\n case LEADING:\n /*\n * In leadingBehavior(), it performs followingBehvior() first. When followingBehavior() returns\n * a null pointer, ask Oracle whether to follow this leader.\n * */\n Vote resultLN = receivedLeadingNotification(recvset, outofelection, voteSet, n);\n if (resultLN == null) {\n break;\n } else {\n return resultLN;\n }\n default:\n LOG.warn(\"Notification state unrecognized: {} (n.state), {}(n.sid)\", n.state, n.sid);\n break;\n }\n } else {\n if (!validVoter(n.leader)) {\n LOG.warn(\"Ignoring notification for non-cluster member sid {} from sid {}\", n.leader, n.sid);\n }\n if (!validVoter(n.sid)) {\n LOG.warn(\"Ignoring notification for sid {} from non-quorum member sid {}\", n.leader, n.sid);\n }\n }\n }\n return null;\n } finally {\n try {\n if (self.jmxLeaderElectionBean != null) {\n MBeanRegistry.getInstance().unregister(self.jmxLeaderElectionBean);\n }\n } catch (Exception e) {\n LOG.warn(\"Failed to unregister with JMX\", e);\n }\n self.jmxLeaderElectionBean = null;\n LOG.debug(\"Number of connection processing threads: {}\", manager.getConnectionThreadCount());\n }\n }",
"public InitialValuesConnectionCenter() \n\t{\n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(PORT);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"IOException ServerConnectionCenter.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static synchronized void init() {\n\n if (serverRunning.get()) {\n\n LOG.info(\"Initializing the Cassandra server with a default schema and default values\");\n\n String[] createKeySpace = new String[]{\n // \"USE \" + KEY_SPACE + \";\\n\", -> rather specify the key space explicitly for the generic session object we use here\n \"DROP TABLE IF EXISTS \" + KEY_SPACE + \".events;\\n\",\n \"CREATE TABLE \" + KEY_SPACE + \".events (\\n\" +\n \" eventId ASCII PRIMARY KEY,\\n\" +\n \" auditStream ASCII,\\n\" +\n \" eventJson VARCHAR\\n\" +\n \");\"\n };\n\n try {\n for (String cql : createKeySpace) {\n session.execute(cql);\n }\n } catch (Exception e) {\n LOG.error(\"The Cassandra server cannot be initialized\", e.getCause(), e.getStackTrace());\n }\n } else {\n LOG.info(\"The Cassandra server cannot be initialized because it is not running\");\n }\n\n }",
"protected void init() {\n new AsyncTask<Void, Void, Void>() {\n @Override\n protected Void doInBackground(Void... params) {\n RosFragmentActivity.this.init(nodeMainExecutorService);\n //Let everyone know that init is called\n synchronized (mNodeInitListeners) {\n for (final NodeInitListener nodeInitListener : mNodeInitListeners) {\n nodeInitListener.onNodeInit(nodeMainExecutorService, getMasterUri());\n }\n mNodeInitListeners.clear();\n }\n return null;\n }\n }.execute();\n }",
"private ClientBootstrap() {\r\n init();\r\n }",
"public DuckSourceRemote initialize() throws Exception;",
"public void conectServer() {\n\n\t}",
"@Override\n\tpublic void takeLeadership(CuratorFramework curator) throws Exception\n\t{\n\n\t\tLOG.info(\"a new leader has been elected: kaboom.id={}\", config.getKaboomId());\n\t\n\t\tThread.sleep(30 * 1000);\n\n\t\twhile (true)\n\t\t{\n\t\t\tMap<String, String> partitionToHost = new HashMap<String, String>();\n\t\t\tMap<String, List<String>> hostToPartition = new HashMap<String, List<String>>();\n\t\t\tfinal Map<String, KaBoomNodeInfo> clients = new HashMap<String, KaBoomNodeInfo>();\n\t\t\tMap<String, List<String>> clientToPartitions = new HashMap<String, List<String>>();\n\t\t\tMap<String, String> partitionToClient = new HashMap<String, String>();\n\t\t\tList<String> topics = new ArrayList<String>();\n\n\t\t\t// Get a full set of metadata from Kafka\n\t\t\tStateUtils.readTopicsFromZooKeeper(config.getKafkaZkConnectionString(), topics);\n\n\t\t\t// Map partition to host and host to partition\n\t\t\tStateUtils.getPartitionHosts(config.getKafkaSeedBrokers(), topics, partitionToHost, hostToPartition);\n\n\t\t\t// Get a list of active clients from zookeeper\n\t\t\tStateUtils.getActiveClients(curator, clients);\n\n\t\t\t// Get a list of current assignments\n\t\t\t// Get a list of current assignments\n\t\t\t\n\t\t\tfor (String partition : partitionToHost.keySet())\n\t\t\t{\n\t\t\t\tStat stat = curator.checkExists().forPath(\"/kaboom/assignments/\" + partition);\n\t\t\t\t\n\t\t\t\tif (stat != null)\n\t\t\t\t{\n\t\t\t\t\t// check if the client is still connected, and delete node if it is not.\n\t\t\t\t\t\n\t\t\t\t\tString client = new String(curator.getData().forPath(\"/kaboom/assignments/\" + partition), UTF8);\n\t\t\t\t\t\n\t\t\t\t\tif (clients.containsKey(client))\n\t\t\t\t\t{\n\t\t\t\t\t\tLOG.debug(\"Partition {} : client {} is connected\", partition, client);\n\t\t\t\t\t\t\n\t\t\t\t\t\tpartitionToClient.put(partition, client);\t\t\t\t\t\t\n\t\t\t\t\t\tList<String> parts = clientToPartitions.get(client);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (parts == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparts = new ArrayList<String>();\n\t\t\t\t\t\t\tclientToPartitions.put(client, parts);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparts.add(partition);\n\t\t\t\t\t} \n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tLOG.debug(\"Partition {} : client {} is not connected\", partition, client);\n\t\t\t\t\t\tcurator.delete().forPath(\"/kaboom/assignments/\" + partition);\n\t\t\t\t\t\tstat = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tStateUtils.calculateLoad(partitionToHost, clients, clientToPartitions);\n\n\t\t\t// If any node is over its target by at least one, then unassign partitions until it is at or below its target\n\t\t\t\n\t\t\tfor (Entry<String, KaBoomNodeInfo> e : clients.entrySet())\n\t\t\t{\n\t\t\t\tString client = e.getKey();\n\t\t\t\tKaBoomNodeInfo info = e.getValue();\n\n\t\t\t\tif (info.getLoad() >= info.getTargetLoad() + 1)\n\t\t\t\t{\n\t\t\t\t\tList<String> localPartitions = new ArrayList<String>();\n\t\t\t\t\tList<String> remotePartitions = new ArrayList<String>();\n\n\t\t\t\t\tfor (String partition : clientToPartitions.get(client))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (partitionToHost.get(partition).equals(info.getHostname()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlocalPartitions.add(partition);\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\tremotePartitions.add(partition);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (info.getLoad() > info.getTargetLoad())\n\t\t\t\t\t{\n\t\t\t\t\t\tString partitionToDelete;\n\t\t\t\t\t\tif (remotePartitions.size() > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpartitionToDelete = remotePartitions.remove(rand.nextInt(remotePartitions.size()));\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\tpartitionToDelete = localPartitions.remove(rand.nextInt(localPartitions.size()));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tLOG.info(\"Unassgning {} from overloaded client {}\", partitionToDelete, client);\n\t\t\t\t\t\tpartitionToClient.remove(partitionToDelete);\n\t\t\t\t\t\tclientToPartitions.get(client).remove(partitionToDelete);\n\t\t\t\t\t\tinfo.setLoad(info.getLoad() - 1);\n\n\t\t\t\t\t\tcurator.delete().forPath(\"/kaboom/assignments/\" + partitionToDelete);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Sort the clients by percent load, then add unassigned clients to the lowest loaded client\t\t\t\n\t\t\t{\n\t\t\t\tList<String> sortedClients = new ArrayList<String>();\n\t\t\t\tComparator<String> comparator = new Comparator<String>()\n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(String a, String b)\n\t\t\t\t\t{\n\t\t\t\t\t\tKaBoomNodeInfo infoA = clients.get(a);\n\t\t\t\t\t\tdouble valA = infoA.getLoad() / infoA.getTargetLoad();\n\n\t\t\t\t\t\tKaBoomNodeInfo infoB = clients.get(b);\n\t\t\t\t\t\tdouble valB = infoB.getLoad() / infoB.getTargetLoad();\n\n\t\t\t\t\t\tif (valA == valB)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn 0;\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\tif (valA > valB)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn -1;\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\tsortedClients.addAll(clients.keySet());\n\n\t\t\t\tfor (String partition : partitionToHost.keySet())\n\t\t\t\t{\n\t\t\t\t\t// If it's already assigned, skip it\n\t\t\t\t\t\n\t\t\t\t\tif (partitionToClient.containsKey(partition))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tCollections.sort(sortedClients, comparator);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * \n\t\t\t\t\t * Iterate through the list until we find either a local client below capacity, or we reach the ones that are \n\t\t\t\t\t * above capacity. If we reach clients above capacity, then just assign it to the first node.\n\t\t\t\t\t */\n\t\t\t\t\t\n\t\t\t\t\tLOG.info(\"Going to assign {}\", partition);\n\t\t\t\t\tString chosenClient = null;\n\t\t\t\t\t\n\t\t\t\t\tfor (String client : sortedClients)\n\t\t\t\t\t{\n\t\t\t\t\t\tLOG.info(\"- Checking {}\", client);\t\t\t\t\t\t\n\t\t\t\t\t\tKaBoomNodeInfo info = clients.get(client);\t\t\t\t\t\t\n\t\t\t\t\t\tLOG.info(\"- Current load = {}, Target load = {}\", info.getLoad(), info.getTargetLoad());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (info.getLoad() >= info.getTargetLoad())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tchosenClient = sortedClients.get(0);\n\t\t\t\t\t\t\tbreak;\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\tif (clients.get(client).getHostname().equals(partitionToHost.get(partition)))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tchosenClient = client;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (chosenClient == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tchosenClient = sortedClients.get(0);\n\t\t\t\t\t}\n\n\t\t\t\t\tLOG.info(\"Assigning partition {} to client {}\", partition, chosenClient);\n\n\t\t\t\t\tcurator\n\t\t\t\t\t\t .create()\n\t\t\t\t\t\t .withMode(CreateMode.PERSISTENT)\n\t\t\t\t\t\t .forPath(\"/kaboom/assignments/\" + partition,\n\t\t\t\t\t\t\t chosenClient.getBytes(UTF8));\n\n\t\t\t\t\tList<String> parts = clientToPartitions.get(chosenClient);\n\t\t\t\t\t\n\t\t\t\t\tif (parts == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tparts = new ArrayList<String>();\n\t\t\t\t\t\tclientToPartitions.put(chosenClient, parts);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tparts.add(partition);\n\n\t\t\t\t\tpartitionToClient.put(partition, chosenClient);\n\n\t\t\t\t\tclients.get(chosenClient).setLoad(clients.get(chosenClient).getLoad() + 1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Check to see if the kafka_ready flag writer thread exists and is alive:\n\t\t\t * \n\t\t\t * If it doesn't exist or isn't running, start it. This is designed to \n\t\t\t * work well when the load balancer sleeps for 10 minutes after assigning \n\t\t\t * work. If that behavior changes then additional logic will be required\n\t\t\t * to ensure this isn't executed too often \n\t\t\t */\n\t\t\t\n\t\t\tif (readyFlagThread == null || !readyFlagThread.isAlive())\n\t\t\t{\n\t\t\t\tLOG.info(\"[ready flag writer] thread doesn't exist or is not running\");\t\t\t\t\n\t\t\t\treadyFlagWriter = new ReadyFlagWriter(config, curator);\n\t\t\t\treadyFlagWriter.addListener(this);\n\t\t\t\treadyFlagThread = new Thread(readyFlagWriter);\n\t\t\t\treadyFlagThread.start();\n\t\t\t\tLOG.info(\"[ready flag writer] thread created and started\");\n\t\t\t}\n\n\t\t\tThread.sleep(10 * 60 * 1000);\n\t\t}\n\t}",
"public void run() {\n\n switch( operation )\n {\n case \"Timer\":\n System.out.println( \"INFO : Timer started\" );\n try {\n // wait 7 seconds\n Thread.sleep( 7000 );\n if( !receivedOk )\n {\n // OK not received. Set self as leader\n LeaderState.getInstance().setLeaderID( ServerState.getInstance().getSelfID() );\n electionInProgress = false; // allow another election request to come in\n leaderFlag = true;\n System.out.println( \"INFO : Server s\" + LeaderState.getInstance().getLeaderID()\n + \" is selected as leader! \" );\n\n LeaderState.getInstance().resetLeader(); // reset leader lists when newly elected\n\n Runnable sender = new BullyAlgorithm( \"Sender\", \"coordinator\" );\n new Thread( sender ).start();\n }\n\n if( receivedOk && !leaderFlag )\n {\n System.out.println( \"INFO : Received OK but coordinator message was not received\" );\n\n electionInProgress = false;\n receivedOk = false;\n\n Runnable sender = new BullyAlgorithm( \"Sender\", \"election\" );\n new Thread( sender ).start();\n }\n }\n catch( Exception e ) {\n System.out.println( \"INFO : Exception in timer thread\" );\n }\n break;\n\n case \"Heartbeat\":\n while( true ) {\n try {\n Thread.sleep(10);\n if( leaderFlag && ServerState.getInstance().getSelfID() != LeaderState.getInstance().getLeaderID() ) {\n Thread.sleep( 1500 );\n Server destServer = ServerState.getInstance().getServers()\n .get( LeaderState.getInstance().getLeaderID() );\n\n MessageTransfer.sendServer(\n ServerMessage.getHeartbeat( String.valueOf(ServerState.getInstance().getSelfID()) ),\n destServer\n );\n //System.out.println( \"INFO : Sent heartbeat to leader s\" + destServer.getServerID() );\n }\n }\n\n catch( Exception e ) {\n leaderFlag = false;\n leaderUpdateComplete = false;\n System.out.println( \"WARN : Leader has failed!\" );\n // send election request\n Runnable sender = new BullyAlgorithm( \"Sender\", \"election\" );\n new Thread( sender ).start();\n }\n }\n\n case \"Sender\":\n switch( reqType ) {\n case \"election\":\n try {\n sendElectionRequest();\n } catch( Exception e ) {\n System.out.println( \"WARN : Server has failed, election request cannot be processed\" );\n }\n break;\n\n case \"ok\":\n try {\n sendOK();\n } catch( Exception e ) {\n e.printStackTrace();\n }\n break;\n\n case \"coordinator\":\n try {\n sendCoordinatorMsg();\n } catch( Exception e ) {\n e.printStackTrace();\n }\n break;\n }\n break;\n }\n }",
"protected void init(final MapWritable c) throws IOException {\n try {\n for (Map.Entry<Writable, Writable> e: c.entrySet()) {\n String key = e.getKey().toString();\n String value = e.getValue().toString();\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Config from master: \" + key + \"=\" + value);\n }\n this.conf.set(key, value);\n }\n // Master may have sent us a new address with the other configs.\n // Update our address in this case. See HBASE-719\n if(conf.get(\"hbase.regionserver.address\") != null)\n serverInfo.setServerAddress(new HServerAddress\n (conf.get(\"hbase.regionserver.address\"), \n serverInfo.getServerAddress().getPort()));\n // Master sent us hbase.rootdir to use. Should be fully qualified\n // path with file system specification included. Set 'fs.default.name'\n // to match the filesystem on hbase.rootdir else underlying hadoop hdfs\n // accessors will be going against wrong filesystem (unless all is set\n // to defaults).\n this.conf.set(\"fs.default.name\", this.conf.get(\"hbase.rootdir\"));\n this.fs = FileSystem.get(this.conf);\n this.rootDir = new Path(this.conf.get(HConstants.HBASE_DIR));\n this.log = setupHLog();\n this.logFlusher.setHLog(log);\n // Init in here rather than in constructor after thread name has been set\n this.metrics = new RegionServerMetrics();\n startServiceThreads();\n isOnline = true;\n } catch (IOException e) {\n this.stopRequested.set(true);\n isOnline = false;\n e = RemoteExceptionHandler.checkIOException(e); \n LOG.fatal(\"Failed init\", e);\n IOException ex = new IOException(\"region server startup failed\");\n ex.initCause(e);\n throw ex;\n }\n }",
"public GameServerClient(){\r\n\t\tinitComponents();\r\n\t\t}",
"public void launch() throws NotBoundException, IOException\n\t{\n\t\t//call method to connect to server\t\t\n\t\tServerManager serverConnect = initialConnect();\t\n\t\n\t\t//get Setup menu from server\n\t\tSetUpMenu newSetup = new SetUpMenu(serverConnect);\n\t\tnewSetup.welcomeMenu();\n\t}",
"void initAndListen() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tSocket clientSocket = serverSocket.accept();\n\t\t\t\t// Startuje nowy watek z odbieraniem wiadomosci.\n\t\t\t\tnew ClientHandler(clientSocket, this);\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"Accept failed.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t}",
"private void init() {\n\t\tsendPacket(new Packet01Login(\"[you have connected to \"+UPnPGateway.getMappedAddress()+\"]\", null));\n\t}",
"private void initiateServerInstance(Socket newSocket){\n KVCommunicationModule com = createCommunicationModule(newSocket);\n KVServerInstance instance = createServerInstance(com, master);\n aliveInstances.add(instance);\n Thread aliveinstancethread = new Thread(instance);\n aliveinstancethread.start();\n aliveinstancethreads.add(aliveinstancethread);\n }",
"@Override\r\n protected void start() throws StartException {\n\r\n if (!Main.INIT_COMPLETE.isReached()) startServer();\r\n new EDTRunner() {\r\n\r\n @Override\r\n protected void runInEDT() {\r\n initGUI();\r\n }\r\n };\r\n\r\n }",
"@Override\n\tpublic void initialize() {\n\t\tinitializeModel(getSeed());\n\t\tinitializeView();\n\t\tinitializeControllers();\n\t\t\n\t\tupdateScore(8);\n\t\tupdateNumberCardsLeft(86);\n\n\t}",
"public abstract void initialize();",
"public abstract void initialize();",
"public abstract void initialize();",
"private void init(){\n if(!initializing) {\n Initializer init = new Initializer();\n InitializationDetails initializationDetails = new InitializationDetails(url, download, reset, deviceID, this);\n init.execute(initializationDetails);\n initializing = true;\n }\n }",
"public MyModel() {\n mazeGeneratingServer = new Server(5400, 1000, new ServerStrategyGenerateMaze());\n solveSearchProblemServer = new Server(5401, 1000, new ServerStrategySolveSearchProblem());\n //Raise the servers\n }",
"public void startServer() {\n server.start();\n }",
"private void init() {\n\n\t\tgroup = new NioEventLoopGroup();\n\t\ttry {\n\t\t\thandler = new MoocHandler();\n\t\t\tBootstrap b = new Bootstrap();\n\t\t\t\n\t\t\t\n\t\t\t//ManagementInitializer ci=new ManagementInitializer(false);\n\t\t\t\n\t\t\tMoocInitializer mi=new MoocInitializer(handler, false);\n\t\t\t\n\t\t\t\n\t\t\t//ManagemenetIntializer ci = new ManagemenetIntializer(handler, false);\n\t\t\t//b.group(group).channel(NioSocketChannel.class).handler(handler);\n\t\t\tb.group(group).channel(NioSocketChannel.class).handler(mi);\n\t\t\tb.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 10000);\n\t\t\tb.option(ChannelOption.TCP_NODELAY, true);\n\t\t\tb.option(ChannelOption.SO_KEEPALIVE, true);\n\n\t\t\t// Make the connection attempt.\n\t\t\tchannel = b.connect(host, port).syncUninterruptibly();\n\n\t\t\t// want to monitor the connection to the server s.t. if we loose the\n\t\t\t// connection, we can try to re-establish it.\n\t\t\tChannelClosedListener ccl = new ChannelClosedListener(this);\n\t\t\tchannel.channel().closeFuture().addListener(ccl);\n\t\t\tSystem.out.println(\" channle is \"+channel);\n\t\t} catch (Exception ex) {\n\t\t\tlogger.error(\"failed to initialize the client connection\", ex);\n\n\t\t}\n\n\t\t// start outbound message processor\n\t//\tworker = new OutboundWorker(this);\n\t//\tworker.start();\n\t}",
"public void setServerInitialized(boolean initializedIn)\n {\n initialized = initializedIn;\n }",
"protected void initialize() {\n \tRobot.telemetry.setAutonomousStatus(\"Starting \" + commandName + \": \" + distance);\n \tRobot.drivetrain.resetEncoder();\n \t\n \tRobot.driveDistancePID.setSetpoint(distance);\n \tRobot.driveDistancePID.setRawTolerance(RobotPreferences.drivetrainTolerance());\n \tRobot.driveDistancePID.enable();\n \t\n \texpireTime = timeSinceInitialized() + (RobotPreferences.timeOut());\n }",
"private void configureServerInstance() {\n final String myUrl = \"http://68.71.213.88/pepinstances/json\";\n final HttpClient client = HttpClientBuilder.create().build();\n final HttpPost httpPost = new HttpPost(myUrl);\n\n httpPost.addHeader(\"Connection\", \"keep-alive\");\n httpPost.addHeader(\"X-Conversation-Id\", \"BeepBeep123456\");\n httpPost.addHeader(\"Content-Type\", \"application/json\");\n httpPost.addHeader(\"X-API-Version\", \"1\");\n httpPost.addHeader(\"Accept\", \"application/json;apiversion=1\");\n httpPost.addHeader(\"Authorization\", \"BEARER \" + token);\n httpPost.addHeader(\"X-Disney-Internal-PoolOverride-WDPROAPI\",\n \"XXXXXXXXXXXXXXXXXXXXXXXXX\");\n\n final String bodyRequest = \"\";\n HttpEntity entity;\n try {\n entity = new ByteArrayEntity(bodyRequest.getBytes(\"UTF-8\"));\n httpPost.setEntity(entity);\n\n final HttpResponse response = client.execute(httpPost);\n final HttpEntity eResponse = response.getEntity();\n final String responseBody = EntityUtils.toString(eResponse);\n final JSONObject lampStack = new JSONObject(responseBody)\n .getJSONObject(\"LAMPSTACK\");\n if (lampStack.getString(\"LIVE INSTANCE\").equals(\"A\")) {\n setServerInstance(\"A\");\n } else if (lampStack.getString(\"LIVE INSTANCE\").equals(\"B\")) {\n setServerInstance(\"B\");\n } else {\n setServerInstance(\"B\");\n }\n\n } catch (final Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n }",
"public synchronized void start() throws IOException, ClassNotFoundException, RemoteReadException, InstantiationException, IllegalAccessException, InterruptedException\n\t{\n\t\t// Start up the peer. 06/14/2017, Bing Li\n\t\tif (!this.peer.isStarted())\n\t\t{\n\t\t\tthis.peer.start();\n\t\t}\n\n\t\t// Retrieve all of the registered IP addresses of the distributed nodes in the cluster from the registry server. 07/05/2017, Bing Li\n\t\tClusterIPResponse ipResponse = (ClusterIPResponse)this.peer.read(RegistryConfig.PEER_REGISTRY_ADDRESS, RegistryConfig.PEER_REGISTRY_PORT, new ClusterIPRequest());\n\t\tif (ipResponse.getIPs() != null)\n\t\t{\n\t\t\t// Add the IP addresses to the client pool. 07/05/2017, Bing Li\n\t\t\tfor (IPAddress ip : ipResponse.getIPs().values())\n\t\t\t{\n\t\t\t\tthis.peer.getClientPool().addIP(ip.getIP(), ip.getPort());\n\t\t\t}\n\n\t\t\t// Initialize the cluster root IP address broadcast notifier. 07/05/2017, Bing Li\n\t\t\tthis.rootIPBroadcastNotifier = new ClusterRootBroadcastNotifier<IPAddress, OldRootIPAddressBroadcastNotification, RootIPAddressBroadcastNotificationCreator>(this.peer.getClientPool(), MulticastConfig.MULTICASTOR_POOL_SIZE, MulticastConfig.RESOURCE_WAIT_TIME, new RootIPAddressBroadcastNotificationCreator());\n\t\t\t// Broadcast the root IP address to each child in the cluster. 07/05/2017, Bing Li\n\t\t\tthis.rootIPBroadcastNotifier.notifiy(new IPAddress(this.peer.getPeerID(), this.peer.getPeerIP(), this.peer.getPort()), MulticastConfig.ROOT_BRANCH_COUNT, MulticastConfig.SUB_BRANCH_COUNT);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Initialize the cluster root IP address broadcast notifier. 07/05/2017, Bing Li\n\t\t\tthis.rootIPBroadcastNotifier = new ClusterRootBroadcastNotifier<IPAddress, OldRootIPAddressBroadcastNotification, RootIPAddressBroadcastNotificationCreator>(this.peer.getClientPool(), MulticastConfig.MULTICASTOR_POOL_SIZE, MulticastConfig.RESOURCE_WAIT_TIME, new RootIPAddressBroadcastNotificationCreator());\n\t\t}\n\t}",
"public void init() throws IOException {\r\n try {\r\n serverSocket = new ServerSocket(PORT);\r\n this.running = true;\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n }",
"public TCPMessengerServer() {\n initComponents();\n customInitComponents();\n listenForClient(); \n }",
"public abstract void init() throws ClassNotFoundException, InstantiationException, IllegalAccessException, IOException, RemoteReadException, InterruptedException;",
"private void initializeNA(){\n name = \"N/A\";\n key = \"N/A\";\n serverIpString = \"N/A\";\n serverPort = 0;\n clientListenPort = 0;\n }",
"@Override\n public void onCreate() {\n super.onCreate();\n singleton = this;\n try {\n /*TODO: Inicializar Server\n * */\n Server.getInstance(this).init();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public Server() {\n\t\tthis.currentMode = Mode.TEST; // TODO: implement\n\t}",
"public void run() {\n Runtime.getRuntime().addShutdownHook(new MNOSManagerShutdownHook(this));\n\n OFNiciraVendorExtensions.initialize();\n\n this.startDatabase();\n\n try {\n final ServerBootstrap switchServerBootStrap = this\n .createServerBootStrap();\n\n this.setServerBootStrapParams(switchServerBootStrap);\n\n switchServerBootStrap.setPipelineFactory(this.pfact);\n final InetSocketAddress sa = this.ofHost == null ? new InetSocketAddress(\n this.ofPort) : new InetSocketAddress(this.ofHost,\n this.ofPort);\n this.sg.add(switchServerBootStrap.bind(sa));\n }catch (final Exception e){\n throw new RuntimeException(e);\n }\n\n }",
"public Server()\n\t{\n\t\tusers = new ArrayList<User>();\n\t\tdepartments = new ArrayList<Department>();\n\t\ttokenGenerator = new Random(System.currentTimeMillis());\n\t}",
"protected abstract void initialize();",
"void connect() throws UnsupportedProtocolVersionException {\n if (isShutdown) return;\n\n List<Host> hosts = new ArrayList<Host>(cluster.metadata.getContactPoints());\n // shuffle so that multiple clients with the same contact points don't all pick the same control\n // host\n Collections.shuffle(hosts);\n setNewConnection(reconnectInternal(hosts.iterator(), true));\n }",
"@Override\n @SuppressWarnings(\"CallToPrintStackTrace\")\n public void simpleInitApp() {\n \n\n try {\n System.out.println(\"Using port \" + port);\n // create the server by opening a port\n server = Network.createServer(port);\n server.start(); // start the server, so it starts using the port\n } catch (IOException ex) {\n ex.printStackTrace();\n destroy();\n this.stop();\n }\n System.out.println(\"Server started\");\n // create a separat thread for sending \"heartbeats\" every now and then\n new Thread(new NetWrite()).start();\n server.addMessageListener(new ServerListener(), ChangeVelocityMessage.class);\n // add a listener that reacts on incoming network packets\n \n }",
"@Override\n public void processElection() {\n if (context.getState().equals(LEADER) || !context.getActive()) {\n return;\n }\n\n log.info(\"Peer #{} Start election\", context.getId());\n\n context.setState(CANDIDATE);\n Long term = context.incCurrentTerm();\n context.setVotedFor(context.getId());\n\n List<Integer> peersIds = context.getPeers().stream().map(Peer::getId).collect(Collectors.toList());\n long voteGrantedCount = 1L;\n long voteRevokedCount = 0L;\n\n //while didn't get heartbeat from leader or new election started\n while (checkCurrentElectionStatus(term)) {\n List<AnswerVoteDTO> answers = getVoteFromAllPeers(term, peersIds);\n peersIds = new ArrayList<>();\n for (AnswerVoteDTO answer : answers) {\n if (answer.getStatusCode().equals(OK)) {\n if (answer.getTerm() > context.getCurrentTerm()) {\n //• If RPC request or response contains term T > currentTerm: set currentTerm = T, convert to follower (§5.1)\n context.setTermGreaterThenCurrent(answer.getTerm());\n return;\n }\n if (answer.isVoteGranted()) {\n log.info(\"Peer #{} Vote granted from {}\", context.getId(), answer.getId());\n context.getPeer(answer.getId()).setVoteGranted(true);\n voteGrantedCount++;\n } else\n log.info(\"Peer #{} Vote revoked from {}\", context.getId(), answer.getId());\n voteRevokedCount++;\n } else {\n log.info(\"Peer #{} No vote answer from {}\", context.getId(), answer.getId());\n peersIds.add(answer.getId());\n }\n }\n if (voteGrantedCount >= context.getQuorum()) {\n winElection(term);\n return;\n } else if (voteRevokedCount >= context.getQuorum()) {\n loseElection(term);\n return;\n } //else retry\n delay();\n }\n }"
] | [
"0.69579905",
"0.6861309",
"0.6827129",
"0.6817442",
"0.6708196",
"0.650876",
"0.6324945",
"0.62890404",
"0.6259507",
"0.6234481",
"0.61899716",
"0.6132011",
"0.6098207",
"0.60496587",
"0.602327",
"0.5996643",
"0.5971408",
"0.59532064",
"0.59435695",
"0.594039",
"0.59373033",
"0.5927839",
"0.59246653",
"0.5918247",
"0.5908149",
"0.58916557",
"0.5873667",
"0.5856724",
"0.5854068",
"0.5838547",
"0.5800535",
"0.5797323",
"0.5768734",
"0.5745379",
"0.5719255",
"0.5711766",
"0.5709805",
"0.569413",
"0.56872106",
"0.5685323",
"0.5681317",
"0.5680902",
"0.56808954",
"0.5669729",
"0.5668265",
"0.56664145",
"0.5665724",
"0.5660704",
"0.56307364",
"0.5629598",
"0.5627426",
"0.5624688",
"0.56241065",
"0.5619655",
"0.5617375",
"0.5605493",
"0.55955666",
"0.55881274",
"0.55745804",
"0.55733705",
"0.5545118",
"0.554235",
"0.5541224",
"0.5539808",
"0.5539036",
"0.5532757",
"0.5521262",
"0.5520031",
"0.5510159",
"0.5507887",
"0.5504455",
"0.54945993",
"0.5493276",
"0.5486131",
"0.5474602",
"0.5473431",
"0.54730976",
"0.54704833",
"0.54704833",
"0.54704833",
"0.54690146",
"0.54656374",
"0.5463406",
"0.545791",
"0.5452787",
"0.5442441",
"0.543691",
"0.5432624",
"0.5426718",
"0.54251003",
"0.5424199",
"0.5419685",
"0.54182035",
"0.5415424",
"0.5413667",
"0.5411558",
"0.5402276",
"0.5398816",
"0.5397065",
"0.5391849"
] | 0.6533139 | 5 |
helper to get largest area in historgram | public int largestRectangleArea(int[] heights) {
int maxArea = 0;
// store the index
// increasing Stack
Stack<Integer> stack = new Stack<>();
int n = heights.length;
for (int i = 0; i <= n; i++) {
int currVal = i == n ? 0 : heights[i];
int right = i - 1;
while (!stack.isEmpty() && currVal <= heights[stack.peek()]) {
int h = heights[stack.pop()];
// 就是当前位置
int left = stack.isEmpty() ? 0 : stack.peek() + 1;
int area = h * (right - left + 1);
maxArea = Math.max(maxArea, area);
}
stack.push(i);
}
return maxArea;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int maxArea(int[] height);",
"static long largestRectangle(int[] h) {\n\n int max = -1;\n\n for(int i = 0; i < h.length; i++){\n int height = h[i];\n int currentW = 1;\n int pointer = i-1;\n while(pointer >= 0 && h[pointer] >= height){\n currentW++;\n pointer--;\n }\n pointer = i+1;\n while(pointer < h.length && h[pointer] >= height){\n currentW++;\n pointer++;\n }\n\n max = Math.max(max, height*currentW);\n }\n\n return max;\n\n }",
"public int maxArea(int[] height) {\n int ans = -1;\n for (int lt = 0, rt = height.length - 1; lt < rt; ) {\n ans = Math.max(ans, (rt - lt) * Math.min(height[lt], height[rt]));\n if (height[lt] < height[rt]) {\n lt++;\n } else if (height[lt] > height[rt]) {\n rt--;\n } else {\n if (height[lt + 1] < height[rt - 1]) {\n rt--;\n } else {\n lt++;\n }\n }\n }\n return ans;\n }",
"public int largestRectangleArea(int[] height) {\n if(height.length==0) return 0; \n int i=0; \n int max=0; \n Stack<Integer> stack=new Stack<Integer>();\n stack.push(0);\n while(i<height.length || !stack.isEmpty())\n {\n if(i<height.length &&( stack.isEmpty() || height[i]>=height[stack.peek()]))\n {\n stack.push(i); i++;\n }else\n {\n int top=stack.pop();\n max=Math.max(max, height[top]*(stack.isEmpty()? i: i-stack.peek()-1));\n }\n }\n return max; \n }",
"static long largestRectangle(int[] h) {\n Stack<Integer> heightStack = new Stack<Integer>();\n Stack<Integer> posStack = new Stack<Integer>();\n\n int max = 0;\n\n for(int i = 0; i < h.length; i++) {\n if(heightStack.isEmpty() || h[i] > heightStack.peek()) {\n heightStack.push(h[i]);\n posStack.push(i);\n } else if(h[i] < heightStack.peek()) {\n int tempPos = -1;\n while(!heightStack.isEmpty() && h[i] < heightStack.peek())\n { \n tempPos = posStack.pop();\n max = Math.max(heightStack.pop() * (i - tempPos), max);\n }\n\n heightStack.push(h[i]);\n posStack.push(tempPos);\n }\n }\n\n while (!heightStack.isEmpty()) {\n max = Math.max(heightStack.pop() * (h.length - posStack.pop()), max);\n }\n\n return max;\n }",
"int largestRectangleAreaNaive(int[] height) {\r\n\t\tint maxArea = 0;\r\n\t\tfor (int i = 0; i < height.length; i++) {\r\n\t\t\tint minHeight = height[i];\r\n\t\t\tfor (int j = i; j >= 0; j--) {\r\n\t\t\t\tminHeight = minHeight < height[j] ? minHeight : height[j];\r\n\t\t\t\tint area = minHeight * (i - j + 1);\r\n\t\t\t\tif (area > maxArea)\r\n\t\t\t\t\tmaxArea = area;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn maxArea;\r\n\t}",
"int largestRectangleArea(int[] height) {\r\n\t\tif (height.length == 0)\r\n\t\t\treturn 0;\r\n\t\tStack<Node> s = new Stack<Node>();\r\n\t\ts.push(new Node(0, height[0]));\r\n\t\tint maxArea = 0;\r\n\t\tfor (int i = 1; i < height.length; i++) {\r\n\t\t\tif (height[i] > s.peek().height) {\r\n\t\t\t\ts.push(new Node(i, height[i]));\r\n\t\t\t} else if (height[i] < s.peek().height) {\r\n\t\t\t\tint rightBound = i - 1;\r\n\t\t\t\tNode pre = null;\r\n\t\t\t\twhile (!s.isEmpty() && s.peek().height > height[i]) {\r\n\t\t\t\t\tpre = s.pop();\r\n\t\t\t\t\tint newArea = (rightBound - pre.index + 1) * pre.height;\r\n\t\t\t\t\tif (newArea > maxArea)\r\n\t\t\t\t\t\tmaxArea = newArea;\r\n\t\t\t\t}\r\n\t\t\t\t// if previous node's height equals to current height, don't do\r\n\t\t\t\t// anything\r\n\t\t\t\tif (s.isEmpty() || s.peek().height < height[i]) {\r\n\t\t\t\t\t// pre is non-null\r\n\t\t\t\t\ts.push(new Node(pre.index, height[i]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tint rightBound = height.length - 1;\r\n\t\twhile (!s.isEmpty()) {\r\n\t\t\tNode pre = s.pop();\r\n\t\t\tint newArea = (rightBound - pre.index + 1) * pre.height;\r\n\t\t\tif (newArea > maxArea) {\r\n\t\t\t\tmaxArea = newArea;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn maxArea;\r\n\t}",
"private static int getLargestBoundedArea(char[][] rowsArray) {\n\t HashMap<Integer, ArrayList<String>> boundedRegionPointsMap = getBoundedRegionsPlotting(rowsArray);\n\n\t boundedRegionPointsMap = checkAndMergeIntersectedPoints(boundedRegionPointsMap);\n\n\t int largestSize = -1;\n\t \n\t // Finally, iterate over the bounded regions to get the region with maximum number of points.\n\t for (Integer key : boundedRegionPointsMap.keySet()) {\n\t ArrayList<String> boundedPointsList = boundedRegionPointsMap.get(key);\n\t logInfo(\"getLargestBoundedArea() | Region key = \" + key + \" Region points = \" + boundedPointsList.size());\n\t if (largestSize < boundedPointsList.size()) {\n\t largestSize = boundedPointsList.size();\n\t }\n\t }\n\t \n\t logDebug(\"getLargestBoundedArea() | Largest region size = \"+largestSize);\n\t return largestSize;\n\t}",
"public int largestRectangleArea(int[] height) {\n if(height == null || height.length == 0){\n \treturn 0;\n }\n int max = 0;\n int len = height.length;\n for(int i=0; i<len; i++){\n \tint h = height[i];\n \tint left = i, right = i;\n //trick to avoid duplicate calculation\n \twhile(left>=0 && height[left]>=h){\n \t\tleft--;\n \t}\n \tleft++;\n \twhile(right<len && height[right]>=h){\n \t\tright++;\n \t}\n \tright--;\n \tint area = h * (right - left + 1);\n \tmax = Math.max(max, area);\n }\n return max;\n }",
"private int largestRectangleArea_impl1(int[] heights){\n int maxArea = 0;\n for(int i=0; i<heights.length; i++){\n //go right\n int j=i+1;\n if(j==heights.length||heights[i]>heights[j]){\n j=i;\n }else{\n while(j<heights.length&& heights[j] >= heights[i]){\n j++;\n }\n j--;\n }\n //go left\n int k = i-1;\n if(k<0 || heights[k] < heights[i]){\n k=i;\n }else{\n while(k>=0 && heights[k] >= heights[i]){\n k--;\n }\n k++;\n }\n int area = heights[i] * (j-k+1);\n maxArea = Math.max(maxArea, area);\n }\n return maxArea;\n }",
"private static int findBiggestArea(File inputFile) {\n\t\tchar[][] rowsArray = convertFileIntoArray(inputFile);\n\t int maxArea = getLargestBoundedArea(rowsArray);\n\t\treturn maxArea;\n\t}",
"public int largestRectangeArea_stack(int[] height){\r\n\t\tif(height==null || height.length==0) return 0;\r\n\t\tint n = height.length, maxArea = -1, h = 0, minV =Integer.MAX_VALUE, width=0;\r\n\t\tStack<Integer> value = new Stack<Integer>(), widths = new Stack<Integer>();\r\n\t\tfor(int i = 0; i<=n; i++){\r\n\t\t\tif(i>=n){\r\n\t\t\t\th=-1;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\th = height[i];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(value.empty() || h>=value.peek()){\r\n\t\t\t\tvalue.push(h);\r\n\t\t\t\twidths.push(1);\r\n\t\t\t}\r\n\t\t\telse if(h<value.peek()){\r\n\t\t\t\tminV = Integer.MAX_VALUE;\r\n\t\t\t\twidth = 0;\r\n\t\t\t\twhile(!value.empty() && h<value.peek()){\r\n\t\t\t\t\tminV= Math.min(value.pop(), minV);\r\n\t\t\t\t\twidth = width + widths.pop();\r\n\t\t\t\t\tmaxArea = Math.max(maxArea, minV*width);\r\n\t\t\t\t}\r\n\t\t\t\tvalue.push(h);\r\n\t\t\t\twidths.push(++width);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn maxArea;\r\n\t}",
"public int maxArea(int[] height) {\n int i = 0, j = height.length - 1;\n int max = 0;\n while (j > i) {\n int l = j - i;\n int w = Math.min(height[i], height[j]);\n if (l * w > max) {\n max = l * w;\n }\n if (w == height[i]) {\n i++;\n } else if (w == height[j]) {\n j--;\n }\n }\n return max;\n }",
"public int largestRectangleArea2(int[] heights) {\r\n\t\tStack<Integer> stack = new Stack<Integer>();\t\t\t//cur index\r\n\r\n\t\tint maxArea = 0;\r\n\t\tint current = 0;\r\n\r\n\t\twhile(current < heights.length) {\r\n\t\t\t//why not using isEmpty to check, cuz '-1' is always in stack (mark the end)\r\n\t\t\twhile(!stack.isEmpty() && heights[current] <= heights[stack.peek()]) {\t\t//F: diff than 42\r\n\t\t\t\tint h = heights[stack.pop()];\r\n\r\n\t\t\t\tint distance = 0;\r\n\t\t\t\tif(stack.isEmpty()) {\t\t\t//must check! \r\n\t\t\t\t\tdistance = current;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdistance = current - stack.peek() - 1;\r\n\t\t\t\t}\r\n\t\t\t\tmaxArea = Math.max(maxArea, distance * h);\r\n\t\t\t}\r\n\r\n\t\t\tstack.push(current);\r\n\t\t\tcurrent++;\r\n\t\t}\r\n\t\t//reach the end of the array, we pop all the elements of the stack e.g. handle index 1,4,5 \r\n\t\twhile(!stack.isEmpty()) {\t\t\t\r\n\t\t\tint h = heights[stack.pop()];\t\t\t\t\t//inside heights[] \r\n\r\n\t\t\tint distance = 0;\r\n\t\t\tif(stack.isEmpty()) {\r\n\t\t\t\tdistance = current;//; heights.length - (-1) - 1;\t\t\t\t\t//careful to deal with length - (-1) - 1, not just -1 \t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tdistance = current - stack.peek() - 1; //heights.length - stack.peek() - 1;\r\n\t\t\t}\r\n\t\t\t//int distance = heights.length - (stack.isEmpty() ? 0 : stack.peek()) - 1;\t\t//easy to deal with -1\r\n\r\n\t\t\tmaxArea = Math.max(maxArea, distance * h);\r\n\t\t}\r\n\r\n\t\treturn maxArea;\r\n\t}",
"public int largestRectangleArea3(int[] heights) {\r\n\t\tStack<Integer> stack = new Stack<Integer>();\t\t\t\t\t\t\t\t\t//cur index\r\n\t\t\r\n\t\tint maxArea = 0;\r\n\t\tint current = 0;\r\n\r\n\t\twhile(current < heights.length) {\r\n\t\t\twhile(!stack.isEmpty() && heights[current] <= heights[stack.peek()]) {\t\t//F: diff than 42\r\n\t\t\t\tint h = heights[stack.pop()];\r\n\r\n\t\t\t\tint distance = 0;\r\n\t\t\t\tif(stack.isEmpty()) {\t\t\t//must check! same\r\n\t\t\t\t\tdistance = current;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdistance = current - stack.peek() - 1;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tmaxArea = Math.max(maxArea, distance * h);\r\n\t\t\t}\r\n\r\n\t\t\tstack.push(current);\r\n\t\t\tcurrent++;\r\n\t\t}\r\n\t\t\r\n\t\t//reach the end of the array, we pop all the elements of the stack e.g. handle index 1,4,5 \r\n\t\twhile(!stack.isEmpty()) {\t\t\t\r\n\t\t\tint h = heights[stack.pop()];\r\n\r\n\t\t\tint distance = 0;\r\n\t\t\tif(stack.isEmpty()) {\t\t\t\t//must check! same\r\n\t\t\t\tdistance = current;\r\n\t\t\t} else {\r\n\t\t\t\tdistance = current - stack.peek() - 1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tmaxArea = Math.max(maxArea, distance * h);\r\n\t\t}\r\n\r\n\t\treturn maxArea;\r\n\t}",
"private static int findIndexOfMaxInside(final int[] hist, int i, final int j) {\n int index = -1;\n for (int max = Integer.MIN_VALUE; ++i < j; ) {\n if (hist[i] > max) {\n max = hist[index = i];\n }\n }\n return index;\n }",
"public static int maxArea(int[] height) {\n int start = 0;\n int end = height.length - 1;\n int max = 0;\n int high = 0;\n\n while (start < end) {\n high = Math.min(height[start], height[end]);\n max = Math.max(max, (end - start) * high);\n\n if(height[start] > height[end]){\n end--;\n } else{\n start++;\n }\n }\n\n return max;\n }",
"public static int largestRectangleArea(int[] heights) {\n Stack<Integer> stk = new Stack<>();\n stk.push(-1);\n int[] lefts = new int[heights.length];\n int[] rights = new int[heights.length];\n for (int i = 0; i < heights.length; i++) {\n while (stk.peek() != -1 && heights[stk.peek()] >= heights[i])\n stk.pop();\n lefts[i] = stk.peek();\n stk.push(i);\n }\n stk.clear();\n stk.push(heights.length);\n for (int j = heights.length-1; j >= 0; j--) {\n while (stk.peek() != heights.length && heights[stk.peek()] >= heights[j])\n stk.pop();\n rights[j] = stk.peek();\n stk.push(j);\n }\n\n int maxnum = 0;\n for (int i = 0; i < heights.length; i++) {\n int area = heights[i] * (rights[i]-lefts[i]-1);\n if (area > maxnum)\n maxnum = area;\n }\n return maxnum;\n }",
"public int maxArea(int[] height)\n {\n // example input :: {1,2,3,4,5,5,4,3,2,1}\n int result = Integer.MIN_VALUE;\n int ptr1 = 0;\n int ptr2 = height.length - 1; \n while(ptr1 <= ptr2)\n {\n int newArea = Math.min(height[ptr2],height[ptr1]) * (ptr2 - ptr1);\n result = Math.max(result,newArea);\n if(height[ptr1] <= height[ptr2])\n {\n ptr1++;\n }\n else\n {\n ptr2--;\n }\n }\n return result; \n }",
"public int largestRectangleArea_(int[] heights){\n\t\tif(heights == null)\n\t\t\treturn 0;\n\n\t\tint area = 0;\n\t\tint temp = 0;\n\t\tfor(int i=1; i<=heights.length; i++){\n\t\t\tfor(int j=0; j<=heights.length-i; j++){\n\t\t\t\ttemp = i * min(j,i,heights);\n\t\t\t\tarea = temp > area ? temp : area;\n\t\t\t}\n\t\t}\n\t\treturn area;\t\n\t}",
"int largestRectangleAreaSkipBars(int[] height) {\r\n\t\tint maxArea = 0;\r\n\t\tfor (int end = 0; end < height.length; end++) {\r\n\t\t\t// search for a correct right bound\r\n\t\t\twhile (end < height.length - 1 && height[end + 1] > height[end]) {\r\n\t\t\t\tend++;\r\n\t\t\t}\r\n\t\t\tint minHeight = height[end];\r\n\t\t\tfor (int j = end; j >= 0; j--) {\r\n\t\t\t\tminHeight = minHeight < height[j] ? minHeight : height[j];\r\n\t\t\t\tint area = (end - j + 1) * minHeight;\r\n\t\t\t\tif (area > maxArea)\r\n\t\t\t\t\tmaxArea = area;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn maxArea;\r\n\t}",
"public int maxArea(int[] height) {\n int maxArea = 0;\n if(height == null||height.length <2){\n \treturn maxArea;\n }\n int left =0;\n int right = height.length -1;\n while(left < right){\n \tint h = height[left] < height[right]? height[left]: height[right];\n \tint currentArea = h* (right - left);\n \tmaxArea = currentArea > maxArea? currentArea: maxArea;\n \tif(height[left] < height[right]){\n \t\tleft++;\n \t}else{\n \t\tright --;\n \t}\n }\n return maxArea;\n }",
"public static int maxArea(int[] height) {\n int maxArea = Integer.MIN_VALUE;\n int i = 0;\n int j = height.length - 1;\n\n /*\n while (i < j) {\n maxArea = Math.max(maxArea, height[i]<height[j]?(j-i)*height[i]:(j-i)*height[j]);\n if (height[j]<height[i]) {\n j--;\n } else {\n i++;\n }\n }\n */\n while (i < j)\n maxArea = Math.max(maxArea, height[i] < height[j] ? (j - i) * height[i++] : (j - i) * height[j--]);\n\n return maxArea;\n }",
"public int maxArea(int[] height) {\n\t\tint i = 0;\n\t\tint j = height.length - 1;\n\t\tint area = (j - i) * Math.min(height[i], height[j]);\n\t\t\n\t\twhile (j > i) {\n\t\t\tif (height[i] < height[j]) {\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tj--;\n\t\t\t}\n\t\t\t\n\t\t\tint newArea = (j - i) * Math.min(height[i], height[j]);\n\t\t\tif (newArea > area) {\n\t\t\t\tarea = newArea;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn area;\n\t}",
"public static int TLEmaxArea(int[] height) {\n int y = 0, y2 = 0;\n int maxs = 0;\n for (int x = 0; x < height.length - 1; x++) {\n for (int x2 = x + 1; x2 < height.length; x2++) {\n y = height[x];\n y2 = height[x2];\n maxs = Math.max(maxs, Math.min(y, y2) * (x2 - x));\n }\n }\n return maxs;\n }",
"public int maxArea(int[] height) {\n int start = 0;\n int end = height.length - 1;\n int capacity = 0;\n while (start < end) {\n int temp = (end - start) * Math.min(height[start], height[end]);\n capacity = Math.max(capacity, temp);\n if (height[start] < height[end]) {\n start++;\n }\n else {\n end--;\n }\n }\n return capacity;\n }",
"public int largestRectangleArea(int[] heights) {\n if (heights == null || heights.length == 0)\n return 0;\n int maxSize = 0;\n int len = heights.length;\n Stack<Integer> stack = new Stack<>();\n for (int i = 0; i <= len; i++) {\n // 这点非常精髓,让i可以等于len,但是高度等于0,也就是说要把之前所有的最大面积要收一下计算出来\n int h = (i == len) ? 0 : heights[i];\n if (stack.isEmpty() || heights[stack.peek()] <= h) {\n stack.push(i);\n } else {\n // means stack is notEmpty and height[i] < heights[stack.peek()]\n int topIndex = stack.pop();\n maxSize = Math.max(maxSize,\n (stack.isEmpty()? i : i - 1 - stack.peek()) * heights[topIndex]);\n i--;\n }\n }\n return maxSize;\n }",
"public int maxArea(ArrayList<Integer> a) {\n\t if(a.size() < 2){\n\t return 0;\n\t }\n\t int left = 0;\n\t int right = a.size()-1;\n\t int val = 0;\n\t\t\n\t\t// Iterate till the left and right lines are not the same\n\t while(left<right){\n\t\t\t\n\t\t\t// Update the maximum value\n\t val = Math.max(val, (right-left)*(Math.min(a.get(left), a.get(right))));\n\t\t\t\n\t\t\t// Left value is smaller than right, move right\n\t if(a.get(left) < a.get(right)){\n\t left++;\n\t }\n\t\t\t// Left value is larger than right, move left\n\t else{\n\t right--;\n\t }\n\t }\n\t return val;\n\t}",
"public static int largestArea(ImmutableList<Coordinate> coordinates) {\r\n char[][] grid = fillGrid(coordinates);\r\n\r\n // Count the size of each coordinate's area. Coordinates touching the side of the grid are infinite (-1 canary).\r\n ImmutableMap<Character, Integer> areas = coordinateAreas(grid);\r\n\r\n // Return the biggest non-infinite area.\r\n return areas.values().stream()\r\n .mapToInt(value -> value)\r\n .max()\r\n .orElseThrow(() -> new IllegalStateException(\"No areas\"));\r\n }",
"public int largestIsland(int[][] grid) {\n // First of all calculate the area of all of the islands. Assign unique id to every island.\n // Island ids start from 2 because our grid already has numbers 0 and 1\n // Replace the 1's of the island with the id of the island. Create a map of the island id and the area\n // Then again iterate over every element in the grid. Now, everytime we get zero (0), replace the zero \n // with one (1) and look at all four sides of the replace one. If we have island at any side of the \n // replaced one the add the area of that island to the max area and count the replaced one in it.\n if (grid == null || grid.length == 0) {\n return 0;\n }\n \n int max = 0;\n int islandId = 2;\n int row = grid.length;\n int col = grid[0].length;\n Map<Integer, Integer> islandArea = new HashMap<Integer, Integer>();\n int[][] directions = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};\n \n // Finding the area of every island\n for (int i = 0; i < row; i++) {\n for (int j = 0; j < col; j++) {\n if (grid[i][j] == 1) {\n int sizeOfCurrentIsland = getIslandSize(grid, i, j, islandId);\n max = Math.max(max, sizeOfCurrentIsland);\n islandArea.put(islandId++, sizeOfCurrentIsland);\n }\n }\n }\n \n // Iterating over the grid again and see if we change the value of zero (0) then what would be the max\n // area of the island.\n for (int i = 0; i < row; i++) {\n for (int j = 0; j < col; j++) {\n if (grid[i][j] == 0) {\n Set<Integer> setOfIslands = new HashSet<Integer>();\n for (int[] direction : directions) {\n int x = direction[0] + i;\n int y = direction[1] + j;\n if (x > -1 && y > -1 && x < row && y < col && grid[x][y] != 0) {\n setOfIslands.add(grid[x][y]);\n }\n }\n // Count current zero as well. So, sum is initialized to 1\n int sum = 1;\n \n for (int num : setOfIslands) {\n int value = islandArea.get(num);\n sum += value;\n }\n \n max = Math.max(max, sum);\n }\n }\n }\n \n return max;\n }",
"public static int maxAreaBruteForce(int[] height) {\n int maxArea = Integer.MIN_VALUE;\n\n for (int i = 0; i < height.length; i++) {\n for (int j = i + 1; j < height.length; j++) {\n int temp = (j - i) * (height[i] < height[j] ? height[i] : height[j]);\n if (temp > maxArea)\n maxArea = temp;\n }\n }\n\n return maxArea;\n }",
"public int maxArea(int[] height) {\n int h1 = 0, h2 = height.length - 1, area = 0;\n int maxArea = Math.abs(h2 - h1) * Math.min(height[h2], height[h1]);\n\n while (h1 < h2) {\n // Increment h1, check to see if new area is greater than current max area (width shrinks, but min height may increase)\n if (height[h1] < height[h2]) {\n h1++;\n } else {\n // Move in from h2 to see if the height(h2 -1) would give a larger area\n h2--;\n }\n // find area with a smaller width, but potenially large min height, update maxArea if necessary\n area = (h2 - h1) * Math.min(height[h2], height[h1]);\n maxArea = Math.max(area, maxArea);\n }\n return maxArea;\n }",
"private static void findMaxKi67(){\n int cellNum=0;//total cells in region\n Ki67=0;//total Ki67 in region\n float maxdivR=0;//tracks maximum Ki67 over all regions\n int[] inds = {0,0};//tracks indexes of maximum ki67\n for(int i=0;i<Data.aMX;i++){//loop over regions and find max activity\n for (int j = 0; j < Data.aMY; j++) {\n if(Data.activityMesh[i][j]>maxdivR){\n maxdivR=1.f*Data.activityMesh[i][j];\n inds[0]=i;\n inds[1]=j;\n }\n }\n }\n //redefine histology section based on maximum activity area\n Pars.histX=inds[0]*Pars.histSizeX;\n Pars.histY=inds[1]*Pars.histSizeY;\n for (int i = 0; i <cells.size(); i++) {//find %ki67 within max region\n Cell cell = (Cell) cells.get(i);\n //only count mass cells within the region of interest\n if(cell.mass && cell.x>=Pars.histX && cell.x<=Pars.histX+Pars.histSizeX && cell.y>=Pars.histY && cell.y<=Pars.histY+Pars.histSizeY) {\n Ki67+=cell.ki67;//add Ki67 val in area\n cellNum+=1;//add total cells in area\n }\n }\n Functions.writeFloat(Pars.outFile+\"data/Ki.txt\",Ki67/cellNum);//write to file\n }",
"public int maxArea2(int[] height) {\n\t\tint newArea, area = 0;\n\t\tint n = height.length;\n\t\t\n\t\tfor (int i = 0; i < n-1; i++) {\n\t\t\tfor (int j = i; j < n; j++) {\n\t\t\t\tnewArea = (j - i) * Math.min(height[i], height[j]);\n\t\t\t\tif (newArea > area) \n\t\t\t\t\tarea = newArea;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn area;\n\t}",
"public static int getIndexOfMax(double[] array){\n\n int largest = 0;\n for ( int i = 1; i < array.length; i++ )\n {\n if ( array[i] > array[largest] ) largest = i;\n }\n return largest;\n\n }",
"int max() {\n\t\t// added my sort method in the beginning to sort out array\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\n\t\t\t\tif (array[j - 1] > array[j]) {\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finds the last term in the array --> if array is sorted then the last\n\t\t// term should be max\n\t\tint x = array[array.length - 1];\n\t\treturn x;\n\t}",
"public int maxArea2(int[] height) {\n\t\tint area = 0, i = 0, j = height.length - 1;\n\n\t\twhile (i < j) {\n\t\t\tarea = Math.max(area, Math.min(height[i], height[j]) * (j - i));\n\n\t\t\tif (height[i] > height[j])\n\t\t\t\tj--;\n\t\t\telse\n\t\t\t\ti++;\n\t\t}\n\n\t\treturn area;\n\t}",
"public int maximum() {\n \n if (xft.size() == 0) {\n return -1;\n }\n \n Integer maxRepr = xft.maximum();\n \n assert(maxRepr != null);\n \n int index = maxRepr.intValue()/binSz;\n \n TreeMap<Integer, Integer> map = getTreeMap(index);\n \n assert(map != null);\n \n Entry<Integer, Integer> lastItem = map.lastEntry();\n \n assert(lastItem != null);\n \n return lastItem.getKey();\n }",
"private long getAbsMax() {\n return Math.max(Math.abs(Visualizer.getLowerBound().get()),\n Visualizer.getUpperBound().get());\n }",
"public int getMaxFloor();",
"public int heapExtractMax(){\n\t\tint max = a[0];\t\n\t\ta[0] = a[n-1];\n\t\ta[n-1] = Integer.MIN_VALUE;\n\t\tn--;\n\t\tmaxHeapfy(0);\t\t\n\t\treturn max;\n\t}",
"public static int maxArea(int[] arr) {\n\t\tint area = 0;\n\t\tint nsr[] = nearestSmallestRight(arr);\n\t\tint nsl[] = nearestSmallestLeft(arr);\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tint temp = (nsr[i]-nsl[i]-1) * arr[i];\n\t\t\tif (area< temp) {\n\t\t\t\tarea = temp;\n\t\t\t}\n\t\t}\n\t\treturn area;\n\t}",
"public static int getMaxArea(List<Integer> heights) {\n int N = heights.size(), i = 0, j = N - 1, maxArea = 0;\n while (i < j) {\n maxArea = Math.max(maxArea, Math.min(heights.get(i), heights.get(j)) * (j - i));\n if (heights.get(i) < heights.get(j)) ++i;\n else if (heights.get(i) > heights.get(j)) --j;\n else {\n ++i;\n --j;\n }\n }\n return maxArea;\n }",
"public int getMaximumPoints();",
"public static void main(String[] args) {\n\t\t\r\n\t\tint[] height = {2,1,5,6,2,3};\r\n\t\t//int[] height = {6, 2, 5, 4, 5, 1, 6}; \r\n\t\tcalLargestArea(height);\r\n\t}",
"private int indexOfLargest(ArrayList<QuakeEntry> data) {\n int index = 0;\n double magnitude = 0;\n for (QuakeEntry qe : data) {\n double currMag = qe.getMagnitude();\n if (currMag > magnitude) {\n index = data.indexOf(qe);\n magnitude = currMag;\n }\n }\n System.out.println(magnitude);\n return index;\n }",
"double largestNumber(double[] a) {\n\t\tdouble max = a[0];\n\t\tdouble no = 0;\n\t\tfor (int index = 1; index < a.length; index++) {\n\t\t\tif (max > a[index] && max > a[index + 1]) {\n\t\t\t\tno = max;\n\t\t\t\tbreak;\n\t\t\t} else if (a[index] > max && a[index] > a[index + 1]) {\n\t\t\t\tno = a[index];\n\t\t\t\tbreak;\n\t\t\t} else if (a[index + 1] > max && a[index + 1] > a[index]) {\n\t\t\t\tno = a[index + 1];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn no;\n\t}",
"private static int maxXIndex(int y, int lo, int hi, int[][] nums) {\n int maxIndex = -1;\n for (int x = lo; x < hi; x++) {\n if (maxIndex == -1 || nums[y][x] > nums[y][maxIndex])\n maxIndex = x;\n }\n return maxIndex;\n }",
"public double largestTriangleArea(int[][] points) {\n int N = points.length;\n double area = 0f;\n for (int i = 0; i < N; i++) {\n for (int j = i + 1; j < N; j++) {\n for (int k = j + 1; k < N; k++) {\n area = Math.max(area, shoelaceFormula(points[i], points[j], points[k]));\n }\n }\n }\n return area;\n }",
"private static int[] FindHighest(int[][] terrainMap) {\n\n int[] highestPosition = {-1, -1};\n int highestValue = terrainMap[0][0];\n\n int i, j;\n\n for (i = 0; i < terrainMap.length; i++) {\n for (j = 0; j < terrainMap[0].length; j++) {\n if (terrainMap[i][j] > highestValue) {\n highestValue = terrainMap[i][j];\n highestPosition[0] = i;\n highestPosition[1] = j;\n }\n }\n }\n\n return highestPosition;\n }",
"public int maxArea_wrong(int[] height) {\r\n\r\n if (height.length < 2) {\r\n return 0;\r\n }\r\n\r\n // This is actually not correct thought\r\n // need some smart to work this out!\r\n int len = height.length;\r\n int leftH = height[0];\r\n int leftHIdx = 0;\r\n int rightH = height[len - 1];\r\n int rightHIdx = len - 1;\r\n int max = Math.min(leftH, rightH) * (len - 1);\r\n\r\n int i = 1, j = len - 2;\r\n while (i < j) {\r\n while (i < j && height[i] <= leftH) {\r\n i++;\r\n }\r\n if (i < j) {\r\n leftH = height[i];\r\n leftHIdx = i;\r\n }\r\n while (i < j && height[j] <= rightH) {\r\n j--;\r\n }\r\n if (i < j) {\r\n rightH = height[j];\r\n rightHIdx = j;\r\n }\r\n int temp = Math.min(leftH, rightH) * (rightHIdx - leftHIdx);\r\n if (temp > max) {\r\n max = temp;\r\n }\r\n }\r\n\r\n return max;\r\n }",
"private float getMaxY(HomePieceOfFurniture piece) {\n float [][] points = piece.getPoints();\n float maxY = Float.NEGATIVE_INFINITY;\n for (float [] point : points) {\n maxY = Math.max(maxY, point [1]);\n } \n return maxY;\n }",
"public Point getMax () {\r\n\r\n\treturn getB();\r\n }",
"public double getBestHeight() { return getBestHeight(-1); }",
"public int getMax(final float upperBoundPercentage) {\n\t\tfinal int upperBoundPixelValueSum;\n\t\tupperBoundPixelValueSum = Math.round(upperBoundPercentage * pixelCount);\n\n\t\tint addedUpPixelValues = 0;\n\n\t\tfinal int lastHistogramIndex = pixelValueSums.length;\n\t\tint iHistogram = lastHistogramIndex;\n\n\t\tdo {\n\t\t\tiHistogram--;\n\n\t\t\tfinal int pixelValue = pixelValueSums[iHistogram];\n\t\t\taddedUpPixelValues += pixelValue;\n\n\t\t} while (addedUpPixelValues <= upperBoundPixelValueSum\n\t\t\t\t&& iHistogram > 0);\n\n\t\treturn iHistogram;\n\t}",
"public int best(){\n List<Integer> points = count();\n Integer max = 0;\n for (Integer p: points){\n if (p <= 21 && max < p){\n max = p;\n }\n }\n return max;\n }",
"static int extractHeapMax(int[] ar){\r\n\t\tif(heapSize<1) return -1;\r\n\t\tint max = ar[1];\r\n\t\tswap(ar,1,heapSize);\r\n\t\theapSize-=1;\r\n\t\tmax_heapify(ar, 1);\r\n\t\treturn max;\r\n\t}",
"public static int getMaxAreaBruteForce(List<Integer> heights) {\n int maxArea = 0, N = heights.size();\n for (int i = 0; i < N; i++)\n for (int j = i + 1; j < N; j++) {\n int currArea = Math.min(heights.get(i), heights.get(j)) * (j - i);\n if (currArea > maxArea) maxArea = currArea;\n }\n return maxArea;\n }",
"private int getDominantI(float[] l) {\n float max = 0;\n int maxi = -1;\n for(int i=0;i<l.length;i++) {\n if (l[i]>max)\n max = l[i]; maxi = i;\n }\n return maxi;\n }",
"public int theHighest() {\r\n\t\tint highest = 0;\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\tif(game[i][j].getValue() > highest)\r\n\t\t\t\t\thighest = game[i][j].getValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn highest;\r\n\t}",
"public double max()\n\n {\n double max=xyValueArray.get(0).getY();\n\n for (int i = 0; i < xyValueArray.size(); i++) {\n if (xyValueArray.get(i).getY() > max) {\n max = xyValueArray.get(i).getY();\n }\n }\n return max;\n }",
"public int getMax(){\n return tab[rangMax()];\n }",
"public static int maxArea1(int[] in){\r\n\t\tint maxArea = Integer.MIN_VALUE,area;\r\n\t\tfor(int i=0;i<in.length;++i){\r\n\t\t\tfor(int j=i+1;j<in.length;++j){\r\n\t\t\t\tarea = Math.min(in[i], in[j])* (j-i);\r\n\t\t\t\tmaxArea = Math.max(maxArea, area);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn maxArea;\r\n\t}",
"private String findMax(int[][] grid) {\n int max = 0, rx = 0, ry = 0, size = 0;\n for (int y = 1; y <= 300; y++) {\n for (int x = 1; x <= 300; x++) {\n // iterate over diameter, keep results in order to reuse them\n Map<Integer, Integer> squares = new HashMap<>(300);\n for (int d = 0; d <= 300 - Math.max(x, y); d++) {\n int current = 0;\n\n if (d == 0) {\n current += grid[y][x];\n } else {\n for (int offset = 0; offset < d; offset++) {\n current += grid[y + offset][x + d]; // skip inner square, get last column\n current += grid[y + d][x + offset]; // skip inner square, get last row\n }\n current += squares.get(d - 1); // add inner square of size (d-1)\n current += grid[y + d][x + d]; // add bottom-right corner cell\n }\n\n squares.put(d, current);\n\n if (current > max) {\n max = current;\n rx = x; ry = y;\n size = d;\n }\n }\n }\n }\n\n return rx + \",\" + ry + \",\" + (size + 1);\n }",
"private double[] computeMaxHeight(PixelPos[] corners, Rectangle rectangle) throws Exception {\n\n final float extraTileX = (float) (1 + tileExtensionPercent / 100); // = 1.5f\n final float extraTileY = (float) (1 + tileExtensionPercent / 100); // = 1.5f\n final float scaleMaxHeight = (float) (1 + tileExtensionPercent/ 100); // = 1.25f\n\n double[] heightArray = new double[2];\n\n // double square root : scales with the size of tile\n final int numberOfPoints = (int) (10 * Math.sqrt(Math.sqrt(rectangle.width * rectangle.height)));\n\n // extend tiles for which statistics is computed\n int offsetX = (int) (extraTileX * rectangle.width);\n int offsetY = (int) (extraTileY * rectangle.height);\n\n // define window\n final Window window = new Window((long) (corners[0].y - offsetY), (long) (corners[1].y + offsetY),\n (long) (corners[0].x - offsetX), (long) (corners[1].x + offsetX));\n\n // distribute points\n final int[][] points = MathUtils.distributePoints(numberOfPoints, window);\n final ArrayList<Float> heights = new ArrayList();\n\n // then for number of extra points\n for (int[] point : points) {\n float height = dem.getSample(point[1], point[0]);\n if (!Float.isNaN(height) && height != demNoDataValue) {\n heights.add(height);\n }\n }\n\n\n // get max/min and add extras ~ just to be sure\n if (heights.size() > 2) {\n // set minimum to 'zero', eg, what if there's small lake in tile?\n // heightArray[0] = Collections.min(heights);\n heightArray[0] = Collections.min(heights);\n heightArray[1] = Collections.max(heights) * scaleMaxHeight;\n } else { // if nodatavalues return 0s ~ tile in the sea\n heightArray[0] = 0;\n heightArray[1] = 0;\n }\n\n return heightArray;\n }",
"public double max(Triangle figure) {\n double[] sides = {\n figure.getA().distanceTo(figure.getB()),\n figure.getA().distanceTo(figure.getC()),\n figure.getC().distanceTo(figure.getB()),\n };\n double maxSide = 0;\n for (double i : sides) {\n if (maxSide < i) {\n maxSide = i;\n }\n }\n return maxSide;\n }",
"public static int getMax(float[][] storage) {\n float []arr=new float[WINDOW];\n for (int i = 0;i<WINDOW;i++){\n arr[i]=storage[i][1];\n }\n\n if(arr==null||arr.length==0){\n return 0;//如果数组为空 或者是长度为0 就返回null\n }\n int maxIndex=0;//假设第一个元素为最小值 那么下标设为0\n int[] arrnew=new int[2];//设置一个 长度为2的数组 用作记录 规定第一个元素存储最小值 第二个元素存储下标\n for(int i =0;i<arr.length-1;i++){\n if(arr[maxIndex]<arr[i+1]){\n maxIndex=i+1;\n }\n }\n arrnew[0]=(int)arr[maxIndex];\n arrnew[1]=maxIndex;\n\n return arrnew[0];\n }",
"private static void solve() {\n\t\tList<Integer> rgtMax= new ArrayList<>();\n\t\tList<Integer> lftMax= new ArrayList<>();\n\t\t\n\t\tpopulateRgtMax(rgtMax);\n\t\tpopulateLftMax(lftMax);\n\t\t\t\t\n\t\tint area=findMaxArea(lftMax,rgtMax);\n\t\tSystem.out.println(area);\n\t\t\n\t}",
"public int findMax(){\n return nilaiMaks(this.root);\n }",
"public static void neighborhoodMax(String szinputsegmentation,String szanchorpositions,\n int nbinsize, int numleft, int numright, int nspacing, \n\t\t\t\t\tboolean busestrand, boolean busesignal, String szcolfields,\n\t\t\t\t\tint noffsetanchor, String szoutfile,Color theColor, \n\t\t\t\t\tString sztitle,String szlabelmapping, boolean bprintimage,\n boolean bstringlabels, boolean bbrowser) throws IOException\n {\n\t//highmem\n\tboolean bchrommatch = false;//added in 1.23 to check for chromosome matches\n\t//stores all the segments in the data\n\tArrayList alsegments = new ArrayList();\n\n\t//an array of chromosome names\n\tArrayList alchromindex = new ArrayList();\n\n\tString szLine;\n\n\t//stores the largest index value for each chromosome\n\tHashMap hmchromMax = new HashMap();\n\n\t//maps chromosome names to index values\n\tHashMap hmchromToIndex = new HashMap();\n\n\tHashMap hmLabelToIndex = new HashMap(); //maps label to an index\n\tHashMap hmIndexToLabel = new HashMap(); //maps index string to label\n\n\t//stores the maximum integer label value\n\tint nmaxlabel=0;\n\tString szlabel =\"\";\n\tboolean busedunderscore = false;\n\tBufferedReader brinputsegment = Util.getBufferedReader(szinputsegmentation);\n\n\t//this loops reads in the segmentation \n\twhile ((szLine = brinputsegment.readLine())!=null)\n\t{\n\t //added v1.24\n\t if (bbrowser)\n\t {\n\t\tif ((szLine.toLowerCase(Locale.ENGLISH).startsWith(\"browser\"))||(szLine.toLowerCase(Locale.ENGLISH).startsWith(\"track\")))\n\t\t{\n\t\t continue;\n\t\t}\n\t }\n\n\t StringTokenizer st;\n\t if (bstringlabels)\n\t {\n\t st = new StringTokenizer(szLine,\"\\t\");\n\t }\n\t else\n\t {\n\t\tst = new StringTokenizer(szLine,\"\\t \");\n\t }\n\n\t //added in v1.24\n\t int numtokens = st.countTokens();\n\t if (numtokens == 0)\n\t {\n\t //skip blank lines\n\t continue;\n\t }\n\t else if (numtokens < 4)\n\t {\n\t throw new IllegalArgumentException(\"Line \"+szLine+\" in \"+szinputsegmentation+\" only had \"+numtokens+\" token(s). Expecting at least 4\");\n\t }\n\n\t String szchrom = st.nextToken().trim();\n //assumes segments are in standard bed format which to get to \n\t //0-based inclusive requires substract 1 from the end\n\t int nbegin = Integer.parseInt(st.nextToken().trim())/nbinsize;\n\t int nend = (Integer.parseInt(st.nextToken().trim())-1)/nbinsize; \n\t szlabel = st.nextToken().trim();\n\t short slabel = -1;\n\n\t if (bstringlabels)\n\t {\n\t int nunderscoreindex = szlabel.indexOf(\"_\");\n\n\t if (nunderscoreindex >=0)\n\t {\n\t String szprefix = szlabel.substring(0,nunderscoreindex);\n\n try\n\t\t {\n\t\t slabel = (short) (Short.parseShort(szprefix));\n\t\t if (slabel > nmaxlabel)\n\t\t {\n\t\t nmaxlabel = slabel;\n\t\t }\n\t\t busedunderscore = true;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t\t hmIndexToLabel.put(\"\"+slabel, szlabel);\n\t\t }\n catch (NumberFormatException ex)\n\t\t {\n try\n\t\t {\n\t\t slabel = (short) (Short.parseShort(szprefix.substring(1)));\n\t\t if (slabel > nmaxlabel)\n\t\t {\n\t\t nmaxlabel = slabel;\n\t\t }\n\t\t busedunderscore = true;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t\t hmIndexToLabel.put(\"\"+slabel, szlabel);\n\t\t }\n\t\t catch (NumberFormatException ex2)\n\t\t {\n\t\t if (busedunderscore)\n\t\t {\n\t\t throw new IllegalArgumentException(\"Not a valid ID before '_' in \"+szlabel+\", while valid ID found for other entries\");\n\t\t\t}\n\t\t }\n\t\t }\n\t }\n\n\t if (!busedunderscore)\n\t {\n //handle string labels\n Short objshort = (Short) hmLabelToIndex.get(szlabel);\n\n if (objshort == null)\n\t {\n\t nmaxlabel = hmLabelToIndex.size()+1;\n\t slabel = (short) nmaxlabel;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t hmIndexToLabel.put(\"\"+nmaxlabel, szlabel);\n\t\t }\n else\n\t {\n\t slabel = ((Short) objshort).shortValue();\n\t }\n\t }\n alsegments.add(new SegmentRec(szchrom,nbegin,nend,slabel));\n\t }\n\t else\n\t {\n try\n\t {\n\t slabel = (short) (Short.parseShort(szlabel));\n\t }\n\t catch (NumberFormatException ex)\n\t {\n try\n\t {\n slabel = (short) (Short.parseShort(szlabel.substring(1)));\n\t }\n\t catch (NumberFormatException ex2)\n\t {\n\t\t throw new IllegalArgumentException(\"In fourth column neither state number or ID found in segmentation file. Use '-labels' option to run overlap enrichment treating fourth column as labels\");\n\t\t }\n\t }\n\n\t alsegments.add(new SegmentRec(szchrom,nbegin,nend,slabel));\n\n\t if (slabel > nmaxlabel)\n\t {\n\t nmaxlabel = slabel;\n\t }\n\t }\n\n\t Integer objMax = (Integer) hmchromMax.get(szchrom);\n\t if (objMax == null)\n\t {\n\t\thmchromMax.put(szchrom,Integer.valueOf(nend));\n\t\thmchromToIndex.put(szchrom, Integer.valueOf(hmchromToIndex.size()));\n\t\talchromindex.add(szchrom);\n\t }\n\t else\n\t {\n\t\tint ncurrmax = objMax.intValue();\n\t\tif (ncurrmax < nend)\n\t\t{\n\t\t hmchromMax.put(szchrom, Integer.valueOf(nend));\t\t \n\t\t}\n\t }\n\t}\n\tbrinputsegment.close();\n\n\tint numchroms = alchromindex.size();\n short[][] labels = new short[numchroms][];\n\t//allocates space store all the segment labels for each chromosome\n\tfor (int nchrom = 0; nchrom < numchroms; nchrom++)\n\t{\n\t int nsize = ((Integer) hmchromMax.get(alchromindex.get(nchrom))).intValue()+1;\n\t labels[nchrom] = new short[nsize];\n\t short[] labels_nchrom = labels[nchrom];\n\t for (int npos = 0; npos < nsize; npos++)\n\t {\n\t\tlabels_nchrom[npos] = -1;\n\t }\n\t}\t\n\n\t//a tally on how frequently each label occurs\n\tdouble[] tallylabel = new double[nmaxlabel+1];\n\n\tint numlines = alsegments.size();\n\n\t//this loop stores into labels the full segmentation\n\t//and a count of how often each label occurs\n\tfor (int nindex = 0; nindex < numlines; nindex++)\n\t{\n\t SegmentRec theSegmentRec = (SegmentRec) alsegments.get(nindex);\n\t int nchrom = ((Integer) hmchromToIndex.get(theSegmentRec.szchrom)).intValue();\n\t short[] labels_nchrom = labels[nchrom];\n\t int nbegin = theSegmentRec.nbegin;\n\t int nend = theSegmentRec.nend;\n\t short slabel = theSegmentRec.slabel;\n\t for (int npos = nbegin; npos <= nend; npos++)\n\t {\n\t\tlabels_nchrom[npos] = slabel;\n\t\tif (slabel >= 0)\n\t\t{\n\t\t tallylabel[slabel]++; \n\t\t}\n\t }\n\t}\n\n //the number of additional intervals to the left and right to include\n\n\t//the center anchor position\n\tint numintervals = 1+numleft+numright;\n\n\t//stores a tally for each position relative to an anchor how frequently the label was observed\n\tdouble[][] tallyoverlaplabel = new double[numintervals][nmaxlabel+1]; \n\n\t//stores a tally for the total signal associated with each anchor position\n\tdouble[] dsumoverlaplabel = new double[numintervals];\n\n\tRecAnchorIndex theAnchorIndex = getAnchorIndex(szcolfields, busestrand, busesignal);\n\n\t//reads in the anchor position \n BufferedReader brcoords = Util.getBufferedReader(szanchorpositions);\n\twhile ((szLine = brcoords.readLine())!=null)\n {\n\t if (szLine.trim().equals(\"\")) continue;\n\t String[] szLineA = szLine.split(\"\\\\s+\");\n\n String szchrom = szLineA[theAnchorIndex.nchromindex]; \n\t int nanchor = (Integer.parseInt(szLineA[theAnchorIndex.npositionindex])-noffsetanchor);\n\t boolean bposstrand = true;\n\t if (busestrand)\n\t {\n\t String szstrand = szLineA[theAnchorIndex.nstrandindex];\t \n\t if (szstrand.equals(\"+\"))\n\t {\n\t bposstrand = true;\n\t }\n else if (szstrand.equals(\"-\"))\n {\n \t bposstrand = false;\n\t }\n\t else\n\t {\n \t throw new IllegalArgumentException(szstrand +\" is an invalid strand. Strand should be '+' or '-'\");\n\t }\t \n\t }\n\n\t double damount;\n\n\t if ((busesignal)&&(theAnchorIndex.nsignalindex< szLineA.length))\n\t {\n\t damount = Double.parseDouble(szLineA[theAnchorIndex.nsignalindex]);\n\t }\n\t else\n {\n\t damount = 1;\n\t }\n\n\t //updates the tallys for the given anchor position\n\t Integer objChrom = (Integer) hmchromToIndex.get(szchrom);\n if (objChrom != null)\n\t {\n\t int nchrom = objChrom.intValue();\n\t short[] labels_nchrom = labels[nchrom];\n\t bchrommatch = true;\n\n\t if (bposstrand)\n\t {\n\t int ntallyindex = 0;\n\t for(int noffset= -numleft; noffset <= numright; noffset++)\n\t {\n\t\t int nposindex = (nanchor + nspacing*noffset)/nbinsize;\n\n\t\t if ((nposindex >=0)&&(nposindex < labels_nchrom.length)&&(labels_nchrom[nposindex]>=0))\n\t\t {\n\t tallyoverlaplabel[ntallyindex][labels_nchrom[nposindex]] += damount;\t\t \n\t\t }\n\t\t ntallyindex++;\n\t\t }\n\t }\n\t else\n\t {\n\t int ntallyindex = 0;\n\t for(int noffset= numright; noffset >= -numleft; noffset--)\n\t {\n\t\t int nposindex = (nanchor + nspacing*noffset)/nbinsize;\n\n\t\t if ((nposindex >=0)&&(nposindex < labels_nchrom.length)&&(labels_nchrom[nposindex]>=0))\n\t\t {\n\t tallyoverlaplabel[ntallyindex][labels_nchrom[nposindex]]+=damount;\t\t \n\t\t }\n\t\t ntallyindex++;\n\t\t }\n\t }\n\t }\n\t}\n brcoords.close(); \t \n\n\n\tif (!bchrommatch)\n\t{\n\t throw new IllegalArgumentException(\"No chromosome name matches found between \"+szanchorpositions+\n \" and those in the segmentation file.\");\n\t}\n\n\toutputneighborhood(tallyoverlaplabel,tallylabel,dsumoverlaplabel,szoutfile,nspacing,numright,\n numleft,theColor,ChromHMM.convertCharOrderToStringOrder(szlabel.charAt(0)),sztitle,0,\n szlabelmapping,szlabel.charAt(0),bprintimage, bstringlabels, hmIndexToLabel);\n }",
"double getArea();",
"double getArea();",
"public abstract double[] getUpperBound();",
"@SuppressWarnings(\"static-method\")\n\tprivate int getYmax(BufferedImage img) {\n\t\tint width = img.getWidth();\n\t\tint height = img.getHeight();\n\t\tint trimmedHeight = 0;\n\t\tfor (int i = 0; i < width; i++) {\n\t\t\tfor (int j = height - 1; j >= 0; j--) {\n\t\t\t\tif (img.getRGB(i, j) != Color.WHITE.getRGB() && j > trimmedHeight) {\n\t\t\t\t\ttrimmedHeight = j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn trimmedHeight;\n\t}",
"private int findLargestIndex(int[] widths) {\n int largestIndex = 0;\n int largestValue = 0;\n for (int i = 0; i < widths.length; i++) {\n if (widths[i] > largestValue) {\n largestIndex = i;\n largestValue = widths[i];\n }\n }\n return largestIndex;\n }",
"private int postprocess() {\n // Index with highest probability\n int maxIndex = -1;\n float maxProb = 0.0f;\n for (int i = 0; i < outputArray[0].length; i++) {\n if (outputArray[0][i] > maxProb) {\n maxProb = outputArray[0][i];\n maxIndex = i;\n }\n }\n return maxIndex;\n }",
"private float getMaxX(HomePieceOfFurniture piece) {\n float [][] points = piece.getPoints();\n float maxX = Float.NEGATIVE_INFINITY;\n for (float [] point : points) {\n maxX = Math.max(maxX, point [0]);\n } \n return maxX;\n }",
"public int maximalRectangle(char[][] matrix) {\n if (null == matrix || matrix.length == 0 || matrix[0].length == 0) {\n return 0;\n }\n int[] height = new int[matrix[0].length];\n for (int i = 0; i < matrix[0].length; i++) {\n if (matrix[0][i] == '1') {\n height[i] = 1;\n }\n }\n int result = largestInLine(height);\n for (int i = 1; i < matrix.length; i++) {\n resetHeight(matrix, height, i);\n result = Math.max(result, largestInLine(height));\n }\n return result;\n }",
"public static void neighborhoodMaxLowMem(String szinputsegmentation,String szanchorpositions,\n int nbinsize, int numleft, int numright, int nspacing, \n\t\t\t\t\tboolean busestrand, boolean busesignal, String szcolfields,\n\t\t\t\t\tint noffsetanchor, String szoutfile,Color theColor, \n\t\t\t\t\t String sztitle,String szlabelmapping, boolean bprintimage, \n boolean bstringlabels, boolean bbrowser) throws IOException\n {\n\n\n\tboolean bchrommatch = false;//added in 1.23 to check for chromosome matches\n\t//an array of chromosome names\n\tArrayList alchromindex = new ArrayList();\n\n\tString szLine;\n\n\t//stores the largest index value for each chromosome\n\tHashMap hmchromMax = new HashMap();\n\n\t//maps chromosome names to index values\n\tHashMap hmchromToIndex = new HashMap();\n\tHashMap hmLabelToIndex = new HashMap(); //maps label to an index\n\tHashMap hmIndexToLabel = new HashMap(); //maps index string to label\n\t//stores the maximum integer label value\n\tint nmaxlabel=0;\n\tString szlabel =\"\";\n\tBufferedReader brinputsegment = Util.getBufferedReader(szinputsegmentation);\n\n\tboolean busedunderscore = false;\n //the number of additional intervals to the left and right to include\n \n \t//the center anchor position\n\tint numintervals = 1+numleft+numright;\n\n\n\t//this loops reads in the segmentation \n\twhile ((szLine = brinputsegment.readLine())!=null)\n\t{\n\t //added v1.24\n\t if (bbrowser)\n\t {\n\t\tif ((szLine.toLowerCase(Locale.ENGLISH).startsWith(\"browser\"))||(szLine.toLowerCase(Locale.ENGLISH).startsWith(\"track\")))\n\t\t{\n\t\t continue;\n\t\t}\n\t }\n\n\t StringTokenizer st;\n\t if (bstringlabels)\n\t {\n\t st = new StringTokenizer(szLine,\"\\t\");\n\t }\n\t else\n\t {\n\t st = new StringTokenizer(szLine,\"\\t \");\n\t }\n\n\t //added in v1.24\n\t int numtokens = st.countTokens();\n\t if (numtokens == 0)\n\t { \n\t //skip blank lines\n\t continue;\n\t }\n\t else if (numtokens < 4)\n\t {\n\t throw new IllegalArgumentException(\"Line \"+szLine+\" in \"+szinputsegmentation+\" only had \"+numtokens+\" token(s). Expecting at least 4\");\n\t }\n\n\t String szchrom = st.nextToken().trim();\n //assumes segments are in standard bed format which to get to \n\t //0-based inclusive requires substract 1 from the end\n\t //int nbegin = Integer.parseInt(st.nextToken().trim())/nbinsize; \n\t st.nextToken().trim();\n\t int nend = (Integer.parseInt(st.nextToken().trim())-1)/nbinsize; \n\t szlabel = st.nextToken().trim();\n\t short slabel;\n\n\t if (bstringlabels)\n\t {\n\t int nunderscoreindex = szlabel.indexOf(\"_\");\n\n\t if (nunderscoreindex >=0)\n\t {\n\t String szprefix = szlabel.substring(0,nunderscoreindex);\n\n try\n\t\t {\n\t slabel = (short) (Short.parseShort(szprefix));\n\t\t if (slabel > nmaxlabel)\n\t\t {\n\t nmaxlabel = slabel;\n\t\t }\n\t\t busedunderscore = true;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t\t hmIndexToLabel.put(\"\"+slabel, szlabel);\n\t\t }\n catch (NumberFormatException ex)\n\t\t {\n try\n\t\t {\n\t\t slabel = (short) (Short.parseShort(szprefix.substring(1)));\n\t\t if (slabel > nmaxlabel)\n\t\t {\n\t\t nmaxlabel = slabel;\n\t\t }\n\t\t busedunderscore = true;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t\t hmIndexToLabel.put(\"\"+slabel, szlabel);\n\t\t }\n\t\t catch (NumberFormatException ex2)\n\t\t {\n\t\t if (busedunderscore)\n\t\t {\n\t\t throw new IllegalArgumentException(\"Not a valid ID before '_' in \"+szlabel+\", while valid ID found for other entries\");\n\t\t }\n\t\t }\n\t\t }\n\t }\n\n\t if (!busedunderscore)\n\t {\n\t //handle string labels\n\t Short objshort = (Short) hmLabelToIndex.get(szlabel);\n\n\t if (objshort == null)\n\t {\n\t\t nmaxlabel = hmLabelToIndex.size()+1;\n\t\t slabel = (short) nmaxlabel;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t\t hmIndexToLabel.put(\"\"+nmaxlabel, szlabel);\n\t\t }\n\t }\n\t }\n\t else\n\t {\n try\n\t {\n\t slabel = (short) (Short.parseShort(szlabel));\n\t }\n\t catch (NumberFormatException ex)\n\t {\n try\n\t {\n slabel = (short) (Short.parseShort(szlabel.substring(1)));\n\t }\n\t catch (NumberFormatException ex2)\n\t {\n\t throw new IllegalArgumentException(\"In fourth column neither state number or ID found in segmentation file. Use '-labels' option to run overlap enrichment treating fourth column as labels\");\n\t }\n\t }\n\t \n\t //alsegments.add(new SegmentRec(szchrom,nbegin,nend,slabel));\n\n\t if (slabel > nmaxlabel)\n\t {\n\t nmaxlabel = slabel;\n\t }\n\t }\n\n\t Integer objMax = (Integer) hmchromMax.get(szchrom);\n\t if (objMax == null)\n\t {\n\t\t//System.out.println(\"on chrom \"+szchrom);\n\t\thmchromMax.put(szchrom,Integer.valueOf(nend));\n\t\thmchromToIndex.put(szchrom, Integer.valueOf(hmchromToIndex.size()));\n\t\talchromindex.add(szchrom);\n\t }\n\t else\n\t {\n\t\tint ncurrmax = objMax.intValue();\n\t\tif (ncurrmax < nend)\n\t\t{\n\t\t hmchromMax.put(szchrom, Integer.valueOf(nend));\t\t \n\t\t}\n\t }\n\t}\n\tbrinputsegment.close();\n\n\t//stores a tally for each position relative to an anchor how frequently the label was observed\n\tdouble[][] tallyoverlaplabel = new double[numintervals][nmaxlabel+1]; \n\n\t//stores a tally for the total signal associated with each anchor position\n\tdouble[] dsumoverlaplabel = new double[numintervals];\n\n //a tally on how frequently each label occurs\n double[] tallylabel = new double[nmaxlabel+1];\n\n\n\tint numchroms = alchromindex.size();\n\n //short[][] labels = new short[numchroms][];\n\n\t//allocates space store all the segment labels for each chromosome\n\tfor (int nchrom = 0; nchrom < numchroms; nchrom++)\n\t{\n \t //stores all the segments in the data\n\t //ArrayList alsegments = new ArrayList();\n\t brinputsegment = Util.getBufferedReader(szinputsegmentation);\n\t String szchromwant = (String) alchromindex.get(nchrom);\n\t //System.out.println(\"processing \"+szchromwant);\n\t int nsize = ((Integer) hmchromMax.get(alchromindex.get(nchrom))).intValue()+1;\n\t short[] labels = new short[nsize];\n\t //this loops reads in the segmentation \n\n\n\t //short[] labels_nchrom = labels[nchrom];\n\t for (int npos = 0; npos < nsize; npos++)\n {\n labels[npos] = -1;\n }\n\t\t\n\t while ((szLine = brinputsegment.readLine())!=null)\n\t {\n\t //int numlines = alsegments.size();\n\t StringTokenizer st;\n\t if (bstringlabels)\n\t {\n\t st = new StringTokenizer(szLine,\"\\t\");\n\t }\n\t else\n\t {\n\t st = new StringTokenizer(szLine,\"\\t \");\n\t }\n\n\t String szchrom = st.nextToken().trim();\n\t if (!szchromwant.equals(szchrom))\n\t\t continue;\n\n\t bchrommatch = true;\n //assumes segments are in standard bed format which to get to \n\t //0-based inclusive requires substract 1 from the end\n\t int nbegin = Integer.parseInt(st.nextToken().trim())/nbinsize;\n\t int nend = (Integer.parseInt(st.nextToken().trim())-1)/nbinsize; \n\t szlabel = st.nextToken().trim();\n\t short slabel = -1;\n\n\t if (bstringlabels)\n\t {\n\t int nunderscoreindex = szlabel.indexOf(\"_\");\n\n\t\t if (nunderscoreindex >=0)\n\t\t {\n\t\t String szprefix = szlabel.substring(0,nunderscoreindex);\n\n try\n\t\t {\n\t\t slabel = (short) (Short.parseShort(szprefix));\n\t\t busedunderscore = true;\n\t\t }\n catch (NumberFormatException ex)\n\t\t {\n try\n\t\t {\n\t\t slabel = (short) (Short.parseShort(szprefix.substring(1)));\n\t\t\t busedunderscore = true;\n\t\t }\n\t\t catch (NumberFormatException ex2)\n\t\t {\n\t\t\t if (busedunderscore)\n\t\t\t {\n\t\t\t throw new IllegalArgumentException(\"Not a valid ID before '_' in \"+szlabel+\", while valid ID found for other entries\");\n\t\t\t }\n\t\t }\n\t\t }\n\t\t }\n\n\t\t if (!busedunderscore)\n\t\t {\n\t //handle string labels\n\t\t Short objshort = (Short) hmLabelToIndex.get(szlabel);\n\t\t slabel = ((Short) objshort).shortValue();\n\t }\n\t }\n\t else\n\t {\n try\n\t {\n\t\t slabel = (short) (Short.parseShort(szlabel));\n\t }\n\t catch (NumberFormatException ex)\n\t {\n try\n\t\t {\n slabel = (short) (Short.parseShort(szlabel.substring(1)));\n\t\t }\n\t\t catch (NumberFormatException ex2)\n\t\t {\n\t\t throw new IllegalArgumentException(\"In fourth column neither state number or ID found in segmentation file. Use '-labels' option to run overlap enrichment treating fourth column as labels\");\n\t\t }\n\t }\n\t }\n\n\t //this loop stores into labels the full segmentation\n\t //and a count of how often each label occurs\n\t //for (int nindex = 0; nindex < numlines; nindex++)\n\t //{\n\t //SegmentRec theSegmentRec = (SegmentRec) alsegments.get(nindex);\n\t //int nchrom = ((Integer) hmchromToIndex.get(theSegmentRec.szchrom)).intValue();\n\t //short[] labels_nchrom = labels[nchrom];\n\t //int nbegin = theSegmentRec.nbegin;\n\t //int nend = theSegmentRec.nend;\n\t //short slabel = theSegmentRec.slabel;\n\t for (int npos = nbegin; npos <= nend; npos++)\n\t {\n\t labels[npos] = slabel;\n\t }\n\n\t if (slabel >= 0)\n\t {\n\t tallylabel[slabel]+=(nend-nbegin)+1; \n\t }\t \n\t }\n\t brinputsegment.close();\n\n\n\t RecAnchorIndex theAnchorIndex = getAnchorIndex(szcolfields, busestrand, busesignal);\n\n \t //reads in the anchor position \n BufferedReader brcoords = Util.getBufferedReader(szanchorpositions);\n\t while ((szLine = brcoords.readLine())!=null)\n {\n\t if (szLine.trim().equals(\"\")) continue;\n\t String[] szLineA = szLine.split(\"\\\\s+\");\n\n String szchrom = szLineA[theAnchorIndex.nchromindex]; \n\t if (!szchrom.equals(szchromwant)) \n continue;\n\n\t int nanchor = (Integer.parseInt(szLineA[theAnchorIndex.npositionindex])-noffsetanchor);\n\t boolean bposstrand = true;\n\t if (busestrand)\n\t {\n\t String szstrand = szLineA[theAnchorIndex.nstrandindex];\t \n\t if (szstrand.equals(\"+\"))\n\t {\n\t bposstrand = true;\n\t }\n else if (szstrand.equals(\"-\"))\n {\n \t bposstrand = false;\n\t }\n\t else\n\t {\n \t throw new IllegalArgumentException(szstrand +\" is an invalid strand. Strand should be '+' or '-'\");\n\t\t }\t \n\t }\n\n\t double damount;\n\n\t if ((busesignal)&&(theAnchorIndex.nsignalindex< szLineA.length))\n\t {\n\t damount = Double.parseDouble(szLineA[theAnchorIndex.nsignalindex]);\n\t }\n\t else\n {\n\t damount = 1;\n\t }\n\n\t //updates the tallys for the given anchor position\n\t //Integer objChrom = (Integer) hmchromToIndex.get(szchrom);\n //if (objChrom != null)\n\t //{\n\t // int nchrom = objChrom.intValue();\n\t\t //short[] labels_nchrom = labels[nchrom];\n\n\t if (bposstrand)\n\t {\n\t int ntallyindex = 0;\n\t for(int noffset= -numleft; noffset <= numright; noffset++)\n\t {\n\t\t int nposindex = (nanchor + nspacing*noffset)/nbinsize;\n\n\t\t if ((nposindex >=0)&&(nposindex < labels.length)&&(labels[nposindex]>=0))\n\t\t {\n\t tallyoverlaplabel[ntallyindex][labels[nposindex]] += damount;\t\t \n\t\t }\n\t\t ntallyindex++;\n\t\t }\n\t\t }\n\t else\n\t {\n\t int ntallyindex = 0;\n\t for(int noffset= numright; noffset >= -numleft; noffset--)\n\t {\n\t\t int nposindex = (nanchor + nspacing*noffset)/nbinsize;\n\n\t\t if ((nposindex >=0)&&(nposindex < labels.length)&&(labels[nposindex]>=0))\n\t\t {\n\t tallyoverlaplabel[ntallyindex][labels[nposindex]]+=damount;\t\t \n\t\t }\n\t\t ntallyindex++;\n\t\t }\n\t\t //}\n\t\t }\n\t }\n brcoords.close(); \t \n\t}\n\n\tif (!bchrommatch)\n\t{\n\t throw new IllegalArgumentException(\"No chromosome name matches found between \"+szanchorpositions+\n \" and those in the segmentation file.\");\n\t}\n\n\toutputneighborhood(tallyoverlaplabel,tallylabel,dsumoverlaplabel,szoutfile,nspacing,numright,\n numleft,theColor,ChromHMM.convertCharOrderToStringOrder(szlabel.charAt(0)),sztitle,0,\n szlabelmapping,szlabel.charAt(0), bprintimage, bstringlabels, hmIndexToLabel);\n }",
"public Boolean getLargestAxis() {\n\t\tdouble widthX = this.maxx.getData().getX()-this.minx.getData().getX();\n\t\tdouble widthY = this.maxy.getData().getY()-this.miny.getData().getY();\n\t\treturn (widthX > widthY);\n\t}",
"public String max() {\n\t\tif (this.empty()) {\n\t\t\treturn null;\n\t\t}\n\t\tAVLNode max = (AVLNode) this.root;\n\t\twhile (max.getRight().getHeight() != -1) {\n\t\t\tmax = (AVLNode) max.getRight();\n\t\t}\n\t\treturn max.getValue();\n\t}",
"private static int upperBound(int[] A, int target) {\n int max = A.length;\n int min = -1;\n while (max - min > 1) {\n int mid = ( max + min ) / 2;\n if(A[mid] <= target) {\n min = mid;\n } else {\n max = mid;\n }\n }\n\n return max;\n\n }",
"static int linear(int[] hist) {\n final int len = hist.length;\n // look from the point of view of each individual x (rather than in terms of areas)\n // each individual position can contribute a bar of water from the top of the bar to water level\n // ... and water level, if any, is determined by the min of 2 higher bars to left and right\n\n // prepare maxima from the left\n final int[] lftMax = new int[len];\n for (int i = 0, max = 0; i < len; i++) {\n max = lftMax[i] = Math.max(max, hist[i]);\n }\n\n // prepare maxima from the right\n final int[] rgtMax = new int[len];\n for (int i = len, max = 0; --i >= 0; ) {\n max = rgtMax[i] = Math.max(max, hist[i]);\n }\n\n int water = 0;\n for (int i = 0; i < len; i++) {\n final int level = Math.min(lftMax[i], rgtMax[i]);\n final int waterAbove = level - hist[i]; // negative if bar higher than level\n if (waterAbove > 0) {\n water += waterAbove;\n }\n }\n return water;\n }",
"public int calculateMaximumPosition() {\n\t\tdouble[] maxVal = { inputArray[0], 0 };\n\t\tfor (int i = 0; i < inputArray.length; i++) {\n\t\t\tif (inputArray[i] > maxVal[0]) {\n\t\t\t\tmaxVal[0] = inputArray[i];\n\t\t\t\tmaxVal[1] = i;\n\t\t\t}\n\t\t}\n\t\treturn (int) maxVal[1];\n\t}",
"public int maximalRectangle(char[][] matrix) {\n if(matrix.length==0) return 0; \n int [][] calMatrix=new int [matrix.length][matrix[0].length]; \n for(int j=0; j<matrix[0].length; j++)\n {\n for(int i=0; i<matrix.length; i++)\n {\n if(matrix[i][j]=='0')\n {\n calMatrix[i][j]=0;\n }else\n {\n calMatrix[i][j]=1+(i>0? calMatrix[i-1][j]: 0);\n }\n }\n }\n int result=0; \n for(int i=0; i<matrix.length; i++)\n {\n result=Math.max(result, largestRectangleArea(calMatrix[i]) );\n }\n return result; \n }",
"public double getBiggestY() {\r\n double y = 0;\r\n List<Enemy> enemyLowest = this.lowestLine();\r\n if (enemyLowest.size() > 0) {\r\n y = enemyLowest.get(0).getCollisionRectangle().getBoundaries().getLowY();\r\n for (Enemy e: enemyLowest) {\r\n if (e.getCollisionRectangle().getBoundaries().getLowY() > y) {\r\n y = e.getCollisionRectangle().getBoundaries().getLowY();\r\n }\r\n }\r\n return y;\r\n }\r\n return y;\r\n }",
"private void getMaxValue(){\n maxValue = array[0];\n for(int preIndex = -1; preIndex<number; preIndex++){\n for(int sufIndex = preIndex+1; sufIndex<=number;sufIndex++){\n long maxTmp = getPrefixValue(preIndex)^getSuffixCValue(sufIndex);\n if(maxTmp>maxValue){\n maxValue = maxTmp;\n }\n }\n }\n System.out.println(maxValue);\n }",
"public int indexOfLargest( ArrayList<QuakeEntry> quakeData ) {\n\t\tint maxIndex = -1;\n\t\tdouble maxMag = 0.0;\n\t\tfor( int i = 0; i < quakeData.size(); ++i ) {\n\t\t\tdouble mag = quakeData.get( i ).getMagnitude();\n\t\t\tif( mag > maxMag ) {\n\t\t\t\tmaxMag = mag;\n\t\t\t\tmaxIndex = i;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\treturn maxIndex;\n\t}",
"private static int divideAndConquer(int[] hist, int first, int last) {\n if (last - first < 2) { // single bar or 2 bars don't hold water\n return 0;\n } else {\n final int idxMax = findIndexOfMaxInside(hist, first, last);\n final int maxVal = hist[idxMax];\n final int level = Math.min(hist[first], hist[last]);\n\n if (maxVal <= level) { // hollow area: base case!\n int water = 0;\n for (int i = first + 1; i < last; ++i) {\n water += level - hist[i]; // subtract 'bottom'\n }\n return water;\n } else { // maxVal sticks above water: conquer\n return divideAndConquer(hist, first, idxMax) + divideAndConquer(hist, idxMax, last);\n }\n }\n }",
"private void getArea() {\n\t\tdouble a = 0;\n\t\tint n = points.length;\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\ta += (points[i-1].x + points[i].x) * (points[i-1].y - points[i].y);\n\t\t}\n\t\t// process last segment if ring is not closed\n\t\tif (!points[0].equals(points[n-1])) {\n\t\t\ta += (points[n-1].x + points[0].x) * (points[n-1].y - points[0].y);\n\t\t}\n\t\tarea = Math.abs(a / 2);\n\t}",
"public int area() {\n \tarea = width()*height();\n }",
"public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(maxArea(new int[]{1,8,6,2,5,4,8,3,7}));\n\n\t}",
"public int getIndexOfMaxNumber(int[] array) {\n\t\tint left = 0, right = array.length - 1;\n\t\twhile (left < right - 1) {\n\t\t\tint mid = left + (right - left) / 2;\n\t\t\tif (array[mid - 1] > array[mid]) {\n\t\t\t\treturn mid - 1;\n\t\t\t}\n\t\t\tif (array[mid] > array[mid + 1]) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\t// up to this point,\n\t\t\t// mid == right || array[mid] < array[mid + 1] ||\n\t\t\t// mid == left || array[mid - 1] < array[mid]\n\t\t\tif (array[mid] <= array[left]) {\n\t\t\t\tright = mid;\n\t\t\t} else {\n\t\t\t\tleft = mid;\n\t\t\t}\n\t\t}\n\t\t// up to this point, left == right - 1;\n\t\treturn array[left] >= array[right] ? left : right;\n\t}",
"double getUpperThreshold();",
"public double getMaxDensity(){\n\t\tdouble mode = Math.floor(((double)(sampleSize + 1) * (type1Size + 1)) / (populationSize + 2));\n\t\treturn getDensity(mode);\n\t}",
"int getMaxStamina();",
"public double getMaxCoordinateValue() {\n if (this.max_x > this.max_y)\n return this.max_x;\n else\n return this.max_y;\n }",
"float yMax();",
"public double getMaxDensity(){\n\t\tdouble mode = Math.exp(location - scale * scale);\n\t\treturn getDensity(mode);\n\t}",
"public int upperBoundary(){\r\n\t\treturn yStart - Constants.FLOOR_HEIGHT;\r\n\t}"
] | [
"0.72452223",
"0.69971967",
"0.69422936",
"0.692795",
"0.6858489",
"0.6856323",
"0.6784701",
"0.67746586",
"0.6748649",
"0.6687675",
"0.6679654",
"0.666731",
"0.6639073",
"0.661878",
"0.65332615",
"0.6532624",
"0.651937",
"0.64984185",
"0.6489015",
"0.647269",
"0.6468389",
"0.645618",
"0.6427274",
"0.6405016",
"0.6399696",
"0.6384506",
"0.6375423",
"0.6346657",
"0.6339024",
"0.6323494",
"0.63168377",
"0.6277377",
"0.62489694",
"0.62436754",
"0.6158679",
"0.6157655",
"0.612563",
"0.6118316",
"0.611268",
"0.61095124",
"0.6087085",
"0.6072022",
"0.6067246",
"0.60600764",
"0.6049555",
"0.60146624",
"0.5995887",
"0.59811026",
"0.59403735",
"0.5937502",
"0.5933465",
"0.5900848",
"0.58988184",
"0.5898431",
"0.58940935",
"0.5877176",
"0.5851257",
"0.58482486",
"0.58309823",
"0.5807026",
"0.58036345",
"0.5803622",
"0.5801168",
"0.5801039",
"0.5793997",
"0.5764959",
"0.57633513",
"0.5757852",
"0.57468003",
"0.57464105",
"0.57390994",
"0.57390994",
"0.5731516",
"0.5727211",
"0.5726501",
"0.5724409",
"0.571235",
"0.56984425",
"0.569253",
"0.56899893",
"0.5689331",
"0.5688627",
"0.5682685",
"0.56807363",
"0.5672596",
"0.5667127",
"0.5655783",
"0.5649603",
"0.5643571",
"0.5637697",
"0.5630338",
"0.56173337",
"0.5599089",
"0.55986947",
"0.55889875",
"0.55783397",
"0.5573914",
"0.5560393",
"0.55549973",
"0.55533576"
] | 0.67976534 | 6 |
helper to get max rectangle area from some (1, 1) point | private int maxRectangle(char[][] matrix, int row, int col) {
int m = matrix.length;
int n = matrix[0].length;
int maxArea = 0;
int minWidth = Integer.MAX_VALUE;
for (int i = row; i < m && matrix[i][col] == '1'; i++) {
int width = 0;
while (width + col < n && matrix[i][width + col] == '1') {
width++;
}
minWidth = Math.min(minWidth, width);
maxArea = Math.max(maxArea, minWidth * (i - row + 1));
}
return maxArea;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int maxArea(int[] height);",
"public int minAreaRect(int[][] points) {\n if (points.length < 4)\n return 0;\n\n // in order to check if a certain points exists.¬\n Set<Integer> allPointsHash = new HashSet<>(points.length);\n for (int i = 0; i < points.length; i++)\n allPointsHash.add(points[i][0] * 40001 + points[i][1]);\n\n int ans = Integer.MAX_VALUE;\n\n for (int i = 0; i < points.length; ++i)\n for (int j = i + 1; j < points.length; ++j)\n // not in the same x/y axis\n if (points[i][0] != points[j][0] && points[i][1] != points[j][1])\n // has another two points in order to form a rectangle\n if (allPointsHash.contains(40001 * points[i][0] + points[j][1])\n && allPointsHash.contains(40001 * points[j][0] + points[i][1]))\n ans = Math.min(ans, Math.abs(points[j][0] - points[i][0])\n * Math.abs(points[j][1] - points[i][1]));\n\n return ans == Integer.MAX_VALUE ? 0 : ans;\n }",
"public static int maxArea1(int[] in){\r\n\t\tint maxArea = Integer.MIN_VALUE,area;\r\n\t\tfor(int i=0;i<in.length;++i){\r\n\t\t\tfor(int j=i+1;j<in.length;++j){\r\n\t\t\t\tarea = Math.min(in[i], in[j])* (j-i);\r\n\t\t\t\tmaxArea = Math.max(maxArea, area);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn maxArea;\r\n\t}",
"public int maxArea(ArrayList<Integer> a) {\n\t if(a.size() < 2){\n\t return 0;\n\t }\n\t int left = 0;\n\t int right = a.size()-1;\n\t int val = 0;\n\t\t\n\t\t// Iterate till the left and right lines are not the same\n\t while(left<right){\n\t\t\t\n\t\t\t// Update the maximum value\n\t val = Math.max(val, (right-left)*(Math.min(a.get(left), a.get(right))));\n\t\t\t\n\t\t\t// Left value is smaller than right, move right\n\t if(a.get(left) < a.get(right)){\n\t left++;\n\t }\n\t\t\t// Left value is larger than right, move left\n\t else{\n\t right--;\n\t }\n\t }\n\t return val;\n\t}",
"static long largestRectangle(int[] h) {\n\n int max = -1;\n\n for(int i = 0; i < h.length; i++){\n int height = h[i];\n int currentW = 1;\n int pointer = i-1;\n while(pointer >= 0 && h[pointer] >= height){\n currentW++;\n pointer--;\n }\n pointer = i+1;\n while(pointer < h.length && h[pointer] >= height){\n currentW++;\n pointer++;\n }\n\n max = Math.max(max, height*currentW);\n }\n\n return max;\n\n }",
"public double minAreaFreeRect(int[][] points) {\n if (points.length < 4) {\n return 0;\n }\n\n //key: info of distance, x,y center positions\n double minVal = Double.MAX_VALUE;\n Map<String, List<int[]>> map = new HashMap<>();\n for (int i = 0; i < points.length - 1; i++) {\n for (int j = i + 1; j < points.length; j++) {\n long dis = (points[i][0] - points[j][0]) * (points[i][0] - points[j][0]) +\n (points[i][1] - points[j][1]) * (points[i][1] - points[j][1]);\n double centerX = (double)(points[i][0] + points[j][0]) / 2;\n double centerY = (double)(points[i][1] + points[j][1]) / 2;\n String key = dis + \" \" + centerX + \" \" + centerY;\n if (!map.containsKey(key)) {\n map.put(key, new ArrayList<int[]>());\n }\n map.get(key).add(new int[]{i,j});\n }\n }\n\n //therefore all vals stored in same key can form rectangles\n //just try all of them to find the one with smallest area\n for (String key: map.keySet()) {\n if (map.get(key).size() < 2) {\n continue;\n }\n List<int[]> values = map.get(key);\n for (int i = 0; i < values.size() - 1; i++) {\n for (int j = i + 1; j < values.size(); j++) {\n int p1 = values.get(i)[0];\n int p2 = values.get(i)[1];\n int p3 = values.get(j)[0];\n\n double len1 = Math.sqrt((points[p1][0] - points[p3][0]) * (points[p1][0] - points[p3][0]) + (points[p1][1] - points[p3][1]) * (points[p1][1] - points[p3][1]));\n double len2 = Math.sqrt((points[p2][0] - points[p3][0]) * (points[p2][0] - points[p3][0]) + (points[p2][1] - points[p3][1]) * (points[p2][1] - points[p3][1]));\n\n minVal = Math.min(minVal, len1 * len2);\n }\n }\n }\n return minVal == Double.MAX_VALUE? 0: minVal;\n\n }",
"public int largestRectangleArea(int[] height) {\n if(height.length==0) return 0; \n int i=0; \n int max=0; \n Stack<Integer> stack=new Stack<Integer>();\n stack.push(0);\n while(i<height.length || !stack.isEmpty())\n {\n if(i<height.length &&( stack.isEmpty() || height[i]>=height[stack.peek()]))\n {\n stack.push(i); i++;\n }else\n {\n int top=stack.pop();\n max=Math.max(max, height[top]*(stack.isEmpty()? i: i-stack.peek()-1));\n }\n }\n return max; \n }",
"int largestRectangleAreaNaive(int[] height) {\r\n\t\tint maxArea = 0;\r\n\t\tfor (int i = 0; i < height.length; i++) {\r\n\t\t\tint minHeight = height[i];\r\n\t\t\tfor (int j = i; j >= 0; j--) {\r\n\t\t\t\tminHeight = minHeight < height[j] ? minHeight : height[j];\r\n\t\t\t\tint area = minHeight * (i - j + 1);\r\n\t\t\t\tif (area > maxArea)\r\n\t\t\t\t\tmaxArea = area;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn maxArea;\r\n\t}",
"public int maximalRectangle(char[][] matrix) {\n if(matrix.length==0) return 0; \n int [][] calMatrix=new int [matrix.length][matrix[0].length]; \n for(int j=0; j<matrix[0].length; j++)\n {\n for(int i=0; i<matrix.length; i++)\n {\n if(matrix[i][j]=='0')\n {\n calMatrix[i][j]=0;\n }else\n {\n calMatrix[i][j]=1+(i>0? calMatrix[i-1][j]: 0);\n }\n }\n }\n int result=0; \n for(int i=0; i<matrix.length; i++)\n {\n result=Math.max(result, largestRectangleArea(calMatrix[i]) );\n }\n return result; \n }",
"private void getArea() {\n\t\tdouble a = 0;\n\t\tint n = points.length;\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\ta += (points[i-1].x + points[i].x) * (points[i-1].y - points[i].y);\n\t\t}\n\t\t// process last segment if ring is not closed\n\t\tif (!points[0].equals(points[n-1])) {\n\t\t\ta += (points[n-1].x + points[0].x) * (points[n-1].y - points[0].y);\n\t\t}\n\t\tarea = Math.abs(a / 2);\n\t}",
"public int largestRectangleArea(int[] height) {\n if(height == null || height.length == 0){\n \treturn 0;\n }\n int max = 0;\n int len = height.length;\n for(int i=0; i<len; i++){\n \tint h = height[i];\n \tint left = i, right = i;\n //trick to avoid duplicate calculation\n \twhile(left>=0 && height[left]>=h){\n \t\tleft--;\n \t}\n \tleft++;\n \twhile(right<len && height[right]>=h){\n \t\tright++;\n \t}\n \tright--;\n \tint area = h * (right - left + 1);\n \tmax = Math.max(max, area);\n }\n return max;\n }",
"public int minAreaRect(int[][] points) {\r\n\r\n\t\tif(points==null){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tMap<Integer, List<Integer>> map = new HashMap<Integer, List<Integer>>();\r\n\t\t\r\n\t\tint minArea = Integer.MAX_VALUE;\r\n\t\tfor(int[] point:points){\r\n\t\t\t\r\n\t\t\tif(!map.containsKey(point[0])){\r\n\t\t\t\tmap.put(point[0], (new ArrayList<Integer>()));\r\n\t\t\t}\r\n\t\t\tmap.get(point[0]).add(point[1]);\r\n\t\t}\r\n\t\t\r\n\t\tfor(int[] point1:points){\r\n\t\t\tfor(int[] point2:points){\r\n\t\t\t\t\r\n\t\t\t\t//check two points of diagonal\r\n\t\t\t\tif(point1[0]==point2[0]||point1[1]==point2[1]){\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t//find the parallel points\r\n\t\t\t\tif(map.get(point1[0]).contains(point2[1]) && map.get(point2[0]).contains(point1[1])){\r\n\t\t\t\t\tminArea = Math.min(minArea, Math.abs((point1[0]-point2[0])*(point1[1]-point2[1])));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn minArea==Integer.MAX_VALUE?0:minArea;\r\n\t}",
"public Point getMaxPoint() {\r\n int maximumX = children.get(0).getShapeEndingPoint().getX();\r\n int maximumY = children.get(0).getShapeEndingPoint().getY();\r\n for(IShape shape: children) {\r\n if(shape.getShapeEndingPoint().getX() > maximumX) {\r\n maximumX = shape.getShapeEndingPoint().getX();\r\n }\r\n if(shape.getShapeEndingPoint().getY() > maximumY) {\r\n maximumY = shape.getShapeEndingPoint().getY();\r\n }\r\n }\r\n maxPoint = new Point(maximumX,maximumY);\r\n return maxPoint;\r\n }",
"public int getMaximumPoints();",
"public int maxArea(int[] height) {\n int ans = -1;\n for (int lt = 0, rt = height.length - 1; lt < rt; ) {\n ans = Math.max(ans, (rt - lt) * Math.min(height[lt], height[rt]));\n if (height[lt] < height[rt]) {\n lt++;\n } else if (height[lt] > height[rt]) {\n rt--;\n } else {\n if (height[lt + 1] < height[rt - 1]) {\n rt--;\n } else {\n lt++;\n }\n }\n }\n return ans;\n }",
"public int area() {\n \tarea = width()*height();\n }",
"public int maxArea(int[] height)\n {\n // example input :: {1,2,3,4,5,5,4,3,2,1}\n int result = Integer.MIN_VALUE;\n int ptr1 = 0;\n int ptr2 = height.length - 1; \n while(ptr1 <= ptr2)\n {\n int newArea = Math.min(height[ptr2],height[ptr1]) * (ptr2 - ptr1);\n result = Math.max(result,newArea);\n if(height[ptr1] <= height[ptr2])\n {\n ptr1++;\n }\n else\n {\n ptr2--;\n }\n }\n return result; \n }",
"public int largestRectangeArea_stack(int[] height){\r\n\t\tif(height==null || height.length==0) return 0;\r\n\t\tint n = height.length, maxArea = -1, h = 0, minV =Integer.MAX_VALUE, width=0;\r\n\t\tStack<Integer> value = new Stack<Integer>(), widths = new Stack<Integer>();\r\n\t\tfor(int i = 0; i<=n; i++){\r\n\t\t\tif(i>=n){\r\n\t\t\t\th=-1;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\th = height[i];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(value.empty() || h>=value.peek()){\r\n\t\t\t\tvalue.push(h);\r\n\t\t\t\twidths.push(1);\r\n\t\t\t}\r\n\t\t\telse if(h<value.peek()){\r\n\t\t\t\tminV = Integer.MAX_VALUE;\r\n\t\t\t\twidth = 0;\r\n\t\t\t\twhile(!value.empty() && h<value.peek()){\r\n\t\t\t\t\tminV= Math.min(value.pop(), minV);\r\n\t\t\t\t\twidth = width + widths.pop();\r\n\t\t\t\t\tmaxArea = Math.max(maxArea, minV*width);\r\n\t\t\t\t}\r\n\t\t\t\tvalue.push(h);\r\n\t\t\t\twidths.push(++width);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn maxArea;\r\n\t}",
"public int area(int x, int y) {\n\n if (x >= 125 && x <= 250 && y >= 300 && y <= 425) {\n return 0;\n }\n if (x >= 10 && x <= 100 && y >= 150 && y <= 275) {\n return 1;\n }\n if (x >= 10 && x <= 100 && y >= 300 && y <= 425) {\n return 2;\n }\n if (x >= 300 && x <= 390 && y >= 10 && y <= 135) {\n return 3;\n }\n if (x >= 400 && x <= 490 && y >= 10 && y <= 135) {\n return 4;\n }\n if (x >= 500 && x <= 490 && y >= 10 && y <= 135) {\n return 5;\n }\n if (x >= 600 && x <= 590 && y >= 10 && y <= 135) {\n return 6;\n }\n if (x >= 300 && x <= 390 && y >= 150 && y <= 275) {\n return 7;\n }\n if (x >= 400 && x <= 490 && y >= 150 && y <= 275) {\n return 8;\n }\n if (x >= 500 && x <= 590 && y >= 150 && y <= 275) {\n return 9;\n }\n if (x >= 600 && x <= 690 && y >= 150 && y <= 275) {\n return 10;\n }\n return -1;\n }",
"Rectangle getBoundingBox(Rectangle rect);",
"private static int getLargestBoundedArea(char[][] rowsArray) {\n\t HashMap<Integer, ArrayList<String>> boundedRegionPointsMap = getBoundedRegionsPlotting(rowsArray);\n\n\t boundedRegionPointsMap = checkAndMergeIntersectedPoints(boundedRegionPointsMap);\n\n\t int largestSize = -1;\n\t \n\t // Finally, iterate over the bounded regions to get the region with maximum number of points.\n\t for (Integer key : boundedRegionPointsMap.keySet()) {\n\t ArrayList<String> boundedPointsList = boundedRegionPointsMap.get(key);\n\t logInfo(\"getLargestBoundedArea() | Region key = \" + key + \" Region points = \" + boundedPointsList.size());\n\t if (largestSize < boundedPointsList.size()) {\n\t largestSize = boundedPointsList.size();\n\t }\n\t }\n\t \n\t logDebug(\"getLargestBoundedArea() | Largest region size = \"+largestSize);\n\t return largestSize;\n\t}",
"int largestRectangleArea(int[] height) {\r\n\t\tif (height.length == 0)\r\n\t\t\treturn 0;\r\n\t\tStack<Node> s = new Stack<Node>();\r\n\t\ts.push(new Node(0, height[0]));\r\n\t\tint maxArea = 0;\r\n\t\tfor (int i = 1; i < height.length; i++) {\r\n\t\t\tif (height[i] > s.peek().height) {\r\n\t\t\t\ts.push(new Node(i, height[i]));\r\n\t\t\t} else if (height[i] < s.peek().height) {\r\n\t\t\t\tint rightBound = i - 1;\r\n\t\t\t\tNode pre = null;\r\n\t\t\t\twhile (!s.isEmpty() && s.peek().height > height[i]) {\r\n\t\t\t\t\tpre = s.pop();\r\n\t\t\t\t\tint newArea = (rightBound - pre.index + 1) * pre.height;\r\n\t\t\t\t\tif (newArea > maxArea)\r\n\t\t\t\t\t\tmaxArea = newArea;\r\n\t\t\t\t}\r\n\t\t\t\t// if previous node's height equals to current height, don't do\r\n\t\t\t\t// anything\r\n\t\t\t\tif (s.isEmpty() || s.peek().height < height[i]) {\r\n\t\t\t\t\t// pre is non-null\r\n\t\t\t\t\ts.push(new Node(pre.index, height[i]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tint rightBound = height.length - 1;\r\n\t\twhile (!s.isEmpty()) {\r\n\t\t\tNode pre = s.pop();\r\n\t\t\tint newArea = (rightBound - pre.index + 1) * pre.height;\r\n\t\t\tif (newArea > maxArea) {\r\n\t\t\t\tmaxArea = newArea;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn maxArea;\r\n\t}",
"public double getArea(){\n if (getHeight()<0 || getWidth()<0){\n System.out.println(\"Input Invalid\");\n return -1;\n }\n return (getWidth() * getHeight());\n }",
"public int maximalRectangle(char[][] matrix) {\n if (null == matrix || matrix.length == 0 || matrix[0].length == 0) {\n return 0;\n }\n int[] height = new int[matrix[0].length];\n for (int i = 0; i < matrix[0].length; i++) {\n if (matrix[0][i] == '1') {\n height[i] = 1;\n }\n }\n int result = largestInLine(height);\n for (int i = 1; i < matrix.length; i++) {\n resetHeight(matrix, height, i);\n result = Math.max(result, largestInLine(height));\n }\n return result;\n }",
"public int getArea()\n {\n //implement a recursive method\n\t if (width==1) \n\t {\n\t\t return 1;\n\t }\n\t else\n\t {\n\t\t Square smallerSquare = new Square(width - 1);\n\t\t return (2 * width - 1 + smallerSquare.getArea());\n\t }\n }",
"static long largestRectangle(int[] h) {\n Stack<Integer> heightStack = new Stack<Integer>();\n Stack<Integer> posStack = new Stack<Integer>();\n\n int max = 0;\n\n for(int i = 0; i < h.length; i++) {\n if(heightStack.isEmpty() || h[i] > heightStack.peek()) {\n heightStack.push(h[i]);\n posStack.push(i);\n } else if(h[i] < heightStack.peek()) {\n int tempPos = -1;\n while(!heightStack.isEmpty() && h[i] < heightStack.peek())\n { \n tempPos = posStack.pop();\n max = Math.max(heightStack.pop() * (i - tempPos), max);\n }\n\n heightStack.push(h[i]);\n posStack.push(tempPos);\n }\n }\n\n while (!heightStack.isEmpty()) {\n max = Math.max(heightStack.pop() * (h.length - posStack.pop()), max);\n }\n\n return max;\n }",
"double getArea();",
"double getArea();",
"public int maxArea(int[] height) {\n int maxArea = 0;\n if(height == null||height.length <2){\n \treturn maxArea;\n }\n int left =0;\n int right = height.length -1;\n while(left < right){\n \tint h = height[left] < height[right]? height[left]: height[right];\n \tint currentArea = h* (right - left);\n \tmaxArea = currentArea > maxArea? currentArea: maxArea;\n \tif(height[left] < height[right]){\n \t\tleft++;\n \t}else{\n \t\tright --;\n \t}\n }\n return maxArea;\n }",
"public int getArea() {\n\t\treturn this.height * this.width;\n\t}",
"public int getArea() {\n return (getXLength() * getYWidth());\n }",
"public static double largerArea(Rectangle y, Circle x){\n if(x.getArea() > y.area()){\n return x.getArea();\n }\n else{\n return y.area();\n }\n }",
"Rectangle getBounds();",
"public static double largerArea(Circle x, Rectangle y){\n if(x.getArea() > y.area()){\n return x.getArea();\n }\n else{\n return y.area();\n }\n }",
"private int largestRectangleArea_impl1(int[] heights){\n int maxArea = 0;\n for(int i=0; i<heights.length; i++){\n //go right\n int j=i+1;\n if(j==heights.length||heights[i]>heights[j]){\n j=i;\n }else{\n while(j<heights.length&& heights[j] >= heights[i]){\n j++;\n }\n j--;\n }\n //go left\n int k = i-1;\n if(k<0 || heights[k] < heights[i]){\n k=i;\n }else{\n while(k>=0 && heights[k] >= heights[i]){\n k--;\n }\n k++;\n }\n int area = heights[i] * (j-k+1);\n maxArea = Math.max(maxArea, area);\n }\n return maxArea;\n }",
"public int largestRectangleArea(int[] heights) {\r\n int maxArea = 0;\r\n \r\n // store the index\r\n // increasing Stack\r\n Stack<Integer> stack = new Stack<>();\r\n int n = heights.length;\r\n\r\n for (int i = 0; i <= n; i++) {\r\n int currVal = i == n ? 0 : heights[i];\r\n \r\n int right = i - 1;\r\n\r\n while (!stack.isEmpty() && currVal <= heights[stack.peek()]) {\r\n int h = heights[stack.pop()];\r\n // 就是当前位置\r\n int left = stack.isEmpty() ? 0 : stack.peek() + 1;\r\n \r\n int area = h * (right - left + 1);\r\n \r\n maxArea = Math.max(maxArea, area);\r\n }\r\n \r\n stack.push(i);\r\n }\r\n \r\n return maxArea;\r\n }",
"private static int findBiggestArea(File inputFile) {\n\t\tchar[][] rowsArray = convertFileIntoArray(inputFile);\n\t int maxArea = getLargestBoundedArea(rowsArray);\n\t\treturn maxArea;\n\t}",
"public static int maxArea(int[] arr) {\n\t\tint area = 0;\n\t\tint nsr[] = nearestSmallestRight(arr);\n\t\tint nsl[] = nearestSmallestLeft(arr);\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tint temp = (nsr[i]-nsl[i]-1) * arr[i];\n\t\t\tif (area< temp) {\n\t\t\t\tarea = temp;\n\t\t\t}\n\t\t}\n\t\treturn area;\n\t}",
"public Integer getArea() {\n\t\treturn this.getX() * this.getY();\n\t}",
"public Point getMax () {\r\n\r\n\treturn getB();\r\n }",
"public double getMaxCoordinateValue() {\n if (this.max_x > this.max_y)\n return this.max_x;\n else\n return this.max_y;\n }",
"public int maxArea(int[] height) {\n int h1 = 0, h2 = height.length - 1, area = 0;\n int maxArea = Math.abs(h2 - h1) * Math.min(height[h2], height[h1]);\n\n while (h1 < h2) {\n // Increment h1, check to see if new area is greater than current max area (width shrinks, but min height may increase)\n if (height[h1] < height[h2]) {\n h1++;\n } else {\n // Move in from h2 to see if the height(h2 -1) would give a larger area\n h2--;\n }\n // find area with a smaller width, but potenially large min height, update maxArea if necessary\n area = (h2 - h1) * Math.min(height[h2], height[h1]);\n maxArea = Math.max(area, maxArea);\n }\n return maxArea;\n }",
"public int maxArea(int[] height) {\n int i = 0, j = height.length - 1;\n int max = 0;\n while (j > i) {\n int l = j - i;\n int w = Math.min(height[i], height[j]);\n if (l * w > max) {\n max = l * w;\n }\n if (w == height[i]) {\n i++;\n } else if (w == height[j]) {\n j--;\n }\n }\n return max;\n }",
"public int largestRectangleArea2(int[] heights) {\r\n\t\tStack<Integer> stack = new Stack<Integer>();\t\t\t//cur index\r\n\r\n\t\tint maxArea = 0;\r\n\t\tint current = 0;\r\n\r\n\t\twhile(current < heights.length) {\r\n\t\t\t//why not using isEmpty to check, cuz '-1' is always in stack (mark the end)\r\n\t\t\twhile(!stack.isEmpty() && heights[current] <= heights[stack.peek()]) {\t\t//F: diff than 42\r\n\t\t\t\tint h = heights[stack.pop()];\r\n\r\n\t\t\t\tint distance = 0;\r\n\t\t\t\tif(stack.isEmpty()) {\t\t\t//must check! \r\n\t\t\t\t\tdistance = current;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdistance = current - stack.peek() - 1;\r\n\t\t\t\t}\r\n\t\t\t\tmaxArea = Math.max(maxArea, distance * h);\r\n\t\t\t}\r\n\r\n\t\t\tstack.push(current);\r\n\t\t\tcurrent++;\r\n\t\t}\r\n\t\t//reach the end of the array, we pop all the elements of the stack e.g. handle index 1,4,5 \r\n\t\twhile(!stack.isEmpty()) {\t\t\t\r\n\t\t\tint h = heights[stack.pop()];\t\t\t\t\t//inside heights[] \r\n\r\n\t\t\tint distance = 0;\r\n\t\t\tif(stack.isEmpty()) {\r\n\t\t\t\tdistance = current;//; heights.length - (-1) - 1;\t\t\t\t\t//careful to deal with length - (-1) - 1, not just -1 \t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tdistance = current - stack.peek() - 1; //heights.length - stack.peek() - 1;\r\n\t\t\t}\r\n\t\t\t//int distance = heights.length - (stack.isEmpty() ? 0 : stack.peek()) - 1;\t\t//easy to deal with -1\r\n\r\n\t\t\tmaxArea = Math.max(maxArea, distance * h);\r\n\t\t}\r\n\r\n\t\treturn maxArea;\r\n\t}",
"private float getMaxY(HomePieceOfFurniture piece) {\n float [][] points = piece.getPoints();\n float maxY = Float.NEGATIVE_INFINITY;\n for (float [] point : points) {\n maxY = Math.max(maxY, point [1]);\n } \n return maxY;\n }",
"public static int TLEmaxArea(int[] height) {\n int y = 0, y2 = 0;\n int maxs = 0;\n for (int x = 0; x < height.length - 1; x++) {\n for (int x2 = x + 1; x2 < height.length; x2++) {\n y = height[x];\n y2 = height[x2];\n maxs = Math.max(maxs, Math.min(y, y2) * (x2 - x));\n }\n }\n return maxs;\n }",
"public double area() {\n\t\treturn width * height;\n\t}",
"public static int maxArea(int[] height) {\n int start = 0;\n int end = height.length - 1;\n int max = 0;\n int high = 0;\n\n while (start < end) {\n high = Math.min(height[start], height[end]);\n max = Math.max(max, (end - start) * high);\n\n if(height[start] > height[end]){\n end--;\n } else{\n start++;\n }\n }\n\n return max;\n }",
"public int largestRectangleArea_(int[] heights){\n\t\tif(heights == null)\n\t\t\treturn 0;\n\n\t\tint area = 0;\n\t\tint temp = 0;\n\t\tfor(int i=1; i<=heights.length; i++){\n\t\t\tfor(int j=0; j<=heights.length-i; j++){\n\t\t\t\ttemp = i * min(j,i,heights);\n\t\t\t\tarea = temp > area ? temp : area;\n\t\t\t}\n\t\t}\n\t\treturn area;\t\n\t}",
"public double findArea(){\n\t\tdouble area= (0.5*(length * width));\n\t\treturn area;\n\t}",
"public static int maxArea(int[] height) {\n int maxArea = Integer.MIN_VALUE;\n int i = 0;\n int j = height.length - 1;\n\n /*\n while (i < j) {\n maxArea = Math.max(maxArea, height[i]<height[j]?(j-i)*height[i]:(j-i)*height[j]);\n if (height[j]<height[i]) {\n j--;\n } else {\n i++;\n }\n }\n */\n while (i < j)\n maxArea = Math.max(maxArea, height[i] < height[j] ? (j - i) * height[i++] : (j - i) * height[j--]);\n\n return maxArea;\n }",
"private static int areaofrectangle(int i, int j) {\n\n\t\tresult = i * j;\n\t\treturn result;\n\t}",
"public int maxArea2(int[] height) {\n\t\tint newArea, area = 0;\n\t\tint n = height.length;\n\t\t\n\t\tfor (int i = 0; i < n-1; i++) {\n\t\t\tfor (int j = i; j < n; j++) {\n\t\t\t\tnewArea = (j - i) * Math.min(height[i], height[j]);\n\t\t\t\tif (newArea > area) \n\t\t\t\t\tarea = newArea;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn area;\n\t}",
"public Rectangle getBoundsBigger() {\n return new Rectangle(x-32,y-32,128,128);\n }",
"public int maxArea(int[] height) {\n int start = 0;\n int end = height.length - 1;\n int capacity = 0;\n while (start < end) {\n int temp = (end - start) * Math.min(height[start], height[end]);\n capacity = Math.max(capacity, temp);\n if (height[start] < height[end]) {\n start++;\n }\n else {\n end--;\n }\n }\n return capacity;\n }",
"public double area(){\n return (base*height) / 2;\n }",
"@Override\r\n\tpublic double getArea() {\n\t\treturn (this.base * this.height)/2;\r\n\t}",
"public Rectangle getBounds();",
"public Rectangle getBounds();",
"@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}",
"@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}",
"public static int largestRectangleArea(int[] heights) {\n Stack<Integer> stk = new Stack<>();\n stk.push(-1);\n int[] lefts = new int[heights.length];\n int[] rights = new int[heights.length];\n for (int i = 0; i < heights.length; i++) {\n while (stk.peek() != -1 && heights[stk.peek()] >= heights[i])\n stk.pop();\n lefts[i] = stk.peek();\n stk.push(i);\n }\n stk.clear();\n stk.push(heights.length);\n for (int j = heights.length-1; j >= 0; j--) {\n while (stk.peek() != heights.length && heights[stk.peek()] >= heights[j])\n stk.pop();\n rights[j] = stk.peek();\n stk.push(j);\n }\n\n int maxnum = 0;\n for (int i = 0; i < heights.length; i++) {\n int area = heights[i] * (rights[i]-lefts[i]-1);\n if (area > maxnum)\n maxnum = area;\n }\n return maxnum;\n }",
"public static int largestArea(ImmutableList<Coordinate> coordinates) {\r\n char[][] grid = fillGrid(coordinates);\r\n\r\n // Count the size of each coordinate's area. Coordinates touching the side of the grid are infinite (-1 canary).\r\n ImmutableMap<Character, Integer> areas = coordinateAreas(grid);\r\n\r\n // Return the biggest non-infinite area.\r\n return areas.values().stream()\r\n .mapToInt(value -> value)\r\n .max()\r\n .orElseThrow(() -> new IllegalStateException(\"No areas\"));\r\n }",
"public int maxArea(int[] height) {\n\t\tint i = 0;\n\t\tint j = height.length - 1;\n\t\tint area = (j - i) * Math.min(height[i], height[j]);\n\t\t\n\t\twhile (j > i) {\n\t\t\tif (height[i] < height[j]) {\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tj--;\n\t\t\t}\n\t\t\t\n\t\t\tint newArea = (j - i) * Math.min(height[i], height[j]);\n\t\t\tif (newArea > area) {\n\t\t\t\tarea = newArea;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn area;\n\t}",
"public int maxArea_wrong(int[] height) {\r\n\r\n if (height.length < 2) {\r\n return 0;\r\n }\r\n\r\n // This is actually not correct thought\r\n // need some smart to work this out!\r\n int len = height.length;\r\n int leftH = height[0];\r\n int leftHIdx = 0;\r\n int rightH = height[len - 1];\r\n int rightHIdx = len - 1;\r\n int max = Math.min(leftH, rightH) * (len - 1);\r\n\r\n int i = 1, j = len - 2;\r\n while (i < j) {\r\n while (i < j && height[i] <= leftH) {\r\n i++;\r\n }\r\n if (i < j) {\r\n leftH = height[i];\r\n leftHIdx = i;\r\n }\r\n while (i < j && height[j] <= rightH) {\r\n j--;\r\n }\r\n if (i < j) {\r\n rightH = height[j];\r\n rightHIdx = j;\r\n }\r\n int temp = Math.min(leftH, rightH) * (rightHIdx - leftHIdx);\r\n if (temp > max) {\r\n max = temp;\r\n }\r\n }\r\n\r\n return max;\r\n }",
"public Rectangle getBound(){\n \tint x = (int)location.getX();\n \tint y = (int)location.getY();\n \t\n \tif(isExploded == false)\n \t\treturn new Rectangle(x, y, image.getWidth(null), image.getHeight(null));\n \telse\n \t\treturn new Rectangle(x,y, 1,1);\n }",
"double area();",
"int largestRectangleAreaSkipBars(int[] height) {\r\n\t\tint maxArea = 0;\r\n\t\tfor (int end = 0; end < height.length; end++) {\r\n\t\t\t// search for a correct right bound\r\n\t\t\twhile (end < height.length - 1 && height[end + 1] > height[end]) {\r\n\t\t\t\tend++;\r\n\t\t\t}\r\n\t\t\tint minHeight = height[end];\r\n\t\t\tfor (int j = end; j >= 0; j--) {\r\n\t\t\t\tminHeight = minHeight < height[j] ? minHeight : height[j];\r\n\t\t\t\tint area = (end - j + 1) * minHeight;\r\n\t\t\t\tif (area > maxArea)\r\n\t\t\t\t\tmaxArea = area;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn maxArea;\r\n\t}",
"private float getMaxX(HomePieceOfFurniture piece) {\n float [][] points = piece.getPoints();\n float maxX = Float.NEGATIVE_INFINITY;\n for (float [] point : points) {\n maxX = Math.max(maxX, point [0]);\n } \n return maxX;\n }",
"@Override\n\tpublic double getArea() {\n\t\treturn (0.5*this.base*this.height);\n\t}",
"@Override\r\n public double area() {\n return height*width;\r\n }",
"public double largestTriangleArea(int[][] points) {\n int N = points.length;\n double area = 0f;\n for (int i = 0; i < N; i++) {\n for (int j = i + 1; j < N; j++) {\n for (int k = j + 1; k < N; k++) {\n area = Math.max(area, shoelaceFormula(points[i], points[j], points[k]));\n }\n }\n }\n return area;\n }",
"public double area() \n {\n double area = 0;\n for (Line2D line : lines) \n {\n area += line.getP1().getX() * line.getP2().getY();\n area -= line.getP2().getX() * line.getP1().getY();\n }\n area /= 2.0;\n return Math.abs(area);\n }",
"public double getArea();",
"public double getArea();",
"public double getArea();",
"public Shape getAreaColision();",
"Double getAreaValue();",
"public int getMaxFloor();",
"@Override\n\tpublic double getArea() {\n\t\treturn height * width;\n\t}",
"public native int kbAreaGetClosetArea(vector position, int areaType, int areaType1, float minDistance);",
"public double getMaxX() { return getX() + getWidth(); }",
"public int area()\n\t{\n\t\treturn length*width;\n\t}",
"static Double computeArea() {\n // Area is height x width\n Double area = height * width;\n return area;\n }",
"public double area() {\n return (width * height);\n }",
"public double area();",
"double getArea() {\n return width * height;\n }",
"public int largestRectangleArea(int[] heights) {\n if (heights == null || heights.length == 0)\n return 0;\n int maxSize = 0;\n int len = heights.length;\n Stack<Integer> stack = new Stack<>();\n for (int i = 0; i <= len; i++) {\n // 这点非常精髓,让i可以等于len,但是高度等于0,也就是说要把之前所有的最大面积要收一下计算出来\n int h = (i == len) ? 0 : heights[i];\n if (stack.isEmpty() || heights[stack.peek()] <= h) {\n stack.push(i);\n } else {\n // means stack is notEmpty and height[i] < heights[stack.peek()]\n int topIndex = stack.pop();\n maxSize = Math.max(maxSize,\n (stack.isEmpty()? i : i - 1 - stack.peek()) * heights[topIndex]);\n i--;\n }\n }\n return maxSize;\n }",
"public int area() {\r\n\t\tint area = (getLength()) * (getBreath());\r\n\t\treturn (area);\r\n\t}",
"public double area(){\r\n\t\treturn this.base()*this.altezza();\r\n\t}",
"public int maxArea2(int[] height) {\n\t\tint area = 0, i = 0, j = height.length - 1;\n\n\t\twhile (i < j) {\n\t\t\tarea = Math.max(area, Math.min(height[i], height[j]) * (j - i));\n\n\t\t\tif (height[i] > height[j])\n\t\t\t\tj--;\n\t\t\telse\n\t\t\t\ti++;\n\t\t}\n\n\t\treturn area;\n\t}",
"double getArea(){\n return height*width;\n }",
"public double computeArea()\n {\n int len = _points.size();\n Point p1 = _points.get(len - 1);\n\n double area = 0.0;\n\n // Compute based on Green's Theorem.\n for(int i = 0; i < len; i++)\n {\n Point p2 = _points.get(i);\n area += (p2.x + p1.x)*(p2.y - p1.y);\n p1 = p2; // Shift p2 to p1.\n }\n\n return -area / 2.0;\n }",
"public Rectangle getBounds()\n {\n return new Rectangle ((int)x,(int)y,32,32);\n }",
"int getAreaSize();",
"public float area() {\n return (base * haltura / 2);\r\n }",
"public abstract Rectangle getBounds();",
"public abstract Rectangle getBounds();",
"public abstract Rectangle getBounds();",
"public CollisionArea_SingleCirc getOptimalCollisionArea();"
] | [
"0.72365695",
"0.7008615",
"0.6903281",
"0.6822196",
"0.6745021",
"0.672268",
"0.6627903",
"0.6625986",
"0.66158074",
"0.66134304",
"0.66018105",
"0.6599731",
"0.6590906",
"0.65620595",
"0.65528923",
"0.6541563",
"0.6537424",
"0.653237",
"0.65266985",
"0.65224624",
"0.65146494",
"0.6465058",
"0.6434851",
"0.6407734",
"0.63928044",
"0.6378591",
"0.63736606",
"0.63736606",
"0.63517827",
"0.63477015",
"0.63422066",
"0.6340314",
"0.63226223",
"0.6315099",
"0.63093704",
"0.63036424",
"0.6286879",
"0.6269374",
"0.6266922",
"0.62597626",
"0.6233766",
"0.6232461",
"0.6223275",
"0.62095755",
"0.6194926",
"0.6194394",
"0.61919755",
"0.618696",
"0.61757237",
"0.61698973",
"0.61687344",
"0.6165999",
"0.6133168",
"0.6128264",
"0.61252993",
"0.61252433",
"0.61110014",
"0.60888875",
"0.60888875",
"0.60864305",
"0.60864305",
"0.6080929",
"0.6077926",
"0.6073229",
"0.60692537",
"0.6059155",
"0.605741",
"0.60515803",
"0.60494286",
"0.604341",
"0.60278535",
"0.60236514",
"0.60217386",
"0.60177284",
"0.60177284",
"0.60177284",
"0.60043854",
"0.6002608",
"0.59952116",
"0.59937173",
"0.5992359",
"0.59881544",
"0.5988007",
"0.59875906",
"0.59704524",
"0.59639007",
"0.5944535",
"0.5940917",
"0.59359235",
"0.5932249",
"0.59316933",
"0.59277195",
"0.5924208",
"0.5918943",
"0.59156406",
"0.5914346",
"0.5897264",
"0.5897264",
"0.5897264",
"0.58951044"
] | 0.6717399 | 6 |
expand to up and down in term of rows | private int getMax(int[][] dp, int row, int col) {
int height = 0;
int minWidth = dp[row][col]; // the number of consecutive 1s
// go up which means row number decreases
for (int i = row - 1; i >= 0; i--) {
// should not 0, should break
if (dp[i][col] >= minWidth) {
height += 1;
} else {
break;
}
}
// go down which means row number increases
for (int i = row; i < dp.length; i++) {
// should not 0, should break
if (dp[i][col] >= minWidth) {
height += 1;
} else {
break;
}
}
return minWidth * height;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void expandAll() {\n\t\tint row = 0;\n\t\twhile (row < super.getRowCount()) {\n\t\t\tsuper.expandRow(row);\n\t\t\trow++;\n\t\t}\n\t}",
"private void expandTree() {\n for (int i=0; i<tree.getRowCount(); i++) {\n tree.expandRow(i);\n }\n }",
"private static ArrayList<String> expandRows(int size,ArrayList<String> toExpand){\n\n\t\tArrayList<String> ret= transmit(toExpand);\n\t\tint columnas=toExpand.size()/5;\n\t\tint i=0;\n\t\tint tocopy=0;\n\n\t\tfor (int k = 0; k < size-1; k++) {\n\t\t\ti =toExpand.size()-1-columnas;\n\t\t\ttocopy=i-(columnas-1);\n\t\t\tfor (int j = 0; j < columnas; j++) {\n\t\t\t\tret.add(i+1, toExpand.get(tocopy));\n\t\t\t\ti=i+1; \n\t\t\t\ttocopy++;\n\t\t\t}\n\t\t}\n\n\t\tfor (int k = 0; k < size-1; k++) {\n\t\t\ti =(columnas-1)*2;\n\t\t\ttocopy=i-(columnas-2);\n\n\t\t\tfor (int j = 0; j < columnas; j++) {\n\t\t\t\tret.add(i+2, toExpand.get(tocopy));\n\t\t\t\ti=i+1; \n\t\t\t\ttocopy++;\n\t\t\t}\n\t\t}\n\t\treturn ret;\t\n\t}",
"public void moveDownRows(int[] rows)throws IndexOutOfBoundsException{\r\n if (rows.length > 0){\r\n CoverFooterItemType tmp_element;\r\n //no moveup if i'm selecting the first elemento in the table\r\n if (rows[rows.length-1] < (data.size()-1)){\r\n tmp_element = (CoverFooterItemType)data.get(rows[rows.length-1]+1);\r\n for (int i=(rows.length-1); i>=0; i--){ \r\n if (rows[rows.length-1] < (data.size()-1)){\r\n data.set(rows[i]+1, data.get(rows[i]));\r\n }\r\n }\r\n data.set(rows[0], tmp_element);\r\n }\r\n if (rows[rows.length-1] < (data.size()-1)){\r\n fireTableRowsUpdated(rows[0], rows[rows.length-1]+1);\r\n }\r\n }\r\n }",
"private void advanceRow(){\n\t\tfaceBackwards();\n\t\twhile(frontIsClear()){\n\t\t\tmove();\n\t\t}\n\t\tturnRight();\n\t\tif(frontIsClear()){\n\t\t\tmove();\n\t\t\tturnRight();\n\t\t}\n\t}",
"public void moveRowRelative(int rows) throws SQLException {\n/* 327 */ notSupported();\n/* */ }",
"public boolean up() {\r\n if( row <= 0 ) return false;\r\n --row;\r\n return true;\r\n }",
"public void moveUp()\n\t{\n\t\trow++;\n\t}",
"private void expandFrom(int r, int c)\n {\n if(withinBounds(r,c) == false)\n return;\n\n if(visited[r][c] == false)\n return;\n\n if(visited[r][c] == true)\n visited[r][c] = false;\n\n expandFrom(r-1,c-1);\n expandFrom(r-1,c);\n expandFrom(r-1,c+1);\n expandFrom(r,c+1);\n expandFrom(r+1,c+1);\n expandFrom(r+1,c);\n expandFrom(r+1,c-1);\n expandFrom(r,c-1);\n }",
"@Override\n protected void moveToNextRow(){\n incrementRow();\n resetXPos();\n if(getRow()%2 == 1){\n incrementYPos(getHeight()+getHeight());\n }\n resetCol();\n setPointDirection();\n }",
"public void moveUpRows(int[] rows)throws IndexOutOfBoundsException{\r\n if (rows.length > 0){\r\n CoverFooterItemType tmp_element;\r\n //no moveup if i'm selecting the first elemento in the table\r\n if (rows[0] > 0){\r\n tmp_element = (CoverFooterItemType)data.get(rows[0]-1);\r\n for (int i=0; i<rows.length; i++){ \r\n if (rows[i] > 0){\r\n data.set(rows[i]-1, data.get(rows[i]));\r\n }\r\n }\r\n data.set(rows[rows.length-1], tmp_element);\r\n }\r\n if (rows[0] >= 1){\r\n fireTableRowsUpdated(rows[0]-1, rows[rows.length-1]);\r\n }\r\n }\r\n }",
"private void expand() { \n\t\tComparable[] temp = new Comparable[ _data.length * 2 ];\n\t\tfor( int i = 0; i < _data.length; i++ )\n\t \ttemp[i] = _data[i];\n\t\t_data = temp;\n }",
"protected void expandRow(int row, int level)\n {\n if(treeTable == null)\n {\n return;\n }\n if(row >= 0 && level > 0)\n {\n level--;\n JTree tree = treeTable.getTree();\n tree.expandRow(row);\n\n TreePath path = tree.getPathForRow(row);\n Property p = (Property)path.getLastPathComponent();\n int n = p.getPropertyCount();\n for(int i = 0; i < n; i++)\n {\n Property pChild = p.getPropertyAt(i);\n expandRow(getRow(pChild), level);\n }\n }\n }",
"private void expandAllNodes(JTree tree, int startingIndex, int rowCount) {\n for (int i = startingIndex; i < rowCount; ++i) {\n tree.expandRow(i);\n }\n\n if (tree.getRowCount() != rowCount) {\n expandAllNodes(tree, rowCount, tree.getRowCount());\n\n }\n }",
"public void expandAllNodes(JTree tree, int startingIndex, int rowCount){\n for(int i=startingIndex;i<rowCount;++i){\n tree.expandRow(i);\n }\n\n if(tree.getRowCount()!=rowCount){\n expandAllNodes(tree, rowCount, tree.getRowCount());\n }\n}",
"void coverRows()\n {\n System.out.println(\".... covering cols...\"+name); \n for (Node i = top.down; i!=top; i=i.down)\n {\n System.out.println(\"iterating vertically at \" + i.rowNum+i.colName());\n i.coverColumnsss();\n //save i;\n //recurse\n //restore i\n //uncover i;\n }\n }",
"protected void expandRow( int row, boolean recursively )\n {\n if(treeTable == null)\n {\n return;\n }\n if ( row >= 0 )\n {\n JTree tree = treeTable.getTree();\n tree.expandRow( row );\n if ( recursively )\n {\n TreePath path = tree.getPathForRow( row );\n Object o = path.getLastPathComponent();\n if ( o instanceof Property )\n {\n Property p = ( Property )o;\n int n = p.getPropertyCount();\n for ( int i = 0; i < n; i++ )\n {\n Property pChild = p.getPropertyAt( i );\n expandRow( getRow( pChild ), true );\n }\n }\n }\n }\n }",
"public void expand(){\n\t\texpanded = true;\n\t\tstartRow = 0;\n\t\tslider.setLimits(0, 0, optGroup.size() - maxRows);\n\t\ttakeFocus();\n\t}",
"int expand();",
"protected void expand() {\n matrix = matrix.power(e);\n }",
"final int fillUp(final int fromPosition, final int overhang) {\n final int paddingLeft = getPaddingLeft();\n final int paddingRight = getPaddingRight();\n final int itemMargin = mItemMargin;\n final int colWidth =\n (getWidth() - paddingLeft - paddingRight - itemMargin * (mColCount - 1)) / mColCount;\n final int gridTop = getPaddingTop();\n final int fillTo = gridTop - overhang;\n int nextCol = getNextColumnUp();\n int position = fromPosition;\n\n while (nextCol >= 0 && mItemTops[nextCol] > fillTo && position >= 0) {\n final View child = obtainView(position, null);\n LayoutParams lp = (LayoutParams) child.getLayoutParams();\n\n if (child.getParent() != this) {\n if (mInLayout) {\n addViewInLayout(child, 0, lp);\n } else {\n addView(child, 0);\n }\n }\n\n final int span = Math.min(mColCount, lp.span);\n final int widthSize = colWidth * span + itemMargin * (span - 1);\n final int widthSpec = MeasureSpec.makeMeasureSpec(widthSize, MeasureSpec.EXACTLY);\n\n LayoutRecord rec;\n if (span > 1) {\n rec = getNextRecordUp(position, span);\n nextCol = rec.column;\n } else {\n rec = mLayoutRecords.get(position);\n }\n\n boolean invalidateBefore = false;\n if (rec == null) {\n rec = new LayoutRecord();\n mLayoutRecords.put(position, rec);\n rec.column = nextCol;\n rec.span = span;\n } else if (span != rec.span) {\n rec.span = span;\n rec.column = nextCol;\n invalidateBefore = true;\n } else {\n nextCol = rec.column;\n }\n lp.margins = rec.mMargins;\n\n if (mHasStableIds) {\n final long id = mAdapter.getItemId(position);\n rec.id = id;\n lp.id = id;\n }\n\n lp.column = nextCol;\n\n final int heightSpec;\n if (lp.height == LayoutParams.WRAP_CONTENT) {\n heightSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);\n } else {\n heightSpec = MeasureSpec.makeMeasureSpec(lp.height, MeasureSpec.EXACTLY);\n }\n child.measure(widthSpec, heightSpec);\n\n final int childHeight = child.getMeasuredHeight();\n if (invalidateBefore || (childHeight != rec.height && rec.height > 0)) {\n invalidateLayoutRecordsBeforePosition(position);\n }\n rec.height = childHeight;\n\n final int startFrom;\n if (span > 1) {\n int highest = mItemTops[nextCol];\n for (int i = nextCol + 1; i < nextCol + span; i++) {\n final int top = mItemTops[i];\n if (top < highest) {\n highest = top;\n }\n }\n startFrom = highest;\n } else {\n startFrom = mItemTops[nextCol];\n }\n final int childBottom = startFrom;\n final int childTop = childBottom - childHeight;\n final int childLeft = paddingLeft + nextCol * (colWidth + itemMargin);\n final int childRight = childLeft + child.getMeasuredWidth();\n child.layout(childLeft, childTop, childRight, childBottom);\n\n for (int i = nextCol; i < nextCol + span; i++) {\n mItemTops[i] = childTop - rec.getMarginAbove(i - nextCol) - itemMargin;\n }\n\n nextCol = getNextColumnUp();\n mFirstPosition = position--;\n }\n\n int highestView = getHeight();\n for (int i = 0; i < mColCount; i++) {\n if (mItemTops[i] < highestView) {\n highestView = mItemTops[i];\n }\n }\n return gridTop - highestView;\n }",
"public void shiftRows(int[][] matrix) {\r\n\t\t//initialize and show header\r\n\t\tinitializeAnimalHeader();\r\n\t\tlang.nextStep();\r\n\t\t//initialize and show description\r\n\t\tinitializeDescription();\r\n\t\tlang.nextStep();\r\n\t\t//hide description, initialize and show all elements relevant for the computation\r\n\t\thideDescription();\r\n\t\tinitialzieAnimalMatrix(matrix);\r\n\t\tinitializeAnimalShiftRowSourceCode();\r\n\t\tinitializeAnimalShiftLeftSourceCode();\r\n\t\tinitializeAnimalRowText();\r\n\t\tinitializeAnimalIText();\r\n\t\tinititalzeAnimalMatrixCounter();\r\n\t\t//some source code highlighting to show which java code\r\n\t\t//is equivalent to the current state of the animation\r\n\t\tshiftRowSc.highlight(0);\r\n\t\tshiftRowSc.highlight(4);\r\n\t\tlang.nextStep();\r\n\t\tshiftRowSc.unhighlight(0);\r\n\t\tshiftRowSc.unhighlight(4);\r\n\t\tshiftRowSc.highlight(1);\r\n\t\tshiftRowSc.highlight(3);\r\n\t\t//initialize element that shows current state of loop variable\r\n\t\trowText.setText(\"row = 0\", new TicksTiming(0), new TicksTiming(0));\r\n\t\trowText.show();\r\n\t\thighlightText(rowText);\r\n\t\tseparatorLine.show();\r\n\t\tfor (int row = 0; row < matrix.length; row++) {\r\n\t\t\tlang.nextStep();\r\n\t\t\t//some source code highlighting to show which java code\r\n\t\t\t//is equivalent to the current state of the animation\r\n\t\t\tshiftRowSc.unhighlight(1);\r\n\t\t\tshiftRowSc.unhighlight(3);\r\n\t\t\tshiftRowSc.highlight(2);\r\n\t\t\tunhighlightText(rowText);\r\n\t\t\tlang.nextStep();\r\n\t\t\t//call shifts for each row in. first execute the java code then generate\r\n\t\t\t//the equivalent animal code\r\n\t\t\tshiftLeft(matrix, row);\r\n\t\t\tshiftLeftAnimal(row);\r\n\t\t\t//some source code highlighting to show which java code\r\n\t\t\t//is equivalent to the current state of the animation\r\n\t\t\tshiftRowSc.unhighlight(2);\r\n\t\t\tshiftRowSc.highlight(1);\r\n\t\t\tshiftRowSc.highlight(3);\r\n\t\t\trowText.setText(\"row = \" + (row + 1), new TicksTiming(0),\r\n\t\t\t\t\tnew TicksTiming(0));\r\n\t\t\thighlightText(rowText);\r\n\t\t}\r\n\t\tlang.nextStep();\r\n\t\tshiftRowSc.unhighlight(1);\r\n\t\tshiftRowSc.unhighlight(3);\r\n\t\trowText.hide();\r\n\t\tunhighlightText(rowText);\r\n\t\tseparatorLine.hide();\r\n\t\tlang.nextStep();\r\n\t\t//show final slide hide irrelevant computation elements\r\n\t\thideComputation();\r\n\t\tinitializeFinalSlide();\r\n\t}",
"public boolean down() {\r\n if( row >= MAXROWS-1 ) return false;\r\n ++row;\r\n return true;\r\n }",
"final int fillDown(final int fromPosition, final int overhang) {\n final int paddingLeft = getPaddingLeft();\n final int paddingRight = getPaddingRight();\n final int itemMargin = mItemMargin;\n final int colWidth =\n (getWidth() - paddingLeft - paddingRight - itemMargin * (mColCount - 1)) / mColCount;\n final int gridBottom = getHeight() - getPaddingBottom();\n final int fillTo = gridBottom + overhang;\n int nextCol = getNextColumnDown();\n int position = fromPosition;\n\n while (nextCol >= 0 && mItemBottoms[nextCol] < fillTo && position < mItemCount) {\n final View child = obtainView(position, null);\n LayoutParams lp = (LayoutParams) child.getLayoutParams();\n\n if (child.getParent() != this) {\n if (mInLayout) {\n addViewInLayout(child, -1, lp);\n } else {\n addView(child);\n }\n }\n\n final int span = Math.min(mColCount, lp.span);\n final int widthSize = colWidth * span + itemMargin * (span - 1);\n final int widthSpec = MeasureSpec.makeMeasureSpec(widthSize, MeasureSpec.EXACTLY);\n\n LayoutRecord rec;\n if (span > 1) {\n rec = getNextRecordDown(position, span);\n nextCol = rec.column;\n } else {\n rec = mLayoutRecords.get(position);\n }\n\n boolean invalidateAfter = false;\n if (rec == null) {\n rec = new LayoutRecord();\n mLayoutRecords.put(position, rec);\n rec.column = nextCol;\n rec.span = span;\n } else if (span != rec.span) {\n rec.span = span;\n rec.column = nextCol;\n invalidateAfter = true;\n } else {\n nextCol = rec.column;\n }\n lp.margins = rec.mMargins;\n\n if (mHasStableIds) {\n final long id = mAdapter.getItemId(position);\n rec.id = id;\n lp.id = id;\n }\n\n lp.column = nextCol;\n\n final int heightSpec;\n if (lp.height == LayoutParams.WRAP_CONTENT) {\n heightSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);\n } else {\n heightSpec = MeasureSpec.makeMeasureSpec(lp.height, MeasureSpec.EXACTLY);\n }\n child.measure(widthSpec, heightSpec);\n\n final int childHeight = child.getMeasuredHeight();\n if (invalidateAfter || (childHeight != rec.height && rec.height > 0)) {\n invalidateLayoutRecordsAfterPosition(position);\n }\n rec.height = childHeight;\n\n final int startFrom;\n if (span > 1) {\n int lowest = mItemBottoms[nextCol];\n for (int i = nextCol + 1; i < nextCol + span; i++) {\n final int bottom = mItemBottoms[i];\n if (bottom > lowest) {\n lowest = bottom;\n }\n }\n startFrom = lowest;\n } else {\n startFrom = mItemBottoms[nextCol];\n }\n final int childTop = startFrom + itemMargin;\n final int childBottom = childTop + childHeight;\n final int childLeft = paddingLeft + nextCol * (colWidth + itemMargin);\n final int childRight = childLeft + child.getMeasuredWidth();\n child.layout(childLeft, childTop, childRight, childBottom);\n\n for (int i = nextCol; i < nextCol + span; i++) {\n mItemBottoms[i] = childBottom + rec.getMarginBelow(i - nextCol);\n }\n\n nextCol = getNextColumnDown();\n position++;\n }\n\n int lowestView = 0;\n for (int i = 0; i < mColCount; i++) {\n if (mItemBottoms[i] > lowestView) {\n lowestView = mItemBottoms[i];\n }\n }\n return lowestView - gridBottom;\n }",
"private void expand() {\n int capacity = newCapacity();\n IntIntMap h = new IntIntMap(capacity);\n for (int i = 0; i < entries.length; i += 2) {\n if (entries[i] != EMPTY) {\n h.put(entries[i], entries[i + 1]);\n }\n }\n this.entries = h.entries;\n this.threshold = h.threshold;\n this.modulo = h.modulo;\n this.modulo2 = h.modulo2;\n }",
"private int getRelativeRow() {\n\t\treturn direction == OUT ? -row : row;\n\t}",
"public void nextRow(int minimumOffset) {\n\t\tarrangeCurrentRow();\n\n\t\t// Step 4 : Profit\n\n\t\t// Increment the Y position\n\t\tSystem.out.println(this.currentYPosition);\n\t\tsetCurrentYPosition(Math.max(this.currentYPosition + minimumOffset,\n\t\t\t\tthis.currentYPosition + getCurrentRowHeight()));\n\t\tSystem.out.println(this.currentYPosition);\n\n\t\t// Clear current row buffer\n\t\tthis.currentRow.clear();\n\n\t\tint theoreticalMaxWidth = 99999999;\n\n\t\t// Update left and right offsets occupied by previous floats for this\n\t\t// row, as well as the row max width\n\t\tint x = this.box.getAbsoluteX() + this.box.marginLeft + this.box.paddingLeft;\n\t\tint y = this.box.getAbsoluteY() + getCurrentY() + this.box.marginTop\n\t\t\t\t+ this.box.paddingTop;\n\t\tint currentRowAbsoluteY = this.box.getAbsoluteY() + this.currentYPosition\n\t\t\t\t+ this.box.marginTop + this.box.paddingTop;\n\t\tint workMaxWidth = this.box.parent.contentWidth - this.box.marginLeft\n\t\t\t\t- this.box.marginRight - this.box.paddingLeft - this.box.paddingRight;\n\n\t\tif (this.box.contentWidth > 0) {\n\t\t\tworkMaxWidth = this.box.contentWidth;\n\t\t}\n\n\t\tthis.currentRowLeftFloatOccupiedSpace = this.floats.leftIntersectionPoint(x,\n\t\t\t\tcurrentRowAbsoluteY, workMaxWidth, this.box);\n\t\tint rightPoint = this.floats.rightIntersectionPoint(x, currentRowAbsoluteY,\n\t\t\t\tworkMaxWidth, this.box);\n\t\tthis.currentRowRightFloatOccupiedSpace = workMaxWidth - rightPoint;\n\t\t// currentRowMaxWidth = rightPoint - currentRowLeftFloatOccupiedSpace ;\n\t\tthis.currentRowMaxWidth = getMaxRowWidth(this.currentYPosition);\n\n\t\t// Other init stuff\n\t\tthis.startXPosition = this.floats.leftIntersectionPoint(x, y,\n\t\t\t\ttheoreticalMaxWidth, this.box);\n\t\tthis.currentXPosition = this.startXPosition;\n\n\t\tthis.rowHeightFloats = Integer.MAX_VALUE;\n\t\tthis.rowHeightNoFloats = 0;\n\n\t\tthis.leftFloatsCount = this.rightFloatsCount = 0;\n\t\tthis.hasClearRight = false;\n\n\t\tthis.nextChildFromSavedElements = true;\n\t\tthis.currentRowHasOnlyFloats = true;\n\n\t\tSystem.out.println(\"THIS ROW WIDTH: \" + this.currentRowMaxWidth);\n\n\t}",
"protected void moveRow (int row)\r\n {\r\n int move = 0;\r\n \r\n if (row < _currentRow)\r\n { move = _currentRow - row; }\r\n \r\n else if (row > _currentRow)\r\n { move = row - _currentRow; }\r\n \r\n _currentRow = row;\r\n }",
"public void moveDown()\n\t{\n\t\trow--;\n\t}",
"private static void rotate(int[][] a, start, end){\n for (int current = 0; start+current < end; current++){\n int temp = a[start][start+current]; // save the top \n a[start][start+current] = a[end-current][start]; // left to top moveing left elemnt to top\n a[end-current][start] = a[end][end-current]; // bottom element to left \n a[end][end-current] = a[start+current][end]; // right element to bottom \n a[start+current][end] = temp; // top elemrnt to right\n }\n}",
"public void traspose() {\n for (int row = 0; row < this.numberOfRows(); row++) {\n for (int col = row; col < this.numberOfCols(); col++) {\n double value = this.get(row, col);\n this.set(row, col, this.get(col, row));\n this.set(col, row, value);\n }\n }\n }",
"public void absIncrementRowAt(int index) {\n int lastIndex = getModel().getRowCount() - 1;\n if ((index < 0) || (index >= lastIndex)) {\n return;\n }\n\n Vector[] va = getAllRowsData();\n\n Vector vTemp = va[index];\n va[index] = va[index + 1];\n va[index + 1] = vTemp;\n\n setRows(va);\n }",
"public boolean checkUp()\n\t{\n\t\tif(row-1>=0)\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"public void moveDownRow(int row)throws IndexOutOfBoundsException{\r\n if (row < (data.size()-1)){ \r\n CoverFooterItemType tmp_element = (CoverFooterItemType)data.get(row);\r\n data.set(row, data.get((row+1)));\r\n data.set((row+1), tmp_element);\r\n fireTableRowsUpdated(row, row+1);\r\n }\r\n }",
"public void expand() {\n\t\tconvertHeadToTailComponent();\n\t\taddNewHead();\n\t}",
"@SuppressWarnings(\"unchecked\")\n void expand()\n {\n // Remember the old table.\n Object[] old = this.buckets;\n\n // Figure out the capacity of the new table, making it somewhat\n // unpredictable.\n int newCapacity = 2 * this.buckets.length + rand.nextInt(10);\n\n // Create a new table of that capacity.\n this.buckets = new Object[newCapacity];\n\n // Reset the size since we'll be adding elements in a moment.\n this.size = 0;\n\n // Move all the values from the old table to their appropriate\n // location in the new table.\n for (int i = 0; i < old.length; i++)\n {\n AssociationList<K, V> bucket = (AssociationList<K, V>) old[i];\n if (bucket != null)\n {\n AssociationList<K, V>.Node current = bucket.front.next;\n while (current != null)\n {\n this.set(current.key, current.value);\n current = current.next;\n } // while\n } // if (bucket != null)\n } // for\n }",
"public void uncover ()\n {\n for (DancingNode i=this.U; i!=this; i=i.U) // go up the column\n {\n for (DancingNode j=i.L; j!=i; j=j.L) // go left across the row \n {\n j.C.size++;\n j.relinkUD();\n }\n }\n this.relinkLR();\n }",
"private void expand(){\n \n int newSize = size + expand;\n E[] tempArray = (E[]) new Object[newSize];\n for(int n = 0; n < size; n++){\n tempArray[n] = stackArray[n]; \n }\n stackArray = tempArray;\n size = newSize;\n }",
"private boolean slideUp()\n {\n if (blankRow == SIZE - 1) {\n return false;\n }\n board[blankRow][blankCol] = board[blankRow + 1][blankCol];\n board[blankRow + 1][blankCol] = 0;\n blankRow += 1;\n return true;\n }",
"public void incrementRow() {\n setRowAndColumn(row + 1, column);\n }",
"public void moveRowDown(int id, int row) throws FidoDatabaseException {\n try {\n Connection conn = null;\n Statement stmt = null;\n try {\n conn = fido.util.FidoDataSource.getConnection();\n conn.setAutoCommit(false);\n stmt = conn.createStatement();\n int max = findMaxRank(stmt, id);\n if ((row < 1) || (row > (max - 1))) throw new IllegalArgumentException(\"Row number not between 1 and \" + (max - 1));\n stmt.executeUpdate(\"update InstructionGroups set Rank = -1 where InstructionId = '\" + id + \"' and Rank = \" + row);\n stmt.executeUpdate(\"update InstructionGroups set Rank = \" + row + \" where InstructionId = '\" + id + \"' and Rank = \" + (row + 1));\n stmt.executeUpdate(\"update InstructionGroups set Rank = \" + (row + 1) + \" where InstructionId = '\" + id + \"' and Rank = -1\");\n conn.commit();\n } catch (SQLException e) {\n if (conn != null) conn.rollback();\n throw e;\n } finally {\n if (stmt != null) stmt.close();\n if (conn != null) conn.close();\n }\n } catch (SQLException e) {\n throw new FidoDatabaseException(e);\n }\n }",
"public void moveUpRow(int row)throws IndexOutOfBoundsException{\r\n if (row >= 1){\r\n CoverFooterItemType tmp_element = (CoverFooterItemType)data.get(row);\r\n data.set(row, data.get((row-1)));\r\n data.set((row-1), tmp_element);\r\n fireTableRowsUpdated(row-1, row);\r\n }\r\n }",
"public void down(int[][] arr,int start,int end,int i){\n if(start==end){\n return;\n }\n else{\n System.out.println(arr[start][i]);\n start++;\n }\n down(arr,start,end,i);\n }",
"void expand(List<R> results);",
"public boolean relative( int rows ) throws SQLException\n {\n return m_rs.relative(rows);\n }",
"private List<Rectangle2D> rescaleRows(List<Rectangle2D> rows, double scale) {\n if (rows.isEmpty() || (rows.size() == Math.floor(rows.size() * scale))) {\n return rows;\n }\n List<Rectangle2D> retVal = new ArrayList<>();\n // We need to account for the possibility of gaps between some rows, so we split the\n // list into sublists of contiguous regions.\n List<List<Rectangle2D>> groups = new ArrayList<>();\n List<Rectangle2D> group = new ArrayList<>();\n for (int r = 0; r < rows.size(); r++) {\n final Rectangle2D rect = rows.get(r);\n group.add(rows.get(r));\n if ((r + 1 < rows.size()) && rows.get(r + 1).getY() > rect.getY() + rect.getHeight()) {\n groups.add(group);\n group = new ArrayList<>();\n }\n }\n if (group.size() > 0) {\n groups.add(group);\n }\n \n for (List<Rectangle2D> list : groups) {\n Rectangle2D rect = list.get(0);\n Rectangle2D rect2 = null;\n double yPos = rect.getY();\n double height = list.get(list.size() - 1).getY() + list.get(list.size() - 1).getHeight();\n double dy = scale * height / list.size();\n double rowHeight = dy / 0.866;\n \n int r = 0;\n while ((r < list.size()) && (yPos + rowHeight <= height)) {\n rect = list.get(r);\n if (r + 1 < list.size()) {\n rect2 = list.get(r + 1);\n } else {\n rect2 = null;\n }\n \n if ((rect2 == null) || (rect2.getY() > yPos)) {\n retVal.add(new Rectangle2D.Double(rect.getX(), yPos,\n rect.getWidth(), rowHeight));\n } else {\n double left = Math.max(rect.getX(), rect2.getX());\n double right = Math.min(rect.getX() + rect.getWidth(), rect2.getX() + rect2.getWidth());\n retVal.add(new Rectangle2D.Double(left, yPos, right - left, rowHeight));\n }\n \n yPos += dy;\n if (yPos > rect.getY() + rect.getHeight()) {\n r++;\n }\n }\n }\n \n return retVal;\n }",
"private void fillListDown(int bottomEdge, final int offset) {\n while (bottomEdge + offset < getHeight() && mLastItemPosition < mAdapter.getCount() - 1) {\n mLastItemPosition++;\n final View newBottomchild = mAdapter.getView(mLastItemPosition, getCachedView(), this);\n addAndMeasureChild(newBottomchild, LAYOUT_MODE_BELOW);\n bottomEdge += getChildHeight(newBottomchild);\n }\n }",
"public boolean slideUp() {\n\t\tif (currentRow > 0) {\n\t\t\tboard[currentRow][currentCol] = board[currentRow - 1][currentCol];\n\t\t\tcurrentRow--;\n\t\t\tboard[currentRow][currentCol] = '0';\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"private void expandTree() {\n tree.expand();\n }",
"public abstract List<Node> expand();",
"private void doNextRow(){\n\t\tmove();\n\t\twhile (frontIsClear()){\n\t\t\talternateBeeper();\n\t\t}\n\t\tcheckPreviousSquare();\t\n\t}",
"private int[] diagnalUpward(List<Integer> resList, int rowIdx, int colIdx, int[][] matrix) {\n int row = matrix.length;\n int col = matrix[0].length;\n\n while ((rowIdx >= 0 && rowIdx < row) && (colIdx >= 0 && colIdx < col)) {\n resList.add(matrix[rowIdx][colIdx]);\n rowIdx--;\n colIdx++;\n }\n rowIdx++;\n colIdx--;\n // Compute new starting point: try to go right, if reaches the end then go down.\n if (colIdx == col - 1) return new int[]{rowIdx + 1, colIdx};\n return new int[]{rowIdx, colIdx + 1};\n }",
"public List<SearchNode> expand() {\n\n List<SearchNode> neighbours = new ArrayList<>();\n\n if (this.getX() > 0) {\n SearchNode left = new SearchNode(this.getX() - 1, this.getY(), this.getDepth() + 1);\n neighbours.add(left);\n }\n if (this.getX() < 14) {\n SearchNode right = new SearchNode(this.getX() + 1, this.getY(), this.getDepth() + 1);\n neighbours.add(right);\n }\n if (this.getY() > 0) {\n SearchNode up = new SearchNode(this.getX(), this.getY() - 1, this.getDepth() + 1);\n neighbours.add(up);\n }\n if (this.getY() < 14) {\n SearchNode down = new SearchNode(this.getX(), this.getY() + 1, this.getDepth() + 1);\n neighbours.add(down);\n }\n\n return neighbours;\n }",
"private int goToNextRow(int x, int y, int[] borders) {\n System.out.println(\"down\" + x + \":\"+ y);\n// if(Math.floor(diameter) == 1) {\n// int z = highestLayerImg[x][y];\n// System.out.println(y);\n// millingPath.add(new Pixel(x, y, z));\n// int o = y - overlappingVar;\n// millingPathArr[x][y] = 2; //used for going to next row\n// y++;\n// return y;\n// }\n//\n// while((millingPathArr[x][y - overlappingVar]==0 || millingPathArr[x][y - overlappingVar + 1]==0) && !(y > borders[2])) {\n// int z = highestLayerImg[x][y];\n// System.out.println(y);\n// millingPath.add(new Pixel(x, y, z));\n// int o = y - overlappingVar;\n// millingPathArr[x][y] = 2; //used for going to next row\n// y++;\n// }\n for(int i = 0; i < (diameter/2) ; i++) {\n int z = highestLayerImg[x][y];\n //System.out.println(y);\n if(y > borders[2]) {\n break;\n }\n millingPath.add(new BL_Pixel(x, y, z));\n millingPathArr[x][y] = 2; //used for going to next row\n y++;\n }\n //System.out.println(\"down\");\n return y;\n }",
"private void growTable() {\n // Instantiate new array double the size\n LinkedList<Entry<K, V>>[] tmp = (LinkedList<Entry<K, V>>[]) new LinkedList<?>[this.array.length * 2];\n for (int i = 0; i < this.array.length; i++) {\n // Visit every chain of our current array\n if (this.array[i] != null) {\n // If there's a linked list there, instantiate a new linked list\n // with all the same key, values into the new, expanded array\n tmp[i] = new LinkedList<Entry<K, V>>(this.array[i]);\n }\n }\n // Set the current array to be the updated expanded array\n this.array = tmp;\n }",
"private void transformRows() {\n this.rowCounts = this.rowDeduplicator.values().toIntArray();\n }",
"private void shiftUp() {\n int index = this.size;\n\n while (hasParent(index) && (parent(index).compareTo(heap[index]) > 0)) {\n swap(index, parentIndex(index));\n index = parentIndex(index);\n }\n }",
"public void open(int row, int col) {\n validateWithinBounds(row, col);\n\n int currentPos = pos(row, col);\n if (open[currentPos]) {\n return;\n }\n open[currentPos] = true;\n count++;\n\n if (row == 1) {\n quickUnion.union(virtualTop, currentPos);\n backwashQuickUnion.union(virtualTop, currentPos);\n }\n\n if (row == n) {\n backwashQuickUnion.union(virtualBottom, currentPos);\n }\n\n unionAdjacent(currentPos, row - 1, col);\n unionAdjacent(currentPos, row + 1, col);\n unionAdjacent(currentPos, row, col - 1);\n unionAdjacent(currentPos, row, col + 1);\n }",
"@Override\r\n\tpublic void turnUpToEleven() {\n\t\t\r\n\t}",
"public void up(int[][] arr,int start,int end,int i){\n if(start==end){\n return;\n }\n else{\n System.out.println(arr[start][i]);\n start--;\n }\n up(arr,start,end,i);\n }",
"public void rotate (int row) {\n\t\tif ( row < n / 2)\n\t\t\trotate(row + 1);\n\t\telse\n\t\t\treturn;\n\t\t//rotate the outter most row and col\n\t\trotateRow(row);\n\t}",
"public void shiftRows(int[][] arr) {\n for (int i = 1; i < arr.length; i++) {\n arr[i] = leftrotate(arr[i], i);\n }\n }",
"private void forward() {\n index++;\n column++;\n if(column == linecount + 1) {\n line++;\n column = 0;\n linecount = content.getColumnCount(line);\n }\n }",
"public void open(int row, int col) {\n\t\tif(row < 0 || row >= N || col < 0 || col >= N) \n\t\t\tthrow new IllegalArgumentException();\n\t\tif(isOpen(row, col)) return;\n\t\tint index = xyTo1D(row, col);\n\t\tgrid[index] = true;\n\t\tsize++;\n\t\t// left\n\t\tif(col - 1 >= 0 && isOpen(row, col - 1)) {\n\t\t\tweigtedJoin.union(index - 1, index);\n\t\t\tnonPercolate.union(index - 1, index);\n\t\t}\n\t\t// right\n\t\tif(col + 1 < N && isOpen(row, col + 1)) {\n\t\t\tweigtedJoin.union(index + 1, index); \n\t\t\tnonPercolate.union(index + 1, index);\n\t\t}\n\t\t// up\n\t\tif(row - 1 >= 0 && isOpen(row - 1, col)) {\n\t\t\tweigtedJoin.union(index - N, index);\n\t\t\tnonPercolate.union(index - N, index);\n\t\t}\n\t\t// down\n\t\tif(row + 1 < N && isOpen(row + 1, col)) {\n\t\t\tweigtedJoin.union(index + N, index);\n\t\t\tnonPercolate.union(index + N, index);\n\t\t}\n\t}",
"public void unCover() {\n linkLR();\n DataNode tmp = this.U;\n while (tmp != this) {\n //select each row and go through all the left nodes and link from respective columns.\n DataNode l = tmp.L;\n while (l!= tmp) {\n l.linkUD();\n l.C.count++;\n l = l.L;\n }\n tmp = tmp.U;\n }\n }",
"private void expand() {\n\n intElements = copyIntArray(intElements, intElements.length * 2);\n doubleElements = copyDoubleArray(doubleElements, doubleElements.length * 2);\n stringElements = copyStringArray(stringElements, stringElements.length * 2);\n typeOfElements = copyIntArray(typeOfElements, typeOfElements.length * 2);\n }",
"public void expand(int x, char d){\n if (d == 'L') {\n right += x;\n size = calcSize();\n //we don't care about the weight anymore as the ones left should be taken anyway\n }\n else if(d == 'R'){\n left -= x;\n size = calcSize();\n }\n else if(d == 'D'){\n up -= x;\n size = calcSize();\n }\n else if(d == 'U'){ //there is the possibility that there is no solution for that point at the moment\n down += x;\n size = calcSize();\n }\n }",
"private void fillDown(int nextTop) {\n LayoutParams p;\n while (nextTop > 0 && topViewPosition > 0) {\n topViewPosition--;\n View child = obtainView(topViewPosition);\n p = (LayoutParams) child.getLayoutParams();\n if (p == null) {\n p = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n Log.e(TAG, \"fillViews: p == null\");\n }\n p.viewType = mAdapter.getItemViewType(topViewPosition);\n addViewInLayout(child, 0, p, true);\n child.requestLayout();\n needReLayout=true;\n nextTop -= p.height;\n }\n }",
"@Test\n public void testReverseRow(){\n ROW.getReverseRow(ROW.getIndex());\n }",
"private void fillListUp(int topEdge, final int offset) {\n while (topEdge + offset > 0 && mFirstItemPosition > 0) {\n mFirstItemPosition--;\n final View newTopCild = mAdapter.getView(mFirstItemPosition, getCachedView(), this);\n addAndMeasureChild(newTopCild, LAYOUT_MODE_ABOVE);\n final int childHeight = getChildHeight(newTopCild);\n topEdge -= childHeight;\n\n // update the list offset (since we added a view at the top)\n mListTopOffset -= childHeight;\n }\n }",
"public void expand(int level)\n {\n if(isRootVisible())\n expandRow(0, level);\n else\n {\n for(int i=0; i < componentModel.getPropertyCount(); i++)\n {\n Property child = componentModel.getPropertyAt(i);\n expandRow(getRow(child), level);\n }\n }\n }",
"@Test void addNextRow() {\n\t\tcheckAddNextRow(false,5,4);\n\n\t\t// X X X X\n\t\t// X X X X X\n\t\tcheckAddNextRow(true,4,5);\n\n\t\t// X\n\t\t// x\n\t\tcheckAddNextRow(false,1,1);\n\n\n\n\t\t// X\n\t\t// x\n\t\tcheckAddNextRow(true,1,1);\n\t}",
"public void expandAll( boolean recursive )\n {\n if(treeTable == null)\n {\n return;\n }\n JTree tree = treeTable.getTree();\n for ( int i = 0; i < tree.getRowCount(); i++ )\n expandRow(i, recursive);\n }",
"public void backtracking(int row, int n){\n if(row == n){\n res++;\n return;\n }\n //我们只要看列和对角线就可以了, 因为我们是row by row的dfs,一行放一个queen,因为同行不能有其他queen.\n for(int col=0; col<n; col++){\n if(cols[col] || digl1[row+col] || digl2[row-col+n-1]){\n continue;\n }\n cols[col] = true;\n digl1[row+col] = true;\n digl2[row-col+n-1] = true;\n backtracking(row+1, n);\n cols[col] = false;\n digl1[row+col] = false;\n digl2[row-col+n-1] = false;\n }\n }",
"private static void pushDown(int[]data, int size, int index){\n boolean leftinbounds = 2*index + 1 < size;\n boolean rightinbounds = 2*index + 2 < size;\n int temp = data[index];\n if ((leftinbounds&&data[index]<data[2*index + 1]) || (rightinbounds && data[index]<data[2*index + 2])){\n if (leftinbounds && rightinbounds && data[index]<data[2*index + 1] && data[index]<data[2*index + 2]){\n if (data[2*index + 1]>data[2*index + 2]){\n data[index] = data[2*index + 1];\n data[2*index + 1] = temp;\n index = 2*index + 1;\n }\n else{\n data[index] = data[2*index + 2];\n data[2*index + 2] = temp;\n index = 2*index + 2;\n }\n }\n else if (leftinbounds && data[index]<data[2*index + 1]){\n data[index] = data[2*index + 1];\n data[2*index + 1] = temp;\n index = 2*index + 1;\n }\n else if(rightinbounds && data[index]<data[2*index + 2]){\n data[index] = data[2*index + 2];\n data[2*index + 2] = temp;\n index = 2*index + 2;\n }\n pushDown(data, size, index);\n }\n }",
"public void shiftRow(int[] row, int amount) {\n\n if (amount == 3) {\n int[] tempRow = new int[3];\n\n for (int j = 0; j < 3; j++) {\n tempRow[j] = row[j];\n }\n\n for (int i = 0; i < 6; i++) {\n row[i] = row[i + 3];\n }\n\n for (int x = 0; x < 3; x++) {\n row[x + 6] = tempRow[x];\n }\n } else if (amount == 1) {\n int temp = row[0];\n for (int i = 0; i < 8; i++) {\n row[i] = row[i + 1];\n }\n row[8] = temp;\n }\n\n }",
"private void generateUpsAndDowns() {\n\t\t// rows are simulation at given time, columns paths\n\t\tupsAndDowns = new double[lastTime][numberOfSimulations];\n\t\tdouble threshold = convert();// if the simulated number is less than this, we have up\n\t\t// double for loop, time and simulations\n\t\tfor (int timeIndex = 0; timeIndex < lastTime; timeIndex++) {\n\t\t\tfor (int simulationIndex = 0; simulationIndex < numberOfSimulations; simulationIndex++) {\n\t\t\t\t// the way we convert the probability into a condition on the generated numbers\n\t\t\t\tif (randomGenerator.getNextInteger() < threshold) {\n\t\t\t\t\tupsAndDowns[timeIndex][simulationIndex] = increaseIfUp;\n\t\t\t\t} else {\n\t\t\t\t\tupsAndDowns[timeIndex][simulationIndex] = decreaseIfDown;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void growSnake() { \r\n length++;\r\n snake[length-1].row = snake[length-2].row;\r\n snake[length-1].column = snake[length-2].column;\r\n if (snake[length-2].direction == UP) snake[length-1].row++;\r\n else if (snake[length-2].direction == DOWN) snake[length-1].row--;\r\n else if (snake[length-2].direction == LEFT) snake[length-1].column++;\r\n else if (snake[length-2].direction == RIGHT) snake[length-1].column--; \r\n }",
"public void adjustDown() {\n\n for (int y = 0; y < MAP_HEIGHT; y++)\n for (int x = 0; x < MAP_WIDTH; x++) {\n tiles[x][y].y = tiles[x][y].y + 4;\n backGroundTiles[x][y].y = backGroundTiles[x][y].y + 4;\n grassTiles[x][y].y = grassTiles[x][y].y + 4;\n }\n }",
"public void decrementRow() {\n setRowAndColumn(Math.max(row - 1, 0), column);\n }",
"private Float[][] expandEntries(ArrayList<Float[][]> emb)\n {\n int rows = 0;\n for (int i = 0; i < emb.size(); i++)\n {\n rows += emb.get(i).length;\n }\n\n // Define the new array and assign the values\n int previous_size = 0;\n Float[][] all_emb = new Float[rows][512];\n for (Float[][] mat: emb)\n {\n for (int i = 0; i < mat.length; i++)\n {\n for (int j = 0; j < mat[i].length; j++)\n {\n all_emb[i + previous_size][j] = mat[i][j];\n }\n }\n previous_size += mat.length;\n }\n\n return all_emb;\n }",
"private boolean slideDown()\n {\n if (blankRow == 0) {\n return false;\n }\n board[blankRow][blankCol] = board[blankRow - 1][blankCol];\n board[blankRow - 1][blankCol] = 0;\n blankRow -= 1;\n return true;\n }",
"private Point scrollToRow(JTree tree, int row)\n\t{\n\t\tPoint p = scrollToRow(tree, row, new JTreeLocation()).ii;\n\t\twaitForIdle();\n\t\treturn p;\n\t}",
"private void advance(final ResultSet rs, final RowSelection selection)\n \t\t\tthrows SQLException {\n \n-\t\tfinal int firstRow = getFirstRow( selection );\n+\t\tfinal int firstRow = LimitHelper.getFirstRow( selection );\n \t\tif ( firstRow != 0 ) {\n \t\t\tif ( getFactory().getSettings().isScrollableResultSetsEnabled() ) {\n \t\t\t\t// we can go straight to the first required row\n \t\t\t\trs.absolute( firstRow );\n \t\t\t}\n \t\t\telse {\n \t\t\t\t// we need to step through the rows one row at a time (slow)\n \t\t\t\tfor ( int m = 0; m < firstRow; m++ ) rs.next();\n \t\t\t}\n \t\t}\n \t}",
"private void shiftLeftAnimal(int row) {\r\n\t\t//some source code and matrix highlighting to show which java code\r\n\t\t//is equivalent to the current state of the animation\r\n\t\tmainMatrix.highlightCellColumnRange(row, 0, 3, new TicksTiming(0), new TicksTiming(0));\r\n\t\tshiftLeftSc.highlight(0);\r\n\t\tshiftLeftSc.highlight(9);\r\n\t\tlang.nextStep();\r\n\t\tshiftLeftSc.unhighlight(0);\r\n\t\tshiftLeftSc.unhighlight(9);\r\n\t\tshiftLeftSc.highlight(1);\r\n\t\tshiftLeftSc.highlight(7);\r\n\t\t//initialize element that shows current state of loop variable\r\n\t\tiText.setText(\"i = 0\", new TicksTiming(0), new TicksTiming(0));\r\n\t\tiText.show();\r\n\t\thighlightText(iText);\r\n\t\t//loop for shifts\r\n\t\tfor (int i = 0; i < row; i++) {\r\n\t\t\tlang.nextStep();\r\n\t\t\t//some source code and matrix highlighting to show which java code\r\n\t\t\t//is equivalent to the current state of the animation\r\n\t\t\tshiftLeftSc.unhighlight(1);\r\n\t\t\tshiftLeftSc.unhighlight(7);\r\n\t\t\tshiftLeftSc.highlight(2);\r\n\t\t\tunhighlightText(iText);\r\n\t\t\ttmpText.show();\r\n\t\t\ttmpMatrix.show();\r\n\t\t\t\r\n\t\t\t//add lines to swap values through the matrix. This is where the action happens!\r\n\t\t\t//increment counter\r\n\t\t\tcounter.accessInc(1);\r\n\t\t\tcounter.assignmentsInc(1);\r\n\t\t\tlang.addLine(\"swapGridValues \\\"mainMatrix[\" + row + \"][0]\\\" and \\\"tmpMatrix[0][0]\\\" refresh after 0 ticks within 100 ticks\");\r\n\t\t\tlang.nextStep();\r\n\t\t\t//increment counter\r\n\t\t\tcounter.accessInc(1);\r\n\t\t\tcounter.assignmentsInc(1);\r\n\t\t\tshiftLeftSc.unhighlight(2);\r\n\t\t\tshiftLeftSc.highlight(3);\r\n\t\t\tlang.addLine(\"swapGridValues \\\"mainMatrix[\" + row + \"][0]\\\" and \\\"mainMatrix[\" + row + \"][1]\\\" refresh after 0 ticks within 100 ticks\");\r\n\t\t\tlang.nextStep();\r\n\t\t\t//increment counter\r\n\t\t\tcounter.accessInc(1);\r\n\t\t\tcounter.assignmentsInc(1);\r\n\t\t\tshiftLeftSc.unhighlight(3);\r\n\t\t\tshiftLeftSc.highlight(4);\r\n\t\t\tlang.addLine(\"swapGridValues \\\"mainMatrix[\" + row + \"][1]\\\" and \\\"mainMatrix[\" + row + \"][2]\\\" refresh after 0 ticks within 100 ticks\");\r\n\t\t\tlang.nextStep();\r\n\t\t\t//increment counter\r\n\t\t\tcounter.accessInc(1);\r\n\t\t\tcounter.assignmentsInc(1);\r\n\t\t\tshiftLeftSc.unhighlight(4);\r\n\t\t\tshiftLeftSc.highlight(5);\r\n\t\t\tlang.addLine(\"swapGridValues \\\"mainMatrix[\" + row + \"][2]\\\" and \\\"mainMatrix[\" + row + \"][3]\\\" refresh after 0 ticks within 100 ticks\");\r\n\t\t\tlang.nextStep();\r\n\t\t\t//increment counter\r\n\t\t\tcounter.accessInc(1);\r\n\t\t\tcounter.assignmentsInc(1);\r\n\t\t\tshiftLeftSc.unhighlight(5);\r\n\t\t\tshiftLeftSc.highlight(6);\r\n\t\t\tlang.addLine(\"swapGridValues \\\"mainMatrix[\" + row + \"][3]\\\" and \\\"tmpMatrix[0][0]\\\" refresh after 0 ticks within 100 ticks\");\r\n\r\n\t\t\tlang.nextStep();\r\n\t\t\ttmpText.hide();\r\n\t\t\ttmpMatrix.hide();\r\n\t\t\t//some source code and matrix highlighting to show which java code\r\n\t\t\t//is equivalent to the current state of the animation\r\n\t\t\tshiftLeftSc.highlight(1);\r\n\t\t\tshiftLeftSc.highlight(7);\r\n\t\t\tshiftLeftSc.unhighlight(6);\r\n\t\t\tiText.setText(\"i = \" + (i + 1), new TicksTiming(0), new TicksTiming(0));\r\n\t\t\thighlightText(iText);\r\n\t\t}\r\n\t\tlang.nextStep();\r\n\t\t//some source code and matrix highlighting to show which java code\r\n\t\t//is equivalent to the current state of the animation\r\n\t\tshiftLeftSc.unhighlight(0);\r\n\t\tshiftLeftSc.unhighlight(9);\r\n\t\tshiftLeftSc.unhighlight(1);\r\n\t\tshiftLeftSc.unhighlight(7);\r\n\t\tshiftLeftSc.highlight(8);\r\n\t\tunhighlightText(iText);\r\n\t\tiText.hide();\r\n\t\tlang.nextStep();\r\n\t\tshiftLeftSc.unhighlight(8);\r\n\t\tmainMatrix.unhighlightCellColumnRange(row, 0, 3, new TicksTiming(0), new TicksTiming(0));\r\n\t}",
"public void advance()\n\t{\n\t\t//calling copy function\n\t\tcopy(); \n\t\t//for loop for row \n\t\tfor(int row =0; row<this.currentVersion.length; row++)\n\t\t{\t//for loop for column\n\t\t\tfor(int column =0; column<this.currentVersion[row].length; column++)\n\t\t\t{\n\t\t\t\t//if statements to implement 2D CA rules\n\t\t\t\tif (column == 0 && row == 0)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row+1][column] == currentVersion[row][column] + 1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row+1][column];\n\t\t\t\t\telse if(currentVersion[row][column+1] == currentVersion[row][column] +1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column +1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\tif (row == 0 && column == currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row][column - 1] == currentVersion[row][column] +1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column - 1];\n\t\t\t\t\telse if (currentVersion[row+1][column] == currentVersion [row][column] +1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row+1][column];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\tif (row == 0 && column > 0 && column < currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row][column-1] == currentVersion[row][column] + 1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column-1];\n\t\t\t\t\telse if(currentVersion[row+1][column] == currentVersion[row][column] + 1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row+1][column];\n\t\t\t\t\telse if(currentVersion[row][column+1] == currentVersion[row][column] +1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column+1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\tif (row == currentVersion.length-1 && column == 0)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row-1][column] == currentVersion[row][column] + 1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row -1][column]; \n\t\t\t\t\telse if(currentVersion[row][column+1] == currentVersion[row][column] + 1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column+1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\tif (row > 0 && column ==0 && row < currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row+1][column] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row+1][column];\n\t\t\t\t\tif(currentVersion[row][column+1] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column+1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\tif(row == currentVersion.length-1 && column == currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row-1][column] == currentVersion[row][column] +1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row-1][column];\n\t\t\t\t\telse if(currentVersion[row][column-1] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column-1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(row == currentVersion.length-1 && column > 0 && column < currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif(currentVersion[row-1][column] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row-1][column];\n\t\t\t\t\telse if(currentVersion[row][column-1] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column-1]; \n\t\t\t\t\telse if(currentVersion[row][column+1] == currentVersion[row][column] +1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column+1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\t\n\t\t\t\tif(row>0 && row < currentVersion.length-1 && column == currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif (currentVersion[row-1][column] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row-1][column];\n\t\t\t\t\telse if(currentVersion[row+1][column] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row+1][column]; \n\t\t\t\t\telse if(currentVersion[row][column-1] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column-1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0; \n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\tif(row>0 && row < currentVersion.length-1 && column > 0 && column < currentVersion.length-1)\n\t\t\t\t{\n\t\t\t\t\tif (currentVersion[row-1][column] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row-1][column];\n\t\t\t\t\telse if(currentVersion[row+1][column] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row+1][column]; \n\t\t\t\t\telse if(currentVersion[row][column-1] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column-1];\n\t\t\t\t\telse if(currentVersion[row][column+1] == currentVersion[row][column]+1)\n\t\t\t\t\t\tnextVersion[row][column] = currentVersion[row][column+1];\n\t\t\t\t\telse if (currentVersion[row][column] == 0)\n\t\t\t\t\t\tnextVersion[row][column] = 1; \n\t\t\t\t\telse if (currentVersion[row][column] == state-1)\n\t\t\t\t\t\tnextVersion[row][column] = 0;\n\t\t\t\t\telse if(currentVersion[row][column] == state-2)\n\t\t\t\t\t\tnextVersion[row][column] = (byte) (state-1);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t//passing new nextVersion array to currentVersion array\n\tsetUniverse(nextVersion);\n\t}",
"private void fillEvenRow() {\n\t\tif(beepersPresent()) {\n\t\t\tturnLeft();\n\t\t\tmove();\n\t\t\tturnLeft();\n\t\t} else {\n\t\t\tturnLeft();\n\t\t\tmove();\n\t\t\tturnLeft();\n\t\t\tputBeeper();\n\t\t}\n\t\tputEveryOtherBeeper();\n\t}",
"void growCells() {\n for (Cell cell : cells) {\n cell.grow();\n }\n }",
"private void trickleUp(int index) {\n Map.Entry<String, Double> bottom = this.get(index);\n\n // if bottom < parent, move up\n while (PARENT(bottom).getValue().compareTo(bottom.getValue()) > 0) {\n Collections.swap(this, this.indexOf(bottom), this.indexOf(PARENT(bottom)));\n }\n\n }",
"protected void collapseRow( int row )\n {\n if(treeTable == null)\n {\n return;\n }\n if ( row >= 0 )\n {\n treeTable.getTree().collapseRow( row );\n }\n }",
"private void expandArray(int expandSize) {\n\t\tif(expandSize < 1) {\n\t\t\treturn;\n\t\t}\n\t\t// Save current array reference, and create new array size\n\t\tObject[] temp = array;\n\t\tthis.array = new Object[temp.length + expandSize]; // same as [this.array.length + expandSize]\n\n\t\t// If there is any 'wrap around' data, copy data up to the end of the array and copy the wrap around data\n\t\tif(index+length > temp.length) {\n\t\t\t// Copy everything up to the end of the old array\n\t\t\tSystem.arraycopy(temp, index, array, index, temp.length - index);\n\n\t\t\t// Calculate the remaining number of elements that need copying\n\t\t\tint remaining = (length - (temp.length - index));\n\t\t\t// Determine if all of the wrap around elements can fit in the remaining space at the end of the\n\t\t\t// expanded array\n\t\t\tint tailSize = 0;\n\t\t\tif(remaining < expandSize) { tailSize = remaining; }\n\t\t\telse { tailSize = expandSize; }\n\n\t\t\t// Copy the wrap around elements into the expanded array up to the end of the expanded array\n\t\t\tSystem.arraycopy(temp, 0, array, temp.length, tailSize);\n\t\t\t// Wrap around and copy any remaining wrap around elements\n\t\t\tif(remaining > tailSize) {\n\t\t\t\tSystem.arraycopy(temp, tailSize, array, 0, remaining-tailSize);\n\t\t\t}\n\t\t}\n\t\t// Else none of the data 'wraps around', so everything can be copied at once\n\t\telse {\n\t\t\tSystem.arraycopy(temp, index, array, index, length);\n\t\t}\n\t}",
"private Handle[] expandTable(Handle[] myTable) {\n Handle[] newTable = new Handle[myTable.length * 2];\n // iterate sequentially through previous table\n for (int i = 0; i < myTable.length; i++) {\n // copy over all non-null elements that are not our\n // gravestone\n if (myTable[i] != null && myTable[i] != GRAVESTONE) {\n // valid element to copy over\n newTable =\n this.insertHelper(newTable, myTable[i]);\n }\n } // end for-loop\n return newTable;\n }",
"private void expandNode() {\r\n\t\t\t// Dijkstra's algorithm to handle separately\r\n\t\t\tif (dijkstra.isSelected()) {\r\n\t\t\t\tCell u;\r\n\t\t\t\t// 11: while Q is not empty:\r\n\t\t\t\tif (graph.isEmpty()) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// 12: u := vertex in Q (graph) with smallest distance in dist[]\r\n\t\t\t\t// ;\r\n\t\t\t\t// 13: remove u from Q (graph);\r\n\t\t\t\tu = graph.remove(0);\r\n\t\t\t\t// Add vertex u in closed set\r\n\t\t\t\tclosedSet.add(u);\r\n\t\t\t\t// If target has been found ...\r\n\t\t\t\tif (u.row == targetPos.row && u.col == targetPos.col) {\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// Counts nodes that have expanded.\r\n\t\t\t\texpanded++;\r\n\t\t\t\t// Update the color of the cell\r\n\t\t\t\tgrid[u.row][u.col] = CLOSED;\r\n\t\t\t\t// 14: if dist[u] = infinity:\r\n\t\t\t\tif (u.dist == INFINITY) {\r\n\t\t\t\t\t// ... then there is no solution.\r\n\t\t\t\t\t// 15: break;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t\t// 16: end if\r\n\t\t\t\t}\r\n\t\t\t\t// Create the neighbors of u\r\n\t\t\t\tArrayList<Cell> neighbors = createSuccesors(u, false);\r\n\t\t\t\t// 18: for each neighbor v of u:\r\n\t\t\t\tfor (Cell v : neighbors) {\r\n\t\t\t\t\t// 20: alt := dist[u] + dist_between(u, v) ;\r\n\t\t\t\t\tint alt = u.dist + distBetween(u, v);\r\n\t\t\t\t\t// 21: if alt < dist[v]:\r\n\t\t\t\t\tif (alt < v.dist) {\r\n\t\t\t\t\t\t// 22: dist[v] := alt ;\r\n\t\t\t\t\t\tv.dist = alt;\r\n\t\t\t\t\t\t// 23: previous[v] := u ;\r\n\t\t\t\t\t\tv.prev = u;\r\n\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\tgrid[v.row][v.col] = FRONTIER;\r\n\t\t\t\t\t\t// 24: decrease-key v in Q;\r\n\t\t\t\t\t\t// (sort list of nodes with respect to dist)\r\n\t\t\t\t\t\tCollections.sort(graph, new CellComparatorByDist());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// The handling of the other four algorithms\r\n\t\t\t} else {\r\n\t\t\t\tCell current;\r\n\t\t\t\tif (dfs.isSelected() || bfs.isSelected()) {\r\n\t\t\t\t\t// Here is the 3rd step of the algorithms DFS and BFS\r\n\t\t\t\t\t// 3. Remove the first state, Si, from OPEN SET ...\r\n\t\t\t\t\tcurrent = openSet.remove(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Here is the 3rd step of the algorithms A* and Greedy\r\n\t\t\t\t\t// 3. Remove the first state, Si, from OPEN SET,\r\n\t\t\t\t\t// for which f(Si) ≤ f(Sj) for all other\r\n\t\t\t\t\t// open states Sj ...\r\n\t\t\t\t\t// (sort first OPEN SET list with respect to 'f')\r\n\t\t\t\t\tCollections.sort(openSet, new CellComparatorByF());\r\n\t\t\t\t\tcurrent = openSet.remove(0);\r\n\t\t\t\t}\r\n\t\t\t\t// ... and add it to CLOSED SET.\r\n\t\t\t\tclosedSet.add(0, current);\r\n\t\t\t\t// Update the color of the cell\r\n\t\t\t\tgrid[current.row][current.col] = CLOSED;\r\n\t\t\t\t// If the selected node is the target ...\r\n\t\t\t\tif (current.row == targetPos.row && current.col == targetPos.col) {\r\n\t\t\t\t\t// ... then terminate etc\r\n\t\t\t\t\tCell last = targetPos;\r\n\t\t\t\t\tlast.prev = current.prev;\r\n\t\t\t\t\tclosedSet.add(last);\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// Count nodes that have been expanded.\r\n\t\t\t\texpanded++;\r\n\t\t\t\t// Here is the 4rd step of the algorithms\r\n\t\t\t\t// 4. Create the successors of Si, based on actions\r\n\t\t\t\t// that can be implemented on Si.\r\n\t\t\t\t// Each successor has a pointer to the Si, as its predecessor.\r\n\t\t\t\t// In the case of DFS and BFS algorithms, successors should not\r\n\t\t\t\t// belong neither to the OPEN SET nor the CLOSED SET.\r\n\t\t\t\tArrayList<Cell> succesors;\r\n\t\t\t\tsuccesors = createSuccesors(current, false);\r\n\t\t\t\t// Here is the 5th step of the algorithms\r\n\t\t\t\t// 5. For each successor of Si, ...\r\n\t\t\t\tfor (Cell cell : succesors) {\r\n\t\t\t\t\t// ... if we are running DFS ...\r\n\t\t\t\t\tif (dfs.isSelected()) {\r\n\t\t\t\t\t\t// ... add the successor at the beginning of the list\r\n\t\t\t\t\t\t// OPEN SET\r\n\t\t\t\t\t\topenSet.add(0, cell);\r\n\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t// ... if we are runnig BFS ...\r\n\t\t\t\t\t} else if (bfs.isSelected()) {\r\n\t\t\t\t\t\t// ... add the successor at the end of the list OPEN SET\r\n\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t// ... if we are running A* or Greedy algorithms (step 5\r\n\t\t\t\t\t\t// of A* algorithm) ...\r\n\t\t\t\t\t} else if (aStar.isSelected() || guloso.isSelected()) {\r\n\t\t\t\t\t\t// ... calculate the value f(Sj) ...\r\n\t\t\t\t\t\tint dxg = current.col - cell.col;\r\n\t\t\t\t\t\tint dyg = current.row - cell.row;\r\n\t\t\t\t\t\tint dxh = targetPos.col - cell.col;\r\n\t\t\t\t\t\tint dyh = targetPos.row - cell.row;\r\n\t\t\t\t\t\tif (diagonal.isSelected()) {\r\n\t\t\t\t\t\t\t// with diagonal movements\r\n\t\t\t\t\t\t\t// calculate 1000 times the Euclidean distance\r\n\t\t\t\t\t\t\tif (guloso.isSelected()) {\r\n\t\t\t\t\t\t\t\t// especially for the Greedy ...\r\n\t\t\t\t\t\t\t\tcell.g = 0;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcell.g = current.g + (int) ((double) 1000 * Math.sqrt(dxg * dxg + dyg * dyg));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcell.h = (int) ((double) 1000 * Math.sqrt(dxh * dxh + dyh * dyh));\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// without diagonal movements\r\n\t\t\t\t\t\t\t// calculate Manhattan distances\r\n\t\t\t\t\t\t\tif (guloso.isSelected()) {\r\n\t\t\t\t\t\t\t\t// especially for the Greedy ...\r\n\t\t\t\t\t\t\t\tcell.g = 0;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcell.g = current.g + Math.abs(dxg) + Math.abs(dyg);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcell.h = Math.abs(dxh) + Math.abs(dyh);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcell.f = cell.g + cell.h;\r\n\t\t\t\t\t\t// ... If Sj is neither in the OPEN SET nor in the\r\n\t\t\t\t\t\t// CLOSED SET states ...\r\n\t\t\t\t\t\tint openIndex = isInList(openSet, cell);\r\n\t\t\t\t\t\tint closedIndex = isInList(closedSet, cell);\r\n\t\t\t\t\t\tif (openIndex == -1 && closedIndex == -1) {\r\n\t\t\t\t\t\t\t// ... then add Sj in the OPEN SET ...\r\n\t\t\t\t\t\t\t// ... evaluated as f(Sj)\r\n\t\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t\t// Else ...\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// ... if already belongs to the OPEN SET, then ...\r\n\t\t\t\t\t\t\tif (openIndex > -1) {\r\n\t\t\t\t\t\t\t\t// ... compare the new value assessment with the\r\n\t\t\t\t\t\t\t\t// old one.\r\n\t\t\t\t\t\t\t\t// If old <= new ...\r\n\t\t\t\t\t\t\t\tif (openSet.get(openIndex).f <= cell.f) {\r\n\t\t\t\t\t\t\t\t\t// ... then eject the new node with state\r\n\t\t\t\t\t\t\t\t\t// Sj.\r\n\t\t\t\t\t\t\t\t\t// (ie do nothing for this node).\r\n\t\t\t\t\t\t\t\t\t// Else, ...\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t// ... remove the element (Sj, old) from the\r\n\t\t\t\t\t\t\t\t\t// list\r\n\t\t\t\t\t\t\t\t\t// to which it belongs ...\r\n\t\t\t\t\t\t\t\t\topenSet.remove(openIndex);\r\n\t\t\t\t\t\t\t\t\t// ... and add the item (Sj, new) to the\r\n\t\t\t\t\t\t\t\t\t// OPEN SET.\r\n\t\t\t\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// ... if already belongs to the CLOSED SET,\r\n\t\t\t\t\t\t\t\t// then ...\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// ... compare the new value assessment with the\r\n\t\t\t\t\t\t\t\t// old one.\r\n\t\t\t\t\t\t\t\t// If old <= new ...\r\n\t\t\t\t\t\t\t\tif (closedSet.get(closedIndex).f <= cell.f) {\r\n\t\t\t\t\t\t\t\t\t// ... then eject the new node with state\r\n\t\t\t\t\t\t\t\t\t// Sj.\r\n\t\t\t\t\t\t\t\t\t// (ie do nothing for this node).\r\n\t\t\t\t\t\t\t\t\t// Else, ...\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t// ... remove the element (Sj, old) from the\r\n\t\t\t\t\t\t\t\t\t// list\r\n\t\t\t\t\t\t\t\t\t// to which it belongs ...\r\n\t\t\t\t\t\t\t\t\tclosedSet.remove(closedIndex);\r\n\t\t\t\t\t\t\t\t\t// ... and add the item (Sj, new) to the\r\n\t\t\t\t\t\t\t\t\t// OPEN SET.\r\n\t\t\t\t\t\t\t\t\topenSet.add(cell);\r\n\t\t\t\t\t\t\t\t\t// Update the color of the cell\r\n\t\t\t\t\t\t\t\t\tgrid[cell.row][cell.col] = FRONTIER;\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}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"private void shiftDown() {\n int index = 1;\n\n while (hasLeftChild(index)) {\n //compare chield Nodes\n int smallerChild = leftIndex(index);\n\n // shft down with smaller Node if any\n if (hasRightChild(index) && heap[leftIndex(index)].compareTo(heap[rightIndex(index)]) > 0) {\n smallerChild = rightIndex(index);\n }\n\n if (heap[index].compareTo(heap[smallerChild]) > 0) {\n swap(index, smallerChild);\n } else {\n //Nothing to do\n break;\n }\n index = smallerChild;\n }\n }",
"public void compactUp() {\n\t// Iteramos a través del tablero partiendo de la primera fila\n\t// y primera columna. Si esta contiene un 0 y la fila posterior\n\t// de la misma columna es distinta de 0, el valor se intercambia.\n\t// El proceso se repite hasta que todas las posiciones susceptibles\n\t// al cambio se hayan comprobado.\n\tfor (int i = 0; i < board.length; i++) {\n\t for (int j = 0; j < board.length - 1; j++) {\n\t\tif (board[j][i] == EMPTY && board[j + 1][i] != EMPTY) {\n\t\t board[j][i] = board[j + 1][i];\n\t\t board[j + 1][i] = EMPTY;\n\t\t compactUp();\n\t\t}\n\t }\n\t}\n }",
"private void resizeDown()\n\t{\n\t\tint newSize = myArray.length/2;\n\t\tmyArray = Arrays.copyOf(myArray, newSize);\n\t}",
"private void fillOddRow() {\n\t\tif(beepersPresent()) {\n\t\t\tturnRight();\n\t\t\tmove();\n\t\t\tturnRight();\n\t\t} else {\n\t\t\tturnRight();\n\t\t\tmove();\n\t\t\tturnRight();\n\t\t\tputBeeper();\n\t\t}\n\t\tputEveryOtherBeeper();\n\t}",
"public static void method1(int numRows) {\n List<List<Integer>> pt = new ArrayList<>();\n List<Integer> row, pre = null;\n for (int i = 0; i < numRows; ++i) {\n row = new ArrayList<>();\n for (int j = 0; j <= i; ++j) {\n if (j == 0 || j == i) {\n row.add(1);\n } else {\n row.add(pre.get(j - 1) + pre.get(j));\n }\n }\n pre = row;\n pt.add(row);\n }\n\n for (List<Integer> a : pt) {\n for (int i: a) {\n System.out.print(i + \" \");\n }\n System.out.println();\n }\n }",
"public Location up() {\n return new Location(row - 1, column);\n }",
"private int percolateUpLeaf(){\n\t\treturn percolateUp(heap.size()-1);// TODO: A one-line function that calls percolateUp()\n\t}",
"public int[] expandingCapabilities(int x, int y){\n int[] expandingAmount = {0,0,0,0,0};\n if(x >= right ){\n expandingAmount[1] = x - right + 1;//we need the +1 because right is non-inclusive\n expandingAmount[0] = 0;\n }\n else if(x < left){\n expandingAmount[0] = left - x;\n expandingAmount[1] = 0;\n }\n if(y >= down){\n expandingAmount[3] = y - down + 1;\n expandingAmount[2] = 0;\n }\n else if(y < up) {\n expandingAmount[2] = up - y;\n expandingAmount[3] = 0;\n }\n //if with this extension goes over the limit (increses size too much) then we do not move forward\n int newPossibleSize = (right - left) * (expandingAmount[2] + expandingAmount[3]) + (down - up) * (expandingAmount[1] + expandingAmount [0]);//(expandingAmount[1] - expandingAmount[0]) * (expandingAmount[2] - expandingAmount[3]);\n expandingAmount[4] = newPossibleSize;\n newPossibleSize += size;\n if(newPossibleSize > limit){\n\n expandingAmount[4] = -1;\n }\n return expandingAmount;\n }"
] | [
"0.6457157",
"0.6452378",
"0.64220166",
"0.6221071",
"0.6155094",
"0.60259295",
"0.60067123",
"0.59380394",
"0.59213483",
"0.5877199",
"0.5861224",
"0.5770139",
"0.57636476",
"0.5750015",
"0.5733367",
"0.56991947",
"0.5647375",
"0.56456864",
"0.5630997",
"0.5630511",
"0.56031346",
"0.55983025",
"0.55577266",
"0.5530889",
"0.5530855",
"0.55154586",
"0.55032134",
"0.54914266",
"0.54760563",
"0.54297906",
"0.5338309",
"0.53227466",
"0.5299561",
"0.5293695",
"0.52794874",
"0.52501",
"0.52403116",
"0.5236706",
"0.5230349",
"0.52240914",
"0.5222488",
"0.52211696",
"0.5199127",
"0.51915044",
"0.51804894",
"0.5178419",
"0.5162029",
"0.51571375",
"0.5155948",
"0.51530576",
"0.5147125",
"0.5132284",
"0.5126783",
"0.51264846",
"0.51166564",
"0.51139694",
"0.51109177",
"0.5105764",
"0.5099822",
"0.50965345",
"0.50886875",
"0.5082542",
"0.507516",
"0.50743574",
"0.5065917",
"0.5055701",
"0.50491536",
"0.5049112",
"0.50434035",
"0.50433534",
"0.5037383",
"0.5035817",
"0.50347173",
"0.50337523",
"0.5025003",
"0.5017667",
"0.50138783",
"0.5012557",
"0.5001584",
"0.49980673",
"0.49848497",
"0.49805737",
"0.49776924",
"0.49730757",
"0.49701196",
"0.49666926",
"0.4961659",
"0.4955496",
"0.49554184",
"0.4952783",
"0.4951644",
"0.49429917",
"0.4941517",
"0.49261743",
"0.4921432",
"0.4919854",
"0.49172544",
"0.49156672",
"0.49155656",
"0.49121085",
"0.49091506"
] | 0.0 | -1 |
/ number is the phone number | public String getCName(Context context, String number) {
Uri lookupUri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI,
Uri.encode(number));
String[] mPhoneNumberProjection = { PhoneLookup._ID,
PhoneLookup.NUMBER, PhoneLookup.DISPLAY_NAME };
Cursor cur = context.getContentResolver().query(lookupUri,
mPhoneNumberProjection, null, null, null);
try {
if (cur.moveToFirst()) {
return cur
.getString(cur.getColumnIndex(PhoneLookup.DISPLAY_NAME));
}
} finally {
if (cur != null)
cur.close();
}
return number;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getPhoneNumber();",
"java.lang.String getPhoneNumber();",
"java.lang.String getPhoneNumber();",
"public String getPhoneNumber() {\r\n return number;\r\n }",
"java.lang.String getPhonenumber();",
"public void setPhoneNumber(java.lang.CharSequence value) {\n this.phone_number = value;\n }",
"String formatPhoneNumber(String phoneNumber);",
"public String getPhoneNumber(){\r\n\t\treturn phoneNumber;\r\n\t}",
"java.lang.String getUserPhone();",
"public void getPhoneNumber(ArrayList<String> document) {\r\n String line = \"\";\r\n for(int i = 0; i < document.size(); i++)\r\n {\r\n if(document.get(i).contains(\"Fax:\"))\r\n {\r\n continue;\r\n }\r\n if(document.get(i).contains(\"(\") || document.get(i).contains(\"-\"))\r\n {\r\n line = document.get(i);\r\n break;\r\n }\r\n }\r\n number = line.replaceAll(\"[^\\\\d]\", \"\");\r\n }",
"java.lang.String getPhone();",
"public String getPhoneNumber(){\n\t\t \n\t\t TelephonyManager mTelephonyMgr;\n\t\t mTelephonyMgr = (TelephonyManager)\n\t\t activity.getSystemService(Context.TELEPHONY_SERVICE); \n\t\t return mTelephonyMgr.getLine1Number();\n\t\t \n\t\t}",
"@Override\n public String getphoneNumber() {\n return ((EditText)findViewById(R.id.phoneNumberUserPage)).getText().toString().trim();\n }",
"void formatPhoneNumber(String phoneNumber) throws PhoneNumberFormatException;",
"public String getPhonenumber() {\n return phonenumber;\n }",
"public java.lang.CharSequence getPhoneNumber() {\n return phone_number;\n }",
"public String getPhoneNum()\r\n {\r\n\treturn phoneNum;\r\n }",
"public String getPhonenumber() {\n\t\treturn phonenumber;\n\t}",
"public java.lang.CharSequence getPhoneNumber() {\n return phone_number;\n }",
"public String getPhoneNumber()\n\t{\n\t\treturn this._phoneNumber;\n\t}",
"public String formatPhoneNumber(String number) {\n return \"+44\" + number.substring(1, 11);\n }",
"public String getPhoneNumber() {\r\n return phoneNumber;\r\n }",
"public void setPhoneNumber(String phone_number){\n this.phone_number = phone_number;\n }",
"public String getPhoneNumber() {\n\t\treturn phoneNumber;\n\t}",
"public long getPhoneNumber() {\r\n\t\treturn phoneNumber;\r\n\t}",
"public com.politrons.avro.AvroPerson.Builder setPhoneNumber(java.lang.CharSequence value) {\n validate(fields()[3], value);\n this.phone_number = value;\n fieldSetFlags()[3] = true;\n return this; \n }",
"public String getPhoneNumber() {\n\t\treturn this.phoneNumber;\n\t}",
"public String getPhoneNumber() {\n return phoneNumber;\n }",
"private boolean is_phonenumber(String nr)\n\t{\n\t\t// if the string is not null, length is between 0 and 16, starts with \"00\" and all the characters in the sttring are numbers\n\t\t// then it's valid\n\t\tif(nr != null && nr.length() > 0 && nr.length() < 16 && nr.substring(0, 2).equals(\"00\") && valid_numbers(nr))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public int getPhoneNumber() {\n\t\treturn phoneNumber;\n\t}",
"public String getPhoneNumber() {\n return this.phoneNumber;\n }",
"public String inputPhoneNumber() {\n String phoneNumber = editTextPhoneNumber.getText().toString();\n return phoneNumber;\n }",
"public String getPhone_number() {\n return phone_number;\n }",
"public String getphoneNum() {\n\t\treturn _phoneNum;\n\t}",
"public String getPhoneNumber() {\n return phoneNumber;\n }",
"public String getPhoneNumber() {\n return phoneNumber;\n }",
"public String getPhoneNumber() {\n return phoneNumber;\n }",
"public String getPhoneNumber() {\n return phoneNumber;\n }",
"public String getPhoneNumber() {\n return phoneNumber;\n }",
"public String getPhoneNumber() {\n return phoneNumber;\n }",
"public String getPhoneNumber() {\n return phoneNumber;\n }",
"public String getPhoneNumber() {\n return phoneNumber;\n }",
"public String getPhoneNumber() {\n return phoneNumber;\n }",
"@ApiModelProperty(value = \"Phone number, as entered. Does not need to be formatted in any particular way. Required.\")\n public String getNumber() {\n return number;\n }",
"String getPhone(int type);",
"public String getPhoneNumber() {\n return mPhoneNumber;\n }",
"public void setphoneNum(String phoneNum) {\n\t\t_phoneNum = phoneNum;\n\t}",
"public void setPhoneNum(String phoneNum) {\n this.phoneNum = phoneNum;\n }",
"private void formatPhoneNum() {\n\t\tthis.phoneNum = \"(\" + this.phoneNum.substring(0, 3) + \") \" + this.phoneNum.substring(3, 6) + \" \"\n\t\t\t\t+ this.phoneNum.substring(6);\n\t}",
"public String getPhoneNum()\r\n {\r\n return phoneNum;\r\n }",
"public String getPhoneNum() {\n return phoneNum;\n }",
"public String getPhoneNum() {\n return phoneNum;\n }",
"public String getPhoneNum() {\n return phoneNum;\n }",
"private String getMyPhoneNO() {\n String mPhoneNumber;\n TelephonyManager tMgr = (TelephonyManager) this.getActivity().getSystemService(Context\n .TELEPHONY_SERVICE);\n mPhoneNumber = tMgr.getLine1Number();\n if(mPhoneNumber == null)\n mPhoneNumber = \"+NoNotFound\";\n return mPhoneNumber;\n }",
"public Integer getPhonenumber() {\n return phonenumber;\n }",
"public void setTelephoneNumber(String newNumber)\r\n\t{\r\n\t\ttelephoneNumber = newNumber;\r\n\t}",
"public String getPhoneNumber(){\n return phone_number;\n }",
"@Override\n public String getPhoneNumber() {\n\n if(this.phoneNumber == null){\n\n this.phoneNumber = TestDatabase.getInstance().getClientField(token, id, \"phoneNumber\");\n }\n\n return phoneNumber;\n }",
"@ApiModelProperty(value = \"Collection of information that identifies a phone number, as defined by telecom services.\")\n\n@Pattern(regexp=\"\\\\+[0-9]{1,3}-[0-9()+\\\\-]{1,30}\") \n public String getPhoneNumber() {\n return phoneNumber;\n }",
"public void setPhone_number(String phone_number) {\n this.phone_number = phone_number;\n }",
"public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }",
"boolean hasPhoneNumber();",
"public Builder setPhoneNumber(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n phoneNumber_ = value;\n onChanged();\n return this;\n }",
"public String getPhoneNumberString() {\n return mPhoneNumberString;\n }",
"public GoldenContactBuilder phone(String value) {\n phone = value;\n return this;\n }",
"public java.lang.String getPhone_number() {\n return phone_number;\n }",
"public void updatePhoneNumber(String newPhoneNum)\r\n {\r\n phoneNum = newPhoneNum;\r\n }",
"public String getPhoneNumber() throws NullPointerException {\n\n\t\tString phoneNumber = user.getPhoneNumber();\n\t\tif (phoneNumber == null || phoneNumber.isEmpty()) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\n\t\treturn Utils.formatPhoneNumber(phoneNumber);\n\t}",
"public void setPhoneNumber(String phoneNumber) {\n\t\tthis.phoneNumber=phoneNumber;\r\n\t}",
"public void setPhoneNumber() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setter method initialized\r\n System.out.println(\"Phone Number : \"+phoneNumber);}",
"public String getPhone() {\r\n\t\treturn this.phone;\r\n\t}",
"public Phone(String countryCode, String areaCode, String number) {\n this.countryCode = countryCode;\n this.areaCode = areaCode;\n this.number = number;\n }",
"public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }",
"public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }",
"public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }",
"public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }",
"public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }",
"public String returnPhoneNumber() {\n\t\treturn this.registration_phone.getAttribute(\"value\");\r\n\t}",
"@AutoEscape\n\tpublic String getPhone();",
"public void setPhoneNo(String value) {\n setAttributeInternal(PHONENO, value);\n }",
"public long getPhoneNumber() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t// getter method initialized\t\t\t\t \r\n Scanner scanner = new Scanner(System.in);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t// Initialize the scanner to get input from User\r\n System.out.print(\"Enter Phone Number : \");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // This will print the argument at the end of the line\r\n phoneNumber = scanner.nextLong();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Read long input from the User\r\n String inputPhoneNumber = Long.toString(phoneNumber);\t\t\t\t\t\t\t\t\t\t // convert Long to string.\r\n Pattern pattern = Pattern.compile(\"\\\\d{10}\");\t\t\t\t\t\t\t\t\t\t\t // The Pattern class represents a compiled regular expression.\r\n Matcher matcher = pattern.matcher(inputPhoneNumber );\t\t\t\t\t\t\t\t\t\t\t\t\t // The resulting Pattern object is used to obtain a Matcher instance.\r\n if (matcher.matches());\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // if loop ..to check input from the User\r\n else {\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// else loop started\r\n System.out.println(\"Invalid Phone Number - Please enter the Phone number again\");}\t\t \t// This will print the argument at the end of the line\t\r\n return phoneNumber;}",
"int getPhone();",
"public void setPhone_number(java.lang.String phone_number) {\n this.phone_number = phone_number;\n }",
"public void setPhoneNumbr(String phoneNumber) {\n\t\tthis.phoneNumber = phoneNumber;\n\t}",
"public String getTelephoneNumber() {\n\t\treturn telephoneNumber;\n\t}",
"private void modifyCallFunc(String number) {\n Intent intent = new Intent(Intent.ACTION_DIAL);\n intent.setData(Uri.parse(\"tel:\" + number));\n startActivity(intent);\n }",
"public void setTelphone(String telphone) {\n this.telphone = telphone;\n }",
"public void setTelphone(String telphone) {\n this.telphone = telphone;\n }",
"public String getTelephoneNumber() {\n return telephoneNumber;\n }",
"public Optional<String> validatePhoneNumber(String number) {\n\n String regexStr = \"^[0-9]{11}$\";\n if (number.matches(regexStr) && number.substring(0, 1).equals(\"0\")) {\n return Optional.of(formatPhoneNumber(number));\n }\n return Optional.absent();\n }",
"public void setPhonenumber(String phonenumber) {\n\t\tthis.phonenumber = phonenumber;\n\t}",
"protected void validateMobileNumber(){\n /*\n Checking For Mobile number\n The Accepted Types Are +00 000000000 ; +00 0000000000 ;+000 0000000000; 0 0000000000 ; 00 0000000000\n */\n Boolean mobileNumber = Pattern.matches(\"^[0]?([+][0-9]{2,3})?[-][6-9]+[0-9]{9}\",getMobileNumber());\n System.out.println(mobileNumberResult(mobileNumber));\n }",
"public void setPhonenumber(Integer phonenumber) {\n this.phonenumber = phonenumber;\n }",
"public String getPhoneNumber(int n) {\r\n\t\tif(phone.size()>n && n>=0)\r\n\t\t\treturn phone.get(n);\r\n\t\telse\r\n\t\t\treturn null;\t\t\r\n\t}",
"public Builder setPhoneNumber(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n phoneNumber_ = value;\n onChanged();\n return this;\n }",
"public String getPhone(){\n\t\treturn phone;\n\t}",
"@java.lang.Override\n public com.google.protobuf.StringValue getPhoneNumber() {\n return phoneNumber_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : phoneNumber_;\n }",
"public String getTelphone() {\n return telphone;\n }",
"public String getTelphone() {\n return telphone;\n }",
"public String getTelphone() {\n return telphone;\n }",
"private boolean isValidMobileNumber(String number) {\n return Patterns.PHONE.matcher(number).matches() && (number.length() > 10);\n }"
] | [
"0.78538734",
"0.78538734",
"0.78538734",
"0.7674159",
"0.76228744",
"0.7371318",
"0.72829676",
"0.7260377",
"0.7225623",
"0.72091573",
"0.72040886",
"0.719641",
"0.7162312",
"0.71299237",
"0.70643926",
"0.7064306",
"0.7045993",
"0.7026704",
"0.7019021",
"0.7011676",
"0.70052415",
"0.7004318",
"0.69792885",
"0.69567424",
"0.69309527",
"0.6923368",
"0.691488",
"0.69003385",
"0.6890699",
"0.68798447",
"0.6872332",
"0.68710446",
"0.68670523",
"0.6861755",
"0.6851325",
"0.6851325",
"0.6851325",
"0.6851325",
"0.6851325",
"0.6851325",
"0.6851325",
"0.6851325",
"0.6851325",
"0.68460923",
"0.6841464",
"0.68367183",
"0.68171406",
"0.68123",
"0.6789777",
"0.67728436",
"0.674216",
"0.674216",
"0.674216",
"0.673306",
"0.67215866",
"0.67145056",
"0.671053",
"0.67023337",
"0.66822225",
"0.66747844",
"0.6673488",
"0.6637469",
"0.66252756",
"0.66154534",
"0.6600214",
"0.6584147",
"0.6573112",
"0.65690136",
"0.6557464",
"0.6553",
"0.65490633",
"0.65455246",
"0.65452904",
"0.65452904",
"0.65452904",
"0.65452904",
"0.65452904",
"0.65390027",
"0.65324986",
"0.6531626",
"0.6525126",
"0.65234125",
"0.6519925",
"0.65138924",
"0.65086865",
"0.6492893",
"0.64918",
"0.64918",
"0.64917207",
"0.64775074",
"0.6470852",
"0.64699894",
"0.646598",
"0.64549685",
"0.6427055",
"0.6413838",
"0.6413145",
"0.6406793",
"0.6406793",
"0.6406793",
"0.6405944"
] | 0.0 | -1 |
/ Signout is initiated by simply calling the googleSignInClient.signOut API. We add a listener which will be invoked once the sign out is the successful | @Override
public void onClick(View v) {
googleSignInClient.signOut().addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
//On Succesfull signout we navigate the user back to LoginActivity
Intent intent = new Intent(ProfileActivity.this,MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void signOut() {\n mGoogleSignInClient.signOut().addOnCompleteListener(this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n updateUI(null);\n }\n });\n }",
"private void signOut() {\n mGoogleSignInClient.signOut()\n .addOnCompleteListener(this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n // ...\n Log.d(TAG, \"Log out successful\");\n Toast.makeText(HomeView.this, \"Log out successful\", Toast.LENGTH_SHORT).show();\n Intent main = new Intent(HomeView.this, MainActivity.class);\n startActivity(main);\n finish();\n }\n });\n }",
"private void googleSignOut() {\n googleSignInClient.signOut();\n }",
"private void signOut()\n {\n Auth.GoogleSignInApi.signOut(googleApiClient).setResultCallback(new ResultCallback<Status>() {\n @Override\n public void onResult(@NonNull Status status) {\n //Intent intent = new Intent(LandingPageActivity.this, MainActivity.class);\n //startActivity(intent);\n //finish();\n }\n });\n }",
"private void signOut() {\n\n // Sign the user out and update the UI\n Auth.GoogleSignInApi.signOut(mGoogleApiClient).setResultCallback(\n new ResultCallback<Status>() {\n @Override\n public void onResult(Status status) {\n m_tvStatus.setText(R.string.status_notsignedin);\n m_tvEmail.setText(\"\");\n m_tvDispName.setText(\"\");\n }\n });\n }",
"public void signOut(){\n MainActivity.signOut();\n\n //sign out of google and take back to MainActivity on success\n FirebaseAuth.getInstance().signOut();\n MainActivity.mGoogleSignInClient.signOut()\n .addOnCompleteListener(this, task -> {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n });\n\n AuthUI.getInstance()\n .signOut(this)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n public void onComplete(@NonNull Task<Void> task) {\n // ...\n startActivity(new Intent(SettingsActivity.this, MainActivity.class));\n }\n });\n }",
"private void signOut() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n mAuth = FirebaseAuth.getInstance();\n // Firebase sign out\n mAuth.signOut();\n\n // Google sign out\n mGoogleSignInClient.signOut();\n }",
"@Override\n public void onClick(View v) {\n googleSignInClient.signOut().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n //On Succesfull signout we navigate the user back to LoginActivity\n Intent intent = new Intent(ProfileActivity.this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n }\n });\n }",
"private void signOut() {\n //logout of google\n GoogleSignIn.getClient(this, GoogleSignInOptions.DEFAULT_SIGN_IN).signOut()\n .addOnCompleteListener(this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n return;\n }\n });\n\n //logout of facebook\n LoginManager.getInstance().logOut();\n\n Intent intent = new Intent(this, Login.class);\n startActivity(intent);\n }",
"public void signOut(View view) {\n if (googleSignInClient != null){\n googleSignInClient.signOut()\n .addOnCompleteListener(this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n signInButton.setEnabled(true);\n createFolderButton.setEnabled(false);\n folderFilesButton.setEnabled(false);\n uploadFileButton.setEnabled(false);\n signOutButton.setEnabled(false);\n showMessage(\"Sign-Out is done...!!\");\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n signInButton.setEnabled(false);\n showMessage(\"Unable to sign out.\");\n Log.e(TAG, \"Unable to sign out.\", exception);\n }\n });\n }\n }",
"private void signOut () {\n\n //Normal account sign out\n mAuth.signOut();\n //Google account sign out\n mGoogleSignInClient.signOut();\n updateUI(\"Signed out\");\n //Can't open chat without non-empty accountEmail\n accountEmail = \"\";\n }",
"private void signOut() {\n mAuth.signOut();\n }",
"public void signOut(){\n mAuth.signOut();\n }",
"private void logout() {\n\n\n GoogleSignInAccount account = GoogleSignIn.getLastSignedInAccount(context);\n //start home activity, when account is not null (user already signed in)\n if (account != null) {\n Log.d(\"LOGOUT\", \"Google Accoutn is not null\");\n if (mGoogleSignInClient != null) {\n mGoogleSignInClient.signOut()\n .addOnCompleteListener(getActivity(), new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n Log.d(\"LogoutButton\", \"You were Logged out succesfully\");\n //remove user id from preferences to indicate, that he is not logged in\n Preferences.saveUserId(context, null);\n\n //remove FCM token\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n FirebaseInstanceId.getInstance().deleteInstanceId();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n }).start();\n\n Intent intent = new Intent(context, LoginActivity.class);\n startActivity(intent);\n //remove home activity from stack\n getActivity().finish();\n }\n });\n }\n }\n }",
"private void signOut(){\n Log.d(TAG, \"signOut: signing out\");\n FirebaseAuth.getInstance().signOut();\n }",
"@Override\n public void onClick(DialogInterface arg0, int arg1) {\n if (MainActivity.sign_status == false) {\n LoginManager.getInstance().logOut();\n Intent intent = new Intent(doc.this, MainActivity.class);\n startActivity(intent);\n } else {\n MainActivity.mGoogleSignInClient.signOut()\n .addOnCompleteListener(doc.this, new OnCompleteListener<Void>() {\n public void onComplete(@NonNull Task<Void> task) {\n // ...\n }\n });\n MainActivity.mGoogleSignInClient.revokeAccess()\n .addOnCompleteListener(doc.this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n // ...\n }\n });\n Intent intent = new Intent(doc.this, MainActivity.class);\n startActivity(intent);\n Toast.makeText(doc.this, \"Logged Out\", Toast.LENGTH_LONG).show();\n }\n\n splash.c=0;\n }",
"private void signOut () {\n mAuth.signOut();\n textViewStatus.setText(\"Signed Out\");\n }",
"public interface UserSignedOutListener {\n\n void onUserSignedOut();\n}",
"private void signOut() {\n mAuth.signOut();\n updateUI(null);\n }",
"private void cerrarSession() {\n FirebaseAuth.getInstance().signOut();\n LoginManager.getInstance().logOut();\n Auth.GoogleSignInApi.signOut(googleApiClient).setResultCallback( new ResultCallback<Status>() {\n @Override\n public void onResult(@NonNull Status status) {\n if (status.isSuccess()) {\n logOut();\n } else {\n Toast.makeText(getApplicationContext(),\"Fallo al cerrar session\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }",
"public void onSignOut() {\n SharedPreferences userPrefs = PreferenceManager.getDefaultSharedPreferences(\n TBLoaderAppContext.getInstance());\n SharedPreferences.Editor editor = userPrefs.edit();\n editor.clear().apply();\n mTbSrnHelper = null;\n mUserPrograms = null;\n }",
"void onSignOutButtonClicked();",
"private void onSignOutClicked() {\n mState.disableConnection();\n if (mState.googleApiClientIsConnected()) {\n mState.signOutGoogleGames();\n }\n\n // show sign-in button, hide the sign-out button\n status.setText(\"Login to submit your achievements!\");\n signIn.setVisibility(View.VISIBLE);\n signOut.setVisibility(View.GONE);\n achievements.setVisibility(View.GONE);\n palmares.setVisibility(View.GONE);\n mPhotoUser.setVisibility(View.GONE);\n }",
"private void onSignOutConfirmed() {\n Login.logout(this, e -> {\n Toast.makeText(this, \"Logged out successfully\", Toast.LENGTH_SHORT).show();\n });\n\n Intent intent = new Intent(this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); // add this flag so that we return to an existing MainActivity if it exists rather than creating a new one\n Login.setManualLogin(true);\n Login.forceLogin(); // force re-login so that when we sign-out we are brought to the login screen. Login.logout() occurs asynchronously so without calling this, we may not go to the login screen\n\n startActivity(intent);\n }",
"public void firebaseSignOut() {\n firebaseAuth.signOut();\n }",
"private static void logoutGoogle(Context context) {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n\n // Build a GoogleSignInClient with the options specified by gso.\n GoogleSignInClient mGoogleSignInClient = GoogleSignIn.getClient(context, gso);\n\n mGoogleSignInClient.signOut();\n ((AppCompatActivity) context).finish();\n context.startActivity(new Intent(context, Login.class));\n }",
"private void logout() {\n //set offline flag\n String uid = FirebaseAuth.getInstance().getCurrentUser().getUid();\n new PostNoSqlDataBase(this).offline(uid);\n\n //logout\n // FirebaseAuth mAuth = FirebaseAuth.getInstance();\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n GoogleSignInClient mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n mGoogleSignInClient.signOut();\n FirebaseAuth.getInstance().signOut();\n //go to the main activity\n startActivity(new Intent(this, SignUpActivity.class));\n finish();\n }",
"@Override\r\n public void onClick(View view) {\n new SignOut();\r\n\r\n // stop all services\r\n stopService(new Intent(MainActivity.this,UserDataChangeListener.class));\r\n stopService(new Intent(MainActivity.this,GeofenceService.class));\r\n stopService(new Intent(MainActivity.this,LocationService.class));\r\n\r\n // restart sign in\r\n Intent signIn = new Intent(MainActivity.this,SignIn.class);\r\n startActivity(signIn);\r\n finish();\r\n }",
"public void signOutClick()\n {\n if(mAuth.getCurrentUser() != null)\n {\n // sign out.\n mAuth.signOut();\n\n // switch activity to login form.\n finish();\n Intent intent = new Intent(this, LoginActivity.class);\n startActivity(intent);\n }\n }",
"private void signOut(){\n LoginSharedPreference.endLoginSession(this);\n Intent intent = new Intent(this,LoginActivity.class);\n startActivity(intent);\n finish();\n }",
"@ReactMethod\n public void signOut(final Promise promise) {\n GoogleSignIn.getClient(mContext.getApplicationContext(), mSignInOptions)\n .signOut()\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n promise.resolve(\"Successfully sign out.\");\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n String errorCode = \"SIGN_OUT_FAILED\";\n if (e instanceof ApiException) {\n // The ApiException status code indicates the detailed failure reason.\n // Please refer to the GoogleSignInStatusCodes class reference for more information.\n errorCode = String.format(Locale.ENGLISH, \"%s_%d\", errorCode, ((ApiException) e).getStatusCode());\n }\n Log.e(TAG, \"signOut:failed code=\" + errorCode);\n promise.reject(errorCode,\"SIGNED_OUT_ERROR : \" + e.getMessage());\n }\n });\n }",
"@Override\n public void onClick(View v) {\n FirebaseAuth.getInstance().signOut();\n Intent signOutIntent = new Intent(ResultActivity.this,LoginActivity.class);\n startActivity(signOutIntent);\n finish();\n }",
"public void onClickExit(View view) {\n BYPASS_LOGIN = false;\n\n //finish activity\n super.finish();\n\n //close all activities\n ActivityCompat.finishAffinity(this);\n\n //log out of google play services\n super.signOut();\n }",
"Boolean signOut();",
"private void signOutUser() {\n mAuth.signOut();\n LoginManager.getInstance().logOut();\n Toast.makeText(ChatMessage.this, \"You have been logout\", Toast.LENGTH_SHORT).show();\n finishAffinity();\n proceed();\n }",
"public void signOut() {\n ReusableActionsPageObjects.clickOnElement(driver, signOut, logger, \"log out.\");\n }",
"public static void logout(Context context, OnCompleteListener<Void> onCompleteListener) {\n Task<Void> signOut = AuthUI.getInstance().signOut(context);\n if (onCompleteListener != null)\n signOut.addOnCompleteListener(onCompleteListener);\n deleteLogin(context);\n profileOutOfSync = true; // after a logout (and possibly re-login), we cannot assume the profile will be in sync the next time\n }",
"private void signOut() {\n MailboxServer.removeClient(this);\n clientResponse(\"GoodyBye!\");\n }",
"private void onSignOutClicked() {\n new AlertDialog.Builder(this)\n .setCancelable(true)\n .setTitle(\"Sign Out\")\n .setMessage(\"Are you sure you want to sign out?\")\n .setPositiveButton(\"Confirm\", (dialog, which) -> onSignOutConfirmed())\n .setNegativeButton(android.R.string.cancel, ((dialog, which) -> dialog.dismiss()))\n .create()\n .show();\n }",
"public void logout () {\n\t\tif (isLoggedIn()) {\n\t\t\tGPPSignIn.sharedInstance().signOut();\n\t\t\tGPGManager.sharedInstance().signOut();\n\t\t}\n\t}",
"public void onLogout() {\n ParseUser.logOut();\n\n promptForLogin();\n }",
"@Override\n public void onCanceled() {\n\n logOutNow();\n\n }",
"@Override\n\tpublic int signOut(Attendance attendance) {\n\t\treturn attendanceMapper.signOut(attendance);\n\t}",
"void onLogout(boolean loggedIn);",
"public void logOutOnClick(View view)\n {\n Intent mainIntent = new Intent(SettingsActivity.this, AppLoginActivity.class);\n mainIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n FirebaseAuth.getInstance().signOut();\n startActivity(mainIntent);\n finish();\n }",
"private void logout() {\n ProgressDialog logoutProgressDialog = new ProgressDialog(ContributionsGalleryActivity.this);\n logoutProgressDialog.setMessage(getResources().getString(R.string.logging_out));\n logoutProgressDialog.setCancelable(false);\n logoutProgressDialog.show();\n ParseUser.logOutInBackground(e -> {\n logoutProgressDialog.dismiss();\n if (e != null) { // Logout has failed\n Snackbar.make(contributionsGalleryRelativeLayout, getResources().getString(R.string.logout_failed), Snackbar.LENGTH_LONG).show();\n }\n else { // Logout has succeeded\n goLoginSignupActivity();\n finish();\n }\n });\n }",
"public void sign_out(View v){\n\n Intent intent = new Intent(this, popRateClinic.class);\n startActivity(intent);\n finish();\n }",
"@Override\n protected void onStop() {\n super.onStop();\n Log.d(TAG, \"onStop\");\n// Auth.signOut();\n mNest.removeAllListeners();\n Auth.removeAuthListener();\n }",
"public void onLogout(View v) {\n\t\tRetrofitWrapper.authenticationToken = null;\n\t\t// Forget auth token from storage\n\t\tSharedPreferences prefs = this.getSharedPreferences(\n\t\t\t \"com.example.wordcardapp\", Context.MODE_PRIVATE);\n\t\tprefs.edit()\n\t\t\t.remove(\"com.example.wordcardapp.auth.token\")\n\t\t\t.remove(\"com.example.wordcardapp.auth.expiration\")\n\t\t\t.apply();\n\t\t// Inform user\n\t\tToaster.info(getApplicationContext(), getString(R.string.logout_successful));\n\t\tfinish();\n\t}",
"public void onLogOut(View view) {\n\n\t\t// if (doubleBackToExitPressedOnce)\n\t\t// {\n\t\t// Satyen: we are removing PIN here\n\t\teditor.remove(\"pin\");\n\t\teditor.clear();\n\t\teditor.commit();\n\n\t\t// Satyen: unsubscribing to channels\n\t\tSet<String> setOfAllSubscriptions = PushService.getSubscriptions(this);\n\t\tSystem.out.println(\">>>>>>> Channels before clearing - \"\n\t\t\t\t+ setOfAllSubscriptions.toString());\n\t\tfor (String setOfAllSubscription : setOfAllSubscriptions) {\n\t\t\tSystem.out.println(\">>>>>>> MainActivity::onLogOut() - \"\n\t\t\t\t\t+ setOfAllSubscription);\n\t\t\tPushService.unsubscribe(this, setOfAllSubscription);\n\t\t}\n\t\tsetOfAllSubscriptions = PushService.getSubscriptions(this);\n\t\tSystem.out.println(\">>>>>>> Channels after cleared - \"\n\t\t\t\t+ setOfAllSubscriptions.toString());\n\t\tParseUser.logOut();\n\t\tglobalVariable.resetOnLogout2();\n\t\tGlobalVariable.resetOnLogout();\n\t\tnextIntent = new Intent(this, LoginActivity.class);\n\t\tnextIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK\n\t\t\t\t| Intent.FLAG_ACTIVITY_CLEAR_TASK);\n\t\tstartActivity(nextIntent);\n\t\t// finish();\n\n\t\t// }\n\t\t//\n\t\t// doubleBackToExitPressedOnce = true;\n\t\t// Toast.makeText(this, \"Click again to logout\",\n\t\t// Toast.LENGTH_SHORT).show();\n\t\t//\n\t\t// new Handler().postDelayed(new Runnable() {\n\t\t//\n\t\t// @Override\n\t\t// public void run() {\n\t\t// doubleBackToExitPressedOnce=false;\n\t\t// }\n\t\t// }, 2000);\n\t\t//\n\n\t\t// nextIntent = new Intent(this, LoginActivity.class);\n\t\t// startActivity(nextIntent);\n\t}",
"@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n FirebaseAuth.getInstance().signOut();\n startActivity(new Intent(MainActivity.this, Login.class));\n finish();\n }",
"public void signOut(){\n \n\t // click on the sign in/out drop down menu\n \t new WebDriverWait (DRIVER, 5)\n \t .until (ExpectedConditions.presenceOfElementLocated(signOutDropDownMenuLocator))\n \t .click();\n \t \n \t // click on the sign out link\n \t DRIVER.findElement(signOutLinkLocator).click();\n \t \n \t // wait for sign out to complete\n \t new WebDriverWait (DRIVER, 5).until(\n \t\t\t ExpectedConditions.visibilityOfElementLocated(navigationBarSignInLinkLocator));\n }",
"public void signOut(View view) {\n databaseManager.deleteAll();\n finish();\n }",
"@Override\r\n public void onSign(SignEvent event){\n if (event.getAction().equals(SignEvent.Action.SIGNED_IN)) {\r\n //write cookies if keep signed in\r\n if (event.getAccountKey() != null && !event.getAccountKey().isEmpty()) {\r\n cookie.setAccountKey(Shared.MY_SESSION, event.getAccountKey());\r\n }\r\n //already signed in, load workspace\r\n RootPanel.get().clear();\r\n Widget workspace = new Workspace().asWidget();\r\n RootPanel.get().add(workspace); \r\n Info.display(\"Welcome\", \"Signed in as \" + Shared.MY_SESSION.getAccount().getFullName());\r\n }\r\n //process sign_out\r\n if (event.getAction().equals(SignEvent.Action.SIGN_OUT)){\r\n String accountKey = cookie.getAccountKey(Shared.MY_SESSION);\r\n Shared.RPC.signOutAndDetachSession(Shared.MY_SESSION, accountKey, new AsyncCallback<Session>() {\r\n @Override\r\n public void onSuccess(Session s) {\r\n if (s != null) {\r\n Shared.MY_SESSION = s;\r\n //sign out seems OK on server side, dispatch SIGNED_OUT event\r\n Shared.EVENT_BUS.fireEvent(new SignEvent(SignEvent.Action.SIGNED_OUT)); //WARN: don't dispatch SIGN_OUT avoiding deadlock call\r\n } else {\r\n Info.display(\"Error\", \"Account is already signed out or database error\");\r\n }\r\n }\r\n\r\n @Override\r\n public void onFailure(Throwable caught) {\r\n Info.display(\"Error\", caught.getMessage());\r\n }\r\n });\r\n }\r\n //process signed_out\r\n if (event.getAction().equals(SignEvent.Action.SIGNED_OUT)){\r\n //delete cookies\r\n cookie.discardCookie(Shared.MY_SESSION); \r\n //return UI to welcome status\r\n RootPanel.get().clear();\r\n RootPanel.get().add(new LoginPage()); \r\n Info.display(\"See you\", \"You are now signed out!\");\r\n }\r\n }",
"@Override\n public void onClick(View view) {\n if (view == buttonLogout) {\n firebaseAuth.signOut();\n finish();\n startActivity(new Intent(this, LoginActivity.class));\n }\n }",
"@Override\n public void onStop() {\n super.onStop();\n\n if (mFirebaseAuthListener != null) {\n mFirebaseAuth.removeAuthStateListener(mFirebaseAuthListener);\n }\n }",
"@Override\r\n\t\t\tpublic void onLogout() {\n\t\t\t\tshowToast(\"onLogout---\");\r\n\t\t\t}",
"private void userSignIn() {\n GoogleSignInAccount account = GoogleSignIn.getLastSignedInAccount(this);\n if (GoogleSignIn.hasPermissions(account, new Scope(SCOPES))) {\n updateUI(account);\n mAccount = account.getAccount();\n Intent intent = new Intent(this, HomeActivity.class);\n intent.putExtra(ACCOUNT, mAccount);\n startActivity(intent);\n System.out.println(\"Exit Intent !!!!!!!!!!!!!!!!\");\n\n findViewById(R.id.disconnect_button).setVisibility(View.VISIBLE);\n\n } else {\n updateUI(null);\n }\n }",
"public void logout(Activity activity) {\n Logg.d(TAG,\"Logout procedure started...\");\n print();\n if(loggedByGoogle())logoutGoogle(activity);\n if(loggedByFb())logoutFacebook(activity);\n //It never reaches here as above method itself calls the callbacks to exit app\n }",
"@Override\r\n\t\t\t\t\t\t\tpublic void callback(Context arg0) {\n\t\t\t\t\t\t\t\tYKPlatform.logout(appContext);\r\n\t\t\t\t\t\t\t\tTypeSDKLogger.d(\"LOGOUT_SUCCESS\");\r\n\t\t\t\t\t\t\t\tTypeSDKNotify_youku notify = new TypeSDKNotify_youku();\r\n\t\t\t\t\t\t\t\tnotify.Logout();\r\n\t\t\t\t\t\t\t}",
"@Override\n public void onStop() {\n super.onStop();\n if (authListener != null) {\n mAuth.removeAuthStateListener(authListener);\n }\n }",
"@Override\r\n\t\t\t\t\t\t\t\tpublic void onLogoutSuccessed() {\n\t\t\t\t\t\t\t\t\tTypeSDKLogger.d(\"onLogoutSuccessed\");\r\n\t\t\t\t\t\t\t\t\tTypeSDKNotify_haima notify = new TypeSDKNotify_haima();\r\n\t\t\t\t\t\t\t\t\tnotify.Logout();\r\n\t\t\t\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onLogoutSuccessed() {\n\t\t\t\t\t\tTypeSDKLogger.d(\"onLogoutSuccessed\");\r\n\t\t\t\t\t\tTypeSDKNotify_haima notify = new TypeSDKNotify_haima();\r\n\t\t\t\t\t\tnotify.Logout();\r\n\t\t\t\t\t}",
"@Override\n public void onStop() {\n super.onStop();\n if (mAuthListener != null) {\n mAuth.removeAuthStateListener(mAuthListener);\n }\n }",
"@Override\n public void onStop() {\n super.onStop();\n if (mAuthListener != null) {\n mAuth.removeAuthStateListener(mAuthListener);\n }\n }",
"private void openSignOutDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.want_sign_out);\n builder.setPositiveButton(R.string.dialog_yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n FirebaseAuth.getInstance().signOut();\n dialog.dismiss();\n Toast.makeText(ProfileActivity.this,\n getString(R.string.sign_out_toast), Toast.LENGTH_SHORT).show();\n openSignIn();\n }\n });\n builder.setNegativeButton(R.string.dialog_no, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n AlertDialog dialog_sign_out = builder.create();\n dialog_sign_out.setOnDismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(DialogInterface dialogInterface) {\n isOpenSignOut = false;\n }\n });\n dialog_sign_out.show();\n isOpenSignOut = true;\n }",
"public void logout(View view) {\n if (isNetworkAvailable()) {\n FirebaseAuth.getInstance().signOut();\n startActivity(new Intent(AllChannelListActivity.this, SignInActivity.class));\n finish();\n } else {\n\n Toast.makeText(AllChannelListActivity.this, \"To Log Out, Please Connect your Phone to Internet..\", Toast.LENGTH_SHORT).show();\n\n }\n }",
"ResponseEntity<?> signOut(HttpServletRequest req, HttpServletResponse res);",
"private void logout() {\n fbAuth.signOut();\n startActivity(new Intent(getApplicationContext(), LoginActivity.class));\n finish();\n }",
"private void logout() {\n Utils.showConfirmationDialogCallBack(MainActivity.this, getString(R.string.logout_sure), this);\n }",
"public void signOutOfDD()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignOutLink();\n\t\t\n\t}",
"public void onStop() {\n super.onStop();\n this.mAuth.removeAuthStateListener(this.mAuthStateListener);\n }",
"@Override\n protected void onStop() {\n if (null != googleClient && googleClient.isConnected()) {\n googleClient.disconnect();\n }\n super.onStop();\n }",
"public void logOut() {\n try {\n // getGlobalNavigation().clickSignOut();\n } catch (TimeoutException e) {\n Log.log(\"logOut\", \"page loads for more than 30 seconds\", true);\n }\n }",
"private void LogOut() {\n FirebaseAuth.getInstance().signOut();\n Intent intToMain = new Intent(getActivity(),LoginActivity.class);\n startActivity(intToMain);\n }",
"private void LogoutDialog() {\n\n AlertDialog.Builder alert;\n alert = new AlertDialog.Builder(this,R.style.Theme_MaterialComponents_Dialog_Alert);\n LayoutInflater inflater = getLayoutInflater();\n\n View view = inflater.inflate(R.layout.logout_dialog,null);\n\n s_cancel = view.findViewById(R.id.s_cancel);\n btnSignout = view.findViewById(R.id.btn_signout);\n\n alert.setView(view);\n alert.setCancelable(false);\n\n AlertDialog dialog = alert.create();\n dialog.getWindow().setBackgroundDrawableResource(R.color.transparent);\n\n dialog.show();\n\n btnSignout.setOnClickListener(v -> {\n FirebaseAuth.getInstance().signOut();\n startActivity(new Intent(UserActivity.this , LoginOrSignUpActivity.class));\n finish();\n\n Toast.makeText(UserActivity.this, \"Sign out is Successful\" , Toast.LENGTH_SHORT).show();\n });\n\n s_cancel.setOnClickListener(v -> dialog.dismiss());\n }",
"@Override\n public void onClick(View v) {\n Log.d(\"prof\",\"log_out\");\n vibrations(1);\n logoutPopup();\n }",
"@Override\n\tpublic void onUserNeedLogout() {\n\t\t\n\t}",
"@Override\n\tpublic void onUserNeedLogout() {\n\t\t\n\t}",
"@JavascriptInterface\n public void logout() {\n Login.logout();\n Intent intent = new Intent(mContext, LoginActivity.class);\n mContext.startActivity(intent);\n }",
"default void onLogout(SessionID sessionID) {\n }",
"private void logout() {\n LogoutTask mAuthTask = new LogoutTask();\n mAuthTask.execute((Void) null);\n }",
"@Override\n public void onStop() {\n super.onStop();\n if (mAuthListener != null) {\n mAuth.removeAuthStateListener(mAuthListener);\n }\n hideProgressDialog();\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n\n logOutNow();\n\n }",
"public void logout() {\n updateToken(\"\");\n startActivity(new Intent(GarageListActivity.this, LoginScreenActivity.class));\n updateToken(\"\");\n finish();\n }",
"public interface LogoutCallback {\n\n void onResultLogout(Object result);\n\n void onBeginLogout();\n\n void onErrorLogout(Object error);\n}",
"void signInComplete();",
"@Override\r\n public void onLogout() {\n Intent loginIntent = new Intent(CreateAccount.this, MainActivity.class);\r\n startActivity(loginIntent);\r\n finish();\r\n }",
"private void setUpSignOutButton() {\n signOutButton = (Button) findViewById(R.id.sign_out_button_question);\n signOutButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n signOut();\n }\n });\n }",
"@RequestMapping(value = \"/signout\", method = RequestMethod.GET)\n\tpublic void signout(HttpServletRequest request, HttpServletResponse response) {\n\t\tHttpSession session = request.getSession();\n\t\tsession.invalidate();\n\t\tsession = request.getSession();\n\t\ttry {\n\t\t\tresponse.sendRedirect(\"http://localhost:8080/DocumentSigner/\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void logOutFirebaseAccounts() {\n AuthUI.getInstance()\n .signOut(mAccountsFragment.getContext())\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n public void onComplete(@NonNull Task<Void> task) {\n setNotLoggedInLayoutVisible();\n }\n });\n }",
"private void logoutHandler() {\n AlertDialog.Builder builder = new AlertDialog.Builder(context, android.R.style.Theme_DeviceDefault_Dialog);\n builder.setTitle(\"Logout?\");\n builder.setMessage(\"Are you sure you want to logout?\");\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n Util.setLoggedInFlag(false);\n\n HPIApp.getAppContext().stopService(new Intent(HPIApp.getAppContext(), StepService.class));\n\n Intent intent = new Intent(HomeActivity.this, SplashActivity.class);\n startActivity(intent);\n HomeActivity.this.finish();\n }\n });\n\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n\n builder.show();\n }",
"@Override\r\n\tpublic void onLogout()\r\n\t{\n\r\n\t\tif (accountListener != null)\r\n\t\t{\r\n\t\t\taccountListener.onMmiHeartbeatLogout();\r\n\t\t}\r\n\t\tAirServices.getInstance().stopSelf();\r\n\t\tLog.e(AirAccountManager.class, \"MMI ======================== onLogout =======================\");\r\n\t}",
"public void onOK() {\n\t\t\t\t\t\t\tlogout();\n\t\t\t\t\t\t}",
"private void signIn() {\n Utility.showLoader(this);\n mGoogleApiClient.clearDefaultAccountAndReconnect();\n\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"public static void signOut(){\n\t\tActions action_logout = new Actions(driver);\n\t\tWebElement UI = driver.findElement(By.id(\"UserNavigationTabsContainer\"));\n\t\taction_logout.moveToElement(UI).build().perform();\n\t\tdriver.findElement(By.linkText(\"Logout\")).click();\t\n\t\tpause(500);\n\t}",
"public void signOut(View view) {\r\n startActivity(new Intent(getApplicationContext(),AdminDashboard.class));\r\n }",
"public void logOut() {\n\t\t//Inform the database that the user want to log out\n\t\tdc.logOutPlayer(activity);\n\t\t\n\t\t/*\n\t\t * Call is made to StartActivity, which surely is in the bottom of activity-stack. Add a flag to clear stack\n\t\t * and from StartActivity a call is made to the Login screen and StartActivity is finished. By doing this we\n\t\t * assure that Login screen is at the bottom of the activity-stack and a press on back button, while placed \n\t\t * on Login screen, will result in that the application is closed\n\t\t */\n\t\tIntent intent = new Intent(activity, StartActivity.class);\n\t\tintent.putExtra(\"finish\", true);\n\t\tintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\tactivity.startActivity(intent);\n\t\tactivity.finish();\n\t}",
"@Override\n protected void onPlusClientSignIn() {\n Button signOutButton = (Button) findViewById(R.id.plus_sign_out_button);\n signOutButton.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View view) {\n signOut();\n }\n });\n Button disconnectButton = (Button) findViewById(R.id.plus_disconnect_button);\n disconnectButton.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View view) {\n revokeAccess();\n }\n });\n }",
"public void logoutClick(View v) {\n\n AsyncHttpClient client = new AsyncHttpClient();\n client.addHeader(\"Authorization\", \"Token token=\" + user.getToken().getAccess_token());\n client.get(LoginActivity.API_ROOT + \"logout\", new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n Toast.makeText(SelectionActivity.this, \"Logout success!\", Toast.LENGTH_LONG).show();\n\n // Return to the login screen (first instance of it)\n Intent toLoginScreen = new Intent(SelectionActivity.this, LoginActivity.class);\n toLoginScreen.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n SelectionActivity.this.finish();\n SelectionActivity.this.startActivity(toLoginScreen);\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody,\n Throwable error) {\n Toast.makeText(SelectionActivity.this, \"Logout failure\", Toast.LENGTH_LONG).show();\n }\n });\n }"
] | [
"0.82631004",
"0.82287335",
"0.80596876",
"0.7857012",
"0.7809104",
"0.7728265",
"0.7610513",
"0.7565486",
"0.7522758",
"0.7468386",
"0.7341875",
"0.7213599",
"0.7151721",
"0.7124763",
"0.7122011",
"0.7078133",
"0.7071259",
"0.7037844",
"0.7036785",
"0.6975459",
"0.6962247",
"0.694934",
"0.6898104",
"0.6887152",
"0.6869531",
"0.6838378",
"0.679266",
"0.66722214",
"0.6646948",
"0.6636091",
"0.6633647",
"0.66225314",
"0.65889275",
"0.6567215",
"0.6501458",
"0.64492816",
"0.6395255",
"0.6381014",
"0.6367384",
"0.63403577",
"0.630589",
"0.6292938",
"0.62618965",
"0.625645",
"0.6238765",
"0.6231324",
"0.62299025",
"0.6183815",
"0.61814505",
"0.6159543",
"0.6159513",
"0.61545616",
"0.60320425",
"0.6014033",
"0.60021496",
"0.5999647",
"0.59976023",
"0.5973001",
"0.5969096",
"0.5955159",
"0.59253633",
"0.5914987",
"0.5906813",
"0.5899456",
"0.5899456",
"0.5898885",
"0.5897844",
"0.5871051",
"0.5870751",
"0.5862313",
"0.5860913",
"0.58528125",
"0.58357763",
"0.583115",
"0.5823925",
"0.58131653",
"0.58008355",
"0.57856536",
"0.57856536",
"0.5768109",
"0.576391",
"0.57417506",
"0.57405216",
"0.5714645",
"0.5688719",
"0.5680615",
"0.5673254",
"0.5659892",
"0.56475425",
"0.5647436",
"0.5638465",
"0.56273293",
"0.5621314",
"0.5614149",
"0.56047726",
"0.5599372",
"0.5591945",
"0.5587112",
"0.5583683",
"0.5561641"
] | 0.74601644 | 10 |
On Succesfull signout we navigate the user back to LoginActivity | @Override
public void onComplete(@NonNull Task<Void> task) {
Intent intent = new Intent(ProfileActivity.this,MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void signOut(){\n LoginSharedPreference.endLoginSession(this);\n Intent intent = new Intent(this,LoginActivity.class);\n startActivity(intent);\n finish();\n }",
"@Override\n public void onClick(View v) {\n googleSignInClient.signOut().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n //On Succesfull signout we navigate the user back to LoginActivity\n Intent intent = new Intent(ProfileActivity.this,MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n }\n });\n }",
"@Override\n public void onClick(View v) {\n googleSignInClient.signOut().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n //On Succesfull signout we navigate the user back to LoginActivity\n Intent intent = new Intent(ProfileActivity.this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n }\n });\n }",
"@Override\r\n public void onLogout() {\n Intent loginIntent = new Intent(CreateAccount.this, MainActivity.class);\r\n startActivity(loginIntent);\r\n finish();\r\n }",
"@Override\n public void onBackPressed() {\n logoutDialog();\n }",
"@Override\n public void onClick(View v) {\n FirebaseAuth.getInstance().signOut();\n Intent signOutIntent = new Intent(ResultActivity.this,LoginActivity.class);\n startActivity(signOutIntent);\n finish();\n }",
"private void onSignOutConfirmed() {\n Login.logout(this, e -> {\n Toast.makeText(this, \"Logged out successfully\", Toast.LENGTH_SHORT).show();\n });\n\n Intent intent = new Intent(this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); // add this flag so that we return to an existing MainActivity if it exists rather than creating a new one\n Login.setManualLogin(true);\n Login.forceLogin(); // force re-login so that when we sign-out we are brought to the login screen. Login.logout() occurs asynchronously so without calling this, we may not go to the login screen\n\n startActivity(intent);\n }",
"private void takeUserToLoginScreenOnUnAuth() {\n Intent intent = new Intent(BaseActivity.this, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n }",
"private void signOut()\n {\n Auth.GoogleSignInApi.signOut(googleApiClient).setResultCallback(new ResultCallback<Status>() {\n @Override\n public void onResult(@NonNull Status status) {\n //Intent intent = new Intent(LandingPageActivity.this, MainActivity.class);\n //startActivity(intent);\n //finish();\n }\n });\n }",
"public void signOutClick()\n {\n if(mAuth.getCurrentUser() != null)\n {\n // sign out.\n mAuth.signOut();\n\n // switch activity to login form.\n finish();\n Intent intent = new Intent(this, LoginActivity.class);\n startActivity(intent);\n }\n }",
"@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n FirebaseAuth.getInstance().signOut();\n startActivity(new Intent(MainActivity.this, Login.class));\n finish();\n }",
"public void returnToLogin(View view){\r\n startActivity(new Intent(SignUpActivity.this, LoginActivity.class));\r\n finish();\r\n }",
"@Override\n public void onBackPressed()\n {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Continuing with the action will log you out and send you to login screen\");\n builder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog,\n int which) {\n MainActivity act=new MainActivity();\n act.log_out(email);\n finish();\n setContentView(R.layout.activity_main);\n\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.dismiss();\n\n }\n });\n builder.show();\n }",
"private void logout() {\n fbAuth.signOut();\n startActivity(new Intent(getApplicationContext(), LoginActivity.class));\n finish();\n }",
"@Override\r\n\tpublic void onBackPressed() {\r\n\t\tsuper.onBackPressed();\r\n\t\tlogout();\r\n\t}",
"@Override\n public void onBackPressed()\n {\t\n \t//Return tu login activity\n \tif(mlv.getUsersView())\n \t\tthis.finish();\n \telse\n \t{\n \t\t//Return to users view\n \t\tmlv.activateUsersView(); \t\t\n \t}\n }",
"@Override\n public void onClick(View view) {\n if (view == buttonLogout) {\n firebaseAuth.signOut();\n finish();\n startActivity(new Intent(this, LoginActivity.class));\n }\n }",
"public void logOut(){\n Intent intent=new Intent( getApplicationContext(), Login.class );\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity( intent );\n progressDialog.dismiss();\n finish();\n }",
"@Override\n public void onClick(View v) {\n finishWithNextActivity(LoginActivity.class);\n\n }",
"public void signOut(View view) {\r\n startActivity(new Intent(getApplicationContext(),AdminDashboard.class));\r\n }",
"@Override\n public void onClick(View v) {\n LoginActivity.this.finish();\n }",
"private void signOut() {\n //logout of google\n GoogleSignIn.getClient(this, GoogleSignInOptions.DEFAULT_SIGN_IN).signOut()\n .addOnCompleteListener(this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n return;\n }\n });\n\n //logout of facebook\n LoginManager.getInstance().logOut();\n\n Intent intent = new Intent(this, Login.class);\n startActivity(intent);\n }",
"private void signOutUser() {\n mAuth.signOut();\n LoginManager.getInstance().logOut();\n Toast.makeText(ChatMessage.this, \"You have been logout\", Toast.LENGTH_SHORT).show();\n finishAffinity();\n proceed();\n }",
"private void logout() {\n userModel.setLoggedInUser(null);\n final Intent intent = new Intent(this, LoginActivity.class);\n startActivity(intent);\n finish();\n }",
"private void LogOut() {\n FirebaseAuth.getInstance().signOut();\n Intent intToMain = new Intent(getActivity(),LoginActivity.class);\n startActivity(intToMain);\n }",
"public void logout() {\n updateToken(\"\");\n startActivity(new Intent(GarageListActivity.this, LoginScreenActivity.class));\n updateToken(\"\");\n finish();\n }",
"public void logOut() {\n\t\t//Inform the database that the user want to log out\n\t\tdc.logOutPlayer(activity);\n\t\t\n\t\t/*\n\t\t * Call is made to StartActivity, which surely is in the bottom of activity-stack. Add a flag to clear stack\n\t\t * and from StartActivity a call is made to the Login screen and StartActivity is finished. By doing this we\n\t\t * assure that Login screen is at the bottom of the activity-stack and a press on back button, while placed \n\t\t * on Login screen, will result in that the application is closed\n\t\t */\n\t\tIntent intent = new Intent(activity, StartActivity.class);\n\t\tintent.putExtra(\"finish\", true);\n\t\tintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\tactivity.startActivity(intent);\n\t\tactivity.finish();\n\t}",
"public void logOutOnClick(View view)\n {\n Intent mainIntent = new Intent(SettingsActivity.this, AppLoginActivity.class);\n mainIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n FirebaseAuth.getInstance().signOut();\n startActivity(mainIntent);\n finish();\n }",
"@Override\n public void navigateToLogin() {\n startActivity(new Intent(this, LoginActivity.class));\n finish();\n }",
"@Override\n public void onClick(View view) {\n finish();\n startActivity(new Intent(RegisterActivity.this, LoginActivity.class));\n }",
"private void signOut() {\n mGoogleSignInClient.signOut()\n .addOnCompleteListener(this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n // ...\n Log.d(TAG, \"Log out successful\");\n Toast.makeText(HomeView.this, \"Log out successful\", Toast.LENGTH_SHORT).show();\n Intent main = new Intent(HomeView.this, MainActivity.class);\n startActivity(main);\n finish();\n }\n });\n }",
"@Override\n public void onClick(View v) {\n finish();\n Intent intent = new Intent(getApplicationContext(), LoginActivity.class);\n startActivity(intent);\n }",
"public void back(View view) {\n Intent bac = new Intent(this, Sign_In.class);\n startActivity(bac);\n }",
"@Override\n public void doLogout() {\n // Toast.makeText(getApplicationContext(),\"Session Expired\",Toast.LENGTH_SHORT).show();\n Intent intent=new Intent(getApplicationContext(), activity_Login.class);\n startActivity(intent);\n }",
"void onSignOutButtonClicked();",
"private void logoutUser() {\n\t\tsession.setLogin(false);\n\n\n\t\t// Launching the login activity\n\t\tIntent intent = new Intent(EnterActivity.this, LoginActivity.class);\n\t\tstartActivity(intent);\n\t\tfinish();\n\t}",
"@Override\n public void doLogout() {\n // Toast.makeText(getApplicationContext(),\"Session Expired\",Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(getApplicationContext(), activity_Login.class);\n startActivity(intent);\n }",
"@Override\r\n public void onClick(View v) {\n Intent i = new Intent(LoginActivty.this, SignupActivity.class);\r\n startActivity(i);\r\n finish();\r\n\r\n\r\n }",
"private void goLoginSignupActivity() {\n Intent intent = new Intent(this, LoginSignupActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"You have successfully logout\",\n Toast.LENGTH_LONG).show();\n SplashActivity.editor.remove(\"loginTest\");\n SplashActivity.editor.commit();\n Intent sendToLoginandRegistration = new Intent(getApplicationContext(), LoginActivity.class);\n startActivity(sendToLoginandRegistration);\n }",
"private void signOut() {\n\n // Sign the user out and update the UI\n Auth.GoogleSignInApi.signOut(mGoogleApiClient).setResultCallback(\n new ResultCallback<Status>() {\n @Override\n public void onResult(Status status) {\n m_tvStatus.setText(R.string.status_notsignedin);\n m_tvEmail.setText(\"\");\n m_tvDispName.setText(\"\");\n }\n });\n }",
"private void logout(){\n ParseUser.logOut();\n removeUserFromPrefs();\n Intent intent = LandingActivity.intent_factory(this);\n startActivity(intent);\n }",
"protected void logout() {\n\t\tActiveUserModel userController = ActiveUserModel.getInstance();\n\t\tuserController.performLogout();\n\n\t\tIntent intent = new Intent(this, LoginActivity.class);\n\t\tstartActivityForResult(intent, LOGIN_ACTIVITY);\n\t}",
"public void onBackPressed() {\n Intent intent=new Intent(SignUpActivity.this,HomeActivity.class);\n startActivity(intent);\n overridePendingTransition(0,0);\n finish();\n }",
"@Override\n public void onClick(View arg0) {\n Intent login = new Intent(getApplicationContext(), LoginActivity.class);\n login.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(login);\n finish();\n }",
"public void voltarLogin(View view){\n finish();\n }",
"public void sign_out(View v){\n\n Intent intent = new Intent(this, popRateClinic.class);\n startActivity(intent);\n finish();\n }",
"public void ClickLogout(View view ){\n logout();\n intent = new Intent(context,LoginActivity.class);\n //remove all previous stack activities\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n finish();\n }",
"public void logout() {\n // Mengambil method clear untuk menghapus data Shared Preference\n editor.clear();\n // Mengeksekusi perintah clear\n editor.commit();\n // Membuat intent untuk berpindah halaman\n Intent intent = new Intent(context, LoginActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n context.startActivity(intent);\n }",
"public void logout(View view) {\n if (isNetworkAvailable()) {\n FirebaseAuth.getInstance().signOut();\n startActivity(new Intent(AllChannelListActivity.this, SignInActivity.class));\n finish();\n } else {\n\n Toast.makeText(AllChannelListActivity.this, \"To Log Out, Please Connect your Phone to Internet..\", Toast.LENGTH_SHORT).show();\n\n }\n }",
"private void returnToLoginActivity() {\n Intent returnToLogin = new Intent(this, Login.class);\n startActivity(returnToLogin);\n finish();\n }",
"public void logOut(View view) {\n Intent intent = new Intent(this, LoginActivity.class);\n startActivity(intent);\n }",
"public void signOut(){\n MainActivity.signOut();\n\n //sign out of google and take back to MainActivity on success\n FirebaseAuth.getInstance().signOut();\n MainActivity.mGoogleSignInClient.signOut()\n .addOnCompleteListener(this, task -> {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n });\n\n AuthUI.getInstance()\n .signOut(this)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n public void onComplete(@NonNull Task<Void> task) {\n // ...\n startActivity(new Intent(SettingsActivity.this, MainActivity.class));\n }\n });\n }",
"@Override\n public void onClick(DialogInterface arg0, int arg1) {\n if (MainActivity.sign_status == false) {\n LoginManager.getInstance().logOut();\n Intent intent = new Intent(doc.this, MainActivity.class);\n startActivity(intent);\n } else {\n MainActivity.mGoogleSignInClient.signOut()\n .addOnCompleteListener(doc.this, new OnCompleteListener<Void>() {\n public void onComplete(@NonNull Task<Void> task) {\n // ...\n }\n });\n MainActivity.mGoogleSignInClient.revokeAccess()\n .addOnCompleteListener(doc.this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n // ...\n }\n });\n Intent intent = new Intent(doc.this, MainActivity.class);\n startActivity(intent);\n Toast.makeText(doc.this, \"Logged Out\", Toast.LENGTH_LONG).show();\n }\n\n splash.c=0;\n }",
"@Override\r\n public void onClick(View view) {\n new SignOut();\r\n\r\n // stop all services\r\n stopService(new Intent(MainActivity.this,UserDataChangeListener.class));\r\n stopService(new Intent(MainActivity.this,GeofenceService.class));\r\n stopService(new Intent(MainActivity.this,LocationService.class));\r\n\r\n // restart sign in\r\n Intent signIn = new Intent(MainActivity.this,SignIn.class);\r\n startActivity(signIn);\r\n finish();\r\n }",
"public void onClick(DialogInterface arg0, int arg1) {\n // Clear the session data\n // This will clear all session data and\n // rdirect user to LoginActivity\n FragmentManager mFragmentManager = getActivity().getSupportFragmentManager();\n if (mFragmentManager.getBackStackEntryCount() > 0)\n mFragmentManager.popBackStackImmediate();\n\n\n// getActivity().finish();\n// Intent i = new Intent(getContext(), LoginWithMobile.class);\n// startActivity(i);\n session.logoutUser();\n// System.exit(0);\n\n\n// int pid = android.os.Process.myPid();\n// android.os.Process.killProcess(pid);\n// Toast.makeText(getApplicationContext(), \"User Is Wish To Exit\", Toast.LENGTH_SHORT).show();\n }",
"private void logout() {\n Utils.showConfirmationDialogCallBack(MainActivity.this, getString(R.string.logout_sure), this);\n }",
"@Override\n public void onClick(View v) {\n Intent i = new Intent(Login_page.this,registration_page.class);\n startActivity(i);\n finish();\n }",
"private void logout() {\n //set offline flag\n String uid = FirebaseAuth.getInstance().getCurrentUser().getUid();\n new PostNoSqlDataBase(this).offline(uid);\n\n //logout\n // FirebaseAuth mAuth = FirebaseAuth.getInstance();\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n GoogleSignInClient mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n mGoogleSignInClient.signOut();\n FirebaseAuth.getInstance().signOut();\n //go to the main activity\n startActivity(new Intent(this, SignUpActivity.class));\n finish();\n }",
"public void onClickExit(View view) {\n BYPASS_LOGIN = false;\n\n //finish activity\n super.finish();\n\n //close all activities\n ActivityCompat.finishAffinity(this);\n\n //log out of google play services\n super.signOut();\n }",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t\tIntent i = new Intent(TrainerHomeActivity.this,\r\n\t\t\t\tTrainerLoginActivity.class);\r\n\t\tstartActivity(i);\r\n\t\tfinish();\r\n\t\toverridePendingTransition(R.anim.open_scale, R.anim.close_translate);\r\n\t}",
"public void logout() {\n\n clearData();\n Intent intent = new Intent(getContext(), LoginActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n\n\n }",
"@Override\n\tpublic void onBackPressed() {\n\t\t Intent intent3=new Intent(LoginActivity.this,MainActivity.class);\n\t\t\tstartActivity(intent3);\n\t\t\t\n\t}",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t\tstartActivity(new Intent(SignActivity.this,MainActivity.class));\r\n\t\tfinish();\r\n\t}",
"private void logout() {\n\t\tParseUser.logOut();\n\n\t\t// Go to the login view\n\t\tstartLoginActivity();\n\t}",
"private void signOut () {\n mAuth.signOut();\n textViewStatus.setText(\"Signed Out\");\n }",
"public void onSignInPressed(View view) {\n Intent intent = new Intent(CreateAccountActivity.this, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n }",
"public void onSignInPressed(View view) {\n Intent intent = new Intent(CreateAccountActivity.this, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n }",
"@Override\n public void onBackPressed() {\n AlertDialog.Builder mBuilder = new AlertDialog.Builder(MainActivity.this);\n final View dialogView = getLayoutInflater().inflate(R.layout.dialog_logout, null);\n Button logoutButton = dialogView.findViewById(R.id.btn_dialogout_logout);\n Button cancelButton = dialogView.findViewById(R.id.btn_dialogout_cancel);\n\n mBuilder.setView(dialogView);\n final AlertDialog dialog = mBuilder.create();\n dialog.show();\n\n logoutButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mainPresenter.startLogOut(MainActivity.this);\n }\n });\n\n cancelButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n dialog.dismiss();\n }\n });\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQ_SIGNUP && resultCode == RESULT_OK) {\n finishLogin(data);\n } else\n super.onActivityResult(requestCode, resultCode, data);\n }",
"private void logout() {\n\n\n GoogleSignInAccount account = GoogleSignIn.getLastSignedInAccount(context);\n //start home activity, when account is not null (user already signed in)\n if (account != null) {\n Log.d(\"LOGOUT\", \"Google Accoutn is not null\");\n if (mGoogleSignInClient != null) {\n mGoogleSignInClient.signOut()\n .addOnCompleteListener(getActivity(), new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n Log.d(\"LogoutButton\", \"You were Logged out succesfully\");\n //remove user id from preferences to indicate, that he is not logged in\n Preferences.saveUserId(context, null);\n\n //remove FCM token\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n FirebaseInstanceId.getInstance().deleteInstanceId();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n }).start();\n\n Intent intent = new Intent(context, LoginActivity.class);\n startActivity(intent);\n //remove home activity from stack\n getActivity().finish();\n }\n });\n }\n }\n }",
"public void logout() {\n SharedPreferences sharedPreferences = mCtx.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.clear();\n editor.apply();\n Intent myIntent = new Intent(mCtx, LoginActivity.class);\n myIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n mCtx.startActivity(myIntent);\n }",
"public void logout(){\n SharedPreferences settings = mContext.getSharedPreferences(\"UserData\", 0);\n SharedPreferences.Editor preferencesEditor = settings.edit();\n preferencesEditor.clear();\n preferencesEditor.commit();\n // take user back to login screen\n Intent logoutIntent = new Intent(mContext, LoginActivity.class);\n logoutIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\n mContext.startActivity(logoutIntent);\n }",
"private void goToLoginPage() {\n\n startActivity(new Intent(this,LoginActivity.class));\n finish();\n }",
"public void onLogout() {\n ParseUser.logOut();\n\n promptForLogin();\n }",
"@Override\n public void onBackPressed() {\n\n startActivity(new Intent(getApplicationContext(),ProfileActivity.class));\n finish();\n }",
"public void signOut(){\n mAuth.signOut();\n }",
"@Override\n public void doLogout() {\n\n\n Intent intent = new Intent(RestaurantMainActivity.this, WelcomeActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(SignUpActivity.this, LoginActivity.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\tfinish();\r\n\t\t\t}",
"@Override\n public void afterLogout() {\n setTitle(R.string.login);\n getSupportFragmentManager().popBackStack();\n getSupportFragmentManager().beginTransaction()\n .replace(R.id.containerView, new LoginFragment())\n .commit();\n }",
"private void logout() {\n ProgressDialog logoutProgressDialog = new ProgressDialog(ContributionsGalleryActivity.this);\n logoutProgressDialog.setMessage(getResources().getString(R.string.logging_out));\n logoutProgressDialog.setCancelable(false);\n logoutProgressDialog.show();\n ParseUser.logOutInBackground(e -> {\n logoutProgressDialog.dismiss();\n if (e != null) { // Logout has failed\n Snackbar.make(contributionsGalleryRelativeLayout, getResources().getString(R.string.logout_failed), Snackbar.LENGTH_LONG).show();\n }\n else { // Logout has succeeded\n goLoginSignupActivity();\n finish();\n }\n });\n }",
"private void openLogoutActivity() {\n Intent intent = new Intent(this, FaceDetectionActivity.class);\n intent.putExtra(\"IS_FROM_LOGIN\", false);\n startActivityForResult(intent, LOGOUT_REQUEST);\n }",
"private void configureBackButton(){\n Button backButton = (Button) findViewById(R.id.backButton);\n backButton.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View view){\n //TODO add the code that erases saved login key\n\n //opens login page and closes home page stack\n startActivity(new Intent(homePage.this, MainActivity.class));\n finish();\n\n }\n });\n }",
"@Override\n public void onBackPressed() {\n\n new SendStringToServer(ConnectToServer.getDataOutputStream()).execute(\"logOut\");\n\n editor.putString(LoginActivity.EMAIL, null);\n editor.commit();\n\n super.onBackPressed();\n }",
"public void logout() {\n SharedPreferences sharedPreferences = mCtx.getSharedPreferences(AppConfig.SHARED_PREF_NAME, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.clear();\n editor.apply();\n mCtx.startActivity(new Intent(mCtx, LoginActivity.class));\n }",
"private void signOut() {\n mAuth.signOut();\n updateUI(null);\n }",
"private void signOut() {\n mGoogleSignInClient.signOut().addOnCompleteListener(this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n updateUI(null);\n }\n });\n }",
"@Override\n\tpublic void MyBack() {\n\t\tFindPasswordActivity.this.finish();\n\t}",
"@Override\r\n\t\t\tpublic void onLogout() {\n\t\t\t\tshowToast(\"onLogout---\");\r\n\t\t\t}",
"public void returnToLogin() {\n // Ako smo kliknuli na Login, kreiramo Intent za\n // prijelaz na Login aktivnost\n Intent i = new Intent(this, LoginActivity.class);\n // U slucaju povratka na Login zelimo izbrisati \"povijest\" navigiranja,\n // tako da nas \"Back\" gumb ne vrati prethodnu aktivnost\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // Prelazimo na Login aktivnost\n startActivity(i);\n // Zavrsavamo trenutnu aktivnost i oslobadjamo resurse\n finish();\n }",
"private void signOut() {\n mAuth.signOut();\n }",
"private void onSignupSuccess() {\n startActivity(currentActivity, UserLoginActivity.class);\n finish();\n }",
"@Override\n public void onUserReturnedUser(UserDTO user) {\n\n if (null != user) {\n startActivity(new Intent(SignInActivity.this, FeedPageActivity.class));\n finish();\n } else {\n UserDB.getInstance(this).signout(this);\n showUI();\n }\n }",
"@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)\n @Override\n public void finish() {\n loginPresenter.toFinish();\n }",
"public void onComplete(@NonNull Task<Void> task) {\n startActivity(new Intent(MainActivity.this, Login.class));\n finish();\n }",
"public void back_searchResult(View view){\n // Goes back to Login page\n Intent i = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(i);\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n Intent iv = new Intent(HomeActivity.this, LoginActivity.class);\n startActivity(iv);\n overridePendingTransition(R.animator.anim_15_appear, R.animator.anim_2_fadeout);\n finish();\n }",
"private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(MainActivity.this, Login.class);\n startActivity(intent);\n finish();\n }",
"private void onSignOutClicked() {\n mState.disableConnection();\n if (mState.googleApiClientIsConnected()) {\n mState.signOutGoogleGames();\n }\n\n // show sign-in button, hide the sign-out button\n status.setText(\"Login to submit your achievements!\");\n signIn.setVisibility(View.VISIBLE);\n signOut.setVisibility(View.GONE);\n achievements.setVisibility(View.GONE);\n palmares.setVisibility(View.GONE);\n mPhotoUser.setVisibility(View.GONE);\n }",
"private void logout() {\n ((MyApplication)this.getApplication()).setLoggedIn(false);\n// Intent intent = new Intent(this, StartupActivity.class);\n// startActivity(intent);\n }",
"@Override\n public void onClick(View v) {\n Intent i = new Intent(getApplicationContext(), LoginActivity.class);\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(i);\n }"
] | [
"0.7860608",
"0.7860595",
"0.78485256",
"0.7767034",
"0.76378566",
"0.7631297",
"0.7617553",
"0.7570134",
"0.75499606",
"0.74825746",
"0.7460605",
"0.7439243",
"0.74306685",
"0.7423068",
"0.7421864",
"0.7371521",
"0.73432565",
"0.7342584",
"0.7340909",
"0.7331177",
"0.73286366",
"0.7315915",
"0.7275462",
"0.72527903",
"0.7222946",
"0.71980125",
"0.71374685",
"0.71370727",
"0.7134729",
"0.7127849",
"0.71121776",
"0.7084825",
"0.70809364",
"0.70784026",
"0.7073973",
"0.7070907",
"0.70693624",
"0.70568705",
"0.7050345",
"0.70384014",
"0.6990373",
"0.69875973",
"0.6986571",
"0.6968279",
"0.69627297",
"0.69517076",
"0.6939949",
"0.6937828",
"0.693395",
"0.6931109",
"0.6928306",
"0.6927648",
"0.692158",
"0.69118154",
"0.6904933",
"0.68958175",
"0.68921626",
"0.68880194",
"0.68864244",
"0.688516",
"0.68832713",
"0.68532103",
"0.6841517",
"0.68401676",
"0.68305767",
"0.6820384",
"0.68136287",
"0.68136287",
"0.67965966",
"0.6788829",
"0.67827094",
"0.6775982",
"0.6774184",
"0.6757401",
"0.67498577",
"0.6744838",
"0.67364424",
"0.67171174",
"0.6716874",
"0.6713587",
"0.67091125",
"0.67043126",
"0.6703318",
"0.6697725",
"0.6680491",
"0.66751635",
"0.66642",
"0.66496885",
"0.6643416",
"0.6639833",
"0.66394615",
"0.66274726",
"0.6620793",
"0.6607805",
"0.66046953",
"0.6597286",
"0.65931517",
"0.65886414",
"0.6579055",
"0.65690047",
"0.65648705"
] | 0.0 | -1 |
Use this factory method to create a new instance of this fragment using the provided parameters. | public static SendFragment newInstance(String param1, String param2) {
return new SendFragment();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"protected abstract Fragment createFragment();",
"public void createFragment() {\n\n }",
"@Override\n protected Fragment createFragment() {\n Intent intent = getIntent();\n\n long id = intent.getLongExtra(MovieDetailFragment.EXTRA_ID, -1);\n return MovieDetailFragment.newInstance(id);\n }",
"public CuartoFragment() {\n }",
"public StintFragment() {\n }",
"public ExploreFragment() {\n\n }",
"public RickAndMortyFragment() {\n }",
"public FragmentMy() {\n }",
"public LogFragment() {\n }",
"public FeedFragment() {\n }",
"public HistoryFragment() {\n }",
"public HistoryFragment() {\n }",
"public static MyFeedFragment newInstance() {\n return new MyFeedFragment();\n }",
"public WkfFragment() {\n }",
"public static ScheduleFragment newInstance() {\n ScheduleFragment fragment = new ScheduleFragment();\n Bundle args = new Bundle();\n //args.putString(ARG_PARAM1, param1);\n //args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public ProfileFragment(){}",
"public WelcomeFragment() {}",
"public static ForumFragment newInstance() {\n ForumFragment fragment = new ForumFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n\n return fragment;\n }",
"public static NotificationFragment newInstance() {\n NotificationFragment fragment = new NotificationFragment();\n Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public progFragment() {\n }",
"public HeaderFragment() {}",
"public static RouteFragment newInstance() {\n RouteFragment fragment = new RouteFragment();\n Bundle args = new Bundle();\n //fragment.setArguments(args);\n return fragment;\n }",
"public EmployeeFragment() {\n }",
"public Fragment_Tutorial() {}",
"public NewShopFragment() {\n }",
"public FavoriteFragment() {\n }",
"public static MyCourseFragment newInstance() {\n MyCourseFragment fragment = new MyCourseFragment();\r\n// fragment.setArguments(args);\r\n return fragment;\r\n }",
"public static MessageFragment newInstance() {\n MessageFragment fragment = new MessageFragment();\n Bundle args = new Bundle();\n\n fragment.setArguments(args);\n return fragment;\n }",
"public static ReservationFragment newInstance() {\n\n ReservationFragment _fragment = new ReservationFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n return _fragment;\n }",
"public CreateEventFragment() {\n // Required empty public constructor\n }",
"public static RecipeListFragment newInstance() {\n RecipeListFragment fragment = new RecipeListFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n return fragment;\n }",
"public static Fragment newInstance() {\n\t\treturn new ScreenSlidePageFragment();\n\t}",
"public NoteActivityFragment() {\n }",
"public static WeekViewFragment newInstance(int param1, int param2) {\n WeekViewFragment fragment = new WeekViewFragment();\n //WeekViewFragment 객체 생성\n Bundle args = new Bundle();\n //Bundle 객체 생성\n args.putInt(ARG_PARAM1, param1);\n //ARG_PARAM1에 param1의 정수값 넣어서 args에 저장\n args.putInt(ARG_PARAM2, param2);\n //ARG_PARAM2에 param2의 정수값 넣어서 args에 저장\n fragment.setArguments(args);\n //args를 매개변수로 한 setArguments() 메소드 수행하여 fragment에 저장\n return fragment; //fragment 반환\n }",
"public static Fragment0 newInstance(String param1, String param2) {\n Fragment0 fragment = new Fragment0();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static QueenBEmbassyF newInstance() {\n QueenBEmbassyF fragment = new QueenBEmbassyF();\n //the way to pass arguments between fragments\n Bundle args = new Bundle();\n\n fragment.setArguments(args);\n return fragment;\n }",
"public static Fragment newInstance() {\n StatisticsFragment fragment = new StatisticsFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"public EventHistoryFragment() {\n\t}",
"public HomeFragment() {}",
"public PeopleFragment() {\n // Required empty public constructor\n }",
"public static FeedFragment newInstance() {\n FeedFragment fragment = new FeedFragment();\n return fragment;\n }",
"public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"public VantaggiFragment() {\n // Required empty public constructor\n }",
"public AddressDetailFragment() {\n }",
"public ArticleDetailFragment() { }",
"public static DropboxMainFrag newInstance() {\n DropboxMainFrag fragment = new DropboxMainFrag();\n // set arguments in Bundle\n return fragment;\n }",
"public RegisterFragment() {\n }",
"public EmailFragment() {\n }",
"public static CommentFragment newInstance() {\n CommentFragment fragment = new CommentFragment();\n\n return fragment;\n }",
"public static FragmentComida newInstance(String param1) {\n FragmentComida fragment = new FragmentComida();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n\n\n }",
"public static ParqueosFragment newInstance() {\n ParqueosFragment fragment = new ParqueosFragment();\n return fragment;\n }",
"public ForecastFragment() {\n }",
"public FExDetailFragment() {\n \t}",
"public static AddressFragment newInstance(String param1) {\n AddressFragment fragment = new AddressFragment();\n\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n\n return fragment;\n }",
"public TripNoteFragment() {\n }",
"public ItemFragment() {\n }",
"public NoteListFragment() {\n }",
"public CreatePatientFragment() {\n\n }",
"public DisplayFragment() {\n\n }",
"public static frag4_viewcompliment newInstance(String param1, String param2) {\r\n frag4_viewcompliment fragment = new frag4_viewcompliment();\r\n Bundle args = new Bundle();\r\n args.putString(ARG_PARAM1, param1);\r\n args.putString(ARG_PARAM2, param2);\r\n fragment.setArguments(args);\r\n return fragment;\r\n }",
"public static fragment_profile newInstance(String param1, String param2) {\n fragment_profile fragment = new fragment_profile();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"@Override\n\tprotected Fragment createFragment() {\n\t\treturn new FormFragment();\n\t}",
"public static MainFragment newInstance() {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"public ProfileFragment() {\n\n }",
"public BackEndFragment() {\n }",
"public CustomerFragment() {\n }",
"public static FriendsFragment newInstance(int sectionNumber) {\n \tFriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public ArticleDetailFragment() {\n }",
"public ArticleDetailFragment() {\n }",
"public ArticleDetailFragment() {\n }",
"public static Fragment newInstance() {\n return new SettingsFragment();\n }",
"public SummaryFragment newInstance()\n {\n return new SummaryFragment();\n }",
"public PeersFragment() {\n }",
"public TagsFragment() {\n }",
"public static ProfileFragment newInstance() {\n ProfileFragment fragment = new ProfileFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, \"\");\n args.putString(ARG_PARAM2, \"\");\n fragment.setArguments(args);\n return fragment;\n }",
"public static FriendsFragment newInstance() {\n FriendsFragment fragment = new FriendsFragment();\n\n return fragment;\n }",
"public HomeSectionFragment() {\n\t}",
"public static FirstFragment newInstance(String text) {\n\n FirstFragment f = new FirstFragment();\n Bundle b = new Bundle();\n b.putString(\"msg\", text);\n\n f.setArguments(b);\n\n return f;\n }",
"public PersonDetailFragment() {\r\n }",
"public static LogFragment newInstance(Bundle params) {\n LogFragment fragment = new LogFragment();\n fragment.setArguments(params);\n return fragment;\n }",
"public RegisterFragment() {\n // Required empty public constructor\n }",
"public VehicleFragment() {\r\n }",
"public static Fine newInstance(String param1, String param2) {\n Fine fragment = new Fine();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static FriendsFragment newInstance(String param1, String param2) {\n FriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"public static ChangesViewFragment newInstance() {\n\t\tChangesViewFragment fragment = new ChangesViewFragment();\n\t\tBundle args = new Bundle();\n\t\targs.putInt(HomeViewActivity.ARG_SECTION_NUMBER, 2);\n\t\tfragment.setArguments(args);\n\t\treturn fragment;\n\t}",
"public static NoteFragment newInstance(String param1, String param2) {\n NoteFragment fragment = new NoteFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MainFragment newInstance(Context context) {\n MainFragment fragment = new MainFragment();\n if(context != null)\n fragment.setVariables(context);\n return fragment;\n }",
"@Override\n\tprotected Fragment createFragment() {\n\t\treturn new CrimeListFragment();\n\t}",
"public static MoneyLogFragment newInstance() {\n MoneyLogFragment fragment = new MoneyLogFragment();\n return fragment;\n }",
"public static ForecastFragment newInstance() {\n\n //Create new fragment\n ForecastFragment frag = new ForecastFragment();\n return(frag);\n }",
"public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MyTaskFragment newInstance(String param1) {\n MyTaskFragment fragment = new MyTaskFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MyProfileFragment newInstance(String param1, String param2) {\n MyProfileFragment fragment = new MyProfileFragment();\n return fragment;\n }",
"public static MainFragment newInstance(int param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_PARAM1, param1);\n\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public PlaylistFragment() {\n }",
"public static HistoryFragment newInstance() {\n HistoryFragment fragment = new HistoryFragment();\n return fragment;\n }",
"public static SurvivorIncidentFormFragment newInstance(String param1, String param2) {\n// SurvivorIncidentFormFragment fragment = new SurvivorIncidentFormFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n// return fragment;\n\n SurvivorIncidentFormFragment fragment = new SurvivorIncidentFormFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n\n\n }",
"public static PersonalFragment newInstance(String param1, String param2) {\n PersonalFragment fragment = new PersonalFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }"
] | [
"0.7259329",
"0.72331375",
"0.71140355",
"0.69909847",
"0.69902235",
"0.6834592",
"0.683074",
"0.68134046",
"0.6801526",
"0.6801054",
"0.67653185",
"0.6739714",
"0.6739714",
"0.6727412",
"0.6717231",
"0.6705855",
"0.6692112",
"0.6691661",
"0.66869426",
"0.66606814",
"0.6646188",
"0.66410166",
"0.6640725",
"0.6634425",
"0.66188246",
"0.66140765",
"0.6608169",
"0.66045964",
"0.65977716",
"0.6592119",
"0.659137",
"0.65910816",
"0.65830594",
"0.65786606",
"0.6562876",
"0.65607685",
"0.6557126",
"0.65513307",
"0.65510213",
"0.65431285",
"0.6540448",
"0.65336084",
"0.6532555",
"0.6528302",
"0.6524409",
"0.652328",
"0.6523149",
"0.6516528",
"0.65049976",
"0.6497274",
"0.6497235",
"0.64949715",
"0.64944136",
"0.6484968",
"0.6484214",
"0.64805835",
"0.64784926",
"0.64755154",
"0.64710265",
"0.6466466",
"0.6457089",
"0.645606",
"0.6454554",
"0.6452161",
"0.64520335",
"0.6450325",
"0.64488834",
"0.6446765",
"0.64430225",
"0.64430225",
"0.64430225",
"0.64420956",
"0.6441306",
"0.64411277",
"0.6438451",
"0.64345145",
"0.64289486",
"0.64287597",
"0.6423755",
"0.64193285",
"0.6418699",
"0.6414679",
"0.6412867",
"0.6402168",
"0.6400724",
"0.6395624",
"0.6395109",
"0.6391252",
"0.63891554",
"0.63835025",
"0.63788056",
"0.63751805",
"0.63751805",
"0.63751805",
"0.6374796",
"0.63653135",
"0.6364529",
"0.6360922",
"0.63538784",
"0.6351111",
"0.635067"
] | 0.0 | -1 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
mView = inflater.inflate(R.layout.new_fragment_send, container, false);
ButterKnife.bind(this, mView);
EditText editTextFrom = (EditText)mView.findViewById(R.id.editTextFrom);
String strName = BitsharesWalletWraper.getInstance().get_account().name;
editTextFrom.setText(strName);
sha256_object.encoder encoder = new sha256_object.encoder();
encoder.write(strName.getBytes());
WebView webViewFrom = (WebView)mView.findViewById(R.id.webViewAvatarFrom);
loadWebView(webViewFrom, 40, encoder.result().toString());
TextView textView = (TextView)mView.findViewById(R.id.textViewFromId);
String strId = String.format(
Locale.ENGLISH, "#%d",
BitsharesWalletWraper.getInstance().get_account().id.get_instance()
);
textView.setText(strId);
mProcessHud = KProgressHUD.create(getActivity())
.setStyle(KProgressHUD.Style.SPIN_INDETERMINATE)
.setLabel("Please Wait")
.setCancellable(false)
.setAnimationSpeed(2)
.setDimAmount(0.5f);
mView.findViewById(R.id.btn_send).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
processSendClick(mView);
}
});
mEditTextTo.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
final String strText = mEditTextTo.getText().toString();
if (hasFocus == false) {
processGetTransferToId(strText, mTextViewId);
}
}
});
final WebView webViewTo = (WebView)mView.findViewById(R.id.webViewAvatarTo);
mEditTextTo.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s) {
sha256_object.encoder encoder = new sha256_object.encoder();
encoder.write(s.toString().getBytes());
loadWebView(webViewTo, 40, encoder.result().toString());
}
});
mEditTextQuantitiy.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (hasFocus) {
return;
}
String strQuantity = mEditTextQuantitiy.getText().toString();
if (TextUtils.isEmpty(strQuantity)) {
return;
}
double quantity = NumericUtil.parseDouble(strQuantity, -1.0D);
if (Double.compare(quantity, 0.0D) < 0) { // 越界或者格式错误
mEditTextQuantitiy.setText("0");
// TODO toast
return;
}
processCalculateFee();
}
});
mSpinner = (Spinner) mView.findViewById(R.id.spinner_unit);
SendViewModel viewModel = ViewModelProviders.of(this).get(SendViewModel.class);
viewModel.getBalancesList().observe(this, bitsharesBalanceAssetList -> {
List<String> symbolList = new ArrayList<>();
for (BitsharesBalanceAsset bitsharesBalanceAsset : bitsharesBalanceAssetList) {
symbolList.add(bitsharesBalanceAsset.quote);
ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(
getActivity(),
R.layout.new_custom_spinner_item,
symbolList
);
arrayAdapter.setDropDownViewResource(R.layout.new_spinner_style);
mSpinner.setAdapter(arrayAdapter);
}
});
return mView;
} | {
"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 |
TODO: Rename method, update argument and hook method into UI event | public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\n\t\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t}",
"public abstract void update(UIReader event);",
"@Override\r\n\t\t\tpublic void handle(ActionEvent arg0) {\n\t\t\t}",
"@Override\n\tpublic void handle(ActionEvent event) {\n\t\t\n\t}",
"@Override\n\tpublic void handle(ActionEvent event) {\n\n\t}",
"@Override\n\tpublic void handleUpdateUI(String text, int code) {\n\t\t\n\t}",
"@Override\n\tpublic void update(Event e) {\n\t}",
"public abstract void onInvoked(CommandSender sender, String[] args);",
"@Override\r\n public void updateUI() {\r\n }",
"@Override\r\n\tpublic void handle(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"@Override\n\tpublic void processEvent(Event e) {\n\n\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}",
"@Override\n\tpublic void processCommand(JMVCommandEvent arg0) {\n\t}",
"@Override\n\tpublic void inputChanged( Viewer arg0, Object arg1, Object arg2 ) {\n\t}",
"@Override\n\tpublic void handleEvent(Event arg0) {\n\t\t\n\t}",
"@Override\r\n\tpublic void onCustomUpdate() {\n\t\t\r\n\t}",
"public void updateUI(){}",
"private synchronized void updateScreen(String arg){\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n setChanged();\n notifyObservers(arg);\n }\n });\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}",
"@Override\r\n public void actionPerformed( ActionEvent e )\r\n {\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}",
"@Override\r\n\tpublic void updateObjectListener(ActionEvent e) {\n\t\t\r\n\t}",
"Event () {\n // Nothing to do here.\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t}",
"void onArgumentsChanged();",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}",
"@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}",
"void eventChanged();",
"@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override public void handle(ActionEvent e)\n\t {\n\t }",
"@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override //se repita\r\n public void actionPerformed(ActionEvent ae) {\r\n \r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}",
"public abstract CommandResponse onCommand(CommandSender sender, String label, String[] args);",
"@Override\n public void actionPerformed(ActionEvent actionEvent) {\n }",
"@Override\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t}",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n \r\n }",
"public abstract void onCommand(MessageEvent context) throws Exception;",
"@Override\r\n\tpublic void onEvent(Event arg0) {\n\r\n\t}",
"private void addParameterEventHandler(){\n\t\t\n\t\tgetParameterNameListBox().addDoubleClickHandler(new DoubleClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onDoubleClick(DoubleClickEvent event) {\n\t\t\t\tparameterAceEditor.clearAnnotations();\n\t\t\t\tparameterAceEditor.removeAllMarkers();\n\t\t\t\tparameterAceEditor.redisplay();\n\t\t\t\tSystem.out.println(\"In addParameterEventHandler on DoubleClick isPageDirty = \" + getIsPageDirty() + \" selectedIndex = \" + getParameterNameListBox().getSelectedIndex());\n\t\t\t\tsetIsDoubleClick(true);\n\t\t\t\tsetIsNavBarClick(false);\n\t\t\t\tif (getIsPageDirty()) {\n\t\t\t\t\tshowUnsavedChangesWarning();\n\t\t\t\t} else {\n\t\t\t\t\tint selectedIndex = getParameterNameListBox().getSelectedIndex();\n\t\t\t\t\tif (selectedIndex != -1) {\n\t\t\t\t\t\tfinal String selectedParamID = getParameterNameListBox().getValue(selectedIndex);\n\t\t\t\t\t\tcurrentSelectedParamerterObjId = selectedParamID;\n\t\t\t\t\t\tif(getParameterMap().get(selectedParamID) != null){\n\t\t\t\t\t\t\tgetParameterNameTxtArea().setText(getParameterMap().get(selectedParamID).getParameterName());\n\t\t\t\t\t\t\tgetParameterAceEditor().setText(getParameterMap().get(selectedParamID).getParameterLogic());\n\t\t\t\t\t\t\tSystem.out.println(\"In Parameter DoubleClickHandler, doing setText()\");\n\t\t\t\t\t\t\t//disable parameterName and Logic fields for Default Parameter\n\t\t\t\t\t\t\tboolean isReadOnly = getParameterMap().get(selectedParamID).isReadOnly();\n\t\t\t\t\t\t\tgetParameterButtonBar().getDeleteButton().setTitle(\"Delete\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(MatContext.get().getMeasureLockService()\n\t\t\t\t\t\t\t\t\t.checkForEditPermission()){\n\t\t\t\t\t\t\t\tsetParameterWidgetReadOnly(!isReadOnly);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// load most recent used cql artifacts\n\t\t\t\t\t\t\tMatContext.get().getMeasureService().getUsedCQLArtifacts(MatContext.get().getCurrentMeasureId(), new AsyncCallback<GetUsedCQLArtifactsResult>() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\t\t\t\tWindow.alert(MatContext.get().getMessageDelegate().getGenericErrorMessage());\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onSuccess(GetUsedCQLArtifactsResult result) {\n\t\t\t\t\t\t\t\t\tif(result.getUsedCQLParameters().contains(getParameterMap().get(selectedParamID).getParameterName())) {\n\t\t\t\t\t\t\t\t\t\tgetParameterButtonBar().getDeleteButton().setEnabled(false);\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\t\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\tsuccessMessageAlert.clearAlert();\n\t\t\t\t\terrorMessageAlert.clearAlert();\n\t\t\t\t\twarningMessageAlert.clearAlert();\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}",
"@Override\n public void handle(Event event) {\n }",
"@Override\n public void actionPerformed(AnActionEvent e) {\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n \n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n \n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n \n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n \n }",
"@Override\r\n\tpublic void handleEvent(Event event) {\n\r\n\t}",
"public void ImageView(ActionEvent event) {\n\t}",
"@Override\n public void updateUi() {\n\n }",
"@Override\n public void updateUi() {\n\n }",
"@Override\n public void updateUi() {\n\n }",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}",
"public void runInUi(ElexisEvent ev){}",
"@Override\n public void delta() {\n \n }",
"@Override\n\tpublic void onClick(ClickEvent arg0) {\n\t\t\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n }",
"@Override\n\tprotected void OnClick() {\n\t\t\n\t}",
"@Override\n public void actionPerformed(ActionEvent ev) {\n }",
"@Override\n public void actionPerformed(ActionEvent e)\n {\n \n }",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n\n }",
"@Override\n public void update(Observable o, Object arg)\n {\n \n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tupdate();\n\t\t\t}",
"@Override\r\n public void processEvent(IAEvent e) {\n\r\n }"
] | [
"0.66202044",
"0.65255916",
"0.64743257",
"0.64743257",
"0.6436195",
"0.6325417",
"0.6237402",
"0.61902404",
"0.61594874",
"0.61453",
"0.61244947",
"0.6106878",
"0.61008215",
"0.6093242",
"0.60499597",
"0.60499597",
"0.6046236",
"0.6041878",
"0.6041878",
"0.60084456",
"0.5999695",
"0.5985911",
"0.5977926",
"0.5957932",
"0.59385085",
"0.5927031",
"0.5927031",
"0.59231174",
"0.591776",
"0.59172964",
"0.59172964",
"0.59172964",
"0.59172964",
"0.59172964",
"0.59102345",
"0.5896684",
"0.5894415",
"0.5893606",
"0.58901393",
"0.58901393",
"0.58901393",
"0.5869268",
"0.5869268",
"0.5869268",
"0.58651894",
"0.5863583",
"0.5863583",
"0.5862221",
"0.585783",
"0.5848571",
"0.5848571",
"0.5848571",
"0.5848571",
"0.58394116",
"0.5838907",
"0.5819952",
"0.58088523",
"0.5804798",
"0.5774366",
"0.57736033",
"0.5771678",
"0.57670915",
"0.5764854",
"0.57557356",
"0.57557356",
"0.57553816",
"0.5746736",
"0.57461053",
"0.57461053",
"0.57461053",
"0.57431304",
"0.574202",
"0.574018",
"0.5736233",
"0.5736233",
"0.5736233",
"0.5734627",
"0.5734627",
"0.5734627",
"0.5734627",
"0.5734627",
"0.5734627",
"0.5734627",
"0.57245123",
"0.5723948",
"0.5722101",
"0.57218266",
"0.57218266",
"0.5720643",
"0.57197976",
"0.5715483",
"0.5712465",
"0.5712465",
"0.5712465",
"0.5712465",
"0.5712465",
"0.5712465",
"0.5709735",
"0.57062143",
"0.57052696",
"0.57036126"
] | 0.0 | -1 |
return all interfaces that the given class implements as set, include ones implements by supper class | public static Set<Class<?>> getAllInterfacesForClassAsSet(
Class<?> clazz, @Nullable ClassLoader classLoader) {
Assert.notNull(clazz, "Class must not be null");
if (clazz.isInterface() && isVisible(clazz, classLoader)) {
return Collections.singleton(clazz);
}
Set<Class<?>> interfaces = new LinkedHashSet<>();
Class<?> currentClass = clazz;
while (currentClass != null) {
Class<?>[] interfaceArray = currentClass.getInterfaces();
for (Class<?> cl : interfaceArray) {
if (isVisible(cl, classLoader)) {
interfaces.add(cl);
}
}
currentClass = currentClass.getSuperclass();
}
return interfaces;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Set<Interface> getInterfaces();",
"public static Set<Class<?>> getAllInterfacesForClassAsSet(Class<?> clazz) {\n return getAllInterfacesForClassAsSet(clazz, null);\n }",
"@SuppressWarnings(\"rawtypes\")\n public static Set<Class> getAllInterfacesForClassAsSet(Class clazz, ClassLoader classLoader) {\n Preconditions.checkNotNull(clazz, \"Class must not be null\");\n if (clazz.isInterface() && isVisible(clazz, classLoader)) {\n return Collections.singleton(clazz);\n }\n Set<Class> interfaces = new LinkedHashSet<>();\n Class sclazz = clazz;\n while (sclazz != null) {\n Class<?>[] ifcs = sclazz.getInterfaces();\n for (Class<?> ifc : ifcs) {\n interfaces.addAll(getAllInterfacesForClassAsSet(ifc, classLoader));\n }\n sclazz = clazz.getSuperclass();\n }\n return interfaces;\n }",
"public static Set findAllImplementedInterfaces(Class clazz) {\n Set s = new HashSet();\n Class[] interfaces = clazz.getInterfaces();\n for (int i = 0; i < interfaces.length; i++) {\n s.add(interfaces[i]);\n }\n Class superclass = clazz.getSuperclass();\n if (superclass != null) {\n s.addAll(findAllImplementedInterfaces(superclass));\n }\n return s;\n }",
"public static Set<Class<?>> getInterfaceClosure(Class<?> clazz) {\n Set<Class<?>> result = new HashSet<>();\n for (Class<?> classToDiscover = clazz; classToDiscover != null; classToDiscover = classToDiscover.getSuperclass()) {\n addInterfaces(classToDiscover, result);\n }\n return result;\n }",
"public Set<Class<?>> getAllInterfaces(Class<?> clazz) {\n\t\tSet<Class<?>> result = new HashSet<Class<?>>();\n\t\tgetAllInterfaces(result, clazz);\n\t\treturn result;\n\t}",
"public Collection<ClassTranslator> getInterfaces();",
"public static Set<Class<?>> getAllInterfacesAsSet(Object instance) {\n Assert.notNull(instance, \"Instance must not be null\");\n\n return getAllInterfacesForClassAsSet(instance.getClass());\n }",
"private static Class<?>[] getAllInterfacesForClass(\n Class<?> clazz, @Nullable ClassLoader classLoader) {\n return toClassArray(getAllInterfacesForClassAsSet(clazz, classLoader));\n }",
"public static Class<?>[] getAllInterfacesForClass(Class<?> clazz, ClassLoader classLoader) {\n Set<Class> ifcs = getAllInterfacesForClassAsSet(clazz, classLoader);\n return ifcs.toArray(new Class[ifcs.size()]);\n }",
"private static Class<?>[] getAllInterfacesForClass(Class<?> clazz) {\n return getAllInterfacesForClass(clazz, null);\n }",
"public Set<Class<?>> getUntestedInterfaces() {\n\t\tfinal Set<Class<?>> retval = new TreeSet<Class<?>>(\n\t\t\t\tCLASS_NAME_COMPARATOR);\n\n\t\tfor (final InterfaceInfo info : getInterfaceInfoMap().values()) {\n\t\t\t// no test and has methods\n\t\t\tif (info.getTests().isEmpty() && info.getName().getDeclaredMethods().length > 0) {\n\t\t\t\tretval.add(info.getName());\n\t\t\t}\n\t\t}\n\t\treturn retval;\n\t}",
"@SuppressWarnings(\"rawtypes\")\n\tpublic List getInterfaces(){\n\t\treturn targetClass.interfaces;\n\t}",
"private void getAllInterfaces(Class theClass, Map hInterfaces) {\r\n\t\tClass[] interfaces = theClass.getInterfaces();\r\n\t\tfor (int i = 0; i < interfaces.length; i++) {\r\n\t\t\thInterfaces.put(interfaces[i].getName(), interfaces[i]);\r\n\t\t\tgetAllInterfaces(interfaces[i], hInterfaces);\r\n\t\t}\r\n\t}",
"<T> IList<T> getImplementingObjects(Class<T> interfaceType);",
"@Override\n public List<AlgorithmClass> getAllImplementations() {\n return Arrays.asList(mAllImplementations);\n }",
"public Set<Class<?>> getScanClasses();",
"private static HashSet<Class<?>> getInstrumentedAncestors(Class<?> cls) {\n HashSet<Class<?>> ancestors = new HashSet<>();\n\n for (Method m : cls.getDeclaredMethods()) {\n if (m.getName().startsWith(\"yGet_\")) {\n ancestors.add(cls);\n // If the current class is instrumented, check for its super classes.\n ancestors.addAll(getInstrumentedAncestors(cls.getSuperclass()));\n return ancestors;\n }\n }\n\n return ancestors;\n }",
"private boolean classImplementsInterface(Class theClass,\r\n\t\t\tClass theInterface) {\r\n\t\tHashMap mapInterfaces = new HashMap();\r\n\t\tString strKey = null;\r\n\t\t// pass in the map by reference since the method is recursive\r\n\t\tgetAllInterfaces(theClass, mapInterfaces);\r\n\t\tIterator iterInterfaces = mapInterfaces.keySet().iterator();\r\n\t\twhile (iterInterfaces.hasNext()) {\r\n\t\t\tstrKey = (String) iterInterfaces.next();\r\n\t\t\tif (mapInterfaces.get(strKey) == theInterface) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public static Set<Class<?>> getClassSetFromAnnotation(Class clazz) {\n Set<Class<?>> classSet = new HashSet<>();\n for (Class<?> cls : CLASS_SET) {\n if (cls.isAnnotationPresent(clazz)) {\n classSet.add(cls);\n }\n }\n return classSet;\n }",
"@Override\n public Set<Class<?>> getClasses() {\n HashSet h = new HashSet<Class<?>>();\n h.add(AffirmationService.class );\n return h;\n }",
"String getInterfaces();",
"public Class<?>[] getAllInterfaces(Class<?> aClass) {\n\t\tList<Class<?>> result = new ArrayList<Class<?>>();\n\t\tthis.getAllInterfaces(aClass, result);\n\t\tClass<?> types[] = new Class[0];\n\t\treturn result.toArray(types);\n\t}",
"TypeInfo[] interfaces();",
"Set<Interface> getMatchingInterfaces(IpAddress ip);",
"public String[] getInterfaces() {\n return m_classBuilder.getInterfaces();\n }",
"public Enumeration getImplements()\n {\n ensureLoaded();\n return m_tblInterface.keys();\n }",
"public static Class<?>[] getAllInterfacesForClass(Class<?> clazz) {\n return getAllInterfacesForClass(clazz, null);\n }",
"ISet<Class<?>> collectAllTypeWiredServices();",
"private Set<String> classSet(String whichClass) {\n return subclasses.get(whichClass);\n }",
"public ArrayList<InterfaceType> getAllInterfaces() {\n HashSet<InterfaceType> set = new HashSet<>();\n ArrayList<InterfaceType> list = new ArrayList<>();\n\n for (InterfaceType interfaceType : getInterfaces()) {\n for (InterfaceType type : interfaceType.getAllInterfaces()) {\n if (set.add(type)) list.add(type);\n }\n }\n\n return list;\n }",
"@Override\n public List<JavaType> getInterfaces() {\n return ImmutableList.of();\n }",
"private void getServiceClasses(Class<?> service, Set<ProviderClass> sp) {\n LOGGER.log(Level.CONFIG, \"Searching for providers that implement: \" + service);\n Class<?>[] pca = ServiceFinder.find(service, true).toClassArray();\n for (Class pc : pca) {\n if (constrainedTo(pc)) {\n LOGGER.log(Level.CONFIG, \" Provider found: \" + pc);\n }\n }\n // Add service-defined providers to the set after application-defined\n for (Class pc : pca) {\n if (constrainedTo(pc)) {\n sp.add(new ProviderClass(pc, true));\n }\n }\n }",
"protected static boolean implementsAllIfaces(ClassInfo clazz,\n\t\t\tClassInfo[] ifaces, ClassInfo[] otherIfaces) {\n\t\tbig: for (int i = 0; i < otherIfaces.length; i++) {\n\t\t\tClassInfo iface = otherIfaces[i];\n\t\t\tif (clazz != null && iface.implementedBy(clazz))\n\t\t\t\tcontinue big;\n\t\t\tfor (int j = 0; j < ifaces.length; j++) {\n\t\t\t\tif (iface.implementedBy(ifaces[j]))\n\t\t\t\t\tcontinue big;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public static List m149887a(Class cls) {\n if (cls == null) {\n return null;\n }\n ArrayList arrayList = new ArrayList();\n while (cls != null) {\n Class[] interfaces = cls.getInterfaces();\n for (int i = 0; i < interfaces.length; i++) {\n if (!arrayList.contains(interfaces[i])) {\n arrayList.add(interfaces[i]);\n }\n for (Class cls2 : m149887a(interfaces[i])) {\n if (!arrayList.contains(cls2)) {\n arrayList.add(cls2);\n }\n }\n }\n cls = cls.getSuperclass();\n }\n return arrayList;\n }",
"Set<Class<?>> getClassSetBySuperClass(String packageName, Class<?> superClass);",
"public Set<ICommunicate> getICommunicates();",
"<T> Set<T> lookupAll(Class<T> type);",
"public Set<TestInfo> getInfoByInterfaceClass(final Class<?> contract) {\n\t\tfinal Set<TestInfo> ti = interfaceToInfoMap.get(contract);\n\t\tif (ti == null) {\n\t\t\tLOG.debug(String.format(\"Found no tests for interface %s.\", contract));\n\t\t\treturn Collections.emptySet();\n\t\t}\n\t\treturn interfaceToInfoMap.get(contract);\n\t}",
"Set<Class<?>> getClassSet(String packageName);",
"Set<Interface> getInterfacesByIp(IpAddress ip);",
"public static String[] getImplementors(Class serviceClass) {\n return getImplementors(serviceClass, null);\n }",
"private static void getInterfaceMethods(Class<?> paramClass, Map<Signature, Method> paramMap) {\n/* 127 */ Class[] arrayOfClass = paramClass.getInterfaces();\n/* 128 */ for (byte b = 0; b < arrayOfClass.length; b++) {\n/* 129 */ Class<?> clazz = arrayOfClass[b];\n/* 130 */ boolean bool = getInternalPublicMethods(clazz, paramMap);\n/* 131 */ if (!bool) {\n/* 132 */ getInterfaceMethods(clazz, paramMap);\n/* */ }\n/* */ } \n/* */ }",
"public Object[] getImplementations() {\n\t\tObject[] res = { HackProjectLearner.class };\n\t\treturn res;\n\t}",
"default List<TypeInfo> allTypes() {\n List<TypeInfo> allTypes = new LinkedList<>();\n allTypes.add(this);\n allTypes.addAll(Arrays.asList(interfaces()));\n allTypes.addAll(superClass().stream().flatMap(s -> s.allTypes().stream()).collect(Collectors.toList()));\n return allTypes;\n }",
"IInterfaceDefinition[] resolveImplementedInterfaces(ICompilerProject project);",
"public Set<JavaType.ClassJavaType> superTypes() {\n ImmutableSet.Builder<JavaType.ClassJavaType> types = ImmutableSet.builder();\n JavaType.ClassJavaType superClassType = (JavaType.ClassJavaType) this.superClass();\n types.addAll(this.interfacesOfType());\n while (superClassType != null) {\n types.add(superClassType);\n TypeJavaSymbol superClassSymbol = superClassType.getSymbol();\n types.addAll(superClassSymbol.interfacesOfType());\n superClassType = (JavaType.ClassJavaType) superClassSymbol.superClass();\n }\n return types.build();\n }",
"Set<? extends Class<? extends Annotation>> annotations();",
"public Collection<Interface> getInterfaces() {\n\t\treturn this.interfaces;\n\t}",
"@Override\n\tpublic void implements_(JDefinedClass cls) {\n\n\t}",
"public Collection getSuperclasses(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;",
"@NotNull\n List<? extends ClassInfo> getClasses();",
"public List<ClassOrInterfaceDeclaration> getInterfaces() {\n return this.clsOrInterfDeclrs;\n }",
"Set<Interface> getInterfacesByPort(ConnectPoint port);",
"public interface AllClass extends AllClassAndEnum\r\n{\r\n}",
"@Override\n public Set<Class<?>> getClasses() {\n\n Set<Class<?>> resources = new java.util.HashSet<>();\n resources.add(CountryResource.class);\n resources.add(DepartmentResource.class);\n resources.add(JobResource.class);\n return resources;\n }",
"public ClassChecker(Class<?> c) {\n cut = c;\n ifList = getAllInterfaces(cut);\n }",
"public static HashMap getInterfaces() {\n\t\treturn interfacehashmapAlreadyImpl;\r\n\t\t\r\n\t}",
"public Collection<BusinessInterfaceDescriptor<?>> getLocalBusinessInterfaces() {\n \n Set<BusinessInterfaceDescriptor<?>> localBusIntfs = new HashSet<BusinessInterfaceDescriptor<?>>();\n\n if( ejbDesc.getType().equals(EjbSessionDescriptor.TYPE) ) {\n\n EjbSessionDescriptor sessionDesc = (EjbSessionDescriptor) ejbDesc;\n Set<String> localNames = sessionDesc.getLocalBusinessClassNames();\n\n // Add superinterfaces that are also marked as Local\n Set<String> extraNames = new HashSet<String>();\n for(String local : localNames) {\n try {\n Class localClass = sessionDesc.getEjbBundleDescriptor().getClassLoader().loadClass(local);\n addIfLocal(localClass.getInterfaces(), extraNames);\n } catch(ClassNotFoundException e) {\n throw new IllegalStateException(e);\n }\n }\n\n localNames.addAll(extraNames);\n\n // Include the no-interface Local view\n if( sessionDesc.isLocalBean() ) {\n localNames.add(sessionDesc.getEjbClassName());\n }\n\n\n for(String local : localNames) {\n try {\n\n Class localClass = sessionDesc.getEjbBundleDescriptor().getClassLoader().loadClass(local);\n BusinessInterfaceDescriptor busIntfDesc =\n new BusinessInterfaceDescriptorImpl(localClass);\n localBusIntfs.add(busIntfDesc);\n\n } catch(ClassNotFoundException e) {\n throw new IllegalStateException(e);\n }\n }\n }\n \n return localBusIntfs;\n }",
"Set<Class<?>> getClassSetByAnnotation(String packageName, Class<? extends Annotation> annotationClass);",
"Set<Concept> getSuperclasses(Concept concept);",
"public static String[] getImplementors(Class serviceClass,\n ClassLoader loader) {\n return getImplementors(serviceClass.getName(), loader);\n }",
"Set<DependencyItem> getIDependOn(Class<?> type);",
"public Collection getSuperclassesOfIntersection(OWLClass[] clses, ReasonerTaskListener taskListener) throws DIGReasonerException;",
"public abstract Class<?>[] getCoClasses();",
"public static List<Class> getLocalRemoteInterfaces(Class toAnalyse) {\r\n\t\tfinal List<Class> back = new ArrayList<Class>();\r\n\t\tif (toAnalyse != null) {\r\n\t\t\tClass[] interfaces = toAnalyse.getInterfaces();\r\n\t\t\tif (interfaces != null) {\r\n\t\t\t\tfor (Class<Object> interf : interfaces) {\r\n\t\t\t\t\tif (interf.getAnnotation(Local.class) != null\r\n\t\t\t\t\t\t\t|| interf.getAnnotation(Remote.class) != null) {\r\n\t\t\t\t\t\tback.add(interf);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn back;\r\n\t}",
"public List<Class<?>> getKnownClasses();",
"private Set<ExecutableElement> getHookMethodsFromInterfaces() {\n return component\n .getInterfaces()\n .stream()\n .map(DeclaredType.class::cast)\n .map(DeclaredType::asElement)\n .map(TypeElement.class::cast)\n .flatMap(typeElement -> ElementFilter\n .methodsIn(typeElement.getEnclosedElements())\n .stream())\n .filter(method -> hasAnnotation(method, HookMethod.class))\n .peek(this::validateHookMethod)\n .collect(Collectors.toSet());\n }",
"<T> void lookupAll(Class<T> type, Collection<T> out);",
"@NotNull\n List<? extends ClassInfo> getAllClasses();",
"private boolean interfaceImplementsInterface(AClass ith) {\n\t\tEnumeration e = getImplements();\n\t\twhile (e.hasMoreElements()) {\n\t\t\tAClass i = ((Type) e.nextElement()).getRefType();\n\t\t\tif (i == ith) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (i.interfaceImplementsInterface(ith)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"Class<?>[] getProxiedInterfaces();",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[] getImplementsInterfaceArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(IMPLEMENTSINTERFACE$10, targetList);\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[] result = new com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }",
"public static Class<?>[] getAllInterfaces(Object instance) {\n Assert.notNull(instance, \"Instance must not be null\");\n\n return getAllInterfacesForClass(instance.getClass());\n }",
"Collection<? extends WrappedIndividual> getContains();",
"public static synchronized Set getDescriptorClasses() {\n\tHashSet set = new HashSet();\n\n for (Enumeration e = registryModes.elements(); e.hasMoreElements();) {\n RegistryMode mode = (RegistryMode)e.nextElement();\n\n\t set.add(mode.descriptorClass);\n\t}\n\n\treturn set;\n }",
"public interface HasClasses {\n /**\n * Returns list of classes\n *\n * @return List<? extends ClassInfo> - list of classes or empty list if none\n */\n @NotNull\n List<? extends ClassInfo> getClasses();\n\n /**\n * Returns list of all classes, including indirect descendants.\n * @return List<? extends ClassInfo> - list of classes or empty list if none\n */\n @NotNull\n List<? extends ClassInfo> getAllClasses();\n}",
"private void setInterfaces() {\n\t\tif (interfaceNames == null) {\n\t\t\treturn;\n\t\t}\n\t\tif (interfaces != null) {\n\t\t\treturn;\n\t\t}\n\t\tinterfaces = new HashMap();\n\t\tfor (int i = 0; i < interfaceNames.length; i++) {\n\t\t\tBCClass _interface =\n\t\t\t\tJavaApplication.Application.getClass(interfaceNames[i]);\n\t\t\tinterfaces.put(interfaceNames[i], _interface);\n\t\t}\n\t}",
"@Override\n public Set<Class<?>> getClasses() {\n Set<Class<?>> resources = new java.util.HashSet<>();\n resources.add(api.Auth.class);\n resources.add(api.UserApi.class);\n resources.add(api.TicketApi.class);\n resources.add(api.DepartmentApi.class);\n resources.add(api.MessageApi.class);\n resources.add(api.MilestoneApi.class);\n resources.add(api.InvitationApi.class);\n return resources;\n }",
"Collection<? extends WrappedIndividual> getHas();",
"private Set<Class<?>> describeClassTree(Class<?> inputClass) {\r\n if (inputClass == null) {\r\n return Collections.emptySet();\r\n }\r\n\r\n // create result collector\r\n Set<Class<?>> classes = Sets.newLinkedHashSet();\r\n\r\n // describe tree\r\n describeClassTree(inputClass, classes);\r\n\r\n return classes;\r\n }",
"Set<Concept> getSubclasses(Concept concept);",
"@SuppressWarnings(\"unchecked\")\n public static Stream<String> supers(ClassNode node) {\n if (node.superName == null) { // Object, no interfaces or superclass\n return Stream.empty();\n }\n return Stream.concat(\n Stream.of(node.superName),\n ((List<String>) node.interfaces).stream()\n );\n }",
"public static Iterable<String> getInterfacesImplementedByArrays() {\n return Collections.unmodifiableList(Arrays.asList(INTERFACES_IMPLEMENTED_BY_ARRAYS));\n }",
"private Map<Class<?>, InterfaceInfo> getInterfaceInfoMap() {\n\t\tif (interfaceInfoMap == null) {\n\t\t\tinterfaceInfoMap = new HashMap<Class<?>, InterfaceInfo>();\n\t\t\tfor (final Class<?> c : packageClasses) {\n\t\t\t\tif (isInterestingInterface(c)) {\n\t\t\t\t\tif (!interfaceInfoMap.containsKey(c)) {\n\t\t\t\t\t\tinterfaceInfoMap.put(c, new InterfaceInfo(c));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfinal Contract contract = c.getAnnotation(Contract.class);\n\t\t\t\t\tif (contract != null) {\n\t\t\t\t\t\tInterfaceInfo ii = interfaceInfoMap.get(contract\n\t\t\t\t\t\t\t\t.value());\n\t\t\t\t\t\tif (ii == null) {\n\t\t\t\t\t\t\tii = new InterfaceInfo(contract.value());\n\t\t\t\t\t\t\tinterfaceInfoMap.put(contract.value(), ii);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tii.add(c);\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn interfaceInfoMap;\n\t}",
"public int[] getInterfaces() {\n return interfaces;\n }",
"Set<Condition> getDeclaredInstanceInvariantConditions();",
"HashMap<String, Set<URI>> getExternalSuperClasses();",
"public interface Set<Type> {\r\n\r\n\t/**\r\n\t * Ensures that this set contains the specified item.\r\n\t * \r\n\t * @param item\r\n\t * - the item whose presence is ensured in this set\r\n\t * @return true if this set changed as a result of this method call (that\r\n\t * is, if the input item was actually inserted); otherwise, returns\r\n\t * false\r\n\t */\r\n\tpublic boolean add(Type item);\r\n\r\n\t/**\r\n\t * Ensures that this set contains all items in the specified collection.\r\n\t * \r\n\t * @param items\r\n\t * - the collection of items whose presence is ensured in this\r\n\t * set\r\n\t * @return true if this set changed as a result of this method call (that\r\n\t * is, if any item in the input collection was actually inserted);\r\n\t * otherwise, returns false\r\n\t */\r\n\tpublic boolean addAll(Collection<? extends Type> items);\r\n\r\n\t/**\r\n\t * Removes all items from this set. The set will be empty after this method\r\n\t * call.\r\n\t */\r\n\tpublic void clear();\r\n\r\n\t/**\r\n\t * Determines if there is an item in this set that is equal to the specified\r\n\t * item.\r\n\t * \r\n\t * @param item\r\n\t * - the item sought in this set\r\n\t * @return true if there is an item in this set that is equal to the input\r\n\t * item; otherwise, returns false\r\n\t */\r\n\tpublic boolean contains(Type item);\r\n\r\n\t/**\r\n\t * Determines if for each item in the specified collection, there is an item\r\n\t * in this set that is equal to it.\r\n\t * \r\n\t * @param items\r\n\t * - the collection of items sought in this set\r\n\t * @return true if for each item in the specified collection, there is an\r\n\t * item in this set that is equal to it; otherwise, returns false\r\n\t */\r\n\tpublic boolean containsAll(Collection<? extends Type> items);\r\n\r\n\t/**\r\n\t * Returns true if this set contains no items.\r\n\t */\r\n\tpublic boolean isEmpty();\r\n\r\n\t/**\r\n\t * Returns the number of items in this set.\r\n\t */\r\n\tpublic int size();\r\n}",
"public abstract List<String> scanAllClassNames();",
"private void restrictClasses() {\n\t\tSet<String> classes = classMap.keySet();\n\t\tSet<String> intersect;\n\t\tfor (String s : disjointsInfo.keySet()) {\n\t\t\tintersect = disjointsInfo.get(s);\n\t\t\tintersect.retainAll(classes);\n\t\t\tdisjointsInfo.put(s, intersect);\n\t\t}\n\t\tfor (String s : supersInfo.keySet()) {\n\t\t\tintersect = supersInfo.get(s);\n\t\t\tintersect.retainAll(classes);\n\t\t\tsupersInfo.put(s, intersect);\n\t\t}\n\t}",
"public interface Set<E> {\n\t\n\t/**\n\t * Returns true if the element is contained in the set\n\t * @param element\n\t * @return\n\t */\n\tpublic boolean contains(E element);\n\t\n\t/**\n\t * Adds the element to the set if the element is not already in the set\n\t * @param element\n\t */\n\tpublic void put(E element);\n\t\n\t/**\n\t * Returns the size of the set\n\t * @return\n\t */\n\tpublic int size();\n\t\n\t/**\n\t * Returns an iterator over all the elements in the set in an arbitrary order\n\t * @return\n\t */\n\tpublic Iterator<E> iterator();\n}",
"List<Trait> traits();",
"public Set<String> getClassKeys();",
"Set<? extends TypeContract<? super _Type_>> getSuperTypeContracts();",
"public Set<TestInfo> getAnnotatedClasses(final Set<TestInfo> testClasses, final TestInfo contractClassInfo) {\n\n\t\tCollection<Class<?>> lst = getAllInterfaces(contractClassInfo.getClassUnderTest());\n\t\tfor (Class<?> clazz : lst) {\n\t\t\ttestClasses.addAll(getInfoByInterfaceClass(clazz));\n\t\t}\n\n\t\treturn testClasses;\n\t}",
"default ImmutableSet<Class<? extends ManagedService>> getDependencies()\n\t{\n\t\treturn Sets.immutable.empty();\n\t}",
"public List getInterfaceExtensions();",
"public abstract List<AbstractNodeTypeImplementation> getImplementations();",
"public Iterator<String> listIntersectionClasses()\r\n\t{\r\n\t\treturn new ToStringIterator<String>(ONT_MODEL.listIntersectionClasses().filterDrop( new Filter() {\r\n public boolean accept( Object o ) {\r\n return ((Resource) o).isAnon();\r\n }} )\r\n );\r\n\t}"
] | [
"0.7692736",
"0.7552844",
"0.7426982",
"0.7307318",
"0.72944474",
"0.71747917",
"0.7101401",
"0.69820213",
"0.6528931",
"0.646465",
"0.642238",
"0.6377607",
"0.62701786",
"0.62278783",
"0.6174277",
"0.6124876",
"0.6046056",
"0.600338",
"0.5991671",
"0.5989901",
"0.598839",
"0.5980855",
"0.5976142",
"0.5973768",
"0.59245294",
"0.59120667",
"0.5895821",
"0.58797234",
"0.5871241",
"0.5871104",
"0.5856144",
"0.5828747",
"0.5804306",
"0.58016014",
"0.5786812",
"0.5784116",
"0.57780576",
"0.57675344",
"0.5754911",
"0.5747839",
"0.571522",
"0.57103187",
"0.57067126",
"0.5685475",
"0.5677283",
"0.5665411",
"0.56603485",
"0.56332576",
"0.5632625",
"0.56102735",
"0.5589017",
"0.55862683",
"0.55772036",
"0.5574009",
"0.5572194",
"0.55366284",
"0.5523271",
"0.55214673",
"0.55194163",
"0.55143607",
"0.5498426",
"0.54828143",
"0.5469184",
"0.5463043",
"0.54568386",
"0.5444453",
"0.54408956",
"0.54345614",
"0.542601",
"0.5420124",
"0.538914",
"0.53862846",
"0.53833675",
"0.5365986",
"0.5365412",
"0.53600734",
"0.53552073",
"0.5346458",
"0.5331913",
"0.53314745",
"0.53122216",
"0.53114027",
"0.53113514",
"0.53058887",
"0.5285274",
"0.52708465",
"0.52677965",
"0.5264893",
"0.52487737",
"0.5238006",
"0.5228392",
"0.522489",
"0.5202693",
"0.51916295",
"0.5181174",
"0.518007",
"0.51791155",
"0.5176583",
"0.51594085",
"0.5154307"
] | 0.72408867 | 5 |
return all interfaces that the given class implements as set, include ones implements by supper class | public static Set<Class<?>> getAllInterfacesForClassAsSet(Class<?> clazz) {
return getAllInterfacesForClassAsSet(clazz, null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Set<Interface> getInterfaces();",
"@SuppressWarnings(\"rawtypes\")\n public static Set<Class> getAllInterfacesForClassAsSet(Class clazz, ClassLoader classLoader) {\n Preconditions.checkNotNull(clazz, \"Class must not be null\");\n if (clazz.isInterface() && isVisible(clazz, classLoader)) {\n return Collections.singleton(clazz);\n }\n Set<Class> interfaces = new LinkedHashSet<>();\n Class sclazz = clazz;\n while (sclazz != null) {\n Class<?>[] ifcs = sclazz.getInterfaces();\n for (Class<?> ifc : ifcs) {\n interfaces.addAll(getAllInterfacesForClassAsSet(ifc, classLoader));\n }\n sclazz = clazz.getSuperclass();\n }\n return interfaces;\n }",
"public static Set findAllImplementedInterfaces(Class clazz) {\n Set s = new HashSet();\n Class[] interfaces = clazz.getInterfaces();\n for (int i = 0; i < interfaces.length; i++) {\n s.add(interfaces[i]);\n }\n Class superclass = clazz.getSuperclass();\n if (superclass != null) {\n s.addAll(findAllImplementedInterfaces(superclass));\n }\n return s;\n }",
"public static Set<Class<?>> getInterfaceClosure(Class<?> clazz) {\n Set<Class<?>> result = new HashSet<>();\n for (Class<?> classToDiscover = clazz; classToDiscover != null; classToDiscover = classToDiscover.getSuperclass()) {\n addInterfaces(classToDiscover, result);\n }\n return result;\n }",
"public static Set<Class<?>> getAllInterfacesForClassAsSet(\n Class<?> clazz, @Nullable ClassLoader classLoader) {\n Assert.notNull(clazz, \"Class must not be null\");\n\n if (clazz.isInterface() && isVisible(clazz, classLoader)) {\n return Collections.singleton(clazz);\n }\n\n Set<Class<?>> interfaces = new LinkedHashSet<>();\n Class<?> currentClass = clazz;\n\n while (currentClass != null) {\n Class<?>[] interfaceArray = currentClass.getInterfaces();\n for (Class<?> cl : interfaceArray) {\n if (isVisible(cl, classLoader)) {\n interfaces.add(cl);\n }\n }\n currentClass = currentClass.getSuperclass();\n }\n\n return interfaces;\n }",
"public Set<Class<?>> getAllInterfaces(Class<?> clazz) {\n\t\tSet<Class<?>> result = new HashSet<Class<?>>();\n\t\tgetAllInterfaces(result, clazz);\n\t\treturn result;\n\t}",
"public Collection<ClassTranslator> getInterfaces();",
"public static Set<Class<?>> getAllInterfacesAsSet(Object instance) {\n Assert.notNull(instance, \"Instance must not be null\");\n\n return getAllInterfacesForClassAsSet(instance.getClass());\n }",
"private static Class<?>[] getAllInterfacesForClass(\n Class<?> clazz, @Nullable ClassLoader classLoader) {\n return toClassArray(getAllInterfacesForClassAsSet(clazz, classLoader));\n }",
"public static Class<?>[] getAllInterfacesForClass(Class<?> clazz, ClassLoader classLoader) {\n Set<Class> ifcs = getAllInterfacesForClassAsSet(clazz, classLoader);\n return ifcs.toArray(new Class[ifcs.size()]);\n }",
"private static Class<?>[] getAllInterfacesForClass(Class<?> clazz) {\n return getAllInterfacesForClass(clazz, null);\n }",
"public Set<Class<?>> getUntestedInterfaces() {\n\t\tfinal Set<Class<?>> retval = new TreeSet<Class<?>>(\n\t\t\t\tCLASS_NAME_COMPARATOR);\n\n\t\tfor (final InterfaceInfo info : getInterfaceInfoMap().values()) {\n\t\t\t// no test and has methods\n\t\t\tif (info.getTests().isEmpty() && info.getName().getDeclaredMethods().length > 0) {\n\t\t\t\tretval.add(info.getName());\n\t\t\t}\n\t\t}\n\t\treturn retval;\n\t}",
"@SuppressWarnings(\"rawtypes\")\n\tpublic List getInterfaces(){\n\t\treturn targetClass.interfaces;\n\t}",
"private void getAllInterfaces(Class theClass, Map hInterfaces) {\r\n\t\tClass[] interfaces = theClass.getInterfaces();\r\n\t\tfor (int i = 0; i < interfaces.length; i++) {\r\n\t\t\thInterfaces.put(interfaces[i].getName(), interfaces[i]);\r\n\t\t\tgetAllInterfaces(interfaces[i], hInterfaces);\r\n\t\t}\r\n\t}",
"<T> IList<T> getImplementingObjects(Class<T> interfaceType);",
"@Override\n public List<AlgorithmClass> getAllImplementations() {\n return Arrays.asList(mAllImplementations);\n }",
"public Set<Class<?>> getScanClasses();",
"private static HashSet<Class<?>> getInstrumentedAncestors(Class<?> cls) {\n HashSet<Class<?>> ancestors = new HashSet<>();\n\n for (Method m : cls.getDeclaredMethods()) {\n if (m.getName().startsWith(\"yGet_\")) {\n ancestors.add(cls);\n // If the current class is instrumented, check for its super classes.\n ancestors.addAll(getInstrumentedAncestors(cls.getSuperclass()));\n return ancestors;\n }\n }\n\n return ancestors;\n }",
"private boolean classImplementsInterface(Class theClass,\r\n\t\t\tClass theInterface) {\r\n\t\tHashMap mapInterfaces = new HashMap();\r\n\t\tString strKey = null;\r\n\t\t// pass in the map by reference since the method is recursive\r\n\t\tgetAllInterfaces(theClass, mapInterfaces);\r\n\t\tIterator iterInterfaces = mapInterfaces.keySet().iterator();\r\n\t\twhile (iterInterfaces.hasNext()) {\r\n\t\t\tstrKey = (String) iterInterfaces.next();\r\n\t\t\tif (mapInterfaces.get(strKey) == theInterface) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public static Set<Class<?>> getClassSetFromAnnotation(Class clazz) {\n Set<Class<?>> classSet = new HashSet<>();\n for (Class<?> cls : CLASS_SET) {\n if (cls.isAnnotationPresent(clazz)) {\n classSet.add(cls);\n }\n }\n return classSet;\n }",
"@Override\n public Set<Class<?>> getClasses() {\n HashSet h = new HashSet<Class<?>>();\n h.add(AffirmationService.class );\n return h;\n }",
"String getInterfaces();",
"public Class<?>[] getAllInterfaces(Class<?> aClass) {\n\t\tList<Class<?>> result = new ArrayList<Class<?>>();\n\t\tthis.getAllInterfaces(aClass, result);\n\t\tClass<?> types[] = new Class[0];\n\t\treturn result.toArray(types);\n\t}",
"TypeInfo[] interfaces();",
"Set<Interface> getMatchingInterfaces(IpAddress ip);",
"public String[] getInterfaces() {\n return m_classBuilder.getInterfaces();\n }",
"public Enumeration getImplements()\n {\n ensureLoaded();\n return m_tblInterface.keys();\n }",
"public static Class<?>[] getAllInterfacesForClass(Class<?> clazz) {\n return getAllInterfacesForClass(clazz, null);\n }",
"ISet<Class<?>> collectAllTypeWiredServices();",
"private Set<String> classSet(String whichClass) {\n return subclasses.get(whichClass);\n }",
"public ArrayList<InterfaceType> getAllInterfaces() {\n HashSet<InterfaceType> set = new HashSet<>();\n ArrayList<InterfaceType> list = new ArrayList<>();\n\n for (InterfaceType interfaceType : getInterfaces()) {\n for (InterfaceType type : interfaceType.getAllInterfaces()) {\n if (set.add(type)) list.add(type);\n }\n }\n\n return list;\n }",
"@Override\n public List<JavaType> getInterfaces() {\n return ImmutableList.of();\n }",
"private void getServiceClasses(Class<?> service, Set<ProviderClass> sp) {\n LOGGER.log(Level.CONFIG, \"Searching for providers that implement: \" + service);\n Class<?>[] pca = ServiceFinder.find(service, true).toClassArray();\n for (Class pc : pca) {\n if (constrainedTo(pc)) {\n LOGGER.log(Level.CONFIG, \" Provider found: \" + pc);\n }\n }\n // Add service-defined providers to the set after application-defined\n for (Class pc : pca) {\n if (constrainedTo(pc)) {\n sp.add(new ProviderClass(pc, true));\n }\n }\n }",
"protected static boolean implementsAllIfaces(ClassInfo clazz,\n\t\t\tClassInfo[] ifaces, ClassInfo[] otherIfaces) {\n\t\tbig: for (int i = 0; i < otherIfaces.length; i++) {\n\t\t\tClassInfo iface = otherIfaces[i];\n\t\t\tif (clazz != null && iface.implementedBy(clazz))\n\t\t\t\tcontinue big;\n\t\t\tfor (int j = 0; j < ifaces.length; j++) {\n\t\t\t\tif (iface.implementedBy(ifaces[j]))\n\t\t\t\t\tcontinue big;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public static List m149887a(Class cls) {\n if (cls == null) {\n return null;\n }\n ArrayList arrayList = new ArrayList();\n while (cls != null) {\n Class[] interfaces = cls.getInterfaces();\n for (int i = 0; i < interfaces.length; i++) {\n if (!arrayList.contains(interfaces[i])) {\n arrayList.add(interfaces[i]);\n }\n for (Class cls2 : m149887a(interfaces[i])) {\n if (!arrayList.contains(cls2)) {\n arrayList.add(cls2);\n }\n }\n }\n cls = cls.getSuperclass();\n }\n return arrayList;\n }",
"Set<Class<?>> getClassSetBySuperClass(String packageName, Class<?> superClass);",
"public Set<ICommunicate> getICommunicates();",
"<T> Set<T> lookupAll(Class<T> type);",
"public Set<TestInfo> getInfoByInterfaceClass(final Class<?> contract) {\n\t\tfinal Set<TestInfo> ti = interfaceToInfoMap.get(contract);\n\t\tif (ti == null) {\n\t\t\tLOG.debug(String.format(\"Found no tests for interface %s.\", contract));\n\t\t\treturn Collections.emptySet();\n\t\t}\n\t\treturn interfaceToInfoMap.get(contract);\n\t}",
"Set<Class<?>> getClassSet(String packageName);",
"Set<Interface> getInterfacesByIp(IpAddress ip);",
"public static String[] getImplementors(Class serviceClass) {\n return getImplementors(serviceClass, null);\n }",
"private static void getInterfaceMethods(Class<?> paramClass, Map<Signature, Method> paramMap) {\n/* 127 */ Class[] arrayOfClass = paramClass.getInterfaces();\n/* 128 */ for (byte b = 0; b < arrayOfClass.length; b++) {\n/* 129 */ Class<?> clazz = arrayOfClass[b];\n/* 130 */ boolean bool = getInternalPublicMethods(clazz, paramMap);\n/* 131 */ if (!bool) {\n/* 132 */ getInterfaceMethods(clazz, paramMap);\n/* */ }\n/* */ } \n/* */ }",
"public Object[] getImplementations() {\n\t\tObject[] res = { HackProjectLearner.class };\n\t\treturn res;\n\t}",
"default List<TypeInfo> allTypes() {\n List<TypeInfo> allTypes = new LinkedList<>();\n allTypes.add(this);\n allTypes.addAll(Arrays.asList(interfaces()));\n allTypes.addAll(superClass().stream().flatMap(s -> s.allTypes().stream()).collect(Collectors.toList()));\n return allTypes;\n }",
"IInterfaceDefinition[] resolveImplementedInterfaces(ICompilerProject project);",
"public Set<JavaType.ClassJavaType> superTypes() {\n ImmutableSet.Builder<JavaType.ClassJavaType> types = ImmutableSet.builder();\n JavaType.ClassJavaType superClassType = (JavaType.ClassJavaType) this.superClass();\n types.addAll(this.interfacesOfType());\n while (superClassType != null) {\n types.add(superClassType);\n TypeJavaSymbol superClassSymbol = superClassType.getSymbol();\n types.addAll(superClassSymbol.interfacesOfType());\n superClassType = (JavaType.ClassJavaType) superClassSymbol.superClass();\n }\n return types.build();\n }",
"Set<? extends Class<? extends Annotation>> annotations();",
"public Collection<Interface> getInterfaces() {\n\t\treturn this.interfaces;\n\t}",
"@Override\n\tpublic void implements_(JDefinedClass cls) {\n\n\t}",
"public Collection getSuperclasses(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;",
"@NotNull\n List<? extends ClassInfo> getClasses();",
"public List<ClassOrInterfaceDeclaration> getInterfaces() {\n return this.clsOrInterfDeclrs;\n }",
"Set<Interface> getInterfacesByPort(ConnectPoint port);",
"public interface AllClass extends AllClassAndEnum\r\n{\r\n}",
"@Override\n public Set<Class<?>> getClasses() {\n\n Set<Class<?>> resources = new java.util.HashSet<>();\n resources.add(CountryResource.class);\n resources.add(DepartmentResource.class);\n resources.add(JobResource.class);\n return resources;\n }",
"public ClassChecker(Class<?> c) {\n cut = c;\n ifList = getAllInterfaces(cut);\n }",
"public static HashMap getInterfaces() {\n\t\treturn interfacehashmapAlreadyImpl;\r\n\t\t\r\n\t}",
"public Collection<BusinessInterfaceDescriptor<?>> getLocalBusinessInterfaces() {\n \n Set<BusinessInterfaceDescriptor<?>> localBusIntfs = new HashSet<BusinessInterfaceDescriptor<?>>();\n\n if( ejbDesc.getType().equals(EjbSessionDescriptor.TYPE) ) {\n\n EjbSessionDescriptor sessionDesc = (EjbSessionDescriptor) ejbDesc;\n Set<String> localNames = sessionDesc.getLocalBusinessClassNames();\n\n // Add superinterfaces that are also marked as Local\n Set<String> extraNames = new HashSet<String>();\n for(String local : localNames) {\n try {\n Class localClass = sessionDesc.getEjbBundleDescriptor().getClassLoader().loadClass(local);\n addIfLocal(localClass.getInterfaces(), extraNames);\n } catch(ClassNotFoundException e) {\n throw new IllegalStateException(e);\n }\n }\n\n localNames.addAll(extraNames);\n\n // Include the no-interface Local view\n if( sessionDesc.isLocalBean() ) {\n localNames.add(sessionDesc.getEjbClassName());\n }\n\n\n for(String local : localNames) {\n try {\n\n Class localClass = sessionDesc.getEjbBundleDescriptor().getClassLoader().loadClass(local);\n BusinessInterfaceDescriptor busIntfDesc =\n new BusinessInterfaceDescriptorImpl(localClass);\n localBusIntfs.add(busIntfDesc);\n\n } catch(ClassNotFoundException e) {\n throw new IllegalStateException(e);\n }\n }\n }\n \n return localBusIntfs;\n }",
"Set<Class<?>> getClassSetByAnnotation(String packageName, Class<? extends Annotation> annotationClass);",
"Set<Concept> getSuperclasses(Concept concept);",
"public static String[] getImplementors(Class serviceClass,\n ClassLoader loader) {\n return getImplementors(serviceClass.getName(), loader);\n }",
"Set<DependencyItem> getIDependOn(Class<?> type);",
"public Collection getSuperclassesOfIntersection(OWLClass[] clses, ReasonerTaskListener taskListener) throws DIGReasonerException;",
"public abstract Class<?>[] getCoClasses();",
"public static List<Class> getLocalRemoteInterfaces(Class toAnalyse) {\r\n\t\tfinal List<Class> back = new ArrayList<Class>();\r\n\t\tif (toAnalyse != null) {\r\n\t\t\tClass[] interfaces = toAnalyse.getInterfaces();\r\n\t\t\tif (interfaces != null) {\r\n\t\t\t\tfor (Class<Object> interf : interfaces) {\r\n\t\t\t\t\tif (interf.getAnnotation(Local.class) != null\r\n\t\t\t\t\t\t\t|| interf.getAnnotation(Remote.class) != null) {\r\n\t\t\t\t\t\tback.add(interf);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn back;\r\n\t}",
"public List<Class<?>> getKnownClasses();",
"private Set<ExecutableElement> getHookMethodsFromInterfaces() {\n return component\n .getInterfaces()\n .stream()\n .map(DeclaredType.class::cast)\n .map(DeclaredType::asElement)\n .map(TypeElement.class::cast)\n .flatMap(typeElement -> ElementFilter\n .methodsIn(typeElement.getEnclosedElements())\n .stream())\n .filter(method -> hasAnnotation(method, HookMethod.class))\n .peek(this::validateHookMethod)\n .collect(Collectors.toSet());\n }",
"<T> void lookupAll(Class<T> type, Collection<T> out);",
"@NotNull\n List<? extends ClassInfo> getAllClasses();",
"private boolean interfaceImplementsInterface(AClass ith) {\n\t\tEnumeration e = getImplements();\n\t\twhile (e.hasMoreElements()) {\n\t\t\tAClass i = ((Type) e.nextElement()).getRefType();\n\t\t\tif (i == ith) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (i.interfaceImplementsInterface(ith)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"Class<?>[] getProxiedInterfaces();",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[] getImplementsInterfaceArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(IMPLEMENTSINTERFACE$10, targetList);\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[] result = new com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }",
"public static Class<?>[] getAllInterfaces(Object instance) {\n Assert.notNull(instance, \"Instance must not be null\");\n\n return getAllInterfacesForClass(instance.getClass());\n }",
"Collection<? extends WrappedIndividual> getContains();",
"public static synchronized Set getDescriptorClasses() {\n\tHashSet set = new HashSet();\n\n for (Enumeration e = registryModes.elements(); e.hasMoreElements();) {\n RegistryMode mode = (RegistryMode)e.nextElement();\n\n\t set.add(mode.descriptorClass);\n\t}\n\n\treturn set;\n }",
"public interface HasClasses {\n /**\n * Returns list of classes\n *\n * @return List<? extends ClassInfo> - list of classes or empty list if none\n */\n @NotNull\n List<? extends ClassInfo> getClasses();\n\n /**\n * Returns list of all classes, including indirect descendants.\n * @return List<? extends ClassInfo> - list of classes or empty list if none\n */\n @NotNull\n List<? extends ClassInfo> getAllClasses();\n}",
"private void setInterfaces() {\n\t\tif (interfaceNames == null) {\n\t\t\treturn;\n\t\t}\n\t\tif (interfaces != null) {\n\t\t\treturn;\n\t\t}\n\t\tinterfaces = new HashMap();\n\t\tfor (int i = 0; i < interfaceNames.length; i++) {\n\t\t\tBCClass _interface =\n\t\t\t\tJavaApplication.Application.getClass(interfaceNames[i]);\n\t\t\tinterfaces.put(interfaceNames[i], _interface);\n\t\t}\n\t}",
"@Override\n public Set<Class<?>> getClasses() {\n Set<Class<?>> resources = new java.util.HashSet<>();\n resources.add(api.Auth.class);\n resources.add(api.UserApi.class);\n resources.add(api.TicketApi.class);\n resources.add(api.DepartmentApi.class);\n resources.add(api.MessageApi.class);\n resources.add(api.MilestoneApi.class);\n resources.add(api.InvitationApi.class);\n return resources;\n }",
"Collection<? extends WrappedIndividual> getHas();",
"private Set<Class<?>> describeClassTree(Class<?> inputClass) {\r\n if (inputClass == null) {\r\n return Collections.emptySet();\r\n }\r\n\r\n // create result collector\r\n Set<Class<?>> classes = Sets.newLinkedHashSet();\r\n\r\n // describe tree\r\n describeClassTree(inputClass, classes);\r\n\r\n return classes;\r\n }",
"Set<Concept> getSubclasses(Concept concept);",
"@SuppressWarnings(\"unchecked\")\n public static Stream<String> supers(ClassNode node) {\n if (node.superName == null) { // Object, no interfaces or superclass\n return Stream.empty();\n }\n return Stream.concat(\n Stream.of(node.superName),\n ((List<String>) node.interfaces).stream()\n );\n }",
"public static Iterable<String> getInterfacesImplementedByArrays() {\n return Collections.unmodifiableList(Arrays.asList(INTERFACES_IMPLEMENTED_BY_ARRAYS));\n }",
"private Map<Class<?>, InterfaceInfo> getInterfaceInfoMap() {\n\t\tif (interfaceInfoMap == null) {\n\t\t\tinterfaceInfoMap = new HashMap<Class<?>, InterfaceInfo>();\n\t\t\tfor (final Class<?> c : packageClasses) {\n\t\t\t\tif (isInterestingInterface(c)) {\n\t\t\t\t\tif (!interfaceInfoMap.containsKey(c)) {\n\t\t\t\t\t\tinterfaceInfoMap.put(c, new InterfaceInfo(c));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfinal Contract contract = c.getAnnotation(Contract.class);\n\t\t\t\t\tif (contract != null) {\n\t\t\t\t\t\tInterfaceInfo ii = interfaceInfoMap.get(contract\n\t\t\t\t\t\t\t\t.value());\n\t\t\t\t\t\tif (ii == null) {\n\t\t\t\t\t\t\tii = new InterfaceInfo(contract.value());\n\t\t\t\t\t\t\tinterfaceInfoMap.put(contract.value(), ii);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tii.add(c);\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn interfaceInfoMap;\n\t}",
"public int[] getInterfaces() {\n return interfaces;\n }",
"Set<Condition> getDeclaredInstanceInvariantConditions();",
"HashMap<String, Set<URI>> getExternalSuperClasses();",
"public interface Set<Type> {\r\n\r\n\t/**\r\n\t * Ensures that this set contains the specified item.\r\n\t * \r\n\t * @param item\r\n\t * - the item whose presence is ensured in this set\r\n\t * @return true if this set changed as a result of this method call (that\r\n\t * is, if the input item was actually inserted); otherwise, returns\r\n\t * false\r\n\t */\r\n\tpublic boolean add(Type item);\r\n\r\n\t/**\r\n\t * Ensures that this set contains all items in the specified collection.\r\n\t * \r\n\t * @param items\r\n\t * - the collection of items whose presence is ensured in this\r\n\t * set\r\n\t * @return true if this set changed as a result of this method call (that\r\n\t * is, if any item in the input collection was actually inserted);\r\n\t * otherwise, returns false\r\n\t */\r\n\tpublic boolean addAll(Collection<? extends Type> items);\r\n\r\n\t/**\r\n\t * Removes all items from this set. The set will be empty after this method\r\n\t * call.\r\n\t */\r\n\tpublic void clear();\r\n\r\n\t/**\r\n\t * Determines if there is an item in this set that is equal to the specified\r\n\t * item.\r\n\t * \r\n\t * @param item\r\n\t * - the item sought in this set\r\n\t * @return true if there is an item in this set that is equal to the input\r\n\t * item; otherwise, returns false\r\n\t */\r\n\tpublic boolean contains(Type item);\r\n\r\n\t/**\r\n\t * Determines if for each item in the specified collection, there is an item\r\n\t * in this set that is equal to it.\r\n\t * \r\n\t * @param items\r\n\t * - the collection of items sought in this set\r\n\t * @return true if for each item in the specified collection, there is an\r\n\t * item in this set that is equal to it; otherwise, returns false\r\n\t */\r\n\tpublic boolean containsAll(Collection<? extends Type> items);\r\n\r\n\t/**\r\n\t * Returns true if this set contains no items.\r\n\t */\r\n\tpublic boolean isEmpty();\r\n\r\n\t/**\r\n\t * Returns the number of items in this set.\r\n\t */\r\n\tpublic int size();\r\n}",
"public abstract List<String> scanAllClassNames();",
"private void restrictClasses() {\n\t\tSet<String> classes = classMap.keySet();\n\t\tSet<String> intersect;\n\t\tfor (String s : disjointsInfo.keySet()) {\n\t\t\tintersect = disjointsInfo.get(s);\n\t\t\tintersect.retainAll(classes);\n\t\t\tdisjointsInfo.put(s, intersect);\n\t\t}\n\t\tfor (String s : supersInfo.keySet()) {\n\t\t\tintersect = supersInfo.get(s);\n\t\t\tintersect.retainAll(classes);\n\t\t\tsupersInfo.put(s, intersect);\n\t\t}\n\t}",
"public interface Set<E> {\n\t\n\t/**\n\t * Returns true if the element is contained in the set\n\t * @param element\n\t * @return\n\t */\n\tpublic boolean contains(E element);\n\t\n\t/**\n\t * Adds the element to the set if the element is not already in the set\n\t * @param element\n\t */\n\tpublic void put(E element);\n\t\n\t/**\n\t * Returns the size of the set\n\t * @return\n\t */\n\tpublic int size();\n\t\n\t/**\n\t * Returns an iterator over all the elements in the set in an arbitrary order\n\t * @return\n\t */\n\tpublic Iterator<E> iterator();\n}",
"List<Trait> traits();",
"public Set<String> getClassKeys();",
"Set<? extends TypeContract<? super _Type_>> getSuperTypeContracts();",
"public Set<TestInfo> getAnnotatedClasses(final Set<TestInfo> testClasses, final TestInfo contractClassInfo) {\n\n\t\tCollection<Class<?>> lst = getAllInterfaces(contractClassInfo.getClassUnderTest());\n\t\tfor (Class<?> clazz : lst) {\n\t\t\ttestClasses.addAll(getInfoByInterfaceClass(clazz));\n\t\t}\n\n\t\treturn testClasses;\n\t}",
"default ImmutableSet<Class<? extends ManagedService>> getDependencies()\n\t{\n\t\treturn Sets.immutable.empty();\n\t}",
"public List getInterfaceExtensions();",
"public abstract List<AbstractNodeTypeImplementation> getImplementations();",
"public Iterator<String> listIntersectionClasses()\r\n\t{\r\n\t\treturn new ToStringIterator<String>(ONT_MODEL.listIntersectionClasses().filterDrop( new Filter() {\r\n public boolean accept( Object o ) {\r\n return ((Resource) o).isAnon();\r\n }} )\r\n );\r\n\t}"
] | [
"0.7692736",
"0.7426982",
"0.7307318",
"0.72944474",
"0.72408867",
"0.71747917",
"0.7101401",
"0.69820213",
"0.6528931",
"0.646465",
"0.642238",
"0.6377607",
"0.62701786",
"0.62278783",
"0.6174277",
"0.6124876",
"0.6046056",
"0.600338",
"0.5991671",
"0.5989901",
"0.598839",
"0.5980855",
"0.5976142",
"0.5973768",
"0.59245294",
"0.59120667",
"0.5895821",
"0.58797234",
"0.5871241",
"0.5871104",
"0.5856144",
"0.5828747",
"0.5804306",
"0.58016014",
"0.5786812",
"0.5784116",
"0.57780576",
"0.57675344",
"0.5754911",
"0.5747839",
"0.571522",
"0.57103187",
"0.57067126",
"0.5685475",
"0.5677283",
"0.5665411",
"0.56603485",
"0.56332576",
"0.5632625",
"0.56102735",
"0.5589017",
"0.55862683",
"0.55772036",
"0.5574009",
"0.5572194",
"0.55366284",
"0.5523271",
"0.55214673",
"0.55194163",
"0.55143607",
"0.5498426",
"0.54828143",
"0.5469184",
"0.5463043",
"0.54568386",
"0.5444453",
"0.54408956",
"0.54345614",
"0.542601",
"0.5420124",
"0.538914",
"0.53862846",
"0.53833675",
"0.5365986",
"0.5365412",
"0.53600734",
"0.53552073",
"0.5346458",
"0.5331913",
"0.53314745",
"0.53122216",
"0.53114027",
"0.53113514",
"0.53058887",
"0.5285274",
"0.52708465",
"0.52677965",
"0.5264893",
"0.52487737",
"0.5238006",
"0.5228392",
"0.522489",
"0.5202693",
"0.51916295",
"0.5181174",
"0.518007",
"0.51791155",
"0.5176583",
"0.51594085",
"0.5154307"
] | 0.7552844 | 1 |
return all interfaces that the given object implements as set | public static Set<Class<?>> getAllInterfacesAsSet(Object instance) {
Assert.notNull(instance, "Instance must not be null");
return getAllInterfacesForClassAsSet(instance.getClass());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Set<Interface> getInterfaces();",
"public static Set<Class<?>> getAllInterfacesForClassAsSet(Class<?> clazz) {\n return getAllInterfacesForClassAsSet(clazz, null);\n }",
"public Collection<ClassTranslator> getInterfaces();",
"public static Set findAllImplementedInterfaces(Class clazz) {\n Set s = new HashSet();\n Class[] interfaces = clazz.getInterfaces();\n for (int i = 0; i < interfaces.length; i++) {\n s.add(interfaces[i]);\n }\n Class superclass = clazz.getSuperclass();\n if (superclass != null) {\n s.addAll(findAllImplementedInterfaces(superclass));\n }\n return s;\n }",
"<T> IList<T> getImplementingObjects(Class<T> interfaceType);",
"@SuppressWarnings(\"rawtypes\")\n public static Set<Class> getAllInterfacesForClassAsSet(Class clazz, ClassLoader classLoader) {\n Preconditions.checkNotNull(clazz, \"Class must not be null\");\n if (clazz.isInterface() && isVisible(clazz, classLoader)) {\n return Collections.singleton(clazz);\n }\n Set<Class> interfaces = new LinkedHashSet<>();\n Class sclazz = clazz;\n while (sclazz != null) {\n Class<?>[] ifcs = sclazz.getInterfaces();\n for (Class<?> ifc : ifcs) {\n interfaces.addAll(getAllInterfacesForClassAsSet(ifc, classLoader));\n }\n sclazz = clazz.getSuperclass();\n }\n return interfaces;\n }",
"TypeInfo[] interfaces();",
"public static Set<Class<?>> getInterfaceClosure(Class<?> clazz) {\n Set<Class<?>> result = new HashSet<>();\n for (Class<?> classToDiscover = clazz; classToDiscover != null; classToDiscover = classToDiscover.getSuperclass()) {\n addInterfaces(classToDiscover, result);\n }\n return result;\n }",
"public Set<Class<?>> getAllInterfaces(Class<?> clazz) {\n\t\tSet<Class<?>> result = new HashSet<Class<?>>();\n\t\tgetAllInterfaces(result, clazz);\n\t\treturn result;\n\t}",
"public static Set<Class<?>> getAllInterfacesForClassAsSet(\n Class<?> clazz, @Nullable ClassLoader classLoader) {\n Assert.notNull(clazz, \"Class must not be null\");\n\n if (clazz.isInterface() && isVisible(clazz, classLoader)) {\n return Collections.singleton(clazz);\n }\n\n Set<Class<?>> interfaces = new LinkedHashSet<>();\n Class<?> currentClass = clazz;\n\n while (currentClass != null) {\n Class<?>[] interfaceArray = currentClass.getInterfaces();\n for (Class<?> cl : interfaceArray) {\n if (isVisible(cl, classLoader)) {\n interfaces.add(cl);\n }\n }\n currentClass = currentClass.getSuperclass();\n }\n\n return interfaces;\n }",
"public Set<ICommunicate> getICommunicates();",
"String getInterfaces();",
"public Collection<Interface> getInterfaces() {\n\t\treturn this.interfaces;\n\t}",
"@SuppressWarnings(\"rawtypes\")\n\tpublic List getInterfaces(){\n\t\treturn targetClass.interfaces;\n\t}",
"public ArrayList<InterfaceType> getAllInterfaces() {\n HashSet<InterfaceType> set = new HashSet<>();\n ArrayList<InterfaceType> list = new ArrayList<>();\n\n for (InterfaceType interfaceType : getInterfaces()) {\n for (InterfaceType type : interfaceType.getAllInterfaces()) {\n if (set.add(type)) list.add(type);\n }\n }\n\n return list;\n }",
"@Override\n public List<JavaType> getInterfaces() {\n return ImmutableList.of();\n }",
"Set<Interface> getMatchingInterfaces(IpAddress ip);",
"public String[] getInterfaces() {\n return m_classBuilder.getInterfaces();\n }",
"public Set<Class<?>> getUntestedInterfaces() {\n\t\tfinal Set<Class<?>> retval = new TreeSet<Class<?>>(\n\t\t\t\tCLASS_NAME_COMPARATOR);\n\n\t\tfor (final InterfaceInfo info : getInterfaceInfoMap().values()) {\n\t\t\t// no test and has methods\n\t\t\tif (info.getTests().isEmpty() && info.getName().getDeclaredMethods().length > 0) {\n\t\t\t\tretval.add(info.getName());\n\t\t\t}\n\t\t}\n\t\treturn retval;\n\t}",
"private Set<ExecutableElement> getHookMethodsFromInterfaces() {\n return component\n .getInterfaces()\n .stream()\n .map(DeclaredType.class::cast)\n .map(DeclaredType::asElement)\n .map(TypeElement.class::cast)\n .flatMap(typeElement -> ElementFilter\n .methodsIn(typeElement.getEnclosedElements())\n .stream())\n .filter(method -> hasAnnotation(method, HookMethod.class))\n .peek(this::validateHookMethod)\n .collect(Collectors.toSet());\n }",
"public int[] getInterfaces() {\n return interfaces;\n }",
"IInterfaceDefinition[] resolveImplementedInterfaces(ICompilerProject project);",
"Set<Interface> getInterfacesByPort(ConnectPoint port);",
"Set<Interface> getInterfacesByIp(IpAddress ip);",
"public List getInterfaceExtensions();",
"public Enumeration getImplements()\n {\n ensureLoaded();\n return m_tblInterface.keys();\n }",
"Class<?>[] getProxiedInterfaces();",
"ISet<Class<?>> collectAllTypeWiredServices();",
"private static Class<?>[] getAllInterfacesForClass(Class<?> clazz) {\n return getAllInterfacesForClass(clazz, null);\n }",
"public static HashMap getInterfaces() {\n\t\treturn interfacehashmapAlreadyImpl;\r\n\t\t\r\n\t}",
"@Override\n public List<AlgorithmClass> getAllImplementations() {\n return Arrays.asList(mAllImplementations);\n }",
"public static Iterable<String> getInterfacesImplementedByArrays() {\n return Collections.unmodifiableList(Arrays.asList(INTERFACES_IMPLEMENTED_BY_ARRAYS));\n }",
"public interface ISet extends ISurfaceAnimation {\n\tTYPE getType();\n\n\tLinkedList<ISurfaceAnimation> getAnimations();\n}",
"public static Class<?>[] getAllInterfacesForClass(Class<?> clazz, ClassLoader classLoader) {\n Set<Class> ifcs = getAllInterfacesForClassAsSet(clazz, classLoader);\n return ifcs.toArray(new Class[ifcs.size()]);\n }",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[] getImplementsInterfaceArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(IMPLEMENTSINTERFACE$10, targetList);\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[] result = new com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }",
"private static Class<?>[] getAllInterfacesForClass(\n Class<?> clazz, @Nullable ClassLoader classLoader) {\n return toClassArray(getAllInterfacesForClassAsSet(clazz, classLoader));\n }",
"default List<TypeInfo> allTypes() {\n List<TypeInfo> allTypes = new LinkedList<>();\n allTypes.add(this);\n allTypes.addAll(Arrays.asList(interfaces()));\n allTypes.addAll(superClass().stream().flatMap(s -> s.allTypes().stream()).collect(Collectors.toList()));\n return allTypes;\n }",
"Set<ICapability> getAllCapabilities();",
"public List<String> getObjectsByInterface(String objectInterface) {\r\n List<String> results = new ArrayList<>();\r\n\r\n for (Entry<DBusInterface, Map<String, Map<String, Variant<?>>>> objectByPath : nwmObjectManager\r\n .GetManagedObjects().entrySet()) {\r\n if (objectByPath.getValue().containsKey(objectInterface)) {\r\n results.add(objectByPath.getKey().toString());\r\n }\r\n }\r\n return results;\r\n }",
"public interface Set<E> {\n\t\n\t/**\n\t * Returns true if the element is contained in the set\n\t * @param element\n\t * @return\n\t */\n\tpublic boolean contains(E element);\n\t\n\t/**\n\t * Adds the element to the set if the element is not already in the set\n\t * @param element\n\t */\n\tpublic void put(E element);\n\t\n\t/**\n\t * Returns the size of the set\n\t * @return\n\t */\n\tpublic int size();\n\t\n\t/**\n\t * Returns an iterator over all the elements in the set in an arbitrary order\n\t * @return\n\t */\n\tpublic Iterator<E> iterator();\n}",
"<T> Set<T> lookupAll(Class<T> type);",
"public List<ClassOrInterfaceDeclaration> getInterfaces() {\n return this.clsOrInterfDeclrs;\n }",
"private void getAllInterfaces(Class theClass, Map hInterfaces) {\r\n\t\tClass[] interfaces = theClass.getInterfaces();\r\n\t\tfor (int i = 0; i < interfaces.length; i++) {\r\n\t\t\thInterfaces.put(interfaces[i].getName(), interfaces[i]);\r\n\t\t\tgetAllInterfaces(interfaces[i], hInterfaces);\r\n\t\t}\r\n\t}",
"Set<Concept> getSuperclasses(Concept concept);",
"public interface Set<Type> {\r\n\r\n\t/**\r\n\t * Ensures that this set contains the specified item.\r\n\t * \r\n\t * @param item\r\n\t * - the item whose presence is ensured in this set\r\n\t * @return true if this set changed as a result of this method call (that\r\n\t * is, if the input item was actually inserted); otherwise, returns\r\n\t * false\r\n\t */\r\n\tpublic boolean add(Type item);\r\n\r\n\t/**\r\n\t * Ensures that this set contains all items in the specified collection.\r\n\t * \r\n\t * @param items\r\n\t * - the collection of items whose presence is ensured in this\r\n\t * set\r\n\t * @return true if this set changed as a result of this method call (that\r\n\t * is, if any item in the input collection was actually inserted);\r\n\t * otherwise, returns false\r\n\t */\r\n\tpublic boolean addAll(Collection<? extends Type> items);\r\n\r\n\t/**\r\n\t * Removes all items from this set. The set will be empty after this method\r\n\t * call.\r\n\t */\r\n\tpublic void clear();\r\n\r\n\t/**\r\n\t * Determines if there is an item in this set that is equal to the specified\r\n\t * item.\r\n\t * \r\n\t * @param item\r\n\t * - the item sought in this set\r\n\t * @return true if there is an item in this set that is equal to the input\r\n\t * item; otherwise, returns false\r\n\t */\r\n\tpublic boolean contains(Type item);\r\n\r\n\t/**\r\n\t * Determines if for each item in the specified collection, there is an item\r\n\t * in this set that is equal to it.\r\n\t * \r\n\t * @param items\r\n\t * - the collection of items sought in this set\r\n\t * @return true if for each item in the specified collection, there is an\r\n\t * item in this set that is equal to it; otherwise, returns false\r\n\t */\r\n\tpublic boolean containsAll(Collection<? extends Type> items);\r\n\r\n\t/**\r\n\t * Returns true if this set contains no items.\r\n\t */\r\n\tpublic boolean isEmpty();\r\n\r\n\t/**\r\n\t * Returns the number of items in this set.\r\n\t */\r\n\tpublic int size();\r\n}",
"Set<? extends Class<? extends Annotation>> annotations();",
"public Object[] getImplementations() {\n\t\tObject[] res = { HackProjectLearner.class };\n\t\treturn res;\n\t}",
"private void setInterfaces() {\n\t\tif (interfaceNames == null) {\n\t\t\treturn;\n\t\t}\n\t\tif (interfaces != null) {\n\t\t\treturn;\n\t\t}\n\t\tinterfaces = new HashMap();\n\t\tfor (int i = 0; i < interfaceNames.length; i++) {\n\t\t\tBCClass _interface =\n\t\t\t\tJavaApplication.Application.getClass(interfaceNames[i]);\n\t\t\tinterfaces.put(interfaceNames[i], _interface);\n\t\t}\n\t}",
"Collection<? extends WrappedIndividual> getHas();",
"public static Class<?>[] getAllInterfaces(Object instance) {\n Assert.notNull(instance, \"Instance must not be null\");\n\n return getAllInterfacesForClass(instance.getClass());\n }",
"Set<Interface> getInterfacesByVlan(VlanId vlan);",
"public Class<?>[] getAllInterfaces(Class<?> aClass) {\n\t\tList<Class<?>> result = new ArrayList<Class<?>>();\n\t\tthis.getAllInterfaces(aClass, result);\n\t\tClass<?> types[] = new Class[0];\n\t\treturn result.toArray(types);\n\t}",
"public Collection<BusinessInterfaceDescriptor<?>> getLocalBusinessInterfaces() {\n \n Set<BusinessInterfaceDescriptor<?>> localBusIntfs = new HashSet<BusinessInterfaceDescriptor<?>>();\n\n if( ejbDesc.getType().equals(EjbSessionDescriptor.TYPE) ) {\n\n EjbSessionDescriptor sessionDesc = (EjbSessionDescriptor) ejbDesc;\n Set<String> localNames = sessionDesc.getLocalBusinessClassNames();\n\n // Add superinterfaces that are also marked as Local\n Set<String> extraNames = new HashSet<String>();\n for(String local : localNames) {\n try {\n Class localClass = sessionDesc.getEjbBundleDescriptor().getClassLoader().loadClass(local);\n addIfLocal(localClass.getInterfaces(), extraNames);\n } catch(ClassNotFoundException e) {\n throw new IllegalStateException(e);\n }\n }\n\n localNames.addAll(extraNames);\n\n // Include the no-interface Local view\n if( sessionDesc.isLocalBean() ) {\n localNames.add(sessionDesc.getEjbClassName());\n }\n\n\n for(String local : localNames) {\n try {\n\n Class localClass = sessionDesc.getEjbBundleDescriptor().getClassLoader().loadClass(local);\n BusinessInterfaceDescriptor busIntfDesc =\n new BusinessInterfaceDescriptorImpl(localClass);\n localBusIntfs.add(busIntfDesc);\n\n } catch(ClassNotFoundException e) {\n throw new IllegalStateException(e);\n }\n }\n }\n \n return localBusIntfs;\n }",
"Set<X> toSet();",
"public interface INeighbor {\n public Set<Cell> getNeighbours();\n}",
"public static List<Map<String, Object>> getImplementedTypes(Map<String, Object> model) {\n @SuppressWarnings(\"unchecked\")\n List<Map<String, Object>> interfaces =\n (List<Map<String, Object>>) getRoot(model).get(ModelConstant.IMPLEMENTED_TYPES);\n return interfaces;\n }",
"Set<II> getIds();",
"public Collection getRegisteredObjects() {\n return usedByObjects;\n }",
"public static List<Class> getLocalRemoteInterfaces(Class toAnalyse) {\r\n\t\tfinal List<Class> back = new ArrayList<Class>();\r\n\t\tif (toAnalyse != null) {\r\n\t\t\tClass[] interfaces = toAnalyse.getInterfaces();\r\n\t\t\tif (interfaces != null) {\r\n\t\t\t\tfor (Class<Object> interf : interfaces) {\r\n\t\t\t\t\tif (interf.getAnnotation(Local.class) != null\r\n\t\t\t\t\t\t\t|| interf.getAnnotation(Remote.class) != null) {\r\n\t\t\t\t\t\tback.add(interf);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn back;\r\n\t}",
"public interface ISet<T> {\n\n // Maximum possible size of data structures\n int MAX_SIZE = 100;\n\n /**\n * @pre 0 <= sizeOfSet < max_size\n * @post [this will contain one of each int from both unionWith and this]\n * @param unionWith ISet to find the union from\n */\n default void union(ISet<T> unionWith) {\n T temp;\n int tsize = unionWith.getSize();\n//For every element in unionWith...\n for (int i = 0; i < tsize; i++) {\n //Store value at first position\n //Remove value from unionWith\n temp = unionWith.removePos(0);\n //If this set does not contain value from unionWith...\n if (!this.contains(temp)) {\n //Add value to this set\n this.add(temp);\n }\n }\n }\n\n /**\n * @pre 0 <= sizeOfSet < max_size\n * @post [this will contain ints from this that are not in diffWith]\n * @param diffWith ISet to find the difference from\n */\n default void difference(ISet<T> diffWith){\n T temp;\n int i = 0;\n //For every element in this set...\n while (i < this.getSize()){\n //Store value at first position\n //Remove value from this set\n temp = this.removePos(0);\n //If diffWith does not contain value from this set...\n if(!diffWith.contains(temp)){\n //Add value to this set\n this.add(temp);\n //Increment position\n i++;\n }\n }\n }\n\n /**\n * @pre 0 <= sizeOfSet < max_size\n * @post [this will contain ints from this that are also found in intWith]\n * @param intWith ISet to find the intersection from\n */\n default void intersect(ISet<T> intWith){\n T temp;\n int i = 0;\n //For every element in this set...\n while (i < this.getSize()){\n //Store value at first position\n //Remove value from this set\n temp = this.removePos(0);\n //If intWith does not contain value from this set...\n if(intWith.contains(temp)){\n //Add value to this set\n this.add(temp);\n //Increment position\n i++;\n }\n }\n\n }\n\n\n /**\n * @pre [ISet initialized]\n * @post [ISet contains same elements with a\n * new element - add - placed at the end]\n * @param add T value to be added to ISet\n */\n void add(T add);\n\n /**\n * @pre [ISet contains elements (non-NULL)] and pos >= 0\n * @post [ISet contains same elements as\n * when it was passed, without element at pos] and [T returned]\n * @param pos position in ISet to be removed\n * @return T of position where the element was removed\n */\n T removePos(int pos);\n\n /**\n * @pre [ISet contains elements (non-NULL)] and val != NULL\n * @post [ISet unmodified] and [boolean returned]\n * @param val value to be searched in ISet\n * @return true if ISet contains val, otherwise false\n */\n boolean contains(T val);\n\n /**\n * @pre [ISet initialized with constructor]\n * @post [ISet, size of ISet unmodified] and [int returned]\n * @return int value of the size of the ISet\n */\n int getSize();\n\n}",
"public RuleSetInfo[] listRegistrations() throws RemoteException, RuleException;",
"public Set<Class<?>> getScanClasses();",
"public interface Set extends TraversableCollection\r\n{\r\n\t\r\n\t/**\r\n\t *\tremove the specified item from the Set\r\n\t *\r\n\t *\treturns true if removal was successful, false otherwise\r\n\t */\r\n\tpublic boolean remove(Object obj);\r\n}",
"public Set<IS> getFreItemSet();",
"Collection<? extends WrappedIndividual> getContains();",
"public Map<String, SmartHomeHub> getCachedInterfaces();",
"public static Class<?>[] getAllInterfacesForClass(Class<?> clazz) {\n return getAllInterfacesForClass(clazz, null);\n }",
"InstrumentedType withInterfaces(TypeList.Generic interfaceTypes);",
"Set<EObject> getAllModelElements();",
"String[] getImplementedInterfacesAsDisplayStrings();",
"List<Trait> traits();",
"public abstract List<AbstractNodeTypeImplementation> getImplementations();",
"private Iterable getEntrySetFrom(final Object objeto) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {\n\t\tfinal Method entrySetMethod = objeto.getClass().getMethod(\"entrySet\");\n\n\t\tentrySetMethod.setAccessible(true);\n\t\treturn (Iterable)entrySetMethod.invoke(objeto);\n\t}",
"@Override\n\tpublic Set<OWLEntity> getAllConcepts() {\n\t\tSet<OWLEntity> result = new HashSet<OWLEntity>();\n\t\tresult.addAll(ontology.getClassesInSignature());\n\t\tresult.addAll(ontology.getIndividualsInSignature());\n\t\treturn result;\n\t}",
"@Override\n public SetInterface<T> intersection(SetInterface<T> rhs) {\n //Declare return SetInterface\n SetInterface<T> result = new ArraySet();\n //If the item is in both sets, add it to the result\n //Iterate through the calling Set\n for (int i = 0; i < numItems; i++){\n //if the item is also in RHS, add it to the result\n if(rhs.contains(arr[i]))\n result.addItem(arr[i]);\n }\n return result;\n }",
"Set<DependencyItem> getIDependOn(Class<?> type);",
"@Override\n public SetInterface<T> intersection(SetInterface<T> rhs) {\n //create the return SetInterface\n SetInterface<T> result = new LinkedSet();\n Node n = first;\n //move through the modes\n while(n != null){\n //check if the item is also in rhs\n if(rhs.contains(n.value))\n result.addItem(n.value);\n n = n.next;\n }\n return result;\n }",
"public Set<TestInfo> getInfoByInterfaceClass(final Class<?> contract) {\n\t\tfinal Set<TestInfo> ti = interfaceToInfoMap.get(contract);\n\t\tif (ti == null) {\n\t\t\tLOG.debug(String.format(\"Found no tests for interface %s.\", contract));\n\t\t\treturn Collections.emptySet();\n\t\t}\n\t\treturn interfaceToInfoMap.get(contract);\n\t}",
"public interface ValueSet {\n boolean isEmpty();\n int size();\n boolean contains(Object v);\n void add(Object v);\n void add(ValueSet s);\n Iterator<Object> iterator();\n}",
"<V extends Object> Set<V> getSet(String setName);",
"Set<Component> getComponents();",
"public interface Set {\n\n /**\n * Create an empty set.\n *\n * @return the empty set\n */\n static Set createEmpty() {\n return new EmptySet();\n }\n\n /**\n * Checks if the ASet is empty.\n *\n * @return true if the set is empty, false otherwise\n */\n boolean isEmpty();\n\n /**\n * Given an {@code Integer} {@code element} add the element to the set. If {@code element} is\n * already a member of the set, we perform no operation and return back the set intact.\n *\n * @param element the new element to add to the set\n *\n * @return a newly created set that contains {@code element} and the original elements of the set.\n */\n Set add(Integer element);\n\n /**\n * Given an {@code Integer} {@code element} returns {@code true} if the element is already in the\n * set and {@code false} otherwise.\n *\n * @param element the element to check\n *\n * @return true if {@code element} is in the set, false otherwise\n */\n Boolean contains(Integer element);\n\n /**\n * Return the size of the set.\n *\n * @return return the size of the set\n */\n Integer size();\n\n /**\n * Given an element {@code element} remove it from the this list if it exists.\n *\n * @param element the element to remove\n *\n * @return set without {@code element}\n */\n Set remove(Integer element);\n\n\n /**\n * Given a set {@code other} return a new set which is the set union between {@code this} set and\n * {@code other} set.\n *\n * @param other set to perform union\n *\n * @return set union of this and other\n */\n Set union(Set other);\n\n\n /**\n * Returns the set intersection between {@code this} and {@code otherSet}.\n *\n * @param otherSet set to perform intersection with\n *\n * @return set intersection between {@code this} and {@code otherSet}\n */\n Set intersect(Set otherSet);\n\n\n /**\n * Returns the set difference between {@code this} and {@code otherSet}.\n *\n * @param otherSet set to perform set difference with\n *\n * @return set difference between {@code this} and {@code otherSet}\n */\n Set difference(Set otherSet);\n\n\n /**\n * Returns true if {@code this} set is a subset of {@code otherSet}.\n *\n * @param otherSet the set to check against\n *\n * @return true if this is a subset of otherSet, false otherwise\n */\n Boolean subset(Set otherSet);\n\n\n}",
"public boolean allAre(ISelect s){\r\n return true; \r\n }",
"public Set<IAspect> getAspects();",
"interface PolySet<T>\n{\n boolean contains(T t);\n void add(T t); \n}",
"@Override\n public Set<Class<?>> getClasses() {\n HashSet h = new HashSet<Class<?>>();\n h.add(AffirmationService.class );\n return h;\n }",
"Set<Condition> getDeclaredInstanceInvariantConditions();",
"private Map<Class<?>, InterfaceInfo> getInterfaceInfoMap() {\n\t\tif (interfaceInfoMap == null) {\n\t\t\tinterfaceInfoMap = new HashMap<Class<?>, InterfaceInfo>();\n\t\t\tfor (final Class<?> c : packageClasses) {\n\t\t\t\tif (isInterestingInterface(c)) {\n\t\t\t\t\tif (!interfaceInfoMap.containsKey(c)) {\n\t\t\t\t\t\tinterfaceInfoMap.put(c, new InterfaceInfo(c));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfinal Contract contract = c.getAnnotation(Contract.class);\n\t\t\t\t\tif (contract != null) {\n\t\t\t\t\t\tInterfaceInfo ii = interfaceInfoMap.get(contract\n\t\t\t\t\t\t\t\t.value());\n\t\t\t\t\t\tif (ii == null) {\n\t\t\t\t\t\t\tii = new InterfaceInfo(contract.value());\n\t\t\t\t\t\t\tinterfaceInfoMap.put(contract.value(), ii);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tii.add(c);\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn interfaceInfoMap;\n\t}",
"protected static boolean implementsAllIfaces(ClassInfo clazz,\n\t\t\tClassInfo[] ifaces, ClassInfo[] otherIfaces) {\n\t\tbig: for (int i = 0; i < otherIfaces.length; i++) {\n\t\t\tClassInfo iface = otherIfaces[i];\n\t\t\tif (clazz != null && iface.implementedBy(clazz))\n\t\t\t\tcontinue big;\n\t\t\tfor (int j = 0; j < ifaces.length; j++) {\n\t\t\t\tif (iface.implementedBy(ifaces[j]))\n\t\t\t\t\tcontinue big;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private static void getInterfaceMethods(Class<?> paramClass, Map<Signature, Method> paramMap) {\n/* 127 */ Class[] arrayOfClass = paramClass.getInterfaces();\n/* 128 */ for (byte b = 0; b < arrayOfClass.length; b++) {\n/* 129 */ Class<?> clazz = arrayOfClass[b];\n/* 130 */ boolean bool = getInternalPublicMethods(clazz, paramMap);\n/* 131 */ if (!bool) {\n/* 132 */ getInterfaceMethods(clazz, paramMap);\n/* */ }\n/* */ } \n/* */ }",
"Collection<NetworkInterface> getAllNetworkInterfaces();",
"public static Set<Class<?>> getClassSetFromAnnotation(Class clazz) {\n Set<Class<?>> classSet = new HashSet<>();\n for (Class<?> cls : CLASS_SET) {\n if (cls.isAnnotationPresent(clazz)) {\n classSet.add(cls);\n }\n }\n return classSet;\n }",
"public void setInterfaces(String[] interfaces)\n {\n this.interfaces = interfaces;\n }",
"Map<ParameterInstance, SetType> getInstanceSetTypes();",
"public Set<Filterable> getSelections();",
"public Vector<Class<? extends MoteInterface>> getMoteInterfaces() {\n return moteInterfaces;\n }",
"public Set<OntologyScope> getRegisteredScopes();",
"protected IResolvedTypes getResolvedTypes(EObject obj) {\n\t\treturn this.typeResolver.resolveTypes(obj);\n\t}",
"interface a {\n Object a();\n\n boolean b();\n\n List<Object> c();\n}",
"Set<Class<?>> getClassSet(String packageName);"
] | [
"0.83224314",
"0.70968217",
"0.6943048",
"0.673233",
"0.6638754",
"0.6530715",
"0.6467455",
"0.6460996",
"0.6459037",
"0.6385006",
"0.62793636",
"0.6277159",
"0.62516505",
"0.62215805",
"0.6152734",
"0.6131999",
"0.60849476",
"0.5990392",
"0.5978641",
"0.5904133",
"0.58844966",
"0.58691746",
"0.5868556",
"0.58509827",
"0.5809725",
"0.57948834",
"0.5786938",
"0.5772187",
"0.57697684",
"0.57183206",
"0.5717787",
"0.5714695",
"0.56977123",
"0.5675103",
"0.56341165",
"0.56158936",
"0.56043494",
"0.5532708",
"0.55257416",
"0.55195904",
"0.5516245",
"0.55144393",
"0.551182",
"0.5499115",
"0.54953015",
"0.5493041",
"0.5460238",
"0.5440313",
"0.5432903",
"0.5419409",
"0.5392842",
"0.5379916",
"0.5377725",
"0.5376801",
"0.5346948",
"0.5322847",
"0.5320778",
"0.5318473",
"0.5296593",
"0.5290876",
"0.5281294",
"0.5278591",
"0.5272389",
"0.5249613",
"0.5248265",
"0.52436876",
"0.52423793",
"0.52411664",
"0.5231272",
"0.5230905",
"0.5213088",
"0.5201228",
"0.5172115",
"0.51697725",
"0.5167714",
"0.51621026",
"0.5141416",
"0.51283115",
"0.5125526",
"0.51209867",
"0.51173437",
"0.511706",
"0.5113809",
"0.51091504",
"0.5097789",
"0.50904655",
"0.50856537",
"0.5077564",
"0.50767505",
"0.50563157",
"0.5034031",
"0.50252515",
"0.50128144",
"0.5009213",
"0.5007355",
"0.5003167",
"0.5001251",
"0.4994228",
"0.49931931",
"0.4987735"
] | 0.71449786 | 1 |
return all interfaces that the given object implements as array | public static Class<?>[] getAllInterfaces(Object instance) {
Assert.notNull(instance, "Instance must not be null");
return getAllInterfacesForClass(instance.getClass());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"TypeInfo[] interfaces();",
"Set<Interface> getInterfaces();",
"<T> IList<T> getImplementingObjects(Class<T> interfaceType);",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[] getImplementsInterfaceArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(IMPLEMENTSINTERFACE$10, targetList);\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[] result = new com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }",
"String getInterfaces();",
"public Collection<ClassTranslator> getInterfaces();",
"public static Iterable<String> getInterfacesImplementedByArrays() {\n return Collections.unmodifiableList(Arrays.asList(INTERFACES_IMPLEMENTED_BY_ARRAYS));\n }",
"public int[] getInterfaces() {\n return interfaces;\n }",
"public String[] getInterfaces() {\n return m_classBuilder.getInterfaces();\n }",
"@SuppressWarnings(\"rawtypes\")\n\tpublic List getInterfaces(){\n\t\treturn targetClass.interfaces;\n\t}",
"private static Class<?>[] getAllInterfacesForClass(Class<?> clazz) {\n return getAllInterfacesForClass(clazz, null);\n }",
"public List getInterfaceExtensions();",
"Class<?>[] getProxiedInterfaces();",
"public Class<?>[] getAllInterfaces(Class<?> aClass) {\n\t\tList<Class<?>> result = new ArrayList<Class<?>>();\n\t\tthis.getAllInterfaces(aClass, result);\n\t\tClass<?> types[] = new Class[0];\n\t\treturn result.toArray(types);\n\t}",
"private static Class<?>[] getAllInterfacesForClass(\n Class<?> clazz, @Nullable ClassLoader classLoader) {\n return toClassArray(getAllInterfacesForClassAsSet(clazz, classLoader));\n }",
"@Override\n public List<JavaType> getInterfaces() {\n return ImmutableList.of();\n }",
"IInterfaceDefinition[] resolveImplementedInterfaces(ICompilerProject project);",
"public Interface[] getInterfaces(final String name) {\n final Outage out = getOutage(name);\n if (out == null) return null;\n return out.getInterface();\n }",
"public static Class<?>[] getAllInterfacesForClass(Class<?> clazz, ClassLoader classLoader) {\n Set<Class> ifcs = getAllInterfacesForClassAsSet(clazz, classLoader);\n return ifcs.toArray(new Class[ifcs.size()]);\n }",
"String[] getImplementedInterfacesAsDisplayStrings();",
"char[][] getInterfaceNames();",
"public Collection<Interface> getInterfaces() {\n\t\treturn this.interfaces;\n\t}",
"public Object[] getImplementations() {\n\t\tObject[] res = { HackProjectLearner.class };\n\t\treturn res;\n\t}",
"public ArrayList<InterfaceType> getAllInterfaces() {\n HashSet<InterfaceType> set = new HashSet<>();\n ArrayList<InterfaceType> list = new ArrayList<>();\n\n for (InterfaceType interfaceType : getInterfaces()) {\n for (InterfaceType type : interfaceType.getAllInterfaces()) {\n if (set.add(type)) list.add(type);\n }\n }\n\n return list;\n }",
"public static Class<?>[] getAllInterfacesForClass(Class<?> clazz) {\n return getAllInterfacesForClass(clazz, null);\n }",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface getImplementsInterfaceArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface target = null;\r\n target = (com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface)get_store().find_element_user(IMPLEMENTSINTERFACE$10, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }",
"Set<Interface> getMatchingInterfaces(IpAddress ip);",
"public static Set<Class<?>> getAllInterfacesAsSet(Object instance) {\n Assert.notNull(instance, \"Instance must not be null\");\n\n return getAllInterfacesForClassAsSet(instance.getClass());\n }",
"public static Set<Class<?>> getInterfaceClosure(Class<?> clazz) {\n Set<Class<?>> result = new HashSet<>();\n for (Class<?> classToDiscover = clazz; classToDiscover != null; classToDiscover = classToDiscover.getSuperclass()) {\n addInterfaces(classToDiscover, result);\n }\n return result;\n }",
"public List<String> getObjectsByInterface(String objectInterface) {\r\n List<String> results = new ArrayList<>();\r\n\r\n for (Entry<DBusInterface, Map<String, Map<String, Variant<?>>>> objectByPath : nwmObjectManager\r\n .GetManagedObjects().entrySet()) {\r\n if (objectByPath.getValue().containsKey(objectInterface)) {\r\n results.add(objectByPath.getKey().toString());\r\n }\r\n }\r\n return results;\r\n }",
"@Override\n public List<AlgorithmClass> getAllImplementations() {\n return Arrays.asList(mAllImplementations);\n }",
"public List<ClassOrInterfaceDeclaration> getInterfaces() {\n return this.clsOrInterfDeclrs;\n }",
"private Object[] getNetInterfaces(final HostBrowser hostBrowser) {\n final List<Object> list = new ArrayList<Object>();\n \n list.add(null);\n final Enumeration e = hostBrowser.getNetInterfacesNode().children();\n \n while (e.hasMoreElements()) {\n final Info i =\n (Info) ((DefaultMutableTreeNode) e.nextElement()).getUserObject();\n list.add(i);\n }\n return list.toArray(new Object[list.size()]);\n }",
"public static List<Class> getLocalRemoteInterfaces(Class toAnalyse) {\r\n\t\tfinal List<Class> back = new ArrayList<Class>();\r\n\t\tif (toAnalyse != null) {\r\n\t\t\tClass[] interfaces = toAnalyse.getInterfaces();\r\n\t\t\tif (interfaces != null) {\r\n\t\t\t\tfor (Class<Object> interf : interfaces) {\r\n\t\t\t\t\tif (interf.getAnnotation(Local.class) != null\r\n\t\t\t\t\t\t\t|| interf.getAnnotation(Remote.class) != null) {\r\n\t\t\t\t\t\tback.add(interf);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn back;\r\n\t}",
"static private void\n ifaces(final Class<?> type, final ArrayBuilder<String> r) {\n if (type == Serializable.class) { return; }\n if (Modifier.isPublic(type.getModifiers())) {\n try { r.append(Reflection.getName(type).replace('$', '-')); }\n catch (final Exception e) {}\n }\n for (final Class<?> i : type.getInterfaces()) { ifaces(i, r); }\n }",
"public Set<Class<?>> getAllInterfaces(Class<?> clazz) {\n\t\tSet<Class<?>> result = new HashSet<Class<?>>();\n\t\tgetAllInterfaces(result, clazz);\n\t\treturn result;\n\t}",
"Set<Interface> getInterfacesByIp(IpAddress ip);",
"public Enumeration getImplements()\n {\n ensureLoaded();\n return m_tblInterface.keys();\n }",
"public static List m149887a(Class cls) {\n if (cls == null) {\n return null;\n }\n ArrayList arrayList = new ArrayList();\n while (cls != null) {\n Class[] interfaces = cls.getInterfaces();\n for (int i = 0; i < interfaces.length; i++) {\n if (!arrayList.contains(interfaces[i])) {\n arrayList.add(interfaces[i]);\n }\n for (Class cls2 : m149887a(interfaces[i])) {\n if (!arrayList.contains(cls2)) {\n arrayList.add(cls2);\n }\n }\n }\n cls = cls.getSuperclass();\n }\n return arrayList;\n }",
"private Set<ExecutableElement> getHookMethodsFromInterfaces() {\n return component\n .getInterfaces()\n .stream()\n .map(DeclaredType.class::cast)\n .map(DeclaredType::asElement)\n .map(TypeElement.class::cast)\n .flatMap(typeElement -> ElementFilter\n .methodsIn(typeElement.getEnclosedElements())\n .stream())\n .filter(method -> hasAnnotation(method, HookMethod.class))\n .peek(this::validateHookMethod)\n .collect(Collectors.toSet());\n }",
"public abstract Class<?>[] getCoClasses();",
"private void getAllInterfaces(Class theClass, Map hInterfaces) {\r\n\t\tClass[] interfaces = theClass.getInterfaces();\r\n\t\tfor (int i = 0; i < interfaces.length; i++) {\r\n\t\t\thInterfaces.put(interfaces[i].getName(), interfaces[i]);\r\n\t\t\tgetAllInterfaces(interfaces[i], hInterfaces);\r\n\t\t}\r\n\t}",
"public static Set findAllImplementedInterfaces(Class clazz) {\n Set s = new HashSet();\n Class[] interfaces = clazz.getInterfaces();\n for (int i = 0; i < interfaces.length; i++) {\n s.add(interfaces[i]);\n }\n Class superclass = clazz.getSuperclass();\n if (superclass != null) {\n s.addAll(findAllImplementedInterfaces(superclass));\n }\n return s;\n }",
"InstrumentedType withInterfaces(TypeList.Generic interfaceTypes);",
"public List<InterfaceBean> readInterface() {\n\t\tlog.info(\"## readInterface() : \");\n\t\treturn sqlSelectForList(\"com.lgcns.ikep4.workflow.engine.model.InterfaceBean.readInterface\");\n\t}",
"static private PowerlessArray<String>\n types(final Class<?> actual) {\n final Class<?> end =\n Struct.class.isAssignableFrom(actual) ? Struct.class : Object.class;\n final PowerlessArray.Builder<String> r = PowerlessArray.builder(4);\n for (Class<?> i=actual; end!=i; i=i.getSuperclass()) { ifaces(i, r); }\n return r.snapshot();\n }",
"Object[] toArray();",
"Object[] toArray();",
"Object[] toArray();",
"Set<Interface> getInterfacesByPort(ConnectPoint port);",
"default List<TypeInfo> allTypes() {\n List<TypeInfo> allTypes = new LinkedList<>();\n allTypes.add(this);\n allTypes.addAll(Arrays.asList(interfaces()));\n allTypes.addAll(superClass().stream().flatMap(s -> s.allTypes().stream()).collect(Collectors.toList()));\n return allTypes;\n }",
"public IEventType<T>[] getSuperTypes();",
"List<Trait> traits();",
"protected abstract Object[] getComponents();",
"public boolean isArray();",
"public com.guidewire.datamodel.ImplementsEntityDocument.ImplementsEntity[] getImplementsEntityArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(IMPLEMENTSENTITY$8, targetList);\r\n com.guidewire.datamodel.ImplementsEntityDocument.ImplementsEntity[] result = new com.guidewire.datamodel.ImplementsEntityDocument.ImplementsEntity[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }",
"private static Method[] retrieveAllMethods(final Object object) {\r\n\t\tMethod[] methodsArray = null;\r\n\r\n\t\t// - Retrieve methods array from cache if exists.\r\n\t\tif (KerAnnotation.methodsCache.containsKey(object.getClass())) {\r\n\t\t\tmethodsArray = KerAnnotation.methodsCache.get(object.getClass());\r\n\t\t}\r\n\t\t// - Else get methods and cache them.\r\n\t\telse {\r\n\t\t\t// - Aggregate all annotated methods (declared, inherited, etc.).\r\n\t\t\tfinal Set<Method> methods = new HashSet<Method>();\r\n\r\n\t\t\tfor (final Method method : object.getClass().getMethods()) {\r\n\t\t\t\tif (method.getAnnotations().length > 0) {\r\n\t\t\t\t\tmethods.add(method);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (final Method method : object.getClass().getDeclaredMethods()) {\r\n\t\t\t\tif (method.getAnnotations().length > 0) {\r\n\t\t\t\t\tmethods.add(method);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// - Convert set to array.\r\n\t\t\tmethodsArray = methods.toArray(new Method[0]);\r\n\r\n\t\t\t// - Cache array.\r\n\t\t\tKerAnnotation.methodsCache.put(object.getClass(), methodsArray);\r\n\t\t}\r\n\r\n\t\treturn methodsArray;\r\n\t}",
"public static List<Map<String, Object>> getImplementedTypes(Map<String, Object> model) {\n @SuppressWarnings(\"unchecked\")\n List<Map<String, Object>> interfaces =\n (List<Map<String, Object>>) getRoot(model).get(ModelConstant.IMPLEMENTED_TYPES);\n return interfaces;\n }",
"Collection<NetworkInterface> getAllNetworkInterfaces();",
"private void readInterfaces() throws IOException, ClassFormatException {\n final int interfaces_count = dataInputStream.readUnsignedShort();\n interfaces = new int[interfaces_count];\n for (int i = 0; i < interfaces_count; i++) {\n interfaces[i] = dataInputStream.readUnsignedShort();\n }\n }",
"interface a {\n Object a();\n\n boolean b();\n\n List<Object> c();\n}",
"public interface IConnect4 {\n\n public List<Agent> getAgents();\n\n public IBoard getBoard();\n\n}",
"private static void getInterfaceMethods(Class<?> paramClass, Map<Signature, Method> paramMap) {\n/* 127 */ Class[] arrayOfClass = paramClass.getInterfaces();\n/* 128 */ for (byte b = 0; b < arrayOfClass.length; b++) {\n/* 129 */ Class<?> clazz = arrayOfClass[b];\n/* 130 */ boolean bool = getInternalPublicMethods(clazz, paramMap);\n/* 131 */ if (!bool) {\n/* 132 */ getInterfaceMethods(clazz, paramMap);\n/* */ }\n/* */ } \n/* */ }",
"public static Set<Class<?>> getAllInterfacesForClassAsSet(Class<?> clazz) {\n return getAllInterfacesForClassAsSet(clazz, null);\n }",
"IEvent[] getEvents();",
"public static HashMap getInterfaces() {\n\t\treturn interfacehashmapAlreadyImpl;\r\n\t\t\r\n\t}",
"public boolean isInterface();",
"public BoardInterface[] getBoards();",
"public void setInterfaces(String[] interfaces)\n {\n this.interfaces = interfaces;\n }",
"@SuppressWarnings(\"rawtypes\")\n public static Set<Class> getAllInterfacesForClassAsSet(Class clazz, ClassLoader classLoader) {\n Preconditions.checkNotNull(clazz, \"Class must not be null\");\n if (clazz.isInterface() && isVisible(clazz, classLoader)) {\n return Collections.singleton(clazz);\n }\n Set<Class> interfaces = new LinkedHashSet<>();\n Class sclazz = clazz;\n while (sclazz != null) {\n Class<?>[] ifcs = sclazz.getInterfaces();\n for (Class<?> ifc : ifcs) {\n interfaces.addAll(getAllInterfacesForClassAsSet(ifc, classLoader));\n }\n sclazz = clazz.getSuperclass();\n }\n return interfaces;\n }",
"public void testObjectSuperclassOfInterface() throws NoSuchMethodException {\n assertEquals(Object.class, GenericTypeReflector.getExactSuperType(ArrayList.class, Object.class));\n assertEquals(Object.class, GenericTypeReflector.getExactSuperType(List.class, Object.class));\n assertEquals(Object.class, GenericTypeReflector.getExactSuperType(String[].class, Object.class));\n }",
"public static Set<Class<?>> getAllInterfacesForClassAsSet(\n Class<?> clazz, @Nullable ClassLoader classLoader) {\n Assert.notNull(clazz, \"Class must not be null\");\n\n if (clazz.isInterface() && isVisible(clazz, classLoader)) {\n return Collections.singleton(clazz);\n }\n\n Set<Class<?>> interfaces = new LinkedHashSet<>();\n Class<?> currentClass = clazz;\n\n while (currentClass != null) {\n Class<?>[] interfaceArray = currentClass.getInterfaces();\n for (Class<?> cl : interfaceArray) {\n if (isVisible(cl, classLoader)) {\n interfaces.add(cl);\n }\n }\n currentClass = currentClass.getSuperclass();\n }\n\n return interfaces;\n }",
"Iterable<CtElement> asIterable();",
"protected static boolean implementsAllIfaces(ClassInfo clazz,\n\t\t\tClassInfo[] ifaces, ClassInfo[] otherIfaces) {\n\t\tbig: for (int i = 0; i < otherIfaces.length; i++) {\n\t\t\tClassInfo iface = otherIfaces[i];\n\t\t\tif (clazz != null && iface.implementedBy(clazz))\n\t\t\t\tcontinue big;\n\t\t\tfor (int j = 0; j < ifaces.length; j++) {\n\t\t\t\tif (iface.implementedBy(ifaces[j]))\n\t\t\t\t\tcontinue big;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public interface GetAllNotificationBindr {\n StatusBarNotification[] getAllNotification();\n}",
"E[] getAll();",
"Object[] elements(Object[] destination) {\n return elements.toArray(destination);\n }",
"List<IInboundAdapter> getInboundAdapterList();",
"public abstract Class<?>[] getAddins();",
"public boolean checkInterface(Object obj) {\n return true;\n }",
"public ITypeInfo[] getParameters();",
"public interface IGoto {\n\n int[] productionIds();\n\n int gotoStateId();\n\n}",
"public Type[] types();",
"T[] getObjects() {\n\t\treturn this.array;\n\t}",
"@Override\n\tpublic Object[] toArray() {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"public Object[] toArray() {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"public Set<Class<?>> getUntestedInterfaces() {\n\t\tfinal Set<Class<?>> retval = new TreeSet<Class<?>>(\n\t\t\t\tCLASS_NAME_COMPARATOR);\n\n\t\tfor (final InterfaceInfo info : getInterfaceInfoMap().values()) {\n\t\t\t// no test and has methods\n\t\t\tif (info.getTests().isEmpty() && info.getName().getDeclaredMethods().length > 0) {\n\t\t\t\tretval.add(info.getName());\n\t\t\t}\n\t\t}\n\t\treturn retval;\n\t}",
"public abstract List<AbstractNodeTypeImplementation> getImplementations();",
"public Object[] extract( Object o );",
"private static void includeInterfacesFromExtension(Environment result,\n\t\t\tEnvironment extEnv, Environment base)\n\t{\n\t\tfor (IInterfaceDefinition iDef : extEnv.getInterfaces())\n\t\t{\n\t\t\tif (!willGenerateExtensionFor(iDef, base))\n\t\t\t{\n\t\t\t\tiDef.setIsExtTree(true);\n\t\t\t\tresult.getInterfaces().add(iDef);\n\t\t\t}\n\t\t}\n\t}",
"<T extends Annotation> IList<Object> getAnnotatedObjects(Class<T> type);",
"Observable[] getObservables();",
"private void setInterfaces() {\n\t\tif (interfaceNames == null) {\n\t\t\treturn;\n\t\t}\n\t\tif (interfaces != null) {\n\t\t\treturn;\n\t\t}\n\t\tinterfaces = new HashMap();\n\t\tfor (int i = 0; i < interfaceNames.length; i++) {\n\t\t\tBCClass _interface =\n\t\t\t\tJavaApplication.Application.getClass(interfaceNames[i]);\n\t\t\tinterfaces.put(interfaceNames[i], _interface);\n\t\t}\n\t}",
"private static Invariant[] getFieldInvs(Invariant[] invArr, Field[] fields) {\n List<Invariant> list = new ArrayList<>(Arrays.asList(invArr)); //Creates a list.\n for (Field field : fields) { //Loops through all the fields\n Invariant[] fieldInvs = field.getAnnotationsByType(Invariant.class);\n if (fieldInvs.length != 0) { //Makes sure it has invariants\n list.addAll(Arrays.asList(fieldInvs)); //Addss all invariants\n }\n }\n Invariant[] tmp = Arrays.copyOf(list.toArray(), list.size(), Invariant[].class); //Converts the list to an array of invariant type.\n return tmp;\n }",
"public int sizeOfImplementsInterfaceArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(IMPLEMENTSINTERFACE$10);\r\n }\r\n }",
"public List<IMethod> getMethods();",
"public List<IMethod> getMethods();",
"public Set<ICommunicate> getICommunicates();",
"@Override\n\tpublic void implements_(JDefinedClass cls) {\n\n\t}",
"private Object[] elements() {\n return elements.toArray();\n }"
] | [
"0.7827655",
"0.7356829",
"0.7031178",
"0.7017292",
"0.6979436",
"0.6955926",
"0.6949704",
"0.67977166",
"0.6718247",
"0.6556294",
"0.6510246",
"0.65088135",
"0.64925444",
"0.6427201",
"0.6398102",
"0.63786364",
"0.6306898",
"0.63052464",
"0.62379754",
"0.62279224",
"0.61908245",
"0.6157954",
"0.6153589",
"0.6075574",
"0.598298",
"0.5966281",
"0.58248734",
"0.58238906",
"0.5788588",
"0.5785239",
"0.56911147",
"0.5689668",
"0.5679541",
"0.5677629",
"0.5665932",
"0.5661973",
"0.56573653",
"0.5644935",
"0.5604238",
"0.55870706",
"0.5553193",
"0.555211",
"0.5543986",
"0.55333",
"0.5496043",
"0.54876775",
"0.5476018",
"0.5476018",
"0.5476018",
"0.54745317",
"0.54260826",
"0.54164785",
"0.5398906",
"0.5390897",
"0.538649",
"0.5378733",
"0.5358107",
"0.53510875",
"0.53459686",
"0.53435534",
"0.53220725",
"0.532196",
"0.5321201",
"0.5309373",
"0.53068507",
"0.5289626",
"0.5277385",
"0.52770907",
"0.52757365",
"0.52642614",
"0.5259789",
"0.52560663",
"0.5230926",
"0.5226331",
"0.5204864",
"0.5198449",
"0.5191672",
"0.51851296",
"0.51833844",
"0.5155676",
"0.5152092",
"0.5147815",
"0.51395094",
"0.51342154",
"0.5124796",
"0.5099765",
"0.5095074",
"0.50940967",
"0.50882137",
"0.5087244",
"0.50868976",
"0.50791234",
"0.5077555",
"0.5077149",
"0.50725234",
"0.5059404",
"0.5059404",
"0.50473344",
"0.5041704",
"0.5039994"
] | 0.6407633 | 14 |
return all interfaces that the given class implements | private static Class<?>[] getAllInterfacesForClass(Class<?> clazz) {
return getAllInterfacesForClass(clazz, null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Collection<ClassTranslator> getInterfaces();",
"Set<Interface> getInterfaces();",
"@SuppressWarnings(\"rawtypes\")\n\tpublic List getInterfaces(){\n\t\treturn targetClass.interfaces;\n\t}",
"public Set<Class<?>> getAllInterfaces(Class<?> clazz) {\n\t\tSet<Class<?>> result = new HashSet<Class<?>>();\n\t\tgetAllInterfaces(result, clazz);\n\t\treturn result;\n\t}",
"private static Class<?>[] getAllInterfacesForClass(\n Class<?> clazz, @Nullable ClassLoader classLoader) {\n return toClassArray(getAllInterfacesForClassAsSet(clazz, classLoader));\n }",
"public static Class<?>[] getAllInterfacesForClass(Class<?> clazz) {\n return getAllInterfacesForClass(clazz, null);\n }",
"public String[] getInterfaces() {\n return m_classBuilder.getInterfaces();\n }",
"public static Class<?>[] getAllInterfacesForClass(Class<?> clazz, ClassLoader classLoader) {\n Set<Class> ifcs = getAllInterfacesForClassAsSet(clazz, classLoader);\n return ifcs.toArray(new Class[ifcs.size()]);\n }",
"TypeInfo[] interfaces();",
"public Class<?>[] getAllInterfaces(Class<?> aClass) {\n\t\tList<Class<?>> result = new ArrayList<Class<?>>();\n\t\tthis.getAllInterfaces(aClass, result);\n\t\tClass<?> types[] = new Class[0];\n\t\treturn result.toArray(types);\n\t}",
"<T> IList<T> getImplementingObjects(Class<T> interfaceType);",
"public static Set<Class<?>> getInterfaceClosure(Class<?> clazz) {\n Set<Class<?>> result = new HashSet<>();\n for (Class<?> classToDiscover = clazz; classToDiscover != null; classToDiscover = classToDiscover.getSuperclass()) {\n addInterfaces(classToDiscover, result);\n }\n return result;\n }",
"String getInterfaces();",
"public static Set findAllImplementedInterfaces(Class clazz) {\n Set s = new HashSet();\n Class[] interfaces = clazz.getInterfaces();\n for (int i = 0; i < interfaces.length; i++) {\n s.add(interfaces[i]);\n }\n Class superclass = clazz.getSuperclass();\n if (superclass != null) {\n s.addAll(findAllImplementedInterfaces(superclass));\n }\n return s;\n }",
"public static Class<?>[] getAllInterfaces(Object instance) {\n Assert.notNull(instance, \"Instance must not be null\");\n\n return getAllInterfacesForClass(instance.getClass());\n }",
"@Override\n public List<JavaType> getInterfaces() {\n return ImmutableList.of();\n }",
"public static Set<Class<?>> getAllInterfacesForClassAsSet(Class<?> clazz) {\n return getAllInterfacesForClassAsSet(clazz, null);\n }",
"public static Set<Class<?>> getAllInterfacesAsSet(Object instance) {\n Assert.notNull(instance, \"Instance must not be null\");\n\n return getAllInterfacesForClassAsSet(instance.getClass());\n }",
"public static Set<Class<?>> getAllInterfacesForClassAsSet(\n Class<?> clazz, @Nullable ClassLoader classLoader) {\n Assert.notNull(clazz, \"Class must not be null\");\n\n if (clazz.isInterface() && isVisible(clazz, classLoader)) {\n return Collections.singleton(clazz);\n }\n\n Set<Class<?>> interfaces = new LinkedHashSet<>();\n Class<?> currentClass = clazz;\n\n while (currentClass != null) {\n Class<?>[] interfaceArray = currentClass.getInterfaces();\n for (Class<?> cl : interfaceArray) {\n if (isVisible(cl, classLoader)) {\n interfaces.add(cl);\n }\n }\n currentClass = currentClass.getSuperclass();\n }\n\n return interfaces;\n }",
"@SuppressWarnings(\"rawtypes\")\n public static Set<Class> getAllInterfacesForClassAsSet(Class clazz, ClassLoader classLoader) {\n Preconditions.checkNotNull(clazz, \"Class must not be null\");\n if (clazz.isInterface() && isVisible(clazz, classLoader)) {\n return Collections.singleton(clazz);\n }\n Set<Class> interfaces = new LinkedHashSet<>();\n Class sclazz = clazz;\n while (sclazz != null) {\n Class<?>[] ifcs = sclazz.getInterfaces();\n for (Class<?> ifc : ifcs) {\n interfaces.addAll(getAllInterfacesForClassAsSet(ifc, classLoader));\n }\n sclazz = clazz.getSuperclass();\n }\n return interfaces;\n }",
"public Collection<Interface> getInterfaces() {\n\t\treturn this.interfaces;\n\t}",
"public List<ClassOrInterfaceDeclaration> getInterfaces() {\n return this.clsOrInterfDeclrs;\n }",
"IInterfaceDefinition[] resolveImplementedInterfaces(ICompilerProject project);",
"private void getAllInterfaces(Class theClass, Map hInterfaces) {\r\n\t\tClass[] interfaces = theClass.getInterfaces();\r\n\t\tfor (int i = 0; i < interfaces.length; i++) {\r\n\t\t\thInterfaces.put(interfaces[i].getName(), interfaces[i]);\r\n\t\t\tgetAllInterfaces(interfaces[i], hInterfaces);\r\n\t\t}\r\n\t}",
"public int[] getInterfaces() {\n return interfaces;\n }",
"public ArrayList<InterfaceType> getAllInterfaces() {\n HashSet<InterfaceType> set = new HashSet<>();\n ArrayList<InterfaceType> list = new ArrayList<>();\n\n for (InterfaceType interfaceType : getInterfaces()) {\n for (InterfaceType type : interfaceType.getAllInterfaces()) {\n if (set.add(type)) list.add(type);\n }\n }\n\n return list;\n }",
"@Override\n public List<AlgorithmClass> getAllImplementations() {\n return Arrays.asList(mAllImplementations);\n }",
"Class<?>[] getProxiedInterfaces();",
"public Object[] getImplementations() {\n\t\tObject[] res = { HackProjectLearner.class };\n\t\treturn res;\n\t}",
"Set<Interface> getMatchingInterfaces(IpAddress ip);",
"public Enumeration getImplements()\n {\n ensureLoaded();\n return m_tblInterface.keys();\n }",
"public List getInterfaceExtensions();",
"public static List m149887a(Class cls) {\n if (cls == null) {\n return null;\n }\n ArrayList arrayList = new ArrayList();\n while (cls != null) {\n Class[] interfaces = cls.getInterfaces();\n for (int i = 0; i < interfaces.length; i++) {\n if (!arrayList.contains(interfaces[i])) {\n arrayList.add(interfaces[i]);\n }\n for (Class cls2 : m149887a(interfaces[i])) {\n if (!arrayList.contains(cls2)) {\n arrayList.add(cls2);\n }\n }\n }\n cls = cls.getSuperclass();\n }\n return arrayList;\n }",
"public static List<Class> getLocalRemoteInterfaces(Class toAnalyse) {\r\n\t\tfinal List<Class> back = new ArrayList<Class>();\r\n\t\tif (toAnalyse != null) {\r\n\t\t\tClass[] interfaces = toAnalyse.getInterfaces();\r\n\t\t\tif (interfaces != null) {\r\n\t\t\t\tfor (Class<Object> interf : interfaces) {\r\n\t\t\t\t\tif (interf.getAnnotation(Local.class) != null\r\n\t\t\t\t\t\t\t|| interf.getAnnotation(Remote.class) != null) {\r\n\t\t\t\t\t\tback.add(interf);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn back;\r\n\t}",
"Set<Interface> getInterfacesByIp(IpAddress ip);",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[] getImplementsInterfaceArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(IMPLEMENTSINTERFACE$10, targetList);\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[] result = new com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }",
"private static void getInterfaceMethods(Class<?> paramClass, Map<Signature, Method> paramMap) {\n/* 127 */ Class[] arrayOfClass = paramClass.getInterfaces();\n/* 128 */ for (byte b = 0; b < arrayOfClass.length; b++) {\n/* 129 */ Class<?> clazz = arrayOfClass[b];\n/* 130 */ boolean bool = getInternalPublicMethods(clazz, paramMap);\n/* 131 */ if (!bool) {\n/* 132 */ getInterfaceMethods(clazz, paramMap);\n/* */ }\n/* */ } \n/* */ }",
"String[] getImplementedInterfacesAsDisplayStrings();",
"public Interface[] getInterfaces(final String name) {\n final Outage out = getOutage(name);\n if (out == null) return null;\n return out.getInterface();\n }",
"public Set<Class<?>> getUntestedInterfaces() {\n\t\tfinal Set<Class<?>> retval = new TreeSet<Class<?>>(\n\t\t\t\tCLASS_NAME_COMPARATOR);\n\n\t\tfor (final InterfaceInfo info : getInterfaceInfoMap().values()) {\n\t\t\t// no test and has methods\n\t\t\tif (info.getTests().isEmpty() && info.getName().getDeclaredMethods().length > 0) {\n\t\t\t\tretval.add(info.getName());\n\t\t\t}\n\t\t}\n\t\treturn retval;\n\t}",
"public static String[] getImplementors(Class serviceClass) {\n return getImplementors(serviceClass, null);\n }",
"Set<Interface> getInterfacesByPort(ConnectPoint port);",
"default List<TypeInfo> allTypes() {\n List<TypeInfo> allTypes = new LinkedList<>();\n allTypes.add(this);\n allTypes.addAll(Arrays.asList(interfaces()));\n allTypes.addAll(superClass().stream().flatMap(s -> s.allTypes().stream()).collect(Collectors.toList()));\n return allTypes;\n }",
"public static HashMap getInterfaces() {\n\t\treturn interfacehashmapAlreadyImpl;\r\n\t\t\r\n\t}",
"private boolean classImplementsInterface(Class theClass,\r\n\t\t\tClass theInterface) {\r\n\t\tHashMap mapInterfaces = new HashMap();\r\n\t\tString strKey = null;\r\n\t\t// pass in the map by reference since the method is recursive\r\n\t\tgetAllInterfaces(theClass, mapInterfaces);\r\n\t\tIterator iterInterfaces = mapInterfaces.keySet().iterator();\r\n\t\twhile (iterInterfaces.hasNext()) {\r\n\t\t\tstrKey = (String) iterInterfaces.next();\r\n\t\t\tif (mapInterfaces.get(strKey) == theInterface) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private Set<ExecutableElement> getHookMethodsFromInterfaces() {\n return component\n .getInterfaces()\n .stream()\n .map(DeclaredType.class::cast)\n .map(DeclaredType::asElement)\n .map(TypeElement.class::cast)\n .flatMap(typeElement -> ElementFilter\n .methodsIn(typeElement.getEnclosedElements())\n .stream())\n .filter(method -> hasAnnotation(method, HookMethod.class))\n .peek(this::validateHookMethod)\n .collect(Collectors.toSet());\n }",
"public interface AllClass extends AllClassAndEnum\r\n{\r\n}",
"@NotNull\n List<? extends ClassInfo> getClasses();",
"@NotNull\n List<? extends ClassInfo> getAllClasses();",
"@Override\n\tpublic void implements_(JDefinedClass cls) {\n\n\t}",
"protected static boolean implementsAllIfaces(ClassInfo clazz,\n\t\t\tClassInfo[] ifaces, ClassInfo[] otherIfaces) {\n\t\tbig: for (int i = 0; i < otherIfaces.length; i++) {\n\t\t\tClassInfo iface = otherIfaces[i];\n\t\t\tif (clazz != null && iface.implementedBy(clazz))\n\t\t\t\tcontinue big;\n\t\t\tfor (int j = 0; j < ifaces.length; j++) {\n\t\t\t\tif (iface.implementedBy(ifaces[j]))\n\t\t\t\t\tcontinue big;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"Collection<NetworkInterface> getAllNetworkInterfaces();",
"public static String[] getImplementors(Class serviceClass,\n ClassLoader loader) {\n return getImplementors(serviceClass.getName(), loader);\n }",
"private Map<Class<?>, InterfaceInfo> getInterfaceInfoMap() {\n\t\tif (interfaceInfoMap == null) {\n\t\t\tinterfaceInfoMap = new HashMap<Class<?>, InterfaceInfo>();\n\t\t\tfor (final Class<?> c : packageClasses) {\n\t\t\t\tif (isInterestingInterface(c)) {\n\t\t\t\t\tif (!interfaceInfoMap.containsKey(c)) {\n\t\t\t\t\t\tinterfaceInfoMap.put(c, new InterfaceInfo(c));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfinal Contract contract = c.getAnnotation(Contract.class);\n\t\t\t\t\tif (contract != null) {\n\t\t\t\t\t\tInterfaceInfo ii = interfaceInfoMap.get(contract\n\t\t\t\t\t\t\t\t.value());\n\t\t\t\t\t\tif (ii == null) {\n\t\t\t\t\t\t\tii = new InterfaceInfo(contract.value());\n\t\t\t\t\t\t\tinterfaceInfoMap.put(contract.value(), ii);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tii.add(c);\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn interfaceInfoMap;\n\t}",
"InstrumentedType withInterfaces(TypeList.Generic interfaceTypes);",
"public ClassChecker(Class<?> c) {\n cut = c;\n ifList = getAllInterfaces(cut);\n }",
"public List<Class<?>> getKnownClasses();",
"public static Iterable<String> getInterfacesImplementedByArrays() {\n return Collections.unmodifiableList(Arrays.asList(INTERFACES_IMPLEMENTED_BY_ARRAYS));\n }",
"interface NewInterface extends Interface1,Interface2,Interface3{\n\n\tpublic void getD();\n\n}",
"public Set<TestInfo> getInfoByInterfaceClass(final Class<?> contract) {\n\t\tfinal Set<TestInfo> ti = interfaceToInfoMap.get(contract);\n\t\tif (ti == null) {\n\t\t\tLOG.debug(String.format(\"Found no tests for interface %s.\", contract));\n\t\t\treturn Collections.emptySet();\n\t\t}\n\t\treturn interfaceToInfoMap.get(contract);\n\t}",
"List<Trait> traits();",
"private static void printInterfaces(ClassContainer tempClass, ArrayList<String> whitelist, PrintWriter printFile) {\n\t\tfor (ArrowStorage interf : tempClass.getInterfaces()) {\n\t\t\tif (whitelist.contains(interf.getTargetType()) && interf.getTargetType().contains(\"_\")\n\t\t\t\t\t&& !interf.getTargetType().equals(tempClass.getClassName())) {\n\t\t\t\tprintFile.println(tempClass.getClassName() + \" -> \"\n\t\t\t\t\t\t+ interf.getTargetType() + \" [ \" + interf.getColor()\n\t\t\t\t\t\t+ \" \" + interf.getLabel()\n\t\t\t\t\t\t+ \"arrowhead=\\\"onormal\\\", style=\\\"dashed\\\"];\");\n\t\t\t}\n\t\t}\n\t}",
"public abstract List<AbstractNodeTypeImplementation> getImplementations();",
"public abstract Class<?>[] getCoClasses();",
"public List<InterfaceBean> readInterface() {\n\t\tlog.info(\"## readInterface() : \");\n\t\treturn sqlSelectForList(\"com.lgcns.ikep4.workflow.engine.model.InterfaceBean.readInterface\");\n\t}",
"private static DocCommentTree searchInInterfaces(\n CompilationInfo javac, TypeElement class2query, TypeElement overriderClass,\n ExecutableElement overrider, Set<TypeElement> exclude) {\n \n // Step 1\n for (TypeMirror ifceMirror : class2query.getInterfaces()) {\n if (ifceMirror.getKind() == TypeKind.DECLARED) {\n TypeElement ifceEl = (TypeElement) ((DeclaredType) ifceMirror).asElement();\n if (exclude.contains(ifceEl)) {\n continue;\n }\n // check methods\n DocCommentTree jdoc = searchInMethods(javac, ifceEl, overriderClass, overrider);\n if (jdoc != null) {\n return jdoc;\n }\n exclude.add(ifceEl);\n }\n }\n // Step 2\n for (TypeMirror ifceMirror : class2query.getInterfaces()) {\n if (ifceMirror.getKind() == TypeKind.DECLARED) {\n TypeElement ifceEl = (TypeElement) ((DeclaredType) ifceMirror).asElement();\n DocCommentTree jdoc = searchInInterfaces(javac, ifceEl, overriderClass, overrider, exclude);\n if (jdoc != null) {\n return jdoc;\n }\n }\n }\n // Step 3\n return searchInSuperclass(javac, class2query, overriderClass, overrider, exclude);\n }",
"public Set<Class<?>> getScanClasses();",
"private boolean interfaceImplementsInterface(AClass ith) {\n\t\tEnumeration e = getImplements();\n\t\twhile (e.hasMoreElements()) {\n\t\t\tAClass i = ((Type) e.nextElement()).getRefType();\n\t\t\tif (i == ith) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (i.interfaceImplementsInterface(ith)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"Interface getInterface();",
"Interface getInterface();",
"public abstract List<String> scanAllClassNames();",
"public static List<ClassOrInterfaceDeclaration> inFiles(final List<CompilationUnit> files) {\n FindAllInterfaces finder = new FindAllInterfaces(files);\n finder.find();\n return finder.getInterfaces();\n }",
"public Collection<BusinessInterfaceDescriptor<?>> getLocalBusinessInterfaces() {\n \n Set<BusinessInterfaceDescriptor<?>> localBusIntfs = new HashSet<BusinessInterfaceDescriptor<?>>();\n\n if( ejbDesc.getType().equals(EjbSessionDescriptor.TYPE) ) {\n\n EjbSessionDescriptor sessionDesc = (EjbSessionDescriptor) ejbDesc;\n Set<String> localNames = sessionDesc.getLocalBusinessClassNames();\n\n // Add superinterfaces that are also marked as Local\n Set<String> extraNames = new HashSet<String>();\n for(String local : localNames) {\n try {\n Class localClass = sessionDesc.getEjbBundleDescriptor().getClassLoader().loadClass(local);\n addIfLocal(localClass.getInterfaces(), extraNames);\n } catch(ClassNotFoundException e) {\n throw new IllegalStateException(e);\n }\n }\n\n localNames.addAll(extraNames);\n\n // Include the no-interface Local view\n if( sessionDesc.isLocalBean() ) {\n localNames.add(sessionDesc.getEjbClassName());\n }\n\n\n for(String local : localNames) {\n try {\n\n Class localClass = sessionDesc.getEjbBundleDescriptor().getClassLoader().loadClass(local);\n BusinessInterfaceDescriptor busIntfDesc =\n new BusinessInterfaceDescriptorImpl(localClass);\n localBusIntfs.add(busIntfDesc);\n\n } catch(ClassNotFoundException e) {\n throw new IllegalStateException(e);\n }\n }\n }\n \n return localBusIntfs;\n }",
"@SuppressWarnings(\"unchecked\")\n public static <T> List<T> getAnnotations(final Class c, final Class<T> annotation) {\n final List<T> found = new ArrayList<T>();\n\n if (c.isAnnotationPresent(annotation)) {\n found.add((T) c.getAnnotation(annotation));\n }\n\n Class parent = c.getSuperclass();\n while ((parent != null) && (parent != Object.class)) {\n if (parent.isAnnotationPresent(annotation)) {\n found.add((T) parent.getAnnotation(annotation));\n }\n\n // ...and interfaces that the superclass implements\n for (final Class interfaceClass : parent.getInterfaces()) {\n if (interfaceClass.isAnnotationPresent(annotation)) {\n found.add((T) interfaceClass.getAnnotation(annotation));\n }\n }\n\n parent = parent.getSuperclass();\n }\n\n // ...and all implemented interfaces\n for (final Class interfaceClass : c.getInterfaces()) {\n if (interfaceClass.isAnnotationPresent(annotation)) {\n found.add((T) interfaceClass.getAnnotation(annotation));\n }\n }\n // no annotation found, use the defaults\n return found;\n }",
"ISet<Class<?>> collectAllTypeWiredServices();",
"public boolean isInterface();",
"private void setInterfaces() {\n\t\tif (interfaceNames == null) {\n\t\t\treturn;\n\t\t}\n\t\tif (interfaces != null) {\n\t\t\treturn;\n\t\t}\n\t\tinterfaces = new HashMap();\n\t\tfor (int i = 0; i < interfaceNames.length; i++) {\n\t\t\tBCClass _interface =\n\t\t\t\tJavaApplication.Application.getClass(interfaceNames[i]);\n\t\t\tinterfaces.put(interfaceNames[i], _interface);\n\t\t}\n\t}",
"char[][] getInterfaceNames();",
"private static List<ClassOrInterfaceType> getGenericInterface(Class<?>[] generics, Class<?> interfaceClass) {\n List<ClassOrInterfaceType> interfaces = new ArrayList<ClassOrInterfaceType>();\n ClassOrInterfaceType interfaceType = new ClassOrInterfaceType(interfaceClass.getName());\n List<Type> typeArgs = new ArrayList<Type>();\n for (Class<?> type : generics) {\n if (type.isPrimitive()) {\n typeArgs.add(JavaParserUtils.transform(getWrapperClass(type)));\n } else {\n typeArgs.add(JavaParserUtils.transform(type));\n }\n }\n if (!typeArgs.isEmpty())\n interfaceType.setTypeArgs(typeArgs);\n interfaces.add(interfaceType);\n return interfaces;\n }",
"public interface HasClasses {\n /**\n * Returns list of classes\n *\n * @return List<? extends ClassInfo> - list of classes or empty list if none\n */\n @NotNull\n List<? extends ClassInfo> getClasses();\n\n /**\n * Returns list of all classes, including indirect descendants.\n * @return List<? extends ClassInfo> - list of classes or empty list if none\n */\n @NotNull\n List<? extends ClassInfo> getAllClasses();\n}",
"public static List<Map<String, Object>> getImplementedTypes(Map<String, Object> model) {\n @SuppressWarnings(\"unchecked\")\n List<Map<String, Object>> interfaces =\n (List<Map<String, Object>>) getRoot(model).get(ModelConstant.IMPLEMENTED_TYPES);\n return interfaces;\n }",
"Set<Interface> getInterfacesByVlan(VlanId vlan);",
"public List<Class<?>> getAllSuperTypes(Class<?> aClass) {\n\t\tList<Class<?>> result = new ArrayList<Class<?>>();\n\n\t\tthis.getAllSuperTypes(aClass, result);\n\t\tthis.getAllInterfaces(aClass, result);\n\n\t\treturn result;\n\t}",
"private static HashSet<Class<?>> getInstrumentedAncestors(Class<?> cls) {\n HashSet<Class<?>> ancestors = new HashSet<>();\n\n for (Method m : cls.getDeclaredMethods()) {\n if (m.getName().startsWith(\"yGet_\")) {\n ancestors.add(cls);\n // If the current class is instrumented, check for its super classes.\n ancestors.addAll(getInstrumentedAncestors(cls.getSuperclass()));\n return ancestors;\n }\n }\n\n return ancestors;\n }",
"Interface_decl getInterface();",
"private boolean implementsInterface(Class<?> cl, Class<?> iface) {\n if (cl == null)\n return false;\n Class<?>[] clInterfaces = cl.getInterfaces();\n for (int j = 0; j < clInterfaces.length; j++) {\n if (iface.isAssignableFrom(clInterfaces[j]))\n return true;\n }\n return implementsInterface(cl.getSuperclass(), iface);\n }",
"@SuppressWarnings({ \"unchecked\"})\n\tpublic<T extends SubdocumentoIva<?, ?, ?>> List<T> getListaSubdocumentoIva(Class<T> classifClazz) {\n\t\t\n\t\tfinal List<T> result = new ArrayList<T>();\n\t\t\n\t\tfor (SDI c : listaSubdocumentoIva) {\n\t\t\tif(classifClazz.isInstance(c)){\n\t\t\t\tresult.add((T)c);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public void printDetailsInterfaces(Class clstype, int classdepth) {\n\t\tSystem.out.println(\"Class depth is: \" + classdepth + \" Class Name is: \" + clstype.getName());\n\t\t// Recurse to get super class details\n\t\tif (clstype.getSuperclass() != null) {\n\t\t\t// Get all the details\n\t\t\tprintDetailsInterfaces(clstype.getSuperclass(), classdepth + 1);\n\t\t}\n\t\t// Get all the interfaces that the input class implements.\n\t\tClass[] interfacesimp = clstype.getInterfaces();\n\t\tSystem.out.println(\"Printing the implemented interfaces\");\n\t\tfor (int i = 0; i < interfacesimp.length; i++) {\n\t\t\tprintDetailsInterfaces(interfacesimp[i], classdepth + 1);\n\t\t}\n\t}",
"public boolean implementsInterface(Class<?> ifType) {\n boolean result = false;\n\n if (ifList.contains(ifType)) {\n result = true;\n }\n return result;\n }",
"public List<IMethod> getMethods();",
"public List<IMethod> getMethods();",
"public Iterator<String> listAllandAnonClasses()\r\n\t{\r\n\t\treturn new ToStringIterator<String>(ONT_MODEL.listClasses());\r\n\t}",
"static private void\n ifaces(final Class<?> type, final ArrayBuilder<String> r) {\n if (type == Serializable.class) { return; }\n if (Modifier.isPublic(type.getModifiers())) {\n try { r.append(Reflection.getName(type).replace('$', '-')); }\n catch (final Exception e) {}\n }\n for (final Class<?> i : type.getInterfaces()) { ifaces(i, r); }\n }",
"@Override\n\tpublic List<Classe> getClasses() {\n\t\treturn classeRepository.findAll();\n\t}",
"public Interfaces() {\r\n\t\tifaces = new HashMap<String, Interface>();\r\n\t}",
"private Collection<RocketMqListener> findListenerAnnotations(Class<?> clazz) {\n\t\tSet<RocketMqListener> listeners = new HashSet<RocketMqListener>();\n\t\tRocketMqListener ann = AnnotationUtils.findAnnotation(clazz, RocketMqListener.class);\n\t\tif (ann != null) {\n\t\t\tlisteners.add(ann);\n\t\t}\n\t\tRocketMqListeners anns = AnnotationUtils.findAnnotation(clazz, RocketMqListeners.class);\n\t\tif (anns != null) {\n\t\t\tlisteners.addAll(Arrays.asList(anns.value()));\n\t\t}\n\t\treturn listeners;\n\t}",
"public Set<ICommunicate> getICommunicates();",
"public Vector<Class<? extends MoteInterface>> getMoteInterfaces() {\n return moteInterfaces;\n }",
"@Override\n public Set<Class<?>> getClasses() {\n HashSet h = new HashSet<Class<?>>();\n h.add(AffirmationService.class );\n return h;\n }",
"<T> List<T> getAll(Class<T> clazz);"
] | [
"0.809744",
"0.8025223",
"0.76203907",
"0.74914235",
"0.7412904",
"0.73790544",
"0.73751676",
"0.7354723",
"0.7353045",
"0.73007023",
"0.728587",
"0.7266018",
"0.72147256",
"0.7173468",
"0.70629555",
"0.68894196",
"0.6835231",
"0.68273103",
"0.68257314",
"0.6778861",
"0.6713317",
"0.66763616",
"0.6662407",
"0.66556484",
"0.6645132",
"0.6595079",
"0.6496499",
"0.64024174",
"0.6383242",
"0.63625056",
"0.63417155",
"0.6333887",
"0.62920207",
"0.626722",
"0.6246849",
"0.618494",
"0.6176382",
"0.6140643",
"0.60774416",
"0.6044549",
"0.6005889",
"0.60031676",
"0.5928143",
"0.5901936",
"0.58974564",
"0.5893156",
"0.588861",
"0.58860517",
"0.5868396",
"0.58678705",
"0.58647627",
"0.58445895",
"0.58290994",
"0.57747203",
"0.5750505",
"0.57490504",
"0.574417",
"0.5740641",
"0.5735834",
"0.57168734",
"0.5688314",
"0.56469315",
"0.564692",
"0.5642537",
"0.56257135",
"0.5624521",
"0.55891865",
"0.5588914",
"0.5583926",
"0.5583926",
"0.5563896",
"0.5489959",
"0.5489807",
"0.5487689",
"0.5482962",
"0.5472879",
"0.5464746",
"0.5459717",
"0.5454128",
"0.5440289",
"0.5437553",
"0.5414708",
"0.5386629",
"0.5357573",
"0.5340365",
"0.5339243",
"0.53267515",
"0.53266",
"0.53012264",
"0.53005654",
"0.53005654",
"0.5300061",
"0.5298569",
"0.5269961",
"0.5264215",
"0.52549666",
"0.5239126",
"0.52381885",
"0.5235697",
"0.5235259"
] | 0.78106433 | 2 |
return all interfaces that the given class implements, and is visible in the given classloader | private static Class<?>[] getAllInterfacesForClass(
Class<?> clazz, @Nullable ClassLoader classLoader) {
return toClassArray(getAllInterfacesForClassAsSet(clazz, classLoader));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Collection<ClassTranslator> getInterfaces();",
"public static Class<?>[] getAllInterfacesForClass(Class<?> clazz, ClassLoader classLoader) {\n Set<Class> ifcs = getAllInterfacesForClassAsSet(clazz, classLoader);\n return ifcs.toArray(new Class[ifcs.size()]);\n }",
"public static Set<Class<?>> getAllInterfacesForClassAsSet(\n Class<?> clazz, @Nullable ClassLoader classLoader) {\n Assert.notNull(clazz, \"Class must not be null\");\n\n if (clazz.isInterface() && isVisible(clazz, classLoader)) {\n return Collections.singleton(clazz);\n }\n\n Set<Class<?>> interfaces = new LinkedHashSet<>();\n Class<?> currentClass = clazz;\n\n while (currentClass != null) {\n Class<?>[] interfaceArray = currentClass.getInterfaces();\n for (Class<?> cl : interfaceArray) {\n if (isVisible(cl, classLoader)) {\n interfaces.add(cl);\n }\n }\n currentClass = currentClass.getSuperclass();\n }\n\n return interfaces;\n }",
"Set<Interface> getInterfaces();",
"@SuppressWarnings(\"rawtypes\")\n public static Set<Class> getAllInterfacesForClassAsSet(Class clazz, ClassLoader classLoader) {\n Preconditions.checkNotNull(clazz, \"Class must not be null\");\n if (clazz.isInterface() && isVisible(clazz, classLoader)) {\n return Collections.singleton(clazz);\n }\n Set<Class> interfaces = new LinkedHashSet<>();\n Class sclazz = clazz;\n while (sclazz != null) {\n Class<?>[] ifcs = sclazz.getInterfaces();\n for (Class<?> ifc : ifcs) {\n interfaces.addAll(getAllInterfacesForClassAsSet(ifc, classLoader));\n }\n sclazz = clazz.getSuperclass();\n }\n return interfaces;\n }",
"private static Class<?>[] getAllInterfacesForClass(Class<?> clazz) {\n return getAllInterfacesForClass(clazz, null);\n }",
"@SuppressWarnings(\"rawtypes\")\n\tpublic List getInterfaces(){\n\t\treturn targetClass.interfaces;\n\t}",
"public static String[] getImplementors(Class serviceClass,\n ClassLoader loader) {\n return getImplementors(serviceClass.getName(), loader);\n }",
"public static Set<Class<?>> getInterfaceClosure(Class<?> clazz) {\n Set<Class<?>> result = new HashSet<>();\n for (Class<?> classToDiscover = clazz; classToDiscover != null; classToDiscover = classToDiscover.getSuperclass()) {\n addInterfaces(classToDiscover, result);\n }\n return result;\n }",
"public String[] getInterfaces() {\n return m_classBuilder.getInterfaces();\n }",
"String getInterfaces();",
"public Set<Class<?>> getAllInterfaces(Class<?> clazz) {\n\t\tSet<Class<?>> result = new HashSet<Class<?>>();\n\t\tgetAllInterfaces(result, clazz);\n\t\treturn result;\n\t}",
"IInterfaceDefinition[] resolveImplementedInterfaces(ICompilerProject project);",
"TypeInfo[] interfaces();",
"public static Class<?>[] getAllInterfacesForClass(Class<?> clazz) {\n return getAllInterfacesForClass(clazz, null);\n }",
"Class<?>[] getProxiedInterfaces();",
"public static Class<?>[] getAllInterfaces(Object instance) {\n Assert.notNull(instance, \"Instance must not be null\");\n\n return getAllInterfacesForClass(instance.getClass());\n }",
"<T> IList<T> getImplementingObjects(Class<T> interfaceType);",
"public List<Class<?>> getKnownClasses();",
"public Class<?>[] getAllInterfaces(Class<?> aClass) {\n\t\tList<Class<?>> result = new ArrayList<Class<?>>();\n\t\tthis.getAllInterfaces(aClass, result);\n\t\tClass<?> types[] = new Class[0];\n\t\treturn result.toArray(types);\n\t}",
"public static List<Class> getLocalRemoteInterfaces(Class toAnalyse) {\r\n\t\tfinal List<Class> back = new ArrayList<Class>();\r\n\t\tif (toAnalyse != null) {\r\n\t\t\tClass[] interfaces = toAnalyse.getInterfaces();\r\n\t\t\tif (interfaces != null) {\r\n\t\t\t\tfor (Class<Object> interf : interfaces) {\r\n\t\t\t\t\tif (interf.getAnnotation(Local.class) != null\r\n\t\t\t\t\t\t\t|| interf.getAnnotation(Remote.class) != null) {\r\n\t\t\t\t\t\tback.add(interf);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn back;\r\n\t}",
"private void getAllInterfaces(Class theClass, Map hInterfaces) {\r\n\t\tClass[] interfaces = theClass.getInterfaces();\r\n\t\tfor (int i = 0; i < interfaces.length; i++) {\r\n\t\t\thInterfaces.put(interfaces[i].getName(), interfaces[i]);\r\n\t\t\tgetAllInterfaces(interfaces[i], hInterfaces);\r\n\t\t}\r\n\t}",
"public static Set findAllImplementedInterfaces(Class clazz) {\n Set s = new HashSet();\n Class[] interfaces = clazz.getInterfaces();\n for (int i = 0; i < interfaces.length; i++) {\n s.add(interfaces[i]);\n }\n Class superclass = clazz.getSuperclass();\n if (superclass != null) {\n s.addAll(findAllImplementedInterfaces(superclass));\n }\n return s;\n }",
"private static void getInterfaceMethods(Class<?> paramClass, Map<Signature, Method> paramMap) {\n/* 127 */ Class[] arrayOfClass = paramClass.getInterfaces();\n/* 128 */ for (byte b = 0; b < arrayOfClass.length; b++) {\n/* 129 */ Class<?> clazz = arrayOfClass[b];\n/* 130 */ boolean bool = getInternalPublicMethods(clazz, paramMap);\n/* 131 */ if (!bool) {\n/* 132 */ getInterfaceMethods(clazz, paramMap);\n/* */ }\n/* */ } \n/* */ }",
"private static Class<?>[] loadInClassloader(ClassLoader loader, Class<?>[] classes)\n throws ClassNotFoundException {\n List<Class<?>> trackingClasses = Lists.newArrayListWithExpectedSize(classes.length);\n for (Class<?> cls : classes) {\n trackingClasses.add(loadInClassloader(loader, cls));\n }\n return trackingClasses.toArray(new Class<?>[classes.length]);\n }",
"public static Set<Class<?>> getAllInterfacesAsSet(Object instance) {\n Assert.notNull(instance, \"Instance must not be null\");\n\n return getAllInterfacesForClassAsSet(instance.getClass());\n }",
"Set<Interface> getMatchingInterfaces(IpAddress ip);",
"@Override\n public List<JavaType> getInterfaces() {\n return ImmutableList.of();\n }",
"public List<ClassOrInterfaceDeclaration> getInterfaces() {\n return this.clsOrInterfDeclrs;\n }",
"Set<Interface> getInterfacesByIp(IpAddress ip);",
"public List getInterfaceExtensions();",
"public static List m149887a(Class cls) {\n if (cls == null) {\n return null;\n }\n ArrayList arrayList = new ArrayList();\n while (cls != null) {\n Class[] interfaces = cls.getInterfaces();\n for (int i = 0; i < interfaces.length; i++) {\n if (!arrayList.contains(interfaces[i])) {\n arrayList.add(interfaces[i]);\n }\n for (Class cls2 : m149887a(interfaces[i])) {\n if (!arrayList.contains(cls2)) {\n arrayList.add(cls2);\n }\n }\n }\n cls = cls.getSuperclass();\n }\n return arrayList;\n }",
"public ClassChecker(Class<?> c) {\n cut = c;\n ifList = getAllInterfaces(cut);\n }",
"public static Set<Class<?>> getAllInterfacesForClassAsSet(Class<?> clazz) {\n return getAllInterfacesForClassAsSet(clazz, null);\n }",
"public Collection<Interface> getInterfaces() {\n\t\treturn this.interfaces;\n\t}",
"protected static boolean implementsAllIfaces(ClassInfo clazz,\n\t\t\tClassInfo[] ifaces, ClassInfo[] otherIfaces) {\n\t\tbig: for (int i = 0; i < otherIfaces.length; i++) {\n\t\t\tClassInfo iface = otherIfaces[i];\n\t\t\tif (clazz != null && iface.implementedBy(clazz))\n\t\t\t\tcontinue big;\n\t\t\tfor (int j = 0; j < ifaces.length; j++) {\n\t\t\t\tif (iface.implementedBy(ifaces[j]))\n\t\t\t\t\tcontinue big;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public Object[] getImplementations() {\n\t\tObject[] res = { HackProjectLearner.class };\n\t\treturn res;\n\t}",
"public int[] getInterfaces() {\n return interfaces;\n }",
"public Collection<BusinessInterfaceDescriptor<?>> getLocalBusinessInterfaces() {\n \n Set<BusinessInterfaceDescriptor<?>> localBusIntfs = new HashSet<BusinessInterfaceDescriptor<?>>();\n\n if( ejbDesc.getType().equals(EjbSessionDescriptor.TYPE) ) {\n\n EjbSessionDescriptor sessionDesc = (EjbSessionDescriptor) ejbDesc;\n Set<String> localNames = sessionDesc.getLocalBusinessClassNames();\n\n // Add superinterfaces that are also marked as Local\n Set<String> extraNames = new HashSet<String>();\n for(String local : localNames) {\n try {\n Class localClass = sessionDesc.getEjbBundleDescriptor().getClassLoader().loadClass(local);\n addIfLocal(localClass.getInterfaces(), extraNames);\n } catch(ClassNotFoundException e) {\n throw new IllegalStateException(e);\n }\n }\n\n localNames.addAll(extraNames);\n\n // Include the no-interface Local view\n if( sessionDesc.isLocalBean() ) {\n localNames.add(sessionDesc.getEjbClassName());\n }\n\n\n for(String local : localNames) {\n try {\n\n Class localClass = sessionDesc.getEjbBundleDescriptor().getClassLoader().loadClass(local);\n BusinessInterfaceDescriptor busIntfDesc =\n new BusinessInterfaceDescriptorImpl(localClass);\n localBusIntfs.add(busIntfDesc);\n\n } catch(ClassNotFoundException e) {\n throw new IllegalStateException(e);\n }\n }\n }\n \n return localBusIntfs;\n }",
"Set<Interface> getInterfacesByPort(ConnectPoint port);",
"@NotNull\n List<? extends ClassInfo> getAllClasses();",
"private void loadClasses() {\n\t\tString[] classes = new String[] { \"com.sssprog.delicious.api.ApiAsyncTask\" };\n\t\tfor (String c : classes) {\n\t\t\ttry {\n\t\t\t\tClass.forName(c);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public Set<Class<?>> getScanClasses();",
"@Override\n public List<AlgorithmClass> getAllImplementations() {\n return Arrays.asList(mAllImplementations);\n }",
"public static HashMap getInterfaces() {\n\t\treturn interfacehashmapAlreadyImpl;\r\n\t\t\r\n\t}",
"public ArrayList<InterfaceType> getAllInterfaces() {\n HashSet<InterfaceType> set = new HashSet<>();\n ArrayList<InterfaceType> list = new ArrayList<>();\n\n for (InterfaceType interfaceType : getInterfaces()) {\n for (InterfaceType type : interfaceType.getAllInterfaces()) {\n if (set.add(type)) list.add(type);\n }\n }\n\n return list;\n }",
"public abstract List<String> scanAllClassNames();",
"@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 }",
"@NotNull\n List<? extends ClassInfo> getClasses();",
"public static Class getProxyClass(ClassLoader loader, Class[] interfaces)\n throws IllegalArgumentException\n {\n return null;\n }",
"private Map<Class<?>, InterfaceInfo> getInterfaceInfoMap() {\n\t\tif (interfaceInfoMap == null) {\n\t\t\tinterfaceInfoMap = new HashMap<Class<?>, InterfaceInfo>();\n\t\t\tfor (final Class<?> c : packageClasses) {\n\t\t\t\tif (isInterestingInterface(c)) {\n\t\t\t\t\tif (!interfaceInfoMap.containsKey(c)) {\n\t\t\t\t\t\tinterfaceInfoMap.put(c, new InterfaceInfo(c));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfinal Contract contract = c.getAnnotation(Contract.class);\n\t\t\t\t\tif (contract != null) {\n\t\t\t\t\t\tInterfaceInfo ii = interfaceInfoMap.get(contract\n\t\t\t\t\t\t\t\t.value());\n\t\t\t\t\t\tif (ii == null) {\n\t\t\t\t\t\t\tii = new InterfaceInfo(contract.value());\n\t\t\t\t\t\t\tinterfaceInfoMap.put(contract.value(), ii);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tii.add(c);\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn interfaceInfoMap;\n\t}",
"private void setInterfaces() {\n\t\tif (interfaceNames == null) {\n\t\t\treturn;\n\t\t}\n\t\tif (interfaces != null) {\n\t\t\treturn;\n\t\t}\n\t\tinterfaces = new HashMap();\n\t\tfor (int i = 0; i < interfaceNames.length; i++) {\n\t\t\tBCClass _interface =\n\t\t\t\tJavaApplication.Application.getClass(interfaceNames[i]);\n\t\t\tinterfaces.put(interfaceNames[i], _interface);\n\t\t}\n\t}",
"String[] getImplementedInterfacesAsDisplayStrings();",
"List<Class<?>> getManagedClasses();",
"private boolean classImplementsInterface(Class theClass,\r\n\t\t\tClass theInterface) {\r\n\t\tHashMap mapInterfaces = new HashMap();\r\n\t\tString strKey = null;\r\n\t\t// pass in the map by reference since the method is recursive\r\n\t\tgetAllInterfaces(theClass, mapInterfaces);\r\n\t\tIterator iterInterfaces = mapInterfaces.keySet().iterator();\r\n\t\twhile (iterInterfaces.hasNext()) {\r\n\t\t\tstrKey = (String) iterInterfaces.next();\r\n\t\t\tif (mapInterfaces.get(strKey) == theInterface) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private static void printInterfaces(ClassContainer tempClass, ArrayList<String> whitelist, PrintWriter printFile) {\n\t\tfor (ArrowStorage interf : tempClass.getInterfaces()) {\n\t\t\tif (whitelist.contains(interf.getTargetType()) && interf.getTargetType().contains(\"_\")\n\t\t\t\t\t&& !interf.getTargetType().equals(tempClass.getClassName())) {\n\t\t\t\tprintFile.println(tempClass.getClassName() + \" -> \"\n\t\t\t\t\t\t+ interf.getTargetType() + \" [ \" + interf.getColor()\n\t\t\t\t\t\t+ \" \" + interf.getLabel()\n\t\t\t\t\t\t+ \"arrowhead=\\\"onormal\\\", style=\\\"dashed\\\"];\");\n\t\t\t}\n\t\t}\n\t}",
"public Set<Class<?>> getUntestedInterfaces() {\n\t\tfinal Set<Class<?>> retval = new TreeSet<Class<?>>(\n\t\t\t\tCLASS_NAME_COMPARATOR);\n\n\t\tfor (final InterfaceInfo info : getInterfaceInfoMap().values()) {\n\t\t\t// no test and has methods\n\t\t\tif (info.getTests().isEmpty() && info.getName().getDeclaredMethods().length > 0) {\n\t\t\t\tretval.add(info.getName());\n\t\t\t}\n\t\t}\n\t\treturn retval;\n\t}",
"public interface GroovyLoadedScriptListener {\n\t/**\n\t * Returns a set of type annotations this listener is interested in\n\t * @return a set of type annotations this listener is interested in\n\t */\n\tSet<Class<? extends Annotation>> getScanTypeAnnotations();\n\t\n\t/**\n\t * Callback to the listener when a groovy class matching the specified type annotations is loaded\n\t * @param annotations The annotations that were matched\n\t * @param clazz The class that was loaded\n\t * @param instance The instance of the class if the class was loaded as a result of a script compilation. Otherwise null.\n\t */\n\tpublic void onScanType(Set<? extends Annotation> annotations, Class<?> clazz, Object instance);\n\t\n\t/**\n\t * Returns a set of method annotations this listener is interested in\n\t * @return a set of method annotations this listener is interested in\n\t */\n\tSet<Class<? extends Annotation>> getScanMethodAnnotations();\n\n\t/**\n\t * Callback to the listener when a groovy class matching the specified method annotations is loaded\n\t * @param methods A map of sets of annotations that were matched keyed by the method they were found on\n\t * @param clazz The class that was loaded\n\t * @param instance The instance of the class if the class was loaded as a result of a script compilation. Otherwise null.\n\t */\n\tpublic void onScanMethod(Map<Method, Set<Annotation>> methods, Class<?> clazz, Object instance);\n\n\t\n\t/**\n\t * Returns a set of classes that loaded classes might extend or implement that this listener is interested in\n\t * @return a set of classes that loaded classes might extend or implement that this listener is interested in\n\t */\n\tpublic Set<Class<?>> getScanClasses();\n\t\n\t/**\n\t * Callback to the listener when a groovy class with the specified inherritance is loaded\n\t * @param parentClasses The parent types that were matched\n\t * @param clazz The class that was loaded\n\t * @param instance The instance of the class if the class was loaded as a result of a script compilation. Otherwise null.\n\t */\n\tpublic void onScanClasses(Set<Class<?>> parentClasses, Class<?> clazz, Object instance);\n\t\n\t\n\t\n}",
"private boolean implementsInterface(Class<?> cl, Class<?> iface) {\n if (cl == null)\n return false;\n Class<?>[] clInterfaces = cl.getInterfaces();\n for (int j = 0; j < clInterfaces.length; j++) {\n if (iface.isAssignableFrom(clInterfaces[j]))\n return true;\n }\n return implementsInterface(cl.getSuperclass(), iface);\n }",
"private Set<ExecutableElement> getHookMethodsFromInterfaces() {\n return component\n .getInterfaces()\n .stream()\n .map(DeclaredType.class::cast)\n .map(DeclaredType::asElement)\n .map(TypeElement.class::cast)\n .flatMap(typeElement -> ElementFilter\n .methodsIn(typeElement.getEnclosedElements())\n .stream())\n .filter(method -> hasAnnotation(method, HookMethod.class))\n .peek(this::validateHookMethod)\n .collect(Collectors.toSet());\n }",
"public abstract Class<?>[] getCoClasses();",
"public Map<String, SmartHomeHub> loadInterfaces();",
"public void setInterface(Class<?> interf, ClassLoader loader) {\r\n\t\tfor(MethodParser mp : parserList){\r\n\t\t\tmp.setInterface(interf, loader);\r\n\t\t}\r\n\t}",
"ISet<Class<?>> collectAllTypeWiredServices();",
"private static DocCommentTree searchInInterfaces(\n CompilationInfo javac, TypeElement class2query, TypeElement overriderClass,\n ExecutableElement overrider, Set<TypeElement> exclude) {\n \n // Step 1\n for (TypeMirror ifceMirror : class2query.getInterfaces()) {\n if (ifceMirror.getKind() == TypeKind.DECLARED) {\n TypeElement ifceEl = (TypeElement) ((DeclaredType) ifceMirror).asElement();\n if (exclude.contains(ifceEl)) {\n continue;\n }\n // check methods\n DocCommentTree jdoc = searchInMethods(javac, ifceEl, overriderClass, overrider);\n if (jdoc != null) {\n return jdoc;\n }\n exclude.add(ifceEl);\n }\n }\n // Step 2\n for (TypeMirror ifceMirror : class2query.getInterfaces()) {\n if (ifceMirror.getKind() == TypeKind.DECLARED) {\n TypeElement ifceEl = (TypeElement) ((DeclaredType) ifceMirror).asElement();\n DocCommentTree jdoc = searchInInterfaces(javac, ifceEl, overriderClass, overrider, exclude);\n if (jdoc != null) {\n return jdoc;\n }\n }\n }\n // Step 3\n return searchInSuperclass(javac, class2query, overriderClass, overrider, exclude);\n }",
"public Interface[] getInterfaces(final String name) {\n final Outage out = getOutage(name);\n if (out == null) return null;\n return out.getInterface();\n }",
"Set<CompiledClass> getCompiledClasses() {\n if (!isCompiled()) {\n return null;\n }\n if (exposedCompiledClasses == null) {\n FindTypesInCud typeFinder = new FindTypesInCud();\n cud.traverse(typeFinder, cud.scope);\n Set<CompiledClass> compiledClasses = typeFinder.getClasses();\n exposedCompiledClasses = Sets.normalizeUnmodifiable(compiledClasses);\n }\n return exposedCompiledClasses;\n }",
"public static boolean isVisible(Class<?> clazz, ClassLoader classLoader) {\n if (classLoader == null) {\n return true;\n }\n try {\n Class<?> actualClass = classLoader.loadClass(clazz.getName());\n return (clazz == actualClass);\n // Else: different interface class found...\n } catch (ClassNotFoundException ex) {\n // No interface class found...\n return false;\n }\n }",
"private void connectClasses(Header [] list)\r\n {\r\n Vector queue;\r\n Vector garbage = new Vector();\r\n\r\n Find.setCrossreference(list);\r\n\r\n for(int i = 0; list != null && i < list.length; i++)\r\n {\r\n queue = list[i].scopes;\r\n\r\n for(int j = 0; j < queue.size(); j++)\r\n for(Iterator iter = ((Scope)queue.get(j)).iterator(); iter.hasNext();)\r\n {\r\n Iterator a = null;\r\n Basic x = (Basic)iter.next();\r\n\r\n if (x instanceof ClassType)\r\n {\r\n ClassType y = (ClassType)x;\r\n ClassType [] z;\r\n boolean done = false;\r\n String st = null;\r\n\r\n if (y.extend != null && y.extend.name != null && y.extend.scope == null)\r\n { // look for superclass\r\n st = y.extend.name.string;\r\n for(a = y.unresolved.iterator(); a.hasNext();)\r\n {\r\n String s = (String)a.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n z = Find.findClass(st, 0, y.scope);\r\n \r\n for(int k = 0; k < z.length; k++)\r\n if (z[k].scope.javaPath(\"\").endsWith(st) || z[k].scope.buildPath(\"\").endsWith(st))\r\n {\r\n y.extend = z[k];\r\n garbage.add(st);\r\n done = true;\r\n }\r\n }\r\n\r\n for(int k = 0; k < y.implement.length; k++)\r\n if (y.implement[k].name != null && y.implement[k].scope == null)\r\n { // look for interface\r\n st = y.implement[k].name.string;\r\n for(a = y.unresolved.iterator(); a.hasNext();)\r\n {\r\n String s = (String)a.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n done = false;\r\n \r\n z = Find.findClass(st, 0, y.scope);\r\n \r\n for(int l = 0; l < z.length && !done; l++)\r\n if (z[l].scope.javaPath(\"\").endsWith(st) || z[l].scope.buildPath(\"\").endsWith(st))\r\n {\r\n y.implement[k] = z[l];\r\n garbage.add(st);\r\n done = true;\r\n break;\r\n }\r\n }\r\n\r\n a = null;\r\n while(garbage.size() > 0)\r\n {\r\n st = (String)garbage.get(0);\r\n garbage.remove(0);\r\n y.unresolved.remove(st);\r\n }\r\n }\r\n }\r\n }\r\n }",
"public static List<ClassLoader> findAllClassLoaders(final LogNode log) {\n // Need both a set and a list so we can keep them unique, but in an order that (hopefully) reflects\n // the order in which the JDK calls classloaders.\n //\n // See:\n // https://docs.oracle.com/javase/8/docs/technotes/tools/findingclasses.html\n // http://www.javaworld.com/article/2077344/core-java/find-a-way-out-of-the-classloader-maze.html?page=2\n //\n final AdditionOrderedSet<ClassLoader> classLoadersSet = new AdditionOrderedSet<>();\n\n // Look for classloaders on the call stack\n // Find the first caller in the call stack to call a method in the FastClasspathScanner package\n ClassLoader callerLoader = null;\n if (CALLER_RESOLVER == null) {\n if (log != null) {\n log.log(ClasspathFinder.class.getSimpleName() + \" could not create \"\n + CallerResolver.class.getSimpleName() + \", current SecurityManager does not grant \"\n + \"RuntimePermission(\\\"createSecurityManager\\\")\");\n }\n } else {\n final Class<?>[] callStack = CALLER_RESOLVER.getClassContext();\n if (callStack == null) {\n if (log != null) {\n log.log(ClasspathFinder.class.getSimpleName() + \": \" + CallerResolver.class.getSimpleName()\n + \"#getClassContext() returned null\");\n }\n } else {\n final String fcsPkgPrefix = FastClasspathScanner.class.getPackage().getName() + \".\";\n int fcsIdx;\n for (fcsIdx = callStack.length - 1; fcsIdx >= 0; --fcsIdx) {\n if (callStack[fcsIdx].getName().startsWith(fcsPkgPrefix)) {\n break;\n }\n }\n if (fcsIdx < 0 || fcsIdx == callStack.length - 1) {\n // Should not happen\n throw new RuntimeException(\"Could not find caller of \" + fcsPkgPrefix + \"* in call stack\");\n }\n\n // Get the caller's current classloader\n callerLoader = callStack[fcsIdx + 1].getClassLoader();\n }\n }\n boolean useCallerLoader = callerLoader != null;\n\n // Get the context classloader\n final ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();\n boolean useContextLoader = contextLoader != null;\n\n // Get the system classloader\n final ClassLoader systemLoader = ClassLoader.getSystemClassLoader();\n boolean useSystemLoader = systemLoader != null;\n\n // Establish descendancy relationships, and ignore any classloader that is an ancestor of another.\n if (useCallerLoader && useContextLoader && isDescendantOf(callerLoader, contextLoader)) {\n useContextLoader = false;\n }\n if (useContextLoader && useCallerLoader && isDescendantOf(contextLoader, callerLoader)) {\n useCallerLoader = false;\n }\n if (useSystemLoader && useContextLoader && isDescendantOf(systemLoader, contextLoader)) {\n useContextLoader = false;\n }\n if (useContextLoader && useSystemLoader && isDescendantOf(contextLoader, systemLoader)) {\n useSystemLoader = false;\n }\n if (useSystemLoader && useCallerLoader && isDescendantOf(systemLoader, callerLoader)) {\n useCallerLoader = false;\n }\n if (useCallerLoader && useSystemLoader && isDescendantOf(callerLoader, systemLoader)) {\n useSystemLoader = false;\n }\n if (!useCallerLoader && !useContextLoader && !useSystemLoader) {\n // Should not happen\n throw new RuntimeException(\"Could not find a usable ClassLoader\");\n }\n // There will generally only be one class left after this. In rare cases, you may have a separate\n // callerLoader and contextLoader, but those cases are ill-defined -- see:\n // http://www.javaworld.com/article/2077344/core-java/find-a-way-out-of-the-classloader-maze.html?page=2\n // We specifically add the classloaders in the following order however, so that in the case that there\n // are two of them left, they are resolved in this order. The relative ordering of callerLoader and\n // contextLoader is due to the recommendation at the above URL.\n if (useSystemLoader) {\n classLoadersSet.add(systemLoader);\n }\n if (useCallerLoader) {\n classLoadersSet.add(callerLoader);\n }\n if (useContextLoader) {\n classLoadersSet.add(contextLoader);\n }\n\n final List<ClassLoader> classLoaders = classLoadersSet.getList();\n if (log != null) {\n for (final ClassLoader classLoader : classLoaders) {\n log.log(\"Found ClassLoader \" + classLoader.toString());\n }\n log.addElapsedTime();\n }\n return classLoaders;\n }",
"public boolean implementsInterface(Class<?> ifType) {\n boolean result = false;\n\n if (ifList.contains(ifType)) {\n result = true;\n }\n return result;\n }",
"protected abstract void discoverIpInterfaces(Host host, List<IpInterface> oldIpInterfaces);",
"Collection<NetworkInterface> getAllNetworkInterfaces();",
"public static URL[] getClassLoaderURLs(ClassLoader cl)\n {\n URL[] urls = {};\n try\n {\n Class returnType = urls.getClass();\n Class[] parameterTypes = {};\n Method getURLs = cl.getClass().getMethod(\"getURLs\", parameterTypes);\n if( returnType.isAssignableFrom(getURLs.getReturnType()) )\n {\n Object[] args = {};\n urls = (URL[]) getURLs.invoke(cl, args);\n }\n }\n catch(Exception ignore)\n {\n }\n return urls;\n }",
"private void checkIfInterface(ArrayList<CompilationUnit> compilationUnits) {\n for(CompilationUnit cu : compilationUnits) {\n List<TypeDeclaration> typeDeclarations = cu.getTypes();\n\n // actually, we assume there's only one TypeDeclaration in one CompilationUnit\n for(TypeDeclaration td : typeDeclarations) {\n mapIfInterface.put(td.getName(), ((ClassOrInterfaceDeclaration) td).isInterface());\n }\n }\n }",
"HashMap<String, Set<URI>> getExternalSuperClasses();",
"public interface HasClasses {\n /**\n * Returns list of classes\n *\n * @return List<? extends ClassInfo> - list of classes or empty list if none\n */\n @NotNull\n List<? extends ClassInfo> getClasses();\n\n /**\n * Returns list of all classes, including indirect descendants.\n * @return List<? extends ClassInfo> - list of classes or empty list if none\n */\n @NotNull\n List<? extends ClassInfo> getAllClasses();\n}",
"private static HashSet<Class<?>> getInstrumentedAncestors(Class<?> cls) {\n HashSet<Class<?>> ancestors = new HashSet<>();\n\n for (Method m : cls.getDeclaredMethods()) {\n if (m.getName().startsWith(\"yGet_\")) {\n ancestors.add(cls);\n // If the current class is instrumented, check for its super classes.\n ancestors.addAll(getInstrumentedAncestors(cls.getSuperclass()));\n return ancestors;\n }\n }\n\n return ancestors;\n }",
"static private void\n ifaces(final Class<?> type, final ArrayBuilder<String> r) {\n if (type == Serializable.class) { return; }\n if (Modifier.isPublic(type.getModifiers())) {\n try { r.append(Reflection.getName(type).replace('$', '-')); }\n catch (final Exception e) {}\n }\n for (final Class<?> i : type.getInterfaces()) { ifaces(i, r); }\n }",
"@SuppressWarnings(\"rawtypes\")\n public static Iterable<Class> getClasses(String packageName, Class<?> superClass) throws ClassNotFoundException, IOException\n {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n String path = packageName.replace('.', '/');\n Enumeration<URL> resources = classLoader.getResources(path);\n List<File> dirs = new ArrayList<File>();\n while (resources.hasMoreElements())\n {\n URL resource = resources.nextElement();\n dirs.add(new File(resource.getFile()));\n }\n List<Class> classes = new ArrayList<Class>();\n for (File directory : dirs)\n {\n List<Class> foundClasses = findClasses(directory, packageName);\n for (Class foundClass : foundClasses)\n {\n if (superClass.isAssignableFrom(foundClass))\n {\n classes.add(foundClass);\n }\n }\n }\n\n return classes;\n }",
"public List<? extends BaseClassInfo> getClasses(HasMetricsFilter filter) {\n if (classLookup == null) {\n buildClassLookupMap();\n }\n List<BaseClassInfo> result = newArrayList();\n for (BaseClassInfo classInfo : classLookup.values()) {\n if (filter.accept(classInfo)) {\n result.add(classInfo);\n }\n }\n return result;\n }",
"public static Method[] getPublicMethods(Class<?> paramClass) {\n/* 107 */ if (System.getSecurityManager() == null) {\n/* 108 */ return paramClass.getMethods();\n/* */ }\n/* 110 */ HashMap<Object, Object> hashMap = new HashMap<>();\n/* 111 */ while (paramClass != null) {\n/* 112 */ boolean bool = getInternalPublicMethods(paramClass, (Map)hashMap);\n/* 113 */ if (bool) {\n/* */ break;\n/* */ }\n/* 116 */ getInterfaceMethods(paramClass, (Map)hashMap);\n/* 117 */ paramClass = paramClass.getSuperclass();\n/* */ } \n/* 119 */ return (Method[])hashMap.values().toArray((Object[])new Method[hashMap.size()]);\n/* */ }",
"public Enumeration getImplements()\n {\n ensureLoaded();\n return m_tblInterface.keys();\n }",
"InstrumentedType withInterfaces(TypeList.Generic interfaceTypes);",
"@SuppressWarnings({\"UnstableApiUsage\", \"unchecked\"})\n\tpublic void loadAllHacks() {\n\t\tfinal ConfigurationSection hackConfigs = plugin.getConfig().getConfigurationSection(\"hacks\");\n\t\tif (hackConfigs == null) {\n\t\t\tthis.plugin.warning(\"There are no hacks defined under 'hacks' the config. Is this right?\");\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tfinal ClassPath getSamplersPath = ClassPath.from(plugin.exposeClassLoader());\n\t\t\tfor (final var classInfo : getSamplersPath.getTopLevelClassesRecursive(HACKS_PATH)) {\n\t\t\t\ttry {\n\t\t\t\t\tfinal Class<?> clazz = classInfo.load();\n\t\t\t\t\tif (clazz == null || !SimpleHack.class.isAssignableFrom(clazz)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tthis.plugin.info(\"Found hack class [\" + clazz.getName() + \"]\");\n\t\t\t\t\tloadHack((Class<SimpleHack<?>>) clazz, hackConfigs.getConfigurationSection(clazz.getSimpleName()));\n\t\t\t\t}\n\t\t\t\tcatch (final NoClassDefFoundError exception) {\n\t\t\t\t\tthis.plugin.warning(\"Unable to load hack \\\"\" + classInfo.getSimpleName() + \"\\\" probably due to a \" +\n\t\t\t\t\t\t\t\"dependency / import error.\", exception);\n\t\t\t\t\t//continue;\n\t\t\t\t}\n\t\t\t\tcatch (final Exception exception) {\n\t\t\t\t\tthis.plugin.warning(\"Failed to complete hack discovery of: \" + classInfo.getName(), exception);\n\t\t\t\t\t//continue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (final Exception exception) {\n\t\t\tthis.plugin.warning(\"Failed to complete hack registration\");\n\t\t\texception.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t\tif (this.hacks.isEmpty()) {\n\t\t\tthis.plugin.warning(\"No hacks have been loaded.\");\n\t\t\t//return;\n\t\t}\n\t}",
"private Class<DimensionInterface>[] getAllClasses (String pckgname) {\n\t\t\n\t\ttry {\n\t\t \n\t\t\t// Classes will store our results\n\t\t\tArrayList classes = new ArrayList ();\n\t\t\t\n\n\t\t\t// Get a File object for the package \n\t\t File directory; \n\t\t \n\t\t \n\t\t // Load the package \n\t\t try { \n\t\t \tdirectory = new File (\n\t\t \t\tThread.currentThread ()\n\t\t \t\t\t.getContextClassLoader()\n\t\t \t\t\t.getResource (pckgname.replace('.', '/'))\n\t\t \t\t\t.getFile()\n\t\t \t); \n\t\t \n\t\t } catch (NullPointerException x) { \n\t\t \tSystem.out.println (\"Nullpointer\");\n\t\t \tthrow new ClassNotFoundException (pckgname + \" does not appear to be a valid package\"); \n\t\t }\n\t\t \n\t\t \n\t\t // IF we have found our package, then\n\t\t // obtain the files withtin\n\t\t if ( ! directory.exists ()) {\n\t\t \tSystem.out.println (\"Directory does not exist\");\n\t\t \tthrow new ClassNotFoundException(pckgname + \" does not appear to be a valid package\"); \n\t\t } \t\t \t\n\t\t \t\n\t\t \n\t \t// Get the list of the files contained in the package \n\t \tString[] files = directory.list ();\n\t\t \t\n\t\t \t\n\t \t// Get the files\n\t \tfor (int i=0; i<files.length; i++) { \n\n\t \t\t// we are only interested in .class files \n\t \t\tif ( ! files[i].endsWith(\".class\")) {\n\t \t\t\tcontinue;\n\t \t\t}\n\t \t\t\t\n \t\t\t// removes the .class extension \n \t\t\tclasses.add(Class.forName (pckgname + '.' + files[i].substring (0, files[i].length() - 6)));\n\t \t\t\t\n\t \t}\n\t\t \n\t\t \n\t \t// Convert the result in an array\n\t\t Class[] classesA = new Class[classes.size()]; \n\t\t classes.toArray (classesA); \n\t\t \n\t\t \n\t\t // Return\n\t\t return classesA;\n\t\t \n\t\t// Generic error\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public String[] readClasses();",
"public static List<ClassOrInterfaceDeclaration> inFiles(final List<CompilationUnit> files) {\n FindAllInterfaces finder = new FindAllInterfaces(files);\n finder.find();\n return finder.getInterfaces();\n }",
"public static Iterable<String> getInterfacesImplementedByArrays() {\n return Collections.unmodifiableList(Arrays.asList(INTERFACES_IMPLEMENTED_BY_ARRAYS));\n }",
"@Override\n\tpublic void implements_(JDefinedClass cls) {\n\n\t}",
"@SuppressWarnings(\"unchecked\")\n public static <T> List<T> getAnnotations(final Class c, final Class<T> annotation) {\n final List<T> found = new ArrayList<T>();\n\n if (c.isAnnotationPresent(annotation)) {\n found.add((T) c.getAnnotation(annotation));\n }\n\n Class parent = c.getSuperclass();\n while ((parent != null) && (parent != Object.class)) {\n if (parent.isAnnotationPresent(annotation)) {\n found.add((T) parent.getAnnotation(annotation));\n }\n\n // ...and interfaces that the superclass implements\n for (final Class interfaceClass : parent.getInterfaces()) {\n if (interfaceClass.isAnnotationPresent(annotation)) {\n found.add((T) interfaceClass.getAnnotation(annotation));\n }\n }\n\n parent = parent.getSuperclass();\n }\n\n // ...and all implemented interfaces\n for (final Class interfaceClass : c.getInterfaces()) {\n if (interfaceClass.isAnnotationPresent(annotation)) {\n found.add((T) interfaceClass.getAnnotation(annotation));\n }\n }\n // no annotation found, use the defaults\n return found;\n }",
"private static void checkProxyPackageAccess(Class<?> clazz) {\n SecurityManager s = System.getSecurityManager();\n if (s != null) {\n // check proxy interfaces if the given class is a proxy class\n if (Proxy.isProxyClass(clazz)) {\n for (Class<?> intf : clazz.getInterfaces()) {\n checkPackageAccess(intf);\n }\n }\n }\n }",
"public static String[] getImplementors(Class serviceClass) {\n return getImplementors(serviceClass, null);\n }",
"public static Enumeration<URL> loadFileUsingClassLoaders(String filename) throws IOException {\n\n /*\n * TODO: perhaps desirable to move this code to\n * org.apache.wink.common.internal.utils.ClassUtils?\n */\n\n logger.trace(\"Searching for {} using thread context classloader.\", filename); //$NON-NLS-1$\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n Enumeration<URL> resources = loadFileUsingClassLoader(classLoader, filename);\n if (resources.hasMoreElements()) {\n return resources;\n }\n\n logger.trace(\"Searching for {} using current classloader.\", filename); //$NON-NLS-1$\n classLoader = FileLoader.class.getClassLoader();\n resources = loadFileUsingClassLoader(classLoader, filename);\n if (resources.hasMoreElements()) {\n return resources;\n }\n\n logger.trace(\"Searching for {} using system classloader.\", filename); //$NON-NLS-1$\n return ClassLoader.getSystemResources(filename);\n }",
"private Map<AccessibilityTarget, ArrayList<Accessor>> computeAccessibility(final IClassHierarchy cha, final Predicate<IClass> classFilter) {\n Map<AccessibilityTarget, ArrayList<Accessor>> targetsToAccessors = new HashMap<AccessibilityTarget, ArrayList<Accessor>>();\n IClassLoader appLoader = cha.getLoader(ClassLoaderReference.Application);\n Iterator<IClass> appClassesIter = appLoader.iterateAllClasses();\n while (appClassesIter.hasNext()) {\n IClass klass = appClassesIter.next();\n if (!classFilter.test(klass)) {\n continue;\n }\n classes.add(klass);\n if (klass.isInterface()) {\n continue;\n }\n Iterator<IField> fieldsIter = klass.getAllFields().iterator();\n while (fieldsIter.hasNext()) {\n IField field = fieldsIter.next();\n if (!field.getDeclaringClass().getClassLoader().equals(appLoader) || field.getName().toString().indexOf('$') > -1)\n continue;\n AccessibilityTarget target = AccessibilityTarget.getAccessibilityTarget(field);\n targetsToAccessors.put(target, new ArrayList<Accessor>(3));\n }\n Iterator<IMethod> methodsIter = klass.getAllMethods().iterator();\n while (methodsIter.hasNext()) {\n IMethod method = methodsIter.next();\n if (method.isAbstract() || !method.getDeclaringClass().getClassLoader().equals(appLoader)\n || method.getName().toString().indexOf('$') > -1)\n continue;\n AccessibilityTarget target = AccessibilityTarget.getAccessibilityTarget(method);\n targetsToAccessors.put(target, new ArrayList<Accessor>(3));\n }\n }\n\n if (DEBUG) {\n int numClasses = cha.getNumberOfClasses();\n Trace.println(\"Number of classes:\" + numClasses);\n }\n for (IClass klass : cha) {\n if (!J2SEClassHierarchyEngine.isApplicationClass(klass)) {\n continue;\n }\n Iterator<IMethod> methodsIter = klass.getDeclaredMethods().iterator();\n while (methodsIter.hasNext()) {\n IMethod method = methodsIter.next();\n try {\n Iterator<FieldReference> readFieldRefIter = CodeScanner.getFieldsRead(method).iterator();\n while (readFieldRefIter.hasNext()) {\n FieldReference fieldRef = readFieldRefIter.next();\n if (!fieldRef.getDeclaringClass().getClassLoader().equals(ClassLoaderReference.Application)\n || fieldRef.getName().toString().indexOf('$') > -1)\n continue;\n IField iField = appLoader.lookupClass(fieldRef.getDeclaringClass().getName()).getField(fieldRef.getName());\n if (!iField.getDeclaringClass().getClassLoader().equals(ClassLoaderReference.Application)\n || iField.getName().toString().indexOf('$') > -1)\n continue;\n AccessibilityTarget target = AccessibilityTarget.getAccessibilityTarget(iField);\n List<Accessor> accessors = targetsToAccessors.get(target);\n accessors.add(new Accessor(method, fieldRef.getDeclaringClass().getName().toString(), fieldRef.getDeclaringClass()\n .getClassLoader().getName().toString()));\n }\n Iterator<FieldReference> writtenFieldRefIter = CodeScanner.getFieldsWritten(method).iterator();\n while (writtenFieldRefIter.hasNext()) {\n FieldReference fieldRef = writtenFieldRefIter.next();\n if (!fieldRef.getDeclaringClass().getClassLoader().equals(ClassLoaderReference.Application)\n || fieldRef.getName().toString().indexOf('$') > -1)\n continue;\n IField iField = appLoader.lookupClass(fieldRef.getDeclaringClass().getName()).getField(fieldRef.getName());\n if (!iField.getDeclaringClass().getClassLoader().equals(ClassLoaderReference.Application)\n || iField.getName().toString().indexOf('$') > -1)\n continue;\n AccessibilityTarget target = AccessibilityTarget.getAccessibilityTarget(iField);\n List<Accessor> accessors = targetsToAccessors.get(target);\n accessors.add(new Accessor(method, fieldRef.getDeclaringClass().getName().toString(), fieldRef.getDeclaringClass()\n .getClassLoader().getName().toString()));\n }\n Iterator<CallSiteReference> callSitesIter = CodeScanner.getCallSites(method).iterator();\n while (callSitesIter.hasNext()) {\n CallSiteReference callSiteRef = callSitesIter.next();\n MethodReference methodRef = callSiteRef.getDeclaredTarget();\n if (!methodRef.getDeclaringClass().getClassLoader().equals(ClassLoaderReference.Application)\n || methodRef.getName().toString().indexOf('$') > -1)\n continue;\n IMethod iMethod = appLoader.lookupClass(methodRef.getDeclaringClass().getName()).getMethod(methodRef.getSelector());\n IClass iClass = iMethod.getDeclaringClass();\n\n if (!J2SEClassHierarchyEngine.isApplicationClass(iClass) || iMethod.getName().toString().indexOf('$') > -1)\n continue;\n\n int superModifier = -1;\n int modifier;\n if (iMethod.isPublic()) {\n modifier = PUBLIC;\n } else if (iMethod.isProtected()) {\n modifier = PROTECTED;\n } else if (iMethod.isPrivate()) {\n modifier = PRIVATE;\n } else {\n modifier = DEFAULT;\n }\n IClass superClass = iClass.getSuperclass();\n if (superClass != null) {\n IMethod superMethod = superClass.getMethod(iMethod.getSelector());\n if (superMethod != null) {\n if (superMethod.isPublic()) {\n superModifier = PUBLIC;\n } else if (superMethod.isProtected()) {\n superModifier = PROTECTED;\n } else if (superMethod.isPrivate()) {\n superModifier = PRIVATE;\n } else {\n superModifier = DEFAULT;\n }\n }\n }\n if (modifier > superModifier) {\n // try to see if iMethod overrides a method in an interface\n Collection<IClass> interfaces;\n\n interfaces = iClass.getAllImplementedInterfaces();\n Iterator<IClass> interfacesIter = interfaces.iterator();\n while (interfacesIter.hasNext()) {\n IClass intf = interfacesIter.next();\n IMethod intfMethod = intf.getMethod(iMethod.getSelector());\n if (intfMethod == null)\n continue;\n int intfModifier = -1;\n if (intfMethod.isPublic()) {\n intfModifier = PUBLIC;\n } else if (intfMethod.isProtected()) {\n intfModifier = PROTECTED;\n } else if (intfMethod.isPrivate()) {\n intfModifier = PRIVATE;\n } else {\n intfModifier = DEFAULT;\n }\n superModifier = Math.max(superModifier, intfModifier);\n if (modifier == superModifier) {\n // The modifier of iMethod cannot be restricted\n break;\n }\n }\n }\n\n AccessibilityTarget target = AccessibilityTarget.getAccessibilityTarget(iMethod);\n target.setSuperModifier(superModifier);\n List<Accessor> accessors = targetsToAccessors.get(target);\n accessors.add(new Accessor(method, methodRef.getDeclaringClass().getName().toString(), methodRef.getDeclaringClass()\n .getClassLoader().getName().toString()));\n }\n } catch (InvalidClassFileException ice) {\n ice.printStackTrace();\n } catch (NullPointerException npe) {\n }\n }\n }\n return targetsToAccessors;\n }",
"default List<TypeInfo> allTypes() {\n List<TypeInfo> allTypes = new LinkedList<>();\n allTypes.add(this);\n allTypes.addAll(Arrays.asList(interfaces()));\n allTypes.addAll(superClass().stream().flatMap(s -> s.allTypes().stream()).collect(Collectors.toList()));\n return allTypes;\n }",
"@Test\n public void testGetDecalredClasses() {\n for (Class clazz : TestClass.class.getDeclaredClasses()) {\n System.out.println(clazz.getName());\n }\n }",
"public Set<TestInfo> getInfoByInterfaceClass(final Class<?> contract) {\n\t\tfinal Set<TestInfo> ti = interfaceToInfoMap.get(contract);\n\t\tif (ti == null) {\n\t\t\tLOG.debug(String.format(\"Found no tests for interface %s.\", contract));\n\t\t\treturn Collections.emptySet();\n\t\t}\n\t\treturn interfaceToInfoMap.get(contract);\n\t}",
"default boolean canLoadClassPath(String classPath) { return true; }",
"List<Trait> traits();"
] | [
"0.7246203",
"0.72181344",
"0.68179405",
"0.67659867",
"0.67192405",
"0.65782887",
"0.65044177",
"0.6465692",
"0.6407769",
"0.6306727",
"0.61929727",
"0.61428946",
"0.6129777",
"0.61138916",
"0.60929966",
"0.60735464",
"0.6045634",
"0.60051537",
"0.5959548",
"0.59562963",
"0.59401536",
"0.5931696",
"0.5919313",
"0.5899908",
"0.58416784",
"0.58068913",
"0.5760344",
"0.57476556",
"0.5738741",
"0.5702159",
"0.57013595",
"0.5698493",
"0.5690971",
"0.5629714",
"0.55893236",
"0.5514587",
"0.5491294",
"0.5484445",
"0.54635227",
"0.53600955",
"0.5331016",
"0.5323228",
"0.53211415",
"0.5315005",
"0.53115207",
"0.5310995",
"0.5305551",
"0.52729255",
"0.52689904",
"0.5263969",
"0.5263478",
"0.52619517",
"0.5255463",
"0.5252617",
"0.5244557",
"0.52111167",
"0.5208959",
"0.51936847",
"0.5181589",
"0.51785946",
"0.5166502",
"0.5150751",
"0.5150273",
"0.5140512",
"0.51141155",
"0.51118845",
"0.5110558",
"0.5081192",
"0.5076072",
"0.50610316",
"0.5047698",
"0.5040705",
"0.50401646",
"0.5028436",
"0.50169605",
"0.49828327",
"0.4981127",
"0.49800792",
"0.49732053",
"0.49455097",
"0.494242",
"0.49356705",
"0.49331242",
"0.49193257",
"0.49114242",
"0.4907966",
"0.49043578",
"0.48934922",
"0.48925987",
"0.48849234",
"0.4883499",
"0.4865993",
"0.4840966",
"0.48285976",
"0.4828583",
"0.4823815",
"0.48154944",
"0.481541",
"0.48045745",
"0.4797782"
] | 0.73768824 | 0 |
Construct an instance that will log the specified identifier | public DelegatingFilter(String id1, String id2) {
super(id1, id2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract Logger newInstance(String name);",
"Object createLogger(String name);",
"public Service(int id)\r\n {\r\n this.id = id;\r\n \r\n logger = new Logger(this);\r\n }",
"public Logger(int ActorID, int TargetID, Action action){\n this.date = new Date();\n this.actorID = ActorID;\n this.targetID = TargetID;\n this.action = action;\n }",
"public LogKitLogger(String name)\n/* */ {\n/* 64 */ this.name = name;\n/* 65 */ this.logger = getLogger();\n/* */ }",
"int getLogId();",
"private SerialExecutor(T identifier) {\n this.identifier = identifier;\n }",
"LogAction createLogAction();",
"public Logger (){}",
"public Logger() {\n map = new LinkedHashMap<>();\n }",
"public Packet(final long unique) {\r\n\t\ttype = EvidenceType.NONE;\r\n\t\tcommand = EvidenceBuilder.LOG_CREATE;\r\n\t\tid = unique;\r\n\t\tdata = null;\r\n\t}",
"public MyLogger () {}",
"public HgSendlog (java.lang.Integer id) {\n\t\tsuper(id);\n\t}",
"private ExtentLogger() {}",
"public String getLogId() {\r\n return logId;\r\n }",
"public Log()\n {\n filePath = String.format(\"log-%d.sl\", System.currentTimeMillis());\n\n open();\n }",
"private Log() {\r\n\t}",
"public LogEvent newInstance()\n {\n return new LogEvent();\n }",
"private Log() {\n }",
"private Log()\n {\n //Hides implicit constructor.\n }",
"public LogEntry () {\n }",
"public DNSLog() {}",
"private AddHarnessIdInterceptor() {}",
"public static void log(int code, String id) {\n\t\twrite(interpret(code, id));\n\t}",
"private Logger(){ }",
"public LogX() {\n\n }",
"private UniqueIdentifier(){\n\t\t\n\t}",
"private Logger() {\n\n }",
"public Log newInstance(String str) {\n Log log;\n try {\n if (this.logConstructor == null) {\n log = discoverLogImplementation(str);\n } else {\n log = (Log) this.logConstructor.newInstance(new Object[]{str});\n }\n if (this.logMethod != null) {\n this.logMethod.invoke(log, new Object[]{this});\n }\n return log;\n } catch (LogConfigurationException e) {\n throw e;\n } catch (InvocationTargetException e2) {\n Throwable targetException = e2.getTargetException();\n if (targetException != null) {\n throw new LogConfigurationException(targetException);\n }\n throw new LogConfigurationException((Throwable) e2);\n } catch (Throwable th) {\n throw new LogConfigurationException(th);\n }\n }",
"public MyLogs() {\n }",
"public int getLogid() {\n\treturn logid;\n}",
"public TicketLogEntry(int i, int r, String l, User u, Timestamp d){\n\t\tid = i;\n\t\tticketID = r;\n\t\tlogEntry = l;\n\t\tperformedBy = u;\n\t\tperformedDate = d;\n\t}",
"private Logger(){\n\n }",
"private TypicalLogEntries() {}",
"private void addLog(String log) {\n LogHelper.addIdentificationLog(log);\n }",
"private static void logOpenKitInstanceCreation(Logger logger, OpenKitConfiguration openKitConfiguration) {\n if (logger.isInfoEnabled()) {\n logger.info(OpenKitImpl.class.getSimpleName()\n + \" - \" + openKitConfiguration.getOpenKitType()\n + \" OpenKit \" + OpenKitConstants.DEFAULT_APPLICATION_VERSION\n + \" instantiated\");\n }\n if (logger.isDebugEnabled()) {\n logger.debug(OpenKitImpl.class.getSimpleName()\n + \" - applicationName=\" + openKitConfiguration.getApplicationName()\n + \", applicationID=\" + openKitConfiguration.getApplicationID()\n + \", deviceID=\" + openKitConfiguration.getDeviceID()\n + \", origDeviceID=\" + openKitConfiguration.getOrigDeviceID()\n + \", endpointURL=\" + openKitConfiguration.getEndpointURL());\n }\n }",
"public static void log(String str) {\n System.out.println(\"static void constructor method\" + \" => \" + str);\n }",
"private static Logger createLogger(String className) {\n\n /*\n * No need to set level values explicitly. This is managed in the\n * standard way by java.util.logging.LogManager.\n */\n Logger logger = Logger.getLogger(className);\n\n /*\n * We've debated permitting the logger to use parental handlers, which\n * would permit using the standard java.util.logging policy of setting\n * tbe property com.sleepycat.je.handlers as a way of customizing\n * handlers. This was not useful because of the need to specify\n * handlers per environment, and also caused a process monitor echo\n * issue within NoSQL DB.\n */\n logger.setUseParentHandlers(false);\n\n return logger;\n }",
"private TicketLog createLog() throws SQLException {\n\t\t\t\t\treturn new TicketLog(rs.getLong(1), rs.getString(2),\n\t\t\t\t\t\t\trs.getLong(3),\n\t\t\t\t\t\t\tTicketLog.Action.valueOf(rs.getString(4)),\n\t\t\t\t\t\t\trs.getInt(5));\n\t\t\t\t}",
"public JmxLogLevel() {\n this(RunTimeSingleton.instance());\n log.error(\"Wrong constructor\");\n }",
"@Override\n public LoggerBackend create(String loggingClassName) {\n Logger logger = (Logger) LogManager.getLogger(loggingClassName.replace('$', '.'));\n return new Log4j2LoggerBackend(logger);\n }",
"private LoggerSingleton() {\n\n }",
"public ZLogRecord(UInteger id, Timestamp ltime, String ltype, String name, String descr) {\n super(ZLog.Z_LOG);\n\n set(0, id);\n set(1, ltime);\n set(2, ltype);\n set(3, name);\n set(4, descr);\n }",
"protected static LogRecord getLogRecord( SharedLevel pLevel, int pLogId ) {\n\n // Aux vars\n int i = 0;\n String className = null;\n\n // Get the stack trace\n StackTraceElement stackTraceElement = null;\n StackTraceElement[] stackTrace = ( new Throwable() ).getStackTrace();\n\n // Get the location\n for( i=0; i<stackTrace.length; i++ ) {\n stackTraceElement = stackTrace[ i ];\n className = stackTrace[ i ].getClassName();\n if( className.equals( SharedException.class.getName() ) ) continue;\n break;\n }\n\n // Create the new log record\n LogRecord logRecord = new LogRecord( pLevel, \"LOG_ID_\" + pLogId + \" from \" + stackTraceElement.toString() );\n\n // Set parameters for the log record\n logRecord.setSourceClassName( stackTraceElement.getClassName() );\n logRecord.setSourceMethodName( stackTraceElement.getMethodName() );\n\n // Set the logger name using the agent id if present\n logRecord.setLoggerName( \"anonymous\" );\n SharedSecurityParam securityParam = (SharedSecurityParam) SecurityLocalThreadContext.getSecurityParam();\n if( securityParam != null ) logRecord.setLoggerName( securityParam.getAgentId() );\n\n // Send it back\n return( logRecord );\n }",
"public LogVendorRequest (long id) {\r\n\t\tsuper(id);\r\n\t}",
"public static void addLog(int _sid, String _query, int _did, String _action){\n Logger log = new Logger(_sid, _query, _did, _action);\n if(_logs.containsKey(_sid) == false){\n _logs.put(_sid, new Vector<Logger>());\n }\n _logs.get(_sid).add(log);\n }",
"public SandwichLogger(String target){\n\t\tmTarget = target;\n\t}",
"private static void createLogger() {\n logger = myLogger.createHtmlLogger(\"JRECEIPTS\", Options.LOG_PATH + \"Receipts\", 262144, true, 1);\n// boolean append = true;\n// int limit = 1000000; // 1 Mb\n// int numLogFiles = 5;\n// FileHandler fh = new FileHandler(Options.LOG_PATH + \"Receipts_%g.html\", limit, numLogFiles, true);\n// fh.setFormatter(new SimpleFormatter());\n// // Add to the desired logger\n// logger = Logger.getLogger(\"Receipts\");\n// logger.addHandler(fh);\n }",
"Object createLogger(Class<?> clazz);",
"abstract void initiateLog();",
"public Slf4jLogService() {\n this(System.getProperties());\n }",
"public TelemetryLogHandler(String logName, LogFormatter formatter) {\n\tsuper(formatter);\n\tthis.logName = logName;\n\tSystem.err.println(formatter.getHead());\n }",
"public SensorLog(String id, Date when, Float temperature) {\n this.id = id;\n this.when = when;\n this.temperature = temperature;\n }",
"public Log(Logger logger) {\n this.logger = logger;\n }",
"public ScreeningLogger() {\n int defaultMaxRetries = DEFAULT_MAX_RETRIES;\n int defaultRetrySleepTime = DEFAULT_RETRY_SLEEP_TIME;\n\n try {\n ConfigManager cm = ConfigManager.getInstance();\n\n String maxRetriesString = cm.getString(SCREENING_LOGGER_NAMESPACE, MAX_RETRIES_PROPERTY_NAME);\n if (maxRetriesString != null) {\n try {\n defaultMaxRetries = Integer.parseInt(maxRetriesString);\n } catch (NumberFormatException nfe) {\n // uses default\n }\n }\n\n String retrySleepTimeString = cm.getString(SCREENING_LOGGER_NAMESPACE, RETRY_SLEEP_TIME_PROPERTY_NAME);\n if (retrySleepTimeString != null) {\n try {\n defaultRetrySleepTime = Integer.parseInt(retrySleepTimeString);\n } catch (NumberFormatException nfe) {\n // uses default\n }\n }\n } catch (Exception e) {\n // uses default\n }\n\n maxRetries = defaultMaxRetries;\n retrySleepTime = defaultRetrySleepTime;\n\n initializeIdGen();\n }",
"public interface ILog {\n void print(LogLevel logLevel, String tag, String msg, long tid);\n}",
"private DAOLogger() {\n\t}",
"public TicketLogEntry(int r, String l, User u, Timestamp d){\n\t\tid = 0;\n\t\tticketID = r;\n\t\tlogEntry = l;\n\t\tperformedBy = u;\n\t\tperformedDate = d;\n\t}",
"@Override\r\n\tpublic ItemLog createItemLog() {\n\t\treturn new HpLog();\r\n\t}",
"public OrderLogRecord() {\n super(OrderLog.ORDER_LOG);\n }",
"public NewCommand(ApplicationData data) {\n super(\"NewCommand\");\n this.data = data;\n // configure log4j using resource URL APF-548\n DOMConfigurator.configure(getClass().getResource(\"/META-INF/log4j.xml\"));\n log = getLogger(NewCommand.class);\n\n }",
"protected String logInstanceName() {\n\t\treturn getClass().getName();\n\t}",
"public DebugLogEntry(DebugLogEntry source) {\n if (source.Id != null) {\n this.Id = new String(source.Id);\n }\n if (source.Event != null) {\n this.Event = new String(source.Event);\n }\n if (source.LogType != null) {\n this.LogType = new String(source.LogType);\n }\n if (source.Timestamp != null) {\n this.Timestamp = new Long(source.Timestamp);\n }\n if (source.Result != null) {\n this.Result = new String(source.Result);\n }\n if (source.Data != null) {\n this.Data = new String(source.Data);\n }\n if (source.Topic != null) {\n this.Topic = new String(source.Topic);\n }\n if (source.DeviceName != null) {\n this.DeviceName = new String(source.DeviceName);\n }\n }",
"private LogEvent()\n\t{\n\t\tsuper();\n\t}",
"public static final Logger createLogger() {\n\t\tLogger logger = Logger.getLogger(ProcessDatabase.class.getName());\n\t\ttry {\n\t\t\tFileHandler fh = new FileHandler();\n\t\t\tfh.setFormatter(new SimpleFormatter());\n\t\t\tlogger.addHandler(fh);\n\t\t} catch (SecurityException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn logger;\n\t}",
"public ServicioLogger() {\n }",
"public Logger2 (String logFileName) {\n this.logFileName = logFileName;\n }",
"public SyslogRecordPidParser() {\n }",
"public LogEntry(String logData) {\n\n this.logData = logData;\n }",
"public static void setupElementLogger(String elementId, long logSize) throws IOException {\n\t\tint maxFileSize = (int) (logSize * 1_000_000); \n\t\tint logFileCount = Math.round(logSize);\n\t\tfinal File logDirectory = new File(Configuration.getLogDiskDirectory());\n\n\t\tlogDirectory.mkdirs();\n\n\t\tUserPrincipalLookupService lookupservice = FileSystems.getDefault().getUserPrincipalLookupService();\n\t\tfinal GroupPrincipal group = lookupservice.lookupPrincipalByGroupName(\"iofog\");\n\t\tFiles.getFileAttributeView(logDirectory.toPath(), PosixFileAttributeView.class,\n\t\t\t\tLinkOption.NOFOLLOW_LINKS).setGroup(group);\n\t\tSet<PosixFilePermission> perms = PosixFilePermissions.fromString(\"rwxrwx---\");\n\t\tFiles.setPosixFilePermissions(logDirectory.toPath(), perms);\n\n\t\tfinal String logFilePattern = logDirectory.getPath() + \"/\" + elementId + \".%g.log\";\n\t\tLogger logger = elementLogger.get(elementId);\n\t\t\n\t\tif (logger != null) {\n\t\t\tfor (Handler f : logger.getHandlers())\n\t\t\t\tf.close();\n\t\t} \n\t\t\n\t\tHandler logFileHandler = new FileHandler(logFilePattern, maxFileSize / logFileCount, logFileCount);\n\t\n\t\tlogFileHandler.setFormatter(new LogFormatter());\n\t\n\t\tlogger = Logger.getLogger(elementId);\n\t\tlogger.addHandler(logFileHandler);\n\n\t\tlogger.setUseParentHandlers(false);\n\n\t\telementLogger.put(elementId, logger);\n\t}",
"public String getInstanceIdentifier();",
"public Integer getLogid() {\n return logid;\n }",
"private JavaUtilLogHandlers() { }",
"public ProcessInfoLog (int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg)\n\t{\n\t\tthis (s_Log_ID++, P_ID, P_Date, P_Number, P_Msg);\n\t}",
"private LogRecord createLogRecordInOtherThread() {\n class MyThread extends Thread {\n\n LogRecord record;\n\n public void run() {\n record = new LogRecord(Level.INFO, \"foobar\");\n }\n\n public LogRecord getRecord() {\n return record;\n }\n };\n\n MyThread theThread = new MyThread();\n try {\n theThread.start();\n theThread.join();\n return theThread.getRecord();\n } catch (InterruptedException _) {\n return null;\n }\n }",
"public Logger(int loglv) {\r\n LOGLV = loglv;\r\n }",
"public LogPoster() {\n\t\t\n\t}",
"public InstrumentedFileOutputStream(String name, String recId) \r\n throws FileNotFoundException {\r\n super(name);\r\n this.recId = recId;\r\n }",
"public Log(String name) {\n this.name = name;\n this.entries = new ArrayList<>();\n }",
"public interface ILog {\n\n /**\n * Send an information level log message, used by time-related log.\n *\n * @param tag Used to identify the source of a log message. It usually identifies\n * the class or activity where the log call occurs.\n * @param msg The message you would like logged.\n */\n void info(String tag, String msg);\n\n\n /**\n * Send an warning level log message, used by exception-related log.\n *\n * @param tag Used to identify the source of a log message. It usually identifies\n * the class or activity where the log call occurs.\n * @param msg The message you would like logged.\n */\n void warn(String tag, String msg);\n}",
"public ProductTestReport(Long id)\n/* 26: */ {\n/* 27:27 */ super(id);\n/* 28: */ }",
"@NonNull\n public Builder setIdentifier(@NonNull String identifier) {\n require(!TextUtils.isEmpty(identifier), \"identifer must not be null or empty\");\n mProtoBuilder.id = identifier;\n return this;\n }",
"public ZLogRecord() {\n super(ZLog.Z_LOG);\n }",
"public LogContract(){}",
"public LogEntry generateLogEntry() {\n long time = getTime();\n int bloodGlucose = getBloodGlucose();\n double bolus = getBolus();\n int carbohydrate = getCarbohydrate();\n return new LogEntry(time, bloodGlucose, bolus, carbohydrate);\n }",
"public InstrumentedFileOutputStream(FileDescriptor fdObj, String recId) {\r\n super(fdObj);\r\n this.recId = recId;\r\n }",
"LogRecorder getLogRecorder();",
"LogRecorder getLogRecorder();",
"public Systemlog (java.lang.Integer rowid) {\n\t\tsuper(rowid);\n\t}",
"Log getHarvestLog(String dsID) throws RepoxException;",
"private Uniqueid() {\n\n }",
"public Log(String fp)\n {\n this.filePath = fp;\n\n open();\n }",
"AnonymousClass1fD(String str) {\n this.loggingValue = str;\n }",
"public FoodLogEntry(String name) {\n super(name);\n }",
"public Log() { //Null constructor is adequate as all values start at zero\n\t}",
"private FormatIdentification()\n\t{\n\t}",
"public JobLog setId(long id) {\n this.id = id;\n return this;\n }",
"public OrderLogRecord(Integer id, Integer orderId, Byte status, Timestamp changeTime) {\n super(OrderLog.ORDER_LOG);\n\n set(0, id);\n set(1, orderId);\n set(2, status);\n set(3, changeTime);\n }",
"public Builder setIdentifier(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n identifier_ = value;\n onChanged();\n return this;\n }",
"String getInstanceID();",
"public Action(long id) {\n this(id, \"\");\n }"
] | [
"0.6313379",
"0.62124246",
"0.61748624",
"0.60768145",
"0.5957991",
"0.59412587",
"0.589571",
"0.5832952",
"0.58108455",
"0.56492263",
"0.5604198",
"0.56021726",
"0.55502576",
"0.55487084",
"0.5522867",
"0.5503147",
"0.54947364",
"0.54856414",
"0.54304194",
"0.5429424",
"0.54197437",
"0.5414613",
"0.5414572",
"0.5408784",
"0.54075176",
"0.53759706",
"0.5360049",
"0.53498554",
"0.5328222",
"0.53051203",
"0.52760684",
"0.5253094",
"0.5253069",
"0.5239806",
"0.52348536",
"0.5217793",
"0.520629",
"0.517592",
"0.51724946",
"0.51532185",
"0.51489675",
"0.51133275",
"0.511225",
"0.51043135",
"0.51034594",
"0.5095701",
"0.509508",
"0.50902086",
"0.50898063",
"0.5081464",
"0.5081004",
"0.5079269",
"0.5073622",
"0.5063599",
"0.505907",
"0.5052173",
"0.5048604",
"0.50409347",
"0.5033665",
"0.5026927",
"0.5026037",
"0.50221014",
"0.50172544",
"0.501718",
"0.50126606",
"0.5011516",
"0.5010364",
"0.50089276",
"0.4991641",
"0.49912652",
"0.49903655",
"0.49882865",
"0.49834237",
"0.49740955",
"0.49681428",
"0.4966709",
"0.49653974",
"0.496395",
"0.49629876",
"0.4957765",
"0.4957691",
"0.49521744",
"0.49515775",
"0.49455777",
"0.49379906",
"0.49326912",
"0.49275336",
"0.49275336",
"0.49213737",
"0.49135745",
"0.4910976",
"0.4908854",
"0.49048823",
"0.49042583",
"0.4904179",
"0.49018684",
"0.49014592",
"0.48957327",
"0.48919815",
"0.48872647",
"0.48732585"
] | 0.0 | -1 |
Command Methods Execution method for this Command | @Override
public Processing onExecute(Context<String, Object> context) {
super.onExecute(context);
return Processing.FINISHED;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void execute() {\n\t\ttry {\n\t\t\tMethod method = this.getClass().getMethod(parseMethod(), new Class[0]);\n\t\t\tmethod.invoke(this, new Object[0]);\n\t\t} catch (NoSuchMethodException | SecurityException e) {\n\t\t\tSystem.out.println(\"Unknown option: \" + command);\n\t\t} catch (IllegalAccessException | IllegalArgumentException e) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"Invalid usage of: \" + command + \", the following error \" + \"was given: \" + e.getMessage());\n\t\t} catch (InvocationTargetException e) {\n\t\t\tSystem.out.println(\"An error occurred while executing '\" + command + \"'. The \"\n\t\t\t\t\t+ \"following error was given: \" + e.getCause());\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\r\n public void execute(Command command) {\n\r\n }",
"@Override\n public void Execute() {\n\n }",
"public void Execute() {\n\n }",
"protected void executeVmCommand() {\n }",
"protected void execute() {\n\n\t}",
"public void execute() {\n\n\t}",
"protected void execute() {}",
"protected void execute() {\n \t\n }",
"protected void execute() {\n \t\n }",
"protected void execute() {\r\n }",
"protected void execute() {\n\t\t\n\t}",
"public void execute() {\r\n\t\r\n\t}",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"protected void execute() {\n }",
"public void execute(){\n\t\t\n\t}",
"protected void execute()\n {\n }",
"protected void execute() {\n\t}",
"void execute() throws CommandExecutionException;",
"public void execute() {\n\t\t\n\t}",
"public void execute() throws MissingDescriptionException, InvalidCommandException {\n }",
"private void executeCommand() {\n Command command = null;\n\n switch (commandType) {\n case LIST:\n command = new ListCommand(taskManager, parameterData.getDescription());\n break;\n case DONE:\n command = new DoneCommand(taskManager, parameterData.getTaskNumber());\n break;\n case TODO:\n command = new AddCommand(taskManager, TaskType.TODO, parameterData.getDescription());\n break;\n case DEADLINE:\n command = new AddCommand(taskManager,\n TaskType.DEADLINE, parameterData.getDescription(),\n parameterData.getDateTime());\n break;\n case EVENT:\n command = new AddCommand(taskManager,\n TaskType.EVENT, parameterData.getDescription(),\n parameterData.getDateTime());\n break;\n case DELETE:\n command = new DeleteCommand(taskManager, parameterData.getTaskNumber());\n break;\n case BYE:\n command = new ByeCommand(taskManager);\n break;\n case FIND:\n command = new FindCommand(taskManager,\n parameterData.getFilterString(),\n parameterData.getMatchDate(),\n parameterData.getTimeSearch());\n break;\n case HELP:\n command = new HelpCommand(taskManager);\n break;\n default:\n commandUi.printNoCommandRan();\n }\n\n try {\n command.execute();\n } catch (IndexOutOfBoundsException e) {\n commandUi.printTaskDoneNotInRange();\n } catch (IllegalStateException e) {\n commandUi.printInvalidParameters();\n }\n }",
"public void execute() {\n }",
"protected void execute()\n\t{\n\t}",
"public void execute() {\n\t\t\r\n\t}",
"public void execute() {\n\t\t\r\n\t}",
"public void execute() {\n\t\t\r\n\t}",
"private interface Command {\n public void execute();\n }",
"protected void execute() {\n\n\n \n }",
"public abstract boolean commandExecution(CommandSender sender, String label, String[] args);",
"@Override\r\n public void execute()\r\n {\r\n printInvalidCommandMessage();\r\n }",
"@Override\n protected void execute() {\n \n }",
"public abstract void execute(CommandSender sender, String[] args);",
"public void execute(){\n\n }",
"public void execute(Command command){\n command.run(field);\n }",
"CommandResult execute();",
"@Override\r\n\tprotected void execute() {\r\n\t}",
"@Override\n public void execute(String[] args) {\n\n }",
"public void execute() {\n if (valid()) {\n // behavior of the concrete command\n this.target_territory numArmies += to_deploy;\n }\n }",
"protected void execute() {\n command.start();\n }",
"@Override\n protected void execute() {\n }",
"@Override\n protected void execute() {\n }",
"@Override\n protected void execute() {\n }",
"public abstract void doCommand(String command);",
"@Override\n public void execute() {}",
"@Override\n public void execute() {\n }",
"@Override\n\tpublic void execute() {\n\t\tcmdReceiver.send();\n\t}",
"@Test\n\tpublic void execute() {\n\t\tcommand.execute(request);\n\t}",
"@Override\r\n\tpublic void execute() {\n\t\tfor (int i = 0; i < command.length; i++) {\r\n\t\t\tcommand[i].execute();\r\n\t\t}\r\n\t}",
"private Command() {\n initFields();\n }",
"@Override\n protected void execute() {\n\n }",
"@Override\n\tpublic void execute() {\n\t\t\n\t}",
"@Override\r\n\tprotected void processExecute() {\n\r\n\t}",
"public abstract String getCommand();",
"public interface Command {\n\t/**\n *it is used to be defined and to call engine methods\n */\n public void execute();\n \n}",
"@Override\r\n\tpublic void execute() {\n\t}",
"@Override\r\n\tpublic void execute() {\n\t}",
"Command handleExecute(CommandExecute commandExecute);",
"public void execute() {\n // empty\n }",
"public void run() {\n\t\texecuteCommand( client, false );\n\t}",
"public abstract void exec(CommandSender sender, String[] args);",
"@Override\n public void execute(String commandText) throws Exception {\n parse(commandText);\n }",
"public void execute();",
"public void execute();",
"public void execute();",
"public void execute();",
"@Override\n public void execute() {\n \n \n }",
"protected abstract DispatchOutcome dispatchCommand(CommandEnvelope cmd);",
"@Override\r\n\tpublic void execute() {\n\r\n\t}",
"@Override\n\tpublic void execute() {\n\t}",
"@Override\r\n\tpublic void execute() {\n }",
"@Override\n\tpublic void execute() {\n\t\tfor(SetValueCommand command : setCommands){\n\t\t\tcommand.execute();\n\t\t}\n\t\tif (layoutCommand != null){\n\t\t\tlayoutCommand.execute();\n\t\t}\n\t}",
"protected void execute() {\n \tRobot.telemetry.setAutonomousStatus(\"Running \" + commandName + \": \" + distance);\n \tRobot.drivetrain.arcadeDrive(Robot.driveDistancePID.getOutput(), 0.0, false);\n }",
"void legalCommand();",
"@Override\n\t\tvoid runCommand() {\n\t\t\ttrigger.execute();\n\t\t}",
"CommandResult execute(String commandText) throws CommandException, ParseException, UnmappedPanelException;",
"public void execute() {\n\n try {\n checkTask();\n Ui.printLines();\n Ui.printMatchingTasks();\n int index = 1;\n\n for (Task task : TaskList.taskArrayList) {\n String task_description = task.toString();\n\n if (task_description.contains(command)) {\n System.out.println(index + \". \" + task);\n index++;\n }\n\n }\n Ui.printLines();\n } catch (InvalidTask invalidTask) {\n Ui.printLines();\n Ui.printInvalidTask();\n Ui.printLines();\n }\n }",
"protected abstract void execute();",
"public interface Command {\n\tvoid execute();\n}",
"@Override\n\tprotected void run() {\n\t\tUtils.executeAndWaitForCommand(this.getHMetisExec());\n\t}",
"public void execute() {\n setExecuted(true);\n }",
"public interface Command {\n\n\n}",
"public ResponseToCommand execute() {\n throw new UnsupportedOperationException(Messages.COMMAND_ABSTRACT_METHOD_ERROR);\n }",
"@Override\n public void execute() {\n if(state.getState()!=1) {\n client.printParseMessage();\n return;\n } else if(inputArgs.length < 1) {\n System.out.println(client.strings.getString(\"manage_command_message\"));\n return;\n }\n try {\n client.setDraftTag(inputArgs[0]);\n channel.send(new ReadRequest(client.getDraftTag()));\n ReadReply reply = (ReadReply) channel.receive();\n if(!reply.lines.isEmpty()) {\n String replyLine = reply.lines.get(reply.lines.size() - 1);\n if(Push.CLOSE_LINE.equals(replyLine)) {\n System.out.println(client.strings.getString(\"manage_close_command_message\"));\n return;\n }\n }\n } catch (IOException | ClassNotFoundException ex) {\n Logger.getLogger(ReadCommand.class.getName())\n .log(Level.SEVERE, null, ex);\n }\n state.setState(2);\n }",
"@Override\n public void executeCommand() {\n this.setJCLIOptions();\n String args[] = this.convertToArray();\n try {\n CommandLine jcCmd = this.jcParser.parse(this.jcOptions, args);\n if (jcCmd.hasOption(\"h\")) {\n this.printHelp();\n }\n if (jcCmd.hasOption(\"ttb\")) {\n this.texttobinary = true;\n }\n if (jcCmd.hasOption(\"btt\")) {\n this.binarytotext = true;\n }\n if (jcCmd.hasOption(\"f\")) {\n if ((this.done == false) && (this.jcError == false)) {\n this.filePath = jcCmd.getOptionValue(\"f\");\n }\n }\n if ((this.done == false) && (this.jcError == false) && (this.texttobinary == true)) {\n if ((this.filePath == null) || (this.filePath.length() == 0)) {\n this.jcError = true;\n this.addErrorMessages(\"Error : No File defined.\");\n }\n if (this.jcError == false) {\n if (isFileCanRead(this.filePath) == false) {\n this.jcError = true;\n this.addErrorMessages(\"Error : File does not exsist / File Unreadable.\");\n }\n }\n\n if (this.jcError == false) {\n String txt = this.getFileContents(this.filePath);\n this.resultString.append(this.convertTextToBinary(txt));\n this.done = true;\n }\n }\n if ((this.done == false) && (this.jcError == false) && (this.binarytotext == true)) {\n String txt = this.getFileContents(this.filePath);\n this.resultString.append(this.convertBinaryToText(txt));\n this.done = true;\n }\n\n\n if (this.done == true) {\n System.out.println(this.resultString);\n }\n\n\n } catch (org.apache.commons.cli.ParseException ex) {\n this.setJcError(true);\n this.addErrorMessages(\"Error :\" + ex.getMessage());\n }\n }",
"@Override\n\tpublic CommandProxy execute() {\n\t\tCommandProxy proxy = build();\n\t\tproxy.execute();\n\t\treturn proxy;\n\t}",
"protected void execute() { \n\n double move = driveCommand.getValue();\n double turn = angleCommand.getValue();\n\n SmartDashboard.putNumber(\"move\", move);\n SmartDashboard.putNumber(\"turn\", turn);\n //add the values to the drive class\n Robot.drive.arcadeDrive(-move, turn);\n // Robot.drive.setMoveVisionAssist(move);\n // Robot.drive.setTurnVisionAssist(turn);\n }",
"public abstract boolean doCommand() throws Exception;",
"public interface Command {\n\n /**\n * Executes given command, returns the results.\n *\n * <p><b>Note:</b> Command only executes by a player.</p>\n *\n * @param player Player executed command\n * @param params Passed command parameters\n * @return Command's result was executed\n */\n @NotNull\n CommandResult onCommand(@NotNull Player player, @NotNull String[] params);\n\n /**\n * Executes given command, returns the results.\n *\n * <p><b>Note:</b> Command only executes in the console.</p>\n *\n * @param console Console sender executed command\n * @param params Passed command parameters\n * @return Command's result was executed\n */\n @NotNull\n CommandResult onConsoleCommand(@NotNull ConsoleCommandSender console,\n @NotNull String[] params);\n\n /**\n * Requests a list of possible completions for a command parameters.\n *\n * <p><b>Note:</b> Request will be executed if command were executed by a player.</p>\n *\n * @param player Player executed command\n * @param params The parameters pass to the to the command, including final partial parameter to\n * be completed and command label\n * @return A result contains a list of possible completions for the final argument, or an empty\n * list to default to the command executor and string to search for.\n */\n @NotNull\n TabResult onTab(@NotNull Player player, @NotNull String[] params);\n\n /**\n * Requests a list of possible completions for a command parameters.\n *\n * <p><b>Note:</b> Request will be executed if command was executed in the console.</p>\n *\n * @param console Console sender executed command\n * @param params The parameters pass to the to the command, including final partial parameter to\n * be completed and command label\n * @return A result contains a list of possible completions for the final argument, or an empty\n * list to default to the command executor and string to search for.\n */\n @NotNull\n TabResult onConsoleTab(@NotNull ConsoleCommandSender console,\n @NotNull String[] params);\n\n /**\n * Returns parent {@link Command} of this command.\n *\n * @return Parent of this command\n * @deprecated Rename to {@link #getRoot()}\n */\n @Deprecated\n @Nullable\n Command getParent();\n\n /**\n * Returns root {@link Command} of this command.\n *\n * @return Root of this command\n */\n @Nullable\n Command getRoot();\n\n /**\n * Returns the name of this command.\n *\n * @return Name of this command\n */\n @NotNull\n String getName();\n\n /**\n * Returns the {@link PermissionWrapper} of this command\n *\n * @return The permission wrapper of this command\n */\n @NotNull\n PermissionWrapper getPermission();\n\n /**\n * Get the syntax or example usage of this command.\n *\n * @return Syntax of this command\n */\n @NotNull\n String getSyntax();\n\n /**\n * Gets a brief description of this command\n *\n * @return Description of this command\n */\n @NotNull\n String getDescription();\n\n /**\n * Returns a list of active aliases of this command, include value of {@link #getName()} method.\n *\n * @return List of aliases\n */\n @NotNull\n List<String> getAliases();\n\n String toString();\n}",
"@Override\n protected void execute() {\n \n }",
"public void innerExecute() {\n execute(new ArrayList<>(this.commandList));\n this.commandList.clear();\n }"
] | [
"0.7551213",
"0.7448439",
"0.7409188",
"0.7349227",
"0.71592647",
"0.7125203",
"0.7093075",
"0.70756966",
"0.70711386",
"0.70711386",
"0.706951",
"0.7063765",
"0.70392835",
"0.703521",
"0.703521",
"0.703521",
"0.703521",
"0.703521",
"0.703521",
"0.703521",
"0.703521",
"0.703521",
"0.703521",
"0.703521",
"0.703521",
"0.6992877",
"0.6984208",
"0.69635385",
"0.6948524",
"0.6947683",
"0.69433254",
"0.6937649",
"0.6932793",
"0.6922568",
"0.6916472",
"0.6916472",
"0.6916472",
"0.6907325",
"0.6872508",
"0.6870864",
"0.6852913",
"0.68467706",
"0.68092275",
"0.6786679",
"0.67761976",
"0.6762741",
"0.67416614",
"0.67413634",
"0.67400193",
"0.6720189",
"0.67101115",
"0.67101115",
"0.67101115",
"0.6668452",
"0.665924",
"0.6656202",
"0.66506547",
"0.6642745",
"0.664057",
"0.6632027",
"0.6627513",
"0.6617348",
"0.6611394",
"0.66074014",
"0.6598234",
"0.65950096",
"0.65950096",
"0.6590803",
"0.657842",
"0.65586644",
"0.6555718",
"0.6535734",
"0.653041",
"0.653041",
"0.653041",
"0.653041",
"0.6526279",
"0.65092045",
"0.6505308",
"0.6503323",
"0.6498259",
"0.64976114",
"0.6488281",
"0.64874",
"0.64843655",
"0.6483722",
"0.6468243",
"0.6447994",
"0.6440915",
"0.64359236",
"0.6427474",
"0.64186937",
"0.64078945",
"0.64072436",
"0.6401109",
"0.6398266",
"0.6391699",
"0.638574",
"0.6368189",
"0.63676506",
"0.63668984"
] | 0.0 | -1 |
Creates new form companyDetails | public companyDetails() {
initComponents();
showTableData();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@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 }",
"@Override\n @Transactional\n public String create(Company company, BindingResult result) {\n\n\t// Security check.\n\tif (!this.authHelper.isSuperAdmin()) {\n\t this.messageHelper.unauthorizedID(Company.OBJECT_NAME, company.getId());\n\t return AlertBoxFactory.ERROR;\n\t}\n\n\t// Service layer form validation.\n\tthis.companyValidator.validate(company, result);\n\tif (result.hasErrors()) {\n\t return this.validationHelper.errorMessageHTML(result);\n\t}\n\n\tthis.companyDAO.create(company);\n\n\t// Log.\n\tthis.messageHelper.auditableID(AuditAction.ACTION_CREATE, Company.OBJECT_NAME, company.getId(),\n\t\tcompany.getName());\n\n\t// Do actual service and construct response.\n\treturn AlertBoxFactory.SUCCESS.generateCreate(Company.OBJECT_NAME, company.getName());\n }",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData addNewAuditingCompany();",
"public void setCompany(String company) {\n this.company = company;\n }",
"static void addNewCompany(SQLiteDatabase db, Company company) {\n ContentValues values = new ContentValues();\n values.put(COMPANY_ID, company.companyId);\n values.put(COMPANY_NAME, company.name);\n values.put(COMPANY_LOGO, company.companyLogo);\n values.put(COMPANY_DESCRIPTION, company.companyDescription);\n values.put(COMPANY_LAST_UPDATED, company.lastUpdatedDate);\n if (company.wasDeleted)\n values.put(COMPANY_WAS_DELETED, 1);\n else\n values.put(COMPANY_WAS_DELETED, 0);\n\n db.insert(COMPANY_TABLE, COMPANY_ID, values);\n }",
"public static Company createCompany() {\r\n\t\treturn createCompany(1, \"Pepcus\", \"Software\", \"PEP\", new Date(), \"Special\", \"This is search help\");\r\n\t}",
"public Company saveCompany(Company company);",
"@RequestMapping(path = \"/create\", method = RequestMethod.POST)\n\tpublic ResponseEntity<RestResponse<CompanyDTO>> create(@RequestBody CompanyDTO request) {\n\n\t\tCompanyDTO result = companyService.create(request);\n\t\t\n\t\tRestResponse<CompanyDTO> restResponse = \n\t\t\t\tnew RestResponse<CompanyDTO>(RestResponseCodes.OK.getCode(), RestResponseCodes.OK.getDescription(), result);\n\t\t\n\t\treturn new ResponseEntity<RestResponse<CompanyDTO>>(restResponse, HttpStatus.OK);\n\t\t\t\n\t}",
"@GetMapping(\"/new\")\n public String newCustomer(Model model) {\n Customer customer = new Customer();\n Address actualAddress = new Address();\n Address registeredAddress = new Address();\n customer.setActualAddress(actualAddress);\n customer.setRegisteredAddress(registeredAddress);\n model.addAttribute(CUSTOMER, customer);\n return NEW_VIEW;\n }",
"@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}",
"public Company() {\r\n\t\tsuper();\r\n\t}",
"public void setCompany(String company) {\r\n\t\tthis.company = company;\r\n\t}",
"public void insertNew(Company company,\n\t\t\tDataImportParametersDTO dataImportParametersDTO, Long companyId) {\n\n\t\tList<DataImportLogDTO> insertOnlyLogs = new ArrayList<DataImportLogDTO>();\n\t\tList<DataImportKeyValueDTO> companyColName = dataImportParametersDTO\n\t\t\t\t.getEmpColName();\n\t\tString rowNumber = dataImportParametersDTO.getRowNumber();\n\t\tboolean isDynamic = dataImportParametersDTO.isDynamic();\n\t\tList<Long> formIds = dataImportParametersDTO.getFormIds();\n\t\tlong entityId = dataImportParametersDTO.getEntityId();\n\t\tList<String> tableNames = dataImportParametersDTO.getTableNames();\n\t\tList<HashMap<String, String>> colFormMapList = dataImportParametersDTO\n\t\t\t\t.getColFormMapList();\n\t\tList<String> dynRecordsName = dataImportParametersDTO\n\t\t\t\t.getDynRecordsName();\n\n\t\ttry {\n\n\t\t\tCompanyConditionDTO companyDTO = new CompanyConditionDTO();\n\t\t\tcompanyDTO.setCompanyCode(company.getCompanyCode());\n\t\t\tCompany existingCompanyRecord = companyDAO\n\t\t\t\t\t.findByCondition(companyDTO);\n\n\t\t\tif (companyColName.size() == 1\n\t\t\t\t\t&& companyColName\n\t\t\t\t\t\t\t.get(0)\n\t\t\t\t\t\t\t.getMethodName()\n\t\t\t\t\t\t\t.equalsIgnoreCase(\n\t\t\t\t\t\t\t\t\tPayAsiaConstants.CAMEL_CASE_COMPANY_CODE)) {\n\t\t\t\tif (existingCompanyRecord != null) {\n\t\t\t\t\tcompany.setCompanyId(existingCompanyRecord.getCompanyId());\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tif (existingCompanyRecord == null) {\n\t\t\t\t\tcompany = companyDAO.saveReturn(company);\n\t\t\t\t} else {\n\t\t\t\t\tcompany.setCompanyId(existingCompanyRecord.getCompanyId());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isDynamic) {\n\t\t\t\tfor (Long formId : formIds) {\n\t\t\t\t\tDynamicFormRecord dynamicFormRecord = new DynamicFormRecord();\n\n\t\t\t\t\tdynamicFormRecord.setForm_ID(formId);\n\t\t\t\t\tdynamicFormRecord.setCompany_ID(companyId);\n\t\t\t\t\tdynamicFormRecord.setEntity_ID(entityId);\n\t\t\t\t\tdynamicFormRecord.setEntityKey(company.getCompanyId());\n\t\t\t\t\tDynamicFormRecord existingFormRecord = dynamicFormRecordDAO\n\t\t\t\t\t\t\t.getEmpRecords(company.getCompanyId(), null,\n\t\t\t\t\t\t\t\t\tformId, entityId, companyId);\n\n\t\t\t\t\tsuper.setDynamicValues(dataImportParametersDTO, tableNames,\n\t\t\t\t\t\t\tcolFormMapList, dynRecordsName, formId,\n\t\t\t\t\t\t\tdynamicFormRecord, existingFormRecord, companyId,\n\t\t\t\t\t\t\t\"update\");\n\n\t\t\t\t\tif (existingFormRecord == null) {\n\n\t\t\t\t\t\tdynamicFormRecordDAO.save(dynamicFormRecord);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (PayAsiaSystemException ex) {\n\t\t\tsuper.handleException(rowNumber, insertOnlyLogs, ex);\n\t\t}\n\n\t\tif (insertOnlyLogs != null && !insertOnlyLogs.isEmpty()) {\n\t\t\tthrow new PayAsiaDataException(insertOnlyLogs);\n\t\t}\n\t}",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData addNewCompanyBaseData();",
"@PostMapping(\"/company-types\")\n @Timed\n public ResponseEntity<CompanyType> createCompanyType(@Valid @RequestBody CompanyType companyType) throws URISyntaxException {\n log.debug(\"REST request to save CompanyType : {}\", companyType);\n if (companyType.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"companyType\", \"idexists\", \"A new companyType cannot already have an ID\")).body(null);\n }\n CompanyType result = companyTypeRepository.save(companyType);\n companyTypeSearchRepository.save(result);\n return ResponseEntity.created(new URI(\"/api/company-types/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"companyType\", result.getId().toString()))\n .body(result);\n }",
"public void setCompanyId(long companyId);",
"public void setCompanyId(long companyId);",
"public void setCompanyId(long companyId);",
"public void setCompanyId(long companyId);",
"public void setCompanyId(long companyId);",
"@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 setCompany(String company) {\n\t\tthis.company = company;\n\t}",
"@GetMapping(\"/create\")\n public ModelAndView create(@ModelAttribute(\"form\") final CardCreateForm form) {\n return getCreateForm(form);\n }",
"@RequestMapping(\"/new\")\n\tpublic String displayProjectForm(Model model) {\n\t\tProject aproject = new Project();\n\t//Iterable<Employee> employees = \tpro.getall();\n\t\n\t\tmodel.addAttribute(\"project\", aproject);\n\n\t\t//model.addAttribute(\"allEmployees\", employees);\n\t\t\n\t\t\n\t\treturn \"newproject\";\n\t\t\n\t}",
"public Company() {\n\t\tsuper();\n\t}",
"public void setCompanyId(int companyId) {\n this.companyId = companyId;\n }",
"public Company addCompany(int companyId, String companyName, String companyPassword) {\n\t\t \n\t\t ContentValues values = new ContentValues();\n\t\t values.put(MySQLiteHelper.COLUMN_COMPANY_ID, companyId);\n\t\t values.put(MySQLiteHelper.COLUMN_COMPANY_NAME, companyName);\n\t\t values.put(MySQLiteHelper.COLUMN_COMPANY_PASSWORD, companyPassword);\n\n\t\t long insertId = mDatabase.insert(MySQLiteHelper.TABLE_COMPANIES, null, values);\n\t\t Cursor cursor = mDatabase.query(MySQLiteHelper.TABLE_COMPANIES,\n\t\t mAllColumns, null, null,\n\t\t null, null, null);\n\t\t cursor.moveToFirst();\n\t\t Company newCompany = cursorToCompany(cursor);\n\t\t cursor.close();\n\t\t return newCompany;\n\t\t }",
"public void createCompany(Company company) throws ApplicationException {\n\t\tConnection connection = null;\n\t\tPreparedStatement preparedStatement = null;\n\n\t\ttry {\n\t\t\t// Establish a connection from the connection manager\n\t\t\tconnection = JdbcUtils.getConnection();\n\n\t\t\t// Creating the SQL query\n\t\t\t// CompanyID is defined as a primary key and auto incremented\n\t\t\tString sqlStatement = \"INSERT INTO companies (company_Name) VALUES (?)\";\n\n\t\t\t// Combining between the syntax and our connection\n\t\t\tpreparedStatement = connection.prepareStatement(sqlStatement);\n\n\t\t\t// Replacing the question marks in the statement above with the relevant data\n\t\t\tpreparedStatement.setString(1, company.getName());\n\n\t\t\t// Executing the update\n\t\t\tpreparedStatement.executeUpdate();\n\n\t\t} catch (SQLException e) {\n\t\t\t// **If there was an exception in the \"try\" block above, it is caught here and\n\t\t\t// notifies a level above.\n\t\t\te.printStackTrace();\n\t\t\tthrow new ApplicationException(e,ErrorType.GENERAL_ERROR,\n\t\t\t\t\tDateUtils.getCurrentDateAndTime() + \"FAILED to create a company\");\n\t\t} finally {\n\t\t\t// Closing the resources\n\t\t\tJdbcUtils.closeResources(connection, preparedStatement);\n\t\t}\n\t}",
"public void setCompanyId(String companyId) {\r\n this.companyId = companyId;\r\n }",
"public void setCompanyId(String companyId) {\r\n this.companyId = companyId;\r\n }",
"@PostMapping(\"/new\")\n public ResponseEntity create(@RequestBody CityInfo cityInfo){\n service.create(cityInfo);\n return new ResponseEntity(HttpStatus.CREATED);\n }",
"@Override\n\tpublic void save(Company company) {\n\t\t\n\t}",
"public void setCompanyId(long companyId) {\n this.companyId = companyId;\n }",
"public long createcompanyInfo(String companyName, String companyDescription, String companyWebsite, String companyImg) {\n\t\tContentValues initialValues = createContentValues(companyName, companyDescription, companyWebsite,\n\t\t\t\tcompanyImg);\n\n\t\treturn database.insert(DATABASE_TABLE, null, initialValues);\n\t}",
"@PostMapping(\"/createAccount\")\n public ModelAndView createNewAccount(AccountCreateDTO createDTO){\n ModelAndView modelAndView = new ModelAndView();\n\n accountService.createAccount(createDTO);\n modelAndView.addObject(\"successMessage\", \"Account has been created\");\n modelAndView.setViewName(\"accountPage\");\n\n return modelAndView;\n }",
"@Override\r\n\tpublic void insertCompany(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 = \"insert into Company(ID, COMP_NAME, PASSWORD, EMAIL) values (?,?,?,?)\";\r\n\r\n\t\ttry (PreparedStatement preparedStatement = connection.prepareStatement(sql)) {\r\n\r\n\t\t\tpreparedStatement.setLong(1, company.getCompanyId());\r\n\t\t\tpreparedStatement.setString(2, company.getCompanyName());\r\n\t\t\tpreparedStatement.setString(3, company.getCompanyPassword());\r\n\t\t\tpreparedStatement.setString(4, company.getCompanyEmail());\r\n\r\n\t\t\tpreparedStatement.executeUpdate();\r\n\r\n\t\t\tSystem.out.println(\"Company created: \" + company.toString());\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new Exception(\"DB error - Company creation failed. companyId: \"+ company.getCompanyId());\r\n\t\t}catch (Exception e) {\r\n\t\t\tthrow new Exception(\"Company creation failed. companyId: \"+ company.getCompanyId());\r\n\t\t} \r\n\t\tfinally {\r\n\t\t\tconnection.close();\r\n\t\t\tconnectionPool.returnConnection(connection);\r\n\t\t}\r\n\r\n\t}",
"public Company(int companyId, String name, String companyEmail, String companyPassword) {\r\n\t\tsuper();\r\n\t\tthis.companyId = companyId;\r\n\t\tthis.name = name;\r\n\t\tthis.companyEmail = companyEmail;\r\n\t\tthis.companyPassword = companyPassword;\r\n\t}",
"public void setCompany(Company company, Context context) {\n // TODO: Perform networking operations here to upload company to database\n this.company = company;\n invoiceController = new InvoiceController(context, company);\n }",
"@Override\n\tpublic void addCompany(BeanCompany Company) {\n\t\tSession session = HibernateUtil.getSessionFactory().getCurrentSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry {\n\t\t\tsession.save(Company);\n\t\t\ttx.commit();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t}\n\t}",
"public void setCompanyId(Long companyId) {\n this.companyId = companyId;\n }",
"public void setCompanyId(Integer companyId) {\n this.companyId = companyId;\n }",
"public void setCompanyId(Integer companyId) {\n this.companyId = companyId;\n }",
"@Override\r\n\tpublic void addCompany(Company company) throws CouponSystemException {\r\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\tcon = ConnectionPool.getInstance().getConnection();\r\n\t\t\tString sql = \"insert into companies values(0, ?, ?, ?)\";\r\n\t\t\tPreparedStatement pstmt = con.prepareStatement(sql);\r\n\t\t\tif (company != null) {\r\n\t\t\t\tpstmt.setString(1, company.getCompName());\r\n\t\t\t\tpstmt.setString(2, company.getCompEmail());\r\n\t\t\t\tpstmt.setString(3, company.getCompPass());\r\n\t\t\t\tpstmt.executeUpdate();\r\n\r\n\t\t\t\tSystem.out.println(\"New company was added\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new CouponSystemException(\"addCompany Failed\", e);\r\n\t\t} finally {\r\n\t\t\tif (con != null) {\r\n\t\t\t\tConnectionPool.getInstance().restoreConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@RequestMapping(value = \"/broadband-user/system/company-detail/edit\")\n\tpublic String toCompanyDetailEdit(Model model) {\n\n\t\tmodel.addAttribute(\"panelheading\", \"Company Detail Edit\");\n\t\tmodel.addAttribute(\"action\", \"/broadband-user/system/company-detail/edit\");\n\n\t\tCompanyDetail companyDetail = this.systemService.queryCompanyDetail();\n\n\t\tmodel.addAttribute(\"companyDetail\", companyDetail);\n\n\t\treturn \"broadband-user/system/company-detail\";\n\t}",
"@GetMapping(\"/showNewEmpForm\")\n\tpublic String showNewEmpForm(Model model) {\n\t\tEmployees employee = new Employees();\n\t\tmodel.addAttribute(\"employee\", employee);\n\t\treturn \"new_employee\";\n\t}",
"public static boolean createForm(CompanyList companyList, String companyIdToBeGenerated){\t\r\n\t\t\r\n\t\tboolean isComplete = true;\r\n\t\t// generate report for each company\r\n\t\tfor(Company company : companyList){\t\t\r\n\t\t\tif(company.getEmployeeList().size() == 0){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString companyId = company.getCompanyId();\t\t\t\r\n\t\t\tif(!companyIdToBeGenerated.equalsIgnoreCase(companyId) & !companyIdToBeGenerated.equalsIgnoreCase(ReportCons.ALL_COMPANY)){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Creating thirteenth month pay report for company with ID \"+company.getCompanyId()+\".\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t// making employee bean\t\t\t\r\n\t\t\tEmployeeBean employeeBean = new EmployeeBean();\t\r\n\t\t\temployeeBean.addAll(company.getEmployeeList());\r\n\t\t\t\r\n\t\t\t// creating new form\r\n\t\t\tString year = ReportUtil.getFormattedDate(companyList.getRunDate(), \"yyyy\");\r\n\t\t\tThirteenthMonthPayForm form = new ThirteenthMonthPayForm(employeeBean);\t\r\n\t\t\tform.setYear(year);\r\n\t\t\t\r\n\t\t\t//setting directory path\r\n\t\t\tString directoryName = ReportUtil.getOutputDirectory(year, company.getCompanyId(),\"Thirteenth Month Pay\", \"pdf\",\"annual\");\t\t\t\r\n\t\t\t\r\n\t\t\tFile file = new File(directoryName);\r\n\t\t\t\r\n\t\t\t// creating the form \t\r\n\t\t\ttry {\t\t\t\t\t\t\t\r\n\t\t\t\tform.createFormStream(new FileOutputStream(file));\t\r\n\t\t\t} catch (JRException | IOException e) {\t\t\r\n\t\t\t\tisComplete = false;\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} \t\t\t\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn isComplete;\t\t\r\n\t}",
"public void setCompanyName(String name) {\n this.companyName = name;\n }",
"public Team create(TeamDTO teamForm);",
"@GetMapping(\"/showForm\")\n public String showFormForAdd(Model theModel) {\n Customer theCustomer = new Customer();\n theModel.addAttribute(\"customer\", theCustomer);\n return \"customer-form\";\n }",
"@PostMapping\n\tpublic ReturnMessage insert(\n\t\t\t@RequestParam(value = \"name\") String name,\n\t\t\t@RequestParam(value = \"company\") String company){\n\t\t//Test if valid name and company strings before processing the insert\n\t\tif (validParams(name,company)) {\n\t\t\tPlatform platform = new Platform(name, company);\n\t\t\tgDao.save(platform);\n\t\t\treturn new ReturnMessage(true,platform);\t\n\t\t}\n\t\telse {\n\t\t\treturn new ReturnMessage(false,\"Forbidden empty strings\");\n\t\t}\n\t}",
"public void setCompanyName(String companyName) {\r\n this.companyName = companyName;\r\n }",
"public void setCompanyName(String companyName) {\r\n this.companyName = companyName;\r\n }",
"@RequestMapping(value = \"/saveCompany\", method = RequestMethod.POST)\r\n\t\tpublic ModelAndView saveCompany( HttpServletRequest request,@ModelAttribute(\"companyBean\") CompanyBean companyBean, \r\n\t\t\t\tBindingResult result,final RedirectAttributes redirectAttributes) {\r\n\t\t \r\n\t\t try{\r\n\t\t companyValidator.validate(companyBean, result);\r\n\t\t\tif (result.hasErrors()) {\r\n\t\t//System.out.println(\"Error in form\");\r\n logger.error(\"Error in form\");\r\n \r\n return new ModelAndView(\"addCompany\");\r\n }\r\n\t\t\tCompany company = prepareCompanyModel(companyBean);\r\n\t\t\tHttpSession session=request.getSession();\r\n\t\t\tString user=(String)session.getAttribute(\"userName\");\r\n\t\t\tSystem.out.println(user);\r\n\t\t\t\r\n\t\t\t//this was giving problem so commented @melwyn95\r\n\t\t\tcompanyService.addCompany(user,company);\r\n\r\n//\t\t\treturn new ModelAndView(\"companysuccess\");\r\n\r\n\t\t\t\r\n\t\t\tredirectAttributes.addFlashAttribute(\"msg\", \"Data added successfully\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tModelAndView model1=new ModelAndView(\"redirect:/addCompany\");\r\n\t\t\t//model1.addObject(\"message\", \"Data added successfully \");\r\n\t\t\treturn model1;\r\n\t\t\t\r\n\t\t\r\n\t }\r\n\t catch(Exception e){\r\n\t\t\t//System.out.println(e);\r\n logger.error(e);\r\n\t\t\tModelAndView model1=new ModelAndView(\"500\");\r\n\t\t\tmodel1.addObject(\"message\", \"Your session has timed out. Please login again\");\r\n\t \t\tmodel1.addObject(\"url\", \"form\");\r\n\r\n\t\t\treturn model1;\r\n\t\t}\r\n\r\n\r\n}",
"@GetMapping(\"/cliente/new\")\n\tpublic String newCliente(Model model) {\n\t\tmodel.addAttribute(\"cliente\", new Cliente());\n\t\tControllerHelper.setEditMode(model, false);\n\t\t\n\t\t\n\t\treturn \"cadastro-cliente\";\n\t\t\n\t}",
"public CompanyData() {\r\n }",
"public String newPermissionPersonCompany() {\r\n\t\ttry {\r\n\t\t\tbusiness = new ArrayList<Business>();\r\n\t\t\tlistPermissionPersonBusinessTemp = new ArrayList<PermissionPersonBusiness>();\r\n\t\t\tloadCombos();\r\n\t\t} catch (Exception e) {\r\n\t\t\tControladorContexto.mensajeError(e);\r\n\t\t}\r\n\t\treturn \"regPermissionPersonBusiness\";\r\n\t}",
"public void setCompanyName(String companyName) {\n this.companyName = companyName;\n }",
"public void setContactCompany(String contactCompany) {\n this.contactCompany = contactCompany;\n }",
"@GetMapping(\"/showFormForAdd\")\r\n\tpublic String showFormForAdd(Model theModel){\n\t\tCustomer theCustomer = new Customer();\r\n\t\t\r\n\t\ttheModel.addAttribute(\"customer\",theCustomer);\r\n\t\t\r\n\t\treturn \"customer-form\";\r\n\t}",
"public void create(Employee employee, Company company, IncomingReport incoming_report) throws IllegalArgumentException, DAOException;",
"@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}",
"public static Result startNewForm() {\r\n\t\tString formName = ChangeOrderForm.NAME;\r\n\t\tDecision firstDecision = CMSGuidedFormFill.startNewForm(formName,\r\n\t\t\t\tCMSSession.getEmployeeName(), CMSSession.getEmployeeId());\r\n\t\treturn ok(backdrop.render(firstDecision));\r\n\t}",
"public static Company createCompany(Integer companyId, String companyName,\r\n\t\t\tString companyType, String displayName, \r\n\t\t\tDate companySince, String specialNotes, String searchHelp) {\r\n\t\tCompany company = new Company();\r\n\t\tif (companyId != null) {\r\n\t\t\tcompany.setCompanyId(companyId);\r\n\t\t}\r\n\t\tcompany.setCompanyName(companyName);\r\n\t\tcompany.setCompanyType(companyType);\r\n\t\tcompany.setDisplayName(displayName);\r\n\t\tcompany.setCompanySince(companySince);\r\n\t\tcompany.setSpecialNote(specialNotes);\r\n\t\tcompany.setSearchHelp(searchHelp); \r\n\t\tcompany.setIsActive(1);\r\n\t\treturn company;\r\n\t}",
"public void setCompany(Company aCompany) {\n company = aCompany;\n }",
"@RequestMapping(value={\"/projects/add\"}, method= RequestMethod.GET)\r\n\tpublic String createProjectForm(Model model) {\r\n\t\tUser loggedUser= sessionData.getLoggedUser();\r\n\t\tmodel.addAttribute(\"loggedUser\", loggedUser);\r\n\t\tmodel.addAttribute(\"projectForm\", new Project());\r\n\t\treturn \"addProject\";\r\n\t}",
"@Override\r\n protected void createDbContentCreateEdit() {\n DbContentCreateEdit dbContentCreateEdit = new DbContentCreateEdit();\r\n dbContentCreateEdit.init(null);\r\n form.getModelObject().setDbContentCreateEdit(dbContentCreateEdit);\r\n dbContentCreateEdit.setParent(form.getModelObject());\r\n ruServiceHelper.updateDbEntity(form.getModelObject()); \r\n }",
"@GetMapping(\"/showNewDeliveryManForm\")\n\tpublic String showNewDeliveryManForm(Model model){\n\t\tDeliveryMan dm = new DeliveryMan();\n\t\tmodel.addAttribute(\"deliveryMan\",dm);\n\t\tmodel.addAttribute(\"cities\", City.values());\n\t\treturn \"new_deliveryMan\";\n\t}",
"public void save(Company company) {\r\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(company);\r\n\t}",
"@Override\n\tpublic void createForm(ERForm form) {\n\t\t\tString sql = \"insert into project1.reimbursementInfo (userName, fullName, thedate, eventstartdate, thelocation, description, thecost, gradingformat, passingpercentage, eventtype, filename,status,reason) values (?,?,?,?,?,?,?,?,?,?,?,?,?);\";\n\t\t\ttry {PreparedStatement stmt = conn.prepareCall(sql);\n\t\t\t//RID should auto increment, so this isnt necessary\n\t\t\t\n\t\t\tstmt.setString(1, form.getUserName());\n\t\t\tstmt.setString(2, form.getFullName());\n\t\t\tstmt.setDate(3, Date.valueOf(form.getTheDate()));\n\t\t\tstmt.setDate(4, Date.valueOf(form.getEventStartDate()));\n\t\t\tstmt.setString(5, form.getTheLocation());\n\t\t\tstmt.setString(6, form.getDescription());\n\t\t\tstmt.setDouble(7, form.getTheCost());\n\t\t\tstmt.setString(8, form.getGradingFormat());\n\t\t\tstmt.setString(9, form.getPassingPercentage());\n\t\t\tstmt.setString(10, form.getEventType());\n\t\t\tstmt.setString(11, form.getFileName());\n\t\t\tstmt.setString(12, \"pending\");\n\t\t\tstmt.setString(13, \"\");\n\t\t\tstmt.executeUpdate();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@RequestMapping(value = { \"/new\"}, method = RequestMethod.GET)\n\tpublic String newEntity(ModelMap model) {\n\t\tENTITY entity = createEntity();\n\n\t\tmodel.addAttribute(\"entity\", entity);\n\t\tmodel.addAttribute(\"edit\", false);\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn viewBaseLocation + \"/form\";\n\t}",
"@RequestMapping(\"/save\")\n\tpublic String createProjectForm(Project project, Model model) {\n\t\t\n\tproRep.save(project);\n\tList<Project> getall = (List<Project>) proRep.getAll();\n\tmodel.addAttribute(\"projects\", getall);\n\t\n\treturn \"listproject\";\n\t\t\n\t}",
"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 setCompanyCd(String companyCd) {\r\n this.companyCd = companyCd;\r\n }",
"public void setCompanyCd(String companyCd) {\r\n this.companyCd = companyCd;\r\n }",
"@RequestMapping(\"/book/new\")\n public String newBook(Model model){\n model.addAttribute(\"book\", new Book ());\n return \"bookform\";\n }",
"public void insert(TmCompany tmCompany) {\n\t\ttmCompanyDao.insert(tmCompany);\r\n\t}",
"public BtxDetailsKcFormDefinition() {\n super();\n }",
"public void saveAndCreateNew() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"saveAndCreateNewButton\").click();\n\t}",
"public void clickCreate() {\n\t\tbtnCreate.click();\n\t}",
"public ManagementCompany() {\r\n\t\tthis.name = \"\";\r\n\t\tthis.taxID = \"\";\r\n\t\tthis.mgmFeePer = 0;\r\n\t\tthis.plot.setX(0);\r\n\t\tthis.plot = new Plot();\r\n\t\tproperties = new Property[MAX_PROPERTY];\r\n\t}",
"@RequestMapping(params = \"new\", method = RequestMethod.GET)\n\t@PreAuthorize(\"hasRole('ADMIN')\")\n\tpublic String createProductForm(Model model) { \t\n \t\n\t\t//Security information\n\t\tmodel.addAttribute(\"admin\",security.isAdmin()); \n\t\tmodel.addAttribute(\"loggedUser\", security.getLoggedInUser());\n\t\t\n\t model.addAttribute(\"product\", new Product());\n\t return \"products/newProduct\";\n\t}",
"private void fillCreateOrEditForm(String name, int branchId) {\n waitForElementVisibility(xpathFormHeading);\n String actual = assertAndGetAttributeValue(xpathFormHeading, \"innerText\");\n assertEquals(actual, FORM_HEADING,\n \"Actual heading '\" + actual + \"' should be same as expected heading '\" + FORM_HEADING\n + \"'.\");\n logger.info(\"# User is on '\" + actual + \"' form\");\n assertAndType(xpathNameTF, name);\n logger.info(\"# Entered staff name: \" + name);\n selectByValue(xpathSelectBranch, \"number:\" + branchId);\n logger.info(\"# Select branch id: \" + branchId);\n }",
"@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 }",
"@Override\n\tpublic void add(cp_company cp) {\n\t\t\n\t}",
"@GetMapping(\"/createRegistro\")\n\tpublic String crearValidacion(Model model) {\n\t\tList<Barrio> localidades = barrioService.obtenerBarrios();\n\t\tmodel.addAttribute(\"localidades\",localidades);\n\t\tmodel.addAttribute(\"persona\",persona);\n\t\tmodel.addAttribute(\"validacion\",validacion);\n\t\tmodel.addAttribute(\"registro\",registro);\n\t\tmodel.addAttribute(\"barrio\",barrio);\n\t\treturn \"RegistroForm\";\n\t}",
"public void setCompany(com.hps.july.persistence.CompanyAccessBean newCompanies) throws Exception {\n\tif (newCompanies == null) {\n\t companycode = null;\n\t companyname = \"\";\n\t}\n\telse {\n\t\tcompanycode = new Integer(newCompanies.getCompany());\n\t\tcompanyname = newCompanies.getName();\n\t}\n}",
"CounselorBiographyTemp create(CounselorBiographyTemp entity);",
"@RequestMapping(value = \"/report.create\", method = RequestMethod.GET)\n @ResponseBody public ModelAndView newreportForm(HttpSession session) throws Exception {\n ModelAndView mav = new ModelAndView();\n mav.setViewName(\"/sysAdmin/reports/details\");\n\n //Create a new blank provider.\n reports report = new reports();\n \n mav.addObject(\"btnValue\", \"Create\");\n mav.addObject(\"reportdetails\", report);\n\n return mav;\n }",
"@GetMapping(\"/add\")\n public String showSocioForm(Model model, Persona persona) {\n List<Cargo> cargos = cargoService.getCargos();\n model.addAttribute(\"cargos\", cargos);\n return \"/backoffice/socioForm\";\n }",
"public com.alain.puntocoma.model.Catalogo create(long catalogoId);",
"@Override\n\tpublic void create(CreateCoinForm form) throws Exception {\n\t}",
"public String CreateNewComputerData(String ComputerName, String IntroducedDate, String DiscontinuedDate, String CompanyName)\n\t{\n\t\t//Click on Add a new Computer on Home Page to Navigate to Creation of Computer Page\n\t\tAddComputer.click();\n\t\t\t\t\t\t\n\t\t//Computer Name\n\t\tCompNameText.sendKeys(ComputerName);\n\t\t\n\t\t//Introduced Date\n\t\tIntroducedText.sendKeys(IntroducedDate);\n\t\t\n\t\t//Discontinued Date\n\t\tDiscontinuedText.sendKeys(DiscontinuedDate);\n\t\t\n\t\t//Select Company Name from Drop-Down\n\t\tSelect company = new Select(CompanySelect);\t\t\n\t\tcompany.selectByVisibleText(CompanyName);\n\t\t\n\t\t//Click on Create Computer Button\n\t\tCreateComputerButt.submit();\n\t\t\n\t\t//Wait Time after each transaction\n\t\tWebDriverWait wait = new WebDriverWait(driver,2);\n\t\t\n\t\t/*if (SubheadTitle.getText()!=\"Add a computer\")\n\t\t{\n\t\t\t//Capturing Message of Newly Added Computer\n\t\t\tWebElement Subheadtext = driver.findElement(By.xpath(\"//div[contains(text(),'Done! \" + ComputerName + \" has been created)]\"));\n\t\t\tSystem.out.println(\"Computer Name has been successfully added:\" + Subheadtext.getText());\n\t\t}*/\n\t\t\n\t\treturn SubheadTitle.getText();\t\t\n\t}",
"public companyview() {\n initComponents();\n }",
"public void setCompany(String company)\r\n {\r\n m_company = company;\r\n }",
"public CompanyBean() throws Exception {\n selectedTab = ADD_TAB_SELECTED;\n dbc = DataBaseConnection.getDataBaseConnection(DBUtil.DBADMIN);\n initializeAdd();\n initializeChg();\n }",
"@Override\r\n\tpublic Company insertCompany(Company company) throws SQLException {\n\t\treturn companyRepository.save(company);\r\n\t}",
"@Test\n\tpublic void testGetcompanyDetailsApi() {\n\t\tCompany company = new Company(\"DataSolutions\", \"Marthahalli\",\n\t\t\t\t\"Bangalore\", \"India\", \"9880440671\");\n\t\tcompanyRepository.save(company);\n\n\t\tInteger companyId = company.getCompanyId();\n\n\t\t// Now make a call to the API to get details of the company\n\t\tCompany apiResponse = restTemplate.getForObject(\n\t\t\t\t\"http://localhost:8888/companies/\" + companyId, Company.class);\n\n\t\t// Verify that the data from the API and data saved in the DB are same\n\t\tassertNotNull(apiResponse);\n\t\tassertEquals(company.getName(), apiResponse.getName());\n\t\tassertEquals(company.getCompanyId(), apiResponse.getCompanyId());\n\t\tassertEquals(company.getAdress(), apiResponse.getAdress());\n\t\tassertEquals(company.getCountry(), apiResponse.getCountry());\n\n\t\t// Delete the Test data created\n\t\tcompanyRepository.delete(apiResponse.getCompanyId());\n\t}",
"@Override\n\tpublic void setCompanyId(long companyId);",
"@Override\n\tpublic void setCompanyId(long companyId);",
"@Override\n\tpublic void setCompanyId(long companyId);"
] | [
"0.66642797",
"0.6263723",
"0.62472504",
"0.60429233",
"0.604135",
"0.59632665",
"0.5930211",
"0.59232324",
"0.58095676",
"0.5779563",
"0.57437944",
"0.5723655",
"0.571627",
"0.5703537",
"0.56852365",
"0.56844395",
"0.56844395",
"0.56844395",
"0.56844395",
"0.56844395",
"0.56823",
"0.5678851",
"0.56733614",
"0.5666156",
"0.56557757",
"0.56512225",
"0.5650261",
"0.5646788",
"0.56382394",
"0.56382394",
"0.5637488",
"0.56202376",
"0.56180483",
"0.56018674",
"0.5591973",
"0.55867904",
"0.55736965",
"0.5563301",
"0.55621165",
"0.5554882",
"0.55463344",
"0.55463344",
"0.553086",
"0.5518698",
"0.550584",
"0.55041397",
"0.5500129",
"0.5499051",
"0.54973334",
"0.5491045",
"0.54886895",
"0.54886895",
"0.5488422",
"0.5481753",
"0.5476963",
"0.5463564",
"0.54545873",
"0.544843",
"0.54418796",
"0.54264235",
"0.54236823",
"0.5414278",
"0.54057086",
"0.53990626",
"0.5392698",
"0.538161",
"0.536693",
"0.53631985",
"0.53616536",
"0.5359515",
"0.5349576",
"0.53453445",
"0.5343034",
"0.5343034",
"0.533579",
"0.5320851",
"0.53203744",
"0.5320235",
"0.5318238",
"0.5308208",
"0.5301791",
"0.52963835",
"0.529364",
"0.52899176",
"0.528514",
"0.5280111",
"0.52778536",
"0.5259695",
"0.52577925",
"0.5250171",
"0.52456427",
"0.52436537",
"0.5242606",
"0.52411747",
"0.5238489",
"0.52320343",
"0.5230416",
"0.5228466",
"0.5228466",
"0.5228466"
] | 0.6052472 | 3 |
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() {
jLabel1 = new javax.swing.JLabel();
compname = new javax.swing.JTextField();
jLabel2 = new javax.swing.JLabel();
compid = new javax.swing.JTextField();
submit = new javax.swing.JButton();
update = new javax.swing.JButton();
Delete = new javax.swing.JButton();
back = new javax.swing.JButton();
jScrollPane1 = new javax.swing.JScrollPane();
jTable_default = new javax.swing.JTable();
jButton1 = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setLocation(new java.awt.Point(400, 200));
jLabel1.setText("Company name");
jLabel2.setText("Comapny id");
submit.setText("Submit");
submit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
submitActionPerformed(evt);
}
});
update.setText("Update");
update.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
updateActionPerformed(evt);
}
});
Delete.setText("Delete");
Delete.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
DeleteActionPerformed(evt);
}
});
back.setText("Back");
back.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
backActionPerformed(evt);
}
});
jTable_default.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null},
{null, null},
{null, null},
{null, null},
{null, null},
{null, null},
{null, null},
{null, null},
{null, null},
{null, null},
{null, null}
},
new String [] {
"Company Name", "Company Id"
}
));
jTable_default.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jTable_defaultMouseClicked(evt);
}
});
jScrollPane1.setViewportView(jTable_default);
jButton1.setText("Reset");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(216, 216, 216)
.addComponent(back)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(34, 34, 34)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE)
.addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(56, 56, 56)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(compname, javax.swing.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE)
.addComponent(compid))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(89, 89, 89)
.addComponent(update, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(submit, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jButton1)
.addComponent(Delete, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)))))
.addGap(25, 25, 25))
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 523, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(49, 49, 49)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
.addComponent(compname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(layout.createSequentialGroup()
.addGap(36, 36, 36)
.addComponent(submit)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(update)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(7, 7, 7)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(compid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(layout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(Delete)))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(back)
.addComponent(jButton1))
.addGap(18, 18, 18)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE))
);
pack();
setLocationRelativeTo(null);
} | {
"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 Soru1() {\n initComponents();\n }",
"public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\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 quotaGUI() {\n initComponents();\n }",
"public BloodDonationGUI() {\n initComponents();\n }",
"public PatientUI() {\n initComponents();\n }",
"public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }",
"public Oddeven() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public Magasin() {\n initComponents();\n }",
"public intrebarea() {\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 kunde() {\n initComponents();\n }",
"public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"public MusteriEkle() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }",
"public frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public DESHBORDPANAL() {\n initComponents();\n }",
"public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }",
"public frmVenda() {\n initComponents();\n }",
"public Botonera() {\n initComponents();\n }",
"public FrmMenu() {\n initComponents();\n }",
"public OffertoryGUI() {\n initComponents();\n setTypes();\n }",
"public JFFornecedores() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public EnterDetailsGUI() {\n initComponents();\n }",
"public vpemesanan1() {\n initComponents();\n }",
"public Kost() {\n initComponents();\n }",
"public UploadForm() {\n initComponents();\n }",
"public frmacceso() {\n initComponents();\n }",
"public FormHorarioSSE() {\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 }",
"public sinavlar2() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\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 P0405() {\n initComponents();\n }",
"public MiFrame2() {\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"public Choose1() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }",
"public GUI_StudentInfo() {\n initComponents();\n }",
"public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }",
"public JFrmPrincipal() {\n initComponents();\n }",
"public bt526() {\n initComponents();\n }",
"public Pemilihan_Dokter() {\n initComponents();\n }",
"public Ablak() {\n initComponents();\n }",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}",
"public Pregunta23() {\n initComponents();\n }",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public AvtekOkno() {\n initComponents();\n }",
"public busdet() {\n initComponents();\n }",
"public ViewPrescriptionForm() {\n initComponents();\n }",
"public Ventaform() {\n initComponents();\n }",
"public Kuis2() {\n initComponents();\n }",
"public POS1() {\n initComponents();\n }",
"public CreateAccount_GUI() {\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.73195183",
"0.7290407",
"0.7290407",
"0.7290407",
"0.72855854",
"0.7248445",
"0.7213232",
"0.72084314",
"0.7195551",
"0.71902007",
"0.71835697",
"0.7158979",
"0.71473545",
"0.70928645",
"0.70807934",
"0.70575565",
"0.6987147",
"0.6976941",
"0.69544566",
"0.69541115",
"0.6943778",
"0.6942792",
"0.6935224",
"0.6931817",
"0.6928287",
"0.69246083",
"0.6924253",
"0.69117594",
"0.6910518",
"0.68936557",
"0.68927425",
"0.6891522",
"0.68911785",
"0.6889459",
"0.68826854",
"0.68823767",
"0.6880858",
"0.6878632",
"0.68753785",
"0.68741786",
"0.68710285",
"0.68593234",
"0.6856001",
"0.6855885",
"0.685485",
"0.68537056",
"0.68532616",
"0.68519884",
"0.68519884",
"0.6843908",
"0.6836617",
"0.68361354",
"0.68289286",
"0.68281245",
"0.6826939",
"0.682426",
"0.68220174",
"0.68170464",
"0.6816829",
"0.68109316",
"0.6808785",
"0.6808737",
"0.6808307",
"0.6807784",
"0.6801649",
"0.67936075",
"0.67933095",
"0.67924714",
"0.67911524",
"0.67894745",
"0.67889065",
"0.6787865",
"0.6781763",
"0.6766413",
"0.67660075",
"0.6765137",
"0.6756547",
"0.6756297",
"0.67528564",
"0.6752207",
"0.67416096",
"0.67398196",
"0.6737052",
"0.6736384",
"0.6734045",
"0.67276424",
"0.6726131",
"0.6721189",
"0.6715488",
"0.671506",
"0.67148006",
"0.6708023",
"0.67061347",
"0.67027885",
"0.6701509",
"0.670121",
"0.6699335",
"0.66989076",
"0.6694664",
"0.6690946",
"0.6688705"
] | 0.0 | -1 |
GENFIRST:event_submitActionPerformed TODO add your handling code here: | private void submitActionPerformed(java.awt.event.ActionEvent evt) {
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection connection = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl", "batman", "54928");
String query = "insert into COMPANY_DETAILS(COMPANY_NAME,COMPANY_ID)VALUES(?,?)";
PreparedStatement pst;
pst = connection.prepareStatement(query);
pst.setString(1, compname.getText());
pst.setString(2, compid.getText());
pst.executeUpdate();
JOptionPane.showMessageDialog(null, "inserted successfully");
} catch (Exception e) {
JOptionPane.showMessageDialog(null, e);
} // TODO add your h
showTableData();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void jButtonOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOkActionPerformed\n \n }",
"private void jTextField4ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField13ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField8ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField12ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField12ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField6ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField6ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void textField1ActionPerformed(java.awt.event.ActionEvent evt) {\n\t}",
"private void jTextField7ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n \n }",
"private void jTextField19ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void btnIngresarActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void btnIngresarActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField5ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField5ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField5ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField11ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField11ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void cnpjFarmaciaEntradaActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void vencimentoBoletoJTextFieldActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbtnSubmit_click(e);\n\t\t\t}",
"private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jButton16ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void InterestJTextFieldActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jCAreaActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void senhaLFEActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void txtKQActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n}",
"private void txtidDemActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void botao_atirarActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void btnAceptarActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jfanoActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void numeroDaFarmaciaEntradaActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void funcionActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t\tMySQLConnect dal = new MySQLConnect();\r\n\t\t\ttry {\r\n\t\t\t\tString name;\r\n\t\t\t\tString date;\r\n\t\t\t\tString desc;\r\n\t\t\t\tString course;\r\n\t\t\t\tString type;\r\n\t\t\t\tString prior;\r\n\t\t\t\tScanner scan = new Scanner(System.in);\r\n\t\t\t\tSystem.out.println(\"Name: \");\r\n\t\t\t\tname = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Due Date(YYYY-MM-DD): \");\r\n\t\t\t\tdate = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Description: \");\r\n\t\t\t\tdesc = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Course: \");\r\n\t\t\t\tcourse = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Type: \");\r\n\t\t\t\ttype = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Priority: \");\r\n\t\t\t\tprior = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"The following form was added to the database:\");\r\n\t\t\t\tString[] check = dal.addForm(name.toString(),\"admin\",date.toString(),desc.toString(),course.toString(),type.toString(),prior.toString());\r\n\t\t\t\tfor(int i=0; i<check.length; i++){\r\n\t\t\t\t\tSystem.out.print(check[i] + \" \");\r\n\t\t\t\t}\r\n\t\t\t\t//test confirmation that button works\r\n\t\t\t\ttextArea.append(\"Form Submitted!\\n\");\r\n\t\t\t} catch (SQLException ex) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}",
"private void u_interestActionPerformed(java.awt.event.ActionEvent evt) {\n}",
"private void jTextField10ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextFieldNomeActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void txtserchActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void buscaNomeProdutoActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void fullNameRegisterActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void saveButtonActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void splPerActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void LoginActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void emailLFEActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void uocsoActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void userNameFieldActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void nombretxtActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void phantichActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void btnRegresarActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void CheckoutActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void txtNomenclaturaActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jButton21ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextFieldProductNameActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void txtRucActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void btnConfirmActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void ControlsActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void txtbuscarHCActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void txtNomProdActionPerformed(java.awt.event.ActionEvent evt) {\n\n }",
"private void BanalisisActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void songuyentoActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void gAddActionPerformed(ActionEvent e) {\n }",
"private void Button_CEActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Button_CEActionPerformed\n // TODO add your handling code here:\n \n }",
"private void tfLugarActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void message_labelActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void t1ActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void ValorActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void studentSubTotalActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void btnInventarioActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void comCosasActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void t1ActionPerformed(java.awt.event.ActionEvent evt) {\n\n }",
"private void machnameActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextFieldIDActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"@Override\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource() == submit) {\n int score = answerCheck();\n try {\n Submit submitButton = new Submit(userid, user.getText(), totalScore.getText(), score);\n setVisible(false);\n } catch (SQLException ex) {\n Logger.getLogger(Play.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"private void tfApellidoActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void csrdateTxtActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void txt_nombreActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void add_grant_perches_textActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void txttenfileActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void emgPh2ActionPerformed(java.awt.event.ActionEvent evt) {\n\t }"
] | [
"0.7828126",
"0.7640664",
"0.75974774",
"0.7543477",
"0.7525902",
"0.7525902",
"0.7525902",
"0.7490981",
"0.7490981",
"0.74851066",
"0.74851066",
"0.74795073",
"0.74779093",
"0.7470075",
"0.74573225",
"0.74435365",
"0.74435365",
"0.7441636",
"0.7441636",
"0.7441636",
"0.7441636",
"0.74372923",
"0.74372923",
"0.74372923",
"0.7424021",
"0.7424021",
"0.7424021",
"0.7405636",
"0.7405636",
"0.7380532",
"0.7370132",
"0.73698914",
"0.7359881",
"0.732732",
"0.7320117",
"0.73198384",
"0.730125",
"0.72752106",
"0.726727",
"0.72661036",
"0.72580785",
"0.7245233",
"0.7245233",
"0.7245233",
"0.72429675",
"0.7238113",
"0.72322226",
"0.72215617",
"0.72186464",
"0.7212141",
"0.72032875",
"0.7201244",
"0.7194929",
"0.71918523",
"0.7175684",
"0.7165719",
"0.7164822",
"0.7162108",
"0.7149033",
"0.7145703",
"0.7140672",
"0.7133609",
"0.71295863",
"0.71155065",
"0.71152896",
"0.7110616",
"0.7099026",
"0.7094429",
"0.7081714",
"0.70792884",
"0.70732266",
"0.70699686",
"0.70672125",
"0.7061533",
"0.70520294",
"0.7051082",
"0.704725",
"0.7040415",
"0.702447",
"0.70227414",
"0.70171547",
"0.7014003",
"0.69951123",
"0.69935626",
"0.698089",
"0.6964546",
"0.6955133",
"0.69526577",
"0.6949148",
"0.69385517",
"0.6937528",
"0.6935303",
"0.69299877",
"0.692846",
"0.6889981",
"0.68880403",
"0.6883654",
"0.68771726",
"0.68748105",
"0.6864603",
"0.6858967"
] | 0.0 | -1 |
pola w dowolnym juz miejscu | Liczba(int i) {
this.i= i;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void cajas() {\n\t\t\n\t}",
"public abstract String dohvatiKontakt();",
"public void ustawPojazdNaPoczatek()\n\t{\n\t\tSciezka pierwszaSc = droga.get(0);\n\t\tfinal double y = 10;\n\t\tpojazd.zmienPozycje(pierwszaSc.getCenterDownX(), y);\n\t}",
"public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tclass Ulamek{\r\n\t\t\tprivate int licznik, mianownik;\r\n\r\n\t\t\tpublic void ustawLicznik (int l){\r\n\t\t\t\tlicznik=l;\r\n\t\t\t}\r\n\t\t\tpublic void ustawMianownik (int m){\r\n\t\t\t\tmianownik=m;\r\n\t\t\t}\r\n\t\t\tpublic void ustawUlamek (int u1, int u2){\r\n\t\t\t\tlicznik=u1;\r\n\t\t\t\tmianownik=u2;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tpublic void wyswietl (){\r\n\t\t\t\t\r\n\t\t\t\tint przod, reszta, przod_dlugosc, mianownik_dlugosc, licznik_dlugosc;\r\n\t\t\t\tString przod_zamiana, mianownik_string, licznik_string;\r\n\t\t\t\tdouble wynik;\r\n\t\t\t\t\r\n\t\t\t\tif (mianownik!=0 && licznik !=0){\r\n\t\t\t\tprzod=licznik/mianownik;\r\n\t\t\t\treszta=licznik-(przod*mianownik);\r\n\t\t\t\tprzod_zamiana=\"\"+przod;\r\n\t\t\t\tprzod_dlugosc=przod_zamiana.length();\r\n\t\t\t\twynik=1.0*licznik/mianownik;\r\n\t\t\t\t\r\n\t\t\t\tif(reszta!=0){\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\tint licznik = 0;\r\n\t\t\t\t\tdo{\r\n\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t licznik++;\r\n\t\t\t\t\t}while (licznik!=przod_dlugosc);\r\n\t\t\t\tSystem.out.println(reszta);\r\n\t\t\t}\r\n\r\n\t\t\t\t//zamiana na stringa i liczenie\r\n\t\t\t\tmianownik_string=\"\"+mianownik;\r\n\t\t\t\tmianownik_dlugosc=mianownik_string.length();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//brak calości\r\n\t\t\t\tif(przod==0){\r\n\t\t\t\tSystem.out.print(\" \"+\" \"+\" \");\r\n\t\t\t\tint licznik3 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t licznik3++;\r\n\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t System.out.print(\" = \"+wynik);\r\n\r\n\t\t\t System.out.println();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\r\n\r\n\t\t\t\tif(przod!=0){\r\n\t\t\t\tSystem.out.print(\" \"+przod+\" \");\r\n\t\t\t\tint licznik3 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t\tif(reszta!=0){\r\n\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t}\r\n\t\t\t\t licznik3++;\r\n\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t System.out.print(\" = \"+wynik);\r\n\r\n\t\t\t System.out.println();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(reszta!=0){\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\tint licznik2 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t\tif(reszta!=0){\r\n\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t licznik2++;\r\n\t\t\t\t\t\r\n\t\t\t\t}while (licznik2!=przod_dlugosc);\r\n\t\t\t\tSystem.out.println(mianownik);\r\n\t\t\t System.out.println();\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t//jezeli blad \r\n\t\t\t\t\tmianownik_string=\"\"+mianownik;\r\n\t\t\t\t\tmianownik_dlugosc=mianownik_string.length();\r\n\t\t\t\t\tlicznik_string=\"\"+licznik;\r\n\t\t\t\t\tlicznik_dlugosc=licznik_string.length();\r\n\t\t\t\t\tif(licznik_dlugosc>mianownik_dlugosc){\r\n\t\t\t\t\t\tmianownik_dlugosc=licznik_dlugosc;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//gora\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t//if(licznik==0){\r\n\t\t\t\t\t//System.out.print(\" \");\r\n\t\t\t\t\t//}\r\n\r\n\t\t\t\t\tSystem.out.println(licznik);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//srodek\r\n\t\t\t\t\tSystem.out.print(\" \"+\" \"+\" \");\r\n\t\t\t\t\t\r\n\t\t\t\t\tint licznik3 = 0;\r\n\t\t\t\t\tdo{\r\n\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t licznik3++;\r\n\t\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t\t System.out.print(\" = \"+\"ERR\");\r\n\r\n\t\t\t\t System.out.println();\r\n\t\t\t\t\t\r\n\t\t\t\t //dol\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t\t\tSystem.out.println(mianownik);\r\n\t\t\t\t\t System.out.println();\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t Ulamek u1=new Ulamek();\r\n\t\t Ulamek u2=new Ulamek();\r\n\r\n\t\t u1.ustawLicznik(3);\r\n\t\t u1.ustawMianownik(5);\r\n\r\n\t\t u2.ustawLicznik(142);\r\n\t\t u2.ustawMianownik(8);\r\n\r\n\t\t u1.wyswietl();\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\t \r\n\t\t u2.wyswietl();\r\n\r\n\r\n\r\n\r\n\t\t u2.ustawUlamek(100,0);\r\n\r\n\r\n\t\t u2.wyswietl();\r\n\r\n\t}",
"private void ucitajTestPodatke() {\n\t\tList<Integer> l1 = new ArrayList<Integer>();\n\n\t\tRestoran r1 = new Restoran(\"Palazzo Bianco\", \"Bulevar Cara Dušana 21\", KategorijeRestorana.PICERIJA, l1, l1);\n\t\tRestoran r2 = new Restoran(\"Ananda\", \"Petra Drapšina 51\", KategorijeRestorana.DOMACA, l1, l1);\n\t\tRestoran r3 = new Restoran(\"Dizni\", \"Bulevar cara Lazara 92\", KategorijeRestorana.POSLASTICARNICA, l1, l1);\n\n\t\tdodajRestoran(r1);\n\t\tdodajRestoran(r2);\n\t\tdodajRestoran(r3);\n\t}",
"public void 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}",
"public void realizacjap34() {\n System.out.println(\"REALIZACJA PUNKTU 3\\n\");\n\n System.out.println(\"\\nWyszukiwanie osob po imieniu (Piotr) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzOsobyPoImieniu(Listy.osoby, \"Piotr\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po nazwisku (Oleszczuk) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzOsobyPoNazwisku(Listy.osoby, \"Oleszczuk\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy mniejszym niz 10============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyMniejszymNiz(Listy.osoby, 10).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy większym niz 10============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyWiekszymNiz(Listy.osoby, 10).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy równym 5============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyRownym(Listy.osoby, 5).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin mniejszej niz 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachMniejszychNiz(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin wiekszej niz 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachWiekszychNiz(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin równej 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachRownych(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji wiekszej niz 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiWiekszejNiz(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji mniejszej niz 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiMniejszejNiz(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji rownej 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiRownej(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stanowisku (Adiunkt) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStanowisku(Listy.osoby, \"Adiunkt\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie studenta po numerze indeksu (123456) ============================================================================\\n\");\n System.out.println(NarzedziaWyszukiwania.znajdzStudentaPoIndeksie(Listy.osoby, \"123456\"));\n\n System.out.println(\"\\nWyszukiwanie studentów po roku studiów (1) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzStudentowPoRokuStudiow(Listy.osoby, 1).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie studentów po kierunku (Informatyka Stosowana) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzStudentowPoKierunku(Listy.osoby, \"Informatyka Stosowana\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie kursu po nazwie (Analiza Matematyczna 1) ============================================================================\\n\");\n System.out.println(NarzedziaWyszukiwania.znajdzKursPoNazwie(Listy.kursy, \"Analiza Matematyczna 1\"));\n\n System.out.println(\"\\nWyszukiwanie kursów po liczbie ects (5) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzKursyPoECTS(Listy.kursy, 5).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie kursów po prowadzacym+\"+Listy.osoby.get(0).getImie()+\" \"+Listy.osoby.get(0).getNazwisko()+\" ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzKursyPoProwadzacym(Listy.kursy, Listy.osoby.get(0)).forEach(System.out::println);\n\n\n //REALIZACJA PUNKTU 4\n System.out.println(\"=====================================================================================================================\");\n System.out.println(\"REALIZACJA PUNKTU 4\");\n System.out.println(\"=====================================================================================================================\\n\");\n System.out.println(\"Kursy:\\n\");\n for (Kurs kurs : Listy.kursy) {\n System.out.println(kurs.toString());\n }\n\n System.out.println(\"\\nOsoby:\\n\");\n for (Osoba osoba : Listy.osoby) {\n System.out.println(\"OSOBA====================================================================================================\");\n System.out.println(osoba.toString());\n System.out.println();\n }\n }",
"void zmniejszBieg();",
"private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }",
"private void sonucYazdir() {\n\t\talinanPuan = (int)(((float)alinanPuan / (float)toplamPuan) * 100);\n\t\tSystem.out.println(\"\\nSınav Bitti..!\\n\" + soruSayisi + \" sorudan \" + dogruSayaci + \" tanesine\"\n\t\t\t\t\t\t+ \" doğru cevap verdiniz.\\nPuan: \" + alinanPuan + \"/\" + toplamPuan);\n\t}",
"public void xuLyThemPhieuThanhToan(){\n //Ngat chuoi\n String strTongTien = txtTongTien.getText().trim();\n String[] tongTien = strTongTien.split(\"\\\\s\");\n String strTienPhaiTra = txtTienPhaiTra.getText().trim();\n String[] tienPhaiTra = strTienPhaiTra.split(\"\\\\s\");\n\n //xu ly them vao data base\n PhieuThanhToanSevice phieuThanhToanSevice = new PhieuThanhToanSevice();\n int x = phieuThanhToanSevice.themPhieuThanhToan(txtMaPTT.getText().trim(),\n cbbMaPDK.getSelectedItem().toString(),\n Integer.valueOf(txtSoThang.getText().trim()),\n txtNgayTT.getText().trim(), Float.valueOf(tongTien[0]), Float.valueOf(tienPhaiTra[0]));\n\n if (x > 0) {\n JOptionPane.showMessageDialog(null, \"Thanh toán thành công\");\n } else {\n JOptionPane.showMessageDialog(null, \"Thanh toán thất bại\");\n return;\n }\n\n }",
"private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}",
"public static void main(String [] agrs){\n\r\n\r\n Kaczka gumowa = new GumowaKaczka();\r\n gumowa.ustawKwakanieInterfejs(2);\r\n gumowa.ustawLatanieInterfejs(new SzybkieLatanie());\r\n gumowa.wyswietl();\r\n System.out.println(gumowa.kwacz());\r\n System.out.println(gumowa.lec());\r\n Kaczka dzika = new DzikaKaczka();\r\n // dzika.ustawLatanieInterfejs(1);\r\n dzika.wyswietl();\r\n System.out.println(dzika.lec());\r\n System.out.println(dzika.kwacz());\r\n\r\n\r\n// Polecenie[] polecenieWlacz;\r\n// Polecenie[] polecanieWylacz;\r\n// Polecenie polecenieWycofaj;\r\n//\r\n// polecanieWylacz = new Polecenie[7];\r\n// polecenieWlacz = new Polecenie[7];\r\n//\r\n// Swiatlo swiatlo = new Swiatlo();\r\n// polecanieWylacz[0] = new PolecenieWylaczSwiatlo(swiatlo);\r\n// polecenieWlacz[0] = new PolecenieWlaczSwiatlo(swiatlo);\r\n//\r\n//\r\n//\r\n//\r\n// polecenieWlacz[0].wykonaj();\r\n// polecanieWylacz[0].wykonaj();\r\n// polecenieWlacz[0].wykonaj();\r\n// polecenieWycofaj = polecanieWylacz[0];\r\n//// polecenieWycofaj = polecenieWlacz[0];\r\n// polecenieWycofaj.wykonaj();\r\n// polecenieWycofaj.wykonaj();\r\n//// polecenieWycofaj.wycofaj();\r\n//\r\n// WiezaStereo wiezaStereo = new WiezaStereo();\r\n//\r\n// polecenieWlacz[1] = new PolecenieWiezaStereoWlaczCD(wiezaStereo);\r\n//\r\n// polecenieWlacz[1].wykonaj();\r\n\r\n\r\n\r\n }",
"private void zmienne_poziomu(int poziom)\n {\n liczba_zyc =Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_zyc\"));\n liczba_naboi=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_naboi\"));\n liczba_zyc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_zyc_wroga\"));\n liczba_pilek=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_pilek\"));\n predkosc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_predkosc_wroga\"));\n bonusy_poziomu=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_bonusy_poziomu\"));\n rozmiar_pilki=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_rozmiar_pilki\"));\n zmiana_ruchu_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_zmiana_ruchu_wroga\"));\n czas_gry=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_czas_gry\"));\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"private void limpiarDatos() {\n\t\t\n\t}",
"public void ispisiSveNapomene() {\r\n\t\tint i = 0;// redni broj napomene\r\n\t\tint brojac = 0;\r\n\t\tfor (Podsjetnik podsjetnik : lista) {\r\n\r\n\t\t\ti++;\r\n\t\t\tSystem.out.println(i + \")\" + podsjetnik);\r\n\t\t\tbrojac = i;\r\n\t\t}\r\n\t\tif (brojac == 0) {\r\n\t\t\tSystem.out.println(\"Nema unesenih napomena!!\");\r\n\t\t}\r\n\r\n\t}",
"@Override\r\n\tpublic void hacerSonido() {\n\t\tSystem.out.print(\"miau,miau -- o depende\");\r\n\t\t\r\n\t}",
"public void atakuj() {\n\n System.out.println(\"to metoda atakuj z klasy Potwor \");\n\n }",
"private void logika_rozpocznij(){\n\t}",
"public void orina() {\n System.out.println(\"Que bien me quedé! Deposito vaciado.\");\n }",
"void TaktImpulsAusfuehren ()\n {\n \n wolkebew();\n \n }",
"public void MieiOrdini()\r\n {\r\n getOrdini();\r\n\r\n }",
"public void zapisUrok() {\r\n\r\n\t\taktualnyZostatok = getZostatok() * urokovaSadzba / 100;\r\n\t\tsetVklad(aktualnyZostatok);\r\n\r\n\t}",
"private String nalozZvieraNaVozidlo() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz cislo zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Prepravitelny z = (Prepravitelny) zoo.getZvierataZOO(pozicia - 1);\r\n zoo.nalozZivocicha(z);\r\n zoo.odstranZivocicha(pozicia - 1);\r\n return \"Zviera \" + z + \"\\n\\tbolo nalozene na prepravne vozidlo\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nemozno prepravit\\n\\t\";\r\n } catch (NullPointerException exNP) {\r\n return \"Zviera c. \" + pozicia + \" nie je v ZOO\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }",
"public static void pocetniMeni() {\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"***********************************************\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 1 ako zelite vidjeti kalendar(za dati mjesec i godinu)\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 2 za pregled podsjetnika za dati mjesec i godinu\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 3 da pregledate podsjetnik za datu godinu\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 4 ako zelite da pogledate sve podsjetnike!\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 5 ako zelite da upisete neki podsjetnik!\\n\"\r\n\t\t\t\t\t\t+ \":::::::::::::::::::::::::::::::::::::::::::::::\");\r\n\t}",
"private String elaboraIncipit() {\n String testo = VUOTA;\n\n if (usaHeadIncipit) {\n testo += elaboraIncipitSpecifico();\n testo += A_CAPO;\n }// fine del blocco if\n\n return testo;\n }",
"@Test\n public void testExistenceTestuJedneOsoby() {\n osBeznyMuz = new Osoba(120, 150, Barva.MODRA);\n testJedneOsoby(osBeznyMuz, 120, 150, 70, 140, Barva.MODRA);\n }",
"public void nastaviIgru() {\r\n\t\t// nastavi igru poslije pobjede\r\n\t\tigrajPoslijePobjede = true;\r\n\t}",
"private void poczatkowe_zmienne()\n {\n konfiguracja.loadProperties();\n predkosc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(\"predkosc_wroga\"));\n czas_watku=Integer.parseInt(konfiguracja.properties.getProperty(\"czas_watku\"));\n punkty_poziomu=Integer.parseInt(konfiguracja.properties.getProperty(\"punkty_poziomu\"));\n zmienne_poziomu(poziom);\n }",
"public void obliczSzanseWykolejenia(Tramwaj tramwaj, Pogoda pogoda, Motorniczy motorniczy, Przystanek przystanek){\r\n RegulyWykolejen regulyWykolejen= new RegulyWykolejen();\r\n this.szansaWykolejenia = pogoda.getRyzyko() + przystanek.getStanTechnicznyPrzystanku() + tramwaj.getStanTechTramwaju() + regulyWykolejen.regulaWiek(motorniczy.getWiek()) + regulyWykolejen.regulaDoswiadczenie(motorniczy.getDoswiadczenie());\r\n }",
"private static void kapazitaetPruefen(){\n\t\tList<OeffentlichesVerkehrsmittel> loev = new ArrayList<OeffentlichesVerkehrsmittel>();\n\t\t\n\t\tLinienBus b1 = new LinienBus();\n\t\tFaehrschiff f1 = new Faehrschiff();\n\t\tLinienBus b2 = new LinienBus();\t\n\t\t\n\t\tloev.add(b1);\n\t\tloev.add(b2);\n\t\tloev.add(f1);\n\t\t\n\t\tint zaehlung = 500;\n\t\tboolean ausreichend = kapazitaetPruefen(loev,500);\n\t\tp(\"Kapazitaet ausreichend? \" + ausreichend);\n\t\t\n\t}",
"public void eisagwgiGiatrou() {\n\t\t// Elegxw o arithmos twn iatrwn na mhn ypervei ton megisto dynato\n\t\tif(numOfDoctors < 100)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tdoctor[numOfDoctors] = new Iatros();\n\t\t\tdoctor[numOfDoctors].setFname(sir.readString(\"DWSTE TO ONOMA TOU GIATROU: \")); // Pairnei apo ton xristi to onoma tou giatrou\n\t\t\tdoctor[numOfDoctors].setLname(sir.readString(\"DWSTE TO EPWNYMO TOU GIATROU: \")); // Pairnei apo ton xristi to epitheto tou giatrou\n\t\t\tdoctor[numOfDoctors].setAM(rnd.nextInt(1000000)); // To sistima dinei automata ton am tou giatrou\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\t// Elegxos monadikotitas tou am tou giatrou\n\t\t\th = rnd.nextInt(1000000);\n\t\t\tfor(int i = 0; i < numOfDoctors; i++)\n\t\t\t{\n\t\t\t\tif(doctor[i].getAM() == 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(1000000);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnumOfDoctors++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"DEN MPOREITE NA EISAGETE ALLOUS GIATROUS!\");\n\t\t\tSystem.out.println(\"EXEI SYMPLHRWTHEI O PROVLEPOMENOS ARITHMOS!\");\n\t\t}\n\t}",
"@Test\n public void yksiVasemmalle() {\n char[][] kartta = Labyrintti.lueLabyrintti(\"src/main/resources/labyrinttiTestiVasen.txt\");\n assertFalse(kartta == null);\n Labyrintti labyrintti = new Labyrintti(kartta);\n RatkaisuLeveyshaulla ratkaisuSyvyyshaulla = new RatkaisuLeveyshaulla(labyrintti);\n String ratkaisu = ratkaisuSyvyyshaulla.ratkaisu();\n assertTrue(Tarkistaja.tarkista(ratkaisu, labyrintti));\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 dodajZmijuPocetak() {\n\t\tthis.zmija.add(new Cvor(1,4));\n\t\tthis.zmija.add(new Cvor(1,3));\n\t\tthis.zmija.add(new Cvor(1,2));\n\t\t\n\t\tint i = this.zmija.get(0).i;\n\t\tint j = this.zmija.get(0).j;\n\t\tthis.tabla[i][j] = 'O';\n\t\t\n\t\tfor (int k = 1; k < this.zmija.size(); k++) {\n\t\t\ti = this.zmija.get(k).i;\n\t\t\tj = this.zmija.get(k).j;\n\t\t\tthis.tabla[i][j] = 'o';\n\t\t}\t\n\t}",
"public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}",
"public void eisagwgiAstheni() {\n\t\t// Elegxw o arithmos twn asthenwn na mhn ypervei ton megisto dynato\n\t\tif(numOfPatient < 100)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tpatient[numOfPatient] = new Asthenis();\n\t\t\tpatient[numOfPatient].setFname(sir.readString(\"DWSTE TO ONOMA TOU ASTHENH: \")); // Pairnei to onoma tou asthenh apo ton xrhsth\n\t\t\tpatient[numOfPatient].setLname(sir.readString(\"DWSTE TO EPWNYMO TOU ASTHENH: \")); // Pairnei to epitheto tou asthenh apo ton xrhsth\n\t\t\tpatient[numOfPatient].setAMKA(rnd.nextInt(1000000)); // To sistima dinei automata ton amka tou asthenous\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\t//Elegxos monadikotitas tou amka tou astheni\n\t\t\th = rnd.nextInt(1000000);\n\t\t\tfor(int i = 0; i < numOfPatient; i++)\n\t\t\t{\n\t\t\t\tif(patient[i].getAMKA() == 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(1000000);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnumOfPatient++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"DEN MPOREITE NA EISAGETE ALLOUS ASTHENEIS!\");\n\t\t\tSystem.out.println(\"EXEI SYMPLHRWTHEI O PROVLEPOMENOS ARITHMOS!\");\n\t\t}\n\t}",
"public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }",
"public void jugar_con_el() {\n System.out.println(nombre + \" esta jugando contigo :D\");\n }",
"private Zivocich vytvorZivocicha() {\r\n final String[] zFarba = {\"cervena\", \"zelena\", \"modra\", \"zlta\", \"zlto-zelena\"};\r\n Zivocich zviera = null;\r\n double kolkoVazi = 0.0;\r\n\r\n //-- Vygenerujeme zviera\r\n int vygenerovane = 1 + generator.nextInt(4); //cislo <1,4>\r\n\r\n switch (vygenerovane) {\r\n case 1: //blcha \r\n double kolkoDoskoci=3 * generator.nextDouble() ; //cislo <0;2.99>\r\n double kolkoVyskoci=3 * generator.nextDouble() ; //cislo <0;2.99>\r\n zviera=new Blcha(6,kolkoDoskoci,kolkoVyskoci);\r\n break;\r\n case 2: //simpanz\r\n kolkoVazi=3 + (97 * generator.nextDouble()); //cislo <3;99.9>\r\n boolean cviceny;\r\n cviceny=generator.nextBoolean(); \r\n zviera=new Simpanz(kolkoVazi,cviceny);\r\n break;\r\n case 3: //papagaj\r\n kolkoVazi = 0.1 + (5*generator.nextDouble()); // cislo <0.1; 6>\r\n String farba = zFarba[generator.nextInt(5)]; // farba zo zoznamu\r\n zviera = new Papagaj(\"Ara\", 2, kolkoVazi, farba); \r\n break;\r\n case 4: //slon\r\n kolkoVazi=20 + (480*generator.nextDouble()); //cislo <20;500> \r\n int pocet=generator.nextInt(50); //pocet zubov bude <0,49>\r\n zviera=new Slon(kolkoVazi,pocet);\r\n break;\r\n } //------------------------------------------------------------- switch --\r\n return zviera;\r\n }",
"public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}",
"public void asetaTeksti(){\n }",
"@Test\r\n public void elCerdoNoSePuedeAtender() {\n }",
"private void yas(){\n System.out.println(namn);\n \n try{\n String fraga = \"SELECT TEXT FROM INLAGG WHERE RUBRIK = 'Borttappad strumpa'\";\n String XD = db.fetchSingle(fraga);\n System.out.println(XD);\n txtInlagg.append(XD);\n }\n catch(InfException e){\n JOptionPane.showMessageDialog(null, \"Kunde ej hämta inlägg\");\n }\n }",
"public void pridejNovePivo ()\n\t{\n\t\n\t\tpivo = pivo + PRODUKCE;\n\t\t\n\t}",
"public void displayPhieuXuatKho() {\n\t\tlog.info(\"-----displayPhieuXuatKho()-----\");\n\t\tif (!maPhieu.equals(\"\")) {\n\t\t\ttry {\n\t\t\t\tDieuTriUtilDelegate dieuTriUtilDelegate = DieuTriUtilDelegate.getInstance();\n\t\t\t\tPhieuTraKhoDelegate pxkWS = PhieuTraKhoDelegate.getInstance();\n\t\t\t\tCtTraKhoDelegate ctxWS = CtTraKhoDelegate.getInstance();\n\t\t\t\tDmKhoa dmKhoaNhan = new DmKhoa();\n\t\t\t\tdmKhoaNhan = (DmKhoa)dieuTriUtilDelegate.findByMa(IConstantsRes.KHOA_KC_MA, \"DmKhoa\", \"dmkhoaMa\");\n\t\t\t\tphieuTra = pxkWS.findByPhieutrakhoByKhoNhan(maPhieu, dmKhoaNhan.getDmkhoaMaso());\n\t\t\t\tif (phieuTra != null) {\n\t\t\t\t\tmaPhieu = phieuTra.getPhieutrakhoMa();\n\t\t\t\t\tresetInfo();\n\t\t\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\t\t\tngayXuat = df.format(phieuTra.getPhieutrakhoNgay());\n\t\t\t\t\tfor (CtTraKho ct : ctxWS.findByphieutrakhoMa(phieuTra.getPhieutrakhoMa())) {\n\t\t\t\t\t\tCtTraKhoExt ctxEx = new CtTraKhoExt();\n\t\t\t\t\t\tctxEx.setCtTraKho(ct);\n\t\t\t\t\t\tlistCtKhoLeTraEx.add(ctxEx);\n\t\t\t\t\t}\n\t\t\t\t\tcount = listCtKhoLeTraEx.size();\n\t\t\t\t\tisFound=\"true\";\n\t\t\t\t\t// = null la chua luu ton kho -> cho ghi nhan\n\t\t\t\t\t// = 1 da luu to kho -> khong cho ghi nhan\n\t\t\t\t\tif(phieuTra.getPhieutrakhoNgaygiophat()==null)\n\t\t\t\t\tisUpdate = \"1\";\n\t\t\t\t\telse\n\t\t\t\t\t\tisUpdate = \"0\";\n\t\t\t\t} else {\n\t\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_NULL, maPhieu);\n\t\t\t\t\treset();\n\t\t\t\t}\n\t\t\t\ttinhTien();\n\t\t\t} catch (Exception e) {\n\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_NULL, maPhieu);\n\t\t\t\treset();\n\t\t\t\tlog.error(String.format(\"-----Error: %s\", e));\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public void Zabojstwa() {\n\t\tSystem.out.println(\"Zabojstwa\");\n\t\tfor(int i=0;i<Plansza.getNiebezpieczenstwoNaPlanszy().size();i++) {\n\t\t\tfor(GenerujNiebezpieczenstwo niebez : Plansza.getNiebezpieczenstwoNaPlanszy()) {\n\n\t\t\t\tif(niebez.getZabojca() instanceof DzikieZwierzeta) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getNiewolnikNaPLanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getNiewolnikNaPLanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getNiewolnikNaPLanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getNiewolnikNaPLanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getUbrania() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getNiewolnikNaPLanszy().getJedzenie() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setUbrania(Plansza.getNiewolnikNaPLanszy().getUbrania() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setJedzenie(Plansza.getNiewolnikNaPLanszy().getJedzenie() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setLicznikNiebezpieczenstw(Plansza.getNiewolnikNaPLanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(niebez.getZabojca() instanceof Bandyci) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getRzemieslnikNaPlanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getRzemieslnikNaPlanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getRzemieslnikNaPlanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getRzemieslnikNaPlanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getMaterialy() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getRzemieslnikNaPlanszy().getNarzedzia() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tif(GeneratorRandom.RandomOd0(101) <= ZapisOdczyt.getRzemieslnicySzansa()) {\n\t\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setMaterialy(Plansza.getRzemieslnikNaPlanszy().getMaterialy() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setNarzedzia(Plansza.getRzemieslnikNaPlanszy().getNarzedzia() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setLicznikNiebezpieczenstw(Plansza.getRzemieslnikNaPlanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(niebez.getZabojca() instanceof Zlodzieje) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getArystokrataNaPlanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getArystokrataNaPlanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getArystokrataNaPlanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getArystokrataNaPlanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getTowary() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getArystokrataNaPlanszy().getZloto() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setTowary(Plansza.getArystokrataNaPlanszy().getTowary() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setZloto(Plansza.getArystokrataNaPlanszy().getZloto() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setLicznikNiebezpieczenstw(Plansza.getArystokrataNaPlanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}",
"private void laskeMatkojenPituus() {\n matkojenpituus = 0.0;\n\n for (Matka m : matkat) {\n matkojenpituus += m.getKuljettumatka();\n }\n\n }",
"private void poetries() {\n\n\t}",
"public void dodajZapis(int mjesec, int godina) throws FileNotFoundException{\r\n\t\t\r\n\t\tKalendar kalendar = new Kalendar();\r\n\t\t\r\n\t\tboolean notLegit = true;\r\n\t\tint dan = 0;\r\n\t\t\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Unosenje podsjetnika za mjesec : \" + kalendar.getMjesecText() + \" \" + godina);\r\n\t\t//ako korisnik unese datum kojeg nema u tom mjesecu, trazi se da pokusa ponovo\r\n\t\tdo{\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Za koji dan zelite unijeti podsjetnik\");\r\n\t\t\tdan = in.nextInt();\r\n\t\t\tif(dan > 0 && dan <= kalendar.getBrojDana()){\r\n\t\t\t\tnotLegit = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}while(notLegit);\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite podsjetnik\");\r\n\t\t//ovo je malo nelogicno, ali mora ovako\r\n\t\t//naime, prvi unos nece da prihvati, ne znam zasto, ne dopusta mi da unesem tekst, samo preskoci liniju (barem tako izgleda)\r\n\t\t//ako stavim in.next() radice, ali to mi ne pase jer moram omoguciti unos vise rijeci\r\n\t\tString text = in.nextLine();\r\n\t\ttext = in.nextLine();\r\n\t\t\r\n\t\tInOutPodsjetnik podsjetnik = new InOutPodsjetnik();\r\n\t\tpodsjetnik.ucitajPodsjetnik();\r\n\t\tzapisi = podsjetnik.getPodsjetnici();\r\n\t\t//pravljenje novog objekta Zapis\r\n\t\tZapis zapis = new Zapis();\r\n\t\tzapis.setDan(dan);\r\n\t\tzapis.setMjesec(mjesec);\r\n\t\tzapis.setGodina(godina);\r\n\t\tzapis.setText(dan + \"/\" + mjesec + \"/\" + godina + \" \" + text);\r\n\t\t//ako korisnik potvrdi da zeli sacuvati podatke novi objekat se dodaje u listu\r\n\t\t//i lista se snima u fajl\r\n\t\tif(potvrdiUnos()){\r\n\t\t\tzapisi.add(zapis);\r\n\t\t\tpodsjetnik.setPodsjetnike(zapisi);\r\n\t\t}\r\n\t}",
"public void naplnVrcholy() {\r\n System.out.println(\"Zadajte pocet vrcholov: \");\r\n pocetVrcholov = skener.nextInt();\r\n for (int i=0; i < pocetVrcholov; i++) {\r\n nekonecno = (int)(Double.POSITIVE_INFINITY);\r\n if(i==0) { //pre prvy vrchol potrebujeme nastavit vzdialenost 0 \r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu, 0, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n } else { //ostatne budu mat nekonecno alebo v tomto pripade 9999 (lebo tuto hodnotu v mensich grafoch nepresiahnem)\r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu,nekonecno, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n }\r\n }\r\n }",
"@Test\r\n\t\tpublic void testMovimientoTorreNegra0a() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreNegra0a,\r\n\t\t\t\t\t\"Error al comprobar los movimientos del rey negro en el inicio de una aprtida en la posición 8h. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}",
"private void tallennaTiedostoon() {\n viitearkisto.tallenna();\n }",
"public void pobierzukladprzegladRZiSBO() {\r\n if (uklad.getUklad() == null) {\r\n uklad = ukladBRDAO.findukladBRPodatnikRokPodstawowy(wpisView.getPodatnikObiekt(), wpisView.getRokWpisuSt());\r\n }\r\n List<PozycjaRZiSBilans> pozycje = UkladBRBean.pobierzpozycje(pozycjaRZiSDAO, pozycjaBilansDAO, uklad, \"\", \"r\");\r\n UkladBRBean.czyscPozycje(pozycje);\r\n rootProjektRZiS.getChildren().clear();\r\n List<StronaWiersza> zapisy = StronaWierszaBean.pobraniezapisowwynikoweBO(stronaWierszaDAO, wpisView);\r\n try {\r\n PozycjaRZiSFKBean.ustawRoota(rootProjektRZiS, pozycje, zapisy);\r\n level = PozycjaRZiSFKBean.ustawLevel(rootProjektRZiS, pozycje);\r\n Msg.msg(\"i\", \"Pobrano układ \");\r\n } catch (Exception e) {\r\n E.e(e);\r\n rootProjektRZiS.getChildren().clear();\r\n Msg.msg(\"e\", e.getLocalizedMessage());\r\n }\r\n }",
"@Override\n\tpublic void maasHesapla() {\n\t\tSystem.out.println(\"isciler icin maas 5000 tl \");\n \t\t\n\t}",
"private String vylozZvieraZVozidla() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz index zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Zivocich ziv = zoo.vylozZivocicha(pozicia-1);\r\n if (ziv == null) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n }\r\n zoo.pridajZivocicha(ziv);\r\n return \"Zviera \" + ziv\r\n + \"\\n\\tbolo vylozene z prepravneho vozidla\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }",
"public void trykkPaa() throws TrykketPaaBombe {\n // Ingenting skal skje dersom en av disse er true;\n if (brettTapt || trykketPaa || flagget) {\n return;\n }\n\n // Om ruten er en bombe taper man brettet\n if (bombe) {\n trykketPaa = true;\n setText(\"x\");\n setBackground(new Background(new BackgroundFill(Color.RED, CornerRadii.EMPTY, Insets.EMPTY)));\n throw new TrykketPaaBombe();\n }\n // Om ruten har null naboer skal et stoerre omraade aapnes\n else if (bombeNaboer == 0) {\n Lenkeliste<Rute> besokt = new Lenkeliste<Rute>();\n Lenkeliste<Rute> aapneDisse = new Lenkeliste<Rute>();\n aapneDisse.leggTil(this);\n // Rekursiv metode som fyller aapneDisse med riktige ruter\n finnAapentOmraade(besokt, aapneDisse);\n for (Rute r : aapneDisse) {\n r.aapne();\n }\n } else {\n aapne();\n }\n }",
"public String [] losuj(){\n int licznik = 0;\n String [] wybrane = new String[5];\n while(licznik<5){ // Dla jednego gracza\n int kolor = (int) (Math.random()*4);\n int wartosc = (int) (Math.random()*13);\n if(czyWybrana[kolor][wartosc]==false){\n czyWybrana[kolor][wartosc]=true;\n wybrane[licznik]=karty[kolor][wartosc]+\".jpg\";\n licznik++;\n }\n }\n return wybrane;// tablica z 5 wylosowanymi kartami\n }",
"public void vaaraSyote() {\n System.out.println(\"En ymmärtänyt\");\n kierros();\n }",
"public static void dodavanjePutnickogVozila() {\n\t\tString vrstaVozila = \"Putnicko Vozilo\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = UtillMethod.izabirGoriva();\n\t\tGorivo gorivo2 = UtillMethod.izabirGorivaOpet(gorivo);\n\t\tint brServisa = 1;\n\t\tdouble potrosnja100 = UtillMethod.unesiteDoublePotrosnja();\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 10000;\n\t\tdouble cenaServisa = 8000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tSystem.out.println(\"Unesite broj sedista u vozilu:\");\n\t\tint brSedist = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite broj vrata vozila:\");\n\t\tint brVrata = UtillMethod.unesiteInt();\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tif(gorivo2!=Main.nista) {\n\t\t\tgorivaVozila.add(gorivo2);\n\t\t}\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tPutnickoVozilo vozilo = new PutnickoVozilo(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja100, predjeno,\n\t\t\t\tpreServisa, cenaServisa, cenaDan, brSedist, brVrata, vozObrisano, servisiNadVozilom);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"---------------------------------------\");\n\t}",
"public static void trazenjeVozila(Iznajmljivac o) {\n\t\tLocalDate pocetniDatum = UtillMethod.unosDatum(\"pocetni\");\n\t\tLocalDate krajnjiDatum = UtillMethod.unosDatum(\"krajnji\");\n\t\tSystem.out.println(\"------------------------------------\");\n\t\tSystem.out.println(\"Provera dostupnosti vozila u toku...\\n\");\n\t\tArrayList<Vozilo> dostupnaVoz = new ArrayList<Vozilo>();\n\t\tint i = 0;\n\t\tfor (Vozilo v : Main.getVozilaAll()) {\n\t\t\tif (!postojiLiRezervacija(v, pocetniDatum, krajnjiDatum) && !v.isVozObrisano()) {\n\t\t\t\tSystem.out.println(i + \"-\" + v.getVrstaVozila() + \"-\" + \"Registarski broj\" + \"-\" + v.getRegBR()\n\t\t\t\t\t\t+ \"-Potrosnja na 100km-\" + v.getPotrosnja100() + \"litara\");\n\t\t\t\ti++;\n\t\t\t\tdostupnaVoz.add(v);\n\t\t\t}\n\t\t}\n\t\tif (i > 0) {\n\t\t\tSystem.out.println(\"------------------------------------------------\");\n\t\t\tSystem.out.println(\"Ukucajte kilometrazu koju planirate da predjete:\");\n\t\t\tdouble km = UtillMethod.unesiteBroj();\n\t\t\tint km1 = (int) km;\n\t\t\tporedjenjeVozila d1 = new poredjenjeVozila(km1);\n\t\t\tCollections.sort(dostupnaVoz,d1);\n\t\t\tint e = 0;\n\t\t\tfor(Vozilo v : dostupnaVoz) {\n\t\t\t\tdouble temp = cenaTroskaVoz(v, km, v.getGorivaVozila().get(0));\n\t\t\t\tSystem.out.println(e + \" - \" + v.getVrstaVozila()+ \"-Registarski broj: \"+ v.getRegBR()+\" | \"+ \"Cena na dan:\"+v.getCenaDan() +\" | Broj sedista:\"+ v.getBrSedist()+ \" | Broj vrata:\"+ v.getBrVrata() + \"| Cena troskova puta:\" + temp + \" Dinara\");\n\t\t\t\te++;\n\t\t\t}\n\t\t\tSystem.out.println(\"---------------------------------------\");\n\t\t\tSystem.out.println(\"Unesite redni broj vozila kojeg zelite:\");\n\t\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\t\tif (redniBroj < dostupnaVoz.size()) {\n\t\t\t\tDateTimeFormatter formatters = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n\t\t\t\tString pocetni = pocetniDatum.format(formatters);\n\t\t\t\tString krajnji = krajnjiDatum.format(formatters);\n\t\t\t\tdouble cena = UtillMethod.cenaIznaj(pocetniDatum, krajnjiDatum, dostupnaVoz.get(redniBroj));\n\t\t\t\tRezervacija novaRez = new Rezervacija(dostupnaVoz.get(redniBroj), o, cena, false, pocetni, krajnji);\n\t\t\t\tMain.getRezervacijeAll().add(novaRez);\n\t\t\t\tSystem.out.println(\"Uspesno ste napravili rezervaciju!\");\n\t\t\t\tSystem.out.println(\"---------------------------------\");\n\t\t\t\tSystem.out.println(novaRez);\n\t\t\t\tSystem.out.println(\"---------------------------------\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Nema dostupnih vozila za rezervaaciju.\");\n\t\t}\n\t}",
"public void zpracujObjednavky()\n\t{\n\t\tint idtmp = 0;\n\t\tfloat delkaCesty = 0;\n\t\t\n\t\tif (this.objednavky.isEmpty())\n\t\t{\n\t\t\treturn ;\n\t\t}\n\t\t\n\t\tNakladak nakl = (Nakladak) getVolneAuto();\n\t\t\n\t\tnakl.poloha[0] = this.poloha[0];\n\t\tnakl.poloha[1] = this.poloha[1];\n\t\tObjednavka ob = this.objednavky.remove();\n\n\t\t/*System.out.println();\n\t\tSystem.out.println(\"Objednavka hospody:\" + ob.id + \" se zpracuje pres trasu: \");\n\t\t */\n\t\tdelkaCesty += vyberCestu(this.id, ob.id, nakl);\n\t\t\n\t\twhile(nakl.pridejObjednavku(ob))\n\t\t{\n\t\t\tidtmp = ob.id;\n\t\t\t\n\t\t\tob = vyberObjednavku(ob.id);\n\t\t\tif (ob == null)\n\t\t\t{\n\t\t\t\tob=nakl.objednavky.getLast();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tobjednavky.remove(ob);\n\t\t\t\n\t\t\tdelkaCesty += vyberCestu(idtmp, ob.id, nakl);\n\t\t\t\n\t\t\tif((nakl.objem > 24)||(13-Simulator.getCas().hodina)*(nakl.RYCHLOST) + 100 < delkaCesty){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}\n\t\t\t/*\n\t\t\tif((Simulator.getCas().hodina > 12) && (delkaCesty > 80) ){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif((Simulator.getCas().hodina > 9) && (delkaCesty > 130) ){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}*/\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//cesta zpatky\n\t\tvyberCestu(ob.id, this.id, nakl);\n\t\tif (nakl.objem >= 1)\n\t\t{\n\t\t\tnakl.kDispozici = false;\n\t\t\tnakl.jede = true;\n\t\t\t//vytvoreni nove polozky seznamu pro statistiku\n\t\t\tnakl.novaStatCesta();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnakl.resetCesta();\n\t\t}\n\t}",
"@Test\n public void kaasunKonstruktoriToimiiOikeinTest() {\n assertEquals(rikkihappo.toString(),\"Rikkihappo Moolimassa: 0.098079\\n tiheys: 1800.0\\n lämpötila: 298.15\\n diffuusiotilavuus: 50.17\\npitoisuus: 1.0E12\");\n }",
"private void pojedi (int i, int j) {\n\t\trezultat++;\n\t\tthis.zmija.add(0, new Cvor(i,j));\n\t\tthis.dodajZmiju();\n\t\tthis.dodajHranu();\n\t}",
"@Test\r\n\t\tpublic void testMovimientoTorreNegra0() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreNegra0,\r\n\t\t\t\t\t\"Error al comprobar los movimientos del rey negro en el inicio de una aprtida en la posición 8a. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}",
"private int generujViacZvierat(int pocet){\r\n int poc = 0;\r\n for (int i = 0; i < pocet; i++) {\r\n if (zoo.pridajZivocicha(vytvorZivocicha())) poc++;\r\n }\r\n return poc;\r\n }",
"public void ucitajPotez(Potez potez) {\n\t\tint red = potez.vratiRed();\n\t\tint kolona = potez.vratiKolonu();\n\t\ttabla[red][kolona] = potez.vratiRezultat();\n\n\t\tif (potez.vratiRezultat() == Polje1.potopljen) {\n\t\t\tint gornjiRed, gornjaKolona;\n\t\t\tboolean cont1 = false;\n\t\t\tboolean cont2 = false;\n\t\t\tboolean redar = false;\n\t\t\tboolean kolonar = false;\n\t\t\twhile (redar == false) {\n\t\t\t\tif (red == 0) {\n\t\t\t\t\tgornjiRed = 0;\n\t\t\t\t\tcont1 = true;\n\t\t\t\t} else {\n\t\t\t\t\tgornjiRed = red - 1;\n\t\t\t\t}\n\t\t\t\tif (red == 9) {\n\t\t\t\t\tcont2 = true;\n\t\t\t\t}\n\t\t\t\tif (tabla[gornjiRed][kolona] == Polje1.pogodjen && cont1 == false) {\n\t\t\t\t\ttabla[gornjiRed][kolona] = Polje1.potopljen;\n\t\t\t\t\tred--;\n\t\t\t\t} else {\n\t\t\t\t\tcont1 = true;\n\t\t\t\t\tgornjiRed++;\n\t\t\t\t}\n\t\t\t\tif (cont1 == true) {\n\t\t\t\t\tif (tabla[gornjiRed][kolona] == Polje1.pogodjen || tabla[gornjiRed][kolona] == Polje1.potopljen) {\n\t\t\t\t\t\ttabla[gornjiRed][kolona] = Polje1.potopljen;\n\t\t\t\t\t\tred++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcont2 = true;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (cont1 == true && cont2 == true)\n\t\t\t\t\tredar = true;\n\t\t\t}\n\t\t\tcont1 = false;\n\t\t\tcont2 = false;\n\t\t\tred = potez.vratiRed();\n\t\t\twhile (kolonar == false) {\n\t\t\t\tif (kolona == 0) {\n\t\t\t\t\tgornjaKolona = 0;\n\t\t\t\t\tcont1 = true;\n\t\t\t\t} else {\n\t\t\t\t\tgornjaKolona = kolona - 1;\n\t\t\t\t}\n\t\t\t\tif (kolona == 9) {\n\t\t\t\t\tcont2 = true;\n\t\t\t\t}\n\t\t\t\tif (tabla[red][gornjaKolona] == Polje1.pogodjen && cont1 == false) {\n\t\t\t\t\ttabla[red][gornjaKolona] = Polje1.potopljen;\n\t\t\t\t\tkolona--;\n\t\t\t\t} else {\n\t\t\t\t\tcont1 = true;\n\t\t\t\t\tgornjaKolona++;\n\t\t\t\t}\n\t\t\t\tif (cont1 == true) {\n\t\t\t\t\tif (tabla[red][gornjaKolona] == Polje1.pogodjen || tabla[red][gornjaKolona] == Polje1.potopljen) {\n\t\t\t\t\t\ttabla[red][gornjaKolona] = Polje1.potopljen;\n\t\t\t\t\t\tkolona++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcont2 = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (cont1 == true && cont2 == true)\n\t\t\t\t\tkolonar = true;\n\n\t\t\t}\n\n\t\t}\n\n\n\t}",
"private String creaElenco() {\n String testoTabella ;\n String riga = CostBio.VUOTO;\n ArrayList listaPagine = new ArrayList();\n ArrayList listaRiga;\n HashMap mappaTavola = new HashMap();\n String cognomeText;\n int num;\n int taglioPagine = Pref.getInt(CostBio.TAGLIO_COGNOMI_PAGINA);\n String tag = \"Persone di cognome \";\n ArrayList titoli = new ArrayList();\n titoli.add(LibWiki.setBold(\"Cognome\"));\n titoli.add(LibWiki.setBold(\"Voci\"));\n\n for (Map.Entry<String, Integer> mappa: mappaCognomi.entrySet()) {\n\n cognomeText = mappa.getKey();\n num = mappa.getValue();\n if (num >= taglioPagine) {\n cognomeText = tag + cognomeText + CostBio.PIPE + cognomeText;\n cognomeText = LibWiki.setQuadre(cognomeText);\n cognomeText = LibWiki.setBold(cognomeText);\n }// end of if cycle\n\n listaRiga = new ArrayList();\n listaRiga.add(cognomeText);\n listaRiga.add(num);\n listaPagine.add(listaRiga);\n\n }// end of for cycle\n mappaTavola.put(Cost.KEY_MAPPA_SORTABLE_BOOLEAN, true);\n mappaTavola.put(Cost.KEY_MAPPA_TITOLI, titoli);\n mappaTavola.put(Cost.KEY_MAPPA_RIGHE_LISTA, listaPagine);\n testoTabella = LibWiki.creaTable(mappaTavola);\n\n return testoTabella;\n }",
"private static void grabarYleerCirujano() {\r\n\t\tCirujano cirujano = new Cirujano(\"Raul\", \"NoSe\", \"67\", \"Piso\", \"4\", \"20\");\r\n\t\tDTO<Cirujano> dtoCirujano = new DTO<>(\"src/Almacen/cirujano.dat\");\r\n\t\tif (dtoCirujano.grabar(cirujano) == true) {\r\n\t\t\tSystem.out.println(cirujano.getNombre());\r\n\t\t\tSystem.out.println(cirujano.getDireccion());\r\n\t\t\tSystem.out.println(\"Cirujano grabado\");\r\n\t\t}\r\n\t\t;\r\n\r\n\t\tCirujano cirujanoLeer = dtoCirujano.leer();\r\n\t\tSystem.out.println(cirujanoLeer);\r\n\t\tSystem.out.println(cirujanoLeer.getNombre());\r\n\t}",
"public static void main(String[] args) {\n Pasien Dam = new Pasien(\"Puspaningsyas\");\r\n Dam.setTanggalLahir(1974, 1, 12);\r\n// String str = Dam.getNama();\r\n \r\n \r\n\r\n System.out.println(\"Umur = \" + Dam.getUsia());\r\n Dam.NomorRekamMedis();\r\n // System.out.println(str.substring(0, 3));\r\n\r\n// Pasien Dam2 = new Pasien(\"Dam\");\r\n// Dam2.setTanggalLahir(1999,3,13);\r\n// System.out.println(\"Umur = \" +Dam2.getUsia());\r\n }",
"double objetosc() {\n return dlugosc * wysokosc * szerokosc; //zwraca obliczenie poza metode\r\n }",
"public void trenneVerbindung();",
"public void renovarBolsa() {\n\t\tSystem.out.println(\"Bolsa renovada com suceso!\");\n\t}",
"public void podstawZapiszDaneWielePlikow() throws IOException {\r\n\t\tBufferedWriter bw = null; // tutaj zaSztywno\r\n\t\tString[] wektorDanych;\r\n\t\tString nazwaPlikuWynikowego = null;\r\n\t\tint licznik = 0;\r\n\t\twhile ((wektorDanych = daneEgzemplarza.getNextCorrectData()) != null) {\r\n\t\t\t++licznik;\r\n\t\t\tnazwaPlikuWynikowego = \"./wynik/wynik\" + Integer.toString(licznik)\r\n\t\t\t\t\t+ \".\" + rozszerzenieSzablonu;\r\n\t\t\tbw = new BufferedWriter(new FileWriter(nazwaPlikuWynikowego));\r\n\t\t\tfor (String[] s : calaZawartoscRozsep) {\r\n\t\t\t\tfor (String wyraz : s) {\r\n\t\t\t\t\tif (wyraz.equals(interpretujWyraz(wyraz)))\r\n\t\t\t\t\t\tfor (int i = 0; i < zmienne.length; ++i) {\r\n\t\t\t\t\t\t\tif (wyraz.equals(zmienne[i])) {\r\n\t\t\t\t\t\t\t\twyraz = wektorDanych[i];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\twyraz = interpretujWyraz(wyraz);\r\n\r\n\t\t\t\t\tbw.write(wyraz);\r\n\t\t\t\t}\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.close();\r\n\t\t}\r\n\t}",
"@Test\r\n\t\tpublic void testMovimientoTorreBlanca0a() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreBlanca0a,\r\n\t\t\t\t\t\"Error al comprobar los movimientos de la torre blanca en el inicio de una aprtida en la posición 1h. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}",
"private UsineJoueur() {}",
"public void urciStupneVrcholu(){\n\t\tfor(int i = 0;i < vrchP.length; i++){\n\t\t\tstupenVrcholu(vrchP[i].klic);\n\t\t}\n\t}",
"public void Ordenamiento() {\n\n\t}",
"private void xuLyThemDV(){\n if (checkMaDV(txtMaDV.getText())==false){\n JOptionPane.showMessageDialog(null, \"Mã dịch vụ phải thuộc dạng [DV+Số].\\n Vui lòn kiểm tra lại!\");\n txtMaDV.requestFocus();\n return;\n }//Kiem tra maDV \n \n if(checkTenDV(txtTenDV.getText())==false){\n JOptionPane.showMessageDialog(null, \"Tên dịch vụ không được bỏ trống!\");\n txtTenDV.requestFocus();\n return;\n }//Kiem tra tenDV\n \n DichVuService dichVuService = new DichVuService();\n if (dichVuService.kiemTraDichVuDaTonTai(txtMaDV.getText())==false){\n int x = dichVuService.themDV(txtMaDV.getText(), txtTenDV.getText());\n if(x>0){\n hienThiDichVu();\n JOptionPane.showMessageDialog(null, \"Đã thêm!\");\n }else{\n JOptionPane.showMessageDialog(null, \"Thêm thất bại!\");\n txtMaDV.requestFocus();\n return;\n }\n }else{\n JOptionPane.showMessageDialog(null, \"Dịch vụ đã tồn tại. Vui lòng kiểm tra lại!\");\n txtMaDV.requestFocus();\n return;\n }\n \n }",
"private void nuskaitymas() {\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Iveskite zodi\");\n zodis = sc.nextLine();\n patikrinimas(zodis);\n }",
"public void mainkan(){\n System.out.println();\n //System.out.printf(\"Waktu: %1.2f\\n\", this.oPlayer.getWaktu());\n System.out.println(\"Nama : \" + this.oPlayer.nama);\n System.out.println(\"Senjata : \" + this.oPlayer.getNamaSenjataDigunakan());\n System.out.println(\"Kesehatan : \" + this.oPlayer.getKesehatan());\n// System.out.println(\"Daftar Efek : \" + this.oPlayer.getDaftarEfekDiri());\n System.out.println(\"Nama Tempat : \" + this.namaTempat);\n System.out.println(\"Narasi : \" + this.narasi);\n }",
"@Test\r\n\tpublic void testGetPeliBalorazioNormalizatuak() {\n\t\tBektorea bek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == -2.75);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == -0.5);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.25);\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 0);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == -0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.75);\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 1.75);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t\r\n\t\t// Normalizazioa Zsore erabiliz egiten dugu\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Zscore());\r\n\t\t\r\n\t\tDecimalFormat df = new DecimalFormat(\"#.0000\");\r\n\t\t\r\n\t\t// p1 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(df.format(bek.getBalioa(e1.getId())).equals(\"1,2247\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\"-1,6398\"));\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(df.format(bek.getBalioa(e1.getId())).equals(\"-1,2247\"));\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 1);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\",1491\"));\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 0);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == -1);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\",4472\"));\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\"1,0435\"));\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Batezbestekoa());\r\n\t\t\r\n\t}",
"String[] chiediSecondaScommessa();",
"public void test6(){\r\n\t\tZug zug1 = st.zugErstellen(2, 0, \"Zug 1\");\r\n\t\tZug zug2 = st.zugErstellen(2, 0, \"Zug 2\");\r\n\t\tst.fahren();\r\n\t}",
"public void zmiana_rozmiaru_okna()\n {\n b.dostosowanie_rozmiaru(getWidth(),getHeight());\n w.dostosowanie_rozmiaru(getWidth(),getHeight());\n\n for (Pilka np : p) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n for (Naboj np : n) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n for (Bonus np : bon) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n\n }",
"private void xuLyThanhToanDichVu() {\n if(checkGia(txtThanhToanDVSoLuongCu.getText())== false){\n JOptionPane.showMessageDialog(null, \"Số lượng không hợp lệ. Vui lòng kiểm tra lại!\");\n txtThanhToanDVSoLuongCu.requestFocus();\n return;\n }//Kiem tra so luong cu\n \n if(checkGia(txtThanhToanDVSoLuongMoi.getText())== false){\n JOptionPane.showMessageDialog(null, \"Số lượng không hợp lệ. Vui lòng kiểm tra lại!\");\n txtThanhToanDVSoLuongMoi.requestFocus();\n return;\n }//kiem tra so luong moi\n \n float soLuongCu = Float.valueOf(txtThanhToanDVSoLuongCu.getText().trim());\n float soLuongMoi = Float.valueOf(txtThanhToanDVSoLuongMoi.getText().trim());\n float soLuong = soLuongMoi - soLuongCu;\n txtThanhToanDVSoLuong.setText(soLuong+\"\");\n tongCong += soLuong * Float.valueOf(txtThanhToanDVGiaDV.getText().trim());\n txtThanhToanTongCong.setText(tongCong+\" VNĐ\");\n \n }",
"public String nippideJarjend () throws Exception {\n File nippideFail = new File(\"nipid.txt\"); // txt failid peavad olema proj. samas kaustas antud juhul\n Scanner sc = new Scanner(nippideFail);\n List<String> listNipid = new ArrayList<>(); //failist loetud nipid salvestatakse kausta\n while (sc.hasNextLine()) {\n String rida = sc.nextLine();//rida tuleb eraldi muutujasse salvestada\n listNipid.add(rida);}\n sc.close();\n return listNipid.get((int) (Math.random() * (listNipid.size()))); //randomiga valitakse nipp\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 boolean jeu() {\n int k;\n\n String compJoueur = \"\";\n String compOrdi = \"\";\n String reponse;\n\n boolean victoireJoueur = false;\n boolean victoireOrdi = false;\n String mystJoueur = challenger.nbMystere(); /**nb que le joueur doit trouver*/\n String mystOrdi = defenseur.nbMystere(); /**nb que l'ordinateur doit trouver*/\n String propOrdi = defenseur.proposition(); /**ordinateur genere un code aleatoire en premiere proposition*/\n log.info(\"Proposition ordinateur : \" + propOrdi); /**afficher proposition ordinateur*/\n String propJoueur = \"\";\n String goodResult = MethodesRepetitives.bonResultat();\n\n\n for (k = 1; !victoireJoueur && !victoireOrdi && k <= nbEssais; k++) { /**si ni le joueur ou l'ordinateur n'ont gagne et si le nombre d'essais n'est pas atteind, relancer*/\n\n compOrdi = MethodesRepetitives.compare(mystOrdi, propOrdi); /**lancer la methode de comparaison du niveau defenseur*/\n log.info(\"Reponse Ordinateur :\" + compOrdi); /**afficher la comparaison*/\n propJoueur = challenger.proposition(); /**demander une saisie au joueur selon le mode challenger*/\n compJoueur = MethodesRepetitives.compare(mystJoueur, propJoueur); /**comparer selon le mode challenger*/\n log.info(\"Reponse Joueur :\" + compJoueur); /**afficher la comparaison*/\n\n if (compOrdi.equals(goodResult)) { /**si l'ordinateur a gagne, changement de la valeur victoireOrdi*/\n victoireOrdi = true;\n }else if(compJoueur.equals(goodResult)) {/**si le joueur a gagne changement de la valeur victoireJoeur*/\n victoireJoueur = true;\n } else if (k < nbEssais) { /**sinon redemander un code a l'ordinateur selon les symboles de comparaison*/\n propOrdi = defenseur.ajuste(propOrdi, compOrdi);\n log.info(\"Proposition Ordinateur :\" + propOrdi);\n }\n }\n\n if (victoireOrdi || !victoireJoueur)/**si l'ordinateur ou le joueur perdent alors perdu sinon gagne*/\n victoireJoueur = false;\n else\n victoireJoueur = true;\n\n return victoireJoueur;\n\n\n }",
"public void test5(){\r\n\t\tZug zug1 = st.zugErstellen(1, 0, \"Zug 1\");\r\n\t\tZug zug2 = st.zugErstellen(0, 3, \"Zug 2\"); \r\n\t}",
"@Test\r\n\tpublic void testGetErabBalorazioNormalizatuak() {\n\t\tBektorea bek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e1.getId());\r\n\t\tassertTrue(bek.luzera() == 3);\r\n\t\tassertTrue(bek.getBalioa(p1.getPelikulaId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == -0.5);\r\n\t\tassertTrue(bek.getBalioa(p4.getPelikulaId()) == 0);\r\n\t\tassertFalse(bek.bektoreanDago(p3.getPelikulaId()));\r\n\t\t\r\n\t\t// e2 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Batezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e2.getId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(p3.getPelikulaId()) == -0.5);\r\n\t\tassertFalse(bek.bektoreanDago(p1.getPelikulaId()));\r\n\t\t\r\n\t\t// e3 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Batezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e3.getId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(bek.getBalioa(p1.getPelikulaId()) == -2.75);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 0.25);\r\n\t\tassertTrue(bek.getBalioa(p3.getPelikulaId()) == 0.75);\r\n\t\tassertTrue(bek.getBalioa(p4.getPelikulaId()) == 1.75);\r\n\t\t\r\n\t\t// e4 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Batezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e4.getId());\r\n\t\tassertTrue(bek.luzera() == 1);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 0);\r\n\t\tassertFalse(bek.bektoreanDago(p1.getPelikulaId()));\r\n\t\t\r\n\t\t\r\n\t\t// Normalizazioa Zsore erabiliz egiten dugu\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Zscore());\r\n\t\t\r\n\t\tDecimalFormat df = new DecimalFormat(\"#.0000\");\r\n\t\t\r\n\t\t// e1 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e1.getId());\r\n\t\tassertTrue(bek.luzera() == 3);\r\n\t\tassertTrue(df.format(bek.getBalioa(p1.getPelikulaId())).equals(\"1,2247\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(p2.getPelikulaId())).equals(\"-1,2247\"));\r\n\t\tassertTrue(bek.getBalioa(p4.getPelikulaId()) == 0);\r\n\t\tassertFalse(bek.bektoreanDago(p3.getPelikulaId()));\r\n\t\t\r\n\t\t// e2 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e2.getId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 1);\r\n\t\tassertTrue(bek.getBalioa(p3.getPelikulaId()) == -1);\r\n\t\tassertFalse(bek.bektoreanDago(p1.getPelikulaId()));\r\n\t\t\r\n\t\t// e3 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e3.getId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(df.format(bek.getBalioa(p1.getPelikulaId())).equals(\"-1,6398\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(p2.getPelikulaId())).equals(\",1491\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(p3.getPelikulaId())).equals(\",4472\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(p4.getPelikulaId())).equals(\"1,0435\"));\r\n\t\t\r\n\t\t// e4 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e4.getId());\r\n\t\tassertTrue(bek.luzera() == 1);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 0);\r\n\t\tassertFalse(bek.bektoreanDago(p1.getPelikulaId()));\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Batezbestekoa());\r\n\t\t\r\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public void anazitisiSintagisVaseiGiatrou() {\n\t\tString doctorName = null;\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\tdoctorName = sir.readString(\"DWSTE TO EPWNYMO TOU GIATROU: \"); // Zitaw apo ton xrhsth na mou dwsei to onoma tou giatrou pou exei grapsei thn sintagh pou epithumei\n\t\t\tfor(int i = 0; i < numOfPrescription; i++)\n\t\t\t{\n\t\t\t\tif(doctorName.equals(prescription[i].getDoctorLname())) // An vre8ei kapoia antistoixeia emfanizw thn syntagh pou exei grapsei o giatros\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"VRETHIKE SYNTAGH!\");\n\t\t\t\t\t// Emfanizw thn/tis sintagh/sintages pou exoun graftei apo ton sygkekrimeno giatro\n\t\t\t\t\tprescription[i].print();\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\ttmp_2++;\n\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 IATRO ME EPWNYMO: \" + doctorName);\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 static void main(String[] args) {\n\t\t\t\n\t\t\t//utworzenie zmiennych okno1 i okno2 i ich zainicjowanie\n\t\t\tOkno okno1 = new Okno();\n\t\t\tOkno okno2 = new Okno(1800,1800,3);\n\t\t\t\n\t\t\t//wywołanie metody \"otwórz\"\n\t\t\tokno1.otworz();\n\t\t\tokno2.otworz(0);\n\t\t\tokno2.otworz(2);\n\t\t\t\n\t\t\t//wywołanie metody \"wypisz stan\"\n\t\t\tokno1.wypiszStan();\n\t\t\tokno2.wypiszStan();\n\t\t\t\n\t\t\t//wywołanie metod \"zamknij\" oraz metody ustawiającej długosc okna\n\t\t\tokno1.zamknij();\n\t\t\tokno2.setDlugosc(2100);\n\t\t\tokno2.zamknij(0);\n\t\t\t\n\t\t\t//utworzenie i zainicjowanie zmiennej\n\t\t\tKlamka kl = new Klamka();\n\t\t\tkl.setCzyKluczyk(true);\n\t\t\t\n\t\t\t//metody dostepowe i zwracajace \n\t\t\tokno2.getSkrzydla()[1].setKlamka(kl);\n\t\t\tokno2.getSkrzydla()[2].setKlamka(null);\n\t\t\t\n\t\t\t//wywołanie metody \"wypisz stan\"\n\t\t\tokno1.wypiszStan();\n\t\t\tokno2.wypiszStan();\n\t\t\t\n\t\t}",
"public void podaj_cene() {\n\t\tdo{System.out.print(\"Podaj cene średniej pizzy:\");\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner odczyt= new Scanner(System.in);\n\t\tcena= odczyt.nextInt();\n\t\tif(cena<6){\n\t\t\tSystem.out.println(\"Zbyt niska cena!\");\n\t\t }\n\t\t}while(cena<6);\n\t\t}",
"private void jogarIa() {\n\t\tia = new IA(this.mapa,false);\r\n\t\tia.inicio();\r\n\t\tthis.usouIa = true;\r\n\t\tatualizarBandeirasIa();//ATUALIZA AS BANDEIRAS PARA DEPOIS QUE ELA JOGOU\r\n\t\tatualizarNumeroBombas();//ATUALIZA O NUMERO DE BOMBAS PARA DPS QUE ELA JOGOU\r\n\t\tatualizarTela();\r\n\t\tif(ia.isTaTudoBem() == false)\r\n\t\t\tJOptionPane.showMessageDialog(this, \"IMPOSSIVEL PROSSEGUIR\", \"IMPOSSIVEL ENCONTRAR CASAS CONCLUSIVAS\", JOptionPane.INFORMATION_MESSAGE);\r\n\t}",
"public Pengenalan(){ //Constructor (Nama harus sama dengan Class)\n System.out.println(\"\\nConstructor : \");\n System.out.println(\"Dibutuhkan untuk pemanggilan saat diimport oleh Class lain atau Class sendiri\");\n methode();\n int men = menthos();\n System.out.println(\"Nilai yang didapat dari method menthos : \"+men);\n }",
"public void uruchomGre()\n\t{\n\t\tustawPojazdNaPoczatek();\n\t\tplanszaWidokHND.repaint();\n\t\twToku = true;\n\t\tzegar.start();\n\t\tpauza = false;\n\t}",
"@Test\r\n\t\tpublic void testMovimientoTorreBlanca0() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreBlanca0,\r\n\t\t\t\t\t\"Error al comprobar los movimientos de la torre blanca en el inicio de una aprtida en la posición 1a. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}"
] | [
"0.68062353",
"0.64202505",
"0.63661706",
"0.6343081",
"0.62800777",
"0.6238886",
"0.6223488",
"0.62054396",
"0.6205385",
"0.61871",
"0.617858",
"0.61678046",
"0.61607456",
"0.61465997",
"0.6124715",
"0.6118141",
"0.6112282",
"0.61027527",
"0.6093204",
"0.60862374",
"0.6084353",
"0.60755265",
"0.6051369",
"0.6048699",
"0.6024448",
"0.60212046",
"0.60109496",
"0.5998195",
"0.5996213",
"0.599362",
"0.599255",
"0.59860146",
"0.5977058",
"0.5975296",
"0.5966048",
"0.5960715",
"0.5944622",
"0.59404933",
"0.593683",
"0.5929663",
"0.5927368",
"0.5922959",
"0.5917956",
"0.59141123",
"0.5898855",
"0.58977336",
"0.58868164",
"0.58808976",
"0.58771855",
"0.5877163",
"0.58765966",
"0.5875249",
"0.5873994",
"0.5871279",
"0.5863935",
"0.58597416",
"0.5854298",
"0.58524626",
"0.5852202",
"0.58480364",
"0.5841942",
"0.58369446",
"0.5836764",
"0.58340794",
"0.58333284",
"0.58305144",
"0.58237517",
"0.58183897",
"0.581202",
"0.5808137",
"0.5806694",
"0.5799372",
"0.57953054",
"0.57879233",
"0.57829183",
"0.5782066",
"0.5774643",
"0.5770357",
"0.5770346",
"0.57697594",
"0.5763205",
"0.57619727",
"0.5756454",
"0.57540244",
"0.5752032",
"0.57496023",
"0.57376975",
"0.57357115",
"0.5735703",
"0.57302505",
"0.5729927",
"0.57190245",
"0.57183266",
"0.5715483",
"0.5714999",
"0.57143617",
"0.5712194",
"0.5709253",
"0.5708283",
"0.5704719",
"0.5702785"
] | 0.0 | -1 |
najbardziej na lewo zwraca przyjmuje liste i ? | public <T> void traverse(ArrayList<T> list); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void obrniListu() {\n if (prvi != null && prvi.veza != null) {\n Element preth = null;\n Element tek = prvi;\n \n while (tek != null) {\n Element sled = tek.veza;\n \n tek.veza = preth;\n preth = tek;\n tek = sled;\n }\n prvi = preth;\n }\n }",
"public void skratiListu() {\n if (!jePrazna()) {\n int n = Svetovid.in.readInt(\"Unesite broj elemenata za skracivanje: \");\n obrniListu(); //Zato sto se trazi odsecanje poslednjih n elemenata\n while (prvi != null && n > 0) {\n prvi = prvi.veza;\n n--;\n }\n obrniListu(); //Vraca listu u prvobitni redosled\n }\n }",
"public void listar() {\n\t\t\n\t}",
"@Override\n\tpublic ArrayList<Lista> listaListeElettorali() {\n\t\t\t\n\t\t\t\n\t\t\tDB db = getDB();\n\t\t\tMap<Integer, Lista> map = db.getTreeMap(\"liste\");\n\t\t\tArrayList<Lista> liste = new ArrayList<Lista>();\n\t\t\tSet<Integer> keys = map.keySet();\n\t\t\tfor (int key : keys) {\n\t\t\t\tliste.add(map.get(key));\n\t\t\t}\n\t\n\t\t\treturn liste;\n\t\t\t\n\t\t}",
"@Override\n\tpublic ArrayList<String> partecipantiListaElettorale(String nome) {\n\t\tDB db = getDB();\n\t\tMap<Integer, Lista> map = db.getTreeMap(\"liste\");\n\n\t\tSet<Integer> keys = map.keySet();\n\t\tfor (int key : keys) {\n\t\t\tif (map.get(key).getNomeLista().equals(nome)) {\n\t\t\t\treturn map.get(key).getComponenti();\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}",
"public ListaPracownikow() {\n generujPracownikow();\n //dodajPracownika();\n }",
"public String prikaziListu() {\r\n\t\treturn SOPrikazListe.izvrsi(lista.vratiRangListu(), lista.brRezultata);\r\n\t}",
"public void listar(){\r\n // Verifica si la lista contiene elementoa.\r\n if (!esVacia()) {\r\n // Crea una copia de la lista.\r\n Nodo aux = inicio;\r\n // Posicion de los elementos de la lista.\r\n int i = 0;\r\n // Recorre la lista hasta el final.\r\n while(aux != null){\r\n // Imprime en pantalla el valor del nodo.\r\n System.out.print(i + \".[ \" + aux.getValor() + \" ]\" + \" -> \");\r\n // Avanza al siguiente nodo.\r\n aux = aux.getSiguiente();\r\n // Incrementa el contador de la posión.\r\n i++;\r\n }\r\n }\r\n }",
"public void ouvrirListe(){\n\t\n}",
"private void caricaLista() {\n /** variabili e costanti locali di lavoro */\n ArrayList unaLista = null;\n CampoDati unCampoDati = null;\n CDBLinkato unCampoDBLinkato = null;\n //@todo da cancellare\n try { // prova ad eseguire il codice\n /* recupera il campo DB specializzato */\n unCampoDBLinkato = (CDBLinkato)unCampoParente.getCampoDB();\n\n /* recupera la lista dal campo DB */\n unaLista = unCampoDBLinkato.caricaLista();\n\n /* recupera il campo dati */\n unCampoDati = unCampoParente.getCampoDati();\n\n /* registra i valori nel modello dei dati del campo */\n if (unaLista != null) {\n unCampoDati.setValoriInterni(unaLista);\n// unCampoDatiElenco.regolaElementiAggiuntivi();\n } /* fine del blocco if */\n\n } catch (Exception unErrore) { // intercetta l'errore\n /* mostra il messaggio di errore */\n Errore.crea(unErrore);\n } /* fine del blocco try-catch */\n\n }",
"@Override\n\tpublic ArrayList<Lista> listaListeElettoraliDiElezione(String nomeElezione) {\n\t\t\t\n\t\t\tDB db = getDB();\n\t\t\tMap<Integer, Lista> map = db.getTreeMap(\"liste\");\n\t\t\tArrayList<Lista> liste = new ArrayList<Lista>();\n\t\t\tSet<Integer> keys = map.keySet();\n\t\n\t\t\tfor (int key : keys) {\n\t\t\t\tif (map.get(key).getElezione().equals(nomeElezione))\n\t\t\t\t\tliste.add(map.get(key));\n\t\t\t}\n\t\t\treturn liste;\n\t\t}",
"public static void main(String[] args) {\t\n\t\t//List olusturma nasil yapilir?\n\t\t//1. yol\n\t\tArrayList<String> sl1= new ArrayList<>();\n\t\t\n\t\t//2. yol\n\t\tArrayList<String> sl2= new ArrayList<>();\n\t\tSystem.out.println(sl1+\"\"+sl2);\n\t\t//3. yol (bunu kullanacagiz)\n\t\tList<String> sl3=new ArrayList<>();\n\t\tSystem.out.println(sl3);\n\t\t\n\t\t//Liste eleman ekleme\n\t\t\n\t\tsl3.add(\"A\");\n\t\tSystem.out.println(sl3);\n\t\t\n\t\tsl3.add(\"B\");\n\t\tSystem.out.println(sl3);\n\t\t\n\t\tsl3.add(\"C\");\n\t\tSystem.out.println(sl3);\n\t\t\n\t\t//herhangi bir indexe eleman ekleme\n\t\t\n\t\tsl3.add(0, \"Mustafa\");\n\t\t System.out.println(sl3);//[Mustafa, A, X, B, C]\n\t\t \n\t\t //List'lerde eleman sayisini bulma nasil yapilir?\n\t\t System.out.println(sl3.size());//5\n\t\t \n\t\t //Bir list'in bos olup olmadigin nasil anlariz?\n\t\t System.out.println(sl3.isEmpty());//isEmpty() ==> bos ise true, dolu ise false verir\n\t\t \n\t\t //Bir list'den istenen elemani silme nasil yapilir?\n\t\t \n\t\t //1. Yol: index ile silme yapabilirsiniz.\n\t\t System.out.println(sl3.remove(0));\n\t\t System.out.println(sl3);//[A, X, B, C]\n\t\t \n\t\t //2. Yol: Eleman secip sil\n\t\t sl3.remove(\"X\");\n\t\t System.out.println(sl3);//[A, B, C]\n\t\t \n\t\t sl3.add(\"B\");//[A, B, C, B]\n\t\t System.out.println(sl3.remove(\"B\"));//true\n\t\t //Ayni elemandan 1 den fazla varsa ilkini siler\n\t\t System.out.println(sl3);//[A, C, B]\n\t\t \n\t\t \n\t\t System.out.println(sl3.remove(\"W\"));//false\n\t\t //Java'dan olmayan bir elemani remove etmesini isterseniz\n\t\t //remove edemez ve list'i aynen oldugu gibi birakir.\n\t\t System.out.println(sl3);//[A, C, B]\n\t\t \n\t\t //remove(index) ne return eder?\n\t\t // sl3 ==> [A, C, B]\n\t\t System.out.println(sl3.remove(1));//C\n\t\t System.out.println(sl3);//[A, B]\n\t\t \n\t\t//remove(eleman) ne return eder?\n\t\t// sl3 ==> [A, B] \n\t\t System.out.println(sl3.remove(\"A\"));//true\n\t\t //remove() methodunun icine tamsayi koyarsaniz \n\t\t //Java onu index kabul eder. \n\t\t //Bu yuzden elemanlari integer olan bir listteki elemanlari silmek icin \n\t\t //remove() methodunun sadece indexlisini kullanabilirsiniz.\n\n \n}",
"public ListaDuplamenteEncadeada(){\r\n\t\t\r\n\t}",
"public ArrayList<String> mostraLlistaDiscret(){\n ArrayList<String> tauleta = new ArrayList<>();\n int p = 0;\n System.out.print(\"num atribs disc de 0: \"+list.getAtribs().get(0).getAtribsDisc().size());\n ArrayList<Atribut> disc = new ArrayList<Atribut>();\n\n for (int i=0; i<list.getAtribs().size(); i++){\n if (list.getAtribs().get(i).getDiscret()) disc.add(list.getAtribs().get(i));\n }\n\n\n String aux = \"\";\n for (int i=0; i<disc.size(); i++){\n for (int k=0; k<disc.get(i).getAtribsDisc().size(); k++) {\n aux += disc.get(i).getAtribsDisc().get(k).getNom() + \"\\t\";\n }\n }\n tauleta.add(aux);\n for (int j=0; j<list.getNumCasos(); j++) {\n aux = \"\";\n for (int i = 0; i < disc.size(); i++) {\n int f = 0;\n if (!disc.get(i).getShowDefault()) f++;\n for (int k=f; k<disc.get(i).getAtribsDisc().size(); k++) {\n aux += String.valueOf(disc.get(i).getAtribsDisc().get(k).getCasos().get(j)) + \"\\t\";\n }\n }\n tauleta.add(aux);\n }\n return tauleta;\n }",
"public void ispisiSveNapomene() {\r\n\t\tint i = 0;// redni broj napomene\r\n\t\tint brojac = 0;\r\n\t\tfor (Podsjetnik podsjetnik : lista) {\r\n\r\n\t\t\ti++;\r\n\t\t\tSystem.out.println(i + \")\" + podsjetnik);\r\n\t\t\tbrojac = i;\r\n\t\t}\r\n\t\tif (brojac == 0) {\r\n\t\t\tSystem.out.println(\"Nema unesenih napomena!!\");\r\n\t\t}\r\n\r\n\t}",
"private void ucitajPodatke() {\n \n DefaultListModel<Voznja> m = new DefaultListModel<>();\n obrada.getPodaci().forEach(s->m.addElement(s));\n lstPodaci.setModel(m);\n\n }",
"ArrayList<Float> pierwszaPredykcjaWezPredykcjeZListy()\n\t{\n\t\tArrayList<Float> L1 = new ArrayList<Float>();\n\t\t\n\t\tint i=0;\n\t\twhile (i<Stale.horyzontCzasowy && (LokalneCentrum.getTimeIndex()+i)<listaCenWczytanaZPliku.size())\n\t\t{\n\t\t\tL1.add(listaCenWczytanaZPliku.get(LokalneCentrum.getTimeIndex()+i));\n\t\t\ti++;\n\t\t}\n\t\t\n\t\treturn L1;\n\t}",
"private void listarItems() {\r\n // Cabecera\r\n System.out.println(\"Listado de Items\");\r\n System.out.println(\"================\");\r\n\r\n // Criterio de Ordenación/Filtrado\r\n System.out.printf(\"Criterio de Ordenación .: %S%n\", criOrd.getNombre());\r\n System.out.printf(\"Criterio de Filtrado ...: %S%n\", criFil.getNombre());\r\n\r\n // Separados\r\n System.out.println(\"---\");\r\n\r\n // Filtrado > Selección Colección\r\n List<Item> lista = criFil.equals(Criterio.NINGUNO) ? CARRITO : FILTRO;\r\n\r\n // Recorrido Colección\r\n for (Item item : lista) {\r\n System.out.println(item.toString());\r\n }\r\n\r\n // Pausai\r\n UtilesEntrada.hacerPausa();\r\n }",
"public ListaBrojeva izdvojElmenteNaParnimPozicijama() {\n if (prvi != null) {\n ListaBrojeva parni = new ListaBrojeva();\n \n Element tek = prvi;\n Element preth = null;\n Element parniKraj = null;\n int br = 0;\n \n while (tek.veza != null) {\n preth = tek;\n tek = tek.veza;\n \n if (br % 2 != 0) {\n preth.veza = tek.veza;\n if (parni.prvi == null) {\n parni.prvi = tek;\n parniKraj = tek;\n tek.veza = null; \n } else {\n parniKraj.veza = tek;\n tek.veza = null;\n parniKraj = parniKraj.veza;\n }\n tek = preth;\n }\n br++;\n }\n /*prvi element iz liste je paran, ali je preskocen, \n tako da ga sad izbacujemo iz liste i dodajemo u novu*/\n Element pom = prvi;\n prvi = prvi.veza;\n pom.veza = parni.prvi;\n parni.prvi = pom;\n return parni;\n }\n return null;\n }",
"public void imprimirLista() {\n NodoListaDoble<T> tmp = raiz;\n\n if (this.raiz == null) {\n System.out.println(\"Lista vacia\");\n } else {\n System.out.println(\"--------------------------\");\n while (tmp != null) {\n System.out.println(tmp.toString());\n tmp = tmp.getSiguiente();\n }\n System.out.println(\"--------------------------\");\n }\n }",
"public void listar(){\n if (!esVacia()) {\n // Crea una copia de la lista.\n NodoEmpleado aux = inicio;\n // Posicion de los elementos de la lista.\n int i = 0;\n System.out.print(\"-> \");\n // Recorre la lista hasta llegar nuevamente al incio de la lista.\n do{\n // Imprime en pantalla el valor del nodo.\n System.out.print(i + \".[ \" + aux.getEmpleado() + \" ]\" + \" -> \");\n // Avanza al siguiente nodo.\n aux = aux.getSiguiente();\n // Incrementa el contador de la posi�n.\n i++;\n }while(aux != inicio);\n }\n }",
"public void mostrarLista() {\n\n Nodo recorrer = temp;\n while (recorrer != null) {\n\n System.out.println(\"[ \" + recorrer.getDato() + \"]\");\n recorrer = recorrer.getSiguiente();\n\n }\n\n }",
"public ArrayList<DanhMuc> getListDanhMucCha();",
"public void listar() {\n\n if (!vacia()) {\n\n NodoEnteroSimple temp = head;\n\n int i = 0;\n\n while (temp != null) {\n\n System.out.print(i + \".[ \" + temp.getValor() + \" ]\" + \" -> \");\n\n temp = temp.getSiguiente();\n\n i++;\n }\n }\n \n }",
"private void listViewPendentes(List<Compra> listAll) {\n\t\t\n\t}",
"@Override\n public void HienThiDanhSach(List<DienTu> listdienTu) {\n\n }",
"public void afficherListe(){\n StringBuilder liste = new StringBuilder(\"\\n\");\n logger.info(\"OUTPUT\",\"\\nLes produits en vente sont:\");\n for (Aliment aliment : this.productList) { liste.append(\"\\t\").append(aliment).append(\"\\n\"); }\n logger.info(\"OUTPUT\", liste+\"\\n\");\n }",
"public boolean klic() {\n\t\tif(first.next.zacetniIndex!=0) {\r\n\t\t\tfirst.next.zacetniIndex = 0;\r\n\t\t\tfirst.next.koncniIndex = first.next.size-1;\r\n\t\t\t//ce je en element, nimamo vec praznega prostora\r\n\t\t\tif(first==last) prazno=0;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\tList prev = first.next;\r\n\t\tList el = first.next.next;\r\n\t\t\r\n\t\twhile(el!=null) {\r\n\t\t\tif(prev.koncniIndex!=el.zacetniIndex-1) {\r\n\t\t\t\t\r\n\t\t\t\tint razlika = el.zacetniIndex - prev.koncniIndex - 1;\r\n\t\t\t\tel.zacetniIndex = el.zacetniIndex - razlika;\r\n\t\t\t\tel.koncniIndex = el.koncniIndex - razlika;\r\n\t\t\t\t//ce pomeramo zadnega zmanjsujemo praznega prostora\r\n\t\t\t\tif(prev==last) prazno = prazno - razlika;\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tprev=el;\r\n\t\t\tel=el.next;\r\n\t }\r\n\t\treturn false;\r\n\t}",
"private void lisaaMiinaOikealle(int i, int j) {\n ArrayList<Ruutu> lista;\n if (i + 1 < x) {\n lista = this.ruudukko[i + 1];\n lista.get(j).setViereisetMiinat(1);\n if (j - 1 >= 0) {\n lista.get(j - 1).setViereisetMiinat(1);\n }\n if (j + 1 < x) {\n lista.get(j + 1).setViereisetMiinat(1);\n }\n }\n }",
"public Lista listaElettoraleDaNome(String nome) {\n\n\t\tDB db = getDB();\n\t\tMap<Integer, Lista> map = db.getTreeMap(\"liste\");\n\n\t\tSet<Integer> keys = map.keySet();\n\n\t\t//ritorna la lista elettorale con quel nome\n\t\tfor (int key : keys) {\n\t\t\tif (map.get(key).getNomeLista().equals(nome))\n\t\t\t\treturn map.get(key);\n\t\t}\n\n\t\treturn null;\n\t}",
"public List<Mobibus> darMobibus();",
"public ArreiList() {\n koko = 0;\n }",
"public void mostrarlistafininicio(){\n if(!estavacia()){\n String datos=\"<=>\";\n nododoble auxiliar=fin;\n while(auxiliar!=null){\n datos=datos+\"[\"+auxiliar.dato+\"]<=>\";\n auxiliar=auxiliar.anterior;\n }\n JOptionPane.showMessageDialog(null,datos,\n \"Mostraando lista de fin a inicio\",JOptionPane.INFORMATION_MESSAGE);\n }}",
"public void mostrarlistafininicio(){\n if(!estaVacia()){\n String datos = \"<=>\";\n NodoBus auxiliar = fin;\n while(auxiliar!=null){\n datos = datos + \"(\" + auxiliar.dato +\")->\";\n auxiliar = auxiliar.ant;\n JOptionPane.showMessageDialog(null, datos, \"Mostrando lista de fin a inicio\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n }",
"public void MostrarListas (){\n Nodo recorrer=inicio; // esto sirve para que el elemento de la lista vaya recorriendo conforme se inserta un elemento\r\n System.out.println(); // esto nos sirve para dar espacio a la codificacion de la lista al imprimir \r\n while (recorrer!=null){ // esta secuencia iterativa nos sirve para repetir las opciones del menu\r\n System.out.print(\"[\" + recorrer.dato +\"]--->\");\r\n recorrer=recorrer.siguiente;\r\n }\r\n }",
"@Test\n public void nelioMuodostuu() {\n ArrayList lista=this.tetrimino.palautaKuvio();\n assertEquals(lista.size(), 4);\n \n }",
"public boolean listeVide()\n\t{\n\t\tif (premier==null){\n\t\treturn true;}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}",
"public List<Vendedor> listarVendedor();",
"public void mostrarLista(){\n Nodo recorrer = inicio;\n while(recorrer!=null){\n System.out.print(\"[\"+recorrer.edad+\"]-->\");\n recorrer=recorrer.siguiente;\n }\n System.out.println(recorrer);\n }",
"private void lisaaMiinaVasemmalle(int i, int j) {\n ArrayList<Ruutu> lista;\n if (i - 1 >= 0) {\n lista = this.ruudukko[i - 1];\n lista.get(j).setViereisetMiinat(1);\n if (j - 1 >= 0) {\n lista.get(j - 1).setViereisetMiinat(1);\n }\n if (j + 1 < x) {\n lista.get(j + 1).setViereisetMiinat(1);\n }\n }\n }",
"public ArrayList<DanhMuc> getListDanhMucCon(String ma_danh_muc);",
"public List<String> Mutfakkullanici(int masa_no) throws SQLException {\n ArrayList<Integer> kull = new ArrayList<>();\r\n ArrayList<String> kullad = new ArrayList<>();\r\n sqlsorgular.baglanti vb = new baglanti();\r\n vb.baglan();\r\n try {\r\n\r\n String sorgu = \"select kullanici_no from ilisk_masa where masa_no=\" + masa_no + \";\";\r\n ps = vb.con.prepareStatement(sorgu);\r\n rs = ps.executeQuery(sorgu);\r\n\r\n while (rs.next()) {\r\n kull.add(rs.getInt(1));\r\n }\r\n System.out.println(\"mutfak kullanici girdi\");\r\n System.out.println(kull);\r\n } catch (Exception e) {\r\n System.out.println(\"Mutfak kullanicisini alirken hata olustu\");\r\n return null;\r\n }\r\n\r\n for (Integer kullanici_no : kull) {\r\n boolean durum = false;\r\n String deger = \"\";\r\n String sorgu2 = \"select kullanici_adi from kullanicilar where kullanici_no=\" + kullanici_no + \" and durum='MUTFAK';\";\r\n try {\r\n ps = vb.con.prepareStatement(sorgu2);\r\n rs1 = ps.executeQuery(sorgu2);\r\n while (rs1.next()) {\r\n deger = rs1.getString(1);\r\n\r\n if (deger != null) {\r\n kullad.add(deger);\r\n System.out.println(\"null\");\r\n System.out.println(deger);\r\n }\r\n System.out.println(kullad);\r\n durum = true;\r\n }\r\n } catch (Exception e) {\r\n durum = false;\r\n }\r\n\r\n System.out.println(kullad);\r\n\r\n }\r\n vb.con.close();\r\n return kullad;\r\n\r\n }",
"public LinkedList Navegantes () {\r\n LinkedList lista = new LinkedList();\r\n String query = \"SELECT identificacion FROM socio WHERE eliminar = false\";\r\n try {\r\n Statement st = con.createStatement();\r\n ResultSet rs = st.executeQuery(query);\r\n while (rs.next()) { \r\n lista.add(rs.getString(\"identificacion\"));\r\n }\r\n query = \"SELECT identificacion FROM capitan WHERE eliminar = false\";\r\n rs = st.executeQuery(query);\r\n while (rs.next()) { \r\n lista.add(rs.getString(\"identificacion\"));\r\n }\r\n st.close();\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PSocio.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return lista;\r\n }",
"private Karta kartaErabaki(ArrayList<ArrayList<Karta>> pMatrizea) \r\n\t{\r\n\t\tKarta karta = (Karta) new KartaNormala(ElementuMota.ELURRA,0,KoloreMota.BERDEA);\r\n\t\tfor(int i=0;i<pMatrizea.size();i++) \r\n\t\t{\r\n\t\t\tfor(int x=0;x<5;x++) \r\n\t\t\t{\r\n\t\t\t\tif(pMatrizea.get(i).get(0).getElementua()!=pMatrizea.get(i).get(1).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(0).getElementua()!=this.lortuJolastekoKartaPosz(x).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(1).getElementua()!=this.lortuJolastekoKartaPosz(x).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(0).getKolorea()!=this.lortuJolastekoKartaPosz(x).getKolorea() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(1).getKolorea()!=this.lortuJolastekoKartaPosz(x).getKolorea() &&\r\n\t\t\t\t\t\tthis.lortuJolastekoKartaPosz(x).getBalioa()>karta.getBalioa() &&\r\n\t\t\t\t\t\tthis.lortuJolastekoKartaPosz(x).getErabilgarria()) \r\n\t\t\t\t{\r\n\t\t\t\t\tkarta = lortuJolastekoKartaPosz(x);\r\n\t\t\t\t}\r\n\t\t\t\tif(pMatrizea.get(i).get(0).getElementua()==pMatrizea.get(i).get(1).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(0).getElementua()==this.lortuJolastekoKartaPosz(x).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(1).getElementua()==this.lortuJolastekoKartaPosz(x).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(0).getKolorea()!=this.lortuJolastekoKartaPosz(x).getKolorea() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(1).getKolorea()!=this.lortuJolastekoKartaPosz(x).getKolorea() &&\r\n\t\t\t\t\t\tthis.lortuJolastekoKartaPosz(x).getBalioa()>karta.getBalioa() &&\r\n\t\t\t\t\t\tthis.lortuJolastekoKartaPosz(x).getErabilgarria()) \r\n\t\t\t\t{\r\n\t\t\t\t\tkarta = this.lortuJolastekoKartaPosz(x);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn karta;\r\n\t}",
"long getNombreElements();",
"public void Lista(){\n\t\tcabeza = null;\n\t\ttamanio = 0;\n\t}",
"public ArrayList<ArrayList<Float>> predykcjaCenNaRynkuLokalnym()\n\t{\n\t\tfloat cenaMinimalnaNaRynkuLokalnym= Stale.cenaMinimalnaNaRynkuLokalnym;\n\t\tfloat cenaMaksymalnaNaRynkuLokalnym = Stale.cenaDystrybutoraZewnetrznego;\n\t\t\n\t\t//tu siedzi to rozroznienie czy z generatora czy predykcja z poprzendiej symualcji\n\t\tArrayList<Float> normalnaPredykcja = pierwszaPredykcja();\n\t\tpriceVectorsList.add(normalnaPredykcja);\n\t\t\n\t\tArrayList<ArrayList<Float>> listaPredykcjiCen= new ArrayList<ArrayList<Float>>();\n\t\t\n\t\t\n\t\t//nizsza \n\t\tArrayList<Float> predykcjaZNizszaCena=new ArrayList<Float>(normalnaPredykcja);\t\t\n\t\tArrayList<Float> predykcjaZWyzszaCena=new ArrayList<Float>(normalnaPredykcja);\n\t\t\n\t\tfloat nizszaCena =(normalnaPredykcja.get(0)+cenaMinimalnaNaRynkuLokalnym)/2 ;\n\t\tfloat wyzszaCena=(normalnaPredykcja.get(0)+cenaMaksymalnaNaRynkuLokalnym)/2;\n\t\t\n\t\tpredykcjaZNizszaCena.set(0, nizszaCena);\n\t\tpredykcjaZWyzszaCena.set(0, wyzszaCena);\n\t\t\n\t\tlistaPredykcjiCen.add(predykcjaZNizszaCena);\n\t\tlistaPredykcjiCen.add(normalnaPredykcja);\n\t\tlistaPredykcjiCen.add(predykcjaZWyzszaCena);\n\t\t\n\t\t//reporting - zapisz zadeklarowan cene\n\t\trynekHistory.dodajZadeklarowanaCene(normalnaPredykcja.get(0));\n\t\t\n\t\t\n\t\treturn listaPredykcjiCen;\t\n\t}",
"public void listarAlunosNaDisciplina(){\r\n for(int i = 0;i<alunos.size();i++){\r\n System.out.println(alunos.get(i).getNome());\r\n }\r\n }",
"public void afficherListeNoms(){\r\n\t\tfor (String nom: noms){\r\n\t\t\tSystem.out.println(nom);\r\n\t\t}\r\n\t}",
"void listarDadosNaTelaLivro(ArrayList<Livro> lista,DefaultTableModel model ) throws Exception {\n \n model.setNumRows(0);\n //Correr o ArrayList\n for (int pos = 0; pos < lista.size(); pos++) {\n String[] linha = new String[7];\n Livro aux = lista.get(pos);\n linha[0] = \"\"+aux.getId();\n linha[1] = \"\"+editora.recuperar(aux.getIdEditora());\n linha[2] = \"\"+autor.recuperar(aux.getIdAutor());\n linha[3] = \"\"+areaDeConhecimento.recuperar(aux.getIdAreaDeConhecimento());\n linha[4] = aux.getTituloDoLivro();\n linha[5] = \"\"+aux.getIsbn();\n model.addRow(linha);\n }\n }",
"void listarDadosNaTelaAutor(ArrayList<Autor> lista, DefaultTableModel model) {\n model.setNumRows(0);\n //Correr o ArrayList\n for (int pos = 0; pos < lista.size(); pos++) {\n String[] linha = new String[2];\n Autor aux = lista.get(pos);\n linha[0] = \"\"+aux.getId();\n linha[1] = aux.getNome();\n model.addRow(linha);\n }\n }",
"private static List<String> vratiPopisNepolozenih(List<StudentRecord> records) {\n\t\treturn records.stream()\n\t\t\t\t.filter(o -> o.getOcjena() == 1)\n\t\t\t\t.map(o -> o.getJmbag())\n\t\t\t\t.sorted((o1, o2) -> o1.compareTo(o2))\n\t\t\t\t.collect(Collectors.toList());\n\t}",
"private int kiemtrasopt (List list){\n int dem = list.size();\n return dem;\n }",
"public ArrayList<KelasDicoding> getListKelas(){ return listKelas; }",
"@Test\r\n\tpublic void testPelikulaBaloratuDutenErabiltzaileenZerrenda() {\n\t\tArrayList<Integer> zer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p1.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p2.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 4);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e2.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertTrue(zer.contains(e4.getId()));\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p3.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e2.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p4.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e4.getId()));\r\n\t\t\r\n\t}",
"public void GetVehiculos() {\n String A = \"&LOCATION=POR_ENTREGAR\";\n String Pahtxml = \"\";\n \n try {\n \n DefaultListModel L1 = new DefaultListModel();\n Pahtxml = Aso.SendGetPlacas(A);\n Lsvehiculo = Aso.Leerxmlpapa(Pahtxml);\n Lsvehiculo.forEach((veh) -> {\n System.out.println(\"Placa : \" + veh.Placa);\n L1.addElement(veh.Placa);\n });\n \n Lista.setModel(L1);\n \n } catch (Exception ex) {\n Logger.getLogger(Entrega.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }",
"private void listarDadosNaTelaEditora(ArrayList<Editora> lista) {\n DefaultTableModel modelEditoras = (DefaultTableModel) jTable_tabelaEditoras.getModel();\n jTable_tabelaEditoras.setRowSorter(new TableRowSorter(modelEditoras));\n //Limpando a tela\n modelEditoras.setNumRows(0);\n //Correr o ArrayList\n for (int pos = 0; pos < lista.size(); pos++) {\n String[] linha = new String[2];\n Editora aux = lista.get(pos);\n linha[0] = \"\"+aux.getId();\n linha[1] = aux.getNome();\n modelEditoras.addRow(linha);\n }\n }",
"public void listeDesEmpruntsEnCours();",
"public static ArrayList<Vkladi> rascetPolozBalans() {\r\n\t\tArrayList<Vkladi> foundVkladi = new ArrayList<Vkladi>();\r\n\r\n\t\tint t = 0;\r\n\t\tfor (Vkladi vkla : vklad) {\r\n\r\n\t\t\tt = t + vkla.getPribil();\r\n\t\t}\r\n\t\tSystem.out.println(\"Polozitelnii balanse Scetov= \" + t + \"$\");\r\n\t\treturn foundVkladi;\r\n\t}",
"public static List<StronaWiersza> pobierzStronaWierszazBazy(StronaWiersza stronaWiersza, String wnma, StronaWierszaDAO stronaWierszaDAO, TransakcjaDAO transakcjaDAO) {\r\n List<StronaWiersza> listaStronaWierszazBazy =new ArrayList<>();\r\n// stare = pobiera tylko w walucie dokumentu rozliczeniowego \r\n// listaNowychRozrachunkow = stronaWierszaDAO.findStronaByKontoWnMaWaluta(stronaWiersza.getKonto(), stronaWiersza.getWiersz().getTabelanbp().getWaluta().getSymbolwaluty(), stronaWiersza.getWnma());\r\n// nowe pobiera wszystkie waluty \r\n listaStronaWierszazBazy = stronaWierszaDAO.findStronaByKontoWnMa(stronaWiersza.getKonto(), wnma);\r\n //stronaWierszaDAO.refresh(listaStronaWierszazBazy);\r\n if (listaStronaWierszazBazy != null && !listaStronaWierszazBazy.isEmpty()) {\r\n try {\r\n DateFormat formatter;\r\n formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n String datarozrachunku = null;\r\n if (stronaWiersza.getWiersz().getDataWalutyWiersza() != null) {\r\n datarozrachunku = stronaWiersza.getWiersz().getDokfk().getRok()+\"-\"+stronaWiersza.getWiersz().getDokfk().getMiesiac()+\"-\"+stronaWiersza.getWiersz().getDataWalutyWiersza();\r\n } else {\r\n datarozrachunku = stronaWiersza.getWiersz().getDokfk().getDatadokumentu();\r\n }\r\n Date dataR = formatter.parse(datarozrachunku);\r\n Iterator it = listaStronaWierszazBazy.iterator();\r\n while(it.hasNext()) {\r\n StronaWiersza stronaWierszaZbazy = (StronaWiersza) it.next();\r\n List<Transakcja> zachowaneTransakcje = transakcjaDAO.findByNowaTransakcja(stronaWierszaZbazy);\r\n for (Iterator<Transakcja> itx = stronaWierszaZbazy.getPlatnosci().iterator(); itx.hasNext();) {\r\n Transakcja transakcjazbazy = (Transakcja) itx.next();\r\n if (zachowaneTransakcje == null || zachowaneTransakcje.size() == 0) {\r\n itx.remove();\r\n } else if (!zachowaneTransakcje.contains(transakcjazbazy)) {\r\n itx.remove();\r\n }\r\n }\r\n for (Transakcja ta : zachowaneTransakcje) {\r\n if (!stronaWierszaZbazy.getPlatnosci().contains(ta)) {\r\n stronaWierszaZbazy.getPlatnosci().add(ta);\r\n }\r\n }\r\n if (Z.z(stronaWierszaZbazy.getPozostalo()) <= 0.0) {\r\n it.remove();\r\n } else {\r\n String dataplatnosci;\r\n if (stronaWierszaZbazy.getWiersz().getDataWalutyWiersza() != null) {\r\n dataplatnosci = stronaWierszaZbazy.getWiersz().getDokfk().getRok()+\"-\"+stronaWierszaZbazy.getWiersz().getDokfk().getMiesiac()+\"-\"+stronaWierszaZbazy.getWiersz().getDataWalutyWiersza();\r\n } else {\r\n dataplatnosci = stronaWierszaZbazy.getWiersz().getDokfk().getDatadokumentu();\r\n }\r\n Date dataP = formatter.parse(dataplatnosci);\r\n if (dataP.compareTo(dataR) > 0) {\r\n it.remove();\r\n }\r\n }\r\n }\r\n } catch (ParseException ex) {\r\n E.e(ex);\r\n }\r\n }\r\n List<StronaWiersza> stronywierszaBO = stronaWierszaDAO.findStronaByKontoWnMaBO(stronaWiersza.getKonto(), stronaWiersza.getWnma());\r\n if (stronywierszaBO != null && !stronywierszaBO.isEmpty()) {\r\n Iterator it = stronywierszaBO.iterator();\r\n while(it.hasNext()) {\r\n StronaWiersza p = (StronaWiersza) it.next();\r\n if (Z.z(p.getPozostalo()) <= 0.0) {\r\n it.remove();\r\n }\r\n }\r\n listaStronaWierszazBazy.addAll(stronywierszaBO);\r\n }\r\n if (listaStronaWierszazBazy == null) {\r\n return (new ArrayList<>());\r\n }\r\n return listaStronaWierszazBazy;\r\n //pobrano wiersze - a teraz z nich robie rozrachunki\r\n }",
"public List<DocumentoVinculadoDTO> getListaNoEspecifico() {\n System.out.println(\"entrei getListaNoEspecifico \");\n listar1Produto();\n return listaNoEspecifico;\n }",
"public void liste()\n {\n Collections.sort(listOrder, new Comparator<Order>() {\n @Override\n public int compare(Order o1, Order o2) {\n return o1.getStart() - o2.getStart(); // use your logic, Luke\n }\n });\n System.out.println(\"LISTE DES ORDRES\\n\");\n System.out.format(\"%8s %8s %5s %13s\", \"ID\", \"DEBUT\", \"DUREE\", \"PRIX\\n\");\n System.out.format(\"%8s %8s %5s %13s\", \"--------\", \"-------\", \"-----\", \"----------\\n\");\n for(int i = 0; i< listOrder.size(); i++) {\n Order order = listOrder.get(i);\n afficherOrdre(order);\n }\n System.out.format(\"%8s %8s %5s %13s\", \"--------\", \"-------\", \"-----\", \"----------\\n\");\n }",
"public String listViaje() {\n\t\t\t//resetForm();\n\t\t\treturn \"/boleta/list.xhtml\";\t\n\t\t}",
"public void MostrarListafINInicio() {\n if(!estVacia()){\n String datos=\"<=>\";\n NodoDoble current=fin;\n while(current!=null){\n datos += \"[\"+current.dato+\"]<=>\";\n current = current.anterior;\n }\n JOptionPane.showMessageDialog(null, datos, \"Mostrando Lista de inicio a Fin\",JOptionPane.INFORMATION_MESSAGE);\n }\n }",
"void listarDadosNaTelaColaborador(ArrayList<Colaborador> lista,DefaultTableModel model ) {\n model.setNumRows(0);\n //Correr o ArrayList\n for (int pos = 0; pos < lista.size(); pos++) {\n String[] linha = new String[9];\n Colaborador aux = lista.get(pos);\n linha[0] = \"\"+aux.getId();\n linha[1] = \"\"+aux.getMatricula();\n linha[2] = aux.getNome();\n linha[3] = \"\"+aux.getNumeroOAB();\n linha[4] = \"\"+aux.getCpf();\n linha[5] = aux.getEmail();\n linha[6] = \"\"+aux.getTelefone();\n linha[7] = aux.getTipo().toString();\n linha[8] = aux.getStatus().toString();\n model.addRow(linha);\n }\n }",
"private ArrayList wylosujZamowienie(MenuPosilkow mojeMenu){\n ArrayList<Restauracja> zamowienie=new ArrayList<>();\n Random rozmiarZamowienia=new Random();\n if(mojeMenu.getMenu().size()>0){\n for (int x=0;x<rozmiarZamowienia.nextInt(mojeMenu.getMenu().size());x++){\n int nrDania=rozmiarZamowienia.nextInt(mojeMenu.getMenu().size());\n Restauracja danie=(Restauracja) mojeMenu.getMenu().get(nrDania);\n zamowienie.add(danie);\n }\n }\n return zamowienie;\n }",
"public List<ViewEtudiantInscriptionEcheance> rechercheEtudiantInscripEcheanceParNomEtPrenom(){ \r\n try{ \r\n setListRechercheEtudiantInscripEcheance(viewEtudiantInscripEcheanceFacadeL.findEtudInscripByNonEtPrenomWithJocker(getViewEtudiantInscripEcheance().getNomEtPrenom())); \r\n }catch (Exception ex) {\r\n System.err.println(\"Erreur capturée : \"+ex);\r\n }\r\n return listRechercheEtudiantInscripEcheance;\r\n }",
"public void chargeListe(){\n jCbListeEtablissement.removeAllItems();\n String sReq = \"From Etablissement\";\n Query q = jfPrincipal.getSession().createQuery(sReq);\n Iterator eta = q.iterate();\n while(eta.hasNext())\n {\n Etablissement unEtablissement = (Etablissement) eta.next();\n jCbListeEtablissement.addItem(unEtablissement.getEtaNom());\n }\n bChargeListe = true;\n }",
"public void mostrarlistainicifin(){\n if(!estaVacia()){\n String datos = \"<=>\";\n NodoBus auxiliar = inicio;\n while(auxiliar!=null){\n datos = datos + \"(\" + auxiliar.dato +\")<=>\";\n auxiliar = auxiliar.sig;\n JOptionPane.showMessageDialog(null, datos, \"Mostrando lista de inicio a fin\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n }",
"public Liste(){\n\t\tsuper();\n\t\tthis.liste = new int[this.BASE_LENGTH];\n\t\tthis.nb = 0;\n\t}",
"public static void main(String[] args) {\n\r\n\t\tBeneficiadoDAO dao = new BeneficiadoDAO();\r\n\t\tList<Beneficiado> lista1 = new ArrayList<>();\r\n\t\tList<Beneficiado> lista2 = new ArrayList<>();\r\n\t\tList<String> telefones1 = new ArrayList<String>();\r\n\t\tList<String> telefones2 = new ArrayList<String>();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tlista1 = dao.listarTelefonesCelular1(\"iraja\");\r\n\t\t\tfor (int i = 0; i < lista1.size(); i++) {\r\n\t\t\t\ttelefones1.add(lista1.get(i).getTelefoneCelular1());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlista2 = dao.listarTelefonesCelular2(\"iraja\");\r\n\t\t\tfor (int i = 0; i < lista2.size(); i++) {\r\n\t\t\t\ttelefones2.add(lista2.get(i).getTelefoneCelular2());\r\n\t\t\t}\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tfor (String string : telefones1) {\r\n\t\t\tSystem.out.println(string.toString());\r\n\t\t}\r\n\t\t\r\n\t\tfor (String string : telefones2) {\r\n\t\t\tSystem.out.println(string.toString());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(telefones1.size());\r\n\t\tSystem.out.println(telefones2.size());\r\n\r\n\t\t//System.out.println(\"Depois da comparação \"+lista.size());\r\n\r\n\t\t/*for (int i = 0; i < lista.size(); i++) {\r\n\t\t\tString aux1 = new String();\r\n\t\t\tString aux2 = new String();\r\n\t\t\t\r\n\t\t\taux1 = lista.get(i).getTelefoneCelular1();\r\n\t\t\taux2 = lista.get(i).getTelefoneCelular2();\r\n\t\t\t\r\n\t\t\tif(!aux1.equals(\"null\")){\r\n\t\t\t\ttelefones.add(\"21\"+aux1);\r\n\t\t\t}\r\n\t\t\t//else if(!aux2.equals(null)){\r\n\t\t\t\t//telefones.add(\"21\"+aux2);\r\n\t\t\t\r\n\t\t\t//}\r\n\t\t\t*/\r\n\t}",
"public ListaPalabras() {\n\n //pos=0;\n }",
"public ListaBrojeva izdvojElmenteNaNeparnimPozicijama() {\n if (!jePrazna()) {\n ListaBrojeva neparni = new ListaBrojeva();\n \n Element neparniKraj = null;\n Element tek = prvi;\n Element preth = null;\n int br = 0;\n \n while (tek.veza != null) {\n preth = tek;\n tek = tek.veza;\n if (br % 2 == 0) {\n preth.veza = tek.veza;\n if (neparni.prvi == null) {\n neparni.prvi = tek;\n tek.veza = null;\n neparniKraj = tek;\n }\n else {\n neparniKraj.veza = tek;\n tek.veza = null;\n neparniKraj = tek;\n }\n tek = preth;\n }\n br++;\n }\n return neparni;\n }\n return null;\n }",
"List<ParqueaderoEntidad> listar();",
"public void oppdaterJliste()\n {\n bModel.clear();\n\n Iterator<Boligsoker> iterator = register.getBoligsokere().iterator();\n\n while(iterator.hasNext())\n bModel.addElement(iterator.next());\n }",
"public ArrayList<String> getClasesIzquierda() {\n ArrayList<String> clasesIzquierda = new ArrayList<String>();\n\n for (int i = 0; i < clasesLista.getModel().getSize(); i++) {\n clasesIzquierda.add(clasesLista.getModel().getElementAt(i).toString());\n }\n return clasesIzquierda;\n }",
"public void trukstaEilutese(){\n\n for (int i=0; i<9; i++) { //skaito eilutes\n\n System.out.print(i+\" : \"); //skaito kiekviena skaiciu is eiles\n\n truksta_eilutese [i] = new ArrayList<Integer>();\n\n Langelis langelis = new Langelis();\n\n for (Integer x_skaicius=1; x_skaicius<10; x_skaicius++){ //ciklas sukti naujam nezinomajam x_skaicius duota reiksme1 maziau nei 10, ++ kad ima sekanti nezinomaji\n\n //System.out.print(java.util.Arrays.asList(sudoku_skaiciai[i]).indexOf(x_skaicius));\n\n langelis.nustatyti(x_skaicius);\n\n if (Arrays.asList(sudoku_skaiciai[i]).indexOf(langelis)== -1){ //????\n\n System.out.print(x_skaicius+\" \"); //israso nezinomas reiksmes\n\n truksta_eilutese[i].add(x_skaicius);\n }\n }\n System.out.println(); //???\n }\n }",
"public DobbeltLenketListe() {\n this.hode= null;\n this.hale= null;\n antall=0; }",
"public void naplnVrcholy() {\r\n System.out.println(\"Zadajte pocet vrcholov: \");\r\n pocetVrcholov = skener.nextInt();\r\n for (int i=0; i < pocetVrcholov; i++) {\r\n nekonecno = (int)(Double.POSITIVE_INFINITY);\r\n if(i==0) { //pre prvy vrchol potrebujeme nastavit vzdialenost 0 \r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu, 0, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n } else { //ostatne budu mat nekonecno alebo v tomto pripade 9999 (lebo tuto hodnotu v mensich grafoch nepresiahnem)\r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu,nekonecno, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n }\r\n }\r\n }",
"public KListObject<KAssurer_lecon> chargerListeRDVEleve(int id){\r\n\t\tint idAgenda;\r\n\t\t\r\n\t\tKListObject<KAssurer_lecon> Kliste =new KListObject<KAssurer_lecon>(KAssurer_lecon.class);\r\n\t\tKAssurer_lecon lecon = null;\r\n\t\tKListObject<KAgenda> Kliste1 =new KListObject<KAgenda>(KAgenda.class);\r\n\t\tKliste1.loadFromDb(BDD.db,\"select * from agenda where id in (select idAgenda from assurer_lecon where ideleve =\"+id+\") \" +\r\n\t\t\t\t\"order by date_agenda asc, heure_agenda asc\");\r\n\t\t\r\n\t\tfor(int i = 0; i<Kliste1.count(); i++){\r\n\t\t\tidAgenda = ((Integer)Kliste1.get(i).getId());\r\n\t\t\tlecon = new KAssurer_lecon();\r\n\t\t\ttry {\r\n\t\t\t\tlecon.loadOne(BDD.db,\" idAgenda = \"+idAgenda+\" and idEleve =\"+id);\r\n\t\t\t\tKliste.add(lecon);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace(); \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn Kliste;\r\n\t}",
"public void listar() {\r\n Collections.sort(coleccion);\r\n for (int i = 0; i < coleccion.size(); i++) {\r\n String resumen = (coleccion.get(i).toString());\r\n JOptionPane.showMessageDialog(null, resumen);\r\n }\r\n }",
"public void mostrarlistainciofin(){\n if(!estavacia()){\n String datos=\"<=>\";\n nododoble auxiliar=inicio;\n while(auxiliar!=null){\n datos=datos+\"[\"+auxiliar.dato+\"]<=>\";\n auxiliar=auxiliar.siguiente;\n }\n JOptionPane.showMessageDialog(null,datos,\n \"Mostraando lista de incio a fin\",JOptionPane.INFORMATION_MESSAGE);\n } }",
"public List<Joueur> List_Joueur_HommesForComboBox() \r\n {\r\n List<Joueur> j = new ArrayList<>();\r\n String req= \"SELECT * FROM personne WHERE datedestruction is NULL and role = 'Joueur' and sexe='Homme' \";\r\n try {\r\n ResultSet res = ste.executeQuery(req);\r\n while (res.next()) {\r\n \r\n Joueur Jou = new Joueur(\r\n res.getInt(\"idpersonne\"),\r\n \r\n res.getString(\"nom\"),\r\n res.getString(\"prenom\")\r\n );\r\n j.add(Jou);\r\n \r\n System.out.println(\"------- joueurs selectionné avec succés----\");\r\n \r\n }\r\n \r\n } catch (SQLException ex) {\r\n System.out.println(\"----------Erreur lors methode : List_Joueur_Hommes()------\");\r\n }\r\n return j;\r\n \r\n}",
"protected List<String> listaVociCorrelate() {\n return null;\n }",
"private void napuniCbPozoriste() {\n\t\t\r\n\t\tfor (Pozoriste p:Kontroler.getInstanca().vratiPozorista())\r\n\t\t\t\r\n\t\t\tcbPozoriste.addItem(p.getImePozorista());\r\n\t}",
"public String[] getListaDinastie() {\n\t\treturn WikiImperatoriRomaniPagina.getInstance().getElencoDinastie();\n\t}",
"private void listar() throws Exception{\n int resId=1;\n List<PlatoDia> lista = this.servicioRestaurante.listarMenuDia(resId);\n this.modelListEspecial.clear();\n lista.forEach(lse -> {\n this.modelListEspecial.addElement(\"ID: \" + lse.getId() \n + \" NOMBRE: \" + lse.getNombre()\n + \" DESCRIPCION: \" + lse.getDescripcion()\n + \" PRECIO: \" + lse.getPrecio()\n + \" ENTRADA: \"+lse.getEntrada() \n + \" PRINCIPIO: \"+lse.getPrincipio()\n + \" CARNE: \"+lse.getCarne()\n + \" BEBIDA: \"+lse.getBebida()\n + \" DIA: \"+lse.getDiaSemana());\n });\n }",
"@Test\r\n public void testListar() {\r\n TipoItemRN rn = new TipoItemRN();\r\n TipoItem item = new TipoItem();\r\n item.setDescricao(\"ListarDescriçãoTipoItem\");\r\n rn.salvar(item);\r\n \r\n TipoItem item2 = new TipoItem();\r\n item2.setDescricao(\"ListarDescriçãoTipoItem2\");\r\n rn.salvar(item2);\r\n \r\n List<TipoItem> tipoItens = rn.listar();\r\n \r\n assertTrue(tipoItens.size() >0);\r\n \r\n rn.remover(item);\r\n rn.remover(item2);\r\n }",
"void unableToListContents();",
"private List<Node<T>> auxiliarRecorridoIn(Node<T> nodo, List<Node<T>> lista, Node<T> raiz) {\r\n\t\t\r\n\t\tif (nodo.getChildren() != null) {\r\n\t\t\tList<Node<T>> hijos = nodo.getChildren();\r\n\t\t\tfor (int i = 1; i <= hijos.size(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tauxiliarRecorridoIn(hijos.get(i), lista, raiz);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn lista;\r\n\t}",
"@Override\n\tpublic ArrayList<Elezione> listaElezioni() {\n\t\tArrayList<Elezione> listaElezioni = caricaElezioni();\n\t\treturn listaElezioni;\n\t}",
"private void ucitajTestPodatke() {\n\t\tList<Integer> l1 = new ArrayList<Integer>();\n\n\t\tRestoran r1 = new Restoran(\"Palazzo Bianco\", \"Bulevar Cara Dušana 21\", KategorijeRestorana.PICERIJA, l1, l1);\n\t\tRestoran r2 = new Restoran(\"Ananda\", \"Petra Drapšina 51\", KategorijeRestorana.DOMACA, l1, l1);\n\t\tRestoran r3 = new Restoran(\"Dizni\", \"Bulevar cara Lazara 92\", KategorijeRestorana.POSLASTICARNICA, l1, l1);\n\n\t\tdodajRestoran(r1);\n\t\tdodajRestoran(r2);\n\t\tdodajRestoran(r3);\n\t}",
"@Override\n\tpublic void acheter(List<Object> la) {\n\t\t\n\t}",
"public static void main(String[] args) {\n//\t\tcrearNodos(cantNodos);\n//\t\tlista.extractFront();\n//\t\tlista.extractLast();\n//\t\tlista.insertLast(33);\n//\t\tlista.imprimir();\n//\t\t//System.out.print(lista.get(0));\n//\t\t\n//\t\tIterator<Integer> it1 = lista.iterator();\n//\t\t\twhile(it1.hasNext()) {\n//\t\t\t\tint valor = it1.next();\n//\t\t\t\tSystem.out.println(valor);\n//\t\t\t}\n//\t\tMyIterator<Integer> it2 = lista.iteratorReverse();\n//\t\t\twhile(it2.hasNext()) {\n//\t\t\t\tint valor = it2.back();\n//\t\t\t\tSystem.out.println(valor);\n//\t\t\t}\n\n\t\tlistaDeso1.insertFront(4);\n\t\tlistaDeso1.insertFront(2);\n\t\tlistaDeso1.insertFront(13);\n\t\tlistaDeso1.insertFront(7);\n\t\tlistaDeso1.insertFront(6);\n\n\t\tlistaDeso2.insertFront(9);\n\t\tlistaDeso2.insertFront(4);\n\t\tlistaDeso2.insertFront(6);\n\t\tlistaDeso2.insertFront(5);\n\t\tlistaDeso2.insertFront(13);\n\n//\t\tlistaOrde1.insertFront(2);\n//\t\tlistaOrde1.insertFront(4);\n//\t\tlistaOrde1.insertFront(6);\n//\t\tlistaOrde1.insertFront(8);\n//\t\tlistaOrde1.insertFront(11);\n//\t\t\n//\t\tlistaOrde2.insertFront(1);\n//\t\tlistaOrde2.insertFront(4);\n//\t\tlistaOrde2.insertFront(9);\n//\t\tlistaOrde2.insertFront(11);\n//\t\tlistaOrde2.insertFront(15);\n\t\t\n\t\tEje6<Integer> ord = new Eje6<Integer>();\n\t\t\n\t\tlista=ord.ambasDeso(listaDeso1, listaDeso2);\n\t}",
"ArrayList<Float> pierwszaPredykcja()\n\t{\n\t\tif (Stale.scenariusz<100)\n\t\t{\n\t\t\treturn pierwszaPredykcjaNormal();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//dla scenariusza testowego cnea predykcji jest ustawiana na 0.30\n\t\t\tArrayList<Float> L1 = new ArrayList<>();\n\t\t\tL1.add(0.30f);\n\t\t\treturn L1;\n\t\t}\n\t}",
"public static List<Object> czytaniePogody(){\r\n Object[] elementyPogody = new Object[3];\r\n elementyPogody[0]=0;\r\n elementyPogody[1]=0;\r\n elementyPogody[2]=null;\r\n String line;\r\n OdczytZPliku plik = new OdczytZPliku();\r\n InputStream zawartosc = plik.pobierzZPliku(\"bazapogod.txt\");\r\n try (InputStreamReader odczyt = new InputStreamReader(zawartosc, StandardCharsets.UTF_8);\r\n BufferedReader czytaj = new BufferedReader(odczyt)) {\r\n String numerWStringu = String.valueOf(elementyPogody[0] = (int) (Math.random() * 4));\r\n while ((line = czytaj.readLine()) != null){\r\n if (line.equals(numerWStringu)){\r\n elementyPogody[1] = Integer.parseInt(czytaj.readLine());\r\n elementyPogody[2] = czytaj.readLine();\r\n System.out.println(\"\\nPogoda na dzis: \" + elementyPogody[2]);\r\n break;\r\n }\r\n else {\r\n for (int i = 0; i < 2; i++) {\r\n line = czytaj.readLine();\r\n }\r\n }\r\n }\r\n } catch (Exception ignored) {\r\n }\r\n return List.of(elementyPogody);\r\n }",
"public void MostrarListaInicioFin() {\n if(!estVacia()){\n String datos=\"<=>\";\n NodoDoble current=inicio;\n while(current!=null){\n datos += \"[\"+current.dato+\"]<=>\";\n current = current.siguiente;\n }\n JOptionPane.showMessageDialog(null, datos, \"Mostrando Lista de inicio a Fin\",JOptionPane.INFORMATION_MESSAGE);\n }\n }",
"public boolean finListe(){\n\treturn true;\n}",
"public void ParcoursInfixe(ArrayList<Item> items) {\r\n// Item[] listeItem= new Item[this.taille()];\r\n if (getGauche() != null) {\r\n getGauche().ParcoursInfixe(items);\r\n }\r\n items.add((Item) getElement());\r\n if (getDroite() != null) {\r\n getDroite().ParcoursInfixe(items);\r\n }\r\n// return listeItem;\r\n }",
"public ArrayList<String> mostraLlistaAtribs(){\n ArrayList<String> tauleta = new ArrayList<>();\n System.out.print(\"num atribs: \"+list.getNomLlista()+\"\\n\");\n String aux = list.getAtribs().get(0).getNom();\n for (int i=1; i<list.getAtribs().size(); i++){\n aux += \"\\t\" + list.getAtribs().get(i).getNom();\n }\n tauleta.add(aux);\n for (int j=0; j<list.getNumCasos(); j++) {\n aux = list.getAtribs().get(0).getCasos().get(j);\n for (int i = 1; i < list.getAtribs().size(); i++) {\n aux += \"\\t\" + list.getAtribs().get(i).getCasos().get(j);\n }\n tauleta.add(aux);\n }\n return tauleta;\n }",
"public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }"
] | [
"0.7000085",
"0.681074",
"0.66214484",
"0.6608463",
"0.65493715",
"0.6469165",
"0.64677703",
"0.64611876",
"0.63765943",
"0.63552314",
"0.6330563",
"0.62915254",
"0.62901944",
"0.6276352",
"0.6266889",
"0.6247257",
"0.62428004",
"0.62415975",
"0.62336695",
"0.622805",
"0.6219013",
"0.6213981",
"0.6183692",
"0.6183639",
"0.61785036",
"0.6176421",
"0.61639833",
"0.6114932",
"0.6110797",
"0.61092365",
"0.6104338",
"0.60890603",
"0.6087982",
"0.607304",
"0.6068012",
"0.6059352",
"0.60413563",
"0.6037072",
"0.6019542",
"0.6002435",
"0.60009646",
"0.59935266",
"0.59922147",
"0.5989563",
"0.5983811",
"0.59812784",
"0.59795606",
"0.59674364",
"0.5966303",
"0.59652984",
"0.59518737",
"0.5951588",
"0.59474105",
"0.59375507",
"0.59367055",
"0.5917701",
"0.59117043",
"0.59084415",
"0.5907877",
"0.590526",
"0.5904822",
"0.59043705",
"0.589817",
"0.58936393",
"0.5891165",
"0.58892107",
"0.5883258",
"0.587528",
"0.58738506",
"0.5873573",
"0.5872288",
"0.586758",
"0.5866671",
"0.58600783",
"0.58570915",
"0.58536893",
"0.58524376",
"0.584307",
"0.5837922",
"0.5836048",
"0.58351886",
"0.58311504",
"0.5821204",
"0.58209425",
"0.5812449",
"0.58108056",
"0.58034927",
"0.5802295",
"0.5801878",
"0.5801586",
"0.5798306",
"0.57978076",
"0.5797314",
"0.57956076",
"0.5788356",
"0.57851094",
"0.57845867",
"0.5779637",
"0.57784206",
"0.5775818",
"0.5772044"
] | 0.0 | -1 |
auth .inMemoryAuthentication().passwordEncoder(new MyPasswordEncoder()) .withUser("user").password("password").roles("ADMIN"); auth .inMemoryAuthentication().passwordEncoder(new MyPasswordEncoder()) .withUser("riadh").password("123").roles("USER"); | @Autowired
public void configureGlobal(AuthenticationManagerBuilder auth, DataSource dataSource) throws Exception {
auth.jdbcAuthentication().passwordEncoder(new MyPasswordEncoder()).dataSource(dataSource)
.usersByUsernameQuery("select name,password,actived from users where name=?")
.authoritiesByUsernameQuery("select user_name , roles_role from users_roles where user_name=?")
.rolePrefix("ROLE_");
// auth.ldapAuthentication().userDnPatterns("uid={0},ou=people").groupSearchBase("ou=groups").contextSource()
// .url("ldap://localhost:8080/dc=springframework,dc=org")
// .and()
// .passwordCompare()
// .passwordEncoder(new LdapShaPasswordEncoder())
// .passwordAttribute("userPassword");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void configure(AuthenticationManagerBuilder auth) throws Exception {\n auth.inMemoryAuthentication()\n .withUser(\"ahmed\")\n .password(\"123456\")\n .roles(\"admin\");\n }",
"@Override\n protected void configure(AuthenticationManagerBuilder auth) throws Exception {\n\n //CREATE USERS\n auth.inMemoryAuthentication().withUser(\"myadmin\").password(\"{noop}myadminpassword\").roles(\"ADMIN\");\n auth.inMemoryAuthentication().withUser(\"myuser\" ).password(\"{noop}myuserpassword\" ).roles(\"USER\" );\n\n }",
"@Override\r\n\tprotected void configure(AuthenticationManagerBuilder auth) throws Exception {\n\r\n\t\tUserBuilder users = User.withDefaultPasswordEncoder();\r\n\r\n\t\tauth.inMemoryAuthentication().withUser(users.username(\"user\").password(\"test123\").roles(\"USER\"))\r\n\t\t\t\t.withUser(users.username(\"tester\").password(\"test123\").roles(\"USER\", \"TESTER\"))\r\n\t\t\t\t.withUser(users.username(\"tom\").password(\"test123\").roles(\"USER\", \"ADMIN\"));\r\n\t}",
"@Override\n protected void configure(AuthenticationManagerBuilder auth) throws Exception {\n auth.inMemoryAuthentication()\n .withUser(\"user1\").password(\"secret1\").roles(\"USER\");\n }",
"@Override\r\n\tprotected void configure(AuthenticationManagerBuilder auth) throws Exception {\n\t\tauth.inMemoryAuthentication().withUser(\"purna\").password(\"purna43$\").roles(\"USER\")\r\n\t\t.and().withUser(\"chandu\").password(\"chandu43$\").roles(\"ADMIN\");\r\n\t}",
"@Override\n\tpublic void configure(AuthenticationManagerBuilder auth) throws Exception {\n\t\tauth.inMemoryAuthentication().withUser(USER).password(passwordEncoder().encode(USER_PASSWORD)).roles(\"USER\");\n\t}",
"@Override\n protected void configure(AuthenticationManagerBuilder auth) throws Exception {\n auth.inMemoryAuthentication()\n .withUser(\"user\").password(\"{noop}user\").roles(\"USER\")\n .and()\n .withUser(\"admin\").password(\"{noop}admin\").roles(\"ADMIN\", \"USER\");\n }",
"@Autowired\n public void configureGlobal(AuthenticationManagerBuilder builder) throws Exception {\n builder.userDetailsService(jpaUserDetailsService)\n .passwordEncoder(passwordEncoder);\n\n /**\n *\n * IN MEMORY AUTHENTICATION:\n\n PasswordEncoder encoder = this.passwordEncoder;\n User.UserBuilder users = User.builder().passwordEncoder(encoder::encode);\n\n builder.inMemoryAuthentication()\n .withUser(users.username(\"admin\").password(\"admin\").roles(\"ADMIN\", \"USER\"))\n .withUser(users.username(\"diegog09\").password(\"123456\").roles(\"USER\"));\n\n */\n }",
"@Autowired\n public void configureGlobalSecurity(AuthenticationManagerBuilder auth) throws Exception {\n auth.inMemoryAuthentication().withUser(\"John\").password(\"{noop}test\").roles(\"ADMIN\");\n auth.inMemoryAuthentication().withUser(\"Oliver\").password(\"{noop}test\").roles(\"USER\");\n }",
"@Autowired\r\n public void globalUserDetails(AuthenticationManagerBuilder auth) throws Exception {\n auth.inMemoryAuthentication()\r\n // Define user's roles\r\n .withUser(adminId).password(adminPassword).roles(ADMIN_ROLE).and()\r\n .withUser(userId).password(userPassword).roles(USER_ROLE);\r\n }",
"protected void configure(AuthenticationManagerBuilder authenticationManagerBuilder) throws Exception {\n authenticationManagerBuilder.inMemoryAuthentication().withUser(\"batateinit\").password(\"batate123\").roles(\"ADMINISTRATOR\");\n\n // AUTHENTICATION CHECK, AFTER THE CREATION OF USER RECORDS IN THE DATABASE\n authenticationManagerBuilder.userDetailsService(userDetailsService);\n\n /*authenticationManagerBuilder.inMemoryAuthentication().withUser(\"user\").password(\"user\").roles(\"USER\");\n authenticationManagerBuilder.inMemoryAuthentication().withUser(\"admin\").password(\"admin\").roles(\"ADMIN\");\n authenticationManagerBuilder.inMemoryAuthentication().withUser(\"kishor\").password(\"kishor\").roles(\"KISHOR\");*/\n }",
"@Override\n @Bean\n protected UserDetailsService userDetailsService() {\n\n\n UserDetails user = User.builder()\n .username(\"cs\")\n .password( passwordEncoder.encode(\"cs\"))\n .roles(STUDENT.name())\n .build();\n\n UserDetails admin = User.builder()\n .username(\"admin\")\n .password( passwordEncoder.encode(\"admin\"))\n .roles( ADMIN.name())\n .build();\n\n return new InMemoryUserDetailsManager(user,admin);\n }",
"@Override\n\tprotected void configure(AuthenticationManagerBuilder auth) throws Exception {\n\t\tauth.inMemoryAuthentication().withUser(\"nandy@yahoo.in\").password(\"{noop}12345\").roles(\"USER\");\n\t}",
"@Override\n\t@Bean\n\tprotected UserDetailsService userDetailsService() \n\t{\n\t\tBCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder(10);\n\t\tUserDetails admin = User.builder()\n\t\t\t\t.username(\"admin\")\n\t\t\t\t.password(passwordEncoder.encode(\"123456Ea\"))\n\t\t\t\t.roles(\"ADMIN\")\n\t\t\t\t.build();\n\t\t\n\t\tUserDetails user = User.builder()\n\t\t\t\t.username(\"user\")\n\t\t\t\t.password(passwordEncoder.encode(\"123456Ea\"))\n\t\t\t\t.roles(\"USER\")\n\t\t\t\t.build();\n\t\t\n\t\treturn new InMemoryUserDetailsManager(admin,user);\n\t\n\t\t\n\t}",
"@Override\n\tprotected void configure(AuthenticationManagerBuilder auth) throws Exception {\n\t\t@SuppressWarnings(\"deprecation\")\n\t\tUserBuilder users = User.withDefaultPasswordEncoder();\n\n\t\tauth.inMemoryAuthentication()\n\t\t\t\t.withUser(users.username(\"rohan\").password(\"rohan123\").roles(\"EMPLOYEE\", \"MANAGER\", \"ADMIN\"))\n\t\t\t\t.withUser(users.username(\"admin\").password(\"admin123\").roles(\"ADMIN\"))\n\t\t\t\t.withUser(users.username(\"anjani\").password(\"anji123\").roles(\"EMPLOYEE\"))\n\t\t\t\t.withUser(users.username(\"alice\").password(\"alice123\").roles(\"MANAGER\"))\n\t\t\t\t.withUser(users.username(\"bob\").password(\"bob123\").roles(\"EMPLOYEE\", \"MANAGER\"));\n\t}",
"@Override\r\n protected void configure(AuthenticationManagerBuilder auth) throws Exception {\r\n \r\n auth.userDetailsService(new SpitterUserService(spitterRepository))\r\n .passwordEncoder(new StandardPasswordEncoder(\"chundol42\"));\r\n }",
"@Override\n protected void configure(AuthenticationManagerBuilder auth) throws Exception{\n\t auth.userDetailsService(userDetailsService)\n .passwordEncoder(bCryptPasswordEncoder);// Hachage de mot de passe pour harmoniser avec celui de Bd\n }",
"@Override\n\tprotected void configure(AuthenticationManagerBuilder auth) throws Exception {\n\t\tauth.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder());\n\t\t\n\t}",
"@Override\n protected void configure(AuthenticationManagerBuilder auth) throws Exception {\n auth.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder());\n }",
"@Override\r\n\tprotected void configure(AuthenticationManagerBuilder auth) throws Exception {\r\n\t\tauth.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder());\r\n\t}",
"@Override\n\tprotected void configure(AuthenticationManagerBuilder auth) throws Exception {\n\t\t\n\t\tauth\n\t\t\t.inMemoryAuthentication()\n\t\t\t.withUser(\"admin\")\n\t\t\t.password(\"admin\")\n\t\t\t.roles(\"ADMIN\");\n\t\t\n\t}",
"@Override\n public void configure(AuthenticationManagerBuilder auth) throws Exception {\n auth.userDetailsService(userDetailsService).passwordEncoder(bCryptPasswordEncoder);\n }",
"@Override\n\t protected void configure(AuthenticationManagerBuilder auth) throws Exception {\n\t\t auth.userDetailsService(userDetailsService)\n\t .passwordEncoder(new BCryptPasswordEncoder());\n\t }",
"@Override\n protected void configure(AuthenticationManagerBuilder auth) throws Exception {\n auth.userDetailsService(userDetailsService).passwordEncoder(NoOpPasswordEncoder.getInstance());\n }",
"@Autowired\r\n\tpublic void configureGlobal(AuthenticationManagerBuilder auth) throws Exception\r\n\t{\r\n\t\r\n\t\t/*\tauth.inMemoryAuthentication()\r\n\t\t.withUser(\"scott\")\r\n\t\t.password(\"welcome1\")\r\n\t\t.roles(\"USER\");\r\n\t\t\r\n\t\tauth.inMemoryAuthentication()\r\n\t\t.withUser(\"arun\")\r\n\t\t.password(\"welcome1\")\r\n\t\t.roles(\"ADMIN\");\r\n\t\t\r\n\t\tauth.inMemoryAuthentication()\r\n\t\t.withUser(\"pavan\")\r\n\t\t.password(\"welcome1\")\r\n\t\t.disabled(true)\r\n\t\t.roles(\"USER\");*/\r\n\t\t\r\n\t\t\r\n\t\tauth\r\n\t\t.jdbcAuthentication()\r\n\t\t.dataSource(dataSource())\r\n\t\t.usersByUsernameQuery(\"select username,password,enabled from users where username=?\")\r\n\t\t.authoritiesByUsernameQuery(\"select username,authority from authorities where username=?\");\r\n\t}",
"@Override\n\tprotected void configure(AuthenticationManagerBuilder auth) throws Exception {\n\t\n\t\tauth.userDetailsService(this.userService).passwordEncoder(passwordEncoder())\n\t\t.and().authenticationEventPublisher(authenticationEventPublisher);\n\t}",
"public void configure(AuthenticationManagerBuilder auth) throws Exception\n\t{\n\t\tauth.inMemoryAuthentication().withUser(\"raja\").password(\"raja\").roles(\"USER\");\n\t\tauth.inMemoryAuthentication().withUser(\"admin\").password(\"admin\").roles(\"ADMIN\");\n\n\t}",
"@Override\r\n\tprotected void configure(AuthenticationManagerBuilder auth) throws Exception {\r\n\t\tauth.userDetailsService(useDetailsService)\r\n\t\t\t.passwordEncoder(passwordEncoder());\r\n\t}",
"@Bean\n public UserDetailsService userDetailsService() {\n return new InMemoryUserDetailsManager(User.withUsername(\"tester\").password(\"{noop}test\").roles(\"USER\").build()) {\n @Override\n public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {\n\n log.info(\"loadUserByUsername \" + username);\n\n return super.loadUserByUsername(username);\n }\n };\n }",
"@Bean\n public UserDetailsManager userDetailsManager() {\n\n\n CustomUserDetailsManager detailsManager = new CustomUserDetailsManager();\n detailsManager.createUser(new SecurityUser(\"sa\", \"123\"));\n return detailsManager;\n }",
"public interface SecurityService {\n\n PasswordEncoder getPasswordEncoder();\n\n void createAdminUser(NewUser newUser);\n\n org.springframework.security.core.userdetails.User getCurrentUserFromCtx();\n\n User getCurrentUser();\n\n void createOfficeUser(NewOfficeUser newOfficeUser);\n\n void lockUser(User user);\n\n void unLockUser(User user);\n\n void changePassword(ChangePassword changePassword);\n\n boolean resetPassword(User user);\n\n boolean isLogged();\n\n\n}",
"@Override\r\n\tpublic void configure(AuthenticationManagerBuilder auth) throws Exception {\r\n\t\tauth.userDetailsService(userService) /**\r\n\t\t\t\t\t\t\t\t\t\t\t\t * service that implements UserDetailService which implements\r\n\t\t\t\t\t\t\t\t\t\t\t\t * loadByUserName() where DB username and password are retrieved\r\n\t\t\t\t\t\t\t\t\t\t\t\t **/\r\n\t\t\t\t.passwordEncoder(bCryptPasswordEncoder); /**\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * type of encoder used in order to encrypt incoming request\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * password and compare with encrypted password from db\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t **/\r\n\t}",
"@Autowired\n public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {\n auth.userDetailsService(jwtUserDetailsService).passwordEncoder(passwordEncoder());\n }",
"@Bean\n public PasswordEncoder passwordEncoder(){\n return new BCryptPasswordEncoder();\n }",
"EmployeeMaster authenticateUser(int employeeId, String password);",
"@Bean\n PasswordEncoder passwordEncoder() {\n return new StandardPasswordEncoder();\n }",
"@Bean\n\tpublic DaoAuthenticationProvider authenticationProvider() {\n\t\t//Create a new authentication provider object\n\t\tDaoAuthenticationProvider authenticationProvider = new DaoAuthenticationProvider();\n\t\t//setting up custom user details service\n\t\tauthenticationProvider.setUserDetailsService(userServiceObj);\n\t\t//setting up password encoder by BCrypt\n\t\tauthenticationProvider.setPasswordEncoder(pswdEncoder()); \n\t\t//Return the authentication provider object\n\t\treturn authenticationProvider;\n\t}",
"@Bean\n public DaoAuthenticationProvider authenticationProvider() {\n final DaoAuthenticationProvider prov = new DaoAuthenticationProvider();\n prov.setUserDetailsService(this.userDetails());\n prov.setPasswordEncoder(this.passwordEncoder());\n return prov;\n }",
"@Autowired\r\n\tpublic void configurationGlobal(AuthenticationManagerBuilder authBuilder) throws Exception{\r\n\t\tauthBuilder.inMemoryAuthentication()\r\n\t\t\t.withUser(\"scott\")\r\n\t\t\t.password(\"welcome1\")\r\n\t\t\t.roles(\"USER\");\r\n\t\tauthBuilder.inMemoryAuthentication()\r\n\t\t\t.withUser(\"arun\")\r\n\t\t\t.password(\"welcome1\")\r\n\t\t\t.roles(\"ADMIN\");\r\n\t\tauthBuilder.inMemoryAuthentication()\r\n\t\t\t.withUser(\"pavan\")\r\n\t\t\t.password(\"welcome1\")\r\n\t\t\t.roles(\"USERDISABLED\");\r\n\t}",
"@Override\r\n\tpublic void configure(AuthenticationManagerBuilder authenticationManagerBuilder) throws Exception {\n\t\t\r\n\t\tauthenticationManagerBuilder.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder());\r\n\t}",
"@Override\n\tprotected void configure(AuthenticationManagerBuilder authenticationManagerBuilder) throws Exception {\n\t\tauthenticationManagerBuilder.userDetailsService(customUserDetailsService).passwordEncoder(bcrypt);\n\t\t\n\t}",
"@Override\n protected void configure(HttpSecurity http) throws Exception {\n http\n .csrf().disable()\n .sessionManagement()\n .sessionCreationPolicy(SessionCreationPolicy.STATELESS)\n //.antMatchers(\"/api/user/login\").permitAll()\n\n\n //.anyRequest().authenticated()\n .and()\n .addFilterBefore(new JWTLoginFilter(\"/api/user/login\", authenticationManager()),\n UsernamePasswordAuthenticationFilter.class)\n .addFilterBefore(new JWTAuthenticationFilter(),\n UsernamePasswordAuthenticationFilter.class)\n .authorizeRequests()\n //.anyRequest().authenticated()\n .antMatchers(\"/api/user\").hasRole(\"ADMIN\")\n .antMatchers(\"/api/article\").hasRole(\"ADMIN\")\n .antMatchers(\"/api/address/add\").authenticated()\n .antMatchers(\"/api/basket\").authenticated();\n\n }",
"@PostMapping(\"/login\") //method handles POST requests with this path (login)\n public ResponseEntity<?> authenticateUser(@Valid @RequestBody LoginRequest loginRequest) {\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(loginRequest.getUsername(), loginRequest.getPassword()));\n\n // update the SecurityContext\n SecurityContextHolder.getContext().setAuthentication(authentication);\n\n // generate JWT token\n String jwt = jwtUtils.generateJwtToken(authentication);\n\n // get UserDetails\n UserDetailsImpl userDetails = (UserDetailsImpl) authentication.getPrincipal();\n List<String> roles = userDetails.getAuthorities().stream()\n .map(GrantedAuthority::getAuthority)\n .collect(Collectors.toList());\n\n // return response with JWT token and UserDetails\n return ResponseEntity.ok(new JwtResponse(jwt,\n userDetails.getId(),\n userDetails.getUsername(),\n userDetails.getEmail(),\n roles,\n userDetails.getCategory()\n ));\n }",
"User authenticate(String username, String password);",
"public interface UserAuthenticationService {\n\n AuthenticationResult authenticate(String userName, String passwordHash);\n}",
"@Override\n protected void configure(AuthenticationManagerBuilder auth) {\n }",
"@PreAuthorize(\"permitAll()\")\n @RequestMapping(\n value = \"/users/auth\",\n method = RequestMethod.POST\n )\n public ResponseEntity<AuthResponse> authenticate(@RequestParam(value = \"username\") String username, @RequestParam(value = \"password\") String password) {\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(username, password)\n );\n\n SecurityContextHolder.getContext().setAuthentication(authentication);\n final UserDetails userDetails = userDetailsService.loadUserByUsername(username);\n final String token = tokenUtils.generateToken(userDetails);\n\n return ResponseEntity.ok(new AuthResponse(token));\n }",
"public interface UserService {\n\n User createUser(User user);\n\n void changePassword(long userId, String newPassword);\n\n void correlationRoles(long userId, long... roleIds);\n\n void uncorrelationRoles(long userId, long... roleIds);\n\n User findByUserName(String username);\n\n Set<String> findRoles(String username);\n\n Set<String> findPermissions(String username);\n}",
"@Override\n protected void configure(HttpSecurity http) throws Exception {\n\n\n http\n .csrf().disable()\n .authorizeRequests()\n .antMatchers(\"/admin/**\").hasRole(\"ADMIN\")\n .antMatchers(\"/anonymous*\").anonymous()\n .antMatchers(\"/login*\").permitAll()\n .anyRequest().authenticated()\n .and()\n .formLogin();\n\n }",
"@Autowired\n\tpublic void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {\n\t\tauth.userDetailsService(loginService).passwordEncoder(new ShaPasswordEncoder(256));\n\t}",
"@Bean\n public DaoAuthenticationProvider daoAuthenticationProvider(PasswordEncoder passwordEncoder, UserDetailsService userDetailsService) {\n DaoAuthenticationProvider daoAuthenticationProvider = new DaoAuthenticationProvider();\n daoAuthenticationProvider.setPasswordEncoder(passwordEncoder);\n daoAuthenticationProvider.setUserDetailsService(userDetailsService);\n return daoAuthenticationProvider;\n }",
"BaseUser createAdminUser(Application application);",
"@Bean\n public PasswordEncoder passwordEncoder() {\n String idForEncode = \"bcrypt\";\n Map<String, PasswordEncoder> encoders = new HashMap<>();\n encoders.put(idForEncode, new BCryptPasswordEncoder());\n return new DelegatingPasswordEncoder(idForEncode, encoders);\n }",
"public User getUser(String userName, String password);",
"@Bean\n public PasswordEncoder passwordEncoder() {\n return new SCryptPasswordEncoder();\n }",
"@Bean\n public PasswordEncoder passwordEncoder() {\n return new BCryptPasswordEncoder(11);\n }",
"@Override\n protected void configure(HttpSecurity http) throws Exception {\n http\n .csrf().disable()\n .authorizeRequests()\n .mvcMatchers(HttpMethod.POST,\"*/users\").permitAll()\n .mvcMatchers(HttpMethod.GET,\"*/users\").hasRole(\"ADMIN\")\n .mvcMatchers(\"/spaces\").hasRole(\"USER,ADMIN\")\n .anyRequest().authenticated()\n .and().httpBasic()\n .and().sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)\n .and().sessionManagement().disable();\n }",
"@Repository\npublic interface UserMapper {\n\n User findById(@Param(\"id\") Integer id);\n User findBypassword(User user);\n void addUser(User user);\n\n}",
"public interface SecurityService extends UserDetailsService {\n\n @Override\n public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException;\n}",
"@Bean\n public PasswordEncoder passwordEncoder() {\n //return NoOpPasswordEncoder.getInstance();\n return new BCryptPasswordEncoder();\n }",
"@Bean\r\n\tpublic PasswordEncoder passwordEncoder() {\r\n\t\treturn new BCryptPasswordEncoder();\r\n\t}",
"public interface User\n{\n String getUsername();\n String getPassword();\n}",
"public interface IChangePassword extends UserDetailsService {\n void changePassword(String username,String password);\n}",
"public User doAuthentication(String account, String password);",
"public interface UserService {\n\n void register(UserEntity userEntity);\n UserEntity findByUsername(String username);\n UserEntity findByEmail(String email);\n void editMyAccount(UserEntity newUserEntity, Principal principal);\n void editUser(UserEntity newUserEntity);\n void deleteMyAccount(String password, Principal principal);\n void deleteUser(String username, Principal principal);\n List<UserEntity> getAllUsers();\n String getRoleOfLoggedUser();\n boolean checkIfPasswordMatchWithLoggedUserPassword(String password);\n}",
"@Autowired\n\t public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {\n\t auth.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder());\n\t }",
"@Autowired\n public void configureAuthentication(AuthenticationManagerBuilder authenticationManagerBuilder) throws Exception {\n authenticationManagerBuilder\n .userDetailsService(this.userDetailsService)\n .passwordEncoder(passwordEncoder());\n }",
"@Override\r\n\tprotected void configure(AuthenticationManagerBuilder auth) throws Exception {\n\t\tauth.jdbcAuthentication().dataSource(dataSource).withDefaultSchema()\r\n\t\t\t\t.withUser(User.withUsername(\"user\").password(\"user\").roles(\"USER\"))\r\n\t\t\t\t.withUser(User.withUsername(\"admin\").password(\"admin\").roles(\"ADMIN\"))\r\n\t\t\t\t.usersByUsernameQuery(\"select username,password,enabled from users where username=?\")\r\n\t\t\t\t.authoritiesByUsernameQuery(\"select username,authority from authorities where username=?\");\r\n\t}",
"@Override\n public void configure(AuthenticationManagerBuilder auth)\n throws Exception {\n auth.userDetailsService(userDetailServiceDao);\n\n }",
"public interface UserService extends UserDetailsService {\n User findUserByLogin(String login);\n\n User findUserById(Long id);\n\n void registerUser(User newUser);\n}",
"@Override\npublic boolean supports(Class<?> authentication) {\n return true;\n}",
"@Override\r\n\tprotected void configure(HttpSecurity http) throws Exception {\n\t\thttp.authorizeRequests()\r\n\t\t.antMatchers(\"/admin\").hasRole(\"ADMIN\")\r\n\t\t.antMatchers(\"/user\").hasAnyRole(\"USER\",\"ADMIN\")\r\n\t\t.antMatchers(\"/\").permitAll()\r\n\t\t.and().formLogin();\r\n\t}",
"@Override\n protected void configure(AuthenticationManagerBuilder auth)\n throws Exception {\n auth.\n jdbcAuthentication()\n .usersByUsernameQuery(usersQuery)\n .authoritiesByUsernameQuery(rolesQuery)\n .dataSource(dataSource)\n .passwordEncoder(bCryptPasswordEncoder);\n }",
"@Override\n\tprotected void configure(AuthenticationManagerBuilder auth) throws Exception {\n\t\tif (isDevelopment()) {\n\t\t\tswitch (this.applicationProperties.getMode()) {\n\t\t\tcase basic:\n\t\t\t\tauth.inMemoryAuthentication().withUser(\"INTW1\").password(\"{noop}intw1\")\n\t\t\t\t\t\t.and()\n\t\t\t\t\t\t.withUser(\"ABC\").password(\"{noop}abc\")\n\t\t\t\t\t\t.and()\n\t\t\t\t\t\t.withUser(\"JKL\").password(\"{noop}jkl\")\n\t\t\t\t\t\t.and()\n\t\t\t\t\t\t.withUser(\"noWrite\").password(\"{noop}a\");\n\t\t\t\tbreak;\n\t\t\tcase noauth:\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"@Bean\n public PasswordEncoder getPasswordEncoder() {\n return new BCryptPasswordEncoder();\n }",
"@Bean\n @SuppressWarnings(\"PMD.DefaultPackage\")\n UserDetailsService userDetails() {\n return new UserDetailsService() {\n @Override\n public UserDetails loadUserByUsername(final String name) {\n log.debug(\"Load user by username '{}'\", name);\n final User user =\n SecurityConfiguration.this.dao.findByName(name);\n if (user == null) {\n throw new UsernameNotFoundException(\n String.format(\"User '%s' not found\", name)\n );\n }\n log.debug(\n \"User '{}' has authorities {}\",\n user.getName(),\n this.authorities(user)\n );\n return new org.springframework.security.core.userdetails.User(\n user.getName(),\n user.getPassword(),\n this.authorities(user)\n );\n }\n private List<GrantedAuthority> authorities(final User user) {\n final List<GrantedAuthority> result =\n AuthorityUtils.createAuthorityList(\n User.Role.ROLE_USER.toString()\n );\n if (user.isManager()) {\n result.addAll(\n AuthorityUtils.createAuthorityList(\n User.Role.ROLE_MANAGER.toString()\n )\n );\n }\n return result;\n }\n };\n }",
"@Override\n protected void configure(AuthenticationManagerBuilder auth) {\n auth.authenticationProvider(authProvider);\n }",
"public interface AuthenticationService {\n User getUserByAuthentication(Authentication authentication);\n}",
"@Service\npublic interface UserLoginUtil {\n\n public User getCurrentLogInUser();\n\n boolean userHaveRole(User currentUser, UserRole.Role admin);\n\n void addUserForClientWithRole(User user, UserRole.Role role) throws WrongInputDataException;\n\n void changePassForUser(User user, String password) throws WrongInputDataException;\n}",
"public interface UserActionRepository extends CrudRepository<UserEntity, Long> {\r\n List<UserEntity> findByEmailAndPassword(String username, String password);\r\n}",
"@Override\n protected void configure(AuthenticationManagerBuilder auth) throws Exception {\n auth.userDetailsService(userDetailsService);\n }",
"@Bean\n\tpublic BCryptPasswordEncoder passwordEncoder() {\n\t\treturn new BCryptPasswordEncoder();\n\t}",
"@Bean\n\tpublic BCryptPasswordEncoder passwordEncoder() {\n\t\treturn new BCryptPasswordEncoder();\n\t}",
"public interface UserManager {\n\n /**\n * Changes the password for the specific user.\n *\n * @param userName - users login\n * @param oldPassword - non encoded old users password\n * @param newPassword - non encoded new users password\n * @throws PasswordNotMatchException if the oldPassword is not null and the oldPassword does not equal to the current password or\n * if the oldPassword is null and the newPassword does equal the current password\n */\n void changePassword(String userName, @Nullable String oldPassword, @Nullable String newPassword) throws PasswordNotMatchException;\n\n\n /**\n * Changes the password for the specific user.\n *\n * @param users - users which need reset passwords\n * @return map which contains new password for specific user\n */\n Map<UserDetails, String> resetPasswords(Set<UserDetails> users);\n\n\n /**\n * Resets 'remember me' token for the specific user.\n *\n * @param users - users which need reset 'remember me' token\n */\n void resetRememberMe(Collection<UserDetails> users);\n}",
"@Override\n\tpublic Authentication authenticate(Authentication auth) throws AuthenticationException {\n\t\t username = auth.getName();\n\t\tString pass = auth.getCredentials().toString();\n\t\t\n\t\tif(AppController.users.containsKey(username))\n\t\t{\n\t\tString password = AppController.users.get(username); \n\t\t\t\n\t\tif(password.equals(pass))\n\t\t\treturn new UsernamePasswordAuthenticationToken(username,pass,Collections.EMPTY_LIST);\n\t\telse\n\t\t\tthrow new BadCredentialsException(\"authentication failed\");\n\t\t\n\t\t}\n\t\telse\n\t\t\tthrow new BadCredentialsException(\"authentication failed\");\n\t}",
"@Override\n protected void configure(AuthenticationManagerBuilder auth) throws Exception {\n\n auth.\n jdbcAuthentication()\n .usersByUsernameQuery(usersQuery)\n .authoritiesByUsernameQuery(rolesQuery)\n .dataSource(dataSource)\n .passwordEncoder(bCryptPasswordEncoder);\n }",
"public interface SigninRepository {\n void signin(String email, String username, String password);\n}",
"@Mapper\npublic interface UserMapper {\n User getUser(@Param(\"id\")int id);\n\n String getPwd(@Param(\"name\")String name);\n\n List<Role> getRoles(@Param(\"user\")User user);\n}",
"public interface AuthService {\n User register(User user, CheckError checkError);\n \n String login(String username, String password);\n \n String refresh(String oldToken);\n}",
"public interface RoleGrantedAuthorityMapper extends GrantedAuthoritiesMapper {\n\n GrantedAuthority mapRole(String role);\n\n Set<GrantedAuthority> mapRoles(Collection<String> roles);\n}",
"public interface IUserService {\n\n void changePassword(String username,String password);\n}",
"public interface UserMapper {\n\n public String findPasswordByUsername(String username);\n}",
"@RequestMapping(value = \"/authenticate\", method = { RequestMethod.POST })\n public AuthResult authorize(@RequestParam String username, @RequestParam String password) {\n\n\n UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(username, password);\n try {\n Authentication authentication = authenticationManager.authenticate(token);\n SecurityContextHolder.getContext().setAuthentication(authentication);\n User user = userService.getUserByUserName(username);\n return new AuthResult(tokenUtils.createToken(user), \"\", Status.OK);\n } catch (AuthenticationException ex){\n return new AuthResult(\"\", ex.getMessage(), Status.ERROR);\n }\n\n\n\n //return new UserInfo(user.getUsername(), tokenUtils.createToken(user));\n }",
"@Override\n protected void configure(AuthenticationManagerBuilder auth) throws Exception {\n\n SampleJdbcDaoImpl userService = new SampleJdbcDaoImpl();\n userService.setDataSource(dataSource());\n userService.setUsersByUsernameQuery(\"SELECT login_id, password, true, full_name, dept_name \"\n + \"FROM t_user \"\n + \"WHERE login_id = ?\");\n userService.setAuthoritiesByUsernameQuery(\"SELECT login_id, role_name \"\n + \"FROM t_role \"\n + \" INNER JOIN t_user_role ON t_user_role.role_id = t_role.id \"\n + \" INNER JOIN t_user ON t_user.id = t_user_role.user_id \"\n + \"WHERE login_id = ?\");\n auth.userDetailsService(userService)\n .passwordEncoder(new BCryptPasswordEncoder());\n }",
"protected ApplicationUser(){}",
"public interface UserAuthorityService extends AbstractService<UserAuthority, Long> {\n\n void grantNormalAuth(Long userId);\n}",
"@Override\n protected void configure(HttpSecurity http) throws Exception{\n http\n .csrf().disable()\n .httpBasic().disable()\n .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)\n .and()\n .authorizeRequests()\n .antMatchers(HttpMethod.GET, \"/home\").permitAll()\n .antMatchers(HttpMethod.POST, \"/login\").permitAll()\n .antMatchers(HttpMethod.GET, \"/signup\").permitAll()\n .antMatchers(HttpMethod.POST,\"/signup\").permitAll()\n .antMatchers(HttpMethod.GET, \"/verifyemail/**\").permitAll()\n .antMatchers(HttpMethod.GET,\"/userinfo\").authenticated()\n .antMatchers(HttpMethod.PUT, \"/userinfo\").authenticated()\n .antMatchers(HttpMethod.GET, \"/resetpassword/**\").permitAll()\n .antMatchers(HttpMethod.PUT, \"/resetpassword/newpassword/**\").permitAll()\n .antMatchers(HttpMethod.POST, \"/resetpassword\").permitAll()\n .antMatchers(HttpMethod.PUT, \"/resetimage\").authenticated()\n .anyRequest().permitAll()\n .and()\n .apply(new JwtConfigurer(jwtTokenProvider));\n }",
"public interface UserRepository extends CrudRepository<User, Long> {\r\n\t\r\n\tUser findByUsername(String username);\r\n\r\n\tUser findByActivationCode(String code);\r\n\t\r\n\tList<User> findAllByRoles(Role role);\r\n\r\n\tUser findById(long id);\r\n\r\n\r\n\r\n\t\r\n\r\n}",
"public interface UserRepository extends JpaRepository<User, Long> {\n @Override\n @PreAuthorize(\"#oauth2.hasScope('read')\")\n List<User> findAll();\n\n @PreAuthorize(\"#oauth2.hasScope('read')\")\n User findById(Long Id);\n\n @PreAuthorize(\"#oauth2.hasScope('read')\")\n User findByName(String name);\n\n @Override\n @PreAuthorize(\"#oauth2.hasScope('write')\")\n <S extends User> S save(S entity);\n}",
"public abstract User login(User data);",
"@Override\r\n\tprotected void configure(AuthenticationManagerBuilder auth) throws Exception {\n\t\tauth.authenticationProvider(authenticateionProvider());\r\n\t}"
] | [
"0.7778505",
"0.77738047",
"0.7636285",
"0.756391",
"0.74892426",
"0.7375975",
"0.73328584",
"0.727504",
"0.722576",
"0.7119266",
"0.7104313",
"0.7069601",
"0.7015196",
"0.69831806",
"0.6976554",
"0.6924545",
"0.68929285",
"0.66011083",
"0.6558502",
"0.6524478",
"0.65197766",
"0.6495551",
"0.6476209",
"0.64321595",
"0.638239",
"0.6355384",
"0.63229585",
"0.63123786",
"0.628026",
"0.6248983",
"0.62244624",
"0.62073916",
"0.61638975",
"0.61622167",
"0.61432046",
"0.61428446",
"0.61329913",
"0.6129343",
"0.6101951",
"0.6097403",
"0.60850185",
"0.6064418",
"0.6058468",
"0.59868336",
"0.59793055",
"0.5977443",
"0.5945589",
"0.590814",
"0.58991355",
"0.58897877",
"0.58893126",
"0.58725464",
"0.5860066",
"0.585158",
"0.5842296",
"0.58418536",
"0.58344907",
"0.58314323",
"0.5828459",
"0.5827136",
"0.5799517",
"0.57929814",
"0.57869095",
"0.5777169",
"0.57721263",
"0.5767028",
"0.57522273",
"0.57503295",
"0.5741794",
"0.57242554",
"0.570324",
"0.5695617",
"0.5694098",
"0.5693711",
"0.5693286",
"0.5689856",
"0.5688642",
"0.56880724",
"0.568716",
"0.56864834",
"0.5686143",
"0.56836915",
"0.56836915",
"0.5678845",
"0.56781036",
"0.5675743",
"0.56699777",
"0.5661073",
"0.5659973",
"0.56450975",
"0.564021",
"0.5623405",
"0.5620344",
"0.56176513",
"0.5615224",
"0.5615037",
"0.5610639",
"0.56086016",
"0.5604048",
"0.5598405",
"0.55975664"
] | 0.0 | -1 |
Constructor for a new edit form location | public LocationDetailDialog(Context context, Activity activity, MainActivityState mainActivityState, Location location) {
super(context, activity, mainActivityState, location);
InitiateLocationInputs();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public add_edit() {\n initComponents();\n \n this.setLocationRelativeTo(null);\n }",
"@Override\n protected void InitiateLocationInputs() {\n //Sets all the text inputs\n mLocationFormTitle.setText(R.string.location_edit_title);\n mLocationNameInput.setText(mLocation.getName());\n mLocationDescInput.setText(mLocation.getDescription());\n mConfirmButton.setText(R.string.btn_save);\n mCancelButton.setText(R.string.btn_delete);\n\n //Set the category spinner\n SpinnerCategoryAdapter adapter = new SpinnerCategoryAdapter(getContext());\n mLocationCategorySpinner.setAdapter(adapter.getArrayAdapter());\n mLocationCategorySpinner.setSelection(adapter.getCategoryPosition(mLocation.getCategory()));\n\n //Show the edit coordinate button\n mEditButton.setVisibility(View.VISIBLE);\n mEditButton.setOnClickListener(HandleEdit());\n\n }",
"public Location() {\r\n \r\n }",
"public PointEditForm(RouteEditList backDisplay) {\n super(LangHolder.getString(Lang.editpoint));\n this.backDisplay=backDisplay;\n \n backCommand=new Command(LangHolder.getString(Lang.back), Command.BACK, 10);\n saveCommand=new Command(LangHolder.getString(Lang.save), Command.ITEM, 1);\n addCommand(backCommand);\n addCommand(saveCommand);\n setCommandListener(this);\n \n textName=new TextField(LangHolder.getString(Lang.label),null,30,TextField.ANY);\n append(textName);\n \n \n StringItem si = new StringItem(LangHolder.getString(Lang.example)+\"\\n\",MapUtil.emptyString);\n if (RMSOption.coordType==RMSOption.COORDMINSECTYPE) si.setText(\"60 23 41\\n(GG MM SS.S)\");\n else if (RMSOption.coordType==RMSOption.COORDMINMMMTYPE) si.setText(\"60 23.683\\n(GG MM.MMM)\");\n else if (RMSOption.coordType==RMSOption.COORDGGGGGGTYPE) si.setText(\"60.39471\\n(GG.GGGGG)\");\n append(si);\n textLat=new TextField(LangHolder.getString(Lang.latitude),null,12,TextField.NON_PREDICTIVE);\n append(textLat);\n textLon=new TextField(LangHolder.getString(Lang.longitude),null,12,TextField.NON_PREDICTIVE);\n append(textLon);\n //!NO-NUMERIC\n textAlt=new TextField(LangHolder.getString(Lang.altitude),null,6,TextField.ANY|TextField.NON_PREDICTIVE);\n append(textAlt);\n \n }",
"public EditInfo() {\n initComponents();\n }",
"public Location() {\n }",
"protected SimpleRichLocation() {}",
"public Edit() {\n initComponents();\n }",
"public Location() {\n\t}",
"public ProductLocation() {\n }",
"public SeatLocation() {\n }",
"public edit() {\n initComponents();\n }",
"public void setLocation(String location);",
"public void setLocation(Location loc) {\n this.location = loc;\n }",
"public MyLocation() {}",
"public LocationBuilder() {\n super(\"locations\");\n }",
"public EditAccess() {\n initComponents();\n \n \n\n }",
"public ASLocation()\n\t{\n\t\tsuper() ;\n\t\tprepare() ;\n\t}",
"@Override\n\tprotected void onCreate(Bundle icicle) {\n\t\tsuper.onCreate(icicle);\n\t\tsetContentView(R.layout.editplaceactivity);\n\n\t\tBundle extras = getIntent().getExtras();\n\t\tif (extras != null) {\n\t\t\tmLocation = (Location) extras\n\t\t\t\t\t.getParcelable(Const.INTENT_PREFIX + \"createplace.location\");\n\t\t}\n\n\t\tinitComponents();\n\t}",
"public LocationDetailsType() {\n super();\n }",
"public Location()\n\t{\n\t\tline = -1;\n\t\tcolumn = -1;\n\t}",
"public EditAppointment() {\r\n\t\tsuper();\r\n\t}",
"@RequestMapping(\"/showEdit\")\n\tpublic String viewEditPage(@RequestParam(\"locId\")int locId,ModelMap map){\n\t\tLocation loc=service.getLocationById(locId);\n\t\tmap.addAttribute(\"locObj\",loc);\n\t\treturn \"LocationDataEdit\";\n\t}",
"Location createLocation();",
"Location createLocation();",
"Location createLocation();",
"public Locacao2() {\n initComponents();\n try {\n carregarTabelaLocatario(new ELocatario());\n carregarTabelaCarro(new ECarro());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n \n this.cmbLocalRetirada.removeAllItems();\n this.cmbLocalRetirada.addItem(\"Selecione\");\n this.cmbLocalRetirada.addItem(\"Loja\");\n this.cmbLocalRetirada.addItem(\"Aeroporto\");\n this.cmbLocalRetirada.addItem(\"Rodoviária\");\n }",
"private void setLocation(Location newLocation) {\n\t\tif (location != null) {\n\t\t\tfield.clear(location);\n\t\t}\n\t\tlocation = newLocation;\n\t\tfield.place(this, newLocation);\n\t}",
"public Builder setLocation(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n location_ = value;\n onChanged();\n return this;\n }",
"public void setLocation(String location){\n this.location = location;\n }",
"public void setLocation(String location){\n this.location = location;\n }",
"static public void set_location_data(){\n\n\t\tEdit_row_window.attrs = new String[]{\"location name:\", \"rating:\", \"population:\"};\n\t\tEdit_row_window.attr_vals = new String[]\n\t\t\t\t{Edit_row_window.selected[0].getText(1), Edit_row_window.selected[0].getText(2), \n\t\t\t\tEdit_row_window.selected[0].getText(3)};\n\t\t\n\t\tEdit_row_window.linked_query =\t\n\t\t\t\t\" select distinct c.`id`, c.`name`, c.`area (1000 km^2)`, c.`GDP per capita (1000 $)`, \" +\n\t\t\t\t\t\t\t\t\"c.`population (million)`, c.`capital`, c.`GDP (billion $)` \" +\n\t\t\t\t\t\t\t\t\t\t\t\" from curr_places_countries c, \" +\n\t\t\t\t\t\t\t\t\t\t\t\" curr_places_location_country lc \" +\n\t\t\t\t\t\t\t\t\t\t\t\" where lc.country_id=c.id and lc.location_id=\"+Edit_row_window.id+\n\t\t\t\t\t\t\t\t\t\t\t\" order by c.`GDP (billion $)` desc \";\n\t\t\t\t\n\t\tEdit_row_window.not_linked_query = \" select distinct c.`id`, c.`name`, c.`area (1000 km^2)`, c.`GDP per capita (1000 $)`, \" +\n\t\t\t\t\" c.`population (million)`, c.`capital`, c.`GDP (billion $)` \" +\n\t\t\t\t\" from curr_places_countries c \";\n\t\t\n\t\tEdit_row_window.linked_attrs = new String[]{\"id:\", \"country name:\", \"area (1000 km^2):\", \"GDP per capita (1000 $):\",\n\t\t\t\t\"population (million):\", \"capital:\", \"GDP (billion $):\"};\n\t\tEdit_row_window.label_min_parameter=\"min. population:\";\n\t\tEdit_row_window.linked_category_name = \"COUNTRIES\";\n\t}",
"@Override\n protected void initLocation() {\n }",
"public EditCourseForm() {\n initComponents();\n }",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"protected void setLocation(Location newLocation)\n {\n if(location != null) {\n field.clear(location);\n }\n location = newLocation;\n field.place(this, newLocation);\n }",
"public CustomerAddInterFrm() {\r\n\t\tinitComponents();\r\n\t\tthis.setLocation(200, 100);\r\n\t}",
"public TextController createLocation(ControllerCore genCode) {\n\t\tlocationTXT = new TextController(\"location\", getParentController(controlItemSCSCLC), genCode) {\n\t\t\t@Override\n\t\t\tpublic void initialize() {\n\t\t\t\tsetLinkedController(location$1LBL);\n\t\t\t\tsetProperty(\"location\");\n\t\t\t\tsuper.initialize();\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tif (null != fieldBindManager)\n\t\t\t\t\t\tfieldBindManager = new XjcFieldBindingManager(this);\n\t\t\t\t\tgetControl().addFocusListener(new XjcFocusListener(this));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\treturn locationTXT;\n\t}",
"public Location(Context context){\n//\t\tthis.context = context;\n\t\tinit(context);\n\t}",
"public Recepcionist() {\n super(\"Recepcionista\");\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"protected void setLocation(String location){\r\n this.location = location;\r\n }",
"public addlocality() {\n initComponents();\n }",
"public Lat2() {\n initComponents();\n }",
"public Place(String Location, String Name) {\n mLocation = Location;\n mName = Name;\n }",
"public UpdateEmployee() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public void setLocation(Location location) {\n this.location = location;\n }",
"public void setLocation(Location location) {\n this.location = location;\n }",
"public void setLocation(Location location) {\n this.location = location;\n }",
"public Location(int row, int column)\r\n\t{\r\n\t\tthis.row=row;\r\n\t\tthis.column=column;\r\n\t}",
"public Location(int row, int col) {\n\n this.row = row;\n this.col = col;\n\n }",
"public CSplitLocation( CLocation parent ){\n\t\tthis.parent = parent;\n\t}",
"@Override\n\tpublic Location newInstance() {\n\t\treturn new Location(this.X,this.Y,0);\n\t}",
"public Location(String store_name, String store_location, String address, String city, String state, String zip_code, double latitude, double longitude, String county)\n\t{\n super();\n this.store_name = store_name;\n this.store_location = store_location;\n this.address = address;\n this.city = city;\n this.state = state;\n this.zip_code = zip_code;\n this.latitude = latitude;\n this.longitude = longitude;\n this.county = county;\n }",
"@Override\n\tpublic void initialize(URL location, ResourceBundle resources) {\n\t\t\t\n\t\tsetaValores(cliente);\n\t\t\n\t\t\n\t\ttxtNome.setEditable(false);\n\t}",
"public AddressSetView addToView(ProgramLocation loc);",
"public CSplitLocation(){\n\t\t// nothing\n\t}",
"public EditProductForm() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n locationJTable = new javax.swing.JTable();\n backJButton1 = new javax.swing.JButton();\n txtLocationName = new javax.swing.JTextField();\n btnManageRoute = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n btnAddLocation = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n\n setBackground(new java.awt.Color(252, 244, 217));\n\n jPanel1.setBackground(new java.awt.Color(252, 244, 217));\n\n locationJTable.setFont(new java.awt.Font(\"Times New Roman\", 0, 18)); // NOI18N\n locationJTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Location Name\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane1.setViewportView(locationJTable);\n\n backJButton1.setFont(new java.awt.Font(\"Calibri Light\", 1, 18)); // NOI18N\n backJButton1.setText(\"Back\");\n backJButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backJButton1ActionPerformed(evt);\n }\n });\n\n txtLocationName.setFont(new java.awt.Font(\"Times New Roman\", 0, 18)); // NOI18N\n\n btnManageRoute.setFont(new java.awt.Font(\"Calibri Light\", 1, 18)); // NOI18N\n btnManageRoute.setText(\"Manage Routes for Selected Location\");\n btnManageRoute.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnManageRouteActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Calibri Light\", 1, 24)); // NOI18N\n jLabel1.setText(\"Manage Locations:\");\n\n btnAddLocation.setFont(new java.awt.Font(\"Calibri Light\", 1, 18)); // NOI18N\n btnAddLocation.setText(\"Add Location\");\n btnAddLocation.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAddLocationActionPerformed(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Calibri Light\", 1, 18)); // NOI18N\n jLabel2.setText(\"Location name:\");\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)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(127, 127, 127)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(17, 17, 17)\n .addComponent(backJButton1)\n .addGap(39, 39, 39)\n .addComponent(btnManageRoute))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(txtLocationName, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnAddLocation)))))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnAddLocation, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtLocationName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2)))\n .addGap(29, 29, 29)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnManageRoute)\n .addComponent(backJButton1))\n .addContainerGap())\n );\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 .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 444, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 174, Short.MAX_VALUE))\n );\n }",
"public void setLocation(String location)\n {\n this.location = location;\n }",
"public PoliceEdit() {\n initComponents();\n showDate();\n showTime();\n PoliceEdit();\n \n\n }",
"public void setLocationType(LocationType value) { _locationType = value; }",
"public void setLocation(Point loc){\n\t\tthis.location = loc;\n\t}",
"public Location (java.lang.Long uniqueId) {\n \t\tsuper(uniqueId);\n \t}",
"@Override\n public void setLocation(String location) {\n this.location = location;\n }",
"public DEditTrain(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n initComponents();\n carsForRemove = new HashMap<Car, CarLocationStructure>();\n dCarLocation = new DCarLocation(null, true);\n }",
"public void setLocation(Location location) \n\t{\n\t\tthis.location = location;\n\t}",
"public AddEmployee() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public Location(int x, int y)\r\n {\r\n\r\n //this basically makes a new location...it's a constructor\r\n //\"this\" refers to the instance of this class...meaning the instance\r\n //variables. This is saying that the instance variable \"x\" will be\r\n //updated to the value of x that is passed into as a parameter of\r\n //this function. This pretty much makes this a constructor method.\r\n this.x = x;\r\n this.y = y;\r\n\r\n }",
"public FormularioPregunta() {\n initComponents();\n \n setLocationRelativeTo(this);\n }",
"public Location(String c, Float x, Float y) {\n _place = c;\n _x = x;\n _y = y;\n }",
"public Plant(Field field, Location location)\n {\n alive = true;\n this.field = field;\n setLocation(location);\n }",
"@Override\n\tpublic void setLocation(String l) {\n\t\tlocation = l;\n\t\t\n\t}",
"public Location(int id, int x, int y, String floor, String code, String name){\n this(id,x,y,floor,code);\n requireNonNull(name);\n if (!name.equals(\"\")) this.name = name;\n }",
"public void setLocation(String location) {\r\n this.location = location;\r\n }",
"public void setLocation(String location) {\n this.location = location;\n }",
"public GUI_Edit_Tour(){\n init();\n }",
"public Frmvoto() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"public LocationData()\n {\n }",
"public AddStudent() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"public void setLocationType(String locationType);",
"public FrmAdmin() {\n initComponents();\n // mengambil ukuran layar\n Dimension layar = Toolkit.getDefaultToolkit().getScreenSize();\n\n // membuat titik x dan y\n int x = layar.width / 2 - this.getSize().width / 2;\n int y = layar.height / 2 - this.getSize().height / 2;\n\n this.setLocation(x, y);\n tampilkanData();\n kosongkanForm();\n }",
"public Location(int x, int y)\n {\n this.x = x;\n this.y = y;\n }",
"public void setLocation(String location) {\r\n this.location = location;\r\n }",
"public Location(String name, String coordinates) {\n this.name = name; \n this.coordinates = coordinates;\n }",
"public void setLocation(String location) {\n this.location = location;\n }",
"public Submission_Edit() {\n initComponents();\n }",
"public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }",
"public EditarDados(Produto dados) {\n \tthis.dados = dados;\n initComponents();\n setLocationRelativeTo(null);\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 }",
"public RoomDetailsUpdate() {\n initComponents();\n initExtraComponents();\n }",
"public void setLocationId(String locationId);",
"public Location() {\n\t\t\n\t\txCoord=0;\n\t\tyCoord=0;\n\t\t\n\t}",
"public Registrarse() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public LocationsDialog(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n initComponents();\n\n this.setTitle(\"Locations\");\n this.setLocationRelativeTo(null);\n initLocationsTable();\n }",
"public Registrasi() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public ModifyRoomReservation() {\n initComponents();\n\n btn_search.requestFocus();\n\n getAllIds();\n\n }",
"public void setLocation(String location) {\n inputParameters.Location = location;\n\n }",
"public Location(String name) {\n this.name = name;\n this.description = \"\";\n this.items = new ArrayList<Item>();\n this.playersNames = new ArrayList<String>();\n this.destinations = new HashMap<Direction, Location>();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n locationsTable = new javax.swing.JTable();\n refreshButton = new javax.swing.JButton();\n addButton = new javax.swing.JButton();\n deleteButton = new javax.swing.JButton();\n doneButton = new javax.swing.JButton();\n editLocationButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setName(\"Form\"); // NOI18N\n\n jScrollPane1.setName(\"jScrollPane1\"); // NOI18N\n\n locationsTable.setModel(new LocationsTableModel());\n locationsTable.setName(\"locationsTable\"); // NOI18N\n jScrollPane1.setViewportView(locationsTable);\n\n org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(client.MainFrame.class).getContext().getResourceMap(LocationsDialog.class);\n refreshButton.setIcon(resourceMap.getIcon(\"refreshButton.icon\")); // NOI18N\n refreshButton.setText(resourceMap.getString(\"refreshButton.text\")); // NOI18N\n refreshButton.setName(\"refreshButton\"); // NOI18N\n refreshButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n refreshButtonActionPerformed(evt);\n }\n });\n\n addButton.setIcon(resourceMap.getIcon(\"addButton.icon\")); // NOI18N\n addButton.setText(resourceMap.getString(\"addButton.text\")); // NOI18N\n addButton.setName(\"addButton\"); // NOI18N\n addButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addButtonActionPerformed(evt);\n }\n });\n\n deleteButton.setIcon(resourceMap.getIcon(\"deleteButton.icon\")); // NOI18N\n deleteButton.setText(resourceMap.getString(\"deleteButton.text\")); // NOI18N\n deleteButton.setName(\"deleteButton\"); // NOI18N\n deleteButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n deleteButtonActionPerformed(evt);\n }\n });\n\n doneButton.setText(resourceMap.getString(\"doneButton.text\")); // NOI18N\n doneButton.setName(\"doneButton\"); // NOI18N\n doneButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n doneButtonActionPerformed(evt);\n }\n });\n\n editLocationButton.setIcon(resourceMap.getIcon(\"editLocationButton.icon\")); // NOI18N\n editLocationButton.setName(\"editLocationButton\"); // NOI18N\n editLocationButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n editLocationButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 350, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(refreshButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 61, Short.MAX_VALUE)\n .addComponent(editLocationButton, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(addButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(deleteButton, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(doneButton)))\n .addContainerGap())\n );\n\n layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {addButton, deleteButton, editLocationButton, refreshButton});\n\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(refreshButton)\n .addComponent(doneButton)\n .addComponent(deleteButton)\n .addComponent(addButton)\n .addComponent(editLocationButton))\n .addContainerGap())\n );\n\n layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {addButton, deleteButton, editLocationButton, refreshButton});\n\n pack();\n }",
"private void AddLocation () {\n Location mLocation = new Location();\n mLocation.SetId(1);\n mLocation.SetName(\"Corner Bar\");\n mLocation.SetEmail(\"contact.email.com\");\n mLocation.SetAddress1(\"1234 1st Street\");\n mLocation.SetAddress2(\"\");\n mLocation.SetCity(\"Minneapolis\");\n mLocation.SetState(\"MN\");\n mLocation.SetZip(\"55441\");\n mLocation.SetPhone(\"612-123-4567\");\n mLocation.SetUrl(\"www.cornerbar.com\");\n\n ParseACL acl = new ParseACL();\n\n // Give public read access\n acl.setPublicReadAccess(true);\n mLocation.setACL(acl);\n\n // Save the post\n mLocation.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n\n }\n });\n }"
] | [
"0.67664695",
"0.66938955",
"0.6670424",
"0.6642476",
"0.6619734",
"0.6459498",
"0.6446995",
"0.64437914",
"0.636011",
"0.6327275",
"0.62857324",
"0.62377733",
"0.61921346",
"0.61884725",
"0.6155331",
"0.61130434",
"0.6094196",
"0.608759",
"0.6084291",
"0.6079825",
"0.60698295",
"0.6047622",
"0.6004706",
"0.598275",
"0.598275",
"0.598275",
"0.59737855",
"0.59613544",
"0.59511894",
"0.5912879",
"0.5912879",
"0.59035766",
"0.58937764",
"0.5893662",
"0.58925843",
"0.58711684",
"0.58659756",
"0.58608925",
"0.5858913",
"0.5846188",
"0.5829525",
"0.5814767",
"0.5811933",
"0.5809226",
"0.5794365",
"0.57811505",
"0.57811505",
"0.57811505",
"0.5777826",
"0.57595843",
"0.5756308",
"0.57518053",
"0.5751179",
"0.57454187",
"0.57371306",
"0.5736297",
"0.57361555",
"0.5727917",
"0.5720209",
"0.57162434",
"0.5714849",
"0.5709956",
"0.57034475",
"0.5702823",
"0.5700535",
"0.56992114",
"0.56930965",
"0.5693074",
"0.5681386",
"0.5679929",
"0.56724197",
"0.5671987",
"0.56696475",
"0.56656235",
"0.5664798",
"0.5655264",
"0.56466585",
"0.56394553",
"0.5638577",
"0.56373286",
"0.56355655",
"0.5634728",
"0.56342727",
"0.5632084",
"0.5626123",
"0.56252265",
"0.56233907",
"0.5622295",
"0.5611957",
"0.5611763",
"0.5605823",
"0.56051314",
"0.5598345",
"0.5581591",
"0.5580953",
"0.55783784",
"0.5573215",
"0.5570466",
"0.55688304",
"0.55682975"
] | 0.64760035 | 5 |
Function that initiate the form inputs with the proper dat | @Override
protected void InitiateLocationInputs() {
//Sets all the text inputs
mLocationFormTitle.setText(R.string.location_edit_title);
mLocationNameInput.setText(mLocation.getName());
mLocationDescInput.setText(mLocation.getDescription());
mConfirmButton.setText(R.string.btn_save);
mCancelButton.setText(R.string.btn_delete);
//Set the category spinner
SpinnerCategoryAdapter adapter = new SpinnerCategoryAdapter(getContext());
mLocationCategorySpinner.setAdapter(adapter.getArrayAdapter());
mLocationCategorySpinner.setSelection(adapter.getCategoryPosition(mLocation.getCategory()));
//Show the edit coordinate button
mEditButton.setVisibility(View.VISIBLE);
mEditButton.setOnClickListener(HandleEdit());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void populateForm() {\n Part selectedPart = (Part) PassableData.getPartData();\n partPrice.setText(String.valueOf(selectedPart.getPrice()));\n partName.setText(selectedPart.getName());\n inventoryCount.setText(String.valueOf(selectedPart.getStock()));\n partId.setText(String.valueOf(selectedPart.getId()));\n maximumInventory.setText(String.valueOf(selectedPart.getMax()));\n minimumInventory.setText(String.valueOf(selectedPart.getMin()));\n\n if (PassableData.isOutsourced()) {\n Outsourced part = (Outsourced) selectedPart;\n variableTextField.setText(part.getCompanyName());\n outsourced.setSelected(true);\n\n } else if (!PassableData.isOutsourced()) {\n InHouse part = (InHouse) selectedPart;\n variableTextField.setText(String.valueOf(part.getMachineId()));\n inHouse.setSelected(true);\n }\n\n\n }",
"private void initFields(){\n labels.put(\"patientID\", new JLabel(\"Patient ID:\"));\n labels.put(\"newOwed\", new JLabel(\"New Owed:\"));\n \n fields.put(\"patientID\", new JTextField());\n fields.put(\"newOwed\", new JTextField());\n }",
"private void createForm(ArrayList<HashMap<String, String>> data) {\n\t\tLayoutInflater inflater = LayoutInflater.from(IPropertyRegistrationActivity.this);\n\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams.MATCH_PARENT,\n\t\t\t\tandroid.widget.LinearLayout.LayoutParams.WRAP_CONTENT);\n\t\tparams.topMargin = 10;\n\n\t\tfields = data;\n\t\tLinearLayout layout = null;\n\t\tint len = fields.size();\n\t\tfor (int j = 0; j < len; j++) {\n\t\t\tfinal HashMap<String, String> field = fields.get(j);\n\t\t\tView fieldView = inflater.inflate(R.layout.iproperty_registration_dynamic_view_item, null);\n\n\t\t\tif (field.get(TYPE).equals(LABEL)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrLabel));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t} else if (field.get(TYPE).equals(PASSWORD)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEdit));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tif (field.get(NAME).contains(getString(R.string.phone)) || field.get(NAME).contains(getString(R.string.year))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_CLASS_NUMBER);\n\t\t\t\t} else if (field.get(NAME).contains(getString(R.string.website)) || field.get(NAME).contains(getString(R.string.email))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);\n\t\t\t\t}\n\t\t\t} else if (field.get(TYPE).equals(TEXT)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEdit));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tif (field.get(NAME).contains(getString(R.string.phone)) || field.get(NAME).contains(getString(R.string.year))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_CLASS_NUMBER);\n\t\t\t\t} else if (field.get(NAME).contains(getString(R.string.website)) || field.get(NAME).contains(getString(R.string.email))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);\n\t\t\t\t}\n\t\t\t} else if (field.get(TYPE).equals(TEXTAREA)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditArea));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\n\t\t\t\tif (field.get(VALUE).toString().trim().length() > 0) {\n\t\t\t\t\tedit.setText(field.get(VALUE));\n\t\t\t\t} else {\n\t\t\t\t}\n\n\t\t\t} else if (field.get(TYPE).equals(MAP)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tfinal ImageView imgMap;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditMap));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\timgMap = ((ImageView) layout.findViewById(R.id.imgMap));\n\t\t\t\tif (field.get(NAME).equalsIgnoreCase(getString(R.string.state))) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tedit.setText(address.getAdminArea().replace(address.getCountryName() == null ? \"\" : address.getCountryName(), \"\")\n\t\t\t\t\t\t\t\t.replace(address.getPostalCode() == null ? \"\" : address.getPostalCode(), \"\"));\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\tedit.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t} else if (field.get(NAME).equalsIgnoreCase(getString(R.string.city_town))) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tedit.setText(address.getSubAdminArea());\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\tedit.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\timgMap.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\teditMap = edit;\n\t\t\t\t\t\tIntent intent = new Intent(IPropertyRegistrationActivity.this, IjoomerMapAddress.class);\n\t\t\t\t\t\tstartActivityForResult(intent, GET_ADDRESS_FROM_MAP);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(SELECT)) {\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrSpin));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tfinal Spinner spn;\n\t\t\t\tspn = ((Spinner) layout.findViewById(R.id.txtValue));\n\t\t\t\tspn.setAdapter(IjoomerUtilities.getSpinnerAdapter(field));\n\t\t\t\tif (field.get(NAME).equalsIgnoreCase(getString(R.string.country))) {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tString country = address.getCountryName();\n\t\t\t\t\t\tint selectedIndex = 0;\n\t\t\t\t\t\tJSONArray jsonArray = null;\n\n\t\t\t\t\t\tjsonArray = new JSONArray(field.get(OPTIONS));\n\t\t\t\t\t\tint optionSize = jsonArray.length();\n\t\t\t\t\t\tfor (int k = 0; k < optionSize; k++) {\n\t\t\t\t\t\t\tJSONObject options = (JSONObject) jsonArray.get(k);\n\n\t\t\t\t\t\t\tif (options.getString(VALUE).equalsIgnoreCase(country)) {\n\t\t\t\t\t\t\t\tselectedIndex = k;\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\tspn.setSelection(selectedIndex);\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tspn.setSelection(0);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else if (field.get(TYPE).equals(DATE)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getDateDialog(((IjoomerEditText) v).getText().toString(), true, new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setError(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(TIME)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getTimeDialog(((IjoomerEditText) v).getText().toString(), new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setError(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(MULTIPLESELECT)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getMultiSelectionDialog(field.get(NAME), field.get(OPTIONS), ((IjoomerEditText) v).getText().toString(), new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (field.get(REQUIRED).equalsIgnoreCase(\"1\")) {\n\t\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME) + \" *\");\n\t\t\t} else {\n\t\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME));\n\t\t\t}\n\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEdit)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEditArea)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrSpin)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrLabel)).setVisibility(View.GONE);\n\n\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrReadOnly));\n\t\t\tlayout.setVisibility(View.VISIBLE);\n\n\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME));\n\t\t\t((IjoomerEditText) layout.findViewById(R.id.txtValue)).setText(field.get(VALUE));\n\t\t\tfieldView.setTag(field);\n\t\t\tlnr_form.addView(fieldView, params);\n\t\t}\n\t}",
"public FormProduct() {\n initComponents();\n getData();\n }",
"public void setInputs() {\n\t\tCIVLTable tbl_inputTable = (CIVLTable) getComponentByName(\"tbl_inputTable\");\n\t\tDefaultTableModel inputModel = (DefaultTableModel) tbl_inputTable\n\t\t\t\t.getModel();\n\t\tArrayList<CIVL_Input> inputList = currConfig.getInputs();\n\t\tinputList.clear();\n\t\tGMCSection gmcs = currConfig.getGmcConfig().getAnonymousSection();\n\t\tfor (int j = 0; j < inputModel.getRowCount(); j++) {\n\t\t\tString name = (String) inputModel.getValueAt(j, 0);\n\t\t\tString type = inputModel.getValueAt(j, 1).toString();\n\t\t\tObject value = inputModel.getValueAt(j, 2);\n\t\t\tString init = \"\";\n\n\t\t\tif (inputModel.getValueAt(j, 3) != null) {\n\t\t\t\tinit = inputModel.getValueAt(j, 3).toString();\n\t\t\t}\n\n\t\t\tCIVL_Input input = new CIVL_Input(name, type);\n\t\t\tinput.setValue(value);\n\t\t\tinput.setInitializer(init);\n\t\t\tinputList.add(input);\n\n\t\t\t// Add the inputs to the value map in GMCSection\n\t\t\tif (!value.toString().equals(\"\")) {\n\t\t\t\tgmcs.putMapEntry(CIVLConstants.inputO, input.getName(),\n\t\t\t\t\t\tinput.getValue());\n\t\t\t}\n\t\t}\n\n\t}",
"public void limpiarCamposFormBusqueda() {\n\t}",
"public void fillForm() {\n\t\t// fills the name field with nameOfProject\n\t\tprojName.sendKeys(nameOfProject);\n\t\t// selects the first option from the 'Client partner' dropdown list\n\t\tSelect sel = new Select(clientList);\n\t\tsel.selectByIndex(1);\n\t\t// enters valid date data\n\t\tstartDate.sendKeys(\"06042018\");\n\t\tendDate.sendKeys(\"06052018\");\n\t}",
"private void initFormulario() {\n btnCadastro = findViewById(R.id.btnCadastro);\n editNome = findViewById(R.id.editNome);\n editEmail = findViewById(R.id.editEmail);\n editSenhaA = findViewById(R.id.editSenha);\n editSenhaB = findViewById(R.id.editSenhaB);\n chTermo = findViewById(R.id.chTermos);\n isFormOk = false;\n }",
"private void readForm() {\n }",
"private void initForm(@Nullable View view){\n inputCalendar = formatCalendar(new GregorianCalendar());\n\n if (view == null) view = getView();\n\n setValueOfField(view, R.id.at_button_date, getContext().getString(R.string.ad_button_date));\n setValueOfField(view, R.id.at_editTextNumberSigned_timeValue, \"0\");\n setValueOfField(view, R.id.at_editTextNumberSigned_levelEasyValue, \"0\");\n setValueOfField(view, R.id.at_editTextNumberSigned_levelMiddleValue, \"0\");\n setValueOfField(view, R.id.at_editTextNumberSigned_levelHighValue, \"0\");\n setValueOfField(view, R.id.at_editTextNumberSigned_levelExpertValue, \"0\");\n }",
"private void addInputFields() {\n dogName = new JTextField();\n dogName.setBounds(205, 160, 140, 25);\n\n weight = new JTextField();\n weight.setBounds(205, 180, 140, 25);\n\n food = new JTextField();\n food.setBounds(205, 200, 140, 25);\n\n this.add(dogName);\n this.add(weight);\n this.add(food);\n }",
"private void setAddrInputFields(){\n \ttextFieldCurrents.put(jTextFieldStart, jTextFieldStart.getText());\n\t\ttextFieldCurrents.put(jTextFieldEnd, jTextFieldEnd.getText());\n\t\tselectedFormat = jComboBoxFormat.getSelectedIndex();\n\t\tquickSearch = jCheckBoxQuickSearch.isSelected();\n }",
"private void initFormCreateMode() {\n initSpinnerSelectionChamps();\n //TODO\n }",
"public FormInserir() {\n initComponents();\n }",
"public form_for_bd() {\n initComponents();\n }",
"private void fillData() {\n\tparname.setText(UpStudentController.getName());\r\n\tparphone.setText(UpStudentController.getPhone());\r\n\tparmail.setText(UpStudentController.getMail());\r\n\taddres.setText(UpStudentController.getAdr());\r\n\tlocation.setText(UpStudentController.getLoc());\r\n\tkazi.setText(UpStudentController.getOc());\r\n\ttaifa.setText(UpStudentController.getNat());\r\n\t}",
"public ingresarDatos() {\n initComponents();\n Validacion();\n \n }",
"public DisciplinaForm() {\n initComponents();\n }",
"public quanlixe_form() {\n initComponents();\n }",
"private void createInputBloodDonationForm( HttpServletRequest req, HttpServletResponse resp )\n throws ServletException, IOException {\n String path = req.getServletPath();\n req.setAttribute( \"path\", path );\n req.setAttribute( \"title\", path.substring( 1 ) );\n \n BloodDonationLogic logic = LogicFactory.getFor(\"BloodDonation\");\n req.setAttribute( \"bloodDonationColumnNames\", logic.getColumnNames().subList(1, logic.getColumnNames().size()));\n req.setAttribute( \"bloodDonationColumnCodes\", logic.getColumnCodes().subList(1, logic.getColumnCodes().size()));\n req.setAttribute(\"bloodGroupList\", Arrays.asList(BloodGroup.values()));\n req.setAttribute(\"rhdList\", Arrays.asList(RhesusFactor.values()));\n BloodBankLogic bloodBankLogic = LogicFactory.getFor(\"BloodBank\");\n List<String> bloodBankIDs = new ArrayList<>();\n bloodBankIDs.add(\"\");\n for (BloodBank bb : bloodBankLogic.getAll()) {\n bloodBankIDs.add(bb.getId().toString());\n }\n req.setAttribute( \"bloodBankIDs\", bloodBankIDs);\n req.setAttribute( \"request\", toStringMap( req.getParameterMap() ) );\n \n if (errorMessage != null && !errorMessage.isEmpty()) {\n req.setAttribute(\"errorMessage\", errorMessage);\n }\n //clear the error message if when reload the page\n errorMessage = \"\";\n \n req.getRequestDispatcher( \"/jsp/CreateRecord-BloodDonation.jsp\" ).forward( req, resp );\n }",
"private static void setData() {\n attributeDisplaySeq = new ArrayList<String>();\n attributeDisplaySeq.add(\"email\");\n\n signUpFieldsC2O = new HashMap<String, String>();\n signUpFieldsC2O.put(\"Email\",\"email\");\n\n\n signUpFieldsO2C = new HashMap<String, String>();\n signUpFieldsO2C.put(\"email\", \"Email\");\n\n\n }",
"private void initData(List<JTextField> fields) {\n Properties config = Utils.loadPropertiesFile(System.getProperty(\"user.dir\") + \"\\\\\" + CONF_FILE_NAME, this.getClass().getClassLoader().getResourceAsStream(CONF_FILE_NAME));\n \n List<String> props = Arrays.asList(\"fromDbDriver\", \"toDbDriver\", \"fromDbUrl\", \"toDbUrl\", \"fromDbUsername\", \"toDbUsername\", \"fromDbPassword\", \"toDbPassword\", \"criteria\");\n \n logger.info(\"Init data from configruation\");\n for (int i = 0; i < fields.size(); i++) {\n String key = props.get(i);\n String value = config.getProperty(key);\n logger.info(\"{} is {} \", key, value);\n fields.get(i).setText(value);\n }\n \n IS_OPEN_LOG_FILE = Utils.parseString2Boolean(config.getProperty(\"openLogFile\"), false);\n DELAY_TIME = Utils.parseString2Long(config.getProperty(\"delayTime\"), PER_SECOND);\n IS_DELETE_ORIGINAL_DATA = Utils.parseString2Boolean(config.getProperty(\"deleteOriginalData\"), true);\n ABORT_WHEN_ABNORMAL_INSERT = Utils.parseString2Boolean(config.getProperty(\"abort\"), false);\n }",
"public AuditFunctionForm() {\n initComponents();\n init();\n }",
"FORM createFORM();",
"private void loadForm() {\n CodingProxy icd9 = problem.getIcd9Code();\n \n if (icd9 != null) {\n txtICD.setText(icd9.getProxiedObject().getCode());\n }\n \n String narr = problem.getProviderNarrative();\n \n if (narr == null) {\n narr = icd9 == null ? \"\" : icd9.getProxiedObject().getDisplay();\n }\n \n String probId = problem.getNumberCode();\n \n if (probId == null || probId.isEmpty()) {\n probId = getBroker().callRPC(\"BGOPROB NEXTID\", PatientContext.getActivePatient().getIdElement().getIdPart());\n }\n \n String pcs[] = probId.split(\"\\\\-\", 2);\n lblPrefix.setValue(pcs[0] + \" - \");\n txtID.setValue(pcs.length < 2 ? \"\" : pcs[1]);\n txtNarrative.setText(narr);\n datOnset.setValue(problem.getOnsetDate());\n \n if (\"P\".equals(problem.getProblemClass())) {\n radPersonal.setSelected(true);\n } else if (\"F\".equals(problem.getProblemClass())) {\n radFamily.setSelected(true);\n } else if (\"I\".equals(problem.getStatus())) {\n radInactive.setSelected(true);\n } else {\n radActive.setSelected(true);\n }\n \n int priority = NumberUtils.toInt(problem.getPriority());\n cboPriority.setSelectedIndex(priority < 0 || priority > 5 ? 0 : priority);\n loadNotes();\n }",
"public void limparCamposInput(){\n txtDisciplina.setText(\"\");\n txtAssunto.setText(\"\");\n txtDescricao.setText(\"\");\n imagemEnunciado.setImage(imageDefault);\n imagemResposta.setImage(imageDefault);\n }",
"public Form_soal() {\n initComponents();\n tampil_soal();\n }",
"public FormCadastroAutomovel() {\n initComponents();\n }",
"private void loadForm() {\n service.getReasons(refusalReasons);\n service.getVacEligibilty(vacElig);\n service.getVacSites(vacSites);\n service.getReactions(vacReactions);\n service.getOverrides(vacOverrides);\n updateComboValues();\n \n selPrv = \"\";\n selLoc = \"\";\n \n //datGiven.setDateConstraint(new SimpleDateConstraint(SimpleDateConstraint.NO_NEGATIVE, DateUtil.addDays(patient.getBirthDate(), -1, true), null, BgoConstants.TX_BAD_DATE_DOB));\n datGiven.setDateConstraint(getConstraintDOBDate());\n datEventDate.setConstraint(getConstraintDOBDate());\n radFacility.setLabel(service.getParam(\"Caption-Facility\", \"&Facility\"));\n if (immunItem != null) {\n \n txtVaccine.setValue(immunItem.getVaccineName());\n txtVaccine.setAttribute(\"ID\", immunItem.getVaccineID());\n txtVaccine.setAttribute(\"DATA\", immunItem.getVaccineID() + U + immunItem.getVaccineName());\n setEventType(immunItem.getEventType());\n \n radRefusal.setDisabled(!radRefusal.isChecked());\n radHistorical.setDisabled(!radHistorical.isChecked());\n radCurrent.setDisabled(!radCurrent.isChecked());\n \n visitIEN = immunItem.getVisitIEN();\n if (immunItem.getProvider() != null) {\n txtProvider.setText(FhirUtil.formatName(immunItem.getProvider().getName()));\n txtProvider.setAttribute(\"ID\", immunItem.getProvider().getId().getIdPart());\n selPrv = immunItem.getProvider().getId().getIdPart() + U + U + immunItem.getProvider().getName();\n }\n switch (immunItem.getEventType()) {\n case REFUSAL:\n ListUtil.selectComboboxItem(cboReason, immunItem.getReason());\n txtComment.setText(immunItem.getComment());\n datEventDate.setValue(immunItem.getDate());\n break;\n case HISTORICAL:\n datEventDate.setValue(immunItem.getDate());\n txtLocation.setValue(immunItem.isImmunization() ? immunItem.getLocationName() : \"\");\n txtLocation.setAttribute(\"ID\", immunItem.isImmunization() ? immunItem.getLocationID() : \"\");\n selLoc = immunItem.getLocationID() + U + U + immunItem.getLocationName();\n radOther.setSelected(txtLocation.getAttribute(\"ID\") != null\n ? txtLocation.getAttribute(\"ID\").toString().isEmpty() : false);\n txtAdminNote.setText(immunItem.getAdminNotes());\n ZKUtil.disableChildren(fraDate, true);\n ZKUtil.disableChildren(fraHistorical, true);\n default:\n service.getLot(lotNumbers, getVaccineID());\n loadComboValues(cboLot, lotNumbers, comboRenderer);\n loadVaccination();\n txtLocation.setValue(immunItem.isImmunization() ? immunItem.getLocationName() : \"\");\n txtLocation.setAttribute(\"ID\", immunItem.isImmunization() ? immunItem.getLocationID() : \"\");\n selLoc = immunItem.getLocationID() + U + U + immunItem.getLocationName();\n radOther.setSelected(txtLocation.getAttribute(\"ID\") != null\n ? txtLocation.getAttribute(\"ID\").toString().isEmpty() : false);\n ListUtil.selectComboboxItem(cboLot, immunItem.getLot());\n ListUtil.selectComboboxItem(cboSite, StrUtil.piece(immunItem.getInjSite(), \"~\", 2));\n spnVolume.setText(immunItem.getVolume());\n datGiven.setDate(immunItem.getDate());\n datVIS.setValue(immunItem.isImmunization() ? immunItem.getVISDate() : null);\n ListUtil.selectComboboxItem(cboReaction, immunItem.getReaction());\n ListUtil.selectComboboxData(cboOverride, immunItem.getVacOverride());\n txtAdminNote.setText(immunItem.getAdminNotes());\n cbCounsel.setChecked(immunItem.wasCounseled());\n }\n } else {\n IUser user = UserContext.getActiveUser();\n Practitioner provider = new Practitioner();\n provider.setId(user.getLogicalId());\n provider.setName(FhirUtil.parseName(user.getFullName()));\n txtProvider.setValue(FhirUtil.formatName(provider.getName()));\n txtProvider.setAttribute(\"ID\", VistAUtil.parseIEN(provider)); //provider.getId().getIdPart());\n selPrv = txtProvider.getAttribute(\"ID\") + U + U + txtProvider.getValue();\n Location location = new Location();\n location.setName(\"\");\n location.setId(\"\");\n datGiven.setDate(getBroker().getHostTime());\n onClick$btnVaccine(null);\n \n if (txtVaccine.getValue().isEmpty()) {\n close(true);\n return;\n }\n \n Encounter encounter = EncounterContext.getActiveEncounter();\n if (!EncounterUtil.isPrepared(encounter)) {\n setEventType(EventType.HISTORICAL);\n radCurrent.setDisabled(true);\n } else {\n if (isCategory(encounter, \"E\")) {\n setEventType(EventType.HISTORICAL);\n Date date = encounter == null ? null : encounter.getPeriod().getStart();\n datEventDate.setValue(DateUtil.stripTime(date == null ? getBroker().getHostTime() : date));\n radCurrent.setDisabled(true);\n txtLocation.setText(user.getSecurityDomain().getName());\n PromptDialog.showInfo(user.getSecurityDomain().getLogicalId());\n txtLocation.setAttribute(\"ID\", user.getSecurityDomain().getLogicalId());\n \n } else {\n if (isVaccineInactive()) {\n setEventType(EventType.HISTORICAL);\n radCurrent.setDisabled(true);\n } else {\n setEventType(EventType.CURRENT);\n radCurrent.setDisabled(false);\n }\n }\n }\n selectItem(cboReason, NONESEL);\n }\n btnSave.setLabel(immunItem == null ? \"Add\" : \"Save\");\n btnSave.setTooltiptext(immunItem == null ? \"Add record\" : \"Save record\");\n txtVaccine.setFocus(true);\n }",
"public entryForm() {\n \n this.doi = null;\n for(int i = 0; i < 29;i++){\n cy.add(new ArrayList<>());\n }\n System.out.println(\"hiiiiii\");\n initComponents();\n if(modifyIs == true){\n System.out.println(\"Value \" + sid);\n setValue();\n }\n Dimension wd = Toolkit.getDefaultToolkit().getScreenSize();\n jScrollPane1.setSize(wd);\n this.setSize(wd);\n \n }",
"public FormPemilihan() {\n initComponents();\n }",
"private void setDataInFields() \n {\n quantityTxtFld.setText(farmer.getCropQuantity()+\"\");\n quantityTxtFld.setEnabled(false);\n }",
"private void fillData() {\n jTextField1.setEnabled(false);\n jTextField11.setEnabled(false);\n\n if (owners != null && owners.get(\"editedOwner\") != null) {\n this.jTextField1.setText(owners.get(\"editedOwner\").getAsJsonObject().get(\"rc\").getAsString());\n this.jTextField11.setText(owners.get(\"editedOwner\").getAsJsonObject().get(\"share\").getAsString());\n }\n String[] header = new String[]{\"Rodné čislo\", \"Podiel v %\"};\n dtm.setColumnIdentifiers(header);\n jTableOwnerships.setModel(dtm);\n if (owners != null && owners.get(\"ownerships\") != null) {\n for (JsonElement jsonElement : owners.get(\"ownerships\").getAsJsonArray()) {\n JsonObject owner = (JsonObject) jsonElement;\n dtm.addRow(new Object[]{owner.get(\"rc\").getAsString(), owner.get(\"share\").getAsString()});\n }\n }\n }",
"public String inputForm() {\n return inputDataTraveler.validateData();\n }",
"public void populateFields(String userName){\n this.userNameLabel.setText(userName);\n \n if(this.dbConnection.ConnectDB()){\n //we connected\n String[] temp = this.dbConnection.getUserInformation(userName);\n //take this array and populate the input fields for firstName, lastName,Email,\n this.firstNameInputField.setText(temp[0]);\n this.lastNameInputField.setText(temp[1]);\n this.emailInputField.setText(temp[4]);\n this.roleDropdown.promptTextProperty().set(temp[2]);\n this.departmentDropdown.promptTextProperty().set(temp[3]);\n //add these default values to the map\n this.defaultFirstname = temp[0];\n this.defaultLastname = temp[1];\n this.defaultEmail = temp[4];\n this.defaultRole = temp[2];\n this.defaultDepartment = temp[3];\n \n //repopulate the map\n populateMap();\n //unlock the checkboxes\n this.unlockCheckboxes(this.boxes);\n \n// //print out the mapfor testing purposes\n// for(Map.Entry<String,String> mapObj: this.defaultValuesMap.entrySet()){\n// System.out.println(mapObj.getKey());\n// System.out.println(mapObj.getValue());\n// }\n \n \n }\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public FormImportar() {\n initComponents();\n }",
"public void limparCampos() {\n\n // Limpa todos formularios.\n textoNome.setText(\"\");\n textoCPF.setText(\"\");\n comboGenero.setSelectedIndex(0);\n textoDataDeNascimento.setText(\"\");\n textoEnderecoLogradouro.setText(\"\");\n textoBairro.setText(\"\");\n textoComplemento.setText(\"\");\n textoNumero.setText(\"\");\n textoEmail.setText(\"\");\n textoTelefone.setText(\"\");\n textoCelular.setText(\"\");\n textoCEP.setText(\"\");\n textoDD_Celular.setText(\"\");\n textoDD_Telefone.setText(\"\");\n Icon imagemPerfil = new ImageIcon(\"src\\\\br\\\\com\\\\Grupo07\\\\Imagens\\\\perfil.jpg\");\n imagemCliente.setIcon(imagemPerfil);\n\n }",
"private void initControls()\r\n\t{\r\n\t\tif (deltager != null)\r\n\t\t{\r\n\t\t\ttxfInput[0].setText(deltager.getNavn());\r\n\t\t\ttxfInput[1].setText(\"\" + deltager.getTelefonNr());\r\n\t\t\ttxfInput[2].setText(deltager.getAdresse().getVej());\r\n\t\t\ttxfInput[3].setText(\"\" + deltager.getAdresse().getNr());\r\n\t\t\ttxfInput[4].setText(deltager.getAdresse().getEtage());\r\n\t\t\ttxfInput[5].setText(\"\" + deltager.getAdresse().getPostNr());\r\n\t\t\ttxfInput[6].setText(deltager.getAdresse().getBy());\r\n\t\t\ttxfInput[7].setText(deltager.getAdresse().getLand());\r\n\t\t} \r\n\t\telse\r\n\t\t{\r\n\t\t\ttxfInput[0].clear();\r\n\t\t\ttxfInput[1].clear();\r\n\t\t\ttxfInput[2].clear();\r\n\t\t\ttxfInput[3].clear();\r\n\t\t\ttxfInput[4].clear();\r\n\t\t\ttxfInput[5].clear();\r\n\t\t\ttxfInput[6].clear();\r\n\t\t\ttxfInput[7].clear();\r\n\t\t}\r\n\t}",
"private void preparaForm(String opcao) {\n switch(opcao){\n case \"fill\": { preparaFill(); break; }\n case \"novo\": { preparaNovo(); break; }\n case \"alterar\": { preparaAlterar(); break; }\n case \"cancelar\": { preparaCancelar(); break; }\n case \"salvar\": { preparaSalvar(); break; }\n }\n }",
"private void populateFields() {\n\t\ttypeNameTF.setText(\"\");\n\t\tunitsTF.setText(\"\");\n\t\tunitMeasureTF.setText(\"\");\n\t\tvalidityDaysTF.setText(\"\");\n\t\treorderPointTF.setText(\"\");\n\t\tnotesTF.setText(\"\");\n\t\tstatusCB.getItems().addAll(\"Active\", \"Inactive\");\n\t\tstatusCB.setValue(\"Active\");\n\t}",
"private void setFields() {\n\t\tfirstname.setText(guest.getFirstName());\n\t\tlastname.setText(guest.getLastName());\n\t\tpassport.setText(guest.getPassportNumber());\n\t\ttelephone.setText(guest.getTelephoneNumber());\n\t\tarrival.setText(arrivalDate.toString());\n\t\tdeparture.setText(departureDate.toString());\n\n\t\tif (hotelChoice.getName() != null && hotelChoice.getName() != \"\"\n\t\t\t\t&& !(hotelChoice.getName() == Controller.DEFAULT_HOTEL_CHOICE)) {\n\t\t\thotel.setText(hotelChoice.getName());\n\t\t} else {\n\t\t\thotelChoice = new Hotel();\n\t\t\thotelChoice.setName(\"\");\n\t\t\thotel.clear();\n\t\t}\n\t\tif (roomQualityChoice.getQuality() != null && roomQualityChoice.getQuality() != \"\"\n\t\t\t\t&& !(roomQualityChoice.getQuality() == Controller.DEFAULT_QUALITY_CHOICE)) {\n\t\t\tquality.setText(roomQualityChoice.getQuality());\n\t\t} else {\n\t\t\troomQualityChoice = new RoomQuality();\n\t\t\troomQualityChoice.setQuality(\"\");\n\t\t\tquality.clear();\n\t\t}\n\t\tif (discountChoice > 0) {\n\t\t\tdiscount.setText(\"(-\" + discountChoice + \"%)\");\n\t\t}\n\n\t\tloadAvailableRooms();\n\n\t}",
"public AwardAmountFNADistributionForm() {\r\n initComponents();\r\n }",
"public MechanicForm() {\n initComponents();\n }",
"protected void setDataInForm(Long jobID) {\n if (jobID == null) {\n this.stepsValues = NewTaskService.getInitList();\n this.jobName = null;\n pickListBean.initDualList();\n } else {\n Job job = jobService.getByIdWithCollections(jobID);\n this.stepsValues = NewTaskService.getJobStepValuesList(job); \n this.jobName = job.getJobName(); \n pickListBean.setDualListByJob(job);\n }\n }",
"public GestaoFormando() {\n \n initComponents();\n listarEquipamentos();\n listarmapainscritos();\n }",
"void fillInputBox() {\n\t\tBox inputs = Box.createVerticalBox();\n\n\t\tfor (int i = 0; i < overviewRule.listOfParametersNeeded.size(); i++) {\n\t\t\tJLabel input = new JLabel(overviewRule.listOfParametersNeeded.get(i));\n\t\t\tinputs.add(input);\n\t\t}\n\n\t\tinputBox.add(inputLabel);\n\n\t\tinputBox.add(inputs);\n\t}",
"public SalidaCajaForm() {\n\t\tinicializarComponentes();\n }",
"private void initialize() {\r\n\t\tfrmProduto = new JFrame();\r\n\t\tfrmProduto.setTitle(\"Produto\");\r\n\t\tfrmProduto.getContentPane().setBackground(Color.LIGHT_GRAY);\r\n\t\tfrmProduto.setBounds(100, 100, 450, 300);\r\n\t\tfrmProduto.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tfrmProduto.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"Insira o nome do produto :\");\r\n\t\tlblNewLabel.setForeground(Color.BLUE);\r\n\t\tlblNewLabel.setFont(new Font(\"Arial\", Font.BOLD, 16));\r\n\t\tlblNewLabel.setBounds(29, 11, 255, 50);\r\n\t\tfrmProduto.getContentPane().add(lblNewLabel);\r\n\t\t\r\n\t\ttextField = new JTextField();\r\n\t\ttextField.setBounds(53, 72, 316, 32);\r\n\t\tfrmProduto.getContentPane().add(textField);\r\n\t\ttextField.setColumns(10);\r\n\t\t\r\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Quantidade :\");\r\n\t\tlblNewLabel_1.setForeground(Color.BLUE);\r\n\t\tlblNewLabel_1.setFont(new Font(\"Arial\", Font.BOLD, 14));\r\n\t\tlblNewLabel_1.setBounds(28, 125, 89, 14);\r\n\t\tfrmProduto.getContentPane().add(lblNewLabel_1);\r\n\t\t\r\n\t\tJLabel lblNewLabel_2 = new JLabel(\"Valor :\");\r\n\t\tlblNewLabel_2.setForeground(Color.BLUE);\r\n\t\tlblNewLabel_2.setFont(new Font(\"Arial\", Font.BOLD, 14));\r\n\t\tlblNewLabel_2.setBounds(29, 155, 89, 32);\r\n\t\tfrmProduto.getContentPane().add(lblNewLabel_2);\r\n\t\t\r\n\t\ttextField_1 = new JTextField();\r\n\t\ttextField_1.setBounds(127, 115, 89, 24);\r\n\t\tfrmProduto.getContentPane().add(textField_1);\r\n\t\ttextField_1.setColumns(10);\r\n\t\t\r\n\t\ttextField_2 = new JTextField();\r\n\t\ttextField_2.setBounds(88, 160, 86, 25);\r\n\t\tfrmProduto.getContentPane().add(textField_2);\r\n\t\ttextField_2.setColumns(10);\r\n\t}",
"private void buildFields() {\r\n buildField(txtPizzaName, GUIResource.getLabel(DIALOG, NAME_PIZZA), 0);\r\n buildField(txtCustomerName, GUIResource.getLabel(DIALOG, NAME_CUSTOMER), 1);\r\n buildField(txtPhone, GUIResource.getLabel(DIALOG, PHONE), 2);\r\n buildField(txtEmail, GUIResource.getLabel(DIALOG, EMAIL), 3);\r\n }",
"public ValidFrequencyForm() {\r\n initComponents();\r\n }",
"private Map<javax.swing.JTextField, String> setFieldDefaults(){\n \tMap<javax.swing.JTextField, String> map = new HashMap<javax.swing.JTextField, String>();\n \t\n \tmap.put(jFieldDBFile, \"enter folder path\");\n \tmap.put(jTextFieldZipcodes, \"zipcode1, zipcode2, etc\");\n \tmap.put(jTextFieldStart, \"address street zipcode\");\n \tmap.put(jTextFieldEnd, \"address street zipcode\");\n \t\n \treturn map;\n }",
"public SpeciesForm() {\n initComponents();\n setTitle(Application.TITLE_APP + \" Species\");\n processor = new SpeciesProcessor();\n loadData(); \n \n \n }",
"public tambahtoko() {\n initComponents();\n tampilkan();\n form_awal();\n }",
"public FormDataBuku() { //method FormDataBuku dengan hak akses publik\n initComponents(); //adalah method yang di generate oleh netbeans secara default. Kemudian juga terlihat ada method getter dan setter untuk variabel userList\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 FormUtama() {\n initComponents();\n }",
"private void fetchData() {\n mFirstNameLabel = \"First name:\";\n mFirstNameValue = \"Taylor\";\n mSurnameLabel = \"Surname:\";\n mSurnameValue = \"Swift\";\n\n initFields();\n }",
"public Ventaform() {\n initComponents();\n }",
"protected void setData() {\n \t\n \teditTextDate.setText(record.getDateTimeString());\n \t\n if (record.getOdometer() == 0) {\n \teditTextOdometer.setText(\"\");\n } else {\n \teditTextOdometer.setText(record.getOdometerString());\n }\n \n if (record.getGallons() == 0) {\n \teditTextGallons.setText(\"\");\n } else {\n \teditTextGallons.setText(record.getGallonsString());\n }\n \n checkBoxFullTank.setChecked(record.isFullTank());\n \n if (record.getCost() == 0) {\n \teditTextCost.setText(\"\");\n } else {\n \teditTextCost.setText(record.getCostString());\n }\n \n editTextNotes.setText(record.getNotes());\n }",
"public void limpiarCampos(){\n\n\t\tcampoInicio.setText(\"yyyy-mm-dd\");\n\t\tcampoInicio.setForeground(new Color(111,111,111));\n\t\tcampoFinal.setText(\"yyyy-mm-dd\");\n\t\tcampoFinal.setForeground(new Color(111,111,111));\n\n\t}",
"private void setFieldValues(){ \n\n if(rDatabaseType.equalsIgnoreCase(\"mysql\")){\n jComboBoxDatabaseType.setSelectedIndex(1);\n }\n if(rDatabaseType.equalsIgnoreCase(\"oracle\")){\n jComboBoxDatabaseType.setSelectedIndex(0);\n }\n jTextFieldDatabaseNameIp.setText(rDatabaseServerName);\n jTextFieldDBPort.setText(rDBPort);\n jTextFieldSchemaTNSName.setText(rTnsNameOrDBName);\n jTextFieldUserName.setText(rUserName);\n jTextFieldPassword.setText(rPassword);\n jTextFieldTableName.setText(rTableName);\n jTextFieldColumnName.setText(rColumnName);\n jTextFieldSQLQuery.setText(rQuery); \n }",
"private void retrieveInputs(HttpServletRequest req){\n\n\t\ttry {\t\t\t\t\n\n\t\t\t_medicalData = new MedicalData();\n\n\t\t\t\n\t\t\t_medicalData.setUserId(_userId);\n\t\t\t\n\t\t\t_medicalData.setPersonalName(req.getParameter(\"personalcontact_name\").trim());\n\t\t\t_medicalData.setSex(req.getParameter(\"personalcontact_sex\").trim());\n\t\t\t_medicalData.setPersonalAddress(req.getParameter(\"personalcontact_address\").trim());\t\t\t\n\t\t\t_medicalData.setPersonalPhone(req.getParameter(\"personalcontact_phonenumber1\").trim() + \",\" + \n\t\t\t\t\t\t\t\t\t\t req.getParameter(\"personalcontact_phonenumber2\").trim() + \",\" + \n\t\t\t\t\t\t\t\t\t\t req.getParameter(\"personalcontact_phonenumber3\").trim() );\n\t\t\t_medicalData.setPersonalDateOfBirth(req.getParameter(\"personalcontact_month\").trim() + \",\" + \n\t\t\t\t\t\t\t\t\t\t\t\treq.getParameter(\"personalcontact_day\").trim() + \",\" + \n\t\t\t\t\t\t\t\t\t\t\t\treq.getParameter(\"personalcontact_year\").trim() );\t\t\n\t\t\t\n\t\t\t_medicalData.setEmergencyContact1(req.getParameter(\"emergencycontact_name1\").trim());\n\t\t\t_medicalData.setEmergencyContact1Phone(req.getParameter(\"emergencycontact_1_phone1\").trim() + \",\" + \n\t\t\t\t\t \t\t\t\t\t req.getParameter(\"emergencycontact_1_phone2\").trim() + \",\" + \n\t\t\t\t\t req.getParameter(\"emergencycontact_1_phone3\").trim() );\n\t\t\t_medicalData.setEmergencyContact2(req.getParameter(\"emergencycontact_name2\").trim());\n\t\t\t_medicalData.setEmergencyContact2Phone(req.getParameter(\"emergencycontact_2_phone1\").trim() + \",\" + \n\t\t\t\t\t \t\t\t\t\t req.getParameter(\"emergencycontact_2_phone2\").trim() + \",\" + \n\t\t\t\t\t req.getParameter(\"emergencycontact_2_phone3\").trim() );\n\t\t\t\n\t\t\t_medicalData.setPrimaryCare(req.getParameter(\"emergencycontact_care\").trim());\n\t\t\t_medicalData.setPrimaryCarePhone(req.getParameter(\"emergencycontact_care_phone1\").trim() + \",\" + \n\t\t\t\t\t\t\t\t\t\t\t req.getParameter(\"emergencycontact_care_phone2\").trim() + \",\" + \n\t\t\t\t\t\t\t\t\t\t\t req.getParameter(\"emergencycontact_care_phone3\").trim() );\n\t\t\t_medicalData.setInsurance(req.getParameter(\"emergencycontact_insurance\").trim());\n\t\t\t_medicalData.setInsuranceId(req.getParameter(\"emergencycontact_insuranceid\").trim());\n\t\t\t\n\t\t\t_medicalData.setMedicalCondition(req.getParameter(\"emergencycontact_medications\").trim());\n\t\t\t_medicalData.setAllergies(req.getParameter(\"emergencycontact_allergies\").trim());\n\t\t\t_medicalData.setSpecialNotes(req.getParameter(\"emergencycontact_specialnote\").trim());\n\t\t\t\n\t\t\t_medicalData.setHeadNotes(req.getParameter(\"head_notes\").trim());\n\t\t\t_medicalData.setNeckNotes(req.getParameter(\"neck_notes\").trim());\n\t\t\t_medicalData.setChestNotes(req.getParameter(\"chest_notes\").trim());\n\t\t\t_medicalData.setArmsNotes(req.getParameter(\"arms_notes\").trim());\n\t\t\t_medicalData.setLegsNotes(req.getParameter(\"legs_notes\").trim());\n\t\t\t\n\t\t\t//Get the tab marker\n\t\t\t_tabMarker = req.getParameter(\"tabMarker\");\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t_log.warning(e.getMessage());\n\t\t}\t\t\t\n\t}",
"public CustomerListForm() {\n initComponents();\n findAllData();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTextField21 = new javax.swing.JTextField();\n jTextField20 = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel11 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n jLabel18 = new javax.swing.JLabel();\n jLabel19 = new javax.swing.JLabel();\n jLabel20 = new javax.swing.JLabel();\n jLabel21 = new javax.swing.JLabel();\n jLabel22 = new javax.swing.JLabel();\n jLabel23 = new javax.swing.JLabel();\n txtNome = new javax.swing.JTextField();\n txtDataN = new javax.swing.JTextField();\n txtNacionalidade = new javax.swing.JTextField();\n txtProfissao = new javax.swing.JTextField();\n txtMorada = new javax.swing.JTextField();\n txtCodPostal = new javax.swing.JTextField();\n txtLocalidade = new javax.swing.JTextField();\n txtTelefone = new javax.swing.JTextField();\n txtTelemovel = new javax.swing.JTextField();\n txtEmail = new javax.swing.JTextField();\n txtNif = new javax.swing.JTextField();\n txtHabilit = new javax.swing.JTextField();\n txtConhecimentosL = new javax.swing.JTextField();\n txtFormComp = new javax.swing.JTextField();\n txtExpV = new javax.swing.JTextField();\n txtConhecimentosC = new javax.swing.JTextField();\n txtDispon = new javax.swing.JTextField();\n txtComoConheceu = new javax.swing.JTextField();\n checkReceberInfo = new javax.swing.JCheckBox();\n checkIsParceiro = new javax.swing.JCheckBox();\n btnRemove = new javax.swing.JButton();\n btnSaveEdit = new javax.swing.JButton();\n btSave = new javax.swing.JButton();\n btCancelar = new javax.swing.JButton();\n\n jTextField21.setText(\"jTextField21\");\n\n jTextField20.setText(\"jTextField20\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Adicionar Voluntário\");\n\n jLabel1.setText(\"Nome\");\n\n jLabel3.setText(\"Data de Nascimento\");\n\n jLabel4.setText(\"Profissão\");\n\n jLabel5.setText(\"Morada\");\n\n jLabel6.setText(\"Código Postal\");\n\n jLabel7.setText(\"Localidade\");\n\n jLabel8.setText(\"Telefone\");\n\n jLabel9.setText(\"Telemóvel\");\n\n jLabel10.setText(\"Email\");\n\n jLabel11.setText(\"Habilitações\");\n\n jLabel12.setText(\"Conhecimentos Ling.\");\n\n jLabel13.setText(\"Formação Comp.\");\n\n jLabel14.setText(\"Exp. Voluntariado\");\n\n jLabel15.setText(\"Conhecimentos Constr.\");\n\n jLabel18.setText(\"Disponibilidade\");\n\n jLabel19.setText(\"Como Conheceu a Empresa\");\n\n jLabel20.setText(\"Deseja receber informações sobre a Habitat?\");\n\n jLabel21.setText(\"É parceiro da Habitat?\");\n\n jLabel22.setText(\"NIF\");\n\n jLabel23.setText(\"Nacionalidade\");\n\n checkReceberInfo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n checkReceberInfoActionPerformed(evt);\n }\n });\n\n btnRemove.setText(\"Remover\");\n btnRemove.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnRemoveActionPerformed(evt);\n }\n });\n\n btnSaveEdit.setText(\"Salvar\");\n btnSaveEdit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSaveEditActionPerformed(evt);\n }\n });\n\n btSave.setText(\"Salvar\");\n btSave.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btSaveActionPerformed(evt);\n }\n });\n\n btCancelar.setText(\"Cancelar\");\n btCancelar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btCancelarActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel15)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtConhecimentosC))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel12)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtConhecimentosL))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel11)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtHabilit))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel22)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtNif))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel10)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtEmail))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel9)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtTelemovel))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtTelefone))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel7)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtLocalidade))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtCodPostal))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtMorada))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtProfissao))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel23)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtNacionalidade))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtDataN))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel19)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtComoConheceu))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel18)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtDispon))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel14)\n .addComponent(jLabel13))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtExpV)\n .addComponent(txtFormComp)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 105, Short.MAX_VALUE)\n .addComponent(btnRemove)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnSaveEdit)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btSave)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btCancelar))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel21)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(checkIsParceiro))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel20)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(checkReceberInfo)))\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(10, 10, 10)\n .addComponent(txtNome)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel1)\n .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtDataN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel23)\n .addComponent(txtNacionalidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(txtProfissao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(txtMorada, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(txtCodPostal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(txtLocalidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(txtTelefone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9)\n .addComponent(txtTelemovel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel10)\n .addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel22)\n .addComponent(txtNif, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel11)\n .addComponent(txtHabilit, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel12)\n .addComponent(txtConhecimentosL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel13)\n .addComponent(txtFormComp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel14)\n .addComponent(txtExpV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel15)\n .addComponent(txtConhecimentosC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel18)\n .addComponent(txtDispon, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel19)\n .addComponent(txtComoConheceu, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(checkReceberInfo)\n .addComponent(jLabel20))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(checkIsParceiro)\n .addComponent(jLabel21))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btCancelar)\n .addComponent(btSave)\n .addComponent(btnRemove)\n .addComponent(btnSaveEdit))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }",
"private void initForm() {\n DefaultListModel listModel = new DefaultListModel();\n filterList.setModel(listModel);\n Vector filters = null;\n if (transmutor instanceof Refiner) {\n filters = ((Refiner) transmutor).getPrefilters();\n } else {\n filters = ((Extractor) transmutor).getPrefilters();\n }\n Enumeration filterE = filters.elements();\n \n while (filterE.hasMoreElements()) {\n listModel.addElement(filterE.nextElement());\n }\n }",
"public Form_Rincian_Hitung() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n getData();\n }",
"public form_utama_kasir() {\n initComponents(); \n koneksi DB = new koneksi(); \n con = DB.getConnection();\n aturtext();\n tampilkan();\n nofakturbaru();\n loadData();\n panelEditDataDiri.setVisible(false);\n txtHapusKodeTransaksi.setVisible(false);\n txtHapusQtyTransaksi.setVisible(false);\n txtHapusStokTersedia.setVisible(false);\n }",
"public Perumahan() {\n initComponents();\n aturModelTabel();\n Tipe();\n showForm(false);\n showData(\"\");\n }",
"public FormDataManagement() {\n initComponents();\n }",
"private void initialize()\r\n\t{\r\n\t\tframe = new JFrame();\r\n\t\tframe.getContentPane().setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\tframe.setBounds(100, 100, 1200, 733);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\tJLabel Enter = new JLabel(\"Enter the User Details\");\r\n\t\tEnter.setForeground(Color.WHITE);\r\n\t\tEnter.setBounds(398, 32, 392, 72);\r\n\t\tEnter.setFont(new Font(\"Bodoni MT Black\", Font.PLAIN, 32));\r\n\r\n\t\tJLabel lblName = new JLabel(\"First Name :\");\r\n\t\tlblName.setForeground(Color.WHITE);\r\n\t\tlblName.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblName.setBounds(184, 179, 124, 25);\r\n\r\n\t\ttextField = new JTextField();\r\n\t\ttextField.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField.setBounds(347, 178, 171, 35);\r\n\t\ttextField.setColumns(10);\r\n\r\n\t\tJLabel lblAadharNo = new JLabel(\"Aadhar No :\");\r\n\t\tlblAadharNo.setForeground(Color.WHITE);\r\n\t\tlblAadharNo.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblAadharNo.setBounds(604, 179, 116, 25);\r\n\r\n\t\ttextField_1 = new JTextField();\r\n\t\ttextField_1.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField_1.setBounds(740, 178, 296, 35);\r\n\t\ttextField_1.setColumns(10);\r\n\r\n\t\tJLabel lblAddress = new JLabel(\"Address :\");\r\n\t\tlblAddress.setForeground(Color.WHITE);\r\n\t\tlblAddress.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblAddress.setBounds(604, 242, 94, 25);\r\n\r\n\t\ttextField_2 = new JTextField();\r\n\t\ttextField_2.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField_2.setBounds(740, 242, 296, 35);\r\n\t\ttextField_2.setColumns(10);\r\n\r\n\t\ttextField_3 = new JTextField();\r\n\t\ttextField_3.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField_3.setBounds(740, 304, 171, 35);\r\n\t\ttextField_3.setColumns(10);\r\n\r\n\t\tJLabel lblPhoneNo = new JLabel(\"Phone No:\");\r\n\t\tlblPhoneNo.setForeground(Color.WHITE);\r\n\t\tlblPhoneNo.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblPhoneNo.setBounds(604, 309, 99, 25);\r\n\r\n\t\tJLabel label = new JLabel(\"\");\r\n\t\tlabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlabel.setBounds(398, 636, 392, 42);\r\n\t\tframe.getContentPane().add(label);\r\n\r\n\t\t\r\n\r\n\t\t\r\n\t\tJButton btnPrev = new JButton(\"prev\");\r\n\t\tbtnPrev.setBackground(new Color(255, 255, 102));\r\n\t\tbtnPrev.setIcon(null);\r\n\t\tbtnPrev.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tbtnPrev.setBounds(0, 643, 106, 43);\r\n\t\tbtnPrev.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) \r\n\t\t\t{\r\n\t\t\t\tUsers u=new Users();\r\n\t\t\t\tframe.setVisible(false);\r\n\t\t\t\tu.frame.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\tframe.getContentPane().add(Enter);\r\n\t\tframe.getContentPane().add(lblName);\r\n\t\tframe.getContentPane().add(textField);\r\n\t\tframe.getContentPane().add(lblAadharNo);\r\n\t\tframe.getContentPane().add(textField_1);\r\n\t\tframe.getContentPane().add(lblAddress);\r\n\t\tframe.getContentPane().add(textField_2);\r\n\t\tframe.getContentPane().add(textField_3);\r\n\t\tframe.getContentPane().add(lblPhoneNo);\r\n\r\n\t\tframe.getContentPane().add(btnPrev);\r\n\r\n\t\ttextField_4 = new JTextField();\r\n\t\ttextField_4.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField_4.setBounds(347, 241, 171, 35);\r\n\t\tframe.getContentPane().add(textField_4);\r\n\t\ttextField_4.setColumns(10);\r\n\r\n\t\tJLabel lblMiddleName = new JLabel(\"Middle Name:\");\r\n\t\tlblMiddleName.setForeground(Color.WHITE);\r\n\t\tlblMiddleName.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblMiddleName.setBounds(184, 241, 129, 26);\r\n\t\tframe.getContentPane().add(lblMiddleName);\r\n\r\n\t\ttextField_5 = new JTextField();\r\n\t\ttextField_5.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField_5.setColumns(10);\r\n\t\ttextField_5.setBounds(347, 308, 171, 35);\r\n\t\tframe.getContentPane().add(textField_5);\r\n\t\t\r\n\t\tJLabel lblTestResult = new JLabel(\"Test Result :\");\r\n\t\tlblTestResult.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblTestResult.setForeground(Color.WHITE);\r\n\t\tlblTestResult.setBounds(184, 376, 124, 35);\r\n\t\tframe.getContentPane().add(lblTestResult);\r\n\t\t\r\n\t\ttextField_6 = new JTextField();\r\n\t\ttextField_6.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField_6.setBounds(347, 376, 171, 35);\r\n\t\tframe.getContentPane().add(textField_6);\r\n\t\ttextField_6.setColumns(10);\r\n\r\n\t\tJLabel lblLastName = new JLabel(\"Last Name:\");\r\n\t\tlblLastName.setForeground(Color.WHITE);\r\n\t\tlblLastName.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblLastName.setBounds(184, 308, 116, 26);\r\n\t\tframe.getContentPane().add(lblLastName);\r\n\t\t\r\n\t\tJButton btnSubmit = new JButton(\"Submit\");\r\n\t\tbtnSubmit.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\r\n\t\t\t\tif (e.getSource() == btnSubmit)\r\n\t\t\t\t{\r\n\t\t\t\t\ttry\r\n\t\t\t { \r\n\t\t\t\t\t\t Class.forName(\"com.mysql.jdbc.Driver\"); \r\n\t\t\t\t Connection conn = null;\r\n\t\t\t\t conn = DriverManager.getConnection(\"jdbc:mysql://localhost/rto\",\"root\", \"\"); \r\n\t\t\t\t System.out.print(\"Database is connected !\");\r\n\t\t\t\t Statement stmt = conn.createStatement();\r\n\r\n\t\t\t\t String q1 = \"insert into users(FName,MName,LName,aadhar,address,phno) values('\" +textField.getText() + \r\n\t\t\t\t \"','\" + textField_4.getText()+ \"','\"+textField_5.getText()+\r\n\t\t\t\t \"',\"+textField_1.getText()+\",'\"+textField_2.getText()+\"',\"+textField_3.getText()+\")\";\r\n\t\t\t\t int a=stmt.executeUpdate(q1);\r\n\t\t\t\t label.setText(\"User Successfully Inserted.\");\r\n\t\t\t\t conn.close(); \r\n\t\t\t } \r\n\t\t\t catch(Exception ex) \r\n\t\t\t { \r\n\t\t\t System.out.println(ex); \r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnSubmit.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tbtnSubmit.setBounds(460, 480, 129, 42);\r\n\r\n\t\tframe.getContentPane().add(btnSubmit);\r\n\t\t\r\n\t\tJButton btnUpdate = new JButton(\"Update\");\r\n\t\tbtnUpdate.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\r\n\t\t\t\tif (e.getSource() == btnUpdate)\r\n\t\t\t\t{\r\n\t\t\t\t\ttry\r\n\t\t\t { \r\n\t\t\t\t\t\t Class.forName(\"com.mysql.jdbc.Driver\"); \r\n\t\t\t\t Connection conn = null;\r\n\t\t\t\t conn = DriverManager.getConnection(\"jdbc:mysql://localhost/rto\",\"root\", \"\"); \r\n\t\t\t\t System.out.print(\"Database is connected !\");\r\n\t\t\t\t Statement stmt = conn.createStatement();\r\n\r\n\t\t\t\t String q1 = \"update users set D_Test='\" +textField_6.getText() + \"' where aadhar=\"+textField_1.getText();\r\n\t\t\t\t int a=stmt.executeUpdate(q1);\r\n\t\t\t\t label.setText(\"User Successfully Inserted.\");\r\n\t\t\t\t conn.close(); \r\n\t\t\t } \r\n\t\t\t catch(Exception ex) \r\n\t\t\t { \r\n\t\t\t System.out.println(ex); \r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnUpdate.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tbtnUpdate.setBounds(613, 480, 129, 42);\r\n\r\n\t\tframe.getContentPane().add(btnUpdate);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"New label\");\r\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.BOLD, 11));\r\n\t\tlblNewLabel.setIcon(new ImageIcon(\"C:\\\\Users\\\\LC\\\\eclipse-workspace\\\\RTOproject\\\\images\\\\pic8alter - Copy.png\"));\r\n\t\tlblNewLabel.setBounds(0, 11, 1182, 686);\r\n\t\tframe.getContentPane().add(lblNewLabel);\r\n\t\t\r\n\t\t\r\n\r\n\r\n\t}",
"public void limparCampos() {\n\t\tcodigoField.setText(\"\");\n\t\tdescricaoField.setText(\"\");\n\t\tcodigoField.setEditable(true);\n\t\tBorder border = BorderFactory.createLineBorder(Color.RED);\n\t\tcodigoField.setBorder(border);\n\t\tcodigoField.requestFocus();\n\t\tBorder border1 = BorderFactory.createLineBorder(Color.BLACK);\n\t\tdescricaoField.setBorder(border1);\n\t\t\n\t\t\n\t}",
"public frmMain() {\n initComponents();\n setTanggal();\n setJam();\n }",
"public void getData(AccessInputMeta in)\n\t{\n\t\tif (in.getFileName() !=null) \n\t\t{\n\t\t\twFilenameList.removeAll();\n\n\t\t\tfor (int i=0;i<in.getFileName().length;i++) \n\t\t\t{\n\t\t\t\twFilenameList.add(new String[] { in.getFileName()[i], in.getFileMask()[i] , in.getExludeFileMask()[i],in.getRequiredFilesDesc(in.getFileRequired()[i]), in.getRequiredFilesDesc(in.getIncludeSubFolders()[i])} );\n\t\t\t}\t\n\t\t\twFilenameList.removeEmptyRows();\n\t\t\twFilenameList.setRowNums();\n\t\t\twFilenameList.optWidth(true);\n\t\t}\n\t\twInclFilename.setSelection(in.includeFilename());\n\t\twInclTablename.setSelection(in.includeTablename());\n\t\twInclRownum.setSelection(in.includeRowNumber());\n\t\twAddResult.setSelection(in.isAddResultFile());\n\t\t\n\t\twFileField.setSelection(in.isFileField());\n\t\t\n\t\tif (in.getTableName()!=null) wTable.setText(in.getTableName());\n\t\tif (in.getFilenameField()!=null) wInclFilenameField.setText(in.getFilenameField());\n\t\tif (in.getDynamicFilenameField()!=null) wFilenameField.setText(in.getDynamicFilenameField());\n\t\t\n\t\t\n\t\tif (in.gettablenameField()!=null) wInclTablenameField.setText(in.gettablenameField());\n\t\tif (in.getRowNumberField()!=null) wInclRownumField.setText(in.getRowNumberField());\n\t\twResetRownum.setSelection(in.resetRowNumber());\n\t\twLimit.setText(\"\"+in.getRowLimit());\n\n\t\tlogDebug(BaseMessages.getString(PKG, \"AccessInputDialog.Log.GettingFieldsInfo\"));\n\t\tfor (int i=0;i<in.getInputFields().length;i++)\n\t\t{\n\t\t AccessInputField field = in.getInputFields()[i];\n\t\t \n if (field!=null)\n {\n \t\t\tTableItem item = wFields.table.getItem(i);\n \t\t\tString name = field.getName();\n \t\t\tString xpath\t= field.getColumn();\n \t\t\tString type = field.getTypeDesc();\n \t\t\tString format = field.getFormat();\n \t\t\tString length = \"\"+field.getLength();\n \t\t\tString prec = \"\"+field.getPrecision();\n \t\t\tString curr = field.getCurrencySymbol();\n \t\t\tString group = field.getGroupSymbol();\n \t\t\tString decim = field.getDecimalSymbol();\n \t\t\tString trim = field.getTrimTypeDesc();\n \t\t\tString rep = field.isRepeated()?BaseMessages.getString(PKG, \"System.Combo.Yes\"):BaseMessages.getString(PKG, \"System.Combo.No\");\n \t\t\t\n if (name !=null) item.setText( 1, name);\n if (xpath !=null) item.setText( 2, xpath);\n \t\t\tif (type !=null) item.setText( 3, type);\n \t\t\tif (format !=null) item.setText( 4, format);\n \t\t\tif (length !=null && !\"-1\".equals(length)) item.setText( 5, length);\n \t\t\tif (prec !=null && !\"-1\".equals(prec)) item.setText( 6, prec);\n \t\t\tif (curr !=null) item.setText( 7, curr);\n \t\t\tif (decim !=null) item.setText( 8, decim);\n \t\t\tif (group !=null) item.setText( 9, group);\n \t\t\tif (trim !=null) item.setText(10, trim);\n \t\t\tif (rep !=null) item.setText(11, rep); \n }\n\t\t}\n \n wFields.removeEmptyRows();\n wFields.setRowNums();\n wFields.optWidth(true);\n if(in.getShortFileNameField()!=null) wShortFileFieldName.setText(in.getShortFileNameField());\n if(in.getPathField()!=null) wPathFieldName.setText(in.getPathField());\n if(in.isHiddenField()!=null) wIsHiddenName.setText(in.isHiddenField());\n if(in.getLastModificationDateField()!=null) wLastModificationTimeName.setText(in.getLastModificationDateField());\n if(in.getUriField()!=null) wUriName.setText(in.getUriField());\n if(in.getRootUriField()!=null) wRootUriName.setText(in.getRootUriField());\n if(in.getExtensionField()!=null) wExtensionFieldName.setText(in.getExtensionField());\n if(in.getSizeField()!=null) wSizeFieldName.setText(in.getSizeField());\n\n\n\t\tsetIncludeFilename();\n\t\tsetIncludeTablename();\n\t\tsetIncludeRownum();\n\n\t\twStepname.selectAll();\n\t}",
"public void limpiarCampos() {\n jtCargo.setText(\"\");\n jtCiudadNacimiento.setText(\"\");\n jtCorreo.setText(\"\");\n jtDepartamento.setText(\"\");\n jtDireccion.setText(\"\");\n jtDocumento.setText(\"\");\n jtMovil.setText(\"\");\n jtPrimerApellido.setText(\"\");\n jtPrimerNombre.setText(\"\");\n jtProfesion.setText(\"\");\n jtSegundoApellido.setText(\"\");\n jtSegundoNombre.setText(\"\");\n jtTelefono.setText(\"\");\n jtDocumento.setEnabled(true);\n jdFechaContratacion.setEnabled(true);\n jcTipoDocumento.setSelectedIndex(0);\n jcTipoSangre.setSelectedIndex(0);\n jcTipoContrato.setSelectedIndex(0);\n cjFactorRH.setSelectedIndex(0);\n jdFechaNacimiento.setDate(null);\n jdFechaTitulacion.setDate(null);\n jdFechaContratacion.setDate(null);\n\n repaint();\n }",
"public void limpaTextFields() {\n tfMatricula.setText(\"\");\n tfNome.setText(\"\");\n tfDataNascimento.setText(\"\");\n tfTelefone.setText(\"\");\n tfSalario.setText(\"\");\n }",
"public Formulario() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblTitle = new javax.swing.JLabel();\n jSeparator2 = new javax.swing.JSeparator();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n txtMaSV = new javax.swing.JTextField();\n txtTenSV = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n txtNgaySinh = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n txtKhoa = new javax.swing.JTextField();\n txtLop = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n txtQuocTich = new javax.swing.JTextField();\n jLabel9 = new javax.swing.JLabel();\n txtDanToc = new javax.swing.JTextField();\n jLabel10 = new javax.swing.JLabel();\n txtSoCCCD = new javax.swing.JTextField();\n jLabel11 = new javax.swing.JLabel();\n txtEmail = new javax.swing.JTextField();\n jLabel12 = new javax.swing.JLabel();\n txtNoiThuongTru = new javax.swing.JTextField();\n jLabel13 = new javax.swing.JLabel();\n txtNoiTamTru = new javax.swing.JTextField();\n txtTonGiao = new javax.swing.JTextField();\n jLabel14 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n txtHoTenCha = new javax.swing.JTextField();\n jLabel16 = new javax.swing.JLabel();\n txtSoTaiKhoan = new javax.swing.JTextField();\n jLabel17 = new javax.swing.JLabel();\n jLabel18 = new javax.swing.JLabel();\n jLabel19 = new javax.swing.JLabel();\n txtTenNganHang = new javax.swing.JTextField();\n txtNamSinhCha = new javax.swing.JTextField();\n jLabel20 = new javax.swing.JLabel();\n txtNgheNghiepCha = new javax.swing.JTextField();\n jLabel21 = new javax.swing.JLabel();\n txtDiaChiCha = new javax.swing.JTextField();\n jLabel22 = new javax.swing.JLabel();\n txtSDTCha = new javax.swing.JTextField();\n jLabel23 = new javax.swing.JLabel();\n txtHoTenMe = new javax.swing.JTextField();\n txtNamSinhMe = new javax.swing.JTextField();\n txtNgheNghiepMe = new javax.swing.JTextField();\n jLabel24 = new javax.swing.JLabel();\n jLabel25 = new javax.swing.JLabel();\n jSeparator1 = new javax.swing.JSeparator();\n jLabel26 = new javax.swing.JLabel();\n txtDiaChiMe = new javax.swing.JTextField();\n jLabel27 = new javax.swing.JLabel();\n txtSDTMe = new javax.swing.JTextField();\n jLabel28 = new javax.swing.JLabel();\n jLabel29 = new javax.swing.JLabel();\n lableTK = new javax.swing.JLabel();\n jLabel31 = new javax.swing.JLabel();\n txtMatKhau = new javax.swing.JTextField();\n jSeparator3 = new javax.swing.JSeparator();\n btnThem = new javax.swing.JButton();\n btnQuayLai = new javax.swing.JButton();\n txtHoTenChuHo = new javax.swing.JTextField();\n jLabel33 = new javax.swing.JLabel();\n txtSoDienThoai = new javax.swing.JTextField();\n jLabel34 = new javax.swing.JLabel();\n txtMaBHYT = new javax.swing.JTextField();\n jScrollPane1 = new javax.swing.JScrollPane();\n tblBangDuLieu = new javax.swing.JTable();\n jLabel35 = new javax.swing.JLabel();\n btnChonFile = new javax.swing.JButton();\n lblDuongDan = new javax.swing.JLabel();\n txtTenTaiKhoan = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setResizable(false);\n\n lblTitle.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n lblTitle.setText(\"THÊM THÔNG TIN SINH VIÊN\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel2.setText(\"Thông tin cơ bản\");\n\n jLabel3.setText(\"Mã sinh viên:\");\n\n txtMaSV.addCaretListener(new javax.swing.event.CaretListener() {\n public void caretUpdate(javax.swing.event.CaretEvent evt) {\n txtMaSVCaretUpdate(evt);\n }\n });\n\n jLabel4.setText(\"Tên sinh viên:\");\n\n jLabel5.setText(\"Ngày sinh:\");\n\n jLabel6.setText(\"Khoa:\");\n\n jLabel7.setText(\"Lớp:\");\n\n jLabel8.setText(\"Quốc tịch:\");\n\n jLabel9.setText(\"Dân tộc:\");\n\n jLabel10.setText(\"Số CCCD:\");\n\n jLabel11.setText(\"Email:\");\n\n jLabel12.setText(\"Nơi thường trú:\");\n\n jLabel13.setText(\"Nơi tạm trú:\");\n\n jLabel14.setText(\"Tôn giáo:\");\n\n jLabel15.setText(\"Tên ngân hàng:\");\n\n jLabel16.setText(\"Số tài khoản:\");\n\n jLabel17.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel17.setText(\"Thông tin gia đình\");\n\n jLabel18.setText(\"Họ tên cha:\");\n\n jLabel19.setText(\"Năm sinh:\");\n\n jLabel20.setText(\"Nghề nghiệp:\");\n\n jLabel21.setText(\"Địa chỉ:\");\n\n jLabel22.setText(\"Số điện thoại:\");\n\n jLabel23.setText(\"Họ tên mẹ:\");\n\n jLabel24.setText(\"Năm sinh:\");\n\n jLabel25.setText(\"Nghề nghiệp:\");\n\n jLabel26.setText(\"Địa chỉ:\");\n\n jLabel27.setText(\"Số điện thoại:\");\n\n jLabel28.setText(\"Họ tên chủ hộ:\");\n\n jLabel29.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel29.setText(\"Tài khoản\");\n\n lableTK.setText(\"Tên tài khoản:\");\n\n jLabel31.setText(\"Mật khẩu:\");\n\n btnThem.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n btnThem.setText(\"Thêm\");\n btnThem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnThemActionPerformed(evt);\n }\n });\n\n btnQuayLai.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n btnQuayLai.setText(\"Quay lại\");\n btnQuayLai.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnQuayLaiActionPerformed(evt);\n }\n });\n\n jLabel33.setText(\"Số điện thoại:\");\n\n jLabel34.setText(\"Mã BHYT:\");\n\n tblBangDuLieu.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null}\n },\n new String [] {\n \"STT\", \"Mã sinh viên\", \"Họ tên\", \"Khoa\", \"Lớp\"\n }\n ));\n jScrollPane1.setViewportView(tblBangDuLieu);\n if (tblBangDuLieu.getColumnModel().getColumnCount() > 0) {\n tblBangDuLieu.getColumnModel().getColumn(0).setMinWidth(50);\n tblBangDuLieu.getColumnModel().getColumn(0).setMaxWidth(50);\n tblBangDuLieu.getColumnModel().getColumn(1).setMinWidth(150);\n tblBangDuLieu.getColumnModel().getColumn(1).setMaxWidth(150);\n }\n\n jLabel35.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel35.setText(\"Nhập theo danh sách:\");\n\n btnChonFile.setText(\"Chọn file\");\n btnChonFile.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnChonFileActionPerformed(evt);\n }\n });\n\n lblDuongDan.setText(\"Vui lòng chọn file\");\n\n txtTenTaiKhoan.setEnabled(false);\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(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lblTitle, javax.swing.GroupLayout.PREFERRED_SIZE, 357, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(257, 257, 257))\n .addGroup(layout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addGroup(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 .addComponent(lableTK)\n .addGap(28, 28, 28)\n .addComponent(txtTenTaiKhoan, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel17)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel21)\n .addComponent(jLabel26))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(265, 265, 265)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel22)\n .addComponent(jLabel19)\n .addComponent(jLabel24)))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtSDTMe, javax.swing.GroupLayout.DEFAULT_SIZE, 198, Short.MAX_VALUE)\n .addComponent(txtNamSinhCha)\n .addComponent(txtSDTCha)\n .addComponent(txtNamSinhMe))\n .addGap(34, 34, 34)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel20)\n .addComponent(jLabel25))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtNgheNghiepCha, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtNgheNghiepMe, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(267, 267, 267)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel31)\n .addGap(35, 35, 35)\n .addComponent(txtMatKhau, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(lblDuongDan)))))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(txtDiaChiMe, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtDiaChiCha, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel18)\n .addGap(40, 40, 40)\n .addComponent(txtHoTenCha, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel23)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtHoTenMe, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel28)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtHoTenChuHo, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel35)\n .addGap(18, 18, 18)\n .addComponent(btnChonFile))\n .addComponent(jSeparator3, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel29, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jSeparator2)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel8))\n .addComponent(jLabel10)\n .addComponent(jLabel12)\n .addComponent(jLabel15))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtMaSV, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtKhoa, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtQuocTich, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtSoCCCD, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtNoiThuongTru, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtTenNganHang, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(jLabel7)\n .addComponent(jLabel9)\n .addComponent(jLabel11)\n .addComponent(jLabel13)\n .addComponent(jLabel16))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtSoTaiKhoan, javax.swing.GroupLayout.PREFERRED_SIZE, 197, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtLop, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(txtEmail, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtTenSV, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtDanToc, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(txtNoiTamTru, javax.swing.GroupLayout.PREFERRED_SIZE, 197, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(39, 39, 39)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel34)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtMaBHYT, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jLabel14))\n .addGap(19, 19, 19)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtTonGiao, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtNgaySinh, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel33)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtSoDienThoai)))))))\n .addGap(0, 30, Short.MAX_VALUE))))\n .addGroup(layout.createSequentialGroup()\n .addGap(267, 267, 267)\n .addComponent(btnThem, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(269, 269, 269)\n .addComponent(btnQuayLai)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(lblTitle)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtMaSV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtTenSV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(txtNgaySinh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtKhoa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7)\n .addComponent(txtLop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtQuocTich, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8)\n .addComponent(jLabel9)\n .addComponent(txtDanToc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel14)\n .addComponent(txtTonGiao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtSoCCCD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10)\n .addComponent(jLabel11)\n .addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel33)\n .addComponent(txtSoDienThoai, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtNoiThuongTru, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel12)\n .addComponent(jLabel13)\n .addComponent(txtNoiTamTru, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel34)\n .addComponent(txtMaBHYT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtTenNganHang, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel15)\n .addComponent(jLabel16)\n .addComponent(txtSoTaiKhoan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel17)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtHoTenCha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel18)\n .addComponent(txtNamSinhCha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel19)\n .addComponent(jLabel20)\n .addComponent(txtNgheNghiepCha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtDiaChiCha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel22)\n .addComponent(txtSDTCha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel21))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtHoTenMe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel23)\n .addComponent(jLabel24)\n .addComponent(txtNamSinhMe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel25)\n .addComponent(txtNgheNghiepMe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtSDTMe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel27)\n .addComponent(jLabel26)\n .addComponent(txtDiaChiMe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtHoTenChuHo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel28))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel29)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtTenTaiKhoan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lableTK)\n .addComponent(jLabel31)\n .addComponent(txtMatKhau, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel35)\n .addComponent(btnChonFile)\n .addComponent(lblDuongDan))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnThem)\n .addComponent(btnQuayLai))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }",
"public OverdueRecordForm() {\n initComponents();\n display_Overdue();\n }",
"private void formFiller(FormLayout fl)\n\t{\n fl.setSizeFull();\n\n\t\ttf0=new TextField(\"Name\");\n\t\ttf0.setRequired(true);\n\t\t\n sf1 = new Select (\"Customer\");\n try \n {\n\t\t\tfor(String st :db.selectAllCustomers())\n\t\t\t{\n\t\t\t\tsf1.addItem(st);\n\t\t\t}\n\t\t} \n \tcatch (UnsupportedOperationException | SQLException e) \n \t{\n \t\tErrorWindow wind = new ErrorWindow(e); \n\t UI.getCurrent().addWindow(wind);\n \t\te.printStackTrace();\n \t}\n sf1.setRequired(true);\n \n sf2 = new Select (\"Project Type\");\n sf2.addItem(\"In house\");\n sf2.addItem(\"Outsourcing\");\n df3=new DateField(\"Start Date\");\n df3.setDateFormat(\"d-M-y\");\n df3.setRequired(true);\n \n df4=new DateField(\"End Date\");\n df4.setDateFormat(\"d-M-y\");\n \n df4.setRangeStart(df3.getValue());\n \n df5=new DateField(\"Next DeadLine\");\n df5.setDateFormat(\"d-M-y\");\n df5.setRangeStart(df3.getValue());\n df5.setRangeEnd(df4.getValue());\n sf6 = new Select (\"Active\");\n sf6.addItem(\"yes\");\n sf6.addItem(\"no\");\n sf6.setRequired(true);\n \n tf7=new TextField(\"Budget(mandays)\");\n \n tf8=new TextArea(\"Description\");\n \n tf9=new TextField(\"Inserted By\");\n \n tf10=new TextField(\"Inserted At\");\n \n tf11=new TextField(\"Modified By\");\n \n tf12=new TextField(\"Modified At\");\n \n if( project.getName()!=null)tf0.setValue(project.getName());\n else tf0.setValue(\"\");\n\t\tif(!editable)tf0.setReadOnly(true);\n fl.addComponent(tf0, 0);\n \n\n if(project.getCustomerID()!=-1)\n\t\t\ttry \n \t{\n\t\t\t\tsf1.setValue(db.selectCustomerforId(project.getCustomerID()));\n\t\t\t}\n \tcatch (ReadOnlyException | SQLException e) \n \t{\n \t\tErrorWindow wind = new ErrorWindow(e); \n\t\t UI.getCurrent().addWindow(wind);\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\telse sf1.setValue(\"\");\n if(!editable)sf1.setReadOnly(true);\n fl.addComponent(sf1, 1);\n \n \n if(project.getProjectType()!=null)sf2.setValue(project.getProjectType());\n else sf2.setValue(\"\");\n if(!editable)sf2.setReadOnly(true);\n fl.addComponent(sf2, 2);\n \n if(project.getStartDate()!=null) df3.setValue(project.getStartDate());\n if(!editable)df3.setReadOnly(true);\n fl.addComponent(df3, 3);\n \n if(project.getEndDate()!=null) df4.setValue(project.getEndDate());\n if(!editable)df4.setReadOnly(true);\n fl.addComponent(df4, 4);\n \n if(project.getNextDeadline()!=null)df5.setValue(project.getNextDeadline());\n if(!editable)df5.setReadOnly(true);\n fl.addComponent(df5, 5);\n \n if (project.isActive())sf6.setValue(\"yes\");\n else sf6.setValue(\"no\");\n if(!editable)sf6.setReadOnly(true);\n fl.addComponent(sf6, 6);\n \n if(project.getBudget()!=-1.0) tf7.setValue(String.valueOf(project.getBudget()));\n else tf7.setValue(\"\");\n if(!editable)tf7.setReadOnly(true);\n fl.addComponent(tf7, 7);\n \n if(project.getDescription()!=null)tf8.setValue(project.getDescription());\n else tf8.setValue(\"\");\n if(!editable)tf8.setReadOnly(true);\n fl.addComponent(tf8, 8);\n \n if(project.getInserted_by()!=null)tf9.setValue(project.getInserted_by());\n else tf9.setValue(\"\");\n tf9.setEnabled(false);\n fl.addComponent(tf9, 9);\n \n if(project.getInserted_at()!=null)tf10.setValue(project.getInserted_at().toString());\n else tf10.setValue(\"\");\n tf10.setEnabled(false);\n fl.addComponent(tf10, 10);\n \n if(project.getModified_by()!=null)tf11.setValue(project.getModified_by());\n else tf11.setValue(\"\");\n tf11.setEnabled(false);\n fl.addComponent(tf11, 11);\n \n if(project.getModified_at()!=null)tf12.setValue(project.getModified_at().toString());\n else tf12.setValue(\"\");\n tf12.setEnabled(false);\n fl.addComponent(tf12, 12);\n \n \n\t}",
"public Form(){\n\t\ttypeOfLicenseApp = new TypeOfLicencsApplication();\n\t\toccupationalTrainingList = new ArrayList<OccupationalTraining>();\n\t\taffiadavit = new Affidavit();\n\t\tapplicationForReciprocity = new ApplicationForReciprocity();\n\t\teducationBackground = new EducationBackground();\n\t\toccupationalLicenses = new OccupationalLicenses();\n\t\tofficeUseOnlyInfo = new OfficeUseOnlyInfo();\n\t}",
"private void initialize() {\r\n\t\t\tframe = new JFrame();\r\n\t\t\tframe.setBounds(100, 100, 450, 376);\r\n\t\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\tframe.getContentPane().setLayout(null);\r\n\t\t\t\r\n\t\t\tJLabel lblNewLabel = new JLabel(\"Enter Name\");\r\n\t\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\r\n\t\t\tlblNewLabel.setBounds(42, 78, 126, 27);\r\n\t\t\tframe.getContentPane().add(lblNewLabel);\r\n\t\t\t\r\n\t\t\tJLabel lblEnterPhoneNumber = new JLabel(\"Enter Phone Number\");\r\n\t\t\tlblEnterPhoneNumber.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\r\n\t\t\tlblEnterPhoneNumber.setBounds(41, 116, 174, 27);\r\n\t\t\tframe.getContentPane().add(lblEnterPhoneNumber);\r\n\t\t\t\r\n\t\t\tJLabel lblEnterDateOf = new JLabel(\"Enter Date Of Birth\");\r\n\t\t\tlblEnterDateOf.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\r\n\t\t\tlblEnterDateOf.setBounds(42, 168, 151, 27);\r\n\t\t\tframe.getContentPane().add(lblEnterDateOf);\r\n\t\t\t\r\n\t\t\tJLabel lblEnterEmail = new JLabel(\"Enter Email\");\r\n\t\t\tlblEnterEmail.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\r\n\t\t\tlblEnterEmail.setBounds(42, 214, 151, 27);\r\n\t\t\tframe.getContentPane().add(lblEnterEmail);\r\n\t\t\t\r\n\t\t\ttextField = new JTextField();\r\n\t\t\ttextField.setBounds(225, 81, 132, 25);\r\n\t\t\tframe.getContentPane().add(textField);\r\n\t\t\ttextField.setColumns(10);\r\n\t\t\t\r\n\t\t\ttextField_1 = new JTextField();\r\n\t\t\ttextField_1.setColumns(10);\r\n\t\t\ttextField_1.setBounds(225, 119, 132, 25);\r\n\t\t\tframe.getContentPane().add(textField_1);\r\n\t\t\t\r\n\t\t\ttextField_3 = new JTextField();\r\n\t\t\ttextField_3.setColumns(10);\r\n\t\t\ttextField_3.setBounds(225, 171, 24, 25);\r\n\t\t\tframe.getContentPane().add(textField_3);\r\n\t\t\t\r\n\t\t\ttextField_4 = new JTextField();\r\n\t\t\ttextField_4.setColumns(10);\r\n\t\t\ttextField_4.setBounds(285, 171, 27, 25);\r\n\t\t\tframe.getContentPane().add(textField_4);\r\n\t\t\t\r\n\t\t\ttextField_5 = new JTextField();\r\n\t\t\ttextField_5.setColumns(10);\r\n\t\t\ttextField_5.setBounds(343, 171, 63, 25);\r\n\t\t\tframe.getContentPane().add(textField_5);\r\n\t\t\t\r\n\t\t\ttextField_6 = new JTextField();\r\n\t\t\ttextField_6.setColumns(10);\r\n\t\t\ttextField_6.setBounds(225, 217, 132, 25);\r\n\t\t\tframe.getContentPane().add(textField_6);\r\n\t\t\t\r\n\t\t\tJButton btnNewButton = new JButton(\"Add User\");\r\n\t\t\tbtnNewButton.addActionListener(new ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\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\tString name=textField.getText();\r\n\t\t\t\t\t\tString Phonenumber=textField_1.getText();\r\n\t\t\t\t\t\tString DOB=textField_3.getText()+\"/\"+textField_4.getText()+\"/\"+textField_5.getText();\r\n\t\t\t\t\t\tString Email=textField_6.getText();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tPersonClass demo=new PersonClass(name,Phonenumber,DOB,Email);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tPersonList.add(demo);\r\n\t\t\t\t\t\tPersonClass temp=new PersonClass();\r\n\t\t\t\t\t\ttemp.WriteData(PersonList);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tlblNewLabel_1.setText(\" The User Data has been saved Successfully \");\r\n\t\t\t\t\t\tlblNewLabel_1.setForeground(Color.GREEN);\r\n\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch(Exception ex)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlblNewLabel_1.setText(\"One of the Information is Incorrect. Kindly write again\");\r\n\t\t\t\t\t\tlblNewLabel_1.setForeground(Color.RED);\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfinally\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttextField.setText(\"\");\r\n\t\t\t\t\t\ttextField_1.setText(\"\");\r\n\t\t\t\t\t\ttextField_3.setText(\"\");\r\n\t\t\t\t\t\ttextField_4.setText(\"\");\r\n\t\t\t\t\t\ttextField_5.setText(\"\");\r\n\t\t\t\t\t\ttextField_6.setText(\"\");\r\n\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});\r\n\t\t\tbtnNewButton.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\r\n\t\t\tbtnNewButton.setBounds(104, 290, 114, 23);\r\n\t\t\tframe.getContentPane().add(btnNewButton);\r\n\t\t\t\r\n\t\t lblNewLabel_2 = new JLabel(\"Enter Details Of Person\");\r\n\t\t\tlblNewLabel_2.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\t\tlblNewLabel_2.setBounds(129, 30, 240, 26);\r\n\t\t\tframe.getContentPane().add(lblNewLabel_2);\r\n\t\t\t\r\n\t\t\tJLabel lblNewLabel_3 = new JLabel(\"DD\");\r\n\t\t\tlblNewLabel_3.setBounds(259, 174, 16, 19);\r\n\t\t\tframe.getContentPane().add(lblNewLabel_3);\r\n\t\t\t\r\n\t\t\tJLabel lblNewLabel_4 = new JLabel(\"MM\");\r\n\t\t\tlblNewLabel_4.setBounds(322, 176, 24, 14);\r\n\t\t\tframe.getContentPane().add(lblNewLabel_4);\r\n\t\t\t\r\n\t\t\tJLabel lblNewLabel_5 = new JLabel(\"YY\");\r\n\t\t\tlblNewLabel_5.setBounds(411, 176, 46, 14);\r\n\t\t\tframe.getContentPane().add(lblNewLabel_5);\r\n\t\t}",
"private void initializeData() {\n lblItem.setText(product.getName());\n txtReference.setText(product.getTransaction().getReferenceNumber());\n txtItem.setText(product.getName());\n txtDescription.setText(product.getDescription());\n txtBrand.setText(product.getBrand());\n txtModel.setText(product.getModel());\n txtQuantity.setText(String.valueOf(product.getQuantity()));\n txtUnit.setText(product.getUnit());\n txtProductDate.setDate(product.getProduct_date());\n txtOrigPrice.setText(String.valueOf(product.getOriginalPrice()));\n txtAgent.setText(product.getAgent());\n txtContactPerson.setText(product.getContactPerson());\n try { \n txtSupplier.setText(((Supplier)product.getSuppliers().toArray()[0]).getName());\n } catch(ArrayIndexOutOfBoundsException ex) {\n System.out.println(ex.toString());\n }\n }",
"public DonationWidget fillDonationForm(Supporter sup) {\r\n\t\tString[] donAmounts = new String[] { \"5\", \"10\", \"15\", \"20\", \"25\" };\r\n\t\tString donAmunt = donAmounts[new Random().nextInt(donAmounts.length)];\r\n\t\tnameOnCardField.type(\"name card\");\r\n\t\tcardNumber.type(\"4111111111111111\");\r\n\t\tcvv.type(\"123\");\r\n\t\texpirationMonth.selectByLabel(\"11\");\r\n\t\texpirationYear.selectByLabel(\"2017\");\r\n\t\tfirtName.type(sup.getFirstName());\r\n\t\tlastName.type(sup.getLastName());\r\n\t\temail.type(sup.getEmail());\r\n\t\taddrress.type(sup.getAddressLine1());\r\n\t\tcity.type(sup.getCity());\r\n\t\tselectState.selectByIndex(4);\r\n\t\tzip.type(sup.getZipCode());\r\n\t\treturn this;\r\n\t}",
"void setDataIntoSuppBusObj() {\r\n supplierBusObj.setValue(txtSuppId.getText(),txtSuppName.getText(), txtAbbreName.getText(),\r\n txtContactName.getText(),txtContactPhone.getText());\r\n }",
"public updatedata() {\n initComponents();\n }",
"public void showInputs() {\n\t\tCIVLTable tbl_inputTable = (CIVLTable) getComponentByName(\"tbl_inputTable\");\n\t\tDefaultTableModel inputModel = (DefaultTableModel) tbl_inputTable\n\t\t\t\t.getModel();\n\n\t\tif (inputModel.getRowCount() != 0) {\n\t\t\tinputModel.setRowCount(0);\n\t\t\ttbl_inputTable.clearSelection();\n\t\t}\n\n\t\t// GMCSection gmcs = currConfig.getGmcConfig().getAnonymousSection();\n\t\tArrayList<CIVL_Input> inputList = currConfig.getInputs();\n\t\tfor (int i = 0; i < inputList.size(); i++) {\n\t\t\tCIVL_Input input = inputList.get(i);\n\t\t\tinputModel.addRow(new Object[] { input.getName(), input.getType(),\n\t\t\t\t\tinput.getValue(), input.getInitializer() });\n\t\t}\n\n\t}",
"public AttributeForm() \n {\n initComponents();\n mJerseyNumberUpDown.setModel(new SpinnerNumberModel(0,0,99,1));\n \n m_Parser = new InputParser();\n m_Attributes = new JComboBox[8];\n m_Attributes[0] = m_RSBox;\n m_Attributes[1] = m_RPBox;\n m_Attributes[2] = m_MSBox;\n m_Attributes[3] = m_HPBox;\n m_Attributes[4] = m_PS_BC_PI_KABox;\n m_Attributes[5] = m_PC_REC_QU_KABox;\n m_Attributes[6] = m_ACCBox;\n m_Attributes[7] = m_APBBox;\n\n m_SimAttrs = new JSpinner[4];\n m_SimAttrs[0] = m_Sim1UpDown;\n m_SimAttrs[1] = m_Sim2UpDown;\n m_SimAttrs[2] = m_Sim3UpDown;\n m_SimAttrs[3] = m_Sim4UpDown;\n \n m_DoneInit = true;\n setCurrentState(StateEnum.QB);\n \n }",
"private void limpaCampos() {\n txtNome.setText(\"\");\n txtRG.setText(\"\");\n txtFCpf.setText(\"\");\n txtFNascimento.setText(\"\");\n txtEmail.setText(\"\");\n txtFCelular.setText(\"\");\n txtFTelefone.setText(\"\");\n txtRua.setText(\"\");\n txtComplemento.setText(\"\");\n txtFCep.setText(\"\");\n txtBairro.setText(\"\");\n txtCidade.setText(\"\");\n }",
"public rentForm() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jMenu3 = new javax.swing.JMenu();\n jFrame1 = new javax.swing.JFrame();\n jFrame2 = new javax.swing.JFrame();\n EditDataSupplier = new javax.swing.JPanel();\n jLabel17 = new javax.swing.JLabel();\n jLabel18 = new javax.swing.JLabel();\n Ed_NamaSup = new javax.swing.JTextField();\n jLabel19 = new javax.swing.JLabel();\n jLabel20 = new javax.swing.JLabel();\n Ed_TelpSup = new javax.swing.JTextField();\n Ed_AlamatSup = new javax.swing.JTextField();\n jButton13 = new javax.swing.JButton();\n jButton14 = new javax.swing.JButton();\n InputDataSupplier = new javax.swing.JPanel();\n jLabel14 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n In_NamaSup = new javax.swing.JTextField();\n jLabel16 = new javax.swing.JLabel();\n jLabel21 = new javax.swing.JLabel();\n In_TelpSup = new javax.swing.JTextField();\n In_AlamatSup = new javax.swing.JTextField();\n jButton11 = new javax.swing.JButton();\n jButton12 = new javax.swing.JButton();\n jButton9 = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n jLabel6 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox();\n jLabel3 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jTextField4 = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n jComboBox2 = new javax.swing.JComboBox();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton10 = new javax.swing.JButton();\n jButton5 = new javax.swing.JButton();\n jButton8 = new javax.swing.JButton();\n jPanel2 = new javax.swing.JPanel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jLabel9 = new javax.swing.JLabel();\n jComboBox3 = new javax.swing.JComboBox();\n jLabel10 = new javax.swing.JLabel();\n jTextField5 = new javax.swing.JTextField();\n jLabel11 = new javax.swing.JLabel();\n jTextField6 = new javax.swing.JTextField();\n jLabel12 = new javax.swing.JLabel();\n jComboBox4 = new javax.swing.JComboBox();\n jButton3 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jTabbedPane1 = new javax.swing.JTabbedPane();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jScrollPane2 = new javax.swing.JScrollPane();\n jTable2 = new javax.swing.JTable();\n jButton6 = new javax.swing.JButton();\n jTextField7 = new javax.swing.JTextField();\n jButton7 = new javax.swing.JButton();\n jLabel13 = new javax.swing.JLabel();\n\n jMenu3.setText(\"jMenu3\");\n\n javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane());\n jFrame1.getContentPane().setLayout(jFrame1Layout);\n jFrame1Layout.setHorizontalGroup(\n jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n jFrame1Layout.setVerticalGroup(\n jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n javax.swing.GroupLayout jFrame2Layout = new javax.swing.GroupLayout(jFrame2.getContentPane());\n jFrame2.getContentPane().setLayout(jFrame2Layout);\n jFrame2Layout.setHorizontalGroup(\n jFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n jFrame2Layout.setVerticalGroup(\n jFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setUndecorated(true);\n setPreferredSize(new java.awt.Dimension(1366, 768));\n getContentPane().setLayout(null);\n\n EditDataSupplier.setBackground(new java.awt.Color(250, 205, 138));\n EditDataSupplier.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n jLabel17.setFont(new java.awt.Font(\"Segoe UI Emoji\", 0, 24)); // NOI18N\n jLabel17.setText(\"Edit Data Supplier\");\n\n jLabel18.setText(\"Nama Supplier\");\n\n jLabel19.setText(\"Alamat\");\n\n jLabel20.setText(\"No. Telp\");\n\n jButton13.setText(\"Simpan\");\n jButton13.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton13ActionPerformed(evt);\n }\n });\n\n jButton14.setText(\"Batal\");\n jButton14.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton14ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout EditDataSupplierLayout = new javax.swing.GroupLayout(EditDataSupplier);\n EditDataSupplier.setLayout(EditDataSupplierLayout);\n EditDataSupplierLayout.setHorizontalGroup(\n EditDataSupplierLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(EditDataSupplierLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(EditDataSupplierLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(EditDataSupplierLayout.createSequentialGroup()\n .addComponent(jButton13, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton14, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(Ed_NamaSup, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Ed_TelpSup, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Ed_AlamatSup, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel20, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel19, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel18, javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, EditDataSupplierLayout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(jLabel17)))\n .addGap(20, 20, 20))\n );\n EditDataSupplierLayout.setVerticalGroup(\n EditDataSupplierLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(EditDataSupplierLayout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel18)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(Ed_NamaSup, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel19)\n .addGap(1, 1, 1)\n .addComponent(Ed_AlamatSup, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel20)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(Ed_TelpSup, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(EditDataSupplierLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton13)\n .addComponent(jButton14))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n getContentPane().add(EditDataSupplier);\n EditDataSupplier.setBounds(440, 660, 290, 300);\n\n InputDataSupplier.setBackground(new java.awt.Color(250, 205, 138));\n InputDataSupplier.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n jLabel14.setFont(new java.awt.Font(\"Segoe UI Emoji\", 0, 24)); // NOI18N\n jLabel14.setText(\"Input Data Supplier\");\n\n jLabel15.setText(\"Nama Supplier\");\n\n jLabel16.setText(\"Alamat\");\n\n jLabel21.setText(\"No. Telp\");\n\n jButton11.setText(\"Simpan\");\n jButton11.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton11ActionPerformed(evt);\n }\n });\n\n jButton12.setText(\"Batal\");\n jButton12.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton12ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout InputDataSupplierLayout = new javax.swing.GroupLayout(InputDataSupplier);\n InputDataSupplier.setLayout(InputDataSupplierLayout);\n InputDataSupplierLayout.setHorizontalGroup(\n InputDataSupplierLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(InputDataSupplierLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(InputDataSupplierLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(InputDataSupplierLayout.createSequentialGroup()\n .addComponent(jButton11, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton12, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(In_NamaSup, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(In_TelpSup, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(In_AlamatSup, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel21, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel16, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel15, javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, InputDataSupplierLayout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(jLabel14)))\n .addGap(20, 20, 20))\n );\n InputDataSupplierLayout.setVerticalGroup(\n InputDataSupplierLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(InputDataSupplierLayout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel15)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(In_NamaSup, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel16)\n .addGap(1, 1, 1)\n .addComponent(In_AlamatSup, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel21)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(In_TelpSup, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(InputDataSupplierLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton11)\n .addComponent(jButton12))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n getContentPane().add(InputDataSupplier);\n InputDataSupplier.setBounds(740, 660, 290, 300);\n\n jButton9.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/VIEW/Login-out-icon.png\"))); // NOI18N\n jButton9.setText(\"Logout\");\n jButton9.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton9ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton9);\n jButton9.setBounds(20, 660, 100, 40);\n\n jPanel1.setBackground(new java.awt.Color(250, 205, 138));\n jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n jLabel6.setFont(new java.awt.Font(\"Segoe UI Emoji\", 0, 24)); // NOI18N\n jLabel6.setText(\"Input Data Barang\");\n\n jLabel1.setText(\"Nama Barang\");\n\n jLabel2.setText(\"Kategori\");\n\n jLabel3.setText(\"Stok\");\n\n jLabel4.setText(\"Harga\");\n\n jLabel5.setText(\"Supplier\");\n\n jButton1.setText(\"Simpan\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Batal\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(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.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jTextField1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(jLabel6)))\n .addGap(20, 20, 20))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(11, 11, 11)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addContainerGap(65, Short.MAX_VALUE))\n );\n\n getContentPane().add(jPanel1);\n jPanel1.setBounds(270, 600, 290, 390);\n\n jButton10.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/VIEW/edit_converted.png\"))); // NOI18N\n jButton10.setText(\"Edit\");\n jButton10.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton10ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton10);\n jButton10.setBounds(1070, 590, 123, 52);\n\n jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/VIEW/delete_converted.png\"))); // NOI18N\n jButton5.setText(\"Hapus\");\n jButton5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton5ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton5);\n jButton5.setBounds(1200, 590, 123, 52);\n\n jButton8.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/VIEW/add_converted.png\"))); // NOI18N\n jButton8.setText(\"Tambah\");\n jButton8.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton8ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton8);\n jButton8.setBounds(940, 590, 123, 52);\n\n jPanel2.setBackground(new java.awt.Color(250, 205, 138));\n jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n jLabel7.setFont(new java.awt.Font(\"Segoe UI Emoji\", 0, 24)); // NOI18N\n jLabel7.setText(\"Edit Data Barang\");\n\n jLabel8.setText(\"Nama Barang\");\n\n jLabel9.setText(\"Kategori\");\n\n jLabel10.setText(\"Stok\");\n\n jLabel11.setText(\"Harga\");\n\n jLabel12.setText(\"Supplier\");\n\n jButton3.setText(\"Simpan\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jButton4.setText(\"Batal\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\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)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jTextField2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel12, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel11, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel10, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(jLabel7)))\n .addGap(20, 20, 20))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel9)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel10)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel11)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel12)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBox4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(11, 11, 11)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton3)\n .addComponent(jButton4))\n .addContainerGap(65, Short.MAX_VALUE))\n );\n\n getContentPane().add(jPanel2);\n jPanel2.setBounds(570, 600, 290, 390);\n\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null, null, null},\n {null, null, null, null, null, null},\n {null, null, null, null, null, null},\n {null, null, null, null, null, null}\n },\n new String [] {\n \"ID Barang\", \"Nama Barang\", \"Stok\", \"Harga\", \"Kategori\", \"Supplier\"\n }\n ));\n jTable1.getTableHeader().setReorderingAllowed(false);\n jTable1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jTable1MouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(jTable1);\n\n jTabbedPane1.addTab(\"Data Barang\", jScrollPane1);\n\n jTable2.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 \"ID Supplier\", \"Nama Supplier\", \"Alamat\", \"No. Telpon\"\n }\n ));\n jTable2.getTableHeader().setReorderingAllowed(false);\n jTable2.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jTable2MouseClicked(evt);\n }\n });\n jScrollPane2.setViewportView(jTable2);\n\n jTabbedPane1.addTab(\"Data Supplier\", jScrollPane2);\n\n getContentPane().add(jTabbedPane1);\n jTabbedPane1.setBounds(270, 130, 1060, 450);\n\n jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/VIEW/Computer-Hardware-Shutdown-icon.png\"))); // NOI18N\n jButton6.setText(\"Keluar\");\n jButton6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton6ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton6);\n jButton6.setBounds(20, 710, 100, 40);\n\n jTextField7.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n jTextField7KeyTyped(evt);\n }\n });\n getContentPane().add(jTextField7);\n jTextField7.setBounds(1070, 100, 160, 40);\n\n jButton7.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/VIEW/Search-icon.png\"))); // NOI18N\n jButton7.setText(\"Cari\");\n jButton7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton7ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton7);\n jButton7.setBounds(1230, 100, 90, 40);\n\n jLabel13.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/VIEW/bckgrnd2.png\"))); // NOI18N\n getContentPane().add(jLabel13);\n jLabel13.setBounds(0, 0, 1340, 760);\n\n pack();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public void loadTextBoxs(){\n txtIndice.setText(String.valueOf(indice));\n txtDni.setText(String.valueOf(dni[indice]));\n txtNombre.setText(nombre[indice]);\n txtApellido.setText(apellido[indice]);\n txtDireccion.setText(direccion[indice]);\n txtTelefono.setText(telefono[indice]);\n txtFechaNacimiento.setText(fNacimiento[indice]);\n }",
"private void fillFields() {\n\t\tInteger owner = this.contractor.getOwner();\n\n\t\tnameField.setText(getTrimmedValue(this.contractor.getName()));\n\t\tlocationField.setText(getTrimmedValue(this.contractor.getLocation()));\n\t\townerField.setText(owner == null ? \"\" : owner.toString());\n\t\tsizeField.setText(contractor.getSize().toString());\n\t\trateField.setText(Contractor.RATE_FORMAT.format(this.contractor\n\t\t\t\t.getRate()));\n\t\tspecialtiesList.setListData(this.contractor.getSpecialties());\n\t}",
"Inputs getInputs();",
"public frmAddIncidencias() {\n initComponents();\n }",
"public PanelInput() {\n initComponents();\n judul_1.setText(\"\");\n judul_2.setText(\"\");\n clear();\n }",
"public void LimpiarCampos() {\n\n txtIdAsignarPer.setText(\"\");\n txtNombreusu.setText(\"\");\n pswConfCont.setText(\"\");\n combPerf.setSelectedItem(\"\");\n pswContra.setText(\"\");\n txtDocumento.setText(\"\");\n }",
"public FormPencarianBuku() {\n initComponents();\n kosong();\n datatable();\n textfieldNamaFileBuku.setVisible(false);\n textfieldKodeBuku.setVisible(false);\n bukuRandom();\n }",
"public PoliceEdit() {\n initComponents();\n showDate();\n showTime();\n PoliceEdit();\n \n\n }",
"INPUT createINPUT();"
] | [
"0.6547162",
"0.6294906",
"0.628373",
"0.6231611",
"0.6228151",
"0.6178912",
"0.61745244",
"0.61055845",
"0.6098652",
"0.6093025",
"0.60848635",
"0.6063669",
"0.6061898",
"0.6017166",
"0.60071063",
"0.59949255",
"0.5949339",
"0.59026515",
"0.58909285",
"0.5883762",
"0.58814025",
"0.5879808",
"0.5877059",
"0.58696175",
"0.5867696",
"0.5853913",
"0.5845333",
"0.58424747",
"0.5821825",
"0.58196366",
"0.58073145",
"0.57912904",
"0.57775766",
"0.5776754",
"0.5752335",
"0.5750882",
"0.57328045",
"0.5731853",
"0.57291555",
"0.5704711",
"0.57009923",
"0.56982",
"0.56954944",
"0.5687295",
"0.5681216",
"0.56811595",
"0.56772476",
"0.5667721",
"0.5667404",
"0.56659025",
"0.56590676",
"0.56564236",
"0.5651759",
"0.56388664",
"0.5635948",
"0.5635177",
"0.5622808",
"0.56081164",
"0.56040674",
"0.5590143",
"0.55895025",
"0.55855966",
"0.5580484",
"0.5579878",
"0.5579423",
"0.55661607",
"0.55633307",
"0.55626774",
"0.5554545",
"0.555118",
"0.55505395",
"0.5548776",
"0.5546584",
"0.5546411",
"0.55441153",
"0.55383873",
"0.5531968",
"0.55305034",
"0.55224895",
"0.5521619",
"0.5520239",
"0.5517752",
"0.5514728",
"0.5509909",
"0.5506463",
"0.55024886",
"0.5499513",
"0.5490366",
"0.54895145",
"0.54831326",
"0.5482526",
"0.5479243",
"0.5476729",
"0.54714245",
"0.54555535",
"0.5453352",
"0.54468393",
"0.54440504",
"0.5441842",
"0.54394406",
"0.5437897"
] | 0.0 | -1 |
Function that handle the logic for editing the coordinate of a location | private View.OnClickListener HandleEdit() {
return v -> {
//Change the application state to edit mode
mMainActivityState.ChangeActivityMode(Mode.EDIT);
//Close the current dialog
mCurrentDialog.dismiss();
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void editCell(Coord coord, String string);",
"public void setLocation(Coordinate coordinate);",
"public void updateLocation();",
"void setLocation(int x, int y);",
"public void editCoordinatesInPerson(int x, int y, int id) {\n Person role = dataModel.getPerson(id);\n Coordinates coordinates = dataModel.createCoords(x, y);\n dataModel.setCoordinatesToPerson(coordinates, role);\n }",
"public abstract void updateLocations();",
"public void setLocation(float x, float y);",
"public void editCoordinatesInCommit(int x, int y, int id) {\n Commit commit = dataModel.getCommit(id);\n Coordinates coordinates = dataModel.createCoords(x, y);\n dataModel.setCoordinatesToCommit(coordinates, commit);\n }",
"void update(Location location);",
"@Override\r\n\tpublic boolean editPosition(Position post) throws Exception {\n\t\treturn false;\r\n\t}",
"Coordinate getCoordinate() throws ChangeActionException, HaltException {\n cliModel.showYourWindow();\n printStream.println(\"\\n\\nChoose the row\");\n int row = takeInput(0, 3);\n printStream.println(\"\\n\\nChoose the column\");\n int col = takeInput(0, 4);\n printStream.println(\"\\n\\nYou chose the position. Press: \\n [1] to accept [2] to change [3] to do another action\");\n int choice = takeInput(1, 3);\n switch(choice) {\n case 1 : return new Coordinate(row,col);\n case 2 : return getCoordinate();\n default : break;\n }\n throw new ChangeActionException();\n }",
"public void setLocation(Point2D p);",
"void actionEdit(int position);",
"void changeLocation(@NonNull String location);",
"private void setLocation(Location newLocation) {\n\t\tif (location != null) {\n\t\t\tfield.clear(location);\n\t\t}\n\t\tlocation = newLocation;\n\t\tfield.place(this, newLocation);\n\t}",
"public void updateXLoc();",
"public void run() {\n editLocationRequest(row);\n }",
"@Override\n public void setLocation(geo_location p) {\n this.location.setX(p.x());\n this.location.setY(p.y());\n this.location.setZ(p.z());\n }",
"private void updateLocation(){\r\n\t\t//UPDATE location SET longitude = double, latitude = double WHERE userName = userName\r\n\t\tString sqlCmd = \"UPDATE location SET longitude = \" + commandList.get(2) + \", latitude = \"\r\n\t\t\t\t+ commandList.get(3) + \" WHERE userName = '\" + commandList.get(1) + \"';\";\r\n\t\tSystem.out.println(sqlCmd);\r\n\r\n\t\ttry {//start SQL statement\r\n\t\t\tint changed = stmt.executeUpdate(sqlCmd);\r\n\t\t\tif(changed == 0){//if no updates were made (changed = 0) \r\n\t\t\t\terror = true;//error\r\n\t\t\t\tout.println(\"No user found\");//error message\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\terror = true;\r\n\t\t\tout.println(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tif(error == false)\r\n\t\t\tout.println(\"true\");\r\n\t}",
"public void setLocation(Vector location);",
"public void updateCoordinates(KeyEvent event){\n\t\tif (event.getCode() == KeyCode.ENTER){\n\t\t\ttry{\n\t\t\t Double x = Double.parseDouble(originX.getText());\n\t\t\t\tDouble y = Double.parseDouble(originY.getText());\n\t\t\t\tcontroller.ACTIONS.push(new MoveUMLNode(note, x, y));\n\t\t event.consume();\n\t\t\t} catch (Exception e) {\n\t\t\t\tevent.consume();\n\t\t\t}\n\t\t}\n\t}",
"public native bool kbSetTownLocation(vector location);",
"public void updateYLoc();",
"public void setLocation(Point newLocation) {\r\n this.p = newLocation;\r\n }",
"private void handleLatLonWidgetChange() {\n try {\n double lat = latLonWidget.getLat();\n double lon = latLonWidget.getLon();\n double[] xyz = earthToBox(makeEarthLocation(lat, lon, 0));\n setProbePosition(xyz[0], xyz[1]);\n\n } catch (Exception exc) {\n logException(\"Error setting lat/lon\", exc);\n }\n\n }",
"public void setPosition(Point newPosition);",
"private void updateLocationUI() {\n mCurrentLocationStr = mCurrentPlace.getAddress().toString();\n mCurrentLatLng = mCurrentPlace.getLatLng();\n if(mCurrentLocationStr.isEmpty())\n mCurrentLocationStr = String.format(\"(%.2f, %.2f)\",mCurrentLatLng.latitude, mCurrentLatLng.longitude);\n\n mAddLocation.setText(mCurrentLocationStr);\n mAddLocation.setTextColor(mSecondaryTextColor);\n mClearLocation.setVisibility(View.VISIBLE);\n }",
"public void onLocationChanged(Location newlocation) {\n\t\t\t\t\n\t\t\t\tif (newlocation != null) \n\t\t\t\t{\n\t\t\t\t\tlocationManager.removeUpdates(this);\n\t\t\t\t\tpoint=getGeoPoint(newlocation);\n\t\t\t\t\t//String altitiude = \"Altitiude: \" + newlocation.getAltitude();\n\t\t\t\t\t//String accuracy = \"Accuracy: \" + newlocation.getAccuracy();\n\t\t\t\t\t//String time = \"Time: \" + newlocation.getTime();\n\t\t\t\t\tmapController.animateTo(point);\n\t\t\t\t\t\n\t\t\t\t\tlatitudes= String.valueOf(newlocation.getLatitude() * 1E6);\n\t\t\t\t\tlongitudes= String.valueOf (newlocation.getLongitude() * 1E6);\n\t\t\t\t\tnameValuePairs.add(new BasicNameValuePair(\"latd\",latitudes));\n\t\t\t\t\tnameValuePairs.add(new BasicNameValuePair(\"lotd\",longitudes));\n\t\t\t\t\tnameValuePairs.add(new BasicNameValuePair(\"id\",LoginId));\n\t\t\t\t\tArrayList<NameValuePair> result=db.getServerData(nameValuePairs,\"updatecoordinates.php\");\n\t\t\t\t\tnameValuePairs.clear();\n\t\t\t\t\tfor(int i=0;i<result.size();i++)\n\t\t\t\t\t{\n\t\t\t\t\t\ts=result.get(i).getName();\n\t\t\t\t\t\tif(s.equals(\"Error\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tToast tt=Toast.makeText(MapViewActivity.this, \"Co-Ords Updated\", 3000);\n\t\t\t\t\t\t\ttt.setGravity(Gravity.CENTER, 0, 15);\n\t\t\t\t\t\t\ttt.show();\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\tToast tt=Toast.makeText(MapViewActivity.this, \"Co-Ords Updated Error\", 3000);\n\t\t\t\t\t\t\ttt.setGravity(Gravity.CENTER, 0, 15);\n\t\t\t\t\t\t\ttt.show();break;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tresult.clear();\n\t\t\t\t\t\n\t\t\t\t\tmapView.invalidate();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"@Override\r\n public void EditMap() throws Exception {\r\n printInvalidCommandMessage();\r\n }",
"private void editPoint() {\n Snackbar.make(coordinatorLayout, R.string.feature_not_available, Snackbar.LENGTH_SHORT).show();\n }",
"@Override\n public void onLocationChanged(MapWidget v, Location location) {\n }",
"public abstract Piece setLocation(int row, int column);",
"public void changed(LocationEvent arg0) {\n \t\t\t\t\t\t\n \t\t\t\t\t}",
"private void locationActionPerformed(\n\t\t\t\tfinal java.awt.event.ActionEvent evt) {\n\t\t}",
"private void setLocation() {\n switch (getKey()) {\n case UP:\n this.y_location = -136.8 - 6;\n this.y_tile = -1;\n this.positive = false;\n break;\n case DOWN:\n this.y_location = 136.8 + 6;\n this.y_tile = 1;\n break;\n case LEFT:\n this.x_location = -140.6 - 6;\n this.x_tile = -1;\n this.positive = false;\n break;\n case RIGHT:\n this.x_location = 140.6 + 6;\n this.x_tile = 1;\n break;\n default:\n break;\n }\n }",
"public void onLocationChanged(Location argLocation) {\n\t GeoPoint myGeoPoint = new GeoPoint(\r\n\t (int)(argLocation.getLatitude()*1000000),\r\n\t (int)(argLocation.getLongitude()*1000000));\r\n\t /*\r\n\t * it will show a message on \r\n\t * location change\r\n\t Toast.makeText(getBaseContext(),\r\n\t \"New location latitude [\" +argLocation.getLatitude() +\r\n\t \"] longitude [\" + argLocation.getLongitude()+\"]\",\r\n\t Toast.LENGTH_SHORT).show();\r\n\t */\r\n\r\n\t mapController.animateTo(myGeoPoint);\r\n\r\n\t }",
"public void setLocation(String location);",
"public void setLoc(int x, int y) {\n locX = x;\n locY = y;\n }",
"public void setObjectAtLocation(Point p, Object o);",
"public abstract boolean setLocation(World world, int coords[]);",
"void onNewCoords(Coords coords);",
"private void edit() {\n\n\t}",
"public void editCoordinatesInArtifact(int x, int y, int id) {\n Artifact artifact = dataModel.getArtifact(id);\n Coordinates coordinates = dataModel.createCoords(x, y);\n dataModel.setCoordinatesToArtifact(coordinates, artifact);\n }",
"public PointEditForm(RouteEditList backDisplay) {\n super(LangHolder.getString(Lang.editpoint));\n this.backDisplay=backDisplay;\n \n backCommand=new Command(LangHolder.getString(Lang.back), Command.BACK, 10);\n saveCommand=new Command(LangHolder.getString(Lang.save), Command.ITEM, 1);\n addCommand(backCommand);\n addCommand(saveCommand);\n setCommandListener(this);\n \n textName=new TextField(LangHolder.getString(Lang.label),null,30,TextField.ANY);\n append(textName);\n \n \n StringItem si = new StringItem(LangHolder.getString(Lang.example)+\"\\n\",MapUtil.emptyString);\n if (RMSOption.coordType==RMSOption.COORDMINSECTYPE) si.setText(\"60 23 41\\n(GG MM SS.S)\");\n else if (RMSOption.coordType==RMSOption.COORDMINMMMTYPE) si.setText(\"60 23.683\\n(GG MM.MMM)\");\n else if (RMSOption.coordType==RMSOption.COORDGGGGGGTYPE) si.setText(\"60.39471\\n(GG.GGGGG)\");\n append(si);\n textLat=new TextField(LangHolder.getString(Lang.latitude),null,12,TextField.NON_PREDICTIVE);\n append(textLat);\n textLon=new TextField(LangHolder.getString(Lang.longitude),null,12,TextField.NON_PREDICTIVE);\n append(textLon);\n //!NO-NUMERIC\n textAlt=new TextField(LangHolder.getString(Lang.altitude),null,6,TextField.ANY|TextField.NON_PREDICTIVE);\n append(textAlt);\n \n }",
"@Override\n \tpublic void onLocationChanged(Location location) {\n \t\tthis.location = location;\n \t}",
"boolean modifyCave(Cave location);",
"public void updateLocation(Location location)\n\t{\n\t\t// Unbind all the location popup's labels\n\t\tthis.lblName.textProperty().unbind();\n\t\tthis.lblID.textProperty().unbind();\n\t\tthis.lblLatitude.textProperty().unbind();\n\t\tthis.lblLongitude.textProperty().unbind();\n\t\tthis.lblElevation.textProperty().unbind();\n\n\t\t// Re-bind all the location popup's fields\n\t\tthis.lblName.textProperty().bind(location.nameProperty());\n\t\tthis.lblID.textProperty().bind(location.idProperty());\n\t\tthis.lblLatitude.textProperty().bind(location.getLatProperty().asString());\n\t\tthis.lblLongitude.textProperty().bind(location.getLngProperty().asString());\n\t\tthis.lblElevation.textProperty().bind(location.getElevationProperty().asString());\n\t}",
"@Override\n\tpublic void onLocationChanged(Location arg0) {\n\n\t}",
"@Override\n\tpublic void onLocationChanged(Location arg0) {\n\n\t}",
"public void editCoordinatesInConfiguration(int x, int y, int id) {\n Configuration configuration = dataModel.getConfiguration(id);\n Coordinates coordinates = dataModel.createCoords(x, y);\n dataModel.setCoordinatesToConfiguration(coordinates, configuration);\n }",
"public void editCoordinatesInCommitedConfiguration(int x, int y, int id) {\n CommitedConfiguration commitedConfiguration = dataModel.getCommitedConfiguration(id);\n Coordinates coordinates = dataModel.createCoords(x, y);\n dataModel.setCoordinatesToCommitedConfiguration(coordinates, commitedConfiguration);\n }",
"public void editOperation() {\n\t\t\r\n\t}",
"public abstract void updateLocation(Location location, String newLocationName, int newLocationCapacity);",
"void setPosition(Unit unit, MapLocation position);",
"protected void setLocation(Location newLocation)\n {\n if(location != null) {\n field.clear(location);\n }\n location = newLocation;\n field.place(this, newLocation);\n }",
"public LocationEntity updateLocation(LocationDetail locationDetail) throws LocationException;",
"@Override\n public void onLocationChange(Location loc) {\n user.setRelativePosition(loc.getX(), loc.getY());\n map.addStep(new PointF(loc.getX(), loc.getY()));\n //messageHandler.sendEmptyMessage(MESSAGE_REFRESH);\n }",
"@Override\n public void propertyChange(PropertyChangeEvent e) {\n this.updateCoords();\n }",
"public void updatePosition(Coordinate c) {\n\t\tpointMoveTo.setCoordinate(c);\n\t\tPedSimCity.agents.setGeometryLocation(agentLocation, pointMoveTo);\n\t}",
"@Override\n public void setLocation(Point location) {\n pos = location;\n try {\n if (TerraGen.window != null && TerraGen.window.getClient() != null)\n TerraGen.window.getClient().pushGameChange(TerraGen.window.game.getMap().getTokens().indexOf(this), NetworkType.TOKEN, this);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void locationClicked(int row, int col, int tool)\n {\n //2. Assign the values associated with the parameters to the grid\n\t grid[row][col] = tool;\n }",
"Label setLocation();",
"@Override\r\n\tpublic void onLocationChanged(Location location) {\n\t if(location!=null){\r\n\t //Toast.makeText(mContext,\"Location provider = \"+location.getProvider(), Toast.LENGTH_SHORT).show();\r\n if (LocationManager.GPS_PROVIDER.equals(location.getProvider())) {\r\n double [] latlng =Common.adjustLatLng(location.getLatitude(), location.getLongitude());\r\n location.setLatitude(latlng[0]);\r\n location.setLongitude(latlng[1]);\r\n Common.saveLocation(location);\r\n super.onLocationChanged(location);\r\n }else if(\"lbs\".equals(location.getProvider())){\r\n Common.saveLocation(location);\r\n super.onLocationChanged(location);\r\n }\r\n\t }\r\n\t}",
"@Override\n\t public void onLocationChanged(Location location) \n\t {\n\t dialog.show();\n\t latitudeValue = location.getLatitude();\n\t longitudeValue =location.getLongitude();\n\t if (latitudeValue != 0 && longitudeValue != 0){\n\t \n\t latitude.setText(\"Latitude is :\" + latitudeValue);\n\t longitude.setText(\"Longitude is :\" +longitudeValue);\n\t dialog.dismiss();\n\t }\n\t }",
"public void updateLocation()\r\n {\r\n\t\timg.setUserCoordinator(latitude, longitude);\r\n\t\timg.invalidate();\r\n\t}",
"public void EditMap(int new_x,int new_y,int x,int y,String name1,String name2) {\n\t\tif(name2==null) {\n\t\t\tname2 = \" \";\n\t\t}\n\t\tmap[x][y] = name2;\n\t\tmap[new_x][new_y] = name1;\n\t\t\n\t\t\n\t}",
"@Override\n\t\tpublic void addressEdited() {\n\t\t\tokCallback();\n\t\t}",
"public void setMoveTo(Coordinate coordinate);",
"public void setLocation(int someX, int someY) {\r\n\t\tx = someX;\r\n\t\ty = someY;\r\n\t}",
"public void setLocation(int X, int Y){\n \tlocation = new Point(X,Y);\n }",
"public final void setLocation(Coord location) {\n this.location = location;\n }",
"@Override\n\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\n\t\t}",
"@Override\n public void onClick(View view) {\n if (markerPlaced) {\n //Firestore handler method that adds geopoint as a field in database\n setPickupLocation(bookId, lat, lon);\n Toast toast = Toast.makeText(SetLocationActivity.this,\n \"Pickup location has been updated\", Toast.LENGTH_SHORT);\n toast.show();\n } else {\n Toast toast = Toast.makeText(SetLocationActivity.this,\n \"Place a marker first\", Toast.LENGTH_SHORT);\n toast.show();\n }\n }",
"public abstract void moveShape(double lon, double lat);",
"private void normalizeLocation(Point location) {\r\n location.x = location.x / Environment.standardCellLength * Environment.standardCellLength;\r\n location.y = location.y / Environment.standardCellLength * Environment.standardCellLength;\r\n }",
"@Override\n \t\t\tpublic void onLocationChanged(Location loc) {\n \t \n \t\t\t}",
"public void setPosition(Coordinate coord) {\n this.coordinate = coord;\n }",
"private void updateGeo(Double latitude, Double longitude) {\n latitudeValue = latitude;\n longitudeValue = longitude;\n }",
"public void setLocation(int x,int y)\n\t{\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t}",
"@Override\n\tpublic void updateLocation(String roomLocation, String sideLocation) {\n\t\tthis.room = roomLocation;\n\t\tthis.side = sideLocation;\n\t}",
"public void setLocation( Point p ) {\r\n this.x = p.x;\r\n this.y = p.y;\r\n }",
"@Override\n @Transactional\n public void updateLocation(long driverId, double longitude, double latitude) throws EntityNotFoundException {\n DriverDO driverDO = findDriverChecked(driverId);\n driverDO.setCoordinate(new GeoCoordinate(latitude, longitude));\n }",
"public abstract void edit();",
"@Override\n public void onLocationChanged(Location location) {\n //Log.i(TAG, \"New Location: \" + location.getLatitude() + \" \" + location.getLongitude());\n if (isDrawing) {\n //We are drawing so add a point and move the camera accordingly\n currentDrawing.addPoint(new LatLng(location.getLatitude(), location.getLongitude()), currentColor);\n LatLng userLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(userLocation, 20));\n }\n }",
"protected void updateLocationUI() {\n if (mCurrentLocation != null) {\n //TrackDataCSVHelper myCSV2 = new TrackDataCSVHelper();\n //mDistanceFromWaypointText.setText(String.valueOf(myCSV2.getLon(track, this))); //<-- used this to test getting proper lat/lon\n //mDistanceFromWaypointText.setText(String.format(\"%s: %f\", \"Dist from WP\", mDistanceFromWaypoint));\n //mZoneStatusText.setText(\"IN THE ZONE? \" + mIsInZone);\n //mNumberUpdates.setText(String.valueOf(mNum));\n }\n }",
"private void setWorldCoordinatesFromFields() {\n if (trackerPanel == null) return;\n OffsetOriginStep step = (OffsetOriginStep) getStep(trackerPanel.getFrameNumber());\n boolean different = step.worldX != xField.getValue() || step.worldY != yField.getValue();\n if (different) {\n XMLControl trackControl = new XMLControlElement(this);\n XMLControl coordsControl = new XMLControlElement(trackerPanel.getCoords());\n step.setWorldXY(xField.getValue(), yField.getValue());\n step.getPosition().showCoordinates(trackerPanel);\n Undo.postTrackAndCoordsEdit(this, trackControl, coordsControl);\n }\n }",
"public void setLocation(double x, double y) {\n currentLocation.x = (int) x;\n currentLocation.y = (int) y;\n refreshLocation();\n }",
"@Override\n public void onMapLongClick(LatLng point){\n location = new cLocation(point, this);\n\n //Open a dialog for the user to allow the user to set the name for the saved location\n DialogFragment dialog = new AddLocationDialog();\n dialog.show(getFragmentManager(), getText(R.string.map_ask_add).toString());\n }",
"void setPosition(Point point);",
"public Coordinate getLocation();",
"public void setLocation(Point loc){\n\t\tthis.location = loc;\n\t}",
"protected void update(){\n\t\t_offx = _x.valueToPosition(0);\n\t\t_offy = _y.valueToPosition(0);\n\t}",
"public void updateGeominas(Geominas entity) throws Exception;",
"private boolean setLocationInformation() {\n try {\n this.mPostModel.setLocationPost(mAutoCompleteTextView.getText().toString());\n\n if (StringEmptyUtil.isEmptyString(this.mPostModel.getLocationPost())) {\n Toast.makeText(getApplicationContext(), \"Please Select Location\", Toast.LENGTH_LONG).show();\n return false;\n }\n\n this.drop_location.setVisibility(View.VISIBLE);\n this.location_view.setVisibility(View.VISIBLE);\n this.current_location.setVisibility(View.VISIBLE);\n this.current_location.setText(this.mPostModel.getLocationPost());\n return true;\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n Toast.makeText(getApplicationContext(), \"Please Select Location\", Toast.LENGTH_LONG).show();\n\n return false;\n }",
"@Override\n\tpublic void onLocationChanged(Location loc)\n\t{\n\t}",
"@Override\n public void onLocationChanged(Location location) {\n updateLocation(location);\n }",
"public void setRobotLocation(Point p);",
"public abstract void setPosition(Point2D position);",
"private void adjustObserverLocationByClick(int dir, double offset) {\n\t\tHBox n0 = (HBox) uicontrols.getChildren().get(0);\n\t\tHBox n1 = (HBox) uicontrols.getChildren().get(1);\n\t\tTextField t0 = (TextField) n0.getChildren().get(1); // Lat\n\t\tTextField t1 = (TextField) n1.getChildren().get(1); // Long\n\t\tdouble latitude = 0.0;\n\t\tdouble longitude = 0.0;\n\t\ttry {\n\t\t\tlatitude = Double.parseDouble(t0.getText());\n\t\t\tlongitude = Double.parseDouble(t1.getText());\n\t\t} catch(NumberFormatException e) {\n\t\t}\n\t\tif (dir == 1) { // NW\n\t\t\tlatitude += offset;\n\t\t\tlongitude -= (offset * 4);\n\t\t\tif (latitude > 89.99999) {\n\t\t\t\tlatitude = 89.99999;\n\t\t\t}\n\t\t\tif (longitude < -180.0) {\n\t\t\t\tlongitude += 180.0;\n\t\t\t\tlongitude = 180.0 + longitude;\n\t\t\t}\n\t\t} else if (dir == 2) { // NE\n\t\t\tlatitude += offset;\n\t\t\tlongitude += (offset * 4);\n\t\t\tif (latitude > 89.99999) {\n\t\t\t\tlatitude = 89.99999;\n\t\t\t}\n\t\t\tif (longitude > 180.0) {\n\t\t\t\tlongitude -= 180.0;\n\t\t\t\tlongitude = -180.0 + longitude;\n\t\t\t}\n\t\t} else if (dir == 3) { // SW\n\t\t\tlatitude -= offset;\n\t\t\tlongitude -= (offset * 4);\n\t\t\tif (latitude < -89.99999) {\n\t\t\t\tlatitude = -89.99999;\n\t\t\t}\n\t\t\tif (longitude < -180.0) {\n\t\t\t\tlongitude += 180.0;\n\t\t\t\tlongitude = 180.0 + longitude;\n\t\t\t}\n\t\t} else if (dir == 4) { // SE\n\t\t\tlatitude -= offset;\n\t\t\tlongitude += (offset * 4);\n\t\t\tif (latitude < -89.99999) {\n\t\t\t\tlatitude = -89.99999;\n\t\t\t}\n\t\t\tif (longitude > 180.0) {\n\t\t\t\tlongitude -= 180.0;\n\t\t\t\tlongitude = -180.0 + longitude;\n\t\t\t}\n\t\t}\n\t\tt0.setText(\"\" + latitude);\n\t\tt1.setText(\"\" + longitude);\n\t}",
"@Override\n public void setLocation(double x, double y, double z) throws InvalidDataException {\n myMovable.setLocation(x, y, z);\n }"
] | [
"0.7009411",
"0.6944019",
"0.68663275",
"0.66952336",
"0.66032004",
"0.6365582",
"0.6303203",
"0.62542593",
"0.6245598",
"0.6224082",
"0.6146594",
"0.6124578",
"0.6101941",
"0.60756373",
"0.6064757",
"0.6036192",
"0.6035079",
"0.6022534",
"0.6011327",
"0.6005074",
"0.5980492",
"0.59760815",
"0.5971498",
"0.5957628",
"0.5951547",
"0.5922016",
"0.59118325",
"0.5870235",
"0.58635557",
"0.5853939",
"0.5844837",
"0.58444494",
"0.5843058",
"0.583153",
"0.58176315",
"0.5815081",
"0.58148664",
"0.58144975",
"0.58110934",
"0.5803026",
"0.5799673",
"0.5798467",
"0.5773279",
"0.5769764",
"0.5753587",
"0.57530123",
"0.5749222",
"0.57368445",
"0.57368445",
"0.5733929",
"0.57278365",
"0.5726883",
"0.57238597",
"0.57213",
"0.5716766",
"0.57137305",
"0.57119405",
"0.5702323",
"0.569952",
"0.5695698",
"0.569561",
"0.5691786",
"0.5687108",
"0.56865835",
"0.568321",
"0.5675844",
"0.56743145",
"0.56710726",
"0.5666731",
"0.56621283",
"0.56598353",
"0.5659517",
"0.5659517",
"0.5653011",
"0.5645649",
"0.5641427",
"0.5639656",
"0.5639069",
"0.5637554",
"0.56371415",
"0.562905",
"0.5628507",
"0.56263846",
"0.56226444",
"0.56212485",
"0.5613907",
"0.5613645",
"0.56128013",
"0.5612385",
"0.56088066",
"0.56085706",
"0.5602194",
"0.55990815",
"0.55988395",
"0.55947727",
"0.55920404",
"0.55912685",
"0.5583062",
"0.55777586",
"0.55733943",
"0.55728793"
] | 0.0 | -1 |
Function that handles the confirm button click inside the form | @Override
public View.OnClickListener HandleConfirm() {
return v -> {
//If the form verification succeeded, we process the form
if (FormVerification()) {
//Apply the form changes to mLocation
ApplyChangeToLocation();
//Update the selected location inside the database
mLocationLog.UpdateLocation(mLocation);
//Refresh the activity state to show the changes
mMainActivityState.RefreshState();
//Close the dialog
mCurrentDialog.dismiss();
}
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void btnConfirmActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void handleConfirmEvent() {\n this.confirm = new Button(\"Add Food\");\n confirm.setOnAction(e2 -> {\n boolean valid = checkInputValidity();\n // if the inputs failed the validation test\n // return without calling refresh method to add a new food data\n if (valid == false)\n return;\n else\n addNewFoodItemRefresh(); // call the method to add a food item\n });\n\n }",
"void confirm();",
"public void handleYesConfirmButtonAction(ActionEvent event) {\n if (updateItemPane.isVisible()){\n deleteItem();\n this.clearUpdateItemFields();\n }\n else if(updateCopyPane.isVisible()){\n deleteCopy();\n this.clearUpdateCopyFields();\n }\n maskPane.setVisible(false);\n confirmPane.setVisible(false);\n }",
"public void confirmFAB_onClick(View view){\n formValidator.doVisualValidation();\n if(!formValidator.isValid()){\n new AndroidUtil(this).showToast(R.string.toast_invalidFields, Toast.LENGTH_LONG);\n return;\n }\n\n\n // *Building the new Answer object:\n String[] answerArray;\n if(eMultipleAnswerType == null){\n answerArray = new String[]{ textAnswerIn.getText().toString() };\n } else{\n answerArray = Answer.convertIntArray_AlphabetArray(compoundButtonController.getCheckedIndexes());\n }\n answer = new Answer(answerArray);\n\n\n // *Sending the OK result intent:\n Intent resultIntent = new Intent()\n .putExtra(QUESTION_INDEX_INTENT_KEY, index)\n .putExtra(ANSWER_INTENT_KEY, answer.toString());\n if (getParent() == null) {\n setResult(Activity.RESULT_OK, resultIntent);\n } else {\n getParent().setResult(Activity.RESULT_OK, resultIntent);\n }\n finish();\n }",
"public abstract boolean confirm();",
"@Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showConfirmDialog(OverCounterForm.this, \"Check this\");\n }",
"public void confirmStudentUpdate(){\n\n String title =\"Confirm student information update\";\n String HeaderText = \"Confirm inserted data\";\n String ContentText = \"Are you sure you want to update this student's information?\";\n\n AlertHandler ah = new AlertHandler();\n\n if (ah.getConfirmation(title, HeaderText, ContentText) == ButtonType.OK) {\n System.out.println(\"Ok pressed\");\n updateStudent();\n } else {\n System.out.println(\"Cancel pressed\");\n }\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n jlQuestion.setText(S_QUESTION_CONFIRMATION);\n jbNewOrderButton.setVisible(false);\n jbConfirm.setVisible(true);\n jbCancel.setVisible(true);\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n Object source = e.getSource();\n if (source == confirmButton) {\n var newResult = new Result(result, name.getText());\n try {\n newResult.saveResult();\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n }\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showConfirmDialog(OverCounterForm.this, \"Check this out\");\n }",
"public void handleUpdateCopyDeleteButtonAction(ActionEvent event) {\n confirmHeader.setText(\"Confirm delete action\");\n String text = \"are you sure you want to update this copy?\";\n confirmText.setText(text);\n confirmPane.setVisible(true);\n maskPane.setVisible(true);\n this.handleOnShowAnimation(confirmMessageHolderPane);\n }",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tJOptionPane.showConfirmDialog(null, \"BOTAO CLICADO\", \"VALOR\", JOptionPane.PLAIN_MESSAGE);\n\n\t\t}",
"public void handleUpdateCopyConfirmButtonAction(ActionEvent event) {\n try {\n String copyID = this.tempCopyID;\n String location = updateCopyLocation.getText();\n updateMgr.updateCopy(copyID, location);\n this.displaySuccess(\"Updated\", \"Copy information has successfully been updated\");\n this.clearUpdateCopyFields();\n } catch (SQLException | ClassNotFoundException ex) {\n this.displayWarning(\"Error\", ex.getMessage());\n } catch (Exception ex) {\n this.displayWarning(\"Error\", ex.getMessage());\n } \n }",
"public void handleUpdateItemDeleteButtonAction(ActionEvent event) {\n confirmHeader.setText(\"Confirm delete action\");\n String text = \"are you sure you want to update this item?\";\n confirmText.setText(text);\n confirmPane.setVisible(true);\n maskPane.setVisible(true);\n this.handleOnShowAnimation(confirmMessageHolderPane);\n }",
"@Override\n\t\t\t\tpublic void confirm() {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}",
"private void mIesireActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mIesireActionPerformed\n int response = JOptionPane.showConfirmDialog(this, \"Doriti sa parasiti aplicatia?\", \"Confirmare\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n if (response == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent Ae) {\n\t\tif(Ae.getSource() == cancel)\n\t\t{\n\t\t\t\n\t\t}\n\t\tif(Ae.getSource() == confirm)\n\t\t{\n\t\t\tthis.frame.setVisible(false);\n\t\t\tnew AdminHome(con,admin).frame.setVisible(true);\n\t\t}\n\t}",
"@FXML\n\tpublic void handleConfirm(){\n\t\tif(chooseYear.getValue()!=null && chooseMonth.getValue()!=null && chooseDay.getValue()!=null){\n\t\t\tPlainDialog alert = new PlainDialog(AlertType.CONFIRMATION,\n\t\t\t\t\t\"请进行确认\",\"填写的生日将不可更改,确认不再修改吗\");\n\t\t\tOptional<ButtonType> result = alert.showDialog();\n\t\t\t\n\t\t\t//这里还要修改\n\t\t\tresult.ifPresent( ok -> {\n\t\t\t\taccessor.setBirthday(LocalDate.of(chooseYear.getValue(), chooseMonth.getValue(), chooseDay.getValue()));\n\t\t\t\tMemberAccountCourier.getInstance().register();\n\t\t\t\tcontroller.addSignInPane();\n\t\t\t});\n\t\t}else{\n\t\t\tPlainDialog alert = new PlainDialog(AlertType.INFORMATION,\n\t\t\t\t\t\"注册失败\",\"请输入你的完整的生日信息\");\n\t\t\talert.showDialog();\n\t\t}\n\t}",
"private void addConfirmDialog() {\n builder = UIUtil.getConfirmDialog(getContext(),\"You are about to delete data for this payment. proceed ?\");\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n boolean isDeleted = mydb.deletePayment(paymentId);\n if(isDeleted) {\n Bundle bundle = new Bundle();\n bundle.putString(\"orderId\", String.valueOf(orderId));\n FragmentViewPayments mfragment = new FragmentViewPayments();\n UIUtil.refreshFragment(mfragment,bundle, getFragmentManager());\n } else {\n Toast.makeText(getContext(),\"Error deleting data!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }",
"public void Confirm(){\n new AlertDialog.Builder(MapsActivity.this)\n .setTitle(\"Confirm Location\")\n .setMessage(\"Are you sure about this location?\")\n .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // continue with delete\n }\n })\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // do nothing\n }\n })\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }",
"@Override\n public void onClick(View v) {\n FragmentManager fm = getFragmentManager();\n ConfirmDialogFragment cfDialog =\n ConfirmDialogFragment.getNewInstance(R.string.add_confirm, R.string.save_title);\n cfDialog.setTargetFragment(MemeViewFragment.this, REQUEST_CODE4);\n cfDialog.show(fm, CONFIRM);\n }",
"@Override\n\tpublic void processConfirmItemButtonClick(ProcessConfirmItemObjectEvent e) {\n\t\t\n\t}",
"public void actionPerformed(ActionEvent e) {\n if(e.getSource() == confirmButton) {\n setVisible(false); // causes all the add text \n }\n else if(e.getSource() == exitButton) {\n System.exit(0);\n }\n }",
"public void onClick(View v) {\n\t\tswitch (v.getId()) {\r\n\t\tcase R.id.regist_sure: // 确认\r\n\t\t\tsubmit();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"public boolean onConfirmClicked(DialogActivity dialog)\n {\n return mApplyButton.performClick();\n }",
"void okButtonClicked();",
"@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tConfirmDialog.show(UI.getCurrent(), MESSAGE_1,\"\",\"Aceptar\",\"Crear mas Usuarios\",\n\t\t\t\t new ConfirmDialog.Listener() {\n\n\t\t\t\t public void onClose(ConfirmDialog dialog) {\t\n\t\t\t\t \tent= false;\n\t\t\t\t if (dialog.isConfirmed()) {\n\t\t\t\t // Confirmed to continue\t\n\t\t\t\t \tc.navegar((StartView.VIEW_NAME));\n\t\t\t\t } else {\n\t\t\t\t // User did not confirm\t\t\t \n\t\t\t\t \t//c.crearWindow(RegistrarUser.VIEW_NAME);\n\t\t\t\t \tc.navegar((StartView.VIEW_NAME));\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 \n\t\t\t\t });\n\t\t\t\t\n\t\t\t\t//Notification nota= new Notification(\"Registro Exitoso!\",Notification.Type.HUMANIZED_MESSAGE);\n\t\t\t\t//nota.setDelayMsec(-1);\n\t\t\t\t//nota.show(Page.getCurrent());\t\n\t\t\t\t\n\t\t\t\tclose();\t\t\t\n\t\t\t}",
"private void onConfirm() {\n if (canConfirm) {\n onMoveConfirm(gridView.selectedX, gridView.selectedY);\n this.setConsoleState();\n }\n }",
"@OnClick(R.id.btnConfirm)\n public void onConfirmClicked(){\n new MaterialAlertDialogBuilder(getActivity(), R.style.MaterialAlertDialog_MaterialComponents_Title_Icon)\n .setTitle(R.string.dialog_confirm_title)\n .setMessage(R.string.card_message_demo_small)\n .setPositiveButton(R.string.dialog_confirm, (dialog, which) -> Toast.makeText(getActivity(),\n R.string.message_action_success, Toast.LENGTH_LONG).show())\n .setNegativeButton(R.string.dialog_cancel, null)\n .show();\n\n }",
"public void OnOkClick()\r\n {\r\n\r\n }",
"private void onOkButtonPressed() {\n\t\tconfirm = true;\n\t\tif (template.getAskDimension()) {\n\t\t\ttry {\n\t\t\t\twidth = Integer.parseInt(widthInputField.getFieldString());\n\t\t\t\twidthInputField.setFieldColor(GameFrame.getStandardFieldColor());\n\t\t\t} catch (Exception except) {\n\t\t\t\twidthInputField.setFieldColor(GameFrame.getWrongFieldColor());\n\t\t\t\tconfirm = false;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\theight = Integer.parseInt(heightInputField.getFieldString());\n\t\t\t\theightInputField.setFieldColor(GameFrame.getStandardFieldColor());\n\t\t\t} catch (Exception except) {\n\t\t\t\theightInputField.setFieldColor(GameFrame.getWrongFieldColor());\n\t\t\t\tconfirm = false;\n\t\t\t}\n\t\t\tif(!confirm)\n\t\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (template.getAskLoading()) {\n\t\t\tint result = savefileChooser.showOpenDialog(this);\n\t\t\tif (result != JFileChooser.APPROVE_OPTION) {\n\t\t\t\tconfirm = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tdispatchEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));\n\t}",
"@Override\n public void handle(ActionEvent event) {\n alert = new Alert(AlertType.CONFIRMATION);\n //Optional title. If not used the standard title \"Confiramation\" will be displayed\n //To remove the title use alert.setTitle(null);\n alert.setTitle(\"Confirmation Dialog\");\n //Optional header.If not used the standard header \"Confiramation\" will be displayed\n //To remove the title use alert.setHeaderText(null); \n alert.setHeaderText(\"Please answer the question!\");\n alert.setContentText(initText);\n //Display the dialog and get the result from the user action\n Optional<ButtonType> result = alert.showAndWait();\n if (result.get() == ButtonType.OK){\n // the user clicked OK\n alert = new Alert(AlertType.INFORMATION);\n alert.setTitle(\"Information Dialog\");\n alert.setHeaderText(\"Important message for you!\");\n alert.setContentText(\"Happiness is ephemeral!\");\n alert.showAndWait(); \n //the user clocked Cancel\n } else {\n // ... user chose CANCEL or closed the dialog\n //Warning Dialog\n alert = new Alert(AlertType.WARNING);\n alert.setTitle(\"Warning Dialog\");\n alert.setHeaderText(\"Read the Warning!\");\n alert.setContentText(\"You must like Java - Shall make you Happy!\");\n alert.showAndWait(); \n }\n }",
"@Test\n public void basicConfirmHandlingAcceptTest(){\n\n WebElement confirmButton = driver.findElement(By.id(\"confirmexample\"));\n WebElement confirmResult = driver.findElement(By.id(\"confirmreturn\"));\n\n assertEquals(\"cret\", confirmResult.getText());\n confirmButton.click();\n\n String alertMessage = \"I am a confirm alert\";\n Alert confirmAlert = driver.switchTo().alert();\n assertEquals(alertMessage,confirmAlert.getText());\n confirmAlert.accept();\n assertEquals(\"true\", confirmResult.getText());\n }",
"protected void actionPerformedBtnProcesarVenta(ActionEvent e) {\n\t}",
"@FXML\n public void confirmStudentDelete(ActionEvent e) {\n Student s = handledStudent;\n DBhandler db = new DBhandler();\n String title =\"Confirm delete\";\n String HeaderText = \"Student will be permanently deleted\";\n String ContentText = \"Are you sure you want to delete this student?\";\n\n AlertHandler ah = new AlertHandler();\n\n if (ah.getConfirmation(title, HeaderText, ContentText) == ButtonType.OK) {\n System.out.println(\"Ok pressed\");\n db.deleteStudentFromDatabase(s);\n Cancel(new ActionEvent());\n } else {\n System.out.println(\"Cancel pressed\");\n }\n }",
"@Override\r\n public void confirmDialogPositive(int callbackFunctionID) {\n \r\n }",
"public void confirm(String toConfirm) {\n\t\t//confirm user addition gui\n\t\tif(toConfirm.equals(\"add\")) {\n\t\t\tframe.dispose();\n\t\t\tframe = new JFrame(\"User Added Successfully\");\n\t\t\tframe.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\t\tframe.setLocationRelativeTo(null);\n\t\t\tframe.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\tJPanel panel = new JPanel();\n\t\t\tpanel.setLayout(new GridLayout(2, 1));\n\t\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));\n\t\t\tpanel.add(new JLabel(\"The user \" + user.getText() + \" has been added\"));\n\t\t\tJButton button = new JButton(\"Return to Main Menu\");\n\t\t\tbutton.addActionListener(e -> frame.dispose());\n\t\t\tpanel.add(button);\n\t\t\tframe.add(panel, BorderLayout.NORTH);\n\t\t\tframe.setAlwaysOnTop(true);\n\t\t\tframe.setVisible(true);\n\t\t}\n\t\t//confirm user deleted gui\n\t\telse if(toConfirm.equals(\"del\")) {\n\t\t\tframe.dispose();\n\t\t\tframe = new JFrame(\"User Deleted Successfully\");\n\t\t\tframe.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\t\tframe.setLocationRelativeTo(null);\n\t\t\tframe.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\tJPanel panel = new JPanel();\n\t\t\tpanel.setLayout(new GridLayout(2, 1));\n\t\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));\n\t\t\tpanel.add(new JLabel(\"The user \" + user.getText() + \" has been deleted\"));\n\t\t\tJButton button = new JButton(\"Return to Main Menu\");\n\t\t\tbutton.addActionListener(e -> frame.dispose());\n\t\t\tpanel.add(button);\n\t\t\tframe.add(panel, BorderLayout.NORTH);\n\t\t\tframe.setAlwaysOnTop(true);\n\t\t\tframe.setVisible(true);\n\t\t}\n\t\t//confirm user rename gui\n\t\telse if(toConfirm.equals(\"rename\")) {\n\t\t\tif(scope == ALL) {\n\t\t\t\tframe.dispose();\n\t\t\t\tframe = new JFrame(\"User Reanmed Successfully\");\n\t\t\t\tframe.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\t\t\tframe.setLocationRelativeTo(null);\n\t\t\t\tframe.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\t\tJPanel panel = new JPanel();\n\t\t\t\tpanel.setLayout(new GridLayout(2, 1));\n\t\t\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));\n\t\t\t\tpanel.add(new JLabel(\"The user \" +oldUser.getText() + \" is now \" + user.getText()));\n\t\t\t\tJButton button = new JButton(\"Return to Main Menu\");\n\t\t\t\tbutton.addActionListener(e -> frame.dispose());\n\t\t\t\tpanel.add(button);\n\t\t\t\tframe.add(panel, BorderLayout.NORTH);\n\t\t\t\tframe.setAlwaysOnTop(true);\n\t\t\t\tframe.setVisible(true);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tframe.dispose();\n\t\t\t\tframe = new JFrame(\"User Reanmed Successfully\");\n\t\t\t\tframe.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\t\t\tframe.setLocationRelativeTo(null);\n\t\t\t\tframe.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\t\tJPanel panel = new JPanel();\n\t\t\t\tpanel.setLayout(new GridLayout(2, 1));\n\t\t\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));\n\t\t\t\tpanel.add(new JLabel(\"You are now \" + user.getText()));\n\t\t\t\tJButton button = new JButton(\"Return to Main Menu\");\n\t\t\t\tbutton.addActionListener(e -> frame.dispose());\n\t\t\t\tpanel.add(button);\n\t\t\t\tframe.add(panel, BorderLayout.NORTH);\n\t\t\t\tframe.setAlwaysOnTop(true);\n\t\t\t\tframe.setVisible(true);\n\t\t\t}\n\t\t}\n\t\t//confirm user promotion gui\n\t\telse if(toConfirm.equals(\"promote\")) {\n\t\t\tframe.dispose();\n\t\t\tframe = new JFrame(\"User Promoted Successfully\");\n\t\t\tframe.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\t\tframe.setLocationRelativeTo(null);\n\t\t\tframe.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\tJPanel panel = new JPanel();\n\t\t\tpanel.setLayout(new GridLayout(2, 1));\n\t\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));\n\t\t\tpanel.add(new JLabel(\"The user \" +user.getText() + \" is now an admin\"));\n\t\t\tJButton button = new JButton(\"Return to Main Menu\");\n\t\t\tbutton.addActionListener(e -> frame.dispose());\n\t\t\tpanel.add(button);\n\t\t\tframe.add(panel, BorderLayout.NORTH);\n\t\t\tframe.setAlwaysOnTop(true);\n\t\t\tframe.setVisible(true);\n\t\t}\n\t\t//confirm user demotion gui\n\t\telse if(toConfirm.equals(\"demote\")) {\n\t\t\tframe.dispose();\n\t\t\tframe = new JFrame(\"User Demoted Successfully\");\n\t\t\tframe.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\t\tframe.setLocationRelativeTo(null);\n\t\t\tframe.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\tJPanel panel = new JPanel();\n\t\t\tpanel.setLayout(new GridLayout(2, 1));\n\t\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));\n\t\t\tpanel.add(new JLabel(\"The user \" +user.getText() + \" is now a regular user\"));\n\t\t\tJButton button = new JButton(\"Return to Main Menu\");\n\t\t\tbutton.addActionListener(e -> frame.dispose());\n\t\t\tpanel.add(button);\n\t\t\tframe.add(panel, BorderLayout.NORTH);\n\t\t\tframe.setAlwaysOnTop(true);\n\t\t\tframe.setVisible(true);\n\t\t}\n\t\t//confirm cc payment\n\t\telse if(toConfirm.equals(\"ccpayment\")) {\n\t\t\tframe.dispose();\n\t\t\tframe = new JFrame(\"Payment Successful\");\n\t\t\tframe.setSize(390, FRAME_HEIGHT);\n\t\t\tframe.setLocationRelativeTo(null);\n\t\t\tframe.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\tJPanel panel = new JPanel();\n\t\t\tpanel.setLayout(new GridLayout(2, 1));\n\t\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));\n\t\t\tpanel.add(new JLabel(\"The payment of $\" + purch.getText() + \" on \" + card.getText() + \" is successfull\"));\n\t\t\tJButton button = new JButton(\"Return to Main Menu\");\n\t\t\tbutton.addActionListener(new ActionListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\topenDrawer();\n\t\t\t\t}\n\t\t\t});\n\t\t\tpanel.add(button);\n\t\t\tframe.add(panel, BorderLayout.NORTH);\n\t\t\tframe.setAlwaysOnTop(true);\n\t\t\tframe.setVisible(true);\n\t\t}\n\t\t//confirm cash payment\n\t\telse if(toConfirm.equals(\"cpayment\")) {\n\t\t\tframe.dispose();\n\t\t\tframe = new JFrame(\"Payment Successful\");\n\t\t\tframe.setSize(390, FRAME_HEIGHT);\n\t\t\tframe.setLocationRelativeTo(null);\n\t\t\tframe.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\tJPanel panel = new JPanel();\n\t\t\tpanel.setLayout(new GridLayout(2, 1));\n\t\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));\n\t\t\tpanel.add(new JLabel(\"The payment of $\" + purch.getText() + \" is successfull\"));\n\t\t\tJButton button = new JButton(\"Return to Main Menu\");\n\t\t\tbutton.addActionListener(new ActionListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\topenDrawer();\n\t\t\t\t}\n\t\t\t});\n\t\t\tpanel.add(button);\n\t\t\tframe.add(panel, BorderLayout.NORTH);\n\t\t\tframe.setAlwaysOnTop(true);\n\t\t\tframe.setVisible(true);\n\t\t}\n\t}",
"private void jMenuItemSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemSalirActionPerformed\n LOG.trace(evt.paramString());\n\n int opc = JOptionPane.showConfirmDialog(this, \"Seguro que desea salir\",\n this.getTitle(), JOptionPane.YES_NO_OPTION);\n if (opc == 0) {\n System.exit(0);\n }\n}",
"public void buttonClick(ClickEvent event) {\n\t\t\t\tif (!isProcessing) {\n\t\t\t\t\tisProcessing = saveOperacion(oItem, operacionConfirmForm);\n\t\t\t\t}\n\t\t\t}",
"public void buttonClick(ClickEvent event) {\n fireEvent(new SubmitEvent(doneButton, SubmitEvent.SUBMITTED));\n \n // close popup window\n close();\n }",
"@Override\n\t//handle the event\n\tpublic void actionPerformed(ActionEvent event) {\n\t\tif(event.getSource()==confirmButton){\n\t\t\tif(withdrawMoney.getText().isEmpty()){\n\t\t\t\tJOptionPane.showMessageDialog(null, \"You don't input any number\",null, JOptionPane.WARNING_MESSAGE); \n\t\t\t}\n\t\t\telse{\n\t\t\t\tBankControlSystem control = new BankControlSystem();\n\t\t\t\tAccount loadAccount = new Account();\n\t\t\t\tloadAccount = control.loadAccountFromFile(accNo, pinNo);\n\t\t\t\tSystem.out.print(loadAccount.getClass());\n\t\t\t\tif(!loadAccount.isSuspend){\n\t\t\t\t\tif(control.withdraw(loadAccount, Integer.parseInt(withdrawMoney.getText()))){\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Successful\",null, JOptionPane.INFORMATION_MESSAGE); \n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This account is not balance!\",null, JOptionPane.WARNING_MESSAGE); \n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This account has been suspended!\",null, JOptionPane.WARNING_MESSAGE); \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturnToGUI(withdrawFrame);\t\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\treturnToGUI(withdrawFrame);\n\t\t}\n\t}",
"public boolean getUserConfirmation() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Confirmation Box\");\n alert.setHeaderText(\"Are you sure you want to delete?\");\n alert.setResizable(false);\n Optional<ButtonType> result = alert.showAndWait();\n ButtonType button = result.orElse(ButtonType.CANCEL);\n\n if (button == ButtonType.OK) {\n return true;\n } else {\n return false;\n }\n }",
"private void addSubmitButton(Form<BankBillPaymentConfirmPage> form) {\n\t\t// TODO Auto-generated method stub\n\t\tButton confirmBtn = new Button(\"btnConfirm\") {\n\t\t\t\n\t\t\tprivate static final long serialVersionUID = 1L;\n\t\t\t\n\t\t\tpublic void onSubmit() {\n\t\t\t\ttry {\n\t\t\t\t\tif (checkCredential(billPayBean.getPin())) {\n\t\t\t\t\t\thandleConfirmBillPayment();\n\t\t\t\t\t} else {\n\t\t\t\t\t\terror(getLocalizer().getString(\"error.invalid.pin\", this));\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\terror(getLocalizer().getString(\"error.exception\", this));\n\t\t\t\t}\n\t\t\t};\n\n\t\t};\n\t\tform.add(confirmBtn);\n\t}",
"public void actionPerformed (ActionEvent e)\n\t\t\t\t{\n\t\t\t\talertOK();\n\t\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint dialogButton = JOptionPane.YES_NO_OPTION;\n\t\t\t\tint dialogResult = JOptionPane.showConfirmDialog (null, new String(ApplicationSession.instance().getString(\"quit?\")),\"Warning\",dialogButton);\n\t\t\t\tif(dialogResult == JOptionPane.YES_OPTION){\n\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}",
"public void handleUpdateItemConfirmButtonAction(ActionEvent event) {\n try{\n String itemID = this.tempItemID;\n String title = updateItemTitle.getText();\n String author = updateItemAuthor.getText();\n GregorianCalendar publishDate = parseDate(updateItemPublishDate.getText());\n String description = updateItemDescription.getText();\n String ISBN = updateItemISBN.getText();\n String genre = updateItemGenre.getText();\n if (title.length()>0 && author.length()>0 && description.length()>0 && ISBN.length()>0 && genre.length()>0){ \n updateMgr.updateBook(itemID, title, author, publishDate, description, ISBN, genre);\n this.displaySuccess(\"Updated\", \"Item information has successfully been updated\");\n this.clearUpdateItemFields();\n }\n else{ \n displayWarning(\"Item Information incomplete\", \"Please fill in the necessary fields\");\n } \n }\n catch(ArrayIndexOutOfBoundsException | NumberFormatException e){\n displayWarning(\"Sorry\",\"Date format is wrong\\n\" + e.getMessage());\n }\n catch(Exception e){\n displayWarning(\"Sorry\",\"One of the fields is wrong:\\n\" + e.getMessage());\n }\n }",
"@Override\n public void onClick(View v) {\n new AlertDialog.Builder(MainActivity.this)\n .setIcon(android.R.drawable.ic_menu_save)\n .setTitle(\"End Evidence Collection\")\n .setMessage(\"Are you sure you want to end collecting evidence?\")\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener()\n {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n submit();\n\n }\n\n })\n .setNegativeButton(\"No\", null)\n .show();\n\n }",
"private void jConfirmActionPerformed(final ActionEvent evt)\n {\n if (jAdmin.getText().length() == 0)\n {\n JOptionPane.showMessageDialog(null, \"用户名不能为空!\");\n return;\n }\n if (DA.checkAdmin(jAdmin.getText()))\n {\n JOptionPane.showMessageDialog(null, \"用户名已经被使用!\");\n return;\n }\n if (jPassWord.getPassword().length == 0\n || jPassWordRepeat.getPassword().length == 0)\n {\n JOptionPane.showMessageDialog(null, \"密码不能为空!\");\n jPassWord.setText(\"\");\n jPassWordRepeat.setText(\"\");\n return;\n }\n final String password = new String(jPassWord.getPassword());\n final String passwordRepeat = new String(jPassWordRepeat.getPassword());\n // System.out.println(password+\" \"+passwordRepeat);\n if (password.equals(passwordRepeat) == false)\n {\n JOptionPane.showMessageDialog(null, \"两次密码输入不匹配,请重新输入!\");\n jPassWord.setText(\"\");\n jPassWordRepeat.setText(\"\");\n return;\n }\n\n final MD5 md5 = new MD5(password);\n final AdminData admin = new AdminData();\n admin.setAdmin(jAdmin.getText());\n admin.setPassWord(md5.get());\n\n DA.addAdmin(admin);\n JOptionPane.showMessageDialog(null, \"注册成功!\");\n dispose();\n }",
"public void proceedOnPopUp() {\n Controllers.button.click(proceedToCheckOutPopUp);\n }",
"private void confirmationAlert() {\n\t\tAlert confirm = new Alert( AlertType.CONFIRMATION, \"You Will Not Be Able To Change Your Name\\nAfter You Press 'OK'.\");\n\t\tconfirm.setHeaderText(\"Are You Sure?\");\n confirm.setTitle(\"Confirm Name\");\n confirm.showAndWait().ifPresent(response -> {\n if (response == ButtonType.OK) {\n \tbackground.remove( pointer );\n \tkeyStrokes = keyStrokes.replace(\" \", \"-\");\n\t\t\t\tinsertNewHiScore();\n\t\t\t\tnewHighScore = false;\n }\n });\n\t}",
"private void confirmDelete(){\n\t\tAlertDialog.Builder dialog = new AlertDialog.Builder(this);\n\t\tdialog.setIcon(R.drawable.warning);\n\t\tdialog.setTitle(\"Confirm\");\n\t\tdialog.setMessage(\"Are you sure you want to Delete Selected Bookmark(s).?\");\n\t\tdialog.setCancelable(false);\n\t\tdialog.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdeleteBookmark();\n\t\t\t}\n\t\t});\n\t\tdialog.setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Pack and show\n\t\tAlertDialog alert = dialog.create();\n\t\talert.show();\n\t}",
"@Override\r\n\t\t\t\t\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\t\t\t\tObject data = event.getButton().getData();\r\n\t\t\t\t\t\t\t\ttableObjects.select(data);\r\n\t\t\t\t\t\t\t\tItem itemClickEvent = tableObjects.getItem(data);\r\n\t\t\t\t\t\t\t\tConfirmDialog.Factory df = new DefaultConfirmDialogFactory() {\r\n\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t @Override\r\n\t\t\t\t\t\t\t\t\tpublic ConfirmDialog create(String caption, String message, String okCaption,\r\n\t\t\t\t\t\t\t\t\t\t\tString cancelCaption, String notOkCaption) {\r\n\r\n\t\t\t\t\t\t\t\t ConfirmDialog d = super.create(caption,message,okCaption, cancelCaption, notOkCaption\r\n\t\t\t\t\t\t\t\t );\r\n\t\t\t\t\t\t\t\t // Change the order of buttons\r\n\t\t\t\t\t\t\t\t Button ok = d.getOkButton();\r\n\t\t\t\t\t\t\t\t HorizontalLayout buttons = (HorizontalLayout) ok.getParent();\r\n\t\t\t\t\t\t\t\t buttons.removeComponent(ok);\r\n\t\t\t\t\t\t\t\t buttons.addComponent(ok,1);\r\n\t\t\t\t\t\t\t\t buttons.setComponentAlignment(ok, Alignment.MIDDLE_RIGHT);\r\n\t\t\t\t\t\t\t\t return d;\r\n\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\tConfirmDialog.setFactory(df);\t\t\r\n\t\t\t\t\t\t \tConfirmDialog.show(UI.getCurrent(), \"Delete Pack\", \"Are you sure delete all objects of this Pack ?\",\r\n\t\t\t\t\t\t \t \"Yes\", \"No\", new ConfirmDialog.Listener() {\r\n\r\n\t\t\t\t\t\t \t public void onClose(ConfirmDialog dialog) {\r\n\t\t\t\t\t\t \t if (dialog.isConfirmed()) {\r\n\r\n\t\t\t\t\t\t \t \t// Borramos el registro\r\n\t\t\t\t\t\t \t \ttry {\r\n\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tconexion = new Conexion();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tConnection con = conexion.getConnection();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tStatement statement = con.createStatement();\r\n\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\tObject rowId = tableObjects.getValue(); // get the selected rows id\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tInteger id = (Integer)tableObjects.getContainerProperty(rowId,\"IdObject\").getValue();\r\n\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\tString cadena = \"DELETE ObjectBYPacks WHERE IDpack =\" + String.valueOf(id); \r\n\t\t\t\t\t\t \t \t\t\t\t\t\tstatement.executeUpdate(cadena);\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tstatement.close();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tcon.close();\r\n\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\ttableObjects.removeItem(rowId);\r\n\r\n\t\t\t\t\t\t \t \t\t\t\t\tnew Notification(\"Process OK\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t\"Object deleted\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\tNotification.Type.TRAY_NOTIFICATION, true)\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t.show(Page.getCurrent());\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 } catch (SQLException e) {\r\n\t\t\t\t\t\t \t \t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t \t \t\t \te.printStackTrace();\r\n\t\t\t\t\t\t \t \t\t \tnew Notification(\"Got an exception!\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\te.getMessage(),\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\tNotification.Type.ERROR_MESSAGE, true)\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t.show(Page.getCurrent());\r\n\t\t\t\t\t\t \t \t\t \t\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\t\t}\r\n\t\t\t\t\t\t \t } \r\n\t\t\t\t\t\t \t }\r\n\t\t\t\t\t\t \t });\r\n\t\t\t\t\t\t\t\t}",
"protected abstract boolean onOkClicked();",
"private void cancel(){\n if(isFormEmpty()){\n finish();\n }else{\n // Confirmation dialog\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setTitle(getString(R.string.cancel_booking_creation_confirmation));\n // When users confirms dialog, end activity\n builder.setPositiveButton(android.R.string.ok, (dialog, which) -> {\n finish();\n });\n\n // Do nothing if cancel\n builder.setNegativeButton(android.R.string.cancel, null);\n\n AlertDialog dialog = builder.create();\n dialog.show();\n\n // Change button colors\n Button positiveButton = dialog.getButton(AlertDialog.BUTTON_POSITIVE);\n positiveButton.setTextColor(getColor(R.color.colorPrimary));\n Button negativeButton = dialog.getButton(AlertDialog.BUTTON_NEGATIVE);\n negativeButton.setTextColor(getColor(R.color.colorPrimary));\n }\n }",
"@FXML\r\n private void handleOk() {\r\n if (isInputValid()) {\r\n actualizarEntidad(this.entidad);\r\n\r\n okClicked = true;\r\n dialogStage.close();\r\n }\r\n }",
"@Override\r\n public void handle(ActionEvent e) {\n if (inputDatabase(txtPassword.getText())) {\r\n\r\n confirmUserStage.close();\r\n\r\n }\r\n \r\n }",
"@Override\n public void onClick(View v) {\n CTSCLog.d(TAG, \"onClick View = \" + v);\n switch (v.getId()) {\n case R.id.auto_configure_btn:\n autoConfigure_confirm();\n break;\n case R.id.right_confirm_btn:\n confirm(check_result.RIGHT);\n break;\n case R.id.wrong_confirm_btn:\n confirm(check_result.WRONG);\n break;\n case R.id.unknown_confirm_btn:\n confirm(check_result.UNKNOWN);\n break;\n\n default:\n break;\n }\n }",
"public void actionPerformed(ActionEvent event)\n\t\t\t\t{\n\t\t\t\t\tend = JOptionPane.showConfirmDialog(null, \"Are you sure you want to exit?\");\n\n\t\t\t\t\tif (end == JOptionPane.YES_OPTION) \n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.exit(0);\t\t\n\t\t\t\t\t}\n\t\t\t\t}",
"private void confirmar(){\n\n cliente = new Cliente();\n\n if (validaCampos() == false){\n\n cliente.idade = Integer.parseInt(edtIdade.getText().toString());\n try {\n\n clienteRepositorio.inserir(cliente);\n AlertDialog.Builder dlg = new AlertDialog.Builder(this);\n finish();\n dlg.setTitle(\"Sucess\");\n dlg.setMessage(\"Cadastro realizado com sucesso\");\n dlg.setNeutralButton(\"OK\",null);\n dlg.show();\n\n }catch (SQLException ex){\n AlertDialog.Builder dlg = new AlertDialog.Builder(this);\n dlg.setTitle(\"Error\");\n dlg.setMessage(ex.getMessage());\n dlg.setNeutralButton(\"OK\",null);\n dlg.show();\n }\n }\n }",
"public void actionPerformed(ActionEvent e) {\n\t\tint ret = JOptionPane.showConfirmDialog(null,\n\t\t\t\t\"Bạn thật sự muốn xóa hết thống kê?\", \"Thông báo\",\n\t\t\t\tJOptionPane.YES_NO_OPTION);\n\t\tif (ret == JOptionPane.YES_OPTION) {\n\t\t\ttry {\n\n\t\t\t\tString sql = \"delete from ChiTietHoaDonTiec \";\n\t\t\t\tPreparedStatement prepare = conn.prepareStatement(sql);\n\t\t\t\t\n\t\t\t\tint i2=prepare.executeUpdate();\n\t\t\t}\n\n\t\t\tcatch (SQLException e3) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te3.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\ttry {\n\n\t\t\tString sql1 = \"delete from HoaDonTiec \";\n\t\t\tprepare0 = conn.prepareStatement(sql1);\n\t\t\tint i = prepare0.executeUpdate();\n\n\t\t\tif (i > 0) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Xóa thành công\");\n\t\t\t\tHienThiDoanhThu();\n\t\t\t} else {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Xóa thất bại\");\n\t\t\t}\n\t\t} catch (SQLException e2) {\n\t\t\t// TODO: handle exception\n\t\t\te2.printStackTrace();\n\t\t}\n\t\t\n\t}",
"public void handleNewCopyConfirmButtonAction(ActionEvent event) {\n try{\n String itemID = newCopyItemID.getText();\n String location = newCopyLocation.getText();\n updateMgr.addNewCopy(itemID, location);\n this.displaySuccess(\"New Copy Added\", \"A new copy for \" + itemID + \" has been successfully created.\");\n this.clearNewCopyFields();\n }\n /*\n catch(ItemNotFoundException e){\n displayWarning(\"Error\",\"Item ID not found\\n\" + e.getMessage());\n }\n */ \n catch(SQLException | ClassNotFoundException e){\n displayWarning(\"Sorry\",\"One of the fields is wrong:\\n\" + e.getMessage());\n }\n }",
"@Override\r\n public void confirmClicked(boolean result, int id) {\r\n if (result == true) {\r\n deleteSelectedWaypoints();\r\n }\r\n\r\n // reset the current gui screen to be ourselves now that we are done\r\n // with the GuiYesNo dialog\r\n this.mc.displayGuiScreen(this);\r\n }",
"private void submitForm() {\n final Dialog dialog = new Dialog(context);\n\t\t dialog.setContentView(R.layout.dialogbox);\n\t\t dialog.setTitle(\"Sucess!\");\n\t\t dialog.setCancelable(false);\n\t dialog.setCanceledOnTouchOutside(false);\n\t\t TextView txt = (TextView) dialog.findViewById(R.id.errorlog);\n\t\t txt.setText(\"Registration Successfull.\");\n\t\t Button dialogButton = (Button) dialog.findViewById(R.id.release);\n\t\t dialogButton.setOnClickListener(new OnClickListener() {\n\t\t\t public void onClick(View vd) {\n\t\t\t\t change.setEnabled(true);\n\t\t\t\t dialog.dismiss();\n\t\t\n\t\t}\n\t\t});\n\t\t dialog.show();\n}",
"public interface ConfirmCallback {\r\n\r\n /**\r\n * This event is triggered when the OK button is pressed.\r\n */\r\n void ok();\r\n\r\n /**\r\n * This event is triggered when the CANCEL button is pressed.\r\n */\r\n void cancel();\r\n }",
"protected boolean confirm (String title, String message)\n {\n return JOptionPane.OK_OPTION == JOptionPane.showConfirmDialog(\n this, message, title, JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);\n }",
"public void ClickConfirmationPage() {\r\n\t\tconfirmation.click();\r\n\t\t\tLog(\"Clicked the \\\"Confirmation\\\" button on the Birthdays page\");\r\n\t}",
"@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent Event) {\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tint reply = JOptionPane.showConfirmDialog(null, getPanel(), \"Exit\", JOptionPane.YES_NO_OPTION);\r\n\t\t\t\t\tif (reply == JOptionPane.NO_OPTION)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t System.exit(0);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n setOnVacationOk(atc, guiD, sm);\n }",
"public abstract void showConfirmationBox(String message, Consumer<Boolean> resultCallback);",
"public void checkOutFlight() {\n confirmationPage.checkButton();\n }",
"@Override\r\n\tpublic void actionPerformed(GuiButton button) {\r\n switch (button.id) {\r\n case 0:\r\n GuiYesNo confirmGui = new GuiYesNo(this, \"Delete Waypoints\", \"Are you sure you want to delete the selected waypoints?\", \"Yes\", \"No\", 0);\r\n confirmGui.setButtonDelay(5);\r\n this.mc.displayGuiScreen(confirmGui);\r\n break;\r\n }\r\n\t}",
"public String confirm()\n\t{\n\t\tconfirm = true;\n\t\treturn su();\n\t}",
"private void jButtonOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOkActionPerformed\n \n }",
"public void handleNewItemConfirmAction(ActionEvent event) {\n try{\n String title = newItemTitle.getText();\n String author = newItemAuthor.getText();\n GregorianCalendar publishDate = parseDate(newItemPublishDate.getText());\n String description = newItemDescription.getText();\n if (bookType.isSelected()){\n String ISBN = newBookISBN.getText();\n String genre = newBookGenre.getText();\n if (title.length()>0 && author.length()>0 && description.length()>0 && ISBN.length()>0 && genre.length()>0){\n updateMgr.addNewBook(title, author, publishDate, description, ISBN, genre);\n this.displaySuccess(\"New Item Added\", \"New item \" + title + \" has been successfully added\");\n this.clearNewItemFields();\n }\n else{ \n displayWarning(\"Item Information incomplete\", \"Please fill in the necessary fields\");\n }\n }\n }\n catch(ArrayIndexOutOfBoundsException | NumberFormatException e){\n displayWarning(\"Sorry\",\"Date format is wrong\\n\" + e.getMessage());\n }\n catch(Exception e){\n displayWarning(\"Sorry\",\"One of the fields is wrong:\\n\" + e.getMessage());\n }\n \n }",
"public void btn_actualizar(View v) {\n String conteo1 = cap_1.getText().toString();\n String conteo2 = cap_2.getText().toString();\n\n if (conteo1.isEmpty()) {\n tostada(\"No haz seleccionado un registro para actualizar\").show();\n } else if (conteo2.isEmpty()) {\n tostada(\"No haz seleccionado un registro para actualizar\").show();\n } else {\n String msj = \"Seguro que deseas actualizar este registro\";\n String tipo = \"btn_actualizar\";\n DialogConfirm(msj, tipo);\n }\n }",
"@Override\r\n public void onClick(View v) {\n\t\t\t\tfinal Dialog confirmDialog = new Dialog(context, R.style.Dialog);\r\n\t\t\t\tconfirmDialog.setContentView(R.layout.question_delete);\r\n\t\t\t\tDisplay displaySize = ActivityUtil.getDisplaySize(getContext());\r\n\t\t\t\tconfirmDialog.getWindow().setLayout(displaySize.getWidth(), displaySize.getHeight());\r\n\t\t\t\tconfirmDialog.show();\r\n\t\t\t\t\r\n\t\t\t\t// Adding listeners on each button\r\n\t\t\t\tButton btCancel = (Button) confirmDialog.findViewById(R.id.bt_cancel);\r\n\t\t\t\tButton btConfirm = (Button) confirmDialog.findViewById(R.id.bt_confirm);\r\n \t\r\n btCancel.setOnClickListener(new CloseClickListenerUtil(confirmDialog));\r\n btConfirm.setOnClickListener(new Button.OnClickListener() {\r\n \t\r\n \tpublic void onClick(View v) {\r\n \t\t//\r\n // #91 XXX TODO: Add some error handling to check whether we really need to delete or not before we\r\n // incorrectly assume our REST call to the server worked.\r\n \t\ttry {\r\n\t\t\t\t\t\t\tSmilePlugServerManager spsm = new SmilePlugServerManager();\r\n String status = spsm.deleteQuestionInSessionByNumber(ip, context, currentQuestion);\r\n Toast.makeText(context, status, Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\t} catch (NetworkErrorException e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n Toast.makeText(context, \"Error deleting question, reason: \" + e.getMessage(), Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\t}\r\n \t\t\r\n \t\t\tconfirmDialog.dismiss();\r\n \t\t\tdetailsDialog.dismiss();\r\n \t\t\t\r\n \t\t\t// QuestionsManager.addDeletedQuestionInLocalFile(context, currentQuestion);\r\n\t\t\t\t\t};\r\n });\r\n \t }",
"@FXML\n\tprivate void handleOk() {\n\t\tif (isValidInput()) {\n\t\t\tsaveCurrentAcknowledgment();\n\t\t\t\n\t\t\tif (isNew) {\n\t\t\t\tmain.getDbHelper().insertAcknowledgment(acknowledgment);\n\t\t\t\tmain.getAcknowledgmentData().clear();\n\t\t\t\tmain.getAcknowledgmentData().addAll(main.getDbHelper().retrieveAcknowledgmentList());\n\t\t\t} else {\n\t\t\t\tmain.getDbHelper().updateAcknowledgment(acknowledgment);\n\t\t\t\tmain.getAcknowledgmentData().clear();\n\t\t\t\tmain.getAcknowledgmentData().addAll(main.getDbHelper().retrieveAcknowledgmentList());\t\n\t\t\t}\n\t\t\t\n\t\t\tokClicked = true;\n\t\t\tdialogStage.close();\n\t\t}\n\t}",
"@Override\r\n\t\t\t\t\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\t\t\t\tObject data = event.getButton().getData();\r\n\t\t\t\t\t\t\t\ttablePacks.select(data);\r\n\t\t\t\t\t\t\t\tItem itemClickEvent = tablePacks.getItem(data);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tConfirmDialog.Factory df = new DefaultConfirmDialogFactory() {\r\n\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t @Override\r\n\t\t\t\t\t\t\t\t\tpublic ConfirmDialog create(String caption, String message, String okCaption,\r\n\t\t\t\t\t\t\t\t\t\t\tString cancelCaption, String notOkCaption) {\r\n\r\n\t\t\t\t\t\t\t\t ConfirmDialog d = super.create(caption,message,okCaption, cancelCaption, notOkCaption\r\n\t\t\t\t\t\t\t\t );\r\n\t\t\t\t\t\t\t\t // Change the order of buttons\r\n\t\t\t\t\t\t\t\t Button ok = d.getOkButton();\r\n\t\t\t\t\t\t\t\t HorizontalLayout buttons = (HorizontalLayout) ok.getParent();\r\n\t\t\t\t\t\t\t\t buttons.removeComponent(ok);\r\n\t\t\t\t\t\t\t\t buttons.addComponent(ok,1);\r\n\t\t\t\t\t\t\t\t buttons.setComponentAlignment(ok, Alignment.MIDDLE_RIGHT);\r\n\t\t\t\t\t\t\t\t return d;\r\n\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\tConfirmDialog.setFactory(df);\t\t\r\n\t\t\t\t\t\t \tConfirmDialog.show(UI.getCurrent(), \"Delete Objects by Pack\", \"Are you sure delete objects of this pack ?\",\r\n\t\t\t\t\t\t \t \"Yes\", \"No\", new ConfirmDialog.Listener() {\r\n\r\n\t\t\t\t\t\t \t public void onClose(ConfirmDialog dialog) {\r\n\t\t\t\t\t\t \t if (dialog.isConfirmed()) {\r\n\r\n\t\t\t\t\t\t \t \t// Borramos el registro\r\n\t\t\t\t\t\t \t \ttry {\r\n\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tconexion = new Conexion();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tConnection con = conexion.getConnection();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tStatement statement = con.createStatement();\r\n\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\tObject rowId = tablePacks.getValue(); // get the selected rows id\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tInteger id = (Integer)tablePacks.getContainerProperty(rowId,\"IdPack\").getValue();\r\n\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\tString cadena = \"DELETE ObjectbyPacks WHERE idpack =\" + String.valueOf(id); \r\n\t\t\t\t\t\t \t \t\t\t\t\t\tstatement.executeUpdate(cadena);\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tstatement.close();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tcon.close();\r\n\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\ttablePacks.removeItem(rowId);\r\n\r\n\t\t\t\t\t\t \t \t\t\t\t\tnew Notification(\"Process OK\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t\"Objects by Pack deleted\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\tNotification.Type.TRAY_NOTIFICATION, true)\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t.show(Page.getCurrent());\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 } catch (SQLException e) {\r\n\t\t\t\t\t\t \t \t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t \t \t\t \te.printStackTrace();\r\n\t\t\t\t\t\t \t \t\t \tnew Notification(\"Got an exception!\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\te.getMessage(),\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\tNotification.Type.ERROR_MESSAGE, true)\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t.show(Page.getCurrent());\r\n\t\t\t\t\t\t \t \t\t \t\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\t\t}\r\n\t\t\t\t\t\t \t } \r\n\t\t\t\t\t\t \t }\r\n\t\t\t\t\t\t \t });\r\n\r\n\t\t\t\t\t\t\t\t}",
"private void confirmacion(String P, String T) {\n int n = JOptionPane.showConfirmDialog(\n null,\n P,\n T,\n JOptionPane.YES_NO_OPTION);\n if (n == JOptionPane.YES_OPTION) {\n N_Cupon ventana = new N_Cupon(conexion);\n ventana.setVisible(true);\n this.setVisible(false);\n //Abrir nueva ventana para insertar Ticket en cupon\n } else {\n this.setVisible(false);\n }\n }",
"void onOkButtonPressed();",
"public String btn_confirm_delete_action()\n {\n //delete the accession\n getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().\n deleteSemental(\n getgermplasm$SementalSessionBean().getDeleteSemental());\n //refresh the list\n getgermplasm$SementalSessionBean().getPagination().deleteItem();\n getgermplasm$SementalSessionBean().getPagination().refreshList();\n getgermplasm$SemenGatheringSessionBean().setPagination(null);\n \n //show and hidde panels\n this.getMainPanel().setRendered(true);\n this.getAlertMessage().setRendered(false);\n MessageBean.setSuccessMessageFromBundle(\"delete_semental_success\", this.getMyLocale());\n \n return null;\n }",
"public void clickOnYesButton() {\r\n\t\tsafeJavaScriptClick(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"Yes\"));\r\n\t}",
"@Override\n public void showConfirm() {\n calledMethods.add(\"showConfirm\");\n }",
"@Override\n\t\t\tpublic void handle(ActionEvent arg0) {\n\n\t\t\t\tAlert alert = new Alert(AlertType.CONFIRMATION);\n\t\t\t\talert.setTitle(\"Confirm\");\n\t\t\t\talert.setHeaderText(null);\n\t\t\t\talert.setContentText(\"Delete this accout?\");\n\t\t\t\tOptional<ButtonType> result = alert.showAndWait();\n\t\t\t\tif (result.get() == ButtonType.OK) {\n\t\t\t\t\tUser employee = table.getSelectionModel().getSelectedItem();\n\n\t\t\t\t\tif (employee == null) {\n\t\t\t\t\t\tAlert alert1 = new Alert(AlertType.INFORMATION);\n\t\t\t\t\t\talert1.setHeaderText(null);\n\t\t\t\t\t\talert1.setTitle(\"Customer Remove\");\n\t\t\t\t\t\talert1.setContentText(\"Please select a row in the table\");\n\t\t\t\t\t\talert1.showAndWait();\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tint username = employee.getId();\n\n\t\t\t\t\t\tuser.deleteUser(\"\" + username);\n\n\t\t\t\t\t\tObservableList<User> data = FXCollections.observableArrayList(employeeManager.getAllEmployees());\n\n\t\t\t\t\t\ttable.setItems(data);\n\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}",
"public void buttonDelete(View view) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(UserEditActivity.this);\n builder.setMessage(R.string.text_delete_confirmation)\n .setTitle(R.string.text_attention_title)\n .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Delete the record confirmed\n deleteRecord();\n }\n })\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n AlertDialog dialog = builder.create();\n dialog.show();\n }",
"public void clickConfirmDeleteButton() {\n // GeneralUtilities.waitSomeSeconds(1);\n // validateElementText(titleConfirmDeleteToDo, \"Delete To-Do?\");\n // validateElementText(titleConfirmDeleteToDoDescription, \"Are you sure you'd like to delete these To-Dos? Once deleted, you will not be able to retrieve any documents uploaded on the comments in the selected To-Dos.\");\n // waitForCssValueChanged(divConfirmDeleteToDo, \"Div Confirm Delete ToDo\", \"display\", \"block\");\n //\n // hoverElement(buttonConfirmDeleteToDo, \"Button Confirm Delete ToDo\");\n waitForAnimation(divConfirmDeleteToDoAnimate, \"Div Confirm Delete ToDo Animation\");\n clickElement(buttonConfirmDeleteToDo, \"Button Confirm Delete ToDo\");\n waitForCssValueChanged(divConfirmDeleteToDo, \"Div Confirm Delete ToDo\", \"display\", \"none\");\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n String[] buttons = { \"Yes\", \"No\" };\n int returnValue = JOptionPane.showOptionDialog(frame, \"Are you sure you want to delete this user?\", \"Confirm Deletion\",\n JOptionPane.WARNING_MESSAGE, 0, null, buttons, buttons[1]);\n\n if (returnValue == 0) {\n Billboard billboard = billboardList.get(billboardJList.getSelectedIndex());\n\n Request deleteBillboard = Request.deleteBillboardReq(billboard.getBillboardName(), connector.session);\n\n Response response;\n\n try {\n response = deleteBillboard.Send(connector);\n } catch (IOException excep) {\n JOptionPane.showMessageDialog(null, \"Cannot delete billboard\");\n return;\n }\n\n // check status of response\n boolean status = response.isStatus();\n\n if (!status) {\n String errorMsg = (String) response.getData();\n JOptionPane.showMessageDialog(null, \"Cannot delete billboard. Error: \" + errorMsg);\n }\n\n if (status) {\n billboardList.remove(billboard);\n model.removeElement(billboard.getBillboardName());\n billboardJList.setModel(model);\n JOptionPane.showMessageDialog(null, \"Billboard successfully deleted.\");\n }\n }\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t\tif(e.getActionCommand().equals(\"cancel\")) {\n\t\t\tnew FrontPageController();\n\t\t\tview.dispose();\n\t\t} else if (e.getActionCommand().equals(\"video\")) {\n\t\t\tview.setMembershipType(1);\n\t\t} else if (e.getActionCommand().equals(\"music\")) {\n\t\t\tview.setMembershipType(2);\n\t\t} else if (e.getActionCommand().equals(\"tv\")) {\n\t\t\tview.setMembershipType(3);\n\t\t} else if (e.getActionCommand().equals(\"premium\")) {\n\t\t\tview.setMembershipType(4);\n\n\t\t\t//register button, uses model to perform verification and insert customer in DB\n\t\t} else {\n\t\t\tString fName = view.getfName().trim();\n\t\t\tString lName = view.getlName().trim();\n\t\t\tString mobile = view.getMobileNum().trim();\n\t\t\tint membership = view.getMembershipType();\n\t\t\tString cardNum = view.getCardNum().trim();\n\t\t\tString email = view.getEmail().trim();\n\n\t\t\tif(model.verifyCustomer(fName, lName, mobile, membership, cardNum, email)) {\n\t\t\t\tJOptionPane.showMessageDialog(this.view,\"Customer Successfuly Created!\");\n\t\t\t\tnew FrontPageController();\n\t\t\t\tview.dispose();\n\t\t\t};\n\t\t}\n\t}",
"@Override\n public void clickPositive() {\n meetingManager.undoConfirm(chosenTrade, chosenTrader);\n Toast.makeText(this, \"Successfully undo confirm\", Toast.LENGTH_SHORT).show();\n viewList();\n\n }",
"public void ClickOnConfirmCertificateInformationButton()\n\t\t{\n\t\t\tConfirmCertificateInformation.click();\n\t\t}",
"public void clickYes ();",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tint reply = JOptionPane.showConfirmDialog(null, \"Are you sure you want to leave us behind, my liege?\", \"Close?\", JOptionPane.YES_NO_OPTION);\n\t\tif (reply == JOptionPane.YES_OPTION)\n\t\t{\n\t\t System.exit(0);\n\t\t}\n\t}",
"private static void JGUI5() {\n\t\tint response = JOptionPane.showConfirmDialog(null,\n\t\t\t\t\"Do you want to continue?\", \"Confirm\",\n\t\t\t\tJOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); \n\t\tif (response == JOptionPane.NO_OPTION) {\n\t\t\tSystem.out.println(\"No button clicked\");\n\t\t} else if (response == JOptionPane.YES_OPTION) {\n\t\tSystem.out.println(\"Yes button clicked\");\n\t\t} else if (response == JOptionPane.CLOSED_OPTION) {\n\t\t\tSystem.out.println(\"JOptionPane closed\");\n\t\t}\n\t}",
"private void confirmarGuardarEmpleado() {\n String pregunta = \"Esto seguro de realizar guardar la categoria?\";\n new AlertDialog.Builder(this)\n .setTitle(getResources().getString(R.string.msj_confirmacion))\n .setMessage(pregunta)\n .setNegativeButton(android.R.string.cancel, null)//sin listener\n .setPositiveButton(getResources().getString(R.string.lbl_aceptar),\n new DialogInterface.OnClickListener() {//un listener que al pulsar, solicite el WS de Transsaccion\n @Override\n public void onClick(DialogInterface dialog, int which){\n guardarEmpleado();\n }\n })\n .show();\n }",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tdatabseExecuteQuery(\"DELETE FROM userdetails where username='\"+Username+\"'\");\n\t\t\t\t//after that make verification GUI again.\n\t\t\t\tnew Verification();\n\t\t\t}",
"protected void actionPerformedCmbProveedor(ActionEvent e) {\n\t}",
"private void helperAcceptButtonListener() {\n refresh();\n editDialog.dispose();\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n JButton button = (JButton) e.getSource();\n if (button.getText().toString().equals(\"OK\")) {\n this.dispose();\n }\n\n else {\n ip = null;\n this.dispose();\n }\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tif(JOptionPane.showConfirmDialog(f4, \"Confrom if you want to exit\",\"Library Management System\",\n\t\t\t\t\t\tJOptionPane.YES_NO_OPTION)==JOptionPane.YES_NO_OPTION) {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}"
] | [
"0.74874914",
"0.73576945",
"0.72496235",
"0.71896243",
"0.7074296",
"0.6965554",
"0.6840532",
"0.68314517",
"0.6810061",
"0.6808184",
"0.6781409",
"0.6772156",
"0.6679008",
"0.66337425",
"0.66218793",
"0.66211987",
"0.6602954",
"0.6580194",
"0.65685296",
"0.6564057",
"0.6510892",
"0.64838594",
"0.6480547",
"0.6470335",
"0.644983",
"0.6425872",
"0.6421214",
"0.6419415",
"0.64015377",
"0.63988626",
"0.63885105",
"0.6354592",
"0.6346654",
"0.63404506",
"0.6338596",
"0.63364315",
"0.63302517",
"0.632905",
"0.63224554",
"0.63104033",
"0.6300098",
"0.6277916",
"0.6269001",
"0.62513065",
"0.6248032",
"0.6232523",
"0.62311757",
"0.6225872",
"0.62174946",
"0.62112856",
"0.61949587",
"0.6171223",
"0.61624646",
"0.6161268",
"0.61574507",
"0.6155535",
"0.61382407",
"0.6131495",
"0.61286557",
"0.6120634",
"0.610389",
"0.61038244",
"0.6098874",
"0.6096033",
"0.60958165",
"0.6094192",
"0.60912836",
"0.6085797",
"0.6085783",
"0.607427",
"0.60740954",
"0.6069714",
"0.6063323",
"0.60552466",
"0.6053985",
"0.6050496",
"0.60483915",
"0.6033585",
"0.60239047",
"0.6020777",
"0.60173976",
"0.6008996",
"0.60066724",
"0.60050404",
"0.6000122",
"0.598923",
"0.59853673",
"0.59616935",
"0.5955931",
"0.59505033",
"0.59470403",
"0.59465617",
"0.5937624",
"0.593076",
"0.59253496",
"0.5922231",
"0.5919853",
"0.5914181",
"0.5905411",
"0.59028697"
] | 0.70404005 | 5 |
Function that handle the cancel button click inside the form | @Override
public View.OnClickListener HandleCancel() {
return v -> {
//Delete the selected location inside the database
mLocationLog.DeleteTask(mLocation.getId());
//Remove the selected location
mMainActivityState.setSelectedLocation(null);
//Refresh the application state to show the changes
mMainActivityState.RefreshState();
//Close the dialog
mCurrentDialog.dismiss();
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void cancelButtonActionPerformed(ActionEvent e) {\n }",
"public void onCancelClick()\r\n {\r\n\r\n }",
"void btnCancel();",
"void onCancelClicked();",
"void onCancelButtonPressed();",
"HasClickHandlers getCancelButton();",
"public void handleCancelButton(ActionEvent e) {\n\t\tclose();\n\t}",
"@Override\n public void OnCancelButtonPressed() {\n }",
"public void onCancelButtonClick() {\n close();\n }",
"@Override\n public void OnCancelButtonPressed() {\n }",
"void cancelButton_actionPerformed(ActionEvent e) {\n setUserAction(CANCELLED);\n setVisible(false);\n }",
"public void cancel() { Common.exitWindow(cancelBtn); }",
"private void cancel(){\n if(isFormEmpty()){\n finish();\n }else{\n // Confirmation dialog\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setTitle(getString(R.string.cancel_booking_creation_confirmation));\n // When users confirms dialog, end activity\n builder.setPositiveButton(android.R.string.ok, (dialog, which) -> {\n finish();\n });\n\n // Do nothing if cancel\n builder.setNegativeButton(android.R.string.cancel, null);\n\n AlertDialog dialog = builder.create();\n dialog.show();\n\n // Change button colors\n Button positiveButton = dialog.getButton(AlertDialog.BUTTON_POSITIVE);\n positiveButton.setTextColor(getColor(R.color.colorPrimary));\n Button negativeButton = dialog.getButton(AlertDialog.BUTTON_NEGATIVE);\n negativeButton.setTextColor(getColor(R.color.colorPrimary));\n }\n }",
"void cancelButton_actionPerformed(ActionEvent e)\n\t{\n\t\tcloseDlg();\n }",
"private Component cancelButton(){\n cancelButton = new Button(\"cancelButton\"){\n @Override\n public void onSubmit() {\n super.onSubmit();\n personFormPanel.clearFormValues();\n }\n };\n //Reset default form processing: validation and model update\n cancelButton.setDefaultFormProcessing(false);\n return cancelButton;\n }",
"public void onCancelClicked() {\n close();\n }",
"protected abstract void handleCancel();",
"private void jButton_CancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_CancelActionPerformed\n // TODO add your handling code here:\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcancel();\n\t\t\t}",
"private void cancel(ActionEvent e){\r\n // Clear textfields\r\n clearFields();\r\n // If coming from appt management screen, go back there\r\n if (fromAppt){\r\n goToManageApptScreen();\r\n }\r\n // Otherwise, set the current client to null and go to the landing page \r\n else {\r\n currClient = null;\r\n LandingPage.returnToLandingPage();\r\n }\r\n }",
"public void cancel() throws Exception {\n\t\tgetControl(\"cancelButton\").click();\n\t}",
"private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed\n this.dispose();\n }",
"@Override\n public void onCancel() {\n Log.w(tag, \"post cancel\" + this.getRequestURI());\n cancelmDialog();\n super.onCancel();\n }",
"@Override\n public void onClick(View v) {\n buttonCancelClicked();\n }",
"private void btnCancelarActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"@Override\n public void onCancel(DialogInterface dialog) {\n cancel(true);\n }",
"@Override\n\tprotected void cancel() {\n\t\tsuper.cancel();\n\t\tif(ELSComfirmDialog.showConfirmDlg(GetPanelUtil.getFunctionPanel(this),\n\t\t\t\t\"取消添加\", \"确认退出新增界面?\")){\n\t\t\tback();\n\t\t}\n\t}",
"public void clickOnCancelButton() {\r\n\t\tsafeJavaScriptClick(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"Cancel\"));\r\n\t}",
"public void cancelButtonPressed(ActionEvent event) throws IOException {\n returnToMainScreen(event);\n }",
"protected abstract void onCancel();",
"void onCancel();",
"private void handleCancelEvent() {\n // if the cancel button has been pressed, the stage will automatically be closed\n this.cancel = new Button(\"Cancel\");\n cancel.setOnAction(e2 -> {\n this.close(); // close the addfood stage\n });\n\n }",
"public void handleCancelButton(ActionEvent actionEvent) throws IOException {\n ScreenLoader.display(\"customerSearchScreen\",\"Customer Search\",actionEvent);\n }",
"public void cancelDialog() {dispose();}",
"public void onCancel();",
"protected void onCancelAction(IModel<StringWrapper> model, AjaxRequestTarget target, Form<?> form) {\n }",
"public void onClickCancel()\n\t{\n\t\tsetVisible(false);\n\t\tdispose();\t\n\t}",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}",
"private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {\n dispose();\n }",
"@FXML private void handleCancel() {\r\n\t\tvastaus = null;\r\n\t\tModalController.closeStage(textVastaus);\r\n\t}",
"@Override\n public void onCancel(DialogInterface arg0) {\n\n }",
"public void onCancelClicked() {\r\n // Get a reference to the stage\r\n Stage stage = (Stage) btnCancel.getScene().getWindow();\r\n // Close the window\r\n stage.close();\r\n }",
"public void cancelButtonAction(ActionEvent event){\n Stage stage = (Stage) cancelButton.getScene().getWindow();\n stage.close();\n }",
"public void cancel(Button.ClickEvent event) {\n Notification.show(\"Cancelled\", Notification.Type.TRAY_NOTIFICATION);\n view.getContactList().select(null);\n }",
"public abstract boolean cancel();",
"@Override\n\t\t\tpublic void onCancel() {\n\t\t\t\t\n\t\t\t}",
"public void cancel()\n\t{\n\t}",
"@FXML\n private void handleCancelButton(MouseEvent event) throws IOException {\n Stage stage = (Stage) cancelButton.getScene().getWindow();\n stage.close();\n }",
"public void cancelButtonPressed(View view) {\r\n\t\tthis.finish();\r\n\t}",
"protected abstract void handleCancel() throws Exception;",
"private void btnCancelActionPerformed(ActionEvent e) {\n processWindowEvent(new WindowEvent(this,WindowEvent.WINDOW_CLOSING));\n }",
"@Override\n\t\tpublic void cancel() {\n\t\t\t\n\t\t}",
"@Override\n\tpublic void onCancel(DialogInterface arg0) {\n\t\t\n\t}",
"public void handleCancel() {\n\t\tdialogStage.close();\n\t}",
"@FXML\r\n void actionCancelButton(ActionEvent event) throws IOException {\r\n\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setTitle(\"Alert\");\r\n alert.setContentText(\"Do you want to cancel your changes and return to the main screen?\");\r\n Optional<ButtonType> result = alert.showAndWait();\r\n\r\n if (result.isPresent() && result.get() == ButtonType.OK) {\r\n returnToMainScreen(event);\r\n }\r\n }",
"@Override\n\t\tpublic void onCancel() {\n \n \t}",
"private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed\n dispose();\n }",
"@Override\n\tpublic void cancel() {\n\n\t}",
"@Override\n\tpublic void cancel() {\n\n\t}",
"@Override\n\tpublic void cancel() {\n\n\t}",
"@Override\n\tpublic void cancel() {\n\t\t\n\t}",
"@Override\r\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\r\n\t\t\t\t\t}",
"private void onCancel()\n\t{\n\t\tdispose();\n\t}",
"public void onCancel() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\n\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onCancel() {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"CancelAction getCancelAction();",
"@Override\r\n\tpublic void cancel() {\n\t\t\r\n\t}",
"@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t}",
"@Override\r\n\t\tpublic void onCancel() {\n\t\t}",
"@Override\r\n\tpublic void dialogControyCancel() {\n\r\n\t}",
"@Override\n public void onCancel() {\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmListener.onCancelPressed();\r\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}",
"@FXML private void CancelHandler (ActionEvent event) throws IOException{\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"This will clear all text field values, do you want to continue?\");\r\n\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if(result.isPresent() && result.get() == ButtonType.OK) {\r\n\r\n Stage stage = (Stage)((Button)event.getSource()).getScene().getWindow();\r\n Object scene = FXMLLoader.load(getClass().getResource(\"/View_Controller/MainScreen.fxml\"));\r\n stage.setScene(new Scene((Parent) scene));\r\n stage.show();\r\n\r\n }\r\n }",
"@Override\n public void onCancel(DialogInterface dialog) {\n }",
"public void cancelButton() {\n this.setMultQuestionSet(null);\n this.setSingleQuestionSet(null);\n this.setTextQuestionSet(null);\n this.setDateQuestionSet(null);\n System.out.println(\"Done pressing cancel button\");\n }",
"@Override\r\n\tprotected void onCancelActionSelection(SelectionEvent e) {\n\t\tSystem.out.println(\"Cancel button implementation\");\r\n\t}",
"private void btnCancelActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnCancelActionPerformed\n {//GEN-HEADEREND:event_btnCancelActionPerformed\n try\n {\n // TODO add your handling code here:\n DBCommands.closeConnection();\n } catch (SQLException ex)\n {\n Logger.getLogger(EntryForm.class.getName()).log(Level.SEVERE, null, ex);\n }\n MainMethod.cancelOperation(\"entry\");\n }",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void onCancel(RowEditEvent event) {\n\t}",
"public void onCancel() {\n\t\t\t\t\t}",
"public void cancelar() {\n setCancelado(true);\n }",
"@Override\n public void cancel() {\n }",
"@Override\n public void cancel() {\n\n }",
"private void onCancel() {\n\t\tdispose();\n\t}",
"public void onCancelPressed(View view) {\n finish();\n }",
"void onCancel(int key);",
"private void decorateCancelButton() {\n cancelButton.setVisible(false);\n ResourceUtils.resButton(cancelButton, Res.getString(\"cancel\"));\n cancelButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196)));\n cancelButton.setForeground(new Color(73, 113, 196));\n cancelButton.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n \n cancelButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n cancelTransfer();\n }\n });\n \n cancelButton.addMouseListener(new MouseAdapter() {\n public void mouseEntered(MouseEvent e) {\n cancelButton.setCursor(new Cursor(Cursor.HAND_CURSOR));\n \n }\n \n public void mouseExited(MouseEvent e) {\n cancelButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }\n });\n \n }",
"public void onCancelPressed(View v) {\n finish();\n }",
"public boolean cancel();",
"@Override\n\t\t\t\t\t\tpublic void doCancel() {\n\t\t\t\t\t\t\tcommonDialog.dismiss();\n\t\t\t\t\t\t}",
"public void cancel() {\n\t}",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void onClick(View v) {\n cancel(v);\n }",
"public void onCancel() {\n }",
"public void onCancel() {\r\n parentController.switchView();\r\n }"
] | [
"0.82149357",
"0.81948775",
"0.81914866",
"0.80251116",
"0.7949059",
"0.79263693",
"0.78374404",
"0.78166926",
"0.7804705",
"0.7794638",
"0.776572",
"0.77529895",
"0.76350695",
"0.7591268",
"0.7573658",
"0.7544056",
"0.7525757",
"0.74847865",
"0.74346644",
"0.74336195",
"0.7431581",
"0.7417751",
"0.7407625",
"0.7396515",
"0.7360142",
"0.732372",
"0.73147255",
"0.73088634",
"0.72949284",
"0.72921264",
"0.7284283",
"0.72775733",
"0.7269659",
"0.7253631",
"0.7245086",
"0.72422713",
"0.7193111",
"0.7192299",
"0.71875626",
"0.7178371",
"0.71675885",
"0.7163064",
"0.7156048",
"0.7152014",
"0.71453553",
"0.7135083",
"0.71323216",
"0.7125759",
"0.71109277",
"0.7108219",
"0.7107914",
"0.7107708",
"0.7107451",
"0.71032757",
"0.7093834",
"0.70876884",
"0.7085864",
"0.70791566",
"0.70791566",
"0.70791566",
"0.70750743",
"0.70705545",
"0.7066628",
"0.7065116",
"0.70633274",
"0.7045748",
"0.7031226",
"0.70253295",
"0.7020468",
"0.70176405",
"0.7013652",
"0.70134056",
"0.7011768",
"0.7010684",
"0.7007414",
"0.70070446",
"0.7005676",
"0.7002379",
"0.69911504",
"0.69911504",
"0.69911504",
"0.69911504",
"0.69911504",
"0.69911504",
"0.6984629",
"0.6982209",
"0.69778615",
"0.6969477",
"0.6965411",
"0.69640315",
"0.6959569",
"0.6956699",
"0.6954656",
"0.6947335",
"0.69463605",
"0.6942367",
"0.6940613",
"0.6939182",
"0.6934945",
"0.6933257",
"0.6922795"
] | 0.0 | -1 |
Make a new constraint defined as a set of given propagators | public LocalConstructiveDisjunction(Constraint... constraints) {
super("LocalConstructiveDisjunction", createProps(constraints));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"com.microsoft.schemas.crm._2011.contracts.ArrayOfConstraintRelation addNewConstraints();",
"ISIntercomponentPropagation createISIntercomponentPropagation();",
"Constraint createConstraint();",
"Constraint createConstraint();",
"@Override\n public void propagate(int evtmask) throws ContradictionException {\n if (stp.opt.debug) System.out.println(\"GeostConstraint:propagate()\");\n filter();\n }",
"@Test\n public void solveTest5() throws ContradictionException {\n\n Set<ConstraintInfo> constraints = new HashSet<>();\n Set<Position> vars = new HashSet<>();\n Position[] varArr = new Position[]{\n this.grid.getVariable(0, 6),\n this.grid.getVariable(1, 6),\n this.grid.getVariable(2, 6),\n this.grid.getVariable(3, 6),\n this.grid.getVariable(4, 6),\n this.grid.getVariable(5, 6),\n this.grid.getVariable(6, 6),\n this.grid.getVariable(7, 6),\n this.grid.getVariable(7, 5),\n this.grid.getVariable(7, 4),\n this.grid.getVariable(7, 3),\n this.grid.getVariable(7, 2),\n this.grid.getVariable(6, 2),\n this.grid.getVariable(5, 2),\n this.grid.getVariable(5, 1),\n this.grid.getVariable(5, 0)\n };\n vars.addAll(Arrays.asList(varArr));\n ArrayList<Set<Position>> cArr = new ArrayList<>();\n for (int i = 0; i < 14; i++) cArr.add(new HashSet<>());\n add(cArr.get(0), varArr[0], varArr[1]);\n add(cArr.get(1), varArr[0], varArr[1], varArr[2]);\n add(cArr.get(2), varArr[3], varArr[1], varArr[2]);\n add(cArr.get(3), varArr[3], varArr[4], varArr[2]);\n add(cArr.get(4), varArr[3], varArr[4], varArr[5]);\n add(cArr.get(5), varArr[6], varArr[4], varArr[5]);\n add(cArr.get(6), varArr[6], varArr[7], varArr[5], varArr[8], varArr[9]);\n add(cArr.get(7), varArr[8], varArr[9], varArr[10]);\n add(cArr.get(8), varArr[9], varArr[10], varArr[11], varArr[12], varArr[13]);\n add(cArr.get(9), varArr[12], varArr[13]);\n add(cArr.get(10), varArr[13]);\n add(cArr.get(11), varArr[13], varArr[14]);\n add(cArr.get(12), varArr[13], varArr[14], varArr[15]);\n add(cArr.get(13), varArr[14], varArr[15]);\n\n int[] cVal = new int[] { 1,2,2,1,1,1,2,1,2,1,1,2,3,2 };\n for (int i = 0; i < 14; i++) {\n constraints.add(new ConstraintInfo(cArr.get(i), cVal[i]));\n }\n\n MSModel model = new MSModel(constraints, vars);\n\n Set<Position> expectedBombs = new HashSet<>();\n expectedBombs.addAll(Arrays.asList(\n this.grid.getVariable(1, 6),\n this.grid.getVariable(2, 6),\n this.grid.getVariable(5, 6),\n this.grid.getVariable(5, 0),\n this.grid.getVariable(5, 1),\n this.grid.getVariable(5, 2)\n ));\n Set<Position> expectedNoBombs = new HashSet<>();\n expectedNoBombs.addAll(Arrays.asList(\n this.grid.getVariable(6,2),\n this.grid.getVariable(0,6),\n this.grid.getVariable(3,6),\n this.grid.getVariable(4,6),\n this.grid.getVariable(6,6)\n ));\n\n for (Position pos : vars) {\n if (expectedBombs.contains(pos)) {\n assertTrue(model.hasBomb(pos));\n } else {\n assertFalse(model.hasBomb(pos));\n }\n\n if (expectedNoBombs.contains(pos)) {\n assertTrue(model.hasNoBombs(pos));\n } else {\n assertFalse(model.hasNoBombs(pos));\n }\n }\n\n /*\n 00002x???\n 00003x???\n 00002xxx?\n 0000112x?\n 0000001x?\n 1221112x?\n xxxxxxxx?\n ?????????\n */\n }",
"protected static List<Triple> makeNewConstraints(PropertyMapping propMap,\n\t\t\tConstraintFunction constraintsOn) {\n\t\tList<Triple> rv = new ArrayList<>();\n\t\tfor (Entry<Pair<Var, ObservationProperty>, Set<Var>> entry : propMap\n\t\t\t\t.entrySet()) {\n\t\t\tPair<Var, ObservationProperty> key = entry.getKey();\n\t\t\tfor (Var otherVar : entry.getValue()) {\n\t\t\t\tfor (InequalityConstraint constraint : constraintsOn\n\t\t\t\t\t\t.apply(otherVar)) {\n\t\t\t\t\tconstraintToTriple(constraint, key.getLeft(),\n\t\t\t\t\t\t\tkey.getRight()).ifPresent(trip -> rv.add(trip));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}",
"protected void addConstraints() throws IloException {\n// Constrain (2)\n for (int i = 0; i < m; i++) {\n IloLinearNumExpr expr_2 = model.linearNumExpr();\n for (int j = 0; j < n; j++) {\n expr_2.addTerm(x[i][j], 1);\n }\n model.addLe(expr_2, supply[i]);\n }\n\n // Constrain (3)\n for (int j = 0; j < n; j++) {\n IloLinearNumExpr expr_3 = model.linearNumExpr();\n for (int i = 0; i < m; i++) {\n expr_3.addTerm(x[i][j], 1);\n }\n model.addEq(expr_3, demands[j]);\n }\n }",
"public PropagationRule(SecurityNode fo, Collection<HookInElement> elems) {\n\t this.fo = fo;\n this.elems = elems;\n }",
"void setConstraints(com.microsoft.schemas.crm._2011.contracts.ArrayOfConstraintRelation constraints);",
"protected abstract void createInnerEstimatorsIfNeeded();",
"void setViolations(Set<ConstraintViolation<T>> violations);",
"ISIntracomponentPropagation createISIntracomponentPropagation();",
"private ValueConstraint getConstraintFromFilters(Set<ElementFilter> filters) {\n\t\tExpr left = null;\r\n\t\tfor (ElementFilter filter : filters) {\r\n\t\t\tExpr filterExpr = ValueConstraintUtils.deepCopyExpr(filter.getExpr()); // create a copy of the expression\r\n\t\t\tif (left == null) {\r\n\t\t\t\tleft = filterExpr;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tleft = new E_LogicalAnd(left, filterExpr);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new ValueConstraint(left);\r\n\t}",
"RequireExprsRule createRequireExprsRule();",
"void setConstraints(List<MessageConstraint> allConstraints) {\n\t\tfor (MessageConstraint c : allConstraints) {\n\t\t\tif (c.getPortal() != this)\n\t\t\t\tcontinue;\n\t\t\tMap<Worker<?, ?>, MessageConstraint> senderMap = constraints.get(c.getSender());\n\t\t\tif (senderMap == null) {\n\t\t\t\tsenderMap = new IdentityHashMap<>();\n\t\t\t\tconstraints.put(c.getSender(), senderMap);\n\t\t\t}\n\t\t\tsenderMap.put(c.getRecipient(), c);\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic BasicSet LpClosure(BasicSet x){\r\n\r\n\t\tint used_imps=0;\r\n\t\tBasicSet old_closure = null;\r\n\t\tBasicSet new_closure;\r\n\t\tBasicSet T;\r\n\t\tint usable_imps;\r\n\t\tint use_now_imps;\r\n\t\tVector<String> att=context.getAttributes();\r\n\t\tBasicSet M = new BasicSet();\r\n\t\tM.addAll(att);\r\n\r\n\r\n\t\tint [] avoid=new int[M.size()];\r\n\t\tif(getImp().isEmpty())\r\n\t\t\treturn x;\r\n\t\tfor(int i=0;i<M.size();i++){\r\n\t\t\t//int a=(int)Math.pow(6,4);\r\n\t\t\tint entier =( 1 << getImp().size())-1;\r\n\r\n\t\t\tavoid[i]= entier;\r\n\t\t\t//System.out.println(\"L size \"+Limps.size()+\" entier \"+entier+\" i \"+i+ \" avoid \"+avoid[i]);\r\n\t\t\tfor(int k=0;k<getImp().size();k++){\r\n\t\t\t\tVector<Rule> rrr=(Vector<Rule>) getImp().clone();\r\n\r\n\t\t\t\tRule r=rrr.get(k);\r\n\r\n\t\t\t\tObject [] tt= M.toArray();\r\n\t\t\t\tString ite=(String) tt[i];\r\n\t\t\t\tBasicSet xx=new BasicSet();\r\n\t\t\t\txx.add(ite);\r\n\r\n\t\t\t\tBasicSet ant= (BasicSet) r.getAntecedent().clone();\r\n\r\n\t\t\t\tif(ant.contains(ite)){\r\n\r\n\t\t\t\t\tint bin=1 << k;\r\n\t\t\t\t\tavoid[i] &= ~bin;\t\t\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tused_imps=0;\r\n\t\told_closure=new BasicSet();\r\n\t\told_closure.add(\"-1\");\r\n\t\tnew_closure=x;\r\n\t\tint inter;\r\n\t\tint union;\r\n\r\n\t\twhile(!new_closure.equals(old_closure)){\r\n\t\t\told_closure=(BasicSet) new_closure.clone();\r\n\r\n\t\t\tT=M.difference(new_closure);\r\n\t\t\tint ent=1 << (getImp().size());\r\n\t\t\tinter=ent-1;\r\n\t\t\tunion =0;\r\n\r\n\t\t\tfor(int ii=0; ii<M.size(); ii++){\r\n\r\n\t\t\t\tObject[] tt=M.toArray();\r\n\t\t\t\tString ite=(String) tt[ii];\r\n\t\t\t\tif(T.contains(ite))\r\n\t\t\t\t\tinter &= avoid[ii];\r\n\t\t\t\tif(new_closure.contains(ite))\r\n\t\t\t\t\tunion |= avoid[ii];\r\n\t\t\t}\r\n\r\n\t\t\tusable_imps = inter & union;\r\n\r\n\t\t\tuse_now_imps = usable_imps & (~used_imps);\r\n\t\t\tused_imps = usable_imps;\r\n\r\n\t\t\tfor(int ii=0;ii<getImp().size();ii++){\r\n\r\n\t\t\t\tint enti=use_now_imps & (1 << ii);\r\n\r\n\t\t\t\t//System.out.println(\"enti \"+enti+\"basicset \"+old_closure);\r\n\t\t\t\tif( enti!= 0){\r\n\t\t\t\t\tVector<Rule> rrr=(Vector<Rule>) getImp().clone();\r\n\t\t\t\t\tRule r=rrr.get(ii);\r\n\t\t\t\t\tnew_closure=new_closure.union(r.getConsequence());\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn new_closure;\r\n\r\n\t}",
"void propagate(ProverEnvironment pProver, ProverEnvironment pSubsumptionProver)\n throws SolverException, InterruptedException, CPAException;",
"protected abstract void defineConstraints();",
"public List<Constraint> getConstraints();",
"A adapt(C constraint);",
"public interface Propagator extends PVCoordinatesProvider {\n\n /** Default mass. */\n double DEFAULT_MASS = 1000.0;\n\n /** Default attitude provider. */\n AttitudeProvider DEFAULT_LAW = InertialProvider.EME2000_ALIGNED;\n\n /** Indicator for slave mode. */\n int SLAVE_MODE = 0;\n\n /** Indicator for master mode. */\n int MASTER_MODE = 1;\n\n /** Indicator for ephemeris generation mode. */\n int EPHEMERIS_GENERATION_MODE = 2;\n\n /** Get the current operating mode of the propagator.\n * @return one of {@link #SLAVE_MODE}, {@link #MASTER_MODE},\n * {@link #EPHEMERIS_GENERATION_MODE}\n * @see #setSlaveMode()\n * @see #setMasterMode(double, OrekitFixedStepHandler)\n * @see #setMasterMode(OrekitStepHandler)\n * @see #setEphemerisMode()\n */\n int getMode();\n\n /** Set the propagator to slave mode.\n * <p>This mode is used when the user needs only the final orbit at the target time.\n * The (slave) propagator computes this result and return it to the calling\n * (master) application, without any intermediate feedback.\n * <p>This is the default mode.</p>\n * @see #setMasterMode(double, OrekitFixedStepHandler)\n * @see #setMasterMode(OrekitStepHandler)\n * @see #setEphemerisMode()\n * @see #getMode()\n * @see #SLAVE_MODE\n */\n void setSlaveMode();\n\n /** Set the propagator to master mode with fixed steps.\n * <p>This mode is used when the user needs to have some custom function called at the\n * end of each finalized step during integration. The (master) propagator integration\n * loop calls the (slave) application callback methods at each finalized step.</p>\n * @param h fixed stepsize (s)\n * @param handler handler called at the end of each finalized step\n * @see #setSlaveMode()\n * @see #setMasterMode(OrekitStepHandler)\n * @see #setEphemerisMode()\n * @see #getMode()\n * @see #MASTER_MODE\n */\n void setMasterMode(double h, OrekitFixedStepHandler handler);\n\n /** Set the propagator to master mode with variable steps.\n * <p>This mode is used when the user needs to have some custom function called at the\n * end of each finalized step during integration. The (master) propagator integration\n * loop calls the (slave) application callback methods at each finalized step.</p>\n * @param handler handler called at the end of each finalized step\n * @see #setSlaveMode()\n * @see #setMasterMode(double, OrekitFixedStepHandler)\n * @see #setEphemerisMode()\n * @see #getMode()\n * @see #MASTER_MODE\n */\n void setMasterMode(OrekitStepHandler handler);\n\n /** Set the propagator to ephemeris generation mode.\n * <p>This mode is used when the user needs random access to the orbit state at any time\n * between the initial and target times, and in no sequential order. A typical example is\n * the implementation of search and iterative algorithms that may navigate forward and\n * backward inside the propagation range before finding their result.</p>\n * <p>Beware that since this mode stores <strong>all</strong> intermediate results,\n * it may be memory intensive for long integration ranges and high precision/short\n * time steps.</p>\n * @see #getGeneratedEphemeris()\n * @see #setSlaveMode()\n * @see #setMasterMode(double, OrekitFixedStepHandler)\n * @see #setMasterMode(OrekitStepHandler)\n * @see #getMode()\n * @see #EPHEMERIS_GENERATION_MODE\n */\n void setEphemerisMode();\n\n /**\n * Set the propagator to ephemeris generation mode with the specified handler for each\n * integration step.\n *\n * <p>This mode is used when the user needs random access to the orbit state at any\n * time between the initial and target times, as well as access to the steps computed\n * by the integrator as in Master Mode. A typical example is the implementation of\n * search and iterative algorithms that may navigate forward and backward inside the\n * propagation range before finding their result.</p>\n *\n * <p>Beware that since this mode stores <strong>all</strong> intermediate results, it\n * may be memory intensive for long integration ranges and high precision/short time\n * steps.</p>\n *\n * @param handler handler called at the end of each finalized step\n * @see #setEphemerisMode()\n * @see #getGeneratedEphemeris()\n * @see #setSlaveMode()\n * @see #setMasterMode(double, OrekitFixedStepHandler)\n * @see #setMasterMode(OrekitStepHandler)\n * @see #getMode()\n * @see #EPHEMERIS_GENERATION_MODE\n */\n void setEphemerisMode(OrekitStepHandler handler);\n\n /** Get the ephemeris generated during propagation.\n * @return generated ephemeris\n * @exception IllegalStateException if the propagator was not set in ephemeris\n * generation mode before propagation\n * @see #setEphemerisMode()\n */\n BoundedPropagator getGeneratedEphemeris() throws IllegalStateException;\n\n /** Get the propagator initial state.\n * @return initial state\n * @exception OrekitException if state cannot be retrieved\n */\n SpacecraftState getInitialState() throws OrekitException;\n\n /** Reset the propagator initial state.\n * @param state new initial state to consider\n * @exception OrekitException if initial state cannot be reset\n */\n void resetInitialState(SpacecraftState state)\n throws OrekitException;\n\n /** Add a set of user-specified state parameters to be computed along with the orbit propagation.\n * @param additionalStateProvider provider for additional state\n * @exception OrekitException if an additional state with the same name is already present\n */\n void addAdditionalStateProvider(AdditionalStateProvider additionalStateProvider)\n throws OrekitException;\n\n /** Get an unmodifiable list of providers for additional state.\n * @return providers for the additional states\n */\n List<AdditionalStateProvider> getAdditionalStateProviders();\n\n /** Check if an additional state is managed.\n * <p>\n * Managed states are states for which the propagators know how to compute\n * its evolution. They correspond to additional states for which an\n * {@link AdditionalStateProvider additional state provider} has been registered\n * by calling the {@link #addAdditionalStateProvider(AdditionalStateProvider)\n * addAdditionalStateProvider} method. If the propagator is an {@link\n * org.orekit.propagation.integration.AbstractIntegratedPropagator integrator-based\n * propagator}, the states for which a set of {@link\n * org.orekit.propagation.integration.AdditionalEquations additional equations} has\n * been registered by calling the {@link\n * org.orekit.propagation.integration.AbstractIntegratedPropagator#addAdditionalEquations(\n * org.orekit.propagation.integration.AdditionalEquations) addAdditionalEquations}\n * method are also counted as managed additional states.\n * </p>\n * <p>\n * Additional states that are present in the {@link #getInitialState() initial state}\n * but have no evolution method registered are <em>not</em> considered as managed states.\n * These unmanaged additional states are not lost during propagation, though. Their\n * value will simply be copied unchanged throughout propagation.\n * </p>\n * @param name name of the additional state\n * @return true if the additional state is managed\n */\n boolean isAdditionalStateManaged(String name);\n\n /** Get all the names of all managed states.\n * @return names of all managed states\n */\n String[] getManagedAdditionalStates();\n\n /** Add an event detector.\n * @param detector event detector to add\n * @see #clearEventsDetectors()\n * @see #getEventsDetectors()\n * @param <T> class type for the generic version\n */\n <T extends EventDetector> void addEventDetector(T detector);\n\n /** Get all the events detectors that have been added.\n * @return an unmodifiable collection of the added detectors\n * @see #addEventDetector(EventDetector)\n * @see #clearEventsDetectors()\n */\n Collection<EventDetector> getEventsDetectors();\n\n /** Remove all events detectors.\n * @see #addEventDetector(EventDetector)\n * @see #getEventsDetectors()\n */\n void clearEventsDetectors();\n\n /** Get attitude provider.\n * @return attitude provider\n */\n AttitudeProvider getAttitudeProvider();\n\n /** Set attitude provider.\n * @param attitudeProvider attitude provider\n */\n void setAttitudeProvider(AttitudeProvider attitudeProvider);\n\n /** Get the frame in which the orbit is propagated.\n * <p>\n * The propagation frame is the definition frame of the initial\n * state, so this method should be called after this state has\n * been set, otherwise it may return null.\n * </p>\n * @return frame in which the orbit is propagated\n * @see #resetInitialState(SpacecraftState)\n */\n Frame getFrame();\n\n /** Propagate towards a target date.\n * <p>Simple propagators use only the target date as the specification for\n * computing the propagated state. More feature rich propagators can consider\n * other information and provide different operating modes or G-stop\n * facilities to stop at pinpointed events occurrences. In these cases, the\n * target date is only a hint, not a mandatory objective.</p>\n * @param target target date towards which orbit state should be propagated\n * @return propagated state\n * @exception OrekitException if state cannot be propagated\n */\n SpacecraftState propagate(AbsoluteDate target) throws OrekitException;\n\n /** Propagate from a start date towards a target date.\n * <p>Those propagators use a start date and a target date to\n * compute the propagated state. For propagators using event detection mechanism,\n * if the provided start date is different from the initial state date, a first,\n * simple propagation is performed, without processing any event computation.\n * Then complete propagation is performed from start date to target date.</p>\n * @param start start date from which orbit state should be propagated\n * @param target target date to which orbit state should be propagated\n * @return propagated state\n * @exception OrekitException if state cannot be propagated\n */\n SpacecraftState propagate(AbsoluteDate start, AbsoluteDate target) throws OrekitException;\n\n}",
"public static void main(String[] args) throws UnsatisfiableConstraintSetException{\n\t\tint order = 1;\n\t\tBidirectionalVariableOrderPrefixIDMap<CharacterToken> statesByIndex = new BidirectionalVariableOrderPrefixIDMap<CharacterToken>(order);\n\t\t\n\t\tfinal CharacterToken cToken = new CharacterToken('C');\n\t\tint cID = statesByIndex.addPrefix(new LinkedList<CharacterToken>(Arrays.asList(cToken)));\n\t\tfinal CharacterToken dToken = new CharacterToken('D');\n\t\tint dID = statesByIndex.addPrefix(new LinkedList<CharacterToken>(Arrays.asList(dToken)));\n\t\tfinal CharacterToken eToken = new CharacterToken('E');\n\t\tint eID = statesByIndex.addPrefix(new LinkedList<CharacterToken>(Arrays.asList(eToken)));\n\t\t\n\t\tMap<Integer, Map<Integer, Double>> transitions = new HashMap<Integer, Map<Integer, Double>>();\n\t\t\n\t\tMap<Integer, Double> priors = new HashMap<Integer, Double>();\n\t\tpriors.put(cID, .5);\n\t\tpriors.put(dID, 1.0/6);\n\t\tpriors.put(eID, 1.0/3);\n\n\t\tfinal HashMap<Integer, Double> transFromC = new HashMap<Integer, Double>();\n\t\ttransFromC.put(cID, .5);\n\t\ttransFromC.put(dID, .25);\n\t\ttransFromC.put(eID, .25);\n\t\ttransitions.put(cID, transFromC);\n\t\t\n\t\tfinal HashMap<Integer, Double> transFromD = new HashMap<Integer, Double>();\n\t\ttransFromD.put(cID, .5);\n//\t\ttransFromD.put(dID, 0.);\n\t\ttransFromD.put(eID, .5);\n\t\ttransitions.put(dID, transFromD);\n\t\t\n\t\tfinal HashMap<Integer, Double> transFromE = new HashMap<Integer, Double>();\n\t\ttransFromE.put(cID, .5);\n\t\ttransFromE.put(dID, .25);\n\t\ttransFromE.put(eID, .25);\n\t\ttransitions.put(eID, transFromE);\n\t\t\n\t\tSparseVariableOrderMarkovModel<CharacterToken> model = new SparseVariableOrderMarkovModel<CharacterToken>(statesByIndex, priors, transitions);\n\t\t\n\t\tCharacterToken[][] seqs = new CharacterToken[][] {\n\t\t\tnew CharacterToken[]{cToken, cToken, cToken, dToken},\n\t\t\tnew CharacterToken[]{cToken, cToken, eToken, dToken},\n\t\t\tnew CharacterToken[]{cToken, eToken, cToken, dToken},\n\t\t\tnew CharacterToken[]{cToken, eToken, eToken, dToken},\n\t\t\tnew CharacterToken[]{cToken, dToken, cToken, dToken},\n\t\t\tnew CharacterToken[]{cToken, dToken, eToken, dToken}\n\t\t};\n\n\t\tSystem.out.println(\"UNCONSTRAINED:\");\n\t\tfor (CharacterToken[] seq : seqs) {\n\t\t\tSystem.out.println(\"Seq:\" + Arrays.toString(seq) + \" Prob:\" + model.probabilityOfSequence(seq));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tSystem.out.println(\"\" + (i+1) + \": \" + model.generate(4));\n\t\t}\n\t\t\n\t\tSystem.out.println(\"CONSTRAINED:\");\n\t\t\n\t\tint length = 4;\n\t\tList<List<ConditionedConstraint<CharacterToken>>> constraints = new ArrayList<List<ConditionedConstraint<CharacterToken>>>(); \n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tconstraints.add(new ArrayList<ConditionedConstraint<CharacterToken>>());\n\t\t}\n\t\tconstraints.get(3).add(new ConditionedConstraint<>(new CharacterTokenConstraint<CharacterToken>(new CharacterToken('D')),true));\n\t\t\n\t\tSparseVariableOrderNHMMMultiThreaded<CharacterToken> constrainedModel = null;\n\t\ttry {\n\t\t\tconstrainedModel = new SparseVariableOrderNHMMMultiThreaded<CharacterToken>(model, length, constraints);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tfor (CharacterToken[] seq : seqs) {\n\t\t\tSystem.out.println(\"Seq:\" + Arrays.toString(seq) + \" Prob:\" + constrainedModel.probabilityOfSequence(seq));\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tSystem.out.println(\"\" + (i+1) + \": \" + constrainedModel.generate(4));\n\t\t}\n\t}",
"private void addParBinders(Binder[] binder, List<Condition> conds)\n {\n int n = binder.length;\n List<Binder> binder0 = new ArrayList<Binder>(n);\n for (int i=0; i<n; i++)\n binder0.add(transform(binder[i]));\n for (Condition c : conds)\n {\n Expression ce = n == 0 ? c.exp : new LetParExp(binder0, c.exp);\n conditions.add(c.clone(ce));\n }\n }",
"ISChangePropagationDueToInterfaceDependencies createISChangePropagationDueToInterfaceDependencies();",
"private Grammar createCombinedGrammar(List<ClassDSLInformation> classesInfos) {\n\n\tLinkedList<GrammarCollectionBox> collectionCollector = new LinkedList<GrammarCollectionBox>();\n\n\tfor (ClassDSLInformation classInfo : classesInfos) {\n\n\t List<MethodDSLInformation> validMinfs = filterOnlyValidMethodInformations(classInfo);\n\n\t for (MethodDSLInformation methodInfo : validMinfs) {\n\n\t\tGrammarCollectionBox box = new GrammarCollectionBox(methodInfo);\n\n\t\tDslMethodType dslType = methodInfo.getDSLType();\n\t\tswitch (dslType) {\n\n\t\tcase Literal:\n\t\t // this.handleLiteral(methodInfo, box,\n\t\t // getTypeHandlerConfigurationOnGrammar(classesInfos, box));\n\t\t // this.handleNonLiteral(methodInfo, box,\n\t\t // getTypeHandlerConfigurationOnGrammar(classesInfos, box));\n\t\t // break;\n\t\t //$FALL-THROUGH$\n\t\tcase Operation:\n\t\t this.handleNonLiteral(methodInfo, box, getTypeHandlerConfigurationOnGrammar(classesInfos, box));\n\t\t break;\n\n\t\tcase AbstractionOperator:\n\t\t throw new UnsupportedOperationException(\"Functionality not yet implemented for \" + dslType);\n\t\tdefault:\n\t\t throw illegalForArg(dslType);\n\t\t}\n\t\tcollectionCollector.add(box);\n\t }\n\t}\n\n\t/* Add rule annotations where necessary */\n\n\t// build lookup list for relative priorization lookup\n\tMap<String, GrammarCollectionBox> uidLookupList = new HashMap<String, GrammarCollectionBox>();\n\tfor (GrammarCollectionBox box : collectionCollector) {\n\t uidLookupList.put(box.methodInfo.getUniqueIdentifier(), box);\n\t}\n\tuidLookupList = Collections.unmodifiableMap(uidLookupList);\n\tfor (GrammarCollectionBox grammarCollectionBox : collectionCollector) {\n\t addRuleAnnotations(grammarCollectionBox, uidLookupList);\n\t}\n\n\t/*\n\t * Assemble actual grammar from collected and configured rules and\n\t * categories\n\t */\n\tGrammar grammar = new Grammar();\n\tthis.setupGeneralGrammar(grammar);\n\n\tboolean waterSupported = isWaterSupported(classesInfos);\n\tif (waterSupported) {\n\t this.setWaterEnabled(waterSupported, grammar);\n\t}\n\n\tfor (ClassDSLInformation classInfo : classesInfos) {\n\t this.setupHostLanguageRules(classInfo.getHostLanguageRules(), grammar);\n\t}\n\n\tfor (GrammarCollectionBox box : collectionCollector) {\n\t addBoxContentToGrammar(box, grammar);\n\t}\n\n\treturn grammar;\n }",
"EnsureExprsRule createEnsureExprsRule();",
"@Override\n public Petrinet compose(String id, Set<String> flags, Context context, Petrinet... petrinets) throws CompilationException {\n\n Petrinet x = petrinets[0].reId(\"G\");\n MultiProcessModel model = buildmpmFromPetri(x);\n Map<Multiset<PetriNetPlace>, AutomatonNode> markingToNode = model.getProcessNodesMapping().getMarkingToNode();\n //Map<AutomatonNode, Multiset<PetriNetPlace> > nodeToMarking = model.getProcessNodesMapping().getNodeToMarking();\n\n return composeM(id,flags,context,markingToNode,x);\n }",
"public Set<MetaConstraint<?>> getCrossParameterConstraints()\n/* */ {\n/* 162 */ return this.crossParameterConstraints;\n/* */ }",
"public PropGeost(IntVar[] vars, int k, List<GeostObject> objects, List<ShiftedBox> shiftedBoxes,\n List<ExternalConstraint> ectr, List<int[]> ctrlVs, boolean memo_active,\n HashMap<Pair<Integer, Integer>, Boolean> included,\n boolean increment_, Solver solver) {\n\n super(vars, PropagatorPriority.VERY_SLOW, false);\n\n cst = new Constants();\n stp = new Setup(cst, solver.getEngine(), this);\n intermediateLayer = new IntermediateLayer();\n externalLayer = new ExternalLayer(cst, stp);\n geometricKernel = new GeometricKernel(cst, stp, externalLayer, intermediateLayer, memo_active, included, solver, this);\n\n cst.setDIM(k);\n this.ctrlVs = ctrlVs;\n\n stp.SetupTheProblem(objects, shiftedBoxes, ectr);\n\n //this should be changed and be provided globally to the system\n oIDs = new int[stp.getNbOfObjects()];\n for (int i = 0; i < stp.getNbOfObjects(); i++) {\n oIDs[i] = objects.get(i).getObjectId();\n }\n lastNonFixedO = solver.getEnvironment().makeInt(oIDs.length);\n\n this.s = solver;\n this.mengine = (MutePropagationEngine) solver.getEngine();\n this.greedyMode = 1;\n this.increment = increment_;\n\n\n// IntVar D = VariableFactory.bounded(\"D\", 0, 100, s);\n\n\n }",
"private static Instruction propagateAllInputPrivacy(VariableCPInstruction inst, ExecutionContext ec){\n\t\treturn mergePrivacyConstraintsFromInput(\n\t\t\tinst, \n\t\t\tec, \n\t\t\tinst.getInputs().toArray(new CPOperand[0]), \n\t\t\tinst.getOutput()\n\t\t);\n\t}",
"private ChainedTransformer(Transformer[] transformers) {\n super();\n iTransformers = transformers;\n }",
"ISChangePropagationDueToDataDependencies createISChangePropagationDueToDataDependencies();",
"private void generalizeCSARequirements(){\n\t\tArrayList<ServiceTemplate> comps = new ArrayList<ServiceTemplate>() ;\n\t\tArrayList<Requirement> reqs = new ArrayList<Requirement>() ;\n\t\t\n\t\tcomps = this.data.getServiceTemplates();\n\t\treqs = this.data.getRequirements();\n\t\t\n\t\tfor(ServiceTemplate c : comps){\n\t\t\tfor(Requirement r : reqs){\n\t\t\t\tRequirement temp = new Requirement();\n\t\t\t\ttry {\n\t\t\t\t\tBeanUtils.copyProperties(temp, r);\n\t\t\t\t\t//System.out.println(r.toString());\n\t\t\t\t\t//System.out.println(temp.toString());\n\t\t\t\t\tc.addReq(temp);\n\t\t\t\t} catch (IllegalAccessException | InvocationTargetException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}",
"private void addVertexVisitConstraint(){\n\n for (int vertex=0; vertex < vertexCount; vertex++){\n Integer[] pos = new Integer[variables.length];\n for (int position =0; position < positionCount; position++){\n pos[position] = variables[position][vertex];\n }\n addExactlyOne(pos);\n }\n }",
"static Optionage compose(Optionage priority, Optionage...lessers) {\n requireNonNull(priority, \"priority\");\n List<Optionage> optionages = Stream.concat(Stream.of(priority), Stream.of(lessers)).collect(Collectors.toList());\n return new Optionage() {\n @Override\n public Set<? extends Doclet.Option> getSupportedOptions() {\n return optionages.stream()\n .flatMap(optionage -> optionage.getSupportedOptions().stream())\n .collect(Collectors.toSet());\n }\n\n @Nullable\n @Override\n public List<String> getOptionStrings(String name) {\n for (Optionage optionage : optionages) {\n @Nullable List<String> paramValues = optionage.getOptionStrings(name);\n if (paramValues != null) {\n return paramValues;\n }\n }\n return null;\n }\n\n @Override\n public String getOptionString(String name, String defaultValue) {\n for (Optionage optionage : optionages) {\n String value = optionage.getOptionString(name, null);\n if (value != null) {\n return value;\n }\n }\n return defaultValue;\n }\n\n @Override\n public boolean isPresent(String name) {\n return optionages.stream().anyMatch(optionage -> optionage.isPresent(name));\n }\n };\n }",
"private void addVertexPositionConstraint(){\n for (int vertex=0; vertex < vertexCount; vertex++){\n addExactlyOne(variables[vertex]);\n }\n }",
"public void generatePropositions() {\r\n propositions.clear();\r\n\r\n\t\t// holds alternative options for each constituents (obtained by\r\n // processing coordinated conjunctions and xcomps)\r\n final List<List<Constituent>> constituents = new ArrayList<List<Constituent>>();\r\n\r\n // which of the constituents are required?\r\n final List<Flag> flags = new ArrayList<Flag>();\r\n final List<Boolean> include = new ArrayList<Boolean>();\r\n\r\n\t\t// holds all valid combination of constituents for which a proposition\r\n // is to be generated\r\n final List<List<Boolean>> includeConstituents = new ArrayList<List<Boolean>>();\r\n\r\n // let's start\r\n for (Clause clause : clauses) {\r\n // process coordinating conjunctions\r\n constituents.clear();\r\n for (int i = 0; i < clause.constituents.size(); i++) {\r\n\t\t\t\t// if(xcomp && clause.subject == i) continue; //An xcomp does\r\n // not have an internal subject so should not be processed here\r\n Constituent constituent = clause.constituents.get(i);\r\n List<Constituent> alternatives;\r\n if (!(xcomp && clause.subject == i)\r\n && constituent instanceof IndexedConstituent\r\n // the processing of the xcomps is done in Default\r\n // proposition generator. \r\n // Otherwise we get duplicate propositions.\r\n && !clause.xcomps.contains(i)\r\n && ((i == clause.verb && options.processCcAllVerbs) || (i != clause.verb && options.processCcNonVerbs))) {\r\n alternatives = ProcessConjunctions.processCC(depTree,\r\n clause, constituent, i);\r\n } else if (!(xcomp && clause.subject == i)\r\n && clause.xcomps.contains(i)) {\r\n alternatives = new ArrayList<Constituent>();\r\n ClausIE xclausIE = new ClausIE(options);\r\n xclausIE.semanticGraph = semanticGraph;\r\n xclausIE.depTree = depTree;\r\n xclausIE.xcomp = true;\r\n xclausIE.clauses = ((XcompConstituent) clause.constituents\r\n .get(i)).getClauses();\r\n xclausIE.generatePropositions();\r\n for (Proposition p : xclausIE.propositions) {\r\n StringBuilder sb = new StringBuilder();\r\n String sep = \"\";\r\n for (int j = 0; j < p.constituents.size(); j++) {\r\n if (j == 0) // to avoid including the subjecct, We\r\n {\r\n continue; // could also generate the prop\r\n }\t\t\t\t\t\t\t // without the subject\t\t\t\t\t\t\t\t\t\t\t\r\n sb.append(sep);\r\n sb.append(p.constituents.get(j));\r\n sep = \" \";\r\n }\r\n alternatives.add(new TextConstituent(sb.toString(),\r\n constituent.type));\r\n }\r\n } else {\r\n alternatives = new ArrayList<Constituent>(1);\r\n alternatives.add(constituent);\r\n }\r\n constituents.add(alternatives);\r\n }\r\n\r\n\t\t\t// create a list of all combinations of constituents for which a\r\n // proposition should be generated\r\n includeConstituents.clear();\r\n flags.clear();\r\n include.clear();\r\n for (int i = 0; i < clause.constituents.size(); i++) {\r\n Flag flag = clause.getFlag(i, options);\r\n flags.add(flag);\r\n include.add(!flag.equals(Flag.IGNORE));\r\n }\r\n if (options.nary) {\r\n\t\t\t\t// we always include all constituents for n-ary ouput \r\n // (optional parts marked later)\r\n includeConstituents.add(include);\r\n } else {\r\n // triple mode; determine which parts are required\r\n for (int i = 0; i < clause.constituents.size(); i++) {\r\n include.set(i, flags.get(i).equals(Flag.REQUIRED));\r\n }\r\n\r\n // create combinations of required/optional constituents\r\n new Runnable() {\r\n int noOptional;\r\n\r\n // @Override\r\n public void run() {\r\n noOptional = 0;\r\n for (Flag f : flags) {\r\n if (f.equals(Flag.OPTIONAL)) {\r\n noOptional++;\r\n }\r\n }\r\n run(0, 0, new ArrayList<Boolean>());\r\n }\r\n\r\n private void run(int pos, int selected, List<Boolean> prefix) {\r\n if (pos >= include.size()) {\r\n if (selected >= Math.min(options.minOptionalArgs,\r\n noOptional)\r\n && selected <= options.maxOptionalArgs) {\r\n includeConstituents.add(new ArrayList<Boolean>(\r\n prefix));\r\n }\r\n return;\r\n }\r\n prefix.add(true);\r\n if (include.get(pos)) {\r\n run(pos + 1, selected, prefix);\r\n } else {\r\n if (!flags.get(pos).equals(Flag.IGNORE)) {\r\n run(pos + 1, selected + 1, prefix);\r\n }\r\n prefix.set(prefix.size() - 1, false);\r\n run(pos + 1, selected, prefix);\r\n }\r\n prefix.remove(prefix.size() - 1);\r\n }\r\n }.run();\r\n }\r\n\r\n // create a temporary clause for which to generate a proposition\r\n final Clause tempClause = clause.clone();\r\n\r\n // generate propositions\r\n new Runnable() {\r\n public void run() {\r\n // select which constituents to include\r\n for (List<Boolean> include : includeConstituents) {\r\n // now select an alternative for each constituent\r\n selectConstituent(0, include);\r\n }\r\n }\r\n\r\n void selectConstituent(int i, List<Boolean> include) {\r\n if (i < constituents.size()) {\r\n if (include.get(i)) {\r\n List<Constituent> alternatives = constituents\r\n .get(i);\r\n for (int j = 0; j < alternatives.size(); j++) {\r\n tempClause.constituents.set(i,\r\n alternatives.get(j));\r\n selectConstituent(i + 1, include);\r\n }\r\n } else {\r\n selectConstituent(i + 1, include);\r\n }\r\n } else {\r\n // everything selected; generate\r\n propositionGenerator.generate(propositions, tempClause,\r\n include);\r\n }\r\n }\r\n }.run();\r\n }\r\n }",
"private static void addTripToGraph(Trip newTrip, Graph<Node, WeightEdge> graph, List<Node> depots, List<Node> trips, Problem problem){\n Node tripStart = new Node(newTrip, 0, false);\n Node tripEnd = new Node(newTrip, 0, true);\n\n graph.addVertex(tripStart);\n graph.addVertex(tripEnd);\n\n // Add weightEdgeWithBounders from trip startPoint to trip endPoint\n // lowerBound and upperBound for this edges is 1, because we are looking for solution that saturates all trips\n WeightEdge tripInternalWeightEdge = new BoundedWeightEdge(1,1);\n graph.addEdge(tripStart, tripEnd, tripInternalWeightEdge);\n graph.setEdgeWeight(tripInternalWeightEdge, 0);\n\n for(Node depot : depots){\n if(depot.isExitNode()){ // is source\n // add weightEdgeWithBounders from depot source to trip startPoint\n WeightEdge depotToTripWeightEdge = new BoundedWeightEdge(0, 1);\n graph.addEdge(depot, tripStart, depotToTripWeightEdge);\n graph.setEdgeWeight(depotToTripWeightEdge, problem.getCost(depot.getLocation(), tripStart.getLocation()).toMinutes());\n }else{ // is depot sink\n // add weightEdgeWithBounders from trip endPoint to depot sink\n WeightEdge tripToDepotWeightEdge = new BoundedWeightEdge(0, 1);\n graph.addEdge(tripEnd, depot, tripToDepotWeightEdge);\n graph.setEdgeWeight(tripToDepotWeightEdge, problem.getCost(tripEnd.getLocation(), depot.getLocation()).toMinutes());\n }\n }\n\n for(Node otherTrip : trips){\n if(otherTrip.isExitNode()){\n // add feasible edges from all trips endPoints to this trip startPoint\n if(isFeasibleEdge(otherTrip, tripStart, problem)){\n WeightEdge otherTripToThisTrip = new BoundedWeightEdge(0, 1);\n graph.addEdge(otherTrip, tripStart, otherTripToThisTrip);\n graph.setEdgeWeight(otherTripToThisTrip, problem.getCost(otherTrip.getLocation(), tripStart.getLocation()).toMinutes());\n }\n }else{\n // add feasible edges from this trip endPoint to all trips startPoints\n if(isFeasibleEdge(tripEnd, otherTrip, problem)){\n WeightEdge thisTripToOtherTrip = new BoundedWeightEdge(0, 1);\n graph.addEdge(tripEnd, otherTrip, thisTripToOtherTrip);\n graph.setEdgeWeight(thisTripToOtherTrip, problem.getCost(tripEnd.getLocation(), otherTrip.getLocation()).toMinutes());\n }\n }\n }\n\n // add this nodes in our trips list;\n trips.add(tripStart);\n trips.add(tripEnd);\n }",
"public static Transformer chainedTransformer(Collection transformers) {\n Transformer[] trs = null;\n if (transformers == null) {\n throw new IllegalArgumentException(\"The transformer collection must not be null\");\n }\n // convert to array like this to guarantee iterator() ordering\n trs = new Transformer[transformers.size()];\n int i = 0;\n for (Iterator it = transformers.iterator(); it.hasNext();) {\n trs[i++] = (Transformer) it.next();\n }\n validate(trs);\n return new ChainedTransformer(trs);\n }",
"public interface Solution\n{\n Collection<Point_dt> solve(Delaunay_Triangulation triangulation,\n ImmutableCollection<Point_dt> guards,\n ImmutableCollection<Point_dt> diamonds);\n}",
"private void createConstraintsForSingleton() {\n \t\tSet s = slice.entrySet();\n \t\tfor (Iterator iterator = s.iterator(); iterator.hasNext();) {\n \t\t\tMap.Entry entry = (Map.Entry) iterator.next();\n \t\t\tHashMap conflictingEntries = (HashMap) entry.getValue();\n \t\t\tif (conflictingEntries.size() < 2)\n \t\t\t\tcontinue;\n \n \t\t\tCollection conflictingVersions = conflictingEntries.values();\n \t\t\tString singletonRule = \"\"; //$NON-NLS-1$\n \t\t\tArrayList nonSingleton = new ArrayList();\n \t\t\tint countSingleton = 0;\n \t\t\tfor (Iterator conflictIterator = conflictingVersions.iterator(); conflictIterator.hasNext();) {\n \t\t\t\tIInstallableUnit conflictElt = (IInstallableUnit) conflictIterator.next();\n \t\t\t\tif (conflictElt.isSingleton()) {\n \t\t\t\t\tsingletonRule += \" -1 \" + getVariable(conflictElt); //$NON-NLS-1$\n \t\t\t\t\tcountSingleton++;\n \t\t\t\t} else {\n \t\t\t\t\tnonSingleton.add(conflictElt);\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (countSingleton == 0)\n \t\t\t\tcontinue;\n \n \t\t\tfor (Iterator iterator2 = nonSingleton.iterator(); iterator2.hasNext();) {\n \t\t\t\tconstraints.add(singletonRule + \" -1 \" + getVariable((IInstallableUnit) iterator2.next()) + \" >= -1;\"); //$NON-NLS-1$ //$NON-NLS-2$\n \t\t\t}\n \t\t\tsingletonRule += \" >= -1;\"; //$NON-NLS-1$\n \t\t\tconstraints.add(singletonRule);\n \t\t}\n \t}",
"private JCMethodDecl makeAddTriggersMethod(DiagnosticPosition diagPos, \n JFXClassDeclaration cDecl,\n List<ClassSymbol> javafxSupers,\n List<TranslatedAttributeInfo> translatedAttrInfo,\n List<TranslatedOverrideAttributeInfo> translatedTriggerInfo) {\n ListBuffer<JCStatement> stmts = ListBuffer.lb();\n \n // call the superclasses addTriggers\n stmts.appendList( makeAllSuperCalls(diagPos, javafxSupers, addTriggersName) );\n \n // add change listeners for triggers on attribute definitions\n for (TranslatedAttributeInfo info : translatedAttrInfo) {\n JCStatement stat = makeChangeListenerCall(info);\n if (stat != null)\n stmts.append(stat);\n }\n \n // add change listeners for \"with\" triggers\n for (TranslatedOverrideAttributeInfo info : translatedTriggerInfo) {\n JCStatement stat = makeChangeListenerCall(info);\n if (stat != null)\n stmts.append(stat);\n }\n \n return make.at(diagPos).MethodDef(\n make.Modifiers(Flags.PUBLIC | (cDecl.generateClassOnly()? 0L : Flags.STATIC) ),\n addTriggersName,\n toJava.makeTypeTree(syms.voidType, null),\n List.<JCTypeParameter>nil(),\n List.<JCVariableDecl>of( toJava.makeReceiverParam(cDecl) ),\n List.<JCExpression>nil(),\n make.Block(0L, stmts.toList()),\n null);\n }",
"protected PrecedenceConstraint(CriticalSet cs, Decision reference, Decision target, double cost) {\n\t\tsuper(cs, cost);\n\t\tthis.reference = reference;\n\t\tthis.target = target;\n\t}",
"public RemoteMethodControl setConstraints(MethodConstraints constraints) \n {\n\tRemoteMethodControl rmc = (RemoteMethodControl) getSource(); \n\tJavaSpace spaceProxy = (JavaSpace) rmc.setConstraints(constraints);\n\treturn new ConstrainableOutriggerAvailabilityEvent(\n\t\tspaceProxy,\n\t\tgetID(),\n\t\tgetSequenceNumber(),\n\t\tgetRegistrationInstance(),\n\t\tisVisibilityTransition(),\n\t\tgetEntryRep()\n\t);\n }",
"private void addImplications(Expression ante, List<Condition> conds)\n {\n Expression ante0 = transform(ante);\n for (Condition c : conds)\n {\n Expression ce = new ImpliesExp(ante0, c.exp);\n conditions.add(c.clone(ce));\n }\n }",
"public Builder addConstraints(Collection<ClusterConstraints> constraints) {\n for (ClusterConstraints constraint : constraints) {\n addConstraint(constraint);\n }\n return this;\n }",
"@Test\n void testGrammarBasics() {\n Production<NT, T> prod1 = new Production<>(NT.A, List.of(\n left(NT.B), right(T.E)\n ));\n\n Production<NT, T> prod2 = new Production<>(NT.B, List.of(\n right(T.F)\n ));\n\n Production<NT, T> prod3 = prod1.withSource(NT.C).withRule(List.of(\n left(NT.B), right(T.F), left(NT.C), left(NT.A)\n ));\n\n assertThrows(IllegalArgumentException.class, () -> new CFGrammar<>(NT.C, List.of(prod1, prod2)));\n assertThrows(IllegalArgumentException.class, () -> new CFGrammar<>(NT.C, List.of(prod3, prod2)));\n\n Production<NT, T> prod4 = new Production<>(NT.A, List.of(\n left(NT.B), right(T.E)\n ));\n\n Production<NT, T> prod5 = new Production<>(NT.B, List.of(\n left(NT.A), right(T.E)\n ));\n\n assertThrows(IllegalArgumentException.class, () -> new CFGrammar<>(NT.A, List.of(prod4)));\n\n CFGrammar<NT, T, Production<NT, T>> g = new CFGrammar<>(NT.A, List.of(prod4, prod5));\n assertEquals(HashSet.of(NT.B, NT.A), g.getNonTerminalsUsed());\n assertEquals(HashSet.of(T.E), g.getTerminalsUsed());\n }",
"Chain createChain();",
"private void computeSat(){\n addVertexVisitConstraint();\n //add clause for each vertex must be visited only once/ all vertices must be on path\n addVertexPositionConstraint();\n //add clause for every edge in graph to satisfy constraint of vertices not belonging to edge not part of successive positions\n addVertexNonEdgeConstraint();\n }",
"private void setProcessorConstraints(ProcessorDistributionKey key)\n {\n myProcessorBuilder\n .setPositiveConstraints(new Constraints(new StrictTimeConstraint(key.getConstraintKey(), key.getTimeSpan())));\n myProcessorBuilder.setNegativeConstraints(\n new Constraints(TimeConstraint.getNegativeTimeConstraint(key.getConstraintKey(), key.getTimeSpan())));\n }",
"public ModelElement getConstraints() {\n\tmodelElement.clearConstraint();\n\tjava.util.Iterator iterator = getPnlDataSelector().getObjects().iterator();\n\ttry {\n\t\twhile (iterator.hasNext()) {\n\t\t\tObject eleo=iterator.next();\n\t\t\tConstraintDef constraintDef = null;\n\t\t\tif(eleo instanceof NlsString){\n\t\t\t\t// new constraint\n\t\t\t\tConstraintExpression expression = new ConstraintExpression();\n\t\t\t\texpression.setSyntax((NlsString)eleo);\n\t\t\t\tconstraintDef = (ConstraintDef)ElementFactory.createObject(ConstraintDef.class);\n\t\t\t\tconstraintDef.setBody(expression);\n\t\t\t}else{\n\t\t\t\t// existing constraint\n\t\t\t\tconstraintDef = (ConstraintDef)eleo;\n\t\t\t}\n\t\t\tmodelElement.addConstraint(constraintDef);\n\t\t}\n\t} catch(Throwable e) {\n\t\thandleException(e);\n\t}\n\treturn modelElement;\n}",
"public PropertyDefList createDependings()\n throws MatrixException\n {\n for (final PropertyDef prop : this.properties) {\n if (prop.getTo() != null) {\n prop.getTo().create();\n }\n }\n\n return this;\n }",
"AgentPolicyBuilder buildUpon(AgentPolicy agentPolicy);",
"public Propagator setNumericalPropagator(Propagator prop, double dragArea, double solarArea) throws OrekitException{\n final Frame earthFrame = FramesFactory.getITRF(IERSConventions.IERS_2003, true);\n final OneAxisEllipsoid earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, Constants.WGS84_EARTH_FLATTENING, earthFrame);\n\n //Add the gravity model with Harmonics\n GravityFieldFactory.clearPotentialCoefficientsReaders();\n ICGEMFormatReader reader = new ICGEMFormatReader(ICGEM_FILENAME, false);\n GravityFieldFactory.addPotentialCoefficientsReader(reader);\n final NormalizedSphericalHarmonicsProvider harmonicsProvider = GravityFieldFactory.getNormalizedProvider(21, 21);\n ((NumericalPropagator)prop).addForceModel(new HolmesFeatherstoneAttractionModel(earthFrame, harmonicsProvider));\n \n //Add the drag model (DTM2000 model)\n double dragCoeff = 2.2;\n\n String supportedNames = \"(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\\\p{Digit}\\\\p{Digit}\\\\p{Digit}\\\\p{Digit}F10\\\\.(?:txt|TXT)\";\n MarshallSolarActivityFutureEstimation.StrengthLevel strengthlevel = MarshallSolarActivityFutureEstimation.StrengthLevel.AVERAGE;\n DTM2000InputParameters parameters = new MarshallSolarActivityFutureEstimation(supportedNames, strengthlevel);\n Atmosphere atmosphere = new DTM2000(parameters, CelestialBodyFactory.getSun(), earth);\n DragSensitive spacecraft = new IsotropicDrag(dragArea, dragCoeff);\n ((NumericalPropagator)prop).addForceModel(new DragForce(atmosphere, spacecraft));\n \n ((NumericalPropagator)prop).addForceModel(new ThirdBodyAttraction(CelestialBodyFactory.getSun()));\n \n ((NumericalPropagator)prop).addForceModel(new ThirdBodyAttraction(CelestialBodyFactory.getMoon()));\n\n\n //Add the solar radiation pressure model\n double equatorialRadius = Constants.WGS84_EARTH_EQUATORIAL_RADIUS;\n double cr = 1;\n RadiationSensitive spacecraft1 = new IsotropicRadiationSingleCoefficient(solarArea, cr);\n ((NumericalPropagator)prop).addForceModel(new SolarRadiationPressure(CelestialBodyFactory.getSun(), equatorialRadius, spacecraft1));\n \n return prop;\n }",
"public ChainedTransformer(Transformer[] transformers) {\r\n super();\r\n iTransformers = transformers;\r\n }",
"Evaluator getRequiresEvaluator()\n{\n return new Requires();\n}",
"IRequirement or(IRequirement constraint);",
"public Map<OperationKey, List<Policy>> enforceOn(SourceBundle sourceBundle) {\n\t\tMap<OperationKey, List<Policy>> conflicts = new HashMap<OperationKey, List<Policy>>();\n\n\t\tSortedSet<Operation> operations = getAllOperations(sourceBundle, conflicts);\n\n\t\tif (operations.size() == 0) {\n\t\t\treturn conflicts;\n\t\t}\n\n\t\t// organize operations into a tree based on their nesting relationship\n\t\toperations = nestOperations(operations);\n\n\t\t// carry out the operations\n\t\texecuteOperations(sourceBundle, operations);\n\n\t\t// add the definition JS file to the beginning of web page\n\t\tsourceBundle.addTreatmentDefinitions(treatmentFactory.BASE_OBJECT_NAME + \".js\", treatmentFactory.getDefinitions());\n\n\t\treturn conflicts;\n\t}",
"IRuleset add(IRuleset...rules);",
"public void setConstraintList(List<ContextConstraint> list) {\n setChild(list, 1);\n }",
"TargetChain createTargetChain();",
"public Set<PropPattern> collectPropObservations(Proposition p, SynNode s1, SynNode s2,\n\t\t\tList<PropPattern> props, SentenceTheory sent, Set<Proposition> history) {\n ImmutableSet.Builder<PropPattern> propsBuilder = ImmutableSet.builder();\n\t history.add(p);\n\n\t // PowerSetIterabler is actually just Cartesian Product. Internally, it is a List of List, e.g.: [ [A,B], [1,2] ]\n\t // And then the powerset is : A,1 B,1 A,2 B,2\n PowerSetIterable.Builder<PropArgObservation> argArrangementsBuilder = new PowerSetIterable.Builder<PropArgObservation>();\n\n\t\tfor (Argument a : p.args()) {\n\t\t\t// for each argument of this proposition, collect ArgInfo and then commit as a List in PowerSetIterable\n Collection<PropArgObservation> args = getArgInfo(a,s1,s2,props,sent,history);\n for (PropArgObservation arg : args)\n argArrangementsBuilder.withChoiceAdd(arg);\n if (args.size() > 0)\n argArrangementsBuilder.withCommitChoiceSet();\n\t\t}\n\n for (Iterable<PropArgObservation> args : argArrangementsBuilder.build()) {\t// for each combination\n PropPattern.Builder propBuilder = new PropPattern.Builder(language, p.predType());\n if (p.predSymbol().isPresent()) {\n propBuilder.withPredicate(p.predSymbol().get());\n }\n\n for (PropArgObservation arg : args)\n propBuilder.withArg(arg);\n PropPattern prop = propBuilder.build();\n if (prop.hasAtLeastTwoUniqueSlots()) {\n\t\t\t\tprops.add(prop);\n//\t }//TODO: check if we want atLeastTwoUnique for exactlyTwoUnique for this conditional statement\n// if (prop.hasExactlyTwoUniqueSlots()) {\n// props.add(prop);\n }else if(prop.getNestedSlots().size()==1&&prop.args().size()==1){\n\t\t\t\t//if s0 and s1 are anchorNodes of EventMentions, if one of the synNodes is an argument, the other one should be the predicate of the parent proposition\n\t\t\t\tint slotNo = prop.getNestedSlots().get(0);\n\t\t\t\tOptional<SynNode> predicateNode = p.predHead();\n\t\t\t\tSynNode synNodeToMatchToPredicate = slotNo==0?s2:s1;\n\t\t\t\tif(predicateNode.isPresent()&&predicateNode.get().span().equals(synNodeToMatchToPredicate.span())){\n\t\t\t\t\tprops.add(prop);\n\t\t\t\t}\n\t\t\t}\n propsBuilder.add(prop);\n\n\t\t\tif (p.predHead().isPresent() && p.predHead().get().span().equals(s1.span())) {\n\t\t\t\tpropBuilder = new PropPattern.Builder(language, p.predType());\n\t\t\t\tif (p.predSymbol().isPresent()) {\n\t\t\t\t\tpropBuilder.withPredicate(Symbol.from(\"[0]\"));\n\t\t\t\t}\n\n\t\t\t\tfor (PropArgObservation arg : args)\n\t\t\t\t\tpropBuilder.withArg(arg);\n\t\t\t\tprop = propBuilder.build();\n\t\t\t\tif (prop.hasAtLeastTwoUniqueSlots()) {\n\t\t\t\t\tprops.add(prop);\n//\t }//TODO: check if we want atLeastTwoUnique for exactlyTwoUnique for this conditional statement\n// if (prop.hasExactlyTwoUniqueSlots()) {\n// props.add(prop);\n\t\t\t\t} else if (prop.getNestedSlots().size() == 1 && prop.args().size() == 1) {\n\t\t\t\t\t//if s0 and s1 are anchorNodes of EventMentions, if one of the synNodes is an argument, the other one should be the predicate of the parent proposition\n\t\t\t\t\tint slotNo = prop.getNestedSlots().get(0);\n\t\t\t\t\tint slotNoOther = slotNo == 0 ? 1 : 0;\n\t\t\t\t\tif (prop.predicates().contains(Symbol.from(\"[\" + slotNoOther + \"]\"))) {\n\t\t\t\t\t\tprops.add(prop);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpropsBuilder.add(prop);\n\t\t\t}\n\n\t\t\tif (p.predHead().isPresent() && p.predHead().get().span().equals(s2.span())) {\n\t\t\t\tpropBuilder = new PropPattern.Builder(language, p.predType());\n\t\t\t\tif (p.predSymbol().isPresent()) {\n\t\t\t\t\tpropBuilder.withPredicate(Symbol.from(\"[1]\"));\n\t\t\t\t}\n\n\t\t\t\tfor (PropArgObservation arg : args)\n\t\t\t\t\tpropBuilder.withArg(arg);\n\t\t\t\tprop = propBuilder.build();\n\t\t\t\tif (prop.hasAtLeastTwoUniqueSlots()) {\n\t\t\t\t\tprops.add(prop);\n//\t }//TODO: check if we want atLeastTwoUnique for exactlyTwoUnique for this conditional statement\n// if (prop.hasExactlyTwoUniqueSlots()) {\n// props.add(prop);\n\t\t\t\t} else if (prop.getNestedSlots().size() == 1 && prop.args().size() == 1) {\n\t\t\t\t\t//if s0 and s1 are anchorNodes of EventMentions, if one of the synNodes is an argument, the other one should be the predicate of the parent proposition\n\t\t\t\t\tint slotNo = prop.getNestedSlots().get(0);\n\t\t\t\t\tint slotNoOther = slotNo == 0 ? 1 : 0;\n\t\t\t\t\tif (prop.predicates().contains(Symbol.from(\"[\" + slotNoOther + \"]\"))) {\n\t\t\t\t\t\tprops.add(prop);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpropsBuilder.add(prop);\n\t\t\t}\n\n }\n\n\t\treturn propsBuilder.build();\n\t}",
"List<IRewriteRule> overapproxRewrite(int bound, Set<Integer> emergingSymbols);",
"private DependencySatisfaction satisfied(Set<String> declaringElements, Set<String> declaredElements) {\n\t\tif (declaringElements.contains(name)) {\n\t\t\treturn new DependencySatisfaction(this, new DependencyException(\"Cyclic dependency on \" + name));\n\t\t}\n\t\tdeclaredElements.add(name);\n\t\ttry {\n\t\t\tdeclaringElements.add(name);\n\t\t\tfor (DependencyElement depEl : dependencies) {\n\t\t\t\tif (depEl.after(this)) {\n\t\t\t\t\treturn new DependencySatisfaction(depEl, null);\n\t\t\t\t}\n\t\t\t\tif (declaredElements.contains(depEl.getName())) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse if (declaringElements.contains(depEl.getName())) {\n\t\t\t\t\treturn new DependencySatisfaction(depEl, null);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tDependencySatisfaction ds = depEl.satisfied(declaringElements, declaredElements);\n\t\t\t\tif (!ds.isSatisfied()) {\n\t\t\t\t\treturn ds;\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tdeclaringElements.remove(name);\n\t\t}\n\t\treturn new DependencySatisfaction();\n\t}",
"List<IViewRelation> getConstraintRelations();",
"private static FunExpSem bind(ValueSymbol[] symbols, ExpSem e)\n {\n int[] slots = Translator.toSlots(symbols);\n String[] names = Translator.toNames(symbols);\n if (e instanceof ExpSem.Single) \n {\n ExpSem.Single e0 = (ExpSem.Single)e;\n return (FunExpSem.Single)(Value[] v)-> (ExpSem.Single)(Context c)->\n {\n Context c0 = c.set(slots, v, names);\n return e0.apply(c0);\n };\n }\n else\n {\n ExpSem.Multiple e0 = (ExpSem.Multiple)e;\n return (FunExpSem.Multiple)(Value[] v)-> (ExpSem.Multiple)(Context c)->\n {\n Context c0 = c.set(slots, v, names);\n return e0.apply(c0);\n };\n }\n }",
"public InstConstraintVisitor(){}",
"Form setValidators(List<FormValidator> validators);",
"public CreateServiceRequest withPropagateTags(PropagateTags propagateTags) {\n this.propagateTags = propagateTags.toString();\n return this;\n }",
"public Minimizer(Set<Integer> mintermSet, Set<Integer> dontCareSet, List<String> variables) {\n\t\tif (!checkNonOverlapping(mintermSet, dontCareSet)) {\n\t\t\tthrow new IllegalArgumentException(\"Error: set of minterms and don't cares is not disjunct.\");\n\t\t}\n\t\tif (!checkIllegallIndexes(mintermSet, dontCareSet, variables.size())) {\n\t\t\tthrow new IllegalArgumentException(\"There are more than allowed variables.\");\n\t\t}\n\n\t\tthis.mintermSet = mintermSet;\n\t\tthis.dontCareSet = dontCareSet;\n\t\tthis.variables = variables;\n\n\t\tif (mintermSet.size() > 0) {\n\t\t\tSet<Mask> primCover = findPrimaryImplicants();\n\t\t\tminimalForms = chooseMinimalCover(primCover);\n\t\t}\n\n\t}",
"org.omg.CORBA.Object _set_policy_override(Policy[] policies,\n SetOverrideType set_add);",
"@Test\n public void tr5()\n {\n Graph graph = new Graph(2);\n Set<Integer> sources = new TreeSet<Integer>();\n Set<Integer> targets = new TreeSet<Integer>();\n sources.add(3);\n targets.add(0);\n targets.add(1);\n assertThrows(IllegalArgumentException.class, () ->graph.reachable(sources, targets));\n }",
"@Test\n public void testWithPropagator() {\n CelestialBody sun = CelestialBodyFactory.getSun();\n final Frame eci = FramesFactory.getGCRF();\n final Frame ecef = FramesFactory.getITRF(IERSConventions.IERS_2010, true);\n AbsoluteDate date = new AbsoluteDate(2004, 1, 1, utc);\n OneAxisEllipsoid earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS,\n Constants.WGS84_EARTH_FLATTENING, ecef);\n Orbit orbit = new KeplerianOrbit(6378137 + 400e3, 1e-3, FastMath.toRadians(50), 0, 0, 0, PositionAngle.TRUE,\n eci, date, Constants.EIGEN5C_EARTH_MU);\n final SpacecraftState ic = new SpacecraftState(orbit);\n\n final AbsoluteDate end = date.shiftedBy(5 * Constants.JULIAN_DAY);\n final AbsoluteDate resetDate = date.shiftedBy(0.8 * Constants.JULIAN_DAY + 0.1);\n\n final SpacecraftState[] lastState = new SpacecraftState[1];\n final OrekitStepHandler stepSaver = interpolator -> {\n final AbsoluteDate start = interpolator.getPreviousState().getDate();\n if (start.compareTo(resetDate) < 0) {\n lastState[0] = interpolator.getPreviousState();\n }\n };\n\n // propagate with state rest to take slightly different path\n NumericalPropagator propagator = getNumericalPropagatorWithDTM(sun, earth, ic);\n propagator.setStepHandler(stepSaver);\n propagator.propagate(resetDate);\n propagator.resetInitialState(lastState[0]);\n propagator.clearStepHandlers();\n SpacecraftState actual = propagator.propagate(end);\n\n // propagate straight through\n propagator = getNumericalPropagatorWithDTM(sun, earth, ic);\n propagator.resetInitialState(ic);\n propagator.clearStepHandlers();\n SpacecraftState expected = propagator.propagate(end);\n\n assertThat(actual.getPVCoordinates(), pvCloseTo(expected.getPVCoordinates(), 1.0));\n\n // propagate with state rest to take slightly different path\n propagator = getNumericalPropagatorWithMSIS(sun, earth, ic);\n propagator.setStepHandler(stepSaver);\n propagator.propagate(resetDate);\n propagator.resetInitialState(lastState[0]);\n propagator.clearStepHandlers();\n actual = propagator.propagate(end);\n\n // propagate straight through\n propagator = getNumericalPropagatorWithMSIS(sun, earth, ic);\n propagator.resetInitialState(ic);\n propagator.clearStepHandlers();\n expected = propagator.propagate(end);\n\n assertThat(actual.getPVCoordinates(), pvCloseTo(expected.getPVCoordinates(), 1.0));\n }",
"public FunctionTypeNode formals(List<Formal> formals) {\n \t\tFunctionTypeNode_c n = (FunctionTypeNode_c) copy();\n \t\tn.formals = TypedList.copyAndCheck(formals, Formal.class, true);\n \t\treturn n;\n \t}",
"public ArrayList<PNConstraint> buildConstraintList(NetworkType type, boolean includeOptionals) {\n\t\t// Init the list with those constraints that have the default value set to YES\n\t\tArrayList<PNConstraint> constraints = new ArrayList<>();\n\t\tfor (Class<? extends PNConstraint> constraintClass : defaultConstraintBehaviors.keySet()) {\n\t\t\tif (getDefaultBehavior(constraintClass).equals(ConstraintBehavior.YES) || (\n\t\t\t\t\tincludeOptionals && getDefaultBehavior(constraintClass).equals(ConstraintBehavior.OPTIONAL)\n\t\t\t)) {\n\t\t\t\ttry {\n\t\t\t\t\tconstraints.add(constraintClass.newInstance());\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Overwrite the list with the constraints specified in the corresponding network type\n\t\tHashMap<Class<? extends PNConstraint>, ConstraintBehavior> overwrittenConstraints = type\n\t\t\t\t.getOverwrittenConstraints();\n\t\tfor (Class<? extends PNConstraint> constraintClass : overwrittenConstraints.keySet()) {\n\t\t\tif (overwrittenConstraints.get(constraintClass) == ConstraintBehavior.YES) {\n\t\t\t\ttry {\n\t\t\t\t\tconstraints.add(constraintClass.newInstance());\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} else if (overwrittenConstraints.get(constraintClass) == ConstraintBehavior.NO) {\n\t\t\t\tfor (int i = 0; i < constraints.size(); ++i) {\n\t\t\t\t\tif (constraints.get(i).getClass().equals(constraintClass)) {\n\t\t\t\t\t\tconstraints.remove(i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn constraints;\n\n\t}",
"public NodeConstraints createNodeConstraintsObject() {\n NodeConstraints c = new NodeConstraints(getClass().getCanonicalName(), getReturnTypes(), numChildren, NodeConstraints.ERC);\n Object[] args = getConstructorArgs();\n if (args != null) {\n c.setArgs(args);\n }\n return c;\n }",
"public interface PolicyRuleBuilder extends Builder<PolicyRuleBuilder, PolicyRule> {\n PolicyRuleBuilder name(String name);\n\n PolicyRuleBuilder description(String description);\n\n PolicyRuleBuilder shared(boolean shared);\n\n PolicyRuleBuilder classifier(String classifierId);\n\n PolicyRuleBuilder actions(List<String> actionIds);\n}",
"public Coalition(Set<Integer> coalition, PlayerSet players) {\n super();\n this.definedOn = players;\n Iterator<Integer> it = coalition.iterator();\n int element;\n while(it.hasNext()){\n element = it.next();\n if(!players.contains(element)){\n throw new IllegalArgumentException(\"agument 1 is not a proper coalition (members must be from the PlayerSet)\");\n }\n this.add(element);\n }\n }",
"public Cooperation createCooperation(Process lhs, Process rhs,\n ActionSet actions) {\n CooperationImpl cooperation = new CooperationImpl();\n cooperation.setLeftHandSide(lhs);\n cooperation.setRightHandSide(rhs);\n cooperation.setActionSet(actions);\n return cooperation;\n }",
"SpacecraftState propagate(AbsoluteDate start, AbsoluteDate target) throws OrekitException;",
"Collection<? extends Object> getNarratorChain();",
"private List<HashMap<ComparableExpression, HashSet<ComparableExpression>>> computeClosureRelations(\n HashMap<ComparableExpression, HashSet<ComparableExpression>> cEq,\n HashMap<ComparableExpression, HashSet<ComparableExpression>> cLeq,\n HashMap<ComparableExpression, HashSet<ComparableExpression>> cLt) {\n // init relations\n HashMap<ComparableExpression, HashSet<ComparableExpression>> rEq;\n HashMap<ComparableExpression, HashSet<ComparableExpression>> rLeq;\n HashMap<ComparableExpression, HashSet<ComparableExpression>> rLt;\n // compute them\n rEq = union(transitiveClosure(cEq), selfInverses(transitiveClosure(union(cEq, cLeq))));\n rLeq = subtract(transitiveClosure(union(rEq, cLeq)), rEq);\n rLt = transitiveClosure(union(\n composition(union(rEq, rLeq), cLt),\n composition(cLt, union(rEq, rLeq)),\n cLt\n ));\n return Arrays.asList(rEq, rLeq, rLt);\n }",
"BasicSet NextClosure(BasicSet M,BasicSet A){\r\n\t\tConceptLattice cp=new ConceptLattice(context);\r\n\t\tApproximationSimple ap=new ApproximationSimple(cp);\r\n\t\tMap <String,Integer> repbin=this.RepresentationBinaire(M);\r\n\t\tVector<BasicSet> fermes=new Vector<BasicSet>();\r\n\t\tSet<String> key=repbin.keySet();\r\n\t\tObject[] items= key.toArray();\r\n\r\n\t\t/* on recupere la position i qui correspond a la derniere position de M*/\r\n\t\tint i=M.size()-1;\r\n\t\tboolean success=false;\r\n\t\tBasicSet plein=new BasicSet();\r\n\t\tVector <String> vv=context.getAttributes();\r\n\t\tplein.addAll(vv);\r\n\r\n\r\n\t\twhile(success==false ){\t\t\r\n\r\n\t\t\tString item=items[i].toString();\r\n\r\n\t\t\tif(!A.contains(item)){\t\r\n\r\n\t\t\t\t/* Ensemble contenant item associe a i*/\r\n\t\t\t\tBasicSet I=new BasicSet();\r\n\t\t\t\tI.add(item);\r\n\r\n\t\t\t\t/*A union I*/\t\r\n\t\t\t\tA=A.union(I);\r\n\t\t\t\tBasicSet union=(BasicSet) A.clone();\r\n\t\t\t\t//System.out.println(\" union \"+union);\r\n\r\n\t\t\t\t//fermes.add(union);\r\n\r\n\t\t\t\tfermes.add(union);\r\n\t\t\t\t//System.out.println(\"ll11 \"+fermes);\r\n\r\n\t\t\t\t/* Calcul du ferme de A*/\r\n\t\t\t\tBasicSet b=ap.CalculYseconde(A,context);\r\n\r\n\t\t\t\t//BasicSet b=this.LpClosure(A);\r\n\t\t\t\t//System.out.println(\"b procchain \"+b);\r\n\r\n\t\t\t\t//System.out.println(\"b sec \"+b);\r\n\t\t\t\tBasicSet diff=new BasicSet();\r\n\t\t\t\tdiff=b.difference(A);\r\n\t\t\t\tMap <String,Integer> repB=this.RepresentationBinaire(diff);\r\n\t\t\t\tBasicSet test=new BasicSet();\r\n\t\t\t\tMap <String,Integer> testt=RepresentationBinaire(test);\r\n\t\t\t\ttestt.put(item, 1);\r\n\r\n\t\t\t\t/* on teste si l ensemble B\\A est plus petit que l ensemble contenant i\r\n\t\t\t\t * Si B\\A est plus petit alors on affecte B à A.\r\n\t\t\t\t **/\r\n\r\n\t\t\t\tif(item.equals(b.first())||LecticOrder(repB,testt)){\r\n\t\t\t\t\t//System.out.println(\"A succes=true \"+ A);\r\n\t\t\t\t\tA=b;\r\n\t\t\t\t\tsuccess=true;\t \r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tA.remove(item);\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tA.remove(item);\r\n\t\t\t}\t\t\t\r\n\t\t\ti--;\r\n\t\t}\t\t\r\n\t\treturn A;\r\n\t}",
"void genClassMutants(ClassDeclarationList cdecls) {\n\tgenClassMutants1(cdecls);\n\tgenClassMutants2(cdecls);\n }",
"public interface GroupPredicateBuilder {\r\n\r\n Predicate build(CriteriaBuilder criteriaBuilder, List<Predicate> criteriaList);\r\n \r\n}",
"public final void addDeponents(Collection<? extends Drop> deponents) {\r\n synchronized (f_seaLock) {\r\n if (!f_valid || f_dependents == null) {\r\n return;\r\n }\r\n for (Drop drop : deponents) {\r\n drop.addDependent(this);\r\n }\r\n }\r\n }",
"public final void addDependents(Collection<? extends Drop> dependents) {\r\n synchronized (f_seaLock) {\r\n if (!f_valid || dependents == null) {\r\n return;\r\n }\r\n for (Drop drop : dependents) {\r\n addDependent(drop);\r\n }\r\n }\r\n }",
"private void addConstraint(String tok) throws SyntaxError {\n assert(tok.startsWith(PREFIX_OP_STR));\n \n if (!tok.endsWith(\")\")) {\n throw new SyntaxError(String.format(\"Wrong format for the constraint '%s', expected format: %s\",\n tok, CONSTR_FMT));\n }\n int pos = tok.indexOf('(');\n if (pos == -1) {\n throw new SyntaxError(String.format(\"Missing '(' in the constraint '%s', expected format: %s\",\n tok, CONSTR_FMT)); \n }\n String op = tok.substring(1, pos);\n ConstraintType type = ConstraintType.CONSTRAINT_PARENT;\n if (op.equalsIgnoreCase(CONSTR_CONTAINS)) {\n type = ConstraintType.CONSTRAINT_CONTAINS;\n } else if (!op.equalsIgnoreCase(CONSTR_PARENT)) {\n throw new SyntaxError(String.format(\"Wrong constraint name '%s' in the element '%s'\", op, tok));\n }\n // Labels cannot contain commas\n String parts[] = tok.substring(pos + 1, tok.length() - 1).split(\",\");\n if (parts.length < 2) {\n throw new SyntaxError(String.format(\n \"There should be at least 2 elements between '(' and ')'\" + \n \" in the constraint '%s', expected format %s\",\n tok, CONSTR_FMT));\n }\n String headLabel = parts[0].trim();\n Integer headId = mLabel2Id.get(headLabel);\n if (null == headId) {\n throw new SyntaxError(String.format(\"Cannot find a lexical entry \" +\n \" for the label '%s', constraint '%s'\", headLabel, tok)); \n }\n\n ArrayList<ConstraintType> constr = mConstrType.get(headId);\n ArrayList<Integer> dependIds = mDependId.get(headId);\n \n if (ConstraintType.CONSTRAINT_PARENT == type) {\n if (mTypes.get(headId) != FieldType.FIELD_ANNOTATION) {\n throw new SyntaxError(String.format(\n \"The parent in the constraint '%s' should be an annotation\", tok));\n }\n }\n \n for (int i = 1; i < parts.length; ++i) {\n String depLabel = parts[i].trim();\n Integer depId = mLabel2Id.get(depLabel);\n if (null == depId) {\n throw new SyntaxError(String.format(\"Cannot find a lexical entry \" +\n \" for the label '%s', constraint '%s'\", depLabel, tok)); \n }\n \n if (ConstraintType.CONSTRAINT_PARENT == type) {\n if (mTypes.get(depId) != FieldType.FIELD_ANNOTATION) {\n throw new SyntaxError(String.format(\n \"A child (label '%s') in the constraint '%s' should be an annotation\", \n depLabel, tok));\n }\n } \n \n constr.add(type);\n dependIds.add(depId);\n\n /*\n * This is a potentially horrible linear-time complexity search\n * in an array. However, for a reasonable-size user query \n * these arrays are going to be tiny and, in practice, \n * such a linear search be as fast as or likely even faster than \n * a hash/tree map lookup.\n */\n if (!mEdges.get(depId).contains(headId))\n mEdges.get(depId).add(headId);\n if (!mEdges.get(headId).contains(depId))\n mEdges.get(headId).add(depId);\n\n }\n }",
"void apply(Validator validator, List<Exp> args);",
"private void CreatePIDelegationRules() throws isisicatclient.IcatException_Exception {\n Rule piAddExperimenters = new Rule();\r\n piAddExperimenters.crudFlags = \"C\";\r\n piAddExperimenters.what = \"InvestigationUser <-> Investigation <-> InvestigationUser [role = 'principal_experimenter'] <-> User [name = :user]\";\r\n port.create(sessionId, piAddExperimenters);\r\n }",
"@Override\n\tpublic List<Variable> applyConstraints(List<Variable> variableList) {\n\t\tconstraintVariables.clear();\n\t\tvariables.clear();\n\n\t\tthis.variables = variableList;\n\n\t\tSystem.out.println(\"GAC:\");\n\n\t\treduceArc();\n\n\t\tsolved = GACSolve(queue.poll().number,variables);\n\n\t\tif (!solved){\n\t\t\tSystem.out.println(\"cannot be solved\");\n\t\t}\n\n\t\treturn variables;\n\t}",
"@Override\n public Constraint converConstrain(String classname, String parvarn1, String parvarn2, String parvarn3) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException {\n IntVar varConverX = new IntVar(); IntVar varConverY = new IntVar(); IntVar varConverZ = new IntVar(); varConverX.id = parvarn1;varConverY.id = parvarn2; varConverZ.id = parvarn3 ;\n Class<?> clasCon = Class.forName(classname);\n Constructor<?> constru2 = clasCon.getDeclaredConstructor(new Class<?>[] {JaCoP.core.IntVar.class,JaCoP.core.IntVar.class, JaCoP.core.IntVar.class});\n Constraint c = (Constraint) constru2.newInstance(varConverX,varConverY, varConverZ);\n return c;\n }",
"public static Transformer getInstance(Collection transformers) {\r\n if (transformers == null) {\r\n throw new IllegalArgumentException(\"Transformer collection must not be null\");\r\n }\r\n if (transformers.size() == 0) {\r\n return NOPTransformer.INSTANCE;\r\n }\r\n // convert to array like this to guarantee iterator() ordering\r\n Transformer[] cmds = new Transformer[transformers.size()];\r\n int i = 0;\r\n for (Iterator it = transformers.iterator(); it.hasNext();) {\r\n cmds[i++] = (Transformer) it.next();\r\n }\r\n FunctorUtils.validate(cmds);\r\n return new ChainedTransformer(cmds);\r\n }",
"private void addBinders(int n, Binder[] binder, List<Condition> conds)\n {\n List<Binder> binder0 = new ArrayList<Binder>(n);\n for (int i=0; i<n; i++)\n binder0.add(transform(binder[i]));\n for (Condition c : conds)\n {\n Expression ce = n == 0 ? c.exp : new LetExp(binder0, c.exp);\n conditions.add(c.clone(ce));\n }\n }",
"Optional<Pairof<X, MultiSet<X>>> choose();",
"public void testConjoinedVariablesPropagateAccrossConjunction() throws Exception\n {\n resolveAndAssertSolutions(\"[[g(x), h(x), (f(X, Y) :- g(X), h(Y))], (?- f(X, X)), [[X <-- x]]]\");\n }",
"ValueRangeConstraint createValueRangeConstraint();",
"void addConstraintRelation(IViewRelation relation);",
"private static void addDepotToGraph(Depot newDepot, Graph<Node, WeightEdge> graph, List<Node> depots, List<Node> trips, Problem problem){\n Node depotSource = new Node(newDepot, newDepot.getNumberOfVehicles(), true);\n graph.addVertex(depotSource);\n depots.add(depotSource);\n\n // add the depot sink vertex\n Node depotSink = new Node(newDepot, -newDepot.getNumberOfVehicles(), false);\n graph.addVertex(depotSink);\n depots.add(depotSink);\n\n // add edges from this depot source to all existing trips entry\n // add edges from all existing trips exit to this depot sink\n for(Node trip : trips){\n if(!trip.isExitNode()){\n // from depot source to trip startPoint\n WeightEdge depotToTripWeightEdge = new BoundedWeightEdge(0, 1);\n graph.addEdge(depotSource, trip, depotToTripWeightEdge);\n graph.setEdgeWeight(depotToTripWeightEdge, problem.getCost(depotSource.getLocation(), trip.getLocation()).toMinutes());\n }else{ //ending point\n // from trip endPoint to depot sink\n WeightEdge tripToDepotWeightEdge = new BoundedWeightEdge(0, 1);\n graph.addEdge(trip, depotSink, tripToDepotWeightEdge);\n graph.setEdgeWeight(tripToDepotWeightEdge, problem.getCost(trip.getLocation(), depotSink.getLocation()).toMinutes());\n }\n }\n\n // add arc from depot source to depot sink with lowerBound: 0 end upperBound: depot.numberOfAvailableVehicles\n // this arc is necessary when some vehicles in the depot are nod used\n Integer numberOfAvailableVehicles = ((Depot) depotSource.getLocation()).getNumberOfVehicles();\n WeightEdge sourceToSinkWeightEdge = new BoundedWeightEdge(0, numberOfAvailableVehicles);\n graph.addEdge(depotSource, depotSink, sourceToSinkWeightEdge);\n graph.setEdgeWeight(sourceToSinkWeightEdge, 0);\n\n }",
"public void testVariableBindingFromFirstPathPropagatesAccrossConjunction() throws Exception\n {\n resolveAndAssertSolutions(\"[[g(x), h(x), (f(X) :- g(X), h(X))], (?- f(Y)), [[Y <-- x]]]\");\n }"
] | [
"0.5000771",
"0.49518016",
"0.49016732",
"0.49016732",
"0.48583183",
"0.4852723",
"0.4846434",
"0.483667",
"0.477074",
"0.47473812",
"0.46883488",
"0.4685613",
"0.46568027",
"0.464745",
"0.46132827",
"0.45916933",
"0.45758218",
"0.45681217",
"0.45628923",
"0.45220348",
"0.45163897",
"0.45045796",
"0.44940642",
"0.44870064",
"0.44545802",
"0.4428422",
"0.4426184",
"0.44043267",
"0.44014454",
"0.43793023",
"0.4377829",
"0.43771383",
"0.43737158",
"0.43691552",
"0.43458706",
"0.43385527",
"0.4331004",
"0.431113",
"0.4307343",
"0.4304231",
"0.43028608",
"0.4291867",
"0.42843568",
"0.42833436",
"0.4277208",
"0.42715672",
"0.42622948",
"0.42539456",
"0.42449257",
"0.42422414",
"0.42361468",
"0.42153287",
"0.4208771",
"0.42039025",
"0.42015597",
"0.41982788",
"0.41979927",
"0.4194834",
"0.4193546",
"0.4190994",
"0.41893953",
"0.41874242",
"0.41844195",
"0.41826084",
"0.41751924",
"0.4174665",
"0.4163508",
"0.41567537",
"0.41531858",
"0.41506156",
"0.41421565",
"0.41385096",
"0.41319984",
"0.41311204",
"0.41257775",
"0.41247284",
"0.41246116",
"0.41171372",
"0.41127402",
"0.4109698",
"0.41089767",
"0.4105661",
"0.41042876",
"0.4104034",
"0.41029906",
"0.40970966",
"0.4095986",
"0.4095302",
"0.40894666",
"0.40846437",
"0.40730724",
"0.40707004",
"0.40694535",
"0.40670323",
"0.40669182",
"0.40592402",
"0.40578514",
"0.40547723",
"0.40534866",
"0.4049553",
"0.4049286"
] | 0.0 | -1 |
Created by DaiYan on 2017/3/24. | public interface Eat {
void eat();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@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\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"private static void cajas() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"public void mo38117a() {\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n void init() {\n }",
"public void mo4359a() {\n }",
"@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}",
"private void init() {\n\n\t}",
"@Override\n public void init() {\n }",
"@Override\n public void memoria() {\n \n }",
"@Override\n protected void getExras() {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void rozmnozovat() {\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 }",
"@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 public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\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 sacrifier() {\n\t\t\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"private void strin() {\n\n\t}",
"@Override\n public void init() {}",
"@Override\n protected void init() {\n }",
"public void mo6081a() {\n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\r\n\tpublic void init() {}",
"private void kk12() {\n\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"private void init() {\n\n\n\n }",
"public void gored() {\n\t\t\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n public void initialize() {\n \n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"public void mo55254a() {\n }",
"Petunia() {\r\n\t\t}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n public void initialize() { \n }",
"public Pitonyak_09_02() {\r\n }",
"private void m50366E() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n public int describeContents() { return 0; }",
"private TMCourse() {\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}"
] | [
"0.6121619",
"0.60182106",
"0.5831191",
"0.5830991",
"0.5830991",
"0.57796717",
"0.5770782",
"0.57293963",
"0.5720643",
"0.57074785",
"0.5697006",
"0.56963605",
"0.56614083",
"0.56458783",
"0.563448",
"0.5621146",
"0.5610197",
"0.5599183",
"0.5586091",
"0.55751777",
"0.5572887",
"0.5570106",
"0.55667704",
"0.5565835",
"0.5565265",
"0.5558209",
"0.55528915",
"0.5539777",
"0.5539777",
"0.5539777",
"0.5539777",
"0.5539777",
"0.55381393",
"0.55243146",
"0.5509972",
"0.5506588",
"0.55061865",
"0.5504339",
"0.5503178",
"0.5480082",
"0.5480082",
"0.5480082",
"0.5480082",
"0.5480082",
"0.5480082",
"0.54752",
"0.54752",
"0.54752",
"0.5467075",
"0.5467075",
"0.54611045",
"0.54611045",
"0.54611045",
"0.54605263",
"0.54605263",
"0.5442313",
"0.54403466",
"0.54403466",
"0.54403466",
"0.54403466",
"0.54403466",
"0.54403466",
"0.54403466",
"0.54376996",
"0.54376996",
"0.54376996",
"0.5428329",
"0.5428329",
"0.54243857",
"0.54088825",
"0.5407699",
"0.54055816",
"0.540412",
"0.53980297",
"0.5394079",
"0.53937787",
"0.53910726",
"0.5380884",
"0.5363596",
"0.5356786",
"0.535302",
"0.5352465",
"0.5351635",
"0.5348946",
"0.5348409",
"0.53425664",
"0.53343695",
"0.53279984",
"0.53250057",
"0.53248197",
"0.5317879",
"0.53158754",
"0.5315365",
"0.53095496",
"0.5294695",
"0.5294016",
"0.52874976",
"0.52854234",
"0.5281752",
"0.5278282",
"0.5276247"
] | 0.0 | -1 |
Created by phundal on 9/6/17. | @PerActivity
@Component(dependencies = ApplicationComponent.class, modules = {ActivityModule.class, DataModule.class})
public interface MainActivityComponent extends AbstractActivityComponent {
void inject(MainActivity mainActivity);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"private stendhal() {\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tprotected void interr() {\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}",
"protected boolean func_70814_o() { return true; }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"private void poetries() {\n\n\t}",
"private void m50366E() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"public void mo38117a() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\n void init() {\n }",
"@Override\n public void init() {}",
"@Override\r\n\tpublic void init() {}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"private void init() {\n\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 kk12() {\n\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo4359a() {\n }",
"@Override\n\tpublic void init() {\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"public void method_4270() {}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"public abstract void mo70713b();",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\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\r\n\tprotected void initialize() {\n\r\n\t}",
"public void m23075a() {\n }",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n public void initialize() { \n }",
"private Rekenhulp()\n\t{\n\t}",
"private void strin() {\n\n\t}",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"private void m50367F() {\n }",
"@Override\n public void init() {\n }",
"public void skystonePos4() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }"
] | [
"0.6069505",
"0.5914091",
"0.58692235",
"0.58644015",
"0.58353966",
"0.58006",
"0.5799928",
"0.57847154",
"0.57847154",
"0.57613873",
"0.5733789",
"0.5707445",
"0.569272",
"0.569272",
"0.569272",
"0.569272",
"0.569272",
"0.56897205",
"0.5689151",
"0.5684587",
"0.5684545",
"0.56755316",
"0.56691396",
"0.56664014",
"0.5663452",
"0.563945",
"0.5636319",
"0.56216013",
"0.5593099",
"0.5593099",
"0.55905217",
"0.55903256",
"0.55828035",
"0.55819947",
"0.5573946",
"0.5571723",
"0.5549539",
"0.553832",
"0.5536101",
"0.5534326",
"0.55264056",
"0.55251276",
"0.5523513",
"0.5519285",
"0.5519285",
"0.5519285",
"0.551597",
"0.551597",
"0.551597",
"0.5515364",
"0.5504987",
"0.55039257",
"0.55039257",
"0.55039257",
"0.55039257",
"0.55039257",
"0.55039257",
"0.5502186",
"0.5497936",
"0.5497936",
"0.5491147",
"0.5491147",
"0.5491147",
"0.54808766",
"0.54771644",
"0.5474941",
"0.54738265",
"0.54709",
"0.54702806",
"0.5467541",
"0.5461519",
"0.54615134",
"0.5459852",
"0.54446596",
"0.544235",
"0.543374",
"0.54305506",
"0.54236335",
"0.5422943",
"0.54185826",
"0.53802",
"0.53795296",
"0.5377751",
"0.5377751",
"0.5373254",
"0.5372383",
"0.53711766",
"0.53698623",
"0.5369146",
"0.5369146",
"0.5369043",
"0.53674656",
"0.5357169",
"0.5357141",
"0.5346319",
"0.5333229",
"0.53315085",
"0.53198475",
"0.53189117",
"0.53189117",
"0.53189117"
] | 0.0 | -1 |
/ created by kgzhang 2019/3/10 | public interface Person {
void findLove();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void cajas() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"private void poetries() {\n\n\t}",
"private void strin() {\n\n\t}",
"@Override\n public void perish() {\n \n }",
"private void kk12() {\n\n\t}",
"private stendhal() {\n\t}",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public void mo55254a() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void mo6081a() {\n }",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"private void m50366E() {\n }",
"protected boolean func_70814_o() { return true; }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"public void mo12628c() {\n }",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"public void mo12930a() {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"public void mo9848a() {\n }",
"public void mo21877s() {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"static void feladat4() {\n\t}",
"static void feladat9() {\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"public void skystonePos4() {\n }",
"protected void mo6255a() {\n }",
"private zza.zza()\n\t\t{\n\t\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public void skystonePos6() {\n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"public abstract void mo70713b();",
"public void method_4270() {}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private void parseData() {\n\t\t\r\n\t}",
"static void feladat7() {\n\t}",
"public static void listing5_14() {\n }",
"public void baocun() {\n\t\t\n\t}",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"static void feladat6() {\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"public void mo1531a() {\n }",
"private void init() {\n\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"public void mo3376r() {\n }",
"public void mo115190b() {\n }",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"public void Tyre() {\n\t\t\r\n\t}",
"private final zzgy zzgb() {\n }",
"static void feladat5() {\n\t}",
"public void mo97908d() {\n }",
"public void mo21825b() {\n }",
"public abstract void mo56925d();",
"public void mo21878t() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"public abstract void mo6549b();",
"private void level7() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"public void skystonePos5() {\n }",
"public abstract String mo118046b();",
"public void mo21793R() {\n }",
"public void mo21794S() {\n }",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"public void mo21782G() {\n }",
"public void mo21779D() {\n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"public Pitonyak_09_02() {\r\n }",
"private Rekenhulp()\n\t{\n\t}"
] | [
"0.5794261",
"0.5525668",
"0.5512074",
"0.54502785",
"0.5429168",
"0.5416581",
"0.53915375",
"0.5382686",
"0.53647155",
"0.5334788",
"0.52958494",
"0.52958494",
"0.5288974",
"0.5267498",
"0.52586347",
"0.52322143",
"0.52322143",
"0.52322143",
"0.52322143",
"0.52322143",
"0.52322143",
"0.52322143",
"0.52314526",
"0.5221937",
"0.52109814",
"0.5183109",
"0.51810354",
"0.5160639",
"0.5158011",
"0.51534146",
"0.5152103",
"0.5149432",
"0.51484",
"0.51182127",
"0.51172143",
"0.5113012",
"0.5111542",
"0.511075",
"0.5104175",
"0.507552",
"0.5049038",
"0.5045721",
"0.50382715",
"0.5035823",
"0.5035162",
"0.5028792",
"0.5024419",
"0.5017884",
"0.5011532",
"0.5004889",
"0.50009143",
"0.4992148",
"0.49881148",
"0.49823374",
"0.4979834",
"0.49740723",
"0.4972055",
"0.49699074",
"0.49656025",
"0.49574956",
"0.4951545",
"0.49415493",
"0.49364442",
"0.49334913",
"0.49328935",
"0.4932607",
"0.49280992",
"0.49223042",
"0.49218327",
"0.4920992",
"0.49202436",
"0.4899971",
"0.48966497",
"0.4882068",
"0.48752287",
"0.48668292",
"0.48603785",
"0.48562908",
"0.4854659",
"0.48542675",
"0.48476246",
"0.48475036",
"0.48461893",
"0.48438808",
"0.48353475",
"0.48340908",
"0.48332152",
"0.48319617",
"0.4830595",
"0.48269543",
"0.48253876",
"0.482136",
"0.4821219",
"0.48203543",
"0.4820113",
"0.48184454",
"0.48134318",
"0.48114708",
"0.4808692",
"0.48086193",
"0.48072308"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void initialize() throws IOException {
} | {
"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}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
] | 0.0 | -1 |
TODO Autogenerated method stub fileSystem.create(new PathUI) | @Override
public void createDirectory(File storageName) throws IOException {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Path createPath();",
"void createNode(String path);",
"@Override\n public File createFile(String path) throws IOException {\n String pathStr=path+fileSeparator+\"Mail.json\";\n File file = new File(pathStr);\n file.createNewFile();\n return file;\n }",
"public void createFile() throws IOException {\n String newName = input.getText();\n File user = new File(\"SaveData\\\\UserData\\\\\" + newName + \".txt\");\n\n if (user.exists() && !user.isDirectory()) {\n input.setStyle(\"-fx-border-color: red\");\n }\n if (user.exists() && !user.isDirectory() || newName.isEmpty()) {\n input.setStyle(\"-fx-border-color: red\");\n ERROR_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n\n }\n else {\n input.setStyle(\"-fx-border-color: default\");\n playerList.getItems().addAll(newName);\n PrintWriter newUser = new PrintWriter(new FileWriter(\"SaveData\\\\UserData\\\\\" + newName + \".txt\"));\n newUser.write(\"0 0 0 0 icon0 car\");\n newUser.close();\n MAIN_MENU_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n }\n }",
"int createFile(String pFileNamePath, String pContent, String pPath, String pRoot, boolean pOverride) throws RemoteException;",
"@Override\n public FSDataOutputStream create(Path f) throws IOException {\n return super.create(f);\n }",
"@TaskAction\n public void create() {\n dir.mkdirs();\n getChmod().chmod(dir, dirMode);\n }",
"public File createFile(final String path) {\n return new com.good.gd.file.File(path);\n }",
"protected FileSystem createFileSystem()\n throws SmartFrogException, RemoteException {\n ManagedConfiguration conf = createConfiguration();\n FileSystem fileSystem = DfsUtils.createFileSystem(conf);\n return fileSystem;\n }",
"@Test\n public void testCreateFilePath() {\n System.out.println(\"createFilePath with realistic path\");\n String path = System.getProperty(\"user.dir\")+fSeparator+\"MyDiaryBook\"\n +fSeparator+\"Users\"+fSeparator+\"Panagiwtis Georgiadis\"+fSeparator+\"Entries\"\n +fSeparator+\"Test1\";\n FilesDao instance = new FilesDao();\n boolean expResult = true;\n boolean result = instance.createFilePath(path);\n assertEquals(\"Some message\",expResult, result);\n }",
"public void create(String path) throws IOException {\n Path destionationPath = new Path(path);\n\n if (hdfs.exists(destionationPath)) {\n hdfs.delete(destionationPath, true);\n }\n hdfs.createNewFile(destionationPath);\n }",
"private static void createPath(Path path) {\r\n\t\tString tempStr = \"\";\r\n\t\tint finished = 1;\r\n\t\tint tempId = -1;\r\n\t\tList<GeoCoordinate> polyline = new ArrayList<GeoCoordinate>();\r\n\t\tList<Place> placeList = new ArrayList<Place>();\r\n\t\tContainerNII pathNii = new ContainerNII();\r\n\t\tPlace place;\r\n\t\t\r\n\t\twhile (finished == 1){\r\n\t\t\t\r\n\t\t\tplace = new Place();\r\n\t\t\tcreatePlace(place);\r\n\t\t\tplaceList.add(place);\r\n\t\t\tfinished = checkContinue(\"place\");\r\n\t\t}\r\n\t\tpath.setPlaces(placeList);\r\n\t\t\r\n\t\tif ((tempId = insertInteger(\"path id: \")) != -1)\r\n\t\t\tpath.setId(tempId);\t\r\n\t\t\r\n\t\tinsertNIIValues(pathNii, \"path\");\r\n\t\tpath.setNii(pathNii);\r\n\t\t\r\n\t\tif ((tempStr = insertString(\"path length: \")) != null)\r\n\t\t\tpath.setLength(tempStr);\r\n\t\t\r\n\t\tinsertPolyline(polyline, strPath);\r\n\t\tpath.setPolyline(polyline);\r\n\t\t\r\n\t\tif ((tempStr = insertString(\"path duration: \")) != null)\r\n\t\t\tpath.setDuration(tempStr);\r\n\t\t\r\n\t}",
"public String createPath(String path, byte[] value) throws Exception {\n PathUtils.validatePath(path);//if bad format,here will throw some Exception;\n EnsurePath ensure = new EnsurePath(path).excludingLast();\n //parent path should be existed.\n //EnsurePath: retry + block\n ensure.ensure(zkClient); //ugly API\n return zkClient.getZooKeeper().create(path, value, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);\n }",
"public Menu createFileMenu();",
"public createFile_args setPath(String path) {\n this.path = path;\n return this;\n }",
"public void create() {\n\t\t\n\t}",
"public void createFile(View view) {\n // start the background file creation task\n CreateFileTask task = new CreateFileTask();\n task.execute();\n }",
"@SuppressWarnings(\"unused\")\r\n\tprivate static File createFile(String path) {\r\n\t\t\r\n\t\t// open the file\r\n\t\tFile currentFile = new File(path);\r\n\t\t\r\n\t\t\r\n\t\t// check if it is a valid file\r\n\t\tif (currentFile == null) {\r\n\t\t\tSystem.out.println(\"Could not create the file\");\r\n\t\t\tthrow new NullPointerException();\r\n\t\t}\r\n\r\n\t\t// hopefully things went perfect\r\n\t\treturn currentFile;\r\n\r\n\t}",
"private void createNewDirectory() {\n getMainWindow().addWindow(\n new TextInputDialog(\n \"Create Directory\",\n \"Create Directory\",\n \"New Folder\",\n new TextInputDialog.Callback() {\n public void onDialogResult(boolean happy, String newDirectory) {\n if ( happy\n && isValidFile(newDirectory)) {\n try {\n // Verzeichnis anlegen\n File newDir = getFile(newDirectory);\n if (!newDir.exists()) {\n newDir.mkdir(0755);\n }\n // Prüfen, ob das Verzeichnis angelegt wurde\n if (newDir.exists()) {\n loadXtreemFSData();\n showNotification(\"Success\", \"Directory \" + newDirectory + \" created.\", Notification.TYPE_TRAY_NOTIFICATION, null);\n }\n else {\n showNotification(\"Error\", \"Directory \" + newDirectory + \" could not be created.\", Notification.TYPE_WARNING_MESSAGE, null);\n }\n } catch (IOException e) {\n showNotification(\"Error\", e.toString(), Notification.TYPE_ERROR_MESSAGE, e);\n }\n }\n }\n }));\n }",
"private void createFile() {\n if (mDriveServiceHelper != null) {\n Log.d(\"error\", \"Creating a file.\");\n\n mDriveServiceHelper.createFile()\n .addOnSuccessListener(fileId -> readFile(fileId))\n .addOnFailureListener(exception ->\n Log.e(\"error\", \"Couldn't create file.\", exception));\n }\n }",
"private void createFolder(String name, String path, Long id) {\n VMDirectory newDir = new VMDirectory();\n newDir.setName(name);\n editResourceService.createDir(id, name, new AsyncCallback<Long>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.say(caught.getMessage());\n }\n\n @Override\n public void onSuccess(Long result) {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, id), newDir, result, true);\n folderPath_idMap.put(path, result);\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n }\n });\n }",
"public static void createFile(String path) {\n try {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter the file name :\");\n String filepath = path+\"/\"+scanner.next();\n File newFile = new File(filepath);\n newFile.createNewFile();\n System.out.println(\"File is Created Successfully\");\n\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n }\n }",
"@Override\r\n\tpublic boolean createFolder(String filePath) throws FileSystemUtilException {\r\n\t\ttry{\r\n\t\t\tString userHome = getUserHome();\r\n\t\t\t//if given file path doesnot start with user home\r\n\t\t\tif(filePath == null && filePath.trim().length() < 1 && !filePath.startsWith(userHome)){\r\n\t\t\t\tthrow new FileSystemUtilException(\"EL0701\");\r\n\t\t\t}\r\n\t\t\tconnect();\r\n\t\t\tString mkDirCmd = \"mkdir -p \"+filePath;\t\t\t\r\n\t\t\tint x = executeSimpleCommand(mkDirCmd);\r\n\t\t\tif(x!=0)\r\n\t\t\t{\r\n\t\t\t\tlogger.info(\"Folder creation failed, may be file path is not correct or privileges are not there\");\r\n\t\t\t\tthrow new FileSystemUtilException(\"EL0699\");\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}catch(FileSystemUtilException e)\r\n\t\t{\r\n\t\t disconnect();\r\n\t\t\tthrow new FileSystemUtilException(e.getErrorCode(),e.getException());\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\tthrow new FileSystemUtilException(\"F00002\",e);\r\n\t\t}\r\n\r\n\t}",
"public void create(){}",
"WithCreate withFolderPath(String folderPath);",
"org.openxmlformats.schemas.drawingml.x2006.main.CTPath2D addNewPath();",
"private void createFile(PonsFileFactory ponsFileFactory, Profile profile){\n moveX(profile);\n ponsFileFactory.setProfile(profile);\n String text = ponsFileFactory.createPonsFile();\n String profileName = profile.getName();\n WriteFile.write(text,pathTextField.getText() + \"/\" + profileName.substring(0,profileName.indexOf(\".\")));\n }",
"public interface CreateInfo {\n\n /**\n * 创建目录容器\n */\n void superContextPath();\n\n}",
"public void setPath(String path);",
"public abstract Shape createPath();",
"@Override\n\tpublic void handle() {\n\t\tPath p = Paths.get(pathName);\n\t\tFile file = null;\n\t\tString path = null;\n\n\t\tif (p.isAbsolute()) {\n\t\t\tpath = pathName;\n\t\t\tfile = new File(path);\n\t\t} else {\n\t\t\tpath = clientFtp.getCurrentDirectory() + \"/\" + pathName;\n\t\t\tfile = new File(path);\n\t\t}\n\t\t// Check if the client doesn't try to create a directory outside the root\n\t\t// directory\n\t\tif (path.contains(ServerFtp.home)) {\n\t\t\tif (file.exists()) {\n\t\t\t\tclientFtp.sendMessage(String.format(Response.MKD_NOK_EXIST, path));\n\t\t\t} else {\n\t\t\t\t// Creating the directory\n\t\t\t\tboolean bool = file.mkdir();\n\t\t\t\tif (bool) {\n\t\t\t\t\tclientFtp.sendMessage(String.format(Response.MKD_OK, path));\n\t\t\t\t} else {\n\t\t\t\t\tclientFtp.sendMessage(Response.FILE_NOT_FOUND);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tclientFtp.sendMessage(Response.FILE_NOT_FOUND);\n\t\t}\n\t}",
"public void criar() throws IOException {\nif (!directorio.exists()) {\n directorio.mkdir();\n System.out.println(\"Directorio criado\");\n } else {\n System.out.println(\"Directorio existe\");\n }\n if (!fileAdmin.exists()) {\n fileAdmin.createNewFile();\n System.out.println(\"file de Administrador criado com sucesso\");\n escrever(lista);\n } else {\n System.out.println(\"ficheiro existe\");\n }\n\n }",
"public void createFile (String filePath){\n try{\n File newFile = new File(filePath);\n if(newFile.createNewFile()){\n System.out.println(\"File created: \"+newFile.getName());\n } else {\n System.out.println(\"File already exists.\");\n }\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n }",
"public void mkdir(String path) throws SystemException;",
"public Storage(String filePath) {\n file = new File(filePath);\n try {\n file.getParentFile().mkdir();\n file.createNewFile();\n } catch (IOException e) {\n System.err.println(\"Unable to create file\");\n }\n }",
"public Storage(String path) throws IOException {\n assert path != null : \"Path for file storage cannot be null.\";\n file = new File(path);\n if (!file.getParentFile().exists()) {\n file.getParentFile().mkdir();\n file.createNewFile();\n }\n }",
"void setPath(String path);",
"public FileCreator() {\r\n initComponents();\r\n }",
"File(String path, String type)\n {\n this.path=path;\n this.type=type;\n }",
"public void newFolderButtonClicked() {\n TreePath[] paths = _fileSystemTree.getSelectionPaths();\r\n List selection = getSelectedFolders(paths);\r\n if (selection.size() > 1 || selection.size() == 0)\r\n return; // should never happen\r\n \r\n File parent = (File) selection.get(0);\r\n \r\n final ResourceBundle resourceBundle = FolderChooserResource.getResourceBundle(Locale.getDefault());\r\n String folderName = JOptionPane.showInputDialog(_folderChooser, resourceBundle.getString(\"FolderChooser.new.folderName\"),\r\n resourceBundle.getString(\"FolderChooser.new.title\"), JOptionPane.OK_CANCEL_OPTION | JOptionPane.QUESTION_MESSAGE);\r\n \r\n if (folderName != null) {\r\n File newFolder = new File(parent, folderName);\r\n boolean success = newFolder.mkdir();\r\n \r\n TreePath parentPath = paths[0];\r\n boolean isExpanded = _fileSystemTree.isExpanded(parentPath);\r\n if (!isExpanded) { // expand it first\r\n _fileSystemTree.expandPath(parentPath);\r\n }\r\n \r\n LazyMutableTreeNode parentTreeNode = (LazyMutableTreeNode) parentPath.getLastPathComponent();\r\n BasicFileSystemTreeNode child = BasicFileSystemTreeNode.createFileSystemTreeNode(newFolder, _folderChooser);\r\n // child.setParent(parentTreeNode);\r\n if (success) {\r\n parentTreeNode.clear();\r\n int insertIndex = _fileSystemTree.getModel().getIndexOfChild(parentTreeNode, child);\r\n if (insertIndex != -1) {\r\n // ((BasicFileSystemTreeModel) _fileSystemTree.getModel()).insertNodeInto(child, parentTreeNode, insertIndex);\r\n ((BasicFileSystemTreeModel) _fileSystemTree.getModel()).nodeStructureChanged(parentTreeNode);\r\n // ((BasicFileSystemTreeModel) _fileSystemTree.getModel()).addPath(parentPath, insertIndex, child);\r\n }\r\n }\r\n TreePath newPath = parentPath.pathByAddingChild(child);\r\n _fileSystemTree.setSelectionPath(newPath);\r\n _fileSystemTree.scrollPathToVisible(newPath);\r\n }\r\n }",
"public static int creat(String pathname, short mode)\n throws Exception {\n // get the full path\n String fullPath = getFullPath(pathname);\n FileSystem fileSystem = openFileSystems[ROOT_FILE_SYSTEM];\n\n StringBuffer dirname = new StringBuffer(\"/\");\n IndexNode currIndexNode = getRootIndexNode();\n IndexNode prevIndexNode = null;\n short indexNodeNumber = FileSystem.ROOT_INDEX_NODE_NUMBER;\n\n StringTokenizer st = new StringTokenizer(fullPath, \"/\");\n String name = \".\"; // start at root node\n while (st.hasMoreTokens()) {\n name = st.nextToken();\n if (!name.equals(\"\")) {\n // check to see if the current node is a directory\n if ((currIndexNode.getMode() & S_IFMT) != S_IFDIR) {\n // return (ENOTDIR) if a needed directory is not a directory\n process.errno = ENOTDIR;\n return -1;\n }\n\n // check to see if it is readable by the user\n // ??? tbd\n // return (EACCES) if a needed directory is not readable\n\n if (st.hasMoreTokens()) {\n dirname.append(name);\n dirname.append('/');\n }\n\n // get the next inode corresponding to the token\n prevIndexNode = currIndexNode;\n currIndexNode = new IndexNode();\n indexNodeNumber = findNextIndexNode(\n fileSystem, prevIndexNode, name, currIndexNode);\n }\n }\n\n // ??? we need to set some fields in the file descriptor\n int flags = O_WRONLY; // ???\n FileDescriptor fileDescriptor = null;\n\n if (indexNodeNumber < 0) {\n // file does not exist. We check to see if we can create it.\n\n // check to see if the prevIndexNode (a directory) is writeable\n // ??? tbd\n // return (EACCES) if the file does not exist and the directory\n // in which it is to be created is not writable\n\n currIndexNode.setMode(mode);\n currIndexNode.setNlink((short) 1);\n\n // allocate the next available inode from the file system\n short newInode = fileSystem.allocateIndexNode();\n if (newInode == -1)\n return -1;\n\n fileDescriptor =\n new FileDescriptor(fileSystem, currIndexNode, flags);\n // assign inode for the new file\n fileDescriptor.setIndexNodeNumber(newInode);\n\n// System.out.println( \"newInode = \" + newInode ) ;\n fileSystem.writeIndexNode(currIndexNode, newInode);\n\n // open the directory\n // ??? it would be nice if we had an \"open\" that took an inode \n // instead of a name for the dir\n// System.out.println( \"dirname = \" + dirname.toString() ) ;\n int dir = open(dirname.toString(), O_RDWR);\n if (dir < 0) {\n Kernel.perror(PROGRAM_NAME);\n System.err.println(PROGRAM_NAME +\n \": unable to open directory for writing\");\n process.errno = ENOENT;\n return -1;\n }\n\n // scan past the directory entries less than the current entry\n // and insert the new element immediately following\n int status;\n DirectoryEntry newDirectoryEntry =\n new DirectoryEntry(newInode, name);\n DirectoryEntry currentDirectoryEntry = new DirectoryEntry();\n while (true) {\n // read an entry from the directory\n status = readdir(dir, currentDirectoryEntry);\n if (status < 0) {\n System.err.println(PROGRAM_NAME +\n \": error reading directory in creat\");\n System.exit(EXIT_FAILURE);\n } else if (status == 0) {\n // if no entry read, write the new item at the current \n // location and break\n writedir(dir, newDirectoryEntry);\n break;\n } else {\n // if current item > new item, write the new item in \n // place of the old one and break\n if (currentDirectoryEntry.getName().compareTo(\n newDirectoryEntry.getName()) > 0) {\n int seek_status =\n lseek(dir, -DirectoryEntry.DIRECTORY_ENTRY_SIZE, 1);\n if (seek_status < 0) {\n System.err.println(PROGRAM_NAME +\n \": error during seek in creat\");\n System.exit(EXIT_FAILURE);\n }\n writedir(dir, newDirectoryEntry);\n break;\n }\n }\n }\n // copy the rest of the directory entries out to the file\n while (status > 0) {\n DirectoryEntry nextDirectoryEntry = new DirectoryEntry();\n // read next item\n status = readdir(dir, nextDirectoryEntry);\n if (status > 0) {\n // in its place\n int seek_status =\n lseek(dir, -DirectoryEntry.DIRECTORY_ENTRY_SIZE, 1);\n if (seek_status < 0) {\n System.err.println(PROGRAM_NAME +\n \": error during seek in creat\");\n System.exit(EXIT_FAILURE);\n }\n }\n // write current item\n writedir(dir, currentDirectoryEntry);\n // current item = next item\n currentDirectoryEntry = nextDirectoryEntry;\n }\n\n // close the directory\n close(dir);\n } else {\n // file does exist ( indexNodeNumber >= 0 )\n\n // if it's a directory, we can't truncate it\n if ((currIndexNode.getMode() & S_IFMT) == S_IFDIR) {\n // return (EISDIR) if the file is a directory\n process.errno = EISDIR;\n return -1;\n }\n\n // check to see if the file is writeable by the user\n // ??? tbd\n // return (EACCES) if the file does exist and is unwritable\n\n // free any blocks currently allocated to the file\n int blockSize = fileSystem.getBlockSize();\n int blocks = (currIndexNode.getSize() + blockSize - 1) /\n blockSize;\n for (int i = 0; i < blocks; i++) {\n int address = currIndexNode.getBlockAddress(i);\n if (address != FileSystem.NOT_A_BLOCK) {\n fileSystem.freeBlock(address);\n currIndexNode.setBlockAddress(i, FileSystem.NOT_A_BLOCK);\n }\n }\n\n // update the inode to size 0\n currIndexNode.setSize(0);\n\n // write the inode to the file system.\n fileSystem.writeIndexNode(currIndexNode, indexNodeNumber);\n\n // set up the file descriptor\n fileDescriptor =\n new FileDescriptor(fileSystem, currIndexNode, flags);\n // assign inode for the new file\n fileDescriptor.setIndexNodeNumber(indexNodeNumber);\n\n }\n\n return open(fileDescriptor);\n }",
"public static void init(){\n Path path = FileDirectoryUtil.getPath(\"src\", \"fileIO\", \"test.txt\");\n FileDirectoryUtil.tryCreateDirectory(path);\n\n // Try to create the file\n path = Paths.get(path.toAbsolutePath().toString(), \"test.txt\");\n FileDirectoryUtil.tryCreateFile(path);\n\n // Print out the final location of the file\n System.out.println(path.toAbsolutePath());\n\n // Try to write to the file\n IOUtil.tryWriteToFile(getContent(), path);\n\n // Try to print the content of the file\n IOUtil.tryPrintContents(path);\n\n }",
"public Storage(String filePath) {\n this.filePath = filePath;\n this.ui = new Ui();\n }",
"private void createDir(){\n\t\tPath path = Path.of(this.dir);\n\t\ttry {\n\t\t\tFiles.createDirectories(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"void createFile()\n {\n //Check if file already exists\n try {\n File myObj = new File(\"src/main/java/ex45/exercise45_output.txt\");\n if (myObj.createNewFile()) {\n System.out.println(\"File created: \" + myObj.getName());// created\n } else {\n System.out.println(\"File already exists.\"); //exists\n }\n //Error check\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n }",
"static void initContacts(){\n String directory = \"contacts\";\n String filename = \"contacts.txt\";\n Path contactsDirectory= Paths.get(directory);\n Path contactsFile = Paths.get(directory, filename);\n try {\n if (Files.notExists(contactsDirectory)) {\n Files.createDirectories((contactsDirectory));\n System.out.println(\"Created directory\");\n }\n if (!Files.exists(contactsFile)) {\n Files.createFile(contactsFile);\n System.out.println(\"Created file\");\n }\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n }",
"public static void crearPartida() throws FileNotFoundException, IOException, ExcepcionesFich {\n\t\tLecturaFicheros.AllLecture(\"C:\\\\Users\\\\Erick\\\\pruebaPOO.txt\");\n\t\tinterfaz = new GUI(0);\t\t\n\t}",
"@Override\r\n\tpublic void create() {\n\t\t\r\n\t}",
"public void createFile(String name, String type) {\n\n final String fileName = name;\n\n final String fileType = type;\n\n // create new contents resource\n Drive.DriveApi.newDriveContents(mGoogleApiClient)\n .setResultCallback(new ResultCallback<DriveApi.DriveContentsResult>() {\n @Override\n public void onResult(DriveApi.DriveContentsResult result) {\n\n if (!result.getStatus().isSuccess()) {\n\n return;\n }\n\n final DriveContents driveContents = result.getDriveContents();\n\n // Perform I/O off the UI thread.\n new Thread() {\n\n @Override\n public void run() {\n\n if (mCRUDapi != null) {\n // write content to DriveContents\n mCRUDapi.onCreateFile(driveContents.getOutputStream());\n }\n\n createFile(fileName, fileType, driveContents);\n }\n }.start();\n\n\n }\n });\n }",
"void path(String path);",
"void path(String path);",
"public Path write(final FileSystem fs, final Path p)\n throws IOException {\n FSUtils.create(fs, p);\n FSDataOutputStream out = fs.create(p);\n try {\n write(out);\n } finally {\n out.close();\n }\n return p;\n }",
"private void createFile() {\n if (mDriveServiceHelper != null) {\n Log.d(TAG, \"Creating a file.\");\n\n mDriveServiceHelper.createFile()\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n //progressDialog.setProgress(100);\n progressDialog.dismiss();\n Toast.makeText(MainActivity.this, \"Download Successful\", Toast.LENGTH_SHORT).show();\n }\n })\n .addOnFailureListener(exception ->\n Log.e(TAG, \"Couldn't Create file.\", exception));}\n }",
"@Override\n\tpublic void create() {\n\t\t\n\t}",
"Folder createFolder();",
"@Produces\n\tpublic Path produceFile() throws IOException{\n\t\tlogger.info(\"The path (generated by PathProducer) will be injected here - # Path : \"+path);\n\t\tif(Files.notExists(path)){\n\t\t\tFiles.createDirectory(path);\n\t\t\tlogger.info(\" Directory Created :: \" +path);\n\t\t}\n\t\t/*\n\t\t * currentTimeMillis will be injected by NumberPrefixProducer and has a seperate qualifier\n\t\t */\n\t\tPath file = path.resolve(\"myFile_\" + currentTimeMillis + \".txt\");\n\t\tlogger.info(\"FileName : \"+file);\n\t\tif(Files.notExists(file)){\n\t\t\tFiles.createFile(file);\n\t\t}\n\t\tlogger.info(\" File Created :: \" +file);\n\t\treturn file;\n\t}",
"public void setRing(String path);",
"public void createStorageFile() throws IoDukeException {\n PrintWriter writer = null;\n try {\n writer = getStorageFile();\n } catch (IOException e) {\n throw new IoDukeException(\"Error opening task file for reading\");\n } finally {\n if (writer != null) {\n writer.close();\n }\n }\n }",
"static void createNewFile(String path) \n\t\t{\n\t\tLinkedList<String> defaultData = new LinkedList<String>();\n\t\tdefaultData.add(\"1,Frank,West,98,95,87,78,77,80\");\n\t\tdefaultData.add(\"2,Dianne,Greene,78,94,88,87,95,92\");\n\t\tdefaultData.add(\"3,Doug,Lei,78,94,88,87,95,92\");\n\t\tdefaultData.add(\"4,James,Hewlett,69,92,74,77,89,91\");\n\t\tdefaultData.add(\"5,Aroha,Wright,97,92,87,83,82,92\");\n\t\t\n\t\ttry \n\t\t{\n\t\t\tPrintWriter newFile = new PrintWriter(path, \"UTF-8\"); // Create .txt file in given path\n\t\t\t\n\t\t\tfor (String s : defaultData) \n\t\t\t{\n\t\t\t\tnewFile.println(s); // Write To file\n\t\t\t}\n\t\t\t\n\t\t\tnewFile.close(); // Close File\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"studentData.txt Created Successfully!\");\n\t\t\n\t}",
"@Override\n\tpublic void create() {\n\n\t}",
"public PathElementIF createElement(String name);",
"@Override\n\tpublic void create () {\n\n\t}",
"public void initPath() {\r\n\t\tpath = new Path();\r\n\t}",
"public boolean create()\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn file.createNewFile() ;\n\t\t}\n\t\tcatch( IOException ex )\n\t\t{\n\t\t\tex.printStackTrace() ;\n\t\t\treturn false ;\n\t\t}\n\t}",
"public abstract String getPath();",
"public abstract String getPath();",
"public interface IOFactory {\n\n public FileIO newFile(String path);\n\n}",
"@Override\r\n\t\tpublic void create() {\n\t\t\tsuper.create();\r\n\t\t\tsuper.getOKButton().setEnabled(false);\r\n\t\t\tsuper.setTitle(Messages.MoveUnitsWizardPage1_Topolog__2);\r\n\t\t\tsuper.setMessage(Messages.MoveUnitsWizardPage1_Select_a_name_source_folder_and_a_);\r\n\t\t\tsuper.getShell().setText(Messages.MoveUnitsWizardPage1_Topolog__2);\r\n\t\t}",
"private void writeToFile(SVGGraphics2D generator, String path) throws IOException {\n\t\tFile file = new File(path);\n\t\tif (!file.exists())\n\t\t\tfile.createNewFile();\n\t\tFileWriter fw = new FileWriter(file);\n\t\tPrintWriter writer = new PrintWriter(fw);\n\t\tgenerator.stream(writer);\n\t\twriter.close();\n\t}",
"public File createINIFile(String path, String fileName) {\n\t File dir = new File(path);\n\t String newPath = path + \"/\";\n\t if (dir.exists()) {\n\t log.debug(\"createINIFile\", \"DIRECTORY EXISTS\");\n\t } else {\n\t dir.mkdir();\n\t }\n\t newPath = newPath + \"/\";\n\t File newFile = new File(newPath + fileName);\n\t if (!newFile.exists()) {\n\t newFile.setWritable(true);\n\t try {\n\t newFile.createNewFile();\n\t } catch (IOException e) {\n\t log.warn(\"writeKeyValue\", e.getMessage());\n\t }\n\t }\n\t return newFile;\n\t }",
"public boolean createPath(String path, byte[] value,int blockTimes){\n\t\tif (!zkClient.isConnected() && blockTimes == 0) {\n\t\t\treturn false;\n\t\t}\n TimeTrace trace = zkClient.startTracer(\"createPath:\" + path);//log message\n try{\n EnsurePath ensure = new EnsurePath(path).excludingLast();\n ensure.ensure(zkClient);//only for persistent node\n RetryLoop loop = zkClient.newRetryLoop();\n int _current = 0;\n while(loop.shouldContinue()){\n try{\n if(_current >= blockTimes){\n loop.markComplete(); //stop here.\n continue;\n }\n //blocking\n boolean isConnected = zkClient.blockUntilConnectedOrTimedOut();\n if(!isConnected){\n _current++;\n continue;\n }\n zkClient.getZooKeeper().create(path, value, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);\n loop.markComplete();\n } catch (KeeperException.NodeExistsException e){\n loop.markComplete();//exist ,stop here\n } catch (Exception e){\n loop.takeException(e);\n }\n }\n } catch (Exception e){\n e.printStackTrace();\n return false; //cant create path\n } finally{\n trace.commit();\n }\n return true;\n }",
"public static void main(String[] args) {\n\t\tFile file = new File(\"test/a.txt\");\r\n\t\tFileUtil.createFile(file);\r\n\t\t/*if(! file.exists()){\r\n\t\t\ttry {\r\n\t\t\t\tSystem.out.println(file.getAbsolutePath());\r\n\t\t\t\tfile.createNewFile();\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\t*/\r\n\t}",
"public static File fileFromPathOrCreate(String path) throws IOException {\n File propFile = new File(path);\n if (!propFile.exists()) {\n propFile.createNewFile();\n }\n return propFile;\n }",
"@Test\n public void CreateFile() throws Exception {\n createFile(\"src\\\\TestSuite\\\\SampleFiles\\\\supervisor.xlsx\",\n readTemplateXLSX(\"src\\\\TestSuite\\\\SampleFiles\\\\template_supervisor.xlsx\"));\n File file = new File(\"src\\\\TestSuite\\\\SampleFiles\\\\supervisor.xlsx\");\n Assert.assertTrue(file.exists());\n }",
"@Override\n\tpublic void onEditorCreate()\n\t{\n\t\tsetPath(t().getComponent(LttlPath.class, true));\n\t}",
"private void createFileHierarchie() throws IOException {\r\n\t\tlog.debug(\"START: SBIWebServer.createFileHierarchie\");\r\n\t\t// Create logs directory if not exist\r\n\t\tPath logPath = Paths.get(DEFAULT_LOG_LOCATION);\r\n\t\tif (!Files.exists(logPath)) {\r\n\t\t\tFiles.createDirectory(Paths.get(DEFAULT_LOG_LOCATION));\r\n\t\t\tlog.debug(\"Directory \"+DEFAULT_LOG_LOCATION+\" created\");\r\n\t\t}else {\r\n\t\t\tlog.debug(\"Directory \"+DEFAULT_LOG_LOCATION+\" already exists\");\r\n\t\t}\r\n\t\t\r\n\t\t// Create default server.xml\r\n\t\tPath serverConfigPath = Paths.get(CONFIG_SERVER_LOCATION);\r\n\t\tif (!Files.exists(serverConfigPath)) {\r\n\t\t\tXmlServerConfig xml = ConfigurationFactory.createDefaultXmlServerConfig();\r\n\t\t\ttry {\r\n\t\t\t\tXmlHelper.storeXml(xml, new File(CONFIG_SERVER_LOCATION));\r\n\t\t\t\tlog.debug(\"File \"+CONFIG_SERVER_LOCATION+\" created\");\r\n\t\t\t} catch (JAXBException e) {\r\n\t\t\t\tlog.error(\"Cannot store \"+CONFIG_SERVER_LOCATION,e);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tlog.debug(\"File \"+CONFIG_SERVER_LOCATION+\" already exists\");\r\n\t\t}\r\n\t\tlog.debug(\"END: SBIWebServer.createFileHierarchie\");\r\n\t}",
"void writeToPath(Path path, TypeSystem typeSystem) throws IOException, SAXException;",
"@Override\n public synchronized boolean create(Path file)\n {\n File f = file.toFile(root);\n if (file.isRoot()) {\n return false;\n }\n File parent = file.parent().toFile(root);\n parent.mkdirs();\n\n try {\n return f.createNewFile();\n } catch (IOException e) {\n \te.printStackTrace();\n return false;\n }\n }",
"public static void CreateFile(){\n try{\n new File(\"wipimages\").mkdir();\n logscommissions.createNewFile();\n }catch(Exception e){\n e.printStackTrace();\n System.out.println(\"CreateFile Failed\\n\");\n }\n }",
"public static void main(String[] args) {\n\n\t\tFile fi = new File(\"C:/test_io\");\n\t\tif(fi.exists()) {\n\t\t\t\n\t\t\tSystem.out.println(\"exists!\");\n\t\t}else {\n\t\t\tSystem.out.println(\"new\");\n\t\t\tfi.mkdir();\n\t\t}\n\t\t\n\t\tFile fic1 = new File(fi, \"AA\");\n\t\tfic1.mkdir();\n\t\t\n\t\tFile fic2 = new File(\"C:/test_io\", \"BB\");\n\t\tfic2.mkdir();\n\t\t\n\t\tFile fitxt = new File(fic1,\"a.txt\");\n\t\t\n\t\ttry {//checked exception\n\t\t\tfitxt.createNewFile();\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}",
"private void clickCreateDirOrFile(SubMenuItem item, TreeNode node, List<Long> refIdList) {\n String title = \"New \" + item.getFileName();\n String fileName = item.getFileName();\n String msg = \"Please enter the \" + fileName;\n if (!item.isDirectory()) {\n title += \" file\";\n msg += \" file name (.\" + item.getExtension() + \")\";\n } else {\n msg += \" name\";\n }\n SC.askforValue(title, msg, new ValueCallback() {\n @Override\n public void execute(String value) {\n TreeNode selectedNode = node;\n if (selectedNode == null) {\n selectedNode = treeGrid.getSelectedRecord();\n }\n\n if (value != null && !\"\".equals(value)) {\n VMDirectory targetDir = new VMDirectory();\n VMFile file = new VMFile();\n if (item.isDirectory) {\n targetDir.setName(value);\n } else {\n file.setExtension(Extension.getByCode(item.getExtension()));\n file.setName(value);\n }\n VMDirectory dir;\n if (tree.isEmpty()) {\n dir = new VMDirectory();\n dir.setId(rootId);\n } else if (!treeGrid.anySelected()) {\n dir = new VMDirectory();\n dir.setId(rootId);\n if (!checkSameName(tree.getChildren(tree.find(\"/\")), value, item.isDirectory, item.getExtension())) {\n SC.warn(\"This item already contains a child item with that name.\");\n return;\n }\n } else if (((FileTreeNode) selectedNode).getResource() instanceof VMFile) {\n TreeNode parentNode = tree.getParent(selectedNode);\n if (\"/\".equals(tree.getPath(parentNode))) {\n dir = new VMDirectory();\n dir.setId(rootId);\n if (!checkSameName(tree.getChildren(tree.find(\"/\")), value, item.isDirectory, item.getExtension())) {\n SC.warn(\"This item already contains a child item with that name.\");\n return;\n }\n } else {\n dir = (VMDirectory) ((FileTreeNode) parentNode).getResource();\n if (!checkSameName(tree.getChildren(parentNode), value, item.isDirectory, item.getExtension())) {\n SC.warn(\"This item already contains a child item with that name.\");\n return;\n }\n }\n\n } else {\n dir = (VMDirectory) ((FileTreeNode) selectedNode).getResource();\n if (!checkSameName(tree.getChildren(selectedNode), value, item.isDirectory, item.getExtension())) {\n SC.warn(\"This item already contains a child item with that name.\");\n return;\n }\n }\n if (item.isDirectory) {\n ZGCreateDirCommand createDirCommand = new ZGCreateDirCommand(editResourceService, viewHandler, dir.getId(), targetDir);\n createDirCommand.addCommandListener(new CommandListener() {\n\n @Override\n public void undoEvent() {\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.removeVMResource(createDirCommand.getFileId());\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n }\n\n @Override\n public void redoEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createDirCommand.getParentId()), createDirCommand.getDirectory(),\n createDirCommand.getFileId(), true);\n }\n\n @Override\n public void executeEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createDirCommand.getParentId()), createDirCommand.getDirectory(),\n createDirCommand.getFileId(), true);\n }\n\n @Override\n public void bindEvent() {\n viewHandler.clear();\n registerRightClickEvent();\n }\n\n });\n\n CompoundCommand c = new CompoundCommand();\n c.append(createDirCommand);\n manager.execute(c.unwrap());\n } else {\n List<Long> tmpRefIdlist = refIdList;\n if (tmpRefIdlist == null && selectedNode != null) {\n tmpRefIdlist = new ArrayList<Long>();\n tmpRefIdlist.add(((FileTreeNode) selectedNode).getResource().getId());\n\n }\n\n ZGCreateFileCommand createFileCommand = new ZGCreateFileCommand(editResourceService, viewHandler, dir.getId(), file, tmpRefIdlist);\n createFileCommand.addCommandListener(new CommandListener() {\n\n @Override\n public void undoEvent() {\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.removeVMResource(createFileCommand.getFileId());\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n }\n\n @Override\n public void redoEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(),\n createFileCommand.getFileId(), true);\n }\n\n @Override\n public void executeEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(),\n createFileCommand.getFileId(), true);\n }\n\n @Override\n public void bindEvent() {\n viewHandler.clear();\n registerRightClickEvent();\n }\n });\n CompoundCommand c = new CompoundCommand();\n c.append(createFileCommand);\n manager.execute(c.unwrap());\n }\n if (dir.getId() != rootId) {\n tree.openFolder(treeGrid.getSelectedRecord());\n }\n } else if (value != null) {\n SC.warn(\"<br>Name field is empty\");\n }\n\n }\n\n });\n }",
"public FSInfo createFSInfo() {\n return new CommandLineVcsFileSystemInfo(FileUtil.normalizeFile(new File(\"\")), null, null);\n }",
"public Path createCatalogPath() {\n if (isReference()) {\n throw noChildrenAllowed();\n }\n if (this.catalogPath == null) {\n this.catalogPath = new Path(getProject());\n }\n setChecked(false);\n return this.catalogPath.createPath();\n }",
"public String create(String path, byte[] data) {\n if (data == null) {\n data = new byte[0];\n }\n\n if (exist(path)) {\n setData(path, data);\n return path;\n }\n\n try {\n return client.create()\n .creatingParentsIfNeeded()\n .withMode(CreateMode.PERSISTENT)\n .forPath(path, data);\n } catch (Throwable e) {\n throw checkException(String.format(\"Fail to create node: %s\", path), e);\n }\n }",
"public void setPath(String path) {\n this.path = path;\n }",
"@Model \r\n\tprivate static String getDefaultName() {\r\n\t\treturn \"new_fileSystem\";\r\n\t}",
"Paths addPathItem(String name, PathItem item);",
"@Override\n protected void createFile(String directoryName, String fileNamePrefix) {\n }",
"Data() throws IOException {\n // Initialise new default path from scratch\n path = Path.of(\"src/main/data/duke.txt\");\n new File(\"src/main/data\").mkdirs();\n new File(path.toString()).createNewFile();\n }",
"void setFilePath(Path filePath);",
"private void createContents() {\r\n this.shell = new Shell(this.getParent(), this.getStyle());\r\n this.shell.setText(\"自動プロキシ構成スクリプトファイル生成\");\r\n this.shell.setLayout(new GridLayout(1, false));\r\n\r\n Composite composite = new Composite(this.shell, SWT.NONE);\r\n composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n composite.setLayout(new GridLayout(1, false));\r\n\r\n Label labelTitle = new Label(composite, SWT.NONE);\r\n labelTitle.setText(\"自動プロキシ構成スクリプトファイルを生成します\");\r\n\r\n String server = Filter.getServerName();\r\n if (server == null) {\r\n Group manualgroup = new Group(composite, SWT.NONE);\r\n manualgroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n manualgroup.setLayout(new GridLayout(2, false));\r\n manualgroup.setText(\"鎮守府サーバーが未検出です。IPアドレスを入力して下さい。\");\r\n\r\n Label iplabel = new Label(manualgroup, SWT.NONE);\r\n iplabel.setText(\"IPアドレス:\");\r\n\r\n final Text text = new Text(manualgroup, SWT.BORDER);\r\n GridData gdip = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n gdip.widthHint = SwtUtils.DPIAwareWidth(150);\r\n text.setLayoutData(gdip);\r\n text.setText(\"0.0.0.0\");\r\n text.addModifyListener(new ModifyListener() {\r\n @Override\r\n public void modifyText(ModifyEvent e) {\r\n CreatePacFileDialog.this.server = text.getText();\r\n }\r\n });\r\n\r\n this.server = \"0.0.0.0\";\r\n } else {\r\n this.server = server;\r\n }\r\n\r\n Button storeButton = new Button(composite, SWT.NONE);\r\n storeButton.setText(\"保存先を選択...\");\r\n storeButton.addSelectionListener(new FileSelectionAdapter(this));\r\n\r\n Group addrgroup = new Group(composite, SWT.NONE);\r\n addrgroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n addrgroup.setLayout(new GridLayout(2, false));\r\n addrgroup.setText(\"アドレス(保存先のアドレスより生成されます)\");\r\n\r\n Label ieAddrLabel = new Label(addrgroup, SWT.NONE);\r\n ieAddrLabel.setText(\"IE用:\");\r\n\r\n this.iePath = new Text(addrgroup, SWT.BORDER);\r\n GridData gdIePath = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n gdIePath.widthHint = SwtUtils.DPIAwareWidth(380);\r\n this.iePath.setLayoutData(gdIePath);\r\n\r\n Label fxAddrLabel = new Label(addrgroup, SWT.NONE);\r\n fxAddrLabel.setText(\"Firefox用:\");\r\n\r\n this.firefoxPath = new Text(addrgroup, SWT.BORDER);\r\n GridData gdFxPath = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n gdFxPath.widthHint = SwtUtils.DPIAwareWidth(380);\r\n this.firefoxPath.setLayoutData(gdFxPath);\r\n\r\n this.shell.pack();\r\n }",
"public boolean create(boolean isFile) {\n\t\t\n\t\tboolean result = false;\n\t\t\n\t\tif(!isFile)\n\t\t{\n\t\t\tFile temp = new File(this.path);\n\t\t\ttemp.mkdirs();\n\t\t\tresult = true;\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\tFile temp = new File(this.path);\n\t\t\tString folderContainingFile = \"/\";\n\t\t\t\n\t\t\tfor(int i = 0; i <= this.lenght - 2; i++)\n\t\t\t{\n\t\t\t\tfolderContainingFile += this.get(i) + \"/\";\n\t\t\t}\n\t\t\t\n\t\t\tnew File(folderContainingFile).mkdirs();\n\t\t\t\n\t\t\ttry {\n\t\t\t\ttemp.createNewFile();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tresult = true;\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public TEntry(FileSystem fileSystem, TPath path) {\n this(new TFileFactory(fileSystem), path);\n }",
"public void setPath(String path)\n {\n this.path = path;\n }",
"private void createDirectory(String path) throws IOException {\n\t\tfinal Path p = Paths.get(path);\n\t\tif (!fileExists(p)) {\n\t\t\tFiles.createDirectory(p);\n\t\t}\n\t}",
"public void setPath(Path path) {\n this.path = path;\n }",
"public void createFile(File file) throws IOException {\n if (!file.exists()) {\n file.createNewFile();\n }\n }",
"private void createResource(IResource resource) throws CoreException {\n \t\tif (resource.exists()) {\n \t\t\treturn;\n \t\t}\n \n \t\tcreateResource(resource.getParent());\n \n \t\tint type = resource.getType();\n \n \t\tif (type == IResource.FOLDER) {\n \t\t\t((IFolder) resource).create(true, true, null);\n \t\t} else if (type == IResource.FILE) {\n \t\t\t((IFile) resource).create(null, true, null);\n \t\t} else {\n \t\t\tthrow new ResourceException(IResourceStatus.RESOURCE_WRONG_TYPE, null, \"Wrong resource type\", null);\n \t\t}\n \t}",
"public abstract T create(T file, boolean doPersist) throws IOException;",
"public final void addFileSystem (FileSystem fs) {\n synchronized (Repository.class) {\n // if the file system is not assigned yet\n if (!fs.assigned && !fileSystems.contains(fs)) {\n // new file system\n fileSystems.add(fs);\n String systemName = fs.getSystemName ();\n\n boolean isReg = names.get (systemName) == null;\n if (isReg && !systemName.equals (\"\")) { // NOI18N\n // file system with the same name is not there => then it is valid\n names.put (systemName, fs);\n fs.setValid (true);\n } else {\n // there is another file system with the same name => it is invalid\n fs.setValid (false);\n }\n // mark the file system as being assigned\n fs.assigned = true;\n // mark as a listener on changes in the file system\n fs.addPropertyChangeListener (propListener);\n fs.addVetoableChangeListener (vetoListener);\n\n // fire info about new file system\n fireFileSystem (fs, true);\n }\n }\n }"
] | [
"0.6632749",
"0.6370745",
"0.614906",
"0.5956886",
"0.5943932",
"0.5909386",
"0.5896113",
"0.58476704",
"0.58306056",
"0.5778499",
"0.57728",
"0.57535535",
"0.56863",
"0.56511116",
"0.56278634",
"0.56264126",
"0.561754",
"0.56105274",
"0.5595232",
"0.5590084",
"0.5577054",
"0.5570884",
"0.5570728",
"0.55642796",
"0.55607635",
"0.5551227",
"0.553199",
"0.5524933",
"0.5520706",
"0.5474604",
"0.5473198",
"0.5473045",
"0.5472435",
"0.5451278",
"0.5407638",
"0.5402268",
"0.53950983",
"0.53807896",
"0.5364886",
"0.53570944",
"0.53244936",
"0.53244627",
"0.53032476",
"0.52850753",
"0.52781284",
"0.52781224",
"0.52670926",
"0.5257933",
"0.5256606",
"0.52409744",
"0.52409744",
"0.5239515",
"0.52373314",
"0.5235789",
"0.52355754",
"0.5232626",
"0.5232384",
"0.5229903",
"0.5228414",
"0.5226797",
"0.5222853",
"0.52152246",
"0.52105266",
"0.5203658",
"0.520346",
"0.520346",
"0.52032506",
"0.5202554",
"0.51988846",
"0.5197947",
"0.5195691",
"0.51870185",
"0.5183341",
"0.51796424",
"0.51715696",
"0.516731",
"0.5161996",
"0.5145574",
"0.5136549",
"0.513193",
"0.5128058",
"0.5118338",
"0.51171875",
"0.51169735",
"0.51084995",
"0.5108242",
"0.5107837",
"0.5100665",
"0.50929874",
"0.50922805",
"0.50914985",
"0.50813866",
"0.507556",
"0.506783",
"0.5065024",
"0.5064952",
"0.50647116",
"0.5064266",
"0.5058344",
"0.5057529"
] | 0.5284575 | 44 |
TODO Autogenerated method stub fileSystem.delete(f, recursive) fileSystem.list() | @Override
public void removeDirectory(File directory, boolean recursive) throws FileNotFoundException, IOException {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deleteFile(File f);",
"public File delete(File f) throws FileDAOException;",
"private void deleteFile() {\r\n actionDelete(dataModelArrayList.get(position));\r\n }",
"public void delete() {\n\t\tclose();\n\t\t// delete the files of the container\n\t\tfor (int i=0; i<BlockFileContainer.getNumberOfFiles(); i++)\n\t\t\tfso.deleteFile(prefix+EXTENSIONS[i]);\n\t}",
"@Override\n\tpublic boolean delete() {\n\t\tboolean result = false;\n\t\ttry{\n\t\t\tif (this.exists()) {\n\t\t\t\tif (this.isDirectory()) {\n\t\t\t\t\tif (this.listFiles() != null) {\n\t\t\t\t\t\tfor (java.io.File file : this.listFiles()) {\n\t\t\t\t\t\t\tif (file.isDirectory()) ((File) file).delete();\n\t\t\t\t\t\t\telse if (file.isFile()) super.delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tsuper.delete();\n\t\t\t\t} else if (this.isFile()) super.delete();\n\t\t\t}\n\t\t\t\n\t\t\tresult = true;\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn result;\n\t}",
"private void recDelete(File file) {\n if (!file.exists()) {\n return;\n }\n if (file.isDirectory()) {\n File[] list = file.listFiles();\n if (list != null) {\n for (File f : list) {\n recDelete(f);\n }\n }\n }\n file.delete();\n }",
"void fileDeleted(String path);",
"public void delete_File(){\n context.deleteFile(Constant.FILE_NAME);\n }",
"public static void delete(File file) throws IOException {\n String method = \"delete() - \";\n if ((file != null) && (file.exists())) {\n if (file.isDirectory()) {\n if (file.list().length == 0) {\n file.delete();\n }\n else {\n String files[] = file.list();\n for (String current : files) {\n File fileToDelete = new File(file, current);\n delete(fileToDelete);\n if (file.list().length == 0) {\n file.delete();\n }\n }\n }\n }\n else {\n file.delete();\n }\n }\n else {\n throw new IOException(method \n + \"The input file is null or does not exist.\");\n }\n }",
"@Override\n public void delete(File file) {\n }",
"public boolean delete()\n\t{\n\t\treturn deleteRecursive( file ) ;\n\t}",
"void deleteFile(FsPath path);",
"@PreAuthorize(\"hasRole('ROLE_ROOT')\")\n\tpublic void deleteFileUploads();",
"@Override\r\n\tpublic int fileDelete(int no) {\n\t\treturn sqlSession.delete(namespace + \"fileDelete\", no);\r\n\t}",
"@RequestMapping(value=\"/my_files\", method = RequestMethod.DELETE)\n @ResponseBody\n public AppResponse delete(@RequestParam String path) throws IOException, InvalidValueException,FilePathAccessDeniedException {\n\n String username = CSQLUserContext.getCurrentUser().getUsername();\n if(validator.isValidAndUserHasAccess(username, path)){\n return fileSystemService.delete(path, true);\n }\n\n return AppResponse.error();\n }",
"public static void delete(FileSystem fs, String name) throws IOException {\n\t\tPath dir = new Path(name);\n\t\tPath data = new Path(dir, DATA_FILE_NAME);\n\t\tPath index = new Path(dir, INDEX_FILE_NAME);\n\n\t\tfs.delete(data, true);\n\t\tfs.delete(index, true);\n\t\tfs.delete(dir, true);\n\t}",
"public void delete() throws Exception {\n\n getConnection().do_Delete(new URL(getConnection().getFilemanagerfolderendpoint() + \"/\" + getId()),\n getConnection().getApikey());\n }",
"public synchronized void deleteNow() {\n for (FileNode node : delete) {\n tryDelete(node);\n }\n delete.clear();\n }",
"@Override\r\n\tpublic void deleteFileData(Long id) {\n\t\t\r\n\t}",
"public static void delete(File f) {\n delete_(f, false);\n }",
"public synchronized void cleanupSimple() {\n\t\tfinal int maxNumFiles = 1000;\n\t\tfinal int numFilesToDelete = 50;\n\n\t\tString[] children = mStorageDirectory.list();\n\t\tif (children != null) {\n\t\t\tif (children.length > maxNumFiles) {\n\t\t\t\tfor (int i = children.length - 1, m = i - numFilesToDelete; i > m; i--) {\n\t\t\t\t\tFile child = new File(mStorageDirectory, children[i]);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tchild.delete();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static void delete(File file) {\n\n\t\tif (file.isDirectory()) {\n\n\t\t\t// directory is empty, then delete it\n\t\t\tif (file.list().length == 0) {\n\n\t\t\t\tfile.delete();\n\t\t\t\t// System.out.println(\"Directory is deleted : \" +\n\t\t\t\t// file.getAbsolutePath());\n\n\t\t\t} else {\n\n\t\t\t\t// list all the directory contents\n\t\t\t\tString files[] = file.list();\n\n\t\t\t\tfor (String temp : files) {\n\t\t\t\t\t// construct the file structure\n\t\t\t\t\tFile fileDelete = new File(file, temp);\n\n\t\t\t\t\t// recursive delete\n\t\t\t\t\tdelete(fileDelete);\n\t\t\t\t}\n\n\t\t\t\t// check the directory again, if empty then delete it\n\t\t\t\tif (file.list().length == 0) {\n\t\t\t\t\tfile.delete();\n\t\t\t\t\t// System.out.println(\"Directory is deleted : \" +\n\t\t\t\t\t// file.getAbsolutePath());\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\t// if file, then delete it\n\t\t\tfile.delete();\n\t\t\t// System.out.println(\"File is deleted : \" +\n\t\t\t// file.getAbsolutePath());\n\t\t}\n\t}",
"public void delete() throws IOException {\n\t\tclose();\n\t\tdeleteContents(directory);\n\t}",
"private void deleteDhiFiles(File f) {\n\t\tString hdfName = f.getName().substring(0, f.getName().lastIndexOf(\".\"));\n\t\tFile dirFile = new File(f.getParent());\n\t\tfor (File file : dirFile.listFiles()) {\n\t\t\tString fileName = file.getName();\n\t\t\tif (fileName.contains(hdfName)) {\n\t\t\t\tSystem.out.println(\"Delete: \" + fileName);\n\t\t\t\tfile.delete();\n\t\t\t}\n\t\t}\n\t}",
"private void deleteFilesFromDirectory(ArrayList<File> files)\n {\n for(File file:files) {\n Log.i(\"file\",\"indide\"+file.getPath());\n if (file.exists()) {\n Log.i(\"file\",\"exist\"+file.getPath());\n if (file.delete()) {\n Log.i(\"file\",\"delted successfully\"+file.getPath());\n } else {\n Log.i(\"file\",\"unable to delte file\"+file.getPath());\n }\n }\n }\n }",
"public boolean delete(String path, boolean recurse) throws SystemException;",
"@Override\n\tpublic void delete()\n\t{\n\t\tcachedContent = null;\n\t\tFile outputFile = getStoreLocation();\n\t\tif ((outputFile != null) && outputFile.exists())\n\t\t{\n\t\t\tif (Files.remove(outputFile) == false)\n\t\t\t{\n\t\t\t\tlog.error(\"failed to delete file: \" + outputFile.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t}",
"protected synchronized void delete()\n {\n if (this.file.exists())\n {\n this.file.delete();\n }\n }",
"public void deleteFile() {\n\t\tif (JOptionPane.showConfirmDialog(desktopPane,\n\t\t\t\t\"Are you sure? this action is permanent!\") != JOptionPane.YES_OPTION)\n\t\t\treturn;\n\n\t\tEllowFile file = null;\n\t\tTreePath paths[] = getSelectionModel().getSelectionPaths();\n\t\tif (paths == null)\n\t\t\treturn;\n\t\tfor (TreePath path : paths) {\n\t\t\tDefaultMutableTreeNode node = (DefaultMutableTreeNode) path\n\t\t\t\t\t.getLastPathComponent();\n\t\t\tfile = (EllowFile) node.getUserObject();\n\t\t\tEllowynProject project = file.parentProject;\n\t\t\tfile.deleteAll();\n\t\t\tif (!file.isProjectFile && project != null)\n\t\t\t\tproject.rebuild(); // don't rebuild the project if the project\n\t\t\t\t\t\t\t\t\t// itself is deleted\n\t\t\tdesktopPane.closeFrames(file);\n\t\t\tmodel.removeNodeFromParent(node);\n\t\t}\n\t}",
"public void delete();",
"public void delete();",
"public void delete();",
"public void delete();",
"public void delete();",
"public void delete();",
"public void deleteIndex() throws IOException {\n synchronized (getLock()) {\n flush();\n if (ZimbraLog.index_add.isDebugEnabled()) {\n ZimbraLog.index_add.debug(\"Deleting index \" + luceneDirectory);\n }\n\n String[] files;\n try {\n files = luceneDirectory.listAll();\n } catch (NoSuchDirectoryException ignore) {\n return;\n } catch (IOException e) {\n ZimbraLog.index_add.warn(\"Failed to delete index: %s\",\n luceneDirectory, e);\n return;\n }\n\n for (String file : files) {\n luceneDirectory.deleteFile(file);\n }\n }\n }",
"private void delete() {\n\n\t}",
"public DeleteTResponse remove(String path, boolean recursive, DeleteTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;",
"@AfterClass(groups ={\"All\"})\n\tpublic void deleteFolder() {\n\t\ttry {\n\t\t\tUserAccount account = dciFunctions.getUserAccount(suiteData);\n\t\t\tUniversalApi universalApi = dciFunctions.getUniversalApi(suiteData, account);\n\t\t\tif(suiteData.getSaasApp().equalsIgnoreCase(\"Salesforce\")){\n\t\t\t\tfor(String id:uploadId){\n\t\t\t\t\tMap<String,String> fileInfo = new HashMap<String,String> ();\n\t\t\t\t\tfileInfo.put(\"fileId\", id);\n\t\t\t\t\tdciFunctions.deleteFile(universalApi, suiteData, fileInfo);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tdciFunctions.deleteFolder(universalApi, suiteData, folderInfo);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tLogger.info(\"Issue with Delete Folder Operation \" + ex.getLocalizedMessage());\n\t\t}\n\t}",
"public void delete() {\r\n Log.d(LOG_TAG, \"delete()\");\r\n for (int i = 0; i < mNumSegments; i++) {\r\n File chunk = new File(getFileNameForIndex(i));\r\n if (chunk.delete()) {\r\n Log.d(LOG_TAG, \"Deleted file \" + chunk.getAbsolutePath());\r\n }\r\n }\r\n new File(mBaseFileName + \".zip\").delete();\r\n }",
"public void removeExpiredFiles() {\n \t\n \tsetCurrentTimeNow();\n\n File dir = new File(fsResource.getPath());\n File[] list = dir.listFiles(this);\n for (File file : list) {\n \tlogger.info(\"Auto expire file removed: {}\", file.getName());\n \tfile.delete();\n }\n }",
"public void deleteAllFromDB() {\r\n for (int i = 0; i < uploads.size(); i++) {\r\n FileUtil.deleteFile(uploads.get(i).getFilepath());\r\n }\r\n super.getBasebo().remove(uploads);\r\n }",
"public void delete(){\r\n\r\n }",
"private void clearClipsDirectory(){\n /* Citation : http://helpdesk.objects.com.au/java/how-to-delete-all-files-in-a-directory#:~:text=Use%20the%20listFiles()%20method,used%20to%20delete%20each%20file. */\n File directory = new File(Main.CREATED_CLIPS_DIRECTORY_PATH);\n File[] files = directory.listFiles();\n if(files != null){\n for(File file : files){\n if(!file.delete()) System.out.println(\"Failed to remove file \" + file.getName() + \" from \" + Main.CREATED_CLIPS_DIRECTORY_PATH);\n }\n }\n }",
"public void delete() {\n\n\t}",
"public final boolean recursiveDelete(File file) {\r\n if (isFileSystem(file)) {\r\n if (file.isDirectory()) {\r\n // delete all children first\r\n File[] children = FileSystemView.getFileSystemView().getFiles(file, false);\r\n for (File f : children) {\r\n if (!recursiveDelete(f)) {\r\n return false;\r\n }\r\n }\r\n // delete this file.\r\n return file.delete();\r\n }\r\n else {\r\n return file.delete();\r\n }\r\n }\r\n else {\r\n return false;\r\n }\r\n }",
"boolean deleteFile(File f);",
"public static void delete(File d) {\n\t\tif (d.isDirectory()) {\n\t\t\tfor (File f: d.listFiles()) delete(f);\n\t\t\td.delete();\n\t\t} else d.delete();\n\t}",
"boolean hasDeleteFile();",
"private void deleteCacheFiles() {\n\n\t\t// get the directory file\n\t\tFile cache = new File(Constants.CACHE_DIR_PATH);\n\n\t\t// check if we got the correct instance of that directory file.\n\t\tif (!cache.exists() || !cache.isDirectory())\n\t\t\treturn;\n\n\t\t// gets the list of files in the directory\n\t\tFile[] files = cache.listFiles();\n\t\t// deleting\n\n\t\tdeleteFiles(cache);\n\t\tfiles = null;\n\t\tcache = null;\n\n\t}",
"private void DeleteCMVMMVData() {\n String path = GetFilePath();\r\n File dir = new File(path);\r\n for (File file : dir.listFiles())\r\n if (!file.isDirectory())\r\n file.delete();\r\n DownloadCMVMMVFiles();//state, circle, ran, div\r\n }",
"private void clearFiles() {\r\n File file = new File(\"test_files/upload\");\r\n File[] files = file.listFiles();\r\n for (File delFile : files) {\r\n delFile.delete();\r\n }\r\n file = new File(\"test_files/stress.jar\");\r\n file.delete();\r\n }",
"public File[] DeleteFile(String sfileName) {\n\t \tFile dir = new File(fileStorageLocation.toString());\n\t \tFile[] matchingFiles = dir.listFiles(new FilenameFilter() {\n\t \t public boolean accept(File dir, String name) {\n\t \t return name.endsWith(\"_\" + sfileName);\n\t \t }\n\t \t});\n\t \t\n\t \tfor (int i = 0; i < matchingFiles.length; i++)\n\t \t{\n\t \t\tmatchingFiles[i].delete();\n\t \t}\n \t\n return matchingFiles;\n }",
"public void deleteAll();",
"private void deleteFile() {\n\t\tFile dir = getFilesDir();\n\t\tFile file = new File(dir, FILENAME);\n\t\tfile.delete();\n\t}",
"public void delete(String so_cd);",
"@Test\n public void normal_recursive_delete_WebDAV_collection() {\n String collectionName = \"deleteDavCollection\";\n String davFileName = \"davFile.txt\";\n\n try {\n // Create collection.\n DavResourceUtils.createWebDAVCollection(Setup.TEST_CELL1, Setup.TEST_BOX1, collectionName,\n Setup.BEARER_MASTER_TOKEN, HttpStatus.SC_CREATED);\n // Create dav file.\n DavResourceUtils.createWebDAVFile(Setup.TEST_CELL1, Setup.TEST_BOX1, collectionName + \"/\" + davFileName,\n \"text/html\", TOKEN, \"foobar\", HttpStatus.SC_CREATED);\n // Recursive delete collection.\n deleteRecursive(collectionName, \"true\", HttpStatus.SC_NO_CONTENT);\n } finally {\n deleteRecursive(collectionName, \"true\", -1);\n }\n }",
"@Override\n public void deleteFiles(Collection<String> absolutePaths) {\n gemFileDb.delete(absolutePaths);\n }",
"public void delete() {\r\n if (this.selectedTag != null) {\r\n for (int i = uploads.size() -1; i >= 0 ; i--) {\r\n if (this.selectedTag.equals(uploads.get(i).getTag())) {\r\n FileUtil.deleteFile(uploads.get(i).getFilepath());\r\n uploads.remove(i);\r\n break;\r\n }\r\n }\r\n }\r\n }",
"@Test\n public void listFilesTest() throws ApiException {\n Integer devid = null;\n String path = null;\n List<FileOnDevice> response = api.listFiles(devid, path);\n\n // TODO: test validations\n }",
"@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}",
"public static void delTree(File file) {\r\n File[] files = file.listFiles();\r\n if (files != null) { \r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n delTree(files[i]);\r\n }\r\n }\r\n }\r\n files = file.listFiles();\r\n if (files != null) {\r\n for (int i = 0; i < files.length; i++) {\r\n files[i].delete();\r\n }\r\n }\r\n }",
"public void removeFiles() throws ServiceException;",
"public static void deleteFileOrDirectory(KVFile file) {\n if (file.isDirectory()) {\n String[] children = file.list();\n for (String aChildren : children) {\n if (new KVFile(file, aChildren).isDirectory() && !aChildren.equals(\"PreinstalledMaps\") && !aChildren.equals(\"Maps\")) {\n deleteFileOrDirectory(new KVFile(file, aChildren));\n } else {\n new KVFile(file, aChildren).delete();\n }\n }\n }\n }",
"int deleteByPrimaryKey(Integer fileId);",
"public java.lang.String[] getDeletedFiles(){\r\n return localDeletedFiles;\r\n }",
"@Override\n\tpublic long deleteAll() {\n\t\treturn deleteAll(false);\n\t}",
"private void deleteImage(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint id= Integer.parseInt(request.getParameter(\"fileId\"));\n\t\tFiles file= new FilesDAO().view(id);\n\t\t//Logic to delete the file from the database\n\t\t\n\t\tnew FilesDAO().delete(id);\n\t\t\n\t\t\n\t\t//Logic to delete file from the file system\n\t\t\n\t\tFile fileOnDisk= new File(path+file.getFileName());\n\t\tif(fileOnDisk.delete()) {\n\t\t\tSystem.out.println(\"File deleted from the folder\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Sorr! file couldn't get deleted from the folder\");\n\t\t}\n\t\tlistingPage(request, response);\n\t}",
"@Override\n\t\tpublic void delete() {\n\n\t\t}",
"public void deleteAll() {\n\t\t\n\t}",
"alluxio.proto.journal.File.DeleteFileEntry getDeleteFile();",
"public int deleteReq() {\n String fileName = \"\";\n\n Log.v(\"File input stream\", fileName);\n String[] fileList = getContext().fileList();\n Log.v(\"File input stream\", Integer.toString(fileList.length));\n\n for (int i = 0; i < fileList.length; i++) {\n Log.v(\"File input stream\", fileList[i]);\n try {\n fileName = fileList[i];\n context.deleteFile(fileName);\n } catch (Exception e) {\n Log.e(\"Exception Thrown\", \"Exception Thrown\");\n }\n }\n return 0;\n }",
"protected static void deleteTrash() {\n\t\tArrays.stream(new File(\".\").listFiles())\n\t\t\t.filter(f -> f.getName().startsWith(\"_tmp.\"))\n\t\t\t.forEach(File::delete);\n\t}",
"public void deleteAll() {\n\n\t}",
"public void delete() {\n\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tFile dir = new File(\"src/reports\");\n\t\t\t\tfor (File file : dir.listFiles())\n\t\t\t\tif (!file.isDirectory())\n\t\t\t\tfile.delete();\n\t\t\t\t}",
"public boolean delete();",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"public static void deleteRecursively(File file) throws IOException {\n\t\tboolean successful = true;\n\t\tif (file.isDirectory()) {\n\t\t\tfor (File sub : file.listFiles()) {\n\t\t\t\tdeleteRecursively(sub);\n\t\t\t}\n\t\t\tsuccessful = file.delete();\n\t\t} else if (file.isFile()) {\n\t\t\tsuccessful = file.delete();\n\t\t}\n\t\tif (!successful) {\n\t\t\tthrow new IOException(\"Could not delete:\" + file.getName());\n\t\t}\n\t}",
"public void deleteAll();",
"public void deleteAll();",
"public void deleteAll();",
"@Override\n\t\tpublic void deleteItem(int index) {\n\t\t\tmFiles.remove(index);\n\t\t}",
"@Override\n\tpublic String deleteAll() {\n\t\treturn null;\n\t}",
"void deleteFile(FileReference fileReferece);",
"@Override\n\tpublic void deleteAll() {\n\n\t}",
"@Override\n\tpublic void deleteAll() {\n\n\t}",
"@Override\n\tpublic void deleteAll() {\n\n\t}",
"private void przygotujFolderWynikowy() {\r\n\t\tFile folder = new File(\"./wynik\");\r\n\t\tif (!(folder.mkdir())) {\r\n\t\t\tFile[] tablica = folder.listFiles();\r\n\t\t\tif(tablica != null)\r\n\t\t\tfor (File f : tablica) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tf.delete();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t}",
"@Override\n\tpublic synchronized void clear() {\n\t\tFile[] files = mRootDirectory.listFiles();\n\t\tif (files != null) {\n\t\t\tfor (File file : files) {\n\t\t\t\tfile.delete();\n\t\t\t}\n\t\t}\n\t\tmEntries.clear();\n\t\tmTotalSize = 0;\n\t\tVolleyLog.d(\"Cache cleared.\");\n\t}",
"public static void main(String[] args) throws FileNotFoundException {\n\t\t\r\n\t\t\r\n\t\tDList list = new DList();\r\n\t\t\r\n\t\tFile input = new File(\"file.txt\");\r\n\t\t\r\n\t\tScanner read = new Scanner(input);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\twhile(read.hasNextLine() ) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tString name = read.next();\r\n\t\t\t\r\n\t\t\tif(!name.contains(\"delete\") )\r\n\t\t\t\t\tlist.add(name);\r\n\t\t\t\r\n\t\t\tif(name.contains(\"delete\") ) { \r\n\t\t\t\tname = read.next();\t\t\t\t\r\n\t\t\t\tlist.delete(name);\t\t\t\t\r\n\t\t\t}\t\t\t\r\n\t}\r\n\t\t\r\n\t\tread.close();\r\n\t\t\r\n\t\tlist.traverse();\r\n\t\t\r\n\t\t//list.traverseBack();\r\n\r\n\t}"
] | [
"0.6326734",
"0.631066",
"0.6257209",
"0.62514085",
"0.62177",
"0.6209572",
"0.6193751",
"0.61492753",
"0.6142686",
"0.6138524",
"0.61027855",
"0.6096539",
"0.6015902",
"0.6008497",
"0.60042584",
"0.5994464",
"0.5962637",
"0.59392995",
"0.5938004",
"0.59113616",
"0.5900495",
"0.58767873",
"0.5833332",
"0.583057",
"0.57828224",
"0.5776896",
"0.5773844",
"0.5752474",
"0.5752449",
"0.5744216",
"0.5744216",
"0.5744216",
"0.5744216",
"0.5744216",
"0.5744216",
"0.5728967",
"0.57154423",
"0.56954414",
"0.56949764",
"0.56942844",
"0.5680166",
"0.5669958",
"0.56597894",
"0.56536824",
"0.5644812",
"0.56316876",
"0.56261104",
"0.56229967",
"0.5617031",
"0.5611173",
"0.560519",
"0.560355",
"0.559545",
"0.55876774",
"0.5584758",
"0.5577532",
"0.5574115",
"0.5562126",
"0.5557028",
"0.55569315",
"0.555623",
"0.555623",
"0.555623",
"0.555623",
"0.55511874",
"0.5547723",
"0.55416495",
"0.55389124",
"0.5522715",
"0.5522268",
"0.5513978",
"0.5512352",
"0.5510269",
"0.5506967",
"0.5503737",
"0.5502838",
"0.5499832",
"0.54968727",
"0.5496508",
"0.5493114",
"0.54924476",
"0.54924476",
"0.54924476",
"0.54924476",
"0.54924476",
"0.54924476",
"0.54924476",
"0.54924476",
"0.5491208",
"0.5488576",
"0.5488576",
"0.5488576",
"0.54846644",
"0.547967",
"0.54716104",
"0.547129",
"0.547129",
"0.547129",
"0.5462909",
"0.5462354",
"0.54543257"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Iterable<File> list(File storageDirectory) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Iterable<File> list(File storageDirectory, FilenameFilter filter) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public boolean exists(File file) {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public boolean isDirectory(File directory) {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public FileStatus getFileStatus(File file) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public StorageInputStream open(File file) throws FileNotFoundException {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public StorageOutputStream create(File file) throws IOException {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void delete(File file) {
} | {
"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 StorageOutputStream append(File file) throws IOException {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
/ A function that returns the code as an array of Strings | public String[] getCodeLines()
{
return codeLines;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Code[] getCodes();",
"public byte[] code();",
"public String[] makeCodes(){\n \tHuffmanTempTree tree = makeTree();\n\t\treturn tree.inOrderTreeWalkPath(tree.root, \"\", codes);\n \t}",
"String[] mo1153c();",
"String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"java.lang.String getCode();",
"java.lang.String getCode();",
"public com.walgreens.rxit.ch.cda.CS[] getRealmCodeArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(REALMCODE$0, targetList);\n com.walgreens.rxit.ch.cda.CS[] result = new com.walgreens.rxit.ch.cda.CS[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }",
"public abstract String getFullCode();",
"private List<String> listCodesPizza() {\n\t\tString[] paths = file.list();\n\t\tList<String> stringList = new ArrayList<String>(Arrays.asList(paths));\n\t\treturn stringList;\n\t}",
"@Override\n public String allCodes() {\n return allCode;\n }",
"com.google.protobuf.ByteString\n getCodeBytes();",
"Code getCode();",
"public String[] toStrings();",
"@Override\r\n public String allCodes() {\r\n String allCodeStr = \"\";\r\n if (root == null || root.getChildrenMap().size() == 0) {\r\n return null;\r\n }\r\n List<String> answer = new ArrayList<String>();\r\n allCodesHelper(root, \"\", answer);\r\n for (String string : answer) {\r\n allCodeStr += string + \"\\n\";\r\n }\r\n return allCodeStr;\r\n }",
"private String[] getProgramFromFile(String filename) {\n\t\tString program = \"\";\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(filename))) {\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tprogram += line;\n\t\t\t\tprogram += \" \";\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn getTokens(program);\n\t}",
"public int[] getCodewords() {\n\t\treturn this.codewords;\n\t}",
"private List<String> getCodes(HttpClient client, String path, String tag) {\n GetMethod getMethod = new GetMethod(path);\n getMethod.addRequestHeader(\"User-Agent\",\n PropertyManager.getInstance().getUserAgent());\n getMethod.setQueryString(new NameValuePair[] {\n new NameValuePair(\"keyid\", KEY_ID)\n });\n\n List<String> codes = new ArrayList<String>();\n\n try {\n // Execute the method.\n int statusCode = client.executeMethod(getMethod);\n if (statusCode != HttpStatus.SC_OK) {\n logger.error(\"Method failed: {}\", getMethod.getStatusLine());\n return codes;\n }\n\n // Read the response body.\n InputStream responseBodyAsStream =\n getMethod.getResponseBodyAsStream();\n BufferedInputStream bis =\n new BufferedInputStream(responseBodyAsStream);\n\n // Deal with the response.\n Source src = new Source(bis);\n src.fullSequentialParse();\n\n List<Element> elements = src.getAllElements(tag);\n for (Element element: elements) {\n codes.add(element.getFirstElement(tag + \"_code\")\n .getContent().toString());\n }\n } catch (HttpException e) {\n logger.error(\"Fatal protocol violation\", e);\n } catch (IOException e) {\n logger.error(\"Fatal transport error\", e);\n } catch (IllegalArgumentException e) {\n logger.error(\"Illegal or inappropriate argument\", e);\n } catch (Exception e) {\n logger.error(\"Exception occurred\", e);\n } finally {\n // Release the connection.\n getMethod.releaseConnection();\n }\n\n return codes;\n }",
"com.google.protobuf.ByteString\n getCodeBytes();",
"public String toString()\n\t{\n\t\tString temp = \"\";\n\t\tfor (int i=0; i< lineCount; i++)\n\t\t{\n\t\t\ttemp += (i+1) + \": \" + codeLines[i] + \"\\n\";\n\t\t}\n\t\treturn temp;\n\t}",
"public static TextArray codeToTextArray(CharSequence methodCode) {\n\t\tfinal Splitter splitter = Splitter.on('\\n');\n\t\tfinal Iterable<String> lines = splitter.split(methodCode);\n\t\tString sep = \"\";\n\t\t\n\t\tfor (String s : lines) {\n\t\t\tfinal String s2 = CharMatcher.WHITESPACE.trimLeadingFrom(s);\n\t\t\tif (s2.length() < s.length()) {\n\t\t\t\tsep = s.substring(0, (s.length() - s2.length()));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (\"\".equals(sep)) {\n\t\t\treturn new TextArray(new CharSequence[] {methodCode}, \"\");\n\t\t}\n\t\treturn new TextArray(Splitter.on(sep).split(methodCode), sep);\n\t}",
"public String getCode();",
"public String getCode();",
"public String[] getFullStoreCodes() {\n Cursor c = dbR.query(STORE_TABLE_NAME, new String[]{\"_id\", STORE_CODE},\n null, null,\n null, null, STORE_CODE);\n\n c.moveToFirst();\n\n String[] cursors = new String[c.getCount()];\n for(int i = 0; i < cursors.length; i++) {\n cursors[i] = c.getString(1);\n c.moveToNext();\n }\n\n return cursors;\n }",
"String getMapCode();",
"public String[] getStringArray();",
"java.lang.String getCodeName();",
"public static List<List<String>> readCode(String fName){\n List<String> list = Aron.readFileLineByte(fName, 200);\n List<List<String>> list2d = new ArrayList<>();\n\n List<String> line = new ArrayList<>();\n for(String s : list){\n\n if(s.trim().length() > 0){\n line.add(s);\n }else{\n if(line.size() > 0) {\n list2d.add(line);\n line = new ArrayList<>();\n }\n }\n }\n return list2d;\n }",
"public List<String> getAllEnabledCourierCode();",
"public abstract String getAccessCode( String [ ] strLineDataArray );",
"public List<String> sourceString() {\n // Processing is done here\n return Arrays.asList(\"tomato\", \"carrot\", \"cabbage\");\n }",
"private static final String[] encode(String src) {\n \n if (src == null || src.length()==0) {\n return (new String[0]);\n }\n \n return StringUtils.split(src, \";\");\n }",
"public String[] getString();",
"public ArrayList<String> getFormattedCode() {\n return formattedCode;\n }",
"int[] mo56159c();",
"com.google.protobuf.ByteString\n getCodeNameBytes();",
"public String[] toStrings(String bin) {\n\t String strs[] = new String[makers.length];\n\t for (int i=0;i<strs.length;i++) strs[i] = makers[i].toString(bin);\n\t return strs;\n\t}",
"private List<String> runCode(JasminBytecode code) throws AssembleException {\n // Turn the Jasmin code into a (hopefully) working class file\n if (code == null) {\n throw new AssembleException(\"No valid Jasmin code to assemble\");\n }\n AssembledClass aClass = AssembledClass.assemble(code);\n // Run the class and return the output\n SandBox s = new SandBox();\n s.runClass(aClass);\n return s.getOutput();\n }",
"public byte getCode();",
"@Override\n public byte[] generateCode(byte[] data) {\n\treturn new byte[0];\n }",
"String getEACCode();",
"String[] getData();",
"@Override\r\n\tpublic List getCodeType() throws Exception {\n\t\treturn codeMasterService.getCodeType();\r\n\t}",
"public String[] getStringList();",
"public java.lang.String getCode() {\n java.lang.Object ref = code_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n code_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"int getCode();",
"int getCode();",
"int getCode();",
"java.lang.String getTranCode();",
"protected String toStringAsCode() {\r\n \t\treturn \"<\"+toStringAsElement()+\">\";\r\n \t}",
"public byte[] generateCode(VBox editorBox) {\n ArrayList<Byte> bytes = generateByteList(editorBox);\n bytes.add((byte) 2);\n bytes.add((byte) 'e');\n byte[] byteArray = new byte[bytes.size()];\n\n for (int i = 0; i < bytes.size(); i++) {\n byteArray[i] = bytes.get(i);\n }\n\n return byteArray;\n// int count =0;\n// for(Byte b:bytes){\n// if(count==0){\n// System.out.println();\n// count = Byte.toUnsignedInt(b);\n// }\n// System.out.print(Byte.toUnsignedInt(b)+\" \");\n// count--;\n// }\n// try {\n// FileOutputStream fos = new FileOutputStream(new File(\"C:\\\\Users\\\\Udith Arosha\\\\Desktop\\\\output.txt\"));\n// byte[] outBytes = new byte[bytes.size()];\n// fos.write(outBytes);\n// fos.flush();\n// fos.close();\n// } catch (FileNotFoundException ex) {\n// Logger.getLogger(CodeGenerator.class.getName()).log(Level.SEVERE, null, ex);\n// } catch (IOException ex) {\n// Logger.getLogger(CodeGenerator.class.getName()).log(Level.SEVERE, null, ex);\n// }\n }",
"org.globus.swift.language.Function[] getFunctionArray();",
"List<String> mo5876c();",
"@Override public String[][] getCommandText1( long[] array )\n {\n // Scan binary dump, find entry for this function\n int x = CPUID.findFunction( array, 0x80000007 );\n // Return \"n/a\" if this function entry not found\n if (x<0) { return NO_RESULT; }\n // Build and pre-blank result text array\n String[][] result = new String[NY][NX]; // Text formatted by control data\n for (int i=0; i<NY; i++) // Cycle for rows \n { \n for(int j=0; j<NX; j++) // Cycle for columns\n { \n result[i][j]=\"\"; \n } \n }\n // Parameters from CPUID dump, EDX register\n int p = 0; // pointer for sequentally store strings in the table\n int y = (int) ( array[x+3] >>> 32 ); // y = EDX\n CPUID.decodeBitmap( \"EDX\", DECODER_EDX, y , result , p );\n // Parameters from CPUID dump, EAX register\n p=NY1;\n y = (int) ( array[x+2] & (((long)((long)(-1)>>>32))) ); // y = EAX\n CPUID.decodeBitfields ( \"EAX\" , DECODER_EAX , y , result , p );\n // Parameters from CPUID dump, EBX register\n p=NY1+NY2;\n y = (int) ( array[x+2] >>> 32 ); // y = EBX\n CPUID.decodeBitmap ( \"EBX\" , DECODER_EBX , y , result , p );\n // Parameters from CPUID dump, ECX register\n p=NY1+NY2+NY3;\n y = (int) ( array[x+3] & (((long)((long)(-1)>>>32))) ); // y = ECX\n CPUID.decodeBitfields ( \"ECX\" , DECODER_ECX , y , result , p );\n // Result is ready, all strings filled\n return result;\n }",
"com.google.protobuf.ByteString\n getTranCodeBytes();",
"@Override\n\tpublic String[] toArray() {\n\t\tString strHostName = null;\n\t\ttry {\n\t\t\tstrHostName = InetAddress.getLocalHost().getHostAddress();\n\t\t} catch (UnknownHostException ex) {\n\t\t\tstrHostName = \"127.0.0.1\";\n\t\t}\n\t\tstrValue[0] = \"*LINX\"; // 0 :\n\t\tstrValue[1] = strHostName; // 1 :\n\t\tstrValue[5] = \"213\"; // 5 :\n\t\tstrValue[7] = \"0200\"; // 7 :\n\t\tstrValue[8] = \"*DSP\"; // 8 :\n\t\tstrValue[9] = \"MBSD\"; // 9 :\n\t\tstrValue[10] = \"*LINX\"; // 10 :\n\t\tstrValue[14] = \"01\"; // 14 :\n\t\tstrValue[17] = \"BBMBSLNINQFNC\"; // 17 :\n\t\tstrValue[22] = \"1\"; // 22 :\n\t\tstrValue[23] = \"10\"; // 23 :\n\t\tstrValue[24] = calla.getTeller(); // 24 :\n\t\tstrValue[25] = strHostName; // 25 :\n\t\tstrValue[26] = \"86305\"; // 26 :\n\t\tstrValue[27] = \"N\"; // 27 :\n\t\tstrValue[31] = calla.getTeller(); // 31 : User ID\n\t\tstrValue[32] = \"1\"; // 32 : Reference Number\n\t\tstrValue[34] = \"*END\"; // 34 : End of Group Indicator\n\t\tstrValue[36] = \"BTS\"; // 36 : Source ID\n\t\tstrValue[37] = \"RBS\"; // 37 : Destination ID\n\t\tstrValue[39] = strHostName; // 39 : Terminal ID\n\t\tstrValue[40] = \"27\"; // 40 : Bank Number\n\t\tstrValue[41] = calla.getBranch(); // 41 : Branch\n\t\t\t\t\t\t\t\t\t\t\t// Number\n\t\tstrValue[45] = \"86305\"; // Transaction Code\n\t\tstrValue[46] = \"I\"; // \"D\",\"C\" Action Code\n\t\tstrValue[47] = \"R\"; // Transaction Mode\n\t\tstrValue[48] = \"1\"; // No. Of Records To Retrieve\n\t\tstrValue[49] = \"N\"; // More Records Indicator\n\t\tstrValue[50] = \"F\"; // Search Method\n\t\tstrValue[56] = \"D\"; // 56 : Response Reason For Code 3\n\t\tstrValue[67] = calla.getApplicationNo(); // Account number\n\t\tstrValue[68] = calla.getFacilityCode(); // 240\n\t\tstrValue[69] = calla.getFacId();//\n\t\tstrValue[70] = calla.getCollateralId(); //\n\n\t\treturn strValue;\n\t}",
"String[] chiediScommessa();",
"public String getCode() {\t\t\t\t\t\t\t\t\treturn code;\t\t\t\t\t\t\t}",
"public String getCode(){\n\t\treturn new SmartAPIModel().getCpSourceCode(cp.getLocalName());\n\t}",
"public String[] getStringArray() {\r\n\t\tString[] a = value.getStringArray();\r\n\t\tif (a == null)\r\n\t\t\treturn null;\r\n\t\tint n = a.length;\r\n\t\tString[] b = new String[n];\r\n\t\tfor (int i = 0; i < n; i++)\r\n\t\t\tb[i] = substitution(a[i]);\r\n\t\treturn (b);\r\n\t}",
"private void recoverCodes(PrioQ p)\n\t{\n\t\tcodes = new String[256];\n\t\t\n\t\tString s = \"\";\n\t\twhile(s.length() < p.get(0).getCount())\n\t\t{\n\t\t\ts += \"0\";\n\t\t}\n\t\tp.get(0).setCanCode(s);\n\t\tcodes[p.get(0).getData()] = s;\n\t\t\n\t\tint n = 0;\n\t\tfor(int i = 1; i < p.size(); i++)\n\t\t{\n\t\t\tn++;\n\t\t\twhile(Integer.toBinaryString(n).length() < \n\t\t\t\t\tp.get(i).getCount())\n\t\t\t{\n\t\t\t\tn = n << 1;\n\t\t\t}\n\t\t\t\n\t\t\tp.get(i).setCanCode(Integer.toBinaryString(n));\n\t\t\tcodes[p.get(i).getData()] = Integer.toBinaryString(n);\n\t\t}\n\t}",
"public static String[] simplifyCodes (TextFragment tf, boolean removeLeadingTrailingCodes) {\r\n \t\tCodeSimplifier simplifier = new CodeSimplifier();\r\n \t\treturn simplifier.simplifyAll(tf, removeLeadingTrailingCodes);\r\n \t}",
"public static String[] getISOLanguages() {\n/* 229 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public IAstRlsString[] getRlsStrings();",
"public String[] list(){\n\t\t\n\t\tSet<String> t = contents.keySet();\n\t\tString s[] = t.toArray(new String[0]);\n\t\treturn s;\n\t}",
"public java.lang.String getCode() {\n java.lang.Object ref = code_;\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 code_ = s;\n return s;\n }\n }",
"public String[] asStringArray() {\n\t\tString array[] = new String[4];\n\t\tarray[0] = \"Name: \" + this.name;\n\t\tarray[1] = \"Money: \" + Double.toString(this.money);\n\t\tarray[2] = \"On table: \" + Double.toString(onTable);\n\t\tif (this.getBlind() == Blind.NONE) {\n\t\t\tarray[3] = \"\";\n\t\t} else {\n\t\t\tarray[3] = \"Blind \" + this.blind.name();\n\t\t}\n\t\treturn array;\n\t}",
"public com.google.protobuf.ByteString\n getCodeBytes() {\n java.lang.Object ref = code_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n code_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String CodeInterpreter() {\n\n\t\tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n\t\treturn \"DA\" + \"_\" + timeStamp;\n\t}",
"private String createRandCode() {\n final String ALPHA_STRING = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n StringBuilder builder = new StringBuilder();\n int cnt = CODE_LEN;\n while (cnt-- != 0) {\n int charPos = (int) (Math.random()*ALPHA_STRING.length());\n builder.append(ALPHA_STRING.charAt(charPos));\n }\n Log.i(\"GameCode\", \"createRandCode: \" + builder.toString());\n return builder.toString();\n }",
"public String[] generatePigScript() {\n SortedSet<String> columnNames = getColumnNames();\n if(null==columnNames||columnNames.isEmpty()){\n throw new IllegalStateException(\"Got empty column names can not generate the script\");\n }\n\n\n\n List<String> pigScript = new ArrayList<String>();\n\n pigScript.addAll(generator.genPigScriptForNumbers());\n //pigScript.addAll(generator.genPigScriptForText());\n\n return pigScript.toArray(new String[]{});\n }",
"public ArrayList<String> findProductCodes(){\n\t\t\tArrayList<String> returnCodeNames = new ArrayList<String>();\n\t\t\t\n\t\t\tfor(Product p: products){\n\t\t\t\treturnCodeNames.add(p.getProductCode());\n\t\t\t}\n\t\t\t\n\t\t\treturn returnCodeNames;\n\t\t\t\n\t\t}",
"public String getCode() { \n\t\treturn getCodeElement().getValue();\n\t}",
"@AutoEscape\n\tpublic String getDataCode();",
"private static List<String> getJavasSourceCodeFiels(Map<String,Object> map){\r\n \t\t\r\n \t\t\r\n \t\tSystem.out.println(\"............\");\r\n \t\tLinkedList<String> list = new LinkedList<String>();\r\n \t\tfor(String key : map.keySet()){\r\n \t\t\tObject o = map.get(key);\r\n \r\n \t\t\t//package...\r\n \t\t\tif(o instanceof IPackageFragment){\r\n \t\t\t\t//System.out.println(\"Package --> \" + key);\r\n \t\t\t\tkey = key.substring(0,key.indexOf('[')).trim();\r\n \t\t\t\tkey = PACKAGE + \"(\" + key + \")\";\r\n \t\t\t\tlist.add(key);\r\n \t\t\t}\r\n \t\t\t//class...\r\n \t\t\tif(o instanceof ICompilationUnit){\r\n \t\t\t\t//System.out.println(\"Class --> \" + key);\r\n \t\t\t\tString classname = key.substring(0,key.indexOf('[')).trim();\r\n \t\t\t\tString packagename = key.substring(key.indexOf(PACKAGE),key.indexOf('\\n',key.indexOf(PACKAGE)));\r\n \t\t\t\tkey = CLASS_WITH_MEMBERS + \"(\" + packagename + \",\" + classname + \")\";\r\n \t\t\t\tlist.add(key);\r\n \t\t\t}//method\r\n \t\t\tif(o instanceof IMethod){\r\n \t\t\t\tSystem.out.println(\"Methode --> \" + key);\r\n \t\t\t\tkey = METHOD + \"(\" + getQueryFromMethod((IMethod)o) + \")\";\r\n \t\t\t\tlist.add(key);\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif(o instanceof IField){\r\n \t\t\t\tSystem.out.println(\"Attribut --> \" + key);\r\n \t\t\t\tkey = FIELD + \"(\" + getQueryFromField((IField)o) + \")\";\r\n \t\t\t\tlist.add(key);\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn list;\r\n \t\t\r\n \t\t\r\n \t\t/*\r\n \t\tfor(String key : map.keySet()){\r\n \t\t\tObject o = map.get(key);\r\n \t\t\t//if(o instanceof ISourceAttribute)\r\n \t\t\t\t//System.out.println(\"attribute\");\r\n \t\t\t//if(o instanceof ISourceMethod)\r\n \t\t\t\t//System.out.println(\"methode\");\r\n \t\t\tif(o instanceof IPackageFragment) \r\n \t\t\t\tSystem.out.println(\"Package\");\r\n \t\t\tif(o instanceof ICompilationUnit)\r\n \t\t\t\tSystem.out.println(\"sour code file\");\r\n \t\t\t\t\r\n \t\t\t//\"oldquery or class('voller packagename', klassenname)\"\r\n \t\t\t\t\r\n \t\t\t\t\r\n \t\t\tif(o instanceof IField)\r\n \t\t\t\tSystem.out.println(\"Attribut\");\r\n \t\t\tif(o instanceof IType)\r\n \t\t\t\tSystem.out.println(\"classe also class ... in einem file\");\r\n \t\t\tif(o instanceof IMethod)\r\n \t\t\t\tSystem.out.println(\"Methode\");\r\n \t\t\tif(o instanceof IPackageFragmentRoot) \r\n \t\t\t\tSystem.out.println(\"jar package / src Ordner\");\r\n \t\t\tif(o instanceof IProject)\r\n \t\t\t\tSystem.out.println(\"Projekt Ordner\");\r\n \t\t\tif(o instanceof IClassFile)\r\n \t\t\t\tSystem.out.println(\"ClassFile\");\r\n \t\t\tif(o instanceof IAdaptable) //trieft auch auf viele ander sachen zu\r\n \t\t\t\tSystem.out.println(\"Libaraycontainer\");\r\n \t\t\tif(o instanceof IFile)\r\n \t\t\t\tSystem.out.println(\"file\"); //je nach ausgewlter ansicht knnen file auch *.java datein sein\r\n \t\t\tif(o instanceof IFolder)\r\n \t\t\t\tSystem.out.println(\"folder\");\r\n \t\t\tSystem.out.println(o.getClass());\r\n \t\t\t\r\n \t\r\n \t\t}\r\n \t\treturn null;\r\n \t\t*/\r\n \t}",
"public static String[] simplifyCodes (TextContainer tc, boolean removeLeadingTrailingCodes) {\r\n \t\tCodeSimplifier simplifier = new CodeSimplifier();\r\n \t\tString[] res = simplifier.simplifyAll(tc, removeLeadingTrailingCodes);\r\n \t\ttrimSegments(tc);\r\n \t\treturn res;\r\n \t}",
"public static String cardsToCodeString(Card[] cards) {\n if (cards == null || cards.length == 0)\n throw new IllegalArgumentException(\"Can't stringify empty or null array\");\n\n String[] codes = new String[cards.length];\n\n for (int i = 0; i < cards.length; i++)\n codes[i] = cards[i].getCode();\n\n return String.join(\" \", codes);\n }",
"String getStringList();",
"public java.lang.String[] get_return(){\r\n return local_return;\r\n }",
"private String identingCode(int offset, String codeSnippet) {\n\t\tStringBuilder code = new StringBuilder();\n\t\tString[] lineBroken = codeSnippet.split(\"\\n\");\n\t\tfor(int index=0; index < lineBroken.length; index++) {\n\t\t\tString line = lineBroken[index];\n\t\t\tStringBuilder tmpLine = new StringBuilder();\n\t\t\tif(index != 0) {\n\t\t\t\tfor(int i=0; i<offset; i++) {\n\t\t\t\t\ttmpLine.append(\"\");\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\ttmpLine.append(line.replace(\"\\t\", \"\")).append(\"\\n\");\n\t\t\tcode.append(tmpLine);\n\t\t}\n\t\treturn code.toString();\n\t}",
"public static void printAllPossibleCodes(String input) {\n\n String[] str=helper(input);\n for (int i=0;i<str.length;i++){\n System.out.println(str[i]);\n }\n\n }",
"String getAdditionalCode();",
"String getAdditionalCode();",
"String getAdditionalCode();",
"private String[] toArray(String str) { String arr[] = new String[1]; arr[0] = str; return arr; }",
"@Override\n\tpublic String[] toArray() {\n\t\tString strValue[] = new String[DSPPackager.PACKAGER_MBASE_88301I\n\t\t\t\t.getFieldDefinitionList().length];\n\t\tString strHostName = null;\n\t\ttry {\n\t\t\tstrHostName = InetAddress.getLocalHost().getHostAddress();\n\t\t} catch (UnknownHostException ex) {\n\t\t\tstrHostName = \"localhost\";\n\t\t}\n\t\tstrValue[0] = \"*LINX\"; // Header type\n\t\tstrValue[1] = strHostName; // Device Name\n\t\tstrValue[5] = \"213\"; // Header Length\n\t\tstrValue[7] = \"0200\"; // Version\n\t\tstrValue[8] = \"*DSP\"; // Version\n\t\tstrValue[9] = \"MBSD\"; // Data format\n\t\tstrValue[10] = \"*LINX\"; // Source ID\n\t\tstrValue[14] = \"01\"; // Source ID\n\t\tstrValue[17] = \"BBMBSLNMNTFNC\"; // Scenario Number\n\t\tstrValue[22] = \"1\";\n\t\tstrValue[23] = \"10\";\n\t\tstrValue[24] = aa.getTeller(); // User ID\n\t\tstrValue[25] = strHostName; // Terminal ID\n\t\tstrValue[26] = \"88301\"; // Supervisor ID\n\t\tstrValue[27] = \"N\";\n\t\tstrValue[31] = aa.getTeller(); // Message Header\n\t\tstrValue[32] = \"1\"; // Message Header\n\t\tstrValue[34] = \"*END\";\n\t\tstrValue[36] = \"BTS\";\n\t\tstrValue[37] = \"RBS\";\n\t\tstrValue[39] = strHostName; // Terminal ID\n\t\tstrValue[40] = \"27\"; // Journal Seq\n\t\tstrValue[41] = aa.getBranch(); // Branch Code\n\t\tstrValue[45] = \"88301\"; // Transaction Code\n\t\tstrValue[46] = \"C\"; // add\n\t\tstrValue[47] = \"R\"; // response\n\t\tstrValue[48] = \"1\"; // Work station\n\t\tstrValue[49] = \"N\";\n\t\tstrValue[50] = \"F\";\n\t\tstrValue[56] = \"\";\n\t\tstrValue[67] = aa.getApplicationNo(); // application Number\n\t\tstrValue[68] = aa.getCifNum();\n\t\tstrValue[69] = aa.getApplicationDate();\n\t\tstrValue[71] = aa.getBranch(); // lpad 5 '0'\n\t\tstrValue[72] = aa.getWorkingEx();\n\t\tstrValue[73] = aa.getSpecProvision(); // Y/N\n\t\tstrValue[74] = aa.getClasifielDate();\n\t\tstrValue[75] = aa.getCarCode();\n\t\tstrValue[76] = aa.getReviewDate();\n\t\tstrValue[77] = aa.getRetention();\n\t\tstrValue[78] = aa.getReviewReMark();\n\t\tstrValue[79] = aa.getRefinanceFrom();\n\t\tstrValue[80] = aa.getTucachPn();\n\t\tstrValue[81] = aa.getTinhHinhTc();\n\t\tstrValue[82] = aa.getKhaNangVayVon();\n\t\tstrValue[83] = aa.getDamBaoTienVay();\n\t\tstrValue[84] = aa.getLimitAmount();\n\t\tstrValue[85] = aa.getCurencyType();\n\t\tstrValue[86] = aa.getOfficeCode();\n\t\tstrValue[87] = aa.getClassification();\n\t\tstrValue[88] = aa.getMARemarck();\n\t\tstrValue[89] = aa.getMADate();\n\t\treturn strValue;\n\t}",
"public String toCodeString() {\n return String.format(\"%s = %s;\\n\", this.identifier.toString(), this.exp.toCodeString());\n }",
"String getInstructions();",
"public native java.lang.String[] __StringArrayMethod( long __swiftObject, java.lang.String[] arg );",
"int[] mo12208a(int i);",
"static String methodCode(Source code, Set<String> relevant){\n final UnitLocation located = locateUnit(code, relevant);\n final SourceSelection selection = new SourceSelection(ImmutableList.of(located));\n return selection.toCode();\n }",
"public static void main(String[] args) {\n\n\t\t\n\t\tString a = \"9B768C\";\n\t\tString c = \"\";\n\t\tint leng = a.length();\n\t\tString array[] = new String[leng];\n\t\t\n\t\tfor(int i = 0 ; i<leng; i++) {\n\t\t\tarray[i]= a.substring(i,i+1);\n\t\t\tSystem.out.println(c += array[i]);\n\t\t}\n\t\n\t\t\n\t}",
"public com.google.protobuf.ByteString\n getCodeBytes() {\n java.lang.Object ref = code_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n code_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"com.google.protobuf.ByteString getSqlCodeBytes();",
"@Override\n public String getCode(String name) {\n String type = keywords.stream()\n .map(keyword -> keyword.getCode())\n .collect(Collectors.joining(\" \"));\n\n String varName = name == null ? \"\" : \" \" + name;\n return type + varName;\n /*\n if (name == null) {\n return type;\n }\n \n return type + \" \" + name;\n */\n }",
"private Vector[] generateCode(Matrix gMatrix) throws Exception {\n cg = new CodeGenerator(gMatrix, qValue);\n cg.execute();\n while (!cg.isDone()) {\n if (Thread.interrupted()) {\n cg.cancel(true);\n throw new Exception();\n }\n }\n return cg.get();\n }"
] | [
"0.74176776",
"0.69337726",
"0.69311464",
"0.67212784",
"0.6565171",
"0.6565171",
"0.6565171",
"0.6565171",
"0.6565171",
"0.65557146",
"0.65557146",
"0.6219129",
"0.6206584",
"0.6096022",
"0.6095091",
"0.60223275",
"0.5988528",
"0.5985373",
"0.5976749",
"0.5975743",
"0.5963174",
"0.5959336",
"0.59565836",
"0.59322566",
"0.58932865",
"0.58523464",
"0.58523464",
"0.5849809",
"0.5839273",
"0.57660353",
"0.57629025",
"0.57433045",
"0.5736911",
"0.57300806",
"0.57118034",
"0.571026",
"0.5705798",
"0.5704045",
"0.57038057",
"0.5684266",
"0.5650762",
"0.56254673",
"0.56227213",
"0.5613367",
"0.5575504",
"0.55688304",
"0.5565296",
"0.55333436",
"0.5514605",
"0.5498571",
"0.5498571",
"0.5498571",
"0.54960227",
"0.54923934",
"0.5490379",
"0.54888254",
"0.548039",
"0.5446611",
"0.5441811",
"0.5425331",
"0.5423164",
"0.54174054",
"0.541056",
"0.54096395",
"0.5409064",
"0.5401409",
"0.5392948",
"0.53922486",
"0.53919595",
"0.5390469",
"0.5388801",
"0.53872365",
"0.53842",
"0.5383813",
"0.5376511",
"0.53733766",
"0.537267",
"0.53704184",
"0.5365514",
"0.5362889",
"0.5360156",
"0.53544605",
"0.5349509",
"0.53415775",
"0.5337641",
"0.5330502",
"0.5330502",
"0.5330502",
"0.5312778",
"0.5284421",
"0.5283989",
"0.528315",
"0.52814037",
"0.5277216",
"0.5276081",
"0.5274656",
"0.5269848",
"0.52676713",
"0.52671546",
"0.5255369"
] | 0.6388816 | 11 |
/ Determines if the code segment is a primitive operation. Examples of primitive operations include: Evaluating an expression Assigning a value to a variable Indexing into an array Calling a method Returning from a method | public int countPrimitive(String line)
{
int count = 0;
int totalCount = 0;
StringTokenizer ST = new StringTokenizer(line," ");
if(!ST.hasMoreTokens())
{
return -1;
}
else
{
while(ST.hasMoreTokens())
{
String token = ST.nextToken();
if(token.contains(">") || token.contains("<") || token.contains("==") || token.contains(">=") || token.contains("<=")) //Evaluating Expression
{
count = 1;
totalCount += count;
}
else if(token.contains("=")) //Assigning Value
{
count = 1;
totalCount += count;
}
else if(token.contains("[") && token.contains("]")) //Indexing Array
{
count = 1;
totalCount += count;
}
else if(token.contains(".") && token.contains("(") && token.contains(")")) // TODO Calling Method
{
count = 1;
totalCount += count;
}
else if(token.contains("return")) //Returning from Method
{
count = 1;
totalCount += count;
}
else if(token.contains("for") || token.contains("while") || token.contains("if")) //Returning from Method
{
count = 100;
count+=1;
totalCount += count;
/*--count; //if count neg- represent as 'n'
return count;*/
}
}
}
return totalCount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasPrimitive();",
"boolean isOp();",
"public boolean isPrimitive() {\n return false;\n }",
"private static boolean isPrimitiveType(DetailAST ast) {\n boolean result = false;\n final DetailAST parameterType = ast.findFirstToken(TokenTypes.TYPE);\n final DetailAST identToken = parameterType.getFirstChild();\n\n if (identToken != null) {\n switch (identToken.getType()) {\n case TokenTypes.LITERAL_BOOLEAN:\n case TokenTypes.LITERAL_INT:\n case TokenTypes.LITERAL_LONG:\n case TokenTypes.LITERAL_SHORT:\n case TokenTypes.LITERAL_BYTE:\n case TokenTypes.LITERAL_CHAR:\n case TokenTypes.LITERAL_VOID:\n case TokenTypes.LITERAL_DOUBLE:\n case TokenTypes.LITERAL_FLOAT:\n result = !isArrayOrElipsis(parameterType);\n break;\n default:\n }\n }\n return result;\n }",
"@Override\n public boolean isPrimitive() {\n return true;\n }",
"default boolean isPrimitive() {\n return false;\n }",
"public boolean isPrimitive() {\n return (getCockpitType() == Mech.COCKPIT_PRIMITIVE) || (getCockpitType() == Mech.COCKPIT_PRIMITIVE_INDUSTRIAL);\n }",
"private boolean isBuiltInProcedureTokenType()\n\t{\n\t\tswitch(theCurrentToken.TokenType)\n\t\t{\n\t\t\tcase GETBOOL: case GETFLOAT: case GETINTEGER: case GETSTRING: case GETCHAR:\n\t\t\tcase PUTBOOL: case PUTFLOAT: case PUTINTEGER: case PUTSTRING: case PUTCHAR:\n\t\t\t\treturn true;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n}",
"public boolean isPrimitive(Class paramClass) {\n/* 113 */ if (paramClass == null) {\n/* 114 */ throw new IllegalArgumentException();\n/* */ }\n/* */ \n/* 117 */ return paramClass.isPrimitive();\n/* */ }",
"boolean isProcessingInstruction(Object object);",
"boolean hasOperation();",
"public boolean isInstruction() {\n\t\treturn this.operation instanceof MagicInstruction;\n\t}",
"@Override\n public boolean ll_isPrimitiveType(int typeCode) {\n return !ll_isRefType(typeCode);\n }",
"private boolean isArithmeticCmd() {\r\n for (String cmd : ARITHMETIC_CMDS) {\r\n if (command.equals(cmd)) return true;\r\n }\r\n return false;\r\n }",
"public boolean isOp ( ) {\n\t\treturn extract ( handle -> handle.isOp ( ) );\n\t}",
"public final AliaChecker.primitive_return primitive() throws RecognitionException {\n\t\tAliaChecker.primitive_return retval = new AliaChecker.primitive_return();\n\t\tretval.start = input.LT(1);\n\n\t\tCommonTree root_0 = null;\n\n\t\tCommonTree _first_0 = null;\n\t\tCommonTree _last = null;\n\n\n\t\tCommonTree NUMBER23=null;\n\t\tCommonTree CHAR_EXPR24=null;\n\t\tTreeRuleReturnScope boolean_expr25 =null;\n\n\t\tCommonTree NUMBER23_tree=null;\n\t\tCommonTree CHAR_EXPR24_tree=null;\n\n\t\ttry {\n\t\t\t// src\\\\alia\\\\AliaChecker.g:288:32: ( NUMBER | CHAR_EXPR | boolean_expr )\n\t\t\tint alt17=3;\n\t\t\tswitch ( input.LA(1) ) {\n\t\t\tcase NUMBER:\n\t\t\t\t{\n\t\t\t\talt17=1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CHAR_EXPR:\n\t\t\t\t{\n\t\t\t\talt17=2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FALSE:\n\t\t\tcase TRUE:\n\t\t\t\t{\n\t\t\t\talt17=3;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 17, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\t\t\tswitch (alt17) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:289:7: NUMBER\n\t\t\t\t\t{\n\t\t\t\t\troot_0 = (CommonTree)adaptor.nil();\n\n\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tNUMBER23=(CommonTree)match(input,NUMBER,FOLLOW_NUMBER_in_primitive1709); \n\t\t\t\t\tNUMBER23_tree = (CommonTree)adaptor.dupNode(NUMBER23);\n\n\n\t\t\t\t\tadaptor.addChild(root_0, NUMBER23_tree);\n\n\t\t\t\t\tretval.type = new _Int();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:290:7: CHAR_EXPR\n\t\t\t\t\t{\n\t\t\t\t\troot_0 = (CommonTree)adaptor.nil();\n\n\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tCHAR_EXPR24=(CommonTree)match(input,CHAR_EXPR,FOLLOW_CHAR_EXPR_in_primitive1720); \n\t\t\t\t\tCHAR_EXPR24_tree = (CommonTree)adaptor.dupNode(CHAR_EXPR24);\n\n\n\t\t\t\t\tadaptor.addChild(root_0, CHAR_EXPR24_tree);\n\n\t\t\t\t\t retval.type = new _Char(); \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:292:7: boolean_expr\n\t\t\t\t\t{\n\t\t\t\t\troot_0 = (CommonTree)adaptor.nil();\n\n\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tpushFollow(FOLLOW_boolean_expr_in_primitive1739);\n\t\t\t\t\tboolean_expr25=boolean_expr();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tadaptor.addChild(root_0, boolean_expr25.getTree());\n\n\t\t\t\t\t retval.type = new _Bool(); \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tretval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n\n\t\t}\n\t\t \n\t\t catch (RecognitionException e) { \n\t\t \tif(!e.getMessage().equals(\"\")) {\n\t\t\t\t\tSystem.err.println(\"Exception!:\"+e.getMessage());\n\t\t\t\t}\n\t\t\t\tthrow (new AliaException(\"\"));\n\t\t } \n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}",
"public boolean isOprUner() /*const*/{\n\t\treturn Tkn==TipeToken.Not;\n\t}",
"public boolean isOprBiner() /*const*/{\n\t\treturn Tkn!=TipeToken.Not && Tkn!=TipeToken.Bilangan && !isPunctuator();\n\t}",
"private boolean literals() {\r\n return OPT(GO() && literal() && literals());\r\n }",
"private boolean isArithOp() throws IOException\n\t{\n\t\tboolean isValid = false;\n\t\t\n\t\tif(isRelation())\n\t\t{\n\t\t\tif(theNextToken.TokenType == TokenType.PLUS)\n\t\t\t{\n\t\t\t\tupdateToken();\n\t\t\t\tupdateToken();\n\t\t\t\t\n\t\t\t\tif(isArithOp())\n\t\t\t\t{\n\t\t\t\t\tisValid = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(theNextToken.TokenType == TokenType.MINUS)\n\t\t\t{\n\t\t\t\tupdateToken();\n\t\t\t\tupdateToken();\n\t\t\t\t\n\t\t\t\tif(isArithOp())\n\t\t\t\t{\n\t\t\t\t\tisValid = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tisValid = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn isValid;\n\t}",
"public boolean isKnownPrimitive() {\r\n return id > 0 && type != null;\r\n }",
"boolean getDoConstantFolding();",
"public boolean isInstr(){\n\t\t\tif (type == MemoryType.INSTR) {return true;\n\t\t\t} return false;\n\t\t}",
"public interface CalcPrimitive<T extends Number> {\n\t/**\n\t * Basic arithmetic operation which adds two numbers\n\t * \n\t * @param first\n\t * the addition operand\n\t * @param second\n\t * the addition operand\n\t * @return first + second\n\t */\n\tpublic T sum(T first, T second);\n\n\t/**\n\t * Basic arithmetic operation which subtracts two numbers\n\t * \n\t * @param first\n\t * the subtraction operand\n\t * @param second\n\t * the subtraction operand\n\t * @return first - second\n\t */\n\tpublic T sub(T first, T second);\n\n\t/**\n\t * Basic arithmetic operation which multiplies two numbers\n\t * \n\t * @param first\n\t * the multiplication operand\n\t * @param second\n\t * the multiplication operand\n\t * @return first * second\n\t */\n\tpublic T mul(T first, T second);\n\n\t/**\n\t * Basic arithmetic operation which divides two numbers\n\t * \n\t * @param first\n\t * the division operand\n\t * @param second\n\t * the division operand\n\t * @return first / second\n\t */\n\tpublic T div(T first, T second);\n\n\t/**\n\t * Basic operation which calculates the cosine of the value\n\t * \n\t * @param value\n\t * the operand of the cosine function in radians\n\t * @return the cosine of the value\n\t */\n\tpublic T cos(T value);\n\n\t/**\n\t * Basic operation which calculates the (value)^e\n\t * \n\t * @param value\n\t * the operand of the calculation\n\t * @return (value)^e\n\t */\n\tpublic T exp(T value);\n\n\t/**\n\t * Basic operation which calculates the square root of a value.\n\t * \n\t * @param value\n\t * the operand of the square root function\n\t * @return the square root of value\n\t */\n\tpublic T sqrt(T value);\n\n\t/**\n\t * Convert a String to a T value\n\t * \n\t * @param str\n\t * a String for converting\n\t * @return the value of the specified String as a T\n\t * @throws NumberFormatException\n\t * when str is incorrect\n\t */\n\tpublic T getFromString(String str) throws NumberFormatException;\n\n\t/**\n\t * Check a String on a possibility of converting\n\t * \n\t * @param str\n\t * a String for check\n\t * @return true for correct str and false for incorrect\n\t */\n\tpublic boolean isCorrect(String str);\n\n\t/**\n\t * Convert a T value to a String\n\t * \n\t * @param value\n\t * a T object to converting\n\t * @return the value of the specified number as a String\n\t */\n\tpublic String getString(T value);\n}",
"private static void testTypeKindOf(Operation op) throws ValueDoesNotMatchTypeException {\n TestEvaluationContext context = new TestEvaluationContext();\n DecisionVariableDeclaration decl = new DecisionVariableDeclaration(\"x\", IntegerType.TYPE, null);\n ConstantValue c0 = new ConstantValue(ValueFactory.createValue(IntegerType.TYPE, 0));\n ConstraintSyntaxTree cst = new OCLFeatureCall(\n new Variable(decl), IntegerType.LESS_EQUALS_INTEGER_INTEGER.getName(), c0);\n EvaluationAccessor cValue = Utils.createValue(ConstraintType.TYPE, context, cst);\n Utils.testIsTypeKindOf(context, op, cValue, false, IntegerType.TYPE, RealType.TYPE, StringType.TYPE);\n cValue.release();\n }",
"public boolean isInstruction() {\r\n return true;\r\n }",
"private boolean dividingByZero(String operator){\n if (numStack.peek() == 0 && operator.equals(\"/\")){\n return true;\n }\n return false;\n }",
"boolean hasOperator();",
"public boolean isMaybePrimitive() {\n checkNotPolymorphicOrUnknown();\n return (flags & PRIMITIVE) != 0 || num != null || str != null;\n }",
"@Test\n\tpublic void typeCheckTest(){\n\t\tSystem.out.println(\"kenta\");\n\t\tSemanticActions actions = new SemanticActions();\n\t\tVariableEntry idInt = new VariableEntry(\"v1\", TokenType.INTEGER);\n\t\tVariableEntry idReal = new VariableEntry(\"v2\", TokenType.REAL);\n\t\tVariableEntry idInt2 = new VariableEntry(\"v3\", TokenType.INTEGER);\n\t\tVariableEntry idReal2 = new VariableEntry(\"v4\", TokenType.REAL);\n\t\tVariableEntry error = new VariableEntry(\"v5\", TokenType.ADDOP);\n\t\tassertTrue(actions.typeCheck(idInt, idInt2) == 0);\n\t\tassertTrue(actions.typeCheck(idReal, idReal2) == 1);\n\t\tassertTrue(actions.typeCheck(idReal, idInt2) == 2);\n\t\tassertTrue(actions.typeCheck(idInt, idReal) == 3);\n\t\tassertTrue(actions.typeCheck(idReal, error) == 4);\n\t\tassertTrue(actions.typeCheck(error, idInt) == 4);\n\t}",
"boolean isNoOp();",
"public PrimitiveType getPrimitiveType();",
"@Override\n public boolean isInstruction() {\n return true;\n }",
"public final JavaliParser.primitiveType_return primitiveType() throws RecognitionException {\n\t\tJavaliParser.primitiveType_return retval = new JavaliParser.primitiveType_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tToken tok=null;\n\n\t\tObject tok_tree=null;\n\t\tRewriteRuleTokenStream stream_92=new RewriteRuleTokenStream(adaptor,\"token 92\");\n\t\tRewriteRuleTokenStream stream_90=new RewriteRuleTokenStream(adaptor,\"token 90\");\n\t\tRewriteRuleTokenStream stream_86=new RewriteRuleTokenStream(adaptor,\"token 86\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:561:2: (tok= 'int' -> Identifier[$tok, $tok.text] |tok= 'float' -> Identifier[$tok, $tok.text] |tok= 'boolean' -> Identifier[$tok, $tok.text] )\n\t\t\tint alt40=3;\n\t\t\tswitch ( input.LA(1) ) {\n\t\t\tcase 92:\n\t\t\t\t{\n\t\t\t\talt40=1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 90:\n\t\t\t\t{\n\t\t\t\talt40=2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 86:\n\t\t\t\t{\n\t\t\t\talt40=3;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 40, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\t\t\tswitch (alt40) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:561:4: tok= 'int'\n\t\t\t\t\t{\n\t\t\t\t\ttok=(Token)match(input,92,FOLLOW_92_in_primitiveType2636); \n\t\t\t\t\tstream_92.add(tok);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: \n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 562:3: -> Identifier[$tok, $tok.text]\n\t\t\t\t\t{\n\t\t\t\t\t\tadaptor.addChild(root_0, (Object)adaptor.create(Identifier, tok, (tok!=null?tok.getText():null)));\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:563:5: tok= 'float'\n\t\t\t\t\t{\n\t\t\t\t\ttok=(Token)match(input,90,FOLLOW_90_in_primitiveType2651); \n\t\t\t\t\tstream_90.add(tok);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: \n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 564:7: -> Identifier[$tok, $tok.text]\n\t\t\t\t\t{\n\t\t\t\t\t\tadaptor.addChild(root_0, (Object)adaptor.create(Identifier, tok, (tok!=null?tok.getText():null)));\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:565:4: tok= 'boolean'\n\t\t\t\t\t{\n\t\t\t\t\ttok=(Token)match(input,86,FOLLOW_86_in_primitiveType2669); \n\t\t\t\t\tstream_86.add(tok);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: \n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 566:3: -> Identifier[$tok, $tok.text]\n\t\t\t\t\t{\n\t\t\t\t\t\tadaptor.addChild(root_0, (Object)adaptor.create(Identifier, tok, (tok!=null?tok.getText():null)));\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tretval.stop = input.LT(-1);\n\n\t\t\tretval.tree = (Object)adaptor.rulePostProcessing(root_0);\n\t\t\tadaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n\t\t}\n\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\tthrow re;\n\t\t}\n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}",
"@Override\n public boolean visit(JsBinaryOperation x, JsContext<JsExpression> ctx) {\n return !x.getOperator().isAssignment()\n || !(x.getArg1() instanceof JsStringLiteral);\n }",
"@Test\r\n public void basicArithmeticTest() {\n SSAgen out = new SSAgen();\r\n out.add_block(0); // Only one basic block - linear flow of execution\r\n // var x = 3, var y = 5;\r\n out.addConstant(new Result(Result.kind.Constant, 3));\r\n out.addConstant(new Result(Result.kind.Constant, 5));\r\n // assign variables x and y to prior constant - job of parser, but emulated here\r\n Result x = new Result(Result.kind.Variable, 0);\r\n Result y = new Result(Result.kind.Variable, 1);\r\n // addition, sub, mul, div\r\n out.add_instruction(0, x, y);\r\n out.add_instruction(1, x, y);\r\n out.add_instruction(2, x, y);\r\n out.add_instruction(3, x, y);\r\n\r\n Instruction curInst;\r\n String [] correct = {\"const #3\\n\", \"const #5\\n\", \"add (0) (1)\\n\", \"sub (0) (1)\\n\", \"mul (0) (1)\\n\", \"div (0) (1)\\n\"};\r\n for (int i = 0; i < 6; ++i) {\r\n curInst = out.current_block.getInstruction(i);\r\n assertEquals(curInst.getInstrString(), correct[i]);\r\n }\r\n }",
"Object findOperatorNeedCheck();",
"@Test\r\n public void testPrimitive()\r\n {\r\n test(int.class);\r\n }",
"private static boolean isPrimitive(String value) {\n boolean status = true;\n value = value.trim();\n if (value.length() < 1) {\n return false;\n }\n for (int i = 0; i < value.length(); i++) {\n char c = value.charAt(i);\n if (!Character.isDigit(c)) {\n status = false;\n break;\n }\n }\n\n return status;\n }",
"public static boolean isArithmeticOperand(char c)\n {\n return (c == '+') || (c == '-') || \n (c == '*') || (c == '/');\n }",
"public PrimObject primitive110(PrimContext context) {\n if (this.equals(context.argumentAt(0)))\n return classLoader().trueInstance();\n else\n return classLoader().falseInstance();\n }",
"public boolean isLiteral()\n {\n return this.literal;\n }",
"private boolean isOperator(String op){\n return (op.equals(\"+\") || op.equals(\"-\") || op.equals(\"*\") || op.equals(\"/\"));\n }",
"@Test\n public void testGetOpcodeOnLowerBoundary() {\n ProgramArea pa = new ProgramArea();\n\n pa.setOpCode(0, 0, 'a');\n\n Assert.assertEquals('a', pa.getOpCode(0, 0));\n\n Assert.assertEquals((char) 0, pa.getOpCode(-1, -1));\n }",
"@Override\r\n\tpublic void PrimitiveOperation1() {\n\t\tSystem.out.println(\"Concrete class B operation 1 implemation\");\r\n\t}",
"public boolean isSuccessAsPrimitive(final SessionContext ctx)\n\t{\n\t\tBoolean value = isSuccess( ctx );\n\t\treturn value != null ? value.booleanValue() : false;\n\t}",
"public int executeOperation(){\n\t\tswitch (operation){\n\t\tcase 1: \n\t\t\treturn var1 + var2;\n\t\tcase 2: \n\t\t\treturn var1 - var2;\n\t\tcase 3: \n\t\t\treturn var1 * var2;\n\t\tcase 4: \n\t\t\treturn var1 / var2;\n\t\t default:\n\t\t\treturn 0;\n\t\t\n\t\t}\n\t}",
"public static void main(String[] args)\n {\n int i = 1 + 1;\n \n //Concat String\n String s = \"My\" + \" \" + \"String\";\n \n int r = 4;\n int ff = 4;\n System.out.println(\"String\" + r + ff);\n System.out.println(\"String\" + ( r + ff ));\n //If the left or the rigth operator is a String, + will be a String concatenation\n //If both operands are numeric, + will be an addition operator\n \n /*************************************/\n /** Operator = */\n /*************************************/\n //Assign a primitive value to a variable\n int ii = 4;\n \n //Assign a value to an object reference variable\n Object o = new Object();\n \n /*************************************/\n /** Compound assignment operators */\n /*************************************/\n //+=,-=,*=,/=\n// int x *= 2+5;//forbidden, compound assignment operators\n int x = 1;\n \n x *= 2+5;\n //equals to\n x = x * (2+5);\n\n /*************************************/\n /** Relational operators */\n /*************************************/\n //>,>=,<,<=,==,!=\n boolean b = false;\n if(b = false){System.out.println(\"false\");}\n //The result of any assignment is the value of the variable after assignment !\n \n /** == with enum values **/\n //It's the same than equals()\n \n /*************************************/\n /** Arithmetic operators */\n /*************************************/ \n //+,-,/,*,%\n \n /*************************************/\n /** Inc and Decrement operators */\n /*************************************/\n int azerty = 4;\n //pre incr and decrementation\n System.out.println(++azerty);//incr first, print after\n System.out.println(--azerty);//desc first, print after\n \n //post incr and decrementation\n azerty = 4;\n System.out.println(azerty++);//print first, inc after\n System.out.println(azerty--);//print first, desc after\n \n /*************************************/\n /** Logical operator */\n /*************************************/\n //|| OR\n if(theTruth() || theTruth()){\n //Do something\n }\n //if the first operator is true, the second will not be evaluated\n \n //| OR\n if(theTruth() | theTruth()){\n //Do something\n }\n //The two operators are evalued\n \n //XOR ^\n System.out.println(true ^ true);//false\n System.out.println(true ^ false);//true\n System.out.println(false ^ true);//true\n System.out.println(false ^ false);//false\n //The two operators are evalued\n \n //logical operator !\n if(false && false || true){\n System.out.println(\"?\");\n }\n if( (false && false) || true){\n System.out.println(\"??\");\n }\n if(false && false | true){\n System.out.println(\"???\");\n }\n if( (false && false) | true){\n System.out.println(\"????\");\n }\n //| operator is evaluated first!!!\n }",
"public boolean hasOpCode() {\n return result.hasOpCode();\n }",
"private int operation(int b, char op, int a) {\n switch (op) {\n case '+': return a + b;\n case '-': return a - b;\n case '*': return a * b;\n case '/': return a / b; //assume b is not 0\n }\n return 0;\n }",
"public final void mMATH_OP() throws RecognitionException {\r\n try {\r\n int _type = MATH_OP;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:276:9: ( '++' | '--' | '+=' | '-=' | '*=' | '/=' | '%=' )\r\n int alt4=7;\r\n switch ( input.LA(1) ) {\r\n case '+':\r\n {\r\n int LA4_1 = input.LA(2);\r\n\r\n if ( (LA4_1=='+') ) {\r\n alt4=1;\r\n }\r\n else if ( (LA4_1=='=') ) {\r\n alt4=3;\r\n }\r\n else {\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 4, 1, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n }\r\n break;\r\n case '-':\r\n {\r\n int LA4_2 = input.LA(2);\r\n\r\n if ( (LA4_2=='-') ) {\r\n alt4=2;\r\n }\r\n else if ( (LA4_2=='=') ) {\r\n alt4=4;\r\n }\r\n else {\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 4, 2, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n }\r\n break;\r\n case '*':\r\n {\r\n alt4=5;\r\n }\r\n break;\r\n case '/':\r\n {\r\n alt4=6;\r\n }\r\n break;\r\n case '%':\r\n {\r\n alt4=7;\r\n }\r\n break;\r\n default:\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 4, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n\r\n switch (alt4) {\r\n case 1 :\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:276:11: '++'\r\n {\r\n match(\"++\"); \r\n\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:276:16: '--'\r\n {\r\n match(\"--\"); \r\n\r\n\r\n\r\n }\r\n break;\r\n case 3 :\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:276:21: '+='\r\n {\r\n match(\"+=\"); \r\n\r\n\r\n\r\n }\r\n break;\r\n case 4 :\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:276:26: '-='\r\n {\r\n match(\"-=\"); \r\n\r\n\r\n\r\n }\r\n break;\r\n case 5 :\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:276:31: '*='\r\n {\r\n match(\"*=\"); \r\n\r\n\r\n\r\n }\r\n break;\r\n case 6 :\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:276:36: '/='\r\n {\r\n match(\"/=\"); \r\n\r\n\r\n\r\n }\r\n break;\r\n case 7 :\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:276:41: '%='\r\n {\r\n match(\"%=\"); \r\n\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }",
"static public ASTOp isOp(String id) {\n ASTOp op4 = UDF_OPS.get(id);\n if( op4 != null ) return op4;\n return isBuiltinOp(id);\n }",
"public boolean checkOperation(char operation) {\n boolean result = false;\n if (operation == '+' | operation == '-' | operation == '/' | operation == '*') {\n result = true;\n }\n return result;\n }",
"public PrimitiveType getPrimitiveType() {\n return primitiveType;\n }",
"@Test\r\n\tpublic void testArithmeticOperators() throws Exception {\r\n\t\tfinal String module = \"-------------- MODULE Testing ----------------\\n\"\r\n\t\t\t\t+ \"EXTENDS Naturals \\n\"\r\n\t\t\t\t+ \"ASSUME 1 + 2 = 4-1 /\\\\ 1 * 2 = 4 \\\\div 2 /\\\\ 1 ^ 1 = 1 \\n\"\r\n\t\t\t\t+ \"=================================\";\r\n\t\tStringBuilder sb = TestUtil.translateString(module);\r\n\t\tfinal String expected = \"MACHINE Testing\\n\"\r\n\t\t\t\t+ \"PROPERTIES 1 + 2 = 4 - 1 & 1 * 2 = 4 / 2 & 1 ** 1 = 1 \\n\"\r\n\t\t\t\t+ \"END\";\r\n\t\tassertEquals(TestUtil.getTreeAsString(expected), TestUtil.getTreeAsString(sb.toString()));\r\n\t}",
"@Test\n public void operator_literal() {\n OutputNode output = new OutputNode(\"testing\", typeOf(Result.class), typeOf(String.class));\n OperatorNode operator = new OperatorNode(\n classOf(SimpleOp.class), typeOf(Result.class), typeOf(String.class),\n output, new ValueElement(valueOf(\"???\")));\n InputNode root = new InputNode(operator);\n MockContext context = new MockContext();\n testing(root, context, op -> {\n op.process(\"Hello, world!\");\n });\n assertThat(context.get(\"testing\"), contains(\"Hello, world!???\"));\n }",
"private boolean postFixEvalution(char operator) throws ArithmeticException{\n //Pre: Validar que el stack no este vacio y que los operandos sean numeros.\n //Post: Realizar la operacion indicada\n try{\n if(!stack.empty()){\n //Se obtienen los dos operandos mas recientes del stack.\n Integer op2 = stack.pop();\n Integer op1 = stack.pop();\n\n //Se determina la operacion por hacer.\n if(op1 != null && op2 != null){\n switch (operator){\n case '+':\n stack.push(op1 + op2);\n break;\n case '-':\n stack.push(op1 - op2);\n break;\n case '*':\n stack.push(op1 * op2);\n break;\n case '/':\n stack.push(op1 / op2);\n break;\n }\n return true;\n }\n else\n return false;\n }\n else{\n return false;\n }\n }\n catch (ArithmeticException e){\n String ex = \"Error: Division por 0\";\n throw new ArithmeticException(ex);\n }\n }",
"private Class isPrimitive(String className) {\n Class result = null;\n switch (className) {\n case (\"Byte\"):\n case (\"byte\"):\n result = Byte.class;\n break;\n\n case (\"Short\"):\n case (\"short\"):\n result = Short.class;\n break;\n\n case (\"Integer\"):\n case (\"int\"):\n result = Integer.class;\n break;\n\n case (\"Long\"):\n case (\"long\"):\n result = Long.class;\n break;\n\n case (\"Float\"):\n case (\"float\"):\n result = Float.class;\n break;\n\n case (\"Double\"):\n case (\"double\"):\n result = Double.class;\n break;\n\n case (\"Boolean\"):\n case (\"boolean\"):\n result = Boolean.class;\n break;\n\n case (\"Character\"):\n case (\"char\"):\n result = Character.class;\n break;\n case(\"String\"):\n result = String.class;\n break;\n\n }\n return result;\n }",
"public boolean isMaybePrimitiveOrSymbol() {\n return isMaybePrimitive() || isMaybeSymbol();\n }",
"public boolean isOperator(){\n return true;\n }",
"public boolean isLiteral() {\n return false;\n }",
"public final Object expression() throws RecognitionException {\n Object result = null;\n\n\n CommonTree INTEGER15=null;\n CommonTree BOOL16=null;\n CommonTree IDENT17=null;\n Object op1 =null;\n\n Object op2 =null;\n\n Object call18 =null;\n\n\n try {\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:322:3: ( ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call ) )\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:323:3: ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call )\n {\n OperationExecuter oe = null;\n\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:324:3: ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call )\n int alt14=19;\n switch ( input.LA(1) ) {\n case 32:\n {\n alt14=1;\n }\n break;\n case 34:\n {\n alt14=2;\n }\n break;\n case 31:\n {\n alt14=3;\n }\n break;\n case 35:\n {\n alt14=4;\n }\n break;\n case 29:\n {\n alt14=5;\n }\n break;\n case ARITH_NEGATION:\n {\n alt14=6;\n }\n break;\n case 50:\n {\n alt14=7;\n }\n break;\n case 30:\n {\n alt14=8;\n }\n break;\n case 39:\n {\n alt14=9;\n }\n break;\n case 28:\n {\n alt14=10;\n }\n break;\n case 41:\n {\n alt14=11;\n }\n break;\n case 37:\n {\n alt14=12;\n }\n break;\n case 40:\n {\n alt14=13;\n }\n break;\n case 36:\n {\n alt14=14;\n }\n break;\n case BOOL_NEGATION:\n {\n alt14=15;\n }\n break;\n case INTEGER:\n {\n alt14=16;\n }\n break;\n case BOOL:\n {\n alt14=17;\n }\n break;\n case IDENT:\n {\n alt14=18;\n }\n break;\n case CALL:\n {\n alt14=19;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 14, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt14) {\n case 1 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:325:4: ^( '+' op1= expression op2= expression )\n {\n match(input,32,FOLLOW_32_in_expression564); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression570);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression576);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"+\"); \n\n }\n break;\n case 2 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:326:6: ^( '-' op1= expression op2= expression )\n {\n match(input,34,FOLLOW_34_in_expression590); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression596);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression602);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"-\"); \n\n }\n break;\n case 3 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:327:6: ^( '*' op1= expression op2= expression )\n {\n match(input,31,FOLLOW_31_in_expression614); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression620);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression626);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"*\"); \n\n }\n break;\n case 4 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:328:6: ^( '/' op1= expression op2= expression )\n {\n match(input,35,FOLLOW_35_in_expression638); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression644);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression650);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"/\"); \n\n }\n break;\n case 5 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:329:6: ^( '%' op1= expression op2= expression )\n {\n match(input,29,FOLLOW_29_in_expression662); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression668);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression674);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"%\"); \n\n }\n break;\n case 6 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:330:6: ^( ARITH_NEGATION op1= expression )\n {\n match(input,ARITH_NEGATION,FOLLOW_ARITH_NEGATION_in_expression686); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression692);\n op1=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,null,\"ARITH_NEGATION\"); \n\n }\n break;\n case 7 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:331:6: ^( '||' op1= expression op2= expression )\n {\n match(input,50,FOLLOW_50_in_expression710); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression716);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression722);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"||\"); \n\n }\n break;\n case 8 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:332:6: ^( '&&' op1= expression op2= expression )\n {\n match(input,30,FOLLOW_30_in_expression733); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression739);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression745);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"&&\"); \n\n }\n break;\n case 9 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:333:6: ^( '==' op1= expression op2= expression )\n {\n match(input,39,FOLLOW_39_in_expression756); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression762);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression768);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"==\"); \n\n }\n break;\n case 10 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:334:6: ^( '!=' op1= expression op2= expression )\n {\n match(input,28,FOLLOW_28_in_expression779); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression785);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression791);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"!=\"); \n\n }\n break;\n case 11 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:335:6: ^( '>=' op1= expression op2= expression )\n {\n match(input,41,FOLLOW_41_in_expression802); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression808);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression814);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\">=\"); \n\n }\n break;\n case 12 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:336:6: ^( '<=' op1= expression op2= expression )\n {\n match(input,37,FOLLOW_37_in_expression825); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression831);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression837);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"<=\"); \n\n }\n break;\n case 13 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:337:6: ^( '>' op1= expression op2= expression )\n {\n match(input,40,FOLLOW_40_in_expression848); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression854);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression860);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\">\"); \n\n }\n break;\n case 14 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:338:6: ^( '<' op1= expression op2= expression )\n {\n match(input,36,FOLLOW_36_in_expression872); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression878);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression884);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"<\"); \n\n }\n break;\n case 15 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:339:6: ^( BOOL_NEGATION op1= expression )\n {\n match(input,BOOL_NEGATION,FOLLOW_BOOL_NEGATION_in_expression896); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression902);\n op1=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,null,\"BOOL_NEGATION\"); \n\n }\n break;\n case 16 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:340:6: INTEGER\n {\n INTEGER15=(CommonTree)match(input,INTEGER,FOLLOW_INTEGER_in_expression920); \n\n oe = new OperationExecuter(localScope, (INTEGER15!=null?INTEGER15.getText():null),\"INTEGER\"); \n\n }\n break;\n case 17 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:341:6: BOOL\n {\n BOOL16=(CommonTree)match(input,BOOL,FOLLOW_BOOL_in_expression964); \n\n oe = new OperationExecuter(localScope, (BOOL16!=null?BOOL16.getText():null),\"BOOL\"); \n\n }\n break;\n case 18 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:342:6: IDENT\n {\n IDENT17=(CommonTree)match(input,IDENT,FOLLOW_IDENT_in_expression1010); \n\n oe = new OperationExecuter(localScope, (IDENT17!=null?IDENT17.getText():null),\"IDENT\"); \n\n }\n break;\n case 19 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:343:6: call\n {\n pushFollow(FOLLOW_call_in_expression1055);\n call18=call();\n\n state._fsp--;\n\n\n result = call18;\n\n }\n break;\n\n }\n\n\n if (oe != null) result = oe.doOperation();\n if (result == null)\n BFlatGUI.debugPrint(0, \"result of expression is null!\");\n \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return result;\n }",
"public String operator( String op);",
"boolean method_109();",
"protected boolean isPrimitiveObject(Object object) {\r\n return PropertyType.PRIMITIVE.equals(determinePropertyType(object));\r\n }",
"@Test\r\n\tpublic void testCompileOperator() {\r\n\r\n\t\t// Enter the code\r\n\r\n\t\tdriver.findElement(By.name(\"code[code]\")).sendKeys(\"a = 5\\nb = a - 1\\nc = a + (b / 2 * 4)\");\r\n\r\n\t\t// Look for the \"Compile\" button and click\r\n\r\n\t\tdriver.findElements(By.name(\"commit\")).get(2).click();\r\n\r\n\t\t// Check that there contains the word \"opt_plus\", \"opt_minus\",\r\n\t\t// \"opt_mult\" and \"opt_div\"\r\n\r\n\t\ttry {\r\n\t\t\tWebElement code = driver.findElement(By.tagName(\"code\"));\r\n\t\t\tassertTrue(code.getText().contains(\"opt_plus\"));\r\n\t\t\tassertTrue(code.getText().contains(\"opt_minus\"));\r\n\t\t\tassertTrue(code.getText().contains(\"opt_mult\"));\r\n\t\t\tassertTrue(code.getText().contains(\"opt_div\"));\r\n\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"public boolean validOperator(char op){\n switch(op){\n case '+':\n case '-':\n case '*':\n case '/':\n case '^':\n case ')':\n case '(':\n return true;\n }\n\n return false;\n }",
"@Override\n\tpublic boolean isPrimitiveTypeExpected() {\n\t\treturn false;\n\t}",
"public int operation(int number1,int number2,String operator)",
"@Test\n\tpublic void testStringCalculatorMethodIntPresence() {\n\t\tcalc.Add(\"1\");\n\t\tAssert.assertTrue(true);\n\t}",
"public void test(int i) {\n\t\tSystem.out.println(\"int primitive\");\n\t}",
"private boolean factor() {\r\n return MARK(ATOM) && atom() && postops();\r\n }",
"public abstract Number getPrimitiveType();",
"@Override\n\t\t\tpublic Ast binaryOp(BinaryOp ast, Void arg) {\n\t\t\t\tsuper.binaryOp(ast, arg);\n\n\t\t\t\ttry {\n\t\t\t\t\tExpr left = ast.left();\n\t\t\t\t\tExpr right = ast.right();\n\t\t\t\t\tInteger intValue = null;\n\t\t\t\t\tBoolean boolValue = null;\n\n\t\t\t\t\tswitch (ast.operator) {\n\t\t\t\t\tcase B_TIMES:\n\t\t\t\t\t\tintValue = asInt(left) * asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_DIV:\n\t\t\t\t\t\tintValue = asInt(left) / asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_MOD:\n\t\t\t\t\t\tintValue = asInt(left) % asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_PLUS:\n\t\t\t\t\t\tintValue = asInt(left) + asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_MINUS:\n\t\t\t\t\t\tintValue = asInt(left) - asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_AND:\n\t\t\t\t\t\tboolValue = asBool(left) && asBool(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_OR:\n\t\t\t\t\t\tboolValue = asBool(left) || asBool(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_LESS_THAN:\n\t\t\t\t\t\tboolValue = asInt(left) < asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_LESS_OR_EQUAL:\n\t\t\t\t\t\tboolValue = asInt(left) <= asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_GREATER_THAN:\n\t\t\t\t\t\tboolValue = asInt(left) > asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_GREATER_OR_EQUAL:\n\t\t\t\t\t\tboolValue = asInt(left) >= asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_EQUAL:\n\t\t\t\t\t\tboolValue = areEqual(left, right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_NOT_EQUAL:\n\t\t\t\t\t\tboolValue = areEqual(left, right);\n\t\t\t\t\t\tif (boolValue != null)\n\t\t\t\t\t\t\tboolValue = !boolValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn replace(ast, intValue, boolValue);\n\t\t\t\t} catch (NotConstantException exc) {\n\t\t\t\t\t// non-constant operands: make no change.\n\t\t\t\t\treturn ast;\n\t\t\t\t} catch (ArithmeticException exc) {\n\t\t\t\t\t// division by zero etc: make no change.\n\t\t\t\t\treturn ast;\n\t\t\t\t}\n\t\t\t}",
"private static boolean check_if_operator(char c)\n {\n return c == '+' || c == '-' || c == '*' || c == '/' || c == '^'|| c == 'r'\n || c == '(' || c == ')'|| c == 's' || c == 'c' || c == 't' || c == 'l';\n }",
"@Test\n\tpublic void testPhase1() throws SemanticError{\n\t\tSemanticActions actions = new SemanticActions();\n\t\tactions.Execute(SemanticAction.action1, new Token(TokenType.ADDOP));\n\t\tassertTrue(actions.isInsert());\n\t\tactions.Execute(SemanticAction.action2, t);\n\t\tassertFalse(actions.isInsert());\n\t\tactions.Execute(SemanticAction.action6, t);\n\t\tassertTrue(actions.isArray());\n\t\tactions.Execute(SemanticAction.action4, new Token(TokenType.INTCONSTANT));\n\t\tassertTrue(actions.getStack().contains(TokenType.INTCONSTANT));\n\t\tConstant constant1 = new Constant(TokenType.INTCONSTANT, \"100\");\n\t\tactions.Execute(SemanticAction.action7, constant1);\n\t\tassertTrue(actions.getStack().contains(constant1));\n\t\tIdentifier id = new Identifier(\"hello\");\n\t\tactions.Execute(SemanticAction.action13, id);\n\t\tassertTrue(actions.getStack().contains(id));\n\t\tactions.semanticStackDump();\n\t}",
"@Test\n public void testGetOpcodeInBounds() {\n ProgramArea pa = new ProgramArea();\n\n pa.setOpCode(10, 10, 'a');\n\n Assert.assertEquals('a', pa.getOpCode(10, 10));\n }",
"public static synchronized boolean isPrimitive(Class<?> key){\n\t\treturn ClassRegistry.primitives.containsKey(key);\n\t}",
"@Test\r\n\t\tpublic void testCompileAllOperators() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(\"a = 6\\nb = 6\\nc = a + (b * 4)\\nd = c / 3\");;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.xpath(\"(//input[@name='commit'])[3]\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertTrue(elementText.contains(\"opt_plus\") && elementText.contains(\"opt_div\") && elementText.contains(\"opt_mult\") &! elementText.contains(\"opt_minus\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}",
"public boolean runCode ( String theCode , String routine , String dataSegment ) throws EVASyntaxException , EVASemanticException\r\n\t{\r\n\t\taddToDataSegment ( dataSegment );\r\n\t\treturn runCode ( theCode , routine );\t\r\n\t}",
"boolean operator(Character input){\r\n //detects operands\r\n if(input == '^'||input == '-'||input == '+'||input == '/'||input == '*'|| input =='('|| input ==')'){\r\n return true;\r\n }\r\n else\r\n return false;\r\n }",
"public void testNormalQueriesPrimitive()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkQueryPrimitive(pmf,\r\n HashMap3.class,\r\n rdbmsVendorID);\r\n }\r\n finally\r\n {\r\n clean(HashMap3.class);\r\n }\r\n }",
"public Node typeCheck(ContextVisitor tc) throws SemanticException {\n Type l = left.type();\n\tType r = right.type();\n\n\tTypeSystem ts = tc.typeSystem();\n\tContext context = tc.context();\n\n\tif (op == GT || op == LT || op == GE || op == LE) {\n\t if (! l.isNumeric()) {\n\t\tthrow new SemanticException(\"The \" + op +\n\t\t \" operator must have numeric operands, not type \" +\n l + \".\", left.position());\n\t }\n\n if (! r.isNumeric()) {\n\t\tthrow new SemanticException(\"The \" + op +\n\t\t \" operator must have numeric operands, not type \" +\n r + \".\", right.position());\n\t }\n\n\t return type(ts.Boolean());\n\t}\n\n\tif (op == EQ || op == NE) {\n if (! ts.isCastValid(l, r, context) && ! ts.isCastValid(r, l, context)) {\n\t\tthrow new SemanticException(\"The \" + op +\n\t\t \" operator must have operands of similar type.\",\n\t\t position());\n\t }\n\n\t return type(ts.Boolean());\n\t}\n\n\tif (op == COND_OR || op == COND_AND) {\n\t if (! l.isBoolean()) {\n\t\tthrow new SemanticException(\"The \" + op +\n\t\t \" operator must have boolean operands, not type \" +\n l + \".\", left.position());\n\t }\n\n\t if (! r.isBoolean()) {\n\t\tthrow new SemanticException(\"The \" + op +\n\t\t \" operator must have boolean operands, not type \" +\n r + \".\", right.position());\n\t }\n\n\t return type(ts.Boolean());\n\t}\n\n\tif (op == ADD) {\n\t if (ts.isSubtype(l, ts.String(), context) || ts.isSubtype(r, ts.String(), context)) {\n if (!ts.canCoerceToString(r, tc.context())) {\n throw new SemanticException(\"Cannot coerce an expression \" + \n \"of type \" + r + \" to a String.\", \n right.position());\n }\n if (!ts.canCoerceToString(l, tc.context())) {\n throw new SemanticException(\"Cannot coerce an expression \" + \n \"of type \" + l + \" to a String.\", \n left.position());\n }\n\n return precedence(Precedence.STRING_ADD).type(ts.String());\n }\n\t}\n\n\tif (op == BIT_AND || op == BIT_OR || op == BIT_XOR) {\n\t if (l.isBoolean() && r.isBoolean()) {\n\t\treturn type(ts.Boolean());\n\t }\n\t}\n\n if (op == ADD) {\n if (! l.isNumeric()) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric or String operands, not type \" +\n l + \".\", left.position());\n }\n\n if (! r.isNumeric()) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric or String operands, not type \" +\n r + \".\", right.position());\n }\n }\n\n if (op == BIT_AND || op == BIT_OR || op == BIT_XOR) {\n if (! ts.isImplicitCastValid(l, ts.Long(), context)) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric or boolean operands, not type \" +\n l + \".\", left.position());\n }\n\n if (! ts.isImplicitCastValid(r, ts.Long(), context)) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric or boolean operands, not type \" +\n r + \".\", right.position());\n }\n }\n\n if (op == SUB || op == MUL || op == DIV || op == MOD) {\n if (! l.isNumeric()) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric operands, not type \" +\n l + \".\", left.position());\n }\n\n if (! r.isNumeric()) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric operands, not type \" +\n r + \".\", right.position());\n }\n }\n\n if (op == SHL || op == SHR || op == USHR) {\n if (! ts.isImplicitCastValid(l, ts.Long(), context)) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric operands, not type \" +\n l + \".\", left.position());\n }\n\n if (! ts.isImplicitCastValid(r, ts.Long(), context)) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric operands, not type \" +\n r + \".\", right.position());\n }\n }\n\n\tif (op == SHL || op == SHR || op == USHR) {\n\t // For shift, only promote the left operand.\n\t return type(ts.promote(l));\n\t}\n\n\treturn type(ts.promote(l, r));\n }",
"boolean method_108();",
"public boolean runCode ( String theCode , String routine ) throws EVASyntaxException , EVASemanticException\r\n\t{\r\n\t\t//Debug.println(\"Going to run code.\");\r\n\t\t//Debug.println(\"Routine = \" + routine );\r\n\t\t\r\n\t\t//ejecutar el segmento init (estados iniciales)\r\n\t\tint curlimit = cont[INIT]; //longitud de init\r\n\t\tfor ( int i = 0 ; i < curlimit ; i++ )\r\n\t\t{\r\n\t\t\tStringTokenizer initTokenizer = new StringTokenizer( segmento[INIT][i] , \":\" );\r\n\t\t\tif ( initTokenizer.countTokens() < 2 )\r\n\t\t\t{\r\n\t\t\t\tthrow( new EVASyntaxException(\r\n\t\t\t\t\"Too few tokens with : at INIT segment, line \" + i + \" (\" + segmento[INIT][i] + \")\" ) );\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tString reg = initTokenizer.nextToken().trim();\r\n\t\t\t\tString val = initTokenizer.nextToken().trim();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Debug.println(\"Initialization done.\");\r\n\t\t\r\n\t\tprogram_counter = getLine ( routine , CODE );\r\n\t\t\r\n\t\t//Debug.println(\"PC = \" + program_counter );\r\n\t\t\r\n\t\tif ( program_counter == -1 )\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t\t//no ejecutado\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\twhile ( runNextInstruction() ) ;\r\n\t\t\tif ( !continue_flag )\r\n\t\t\t\treturn true; //codigo ejecutado\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tcontinue_flag = false;\r\n\t\t\t\treturn false; //esto es si encontramos un continue, devolvemos \"false\" como si\r\n\t\t\t\t//no hubieramos ejecutado el código para que el parser siga ejecutando el comando.\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}",
"public boolean isOperator() {\n\t\treturn (letter == '+') || (letter == '*') ||\n\t\t\t (letter == '%') || (letter == '-') ? true : false;\n\t}",
"public static synchronized boolean isPrimitive(String value){\n\t\treturn ClassRegistry.xmlprimitives.containsKey(value);\n\t}",
"protected boolean isAddOp(char c) {\r\n\t\treturn (c == '+' || c == '-');\r\n\t}",
"static boolean isaNonMinusOperator(char s){\n boolean nonMinusOperator = false;\n switch (s){\n case '+':nonMinusOperator = true; break;\n case '*':nonMinusOperator = true; break;\n case '/':nonMinusOperator = true; break;\n case '^':nonMinusOperator = true; break;\n }\n return nonMinusOperator;\n }",
"public boolean isSuccessAsPrimitive()\n\t{\n\t\treturn isSuccessAsPrimitive( getSession().getSessionContext() );\n\t}",
"@Test\r\n public void testIsPrimitiveOrWrapper() {\n assertTrue(\"Boolean.class\", Classes.isPrimitiveOrWrapper(Boolean.class));\r\n assertTrue(\"Byte.class\", Classes.isPrimitiveOrWrapper(Byte.class));\r\n assertTrue(\"Character.class\", Classes.isPrimitiveOrWrapper(Character.class));\r\n assertTrue(\"Short.class\", Classes.isPrimitiveOrWrapper(Short.class));\r\n assertTrue(\"Integer.class\", Classes.isPrimitiveOrWrapper(Integer.class));\r\n assertTrue(\"Long.class\", Classes.isPrimitiveOrWrapper(Long.class));\r\n assertTrue(\"Double.class\", Classes.isPrimitiveOrWrapper(Double.class));\r\n assertTrue(\"Float.class\", Classes.isPrimitiveOrWrapper(Float.class));\r\n \r\n // test primitive classes\r\n assertTrue(\"boolean\", Classes.isPrimitiveOrWrapper(Boolean.TYPE));\r\n assertTrue(\"byte\", Classes.isPrimitiveOrWrapper(Byte.TYPE));\r\n assertTrue(\"char\", Classes.isPrimitiveOrWrapper(Character.TYPE));\r\n assertTrue(\"short\", Classes.isPrimitiveOrWrapper(Short.TYPE));\r\n assertTrue(\"int\", Classes.isPrimitiveOrWrapper(Integer.TYPE));\r\n assertTrue(\"long\", Classes.isPrimitiveOrWrapper(Long.TYPE));\r\n assertTrue(\"double\", Classes.isPrimitiveOrWrapper(Double.TYPE));\r\n assertTrue(\"float\", Classes.isPrimitiveOrWrapper(Float.TYPE));\r\n assertTrue(\"Void.TYPE\", Classes.isPrimitiveOrWrapper(Void.TYPE));\r\n \r\n // others\r\n assertFalse(\"null\", Classes.isPrimitiveOrWrapper(null));\r\n assertFalse(\"Void.class\", Classes.isPrimitiveOrWrapper(Void.class));\r\n assertFalse(\"String.class\", Classes.isPrimitiveOrWrapper(String.class));\r\n assertFalse(\"this.getClass()\", Classes.isPrimitiveOrWrapper(this.getClass()));\r\n }",
"@Test\n\tpublic void divisionTest() {\n\t\tMathOperation division = new Division();\n\n\t\tassertEquals(0, division.operator(ZERO, FIVE).intValue());\n\t\tassertEquals(4, division.operator(TWENTY, FIVE).intValue());\n\t}",
"public static boolean isPrimitive(String signatureType) {\n\t\treturn Signature.SIG_BOOLEAN.equals(signatureType) // boolean\n\t\t || Signature.SIG_CHAR.equals(signatureType) // char\n\t\t || Signature.SIG_DOUBLE.equals(signatureType) // double\n\t\t || Signature.SIG_FLOAT.equals(signatureType) // float\n\t\t || Signature.SIG_INT.equals(signatureType) // int\n\t\t || Signature.SIG_LONG.equals(signatureType) // long\n\t\t || Signature.SIG_SHORT.equals(signatureType) // short\n\t\t || Signature.SIG_VOID.equals(signatureType); // void\n\t}",
"@ReflectiveMethod(name = \"c\", types = {})\n public boolean c(){\n return (boolean) NMSWrapper.getInstance().exec(nmsObject);\n }",
"public boolean formResult()\r\n {\r\n if (operator.equals(\"+\") && validOperands())\r\n {\r\n add();\r\n }\r\n else if (operator.equals(\"-\") && validOperands())\r\n {\r\n subtract();\r\n }\r\n else if (operator.equals(\"\\u00D7\") && validOperands())\r\n {\r\n multiply();\r\n }\r\n else if (operator.equals(\"\\u00F7\") && validOperands())\r\n {\r\n String[] test = rightOperand.split(\"\\\\+|-\");\r\n \r\n if (test[0].equals(\"0\")) {\r\n clear();\r\n return false;\r\n }\r\n divide();\r\n }\r\n return true;\r\n }",
"Operator.Type getOperation();",
"protected boolean visitBinaryOperation(QuasiOptimizedExpression optimizedExpression,\n BinaryOperation binaryOperation) {\n\n RelationalOperator relationalOperator = map(binaryOperation);\n if (relationalOperator == null) {\n return false;\n }\n\n String theExpression = null;\n\n //a.b > 10\n Object theLiteral = extractLiteral(binaryOperation.getRight());\n if (theLiteral == AstNodeType.other) {\n //10 <= a.b\n theLiteral = extractLiteral(binaryOperation.getLeft());\n\n //10 == 10 will never reach here because MVEL optimizes it immediately to a literal.\n if (theLiteral == AstNodeType.other) {\n return false;\n }\n else {\n theExpression = decompile(binaryOperation.getRight());\n\n relationalOperator = relationalOperator.inverse();\n }\n }\n else {\n theExpression = decompile(binaryOperation.getLeft());\n }\n\n OptimizedComponent oc = new OptimizedComponent(theExpression, relationalOperator, theLiteral);\n optimizedExpression.addExpressionComponent(oc);\n\n return true;\n }",
"public T casePrimitiveLiteralExpCS(PrimitiveLiteralExpCS object) {\r\n return null;\r\n }",
"public boolean throwsArithmeticException() {\n\t// conservatively assume that any division or mod may throw\n\t// ArithmeticException this is NOT true-- floats and doubles don't\n\t// throw any exceptions ever...\n\treturn op == DIV || op == MOD;\n }",
"public boolean supportScalarAsExpression(){\n return false;\n }",
"public boolean isOperand(){\n return false;\n }"
] | [
"0.67035323",
"0.6369094",
"0.633968",
"0.63166106",
"0.6241265",
"0.6219322",
"0.603866",
"0.59228295",
"0.5871068",
"0.5851973",
"0.5814182",
"0.5775828",
"0.5727845",
"0.56953996",
"0.5650449",
"0.5648851",
"0.56435966",
"0.56154305",
"0.55074644",
"0.5502217",
"0.54946005",
"0.54461956",
"0.5414172",
"0.5410673",
"0.5406014",
"0.5403852",
"0.5390276",
"0.53822315",
"0.53700304",
"0.53366786",
"0.5334191",
"0.5305721",
"0.5294335",
"0.5289829",
"0.5284881",
"0.52784956",
"0.525224",
"0.5240504",
"0.52385587",
"0.5223764",
"0.5210416",
"0.5201225",
"0.51962763",
"0.51815015",
"0.51658785",
"0.51607215",
"0.515824",
"0.5150943",
"0.51466835",
"0.51446056",
"0.514077",
"0.5140572",
"0.51241505",
"0.5116847",
"0.51140755",
"0.5112321",
"0.5112293",
"0.5098689",
"0.50972605",
"0.5097049",
"0.5096233",
"0.50912946",
"0.50892866",
"0.5085529",
"0.50736684",
"0.5072694",
"0.5065875",
"0.50579697",
"0.5034601",
"0.50325644",
"0.50292057",
"0.50249773",
"0.5009365",
"0.5008935",
"0.5005003",
"0.4999912",
"0.49994522",
"0.4998426",
"0.49954545",
"0.49926358",
"0.49874496",
"0.497119",
"0.4966987",
"0.4964244",
"0.49619275",
"0.49611935",
"0.49569827",
"0.49536744",
"0.49535295",
"0.49510464",
"0.49448654",
"0.4942461",
"0.49404818",
"0.49387857",
"0.49369022",
"0.49313402",
"0.4926674",
"0.4923921",
"0.49224913",
"0.49191156",
"0.49181885"
] | 0.0 | -1 |
/ A function that recursively calculates the primitive count for the total code lines given You can make the assumption that loops are defined to have a runtime of n | public String calculatePrimitiveCount(String[] codeLines, String currentPrimitiveCount, int index)
{
//int nLines = codeLines.length;
int nPOps = 0; //n Primitive Operations
String containsLoop = "";
String result = "";
if(index == codeLines.length)
{
return currentPrimitiveCount + containsLoop; //containsLoop is initialized to ""
}
else //if(index < codeLines.length)
{
nPOps = countPrimitive(codeLines[index]);
if(nPOps > 100)
{
containsLoop = "n";
nPOps = nPOps - 100;
}
currentPrimitiveCount = Integer.toString(nPOps);
return (index+1) + ": " + currentPrimitiveCount + containsLoop + "\n" + calculatePrimitiveCount(codeLines, currentPrimitiveCount, index + 1);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int digitCount(String text, int position, int amount) {\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[605]++;\r\n int limit = Math.min(text.length() - position, amount);\r\n amount = 0;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[606]++;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[607]++;\nbyte CodeCoverTryBranchHelper_L18 = 0;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[52]++;\n\n\nint CodeCoverConditionCoverageHelper_C182;\r\n for (;(((((CodeCoverConditionCoverageHelper_C182 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C182 |= (2)) == 0 || true) &&\n ((limit > 0) && \n ((CodeCoverConditionCoverageHelper_C182 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[182].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C182, 1) || true)) || (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[182].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C182, 1) && false); limit--) {\nif (CodeCoverTryBranchHelper_L18 == 0) {\n CodeCoverTryBranchHelper_L18++;\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[52]--;\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[53]++;\n} else if (CodeCoverTryBranchHelper_L18 == 1) {\n CodeCoverTryBranchHelper_L18++;\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[53]--;\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[54]++;\n}\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[608]++;\r\n char c = text.charAt(position + amount);\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[609]++;\nint CodeCoverConditionCoverageHelper_C183;\r\n if ((((((CodeCoverConditionCoverageHelper_C183 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C183 |= (8)) == 0 || true) &&\n ((c < '0') && \n ((CodeCoverConditionCoverageHelper_C183 |= (4)) == 0 || true)))\n || \n(((CodeCoverConditionCoverageHelper_C183 |= (2)) == 0 || true) &&\n ((c > '9') && \n ((CodeCoverConditionCoverageHelper_C183 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[183].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C183, 2) || true)) || (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[183].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C183, 2) && false)) {\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.branches[389]++;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[610]++;\r\n break;\n\r\n } else {\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.branches[390]++;}\r\n amount++;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[611]++;\r\n }\r\n return amount;\r\n }",
"public int countPrimitive(String line)\n\t{\t\t\n\t\tint count = 0;\n\t\tint totalCount = 0;\n\t\tStringTokenizer ST = new StringTokenizer(line,\" \");\n\t\tif(!ST.hasMoreTokens())\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile(ST.hasMoreTokens())\n\t\t\t{\n\t\t\t\tString token = ST.nextToken();\n\t\t\t\t\n\t\t\t\tif(token.contains(\">\") || token.contains(\"<\") || token.contains(\"==\") || token.contains(\">=\") || token.contains(\"<=\"))\t//Evaluating Expression\t\n\t\t\t\t{\n\t\t\t\t\tcount = 1;\n\t\t\t\t\ttotalCount += count;\n\t\t\t\t}\n\t\t\t\telse if(token.contains(\"=\"))\t\t\t//Assigning Value\n\t\t\t\t{\n\t\t\t\t\tcount = 1;\n\t\t\t\t\ttotalCount += count;\n\t\t\t\t}\n\t\t\t\telse if(token.contains(\"[\") && token.contains(\"]\"))\t\t//Indexing Array\n\t\t\t\t{\n\t\t\t\t\tcount = 1;\n\t\t\t\t\ttotalCount += count;\n\t\t\t\t}\n\t\t\t\telse if(token.contains(\".\") && token.contains(\"(\") && token.contains(\")\"))\t\t\t\t// TODO Calling Method\n\t\t\t\t{\n\t\t\t\t\tcount = 1;\n\t\t\t\t\ttotalCount += count;\n\t\t\t\t}\n\t\t\t\telse if(token.contains(\"return\"))\t\t//Returning from Method\n\t\t\t\t{\n\t\t\t\t\tcount = 1;\n\t\t\t\t\ttotalCount += count;\n\t\t\t\t}\n\t\t\t\telse if(token.contains(\"for\") || token.contains(\"while\") || token.contains(\"if\"))\t\t//Returning from Method\n\t\t\t\t{\n\t\t\t\t\tcount = 100;\n\t\t\t\t\tcount+=1;\n\t\t\t\t\ttotalCount += count;\n\t\t\t\t\t/*--count;\t//if count neg- represent as 'n'\n\t\t\t\t\treturn count;*/\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn totalCount;\n\t}",
"int getBlockNumbersCount();",
"int getBlockNumsCount();",
"int getBlockNumsCount();",
"public static void main(String[] args)\n\t{\n\t\tint n = 50;\n\t\tint c = n*n;\n\t\t\n\t\tfor(int x =0; x <=n ;x++)\n\t\t{\n\t\t\tfor(int y = 1; y <=n; y++)\n\t\t\t{\n\t\t\t\tc+=2*count(x,y,n);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(c);\n\t}",
"int computeNumberOfLines(String text);",
"static int count(int n)\r\n\t\t{\r\n\t\t\tint c = 0; //initially count of digits is 0\r\n\t\t\twhile(n != 0)\r\n\t\t\t{\r\n\t\t\t\tc++;\r\n\t\t\t\tn = n/10;\r\n\t\t\t}\r\n\t\t\treturn c;\r\n\t\t}",
"private static int numTrees(int n) {\n int[] counts = new int[n + 2];\n counts[0] = 1;\n counts[1] = 1;\n for (int i = 2; i <= n; i++) {\n for (int j = 0; j < i; j++) {\n counts[i] += counts[j] * counts[i - j - 1];\n }\n }\n return counts[n];\n }",
"public static int count(int n) {\n if(n == 1) {\n return 1;\n }\n \n return 3 * count(n-1) - 1;\n }",
"int getLinesCount();",
"public int count(int n, int k)\n {\n\n long MOD = 1000000007;\n long res;\n\n res = (long)Math.pow(k, n);\n Map<Integer, Integer> divisor = new HashMap<>();\n\n long count = 0;\n for(int i = 2; i <= k; i++) {\n if(!(i % 2 == 0 && divisor.containsKey(i / 2))) {\n int div = divisorCount(i);\n divisor.put(i, div);\n count += div - 1;\n }\n else{\n int log2 = 31 - Integer.numberOfLeadingZeros(i);\n int div;\n if(Math.pow(2, log2) == i){\n div = divisor.get(i / 2) + 1;\n\n }\n else\n div = divisor.get(i / 2) * 2;\n\n divisor.put(i, div);\n count += div - 1;\n\n }\n\n }\n\n res -= (n - 1) * Math.pow(k, n - 2) * count;\n return (int)(res % MOD);\n }",
"private int lineCounter(String s)\n {\n try{\n BufferedReader b = new BufferedReader(new FileReader(s));\n String line = \"\";\n\n // For each line read, increment the counter\n while ((line = b.readLine()) != null) \n {\n linecount++;\n }\n\n b.close();}\n catch(Exception e)\n {System.out.println(\"Error: \"+e.getMessage());}\n return linecount;\n }",
"public long getNumInstructions();",
"private int countFors (CtMethod<?> Forin){\n List<CtFor> forCalls = Forin.getElements(new TypeFilter<CtFor>(CtFor.class));\n List<CtForEach> forEachCalls = Forin.getElements(new TypeFilter<CtForEach>(CtForEach.class));\n return forCalls.size()+forEachCalls.size();\n }",
"private Map<Unit, Integer> calculateInstructionDepth (SootMethod sm) {\n // First we analyze all Units (statements) within loops\n Body body = sm.retrieveActiveBody();\n LoopNestTree loopNestTree = new LoopNestTree(body);\n Map<Unit, Integer> idepth = new HashMap<Unit, Integer>();\n\n if (!loopNestTree.isEmpty()) {\n for (Loop initloop : loopNestTree) {\n int depth = 1;\n Loop loop = loopNestTree.higher(initloop);\n //\n // walk on the tree up to the root, so we can define our\n // nested level\n while (loop != null) {\n depth++;\n loop = loopNestTree.higher(loop);\n }\n List<Stmt> loopBody = initloop.getLoopStatements();\n for (Stmt s : loopBody) {\n Integer currentDepth = idepth.getOrDefault(s, 1);\n if (depth >= currentDepth) {\n idepth.put(s, depth);\n }\n }\n }\n }\n return idepth;\n }",
"public static void main(String[] args) {\n\t\tint d = 6;\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tcount += count(1, i, i, d, i == d || i ==0);\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"private void count( int theR, int theC )\n {\n for( int r = -1; r <= 1; r++ ) \n {\n for( int c = -1; c <= 1; c++ )\n {\n if( isValid( theR + r, theC + c ) )\n theCounts[ theR ][ theC ] += theMines[ theR + r ][ theC + c ];\n }\n } \n }",
"private static int count(int S[], int m, int n) {\n // If n is o then there is 1 solution\n if (n == 0 ) return 1;\n // If n is less than 0 then no solution exists\n if (n < 0 ) return 0;\n // If there are no coins and n >= 0, then no solution exists\n if (m <= 0 && n >= 1) return 0;\n\n // Count is sum of solution that do not contain mth coin && contain at least one coin mth.\n // Including S[m-1] && excluding S[m-1]\n return count(S, m-1, n) + count(S, m, n-S[m-1]);\n }",
"static int countWaysUtil(int n, int m) \n\t { \n\t int res[] = new int[n]; \n\t res[0] = 1; res[1] = 1; \n\t for (int i=2; i<n; i++) \n\t { \n\t res[i] = 0; \n\t for (int j=1; j<=m && j<=i; j++) \n\t res[i] += res[i-j]; \n\t } \n\t return res[n-1]; \n\t }",
"public static void main(String args[]) throws IOException\r\n\t{\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tint n=sc.nextInt();\r\n\t\t\r\n\t\tint[] counter=new int[n];\r\n\t\tint count=0; //Number of changes needed\r\n\t\tint count1=0; //Number of sections, where a section starts with a 0\r\n\t\tint count2=0; //Section length counter\r\n\t\tint count3=0;//Count for over counting in 'length'\r\n\t\tArrayList<Integer> length=new ArrayList<Integer>(); //section lengths\r\n\t\tArrayList<Integer> over=new ArrayList<Integer>();//potential overcounts\r\n\t\tint tem=0;\r\n\t\tboolean x=false;\r\n\t\tfor(int i=0; i<n; i++)\r\n\t\t{\r\n\t\t\tcounter[i]=sc.nextInt();\r\n\t\t\tif(i==0)\r\n\t\t\t{\r\n\t\t\t\tif(counter[i]==1)\r\n\t\t\t\t{\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t\tcounter[0]=0;\r\n\t\t\t\t}\r\n\t\t\t\tcount1++;\r\n\t\t\t}\r\n\t\t\telse if(counter[i]==0)\r\n\t\t\t{\r\n\t\t\t\tcount1++;\r\n\t\t\t\tif(tem+1==i)\r\n\t\t\t\tover.add(i-1);\r\n\t\t\t}\r\n\t\t\telse if(counter[i]<=counter[i-1])\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\ttem=i;\r\n\t\t\t\tcount3++;\r\n\t\t\t}\r\n\t\t\tif(counter[i]==0&&i!=0||i==n-1)\r\n\t\t\t{\r\n\t\t\t\tif(i==n-1)\r\n\t\t\t\t{\r\n\t\t\t\t\tcount2++;\r\n\t\t\t\t}\r\n\t\t\t\tif(x)\r\n\t\t\t\t{\r\n\t\t\t\t\tlength.add(count2-count3);\r\n\t\t\t\t}\r\n\t\t\t\tcount3=0;\r\n\t\t\t\tx=true;\r\n\t\t\t\tcount2=0;\r\n\t\t\t}\r\n\t\t\tcount2++;\r\n\t\t}\r\n\t\tCollections.sort(length);\r\n\t\t//for(int i=0; i<length.size(); i++)\r\n\t\t//{\r\n\t\t//\tSystem.out.println(length.get(i));\r\n\t\t//}\r\n\t\tint temp=count;\r\n\t\tfor(int i=1; i<=n; i++) \r\n\t\t{\r\n\t\t\tif(count1-i>0)\r\n\t\t\t{\r\n\t\t\t\tfor(int j=0; j<count1-i; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\ttemp+=length.get(j);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tfor(int j=0; j<i-count1; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(over.size()>j)\r\n\t\t\t\t\ttemp--;\r\n\t\t\t\t}\r\n\t\t\t\ttemp+=(i-count1);\r\n\t\t\t}\r\n\t\t\t//pr.println(temp);\r\n\t\t\tSystem.out.println(temp);\r\n\t\t\ttemp=count;\r\n\t\t}\r\n\t\tsc.close();\r\n\t\t//pr.close();\r\n\t}",
"int count(int S[], int m, int n) {\n if (n == 0) return 1;\n\n // If n is less than 0 then no solution exists\n if (n < 0) return 0;\n\n // If there are no coins and n is greater than 0, then no solution exist\n if (m <= 0 && n >= 1) return 0;\n\n // count is sum of solutions (i) including S[m-1] (ii) excluding S[m-1]\n return count(S, m - 1, n) + count(S, m, n - S[m - 1]);\n }",
"private int determineNumberOfIterations()\r\n\t{\r\n\t\tint number = 0;\r\n\r\n\t\tfor (@SuppressWarnings(\"unused\")\r\n\t\tMap.Entry<Integer, LinkedHashMap<Integer, Double>> entry : ENERGIES_E.entrySet()) {\r\n\t\t\tnumber++;\r\n\t\t}\r\n\r\n\t\tfor (@SuppressWarnings(\"unused\")\r\n\t\tMap.Entry<Integer, LinkedHashMap<Integer, Double>> entry : ENERGIES_A.entrySet()) {\r\n\t\t\tnumber++;\r\n\t\t}\r\n\r\n\t\treturn number * 2; // *2 is to account for the reversed branch iterations\r\n\t}",
"private static int runBenchmark(int n) {\n int result = 0;\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n result = benchmarkedMethod();\n }\n }\n return result;\n }",
"private int lineCount() throws IOException\n {\n //This integer will hold the amount of lines\n int lines = 0;\n\n //Create a temporary scanner to iterate through the map file\n Scanner lineCounter = new Scanner(new File(mapFile));\n\n //Iterate through the map file and increment the counter per each line\n while(lineCounter.hasNextLine())\n {\n lineCounter.nextLine();\n lines++;\n //System.out.println(\"I am at line\" + lines);\n }\n \n //Close lineCounter\n lineCounter.close();\n\n //Spit out the amount of lines\n return lines;\n }",
"public int digitCounts(int k, int n) {\n if (k <= 0 || n < 0) {\n return 0;\n }\n if (n == 0) {\n return 1;\n }\n// int res=0;\n ArrayList<Integer> arrayList = new ArrayList<>();\n for (int i = 0; i <= k; i++) {\n\n if ((i + \"\").indexOf(n + \"\") != -1) {\n arrayList.add(i);\n }\n }\n System.out.println(Arrays.asList(arrayList) + \" have \" + (arrayList.toString().length() - arrayList.toString().replace(n + \"\", \"\").length()) + \" n ( n = \" + n + \" )\");\n return arrayList.size();\n }",
"private int count(int row, int col) {\n\tif (row > X || col > Y || row < 0 || col < 0) return 0;\n\tif (row == X && col == Y) return 1;\n\tif (grid[row][col] == -1) return 0;\n\t\n\tif (memo[row][col] != -1) return memo[row][col];\n\t\n\tint ways = 0;\n\tfor (int i = 0; i < 2; ++i) {\n\t ways += count(row + y_dir[i], col + x_dir[i]); \n\t}\n\n\treturn memo[row][col] = ways;\n }",
"public int numTrees(int n) {\n if(n == 0 || n == 1 || n == 2)\n return n;\n int[] c = new int[n + 1];\n c[2] = 2;\n c[3] = 5;\n for(int i = 4; i < n + 1; i++){\n for(int j = 2; j < i; j++)\n c[i] += 2 * (c[j]);\n }\n return c[n];\n }",
"public static int Main()\n\t{\n\t\tint[] num = new int[16];\n\t\tint i;\n\t\tint k;\n\t\tint j;\n\t\tint count;\n\t\tfor (;;) //????\n\t\t{\n\t\t\ti = -1; //?????i?count\n\t\t\tcount = 0;\n\t\t\tdo\n\t\t\t{\n\t\t\t\ti++;\n\t\t\t\tnum[i] = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\t\t\tif (num[0] == -1) //?????????-1???\n\t\t\t\t{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t} while (num[i] != 0); //????0??\n\t\t\tfor (j = 0 ; j <= i - 1 ; j++)\n\t\t\t{\n\t\t\t\tfor (k = j ; k <= i - 1 ; k++)\n\t\t\t\t{\n\t\t\t\t\tif ((num[j] == 2 * num[k]) || (num[j] * 2 == num[k])) //????\n\t\t\t\t\t{\n\t\t\t\t\t\tcount++; //??\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.print(count);\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\n\t}",
"private int getCodeLines(String code)\n{\n StringTokenizer tok = new StringTokenizer(code,\"\\n\");\n int codelines = 0;\n boolean incmmt = false;\n while (tok.hasMoreTokens()) {\n String lin = tok.nextToken();\n boolean hascode = false;\n for (int i = 0; i < lin.length() && !hascode; ++i) {\n\t int ch = lin.charAt(i);\n\t if (Character.isWhitespace(ch)) continue;\n\t if (incmmt) {\n\t if (ch == '*' && i+1 < lin.length() && lin.charAt(i+1) == '/') {\n\t ++i;\n\t incmmt = false;\n\t }\n\t }\n\t else if (ch == '/' && i+1 < lin.length()) {\n\t if (lin.charAt(i+1) == '/') break;\n\t else if (lin.charAt(i+1) == '*') {\n\t incmmt = true;\n\t }\n\t }\n\t else hascode = true;\n }\n if (hascode) ++codelines;\n }\n\n return codelines;\n}",
"public int numTrees(int n) {\n long now = 1;\n for (int i = 0; i < n; i++) {\n now *= 2*n-i;\n now /= i+1;\n }\n return (int)(now/(n+1));\n }",
"static int count8(int n) {\n if (n == 0)\n return 0;\n if (n % 10 == 8) {\n // RC1: if two rightmost digits is 88, count as 2, and recurse on rest\n if (n % 100 == 88)\n return 2 + count8(n / 10);\n else\n // RC2: if rightmost digit is just one 8, standard--count as 1 and recurse on rest\n return 1 + count8(n / 10);\n } else\n // RC3: if rightmost not 8, recurse on rest\n return count8(n / 10);\n }",
"static int count(int a, int b, int n) \n\t{ \n\t\t\n\t\t// function call to pre-calculate the \n\t\t// factorials and modInverse of factorials \n\t\tpregenFact(); \n\t\tpregenInverse(); \n\n\t\t// if a and b are same \n\t\tif (a == b) \n\t\t{ \n\t\t\treturn (check(a * n, a, b)); \n\t\t} \n\n\t\tint ans = 0; \n\t\tfor (int i = 0; i <= n; ++i) \n\t\t{ \n\t\t\tif (check(i * a + (n - i) * b, a, b) == 1) \n\t\t\t{ \n\t\t\t\tans = (ans + comb(n, i)) % mod; \n\t\t\t} \n\t\t} \n\t\treturn ans; \n\t}",
"public int digitCounts(int k, int n) {\n\n int result = 0;\n int base = 1;\n while (n/base > 0) {\n\n int cur = (n/base)%10;\n int low = n-(n/base) * base;;\n int high = n/(base * 10);\n\n if (cur < k)\n {\n result += high*base;\n }\n else if (cur > k)\n {\n result += (high+1)*base;\n }\n else\n {\n result += high*base+low+1;\n }\n\n base *= 10;\n }\n\n return result;\n }",
"static long substrCount(int n, String s) {\n ArrayList<Point> points = new ArrayList<>();\n\n char current = s.charAt(0);\n int count = 1;\n\n for (int i = 1; i < s.length(); i++) {\n char ch = s.charAt(i);\n if (current == ch) {\n count++;\n } else {\n points.add(new Point(current, count));\n current = ch;\n count = 1;\n }\n }\n points.add(new Point(current, count));\n\n count = 0;\n if (points.size() > 2) {\n\n count += addup(points.get(0).count);\n\n for (int i = 1; i < points.size() - 1; i++) {\n Point prev = points.get(i - 1);\n Point curr = points.get(i);\n Point next = points.get(i + 1);\n\n\n count += addup(curr.count);\n\n if (prev.ch == next.ch && curr.count == 1) {\n int min = Math.min(prev.count, next.count);\n count += min;\n }\n }\n\n count += addup(points.get(points.size() - 1).count);\n\n } else if (points.size() == 1) {\n Point curr = points.get(0);\n count += addup(curr.count);\n } else if (points.size() == 2) {\n Point prev = points.get(0);\n count += addup(prev.count);\n Point next = points.get(1);\n count += addup(next.count);\n }\n\n\n System.out.println(points);\n\n return count;\n\n }",
"public static int numTrees(int n) {\n\n int[] count = new int[n + 1];\n\n count[0] = 1;\n count[1] = 1;\n count[2] = 2;\n\n if (count[n] != 0) return count[n];\n\n // Get from count[1] to count[n]\n // G(n) = ∑ i=1ton, G(i−1)⋅G(n−i)\n for (int j = 3; j <= n; j++) {\n int total = 0;\n for (int i = 1; i <= j; i++) {\n int llen = i - 1;\n int rlen = j - i;\n total += (count[llen] * count[rlen]);\n }\n count[j] = total;\n }\n\n return count[n];\n }",
"public int digitCounts(int k, int n) {\n int result = 0;\n for (int i = 1; i <= n; i++) {\n String nStr = String.valueOf(i);\n for (int j = 0; j < nStr.length(); j++) {\n if (nStr.charAt(j) == Character.forDigit(k, 10)) {\n result++;\n }\n }\n\n }\n return result;\n }",
"private static int lines(String file) {\n\t\tint lineCount = 0;\ntry{\n \t\tFileReader fr = new FileReader(file);\n \t\t LineNumberReader lnr = new LineNumberReader(fr);\n \t\t while (lnr.readLine() != null){\n \t\t \tlineCount++;\n \t }\n \t lnr.close(); \n \t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\nreturn lineCount;\n\n\t\t\n\t}",
"int getNumIterations(int precision);",
"public int countLines() throws IOException {\n InputStream is = new BufferedInputStream(new FileInputStream(filename));\n try {\n byte[] c = new byte[1024];\n\n int readChars = is.read(c);\n if (readChars == -1) {\n // bail out if nothing to read\n return 0;\n }\n\n // make it easy for the optimizer to tune this loop\n int count = 0;\n while (readChars == 1024) {\n for (int i=0; i<1024;) {\n if (c[i++] == '\\n') {\n ++count;\n }\n }\n readChars = is.read(c);\n }\n\n // count remaining characters\n while (readChars != -1) {\n for (int i=0; i<readChars; ++i) {\n if (c[i] == '\\n') {\n ++count;\n }\n }\n readChars = is.read(c);\n }\n\n return count == 0 ? 1 : count;\n } finally {\n is.close();\n }\n }",
"private static int numLines() {\n\t\tif(subway != null)\n\t\t\treturn subway[0].length;\n\t\treturn 0;\n\t}",
"public static int combinationCounter(int n) {\r\n int hasil = n * (n - 1) / 2;\r\n return hasil;\r\n }",
"public long iterativeSum(long n){\n long result = 0;\n for(long i = 1L; i <= n; i++){\n result += i;\n }\n return result;\n }",
"int findCount();",
"public int numSquaresIII(int n) {\n List<Integer> squareNum = new ArrayList<>();\n for (int i = 1; i * i <= n; i++) {\n squareNum.add(i * i);\n }\n Queue<Integer> queue = new ArrayDeque<>();\n queue.offer(n);\n int level = 0;\n while (!queue.isEmpty()) {\n ++level;\n Queue<Integer> nextQueue = new ArrayDeque<>();\n for (Integer rem : queue) {\n for (Integer square : squareNum) {\n if (rem.equals(square)) {\n return level;\n } else if (rem < square) {\n break;\n } else {\n nextQueue.offer(rem - square);\n }\n }\n }\n queue = nextQueue;\n }\n return level;\n }",
"int commentsCount();",
"public static int countLines(File file) throws Exception\r\n\t{\r\n\t\tint count=0;\r\n\t\tif(file.isDirectory())\r\n\t\t{\r\n\t\t\tFile[]files=file.listFiles();\r\n\t\t\tif(files!=null)\r\n\t\t\tfor(File childFile:files)\r\n\t\t\t\tcount+=countLines(childFile);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif(!getExtn(file.getName()).equals(\"java\")&&!getExtn(file.getName()).equals(\"html\"))\r\n\t\t\t\treturn 0;\r\n\t\t\tBufferedReader stdin;\r\n\t\t\tFileReader reader=new FileReader(file);\r\n\t\t\tstdin=new BufferedReader(reader);\r\n\t\t\twhile(stdin.readLine()!=null)\r\n\t\t\t\tcount++;\r\n\t\t}\r\n\t\treturn count;\r\n\t}",
"int numOfBlocks() {\n return ni * nj * nk;\n }",
"private static int countWays(int n, int m) {\n int[] count = new int[n+1];\n count[0] = 0;\n\n // Fill the table upto value n\n for (int i = 1; i <= n; i++) {\n // recurrence relation\n if (i > m)\n count[i] = count[i - 1] + count[i - m];\n\n // base cases\n else if (i < m)\n count[i] = 1;\n\n // i = = m\n else\n count[i] = 2;\n }\n\n // required number of ways\n return count[n];\n }",
"public int nrOfExpressions();",
"private static int numWays(int N, ArrayList<Integer> x) {\n /* Base Cases */\n if (N == 0) {\n return 1;\n }\n int count = 0;\n\n for (int num : x) {\n if (N - num >= 0) {\n count += numWays(N-num, x);\n }\n }\n\n return count;\n }",
"static int countingValleys(int n, String s) {\n int valleyCounter =0;\n byte vorm = 0;\n int curLevel=0;\n for(int i=0;i<s.length();i++){\n String cur = s.substring(i,i+1);\n int posNeg = cur.equals(\"U\")?1:-1;\n curLevel+=posNeg;\n if(curLevel == -1 && posNeg == -1){\n valleyCounter++;\n }\n }\n return valleyCounter;\n }",
"public static int numTrees(int n){\n int[] dp = new int[n+1];\n dp[0] = 1;\n for (int i = 1; i <= n; i++){\n for (int j = 0; j < i; j++){\n dp[i] += dp[j] * dp[i-1-j];\n }\n }\n\n return dp[n];\n }",
"static\nint\ncountSeq(\nint\nn, \nint\ndiff) \n{ \n\n// We can't cover difference of more \n\n// than n with 2n bits \n\nif\n(Math.abs(diff) > n) \n\nreturn\n0\n; \n\n\n// n == 1, i.e., 2 bit long sequences \n\nif\n(n == \n1\n&& diff == \n0\n) \n\nreturn\n2\n; \n\nif\n(n == \n1\n&& Math.abs(diff) == \n1\n) \n\nreturn\n1\n; \n\n\nint\nres = \n// First bit is 0 & last bit is 1 \n\ncountSeq(n-\n1\n, diff+\n1\n) + \n\n\n// First and last bits are same \n\n2\n*countSeq(n-\n1\n, diff) + \n\n\n// First bit is 1 & last bit is 0 \n\ncountSeq(n-\n1\n, diff-\n1\n); \n\n\nreturn\nres; \n}",
"public int numberOfFormedLines() {\n\t\t// number of formed lines\n\t\tint countFullLines = 0;\n\t\t\n\t\t// goes through blockMatrix to count full lines\n\t\tfor(int i = 0; i < blockMatrix.length; i++) { \n\t\t\tif(fullLine(i)) {\n\t\t\t\tcountFullLines++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn countFullLines; \n\t}",
"private int countPermuation(int n, int m){\n\t\tint res = 1;\n\t\tfor(int i = n - m + 1; i <= n; i++){\n\t\t\tres *= i;\n\t\t}\n\t\treturn res;\n\t}",
"private int computeCount() {\n \n int count;\n try{\n count = this.clippingFeatures.size() * this.featuresToClip.size();\n }catch(ArithmeticException e ){\n \n count = Integer.MAX_VALUE;\n }\n return count;\n }",
"private int count(Board board, char symbol)\n {\n int answer = 0;\n \n for (int i = 0; i < size; i++)\n if (testRow(board, i, symbol))\n answer++;\n \n for (int i = 0; i < size; i++)\n if (testColumn(board, i, symbol))\n answer++;\n \n if (testLeftDiagonal(board, symbol))\n answer++;\n \n if (testRightDiagonal(board, symbol))\n answer++;\n \n return answer;\n }",
"@Override\n public long[ ][ ] count() {\n // precompute common nodes\n for (int x = 0; x < n; x++) {\n for (int n1 = 0; n1 < deg[x]; n1++) {\n int a = adj[x][n1];\n for (int n2 = n1 + 1; n2 < deg[x]; n2++) {\n int b = adj[x][n2];\n Tuple ab = createTuple(a, b);\n common2.put(ab, common2.getOrDefault(ab, 0) + 1);\n for (int n3 = n2 + 1; n3 < deg[x]; n3++) {\n int c = adj[x][n3];\n boolean st = adjacent(adj[a], b) ? (adjacent(adj[a], c) || adjacent(adj[b], c)) :\n (adjacent(adj[a], c) && adjacent(adj[b], c));\n if (!st) continue;\n Tuple abc = createTuple(a, b, c);\n common3.put(abc, common3.getOrDefault(abc, 0) + 1);\n }\n }\n }\n }\n\n // precompute triangles that span over edges\n int[ ] tri = countTriangles();\n\n // count full graphlets\n long[ ] C5 = new long[n];\n int[ ] neigh = new int[n];\n int[ ] neigh2 = new int[n];\n int nn, nn2;\n for (int x = 0; x < n; x++) {\n for (int nx = 0; nx < deg[x]; nx++) {\n int y = adj[x][nx];\n if (y >= x) break;\n nn = 0;\n for (int ny = 0; ny < deg[y]; ny++) {\n int z = adj[y][ny];\n if (z >= y) break;\n if (adjacent(adj[x], z)) {\n neigh[nn++] = z;\n }\n }\n for (int i = 0; i < nn; i++) {\n int z = neigh[i];\n nn2 = 0;\n for (int j = i + 1; j < nn; j++) {\n int zz = neigh[j];\n if (adjacent(adj[z], zz)) {\n neigh2[nn2++] = zz;\n }\n }\n for (int i2 = 0; i2 < nn2; i2++) {\n int zz = neigh2[i2];\n for (int j2 = i2 + 1; j2 < nn2; j2++) {\n int zzz = neigh2[j2];\n if (adjacent(adj[zz], zzz)) {\n C5[x]++;\n C5[y]++;\n C5[z]++;\n C5[zz]++;\n C5[zzz]++;\n }\n }\n }\n }\n }\n }\n\n int[ ] common_x = new int[n];\n int[ ] common_x_list = new int[n];\n int ncx = 0;\n int[ ] common_a = new int[n];\n int[ ] common_a_list = new int[n];\n int nca = 0;\n\n // set up a system of equations relating orbit counts\n for (int x = 0; x < n; x++) {\n for (int i = 0; i < ncx; i++) common_x[common_x_list[i]] = 0;\n ncx = 0;\n\n // smaller graphlets\n orbit[x][0] = deg[x];\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = adj[x][nx1];\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = adj[x][nx2];\n if (adjacent(adj[a], b)) orbit[x][3]++;\n else orbit[x][2]++;\n }\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n if (b != x && !adjacent(adj[x], b)) {\n orbit[x][1]++;\n if (common_x[b] == 0) common_x_list[ncx++] = b;\n common_x[b]++;\n }\n }\n }\n\n long f_71 = 0, f_70 = 0, f_67 = 0, f_66 = 0, f_58 = 0, f_57 = 0; // 14\n long f_69 = 0, f_68 = 0, f_64 = 0, f_61 = 0, f_60 = 0, f_55 = 0, f_48 = 0, f_42 = 0, f_41 = 0; // 13\n long f_65 = 0, f_63 = 0, f_59 = 0, f_54 = 0, f_47 = 0, f_46 = 0, f_40 = 0; // 12\n long f_62 = 0, f_53 = 0, f_51 = 0, f_50 = 0, f_49 = 0, f_38 = 0, f_37 = 0, f_36 = 0; // 8\n long f_44 = 0, f_33 = 0, f_30 = 0, f_26 = 0; // 11\n long f_52 = 0, f_43 = 0, f_32 = 0, f_29 = 0, f_25 = 0; // 10\n long f_56 = 0, f_45 = 0, f_39 = 0, f_31 = 0, f_28 = 0, f_24 = 0; // 9\n long f_35 = 0, f_34 = 0, f_27 = 0, f_18 = 0, f_16 = 0, f_15 = 0; // 4\n long f_17 = 0; // 5\n long f_22 = 0, f_20 = 0, f_19 = 0; // 6\n long f_23 = 0, f_21 = 0; // 7\n\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = inc[x][nx1]._1, xa = inc[x][nx1]._2;\n\n for (int i = 0; i < nca; i++) common_a[common_a_list[i]] = 0;\n nca = 0;\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = adj[b][nb];\n if (c == a || adjacent(adj[a], c)) continue;\n if (common_a[c] == 0) common_a_list[nca++] = c;\n common_a[c]++;\n }\n }\n\n // x = orbit-14 (tetrahedron)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || !adjacent(adj[b], c)) continue;\n orbit[x][14]++;\n f_70 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_71 += (tri[xa] > 2 && tri[xb] > 2) ? (common3.getOrDefault(createTuple(x, a, b), 0) - 1) : 0;\n f_71 += (tri[xa] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, a, c), 0) - 1) : 0;\n f_71 += (tri[xb] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_67 += tri[xa] - 2 + tri[xb] - 2 + tri[xc] - 2;\n f_66 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(a, c), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_58 += deg[x] - 3;\n f_57 += deg[a] - 3 + deg[b] - 3 + deg[c] - 3;\n }\n }\n\n // x = orbit-13 (diamond)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][13]++;\n f_69 += (tri[xb] > 1 && tri[xc] > 1) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_68 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_64 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_61 += tri[xb] - 1 + tri[xc] - 1;\n f_60 += common2.getOrDefault(createTuple(a, b), 0) - 1;\n f_60 += common2.getOrDefault(createTuple(a, c), 0) - 1;\n f_55 += tri[xa] - 2;\n f_48 += deg[b] - 2 + deg[c] - 2;\n f_42 += deg[x] - 3;\n f_41 += deg[a] - 3;\n }\n }\n\n // x = orbit-12 (diamond)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][12]++;\n f_65 += (tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_63 += common_x[c] - 2;\n f_59 += tri[ac] - 1 + common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_54 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_47 += deg[x] - 2;\n f_46 += deg[c] - 2;\n f_40 += deg[a] - 3 + deg[b] - 3;\n }\n }\n\n // x = orbit-8 (cycle)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][8]++;\n f_62 += (tri[ac] > 0) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_53 += tri[xa] + tri[xb];\n f_51 += tri[ac] + common2.getOrDefault(createTuple(c, b), 0);\n f_50 += common_x[c] - 2;\n f_49 += common_a[b] - 2;\n f_38 += deg[x] - 2;\n f_37 += deg[a] - 2 + deg[b] - 2;\n f_36 += deg[c] - 2;\n }\n }\n\n // x = orbit-11 (paw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = 0; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (c == a || c == b || adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][11]++;\n f_44 += tri[xc];\n f_33 += deg[x] - 3;\n f_30 += deg[c] - 1;\n f_26 += deg[a] - 2 + deg[b] - 2;\n }\n }\n\n // x = orbit-10 (paw)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][10]++;\n f_52 += common_a[c] - 1;\n f_43 += tri[bc];\n f_32 += deg[b] - 3;\n f_29 += deg[c] - 1;\n f_25 += deg[a] - 2;\n }\n }\n\n // x = orbit-9 (paw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || !adjacent(adj[b], c) || adjacent(adj[x], c)) continue;\n orbit[x][9]++;\n f_56 += (tri[ab] > 1 && tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_45 += common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_39 += tri[ab] - 1 + tri[ac] - 1;\n f_31 += deg[a] - 3;\n f_28 += deg[x] - 1;\n f_24 += deg[b] - 2 + deg[c] - 2;\n }\n }\n\n // x = orbit-4 (path)\n for (int na = 0; na < deg[a]; na++) {\n int b = inc[a][na]._1, ab = inc[a][na]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][4]++;\n f_35 += common_a[c] - 1;\n f_34 += common_x[c];\n f_27 += tri[bc];\n f_18 += deg[b] - 2;\n f_16 += deg[x] - 1;\n f_15 += deg[c] - 1;\n }\n }\n\n // x = orbit-5 (path)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (b == a || adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][5]++;\n f_17 += deg[a] - 1;\n }\n }\n\n // x = orbit-6 (claw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || adjacent(adj[x], c) || adjacent(adj[b], c)) continue;\n orbit[x][6]++;\n f_22 += deg[a] - 3;\n f_20 += deg[x] - 1;\n f_19 += deg[b] - 1 + deg[c] - 1;\n }\n }\n\n // x = orbit-7 (claw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][7]++;\n f_23 += deg[x] - 3;\n f_21 += deg[a] - 1 + deg[b] - 1 + deg[c] - 1;\n }\n }\n }\n\n // solve equations\n orbit[x][72] = C5[x];\n orbit[x][71] = (f_71 - 12 * orbit[x][72]) / 2;\n orbit[x][70] = (f_70 - 4 * orbit[x][72]);\n orbit[x][69] = (f_69 - 2 * orbit[x][71]) / 4;\n orbit[x][68] = (f_68 - 2 * orbit[x][71]);\n orbit[x][67] = (f_67 - 12 * orbit[x][72] - 4 * orbit[x][71]);\n orbit[x][66] = (f_66 - 12 * orbit[x][72] - 2 * orbit[x][71] - 3 * orbit[x][70]);\n orbit[x][65] = (f_65 - 3 * orbit[x][70]) / 2;\n orbit[x][64] = (f_64 - 2 * orbit[x][71] - 4 * orbit[x][69] - 1 * orbit[x][68]);\n orbit[x][63] = (f_63 - 3 * orbit[x][70] - 2 * orbit[x][68]);\n orbit[x][62] = (f_62 - 1 * orbit[x][68]) / 2;\n orbit[x][61] = (f_61 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][67]) / 2;\n orbit[x][60] = (f_60 - 4 * orbit[x][71] - 2 * orbit[x][68] - 2 * orbit[x][67]);\n orbit[x][59] = (f_59 - 6 * orbit[x][70] - 2 * orbit[x][68] - 4 * orbit[x][65]);\n orbit[x][58] = (f_58 - 4 * orbit[x][72] - 2 * orbit[x][71] - 1 * orbit[x][67]);\n orbit[x][57] = (f_57 - 12 * orbit[x][72] - 4 * orbit[x][71] - 3 * orbit[x][70] - 1 * orbit[x][67] - 2 * orbit[x][66]);\n orbit[x][56] = (f_56 - 2 * orbit[x][65]) / 3;\n orbit[x][55] = (f_55 - 2 * orbit[x][71] - 2 * orbit[x][67]) / 3;\n orbit[x][54] = (f_54 - 3 * orbit[x][70] - 1 * orbit[x][66] - 2 * orbit[x][65]) / 2;\n orbit[x][53] = (f_53 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63]);\n orbit[x][52] = (f_52 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59]) / 2;\n orbit[x][51] = (f_51 - 2 * orbit[x][68] - 2 * orbit[x][63] - 4 * orbit[x][62]);\n orbit[x][50] = (f_50 - 1 * orbit[x][68] - 2 * orbit[x][63]) / 3;\n orbit[x][49] = (f_49 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][62]) / 2;\n orbit[x][48] = (f_48 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][68] - 2 * orbit[x][67] - 2 * orbit[x][64] - 2 * orbit[x][61] - 1 * orbit[x][60]);\n orbit[x][47] = (f_47 - 3 * orbit[x][70] - 2 * orbit[x][68] - 1 * orbit[x][66] - 1 * orbit[x][63] - 1 * orbit[x][60]);\n orbit[x][46] = (f_46 - 3 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][65] - 1 * orbit[x][63] - 1 * orbit[x][59]);\n orbit[x][45] = (f_45 - 2 * orbit[x][65] - 2 * orbit[x][62] - 3 * orbit[x][56]);\n orbit[x][44] = (f_44 - 1 * orbit[x][67] - 2 * orbit[x][61]) / 4;\n orbit[x][43] = (f_43 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59]) / 2;\n orbit[x][42] = (f_42 - 2 * orbit[x][71] - 4 * orbit[x][69] - 2 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][55]);\n orbit[x][41] = (f_41 - 2 * orbit[x][71] - 1 * orbit[x][68] - 2 * orbit[x][67] - 1 * orbit[x][60] - 3 * orbit[x][55]);\n orbit[x][40] = (f_40 - 6 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][66] - 4 * orbit[x][65] - 1 * orbit[x][60] - 1 * orbit[x][59] - 4 * orbit[x][54]);\n orbit[x][39] = (f_39 - 4 * orbit[x][65] - 1 * orbit[x][59] - 6 * orbit[x][56]) / 2;\n orbit[x][38] = (f_38 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][63] - 1 * orbit[x][53] - 3 * orbit[x][50]);\n orbit[x][37] = (f_37 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63] - 4 * orbit[x][62] - 1 * orbit[x][53] - 1 * orbit[x][51] - 4 * orbit[x][49]);\n orbit[x][36] = (f_36 - 1 * orbit[x][68] - 2 * orbit[x][63] - 2 * orbit[x][62] - 1 * orbit[x][51] - 3 * orbit[x][50]);\n orbit[x][35] = (f_35 - 1 * orbit[x][59] - 2 * orbit[x][52] - 2 * orbit[x][45]) / 2;\n orbit[x][34] = (f_34 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51]) / 2;\n orbit[x][33] = (f_33 - 1 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][58] - 4 * orbit[x][44] - 2 * orbit[x][42]) / 2;\n orbit[x][32] = (f_32 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][43] - 2 * orbit[x][41] - 1 * orbit[x][40]) / 2;\n orbit[x][31] = (f_31 - 2 * orbit[x][65] - 1 * orbit[x][59] - 3 * orbit[x][56] - 1 * orbit[x][43] - 2 * orbit[x][39]);\n orbit[x][30] = (f_30 - 1 * orbit[x][67] - 1 * orbit[x][63] - 2 * orbit[x][61] - 1 * orbit[x][53] - 4 * orbit[x][44]);\n orbit[x][29] = (f_29 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][60] - 1 * orbit[x][59] - 1 * orbit[x][53] - 2 * orbit[x][52] - 2 * orbit[x][43]);\n orbit[x][28] = (f_28 - 2 * orbit[x][65] - 2 * orbit[x][62] - 1 * orbit[x][59] - 1 * orbit[x][51] - 1 * orbit[x][43]);\n orbit[x][27] = (f_27 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][45]) / 2;\n orbit[x][26] = (f_26 - 2 * orbit[x][67] - 2 * orbit[x][63] - 2 * orbit[x][61] - 6 * orbit[x][58] - 1 * orbit[x][53] - 2 * orbit[x][47] - 2 * orbit[x][42]);\n orbit[x][25] = (f_25 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][52] - 1 * orbit[x][48] - 1 * orbit[x][40]) / 2;\n orbit[x][24] = (f_24 - 4 * orbit[x][65] - 4 * orbit[x][62] - 1 * orbit[x][59] - 6 * orbit[x][56] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][39]);\n orbit[x][23] = (f_23 - 1 * orbit[x][55] - 1 * orbit[x][42] - 2 * orbit[x][33]) / 4;\n orbit[x][22] = (f_22 - 2 * orbit[x][54] - 1 * orbit[x][40] - 1 * orbit[x][39] - 1 * orbit[x][32] - 2 * orbit[x][31]) / 3;\n orbit[x][21] = (f_21 - 3 * orbit[x][55] - 3 * orbit[x][50] - 2 * orbit[x][42] - 2 * orbit[x][38] - 2 * orbit[x][33]);\n orbit[x][20] = (f_20 - 2 * orbit[x][54] - 2 * orbit[x][49] - 1 * orbit[x][40] - 1 * orbit[x][37] - 1 * orbit[x][32]);\n orbit[x][19] = (f_19 - 4 * orbit[x][54] - 4 * orbit[x][49] - 1 * orbit[x][40] - 2 * orbit[x][39] - 1 * orbit[x][37] - 2 * orbit[x][35] - 2 * orbit[x][31]);\n orbit[x][18] = (f_18 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][45] - 2 * orbit[x][36] - 2 * orbit[x][27] - 1 * orbit[x][24]) / 2;\n orbit[x][17] = (f_17 - 1 * orbit[x][60] - 1 * orbit[x][53] - 1 * orbit[x][51] - 1 * orbit[x][48] - 1 * orbit[x][37] - 2 * orbit[x][34] - 2 * orbit[x][30]) / 2;\n orbit[x][16] = (f_16 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][36] - 2 * orbit[x][34] - 1 * orbit[x][29]);\n orbit[x][15] = (f_15 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][35] - 2 * orbit[x][34] - 2 * orbit[x][27]);\n }\n\n return orbit;\n }",
"public int numSquaresII(int n) {\n // build a hashset contains all i from 1 to sqrt(n) which have i^2 <= n\n Set<Integer> set = new HashSet<>();\n for (int i = 1; i * i <= n; i++) {\n set.add(i * i);\n }\n // start from 1 to n, test possible condition\n int count = 1;\n while (count <= n) {\n if (isDivided(n, count, set)) {\n return count;\n }\n count++;\n }\n return count;\n }",
"public int totalNQueens(int n) {\n\n if (n <= 0){\n return 0;\n }\n // int count = 0不行\n int[] count = new int[1];\n List<Integer> cur = new ArrayList<Integer>();\n dfs(n, cur, count);\n return count[0];\n }",
"int getNumberOfFold();",
"private void determineCounts( )\n {\n for( int r = 0; r < rows; r++ )\n {\n for( int c = 0; c < cols; c++ )\n {\n if( theMines[ r ][ c ] == 1 )\n theCounts[ r ] [ c ] = 9;\n else\n count( r, c );\n }\n }\n }",
"public int countComponents(int n, int[][] edges) {\n\t int count = n;\n\t int[] root = new int[n];\n\t for(int i = 0; i<n; i++){\n\t root[i] = i;\n\t }\n\t for(int[] e : edges){\n\t int r1 = findRoot(e[0], root);\n\t int r2 = findRoot(e[1], root);\n\t if(r1 != r2){\n\t root[r1] = r2;\n\t count --;\n\t }\n\t }\n\t return count;\n\t }",
"private static int findCollision(int[][] matrix, int n) {\n int count = 0;\n for (int i = 0; i <= n - 1; i++) {\n for (int j = 0; j <= n - 1; j++) {\n if (matrix[i][j] == 1) {\n // left row\n for (int k = j - 1; k >= 0; k--) {\n if (matrix[i][k] == 2) {\n break;\n }\n if (matrix[i][k] == 1) {\n count++;\n }\n }\n // right row\n for (int k = j + 1; k <= n - 1; k++) {\n if (matrix[i][k] == 2) {\n break;\n }\n if (matrix[i][k] == 1) {\n count++;\n }\n }\n // up col\n for (int k = i - 1; k >= 0; k--) {\n if (matrix[k][j] == 2) {\n break;\n }\n if (matrix[k][j] == 1) {\n count++;\n }\n }\n // down col\n for (int k = i + 1; k <= n - 1; k++) {\n if (matrix[k][j] == 2) {\n break;\n }\n if (matrix[k][j] == 1) {\n count++;\n }\n }\n // up left\n for (int k = i - 1, l = j - 1; k >= 0 && l >= 0; k--, l--) {\n if (matrix[k][l] == 2) {\n break;\n }\n if (matrix[k][l] == 1) {\n count++;\n }\n }\n // down left\n for (int k = i + 1, l = j - 1; k <= n - 1 && l >= 0; k++, l--) {\n if (matrix[k][l] == 2) {\n break;\n }\n if (matrix[k][l] == 1) {\n count++;\n }\n }\n // up right\n for (int k = i - 1, l = j + 1; k >= 0 && l <= n - 1; k--, l++) {\n if (matrix[k][l] == 2) {\n break;\n }\n if (matrix[k][l] == 1) {\n count++;\n }\n }\n // down right\n for (int k = i + 1, l = j + 1; k <= n - 1 && l <= n - 1; k++, l++) {\n if (matrix[k][l] == 2) {\n break;\n }\n if (matrix[k][l] == 1) {\n count++;\n }\n }\n }\n }\n }\n return count / 2;\n }",
"private int calculateTotalHeads() { //kept a separate method with a specific purpose instead of writing code in main\n\t\t//no need to static method, althouth static won't hurt in such a small code\n\t\tint headsCount = 0;\n\t\tfor (int currentCoinNo = 1; currentCoinNo <= noCoins; currentCoinNo++) { \n\t\t\tif(isHead(currentCoinNo)) {\n\t\t\t\theadsCount++;\n\t\t\t}\n\t\t}\n\t\treturn headsCount;\n\t}",
"public int numTrees(int n) {\n if (n==0) return 1;\n int[] dp = new int[n+1];\n dp[0] = dp[1] = 1;\n for (int i=2;i<=n;i++) {\n for (int j=1;j<=i;j++) {\n dp[i] += dp[j-1] * dp[i-j];\n }\n }\n return dp[n];\n }",
"private static int countLines(String inputFileName) {\n int count = 0;\n Path path = Paths.get(inputFileName);\n try {\n Scanner sc = new Scanner(path);\n while (sc.hasNextLine()) {\n sc.nextLine();\n count++;\n }\n sc.close();\n }\n catch(FileNotFoundException e) {\n System.out.println(\"File Error\");\n e.printStackTrace();\n }\n catch(IOException e) {\n System.out.println(\"File Error\");\n e.printStackTrace();\n }\n return count;\n }",
"static long substrCount(int n, String s) {\n \tlong output=0;\n \t\n \tboolean[][] matrix = new boolean[n][n];\n \t\n \tfor(int i=0; i<n; i++) {\n \t\tmatrix[i][i] = true;\n \t\toutput++;\n \t}\n \t\n \tfor(int gap=1; gap<n; gap++) {\n \t\tfor(int i=0; i+gap <n; i++) {\n \t\t\tint j = i+gap;\n \t\t\t\n \t\t\tif(gap ==1) {\n \t\t\t\tif(s.charAt(i) == s.charAt(j)) {\n \t\t\t\t\tmatrix[i][j] = true;\n \t\t\t\t\toutput++;\n \t\t\t\t} else {\n \t\t\t\t\tmatrix[i][j] = false;\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tif(s.charAt(i) == s.charAt(j) && matrix[i+1] [j-1]) {\n \t\t\t\t\t\n \t\t\t\t\tif(j-i >= 4 && s.charAt(i)== s.charAt(i+1)) {\n \t\t\t\t\t\tmatrix[i][j] = true;\n \t\t\t\t\toutput++;\n \t\t\t\t\t} else if(j-i <4) {\n \t\t\t\t\t\tmatrix[i][j] = true;\n \t\t\t\t\toutput++;\n \t\t\t\t\t} else {\n \t\t\t\t\t\tmatrix[i][j] = false;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t} else {\n \t\t\t\t\tmatrix[i][j] = false;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n \t\n \treturn output;\n }",
"public static long count(int tiles, int width) {\n\t\tif (WAYS[width]!=0)\r\n\t\t\treturn WAYS[width];\r\n\t\t\r\n\t\tif (tiles - width < 0)\r\n\t\t\treturn 0;\r\n\t\t\r\n\t\tlong sum = 0;\r\n\t\tfor (int blank = 1; blank+width <= tiles; blank++) {\r\n\t\t\tfor (int block = MIN; block+blank+width <= tiles; block++) {\r\n\t\t\t\tsum+=1+count(tiles,width+block+blank);\r\n\t\t\t\tcount[block]++;\r\n//\t\t\t\tSystem.out.println(block);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tWAYS[width] = sum;\r\n\r\n\t\treturn sum;\r\n\r\n\t}",
"int getNumberOfLines();",
"static long countTriplets(List<Long> arr, long r) {\n\n long triplets = 0;\n\n HashMap<Long, LinkedList<Integer>> powIndexesMap = new HashMap<>();\n for (int i = 0; i < arr.size(); i++) {\n Long number = arr.get(i);\n Long pow = Long.valueOf((long) logb(number, r));\n LinkedList<Integer> indexes;\n if (!powIndexesMap.containsKey(pow)) {\n indexes = new LinkedList<>();\n } else {\n indexes = powIndexesMap.get(pow);\n }\n indexes.add(i);\n powIndexesMap.put(pow, indexes);\n }\n\n for (int i = 0; i < arr.size(); i++) {\n Long number = arr.get(i);\n Long pow = Long.valueOf((long) logb(number, r));\n Long pow2 = pow + 1;\n Long pow3 = pow2 + 1;\n\n if (!powIndexesMap.containsKey(pow2) || !powIndexesMap.containsKey(pow3)) {\n continue;\n }\n Integer countPow2 = powIndexesMap.get(pow2).size();\n Integer countPow3 = powIndexesMap.get(pow3).size();\n\n if (countPow2 > 0 && countPow3 > 0) {\n triplets += (countPow2 * countPow3);\n }\n }\n return triplets;\n }",
"static int countPrimesSlow(int n) {\n\t\tint count = 0;\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\tif (isPrime(i)) count++;\n\t\t}\n\t\t\n\t\treturn count;\n\t}",
"public static int digitCounter(int n){\r\n int counter=1;\r\n while(n>10){\r\n n=n/10;\r\n counter++;\r\n }\r\n System.out.println(\"conter : \" +counter);\r\n return counter;\r\n }",
"public int digitCounts(int k, int n) {\n\n\n int count = 0;\n char kChar = (char)(k + '0');\n for (int i = k; i <= n; i++) {\n char[] iChars = Integer.toString(i).toCharArray();\n for (char iChar : iChars) {\n if (kChar == iChar) count++;\n }\n }\n\n return count;\n }",
"int fillCount();",
"abstract long calculateChildCount() throws TskCoreException;",
"public int minOperations(int n) {\n\t\tint count = 0;\n\t\twhile (n != 1) {\n\t\t\tn = n - 1;\n\t\t\tif (n % 2 == 0) {\n\t\t\t\tn = n / 2;\n\t\t\t} else if (n % 3 == 0) {\n\t\t\t\tn = n / 3;\n\t\t\t}\n\t\t\tcount++;\n\t\t}\n\n\t\treturn count;\n\t}",
"private static int getChange(int n) {\n \t\n int count =0, tempCount = 0;\n while(n!=0){\n \t\n \tif(n >= 10){\n \t\ttempCount = n/10;\n \t\tn = n % 10;\n \t\tcount = count + tempCount;\n \t\tif(n==0)\n \t\t\tbreak;\n \t}\n \tif( n >= 5 && n < 10){\n \t\ttempCount = n/5;\n \t\tn = n % 5;\n \t\tcount = count + tempCount;\n \t\tif(n == 0)\n \t\t\tbreak;\n \t}\n \tif(n >= 1 && n < 5){\n \t\tcount = count + n;\n break;\n \t}\n }\n return count;\n }",
"private int countNodes(Node n) {\n int count = 1;\n if (n==null) return 0;\n\n for (int i = 0; i < n.getSubtreesSize(); i++) {\n count = count + countNodes(n.getSubtree(i));\n }\n\n return count;\n }",
"private void countNonCommentCodeLine(String currentLine) {\n\t\t\tif (!\"\".equals(currentLine)) {\n\t\t\t\tif (!Pattern.compile(\"^[{}();]*$\").matcher(currentLine).matches()) {\n\t\t\t\t\tlogicLines++;\n\t\t\t\t}\n\t\t\t\tphysicalLines++;\n\t\t\t}\n\t\t}",
"public static int countLines(Scanner countFractions){\n try{\n countFractions = new Scanner (new FileInputStream(\"fractions.txt\"));\n }\n catch(FileNotFoundException e){\n System.out.println(\"File not found\");\n }\n int count = 0;\n while(countFractions.hasNextLine()){\n count++;\n countFractions.nextLine();\n }\n countFractions.close();\n return count;\n }",
"public static int numTrees(int n) {\n return helper(1,n);\n }",
"public String countAndSay(int n)\n {\n if(n<=0)\n return \"\";\n String origin=\"1\";\n //we iterate n-1 times\n for(int i=1; i<n; i++)\n {\n //we generate a string for each level\n StringBuffer sb=new StringBuffer();\n int count=1;\n char lastChar=origin.charAt(0);\n for(int j=1; j<origin.length(); j++)\n {\n if(origin.charAt(j)==lastChar)\n count++;\n else\n {\n sb.append(count);\n sb.append(lastChar);\n count=1;\n lastChar=origin.charAt(j);\n }\n }\n sb.append(count);\n sb.append(lastChar);\n origin=sb.toString();\n }\n return origin;\n }",
"private static void function(int startNum,int endNum) {\n int start = startNum;\n int end = endNum;\n int count = 0;\n int x = 0;\n\n for (int i = 2; i < end; i++) {\n x=0;\n for (int j = 2; j <= (int)Math.sqrt(i); j++) {\n if (i%j==0) {\n x++;\n\n }\n }\n if (x==0) {\n count++;\n System.out.println(i);\n }\n }\n\n System.out.println(\"==========\");\n System.out.println(count);\n }",
"static int CountPrime(int n)\n {\n int count = 0; // To store count\n for(int i = 2; i <= n; i++) // loop from i = 2 because 1 is neither prime or complex\n {\n // Check if it is prime \n if(isPrime(i))\n {\n count++; // If it is prime raise count\n }\n }\n\n return count; // return count\n }",
"static int countConsecutive(int N) {\n int count = 0;\n for (int L = 1; L * (L + 1) < 2 * N; L++) {\n float a = (float) ((1.0 * N - (L * (L + 1)) / 2) / (L + 1));\n if (a - (int) a == 0.0)\n count++;\n }\n return count;\n }",
"public static void main(String[] args) {\n\t\t\n\t\tint n = 10;\n\t\tint[] lookUp = new int[n+1];\n\t\tArrays.fill(lookUp, 0);\n\t\tSystem.out.println(numberOfWaysRecursive(n));\n\t\tSystem.out.println(numberOfWaysDynamic(n,lookUp));\n\n\t}",
"public int count_decoding_improved(char[] digits, int n){\n// if(n==0 || n==1)\n// return 1;\n\n int[] count = new int[n+1];\n\n count[0] = 1;\n count[1] = 1;\n //int count = 0;\n\n for(int i = 2; i <= n; i++){\n if(digits[i-1] > '0')\n count[i] = count[i-1];\n\n if(digits[i-2]=='1' || digits[i-2] == '2' && digits[i-1] < '7')\n count[i] += count[i-2];\n }\n\n\n\n return count[n];\n }",
"long count();",
"long count();",
"long count();",
"long count();",
"long count();",
"long count();",
"long count();",
"public void manualCount(ArrayList<Sheet> Sheets){\n \r\n for (int i = 0; i<Sheets.size();i++){\r\n Sheet sheet = Sheets.get(i);\r\n for(int j =0 ;j<sheet.Patterns.size();j++){\r\n checkPatterns(sheet.Patterns.get(j));\r\n }\r\n /*\r\n if(i%5000 == 0){\r\n System.out.println(i+\":\"+(System.currentTimeMillis()-startTimeParallel));\r\n }\r\n */\r\n }\r\n }",
"public static int countStatements(SourceFileIterator sourceFileIterator) {\r\n\r\n\t\tDebugUtils.println(\"====== Count Statements =====\");\r\n\t\tsourceFileIterator.reset();\r\n\r\n\t\tboolean hasMore = true;\r\n\r\n\t\tint maxStatements = Integer.MIN_VALUE;\r\n\r\n\t\tint countOfFiles = 0;\r\n\t\tint linesRead = 0;\r\n\r\n\t\tFile maxStatementsFile = null;\r\n\r\n\t\tint countOfStatements = 0;\r\n\t\tint countOfComments = 0;\r\n\t\tint countOfCloseBraces = 0;\r\n\t\tint countOfOtherLines = 0;\r\n\t\tint countOfBlankLines = 0;\r\n\r\n\t\twhile (hasMore) {\r\n\t\t\tcountOfFiles++;\r\n\t\t\tSourceFile srcFile = sourceFileIterator.getCurrentSourceFile();\r\n\t\t\tlinesRead += srcFile.getNumLines();\r\n\r\n\t\t\tfinal int numStatements = srcFile.getNumStatements();\r\n\r\n\t\t\tif (numStatements > maxStatements) {\r\n\t\t\t\tmaxStatements = numStatements;\r\n\t\t\t\tmaxStatementsFile = srcFile.getPath();\r\n\t\t\t}\r\n\r\n\t\t\tcountOfStatements += numStatements;\r\n\t\t\tcountOfComments += srcFile.getNumComments();\r\n\t\t\tcountOfCloseBraces += srcFile.getNumCloseBraces();\r\n\t\t\tcountOfOtherLines += srcFile.getNumOtherLines();\r\n\t\t\tcountOfBlankLines += srcFile.getNumBlankLines();\r\n\r\n\t\t\thasMore = sourceFileIterator.nextSourceFile();\r\n\t\t}\r\n\r\n\t\tDebugUtils.println(\"Over \" + countOfFiles + \" files, we found \"\r\n\t\t\t\t+ countOfStatements + \" statements, for an average of \"\r\n\t\t\t\t+ (countOfStatements / (float) countOfFiles) + \" per file.\");\r\n\t\tDebugUtils.println(\"Num Lines of Comments: \" + countOfComments);\r\n\t\tDebugUtils.println(\"Num Lines of Close Braces: \" + countOfCloseBraces);\r\n\t\tDebugUtils.println(\"Num Blank Lines: \" + countOfBlankLines);\r\n\t\tDebugUtils.println(\"Num Lines Unclassified: \" + countOfOtherLines);\r\n\r\n\t\tDebugUtils.println(linesRead\r\n\t\t\t\t+ \" total lines read (including imports and comments).\");\r\n\t\tDebugUtils.println(maxStatements\r\n\t\t\t\t+ \" is the max number of statements we found --> \"\r\n\t\t\t\t+ maxStatementsFile);\r\n\r\n\t\tDebugUtils.println(\"COCOMO measure of effort 2.4 * (KLOC ** 1.05): \"\r\n\t\t\t\t+ (2.4 * Math.pow(countOfStatements / 1000.0, 1.05))\r\n\t\t\t\t+ \" person-months.\");\r\n\t\t\r\n\t\treturn countOfStatements;\r\n\t}",
"static long numWays(int index, int m, int n, int[] arr) {\n long count = 0;\n\n\n if (n == 0 || index == (m - 1)) {\n if (index == (m - 1)) {\n arr[index] = n;\n }\n// for (int x : arr) {\n// System.out.print(x + \",\");\n// }\n// System.out.println();\n return 1;\n }\n\n if (n < 0 || index >= m) {\n return 0;\n }\n\n\n String key = index(arr, index, m, n);\n if (dp.containsKey(key)) {\n return dp.get(key);\n }\n\n\n for (int i = 0; i <= n; i++) {\n arr[index] = i;\n count += numWays(index + 1, m, n - i, arr);\n// for (int j = index + 1; j < arr.length; j++) {\n// arr[j] = 0;\n// }\n }\n\n dp.put(key, count % prime);\n return count % prime;\n }",
"public int numberOfKnightsIn() { // numero di cavalieri a tavola\n \n return numeroCompl;\n }"
] | [
"0.6838683",
"0.6365663",
"0.6302229",
"0.6263123",
"0.6263123",
"0.6245553",
"0.62087196",
"0.61014885",
"0.60622203",
"0.6021538",
"0.59893167",
"0.5973955",
"0.59626466",
"0.5959247",
"0.5950315",
"0.5930048",
"0.5898823",
"0.5885465",
"0.5881573",
"0.58636826",
"0.5850436",
"0.58445776",
"0.5839669",
"0.58043635",
"0.5798681",
"0.57916677",
"0.57857066",
"0.5774075",
"0.57546383",
"0.5751403",
"0.5750051",
"0.57120186",
"0.570302",
"0.5689528",
"0.5687381",
"0.5669277",
"0.56685877",
"0.5666369",
"0.56633294",
"0.5657053",
"0.5641561",
"0.5634489",
"0.5625476",
"0.56184924",
"0.5616232",
"0.56117725",
"0.5611274",
"0.56092817",
"0.56003976",
"0.55976015",
"0.5596133",
"0.5595997",
"0.5593436",
"0.55911833",
"0.5591104",
"0.5586381",
"0.5579316",
"0.5573322",
"0.5565734",
"0.5560772",
"0.5560579",
"0.55605423",
"0.5558651",
"0.5558395",
"0.5548941",
"0.5544723",
"0.55427486",
"0.5540669",
"0.55390203",
"0.5537743",
"0.5534125",
"0.55307746",
"0.5528584",
"0.55270815",
"0.5524724",
"0.55244344",
"0.55150664",
"0.5513197",
"0.5509759",
"0.55094475",
"0.54897875",
"0.5485077",
"0.5483341",
"0.5479697",
"0.5478149",
"0.54763347",
"0.54743403",
"0.54700613",
"0.54695183",
"0.5468296",
"0.5468296",
"0.5468296",
"0.5468296",
"0.5468296",
"0.5468296",
"0.5468296",
"0.54679143",
"0.5457413",
"0.54555655",
"0.54514563"
] | 0.6591013 | 1 |
/ A function that calculates the Big Oh notation of the code stored You only have to cater for constant, linear and quadratic functions | public String getBigOh(String[] codeLines)
{
String notation = "";
int runtime = 0;
for(int i = 0; i <= codeLines.length; i++)
{
if(calculatePrimitiveCount(codeLines, "", i).contains("n"))
{
notation = "\n O(n)";
}
else //if() no 'n'
{
notation = "\n n";
}
}
return notation + "\n" + "Total Running Time: " + runtime + "ms" ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toString() {\r\n String function = \"\";\r\n //in order to print function as a string, we must go through all the possibilities of\r\n //how snytax between how functions are written and my be interpreted should be explored.\r\n //for instance if a term = 0 such as sin(0), you wouldnt write sin(0). Or x^0, you would\r\n //simply represent this as 1.\r\n //using if else statements within a for loop i scan through all the terms stored in the \r\n //arrays and print them accordingly following proper syntax for writing equations,\r\n //it is quite a bit of code and i found it difficult annotating this method since\r\n //it was mainly logic.\r\n boolean start = true;\r\n for(int i = 0; i < cindex; i++){\r\n boolean nothing = false;\r\n if(start){\r\n if(co[i] == 0){\r\n nothing = true;\r\n }else if(co[i] == -1){\r\n function += \"-\";\r\n start = false;\r\n }else if(co[i] == 1){\r\n start = false;\r\n if(degree[i] == 0){\r\n function += String.format(\"%.02f\", co[i]);\r\n }\r\n }else{\r\n function += String.format(\"%.02f\", co[i]);\r\n start = false;\r\n }\r\n }else{\r\n if(co[i] == 0){\r\n nothing = true;\r\n }else if(co[i] == -1){\r\n function += \"-\";\r\n }else if(co[i] == 1){\r\n function += \"+\";\r\n }else if(co[i] > 0){\r\n function += \"+\" + String.format(\"%.02f\", co[i]);\r\n }else{\r\n function += String.format(\"%.02f\", co[i]);\r\n }\r\n }\r\n if(!nothing){\r\n if(degree[i] == 1){\r\n function += \"x\";\r\n }else if(degree[i] == 0){\r\n function = function;\r\n }else if(degree[i] > 0){\r\n function += \"x^\" + String.format(\"%.02f\", degree[i]);\r\n }else{\r\n function += \"x^(\" + String.format(\"%.02f\", degree[i]) + \")\";\r\n }\r\n }\r\n }\r\n for(int i = 0; i < sinindex; i++){\r\n boolean nothing = false;\r\n if(sind[i] != 0){\r\n if(start){\r\n if(sinc[i] == 0){\r\n nothing = true;\r\n }else if(sinc[i] == -1){\r\n function += \"-\";\r\n start = false;\r\n }else if(sinc[i] == 1){\r\n start = false;\r\n }else{\r\n function += String.format(\"%.02f\", sinc[i]);\r\n start = false;\r\n }\r\n }else{\r\n if(sinc[i] == 0){\r\n nothing = true;\r\n }else if(sinc[i] == -1){\r\n function += \"-\";\r\n }else if(sinc[i] == 1){\r\n function += \"+\";\r\n }else if(sinc[i] > 0){\r\n function += \"+\" + String.format(\"%.02f\", sinc[i]);\r\n }else{\r\n function += String.format(\"%.02f\", sinc[i]);\r\n }\r\n }\r\n }\r\n if(!nothing){\r\n if(sind[i] == 1){\r\n function += \"sin(x)\";\r\n }else if(sind[i] == -1){\r\n function += \"sin(-x)\";\r\n }else if(sind[i] == 0){\r\n function = function;\r\n }else{\r\n function += \"sin(\" + String.format(\"%.02f\", sind[i]) + \"x)\";\r\n }\r\n }\r\n }\r\n for(int i = 0; i < tanindex; i++){\r\n boolean nothing = false;\r\n if(tand[i] != 0){\r\n if(start){\r\n if(tanc[i] == 0){\r\n nothing = true;\r\n }else if(tanc[i] == -1){\r\n function += \"-\";\r\n start = false;\r\n }else if(tanc[i] == 1){\r\n start = false;\r\n }else{\r\n function += String.format(\"%.02f\", tanc[i]);\r\n start = false;\r\n }\r\n }else{\r\n if(tanc[i] == 0){\r\n nothing = true;\r\n }else if(tanc[i] == -1){\r\n function += \"-\";\r\n }else if(tanc[i] == 1){\r\n function += \"+\";\r\n }else if(tanc[i] > 0){\r\n function += \"+\" + String.format(\"%.02f\", tanc[i]);\r\n }else{\r\n function += String.format(\"%.02f\", tanc[i]);\r\n }\r\n }\r\n }\r\n if(!nothing){\r\n if(tand[i] == 1){\r\n function += \"tan(x)\";\r\n }else if(tand[i] == -1){\r\n function += \"tan(-x)\";\r\n }else if(tand[i] == 0){\r\n function = function;\r\n }else{\r\n function += \"tan(\" + String.format(\"%.02f\", tand[i]) + \"x)\";\r\n }\r\n }\r\n }\r\n for(int i = 0; i < cosindex; i++){\r\n boolean nothing = false;\r\n if(start){\r\n if(cosc[i] == 0){\r\n nothing = true;\r\n }else if(cosc[i] == -1){\r\n function += \"-\";\r\n start = false;\r\n }else if(cosc[i] == 1){\r\n start = false;\r\n }else{\r\n function += String.format(\"%.02f\", cosc[i]);\r\n start = false; \r\n }\r\n }else{\r\n if(cosc[i] == 0){\r\n nothing = true;\r\n }else if(cosc[i] == -1){\r\n function += \"-\";\r\n }else if(cosc[i] == 1){\r\n function += \"+\";\r\n }else if(cosc[i] > 0){\r\n function += \"+\" + String.format(\"%.02f\", cosc[i]);\r\n }else{\r\n function += String.format(\"%.02f\", cosc[i]);\r\n }\r\n }\r\n if(!nothing){\r\n if(cosd[i] == 1){\r\n function += \"cos(x)\";\r\n }else if(cosd[i] == -1){\r\n function += \"cos(-x)\";\r\n }else if(cosd[i] == 0){\r\n function = function;\r\n }else{\r\n function += \"cos(\" + String.format(\"%.02f\", cosd[i]) + \"x)\";\r\n }\r\n }\r\n }\r\n return function;\r\n\t}",
"@Override\n public ExtensionResult doCalculate(ExtensionRequest extensionRequest) {\n String result = \"Maaf Kak. ada kesalahan :( Mohon dicek lagi inputannya!\";\n String operasi = getEasyMapValueByName(extensionRequest, \"hitung\");\n operasi = operasi.replaceAll(\"\\\\s+\", \"\");\n operasi = operasi.replaceAll(\"multiply\", \"*\");\n operasi = operasi.replaceAll(\"Multiply\", \"*\");\n operasi = operasi.replaceAll(\"bagi\", \"/\");\n operasi = operasi.replaceAll(\"Bagi\", \"/\");\n String[] arr = operasi.split(\"(?<=[-+*/])|(?=[-+*/])\");\n double res = 0;\n try {\n\n //ubah - jadi + dan merubah next index jd angka negatif\n for (int i = 0; i < arr.length; i++) {\n if (arr[i].equals(\"-\")) {\n arr[i] = \"+\";\n arr[i + 1] = \"-\" + arr[i + 1];\n }\n }\n\n //temporary\n List<String> temp = new ArrayList<>();\n for (String obj : arr) {\n temp.add(obj);\n }\n\n if (operasi.contains(\"*\")) {\n //perkalian\n for (int i = 1; i < temp.size(); i++) {\n if (temp.get(i).equals(\"*\")) {\n double angka1 = new Double(temp.get(i - 1));\n double angka2 = new Double(temp.get(i + 1));\n String operator = temp.get(i);\n double hasil = calculate(angka1, operator, angka2);\n\n temp.remove(i);\n temp.remove(i);\n temp.set(i - 1, hasil + \"\");\n i--;\n }\n }\n }\n if (operasi.contains(\"/\")) {\n //pembagian\n for (int i = 1; i < temp.size(); i++) {\n if (temp.get(i).equals(\"/\")) {\n double angka1 = new Double(temp.get(i - 1));\n double angka2 = new Double(temp.get(i + 1));\n String operator = temp.get(i);\n double hasil = calculate(angka1, operator, angka2);\n\n temp.remove(i);\n temp.remove(i);\n temp.set(i - 1, hasil + \"\");\n i--;\n }\n }\n }\n\n //menjumlahkan semua angka\n for (int i = 0; i < temp.size(); i += 2) {\n double d = new Double(temp.get(i));\n res = res + d;\n }\n result = \"Hasilnya \" + res + \" Kak.\";\n } catch (Exception e) {\n\n }\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n Map<String, String> output = new HashMap<>();\n\n output.put(OUTPUT, result);\n extensionResult.setValue(output);\n return extensionResult;\n }",
"private static int jacobiSymbol(int p, BigInteger n) {\n if (p == 0)\n return 0;\n\n // Algorithm and comments adapted from Colin Plumb's C library.\n int j = 1;\n int u = n.mag[n.mag.length-1];\n\n // Make p positive\n if (p < 0) {\n p = -p;\n int n8 = u & 7;\n if ((n8 == 3) || (n8 == 7))\n j = -j; // 3 (011) or 7 (111) mod 8\n }\n\n // Get rid of factors of 2 in p\n while ((p & 3) == 0)\n p >>= 2;\n if ((p & 1) == 0) {\n p >>= 1;\n if (((u ^ (u>>1)) & 2) != 0)\n j = -j; // 3 (011) or 5 (101) mod 8\n }\n if (p == 1)\n return j;\n // Then, apply quadratic reciprocity\n if ((p & u & 2) != 0) // p = u = 3 (mod 4)?\n j = -j;\n // And reduce u mod p\n u = n.mod(BigInteger.valueOf(p)).intValue();\n\n // Now compute Jacobi(u,p), u < p\n while (u != 0) {\n while ((u & 3) == 0)\n u >>= 2;\n if ((u & 1) == 0) {\n u >>= 1;\n if (((p ^ (p>>1)) & 2) != 0)\n j = -j; // 3 (011) or 5 (101) mod 8\n }\n if (u == 1)\n return j;\n // Now both u and p are odd, so use quadratic reciprocity\n assert (u < p);\n int t = u; u = p; p = t;\n if ((u & p & 2) != 0) // u = p = 3 (mod 4)?\n j = -j;\n // Now u >= p, so it can be reduced\n u %= p;\n }\n return 0;\n }",
"private double equation(long n) {\n\t\treturn (4d * montoCarlo(n) / n);\n\t}",
"private String compute(String equ,String op)\n {\n String equation = equ;\n Pattern mdPattern = Pattern.compile(\"(\\\\d+([.]\\\\d+)*)(([\"+op+\"]))(\\\\d+([.]\\\\d+)*)\");\n Matcher matcher\t\t= mdPattern.matcher(equation);\n while(matcher.find())\n {\n String[] arr = null;\n double ans = 0;\n String eq = matcher.group(0);//get form x*y\n if(eq.contains(op))\n {\n arr = eq.split(\"\\\\\"+op);//make arr\n if(op.equals(\"*\"))\n ans = Double.valueOf(arr[0])*Double.valueOf(arr[1]);//compute\n if(op.equals(\"/\"))\n ans = Double.valueOf(arr[0])/Double.valueOf(arr[1]);//compute\n if(op.equals(\"+\"))\n ans = Double.valueOf(arr[0])+Double.valueOf(arr[1]);//compute\n if(op.equals(\"-\"))\n ans = Double.valueOf(arr[0])-Double.valueOf(arr[1]);//compute\n }\n\n equation = matcher.replaceFirst(String.valueOf(ans));//replace in equation\n matcher = mdPattern.matcher(equation);//look for more matches\n }\n return equation;\n }",
"public void calcS(){\n if (n.subtract(one).mod(new BigNumber(\"2\")).compareTo(zero)!=0){\n s=zero;\n return;\n }\n while(n.subtract(one).mod(pow(two,s)).compareTo(zero)!=0){\n //System.out.println(s);\n s=s.add(one);\n }\n s=s.subtract(one);\n }",
"private static String cal(int x, int y) {\n\t\tint max =0;\n\t\tif(Math.abs((int)x) > Math.abs((int)y)) max= Math.abs((int)x);\n\t\telse max = Math.abs((int)y);\n\t\t\n\t\tint max_code= max;\n\t\tmax = 2*max+1;\n\t\t\n\t\tint n = max;\n\t\tmax = (int)Math.pow((double)max, (double)2);\n\t\t\n\t\tint start = max;\n\t\tint res;\n\t\t\n\t\t\n\t\tif( x==max_code && y>-max_code){\n\t\tres = start-(max_code-y);\n\t\t}\n\t\telse if(y == -max_code && y<max_code) {\n\t\t\tstart -=(n-1);\n\t\t\tres = start-(max_code-x);\n\t\t}\n\t\telse if(x ==-max_code && y<max_code) {\n\t\t\tstart -=2*(n-1);\n\t\t\tres = start -(max_code+y);\n\t\t}\n\t\telse {\n\t\t\tstart-=3*(n-1);\n\t\t\tres = start - (max_code+x);\n\t\t}\n\tint unit =0, temp=res;\n\twhile(true) {\n\t\ttemp /=10;\n\t\tunit++;\n\t\tif(temp ==0)break;\n\t}\n\tString res_st = Integer.toString(res);\n\tfor(int i=0; i<max_unit-unit; i++) {\n\t\tres_st = \" \"+res_st;\n\t}\n\t\t\n\t\t\n\t\treturn res_st;\n\t}",
"String getMGFAlgorithm();",
"@Override public short getComplexity() {\n return 0;\n }",
"public String m21274OooO00o(int i) {\n char[] cArr = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};\n String[] strArr = {\"0000\", \"0001\", \"0010\", \"0011\", \"0100\", \"0101\", \"0110\", \"0111\", \"1000\", \"1001\", \"1010\", \"1011\", \"1100\", \"1101\", \"1110\", \"1111\"};\n String str = new String();\n if (i == 16) {\n for (int i2 = this.f22760OooO0O0 - 1; i2 >= 0; i2--) {\n str = ((((((((str + cArr[(this.f22759OooO00o[i2] >>> 28) & 15]) + cArr[(this.f22759OooO00o[i2] >>> 24) & 15]) + cArr[(this.f22759OooO00o[i2] >>> 20) & 15]) + cArr[(this.f22759OooO00o[i2] >>> 16) & 15]) + cArr[(this.f22759OooO00o[i2] >>> 12) & 15]) + cArr[(this.f22759OooO00o[i2] >>> 8) & 15]) + cArr[(this.f22759OooO00o[i2] >>> 4) & 15]) + cArr[this.f22759OooO00o[i2] & 15]) + \" \";\n }\n } else {\n for (int i3 = this.f22760OooO0O0 - 1; i3 >= 0; i3--) {\n str = ((((((((str + strArr[(this.f22759OooO00o[i3] >>> 28) & 15]) + strArr[(this.f22759OooO00o[i3] >>> 24) & 15]) + strArr[(this.f22759OooO00o[i3] >>> 20) & 15]) + strArr[(this.f22759OooO00o[i3] >>> 16) & 15]) + strArr[(this.f22759OooO00o[i3] >>> 12) & 15]) + strArr[(this.f22759OooO00o[i3] >>> 8) & 15]) + strArr[(this.f22759OooO00o[i3] >>> 4) & 15]) + strArr[this.f22759OooO00o[i3] & 15]) + \" \";\n }\n }\n return str;\n }",
"public static void main(String[] args) {\n\n\n\n double numberOfgallons = 5;\n\n double gallonstolitter = numberOfgallons*3.785;\n\n\n String result = numberOfgallons + \" gallons equal to: \"+gallonstolitter+ \" liters\";\n System.out.println(result);\n\n //=============================================\n /* 2. write a java program that converts litters to gallons\n 1 gallon = 3.785 liters\n 1 litter = 1/3.785\n*/\n\n /*double litter1 = 1/3.785;\n double l =10;\n double gallon1 = l*litter1;\n\n System.out.println(gallon1);\n //======================================================\n*/\n /*\n 3. manually calculate the following code fragements:\n\t\t\t\t1. int a = 200;\n\t\t\t\t\tint b = -a++ + - --a * a-- % 2\n\t\t\t\t\tb = ?\n\n */\n\n\n double numberOfLiters = 100;\n\n double LiterstoGallons = numberOfLiters/3.785;\n\n String result2 = numberOfLiters+\" liters equal to \"+LiterstoGallons+\" galons\";\n\n System.out.println(result2);\n\n\n\n\n\n\n\n\n\n\n\n\n\n int a = 200;\n int b = -a++ + - --a * a-- % 2;\n // b = -200 + - 200* 200%2 = -200;\n\n int x = 300;\n int y = 400;\n int z = x+y-x*y+x/y;\n // z= 300+400-300*400+300/400=700-120000+0(cunki int kimi qebul edir)= -119300;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n }",
"public abstract long mo9750o();",
"public static String produceAnswer(String input) {\n // TODO: Implement this function to produce the solution to the input\n \n // Parsing one line of input\n int space = input.indexOf(\" \"); // find the index of the first space\n String operandOne = input.substring(0, space); // substring of beginning to space before operator\n \n String newString1 = input.substring(space + 1, input.length());\n int space2 = newString1.indexOf(\" \"); // find the index of the second space\n String operator = newString1.substring(0, space2); // operator is between the first space and the second space\n \n String newString2 = newString1.substring(space2, newString1.length());\n String operandTwo = newString2.substring(space2, newString2.length()); // substring of space after operator to the end\n \n \n // Multiple operations\n while (operandTwo.indexOf(\" \") > 0) {\n int space3 = operandTwo.indexOf(\" \");\n String value = operandTwo.substring(0, space3);\n String new_String3 = operandTwo.substring(space3 + 1, operandTwo.length());\n int space4 = new_String3.indexOf(\" \");\n String operator2 = new_String3.substring(space4 - 1, space4);\n operandTwo = new_String3.substring(space4 + 1, new_String3.length());\n String new_equation = operandOne + \" \" + operator + \" \" + value;\n operandOne = produceAnswer(new_equation);\n operator = operator2;\n }\n \n // Parsing fractions: Operand 1\n String whole1 = operandOne; // hi_\n String num1 = \"\";\n String denom1 = \"\";\n int slash1 = operandOne.indexOf(\"/\");\n \n if (slash1 > 0) {\n int underscore1 = operandOne.indexOf(\"_\");\n if (underscore1 > 0) {\n whole1 = operandOne.substring(0, underscore1);\n num1 = operandOne.substring(underscore1 + 1, slash1);\n denom1 = operandOne.substring(slash1 + 1, operandOne.length());\n } else {\n whole1 = \"0\";\n num1 = operandOne.substring(underscore1 + 1, slash1);\n denom1 = operandOne.substring(slash1 + 1, operandOne.length());\n }\n \n } else {\n num1 = \"0\";\n denom1 = \"1\";\n }\n \n // Parsing fractions: Operand 2\n String whole2 = operandTwo;\n String num2 = \"\";\n String denom2 = \"\";\n int slash2 = operandTwo.indexOf(\"/\");\n \n if (slash2 > 0) {\n int underscore2 = operandTwo.indexOf(\"_\");\n if (underscore2 > 0) {\n whole2 = operandTwo.substring(0, underscore2);\n num2 = operandTwo.substring(underscore2 + 1, slash2);\n denom2 = operandTwo.substring(slash2 + 1, operandTwo.length());\n } else {\n whole2 = \"0\";\n num2 = operandTwo.substring(underscore2 + 1, slash2);\n denom2 = operandTwo.substring(slash2 + 1, operandTwo.length());\n }\n \n } else {\n num2 = \"0\";\n denom2 = \"1\";\n }\n \n \n // change strings to integers\n int intwhole1 = Integer.parseInt(whole1);\n int intnum1 = Integer.parseInt(num1);\n int intdenom1 = Integer.parseInt(denom1);\n \n int intwhole2 = Integer.parseInt(whole2);\n int intnum2 = Integer.parseInt(num2);\n int intdenom2 = Integer.parseInt(denom2);\n \n // convert to improper fraction\n intnum1 += intdenom1 * Math.abs(intwhole1);\n if (intwhole1 < 0) {\n intnum1 *= -1;\n }\n \n intnum2 += intdenom2 * Math.abs(intwhole2);\n if (intwhole2 < 0) {\n intnum2 *= -1;\n }\n \n int finalnum = 0;\n int finaldenom = 0;\n int finalwhole = 0;\n \n // if denominator equals 0, quit\n if (intdenom1 == 0 || intdenom2 == 0) {\n return \"Invalid\";\n }\n \n // if operator is incorrect, quit\n if (operator.length() > 1) {\n return \"Invalid\";\n }\n \n // addition calculation\n // multiply whole values to fraction to get a common denominator\n if (operator.equals(\"+\")) {\n intnum1 *= intdenom2;\n intnum2 *= intdenom1;\n finalnum = intnum1 + intnum2;\n finaldenom = intdenom1 * intdenom2;\n }\n \n // subtraction calculation\n if (operator.equals(\"-\")) {\n intnum1 *= intdenom2;\n intnum2 *= intdenom1;\n finalnum = intnum1 - intnum2;\n finaldenom = intdenom1 * intdenom2;\n }\n \n // multiplication calculation\n if (operator.equals(\"*\")) {\n finalnum = intnum1 * intnum2;\n finaldenom = intdenom1 * intdenom2;\n if (intnum1 == 0 || intnum2 == 0) {\n return 0 + \"\";\n }\n }\n \n // division calculation\n if (operator.equals(\"/\")) {\n finalnum = intnum1 * intdenom2;\n finaldenom = intdenom1 * intnum2;\n }\n \n // make numerator negative instead of the denominator\n if (finaldenom < 0 && finalnum > 0) {\n finaldenom *= -1;\n finalnum *= -1;\n }\n \n // convert to mixed fraction if numerator is positive\n while (finalnum / finaldenom >= 1) {\n finalnum -= finaldenom;\n finalwhole += 1;\n }\n \n // convert to mixed fraction if numerator is negative\n while (finalnum / finaldenom <= -1) {\n finalnum += finaldenom;\n finalwhole -= 1;\n }\n \n // remove signs from numerator and denominator if there is a whole number\n if (finalwhole != 0) {\n finalnum = Math.abs(finalnum);\n finaldenom = Math.abs(finaldenom);\n }\n \n // reduce fraction\n int gcd = 1;\n for (int i = 1; i <= Math.abs(finalnum) && i <= Math.abs(finaldenom); i++) {\n if (finalnum % i == 0 && finaldenom % i == 0)\n gcd = i;\n }\n finalnum /= gcd;\n finaldenom /= gcd;\n \n // final output\n if (finalwhole == 0) {\n if (finalnum == 0) {\n return \"0\";\n } else {\n return finalnum + \"/\" + finaldenom;\n }\n } else if (finalnum == 0 || finaldenom == 1) {\n return finalwhole + \"\";\n } else {\n return finalwhole + \"_\" + finalnum + \"/\" + finaldenom;\n }\n }",
"public static void main(String[] args) {\n\r\n\t\tint n,i,j;\r\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tn=sc.nextInt();\r\n\t\t//System.out.println(\"n is: \"+n);\r\n\t\tBigInteger [] arr=new BigInteger[n];\r\n\t\tBeast be=new Beast();\r\n\t\tfor( i=0;i<n;i++)\r\n\t\t{arr[i]=BigInteger.valueOf(0);\r\n\t\t\tint h=sc.nextInt();\r\n\t\t\tif(h<3)\r\n\t\t\t{\r\n\t\t\t\tarr[i]=new BigInteger(\"-1\");\r\n\t\t\t}\r\n\t\t\telse if((h%3)==0)\r\n\t\t\t{\r\n\t\t\t\tfor(j=0;j<h;j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tlong x=5*(be.power(10,j));\r\n\t\t\t\t\tarr[i]=arr[i].add(BigInteger.valueOf(x));\r\n\t\t\t\t//\tSystem.out.println(arr[i]);\r\n\t\t\t\t}\r\n\t\t\t\t//System.out.println(arr[i]);\r\n\t\t\t}\r\n\t\t\telse if((h%5)==0)\r\n\t\t\t{\r\n\t\t\t\tfor(j=0;j<h;j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tlong x=3*(be.power(10,j));\r\n\t\t\t\t\tarr[i]=arr[i].add(BigInteger.valueOf(x));\r\n\t\t\t\t//\tSystem.out.println(arr[i]);\r\n\t\t\t\t}\r\n\t\t\t\t//System.out.println(arr[i]);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tint o=3;\r\n\t\t\t\twhile(o<h)\r\n\t\t\t\t{\r\n\t\t\t\t\tif((h-o)%5==0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//System.out.println(\"O is:\"+o+\"\\nH is:\"+h);\r\n\t\t\t\t\t\tfor(j=h;j>h-o;j--)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tlong x=5*(be.power(10,j-1));\r\n\t\t\t\t\t\t\tarr[i]=arr[i].add(BigInteger.valueOf(x));\r\n\t\t\t\t\t\t//\tSystem.out.println(\"array is:\"+arr[i]);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfor(j=h-o-1;j>=0;j--)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tlong x=3*(be.power(10,j));\r\n\t\t\t\t\t\t\tarr[i]=arr[i].add(BigInteger.valueOf(x));\r\n\t\t\t\t\t\t//\tSystem.out.println(\"array is:\"+arr[i]);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\to=h;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\to=o+3;}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(i=0;i<n;i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(arr[i]);\r\n\t\t}\r\n\t\t\r\n\t}",
"private int calcula(int op,int a, int b){\n \n switch (op) {\n case 0: \n return a+b;\n case 1: \n return a-b;\n case 2: \n return a*b;\n case 3: \n return a/b;\n default: \n return 0;\n }\n \n }",
"java.math.BigInteger getNcbieaa();",
"public abstract double mo9740e();",
"public String O0000Ooo() {\r\n String O000000o = O000000o(this.O00000oO, this.O00000o - this.O00000oO);\r\n this.O00000oO = this.O00000o;\r\n return O000000o;\r\n }",
"BigDecimal Spigot()\n\t{\n\t\t\n\t\tint increment \t= 20000;\n\t\tint max \t\t= 1000000;\n\t\t\n\t\tBigDecimal totResult = new BigDecimal(0.0);\n\t\t\n\t\tsumPart++;\n\t\t\n\t\tBigDecimal result1 = new BigDecimal(0.0);\n\t\t\n\t\tBigDecimal sixTeenPowStartVal = new BigDecimal(1.0);\n\t\tBigDecimal sixTeenPowIncrement = new BigDecimal(16).pow(increment);\n\t\t\n\t\tlong startTime = System.currentTimeMillis();\n\t\t\n\t\tfor(int i=0; i<max; i+=increment)\n\t\t{\n\t\t\tresult1 = result1.add( Spigot_Level_3(i, increment/5, 5, max, sixTeenPowStartVal) );\n\t\t\t\n\t\t\tlong timeTaken = System.currentTimeMillis() - startTime;\n\t\t\t\n\t\t\tSystem.out.println(\"Iteration : \"+(i+increment)+\" time : \"+timeTaken);\n\t\t\t\n\t\t\tsixTeenPowStartVal = sixTeenPowStartVal.multiply( sixTeenPowIncrement );\n\t\t}\n\t\tresult1 = result1.multiply( new BigDecimal(4) );\n\t\t\n\t\t\n\t\t\n\t\tsumPart++;\n\t\t\n\t\tBigDecimal result2 = new BigDecimal(0.0);\n\t\t\n\t\tsixTeenPowStartVal = new BigDecimal(1.0);\n\t\tsixTeenPowIncrement = new BigDecimal(16).pow(increment);\n\t\t\n\t\tfor(int i=0; i<max; i+=increment)\n\t\t{\n\t\t\tresult2 = result2.add( Spigot_Level_3(i, increment/5, 5, max, sixTeenPowStartVal) );\n\t\t\t\n\t\t\tlong timeTaken = System.currentTimeMillis() - startTime;\n\t\t\t\n\t\t\tSystem.out.println(\"Iteration : \"+(i+increment)+\" time : \"+timeTaken);\n\t\t\t\n\t\t\tsixTeenPowStartVal = sixTeenPowStartVal.multiply( sixTeenPowIncrement );\n\t\t}\t\t\n\t\t\n\t\tresult2 = result2.multiply( new BigDecimal(2) );\n\t\t\n\t\t\n\t\t\n\t\tsumPart++;\n\t\t\n\t\tBigDecimal result3 = new BigDecimal(0.0);\n\t\t\n\t\tsixTeenPowStartVal = new BigDecimal(1.0);\n\t\tsixTeenPowIncrement = new BigDecimal(16).pow(increment);\n\t\t\n\t\tfor(int i=0; i<max; i+=increment)\n\t\t{\n\t\t\tresult3 = result3.add( Spigot_Level_3(i, increment/5, 5, max, sixTeenPowStartVal) );\n\t\t\t\n\t\t\tlong timeTaken = System.currentTimeMillis() - startTime;\n\t\t\t\n\t\t\tSystem.out.println(\"Iteration : \"+(i+increment)+\" time : \"+timeTaken);\n\t\t\t\n\t\t\tsixTeenPowStartVal = sixTeenPowStartVal.multiply( sixTeenPowIncrement );\n\t\t}\t\t\n\t\t\n\t\t\n\t\t\n\t\tsumPart++;\n\t\t\n\t\tBigDecimal result4 = new BigDecimal(0.0);\n\t\t\n\t\tsixTeenPowStartVal = new BigDecimal(1.0);\n\t\tsixTeenPowIncrement = new BigDecimal(16).pow(increment);\n\t\t\n\t\tfor(int i=0; i<max; i+=increment)\n\t\t{\n\t\t\tresult4 = result4.add( Spigot_Level_3(i, increment/5, 5, max, sixTeenPowStartVal) );\n\t\t\t\n\t\t\tlong timeTaken = System.currentTimeMillis() - startTime;\n\t\t\t\n\t\t\tSystem.out.println(\"Iteration : \"+(i+increment)+\" time : \"+timeTaken);\n\t\t\t\n\t\t\tsixTeenPowStartVal = sixTeenPowStartVal.multiply( sixTeenPowIncrement );\n\t\t}\t\t\n\t\t\n\t\ttotResult = result1.subtract( result2.add( result3 ).add( result4 ) );\n\t\t\n\t\treturn totResult;\n\t}",
"java.math.BigInteger getNcbistdaa();",
"public abstract String getExponent();",
"private static String takanoFormula(int npidigits) throws Exception {\n int nterms49 = arctanNterms(npidigits, 1, 49);\n int nterms57 = arctanNterms(npidigits, 1, 57);\n int nterms239 = arctanNterms(npidigits, 1, 239);\n int nterms110443 = arctanNterms(npidigits, 1, 110443);\n\n int[] nterms = { nterms49, nterms57, nterms239, nterms110443 };\n int[] multiplicators = { 4*12, 4*32, 4*-5, 4*12 };\n int[] parts = { 49, 57, 239, 110443 };\n\n // run in parallel\n ExecutorService executor = Executors.newCachedThreadPool();\n List<Future<Q10>> results = new ArrayList<>();\n\n for (int i = 0; i < 4; i++) {\n int index = i;\n Future<Q10> f = executor.submit(() -> {\n Q10 term = Q10.multiply(\n Q10.of(multiplicators[index]),\n arctan(Q10.of(1, parts[index]), nterms[index]));\n\n return term;\n });\n\n results.add(f);\n }\n\n Q10 pi = Q10.of(0);\n for (int i = 0; i < 4; i++) {\n pi = Q10.add(pi, results.get(i).get());\n }\n\n executor.shutdown();\n return pi.toDecimalString(npidigits);\n }",
"public void cal_AdjustedFuelMoist(){\r\n\tADFM=0.9*FFM+0.5+9.5*Math.exp(-BUO/50);\r\n}",
"public int getComplexity() { return 4 + getSettingValue(\"radius\") * 2 + getSettingValue(\"duration\") / 5; }",
"float mo56157b();",
"public Polynom inputPow(Polynom polynom, CanonicForms g) {F newF;\n if ( (polynom.coeffs[0].numbElementType() < Ring.Polynom) && (polynom.coeffs[0].Im(g.newRing).isZero(g.newRing)) ) {// т.е. у него числовой коэффициент\n for (int p = polynom.powers.length - 1; p > g.RING.varNames.length - 1; p--) {\n if (polynom.powers[p] != 0) {\n if (polynom.powers[p] == 1) {Element simb=g.List_of_Change.get(p - g.RING.varNames.length);\n if (simb instanceof F ) {\n F func = (F) simb;\n if (func.name == F.LN || func.name == F.LG) {\n newF= new F(func.name, func.X[0].pow(polynom.coeffs[0].abs(g.newRing), g.newRing));\n } else if (func.name == F.LOG) {\n newF= new F(func.name, func.X[0], func.X[1].pow(polynom.coeffs[0].abs(g.newRing), g.newRing));\n } else continue;\n Polynom newPol=(Polynom)g.addNewElement(newF, 1);\n newPol.coeffs[0]= (polynom.coeffs[0].isNegative())? NumberZ.MINUS_ONE: NumberZ.ONE;\n for (int i = 0; i < polynom.powers.length; i++) newPol.powers[i]+=polynom.powers[i]; \n newPol.powers[p]=0;\n return newPol;\n }} \n }\n }\n }\n return polynom;\n }",
"static BigInteger evaluate(String input) throws IllegalArgumentException{\n input = input.replace(\" \", \"\");\n\n //2. parsing.\n Matcher m = EXPRESSION_PATTERN.matcher(input);\n if(!m.matches()){//find는 일치하는 게 포함되면 T, matches()는 입력 전체가 일치해야 T.\n new IllegalArgumentException();\n }\n\n //3. extract unary, binary operators.\n bin_oper = m.group(3);\n una_oper1 = m.group(1).equals(\"\") ? \"+\" : m.group(1); //unary default = \"+\"\n una_oper2 = m.group(4).equals(\"\") ? \"+\" : m.group(4);\n\n //4. make operands instances.\n BigInteger num1 = new BigInteger(m.group(2));\n BigInteger num2 = new BigInteger(m.group(5));\n\n //5. binary oper == *, go to mul.\n if (bin_oper.equals(\"*\")) return num1.multiply(num2);\n\n //6. add/sub operator handle\n // By comparing binary and unary2, convert unary2 to \"+\", in order to simplify later calculation.\n if (una_oper2.equals(\"-\")){\n una_oper2 = \"+\";\n bin_oper = bin_oper.equals(\"+\") ? \"-\" : \"+\";\n }\n\n // if right input is not guaranteed, should do exception handling.\n return (una_oper1.equals(bin_oper)) ? num1.add(num2) : num1.subtract(num2);\n }",
"public double operation( String a, String b, String o){\n switch (o){\n case \"+\": return Double.valueOf(a) + Double.valueOf(b);\n case \"-\": return Double.valueOf(a) - Double.valueOf(b);\n case \"x\": return Double.valueOf(a) * Double.valueOf(b);\n case \"÷\":try{\n return Double.valueOf(a) / Double.valueOf(b);\n }catch (Exception e){\n Log.e(\"calc\",e.getMessage());\n }\n\n default: return -1;\n }\n }",
"private static void equationsTest() {\n }",
"public static void main(String[] args) {\n\t\tMake_Big_Number2 mbn = new Make_Big_Number2();\r\n\t\t\r\n\t\tString n1 = \"1924\";\r\n\t\tint k1 = 2;\r\n\t\t\r\n\t String rtn1 = mbn.solution( n1 , k1);\r\n\t System.out.println( \"[1] > \" + rtn1 );\r\n\t \r\n\t\tString n2 = \"1231234\";\r\n\t\tint k2 = 3;\r\n\t\t\r\n\t String rtn2 = mbn.solution( n2 , k2);\r\n\t System.out.println( \"[2] > \" + rtn2 ); \r\n\t \r\n\t\tString n3 = \"4177252841\";\r\n\t\tint k3 = 4;\r\n\t\t\r\n\t String rtn3 = mbn.solution( n3 , k3);\r\n\t System.out.println( \"[3] > \" + rtn3 ); \r\n\t \r\n\t}",
"public String get_exponent_part();",
"public abstract int mo9749n();",
"@Test\n\tvoid testBasicCalculatorII() {\n\t\tassertEquals(7, new BasicCalculatorII().calculate(\"3+2*2\"));\n\t\tassertEquals(1, new BasicCalculatorII().calculate(\" 3/2 \"));\n\t\tassertEquals(5, new BasicCalculatorII().calculate(\" 3+5 / 2 \"));\n\t}",
"bdm mo1784a(akh akh);",
"private String evaluateExpr(String expr){\n\t\t//bigdecimal used for long user inputs\n\t\tBigDecimal num1, num2, ans, temp = new BigDecimal(\"0\");\n\t\tint check = 1;\n\t\t//find the position of function\n\t\twhile(Character.isDigit(expr.charAt(check)) || expr.charAt(check) == '.')\n\t\t\tcheck++;\n\t\t//extract numbers from expression\n\t\tnum1 = new BigDecimal(expr.substring(0,check));\n\t\tnum2 = new BigDecimal(expr.substring(check + 1,expr.length()));\n\t\t//division by zero error\n\t\tif(num2.compareTo(temp) == 0 && expr.charAt(check) == '/')\n\t\t\treturn \"Invalid\";\n\t\t//evaluate functions\n\t\tif(expr.charAt(check) == '*')\n\t\t\tans = num1.multiply(num2);\n\t\telse if(expr.charAt(check) == '+')\n\t\t\tans = num1.add(num2);\n\t\telse if(expr.charAt(check) == '/')\n\t\t\tans = num1.divide(num2, MathContext.DECIMAL32);\n\t\telse\n\t\t\tans = num1.subtract(num2);\n\t\treturn ans.toString();\n\t}",
"public static void solveQuadraticEquation() {\n }",
"public static String calculateStringEquation(String equation){\r\n //\"(17*(8-7/7))^2+7-3*-6*s90\"\r\n //Validity Check\r\n String numberSymbols = \"-.0123456789\";\r\n String operators = \"*/+^√sdfzcv\";\r\n \r\n //Replace alternate symbols\r\n equation = equation.replace(\",\", \".\");\r\n equation = equation.replace(\"x\", \"*\");\r\n equation = equation.replace(\"%\", \"/100\");\r\n equation = equation.replace(\"\\\\\", \"/\");\r\n \r\n //Insert + in front of -\r\n int c = 1;\r\n String newEquation = \"\" + equation.charAt(0);//Doesnt need to add + to begin\r\n while (c < equation.length()) {\r\n if (equation.charAt(c) == '-' && !operators.contains(\"\"+equation.charAt(c-1))) {\r\n newEquation += \"+\";\r\n }\r\n newEquation += equation.charAt(c);\r\n c++;\r\n }\r\n equation = newEquation;\r\n \r\n\r\n\r\n\r\n //Convert everything to double (eg 2 -> 2.0)\r\n c = 0;\r\n newEquation = \"\";\r\n boolean inNum = false;\r\n while (c < equation.length()) {\r\n if (numberSymbols.indexOf(equation.charAt(c)) != -1) {\r\n if (!inNum) {//Doesnt re read when going over more difficult numbers eg 2342\r\n newEquation += findNextNumber(equation, c-1);//opIndex is the index before next\r\n inNum = true;\r\n }\r\n }else{\r\n inNum = false;\r\n newEquation += equation.charAt(c);\r\n }\r\n c++;\r\n }\r\n equation = newEquation;\r\n //Brackets\r\n while(equation.contains(\"(\") || equation.contains(\")\")) {\r\n int openIndex = equation.indexOf(\"(\");\r\n int openBrackets = 1;\r\n int closedBrackets = 0;\r\n int closeIndex = openIndex + 1;\r\n\r\n while (openBrackets != closedBrackets) {\r\n if (equation.charAt(closeIndex) == '(') {\r\n openBrackets++;\r\n }\r\n if (equation.charAt(closeIndex) == ')') {\r\n closedBrackets++;\r\n }\r\n closeIndex++;\r\n }\r\n\r\n //Rewrite equation and sub in new value\r\n newEquation = \"\";//Reused\r\n if (openIndex != 0) {\r\n newEquation += equation.substring(0, openIndex);\r\n }\r\n newEquation += calculateStringEquation(equation.substring(openIndex+1, closeIndex-1));\r\n if (closeIndex != equation.length()-1) {\r\n newEquation += equation.substring(closeIndex);\r\n }\r\n equation = newEquation;\r\n }\r\n \r\n //Check order\r\n boolean test = checkStringFormula(equation);\r\n if (checkStringFormula(equation)) {\r\n //Trig (Typically in brackets)\r\n while (equation.contains(\"s\")) {\r\n double num1 = findNextNumber(equation,equation.indexOf(\"s\"));\r\n equation = equation.replace(\"s\" + num1, \"\" + (Math.sin(Math.toRadians(num1))));\r\n }\r\n while (equation.contains(\"d\")) {\r\n double num1 = findNextNumber(equation,equation.indexOf(\"d\"));\r\n equation = equation.replace(\"d\" + num1, \"\" + (Math.cos(Math.toRadians(num1))));\r\n }\r\n while (equation.contains(\"f\")) {\r\n double num1 = findNextNumber(equation,equation.indexOf(\"f\"));\r\n equation = equation.replace(\"f\" + num1, \"\" + (Math.tan(Math.toRadians(num1))));\r\n }\r\n while (equation.contains(\"z\")) {\r\n double num1 = findNextNumber(equation,equation.indexOf(\"z\"));\r\n equation = equation.replace(\"z\" + num1, \"\" + Math.toDegrees(Math.asin(num1)));\r\n }\r\n while (equation.contains(\"c\")) {\r\n double num1 = findNextNumber(equation,equation.indexOf(\"c\"));\r\n equation = equation.replace(\"c\" + num1, \"\" + Math.toDegrees(Math.acos(num1)));\r\n }\r\n while (equation.contains(\"v\")) {\r\n double num1 = findNextNumber(equation,equation.indexOf(\"v\"));\r\n equation = equation.replace(\"v\" + num1, \"\" + Math.toDegrees(Math.atan(num1)));\r\n }\r\n //Exponents\r\n while (equation.contains(\"^\")) {\r\n int opIndex = equation.indexOf(\"^\");\r\n double num1,num2;\r\n num1 = findPreviousNumber(equation,opIndex);//Previous number is answer before ^\r\n num2 = findNextNumber(equation,opIndex);\r\n double ans = num1;//Need num1 for replace\r\n\r\n if (num2 == 0) {\r\n ans = 1;\r\n }else{\r\n for (int i = 0; i < num2-1; i++) {\r\n ans*=ans;\r\n }\r\n if (num2 < 0) {\r\n ans = 1/ans;\r\n }\r\n }\r\n String oldNum = \"\" + num1 + equation.charAt(opIndex) + num2;\r\n String newNum = \"\"+ans;\r\n equation = equation.replace(oldNum, newNum);\r\n }\r\n //Roots\r\n while (equation.contains(\"√\")) {\r\n int opIndex = equation.indexOf(\"√\");\r\n double num1,num2;\r\n num1 = findPreviousNumber(equation,opIndex);//Previous number is answer before ^\r\n num2 = findNextNumber(equation,opIndex);\r\n double ans = num1;//Need num1 for replace\r\n\r\n if (num2 == 0) {\r\n throw new ArithmeticException(\"Math error\");\r\n }else{\r\n ans = Math.pow(num2, 1/num1);\r\n }\r\n String oldNum = \"\" + num1 + equation.charAt(opIndex) + num2;\r\n String newNum = \"\"+ans;\r\n equation = equation.replace(oldNum, newNum);\r\n }\r\n //Division\r\n while (equation.contains(\"/\")) {\r\n int opIndex = equation.indexOf(\"/\");\r\n double num1,num2;\r\n num1 = findPreviousNumber(equation,opIndex);//Previous number is answer before ^\r\n num2 = findNextNumber(equation,opIndex);\r\n double ans = num1;//Need num1 for replace\r\n\r\n if (num2 == 0) {\r\n throw new java.lang.ArithmeticException();\r\n }else{\r\n ans = num1/num2;\r\n }\r\n String oldNum = \"\" + num1 + equation.charAt(opIndex) + num2;\r\n String newNum = \"\"+ans;\r\n equation = equation.replace(oldNum, newNum);\r\n }\r\n //Multiplication\r\n while (equation.contains(\"*\")) {\r\n int opIndex = equation.indexOf(\"*\");\r\n double num1,num2;\r\n num1 = findPreviousNumber(equation,opIndex);//Previous number is answer before ^\r\n num2 = findNextNumber(equation,opIndex);\r\n double ans;//Need num1 for replace\r\n\r\n ans = num1*num2;\r\n String oldNum = \"\" + num1 + equation.charAt(opIndex) + num2;\r\n String newNum = \"\"+ans;\r\n equation = equation.replace(oldNum, newNum);\r\n }\r\n //Addition\r\n while (equation.contains(\"+\")) {\r\n int opIndex = equation.indexOf(\"+\");\r\n double num1,num2;\r\n num1 = findPreviousNumber(equation,opIndex);//Previous number is answer before ^\r\n num2 = findNextNumber(equation,opIndex);\r\n double ans;//Need num1 for replace\r\n\r\n ans = num1+num2;\r\n String oldNum = \"\" + num1 + equation.charAt(opIndex) + num2;\r\n String newNum = \"\"+ans;\r\n equation = equation.replace(oldNum, newNum);\r\n }\r\n\r\n return equation;\r\n }else{\r\n throw new AssertionError(\"Incorrect Format\");\r\n }\r\n }",
"int mo23521Ly();",
"static void mostrarInstrucciones(){\r\n\t\tSystem.out.println(\"Introduzca la base y el exponente para calcular el resultado.\");\r\n\t}",
"static void labExperiments() {\n\t\tFib efib = new ExponentialFib();\n\t\tSystem.out.println(efib);\n\t\tfor (int i = 0; i < 11; i++)\n\t\t\tSystem.out.println(i + \" \" + efib.fib(i));\n\n\t\t// Determine running time for n1 = 20 and print it out.\n\t\tint n1 = 20;\n\t\tdouble time1 = averageTime(efib, n1, 1000);\n\t\tSystem.out.println(\"n1 \" + n1 + \" time1 \" + time1);\n\t\tint ncalls = (int) (1e6 / time1);\n\t\ttime1 = averageTime(efib, n1, ncalls);\n\t\tSystem.out.println(\"The time1 was: \" + time1 + \" with \" + ncalls + \" calls\");\n\t\ttime1 = accurateTime(efib, n1);\n\t\tSystem.out.println(\"The time1 was: \" + time1 + \" with \" + ncalls + \" calls\");\n\n\t\t// Calculate constant: time = constant times O(n).\n\t\tdouble c = time1 / efib.o(n1);\n\t\tSystem.out.println(\"c: \" + c);\n\n\t\t// Estimate running time for n2=30.\n\t\tint n2 = 30;\n\t\tdouble time2est = c * efib.o(n2);\n\t\tSystem.out.println(\"n2 \" + n2 + \" estimated time: \" + time2est);\n\n\t\t// Calculate actual running time for n2=30.\n\t\tdouble time2 = averageTime(efib, n2, 100);\n\n\t\tncalls = (int) (1e6 / time2);\n\t\ttime2 = averageTime(efib, n2, ncalls);\n\t\tSystem.out.println(\"The time2 was: \" + time2 + \" with \" + ncalls + \" calls\");\n\t\ttime2 = accurateTime(efib, n2);\n\t\tSystem.out.println(\"The time2 was: \" + time2 + \" with \" + ncalls + \" calls\");\n\n\t\tint n3 = 100;\n\t\tdouble time3est = c * efib.o(n3);\n\t\tSystem.out.println(\"n3 \" + n3 + \" estimated time: \" + time3est);\n\t\tdouble years = time3est / 1e6 / 3600 / 24 / 365.25;\n\t\tSystem.out.println(\"Years: \" + years);\n\t}",
"private int getResult() {\n ArrayList<Character> operanzi = new ArrayList<Character>();\n ArrayList<Character> operatori = new ArrayList<Character>();\n for(int i = 1; i <= n; i++){\n // System.out.println(i);\n if ((expr[i] == 'T' ) || (expr[i] == 'F'))\n operanzi.add(expr[i]);\n else \n operatori.add(expr[i]);\n }\n System.out.println(operanzi.get(0));\n int n1 = operanzi.size();\n System.out.println(n1);\n long [][] T = new long[n1][n1];\n long [][] F = new long[n1][n1];\n\n for (int i = 0; i < operanzi.size(); i++) {\n \n if (operanzi.get(i) == 'T') {\n T[i][i] = 1;\n F[i][i] = 0;\n } else if (operanzi.get(i) == 'F') {\n T[i][i] = 0;\n F[i][i] = 1;\n }\n }\n long aux=0;\n for (int l=1; l<n1; ++l) \n { \n for (int i=0, j=l; j<n1; ++i, ++j) \n { \n T[i][j] = F[i][j] = 0; \n for (int g=0; g<l; g++) \n { \n int k = i + g; \n long total_i_k = evaluate(T[i][k],F[i][k],'+'); \n long total_k_j = evaluate(T[k+1][j] , F[k+1][j],'+'); \n long total = evaluate(total_i_k,total_k_j,'*');\n if (operatori.get(k) == '&') \n { \n aux = evaluate(T[i][k],T[k+1][j],'*');\n T[i][j] = evaluate(T[i][j],aux,'+'); \n \n\n F[i][j] = evaluate( F[i][j],evaluate(total,aux,'-'),'+'); \n } \n if (operatori.get(k) == '|') \n { \n aux = evaluate(F[i][k],F[k+1][j],'*');\n F[i][j] = evaluate(F[i][j],aux,'+'); \n \n T[i][j] =evaluate( T[i][j],evaluate(total, aux,'-'),'+'); \n } \n if (operatori.get(k) == '^') \n { \n aux = evaluate(F[i][k],T[k+1][j],'*');\n long aux1= evaluate(T[i][k],F[k+1][j],'*');\n T[i][j] = evaluate( T[i][j],evaluate( aux , aux1,'+'),'+'); \n aux = evaluate(T[i][k],T[k+1][j],'*');\n aux1 = evaluate(F[i][k],F[k+1][j],'*');\n F[i][j] = evaluate( F[i][j],evaluate(aux,aux1,'+'),'+');\n } \n } \n } \n } \n return (int)T[0][n1-1]; \n }",
"String mo20730b();",
"public String getModifiedNumber(BigDecimal bd) {\r\n String str = \"\";\r\n String temp = \"\";\r\n str = bd.toString();\r\n double num = Double.parseDouble(str);\r\n double doubleVal;\r\n\r\n NumberFormat nFormat = NumberFormat.getInstance(Locale.US);\r\n nFormat.setMaximumFractionDigits(1);\r\n nFormat.setMinimumFractionDigits(1);\r\n\r\n /*\r\n * if ((num / getPowerOfTen(12)) > 0.99) // check for Trillion {\r\n * doubleVal = (num / getPowerOfTen(12)); temp =\r\n * String.valueOf(truncate(doubleVal)) + \"Tn\"; } else if ((num /\r\n * getPowerOfTen(9)) > 0.99) // check for Billion { doubleVal = (num /\r\n * getPowerOfTen(9)); temp = String.valueOf(truncate(doubleVal)) + \"Bn\";\r\n * } else\r\n */\r\n if ((num / getPowerOfTen(6)) > 0.99) // check for Million\r\n {\r\n doubleVal = (num / getPowerOfTen(6));\r\n //temp = String.valueOf(truncate(doubleVal)) + \"M\";\r\n temp= nFormat.format(doubleVal) + \"M\";\r\n } else if ((num / getPowerOfTen(3)) > 0.99) // check for K\r\n {\r\n doubleVal = (num / getPowerOfTen(3));\r\n //temp = String.valueOf(truncate(doubleVal)) + \"K\";\r\n temp =nFormat.format(doubleVal) + \"K\";\r\n } else {\r\n //temp = String.valueOf(num);\r\n temp = nFormat.format(num);\r\n }\r\n return temp;\r\n }",
"public static void main(String[] args) {\r\n Scanner sc = new Scanner(System.in);\r\n double a = sc.nextDouble();\r\n double b = sc.nextDouble();\r\n double p = a/(a+b);\r\n int n = 6;\r\n double bd = 0.0;\r\n for(int i = 3 ; i <= n ;i++)\r\n {\r\n bd = bd + bionomial(n,i,p);\r\n }\r\n System.out.println(Math.round(bd*1000.00)/1000.00);\r\n }",
"public double calculatingCostO(int quantity)\n { \n cost = 750 + (0.25 * quantity);\n return cost;\n \n }",
"public static void main(String[] args) {\n Scanner s=new Scanner(System.in);\n int n = s.nextInt();\n for(int i=1; i<n+1; i++){\n int a = s.nextInt();\n int b = s.nextInt();\n int terms = s.nextInt();\n double c= a;\n for(int j=1; j<terms+1; j++){\n c = c + Math.pow(2,j-1)*b;\n System.out.printf(\"%.0f \", c);\n }\n System.out.printf(\"%n\");\n } \n }",
"include <stdio.h>\nint main(){\n int n1,n2,n3,x;\n scanf(\"%d %d %d\",&n1,&n2,&n3);\n x=big(n1,n2);\n printf(\"%d\",big(x,n3));\n\n \treturn 0;\n}",
"public void toiGianPhanSo(){\n int x = timUSCLN(tuSo,mauSo);\n\n tuSo/=x;\n mauSo/=x;\n }",
"public static String printBinary (String n){\n\t\tint intPart = Integer.parseInt(n.substring(0, n.indexOf(\".\")));\n\t\tdouble decPart = Double.parseDouble(n.substring(n.indexOf(\".\")));\n\t\tString iPart = \"\";\n\t\tint bit;\n\t\twhile(intPart > 0){\n\t\t\tbit = intPart %2; //take mod result as the last digit.\n\t\t\tintPart >>= 1;\n\t\t\tiPart = bit + iPart;\n\t\t}\n\t\t\n\t\tString dPart = \"\";\n\t\tdouble val;\n\t\twhile (decPart > 0) {//any left over value?\n\t\t\tif(dPart.length() > 32) return \"Error\";//too long to represent\n\t\t\tval = decPart * 2;\n\t\t\tif(val >= 1) {\n\t\t\t\tdecPart = val - 1;\n\t\t\t\tdPart += 1;\n\t\t\t} else {\n\t\t\t\tdecPart = val;\n\t\t\t\tdPart += 0;\n\t\t\t}\n\t\t}\n\t\treturn iPart + \".\" + dPart;\n\t}",
"private static String machinFormulaZF(int npidigits) {\n int nterms5 = arctanNterms(npidigits, 1, 5);\n int nterms239 = arctanNterms(npidigits, 1, 239);\n\n // https://en.wikipedia.org/wiki/Machin-like_formula\n ZF10 arctan1$239 = arctanZF(ZF10.frac(1, 239), nterms239, true);\n ZF10 _4arctan1$5 = arctanZF(ZF10.frac(1, 5), nterms5, true).multiply(ZF10.of(4));\n ZF10 delta = _4arctan1$5.subtract(arctan1$239);\n\n ZF10 pi = delta.multiply(ZF10.of(4));\n\n return pi.toString();\n }",
"int mo1756e(int i);",
"E cot(final E n);",
"long mo25074b();",
"public static void main(String[] args){\n Scanner input = new Scanner(System.in);\n int result = 0;\n\n System.out.print(\"Enter three integer number : \");\n String num = input.nextLine();\n\n String [] operand = num.split(\" \");\n int x = Integer.parseInt(operand[0]);\n int y = Integer.parseInt(operand[1]);\n int z = Integer.parseInt(operand[2]);\n\n System.out.print(\"Enter two operand : \");\n String operator = input.nextLine();\n\n String [] op = operator.split(\" \");\n String a = op[0];\n String b = op[1];\n\n int temp = 0;\n\n for(int i = 0; i< op.length; i++){\n if(a.equals(\"X\") || a.equals(\"D\") || a.equals(\"M\") || b.equals(\"X\") || b.equals(\"D\") || b.equals(\"M\")){\n\n if(a.equals(\"X\") || b.equals(\"X\")){\n if(a.equals(\"X\")){\n if(i == 0) temp = x*y;\n else result = temp * x;\n a = \"\";\n }\n else if(b.equals(\"X\")){\n if(i == 0) temp = y*z;\n else result = temp * z;\n b = \"\";\n }\n }\n\n else if(a.equals(\"D\") || b.equals(\"D\")){\n if(a.equals(\"D\")){\n if(i==0) temp = x/y;\n else result = x/temp;\n a = \"\";\n }\n else if(b.equals(\"D\")){\n if(i == 0) temp = y/z;\n else result = temp / z;\n b = \"\";\n }\n }\n\n else if(a.equals(\"M\") || b.equals(\"M\")){\n if(a.equals(\"M\")){\n if(i == 0)temp = x % y;\n else result = x % temp;\n a = \"\";\n }\n\n else if(b.equals(\"M\")) {\n if(i == 0) temp = y % z;\n else result = temp % z;\n b = \"\";\n }\n }\n\n } else{\n if(a.equals(\"A\")){\n if(b.equals(\"A\")) result = x+y+z;\n else if(b.equals(\"S\")) result = x+y-z;\n else result = temp + x;\n }\n\n else if(b.equals(\"A\")){\n if(a.equals(\"A\")) result = x+y+z;\n else if(a.equals(\"S\")) result = x-y+z;\n else result = temp + z;\n }\n }\n }\n System.out.println(x + \" \" + op[0] + \" \" + y + \" \" + op[1] + \" \" + z + \" = \" + result);\n\n }",
"private double solution() {\n final double h = (getTextToDouble(textX1) - getTextToDouble(textX0)) / ( 2*getTextToDouble(textN)) / 3;\n double[][] mass = xInitialization();\n double answer, evenSum = 0, oddSum = 0;\n for (int i = 0; i < 2; i++) {\n for (double element : mass[i]) {\n if (i == 0)\n oddSum += getValue(element);\n else\n evenSum += getValue(element);\n }\n }\n answer = h * (getValue(getTextToDouble(textX0)) + 4 * oddSum + 2 * evenSum + getValue(getTextToDouble(textX1)));\n return answer;\n }",
"static int calculate(int a, int b, String op) {\n switch (op) {\n case \"+\":\n return a + b;\n case \"-\":\n return a - b;\n case \"*\":\n return a * b;\n case \"/\":\n return a / b;\n default:\n break;\n }\n return 0;\n }",
"public final void power (int expo) throws ArithmeticException {\n\t\tdouble error = 0;\n\t\tint i = expo; \n\t\tdouble r = 1;\n\t\tdouble v = 1; \n\t\tlong u = underScore;\n\t\tif ((mksa&(_log|_mag)) != 0) throw new ArithmeticException\n\t\t(\"****Unit: can't power log[unit]: \" + symbol );\n\t\twhile (i > 0) { \n\t\t\tr *= factor; v *= value; \n\t\t\tu += mksa; u -= underScore; \n\t\t\tif ((u&0x8480808080808080L) != 0) error++;\n\t\t\ti--; \n\t\t}\n\t\twhile (i < 0) { \n\t\t\tr /= factor; v /= value; \n\t\t\tu += underScore; u -= mksa;\n\t\t\tif ((u&0x8480808080808080L) != 0) error++;\n\t\t\ti++; \n\t\t}\n\t\tif (error > 0) throw new ArithmeticException\n\t\t(\"****Unit: power too large: (\" + \")^\" + expo) ;\n\t\tfactor = r;\n\t\tvalue = v;\n\t\tmksa = u;\n\t\t/* Decision for the new symbol */\n\t\tif ((expo != 1) && (symbol != null)) {\n\t\t\tif (expo == 0) symbol = \"\";\n\t\t\telse if (symbol.length()>0) {\n\t\t\t\tParsing t = new Parsing(symbol);\n\t\t\t\tint pow;\n\t\t\t\tpow = getPower(t);\n\t\t\t\tif (pow == 0) symbol = toExpr(symbol) + expo;\n\t\t\t\telse {\t\t\t// Combine exponents\n\t\t\t\t\ti=0;\n\t\t\t\t\tpow *= expo;\n\t\t\t\t\tif (t.a[0] == '(') { i = 1; t.advance(-1); }\n\t\t\t\t\tif (expo == 1) symbol = symbol.substring(i,t.pos);\n\t\t\t\t\telse symbol = toExpr(symbol.substring(i,t.pos)) + pow;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public LargeNumber execute(LargeNumber x, LargeNumber y) {\n if (x.size() == 1 && y.size() == 1) {\n return x.times(y);\n }\n // Compute the sign\n Sign sign = Sign.POSITIVE;\n if (x.getSign() != y.getSign()) {\n sign = Sign.NEGATIVE;\n }\n\n // Karatsuba works better if we just set the sign to positive\n x.setSign(Sign.POSITIVE);\n y.setSign(Sign.POSITIVE);\n\n // Make sure the numbers have the same word size.\n while (x.size() > y.size()) {\n y.getDigits().add(0, 0);\n }\n while (x.size() < y.size()) {\n x.getDigits().add(0, 0);\n }\n\n // First we split the input numbers in two, if the length is odd,\n // we add a leading zero and split.\n Pair<LargeNumber, LargeNumber> xsplit = x.split();\n Pair<LargeNumber, LargeNumber> ysplit = y.split();\n\n // Store the numbers\n LargeNumber x1 = xsplit.getFirst();\n LargeNumber x0 = xsplit.getSecond();\n LargeNumber y1 = ysplit.getFirst();\n LargeNumber y0 = ysplit.getSecond();\n\n // Set n to be the original word length\n int n = x1.size() * 2;\n\n // Because of Karatsuba: xy = x1y1*b^n+(x1y0+x0y1)*b^(n/2)+x0y0\n\n // Compute 3 half length multiplications\n LargeNumber z2 = x1.karatsuba(y1); // z2 = xhi * yhi\n LargeNumber z0 = x0.karatsuba(y0); // z0 = xlo * ylo\n LargeNumber z1 = (x1.plus(x0)).karatsuba(y1.plus(y0)).minus(z0).minus(z2); // z1 = (xhi +xlo)(yhi +ylo) - xhiyhi - xloylo\n\n // Compose results by shifitng and additions\n z2.shift(n);\n z1.shift(n / 2);\n LargeNumber result = z2.plus(z0).plus(z1);\n\n result.setSign(sign);\n\n // Uncomment to show karatsuba process\n //System.out.println(x + \" * \" + y + \" = \" + result);\n return result;\n\n }",
"@Test\n public void test19() throws Throwable {\n Complex complex0 = new Complex((-138.659), 0.0);\n Complex complex1 = complex0.exp();\n String string0 = complex0.toString();\n Complex complex2 = complex1.subtract(complex0);\n Complex complex3 = complex0.multiply(complex1);\n Complex complex4 = complex0.cos();\n double double0 = complex4.getImaginary();\n }",
"private int e(amj paramamj)\r\n/* 202: */ {\r\n/* 203:221 */ alq localalq = paramamj.b();\r\n/* 204:222 */ int i = paramamj.b;\r\n/* 205: */ \r\n/* 206:224 */ int j = d(paramamj);\r\n/* 207:225 */ if (j < 0) {\r\n/* 208:226 */ j = j();\r\n/* 209: */ }\r\n/* 210:228 */ if (j < 0) {\r\n/* 211:229 */ return i;\r\n/* 212: */ }\r\n/* 213:231 */ if (this.a[j] == null)\r\n/* 214: */ {\r\n/* 215:232 */ this.a[j] = new amj(localalq, 0, paramamj.i());\r\n/* 216:233 */ if (paramamj.n()) {\r\n/* 217:234 */ this.a[j].d((fn)paramamj.o().b());\r\n/* 218: */ }\r\n/* 219: */ }\r\n/* 220:238 */ int k = i;\r\n/* 221:239 */ if (k > this.a[j].c() - this.a[j].b) {\r\n/* 222:240 */ k = this.a[j].c() - this.a[j].b;\r\n/* 223: */ }\r\n/* 224:242 */ if (k > p_() - this.a[j].b) {\r\n/* 225:243 */ k = p_() - this.a[j].b;\r\n/* 226: */ }\r\n/* 227:246 */ if (k == 0) {\r\n/* 228:247 */ return i;\r\n/* 229: */ }\r\n/* 230:250 */ i -= k;\r\n/* 231:251 */ this.a[j].b += k;\r\n/* 232:252 */ this.a[j].c = 5;\r\n/* 233: */ \r\n/* 234:254 */ return i;\r\n/* 235: */ }",
"@Override\n public String Calculo(String expresion) throws ArithmeticException {\n while(!stack.empty()){\n stack.pop();\n }\n try {\n for(int i = 0; i<expresion.length(); i++){\n //Obtener cada caracter del string.\n char op = expresion.charAt(i);\n //Determinar si es un operador, operando o un termino no valido.\n if(nums.contains(Character.toString(op))){\n stack.push(Character.getNumericValue(op));\n }\n else if(ops.contains(Character.toString(op))){\n postFixEvalution(op);\n }\n else if(op != ' '){\n return \"Error: No se pudo realizar la operacion por invalidez de simbolos\";\n }\n }\n\n //Al finalizar, se debe validar que el stack tenga un solo dato dentro, el cual sera\n //probablemente el resultado de la operacion.\n\n if(stack.empty() || stack.size() > 1){\n return \"Error: Expresion invalida\";\n }\n else{\n return stack.pop().toString();\n }\n }\n catch (ArithmeticException e){\n\n throw new ArithmeticException(e.getMessage());\n }\n\n\n }",
"public void m21278OooO00o(int i, int i2) {\n int i3 = i >>> 5;\n int i4 = i & 31;\n int i5 = 32 - i4;\n int i6 = i - i2;\n int i7 = i6 >>> 5;\n int i8 = 32 - (i6 & 31);\n int i9 = ((i << 1) - 2) >>> 5;\n while (i9 > i3) {\n int[] iArr = this.f22759OooO00o;\n long j = 4294967295L & ((long) iArr[i9]);\n int i10 = i9 - i3;\n int i11 = i10 - 1;\n iArr[i11] = iArr[i11] ^ ((int) (j << i5));\n iArr[i10] = (int) (((long) iArr[i10]) ^ (j >>> (32 - i5)));\n int i12 = i9 - i7;\n int i13 = i12 - 1;\n iArr[i13] = iArr[i13] ^ ((int) (j << i8));\n iArr[i12] = (int) ((j >>> (32 - i8)) ^ ((long) iArr[i12]));\n iArr[i9] = 0;\n i9--;\n i3 = i3;\n }\n int[] iArr2 = this.f22759OooO00o;\n long j2 = (4294967295 << i4) & ((long) iArr2[i3]) & 4294967295L;\n iArr2[0] = (int) (((long) iArr2[0]) ^ (j2 >>> (32 - i5)));\n int i14 = i3 - i7;\n int i15 = i14 - 1;\n if (i15 >= 0) {\n iArr2[i15] = iArr2[i15] ^ ((int) (j2 << i8));\n }\n int[] iArr3 = this.f22759OooO00o;\n iArr3[i14] = (int) ((j2 >>> (32 - i8)) ^ ((long) iArr3[i14]));\n iArr3[i3] = iArr3[i3] & OooO0OO[i4];\n this.f22760OooO0O0 = ((i - 1) >>> 5) + 1;\n this.f22758OooO00o = i;\n }",
"public AncientEgyptianMultiplication( ) {\r\n }",
"public BigInteger m21275OooO00o() {\n return (this.f22758OooO00o == 0 || m21293OooO0OO()) ? new BigInteger(0, new byte[0]) : new BigInteger(1, m21283OooO00o());\n }",
"@Override\r\n public String toString() {\r\n BigDecimal bd = new BigDecimal(real);\r\n bd = bd.round(new MathContext(2));\r\n real = bd.doubleValue();\r\n bd = new BigDecimal(imaginary);\r\n bd = bd.round(new MathContext(2));\r\n imaginary = bd.doubleValue();\r\n if (imaginary == 0) {\r\n return real + \"\";\r\n }\r\n if (real == 0) {\r\n return imaginary + \"i\";\r\n }\r\n if (imaginary < 0) {\r\n return real + \" - \" + (-imaginary) + \"i\";\r\n }\r\n return real + \" + \" + imaginary + \"i\";\r\n }",
"protected abstract long mo1602b(C2175k c2175k);",
"public static String math_level2(String line){\n int current_index = 0;\n line = \"+\"+line; //Every element must have a sign before so I add a plus as a sign of the first element.\n while(current_index<line.length() && (line.contains(\"*\") || line.contains(\"/\"))){\n char current_char = line.charAt(current_index);\n if(current_char == '*' || current_char =='/'){\n String first_string = reverser(line.substring(0,current_index));\n if (first_string !=\"\") first_string = reverser(first_string.substring(0,finder(first_string)));\n else first_string = line.substring(0,current_index);\n \n char before_sign = line.charAt(current_index-first_string.length()-1); // Sign before an element has an effect on the result so I'm storing it.\n \n String second_string = line.substring(current_index+1);\n second_string = line.substring(current_index+1,current_index+finder(second_string.substring(1))+2);\n \n boolean is_double_first = first_string.contains(\".\");\n boolean is_second_double = second_string.contains(\".\");\n boolean isdouble = is_double_first || is_second_double;\n\n if(isdouble){\n double number1 = Double.parseDouble(first_string);\n double number2 = Double.parseDouble(second_string);\n double result;\n if(current_char=='*') result = number1*number2;\n else result = number1/number2;\n // I'm using two ternary operations to decide on the sign of the result. If both before sign is a minus and the result is negative, I'm replacing it with result*-1\n line = line.substring(0, current_index-first_string.length()-1)+ ((result<0)?((before_sign=='-')?(\"+\"+(result*-1)):(result+\"\")):(before_sign+\"\"+result)) + line.substring(current_index+second_string.length()+1);\n }\n\n else{\n int number1 = Integer.parseInt(first_string);\n int number2 = Integer.parseInt(second_string);\n int result;\n if(current_char=='*') result = number1*number2;\n else result = number1/number2;\n // Same operation as I do in line 155\n line = line.substring(0, current_index-first_string.length()-1)+ ((result<0)?((before_sign=='-')?(\"+\"+(result*-1)):(result+\"\")):(before_sign+\"\"+result)) + line.substring(current_index+second_string.length()+1);\n\n }\n current_index= current_index-first_string.length();// I'm using index as a cursor and moving it a little left instead of making it zero because this is much faster\n }\n current_index++;\n if(!(line.contains(\"*\") || line.contains(\"/\"))) break;// Breaks the while loop if there are no multiplication or division left.\n }\n return line;\n}",
"public static String pow(String bytes,int size, int value){\n if(value==1||value==0||size<1||size>bytes.length()||!Cript2010x8b.USEPOWNTHRT) return bytes; \n String out=\"\"; \n int max=bytes.length()/size; \n if(bytes.length()%size!=0) \n max++; \n for(int i=0;i<max;i++){ \n String subStr=\"\"; \n for(int l=0;l<size;l++) \n try{ \n subStr+=bytes.charAt(i*size+(size-l-1)); \n }catch(Exception e){ \n String bug=bytes.substring(i*size); \n bug=addLong(bug,1,value); \n return out+bug; \n } \n BigInteger current=strToBInt(subStr); \n current=current.pow(value); \n int exiter=0;\n while(current.compareTo(BigInteger.valueOf(2).pow(8*size))>0){if(exiter>66) break;current=current.add(BigInteger.valueOf(2).pow(8*size).negate());exiter++;} \n exiter=0;\n while(current.compareTo(BigInteger.ZERO)<0){if(exiter>66) break;current=current.add(BigInteger.valueOf(2).pow(8*size));exiter++;} \n out+=BintToStr(current,size); \n } \n return out; \n }",
"private BigInteger squareKaratsuba() {\n int half = (mag.length+1) / 2;\n\n BigInteger xl = getLower(half);\n BigInteger xh = getUpper(half);\n\n BigInteger xhs = xh.square(); // xhs = xh^2\n BigInteger xls = xl.square(); // xls = xl^2\n\n // xh^2 << 64 + (((xl+xh)^2 - (xh^2 + xl^2)) << 32) + xl^2\n return xhs.shiftLeft(half*32).add(xl.add(xh).square().subtract(xhs.add(xls))).shiftLeft(half*32).add(xls);\n }",
"@Test\n\tpublic void testGiveCode2() {\n\t\n\t\t\tfloat maxLF = (float) 0.5;\n\t\t\tHTableWords h = new HTableWords(maxLF);\n\t\t\tString word = \"z\";\n\t\t\tint hashCode = h.giveCode(word);\n\t\t\tassertTrue(hashCode == 3);\n\t}",
"public String calcWithSyaAlgo(String mathExpr) throws Exception {\r\n\t\tShuntingYardAlgorithm sta = new ShuntingYardAlgorithm();\r\n\t\treturn Double.toString(sta.solveMathExpr(mathExpr));\r\n\t}",
"public abstract Integer mo36212o();",
"public char get_floating_suffix();",
"public BIG getS(){return S;}",
"public abstract float mo70722e(String str);",
"static int comb(int big, int smal) \n\t{ \n\t\treturn (int) ((long) fact[big] * invfact[smal] % mod \n\t\t\t\t* invfact[big - smal] % mod); \n\t}",
"public int generateRoshambo(){\n ;]\n\n }",
"public static String produceAnswer(String input) { \r\n \tString[] array = input.split(\" \");\t//create an array that will store the 3 split string outputs(split on spaces)\t\r\n String firstOperand = array[0];\t\t//create a variable that will store the firstoperand\r\n String operator = array[1];\t\t//create a variable that will store the secondoperand\r\n String secondOperand = array[2];\t//create a variable that will store the thirdoperand\r\n int[] finalAnswer = new int [3];\t//create a new array that stores 3 values and will also serve to store the final answer\r\n \r\n int operand1Whole= findWhole(firstOperand);\t//use findwhole method to find the whole # and store in variable\r\n int operand1Num= findNumerator(firstOperand);\t//use findnumerator method to get the num of first frac\r\n int operand1Denom= findDenominator(firstOperand);\t//use finddenominator method to find denom of first frac\r\n int[] op1Fraction = toImproperFrac(operand1Whole, operand1Num, operand1Denom);\t//make a new int array to store \r\n \r\n int operand2Whole= findWhole(secondOperand);\t//use findwhole method to find the whole # and store in variable for the 2nd fraction\r\n int operand2Num= findNumerator(secondOperand);\t//use findnumerator method to find num of 2nd operand\r\n int operand2Denom= findDenominator(secondOperand);\t//use find denominator method to find the denom of the 2nd operand\r\n int[] op2Fraction = toImproperFrac(operand2Whole, operand2Num, operand2Denom);\t//make a new int array to store the improper frac of operand 2\r\n \r\n String result=\"\";\t//make a string variable that will be used when returning the result\r\n if(operator.equals(\"+\")) {\t//make a conditional that checks if the operator is +\r\n \taddingFrac(op1Fraction, op2Fraction, finalAnswer);\t//if it is use the addingfrac method with op1fraction, op2, and the final answer to get the sum\r\n \tresult = toMixedNum(finalAnswer[1], finalAnswer[2]);\t//convert the sum into a mixed number using the tomixednumber method; set = to result\r\n \t\r\n } else if(operator.equals(\"-\")) {\t//also test if operator is -\r\n \t\tsubFrac(op1Fraction, op2Fraction, finalAnswer);\t//if so use subfrac method to get the difference (use op1frac, op2 frac, and final answer\r\n \t\tresult = toMixedNum(finalAnswer[1], finalAnswer[2]);\t//convert diff into mixed number set = to result\r\n \t\t\r\n \t} else if(operator.equals(\"*\")) {\t//also test if operator is *\r\n \t\t\tmultiplyFrac(op1Fraction, op2Fraction, finalAnswer);\t//if so use multiply frac to get the product \r\n \t\t\tresult = toMixedNum(finalAnswer[1], finalAnswer[2]);\t//convert to mixed number set = to result\r\n \t\t\t\r\n \t\t} else if(operator.equals(\"/\")) {\t//also check if operator is /\r\n \t\t\t\tdivideFrac(op1Fraction, op2Fraction, finalAnswer);\t//if so use dividefrac method to get the quotient\r\n \t\t\t\tresult = toMixedNum(finalAnswer[1], finalAnswer[2]);\t//convert to mixed number set = to result\r\n \t\t\t\t\t\r\n \t\t\t}\r\n \treturn result;\t\t//return result\r\n \t\t}",
"private String calculate (double num1, double num2, String operator){\r\n \r\n double value;\r\n switch(operator){\r\n case \"+\":\r\n value = num1 + num2;\r\n break;\r\n case \"-\":\r\n value = num1 - num2;\r\n break;\r\n case \"*\":\r\n value = num1 * num2;\r\n break;\r\n case \"/\":\r\n value = num1/num2;\r\n break;\r\n default:\r\n throw new IllegalArgumentException();\r\n \r\n }\r\n String result = value + \"\";\r\n return result;\r\n }",
"protected void method_4160() {\r\n String[] var10000 = class_752.method_4253();\r\n ++this.field_3416;\r\n String[] var1 = var10000;\r\n int var7 = this.field_3416;\r\n if(var1 != null) {\r\n label96: {\r\n if(this.field_3416 >= 180) {\r\n var7 = this.field_3416;\r\n if(var1 == null) {\r\n break label96;\r\n }\r\n\r\n if(this.field_3416 <= 200) {\r\n float var2 = (this.field_3028.nextFloat() - 0.5F) * 8.0F;\r\n float var3 = (this.field_3028.nextFloat() - 0.5F) * 4.0F;\r\n float var4 = (this.field_3028.nextFloat() - 0.5F) * 8.0F;\r\n String[] var10001 = field_3418;\r\n this.field_2990.method_2087(\"hugeexplosion\", this.field_2994 + (double)var2, this.field_2995 + 2.0D + (double)var3, this.field_2996 + (double)var4, 0.0D, 0.0D, 0.0D);\r\n }\r\n }\r\n\r\n var7 = this.field_2990.field_1832;\r\n }\r\n }\r\n\r\n int var5;\r\n int var6;\r\n class_715 var9;\r\n ahb var10;\r\n label101: {\r\n short var8;\r\n label102: {\r\n if(var1 != null) {\r\n label85: {\r\n if(var7 == 0) {\r\n var7 = this.field_3416;\r\n var8 = 150;\r\n if(var1 != null) {\r\n label80: {\r\n if(this.field_3416 > 150) {\r\n var7 = this.field_3416 % 5;\r\n if(var1 == null) {\r\n break label80;\r\n }\r\n\r\n if(var7 == 0) {\r\n var5 = 1000;\r\n\r\n while(var5 > 0) {\r\n var6 = class_715.method_4090(var5);\r\n var5 -= var6;\r\n var10 = this.field_2990;\r\n var9 = new class_715;\r\n var9.method_4087(this.field_2990, this.field_2994, this.field_2995, this.field_2996, var6);\r\n var10.method_2089(var9);\r\n if(var1 == null) {\r\n break label85;\r\n }\r\n\r\n if(var1 == null) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n var7 = this.field_3416;\r\n }\r\n\r\n var8 = 1;\r\n }\r\n\r\n if(var1 == null) {\r\n break label102;\r\n }\r\n\r\n if(var7 == var8) {\r\n this.field_2990.method_2209(1018, (int)this.field_2994, (int)this.field_2995, (int)this.field_2996, 0);\r\n }\r\n }\r\n\r\n this.method_3864(0.0D, 0.10000000149011612D, 0.0D);\r\n this.field_3330 = this.field_3000 += 20.0F;\r\n }\r\n\r\n var7 = this.field_3416;\r\n }\r\n\r\n if(var1 == null) {\r\n break label101;\r\n }\r\n\r\n var8 = 200;\r\n }\r\n\r\n if(var7 != var8) {\r\n return;\r\n }\r\n\r\n var7 = this.field_2990.field_1832;\r\n }\r\n\r\n if(var1 != null) {\r\n if(var7 != 0) {\r\n return;\r\n }\r\n\r\n var7 = 2000;\r\n }\r\n\r\n var5 = var7;\r\n\r\n while(true) {\r\n if(var5 > 0) {\r\n var6 = class_715.method_4090(var5);\r\n var5 -= var6;\r\n var10 = this.field_2990;\r\n var9 = new class_715;\r\n var9.method_4087(this.field_2990, this.field_2994, this.field_2995, this.field_2996, var6);\r\n var10.method_2089(var9);\r\n if(var1 == null) {\r\n break;\r\n }\r\n\r\n if(var1 != null) {\r\n continue;\r\n }\r\n }\r\n\r\n this.method_4325(class_1715.method_9561(this.field_2994), class_1715.method_9561(this.field_2996));\r\n break;\r\n }\r\n\r\n this.method_3851();\r\n }",
"public interface Operacion {\n\n /**\n * Metodo que evalua el valor de un nodo del arbol, calculando su valor recorriendo a todos sus\n * hijos\n */\n Hojas eval();\n void agregar(Operacion op);\n Boolean isBin();\n}",
"private String auxOperacion(int operando1, int operando2, String valor1, String valor2, int op) {\n if (ManejadorMemoria.isInt(operando1)) {\n if (ManejadorMemoria.isInt(operando2)) {\n switch (op) {\n case Codigos.SUMA:\n return (Integer.parseInt(valor1) + Integer.parseInt(valor2)) + \"\";\n case Codigos.RESTA:\n return (Integer.parseInt(valor1) - Integer.parseInt(valor2)) + \"\";\n case Codigos.MULT:\n return (Integer.parseInt(valor1) * Integer.parseInt(valor2)) + \"\";\n case Codigos.DIV:\n return (Integer.parseInt(valor1) / Integer.parseInt(valor2)) + \"\";\n case Codigos.MAYOR:\n System.out.println(valor1 + \" \" + valor2 + \" \" + (Integer.parseInt(valor1) > Integer.parseInt(valor2)));\n return (Integer.parseInt(valor1) > Integer.parseInt(valor2)) + \"\";\n case Codigos.MENOR:\n return (Integer.parseInt(valor1) < Integer.parseInt(valor2)) + \"\";\n case Codigos.MAYORIG:\n return (Integer.parseInt(valor1) >= Integer.parseInt(valor2)) + \"\";\n case Codigos.MENORIG:\n return (Integer.parseInt(valor1) <= Integer.parseInt(valor2)) + \"\";\n case Codigos.IGUAL:\n return (Integer.parseInt(valor1) == Integer.parseInt(valor2)) + \"\";\n case Codigos.DIFERENTE:\n return (Integer.parseInt(valor1) != Integer.parseInt(valor2)) + \"\";\n }\n } else if (ManejadorMemoria.isFloat(operando2)) {\n switch (op) {\n case Codigos.SUMA:\n return (Integer.parseInt(valor1) + Double.parseDouble(valor2)) + \"\";\n case Codigos.RESTA:\n return (Integer.parseInt(valor1) - Double.parseDouble(valor2)) + \"\";\n case Codigos.MULT:\n return (Integer.parseInt(valor1) * Double.parseDouble(valor2)) + \"\";\n case Codigos.DIV:\n return (Integer.parseInt(valor1) / Double.parseDouble(valor2)) + \"\";\n case Codigos.MAYOR:\n return (Integer.parseInt(valor1) > Double.parseDouble(valor2)) + \"\";\n case Codigos.MENOR:\n return (Integer.parseInt(valor1) < Double.parseDouble(valor2)) + \"\";\n case Codigos.MAYORIG:\n return (Integer.parseInt(valor1) >= Double.parseDouble(valor2)) + \"\";\n case Codigos.MENORIG:\n return (Integer.parseInt(valor1) <= Double.parseDouble(valor2)) + \"\";\n case Codigos.IGUAL:\n return (Integer.parseInt(valor1) == Double.parseDouble(valor2)) + \"\";\n case Codigos.DIFERENTE:\n return (Integer.parseInt(valor1) != Double.parseDouble(valor2)) + \"\";\n }\n }\n } else if (ManejadorMemoria.isFloat(operando1)) {\n if (ManejadorMemoria.isInt(operando2)) {\n switch (op) {\n case Codigos.SUMA:\n return (Double.parseDouble(valor1) + Integer.parseInt(valor2)) + \"\";\n case Codigos.RESTA:\n return (Double.parseDouble(valor1) - Integer.parseInt(valor2)) + \"\";\n case Codigos.MULT:\n return (Double.parseDouble(valor1) * Integer.parseInt(valor2)) + \"\";\n case Codigos.DIV:\n return (Double.parseDouble(valor1) / Integer.parseInt(valor2)) + \"\";\n case Codigos.MAYOR:\n return (Double.parseDouble(valor1) > Integer.parseInt(valor2)) + \"\";\n case Codigos.MENOR:\n return (Double.parseDouble(valor1) < Integer.parseInt(valor2)) + \"\";\n case Codigos.MAYORIG:\n return (Double.parseDouble(valor1) >= Integer.parseInt(valor2)) + \"\";\n case Codigos.MENORIG:\n return (Double.parseDouble(valor1) <= Integer.parseInt(valor2)) + \"\";\n case Codigos.IGUAL:\n return (Double.parseDouble(valor1) == Integer.parseInt(valor2)) + \"\";\n case Codigos.DIFERENTE:\n return (Double.parseDouble(valor1) != Integer.parseInt(valor2)) + \"\";\n }\n } else if (ManejadorMemoria.isFloat(operando2)) {\n switch (op) {\n case Codigos.SUMA:\n return (Double.parseDouble(valor1) + Double.parseDouble(valor2)) + \"\";\n case Codigos.RESTA:\n return (Double.parseDouble(valor1) - Double.parseDouble(valor2)) + \"\";\n case Codigos.MULT:\n return (Double.parseDouble(valor1) * Double.parseDouble(valor2)) + \"\";\n case Codigos.DIV:\n return (Double.parseDouble(valor1) / Double.parseDouble(valor2)) + \"\";\n case Codigos.MAYOR:\n return (Double.parseDouble(valor1) > Double.parseDouble(valor2)) + \"\";\n case Codigos.MENOR:\n return (Double.parseDouble(valor1) < Double.parseDouble(valor2)) + \"\";\n case Codigos.MAYORIG:\n return (Double.parseDouble(valor1) >= Double.parseDouble(valor2)) + \"\";\n case Codigos.MENORIG:\n return (Double.parseDouble(valor1) <= Double.parseDouble(valor2)) + \"\";\n case Codigos.IGUAL:\n return (Double.parseDouble(valor1) == Double.parseDouble(valor2)) + \"\";\n case Codigos.DIFERENTE:\n return (Double.parseDouble(valor1) != Double.parseDouble(valor2)) + \"\";\n }\n }\n } else if (ManejadorMemoria.isString(operando1)) {\n return valor1 + valor2;\n } else if(ManejadorMemoria.isBool(operando1)){\n switch(op){\n case Codigos.AND:\n return (Boolean.parseBoolean(valor1) && Boolean.parseBoolean(valor2)) + \"\";\n case Codigos.OR:\n return (Boolean.parseBoolean(valor1) || Boolean.parseBoolean(valor2)) + \"\";\n case Codigos.NOT:\n return (! Boolean.parseBoolean(valor1))+ \"\";\n }\n }\n\n return \"\";\n }",
"public void computeEquation()\n {\n // Curve equation of type : y = ax^2 + bx + c\n // OR (x*x)a + (x)b + 1c = y\n // ex : 50 = 4a + 2b + c where y = 50 and x = 2 and z = 1\n double[][] matrice = {{Math.pow(A.getKey(),2),A.getKey(),1},\n {Math.pow(B.getKey(),2),B.getKey(),1},\n {Math.pow(C.getKey(),2),C.getKey(),1}};\n\n double deter = computeSarrus(matrice);\n\n double [][] matriceA = {{A.getValue(),A.getKey(),1},\n {B.getValue(),B.getKey(),1},\n {C.getValue(),C.getKey(),1}};\n\n double [][] matriceB = {{Math.pow(A.getKey(),2),A.getValue(),1},\n {Math.pow(B.getKey(),2),B.getValue(),1},\n {Math.pow(C.getKey(),2),C.getValue(),1}};\n\n double [][] matriceC = {{Math.pow(A.getKey(),2),A.getKey(),A.getValue()},\n {Math.pow(B.getKey(),2),B.getKey(),B.getValue()},\n {Math.pow(C.getKey(),2),C.getKey(),C.getValue()}};\n\n abc[0] = computeSarrus(matriceA) / deter;\n abc[1] = computeSarrus(matriceB) / deter;\n abc[2] = computeSarrus(matriceC) / deter;\n }",
"@Test\n @Tag(\"bm1000\")\n public void testBOEING2() {\n CuteNetlibCase.doTest(\"BOEING2.SIF\", \"-3.1501872802E+02\", \"-73.36896910872208\", NumberContext.of(7, 4));\n }",
"String mo21078i();",
"@Test\n public void test09() throws Throwable {\n Complex complex0 = new Complex(0.0, (-1.5707963267948966));\n Complex complex1 = new Complex((-1.5707963267948966), 0.0);\n Complex complex2 = complex0.subtract(complex1);\n Complex complex3 = complex1.sinh();\n Complex complex4 = complex2.cosh();\n Complex complex5 = complex4.divide(complex0);\n int int0 = complex1.hashCode();\n Complex complex6 = complex4.exp();\n int int1 = complex4.hashCode();\n Complex complex7 = complex4.sqrt();\n double double0 = complex4.abs();\n Complex complex8 = complex1.acos();\n Complex complex9 = complex6.sin();\n int int2 = complex4.hashCode();\n boolean boolean0 = complex1.isNaN();\n double double1 = complex0.getReal();\n Complex complex10 = complex6.log();\n Complex complex11 = complex0.pow(complex4);\n Complex complex12 = complex2.multiply(complex10);\n Complex complex13 = complex6.sqrt1z();\n Complex complex14 = complex8.log();\n }",
"long mo25071a(long j);",
"private int minusExpoBaseTwo(int order){\n double cnt = 0;\n //This allows us to add the exponatials together whilst decreasing the power each time effectively making 2^(order) + 2^(order-1)....until order equals 1\n for(int i = order;i>0;i--){\n cnt = cnt + Math.pow(2, i);\n }\n //Converts it back to an int\n return (int) cnt;\n }",
"public static int method_2688(ahb var0, int var1, int var2, int var3, class_752 var4) {\r\n String[] var5 = class_752.method_4253();\r\n float var9;\r\n int var10000 = (var9 = class_1715.method_9564((float)var4.field_2994 - (float)var1) - 2.0F) == 0.0F?0:(var9 < 0.0F?-1:1);\r\n if(var5 != null) {\r\n label65: {\r\n if(var10000 < 0) {\r\n float var10;\r\n var10000 = (var10 = class_1715.method_9564((float)var4.field_2996 - (float)var3) - 2.0F) == 0.0F?0:(var10 < 0.0F?-1:1);\r\n if(var5 == null) {\r\n break label65;\r\n }\r\n\r\n if(var10000 < 0) {\r\n double var6 = var4.field_2995 + 1.82D - (double)var4.field_3013;\r\n double var11;\r\n var10000 = (var11 = var6 - (double)var2 - 2.0D) == 0.0D?0:(var11 < 0.0D?-1:1);\r\n if(var5 != null) {\r\n if(var10000 > 0) {\r\n return 1;\r\n }\r\n\r\n double var12;\r\n var10000 = (var12 = (double)var2 - var6 - 0.0D) == 0.0D?0:(var12 < 0.0D?-1:1);\r\n }\r\n\r\n if(var5 == null) {\r\n break label65;\r\n }\r\n\r\n if(var10000 > 0) {\r\n return 0;\r\n }\r\n }\r\n }\r\n\r\n var10000 = class_1715.method_9561((double)(var4.field_3000 * 4.0F / 360.0F) + 0.5D) & 3;\r\n }\r\n }\r\n\r\n int var8 = var10000;\r\n var10000 = var8;\r\n if(var5 != null) {\r\n if(var8 == 0) {\r\n var10000 = 2;\r\n return var10000;\r\n }\r\n\r\n var10000 = var8;\r\n }\r\n\r\n byte var10001 = 1;\r\n if(var5 != null) {\r\n if(var10000 == 1) {\r\n var10000 = 5;\r\n return var10000;\r\n }\r\n\r\n var10000 = var8;\r\n var10001 = 2;\r\n }\r\n\r\n if(var5 != null) {\r\n if(var10000 == var10001) {\r\n var10000 = 3;\r\n return var10000;\r\n }\r\n\r\n var10000 = var8;\r\n if(var5 == null) {\r\n return var10000;\r\n }\r\n\r\n var10001 = 3;\r\n }\r\n\r\n var10000 = var10000 == var10001?4:0;\r\n return var10000;\r\n }",
"public static byte[] getGenotipo(int f,int nB){\n byte g[] = new byte[nB];\n int aux,nf = f;\n int cont = 0;\n for(int i =nB-1; i>=0;i--){\n aux = (int) Math.pow(2, i);\n if(nf >= aux){\n nf = nf - aux;\n g[cont] = 1;\n }\n else\n g[cont] = 0;\n cont ++;\n }\n return g;\n }",
"public static void main(String[] args) throws Exception\r\n\t{\n\t\tScanner cin=new Scanner(new BufferedInputStream(System.in));\r\n\t\twhile(true)\r\n\t\t{\r\n\t\r\n\t\t\tint n1=cin.nextInt();\r\n\t\t\tint n2=cin.nextInt();\r\n\t\t\tint n=cin.nextInt();\r\n\t\t\tif(n1==0&&n2==0&&n==0)\r\n\t\t\t\tbreak;\r\n\t\t\tint divsor=n-n1-n2;\r\n\t\t\tHashMap<BigDecimal,Integer> bd=new HashMap< BigDecimal,Integer>();\r\n\t\t\tfor(int i=0;i<n;i++)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tBigDecimal td=new BigDecimal(cin.next());\r\n\t\t\t\tInteger ti=bd.get(td);\r\n\t\t\t\tif(ti!=null)\r\n\t\t\t\t\tti++;\r\n\t\t\t\telse ti=1;\r\n\t\t\t\tbd.put(td,ti);\r\n\t\t\t}\r\n\t\t\tBigDecimal [] p=new BigDecimal[bd.size()];\r\n\t\t\tbd.keySet().toArray(p);\r\n\t\t\tArrays.sort(p);\r\n\t\t\tBigDecimal re=new BigDecimal(\"0\");\r\n\t\t\tint findex=0;\r\n\t\t\tint fnum=0;\r\n\t\t\tint lindex=p.length-1;\r\n\t\t\tint lnum=0;\r\n\t\t\twhile(true)\r\n\t\t\t{\r\n\t\t\t\tint t=bd.get(p[findex]);\r\n\t\t\t\tif(n2>=t)\r\n\t\t\t\t{\r\n\t\t\t\t\tn2-=t;\r\n\t\t\t\t\tfindex++;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tfnum=t-n2;\r\n\t\t\t\t\tre=re.add(p[findex].multiply(new BigDecimal(\"\"+fnum)));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twhile(true)\r\n\t\t\t{\r\n\t\t\t\tint t=bd.get(p[lindex]);\r\n\t\t\t\tif(n1>=t)\r\n\t\t\t\t{\r\n\t\t\t\t\tn1-=t;\r\n\t\t\t\t\tlindex--;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tlnum=t-n1;\r\n\t\t\t\t\tre=re.add(p[lindex].multiply(new BigDecimal(\"\"+lnum)));\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\t\tfor(int i=findex+1;i<lindex;i++)\r\n\t\t\t\tre=re.add(p[i].multiply(new BigDecimal(\"\"+bd.get(p[i]))));\r\n\t\t\tre=re.divide(new BigDecimal(\"\"+divsor),6,BigDecimal.ROUND_HALF_UP);\r\n\t\t\tSystem.out.println(re);\r\n\t\t\tbd=null;\r\n\t\t\tSystem.gc();\r\n\t\t}\r\n\t}",
"static String printBinary(double num) {\n // Check Number is Between 0 to 1 or Not\n if (num >= 1 || num <= 0)\n return \"ERROR\";\n\n StringBuilder binary = new StringBuilder();\n System.out.println(\"binary:\"+binary.toString());\n binary.append(\".\");\n\n while (num > 0) {\n\t\t\t/* Setting a limit on length: 32 characters,\n\t\t\tIf the number cannot be represented\n\t\t\taccurately in binary with at most 32\n\t\t\tcharacter */\n if (binary.length() >= 32)\n return \"ERROR\";\n\n // Multiply by 2 in num to check it 1 or 0\n double r = num * 2;\n if (r >= 1) {\n binary.append(1);\n num = r - 1;\n } else {\n binary.append(0);\n num = r;\n\n\n\n }\n\n }\n return binary.toString();\n }",
"public static void bigDecimal() {\n\n\t\tSystem.out.println(\"BigDecimalExample.bigDecimal()\");\n\t\tBigDecimal n1 = new BigDecimal(123.456);\n\t\tBigDecimal n2 = new BigDecimal(789.012);\n\t\tBigDecimal n3 = new BigDecimal(-2.0);\n\n\t\tSystem.out.println(\"n1: \" + n1);\n\t\tSystem.out.println(\"n2: \" + n2);\n\t\tSystem.out.println(\"n3: \" + n3);\n\t\t// System.out.println(\"n2.toEngineeringString(): \" + n2.toEngineeringString());\n\t\t// System.out.println(\"n2.toPlainString(): \" + n2.toPlainString());\n\t\tSystem.out.println();\n\n\t\tSystem.out.println(\"n1.add(n2): \" + n1.add(n2));\n\t\tSystem.out.println(\"n1: \" + n1); // n1.add(n2) returns a new BigDecimal, it does not modify n1 itself\n\t\tSystem.out.println(\"n1.subtract(n2): \" + n1.subtract(n2));\n\t\tSystem.out.println(\"n2.divide(n1): \" + n1.divide(n3));\n\t\tSystem.out.println(\"n2.multiply(n1): \" + n1.multiply(n1));\n\t\tSystem.out.println(\"n3.pow(4): \" + n3.pow(4));\n\t\tSystem.out.println(\"n2.remainder(n1): \" + n2.remainder(n1));\n\t\tSystem.out.println();\n\n\t\tSystem.out.println(\"n3.abs(): \" + n3.abs());\n\t\tSystem.out.println(\"n2.negate(): \" + n2.negate());\n\t\tSystem.out.println(\"n3.negate(): \" + n3.negate());\n\t\tSystem.out.println(\"n2.plus(): \" + n2.plus());\n\t\tSystem.out.println(\"n3.plus(): \" + n3.plus());\n\t\tSystem.out.println();\n\n\t\t// Since there are no relational operators available, you need to use compareTo\n\t\tSystem.out.println(\"n1.compareTo(n1): \" + n1.compareTo(n1)); // equal\n\t\tSystem.out.println(\"n1.compareTo(n2): \" + n1.compareTo(n2)); // less than\n\t\tSystem.out.println(\"n1.compareTo(n3): \" + n1.compareTo(n3)); // greater than\n\t\tSystem.out.println();\n\n\t\tSystem.out.println(\"n2: \" + n2);\n\t\tSystem.out.println(\"n2.scale(): \" + n2.scale()); // scale = number of digits after the decimal point\n\t\tSystem.out.println(\"n2.precision(): \" + n2.precision()); // precision = number of digits in unscaled value\n\t\tSystem.out.println(\"n2.movePointRight(3): \" + n2.movePointRight(3));\n\t\tSystem.out.println(\"n2.movePointLeft(3) : \" + n2.movePointLeft(3));\n\t\tSystem.out.println(\"n2.movePointRight(3): \" + n2.movePointRight(3));\n\t\tSystem.out.println(\"n2.scaleByPowerOfTen(3): \" + n2.scaleByPowerOfTen(3));\n\t\tSystem.out.println(\"n2.scaleByPowerOfTen(-3): \" + n2.scaleByPowerOfTen(-3));\n\n\t\tSystem.out.println();\n\n\t\tSystem.out.println(\"n2.min(n1): \" + n2.min(n1));\n\t\tSystem.out.println(\"n2.max(n1): \" + n2.max(n1));\n\n\t}",
"public static void solve(String question)\n\t{\n\t\t\n\t\tint add_function = 0;\n\t\tint sub_function = 0;\n\t\t\n\t\tString string_alpha = find_a(question); //finds the value of first input including x\n\t\tString string_beta = find_b(question); //finds the value of second input including x\n\t\t\n\t\tint var_alpha = find_a_num(question); //finds value as integer not including x, of first function\n\t\tint var_beta = find_b_num(question); //finds value as integer not including x, of second function\n\t\t\n\t\tSystem.out.println((find_par(2,question) + find_par(3,question)));\n\t\t\n\t\tString function_1 = function_1(question); //finds just the trig operator of the first function only used to check what type of equation\n\t\tString function_2 = function_2(question); //finds just the trig operator of the second function\n\t\t\n\t\t//check to make sure question is valid if not will start over\n\t\tif (!((function_1.equalsIgnoreCase(\"sin\") && function_1.equalsIgnoreCase(\"cos\") && function_1.equalsIgnoreCase(\"tan\")) || (function_2.equalsIgnoreCase(\"sin\") || function_2.equalsIgnoreCase(\"cos\") || function_2.equalsIgnoreCase(\"tan\"))))\n\t\t{\n\t\t\terror();\n\t\t}\n\t\t\n\t\t//checking to see what equation to use\n\t\t\n\t\tif (function_1.equalsIgnoreCase(\"sin\") && function_2.equalsIgnoreCase(\"sin\"))\n\t\t{\n\t\t\t\n\t\t\tsin_sin(string_alpha,string_beta,var_alpha,var_beta);\n\t\t\t/*System.out.println(\"Step 1: (1/2)[(cos(\" + string_alpha + \"-\" + string_beta + \")) - (cos(\" + string_alpha + \"+\" + string_beta +\"))]\"); //prints first step\n\t\t\t\n\t\t\tadd_function = var_alpha + var_beta; //adds the two values as integer\n\t\t\tsub_function = var_alpha - var_beta;\t//substracts the two values as integers\n\t\t\t\n\t\t\tString string_alpha2 = add_function +\"x\"; //reasigns string including x after substracting two values\n\t\t\tString string_beta2 = sub_function +\"x\";\t//reasigns string including x after substracting two values\n\n\t\t\tSystem.out.println(\"\\nStep 2: (1/2)[cos(\" + string_beta2 + \") - cos(\" + string_alpha2 + \")]\"); // uses x a literal instead of from string because they are always there and substracts both halfs\n\t\t\t\n\t\t\tSystem.out.println(\"\\nStep 3: (1/2)cos(\" + string_beta2 + \") - (1/2)cos(\" + string_alpha2 + \")\");\n\t\t\t\n\t\t\tfinished();*/\n\t\t\t\n\t\t}\n\t\t\n\t\tif (function_1.equalsIgnoreCase(\"sin\") && function_2.equalsIgnoreCase(\"cos\"))\n\t\t{\n\t\t\tSystem.out.println(\"Step 1: (1/2)[(cos(\" + string_alpha + \"+\" + string_beta + \")) - (cos(\" + string_alpha + \"-\" + string_beta +\"))]\\t\\tenter values into equation\"); //prints first step\n\t\t\t\n\t\t\tadd_function = var_alpha + var_beta; //adds the two values as integer\n\t\t\tsub_function = var_alpha - var_beta;\t//substracts the two values as integers\n\t\t\t\n\t\t\tString string_alpha2 = add_function +\"x\"; //reasigns string including x after substracting two values\n\t\t\tString string_beta2 = sub_function +\"x\";\t//reasigns string including x after substracting two values\n\n\t\t\tSystem.out.println(\"\\nStep 2: (1/2)[cos(\" + string_alpha2 + \") + cos(\" + string_beta2 + \")]\\t\\tsimplify values\"); // uses x a literal instead of from string because they are always there and substracts both halfs\n\t\t\t\n\t\t\tSystem.out.println(\"\\nStep 3: (1/2)cos(\" + string_alpha2 + \") + (1/2)cos(\" + string_beta2 + \") t\\tdistribute 1/2\");\n\t\t\t\n\t\t\tfinished();\n\t\t\t\n\t\t}\n\t\t//not done\n\t\tif (function_1.equalsIgnoreCase(\"cos\") && function_2.equalsIgnoreCase(\"cos\"))\n\t\t{\n\t\t\tSystem.out.println(\"Step 1: (1/2)[(cos(\" + string_alpha + \"+\" + string_beta + \")) - (cos(\" + string_alpha + \"-\" + string_beta +\"))]\\t\\tenter values into equation\"); //prints first step\n\t\t\t\n\t\t\tadd_function = var_alpha + var_beta; //adds the two values as integer\n\t\t\tsub_function = var_alpha - var_beta;\t//substracts the two values as integers\n\t\t\t\n\t\t\tString string_alpha2 = add_function +\"x\"; //reasigns string including x after substracting two values\n\t\t\tString string_beta2 = sub_function +\"x\";\t//reasigns string including x after substracting two values\n\n\t\t\tSystem.out.println(\"\\nStep 2: (1/2)[cos(\" + string_alpha2 + \") + cos(\" + string_beta2 + \")]\\t\\tsimplify values\"); // uses x a literal instead of from string because they are always there and substracts both halfs\n\t\t\t\n\t\t\tSystem.out.println(\"\\nStep 3: (1/2)cos(\" + string_alpha2 + \") + (1/2)cos(\" + string_beta2 + \") t\\tdistribute 1/2\");\n\t\t\t\n\t\t\tfinished();\n\t\t\t\n\t\t}\n\t\t\n\t\t////////////\n\t\t//System.out.println(function_1 + \" \" + function_2);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//find_b(question);\n\t}",
"E sin(final E n);",
"public static String eotBin(double eot) {\n\t\tfor (int i = 0; i < EOT_BINS.length; i++) {\n\t\t\tif (eot > EOT_BIN_ENDS[i]) {\n\t\t\t\treturn EOT_BINS[i];\n\t\t\t}\n\t\t}\n\t\t// this should never be reached\n\t\tassert false;\n\t\treturn null;\n\t}",
"private void displayExp(int disp_nr){\r\n\t\tswitch (disp_nr){\r\n\t\t\tcase 0 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(200,100), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Bei 'Fletcher's Checksum' handelt es sich, wie beim Namen ersichtlich,\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"um einen Pruefsummen-Algorithmus zur Erkennung von Datenuebertragungsfehlern.\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"Er ist aehnlich stark wie das CRC-Verfahren,\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"hat aber einen teils wesentlich geringeren Rechenaufwand.\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"Wir sehen uns den Algorithmus in 2 Faellen an:\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"- Korrekte uebertragung der Daten\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"- Fehlerhafte uebertragung der Daten\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"Doch zuerst muessen die Pruefsummen selbst berechnet werden.\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"In der urspruenglichen Variante des Algorithmus wird hierfuer der Datenstream\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"in Bytes (8-Bit Bloecke) zerlegt...\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 1 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Nun stehen die zwei Pruefsummen fest.\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"Damit aber die Qualitaet von CRC in Sachen Fehlererkennung erreicht wird,\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"muessen diese noch einmal verarbeitet werden und zwar wie folgt:\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Diese 2 Werte werden nun an die zu versendende Nachricht drangehaengt\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 3 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Zur Fehlerpruefung muss der Empfaenger nun den Algorithmus erneut\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"auf die empfangene Nachricht, samt Prueffeldern, andwenden\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 4 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Die Pruefsumme (sum1 + sum2) ist 0! Somit kann von einer\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"korrekten uebertragung der Daten ausgegangen werden!\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 5 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Nun ein anderes Szenario: Bei der uebertragung ist ein Fehler \", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"aufgetreten - hier : in Byte #\" + error_position, null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 6 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Wir pruefen erneut wie vorher...\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 7 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Die Pruefsumme ist NICHT 0. Somit weiss der Empfaenger,\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"dass ein Fehler aufgetreten ist\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 9 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Es wurden\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"- Beim ersten Errechnen von sum1 und sum2 \"+op_counts[0]+\" Operationen\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"- Beim Pruefen der Nachricht jeweils \"+op_counts[2]+\" Operationen\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"... durchgefuehrt\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"Man erkennt, dass die Zeitkomplexitaet ( der Hauptschleife ) bei n*4 liegt\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"wobei n die Laenge der Nachricht ( die zu erweitern oder zu pruefen ist ) in Bytes ist.\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"Dies steht im Gegensatz zu - zB. - dem CRC-Verfahren, welches (im schlimmsten Fall) von der Anzahl der einzelnen Bits abhaengt.\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"Fazit: Ein einfacher, aber effektiver Algorithmus zur Erkennung\" +\r\n\t\t\t\t\t\t\" von uebertragungsfehlern. Hoffentlich war diese Animation aufschlussreich!\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 10 : \r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Die Schwaeche dieses Verfahrens liegt darin, dass es nicht zwischen den Bytes 11111111 und 00000000,\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"bzw. 255 und 0 ( in Dezimal ) unterscheiden kann, weswegen sich die Pruefsummen nicht geaendert und folgich der Fehler\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"leider nicht entdeckt wurde\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault : break;\r\n\t\t}\r\n\t\tlang.nextStep();\r\n\t}",
"public String toString()\r\n\t{\r\n\t\tif(exponent == 0)\r\n\t\t{\r\n\t\t\treturn String.valueOf(coefficient);\r\n\t\t}\r\n\t\tif(exponent == 1)\r\n\t\t{\r\n\t\t\treturn String.valueOf(coefficient) + \"x\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn String.valueOf(coefficient) + \"x^\" + String.valueOf(exponent);\r\n\t\t}\r\n\t}",
"public int mo9774x() {\n /*\n r5 = this;\n int r0 = r5.f9082i\n int r1 = r5.f9080g\n if (r1 != r0) goto L_0x0007\n goto L_0x006a\n L_0x0007:\n byte[] r2 = r5.f9079f\n int r3 = r0 + 1\n byte r0 = r2[r0]\n if (r0 < 0) goto L_0x0012\n r5.f9082i = r3\n return r0\n L_0x0012:\n int r1 = r1 - r3\n r4 = 9\n if (r1 >= r4) goto L_0x0018\n goto L_0x006a\n L_0x0018:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 7\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x0024\n r0 = r0 ^ -128(0xffffffffffffff80, float:NaN)\n goto L_0x0070\n L_0x0024:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r1 = r1 << 14\n r0 = r0 ^ r1\n if (r0 < 0) goto L_0x0031\n r0 = r0 ^ 16256(0x3f80, float:2.278E-41)\n L_0x002f:\n r1 = r3\n goto L_0x0070\n L_0x0031:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 21\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x003f\n r2 = -2080896(0xffffffffffe03f80, float:NaN)\n r0 = r0 ^ r2\n goto L_0x0070\n L_0x003f:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r4 = r1 << 28\n r0 = r0 ^ r4\n r4 = 266354560(0xfe03f80, float:2.2112565E-29)\n r0 = r0 ^ r4\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r3 = r2[r3]\n if (r3 >= 0) goto L_0x0070\n int r3 = r1 + 1\n byte r1 = r2[r1]\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r3 = r2[r3]\n if (r3 >= 0) goto L_0x0070\n int r3 = r1 + 1\n byte r1 = r2[r1]\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r2 = r2[r3]\n if (r2 >= 0) goto L_0x0070\n L_0x006a:\n long r0 = r5.mo9776z()\n int r0 = (int) r0\n return r0\n L_0x0070:\n r5.f9082i = r1\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p213q.p217b.p301c.p302a.p311j0.p312a.C3656k.C3659c.mo9774x():int\");\n }",
"public static void main(String[] args){\n Long n = Long.valueOf(5);\n Long q = Long.valueOf(6);\n if(++n == q){\n System.out.println(\"equals\");\n }else{\n System.out.println(\"non-equals\");\n }\n //int m = s.nextInt();\n// BigInteger m1 = new BigInteger(Integer.toString(m));\n// BigInteger fibo1 = fibonaci(n);\n// BigInteger result = fibo1.mod(m1);\n System.out.println();\n// int n = 10;\n// int m = 2;\n// BigInteger fibo1 = fibonaci(n);\n// BigInteger fibo2 = fibonaci(m);\n// BigInteger result = fibo1.mod(fibo2);\n // System.out.println(fibo1 + \" % \" + fibo2 + \" = \" + result + \", \" + BigInteger.);\n }"
] | [
"0.5947764",
"0.56014353",
"0.5579681",
"0.55634624",
"0.55535644",
"0.55525845",
"0.555028",
"0.54863244",
"0.5448636",
"0.5375773",
"0.5360569",
"0.53064555",
"0.5262379",
"0.524166",
"0.5236366",
"0.52239025",
"0.522175",
"0.521436",
"0.5213746",
"0.5213512",
"0.51976645",
"0.51675045",
"0.5121127",
"0.5097692",
"0.5096039",
"0.5095977",
"0.5089999",
"0.5075517",
"0.5074005",
"0.50687176",
"0.5067615",
"0.50655794",
"0.5063834",
"0.50603825",
"0.50515413",
"0.5034863",
"0.50303704",
"0.50282794",
"0.50213885",
"0.5019921",
"0.5017871",
"0.5016926",
"0.50165486",
"0.5013389",
"0.49990058",
"0.49948084",
"0.49771792",
"0.49762607",
"0.49734083",
"0.49711484",
"0.49679676",
"0.49632964",
"0.49573445",
"0.49507076",
"0.49348634",
"0.4929846",
"0.49293905",
"0.49224633",
"0.49160296",
"0.49158028",
"0.4911777",
"0.49089113",
"0.49058992",
"0.48988038",
"0.48925862",
"0.4890319",
"0.48883793",
"0.48843676",
"0.4877649",
"0.4873806",
"0.4869934",
"0.48674068",
"0.48625523",
"0.4859535",
"0.48525432",
"0.48520267",
"0.48425743",
"0.4838795",
"0.48375875",
"0.48375693",
"0.48367798",
"0.48366573",
"0.48305017",
"0.48301122",
"0.48272765",
"0.4825271",
"0.48242217",
"0.4820682",
"0.48204923",
"0.48198584",
"0.48178384",
"0.48172867",
"0.48152724",
"0.48142606",
"0.4813027",
"0.48048356",
"0.48035455",
"0.4801815",
"0.48011795",
"0.48010376"
] | 0.6713964 | 0 |
/ Overridden toString that displays the code with line numbers (starting at 1) | public String toString()
{
String temp = "";
for (int i=0; i< lineCount; i++)
{
temp += (i+1) + ": " + codeLines[i] + "\n";
}
return temp;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toString()\n\t{\n\t\treturn \"#\"+ this.getStepLineNumber() + \" \" + this.getClass().getSimpleName();\n\t}",
"public String toString()\n\t{\n\t\treturn \"#\"+ this.getStepLineNumber() + \" \" + this.getClass().getSimpleName();\n\t}",
"@Override public String toString() {\n return String.format(\"(%03d) %03d-%04d\",\n areaCode, prefix, lineNumber);\n }",
"public String toString()\r\n/* 16: */ {\r\n/* 17:14 */ return \"Hello, myNumber is \" + this.myNumber;\r\n/* 18: */ }",
"@Override\n public final String toString() {\n \t\n \treturn String.format(\"[%1$s [%2$s\\t%3$s\\t%4$s]%1$s [%5$s\\t%6$s\\t%7$s]%1$s [%8$s\\t%9$s\\t%10$s] ]\", System.getProperty(\"line.separator\"), this.m00, this.m01, this.m02,\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 this.m10, this.m11, this.m12,\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 this.m20, this.m21, this.m22);\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"idx : \" + idx + \" title : \" + title + \" code :\" + code;\n\t\t\t\t\n\t}",
"public String toString() {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[34]++;\r\n DateTimeFormatter printer = ISODateTimeFormat.dateHourMinuteSecondFraction();\r\n printer = printer.withChronology(getChronology());\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[35]++;\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[36]++;\r\n StringBuffer buf = new StringBuffer(48);\r\n printer.printTo(buf, getStartMillis());\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[37]++;\r\n buf.append('/');\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[38]++;\r\n printer.printTo(buf, getEndMillis());\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[39]++;\r\n return buf.toString();\r\n }",
"@Override\n public String toString() {\n return \" at \" + this.index + \" [character \" + this.character + \" line \" + this.line + \"]\";\n }",
"public String toString()\r\n/* 67: */ {\r\n/* 68:253 */ return getClass().getName();\r\n/* 69: */ }",
"@Override\n public String toString(){\n return '+' + code + number.substring(0, 3) + '-' + number.substring(3, 6) + '-' +number.substring(6);\n }",
"@Override\n public String toString()\n {\n return String.format(\"%s^%s\", fCode, fMessage);\n }",
"public String toString() {\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tbuffer.append(\"Files: \\n\");\n\n\t\tfor( String file : files){\n\t\t\tbuffer.append(\"\t-\");\n\t\t\tbuffer.append(file);\n\t\t\tbuffer.append(\"\\n\");\n\t\t}\n\n\t\tthis.appendIntValueToBuffer(this.regions, \"Regions\", buffer);\n\t\tthis.appendIntValueToBuffer(this.lineAdded, \"LA\", buffer);\n\t\tthis.appendIntValueToBuffer(this.lineDeleted, \"LD\", buffer);\n\n\t\tbuffer.append(\"Functions calls: \\n\");\n\n\t\tfor(String key : this.functionCalls.keySet()) {\n\t\t\tthis.appendIntValueToBuffer(functionCalls.get(key), key, buffer);\n\t\t}\n\n\t\treturn buffer.toString();\n\t}",
"public String Line() {\n return \"==================================================================================================================\";\n }",
"public String toString()\n {\n return getIndentation();\n }",
"public String toString()\n {\n //creates a string of the class's variables in a readable format.\n String s = String.format(\"%-14s%-3d%3s\" +lineNums.toString(), word, count,\"\");\n return s.toString();\n }",
"public String toString()\r\n/* 736: */ {\r\n/* 737:804 */ return toStringBuilder().toString();\r\n/* 738: */ }",
"private static void displayXCode() {\n if (dvm.getStartingLine() < 0){\n System.out.println(\"====\"+dvm.getCurrentFunction().toUpperCase()+\"====\");\n }else{\n for (int i = dvm.getStartingLine(); i <= dvm.getEndingLine(); i++) {\n if (dvm.isLineABreakPoint(i)){\n //NOTE: (char)249 is extended ascii for a little solid square.\n //I'm sorry if it comes out as something else on your machine\n //I do not know how (or if its possible) to check if the machine\n //that will run this program supports extended ascii. If it doesnt\n //It should just show up as an empty box, which is acceptable\n //For my purposes as well.\n System.out.print((char)249);\n }else\n System.out.print(\" \");\n\n if (i == dvm.getCurrentLine())\n System.out.println(String.format(\"%1$4s %2$s\", i + \")\", dvm.getLineOfSourceCode(i)+ \" <-----------\"));\n else\n System.out.println(String.format(\"%1$4s %2$s\", i + \")\", dvm.getLineOfSourceCode(i)));\n }\n }\n }",
"public String toString()\n\t{\n\t\treturn this.defline + \"\\n\" + this.sequence + \"\\n + \\n\" + this.quality + \"\\n\";\n\t}",
"private static String callMethodAndLine() {\n\t\tStackTraceElement thisMethodStack = (new Exception()).getStackTrace()[4];\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb\n.append(AT)\n\t\t\t\t.append(thisMethodStack.getClassName() + \".\")\n\t\t\t\t.append(thisMethodStack.getMethodName())\n\t\t\t\t.append(\"(\" + thisMethodStack.getFileName())\n\t\t\t\t.append(\":\" + thisMethodStack.getLineNumber() + \") \");\n\t\treturn sb.toString();\n\t}",
"public final String toString ()\r\n\t{\r\n\t\tStringBuffer retVal = new StringBuffer ();\r\n\t\tif (codeset != null)\r\n\t\t{\r\n\t\t\tfor (int i = 0; i < prolog.size (); i++)\r\n\t\t\t{\r\n\t\t\t\tConcreteElement e = (ConcreteElement)prolog.elementAt (i);\r\n\t\t\t\tretVal.append (e.toString (getCodeset ()) + \"\\n\");\r\n\t\t\t}\r\n\t\t\tif (content != null)\r\n\t\t\t\tretVal.append (content.toString (getCodeset ()));\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor (int i = 0; i < prolog.size (); i++)\r\n\t\t\t{\r\n\t\t\t\tConcreteElement e = (ConcreteElement)prolog.elementAt (i);\r\n\t\t\t\tretVal.append (e.toString () + \"\\n\");\r\n\t\t\t}\r\n\t\t\tif (content != null)\r\n\t\t\t\tretVal.append (content.toString ());\r\n\t\t}\r\n\t\t/**\r\n * FIXME: The other part of the version hack! Add the version\r\n * declaration to the beginning of the document.\r\n */\r\n\t\treturn versionDecl + retVal.toString ();\r\n\t}",
"public String toString() {\r\n\tStringBuffer gline = new StringBuffer();\r\n\tgline.append(Const.SPACE);\r\n\tgline.append(\"line\");\r\n\tgline.append(Const.SPACE);\r\n\tgline.append(co1.x);\r\n\tgline.append(Const.SPACE);\r\n\tgline.append(co1.y);\r\n\tgline.append(Const.SPACE);\r\n\tgline.append(co2.x);\r\n\tgline.append(Const.SPACE);\r\n\tgline.append(co2.y);\r\n\treturn gline.toString();\r\n }",
"@Override\n public String toString() {\n return type.key + \". \" + description + \" at \" +\n (sourceName != null && sourceName.length() > 0 ?\n sourceName : \"(unknown source)\") + \" line \" +\n (lineNumber != -1 ? String.valueOf(lineNumber) : \"(unknown line)\") +\n \" : \" + (charno != -1 ? String.valueOf(charno) : \"(unknown column)\");\n }",
"@Override\n public String toString() {\n Enumeration lines = this.toLines();\n if (lines == null) {\n return null;\n }\n String str = null;\n while (lines.hasMoreElements()) {\n String line = (String) lines.nextElement();\n if (str == null) {\n str = line;\n } else {\n str += _strNewLine + line;\n }\n }\n return str;\n }",
"@Override\n public String toString() {\n switch (this) {\n case CODE128_A:\n return \"code128A\";\n case CODE25INTER:\n return \"2/5 interleave\";\n default:\n return name();\n }\n }",
"public String toString()\r\n/* 94: */ {\r\n/* 95:110 */ return new String(this.chars, 0, this.pos);\r\n/* 96: */ }",
"@Override\n public String toString() {\n return \"code: \" + this.paintCode + \"secCode: \" + this.secCode + \", image: \" + this.image;\n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n int startIndex = 0;\n while (startIndex < total - laneSize - 1) {\n startIndex = printOddLane(sb, startIndex);\n startIndex = printEvenLane(sb, startIndex + laneSize);\n }\n\n return sb.toString();\n }",
"public void showLineage() {\n\t\tfor (Iterator i = this.getLineage().iterator(); i.hasNext();) {\n\t\t\tprtln((String) i.next());\n\t\t}\n\t}",
"protected String toStringAsCode() {\r\n \t\treturn \"<\"+toStringAsElement()+\">\";\r\n \t}",
"public String toString() {\n String text = TAB + \"Name: \" + this.name + lineSeparator()\n + Ui.formatMessage(\"Address: \" + this.address, MAX_LINE_LENGTH)\n + lineSeparator() + TAB\n + \"Faculty: \" + this.faculty + lineSeparator() + TAB\n + \"Port: \" + this.hasPort + lineSeparator() + TAB\n + \"Indoor: \" + this.isIndoor + lineSeparator() + TAB\n + \"Maximum number of Pax: \" + this.maxPax;\n String line = TAB + \"__________________________________________________________\";\n return line + lineSeparator() + text + lineSeparator() + line;\n }",
"public String toString() {\n\t\treturn super.toString() + \"[count=\" + count + \",pos=\" + pos + \"]\";\n\t}",
"public String toString() {\n return new ToStringBuilder(this)\n .append(\"number\", this.number)\n .append(\"fileSets\", this.fileSets)\n .toString();\n }",
"public String getCode() {\n String code = getPrefixCode();\r\n code += format(5, this.getNumber());\r\n return code;\r\n }",
"public String toString()\r\n/* 112: */ {\r\n/* 113:199 */ String s = \"\";\r\n/* 114:200 */ for (N node : getNodes())\r\n/* 115: */ {\r\n/* 116:201 */ s = s + \"\\n{ \" + node + \" \";\r\n/* 117:202 */ for (N suc : getSuccessors(node)) {\r\n/* 118:203 */ s = s + \"\\n ( \" + getEdge(node, suc) + \" \" + suc + \" )\";\r\n/* 119: */ }\r\n/* 120:205 */ s = s + \"\\n} \";\r\n/* 121: */ }\r\n/* 122:207 */ return s;\r\n/* 123: */ }",
"public String toString() {\n/* */ return this.field_176894_i;\n/* */ }",
"static String frameToString(RecordedFrame frame, boolean lineNumbers) {\n StringBuilder builder = new StringBuilder();\n RecordedMethod method = frame.getMethod();\n RecordedClass clazz = method.getType();\n if (clazz == null) {\n builder.append(\"<<\");\n builder.append(frame.getType());\n builder.append(\">>\");\n } else {\n builder.append(clazz.getName());\n }\n builder.append(\"#\");\n builder.append(method.getName());\n builder.append(\"()\");\n if (lineNumbers) {\n builder.append(\":\");\n if (frame.getLineNumber() == -1) {\n builder.append(\"(\" + frame.getType() + \" code)\");\n } else {\n builder.append(frame.getLineNumber());\n }\n }\n return builder.toString();\n }",
"public String toString() {\n StringBuffer buf = new StringBuffer(\" SourceFile: \\\"\");\n buf.append(sourceFileName);\n buf.append(\"\\\"\\n\");\n return buf.toString();\n }",
"public String toString(){\n\t\tIterator<Integer> iter = getLines().iterator();\n\t\tString word = getWord() + \"(\" + getLines().size() + \"): \";\n\t\twhile (iter.hasNext()){\n\t\t\tword += iter.next() + \", \";\n\t\t} \n\t\tword = word.substring(0, word.length() - 2);\n\t\treturn word;\n\t}",
"public String toString(){\n\t\treturn String.format(\"%d: %s\", index, name);\n\t}",
"public String getStatusLine() {\n\n StringBuilder builder = new StringBuilder(SL_11_START.length() + 4 + message.length());\n builder.append(SL_11_START).append(code).append(' ').append(message);\n return builder.toString();\n }",
"@Override\r\n\tpublic String toString() {\n\t\tString header = this.header.toString();\r\n\t\tString preHeader = \"\";\r\n\t\tif (this.preHeader != null)\r\n\t\t\tpreHeader = this.preHeader.toString();\r\n\t\tString backjump = this.backJump.toString();\r\n\t\tString loopStmts = loopStatements.toString();\r\n\r\n\t\tString loop = \"[\\n header = \" + header + \"\\n preHeader = \" + preHeader\r\n\t\t\t\t+ \"\\n backjump = \" + backjump + \"\\n loopStatements = \"\r\n\t\t\t\t+ loopStmts + \" \\n]\";\r\n\t\t// return super.toString();\r\n\t\treturn loop;\r\n\t}",
"@Override\n public String toString() {\n\n String str = code + \" \" + getNumber() + \" \" + getTitle() + \", Enrollment = \" + getClassList().size();\n return str;\n }",
"public String toString() {\n/* 96 */ return \"Outline (Zigzag)\";\n/* */ }",
"@Override\n public String toString() {\n return getClass().getSimpleName() + \": call $\" + name.signatureName + (comment == null ? \"\" : \" ;; \\\"\" + comment + \"\\\"\");\n }",
"public String toString() {\n StringBuffer sb = new StringBuffer();\n sb.append(\"Summary for \");\n sb.append(method.toString());\n sb.append(':');\n sb.append(Strings.lineSep);\n// for (Iterator i=nodes.keySet().iterator(); i.hasNext(); ) {\n// Node n = (Node)i.next();\n// sb.append(\"\\t\");\n// sb.append(n.toString_long());\n// sb.append(Strings.lineSep);\n// }\n if(params != null && params.length > 0) {\n sb.append(\"\\tParams: \");\n sb.append(Arrays.asList(params));\n sb.append(Strings.lineSep);\n }\n if (returned != null && !returned.isEmpty()) {\n sb.append(\"\\tReturned: \");\n sb.append(returned);\n sb.append(Strings.lineSep);\n }\n if (thrown != null && !thrown.isEmpty()) {\n sb.append(\"\\tThrown: \");\n sb.append(thrown);\n sb.append(Strings.lineSep);\n }\n if (calls != null && !calls.isEmpty()) {\n sb.append(\"\\tCalls: \");\n sb.append(calls);\n sb.append(Strings.lineSep);\n }\n return sb.toString();\n }",
"@Override\n\tpublic String toString() {\n\t\tString str = \"(\";\n\t\tif(this.error) str += \"1 - \";\n\t\tint i = 0;\n\t\tfor(String component : this.components) {\n\t\t\tif(i != 0) {\n\t\t\t\tstr += \" * \";\n\t\t\t}\n\t\t\tstr += component;\n\t\t\ti++;\n\t\t}\n\t\treturn str + \")\";\n\t}",
"public String toString()\n\t{\n\t\treturn getArea() + \".\" + getLine() + \".\" + getDevice();\n\t}",
"public String getLineNumber() \n\t{\n\t\treturn getNumber().substring(9,13);\n\t}",
"public String toString() {\n\t\tString str = \"\";\n\t\tfor (int i = 1 ; i < size - 1; i++ ){\n\t\t\tstr = str + getBlock(i);\n\t\t}\n\t\treturn str;\n\t}",
"public String toString(){\n String pileString = \"\";\n\n for(int i = 0; i < this.nbObj; i++)\n {\n pileString += i + \": \" + this.objTab[i].toString() + \"\\n\";\n }\n pileString += \"End of Stack\";\n return pileString;\n }",
"String snippet(int line);",
"public String toString()\n {\n return \"(\" + start + \"->\"+ (start+size-1) + \")\";\n }",
"@Override\n public final String toString() {\n return asString(0, 4);\n }",
"public String toString()\n{\n StringBuffer buf = new StringBuffer();\n buf.append(\"[SOURCE: \" + for_source.getName() + \",\\n\");\n if (getTransforms() != null) {\n buf.append(\"TRANS:\");\n for (S6Transform.Memo m : getTransforms()) {\n\tbuf.append(\" \");\n\tbuf.append(m.getTransformName());\n }\n }\n else {\n buf.append(\" TEXT: \" + getFragment().getText());\n }\n buf.append(\"]\");\n\n return buf.toString();\n}",
"public String toString()\n\t{return getClass().getName()+\"[source=\"+source+\",id=\"+id+']';}",
"public String toString()\n {\n StringBuilder buf = new StringBuilder();\n buf.append('(');\n buf.append(\"counter=\");\n buf.append(counter);\n buf.append(')');\n return buf.toString();\n }",
"public String toString(){\n\t\tStringBuilder output = new StringBuilder();\n\t\tfor (int i=13; i<=16; i++){\n\t\t\toutput.append(linesAndStores[i].makeString());\n\t\t\toutput.append(\"\\n\");\n\t\t}\n\t\treturn output.toString();\n\t}",
"public String toString() {\r\n return ToStringBuilder.reflectionToString(this,\r\n ToStringStyle.MULTI_LINE_STYLE);\r\n }",
"public String toString()\n\t{\n\t\tString returnString = question;\n\t\tfor (int i = 0; i < numLines; i++)\n\t\t{\n\t\t\treturnString = returnString.concat(\"\\n\");\n\t\t}\n\t\t\n\t\treturn returnString;\n\t}",
"public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(N + \"\\n\");\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n s.append(String.format(\"%2d \", blocks[i][j]));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }",
"private String createNumberLine(){\n StringBuilder numberLine = new StringBuilder();\n for(int i = 0; i < this.columns; i++){\n numberLine.append(i + 1).append(\" \");\n }\n return numberLine.toString();\n }",
"@Override\r\n\tpublic String toString()\r\n\t{\r\n\t\tString s = new String(\"\");\r\n\t\tfor (int i = 0; i < maze.length; i++) {\r\n\t\t\ts+= \"\\n\";\r\n\t\t\ts+= \"Floor #\";\r\n\t\t\ts+= (i+1);\r\n\t\t\ts+= \":\";\r\n\t\t\ts+= \"\\n\";\r\n\t\t\tfor (int j = 0; j < maze[0].length; j++) {\r\n\t\t\t\ts+= \"\\n\";\r\n\t\t\t\tfor (int j2 = 0; j2 < maze[0][0].length; j2++) {\r\n\t\t\t\t\ts += this.maze[i][j][j2];\r\n\t\t\t\t\ts += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ts+= \"\\n\";\r\n\t\t}\r\n\t\treturn s;\r\n\t}",
"public String toString() {\n\t\treturn \"LINE:(\"+startPoint.getX()+\"-\"+startPoint.getY() + \")->(\" + endPoint.getX()+\"-\"+endPoint.getY()+\")->\"+getColor().toString();\n\t}",
"public String toString() {\n/* 790 */ return this.m_str;\n/* */ }",
"public String toString() {\n\t\tif (hierarchy.equals(\"n\")) {\n\t\t\treturn visability + \" class \" + className + \"{ \\n \";\n\t\t} else if (isFinished == true) {\n\n\t\t\treturn \"}\";\n\t\t} else {\n\t\t\treturn visability + \" \" + hierarchy + \" class \" + className\n\t\t\t\t\t+ \"{ \\n \";\n\t\t}\n\t}",
"public final String toString() {\r\n final String result = String.format(\r\n \"%s(%d,%d,%d): %s\", this.source, this.line, this.start, this.end, this.message\r\n );\r\n\r\n return result.replaceAll(\"<unknown>\", \"\");\r\n }",
"private String identingCode(int offset, String codeSnippet) {\n\t\tStringBuilder code = new StringBuilder();\n\t\tString[] lineBroken = codeSnippet.split(\"\\n\");\n\t\tfor(int index=0; index < lineBroken.length; index++) {\n\t\t\tString line = lineBroken[index];\n\t\t\tStringBuilder tmpLine = new StringBuilder();\n\t\t\tif(index != 0) {\n\t\t\t\tfor(int i=0; i<offset; i++) {\n\t\t\t\t\ttmpLine.append(\"\");\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\ttmpLine.append(line.replace(\"\\t\", \"\")).append(\"\\n\");\n\t\t\tcode.append(tmpLine);\n\t\t}\n\t\treturn code.toString();\n\t}",
"public String toCodeString() {\n return String.format(\"%s = %s;\\n\", this.identifier.toString(), this.exp.toCodeString());\n }",
"public int line() {\r\n return line;\r\n }",
"@Override\r\n public void dump ()\r\n {\r\n super.dump();\r\n System.out.println(\" line=\" + getLine());\r\n }",
"public String toDebugString() {\n StringBuffer str = new StringBuffer(mySelf()+\"\\n\");\n return str.toString();\n }",
"public String toString() {\n return( \"entry_id:\" + entry_id + \",bmrb_id:\" + bmrb_id + \n \",pdb_id:\" + pdb_id + General.eol );\n }",
"public String toString() {\n Class<? extends AST> tclass = this.getClass();\n // isolate relative name (starting after the rightmost '.')\n String absoluteClassName = tclass.toString();\n int dotIndex = absoluteClassName.lastIndexOf(\".\", absoluteClassName.length());\n String relativeClassName = absoluteClassName.substring(dotIndex+1);\n // retrieving fields (note that, unfortunately, they are not ordered)\n // TO DO : get rid of static fields (pb in case of singletons)\n Field[] fields = tclass.getDeclaredFields();\n // building string representation of the arguments of the nodes\n int arity = fields.length;\n String args = \"\";\n for(int index = 0; index < arity; index++) {\n String arg;\n try {\n arg = fields[index].get(this).toString(); // retrieve string representation of all arguments\n } catch (Exception e) {\n arg = \"?\"; // IllegalArgument or IllegalAccess Exception (this shouldn't happen)\n }\n if (index != 0) // a separator is required before each argument except the first\n args = args + \", \" + arg;\n//\t\t\t\targs = args + \" \" + arg;\n else\n args = args + arg;\n }\n return relativeClassName + \"(\" + args + \")\";\n//\t\treturn \"<\" + relativeClassName + \">\" + args + \"</\" + relativeClassName + \">\";\n }",
"public String toString() {\n return super.toString() + \" with specifications:\\n\\tNumber of strings: \" + nrStrings \n + \"\\n\\tString size: \" + stringSize + \"mm\";\n }",
"@Override\n \tpublic String toString() {\n \t\treturn toStringHelper(1, \"\");\n \t}",
"public String getLine5() {\n return line5;\n }",
"public String toDebugString() {\n StringBuffer str = new StringBuffer(mySelf()+\"\\n\");\n return super.toDebugString()+str.toString();\n }",
"public String toString() {\n\n // **** ****\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"\\n n: \" + this.n);\n sb.append(\"\\nparents: \" + Arrays.toString(this.parents));\n\n // **** ****\n return sb.toString();\n }",
"public String toString() \n {\n StringBuilder str = new StringBuilder();\n str.append(N + \"\\n\");\n \n for (int i = 0; i < SIZE; i++)\n {\n str.append(String.format(\"%2d \", (int) blocks[i]));\n if ((i + 1) % N == 0) { str.append(\"\\n\"); } \n }\n \n return str.toString(); \n }",
"private static void showCurrentBreakPoints() {\n System.out.print(\"Current BreakPoints: \");\n for (int i=1;i<=dvm.getSourceCodeLength();i++)\n if (dvm.isLineABreakPoint(i)) System.out.print(i + \" \");\n System.out.print(\"\\n\");\n }",
"public String toString( )\n{ \n String s=\"\\nThe Mines\\n \";\n for ( int r = 0; r < rows; r++ )\n {\n for ( int c = 0; c < cols ; c++ )\n s = s + theMines[ r ][ c ] + \" \";\n s = s + \" \\n \" ;\n }\n s += \"\\nMined neighbor counts\\n \";\n for ( int r = 0; r < rows; r++ )\n {\n for ( int c = 0; c < cols ; c++ )\n if( theCounts[ r ][ c ] == 9 )\n s = s + \"X\" + \" \";\n else\n s = s + theCounts[ r ][ c ] + \" \";\n s = s + \" \\n \" ;\n } \n return( s );\n}",
"@Override\n public String toString() {\n String result = \"\";\n\n for (int position = 0; position < 64; position++) {\n if (position > 0) {\n if (position % 16 == 0) { // New level\n result += '|';\n } else if (position % 4 == 0) {\n result += ' '; // New row\n }\n }\n result += get(position);\n }\n return result;\n }",
"public String toString() { return kind() + \":\"+ text() ; }",
"public String toString() {\n\t\treturn super.toString();\n\t\t// This gives stack overflows:\n\t\t// return ToStringBuilder.reflectionToString(this);\n\t}",
"public String toString() {\n String s = \" 1 2 3 4 5 6 7 8\";\n\n\n s += \"\\n --------------------\\n1 |\";\n\n for(int i=0; i < this.TAILLEX; i++){\n for(int k=0; k < this.TAILLEY; k++){\n s += this.plateau[i][k] + \"|\";\n }\n if(i<7) s += \"\\n --------------------\\n\" + (i+2) + \" |\";\n else s += \"\\n --------------------\\n\";\n }\n\n return s;\n }",
"@Override\n public synchronized String toString ()\n {\n return (super.toString () + \"[\" + Main.CLASS_NAME + \": \" +\n \"]\");\n }",
"public int getLineNo();",
"public String toString() {\n return getClass().getName() + \"[source=\" + source + \"]\";\n }",
"public int getLine()\n/* */ {\n/* 1312 */ return this.line;\n/* */ }",
"@Override\n public String toString() {\n // TODO: this, statically\n StringBuilder builder = new StringBuilder(getObs().toString());\n builder.append(\" S\");\n builder.append(firstStep + 1);\n if (lastStep > firstStep) {\n builder.append(\"-\");\n builder.append(lastStep + 1);\n }\n return builder.toString();\n }",
"@Override\n\tpublic String toString() {\n\t\tString result = \"\";\n\t\t\n\t\tfor(int i = 0; i < top; i++) {\n\t\t\tresult = result + stack[i].toString() + \"\\n\";\t//shouldn't it start at max --> 0 since its a stack\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public String toString() {\r\n\t\tString[] analysis = new String[26];\r\n\t\tString bigLine = String.format(\"LETTER ANALYSIS: \" + '\\n' + \"%-6s\" + '\\t' + \"%-6s\" + '\\t' + \"%-6s\" +\r\n\t\t\t\t\t\t\t'\\t' + \"%-6s\" + '\\t' + \"%-6s\" + '\\n', \"Letter\", \"Freq\", \"Freq%\", \"AvFreq%\", \"Diff\");\r\n\t\tfor(int i = 0; i < 26; i++) {\r\n\t\t\tanalysis[i] = returnAnArray(i);\r\n\t\t\tbigLine+=analysis[i];\r\n\t\t} bigLine += \"The most frequent letter is \" + mostFrequent + \" at \" + formatDoubles(max);\r\n\t\treturn bigLine;\r\n\t\t\r\n\t}",
"public String toString()\n/* */ {\n/* 885 */ StringBuilder result = new StringBuilder();\n/* 886 */ for (int i = 0; i < this.ruleSets.length; i++) {\n/* 887 */ result.append(this.ruleSets[i].toString());\n/* */ }\n/* 889 */ return result.toString();\n/* */ }",
"public String toString(){\n\t\tfor (int i = 0; i < scoreList.size(); i++) {\n\t\t\tsource += \" \" + scoreList.get(i);\n\t }\n\t return source;\n\t}",
"public String showLine() {\n return \"----------------------------------------------------------\" + System.lineSeparator();\n }",
"public String toString()\n\t{\n\t\tString output=\"\";\n\n\n\n\n\n\n\t\treturn output+\"\\n\\n\";\n\t}",
"@Override\n public String toString() {\n return toStringHelper(1, \"\");\n }",
"public int getLineNumber();",
"public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(n + System.lineSeparator());\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n sb.append(tiles[i][j] + \" \");\n }\n sb.append(System.lineSeparator());\n }\n return sb.toString();\n }",
"public java.lang.String toString() {\n /*\n r4 = this;\n int r0 = r4.f2605a\n r1 = -1\n if (r0 != r1) goto L_0x000c\n java.lang.Object r0 = r4.f2606b\n java.lang.String r0 = java.lang.String.valueOf(r0)\n return r0\n L_0x000c:\n java.lang.StringBuilder r0 = new java.lang.StringBuilder\n java.lang.String r1 = \"Icon(typ=\"\n r0.<init>(r1)\n int r1 = r4.f2605a\n java.lang.String r1 = m2631a(r1)\n r0.append(r1)\n int r1 = r4.f2605a\n r2 = 1\n if (r1 == r2) goto L_0x007a\n r3 = 2\n if (r1 == r3) goto L_0x0052\n r2 = 3\n if (r1 == r2) goto L_0x0039\n r2 = 4\n if (r1 == r2) goto L_0x002e\n r2 = 5\n if (r1 == r2) goto L_0x007a\n goto L_0x009a\n L_0x002e:\n java.lang.String r1 = \" uri=\"\n r0.append(r1)\n java.lang.Object r1 = r4.f2606b\n r0.append(r1)\n goto L_0x009a\n L_0x0039:\n java.lang.String r1 = \" len=\"\n r0.append(r1)\n int r1 = r4.f2609e\n r0.append(r1)\n int r1 = r4.f2610f\n if (r1 == 0) goto L_0x009a\n java.lang.String r1 = \" off=\"\n r0.append(r1)\n int r1 = r4.f2610f\n r0.append(r1)\n goto L_0x009a\n L_0x0052:\n java.lang.String r1 = \" pkg=\"\n r0.append(r1)\n java.lang.String r1 = r4.mo3107b()\n r0.append(r1)\n java.lang.String r1 = \" id=\"\n r0.append(r1)\n java.lang.Object[] r1 = new java.lang.Object[r2]\n r2 = 0\n int r3 = r4.mo3103a()\n java.lang.Integer r3 = java.lang.Integer.valueOf(r3)\n r1[r2] = r3\n java.lang.String r2 = \"0x%08x\"\n java.lang.String r1 = java.lang.String.format(r2, r1)\n r0.append(r1)\n goto L_0x009a\n L_0x007a:\n java.lang.String r1 = \" size=\"\n r0.append(r1)\n java.lang.Object r1 = r4.f2606b\n android.graphics.Bitmap r1 = (android.graphics.Bitmap) r1\n int r1 = r1.getWidth()\n r0.append(r1)\n java.lang.String r1 = \"x\"\n r0.append(r1)\n java.lang.Object r1 = r4.f2606b\n android.graphics.Bitmap r1 = (android.graphics.Bitmap) r1\n int r1 = r1.getHeight()\n r0.append(r1)\n L_0x009a:\n android.content.res.ColorStateList r1 = r4.f2611g\n if (r1 == 0) goto L_0x00a8\n java.lang.String r1 = \" tint=\"\n r0.append(r1)\n android.content.res.ColorStateList r1 = r4.f2611g\n r0.append(r1)\n L_0x00a8:\n android.graphics.PorterDuff$Mode r1 = r4.f2612h\n android.graphics.PorterDuff$Mode r2 = f2604j\n if (r1 == r2) goto L_0x00b8\n java.lang.String r1 = \" mode=\"\n r0.append(r1)\n android.graphics.PorterDuff$Mode r1 = r4.f2612h\n r0.append(r1)\n L_0x00b8:\n java.lang.String r1 = \")\"\n r0.append(r1)\n java.lang.String r0 = r0.toString()\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: androidx.core.graphics.drawable.IconCompat.toString():java.lang.String\");\n }"
] | [
"0.737554",
"0.737554",
"0.7277619",
"0.7029534",
"0.6963828",
"0.6963819",
"0.6916395",
"0.6846735",
"0.67916685",
"0.67843497",
"0.6744392",
"0.67410964",
"0.67125434",
"0.66973454",
"0.6663424",
"0.65799177",
"0.6552044",
"0.65333873",
"0.6531955",
"0.651215",
"0.6503455",
"0.64706063",
"0.6438502",
"0.6380606",
"0.6355246",
"0.6352561",
"0.6338455",
"0.63366",
"0.631274",
"0.6297304",
"0.6289204",
"0.62837094",
"0.6279027",
"0.6261994",
"0.62592596",
"0.6253232",
"0.6252701",
"0.623157",
"0.62262785",
"0.62192726",
"0.62165093",
"0.6206011",
"0.6205423",
"0.6200466",
"0.6192013",
"0.61872286",
"0.6183893",
"0.6183417",
"0.61826676",
"0.6176155",
"0.6168373",
"0.6167489",
"0.6164761",
"0.61618906",
"0.61618406",
"0.6156811",
"0.6154317",
"0.615313",
"0.6137724",
"0.61261266",
"0.6125842",
"0.6124135",
"0.61228526",
"0.61211497",
"0.6121127",
"0.61155134",
"0.6112766",
"0.6107413",
"0.6101914",
"0.6096938",
"0.6094851",
"0.6093949",
"0.6093597",
"0.60932595",
"0.6085416",
"0.6083729",
"0.607476",
"0.6073333",
"0.6070386",
"0.6066742",
"0.6065735",
"0.6063796",
"0.6056622",
"0.60518914",
"0.60508376",
"0.60440123",
"0.60436624",
"0.60415715",
"0.6033239",
"0.6032539",
"0.6031366",
"0.60279095",
"0.6023377",
"0.60170656",
"0.60126674",
"0.60115343",
"0.60071105",
"0.6005458",
"0.6002951",
"0.600073"
] | 0.83689135 | 0 |
SwitchLeft0 is connected to a horizontal straight in east direction | @Test
public void connectTest_East_HorizontalStraight() throws Exception {
final Factory<Node> railNodeFactory = new DefaultRailNodeFactory();
final RailNode switchLeft0RailNode = (RailNode) railNodeFactory.create(1, 1, ShapeType.SWITCH_LEFT_0);
final RailNode horizontalRailNode = (RailNode) railNodeFactory.create(0, 1, ShapeType.STRAIGHT_HORIZONTAL);
final Model model = new DefaultModel();
model.setNode(1, 1, switchLeft0RailNode);
model.setNode(0, 1, horizontalRailNode);
switchLeft0RailNode.connect(model);
horizontalRailNode.connect(model);
System.out.println(switchLeft0RailNode.toString());
System.out.println(horizontalRailNode.toString());
assertEquals(0, switchLeft0RailNode.getGraphNodeOne().getChildren().size());
assertEquals(1, switchLeft0RailNode.getGraphNodeTwo().getChildren().size());
assertEquals(3, switchLeft0RailNode.getGraphNodeTwo().getChildren().get(0).getId());
assertEquals(1, horizontalRailNode.getGraphNodeOne().getChildren().size());
assertEquals(0, horizontalRailNode.getGraphNodeTwo().getChildren().size());
assertEquals(0, horizontalRailNode.getGraphNodeOne().getChildren().get(0).getId());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void turnLeft() {\n\t\tthis.setSteeringDirection(getSteeringDirection()-5);\n\t\t}",
"@Test\n\tpublic void connectTest_West_HorizontalStraight() throws Exception {\n\n\t\tfinal Factory<Node> railNodeFactory = new DefaultRailNodeFactory();\n\n\t\tfinal RailNode switchLeft0RailNode = (RailNode) railNodeFactory.create(1, 1, ShapeType.SWITCH_LEFT_0);\n\t\tfinal RailNode horizontalRailNode = (RailNode) railNodeFactory.create(2, 1, ShapeType.STRAIGHT_HORIZONTAL);\n\n\t\tfinal Model model = new DefaultModel();\n\t\tmodel.setNode(1, 1, switchLeft0RailNode);\n\t\tmodel.setNode(2, 1, horizontalRailNode);\n\n\t\tswitchLeft0RailNode.connect(model);\n\t\thorizontalRailNode.connect(model);\n\n\t\tSystem.out.println(switchLeft0RailNode.toString());\n\t\tSystem.out.println(horizontalRailNode.toString());\n\n\t\tassertEquals(1, switchLeft0RailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(0, switchLeft0RailNode.getGraphNodeTwo().getChildren().size());\n\t\tassertEquals(2, switchLeft0RailNode.getGraphNodeOne().getChildren().get(0).getId());\n\n\t\tassertEquals(0, horizontalRailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(1, horizontalRailNode.getGraphNodeTwo().getChildren().size());\n\t\tassertEquals(1, horizontalRailNode.getGraphNodeTwo().getChildren().get(0).getId());\n\t}",
"public static void turnLeft() {\n LEFT_MOTOR.backward();\n RIGHT_MOTOR.forward();\n }",
"public void steady(){\n if(steady){\n if(!bellySwitch.get()) {\n leftMotor.set(-.3);\n rightMotor.set(-.3);\n }else {\n leftMotor.set(0);\n rightMotor.set(0);\n } \n }\n }",
"public void turnLeft() {\r\n setDirection( modulo( myDirection-1, 4 ) );\r\n }",
"public void switchSides() {\n\t\tint temp = 0;\r\n\t\ttemp = leftValue;\r\n\t\tleftValue = rightValue;\r\n\t\trightValue = temp;\r\n\t}",
"private void rotateLeft() {\n robot.leftBack.setPower(-TURN_POWER);\n robot.leftFront.setPower(-TURN_POWER);\n robot.rightBack.setPower(TURN_POWER);\n robot.rightFront.setPower(TURN_POWER);\n }",
"@Test\n\tpublic void connectTest_North_HorizontalStraight() throws Exception {\n\n\t\tfinal Factory<Node> railNodeFactory = new DefaultRailNodeFactory();\n\n\t\tfinal RailNode switchLeft0RailNode = (RailNode) railNodeFactory.create(1, 1, ShapeType.SWITCH_LEFT_0);\n\t\tfinal RailNode horizontalRailNode = (RailNode) railNodeFactory.create(1, 0, ShapeType.STRAIGHT_HORIZONTAL);\n\n\t\tfinal Model model = new DefaultModel();\n\t\tmodel.setNode(1, 1, switchLeft0RailNode);\n\t\tmodel.setNode(1, 0, horizontalRailNode);\n\n\t\tswitchLeft0RailNode.connect(model);\n\t\thorizontalRailNode.connect(model);\n\n\t\tSystem.out.println(switchLeft0RailNode.toString());\n\t\tSystem.out.println(horizontalRailNode.toString());\n\n\t\tassertEquals(0, switchLeft0RailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(0, switchLeft0RailNode.getGraphNodeTwo().getChildren().size());\n\n\t\tassertEquals(0, horizontalRailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(0, horizontalRailNode.getGraphNodeTwo().getChildren().size());\n\t}",
"private void turnLeft(View v){\n\t\tswitch(this.facingDirection){\n\t\tcase NORTH:\n\t\t\tfacingDirection = Direction.WEST;\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tfacingDirection = Direction.EAST;\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tfacingDirection = Direction.SOUTH;\n\t\t\tbreak;\n\t\tcase EAST:\n\t\t\tfacingDirection = Direction.NORTH;\n\t\t}\n\t}",
"public void left () {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return;\n Location loc = getLocation();\n Location next = loc.getAdjacentLocation(Location.WEST);\n if (canMove(next)) {\n moveTo(next);\n }\n }",
"public void turnLeft()\r\n\t{\r\n\t\t\r\n\t\theading -= 2; //JW\r\n\t\t//Following the camera:\r\n\t\t\t//heading -= Math.sin(Math.toRadians(15))*distance; \r\n\t\t\t//heading -= Math.cos(Math.toRadians(15))*distance;\r\n\t}",
"public LeftSwitchToFirstCubePt2Arc() {\n\t\tsuper();\n\t\tthis.highGear = true;\n\t\tcenterProfile = new SrxMotionProfile(centerPoints.length, centerPoints);\n\t}",
"public void changeDirection()\n {\n if(goLeft){\n goLeft = false;\n }else{\n goLeft = true;\n }\n }",
"@Override\r\n\tpublic void onLeft() {\n\t\tif (snakeView.smer != snakeView.VZHOD) {\r\n\t\t\tsnakeView.naslednjaSmer = snakeView.ZAHOD;\r\n\t\t}\r\n\t}",
"public void turnLeft ()\n\t{\n\t\t//changeFallSpeed (-1);\n\t\tturnInt = -1;\n\t}",
"public void turnLeft();",
"public void leftPressed() {\n System.out.println(\"leftPressed()\");\n current.translate(0, -1);\n display.showBlocks();\n }",
"private void turnLeft() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n switch (direction) {\n case EAST:\n direction = Position.Direction.NORTH;\n break;\n case WEST:\n direction = Position.Direction.SOUTH;\n break;\n case NORTH:\n direction = Position.Direction.WEST;\n break;\n case SOUTH:\n direction = Position.Direction.EAST;\n break;\n }\n\n currentPosition.setDirection(direction);\n }",
"private void redWestTurnLeft(int intersection) {\n int index = getIntersectionIndex(intersection);\n isGreenWestTurnLeft[index] = false;\n }",
"@Test\n\tpublic void connectTest_North_VerticalStraight() throws Exception {\n\n\t\tfinal Factory<Node> railNodeFactory = new DefaultRailNodeFactory();\n\n\t\tfinal RailNode switchLeft0RailNode = (RailNode) railNodeFactory.create(1, 1, ShapeType.SWITCH_LEFT_0);\n\t\tfinal RailNode horizontalRailNode = (RailNode) railNodeFactory.create(1, 0, ShapeType.STRAIGHT_VERTICAL);\n\n\t\tfinal Model model = new DefaultModel();\n\t\tmodel.setNode(1, 1, switchLeft0RailNode);\n\t\tmodel.setNode(1, 0, horizontalRailNode);\n\n\t\tswitchLeft0RailNode.connect(model);\n\t\thorizontalRailNode.connect(model);\n\n\t\tSystem.out.println(switchLeft0RailNode.toString());\n\t\tSystem.out.println(horizontalRailNode.toString());\n\n\t\tassertEquals(1, switchLeft0RailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(0, switchLeft0RailNode.getGraphNodeTwo().getChildren().size());\n\t\tassertEquals(2, switchLeft0RailNode.getGraphNodeOne().getChildren().get(0).getId());\n\n\t\tassertEquals(0, horizontalRailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(1, horizontalRailNode.getGraphNodeTwo().getChildren().size());\n\t\tassertEquals(1, horizontalRailNode.getGraphNodeTwo().getChildren().get(0).getId());\n\t}",
"public void turnLeft() { turn(\"LEFT\"); }",
"private void handleLeft() {\r\n\t\tcontroller.getCurrentPosition().realocate((controller.getCurrentPosition().getY()), controller.getCurrentPosition().getX()-1);\r\n\t\t// if User reaches the end of the board reset position\r\n\t\tif(controller.getCurrentPosition().getX()==-1) {\r\n\t\t\tcontroller.getCurrentPosition().realocate((controller.getCurrentPosition().getY()), controller.getNumberColumns()-1);\r\n\t\t}\r\n\t\t// remove the pseudo Class from all nodes so that only the cell that was pressed last looks 'pressed'\r\n\t\tfor (Node n : controller.getGridBoard().getChildren()) {\r\n\t\t\t((StackPane) n).pseudoClassStateChanged(PseudoClass.getPseudoClass(\"pressed\"), false);\r\n\t\t\tif (GridPane.getColumnIndex(n) == controller.getCurrentPosition().getX() && GridPane.getRowIndex(n) == controller.getCurrentPosition().getY()) {\r\n\t\t\t\t((StackPane) n).pseudoClassStateChanged(PseudoClass.getPseudoClass(\"pressed\"), true);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void LeftRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}",
"public void rotateLeft() {\n // I fucked up? Rotations are reversed, just gonna switch em\n// tileLogic = getRotateLeft();\n tileLogic = getRotateRight();\n// rotateLeftTex();\n rotateRightTex();\n }",
"private void createSwitches() {\n \t\tswitches = new Point[4];\n \t\tswitches[0] = new Point(centreMin, centreMin);\n \t\tswitches[1] = new Point(centreMin, centreMax-1);\n \t\tswitches[2] = new Point(centreMax-1, centreMin);\n \t\tswitches[3] = new Point(centreMax-1, centreMax-1);\n \t}",
"public void sideLeft(double targetDistance, double power) {\n setDriveMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n setDriveMode(DcMotor.RunMode.RUN_USING_ENCODER);\n double currentDistance = 0;\n while (Math.abs(currentDistance) < targetDistance && opModeIsActive()) {\n currentDistance = frontRight.getCurrentPosition();\n frontLeft.setPower(power);\n frontRight.setPower(-power);\n backLeft.setPower(-power);\n backRight.setPower(power);\n }\n stopMotors();\n }",
"@Override\r\n\tpublic void moveLeft() {\n\t\tswitch(state) {\r\n\t\tcase 0: case 2:\r\n\t\t\t{\r\n\t\t\t\tboolean ok = true;\r\n\t\t\t\tfor(Case c: cases) {\r\n\t\t\t\t\tif(!grille.isEmpty(c.getX()+x-1, c.getY()+y))\r\n\t\t\t\t\t\tok = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(ok)\r\n\t\t\t\t\t--x;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t{\r\n\t\t\tint x3 = cases.get(3).getX()-1, y3 = cases.get(3).getY();\r\n\t\t\tif(grille.isEmpty(x+x3, y+y3))\r\n\t\t\t\t--x;\r\n\t\t\t\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tcase 3:\r\n\t\t{\r\n\t\t\tint x0 = cases.get(0).getX()-1, y0 = cases.get(0).getY();\r\n\t\t\tif(grille.isEmpty(x+x0, y+y0))\r\n\t\t\t\t--x;\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tdefault : \r\n\t\t\treturn;\r\n\t\t}\r\n\t}",
"public void go_to_switch_position() {\n stop_hold_arm();\n Dispatcher.get_instance().add_job(new JMoveArm(RobotMap.Arm.pot_value_switch, 0.9, 0.7, 0.7, 0.2, 0.8, false, false));\n hold_arm();\n }",
"@Override\r\n\tpublic void rotateLeft() {\n\t\tsetDirection((this.getDirection() + 3) % 4);\r\n\t}",
"private void LeftLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}",
"void left() {\n startAnimation(leftSubCubes(), Axis.X, Direction.ANTICLOCKWISE);\n leftCubeSwap();\n }",
"public void setLeft(Lane left) {\r\n\t\tthis.left = left;\r\n\t}",
"private void turnClockwise(){\n\t\tswitch(this.facingDirection){\n\t\tcase NORTH:\n\t\t\tfacingDirection = Direction.EAST;\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tfacingDirection = Direction.WEST;\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tfacingDirection = Direction.NORTH;\n\t\t\tbreak;\n\t\tcase EAST:\n\t\t\tfacingDirection = Direction.SOUTH;\n\t\t}\n\t}",
"void leftInv() {\n startAnimation(leftSubCubes(), Axis.X, Direction.CLOCKWISE);\n leftCubeSwap();\n leftCubeSwap();\n leftCubeSwap();\n }",
"public void left(){\n\t\tmoveX=-1;\n\t\tmoveY=0;\n\t}",
"private void switchTo(Node newNode, HorizontalDirection direction) {\n\n double widthD = scene.getWidth();\n double heightD = scene.getHeight();\n int width = (int) widthD;\n int height = (int) heightD;\n\n WritableImage wi = new WritableImage(width, height);\n ImageView curIV = new ImageView(scene.snapshot(wi));\n\n Pane altRoot = new StackPane();\n altRoot.getChildren().setAll(newNode);\n Scene altScene = new Scene(altRoot, widthD, heightD);\n\n wi = new WritableImage(width, height);\n ImageView altIV = new ImageView(altScene.snapshot(wi));\n\n StackPane pane;\n if (direction == HorizontalDirection.RIGHT) {\n pane = new StackPane(altIV, curIV);\n }\n else {\n pane = new StackPane(curIV, altIV);\n }\n\n pane.setPrefSize(width, height);\n\n root.getChildren().setAll(pane);\n\n Timeline timeline = new Timeline(60);\n\n KeyValue kv;\n if (direction == HorizontalDirection.RIGHT) {\n curIV.setTranslateX(0);\n altIV.setTranslateX(0);\n kv = new KeyValue(curIV.translateXProperty(), width, new EaseInPowInterpolator());\n }\n else {\n curIV.setTranslateX(0);\n altIV.setTranslateX(width);\n kv = new KeyValue(altIV.translateXProperty(), 0, new EaseOutPowInterpolator());\n }\n KeyFrame kf = new KeyFrame(Duration.millis(500), kv);\n timeline.getKeyFrames().add(kf);\n\n timeline.setOnFinished(t -> {\n root.getChildren().setAll(newNode);\n });\n\n timeline.play();\n }",
"protected void left() {\n move(positionX - 1, positionY);\n orientation = BattleGrid.RIGHT_ANGLE * 2;\n }",
"private void processTrackSwitch(SensorEvent e) throws CommandException {\n if (atSensor(e, 18, 7) && direction == NORTH && ticket == -1)\n switchTrack(17, 7, SWITCH_LEFT);\n else if (atSensor(e, 18, 7) && direction == NORTH)\n switchTrack(17, 7, SWITCH_RIGHT);\n else if (atSensor(e, 13, 8) && direction == SOUTH)\n switchTrack(17, 7, SWITCH_LEFT);\n else if (atSensor(e, 13, 7) && direction == SOUTH)\n switchTrack(17, 7, SWITCH_RIGHT);\n else if (atSensor(e, 16, 9) && direction == SOUTH && ticket == 3)\n switchTrack(15, 9, SWITCH_RIGHT);\n else if (atSensor(e, 16, 9) && direction == SOUTH)\n switchTrack(15, 9, SWITCH_LEFT);\n else if (atSensor(e, 3, 9) && direction == NORTH && ticket == 3)\n switchTrack(4, 9, SWITCH_LEFT);\n else if (atSensor(e, 3, 9) && direction == NORTH)\n switchTrack(4, 9, SWITCH_RIGHT);\n else if (atSensor(e, 13, 9) && direction == NORTH)\n switchTrack(15, 9, SWITCH_RIGHT);\n else if (atSensor(e, 6, 9) && direction == SOUTH)\n switchTrack(4, 9, SWITCH_LEFT);\n else if (atSensor(e, 13, 10) && direction == NORTH)\n switchTrack(15, 9, SWITCH_LEFT);\n else if (atSensor(e, 6, 10) && direction == SOUTH)\n switchTrack(4, 9, SWITCH_RIGHT);\n else if (atSensor(e, 1, 11) && direction == SOUTH && ticket == 5)\n switchTrack(3, 11, SWITCH_LEFT);\n else if (atSensor(e, 1, 11) && direction == SOUTH)\n switchTrack(3, 11, SWITCH_RIGHT);\n else if (atSensor(e, 5, 11) && direction == NORTH)\n switchTrack(3, 11, SWITCH_LEFT);\n else if (atSensor(e, 5, 13) && direction == NORTH)\n switchTrack(3, 11, SWITCH_RIGHT);\n }",
"private void westRegion() {\r\n\t\tContainer westContainer = new Container(new BoxLayout(BoxLayout.Y_AXIS));\r\n\t\t\r\n\t\twestContainer.getAllStyles().setPadding(Component.TOP, 50);\r\n\t\twestContainer.getAllStyles().setBorder(Border.createLineBorder(4, ColorUtil.BLACK));\r\n\t\t\r\n\t\tAccelerateCommand accelerateCommand = new AccelerateCommand(gw);\r\n\t\tButton accelerateButton = new Button(accelerateCommand);\r\n\t\t\r\n\t\tLeftCommand leftCommand = new LeftCommand(gw);\r\n\t\tButton leftButton = new Button(leftCommand);\r\n\t\t\r\n\t\twestContainer.add(accelerateButton);\r\n\t\tbuttonStyling(accelerateButton, true, false);\r\n\t\t\r\n\t\twestContainer.add(leftButton);\r\n\t\tbuttonStyling(leftButton, false, false);\r\n\t\t\r\n\t\taccelerateButton.setCommand(accelerateCommand);\r\n\t\taddKeyListener('a', accelerateCommand);\r\n\t\t\r\n\t\tleftButton.setCommand(leftCommand);\r\n\t\taddKeyListener('l', leftCommand);\r\n\t\t\r\n\t\tadd(BorderLayout.WEST, westContainer);\r\n\t}",
"protected void moveWest(){\n\t\tcar.setXLocation(currentX - 1);\n\t\tcurrentX -= 1;\n\t}",
"public abstract void turnLeft();",
"public void setLeft() {\n\t\tstate = State.LEFT;\n\t}",
"public void moveLeft()\n\t{\n\t\tmoveLeft = true;\n\t}",
"private void LeftLeftLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t}",
"public Vertex moveLeft() {\n for (Edge e : current.outEdges) {\n move(e.to.x == current.x - 1, e);\n }\n return current;\n }",
"public void turnLightsOn()\n {\n set(Relay.Value.kForward);\n }",
"private void driveLeft() {\n setSpeed(MIN_SPEED, MAX_SPEED);\n }",
"public void moveLeft() {\n\t\t\n\t}",
"public void goLeft() {\n\t\tx -= dx;\n\t\tbgBack.setDx(true);\n\t\tbgBack.move();\n\t\tif(x < 200) {\n\t\t\tif(!bgBack.getReachBegin()) {\n\t\t\t\tx = 200;\n\t\t\t\tbgFront.setDx(true);\n\t\t\t\tbgFront.move();\n\t\t\t}\n\t\t\telse if(x < 50) {\n\t\t\t\tx = 50;\n\t\t\t}\n\t\t}\n\n\t}",
"public void turnClockWise90(){\n int tmp = this.front;\n this.front = this.right;\n this.right = this.back;\n this.back = this.left;\n this.left = tmp;\n }",
"private void flip()\r\n\t{\r\n\t\tif(heading == Direction.WEST)\r\n\t\t{\r\n\t\t\tsetDirection(Direction.EAST);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsetDirection(Direction.WEST);\r\n\t\t}\r\n\t}",
"public void slideLeft() {\n turnLeft();\n move();\n turnRight();\n }",
"void moveLeft() {\n\t\tsetX(x-1);\r\n\t\tdx=-1;\r\n\t\tdy=0;\r\n\t}",
"public void rotateLeft() {\n\t\tthis.direction = this.direction.rotateLeft();\n\t}",
"public int getStateSwitchPosition();",
"public void moveShiftLeft();",
"public void leftButtonPressed() {\n\t\tif(droneApp.myDrone.isConnected) {\n\t\t\tif(!on) {\n\t\t\t\t// Enable our steamer\n\t\t\t\tstreamer.enable();\n\t\t\t\t// Enable the sensor\n\t\t\t\tdroneApp.myDrone.quickEnable(qsSensor);\n\t\t\t\t\n\t\t\t\ton = true;\n\t\t\t\t\n\t\t\t\tint w = tvSensorValue.getWidth();\n\t\t\t\tint h = tvSensorValue.getHeight();\n\t\t\t\t\n\t\t\t\tif(firstTime) {\t\t\n\t\t\t\t\tfirstTime = false;\n\t\t\t\t\twarmUpWindow1 = new PopupWindow(layout2, w, h, true);\n\t\t\t\t\twarmUpWindow1.setOutsideTouchable(true);\n\t\t\t\t\twarmUpWindow1.setFocusable(false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(warmedUp) {\n\t\t\t\t\twarmedUp = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tshowWarmupWindow(h);\n\t\t\t\tcountdown1Handler.post(countdown1Runnable);\n\t\t\t} else {\n\t\t\t\tresetAllOperations();\n\t\t\t}\n\t\t}\n\t}",
"public void strafeLeftEnc()\r\n\t{\r\n//\t\tdrive.setPos(0, 0, -Config.Auto.encStrafeDistance, -Config.Auto.encStrafeDistance);\r\n//\t\tif(Math.abs(drive.getFrontEncDist() - Config.Auto.encStrafeDistance) < Config.Auto.encTolerance && Math.abs(drive.getBackEncDist() - Config.Auto.encStrafeDistance) < Config.Auto.encTolerance)\r\n//\t\t{\r\n//\t\t\tdrive.setPos(-Config.Auto.encDistanceBetweenTotes, -Config.Auto.encDistanceBetweenTotes, -Config.Auto.encStrafeDistance, -Config.Auto.encStrafeDistance);\r\n//\t\t\t\r\n//\t\t\tif(Math.abs(drive.getLeftEncDist() - Config.Auto.encDistanceBetweenTotes) < Config.Auto.encTolerance && Math.abs(drive.getRightEncDist() - Config.Auto.encDistanceBetweenTotes) < Config.Auto.encTolerance)\r\n//\t\t\t{\r\n//\t\t\t\tdrive.setPos(-Config.Auto.encDistanceBetweenTotes, -Config.Auto.encDistanceBetweenTotes, 0, 0);\r\n//\t\t\t\t\r\n//\t\t\t\tif((Math.abs(drive.getFrontEncDist()) < Config.Auto.encTolerance && Math.abs(drive.getBackEncDist()) < Config.Auto.encTolerance))\r\n//\t\t\t\t\tendRoutine();\t\t\t\t\r\n//\t\t\t}\r\n//\t\t}\r\n\t}",
"public void onMirrorHorizontal() {\n mirror(TransformDesign.MIRROR_HORIZONTAL, 0.0f);\n }",
"public boolean moveLeft() {\n\t\tif (check(col-1, row)) {\n\t\t\tHiVolts.board.squares[row][col] = 0;\n\t\t\tcol = col - 1;\n\t\t\tHiVolts.board.squares[row][col] = 2;\n\t\t\tsuper.moveLeft();\n\t\t}\n\t\treturn true;\n\t}",
"public void moveLeft() {\r\n\t\t\r\n\t\tint leftSteps=10;\r\n\t\t\ttopX-= leftSteps;\r\n\t}",
"void findLeft(Board board) {\n if (tile.getColPos() != 0) {\n Tile leftTile = board.getTileObjByPosition(tile.getRowPos(), tile.getColPos() - 1);\n if (leftTile != null) {\n if (RailroadInk.areConnectedNeighbours(tile.getPlacementStr(), leftTile.getPlacementStr())) {\n Node leftNode;\n if ((leftTile.graphId > 0) || ((leftTile.graphId == -1) && (leftTile.leftId == graphId))) {\n leftNode = nodeMap.get(leftTile.pos);\n } else {\n leftNode = new Node(leftTile);\n if (leftTile.name.equals(\"B2\")) {\n leftTile.rightId = graphId;\n }\n nodeMap.put(leftTile.pos, leftNode);\n }\n\n // Update the connection relationship.\n this.left = leftNode;\n leftNode.right = this;\n if (this.tile.name.equals(\"B2\")) {\n this.tile.leftId = graphId;\n }\n\n if ((!leftTile.name.equals(\"B2\")) && (leftNode.up == null)) {\n leftNode.findUp(board);\n }\n if ((!leftTile.name.equals(\"B2\")) && (leftNode.down == null)) {\n leftNode.findDown(board);\n }\n if (leftNode.left == null) {\n leftNode.findLeft(board);\n }\n }\n }\n }\n }",
"@Test\n public void testTurnLeft() {\n saab.xPos = 0;\n saab.yPos = 0;\n saab.startEngine();\n\n saab.move();\n\n Assertions.assertEquals(1, saab.direction[0]);\n Assertions.assertEquals(0, saab.direction[1]);\n\n Assertions.assertEquals(0.1, saab.xPos);\n Assertions.assertEquals(0, saab.yPos);\n\n\n saab.turnLeft();\n\n // Should be same position\n Assertions.assertEquals(0.1, saab.xPos);\n Assertions.assertEquals(0, saab.yPos);\n\n // Should be different direction\n Assertions.assertEquals(0, saab.direction[0]);\n Assertions.assertEquals(1, saab.direction[1]);\n\n saab.move();\n\n Assertions.assertEquals(0.1, saab.xPos);\n Assertions.assertEquals(0.1, saab.yPos);\n }",
"private void turnOverItself() {\n byte tmp = leftEdge;\n leftEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n\n tmp = rightEdge;\n rightEdge = reversedLeftEdge;\n reversedLeftEdge = tmp;\n\n tmp = topEdge;\n topEdge = reversedTopEdge;\n reversedTopEdge = tmp;\n\n tmp = botEdge;\n botEdge = reversedBotEdge;\n reversedBotEdge = tmp;\n\n tmp = ltCorner;\n ltCorner = rtCorner;\n rtCorner = tmp;\n\n tmp = lbCorner;\n lbCorner = rbCorner;\n rbCorner = tmp;\n }",
"public void strafeLeft(){\r\n\t\t//Following the camera:\r\n\t\tif(loc[1] > 1)\r\n\t\t{\r\n\t\t\tthis.loc[0] -= Math.sin(Math.toRadians(heading))*distance; \r\n\t\t\tthis.loc[2] -= Math.cos(Math.toRadians(heading))*distance;\r\n\t\t}\r\n\t}",
"private void RightLeftLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\t\n \t\t\n \t\n \t}\n \t}",
"public void moveLeft() {\n if (!this.state.equals(\"onLeftWall\")) {\n this.dir = -1;\n this.xTargetSpeed = this.X_MAX_SPEED;\n }\n }",
"public void setX() {\n m_frontLeft.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(45)));\n m_frontRight.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(-45)));\n m_rearLeft.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(-45)));\n m_rearRight.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(45)));\n }",
"public void oneTurn(){\n Integer[] previousTurn = Arrays.copyOf(this.board, this.board.length);\n\n // itero su previousTurn per costruire il board successivo\n for (int i=0;i<previousTurn.length;i++){\n\n // mi salvo la situazione della casella sx, se i==0 prendo l'ultima\n int left = previousTurn[previousTurn.length-1];\n if (i!=0)\n left = previousTurn[i-1];\n\n // mi salvo la situazione della casella dx, se i==ultima prendo zero\n int right = previousTurn[0];\n if (i!=previousTurn.length-1)\n right = previousTurn[i+1];\n \n // se a sx e dx c'è 0, metto 0\n // caso fine sottopopolazione (010->000)\n if (left == 0 && right == 0){\n this.board[i] = 0;\n \n // se a sx e dx c'è 1, metto 1 se c'era 0 e viceversa\n // caso nascita (101->111) e fine sovrappopolazione (111->101)\n } else if (left == 1 && right == 1)\n if (this.board[i] == 1)\n this.board[i] = 0;\n else\n this.board[i] = 1;\n \n // tutte le altre casistiche, lascio invariata la situazione\n \n }\n\n this.turn += 1;\n }",
"public void moveLeft() {\n Coordinate leftCoord = new Coordinate(getX() - 1, getY());\n handleMove(leftCoord, InteractionHandler.LEFT);\n }",
"public Direction moveLeft() {\n switch(this){\n case EAST :\n return NORTH;\n case SOUTH :\n return EAST;\n case WEST :\n return SOUTH;\n case NORTH :\n return WEST;\n }\n return this;\n }",
"private void redSouthTurnLeft(int intersection) {\n int index = getIntersectionIndex(intersection);\n isGreenSouthTurnLeft[index] = false;\n }",
"public void moveLeft()\n\t{\n\t\tx = x - STEP_SIZE;\n\t}",
"@Override\r\n\tpublic void rotateLeft() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir - THETA);\r\n\t\t\r\n\t}",
"public static void turnleftBy(double angle) {\n leftMotor.rotate(-convertAngle(angle), true);\n rightMotor.rotate(convertAngle(angle), false);\n }",
"public void moveLeft() {\n\t\tsetPosX(getPosX() - steps);\n\t}",
"public void moveLeft() {\r\n\t\tif (x > 0) x--; \r\n\t}",
"public void lowerFuelCell() {\n FuelCell.fuelCellFlipSol = false;\n raiseHopper.set(false);\n lowerHopper.set(true);\n }",
"@Test\n\tpublic void lowerLeft2SWCSpecial()\n\t{\n\t\tData d = new Data();\n\t\td.set(5, 112);\n\t\td.set(1, 113);\n\t\td.set(13, 101);\n\t\td.set(14, 102);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(114);\n\t\tassertTrue(2==test_arr.get(0).getX() && 10==test_arr.get(0).getY()\n\t\t\t&& 1==test_arr.get(1).getX() && 10==test_arr.get(1).getY());\n\t}",
"private void applyLeftTurn(WorldSpatial.Direction orientation, float delta) {\n\t\tswitch(orientation){\n\t\tcase EAST:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.NORTH)){\n\t\t\t\tturnLeft(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase NORTH:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.WEST)){\n\t\t\t\tturnLeft(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.EAST)){\n\t\t\t\tturnLeft(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.SOUTH)){\n\t\t\t\tturnLeft(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t\n\t\t}\n\t\t\n\t}",
"void changeDirection();",
"public void setLeft(int x) {\r\n leftSide = x;\r\n }",
"private void playerMoveLeft()\n {\n \n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentX(getCurrentX() - 1);\n if (this.getCurrentX() > -1) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentX(this.getCurrentX() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else {\n this.setCurrentX(getCurrentX() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n }",
"public void turnLeft(Agent agent) throws RemoteException {\n\t\tObject obj = agents.get(agent.getName());\n\t\tPoint point = (Point) obj;\n\t\tif (agent.getRow() != point.x || agent.getColumn() != point.y) {\n\t\t\tSystem.out.println(\"Incompativeis!!!\");\n\t\t\treturn;\n\t\t}\n\t\tsetDirection(agent.getRow(), agent.getColumn(), agent.getName(),\n\t\t\t\t\t\t\t\t\t\t\t\t\tagent.getDirection());\n\t}",
"private void preSwitchPanel()\n {\n switchPanel = true;\n configureNext = true;\n configurePrevious = true;\n }",
"@Test\n\tpublic void lowerLeft1SWCSpecial()\t\n\t{\n\t\tData d = new Data();\n\t\td.set(5, 100);\n\t\td.set(1, 89);\n\t\td.set(29, 79);\n\t\td.set(8, 78);\n\t\td.set(23, 90);\n\t\td.set(21, 101);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(67);\n\t\tassertTrue(0==test_arr.get(0).getX() && 7==test_arr.get(0).getY()\n\t\t\t&& 0==test_arr.get(1).getX() && 8==test_arr.get(1).getY()\n\t\t\t&& 0==test_arr.get(2).getX() && 9==test_arr.get(2).getY());\n\t}",
"public void moveLeft() {\n if (xcoor >= movingSpeed) {\n xcoor = xcoor - movingSpeed * 2;\n }\n }",
"void moveLeft();",
"public Direction left() {\r\n\t\tif (this.direction == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tswitch (this.direction) {\r\n\t\tcase NORTH:\r\n\t\t\tthis.direction = Direction.WEST;\r\n\t\t\tbreak;\r\n\t\tcase WEST:\r\n\t\t\tthis.direction = Direction.SOUTH;\r\n\t\t\tbreak;\r\n\t\tcase SOUTH:\r\n\t\t\tthis.direction = Direction.EAST;\r\n\t\t\tbreak;\r\n\t\tcase EAST:\r\n\t\t\tthis.direction = Direction.NORTH;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn this.direction;\r\n\t}",
"public void leftPressed()\r\n {\r\n worldPanel.newMapPos(-zoom,0);\r\n miniMap.newMapPos(-1,0);\r\n }",
"private void shiftLeftAnimal(int row) {\r\n\t\t//some source code and matrix highlighting to show which java code\r\n\t\t//is equivalent to the current state of the animation\r\n\t\tmainMatrix.highlightCellColumnRange(row, 0, 3, new TicksTiming(0), new TicksTiming(0));\r\n\t\tshiftLeftSc.highlight(0);\r\n\t\tshiftLeftSc.highlight(9);\r\n\t\tlang.nextStep();\r\n\t\tshiftLeftSc.unhighlight(0);\r\n\t\tshiftLeftSc.unhighlight(9);\r\n\t\tshiftLeftSc.highlight(1);\r\n\t\tshiftLeftSc.highlight(7);\r\n\t\t//initialize element that shows current state of loop variable\r\n\t\tiText.setText(\"i = 0\", new TicksTiming(0), new TicksTiming(0));\r\n\t\tiText.show();\r\n\t\thighlightText(iText);\r\n\t\t//loop for shifts\r\n\t\tfor (int i = 0; i < row; i++) {\r\n\t\t\tlang.nextStep();\r\n\t\t\t//some source code and matrix highlighting to show which java code\r\n\t\t\t//is equivalent to the current state of the animation\r\n\t\t\tshiftLeftSc.unhighlight(1);\r\n\t\t\tshiftLeftSc.unhighlight(7);\r\n\t\t\tshiftLeftSc.highlight(2);\r\n\t\t\tunhighlightText(iText);\r\n\t\t\ttmpText.show();\r\n\t\t\ttmpMatrix.show();\r\n\t\t\t\r\n\t\t\t//add lines to swap values through the matrix. This is where the action happens!\r\n\t\t\t//increment counter\r\n\t\t\tcounter.accessInc(1);\r\n\t\t\tcounter.assignmentsInc(1);\r\n\t\t\tlang.addLine(\"swapGridValues \\\"mainMatrix[\" + row + \"][0]\\\" and \\\"tmpMatrix[0][0]\\\" refresh after 0 ticks within 100 ticks\");\r\n\t\t\tlang.nextStep();\r\n\t\t\t//increment counter\r\n\t\t\tcounter.accessInc(1);\r\n\t\t\tcounter.assignmentsInc(1);\r\n\t\t\tshiftLeftSc.unhighlight(2);\r\n\t\t\tshiftLeftSc.highlight(3);\r\n\t\t\tlang.addLine(\"swapGridValues \\\"mainMatrix[\" + row + \"][0]\\\" and \\\"mainMatrix[\" + row + \"][1]\\\" refresh after 0 ticks within 100 ticks\");\r\n\t\t\tlang.nextStep();\r\n\t\t\t//increment counter\r\n\t\t\tcounter.accessInc(1);\r\n\t\t\tcounter.assignmentsInc(1);\r\n\t\t\tshiftLeftSc.unhighlight(3);\r\n\t\t\tshiftLeftSc.highlight(4);\r\n\t\t\tlang.addLine(\"swapGridValues \\\"mainMatrix[\" + row + \"][1]\\\" and \\\"mainMatrix[\" + row + \"][2]\\\" refresh after 0 ticks within 100 ticks\");\r\n\t\t\tlang.nextStep();\r\n\t\t\t//increment counter\r\n\t\t\tcounter.accessInc(1);\r\n\t\t\tcounter.assignmentsInc(1);\r\n\t\t\tshiftLeftSc.unhighlight(4);\r\n\t\t\tshiftLeftSc.highlight(5);\r\n\t\t\tlang.addLine(\"swapGridValues \\\"mainMatrix[\" + row + \"][2]\\\" and \\\"mainMatrix[\" + row + \"][3]\\\" refresh after 0 ticks within 100 ticks\");\r\n\t\t\tlang.nextStep();\r\n\t\t\t//increment counter\r\n\t\t\tcounter.accessInc(1);\r\n\t\t\tcounter.assignmentsInc(1);\r\n\t\t\tshiftLeftSc.unhighlight(5);\r\n\t\t\tshiftLeftSc.highlight(6);\r\n\t\t\tlang.addLine(\"swapGridValues \\\"mainMatrix[\" + row + \"][3]\\\" and \\\"tmpMatrix[0][0]\\\" refresh after 0 ticks within 100 ticks\");\r\n\r\n\t\t\tlang.nextStep();\r\n\t\t\ttmpText.hide();\r\n\t\t\ttmpMatrix.hide();\r\n\t\t\t//some source code and matrix highlighting to show which java code\r\n\t\t\t//is equivalent to the current state of the animation\r\n\t\t\tshiftLeftSc.highlight(1);\r\n\t\t\tshiftLeftSc.highlight(7);\r\n\t\t\tshiftLeftSc.unhighlight(6);\r\n\t\t\tiText.setText(\"i = \" + (i + 1), new TicksTiming(0), new TicksTiming(0));\r\n\t\t\thighlightText(iText);\r\n\t\t}\r\n\t\tlang.nextStep();\r\n\t\t//some source code and matrix highlighting to show which java code\r\n\t\t//is equivalent to the current state of the animation\r\n\t\tshiftLeftSc.unhighlight(0);\r\n\t\tshiftLeftSc.unhighlight(9);\r\n\t\tshiftLeftSc.unhighlight(1);\r\n\t\tshiftLeftSc.unhighlight(7);\r\n\t\tshiftLeftSc.highlight(8);\r\n\t\tunhighlightText(iText);\r\n\t\tiText.hide();\r\n\t\tlang.nextStep();\r\n\t\tshiftLeftSc.unhighlight(8);\r\n\t\tmainMatrix.unhighlightCellColumnRange(row, 0, 3, new TicksTiming(0), new TicksTiming(0));\r\n\t}",
"public void moveLeft() {\n if (rec.getUpperLeft().getX() - 5 < leftBorder) {\n rec.getUpperLeft().setX(leftBorder);\n } else {\n rec.getUpperLeft().setX(rec.getUpperLeft().getX() - 5);\n }\n\n }",
"public void moveLeft(){\n\t\tif(GameSystem.TWO_PLAYER_MODE){\n\t\t\tif(Game.getPlayer2().dying){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(animation==ANIMATION.DAMAGED||Game.getPlayer().dying||channelling||charging) return;\n\t\tmoving=true;\n\t\tbuttonReleased=false;\n\t\torientation=ORIENTATION.LEFT;\n\t\tif(animation!=ANIMATION.MOVELEFT) {\n\t\t\tanimation=ANIMATION.MOVELEFT;\n\t\t\tif(run!=null) sequence.startSequence(run);\n\t\t}\n\t\tfacing=FACING.LEFT;\n\t\tdirection=\"left\";\n\t\tsetNextXY();\n\t\tsetDestination(nextX,nextY);\n\t\tvelX=-1*spd/2;\n\t\tvelY=0;\n\t}",
"@Override\n\tpublic String calculateLeftTurn() {\n\t\t// check the current side with the side of the retrieved value from\n\t\t// properties file.\n\t\tif (side.substring(1).equals(properties.getSideFromProperties().get(1))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(4);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(2))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(1);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(3))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(2);\n\n\t\t} else {\n\t\t\tthis.side = properties.getSideFromProperties().get(3);\n\n\t\t}\n\t\t// return the new side to update the image shown with the starting\n\t\t// letter of the room and the side to be the same as the name of the\n\t\t// image.\n\t\treturn this.room.substring(0, 1).toLowerCase() + this.side;\n\t}",
"@Test\n\t public void processLeftCommands()\n\t {\n\t Rover rover = createFrontFacingRoverAt(0, 0);\n\t rover.executeCommands(\"l\");\n\t assertTrue(0 == rover.facing.x);\n\t assertTrue(-1 == rover.facing.y);\n\n\t }",
"public void moveLeft() {\n locX = locX - 1;\n }",
"private void moveLeft(GObject bottom) {\r\n\t\tif(facingEast) {\r\n\t\t\tdouble x = player.getX();\r\n\t\t\tdouble y = player.getY();\r\n\t\t\tremove(player);\r\n\t\t\tplayer = new GImage(\"PlayerWest.png\");\r\n\t\t\tplayer.scale(.75);\r\n\t\t\tadd(player, x, y);\r\n\t\t\tfacingEast = false;\r\n\t\t}\r\n\t\tif(player.getX() > 5 && bottom != null)\r\n\t\t\tplayer.move(-PLAYER_X_MOTION, 0);\r\n\t}",
"public void adjustLeft() {\n\n for (int y = 0; y < MAP_HEIGHT; y++)\n for (int x = 0; x < MAP_WIDTH; x++) {\n tiles[x][y].x = tiles[x][y].x - 4;\n backGroundTiles[x][y].x = backGroundTiles[x][y].x - 4;\n grassTiles[x][y].x = grassTiles[x][y].x - 4;\n }\n }",
"public void moveLeft()\n\t{\n\t\tcol--;\n\t}",
"public void turn() {\n rightMotor.resetTachoCount();\n rightMotor.setSpeed(DEFAULT_TURN_SPEED);\n leftMotor.setSpeed(DEFAULT_TURN_SPEED);\n rightMotor.forward();\n leftMotor.backward();\n\n }"
] | [
"0.6592922",
"0.65738434",
"0.6486221",
"0.6448863",
"0.64448845",
"0.6376906",
"0.6328125",
"0.62861276",
"0.6244864",
"0.6142392",
"0.6140359",
"0.6116868",
"0.6093184",
"0.60712546",
"0.60694534",
"0.60030985",
"0.59907",
"0.59530383",
"0.59471697",
"0.59215117",
"0.59144545",
"0.58926964",
"0.5865598",
"0.58644384",
"0.58572066",
"0.58475035",
"0.58427393",
"0.58366305",
"0.58126193",
"0.5809995",
"0.57990116",
"0.57959545",
"0.5789936",
"0.5781205",
"0.5769518",
"0.5744074",
"0.57330936",
"0.57284546",
"0.5705163",
"0.5700381",
"0.56880677",
"0.56863815",
"0.56721115",
"0.56479645",
"0.5643909",
"0.5633596",
"0.56320333",
"0.56273776",
"0.5623968",
"0.5622548",
"0.5621712",
"0.5610466",
"0.56052387",
"0.5603803",
"0.5603198",
"0.5591205",
"0.5591149",
"0.55910546",
"0.55908424",
"0.5576595",
"0.5572505",
"0.5566821",
"0.555924",
"0.5558803",
"0.5554854",
"0.55541587",
"0.55450064",
"0.5537825",
"0.55255497",
"0.5524863",
"0.5521158",
"0.54985577",
"0.5495142",
"0.54780763",
"0.5476982",
"0.5472475",
"0.54693425",
"0.54616106",
"0.54589814",
"0.54497844",
"0.5447105",
"0.5447092",
"0.54457676",
"0.5438799",
"0.5438158",
"0.54373443",
"0.5426548",
"0.5424725",
"0.5410122",
"0.5410028",
"0.54066724",
"0.54038876",
"0.54013455",
"0.5397795",
"0.5394028",
"0.53889155",
"0.53853875",
"0.5378746",
"0.53755015",
"0.53734463"
] | 0.650184 | 2 |
SwitchLeft0 is connected to a horizontal straight in west direction | @Test
public void connectTest_West_HorizontalStraight() throws Exception {
final Factory<Node> railNodeFactory = new DefaultRailNodeFactory();
final RailNode switchLeft0RailNode = (RailNode) railNodeFactory.create(1, 1, ShapeType.SWITCH_LEFT_0);
final RailNode horizontalRailNode = (RailNode) railNodeFactory.create(2, 1, ShapeType.STRAIGHT_HORIZONTAL);
final Model model = new DefaultModel();
model.setNode(1, 1, switchLeft0RailNode);
model.setNode(2, 1, horizontalRailNode);
switchLeft0RailNode.connect(model);
horizontalRailNode.connect(model);
System.out.println(switchLeft0RailNode.toString());
System.out.println(horizontalRailNode.toString());
assertEquals(1, switchLeft0RailNode.getGraphNodeOne().getChildren().size());
assertEquals(0, switchLeft0RailNode.getGraphNodeTwo().getChildren().size());
assertEquals(2, switchLeft0RailNode.getGraphNodeOne().getChildren().get(0).getId());
assertEquals(0, horizontalRailNode.getGraphNodeOne().getChildren().size());
assertEquals(1, horizontalRailNode.getGraphNodeTwo().getChildren().size());
assertEquals(1, horizontalRailNode.getGraphNodeTwo().getChildren().get(0).getId());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void turnLeft() {\n\t\tthis.setSteeringDirection(getSteeringDirection()-5);\n\t\t}",
"public void turnLeft() {\r\n setDirection( modulo( myDirection-1, 4 ) );\r\n }",
"private void rotateLeft() {\n robot.leftBack.setPower(-TURN_POWER);\n robot.leftFront.setPower(-TURN_POWER);\n robot.rightBack.setPower(TURN_POWER);\n robot.rightFront.setPower(TURN_POWER);\n }",
"public static void turnLeft() {\n LEFT_MOTOR.backward();\n RIGHT_MOTOR.forward();\n }",
"@Test\n\tpublic void connectTest_North_HorizontalStraight() throws Exception {\n\n\t\tfinal Factory<Node> railNodeFactory = new DefaultRailNodeFactory();\n\n\t\tfinal RailNode switchLeft0RailNode = (RailNode) railNodeFactory.create(1, 1, ShapeType.SWITCH_LEFT_0);\n\t\tfinal RailNode horizontalRailNode = (RailNode) railNodeFactory.create(1, 0, ShapeType.STRAIGHT_HORIZONTAL);\n\n\t\tfinal Model model = new DefaultModel();\n\t\tmodel.setNode(1, 1, switchLeft0RailNode);\n\t\tmodel.setNode(1, 0, horizontalRailNode);\n\n\t\tswitchLeft0RailNode.connect(model);\n\t\thorizontalRailNode.connect(model);\n\n\t\tSystem.out.println(switchLeft0RailNode.toString());\n\t\tSystem.out.println(horizontalRailNode.toString());\n\n\t\tassertEquals(0, switchLeft0RailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(0, switchLeft0RailNode.getGraphNodeTwo().getChildren().size());\n\n\t\tassertEquals(0, horizontalRailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(0, horizontalRailNode.getGraphNodeTwo().getChildren().size());\n\t}",
"private void turnLeft(View v){\n\t\tswitch(this.facingDirection){\n\t\tcase NORTH:\n\t\t\tfacingDirection = Direction.WEST;\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tfacingDirection = Direction.EAST;\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tfacingDirection = Direction.SOUTH;\n\t\t\tbreak;\n\t\tcase EAST:\n\t\t\tfacingDirection = Direction.NORTH;\n\t\t}\n\t}",
"public void switchSides() {\n\t\tint temp = 0;\r\n\t\ttemp = leftValue;\r\n\t\tleftValue = rightValue;\r\n\t\trightValue = temp;\r\n\t}",
"@Test\n\tpublic void connectTest_East_HorizontalStraight() throws Exception {\n\n\t\tfinal Factory<Node> railNodeFactory = new DefaultRailNodeFactory();\n\n\t\tfinal RailNode switchLeft0RailNode = (RailNode) railNodeFactory.create(1, 1, ShapeType.SWITCH_LEFT_0);\n\t\tfinal RailNode horizontalRailNode = (RailNode) railNodeFactory.create(0, 1, ShapeType.STRAIGHT_HORIZONTAL);\n\n\t\tfinal Model model = new DefaultModel();\n\t\tmodel.setNode(1, 1, switchLeft0RailNode);\n\t\tmodel.setNode(0, 1, horizontalRailNode);\n\n\t\tswitchLeft0RailNode.connect(model);\n\t\thorizontalRailNode.connect(model);\n\n\t\tSystem.out.println(switchLeft0RailNode.toString());\n\t\tSystem.out.println(horizontalRailNode.toString());\n\n\t\tassertEquals(0, switchLeft0RailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(1, switchLeft0RailNode.getGraphNodeTwo().getChildren().size());\n\t\tassertEquals(3, switchLeft0RailNode.getGraphNodeTwo().getChildren().get(0).getId());\n\n\t\tassertEquals(1, horizontalRailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(0, horizontalRailNode.getGraphNodeTwo().getChildren().size());\n\t\tassertEquals(0, horizontalRailNode.getGraphNodeOne().getChildren().get(0).getId());\n\t}",
"public void left () {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return;\n Location loc = getLocation();\n Location next = loc.getAdjacentLocation(Location.WEST);\n if (canMove(next)) {\n moveTo(next);\n }\n }",
"public void steady(){\n if(steady){\n if(!bellySwitch.get()) {\n leftMotor.set(-.3);\n rightMotor.set(-.3);\n }else {\n leftMotor.set(0);\n rightMotor.set(0);\n } \n }\n }",
"public void changeDirection()\n {\n if(goLeft){\n goLeft = false;\n }else{\n goLeft = true;\n }\n }",
"private void westRegion() {\r\n\t\tContainer westContainer = new Container(new BoxLayout(BoxLayout.Y_AXIS));\r\n\t\t\r\n\t\twestContainer.getAllStyles().setPadding(Component.TOP, 50);\r\n\t\twestContainer.getAllStyles().setBorder(Border.createLineBorder(4, ColorUtil.BLACK));\r\n\t\t\r\n\t\tAccelerateCommand accelerateCommand = new AccelerateCommand(gw);\r\n\t\tButton accelerateButton = new Button(accelerateCommand);\r\n\t\t\r\n\t\tLeftCommand leftCommand = new LeftCommand(gw);\r\n\t\tButton leftButton = new Button(leftCommand);\r\n\t\t\r\n\t\twestContainer.add(accelerateButton);\r\n\t\tbuttonStyling(accelerateButton, true, false);\r\n\t\t\r\n\t\twestContainer.add(leftButton);\r\n\t\tbuttonStyling(leftButton, false, false);\r\n\t\t\r\n\t\taccelerateButton.setCommand(accelerateCommand);\r\n\t\taddKeyListener('a', accelerateCommand);\r\n\t\t\r\n\t\tleftButton.setCommand(leftCommand);\r\n\t\taddKeyListener('l', leftCommand);\r\n\t\t\r\n\t\tadd(BorderLayout.WEST, westContainer);\r\n\t}",
"public void turnLeft()\r\n\t{\r\n\t\t\r\n\t\theading -= 2; //JW\r\n\t\t//Following the camera:\r\n\t\t\t//heading -= Math.sin(Math.toRadians(15))*distance; \r\n\t\t\t//heading -= Math.cos(Math.toRadians(15))*distance;\r\n\t}",
"private void redWestTurnLeft(int intersection) {\n int index = getIntersectionIndex(intersection);\n isGreenWestTurnLeft[index] = false;\n }",
"public void turnLeft ()\n\t{\n\t\t//changeFallSpeed (-1);\n\t\tturnInt = -1;\n\t}",
"public void rotateLeft() {\n // I fucked up? Rotations are reversed, just gonna switch em\n// tileLogic = getRotateLeft();\n tileLogic = getRotateRight();\n// rotateLeftTex();\n rotateRightTex();\n }",
"protected void moveWest(){\n\t\tcar.setXLocation(currentX - 1);\n\t\tcurrentX -= 1;\n\t}",
"public void turnLeft();",
"@Override\r\n\tpublic void moveLeft() {\n\t\tswitch(state) {\r\n\t\tcase 0: case 2:\r\n\t\t\t{\r\n\t\t\t\tboolean ok = true;\r\n\t\t\t\tfor(Case c: cases) {\r\n\t\t\t\t\tif(!grille.isEmpty(c.getX()+x-1, c.getY()+y))\r\n\t\t\t\t\t\tok = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(ok)\r\n\t\t\t\t\t--x;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t{\r\n\t\t\tint x3 = cases.get(3).getX()-1, y3 = cases.get(3).getY();\r\n\t\t\tif(grille.isEmpty(x+x3, y+y3))\r\n\t\t\t\t--x;\r\n\t\t\t\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tcase 3:\r\n\t\t{\r\n\t\t\tint x0 = cases.get(0).getX()-1, y0 = cases.get(0).getY();\r\n\t\t\tif(grille.isEmpty(x+x0, y+y0))\r\n\t\t\t\t--x;\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tdefault : \r\n\t\t\treturn;\r\n\t\t}\r\n\t}",
"public void leftPressed() {\n System.out.println(\"leftPressed()\");\n current.translate(0, -1);\n display.showBlocks();\n }",
"public void turnLeft() { turn(\"LEFT\"); }",
"@Override\r\n\tpublic void rotateLeft() {\n\t\tsetDirection((this.getDirection() + 3) % 4);\r\n\t}",
"private void turnLeft() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n switch (direction) {\n case EAST:\n direction = Position.Direction.NORTH;\n break;\n case WEST:\n direction = Position.Direction.SOUTH;\n break;\n case NORTH:\n direction = Position.Direction.WEST;\n break;\n case SOUTH:\n direction = Position.Direction.EAST;\n break;\n }\n\n currentPosition.setDirection(direction);\n }",
"public void moveShiftLeft();",
"private void handleLeft() {\r\n\t\tcontroller.getCurrentPosition().realocate((controller.getCurrentPosition().getY()), controller.getCurrentPosition().getX()-1);\r\n\t\t// if User reaches the end of the board reset position\r\n\t\tif(controller.getCurrentPosition().getX()==-1) {\r\n\t\t\tcontroller.getCurrentPosition().realocate((controller.getCurrentPosition().getY()), controller.getNumberColumns()-1);\r\n\t\t}\r\n\t\t// remove the pseudo Class from all nodes so that only the cell that was pressed last looks 'pressed'\r\n\t\tfor (Node n : controller.getGridBoard().getChildren()) {\r\n\t\t\t((StackPane) n).pseudoClassStateChanged(PseudoClass.getPseudoClass(\"pressed\"), false);\r\n\t\t\tif (GridPane.getColumnIndex(n) == controller.getCurrentPosition().getX() && GridPane.getRowIndex(n) == controller.getCurrentPosition().getY()) {\r\n\t\t\t\t((StackPane) n).pseudoClassStateChanged(PseudoClass.getPseudoClass(\"pressed\"), true);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void moveLeft()\n\t{\n\t\tmoveLeft = true;\n\t}",
"public Vertex moveLeft() {\n for (Edge e : current.outEdges) {\n move(e.to.x == current.x - 1, e);\n }\n return current;\n }",
"@Override\r\n\tpublic void onLeft() {\n\t\tif (snakeView.smer != snakeView.VZHOD) {\r\n\t\t\tsnakeView.naslednjaSmer = snakeView.ZAHOD;\r\n\t\t}\r\n\t}",
"@Test\n\tpublic void lowerLeft1SWCSpecial()\t\n\t{\n\t\tData d = new Data();\n\t\td.set(5, 100);\n\t\td.set(1, 89);\n\t\td.set(29, 79);\n\t\td.set(8, 78);\n\t\td.set(23, 90);\n\t\td.set(21, 101);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(67);\n\t\tassertTrue(0==test_arr.get(0).getX() && 7==test_arr.get(0).getY()\n\t\t\t&& 0==test_arr.get(1).getX() && 8==test_arr.get(1).getY()\n\t\t\t&& 0==test_arr.get(2).getX() && 9==test_arr.get(2).getY());\n\t}",
"public LeftSwitchToFirstCubePt2Arc() {\n\t\tsuper();\n\t\tthis.highGear = true;\n\t\tcenterProfile = new SrxMotionProfile(centerPoints.length, centerPoints);\n\t}",
"public void left(){\n\t\tmoveX=-1;\n\t\tmoveY=0;\n\t}",
"public void onMirrorHorizontal() {\n mirror(TransformDesign.MIRROR_HORIZONTAL, 0.0f);\n }",
"public void moveLeft() {\n\t\t\n\t}",
"public void slideLeft() {\n turnLeft();\n move();\n turnRight();\n }",
"protected void left() {\n move(positionX - 1, positionY);\n orientation = BattleGrid.RIGHT_ANGLE * 2;\n }",
"public void sideLeft(double targetDistance, double power) {\n setDriveMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n setDriveMode(DcMotor.RunMode.RUN_USING_ENCODER);\n double currentDistance = 0;\n while (Math.abs(currentDistance) < targetDistance && opModeIsActive()) {\n currentDistance = frontRight.getCurrentPosition();\n frontLeft.setPower(power);\n frontRight.setPower(-power);\n backLeft.setPower(-power);\n backRight.setPower(power);\n }\n stopMotors();\n }",
"public boolean moveLeft() {\n\t\tif (check(col-1, row)) {\n\t\t\tHiVolts.board.squares[row][col] = 0;\n\t\t\tcol = col - 1;\n\t\t\tHiVolts.board.squares[row][col] = 2;\n\t\t\tsuper.moveLeft();\n\t\t}\n\t\treturn true;\n\t}",
"private void createSwitches() {\n \t\tswitches = new Point[4];\n \t\tswitches[0] = new Point(centreMin, centreMin);\n \t\tswitches[1] = new Point(centreMin, centreMax-1);\n \t\tswitches[2] = new Point(centreMax-1, centreMin);\n \t\tswitches[3] = new Point(centreMax-1, centreMax-1);\n \t}",
"public void turnClockWise90(){\n int tmp = this.front;\n this.front = this.right;\n this.right = this.back;\n this.back = this.left;\n this.left = tmp;\n }",
"private void driveLeft() {\n setSpeed(MIN_SPEED, MAX_SPEED);\n }",
"@Test\n\tpublic void connectTest_North_VerticalStraight() throws Exception {\n\n\t\tfinal Factory<Node> railNodeFactory = new DefaultRailNodeFactory();\n\n\t\tfinal RailNode switchLeft0RailNode = (RailNode) railNodeFactory.create(1, 1, ShapeType.SWITCH_LEFT_0);\n\t\tfinal RailNode horizontalRailNode = (RailNode) railNodeFactory.create(1, 0, ShapeType.STRAIGHT_VERTICAL);\n\n\t\tfinal Model model = new DefaultModel();\n\t\tmodel.setNode(1, 1, switchLeft0RailNode);\n\t\tmodel.setNode(1, 0, horizontalRailNode);\n\n\t\tswitchLeft0RailNode.connect(model);\n\t\thorizontalRailNode.connect(model);\n\n\t\tSystem.out.println(switchLeft0RailNode.toString());\n\t\tSystem.out.println(horizontalRailNode.toString());\n\n\t\tassertEquals(1, switchLeft0RailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(0, switchLeft0RailNode.getGraphNodeTwo().getChildren().size());\n\t\tassertEquals(2, switchLeft0RailNode.getGraphNodeOne().getChildren().get(0).getId());\n\n\t\tassertEquals(0, horizontalRailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(1, horizontalRailNode.getGraphNodeTwo().getChildren().size());\n\t\tassertEquals(1, horizontalRailNode.getGraphNodeTwo().getChildren().get(0).getId());\n\t}",
"public void setLeft(Lane left) {\r\n\t\tthis.left = left;\r\n\t}",
"public void rotateLeft() {\n\t\tthis.direction = this.direction.rotateLeft();\n\t}",
"private void LeftRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}",
"@Test\n\tpublic void lowerLeft2SWCSpecial()\n\t{\n\t\tData d = new Data();\n\t\td.set(5, 112);\n\t\td.set(1, 113);\n\t\td.set(13, 101);\n\t\td.set(14, 102);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(114);\n\t\tassertTrue(2==test_arr.get(0).getX() && 10==test_arr.get(0).getY()\n\t\t\t&& 1==test_arr.get(1).getX() && 10==test_arr.get(1).getY());\n\t}",
"public void oneTurn(){\n Integer[] previousTurn = Arrays.copyOf(this.board, this.board.length);\n\n // itero su previousTurn per costruire il board successivo\n for (int i=0;i<previousTurn.length;i++){\n\n // mi salvo la situazione della casella sx, se i==0 prendo l'ultima\n int left = previousTurn[previousTurn.length-1];\n if (i!=0)\n left = previousTurn[i-1];\n\n // mi salvo la situazione della casella dx, se i==ultima prendo zero\n int right = previousTurn[0];\n if (i!=previousTurn.length-1)\n right = previousTurn[i+1];\n \n // se a sx e dx c'è 0, metto 0\n // caso fine sottopopolazione (010->000)\n if (left == 0 && right == 0){\n this.board[i] = 0;\n \n // se a sx e dx c'è 1, metto 1 se c'era 0 e viceversa\n // caso nascita (101->111) e fine sovrappopolazione (111->101)\n } else if (left == 1 && right == 1)\n if (this.board[i] == 1)\n this.board[i] = 0;\n else\n this.board[i] = 1;\n \n // tutte le altre casistiche, lascio invariata la situazione\n \n }\n\n this.turn += 1;\n }",
"void moveLeft() {\n\t\tsetX(x-1);\r\n\t\tdx=-1;\r\n\t\tdy=0;\r\n\t}",
"public void moveLeft() {\r\n\t\tif (x > 0) x--; \r\n\t}",
"public void moveLeft() {\n if (!this.state.equals(\"onLeftWall\")) {\n this.dir = -1;\n this.xTargetSpeed = this.X_MAX_SPEED;\n }\n }",
"public void setLeft() {\n\t\tstate = State.LEFT;\n\t}",
"private void LeftLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}",
"public void moveWestButton (View View) {\n if (model.canMoveWest()) {\n model.moveWest();\n updateLabel();\n updateButtonStatus();\n }\n }",
"private void playerMoveLeft()\n {\n \n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentX(getCurrentX() - 1);\n if (this.getCurrentX() > -1) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentX(this.getCurrentX() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else {\n this.setCurrentX(getCurrentX() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n }",
"void left() {\n startAnimation(leftSubCubes(), Axis.X, Direction.ANTICLOCKWISE);\n leftCubeSwap();\n }",
"public void moveLeft() {\r\n\t\t\r\n\t\tint leftSteps=10;\r\n\t\t\ttopX-= leftSteps;\r\n\t}",
"@Override\r\n\tpublic void rotateLeft() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir - THETA);\r\n\t\t\r\n\t}",
"public void goLeft() {\n\t\tx -= dx;\n\t\tbgBack.setDx(true);\n\t\tbgBack.move();\n\t\tif(x < 200) {\n\t\t\tif(!bgBack.getReachBegin()) {\n\t\t\t\tx = 200;\n\t\t\t\tbgFront.setDx(true);\n\t\t\t\tbgFront.move();\n\t\t\t}\n\t\t\telse if(x < 50) {\n\t\t\t\tx = 50;\n\t\t\t}\n\t\t}\n\n\t}",
"private void shiftLeftAnimal(int row) {\r\n\t\t//some source code and matrix highlighting to show which java code\r\n\t\t//is equivalent to the current state of the animation\r\n\t\tmainMatrix.highlightCellColumnRange(row, 0, 3, new TicksTiming(0), new TicksTiming(0));\r\n\t\tshiftLeftSc.highlight(0);\r\n\t\tshiftLeftSc.highlight(9);\r\n\t\tlang.nextStep();\r\n\t\tshiftLeftSc.unhighlight(0);\r\n\t\tshiftLeftSc.unhighlight(9);\r\n\t\tshiftLeftSc.highlight(1);\r\n\t\tshiftLeftSc.highlight(7);\r\n\t\t//initialize element that shows current state of loop variable\r\n\t\tiText.setText(\"i = 0\", new TicksTiming(0), new TicksTiming(0));\r\n\t\tiText.show();\r\n\t\thighlightText(iText);\r\n\t\t//loop for shifts\r\n\t\tfor (int i = 0; i < row; i++) {\r\n\t\t\tlang.nextStep();\r\n\t\t\t//some source code and matrix highlighting to show which java code\r\n\t\t\t//is equivalent to the current state of the animation\r\n\t\t\tshiftLeftSc.unhighlight(1);\r\n\t\t\tshiftLeftSc.unhighlight(7);\r\n\t\t\tshiftLeftSc.highlight(2);\r\n\t\t\tunhighlightText(iText);\r\n\t\t\ttmpText.show();\r\n\t\t\ttmpMatrix.show();\r\n\t\t\t\r\n\t\t\t//add lines to swap values through the matrix. This is where the action happens!\r\n\t\t\t//increment counter\r\n\t\t\tcounter.accessInc(1);\r\n\t\t\tcounter.assignmentsInc(1);\r\n\t\t\tlang.addLine(\"swapGridValues \\\"mainMatrix[\" + row + \"][0]\\\" and \\\"tmpMatrix[0][0]\\\" refresh after 0 ticks within 100 ticks\");\r\n\t\t\tlang.nextStep();\r\n\t\t\t//increment counter\r\n\t\t\tcounter.accessInc(1);\r\n\t\t\tcounter.assignmentsInc(1);\r\n\t\t\tshiftLeftSc.unhighlight(2);\r\n\t\t\tshiftLeftSc.highlight(3);\r\n\t\t\tlang.addLine(\"swapGridValues \\\"mainMatrix[\" + row + \"][0]\\\" and \\\"mainMatrix[\" + row + \"][1]\\\" refresh after 0 ticks within 100 ticks\");\r\n\t\t\tlang.nextStep();\r\n\t\t\t//increment counter\r\n\t\t\tcounter.accessInc(1);\r\n\t\t\tcounter.assignmentsInc(1);\r\n\t\t\tshiftLeftSc.unhighlight(3);\r\n\t\t\tshiftLeftSc.highlight(4);\r\n\t\t\tlang.addLine(\"swapGridValues \\\"mainMatrix[\" + row + \"][1]\\\" and \\\"mainMatrix[\" + row + \"][2]\\\" refresh after 0 ticks within 100 ticks\");\r\n\t\t\tlang.nextStep();\r\n\t\t\t//increment counter\r\n\t\t\tcounter.accessInc(1);\r\n\t\t\tcounter.assignmentsInc(1);\r\n\t\t\tshiftLeftSc.unhighlight(4);\r\n\t\t\tshiftLeftSc.highlight(5);\r\n\t\t\tlang.addLine(\"swapGridValues \\\"mainMatrix[\" + row + \"][2]\\\" and \\\"mainMatrix[\" + row + \"][3]\\\" refresh after 0 ticks within 100 ticks\");\r\n\t\t\tlang.nextStep();\r\n\t\t\t//increment counter\r\n\t\t\tcounter.accessInc(1);\r\n\t\t\tcounter.assignmentsInc(1);\r\n\t\t\tshiftLeftSc.unhighlight(5);\r\n\t\t\tshiftLeftSc.highlight(6);\r\n\t\t\tlang.addLine(\"swapGridValues \\\"mainMatrix[\" + row + \"][3]\\\" and \\\"tmpMatrix[0][0]\\\" refresh after 0 ticks within 100 ticks\");\r\n\r\n\t\t\tlang.nextStep();\r\n\t\t\ttmpText.hide();\r\n\t\t\ttmpMatrix.hide();\r\n\t\t\t//some source code and matrix highlighting to show which java code\r\n\t\t\t//is equivalent to the current state of the animation\r\n\t\t\tshiftLeftSc.highlight(1);\r\n\t\t\tshiftLeftSc.highlight(7);\r\n\t\t\tshiftLeftSc.unhighlight(6);\r\n\t\t\tiText.setText(\"i = \" + (i + 1), new TicksTiming(0), new TicksTiming(0));\r\n\t\t\thighlightText(iText);\r\n\t\t}\r\n\t\tlang.nextStep();\r\n\t\t//some source code and matrix highlighting to show which java code\r\n\t\t//is equivalent to the current state of the animation\r\n\t\tshiftLeftSc.unhighlight(0);\r\n\t\tshiftLeftSc.unhighlight(9);\r\n\t\tshiftLeftSc.unhighlight(1);\r\n\t\tshiftLeftSc.unhighlight(7);\r\n\t\tshiftLeftSc.highlight(8);\r\n\t\tunhighlightText(iText);\r\n\t\tiText.hide();\r\n\t\tlang.nextStep();\r\n\t\tshiftLeftSc.unhighlight(8);\r\n\t\tmainMatrix.unhighlightCellColumnRange(row, 0, 3, new TicksTiming(0), new TicksTiming(0));\r\n\t}",
"public void go_to_switch_position() {\n stop_hold_arm();\n Dispatcher.get_instance().add_job(new JMoveArm(RobotMap.Arm.pot_value_switch, 0.9, 0.7, 0.7, 0.2, 0.8, false, false));\n hold_arm();\n }",
"private void preSwitchPanel()\n {\n switchPanel = true;\n configureNext = true;\n configurePrevious = true;\n }",
"private void switchTo(Node newNode, HorizontalDirection direction) {\n\n double widthD = scene.getWidth();\n double heightD = scene.getHeight();\n int width = (int) widthD;\n int height = (int) heightD;\n\n WritableImage wi = new WritableImage(width, height);\n ImageView curIV = new ImageView(scene.snapshot(wi));\n\n Pane altRoot = new StackPane();\n altRoot.getChildren().setAll(newNode);\n Scene altScene = new Scene(altRoot, widthD, heightD);\n\n wi = new WritableImage(width, height);\n ImageView altIV = new ImageView(altScene.snapshot(wi));\n\n StackPane pane;\n if (direction == HorizontalDirection.RIGHT) {\n pane = new StackPane(altIV, curIV);\n }\n else {\n pane = new StackPane(curIV, altIV);\n }\n\n pane.setPrefSize(width, height);\n\n root.getChildren().setAll(pane);\n\n Timeline timeline = new Timeline(60);\n\n KeyValue kv;\n if (direction == HorizontalDirection.RIGHT) {\n curIV.setTranslateX(0);\n altIV.setTranslateX(0);\n kv = new KeyValue(curIV.translateXProperty(), width, new EaseInPowInterpolator());\n }\n else {\n curIV.setTranslateX(0);\n altIV.setTranslateX(width);\n kv = new KeyValue(altIV.translateXProperty(), 0, new EaseOutPowInterpolator());\n }\n KeyFrame kf = new KeyFrame(Duration.millis(500), kv);\n timeline.getKeyFrames().add(kf);\n\n timeline.setOnFinished(t -> {\n root.getChildren().setAll(newNode);\n });\n\n timeline.play();\n }",
"public void moveLeft() {\n Coordinate leftCoord = new Coordinate(getX() - 1, getY());\n handleMove(leftCoord, InteractionHandler.LEFT);\n }",
"public abstract void turnLeft();",
"public void moveLeft()\n\t{\n\t\tx = x - STEP_SIZE;\n\t}",
"private void turnClockwise(){\n\t\tswitch(this.facingDirection){\n\t\tcase NORTH:\n\t\t\tfacingDirection = Direction.EAST;\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tfacingDirection = Direction.WEST;\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tfacingDirection = Direction.NORTH;\n\t\t\tbreak;\n\t\tcase EAST:\n\t\t\tfacingDirection = Direction.SOUTH;\n\t\t}\n\t}",
"public void strafeLeftEnc()\r\n\t{\r\n//\t\tdrive.setPos(0, 0, -Config.Auto.encStrafeDistance, -Config.Auto.encStrafeDistance);\r\n//\t\tif(Math.abs(drive.getFrontEncDist() - Config.Auto.encStrafeDistance) < Config.Auto.encTolerance && Math.abs(drive.getBackEncDist() - Config.Auto.encStrafeDistance) < Config.Auto.encTolerance)\r\n//\t\t{\r\n//\t\t\tdrive.setPos(-Config.Auto.encDistanceBetweenTotes, -Config.Auto.encDistanceBetweenTotes, -Config.Auto.encStrafeDistance, -Config.Auto.encStrafeDistance);\r\n//\t\t\t\r\n//\t\t\tif(Math.abs(drive.getLeftEncDist() - Config.Auto.encDistanceBetweenTotes) < Config.Auto.encTolerance && Math.abs(drive.getRightEncDist() - Config.Auto.encDistanceBetweenTotes) < Config.Auto.encTolerance)\r\n//\t\t\t{\r\n//\t\t\t\tdrive.setPos(-Config.Auto.encDistanceBetweenTotes, -Config.Auto.encDistanceBetweenTotes, 0, 0);\r\n//\t\t\t\t\r\n//\t\t\t\tif((Math.abs(drive.getFrontEncDist()) < Config.Auto.encTolerance && Math.abs(drive.getBackEncDist()) < Config.Auto.encTolerance))\r\n//\t\t\t\t\tendRoutine();\t\t\t\t\r\n//\t\t\t}\r\n//\t\t}\r\n\t}",
"public Direction moveLeft() {\n switch(this){\n case EAST :\n return NORTH;\n case SOUTH :\n return EAST;\n case WEST :\n return SOUTH;\n case NORTH :\n return WEST;\n }\n return this;\n }",
"void leftInv() {\n startAnimation(leftSubCubes(), Axis.X, Direction.CLOCKWISE);\n leftCubeSwap();\n leftCubeSwap();\n leftCubeSwap();\n }",
"public Room goWest() {\n return goDir(Side.WEST);\n }",
"void findLeft(Board board) {\n if (tile.getColPos() != 0) {\n Tile leftTile = board.getTileObjByPosition(tile.getRowPos(), tile.getColPos() - 1);\n if (leftTile != null) {\n if (RailroadInk.areConnectedNeighbours(tile.getPlacementStr(), leftTile.getPlacementStr())) {\n Node leftNode;\n if ((leftTile.graphId > 0) || ((leftTile.graphId == -1) && (leftTile.leftId == graphId))) {\n leftNode = nodeMap.get(leftTile.pos);\n } else {\n leftNode = new Node(leftTile);\n if (leftTile.name.equals(\"B2\")) {\n leftTile.rightId = graphId;\n }\n nodeMap.put(leftTile.pos, leftNode);\n }\n\n // Update the connection relationship.\n this.left = leftNode;\n leftNode.right = this;\n if (this.tile.name.equals(\"B2\")) {\n this.tile.leftId = graphId;\n }\n\n if ((!leftTile.name.equals(\"B2\")) && (leftNode.up == null)) {\n leftNode.findUp(board);\n }\n if ((!leftTile.name.equals(\"B2\")) && (leftNode.down == null)) {\n leftNode.findDown(board);\n }\n if (leftNode.left == null) {\n leftNode.findLeft(board);\n }\n }\n }\n }\n }",
"private void flip()\r\n\t{\r\n\t\tif(heading == Direction.WEST)\r\n\t\t{\r\n\t\t\tsetDirection(Direction.EAST);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsetDirection(Direction.WEST);\r\n\t\t}\r\n\t}",
"public void leftButtonPressed() {\n\t\tif(droneApp.myDrone.isConnected) {\n\t\t\tif(!on) {\n\t\t\t\t// Enable our steamer\n\t\t\t\tstreamer.enable();\n\t\t\t\t// Enable the sensor\n\t\t\t\tdroneApp.myDrone.quickEnable(qsSensor);\n\t\t\t\t\n\t\t\t\ton = true;\n\t\t\t\t\n\t\t\t\tint w = tvSensorValue.getWidth();\n\t\t\t\tint h = tvSensorValue.getHeight();\n\t\t\t\t\n\t\t\t\tif(firstTime) {\t\t\n\t\t\t\t\tfirstTime = false;\n\t\t\t\t\twarmUpWindow1 = new PopupWindow(layout2, w, h, true);\n\t\t\t\t\twarmUpWindow1.setOutsideTouchable(true);\n\t\t\t\t\twarmUpWindow1.setFocusable(false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(warmedUp) {\n\t\t\t\t\twarmedUp = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tshowWarmupWindow(h);\n\t\t\t\tcountdown1Handler.post(countdown1Runnable);\n\t\t\t} else {\n\t\t\t\tresetAllOperations();\n\t\t\t}\n\t\t}\n\t}",
"void moveLeft();",
"public void moveLeft() {\n if (xcoor >= movingSpeed) {\n xcoor = xcoor - movingSpeed * 2;\n }\n }",
"public void lowerFuelCell() {\n FuelCell.fuelCellFlipSol = false;\n raiseHopper.set(false);\n lowerHopper.set(true);\n }",
"public void moveLeft() {\n if (rec.getUpperLeft().getX() - 5 < leftBorder) {\n rec.getUpperLeft().setX(leftBorder);\n } else {\n rec.getUpperLeft().setX(rec.getUpperLeft().getX() - 5);\n }\n\n }",
"private void LeftLeftLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t}",
"public void moveLeft() {\n locX = locX - 1;\n }",
"public void adjustLeft() {\n\n for (int y = 0; y < MAP_HEIGHT; y++)\n for (int x = 0; x < MAP_WIDTH; x++) {\n tiles[x][y].x = tiles[x][y].x - 4;\n backGroundTiles[x][y].x = backGroundTiles[x][y].x - 4;\n grassTiles[x][y].x = grassTiles[x][y].x - 4;\n }\n }",
"private void turnOverItself() {\n byte tmp = leftEdge;\n leftEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n\n tmp = rightEdge;\n rightEdge = reversedLeftEdge;\n reversedLeftEdge = tmp;\n\n tmp = topEdge;\n topEdge = reversedTopEdge;\n reversedTopEdge = tmp;\n\n tmp = botEdge;\n botEdge = reversedBotEdge;\n reversedBotEdge = tmp;\n\n tmp = ltCorner;\n ltCorner = rtCorner;\n rtCorner = tmp;\n\n tmp = lbCorner;\n lbCorner = rbCorner;\n rbCorner = tmp;\n }",
"void moveWest() {\n xpos = xpos - xspeed;\n if (xpos <= 0){ // 20\n xpos = width; // 25\n }\n }",
"public void setLeft(int x) {\r\n leftSide = x;\r\n }",
"public void moveLeft() {\n\t\tsetPosX(getPosX() - steps);\n\t}",
"private void moveShipLeft()\r\n\t\t{\r\n\t\t\t\tboolean moved = true;\r\n \tint currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n\r\n //if firstPlayer move unit left\r\n if(currentPlayer == 1)\r\n {\r\n int currentPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n if(currentPos == 0)\r\n {\r\n int mapTemp = mapPieces[0][mapWidth - 1];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(mapWidth - 1);\r\n }\r\n else\r\n {\r\n int temp1 = currentPos % mapWidth;\r\n if(temp1 == 0)\r\n {\r\n int mapTemp = mapPieces[0][currentPos + mapWidth - 1];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(currentPos + mapWidth - 1);\r\n }//end if\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos - 1];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(currentPos - 1);\r\n }//end else\r\n }//end else\r\n }//end if\r\n\r\n //if firstPlayer move unit left\r\n if(currentPlayer == 2)\r\n {\r\n int currentPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n if(currentPos == 0)\r\n {\r\n int mapTemp = mapPieces[0][mapWidth - 1];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(mapWidth - 1);\r\n }\r\n else\r\n {\r\n int temp1 = currentPos % mapWidth;\r\n if(temp1 == 0)\r\n {\r\n int mapTemp = mapPieces[0][currentPos + mapWidth - 1];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(currentPos + mapWidth - 1);\r\n }//end if\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos - 1];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(currentPos - 1);\r\n }//end else\r\n }//end else\r\n }//end if\r\n\r\n //set up new player once unit has moved\r\n playerMoved(currentPlayer,currentUnit,moved);\r\n\r\n //set up new mapPosition if player moved\r\n if(moved == true)\r\n setMapPos();\r\n\t\t}",
"public void moveLeft()\n\t{\n\t\tcol--;\n\t}",
"private int rowChange ( int direction ) {\n\t\tswitch ( direction ) {\n\n\t\tcase Direction.NORTH:\n\t\tcase Direction.NE:\n\t\tcase Direction.NW:\n\t\t\treturn -1;\n\n\t\tcase Direction.SOUTH:\n\t\tcase Direction.SE:\n\t\tcase Direction.SW:\n\t\t\treturn 1;\n\n\t\tdefault:\n\t\t\treturn 0;\n\t\t}\n\t}",
"public void updateLeftWeight(){\r\n\t \tif(this.leftNode != null)\r\n\t \t{\r\n\t \t\tif( this.leftNode.isNoGoZone() == true)\r\n\t \t{\r\n\t \t\t\t//set edge weight to 9999 if the next node is NO go zone or\r\n\t \t\t\t//boundary node\r\n\t \t\tthis.leftWeight = weightOfNoGoZone;\r\n\t \t}\r\n\t \telse if(this.leftNode.isRoad() == true && this.leftNode.isNoGoZone() == false)\r\n\t \t{\r\n\t \t\t//set edge weight to 1 if the next node is a road node\r\n\t \t\tthis.leftWeight = this.leftNode.getOwnElevation();\r\n\t \t}\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\t//set edge weight to INF if the next node is NULL\r\n\t \t\tthis.leftWeight = weightOfMapEdge;\r\n\t \t}\r\n\t }",
"public static void turnleftBy(double angle) {\n leftMotor.rotate(-convertAngle(angle), true);\n rightMotor.rotate(convertAngle(angle), false);\n }",
"public void moveLeft(){\n\t\tif(GameSystem.TWO_PLAYER_MODE){\n\t\t\tif(Game.getPlayer2().dying){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(animation==ANIMATION.DAMAGED||Game.getPlayer().dying||channelling||charging) return;\n\t\tmoving=true;\n\t\tbuttonReleased=false;\n\t\torientation=ORIENTATION.LEFT;\n\t\tif(animation!=ANIMATION.MOVELEFT) {\n\t\t\tanimation=ANIMATION.MOVELEFT;\n\t\t\tif(run!=null) sequence.startSequence(run);\n\t\t}\n\t\tfacing=FACING.LEFT;\n\t\tdirection=\"left\";\n\t\tsetNextXY();\n\t\tsetDestination(nextX,nextY);\n\t\tvelX=-1*spd/2;\n\t\tvelY=0;\n\t}",
"@Test\n public void testTurnLeft() {\n saab.xPos = 0;\n saab.yPos = 0;\n saab.startEngine();\n\n saab.move();\n\n Assertions.assertEquals(1, saab.direction[0]);\n Assertions.assertEquals(0, saab.direction[1]);\n\n Assertions.assertEquals(0.1, saab.xPos);\n Assertions.assertEquals(0, saab.yPos);\n\n\n saab.turnLeft();\n\n // Should be same position\n Assertions.assertEquals(0.1, saab.xPos);\n Assertions.assertEquals(0, saab.yPos);\n\n // Should be different direction\n Assertions.assertEquals(0, saab.direction[0]);\n Assertions.assertEquals(1, saab.direction[1]);\n\n saab.move();\n\n Assertions.assertEquals(0.1, saab.xPos);\n Assertions.assertEquals(0.1, saab.yPos);\n }",
"public void moveLeft() {\n \tif(!move.moveLeft()) {\n \t\tif(physinteractor(getX()-1,getY())) {\n \t\t\tmove.moveLeft();\n \t\t\tnonphysinteractor(getX(),getY());\n \t\t\tupdatemove();\n \t\t}\n }else {\n \tupdatemove();\n \tnonphysinteractor(getX(),getY());\n }\n }",
"public boolean moveLeft()\n {\n\tboolean update;\n\tboolean action = false;\n\t\t\n\tdo\n\t{\n update = false;\n\t\t\t\n for (int y=0; y<cases.length-1; y++)\n {\n for (int x=0; x<cases[y].length; x++)\n\t\t{\n boolean merge;\n boolean move;\n\t\t\t\t\t\n do\n {\n merge = merge(cases[x][y+1],cases[x][y]);\n move = move(cases[x][y+1],cases[x][y]);\n\t\t\tupdate = (update || merge || move);\n if(!action && update)\n {\n action = update; \n }\n } while (merge || move);\n }\n }\n } while (update);\n \n return action;\n }",
"private void initializeAnimalShiftLeftSourceCode() {\r\n\t\tshiftLeftSc = lang.newSourceCode(new Offset(0, 100, shiftRowSc, AnimalScript.DIRECTION_SW), \"shiftLeftSourceCode\", null, sourceCodeProps);\r\n\t\tshiftLeftSc.addCodeLine( \"private int[][] shiftLeft(int[][] matrix, int row){\", null, 0, null);\r\n\t\tshiftLeftSc.addCodeLine(\" for(int i = row; i < row; i++){\", null, 1, null);\r\n\t\tshiftLeftSc.addCodeLine(\" int tmp = matrix[row][0];\", null, 2, null);\r\n\t\tshiftLeftSc.addCodeLine(\" matrix[row][0] = matrix[row][1];\", null, 2, null);\r\n\t\tshiftLeftSc.addCodeLine(\" matrix[row][1] = matrix[row][2];\", null, 2, null);\r\n\t\tshiftLeftSc.addCodeLine(\" matrix[row][2] = matrix[row][3];\", null, 2, null);\r\n\t\tshiftLeftSc.addCodeLine(\" matrix[row][3] = tmp;\", null, 2, null);\r\n\t\tshiftLeftSc.addCodeLine(\" }\", null, 1, null);\r\n\t\tshiftLeftSc.addCodeLine(\" return matrix;\", null, 3, null);\r\n\t\tshiftLeftSc.addCodeLine(\"}\", null, 0, null);\r\n\t}",
"private void applyLeftTurn(WorldSpatial.Direction orientation, float delta) {\n\t\tswitch(orientation){\n\t\tcase EAST:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.NORTH)){\n\t\t\t\tturnLeft(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase NORTH:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.WEST)){\n\t\t\t\tturnLeft(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.EAST)){\n\t\t\t\tturnLeft(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.SOUTH)){\n\t\t\t\tturnLeft(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t\n\t\t}\n\t\t\n\t}",
"public void refreshLeft();",
"public void setX() {\n m_frontLeft.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(45)));\n m_frontRight.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(-45)));\n m_rearLeft.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(-45)));\n m_rearRight.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(45)));\n }",
"private void redSouthTurnLeft(int intersection) {\n int index = getIntersectionIndex(intersection);\n isGreenSouthTurnLeft[index] = false;\n }",
"public int getStateSwitchPosition();",
"public void shiftLeft() {\n int currentPointer = this.registerPointer;\n\n if (currentPointer == 0)\n this.registerPointer = this.registerCapacity - 1;\n else\n this.registerPointer -= 1;\n }",
"public void leftPressed()\r\n {\r\n worldPanel.newMapPos(-zoom,0);\r\n miniMap.newMapPos(-1,0);\r\n }"
] | [
"0.6552321",
"0.6507413",
"0.6351651",
"0.63347226",
"0.62987477",
"0.62781596",
"0.62543595",
"0.6235268",
"0.6229873",
"0.61559415",
"0.6131295",
"0.60501283",
"0.6040611",
"0.6035491",
"0.6015059",
"0.600842",
"0.5992312",
"0.5984327",
"0.5969575",
"0.5966285",
"0.5960244",
"0.59415615",
"0.59307426",
"0.5912954",
"0.5880735",
"0.5871086",
"0.58690476",
"0.5842555",
"0.5787934",
"0.5787522",
"0.57852805",
"0.5770277",
"0.57638055",
"0.5760504",
"0.57582074",
"0.5753598",
"0.57454187",
"0.5741771",
"0.5741533",
"0.57380563",
"0.57343835",
"0.5731669",
"0.5728291",
"0.5727914",
"0.57185894",
"0.5701205",
"0.5700399",
"0.5693978",
"0.56918067",
"0.5688334",
"0.56747186",
"0.56722087",
"0.5669312",
"0.5669069",
"0.5665436",
"0.566286",
"0.5661542",
"0.5651706",
"0.5647507",
"0.56456345",
"0.5633559",
"0.56215113",
"0.56166434",
"0.5616407",
"0.5605473",
"0.5601248",
"0.5599811",
"0.5583489",
"0.556846",
"0.556686",
"0.55629855",
"0.55609226",
"0.5559406",
"0.55478495",
"0.55451864",
"0.5538888",
"0.55388296",
"0.55360323",
"0.5526804",
"0.55223405",
"0.5521858",
"0.5515148",
"0.5510233",
"0.5508547",
"0.5495574",
"0.5495277",
"0.54885656",
"0.5486074",
"0.548287",
"0.5482506",
"0.547253",
"0.546247",
"0.5452424",
"0.5448428",
"0.543939",
"0.54316604",
"0.5423411",
"0.5420297",
"0.54187435",
"0.5410989"
] | 0.6745353 | 0 |
SwitchLeft0 is connected to a vertical straight in north direction | @Test
public void connectTest_North_VerticalStraight() throws Exception {
final Factory<Node> railNodeFactory = new DefaultRailNodeFactory();
final RailNode switchLeft0RailNode = (RailNode) railNodeFactory.create(1, 1, ShapeType.SWITCH_LEFT_0);
final RailNode horizontalRailNode = (RailNode) railNodeFactory.create(1, 0, ShapeType.STRAIGHT_VERTICAL);
final Model model = new DefaultModel();
model.setNode(1, 1, switchLeft0RailNode);
model.setNode(1, 0, horizontalRailNode);
switchLeft0RailNode.connect(model);
horizontalRailNode.connect(model);
System.out.println(switchLeft0RailNode.toString());
System.out.println(horizontalRailNode.toString());
assertEquals(1, switchLeft0RailNode.getGraphNodeOne().getChildren().size());
assertEquals(0, switchLeft0RailNode.getGraphNodeTwo().getChildren().size());
assertEquals(2, switchLeft0RailNode.getGraphNodeOne().getChildren().get(0).getId());
assertEquals(0, horizontalRailNode.getGraphNodeOne().getChildren().size());
assertEquals(1, horizontalRailNode.getGraphNodeTwo().getChildren().size());
assertEquals(1, horizontalRailNode.getGraphNodeTwo().getChildren().get(0).getId());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void turnLeft() {\n LEFT_MOTOR.backward();\n RIGHT_MOTOR.forward();\n }",
"public void steady(){\n if(steady){\n if(!bellySwitch.get()) {\n leftMotor.set(-.3);\n rightMotor.set(-.3);\n }else {\n leftMotor.set(0);\n rightMotor.set(0);\n } \n }\n }",
"private void rotateLeft() {\n robot.leftBack.setPower(-TURN_POWER);\n robot.leftFront.setPower(-TURN_POWER);\n robot.rightBack.setPower(TURN_POWER);\n robot.rightFront.setPower(TURN_POWER);\n }",
"public void turnLeft() {\r\n setDirection( modulo( myDirection-1, 4 ) );\r\n }",
"public void turnLeft() {\n\t\tthis.setSteeringDirection(getSteeringDirection()-5);\n\t\t}",
"public void switchSides() {\n\t\tint temp = 0;\r\n\t\ttemp = leftValue;\r\n\t\tleftValue = rightValue;\r\n\t\trightValue = temp;\r\n\t}",
"public void changeDirection()\n {\n if(goLeft){\n goLeft = false;\n }else{\n goLeft = true;\n }\n }",
"public void turnLeft()\r\n\t{\r\n\t\t\r\n\t\theading -= 2; //JW\r\n\t\t//Following the camera:\r\n\t\t\t//heading -= Math.sin(Math.toRadians(15))*distance; \r\n\t\t\t//heading -= Math.cos(Math.toRadians(15))*distance;\r\n\t}",
"public LeftSwitchToFirstCubePt2Arc() {\n\t\tsuper();\n\t\tthis.highGear = true;\n\t\tcenterProfile = new SrxMotionProfile(centerPoints.length, centerPoints);\n\t}",
"public void go_to_switch_position() {\n stop_hold_arm();\n Dispatcher.get_instance().add_job(new JMoveArm(RobotMap.Arm.pot_value_switch, 0.9, 0.7, 0.7, 0.2, 0.8, false, false));\n hold_arm();\n }",
"@Test\n\tpublic void connectTest_West_HorizontalStraight() throws Exception {\n\n\t\tfinal Factory<Node> railNodeFactory = new DefaultRailNodeFactory();\n\n\t\tfinal RailNode switchLeft0RailNode = (RailNode) railNodeFactory.create(1, 1, ShapeType.SWITCH_LEFT_0);\n\t\tfinal RailNode horizontalRailNode = (RailNode) railNodeFactory.create(2, 1, ShapeType.STRAIGHT_HORIZONTAL);\n\n\t\tfinal Model model = new DefaultModel();\n\t\tmodel.setNode(1, 1, switchLeft0RailNode);\n\t\tmodel.setNode(2, 1, horizontalRailNode);\n\n\t\tswitchLeft0RailNode.connect(model);\n\t\thorizontalRailNode.connect(model);\n\n\t\tSystem.out.println(switchLeft0RailNode.toString());\n\t\tSystem.out.println(horizontalRailNode.toString());\n\n\t\tassertEquals(1, switchLeft0RailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(0, switchLeft0RailNode.getGraphNodeTwo().getChildren().size());\n\t\tassertEquals(2, switchLeft0RailNode.getGraphNodeOne().getChildren().get(0).getId());\n\n\t\tassertEquals(0, horizontalRailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(1, horizontalRailNode.getGraphNodeTwo().getChildren().size());\n\t\tassertEquals(1, horizontalRailNode.getGraphNodeTwo().getChildren().get(0).getId());\n\t}",
"private void turnLeft(View v){\n\t\tswitch(this.facingDirection){\n\t\tcase NORTH:\n\t\t\tfacingDirection = Direction.WEST;\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tfacingDirection = Direction.EAST;\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tfacingDirection = Direction.SOUTH;\n\t\t\tbreak;\n\t\tcase EAST:\n\t\t\tfacingDirection = Direction.NORTH;\n\t\t}\n\t}",
"@Test\n\tpublic void connectTest_North_HorizontalStraight() throws Exception {\n\n\t\tfinal Factory<Node> railNodeFactory = new DefaultRailNodeFactory();\n\n\t\tfinal RailNode switchLeft0RailNode = (RailNode) railNodeFactory.create(1, 1, ShapeType.SWITCH_LEFT_0);\n\t\tfinal RailNode horizontalRailNode = (RailNode) railNodeFactory.create(1, 0, ShapeType.STRAIGHT_HORIZONTAL);\n\n\t\tfinal Model model = new DefaultModel();\n\t\tmodel.setNode(1, 1, switchLeft0RailNode);\n\t\tmodel.setNode(1, 0, horizontalRailNode);\n\n\t\tswitchLeft0RailNode.connect(model);\n\t\thorizontalRailNode.connect(model);\n\n\t\tSystem.out.println(switchLeft0RailNode.toString());\n\t\tSystem.out.println(horizontalRailNode.toString());\n\n\t\tassertEquals(0, switchLeft0RailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(0, switchLeft0RailNode.getGraphNodeTwo().getChildren().size());\n\n\t\tassertEquals(0, horizontalRailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(0, horizontalRailNode.getGraphNodeTwo().getChildren().size());\n\t}",
"public void turnLeft();",
"public void turnLeft ()\n\t{\n\t\t//changeFallSpeed (-1);\n\t\tturnInt = -1;\n\t}",
"@Test\n\tpublic void connectTest_East_HorizontalStraight() throws Exception {\n\n\t\tfinal Factory<Node> railNodeFactory = new DefaultRailNodeFactory();\n\n\t\tfinal RailNode switchLeft0RailNode = (RailNode) railNodeFactory.create(1, 1, ShapeType.SWITCH_LEFT_0);\n\t\tfinal RailNode horizontalRailNode = (RailNode) railNodeFactory.create(0, 1, ShapeType.STRAIGHT_HORIZONTAL);\n\n\t\tfinal Model model = new DefaultModel();\n\t\tmodel.setNode(1, 1, switchLeft0RailNode);\n\t\tmodel.setNode(0, 1, horizontalRailNode);\n\n\t\tswitchLeft0RailNode.connect(model);\n\t\thorizontalRailNode.connect(model);\n\n\t\tSystem.out.println(switchLeft0RailNode.toString());\n\t\tSystem.out.println(horizontalRailNode.toString());\n\n\t\tassertEquals(0, switchLeft0RailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(1, switchLeft0RailNode.getGraphNodeTwo().getChildren().size());\n\t\tassertEquals(3, switchLeft0RailNode.getGraphNodeTwo().getChildren().get(0).getId());\n\n\t\tassertEquals(1, horizontalRailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(0, horizontalRailNode.getGraphNodeTwo().getChildren().size());\n\t\tassertEquals(0, horizontalRailNode.getGraphNodeOne().getChildren().get(0).getId());\n\t}",
"private void turnLeft() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n switch (direction) {\n case EAST:\n direction = Position.Direction.NORTH;\n break;\n case WEST:\n direction = Position.Direction.SOUTH;\n break;\n case NORTH:\n direction = Position.Direction.WEST;\n break;\n case SOUTH:\n direction = Position.Direction.EAST;\n break;\n }\n\n currentPosition.setDirection(direction);\n }",
"public void turnLeft() { turn(\"LEFT\"); }",
"public void turnLightsOn()\n {\n set(Relay.Value.kForward);\n }",
"@Override\r\n\tpublic void onLeft() {\n\t\tif (snakeView.smer != snakeView.VZHOD) {\r\n\t\t\tsnakeView.naslednjaSmer = snakeView.ZAHOD;\r\n\t\t}\r\n\t}",
"private void turnClockwise(){\n\t\tswitch(this.facingDirection){\n\t\tcase NORTH:\n\t\t\tfacingDirection = Direction.EAST;\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tfacingDirection = Direction.WEST;\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tfacingDirection = Direction.NORTH;\n\t\t\tbreak;\n\t\tcase EAST:\n\t\t\tfacingDirection = Direction.SOUTH;\n\t\t}\n\t}",
"public void leftPressed() {\n System.out.println(\"leftPressed()\");\n current.translate(0, -1);\n display.showBlocks();\n }",
"public void turn() {\n rightMotor.resetTachoCount();\n rightMotor.setSpeed(DEFAULT_TURN_SPEED);\n leftMotor.setSpeed(DEFAULT_TURN_SPEED);\n rightMotor.forward();\n leftMotor.backward();\n\n }",
"void changeDirection();",
"private void createSwitches() {\n \t\tswitches = new Point[4];\n \t\tswitches[0] = new Point(centreMin, centreMin);\n \t\tswitches[1] = new Point(centreMin, centreMax-1);\n \t\tswitches[2] = new Point(centreMax-1, centreMin);\n \t\tswitches[3] = new Point(centreMax-1, centreMax-1);\n \t}",
"private void driveLeft() {\n setSpeed(MIN_SPEED, MAX_SPEED);\n }",
"public void sideLeft(double targetDistance, double power) {\n setDriveMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n setDriveMode(DcMotor.RunMode.RUN_USING_ENCODER);\n double currentDistance = 0;\n while (Math.abs(currentDistance) < targetDistance && opModeIsActive()) {\n currentDistance = frontRight.getCurrentPosition();\n frontLeft.setPower(power);\n frontRight.setPower(-power);\n backLeft.setPower(-power);\n backRight.setPower(power);\n }\n stopMotors();\n }",
"private void LeftRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}",
"public void changeToLoGear() {\n\t\tspeedShifter.set(DoubleSolenoid.Value.kForward); // forward is low gear,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// port 1\n\t\tSystem.out.println(\"switch\");\n\t}",
"@Override\r\n\tpublic void rotateLeft() {\n\t\tsetDirection((this.getDirection() + 3) % 4);\r\n\t}",
"public void switchLight(){\r\n _switchedOn = !_switchedOn;\r\n }",
"public void rotateLeft() {\n // I fucked up? Rotations are reversed, just gonna switch em\n// tileLogic = getRotateLeft();\n tileLogic = getRotateRight();\n// rotateLeftTex();\n rotateRightTex();\n }",
"private void LeftLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}",
"private void switchTo(Node newNode, HorizontalDirection direction) {\n\n double widthD = scene.getWidth();\n double heightD = scene.getHeight();\n int width = (int) widthD;\n int height = (int) heightD;\n\n WritableImage wi = new WritableImage(width, height);\n ImageView curIV = new ImageView(scene.snapshot(wi));\n\n Pane altRoot = new StackPane();\n altRoot.getChildren().setAll(newNode);\n Scene altScene = new Scene(altRoot, widthD, heightD);\n\n wi = new WritableImage(width, height);\n ImageView altIV = new ImageView(altScene.snapshot(wi));\n\n StackPane pane;\n if (direction == HorizontalDirection.RIGHT) {\n pane = new StackPane(altIV, curIV);\n }\n else {\n pane = new StackPane(curIV, altIV);\n }\n\n pane.setPrefSize(width, height);\n\n root.getChildren().setAll(pane);\n\n Timeline timeline = new Timeline(60);\n\n KeyValue kv;\n if (direction == HorizontalDirection.RIGHT) {\n curIV.setTranslateX(0);\n altIV.setTranslateX(0);\n kv = new KeyValue(curIV.translateXProperty(), width, new EaseInPowInterpolator());\n }\n else {\n curIV.setTranslateX(0);\n altIV.setTranslateX(width);\n kv = new KeyValue(altIV.translateXProperty(), 0, new EaseOutPowInterpolator());\n }\n KeyFrame kf = new KeyFrame(Duration.millis(500), kv);\n timeline.getKeyFrames().add(kf);\n\n timeline.setOnFinished(t -> {\n root.getChildren().setAll(newNode);\n });\n\n timeline.play();\n }",
"public void left () {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return;\n Location loc = getLocation();\n Location next = loc.getAdjacentLocation(Location.WEST);\n if (canMove(next)) {\n moveTo(next);\n }\n }",
"public abstract void turnLeft();",
"protected void left() {\n move(positionX - 1, positionY);\n orientation = BattleGrid.RIGHT_ANGLE * 2;\n }",
"public void turnClockWise90(){\n int tmp = this.front;\n this.front = this.right;\n this.right = this.back;\n this.back = this.left;\n this.left = tmp;\n }",
"public static void turnleftBy(double angle) {\n leftMotor.rotate(-convertAngle(angle), true);\n rightMotor.rotate(convertAngle(angle), false);\n }",
"private boolean poleSwitchEngaged(){\n return true; //poleSwitch.get();\n }",
"public void leftButtonPressed() {\n\t\tif(droneApp.myDrone.isConnected) {\n\t\t\tif(!on) {\n\t\t\t\t// Enable our steamer\n\t\t\t\tstreamer.enable();\n\t\t\t\t// Enable the sensor\n\t\t\t\tdroneApp.myDrone.quickEnable(qsSensor);\n\t\t\t\t\n\t\t\t\ton = true;\n\t\t\t\t\n\t\t\t\tint w = tvSensorValue.getWidth();\n\t\t\t\tint h = tvSensorValue.getHeight();\n\t\t\t\t\n\t\t\t\tif(firstTime) {\t\t\n\t\t\t\t\tfirstTime = false;\n\t\t\t\t\twarmUpWindow1 = new PopupWindow(layout2, w, h, true);\n\t\t\t\t\twarmUpWindow1.setOutsideTouchable(true);\n\t\t\t\t\twarmUpWindow1.setFocusable(false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(warmedUp) {\n\t\t\t\t\twarmedUp = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tshowWarmupWindow(h);\n\t\t\t\tcountdown1Handler.post(countdown1Runnable);\n\t\t\t} else {\n\t\t\t\tresetAllOperations();\n\t\t\t}\n\t\t}\n\t}",
"private void processTrackSwitch(SensorEvent e) throws CommandException {\n if (atSensor(e, 18, 7) && direction == NORTH && ticket == -1)\n switchTrack(17, 7, SWITCH_LEFT);\n else if (atSensor(e, 18, 7) && direction == NORTH)\n switchTrack(17, 7, SWITCH_RIGHT);\n else if (atSensor(e, 13, 8) && direction == SOUTH)\n switchTrack(17, 7, SWITCH_LEFT);\n else if (atSensor(e, 13, 7) && direction == SOUTH)\n switchTrack(17, 7, SWITCH_RIGHT);\n else if (atSensor(e, 16, 9) && direction == SOUTH && ticket == 3)\n switchTrack(15, 9, SWITCH_RIGHT);\n else if (atSensor(e, 16, 9) && direction == SOUTH)\n switchTrack(15, 9, SWITCH_LEFT);\n else if (atSensor(e, 3, 9) && direction == NORTH && ticket == 3)\n switchTrack(4, 9, SWITCH_LEFT);\n else if (atSensor(e, 3, 9) && direction == NORTH)\n switchTrack(4, 9, SWITCH_RIGHT);\n else if (atSensor(e, 13, 9) && direction == NORTH)\n switchTrack(15, 9, SWITCH_RIGHT);\n else if (atSensor(e, 6, 9) && direction == SOUTH)\n switchTrack(4, 9, SWITCH_LEFT);\n else if (atSensor(e, 13, 10) && direction == NORTH)\n switchTrack(15, 9, SWITCH_LEFT);\n else if (atSensor(e, 6, 10) && direction == SOUTH)\n switchTrack(4, 9, SWITCH_RIGHT);\n else if (atSensor(e, 1, 11) && direction == SOUTH && ticket == 5)\n switchTrack(3, 11, SWITCH_LEFT);\n else if (atSensor(e, 1, 11) && direction == SOUTH)\n switchTrack(3, 11, SWITCH_RIGHT);\n else if (atSensor(e, 5, 11) && direction == NORTH)\n switchTrack(3, 11, SWITCH_LEFT);\n else if (atSensor(e, 5, 13) && direction == NORTH)\n switchTrack(3, 11, SWITCH_RIGHT);\n }",
"public void moveLeft()\n\t{\n\t\tmoveLeft = true;\n\t}",
"public RightPrioritizeSwitch() {\n\t\t// Use requires() here to declare subsystem dependencies\n\t\t// eg. requires(chassis);\t\t\n\t\ttimer = new Timer();\n\t\tdelay = new Timer();\n\t\tcrossLine = new CrossAutoLine();\n\t\tturnTowardsSwitchOrScale = new RotateDrivetrainWithGyroPID(90, false);\n\t\tdriveToScale = new DriveStraightToPositionPID(323.6);\n\t\tdriveToSwitch = new DriveStraightToPositionPID(168);\n\t\tapproachScale = new DriveStraightToPositionPID(44);\n\t\tapproachSwitch = new DriveStraightToPositionPID(-42);\n\t\tlaunchCubeSwitch = new AutomaticShoot(false);\n\t\tlaunchCubeScale = new AutomaticShoot(true);\n\t}",
"public void left(){\n\t\tmoveX=-1;\n\t\tmoveY=0;\n\t}",
"public void setLeft(Lane left) {\r\n\t\tthis.left = left;\r\n\t}",
"public void rotateLeft() {\n\t\tthis.direction = this.direction.rotateLeft();\n\t}",
"private void preSwitchPanel()\n {\n switchPanel = true;\n configureNext = true;\n configurePrevious = true;\n }",
"@Override\r\n\tpublic void rotateLeft() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir - THETA);\r\n\t\t\r\n\t}",
"private void actionSwitchMove()\r\n\t{\r\n\t\tif (FormMainMouse.isSampleMovable)\r\n\t\t{\r\n\t\t\thelperSwitchMoveOff();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\thelperSwitchMoveOn();\r\n\r\n\t\t\t//---- Turn off sample selection mode\r\n\t\t\thelperSwitchSelectOff();\r\n\t\t}\r\n\t}",
"private void setDirection() {\r\n\t\tif (destinationFloor > initialFloor){\r\n\t\t\tdirection = 1;\r\n\t\t} else {\r\n\t\t\tdirection = -1;\r\n\t\t}\r\n\t}",
"public void moveLeft() {\n if (!this.state.equals(\"onLeftWall\")) {\n this.dir = -1;\n this.xTargetSpeed = this.X_MAX_SPEED;\n }\n }",
"public void chooseDirection(){\n Player player=board.getPlayer();\n if(player==null) return;\n if (getXCentrer()>board.getPlayer().getXCentrer()){\n setDirection(3);\n }\n else{\n setDirection(1);\n }\n }",
"private void RightLeftLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\t\n \t\t\n \t\n \t}\n \t}",
"public void moveLeft() {\n\t\t\n\t}",
"private void flip()\r\n\t{\r\n\t\tif(heading == Direction.WEST)\r\n\t\t{\r\n\t\t\tsetDirection(Direction.EAST);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsetDirection(Direction.WEST);\r\n\t\t}\r\n\t}",
"void leftInv() {\n startAnimation(leftSubCubes(), Axis.X, Direction.CLOCKWISE);\n leftCubeSwap();\n leftCubeSwap();\n leftCubeSwap();\n }",
"private void handleLeft() {\r\n\t\tcontroller.getCurrentPosition().realocate((controller.getCurrentPosition().getY()), controller.getCurrentPosition().getX()-1);\r\n\t\t// if User reaches the end of the board reset position\r\n\t\tif(controller.getCurrentPosition().getX()==-1) {\r\n\t\t\tcontroller.getCurrentPosition().realocate((controller.getCurrentPosition().getY()), controller.getNumberColumns()-1);\r\n\t\t}\r\n\t\t// remove the pseudo Class from all nodes so that only the cell that was pressed last looks 'pressed'\r\n\t\tfor (Node n : controller.getGridBoard().getChildren()) {\r\n\t\t\t((StackPane) n).pseudoClassStateChanged(PseudoClass.getPseudoClass(\"pressed\"), false);\r\n\t\t\tif (GridPane.getColumnIndex(n) == controller.getCurrentPosition().getX() && GridPane.getRowIndex(n) == controller.getCurrentPosition().getY()) {\r\n\t\t\t\t((StackPane) n).pseudoClassStateChanged(PseudoClass.getPseudoClass(\"pressed\"), true);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void waltz() {\n //test code written by bokun: self rotation\n leftMotor.setSpeed(ROTATE_SPEED);\n rightMotor.setSpeed(ROTATE_SPEED);\n leftMotor.forward();\n rightMotor.backward();\n }",
"@Test\n public void testTurnLeft() {\n saab.xPos = 0;\n saab.yPos = 0;\n saab.startEngine();\n\n saab.move();\n\n Assertions.assertEquals(1, saab.direction[0]);\n Assertions.assertEquals(0, saab.direction[1]);\n\n Assertions.assertEquals(0.1, saab.xPos);\n Assertions.assertEquals(0, saab.yPos);\n\n\n saab.turnLeft();\n\n // Should be same position\n Assertions.assertEquals(0.1, saab.xPos);\n Assertions.assertEquals(0, saab.yPos);\n\n // Should be different direction\n Assertions.assertEquals(0, saab.direction[0]);\n Assertions.assertEquals(1, saab.direction[1]);\n\n saab.move();\n\n Assertions.assertEquals(0.1, saab.xPos);\n Assertions.assertEquals(0.1, saab.yPos);\n }",
"public void rotateLeft (View view){ //onClick for LEFT Button\n\n if (toyRobotIsActive) {\n\n robot.animate().rotationBy(-90f).setDuration(50); //turn toy robot LEFT\n\n rotateLeft--; //counter to determine orientation\n System.out.println(\"rotateLeft \" + rotateLeft);\n System.out.println(\"rotateLeft + rotateRight = \"\n + orientation(rotateLeft, rotateRight)); //chk params in Logs\n\n } else errorMessage(\"Please place toy robot\");\n }",
"@Override\r\n\tpublic void moveLeft() {\n\t\tswitch(state) {\r\n\t\tcase 0: case 2:\r\n\t\t\t{\r\n\t\t\t\tboolean ok = true;\r\n\t\t\t\tfor(Case c: cases) {\r\n\t\t\t\t\tif(!grille.isEmpty(c.getX()+x-1, c.getY()+y))\r\n\t\t\t\t\t\tok = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(ok)\r\n\t\t\t\t\t--x;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t{\r\n\t\t\tint x3 = cases.get(3).getX()-1, y3 = cases.get(3).getY();\r\n\t\t\tif(grille.isEmpty(x+x3, y+y3))\r\n\t\t\t\t--x;\r\n\t\t\t\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tcase 3:\r\n\t\t{\r\n\t\t\tint x0 = cases.get(0).getX()-1, y0 = cases.get(0).getY();\r\n\t\t\tif(grille.isEmpty(x+x0, y+y0))\r\n\t\t\t\t--x;\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tdefault : \r\n\t\t\treturn;\r\n\t\t}\r\n\t}",
"public void setLeftMotors(double speed){\n motorLeft1.set(speed);\n // motorLeft2.set(-speed);\n }",
"private void LeftLeftLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t}",
"public void changeDirection(){\n\t\tthis.toRight ^= true;\n\t\t\n\t\tif(this.toRight)\n\t\t\tthis.nextElem = (this.currElem + 1) % players.size();\n\t\telse\n\t\t\tthis.nextElem = (this.currElem - 1 + players.size()) % players.size();\n\t}",
"public int getStateSwitchPosition();",
"@Test\n\t public void processLeftCommands()\n\t {\n\t Rover rover = createFrontFacingRoverAt(0, 0);\n\t rover.executeCommands(\"l\");\n\t assertTrue(0 == rover.facing.x);\n\t assertTrue(-1 == rover.facing.y);\n\n\t }",
"public void switchOn();",
"public void setX() {\n m_frontLeft.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(45)));\n m_frontRight.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(-45)));\n m_rearLeft.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(-45)));\n m_rearRight.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(45)));\n }",
"void left() {\n startAnimation(leftSubCubes(), Axis.X, Direction.ANTICLOCKWISE);\n leftCubeSwap();\n }",
"public void oneTurn(){\n Integer[] previousTurn = Arrays.copyOf(this.board, this.board.length);\n\n // itero su previousTurn per costruire il board successivo\n for (int i=0;i<previousTurn.length;i++){\n\n // mi salvo la situazione della casella sx, se i==0 prendo l'ultima\n int left = previousTurn[previousTurn.length-1];\n if (i!=0)\n left = previousTurn[i-1];\n\n // mi salvo la situazione della casella dx, se i==ultima prendo zero\n int right = previousTurn[0];\n if (i!=previousTurn.length-1)\n right = previousTurn[i+1];\n \n // se a sx e dx c'è 0, metto 0\n // caso fine sottopopolazione (010->000)\n if (left == 0 && right == 0){\n this.board[i] = 0;\n \n // se a sx e dx c'è 1, metto 1 se c'era 0 e viceversa\n // caso nascita (101->111) e fine sovrappopolazione (111->101)\n } else if (left == 1 && right == 1)\n if (this.board[i] == 1)\n this.board[i] = 0;\n else\n this.board[i] = 1;\n \n // tutte le altre casistiche, lascio invariata la situazione\n \n }\n\n this.turn += 1;\n }",
"private void turnOverItself() {\n byte tmp = leftEdge;\n leftEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n\n tmp = rightEdge;\n rightEdge = reversedLeftEdge;\n reversedLeftEdge = tmp;\n\n tmp = topEdge;\n topEdge = reversedTopEdge;\n reversedTopEdge = tmp;\n\n tmp = botEdge;\n botEdge = reversedBotEdge;\n reversedBotEdge = tmp;\n\n tmp = ltCorner;\n ltCorner = rtCorner;\n rtCorner = tmp;\n\n tmp = lbCorner;\n lbCorner = rbCorner;\n rbCorner = tmp;\n }",
"public void turnClockwise(double power){\n motorFrontLeft.setPower(-power);\n motorBackLeft.setPower(-power);\n motorFrontRight.setPower(power);\n motorBackRight.setPower(power);\n }",
"void moveLeft() {\n\t\tsetX(x-1);\r\n\t\tdx=-1;\r\n\t\tdy=0;\r\n\t}",
"public boolean switchOn(){\n if(this.is_Switched_On){\n return false;\n }\n this.is_Switched_On = true;\n return true;\n }",
"@Override\n public void turnLeft(Double angle) {\n angle = Math.toRadians(angle);\n double temp = vector.x;\n vector.x = vector.x * Math.cos(angle) - vector.y * Math.sin(angle);\n vector.y = temp * Math.sin(angle) + vector.y * Math.cos(angle);\n }",
"private void changeTurn(){ \r\n\t\tif (currentTurn == 1)\r\n\t\t\tcurrentTurn = 0; \r\n\t\telse\r\n\t\t\tcurrentTurn = 1; \r\n\t}",
"public void slideLeft() {\n turnLeft();\n move();\n turnRight();\n }",
"public boolean moveLeft() {\n\t\tif (check(col-1, row)) {\n\t\t\tHiVolts.board.squares[row][col] = 0;\n\t\t\tcol = col - 1;\n\t\t\tHiVolts.board.squares[row][col] = 2;\n\t\t\tsuper.moveLeft();\n\t\t}\n\t\treturn true;\n\t}",
"public void moveLeft(){\n\t\tif(GameSystem.TWO_PLAYER_MODE){\n\t\t\tif(Game.getPlayer2().dying){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(animation==ANIMATION.DAMAGED||Game.getPlayer().dying||channelling||charging) return;\n\t\tmoving=true;\n\t\tbuttonReleased=false;\n\t\torientation=ORIENTATION.LEFT;\n\t\tif(animation!=ANIMATION.MOVELEFT) {\n\t\t\tanimation=ANIMATION.MOVELEFT;\n\t\t\tif(run!=null) sequence.startSequence(run);\n\t\t}\n\t\tfacing=FACING.LEFT;\n\t\tdirection=\"left\";\n\t\tsetNextXY();\n\t\tsetDestination(nextX,nextY);\n\t\tvelX=-1*spd/2;\n\t\tvelY=0;\n\t}",
"private SWDrive() {\n super();\n leftMaster = new TalonSRX(Constants.LEFT_MASTER_PORT);\n leftMaster.setNeutralMode(NeutralMode.Brake);\n leftMaster.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 0);\n leftMaster.setSelectedSensorPosition(0, 0, 0);\n leftMaster.config_kP(0, Constants.LINEAR_GAINS[0], 0);\n leftMaster.config_kI(0, Constants.LINEAR_GAINS[1], 0);\n leftMaster.config_kD(0, Constants.LINEAR_GAINS[2], 0);\n leftMaster.configMotionAcceleration(1000, 0);\n\t\tleftMaster.configMotionCruiseVelocity(5000, 0);\n\t\tleftMaster.config_IntegralZone(0, 200, 0);\n\t\tleftMaster.configClosedloopRamp(0, 256);\n\t\tleftMaster.configOpenloopRamp(0, 256);\n\t\tleftMaster.configAllowableClosedloopError(0, Constants.LINEAR_EPSILON, 0);\n\n rightMaster = new TalonSRX(Constants.RIGHT_MASTER_PORT);\n rightMaster.setNeutralMode(NeutralMode.Brake);\n rightMaster.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 0);\n rightMaster.setSelectedSensorPosition(0, 0, 0);\n rightMaster.setInverted(true);\n rightMaster.config_kP(0, Constants.LINEAR_GAINS[0], 0);\n rightMaster.config_kI(0, Constants.LINEAR_GAINS[1], 0);\n rightMaster.config_kD(0, Constants.LINEAR_GAINS[2], 0);\n rightMaster.configMotionAcceleration(1000, 0);\n\t\trightMaster.configMotionCruiseVelocity(5000, 0);\n\t\trightMaster.config_IntegralZone(0, 200, 0);\n\t\trightMaster.configClosedloopRamp(0, 256);\n\t\trightMaster.configOpenloopRamp(0, 256);\n rightMaster.configAllowableClosedloopError(0, Constants.LINEAR_EPSILON, 0); \n\n leftSlave = new VictorSPX(Constants.LEFT_SLAVE_PORT);\n leftSlave.setNeutralMode(NeutralMode.Brake);\n leftSlave.follow(leftMaster);\n\n rightSlave = new VictorSPX(Constants.RIGHT_SLAVE_PORT);\n rightSlave.setNeutralMode(NeutralMode.Brake);\n //rightSlave.setInverted(true);\n rightSlave.follow(rightMaster);\n\n gearSolenoid = new DoubleSolenoid(Constants.DRIVE_SOLENOID_FORWARD, Constants.DRIVE_SOLENOID_REVERSE);\n\n navx = new AHRS(Port.kMXP);\n controller = new XboxController(Constants.PRIMARY_DRIVER_PORT);\n pid = new PIDController();\n\n try {\n //piComm = new DatagramSocket();\n //host = InetAddress.getByName(\"10.2.63.25\");\n } catch(Exception e) {\n System.out.println(\"Exception caught when initializing socket: \" + e.getMessage());\n }\n \n //tXBuffer = new CircularBuffer(10);\n\n tankEnabled = false;\n setpointReached = true;\n rotateSet = false;\n antiTiltEnabled = true;\n cargoSearch = false;\n piCamera = false;\n leftTarget = 0;\n rightTarget = 0;\n lacc = 0;\n racc = 0;\n }",
"public void strafeLeft(){\r\n\t\t//Following the camera:\r\n\t\tif(loc[1] > 1)\r\n\t\t{\r\n\t\t\tthis.loc[0] -= Math.sin(Math.toRadians(heading))*distance; \r\n\t\t\tthis.loc[2] -= Math.cos(Math.toRadians(heading))*distance;\r\n\t\t}\r\n\t}",
"public void direction()\n {\n if(!goLeft){\n horzVelocity = 1;\n }else{\n horzVelocity = -1;\n }\n }",
"@Test\n //checks for state switching (on/off)\n void SwitchStates() {\n Assertions.assertFalse(machine.isTurnedOn());\n\n //then, switch on and check if on\n machine.setTurnedOn(true);\n Assertions.assertTrue(machine.isTurnedOn());\n\n //switch off to see if turned off correctly\n machine.setTurnedOn(false);\n Assertions.assertFalse(machine.isTurnedOn());\n\n //and now check the inversion\n machine.flipSwitch();\n\n Assertions.assertTrue(machine.isTurnedOn());\n }",
"@Override\r\n\tpublic void BuildArmLeft() {\n\t\tg.drawLine(60, 50, 40, 100);\r\n\t}",
"public void moveLeft() {\n if (xcoor >= movingSpeed) {\n xcoor = xcoor - movingSpeed * 2;\n }\n }",
"public void turnLeft(Agent agent) throws RemoteException {\n\t\tObject obj = agents.get(agent.getName());\n\t\tPoint point = (Point) obj;\n\t\tif (agent.getRow() != point.x || agent.getColumn() != point.y) {\n\t\t\tSystem.out.println(\"Incompativeis!!!\");\n\t\t\treturn;\n\t\t}\n\t\tsetDirection(agent.getRow(), agent.getColumn(), agent.getName(),\n\t\t\t\t\t\t\t\t\t\t\t\t\tagent.getDirection());\n\t}",
"public void setLeft() {\n\t\tstate = State.LEFT;\n\t}",
"@Override\n\tpublic void onTurnLeft(PlatformPlayer player) {\n\t\t\n\t}",
"private void redSouthTurnLeft(int intersection) {\n int index = getIntersectionIndex(intersection);\n isGreenSouthTurnLeft[index] = false;\n }",
"public void turnCW() {\n turn(true);\n }",
"public void onMirrorHorizontal() {\n mirror(TransformDesign.MIRROR_HORIZONTAL, 0.0f);\n }",
"private void updateDirection()\n {\n if (Math.abs(InputSystem.LT_Button_Control_Stick) > 0.1)\n {\n // if lt button is pressed, reverse direction of elevator\n setReverseDirection(true);\n }\n else\n {\n setReverseDirection(false);\n }\n }",
"protected void moveWest(){\n\t\tcar.setXLocation(currentX - 1);\n\t\tcurrentX -= 1;\n\t}",
"public void frontDown(){\n frontSolenoid.set(DoubleSolenoid.Value.kReverse);\n }",
"public void strafeLeftEnc()\r\n\t{\r\n//\t\tdrive.setPos(0, 0, -Config.Auto.encStrafeDistance, -Config.Auto.encStrafeDistance);\r\n//\t\tif(Math.abs(drive.getFrontEncDist() - Config.Auto.encStrafeDistance) < Config.Auto.encTolerance && Math.abs(drive.getBackEncDist() - Config.Auto.encStrafeDistance) < Config.Auto.encTolerance)\r\n//\t\t{\r\n//\t\t\tdrive.setPos(-Config.Auto.encDistanceBetweenTotes, -Config.Auto.encDistanceBetweenTotes, -Config.Auto.encStrafeDistance, -Config.Auto.encStrafeDistance);\r\n//\t\t\t\r\n//\t\t\tif(Math.abs(drive.getLeftEncDist() - Config.Auto.encDistanceBetweenTotes) < Config.Auto.encTolerance && Math.abs(drive.getRightEncDist() - Config.Auto.encDistanceBetweenTotes) < Config.Auto.encTolerance)\r\n//\t\t\t{\r\n//\t\t\t\tdrive.setPos(-Config.Auto.encDistanceBetweenTotes, -Config.Auto.encDistanceBetweenTotes, 0, 0);\r\n//\t\t\t\t\r\n//\t\t\t\tif((Math.abs(drive.getFrontEncDist()) < Config.Auto.encTolerance && Math.abs(drive.getBackEncDist()) < Config.Auto.encTolerance))\r\n//\t\t\t\t\tendRoutine();\t\t\t\t\r\n//\t\t\t}\r\n//\t\t}\r\n\t}",
"public void goLeft() {\n\t\tx -= dx;\n\t\tbgBack.setDx(true);\n\t\tbgBack.move();\n\t\tif(x < 200) {\n\t\t\tif(!bgBack.getReachBegin()) {\n\t\t\t\tx = 200;\n\t\t\t\tbgFront.setDx(true);\n\t\t\t\tbgFront.move();\n\t\t\t}\n\t\t\telse if(x < 50) {\n\t\t\t\tx = 50;\n\t\t\t}\n\t\t}\n\n\t}",
"public void moveLeft() {\r\n\t\tif (x > 0) x--; \r\n\t}",
"void moveLeft();",
"public Vertex moveLeft() {\n for (Edge e : current.outEdges) {\n move(e.to.x == current.x - 1, e);\n }\n return current;\n }"
] | [
"0.6696065",
"0.66569203",
"0.64900744",
"0.64812595",
"0.6479802",
"0.647352",
"0.6469669",
"0.633409",
"0.6321643",
"0.626171",
"0.6225869",
"0.6223077",
"0.62139535",
"0.6203686",
"0.6115723",
"0.61027694",
"0.60403305",
"0.60182273",
"0.6013665",
"0.59825486",
"0.5942786",
"0.59381425",
"0.59213644",
"0.5904327",
"0.5894628",
"0.5882766",
"0.58615935",
"0.58607656",
"0.5856816",
"0.5855608",
"0.5832946",
"0.5825634",
"0.58115345",
"0.5797615",
"0.5777082",
"0.57665145",
"0.57625085",
"0.5751529",
"0.5751505",
"0.57253444",
"0.5721899",
"0.5705695",
"0.569333",
"0.5692487",
"0.5673573",
"0.56723017",
"0.5670092",
"0.5666739",
"0.5624788",
"0.5616448",
"0.5616014",
"0.560975",
"0.5608602",
"0.5605859",
"0.55991745",
"0.5597952",
"0.559781",
"0.5593347",
"0.55918646",
"0.5568444",
"0.5562167",
"0.5558982",
"0.55454516",
"0.5544775",
"0.5544122",
"0.55433214",
"0.55419135",
"0.55382633",
"0.55332893",
"0.55305696",
"0.5530079",
"0.5529062",
"0.552208",
"0.5510991",
"0.5504292",
"0.5496421",
"0.54960424",
"0.54959553",
"0.54846805",
"0.5482781",
"0.5481738",
"0.5480477",
"0.54776186",
"0.5466085",
"0.5463215",
"0.5462356",
"0.54566854",
"0.54561293",
"0.5455426",
"0.54492164",
"0.54481244",
"0.54407716",
"0.54301065",
"0.54300016",
"0.5428087",
"0.5427158",
"0.54245174",
"0.54197454",
"0.54177916",
"0.54147285"
] | 0.6233624 | 10 |
SwitchLeft0 is connected to a horizontal straight in north direction. No connection is established. | @Test
public void connectTest_North_HorizontalStraight() throws Exception {
final Factory<Node> railNodeFactory = new DefaultRailNodeFactory();
final RailNode switchLeft0RailNode = (RailNode) railNodeFactory.create(1, 1, ShapeType.SWITCH_LEFT_0);
final RailNode horizontalRailNode = (RailNode) railNodeFactory.create(1, 0, ShapeType.STRAIGHT_HORIZONTAL);
final Model model = new DefaultModel();
model.setNode(1, 1, switchLeft0RailNode);
model.setNode(1, 0, horizontalRailNode);
switchLeft0RailNode.connect(model);
horizontalRailNode.connect(model);
System.out.println(switchLeft0RailNode.toString());
System.out.println(horizontalRailNode.toString());
assertEquals(0, switchLeft0RailNode.getGraphNodeOne().getChildren().size());
assertEquals(0, switchLeft0RailNode.getGraphNodeTwo().getChildren().size());
assertEquals(0, horizontalRailNode.getGraphNodeOne().getChildren().size());
assertEquals(0, horizontalRailNode.getGraphNodeTwo().getChildren().size());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void turnLeft() {\n LEFT_MOTOR.backward();\n RIGHT_MOTOR.forward();\n }",
"public void turnLeft() {\n\t\tthis.setSteeringDirection(getSteeringDirection()-5);\n\t\t}",
"@Test\n\tpublic void connectTest_West_HorizontalStraight() throws Exception {\n\n\t\tfinal Factory<Node> railNodeFactory = new DefaultRailNodeFactory();\n\n\t\tfinal RailNode switchLeft0RailNode = (RailNode) railNodeFactory.create(1, 1, ShapeType.SWITCH_LEFT_0);\n\t\tfinal RailNode horizontalRailNode = (RailNode) railNodeFactory.create(2, 1, ShapeType.STRAIGHT_HORIZONTAL);\n\n\t\tfinal Model model = new DefaultModel();\n\t\tmodel.setNode(1, 1, switchLeft0RailNode);\n\t\tmodel.setNode(2, 1, horizontalRailNode);\n\n\t\tswitchLeft0RailNode.connect(model);\n\t\thorizontalRailNode.connect(model);\n\n\t\tSystem.out.println(switchLeft0RailNode.toString());\n\t\tSystem.out.println(horizontalRailNode.toString());\n\n\t\tassertEquals(1, switchLeft0RailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(0, switchLeft0RailNode.getGraphNodeTwo().getChildren().size());\n\t\tassertEquals(2, switchLeft0RailNode.getGraphNodeOne().getChildren().get(0).getId());\n\n\t\tassertEquals(0, horizontalRailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(1, horizontalRailNode.getGraphNodeTwo().getChildren().size());\n\t\tassertEquals(1, horizontalRailNode.getGraphNodeTwo().getChildren().get(0).getId());\n\t}",
"private void rotateLeft() {\n robot.leftBack.setPower(-TURN_POWER);\n robot.leftFront.setPower(-TURN_POWER);\n robot.rightBack.setPower(TURN_POWER);\n robot.rightFront.setPower(TURN_POWER);\n }",
"public void turnLeft ()\n\t{\n\t\t//changeFallSpeed (-1);\n\t\tturnInt = -1;\n\t}",
"@Test\n\tpublic void connectTest_East_HorizontalStraight() throws Exception {\n\n\t\tfinal Factory<Node> railNodeFactory = new DefaultRailNodeFactory();\n\n\t\tfinal RailNode switchLeft0RailNode = (RailNode) railNodeFactory.create(1, 1, ShapeType.SWITCH_LEFT_0);\n\t\tfinal RailNode horizontalRailNode = (RailNode) railNodeFactory.create(0, 1, ShapeType.STRAIGHT_HORIZONTAL);\n\n\t\tfinal Model model = new DefaultModel();\n\t\tmodel.setNode(1, 1, switchLeft0RailNode);\n\t\tmodel.setNode(0, 1, horizontalRailNode);\n\n\t\tswitchLeft0RailNode.connect(model);\n\t\thorizontalRailNode.connect(model);\n\n\t\tSystem.out.println(switchLeft0RailNode.toString());\n\t\tSystem.out.println(horizontalRailNode.toString());\n\n\t\tassertEquals(0, switchLeft0RailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(1, switchLeft0RailNode.getGraphNodeTwo().getChildren().size());\n\t\tassertEquals(3, switchLeft0RailNode.getGraphNodeTwo().getChildren().get(0).getId());\n\n\t\tassertEquals(1, horizontalRailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(0, horizontalRailNode.getGraphNodeTwo().getChildren().size());\n\t\tassertEquals(0, horizontalRailNode.getGraphNodeOne().getChildren().get(0).getId());\n\t}",
"public void turnLeft() {\r\n setDirection( modulo( myDirection-1, 4 ) );\r\n }",
"public void turnLeft()\r\n\t{\r\n\t\t\r\n\t\theading -= 2; //JW\r\n\t\t//Following the camera:\r\n\t\t\t//heading -= Math.sin(Math.toRadians(15))*distance; \r\n\t\t\t//heading -= Math.cos(Math.toRadians(15))*distance;\r\n\t}",
"private void turnLeft() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n switch (direction) {\n case EAST:\n direction = Position.Direction.NORTH;\n break;\n case WEST:\n direction = Position.Direction.SOUTH;\n break;\n case NORTH:\n direction = Position.Direction.WEST;\n break;\n case SOUTH:\n direction = Position.Direction.EAST;\n break;\n }\n\n currentPosition.setDirection(direction);\n }",
"public void leftButtonPressed() {\n\t\tif(droneApp.myDrone.isConnected) {\n\t\t\tif(!on) {\n\t\t\t\t// Enable our steamer\n\t\t\t\tstreamer.enable();\n\t\t\t\t// Enable the sensor\n\t\t\t\tdroneApp.myDrone.quickEnable(qsSensor);\n\t\t\t\t\n\t\t\t\ton = true;\n\t\t\t\t\n\t\t\t\tint w = tvSensorValue.getWidth();\n\t\t\t\tint h = tvSensorValue.getHeight();\n\t\t\t\t\n\t\t\t\tif(firstTime) {\t\t\n\t\t\t\t\tfirstTime = false;\n\t\t\t\t\twarmUpWindow1 = new PopupWindow(layout2, w, h, true);\n\t\t\t\t\twarmUpWindow1.setOutsideTouchable(true);\n\t\t\t\t\twarmUpWindow1.setFocusable(false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(warmedUp) {\n\t\t\t\t\twarmedUp = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tshowWarmupWindow(h);\n\t\t\t\tcountdown1Handler.post(countdown1Runnable);\n\t\t\t} else {\n\t\t\t\tresetAllOperations();\n\t\t\t}\n\t\t}\n\t}",
"public void moveLeft() {\n if (!this.state.equals(\"onLeftWall\")) {\n this.dir = -1;\n this.xTargetSpeed = this.X_MAX_SPEED;\n }\n }",
"public void moveLeft(){\n\t\tif(GameSystem.TWO_PLAYER_MODE){\n\t\t\tif(Game.getPlayer2().dying){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(animation==ANIMATION.DAMAGED||Game.getPlayer().dying||channelling||charging) return;\n\t\tmoving=true;\n\t\tbuttonReleased=false;\n\t\torientation=ORIENTATION.LEFT;\n\t\tif(animation!=ANIMATION.MOVELEFT) {\n\t\t\tanimation=ANIMATION.MOVELEFT;\n\t\t\tif(run!=null) sequence.startSequence(run);\n\t\t}\n\t\tfacing=FACING.LEFT;\n\t\tdirection=\"left\";\n\t\tsetNextXY();\n\t\tsetDestination(nextX,nextY);\n\t\tvelX=-1*spd/2;\n\t\tvelY=0;\n\t}",
"public void turnLeft();",
"private void turnLeft(View v){\n\t\tswitch(this.facingDirection){\n\t\tcase NORTH:\n\t\t\tfacingDirection = Direction.WEST;\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tfacingDirection = Direction.EAST;\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tfacingDirection = Direction.SOUTH;\n\t\t\tbreak;\n\t\tcase EAST:\n\t\t\tfacingDirection = Direction.NORTH;\n\t\t}\n\t}",
"@Test\n\tpublic void connectTest_North_VerticalStraight() throws Exception {\n\n\t\tfinal Factory<Node> railNodeFactory = new DefaultRailNodeFactory();\n\n\t\tfinal RailNode switchLeft0RailNode = (RailNode) railNodeFactory.create(1, 1, ShapeType.SWITCH_LEFT_0);\n\t\tfinal RailNode horizontalRailNode = (RailNode) railNodeFactory.create(1, 0, ShapeType.STRAIGHT_VERTICAL);\n\n\t\tfinal Model model = new DefaultModel();\n\t\tmodel.setNode(1, 1, switchLeft0RailNode);\n\t\tmodel.setNode(1, 0, horizontalRailNode);\n\n\t\tswitchLeft0RailNode.connect(model);\n\t\thorizontalRailNode.connect(model);\n\n\t\tSystem.out.println(switchLeft0RailNode.toString());\n\t\tSystem.out.println(horizontalRailNode.toString());\n\n\t\tassertEquals(1, switchLeft0RailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(0, switchLeft0RailNode.getGraphNodeTwo().getChildren().size());\n\t\tassertEquals(2, switchLeft0RailNode.getGraphNodeOne().getChildren().get(0).getId());\n\n\t\tassertEquals(0, horizontalRailNode.getGraphNodeOne().getChildren().size());\n\t\tassertEquals(1, horizontalRailNode.getGraphNodeTwo().getChildren().size());\n\t\tassertEquals(1, horizontalRailNode.getGraphNodeTwo().getChildren().get(0).getId());\n\t}",
"public void setLeft() {\n\t\tstate = State.LEFT;\n\t}",
"public void leftPressed() {\n System.out.println(\"leftPressed()\");\n current.translate(0, -1);\n display.showBlocks();\n }",
"public void sideLeft(double targetDistance, double power) {\n setDriveMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n setDriveMode(DcMotor.RunMode.RUN_USING_ENCODER);\n double currentDistance = 0;\n while (Math.abs(currentDistance) < targetDistance && opModeIsActive()) {\n currentDistance = frontRight.getCurrentPosition();\n frontLeft.setPower(power);\n frontRight.setPower(-power);\n backLeft.setPower(-power);\n backRight.setPower(power);\n }\n stopMotors();\n }",
"public LeftSwitchToFirstCubePt2Arc() {\n\t\tsuper();\n\t\tthis.highGear = true;\n\t\tcenterProfile = new SrxMotionProfile(centerPoints.length, centerPoints);\n\t}",
"public void moveLeft() {\n Coordinate leftCoord = new Coordinate(getX() - 1, getY());\n handleMove(leftCoord, InteractionHandler.LEFT);\n }",
"public void left () {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return;\n Location loc = getLocation();\n Location next = loc.getAdjacentLocation(Location.WEST);\n if (canMove(next)) {\n moveTo(next);\n }\n }",
"private void LeftLeftLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t}",
"public void moveLeft()\n\t{\n\t\tmoveLeft = true;\n\t}",
"private void handleLeft() {\r\n\t\tcontroller.getCurrentPosition().realocate((controller.getCurrentPosition().getY()), controller.getCurrentPosition().getX()-1);\r\n\t\t// if User reaches the end of the board reset position\r\n\t\tif(controller.getCurrentPosition().getX()==-1) {\r\n\t\t\tcontroller.getCurrentPosition().realocate((controller.getCurrentPosition().getY()), controller.getNumberColumns()-1);\r\n\t\t}\r\n\t\t// remove the pseudo Class from all nodes so that only the cell that was pressed last looks 'pressed'\r\n\t\tfor (Node n : controller.getGridBoard().getChildren()) {\r\n\t\t\t((StackPane) n).pseudoClassStateChanged(PseudoClass.getPseudoClass(\"pressed\"), false);\r\n\t\t\tif (GridPane.getColumnIndex(n) == controller.getCurrentPosition().getX() && GridPane.getRowIndex(n) == controller.getCurrentPosition().getY()) {\r\n\t\t\t\t((StackPane) n).pseudoClassStateChanged(PseudoClass.getPseudoClass(\"pressed\"), true);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void turnleftBy(double angle) {\n leftMotor.rotate(-convertAngle(angle), true);\n rightMotor.rotate(convertAngle(angle), false);\n }",
"public void setLeft(Lane left) {\r\n\t\tthis.left = left;\r\n\t}",
"private void driveLeft() {\n setSpeed(MIN_SPEED, MAX_SPEED);\n }",
"public void rotateLeft() {\n\t\tthis.direction = this.direction.rotateLeft();\n\t}",
"public void turnLeft() { turn(\"LEFT\"); }",
"void findLeft(Board board) {\n if (tile.getColPos() != 0) {\n Tile leftTile = board.getTileObjByPosition(tile.getRowPos(), tile.getColPos() - 1);\n if (leftTile != null) {\n if (RailroadInk.areConnectedNeighbours(tile.getPlacementStr(), leftTile.getPlacementStr())) {\n Node leftNode;\n if ((leftTile.graphId > 0) || ((leftTile.graphId == -1) && (leftTile.leftId == graphId))) {\n leftNode = nodeMap.get(leftTile.pos);\n } else {\n leftNode = new Node(leftTile);\n if (leftTile.name.equals(\"B2\")) {\n leftTile.rightId = graphId;\n }\n nodeMap.put(leftTile.pos, leftNode);\n }\n\n // Update the connection relationship.\n this.left = leftNode;\n leftNode.right = this;\n if (this.tile.name.equals(\"B2\")) {\n this.tile.leftId = graphId;\n }\n\n if ((!leftTile.name.equals(\"B2\")) && (leftNode.up == null)) {\n leftNode.findUp(board);\n }\n if ((!leftTile.name.equals(\"B2\")) && (leftNode.down == null)) {\n leftNode.findDown(board);\n }\n if (leftNode.left == null) {\n leftNode.findLeft(board);\n }\n }\n }\n }\n }",
"public void setLeftNeighbor(Board leftNeighbor) {\r\n\t\tthis.leftNeighbor = leftNeighbor;\r\n\t}",
"private void playerMoveLeft()\n {\n \n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentX(getCurrentX() - 1);\n if (this.getCurrentX() > -1) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentX(this.getCurrentX() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else {\n this.setCurrentX(getCurrentX() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n }",
"private void LeftRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}",
"@Override\r\n\tpublic void onLeft() {\n\t\tif (snakeView.smer != snakeView.VZHOD) {\r\n\t\t\tsnakeView.naslednjaSmer = snakeView.ZAHOD;\r\n\t\t}\r\n\t}",
"public void steady(){\n if(steady){\n if(!bellySwitch.get()) {\n leftMotor.set(-.3);\n rightMotor.set(-.3);\n }else {\n leftMotor.set(0);\n rightMotor.set(0);\n } \n }\n }",
"public void changeDirection()\n {\n if(goLeft){\n goLeft = false;\n }else{\n goLeft = true;\n }\n }",
"public Vertex moveLeft() {\n for (Edge e : current.outEdges) {\n move(e.to.x == current.x - 1, e);\n }\n return current;\n }",
"@Override\n\tpublic void onTurnLeft(PlatformPlayer player) {\n\t\t\n\t}",
"public void moveLeft() {\n \tif(!move.moveLeft()) {\n \t\tif(physinteractor(getX()-1,getY())) {\n \t\t\tmove.moveLeft();\n \t\t\tnonphysinteractor(getX(),getY());\n \t\t\tupdatemove();\n \t\t}\n }else {\n \tupdatemove();\n \tnonphysinteractor(getX(),getY());\n }\n }",
"@Override\r\n\tpublic void rotateLeft() {\n\t\tsetDirection((this.getDirection() + 3) % 4);\r\n\t}",
"public void moveLeft() {\n speedX -= (speedX > 0) ? acceleration * 2 : acceleration;\n if (speedX < -maxSpeed) {\n speedX = -maxSpeed;\n }\n direction = Direction.LEFT;\n }",
"public void moveLeft()\n {\n if (xPos == 0)\n {\n movementY = 0;\n movementX = 0;\n }\n\n // Set the movement factor - negative X because we are moving LEFT! \n movementX = -0.5;\n movementY = 0;\n }",
"public void turnLeft(Agent agent) throws RemoteException {\n\t\tObject obj = agents.get(agent.getName());\n\t\tPoint point = (Point) obj;\n\t\tif (agent.getRow() != point.x || agent.getColumn() != point.y) {\n\t\t\tSystem.out.println(\"Incompativeis!!!\");\n\t\t\treturn;\n\t\t}\n\t\tsetDirection(agent.getRow(), agent.getColumn(), agent.getName(),\n\t\t\t\t\t\t\t\t\t\t\t\t\tagent.getDirection());\n\t}",
"@Override\r\n\tpublic void moveLeft() {\n\t\tswitch(state) {\r\n\t\tcase 0: case 2:\r\n\t\t\t{\r\n\t\t\t\tboolean ok = true;\r\n\t\t\t\tfor(Case c: cases) {\r\n\t\t\t\t\tif(!grille.isEmpty(c.getX()+x-1, c.getY()+y))\r\n\t\t\t\t\t\tok = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(ok)\r\n\t\t\t\t\t--x;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t{\r\n\t\t\tint x3 = cases.get(3).getX()-1, y3 = cases.get(3).getY();\r\n\t\t\tif(grille.isEmpty(x+x3, y+y3))\r\n\t\t\t\t--x;\r\n\t\t\t\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tcase 3:\r\n\t\t{\r\n\t\t\tint x0 = cases.get(0).getX()-1, y0 = cases.get(0).getY();\r\n\t\t\tif(grille.isEmpty(x+x0, y+y0))\r\n\t\t\t\t--x;\r\n\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tdefault : \r\n\t\t\treturn;\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void rotateLeft() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir - THETA);\r\n\t\t\r\n\t}",
"private void LeftLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}",
"public void moveLeft() {\n if (xcoor >= movingSpeed) {\n xcoor = xcoor - movingSpeed * 2;\n }\n }",
"public static void goLeft(Node parent) {\n\t\tint[][] tempArray = new int[3][3];\n\t\t\n\t\tint blankPositionRow = parent.getblankPositionRow();\n\t\tint blankPositionCol = parent.getblankPositionCol();\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\ttempArray[i][j] = parent.stateSpace[i][j];\n\t\t\t}\n\t\t}\n\t\tif (blankPositionCol != 0) {\n\t\t\tint temp = tempArray[blankPositionRow][blankPositionCol - 1];\n\t\t\ttempArray[blankPositionRow][blankPositionCol - 1] = 0;\n\t\t\ttempArray[blankPositionRow][blankPositionCol] = temp;\n\t\t\tNode node = new Node(tempArray, finalState, parent);\n\t\t\tchoiceOfNodes.add(node);\n\t\t\tnodesGenerated++;\n\t\t}\n\t}",
"void left() {\n startAnimation(leftSubCubes(), Axis.X, Direction.ANTICLOCKWISE);\n leftCubeSwap();\n }",
"public void moveLeft() {\r\n\t\tif (x > 0) x--; \r\n\t}",
"public void moveLeft() {\n\t\tsetPosX(getPosX() - steps);\n\t}",
"public boolean moveLeft() {\n\t\tif (check(col-1, row)) {\n\t\t\tHiVolts.board.squares[row][col] = 0;\n\t\t\tcol = col - 1;\n\t\t\tHiVolts.board.squares[row][col] = 2;\n\t\t\tsuper.moveLeft();\n\t\t}\n\t\treturn true;\n\t}",
"@Test\n\t public void processLeftCommands()\n\t {\n\t Rover rover = createFrontFacingRoverAt(0, 0);\n\t rover.executeCommands(\"l\");\n\t assertTrue(0 == rover.facing.x);\n\t assertTrue(-1 == rover.facing.y);\n\n\t }",
"public void rotateLeft() {\n // I fucked up? Rotations are reversed, just gonna switch em\n// tileLogic = getRotateLeft();\n tileLogic = getRotateRight();\n// rotateLeftTex();\n rotateRightTex();\n }",
"protected void left() {\n move(positionX - 1, positionY);\n orientation = BattleGrid.RIGHT_ANGLE * 2;\n }",
"public void goLeft() {\n\t\tx -= dx;\n\t\tbgBack.setDx(true);\n\t\tbgBack.move();\n\t\tif(x < 200) {\n\t\t\tif(!bgBack.getReachBegin()) {\n\t\t\t\tx = 200;\n\t\t\t\tbgFront.setDx(true);\n\t\t\t\tbgFront.move();\n\t\t\t}\n\t\t\telse if(x < 50) {\n\t\t\t\tx = 50;\n\t\t\t}\n\t\t}\n\n\t}",
"public void turnLeft(double speed) {\n\t\tRobotMap.frontLeft.set(-speed);\n\t\tRobotMap.backLeft.set(-speed);\n\t\tRobotMap.frontRight.set(-speed);\n\t\tRobotMap.backRight.set(-speed);\n\t}",
"public void slideLeft() {\n turnLeft();\n move();\n turnRight();\n }",
"public void left(){\n\t\tmoveX=-1;\n\t\tmoveY=0;\n\t}",
"public void turnLeft(int nbTour) {\n\t\tfor(int i=0; i<nbTour; i++) {\n\t\t\tthis.leftM.backward();\n\t\t\tthis.rightM.forward();\n\t\t\tDelay.msDelay(myclass.STD_TIME);\n\t\t\tthis.leftM.stop();\n\t\t\tthis.rightM.stop();\n\t\t}\n\t}",
"public void changeToLoGear() {\n\t\tspeedShifter.set(DoubleSolenoid.Value.kForward); // forward is low gear,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// port 1\n\t\tSystem.out.println(\"switch\");\n\t}",
"public void updateLeftWeight(){\r\n\t \tif(this.leftNode != null)\r\n\t \t{\r\n\t \t\tif( this.leftNode.isNoGoZone() == true)\r\n\t \t{\r\n\t \t\t\t//set edge weight to 9999 if the next node is NO go zone or\r\n\t \t\t\t//boundary node\r\n\t \t\tthis.leftWeight = weightOfNoGoZone;\r\n\t \t}\r\n\t \telse if(this.leftNode.isRoad() == true && this.leftNode.isNoGoZone() == false)\r\n\t \t{\r\n\t \t\t//set edge weight to 1 if the next node is a road node\r\n\t \t\tthis.leftWeight = this.leftNode.getOwnElevation();\r\n\t \t}\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\t//set edge weight to INF if the next node is NULL\r\n\t \t\tthis.leftWeight = weightOfMapEdge;\r\n\t \t}\r\n\t }",
"public void moveLeft() {\r\n\t\t\r\n\t\tint leftSteps=10;\r\n\t\t\ttopX-= leftSteps;\r\n\t}",
"private void redWestTurnLeft(int intersection) {\n int index = getIntersectionIndex(intersection);\n isGreenWestTurnLeft[index] = false;\n }",
"public void turnLightsOn()\n {\n set(Relay.Value.kForward);\n }",
"public abstract void turnLeft();",
"public void moveLeft() {\n\t\t\n\t}",
"public void setLeft(int x) {\r\n leftSide = x;\r\n }",
"public void setSwitchOn() throws UnavailableDeviceException, ClosedDeviceException, IOException{\n\t\tswitch1.setValue(false);\n\t\tthis.switchState = true; \n\t}",
"void moveLeft() {\n\t\tsetX(x-1);\r\n\t\tdx=-1;\r\n\t\tdy=0;\r\n\t}",
"public void switchOn() throws RemoteHomeConnectionException {\n m.sendCommand(parseDeviceIdForMultipleDevice(getRealDeviceId()), \"l\"+getSubDeviceNumber()+\"o\");\n setCurrentState(true);\n }",
"public void turn() {\n rightMotor.resetTachoCount();\n rightMotor.setSpeed(DEFAULT_TURN_SPEED);\n leftMotor.setSpeed(DEFAULT_TURN_SPEED);\n rightMotor.forward();\n leftMotor.backward();\n\n }",
"public void moveLeft() {\n if (rec.getUpperLeft().getX() - 5 < leftBorder) {\n rec.getUpperLeft().setX(leftBorder);\n } else {\n rec.getUpperLeft().setX(rec.getUpperLeft().getX() - 5);\n }\n\n }",
"public void rotateLeft() {\n\t\tif (rotLeft == null) {\n\t\t\tQuaternion quat = new Quaternion();\n\t\t\tquat.fromAngles(0f, (float) Math.toRadians(90), 0f);\n\t\t\trotLeft = quat.toRotationMatrix();\n\t\t}\n\n\t\tgetNode().getLocalRotation().apply(rotLeft);\n\t}",
"private void preSwitchPanel()\n {\n switchPanel = true;\n configureNext = true;\n configurePrevious = true;\n }",
"public void switchSides() {\n\t\tint temp = 0;\r\n\t\ttemp = leftValue;\r\n\t\tleftValue = rightValue;\r\n\t\trightValue = temp;\r\n\t}",
"@Test\n public void testTurnLeft() {\n saab.xPos = 0;\n saab.yPos = 0;\n saab.startEngine();\n\n saab.move();\n\n Assertions.assertEquals(1, saab.direction[0]);\n Assertions.assertEquals(0, saab.direction[1]);\n\n Assertions.assertEquals(0.1, saab.xPos);\n Assertions.assertEquals(0, saab.yPos);\n\n\n saab.turnLeft();\n\n // Should be same position\n Assertions.assertEquals(0.1, saab.xPos);\n Assertions.assertEquals(0, saab.yPos);\n\n // Should be different direction\n Assertions.assertEquals(0, saab.direction[0]);\n Assertions.assertEquals(1, saab.direction[1]);\n\n saab.move();\n\n Assertions.assertEquals(0.1, saab.xPos);\n Assertions.assertEquals(0.1, saab.yPos);\n }",
"public void moveLeft()\n\t{\n\t\tx = x - STEP_SIZE;\n\t}",
"private void RightLeftLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\t\n \t\t\n \t\n \t}\n \t}",
"public static native void startAutoSwitch();",
"public void setMoveLeft(boolean TorF) {\n moveLeft = TorF;\n }",
"public void moveLeft() {\n this.accelerateXL();\n this.moveX(this.getxSpeed());\n this.setPicX(0);\n this.setPicY(141);\n this.setLoopCells(true);\n }",
"private void stateMovingLeft(float dt) {\n setPosition(b2body.getPosition().x - getWidth() / 2, b2body.getPosition().y - getHeight() / 2);\n setRegion(bridgeStand);\n\n // Kinematic bodies do not collide with static ones (we can't use WorldContactListener)\n float velX;\n if (getX() <= 0) {\n velX = b2body.getLinearVelocity().x * -1;\n b2body.setLinearVelocity(velX, VELOCITY_Y);\n currentState = State.MOVING_RIGHT;\n }\n }",
"void leftInv() {\n startAnimation(leftSubCubes(), Axis.X, Direction.CLOCKWISE);\n leftCubeSwap();\n leftCubeSwap();\n leftCubeSwap();\n }",
"public void left() {\n\t\tstate.left();\n\t}",
"public void strafeLeftEnc()\r\n\t{\r\n//\t\tdrive.setPos(0, 0, -Config.Auto.encStrafeDistance, -Config.Auto.encStrafeDistance);\r\n//\t\tif(Math.abs(drive.getFrontEncDist() - Config.Auto.encStrafeDistance) < Config.Auto.encTolerance && Math.abs(drive.getBackEncDist() - Config.Auto.encStrafeDistance) < Config.Auto.encTolerance)\r\n//\t\t{\r\n//\t\t\tdrive.setPos(-Config.Auto.encDistanceBetweenTotes, -Config.Auto.encDistanceBetweenTotes, -Config.Auto.encStrafeDistance, -Config.Auto.encStrafeDistance);\r\n//\t\t\t\r\n//\t\t\tif(Math.abs(drive.getLeftEncDist() - Config.Auto.encDistanceBetweenTotes) < Config.Auto.encTolerance && Math.abs(drive.getRightEncDist() - Config.Auto.encDistanceBetweenTotes) < Config.Auto.encTolerance)\r\n//\t\t\t{\r\n//\t\t\t\tdrive.setPos(-Config.Auto.encDistanceBetweenTotes, -Config.Auto.encDistanceBetweenTotes, 0, 0);\r\n//\t\t\t\t\r\n//\t\t\t\tif((Math.abs(drive.getFrontEncDist()) < Config.Auto.encTolerance && Math.abs(drive.getBackEncDist()) < Config.Auto.encTolerance))\r\n//\t\t\t\t\tendRoutine();\t\t\t\t\r\n//\t\t\t}\r\n//\t\t}\r\n\t}",
"public void spinLeft(double speed) {\r\n \tspeed = Math.abs(speed);\r\n \tleftTopMotor.set(-1 * speed);\r\n \tleftBottomMotor.set(-1 * speed);\r\n \trightTopMotor.set(-1 * speed);\r\n \trightBottomMotor.set(-1 * speed);\r\n }",
"public Direction left() {\r\n\t\tif (this.direction == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tswitch (this.direction) {\r\n\t\tcase NORTH:\r\n\t\t\tthis.direction = Direction.WEST;\r\n\t\t\tbreak;\r\n\t\tcase WEST:\r\n\t\t\tthis.direction = Direction.SOUTH;\r\n\t\t\tbreak;\r\n\t\tcase SOUTH:\r\n\t\t\tthis.direction = Direction.EAST;\r\n\t\t\tbreak;\r\n\t\tcase EAST:\r\n\t\t\tthis.direction = Direction.NORTH;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn this.direction;\r\n\t}",
"public Direction moveLeft() {\n switch(this){\n case EAST :\n return NORTH;\n case SOUTH :\n return EAST;\n case WEST :\n return SOUTH;\n case NORTH :\n return WEST;\n }\n return this;\n }",
"private void applyLeftTurn(WorldSpatial.Direction orientation, float delta) {\n\t\tswitch(orientation){\n\t\tcase EAST:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.NORTH)){\n\t\t\t\tturnLeft(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase NORTH:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.WEST)){\n\t\t\t\tturnLeft(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.EAST)){\n\t\t\t\tturnLeft(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tif(!getOrientation().equals(WorldSpatial.Direction.SOUTH)){\n\t\t\t\tturnLeft(delta);\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t\n\t\t}\n\t\t\n\t}",
"public void leftDrive(double speed) {\n\t\tleft1.set(speed);\n\t\tleft2.set(speed);\n\t\tleft3.set(speed);\n\t}",
"public void onMirrorHorizontal() {\n mirror(TransformDesign.MIRROR_HORIZONTAL, 0.0f);\n }",
"public Board getLeftNeighbor() {\r\n\t\treturn leftNeighbor;\r\n\t}",
"public boolean slideLeft() {\n\t\tif (currentCol > 0) {\n\t\t\tboard[currentRow][currentCol] = board[currentRow][currentCol - 1];\n\t\t\tcurrentCol--;\n\t\t\tboard[currentRow][currentCol] = '0';\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public void setX() {\n m_frontLeft.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(45)));\n m_frontRight.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(-45)));\n m_rearLeft.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(-45)));\n m_rearRight.setDesiredState(new SwerveModuleState(0, Rotation2d.fromDegrees(45)));\n }",
"public void moveLeft()\n {\n if (this.x >= 2) {\n --x;\n } else {\n System.out.println(\"Move is outside of the field! Try again.\");\n }\n }",
"public void enableKillSwitch(){\n isClimbing = false;\n isClimbingArmDown = false;\n Robot.isKillSwitchEnabled = true;\n }",
"@Override\n protected void initialize() {\n encoderMotor = new TalonSRX(RobotMap.LeftFrontTurn);\n encoderMotor.configSelectedFeedbackSensor(FeedbackDevice.PulseWidthEncodedPosition, 0, 10);\n }",
"@Override\n\tpublic void setIrLeft(int irLeft) {\n\t\t\n\t}",
"@Override\r\n\tpublic void setLeft(MoveLeftCommand left) {\n\r\n\t}"
] | [
"0.69104534",
"0.65555835",
"0.65137166",
"0.6512687",
"0.62916094",
"0.6244999",
"0.62041265",
"0.61440843",
"0.6018739",
"0.59987503",
"0.5988301",
"0.5967109",
"0.5945816",
"0.5909955",
"0.5906448",
"0.5900267",
"0.58781683",
"0.5875859",
"0.58529854",
"0.58129823",
"0.58051026",
"0.57939327",
"0.57908374",
"0.57841444",
"0.5773425",
"0.57685006",
"0.5766567",
"0.57644415",
"0.57526827",
"0.5735625",
"0.57265526",
"0.572428",
"0.57205683",
"0.5719232",
"0.56986415",
"0.5645156",
"0.560585",
"0.56056863",
"0.5601544",
"0.5600875",
"0.5597312",
"0.5596396",
"0.55762744",
"0.55708116",
"0.55685085",
"0.55556715",
"0.55551434",
"0.55523354",
"0.5549832",
"0.55302954",
"0.55297804",
"0.55286694",
"0.5523387",
"0.55057406",
"0.5500523",
"0.54982615",
"0.54779613",
"0.5468562",
"0.5456502",
"0.54475653",
"0.5444282",
"0.54356",
"0.54215956",
"0.54212874",
"0.541757",
"0.54153645",
"0.54140866",
"0.54135734",
"0.53946817",
"0.53910595",
"0.5390594",
"0.5381877",
"0.5378847",
"0.53502023",
"0.5335592",
"0.5330648",
"0.53289044",
"0.5321277",
"0.5320507",
"0.5320236",
"0.5311761",
"0.5301269",
"0.52978706",
"0.529038",
"0.5286563",
"0.5270542",
"0.5261535",
"0.52595127",
"0.52464825",
"0.5242426",
"0.5226569",
"0.52222943",
"0.5221262",
"0.52119684",
"0.5199425",
"0.5186605",
"0.51824313",
"0.5180864",
"0.51804924",
"0.517853"
] | 0.6641813 | 1 |
TODO Autogenerated method stub | @Override
public boolean isAggressive() {
return true;
} | {
"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 |
/ renamed from: fl reason: default package / compiled from: GreedyContent | public interface fl {
void a(ListIterator<fe> listIterator);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"default boolean visitContent() {\n\t\treturn true;\n\t}",
"public ContentKj () {\n\t\tsuper();\n\t}",
"public void defaultContent() {\n\t\tgetter().switchTo().defaultContent();\r\n\t}",
"private void LoadContent()\n {\n \n }",
"@Override\r\n\tprotected String buildContent() {\n\t\treturn null;\r\n\t}",
"abstract public Content createContent();",
"protected abstract Content newContent();",
"public void seeFreshContent();",
"@Override\r\n protected void parseDocuments()\r\n {\n\r\n }",
"public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tfticBaseEClass = createEClass(FTIC_BASE);\n\n\t\titemEClass = createEClass(ITEM);\n\n\t\thypertextEClass = createEClass(HYPERTEXT);\n\t\tcreateEReference(hypertextEClass, HYPERTEXT__CONTENT);\n\n\t\ttextElementEClass = createEClass(TEXT_ELEMENT);\n\t\tcreateEAttribute(textElementEClass, TEXT_ELEMENT__VISIBLE_CONTENT);\n\n\t\tlinkEClass = createEClass(LINK);\n\t\tcreateEReference(linkEClass, LINK__TARGET);\n\n\t\ttermEClass = createEClass(TERM);\n\n\t\tfactorTableEClass = createEClass(FACTOR_TABLE);\n\t\tcreateEAttribute(factorTableEClass, FACTOR_TABLE__TYPE);\n\t\tcreateEReference(factorTableEClass, FACTOR_TABLE__ENTRIES);\n\n\t\tftEntryEClass = createEClass(FT_ENTRY);\n\t\tcreateEAttribute(ftEntryEClass, FT_ENTRY__NUMBERING);\n\t\tcreateEAttribute(ftEntryEClass, FT_ENTRY__NAME);\n\t\tcreateEReference(ftEntryEClass, FT_ENTRY__CHILDREN);\n\n\t\tfactorCategoryEClass = createEClass(FACTOR_CATEGORY);\n\n\t\tfactorEClass = createEClass(FACTOR);\n\t\tcreateEReference(factorEClass, FACTOR__DESCRIPTION);\n\t\tcreateEReference(factorEClass, FACTOR__FLEXIBILITY);\n\t\tcreateEReference(factorEClass, FACTOR__CHANGEABILITY);\n\t\tcreateEReference(factorEClass, FACTOR__INFLUENCE);\n\t\tcreateEAttribute(factorEClass, FACTOR__PRIORITY);\n\n\t\tissueCardEClass = createEClass(ISSUE_CARD);\n\t\tcreateEAttribute(issueCardEClass, ISSUE_CARD__NAME);\n\t\tcreateEReference(issueCardEClass, ISSUE_CARD__DESCRIPTION);\n\t\tcreateEReference(issueCardEClass, ISSUE_CARD__SOLUTION);\n\t\tcreateEReference(issueCardEClass, ISSUE_CARD__STRATEGIES);\n\t\tcreateEReference(issueCardEClass, ISSUE_CARD__INFLUENCING_FACTORS);\n\t\tcreateEReference(issueCardEClass, ISSUE_CARD__RELATED_ISSUES);\n\n\t\tstrategyEClass = createEClass(STRATEGY);\n\t\tcreateEAttribute(strategyEClass, STRATEGY__NAME);\n\t\tcreateEReference(strategyEClass, STRATEGY__DESCRIPTION);\n\n\t\tinfluencingFactorEClass = createEClass(INFLUENCING_FACTOR);\n\t\tcreateEReference(influencingFactorEClass, INFLUENCING_FACTOR__DESCRIPTION);\n\t\tcreateEReference(influencingFactorEClass, INFLUENCING_FACTOR__FACTOR);\n\n\t\trelatedIssueEClass = createEClass(RELATED_ISSUE);\n\t\tcreateEReference(relatedIssueEClass, RELATED_ISSUE__ISSUE);\n\t\tcreateEReference(relatedIssueEClass, RELATED_ISSUE__DESCRIPTION);\n\n\t\tfticPackageEClass = createEClass(FTIC_PACKAGE);\n\t\tcreateEReference(fticPackageEClass, FTIC_PACKAGE__TABLES);\n\t\tcreateEReference(fticPackageEClass, FTIC_PACKAGE__ISSUE_CARDS);\n\t\tcreateEAttribute(fticPackageEClass, FTIC_PACKAGE__NAME);\n\n\t\t// Create enums\n\t\tcategoryTypeEEnum = createEEnum(CATEGORY_TYPE);\n\t}",
"@Override\n\tpublic void updateGraphicalContent(Engine en) {\n\t\t\n\t}",
"private List<ContentPlaceholder> getPrototypeContentPlaceholders()\n\t{\n\t\tList<ContentPlaceholder> contentPlaceholders = new ArrayList<ContentPlaceholder>();\n\t\t\n\t\tNewsItem item1 = new NewsItem(1, \"Anyone who's anyone in the Fallout community knows Pawel \\\"Ausir\\\" Dembowski. Founder of The Vault wiki which contains over 15,000 pages of Fallout lore, Pawel is a human encyclopedia of gaming's favorite post apocalyptic franchise\", \"Fallout Wiki Founder Banned From Wikia for Promoting Curse [Fallout]\", \"This is the short description\");\n\t\tNewsItem item2 = new NewsItem(2, \"The term 'cute' and 'tool' aren't often associated, but I can't think of a better way to describe this tiny screwdriver designed to look like a miniature tank hanging from your keyring\", \"Adorable Tool Tank Totally Out-Cutes Your Swiss Army Knife [Tools]\", \"This is the short description\");\n\t\tNewsItem item3 = new NewsItem(3, \"The Fraunhofer Institute for High Frequency Physics and Radar Techniques has taken this hot picture of the Russian Mars 13-ton probe Phobos-Grunt as it falls to planet Earth. It may hit tomorrow, but we still don't know where.\", \"Image of 13-Ton Russian Spacecraft As It Falls to Earth—Impact As Early As Tomorrow [Space]\", \"This is the short description\");\n\t\tNewsItem item4 = new NewsItem(4, \"Unless you work at the Pentagon, the key locks on your desk drawers are probably easy to compromise. So with their new Covert, the folks at Quirky figured that a drawer lock can't be picked if it can't be found\", \"Quirky's Invisible Drawer Locks Only Open With a Magnetic Key [Genius]\", \"This is the short description\");\n\t\tNewsItem item5 = new NewsItem(5, \"Thanks Prada for once again completely befuddling me when it comes to high fashion. Because while I certainly love the designs of classic American automobiles, I would never have thought to apply their iconic spoilers and taillights\", \"Prada's 2012 Spring Shoe Collection Inspired By Classic American Cars [Automotive]\", \"This is the short description\");\n\t\t\n\t\tNewsContentPlaceholder contentPlaceholderA = new NewsContentPlaceholder(1, 1);\n\t\tcontentPlaceholderA.addItem(item1);\n\t\tcontentPlaceholderA.addItem(item2);\n\t\tcontentPlaceholderA.addItem(item3);\n\t\tcontentPlaceholderA.addItem(item4);\n\t\tcontentPlaceholderA.addItem(item5);\n\t\t\n\t\tcontentPlaceholders.add(contentPlaceholderA);\n\t\t\n\t\tNewsContentPlaceholder contentPlaceholderB = new NewsContentPlaceholder(2, 1);\n\t\tcontentPlaceholderB.addItem(item1);\n\t\tcontentPlaceholderB.addItem(item2);\n\t\tcontentPlaceholderB.addItem(item3);\n\t\tcontentPlaceholderB.addItem(item4);\n\t\tcontentPlaceholderB.addItem(item5);\n\t\t\n\t\tcontentPlaceholders.add(contentPlaceholderB);\n\t\t\n\t\treturn contentPlaceholders;\n\t}",
"private DataFetcherResult<NodeContent> baseNodeFetcher(DataFetchingEnvironment env) {\n\t\tContentDao contentDao = Tx.get().contentDao();\n\t\tGraphQLContext gc = env.getContext();\n\t\tHibProject project = env.getSource();\n\t\tHibNode node = project.getBaseNode();\n\t\tgc.requiresPerm(node, READ_PERM, READ_PUBLISHED_PERM);\n\t\tList<String> languageTags = getLanguageArgument(env);\n\t\tContainerType type = getNodeVersion(env);\n\n\t\tHibNodeFieldContainer container = contentDao.findVersion(node, gc, languageTags, type);\n\t\treturn NodeTypeProvider.createNodeContentWithSoftPermissions(env, gc, node, languageTags, type, container);\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public interface Spider {\n /**\n * 获取当前页面的title\n * */\n String getHtmlTitle(Document doc);\n /**\n * 获取当前新闻的title\n * */\n String getTitle(Document doc);\n /**\n * 获取当前新闻的time\n * */\n Date getTime(Document doc);\n\n /**\n * 获取当前新闻的title\n * */\n String getTitle(Element element);\n\n /**\n * 获取当前新闻的content\n * */\n String getContent(Element element);\n /**\n * 获取当前新闻的time\n * */\n Date getTime(Element element);\n /**\n * 获取当前新闻的url\n * */\n String getUrl(Element element);\n\n /**\n * 获取当前新闻的url\n * */\n String getResourceUrl(Element element);\n\n Elements getElements(Document doc,String cssQuery);\n\n void getNewsContents(NewsExPage news);\n\n List<NewsExPage> getNews(Document doc);\n\n}",
"@Override\n public void feedingHerb() {\n\n }",
"public abstract String getContentDescription();",
"public Content createContent();",
"@Override\n public void perish() {\n \n }",
"public View getGraphic()\n{\n // Get image for file\n //Image img = _type==FileType.PACKAGE_DIR? Package : ViewUtils.getFileIconImage(_file);\n Image img = ViewUtils.getFileIconImage(_file);\n View grf = new ImageView(img); grf.setPrefSize(18,18);\n \n // If error/warning add Error/Warning badge as composite icon\n /*BuildIssue.Kind status = _proj!=null? _proj.getRootProject().getBuildIssues().getBuildStatus(_file) : null;\n if(status!=null) {\n Image badge = status==BuildIssue.Kind.Error? ErrorBadge : WarningBadge;\n ImageView bview = new ImageView(badge); bview.setLean(Pos.BOTTOM_LEFT);\n StackView spane = new StackView(); spane.setChildren(grf, bview); grf = spane;\n }*/\n \n // Return node\n return grf;\n}",
"ContentFactory getContentFactory();",
"public void LoadContent(){\n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n stylesheetEClass = createEClass(STYLESHEET);\n createEAttribute(stylesheetEClass, STYLESHEET__CHAR_SET);\n createEReference(stylesheetEClass, STYLESHEET__IMPORTS);\n createEReference(stylesheetEClass, STYLESHEET__STATEMENTS);\n\n cssTopLevelStatementEClass = createEClass(CSS_TOP_LEVEL_STATEMENT);\n\n cssOtherTopLevelDeclarationEClass = createEClass(CSS_OTHER_TOP_LEVEL_DECLARATION);\n\n importDeclarationEClass = createEClass(IMPORT_DECLARATION);\n createEAttribute(importDeclarationEClass, IMPORT_DECLARATION__IMPORT_URI);\n createEAttribute(importDeclarationEClass, IMPORT_DECLARATION__URL);\n createEAttribute(importDeclarationEClass, IMPORT_DECLARATION__MEDIA);\n\n mediaDeclarationEClass = createEClass(MEDIA_DECLARATION);\n createEReference(mediaDeclarationEClass, MEDIA_DECLARATION__MEDIA_QUERIES);\n createEReference(mediaDeclarationEClass, MEDIA_DECLARATION__MEDIA);\n createEReference(mediaDeclarationEClass, MEDIA_DECLARATION__MEMBERS);\n\n mediaDeclarationMembersEClass = createEClass(MEDIA_DECLARATION_MEMBERS);\n\n mediaQueryEClass = createEClass(MEDIA_QUERY);\n createEAttribute(mediaQueryEClass, MEDIA_QUERY__ONLY);\n createEAttribute(mediaQueryEClass, MEDIA_QUERY__NOT);\n createEAttribute(mediaQueryEClass, MEDIA_QUERY__MEDIA_TYPE);\n createEReference(mediaQueryEClass, MEDIA_QUERY__EXPRESSIONS);\n\n mediaQueryExpressionEClass = createEClass(MEDIA_QUERY_EXPRESSION);\n createEAttribute(mediaQueryExpressionEClass, MEDIA_QUERY_EXPRESSION__FEATURE);\n createEReference(mediaQueryExpressionEClass, MEDIA_QUERY_EXPRESSION__EXPRESSION);\n\n pageDeclarationEClass = createEClass(PAGE_DECLARATION);\n createEAttribute(pageDeclarationEClass, PAGE_DECLARATION__PSEUDO_PAGE);\n createEReference(pageDeclarationEClass, PAGE_DECLARATION__BODY);\n\n namespaceDeclarationEClass = createEClass(NAMESPACE_DECLARATION);\n createEAttribute(namespaceDeclarationEClass, NAMESPACE_DECLARATION__NAME);\n createEAttribute(namespaceDeclarationEClass, NAMESPACE_DECLARATION__URL);\n\n fontFaceDeclarationEClass = createEClass(FONT_FACE_DECLARATION);\n createEReference(fontFaceDeclarationEClass, FONT_FACE_DECLARATION__BODY);\n\n ruleSetEClass = createEClass(RULE_SET);\n createEReference(ruleSetEClass, RULE_SET__SELECTORS);\n createEReference(ruleSetEClass, RULE_SET__BODY);\n\n ruleSetBodyEClass = createEClass(RULE_SET_BODY);\n createEReference(ruleSetBodyEClass, RULE_SET_BODY__DECLARATIONS);\n\n propertyDeclarationEClass = createEClass(PROPERTY_DECLARATION);\n createEReference(propertyDeclarationEClass, PROPERTY_DECLARATION__VALUES_LISTS);\n\n knownPropertyDeclarationEClass = createEClass(KNOWN_PROPERTY_DECLARATION);\n createEAttribute(knownPropertyDeclarationEClass, KNOWN_PROPERTY_DECLARATION__NAME);\n\n unrecognizedPropertyDeclarationEClass = createEClass(UNRECOGNIZED_PROPERTY_DECLARATION);\n createEAttribute(unrecognizedPropertyDeclarationEClass, UNRECOGNIZED_PROPERTY_DECLARATION__NAME);\n\n propertyValuesListsEClass = createEClass(PROPERTY_VALUES_LISTS);\n createEReference(propertyValuesListsEClass, PROPERTY_VALUES_LISTS__LISTS);\n\n propertyValuesListEClass = createEClass(PROPERTY_VALUES_LIST);\n createEReference(propertyValuesListEClass, PROPERTY_VALUES_LIST__VALUES);\n\n propertyValueEClass = createEClass(PROPERTY_VALUE);\n createEReference(propertyValueEClass, PROPERTY_VALUE__VALUE);\n createEAttribute(propertyValueEClass, PROPERTY_VALUE__IMPORTANT);\n\n selectorEClass = createEClass(SELECTOR);\n\n simpleSelectorEClass = createEClass(SIMPLE_SELECTOR);\n\n typeSelectorEClass = createEClass(TYPE_SELECTOR);\n createEReference(typeSelectorEClass, TYPE_SELECTOR__NAMESPACE_PREFIX);\n createEAttribute(typeSelectorEClass, TYPE_SELECTOR__TYPE);\n\n namespacePrefixEClass = createEClass(NAMESPACE_PREFIX);\n createEReference(namespacePrefixEClass, NAMESPACE_PREFIX__NAMESPACE);\n\n universalSelectorEClass = createEClass(UNIVERSAL_SELECTOR);\n createEReference(universalSelectorEClass, UNIVERSAL_SELECTOR__NAMESPACE_PREFIX);\n\n attributeSelectorEClass = createEClass(ATTRIBUTE_SELECTOR);\n createEReference(attributeSelectorEClass, ATTRIBUTE_SELECTOR__ATTRIBUTE);\n createEAttribute(attributeSelectorEClass, ATTRIBUTE_SELECTOR__MATCHER);\n createEReference(attributeSelectorEClass, ATTRIBUTE_SELECTOR__VALUE);\n\n attributeEClass = createEClass(ATTRIBUTE);\n createEReference(attributeEClass, ATTRIBUTE__NAMESPACE_PREFIX);\n createEAttribute(attributeEClass, ATTRIBUTE__NAME);\n\n attributeValueLiteralEClass = createEClass(ATTRIBUTE_VALUE_LITERAL);\n\n idSelectorEClass = createEClass(ID_SELECTOR);\n createEAttribute(idSelectorEClass, ID_SELECTOR__NAME);\n\n classSelectorEClass = createEClass(CLASS_SELECTOR);\n createEAttribute(classSelectorEClass, CLASS_SELECTOR__NAME);\n\n pseudoSelectorEClass = createEClass(PSEUDO_SELECTOR);\n\n noArgsPseudoClassSelectorEClass = createEClass(NO_ARGS_PSEUDO_CLASS_SELECTOR);\n createEAttribute(noArgsPseudoClassSelectorEClass, NO_ARGS_PSEUDO_CLASS_SELECTOR__PSEUDO);\n\n pseudoElementSelectorEClass = createEClass(PSEUDO_ELEMENT_SELECTOR);\n createEAttribute(pseudoElementSelectorEClass, PSEUDO_ELEMENT_SELECTOR__DOUBLE_SEMI_COLON);\n createEAttribute(pseudoElementSelectorEClass, PSEUDO_ELEMENT_SELECTOR__PSEUDO);\n\n languagePseudoClassSelectorEClass = createEClass(LANGUAGE_PSEUDO_CLASS_SELECTOR);\n createEAttribute(languagePseudoClassSelectorEClass, LANGUAGE_PSEUDO_CLASS_SELECTOR__LANGUGAGE_ID);\n\n functionalPseudoClassSelectorEClass = createEClass(FUNCTIONAL_PSEUDO_CLASS_SELECTOR);\n createEAttribute(functionalPseudoClassSelectorEClass, FUNCTIONAL_PSEUDO_CLASS_SELECTOR__PSEUDO);\n createEReference(functionalPseudoClassSelectorEClass, FUNCTIONAL_PSEUDO_CLASS_SELECTOR__ARGUMENT);\n\n typeArgumentEClass = createEClass(TYPE_ARGUMENT);\n\n linearArgumentEClass = createEClass(LINEAR_ARGUMENT);\n createEReference(linearArgumentEClass, LINEAR_ARGUMENT__COEFFICIENT);\n createEAttribute(linearArgumentEClass, LINEAR_ARGUMENT__CONSTANT_SIGN);\n createEAttribute(linearArgumentEClass, LINEAR_ARGUMENT__CONSTANT);\n\n coefficientEClass = createEClass(COEFFICIENT);\n createEAttribute(coefficientEClass, COEFFICIENT__IDENT);\n createEAttribute(coefficientEClass, COEFFICIENT__INT);\n\n constantArgumentEClass = createEClass(CONSTANT_ARGUMENT);\n createEAttribute(constantArgumentEClass, CONSTANT_ARGUMENT__SIGN);\n createEAttribute(constantArgumentEClass, CONSTANT_ARGUMENT__INT);\n\n parityArgumentEClass = createEClass(PARITY_ARGUMENT);\n createEAttribute(parityArgumentEClass, PARITY_ARGUMENT__PARITY);\n\n negationSelectorEClass = createEClass(NEGATION_SELECTOR);\n createEReference(negationSelectorEClass, NEGATION_SELECTOR__SIMPLE_SELECTOR);\n\n valueLiteralEClass = createEClass(VALUE_LITERAL);\n\n numberLiteralEClass = createEClass(NUMBER_LITERAL);\n\n sizeLiteralEClass = createEClass(SIZE_LITERAL);\n\n stringLiteralEClass = createEClass(STRING_LITERAL);\n createEAttribute(stringLiteralEClass, STRING_LITERAL__VALUE);\n\n colorLiteralEClass = createEClass(COLOR_LITERAL);\n\n componentColorLiteralEClass = createEClass(COMPONENT_COLOR_LITERAL);\n\n colorComponentLiteralEClass = createEClass(COLOR_COMPONENT_LITERAL);\n createEReference(colorComponentLiteralEClass, COLOR_COMPONENT_LITERAL__NUMBER);\n createEAttribute(colorComponentLiteralEClass, COLOR_COMPONENT_LITERAL__PERCENTAGE);\n\n urlLiteralEClass = createEClass(URL_LITERAL);\n createEAttribute(urlLiteralEClass, URL_LITERAL__VALUE);\n\n bareWordLiteralEClass = createEClass(BARE_WORD_LITERAL);\n createEAttribute(bareWordLiteralEClass, BARE_WORD_LITERAL__BARE_WORD);\n\n functionCallLiteralEClass = createEClass(FUNCTION_CALL_LITERAL);\n createEAttribute(functionCallLiteralEClass, FUNCTION_CALL_LITERAL__FUNCTION);\n createEReference(functionCallLiteralEClass, FUNCTION_CALL_LITERAL__ARGUMENTS);\n\n descendantCombinatorEClass = createEClass(DESCENDANT_COMBINATOR);\n createEReference(descendantCombinatorEClass, DESCENDANT_COMBINATOR__LEFT);\n createEAttribute(descendantCombinatorEClass, DESCENDANT_COMBINATOR__WS_I);\n createEReference(descendantCombinatorEClass, DESCENDANT_COMBINATOR__RIGHT);\n\n childCombinatorEClass = createEClass(CHILD_COMBINATOR);\n createEReference(childCombinatorEClass, CHILD_COMBINATOR__LEFT);\n createEAttribute(childCombinatorEClass, CHILD_COMBINATOR__WS_L);\n createEAttribute(childCombinatorEClass, CHILD_COMBINATOR__WS_R);\n createEReference(childCombinatorEClass, CHILD_COMBINATOR__RIGHT);\n\n adjacentSiblingCombinatorEClass = createEClass(ADJACENT_SIBLING_COMBINATOR);\n createEReference(adjacentSiblingCombinatorEClass, ADJACENT_SIBLING_COMBINATOR__LEFT);\n createEAttribute(adjacentSiblingCombinatorEClass, ADJACENT_SIBLING_COMBINATOR__WS_L);\n createEAttribute(adjacentSiblingCombinatorEClass, ADJACENT_SIBLING_COMBINATOR__WS_R);\n createEReference(adjacentSiblingCombinatorEClass, ADJACENT_SIBLING_COMBINATOR__RIGHT);\n\n generalSiblingCombinatorEClass = createEClass(GENERAL_SIBLING_COMBINATOR);\n createEReference(generalSiblingCombinatorEClass, GENERAL_SIBLING_COMBINATOR__LEFT);\n createEAttribute(generalSiblingCombinatorEClass, GENERAL_SIBLING_COMBINATOR__WS_L);\n createEAttribute(generalSiblingCombinatorEClass, GENERAL_SIBLING_COMBINATOR__WS_R);\n createEReference(generalSiblingCombinatorEClass, GENERAL_SIBLING_COMBINATOR__RIGHT);\n\n simpleSelectorSequenceEClass = createEClass(SIMPLE_SELECTOR_SEQUENCE);\n createEReference(simpleSelectorSequenceEClass, SIMPLE_SELECTOR_SEQUENCE__HEAD);\n createEReference(simpleSelectorSequenceEClass, SIMPLE_SELECTOR_SEQUENCE__SIMPLE_SELECTORS);\n\n universalNamespacePrefixEClass = createEClass(UNIVERSAL_NAMESPACE_PREFIX);\n\n withoutNamespacePrefixEClass = createEClass(WITHOUT_NAMESPACE_PREFIX);\n\n stringAttributeValueLiteralEClass = createEClass(STRING_ATTRIBUTE_VALUE_LITERAL);\n createEAttribute(stringAttributeValueLiteralEClass, STRING_ATTRIBUTE_VALUE_LITERAL__VALUE);\n\n integerAttributeValueLiteralEClass = createEClass(INTEGER_ATTRIBUTE_VALUE_LITERAL);\n createEAttribute(integerAttributeValueLiteralEClass, INTEGER_ATTRIBUTE_VALUE_LITERAL__VALUE);\n\n decimalAttributeValueLiteralEClass = createEClass(DECIMAL_ATTRIBUTE_VALUE_LITERAL);\n createEAttribute(decimalAttributeValueLiteralEClass, DECIMAL_ATTRIBUTE_VALUE_LITERAL__VALUE);\n\n integerLiteralEClass = createEClass(INTEGER_LITERAL);\n createEAttribute(integerLiteralEClass, INTEGER_LITERAL__INT);\n\n decimalLiteralEClass = createEClass(DECIMAL_LITERAL);\n createEAttribute(decimalLiteralEClass, DECIMAL_LITERAL__DECIMAL);\n\n quantifiedSizeLiteralEClass = createEClass(QUANTIFIED_SIZE_LITERAL);\n createEReference(quantifiedSizeLiteralEClass, QUANTIFIED_SIZE_LITERAL__NUMBER);\n createEAttribute(quantifiedSizeLiteralEClass, QUANTIFIED_SIZE_LITERAL__DIMENSION);\n\n qualifiedSizeLiteralEClass = createEClass(QUALIFIED_SIZE_LITERAL);\n createEAttribute(qualifiedSizeLiteralEClass, QUALIFIED_SIZE_LITERAL__BAREWORD);\n\n fontHeightLiteralEClass = createEClass(FONT_HEIGHT_LITERAL);\n createEReference(fontHeightLiteralEClass, FONT_HEIGHT_LITERAL__FONT_HEIGHT);\n createEReference(fontHeightLiteralEClass, FONT_HEIGHT_LITERAL__LINE_HEIGHT);\n createEAttribute(fontHeightLiteralEClass, FONT_HEIGHT_LITERAL__LINE_HEIGHT_DIMENSION);\n\n rgbColorEClass = createEClass(RGB_COLOR);\n createEAttribute(rgbColorEClass, RGB_COLOR__RGB);\n\n namedColorEClass = createEClass(NAMED_COLOR);\n createEAttribute(namedColorEClass, NAMED_COLOR__COLOR);\n\n componentRGBColorEClass = createEClass(COMPONENT_RGB_COLOR);\n createEReference(componentRGBColorEClass, COMPONENT_RGB_COLOR__RED);\n createEReference(componentRGBColorEClass, COMPONENT_RGB_COLOR__GREEN);\n createEReference(componentRGBColorEClass, COMPONENT_RGB_COLOR__BLUE);\n\n componentRGBAlphaColorEClass = createEClass(COMPONENT_RGB_ALPHA_COLOR);\n createEReference(componentRGBAlphaColorEClass, COMPONENT_RGB_ALPHA_COLOR__RED);\n createEReference(componentRGBAlphaColorEClass, COMPONENT_RGB_ALPHA_COLOR__GREEN);\n createEReference(componentRGBAlphaColorEClass, COMPONENT_RGB_ALPHA_COLOR__BLUE);\n createEReference(componentRGBAlphaColorEClass, COMPONENT_RGB_ALPHA_COLOR__OPACITY);\n\n componentHSLColorEClass = createEClass(COMPONENT_HSL_COLOR);\n createEReference(componentHSLColorEClass, COMPONENT_HSL_COLOR__HUE);\n createEReference(componentHSLColorEClass, COMPONENT_HSL_COLOR__SATURATION);\n createEReference(componentHSLColorEClass, COMPONENT_HSL_COLOR__LIGHTNESS);\n\n componentHSLAlphaColorEClass = createEClass(COMPONENT_HSL_ALPHA_COLOR);\n createEReference(componentHSLAlphaColorEClass, COMPONENT_HSL_ALPHA_COLOR__HUE);\n createEReference(componentHSLAlphaColorEClass, COMPONENT_HSL_ALPHA_COLOR__SATURATION);\n createEReference(componentHSLAlphaColorEClass, COMPONENT_HSL_ALPHA_COLOR__LIGHTNESS);\n createEReference(componentHSLAlphaColorEClass, COMPONENT_HSL_ALPHA_COLOR__OPACITY);\n\n alphaLiteralEClass = createEClass(ALPHA_LITERAL);\n createEReference(alphaLiteralEClass, ALPHA_LITERAL__OPACITY);\n\n // Create enums\n knownPropertiesEEnum = createEEnum(KNOWN_PROPERTIES);\n attributeSelectorMatchersEEnum = createEEnum(ATTRIBUTE_SELECTOR_MATCHERS);\n noArgsPseudosEEnum = createEEnum(NO_ARGS_PSEUDOS);\n pseudoElementsEEnum = createEEnum(PSEUDO_ELEMENTS);\n functionalPseudoClassesEEnum = createEEnum(FUNCTIONAL_PSEUDO_CLASSES);\n paritiesEEnum = createEEnum(PARITIES);\n dimensionsEEnum = createEEnum(DIMENSIONS);\n colorNamesEEnum = createEEnum(COLOR_NAMES);\n }",
"public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\theuristicStrategyEClass = createEClass(HEURISTIC_STRATEGY);\n\t\tcreateEReference(heuristicStrategyEClass, HEURISTIC_STRATEGY__GRAPHIC_REPRESENTATION);\n\t\tcreateEReference(heuristicStrategyEClass, HEURISTIC_STRATEGY__NEMF);\n\t\tcreateEReference(heuristicStrategyEClass, HEURISTIC_STRATEGY__ECORE_CONTAINMENT);\n\t\tcreateEAttribute(heuristicStrategyEClass, HEURISTIC_STRATEGY__CURRENT_REPRESENTATION);\n\t\tcreateEAttribute(heuristicStrategyEClass, HEURISTIC_STRATEGY__CURRENT_MMGR);\n\t\tcreateEReference(heuristicStrategyEClass, HEURISTIC_STRATEGY__LIST_REPRESENTATION);\n\t\tcreateEOperation(heuristicStrategyEClass, HEURISTIC_STRATEGY___EXECUTE_HEURISTICS);\n\t\tcreateEOperation(heuristicStrategyEClass, HEURISTIC_STRATEGY___EXECUTE_ROOT_ELEMENT);\n\t\tcreateEOperation(heuristicStrategyEClass, HEURISTIC_STRATEGY___EXECUTE_GRAPHICAL_ELEMENTS);\n\t\tcreateEOperation(heuristicStrategyEClass, HEURISTIC_STRATEGY___GET_FEATURE_NAME__ECLASS_ECLASS);\n\t\tcreateEOperation(heuristicStrategyEClass, HEURISTIC_STRATEGY___GET_ELIST_ECLASSFROM_EREFERENCE__EREFERENCE);\n\t\tcreateEOperation(heuristicStrategyEClass, HEURISTIC_STRATEGY___EXECUTE_DIRECT_PATH_MATRIX);\n\n\t\tconcreteStrategyLinkEClass = createEClass(CONCRETE_STRATEGY_LINK);\n\n\t\tstrategyLabelEClass = createEClass(STRATEGY_LABEL);\n\t\tcreateEOperation(strategyLabelEClass, STRATEGY_LABEL___GET_LABEL__ECLASS);\n\n\t\tconcreteStrategyLabelFirstStringEClass = createEClass(CONCRETE_STRATEGY_LABEL_FIRST_STRING);\n\n\t\tconcreteStrategyLabelIdentifierEClass = createEClass(CONCRETE_STRATEGY_LABEL_IDENTIFIER);\n\n\t\tconcreteStrategyLabelParameterEClass = createEClass(CONCRETE_STRATEGY_LABEL_PARAMETER);\n\t\tcreateEReference(concreteStrategyLabelParameterEClass, CONCRETE_STRATEGY_LABEL_PARAMETER__LABEL_PARAMETER);\n\n\t\tlabelParameterEClass = createEClass(LABEL_PARAMETER);\n\t\tcreateEAttribute(labelParameterEClass, LABEL_PARAMETER__LIST_LABEL);\n\t\tcreateEOperation(labelParameterEClass, LABEL_PARAMETER___TO_COMMA_SEPARATED_STRING_LABEL);\n\t\tcreateEOperation(labelParameterEClass, LABEL_PARAMETER___DEFAULT_PARAMETERS);\n\n\t\tstrategyRootSelectionEClass = createEClass(STRATEGY_ROOT_SELECTION);\n\t\tcreateEOperation(strategyRootSelectionEClass, STRATEGY_ROOT_SELECTION___GET_ROOT__ELIST_ELIST);\n\t\tcreateEOperation(strategyRootSelectionEClass, STRATEGY_ROOT_SELECTION___LIST_ROOT__ELIST_ELIST);\n\n\t\tconcreteStrategyMaxContainmentEClass = createEClass(CONCRETE_STRATEGY_MAX_CONTAINMENT);\n\n\t\tconcreteStrategyNoParentEClass = createEClass(CONCRETE_STRATEGY_NO_PARENT);\n\n\t\tstrategyPaletteEClass = createEClass(STRATEGY_PALETTE);\n\t\tcreateEOperation(strategyPaletteEClass, STRATEGY_PALETTE___GET_PALETTE__EOBJECT);\n\n\t\tconcreteStrategyPaletteEClass = createEClass(CONCRETE_STRATEGY_PALETTE);\n\n\t\tstrategyArcSelectionEClass = createEClass(STRATEGY_ARC_SELECTION);\n\t\tcreateEReference(strategyArcSelectionEClass, STRATEGY_ARC_SELECTION__ARC_DIRECTION);\n\t\tcreateEOperation(strategyArcSelectionEClass, STRATEGY_ARC_SELECTION___IS_ARC__ECLASS);\n\n\t\tconcreteStrategyArcSelectionEClass = createEClass(CONCRETE_STRATEGY_ARC_SELECTION);\n\n\t\tstrategyArcDirectionEClass = createEClass(STRATEGY_ARC_DIRECTION);\n\t\tcreateEOperation(strategyArcDirectionEClass, STRATEGY_ARC_DIRECTION___GET_DIRECTION__ECLASS);\n\n\t\tarcParameterEClass = createEClass(ARC_PARAMETER);\n\t\tcreateEAttribute(arcParameterEClass, ARC_PARAMETER__SOURCE);\n\t\tcreateEAttribute(arcParameterEClass, ARC_PARAMETER__TARGET);\n\t\tcreateEOperation(arcParameterEClass, ARC_PARAMETER___DEFAULT_PARAM);\n\n\t\tdefaultArcParameterEClass = createEClass(DEFAULT_ARC_PARAMETER);\n\t\tcreateEOperation(defaultArcParameterEClass, DEFAULT_ARC_PARAMETER___TO_COMMA_SEPARATED_STRING_SOURCE);\n\t\tcreateEOperation(defaultArcParameterEClass, DEFAULT_ARC_PARAMETER___TO_COMMA_SEPARATED_STRING_TARGET);\n\n\t\tconcreteStrategyArcDirectionEClass = createEClass(CONCRETE_STRATEGY_ARC_DIRECTION);\n\t\tcreateEReference(concreteStrategyArcDirectionEClass, CONCRETE_STRATEGY_ARC_DIRECTION__PARAM);\n\t\tcreateEOperation(concreteStrategyArcDirectionEClass, CONCRETE_STRATEGY_ARC_DIRECTION___CONTAINS_STRING_EREFERENCE_NAME__ELIST_STRING);\n\n\t\tconcreteStrategyDefaultDirectionEClass = createEClass(CONCRETE_STRATEGY_DEFAULT_DIRECTION);\n\n\t\tstrategyNodeSelectionEClass = createEClass(STRATEGY_NODE_SELECTION);\n\t\tcreateEOperation(strategyNodeSelectionEClass, STRATEGY_NODE_SELECTION___IS_NODE__ECLASS);\n\n\t\tconcreteStrategyDefaultNodeSelectionEClass = createEClass(CONCRETE_STRATEGY_DEFAULT_NODE_SELECTION);\n\n\t\tstrategyPossibleElementsEClass = createEClass(STRATEGY_POSSIBLE_ELEMENTS);\n\t\tcreateEReference(strategyPossibleElementsEClass, STRATEGY_POSSIBLE_ELEMENTS__ECLASS_NO_ELEMENTS);\n\t\tcreateEOperation(strategyPossibleElementsEClass, STRATEGY_POSSIBLE_ELEMENTS___POSSIBLE_ELEMENTS__ECLASS_ELIST_ELIST);\n\n\t\tconcreteStrategyContainmentDiagramElementEClass = createEClass(CONCRETE_STRATEGY_CONTAINMENT_DIAGRAM_ELEMENT);\n\n\t\tecoreMatrixContainmentEClass = createEClass(ECORE_MATRIX_CONTAINMENT);\n\t\tcreateEAttribute(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT__DIRECT_MATRIX_CONTAINMENT);\n\t\tcreateEAttribute(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT__PATH_MATRIX);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___GET_PARENT__INTEGER);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___GET_DIRECT_MATRIX_CONTAINMENT__ELIST);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___GET_PATH_MATRIX);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___COPY_MATRIX);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___PRINT_DIRECT_MATRIX_CONTAINMENT__ELIST);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___GET_EALL_CHILDS__ECLASS_ELIST);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___GET_ALL_PARENTS__INTEGER);\n\n\t\theuristicStrategySettingsEClass = createEClass(HEURISTIC_STRATEGY_SETTINGS);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_LABEL);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_ROOT);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_PALETTE);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_ARC_SELECTION);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_NODE_SELECTION);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_POSSIBLE_ELEMENTS);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_LINKCOMPARTMENT);\n\n\t\tstrategyLinkCompartmentEClass = createEClass(STRATEGY_LINK_COMPARTMENT);\n\t\tcreateEReference(strategyLinkCompartmentEClass, STRATEGY_LINK_COMPARTMENT__LIST_LINKS);\n\t\tcreateEReference(strategyLinkCompartmentEClass, STRATEGY_LINK_COMPARTMENT__LIST_COMPARTMENT);\n\t\tcreateEReference(strategyLinkCompartmentEClass, STRATEGY_LINK_COMPARTMENT__LIST_AFFIXED);\n\t\tcreateEOperation(strategyLinkCompartmentEClass, STRATEGY_LINK_COMPARTMENT___EXECUTE_LINK_COMPARTMENTS_HEURISTICS__ECLASS);\n\n\t\tconcreteContainmentasAffixedEClass = createEClass(CONCRETE_CONTAINMENTAS_AFFIXED);\n\n\t\tconcreteContainmentasLinksEClass = createEClass(CONCRETE_CONTAINMENTAS_LINKS);\n\n\t\tconcreteContainmentasCompartmentsEClass = createEClass(CONCRETE_CONTAINMENTAS_COMPARTMENTS);\n\n\t\trepreHeurSSEClass = createEClass(REPRE_HEUR_SS);\n\t\tcreateEReference(repreHeurSSEClass, REPRE_HEUR_SS__HEURISTIC_STRATEGY_SETTINGS);\n\t}",
"public abstract String getNewContent();",
"abstract String getContent();",
"public void themesa()\n {\n \n \n \n \n }",
"public static void init() {\n\n\t\tcontentDirectory = new Document();\n\n\t\t//For ass\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\t\t//list of links to places (on reddit for example) to scrape from\n\t\tArrayList<String> redditAssLinks = new ArrayList<>();\n\t\tredditAssLinks.add(\"http://www.reddit.com/r/fffffffuuuuuuuuuuuu\"); //add sites here\n\n\t\tredditAssLinks.add(\"http://www.reddit.com/r/memes\");\n\t\tredditAssLinks.add(\"https://www.reddit.com/r/funnymeme/\");\n\t\tredditAssLinks.add(\"https://www.reddit.com/r/adviceanimals\");\n\t\tredditAssLinks.add(\"https://www.reddit.com/r/vertical\");\n\t\tredditAssLinks.add(\"https://www.reddit.com/r/firstworldproblems\");\n\t\tDocument redditAssDoc = new Document();\n\t\tredditAssDoc.append(\"reddit\", redditAssLinks);\n\n\t\t//could also append this when imgur implementation is ready:\n\t\t//contentDirectory.append(\"ass\", imgurAssDoc);\n\t\tcontentDirectory.append(\"ass\", redditAssDoc);\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\n\t\t//for workout\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\t\tArrayList<String> redditWorkoutLinks = new ArrayList<>();\n\t\tredditWorkoutLinks.add(\"http://www.reddit.com/r/gymfails\");\n\t\tredditWorkoutLinks.add(\"http://www.reddit.com/r/gymmemes\");\n\t\tredditWorkoutLinks.add(\"https://www.reddit.com/r/bodybuilding/\");\n\t\tredditWorkoutLinks.add(\"https://www.reddit.com/r/weightlifting\");\n\t\tDocument redditWorkoutDoc = new Document();\n\t\tredditWorkoutDoc.append(\"reddit\", redditWorkoutLinks);\n\n\t\tcontentDirectory.append(\"workout\", redditWorkoutDoc);\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\n\t\t//for minecraft\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\t\tArrayList<String> redditMinecraftLinks = new ArrayList<>();\n\t\tredditMinecraftLinks.add(\"http://www.reddit.com/r/Minecraft/\");\n\t\tredditMinecraftLinks.add(\"http://www.reddit.com/r/MinecraftSuggestions\");\n\t\tDocument redditMinecraftDoc = new Document();\n\t\tredditMinecraftDoc.append(\"reddit\", redditMinecraftLinks);\n\n\t\tcontentDirectory.append(\"minecraft\", redditMinecraftDoc);\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\n\n\t\t//for minecraft\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\t\tArrayList<String> redditKSPLinks = new ArrayList<>();\n\t\tredditKSPLinks.add(\"https://www.reddit.com/r/KerbalSpaceProgram/\");\n\t\tredditKSPLinks.add(\"https://www.reddit.com/r/KSPMemes\");\n\t\tredditKSPLinks.add(\"http://www.reddit.com/r/KerbalAcademy\");\n\t\tredditKSPLinks.add(\"https://www.reddit.com/r/RealSolarSystem/\");\n\t\tDocument redditKSPDoc = new Document();\n\t\tredditKSPDoc.append(\"reddit\", redditKSPLinks);\n\n\t\tcontentDirectory.append(\"KSP\", redditKSPDoc);\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\n\t\t//for weed\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\t\tArrayList<String> redditWeedLinks = new ArrayList<>();\n\t\tredditWeedLinks.add(\"https://www.reddit.com/r/weed/\");\n\t\tredditWeedLinks.add(\"https://www.reddit.com/r/trees/\");\n\t\tredditWeedLinks.add(\"https://www.reddit.com/r/Picturesoftrees/\");\n\t\tredditWeedLinks.add(\"https://www.reddit.com/r/bakedart/\");\n\t\tredditWeedLinks.add(\"https://www.reddit.com/r/treecomics/\");\n\t\tredditWeedLinks.add(\"https://www.reddit.com/r/nugs/\");\n\t\tredditWeedLinks.add(\"https://www.reddit.com/r/nugporn/\");\n\t\tredditWeedLinks.add(\"https://www.reddit.com/r/TokeSpot/\");\n\n\t\tDocument redditWeedDoc = new Document();\n\t\tredditWeedDoc.append(\"reddit\", redditWeedLinks);\n\n\t\tcontentDirectory.append(\"weed\", redditWeedDoc);\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\n\t\t//for drug\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\t\tArrayList<String> redditDrugLinks = new ArrayList<>();\n\t\tredditDrugLinks.add(\"https://www.reddit.com/r/DrugArt/\");\n\t\tredditDrugLinks.add(\"https://www.reddit.com/r/trippy/\");\n\t\tredditDrugLinks.add(\"https://www.reddit.com/r/drugmemes/\");\n\t\tDocument redditDrugDoc = new Document();\n\t\tredditDrugDoc.append(\"reddit\", redditDrugLinks);\n\n\t\tcontentDirectory.append(\"drug\", redditDrugDoc);\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\n\t\t//for cute animals\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\t\tArrayList<String> redditCanimalLinks = new ArrayList<>();\n\t\tredditCanimalLinks.add(\"https://www.reddit.com/r/aww/\");\n\t\tredditCanimalLinks.add(\"http://www.reddit.com/r/cats/\");\n\t\tredditCanimalLinks.add(\"https://www.reddit.com/r/babyanimals/\");\n\t\tredditCanimalLinks.add(\"https://www.reddit.com/r/AnimalsBeingBros\");\n\t\tredditCanimalLinks.add(\"https://www.reddit.com/r/woof_irl/\");\n\t\tDocument reddiCanimalDoc = new Document();\n\t\treddiCanimalDoc.append(\"reddit\", redditCanimalLinks);\n\n\t\tcontentDirectory.append(\"canimal\", reddiCanimalDoc);\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\n\n\t}",
"@Override\n\tpublic void eggHatches() {\n\t\t\n\t}",
"@Override // com.zhihu.android.moments.viewholders.BaseMomentsFeedViewHolder\n /* renamed from: y */\n public int mo67290y() {\n return ReDesignChangeHelper.f77299a.mo98217c() ? R.layout.zq : R.layout.zp;\n }",
"public void makePackageClassesHtmls(SizeBreakdown breakdown)\n throws IOException {\n for (String packageName : GlobalInformation.packageToClasses.keySet()) {\n \n TreeMap<Float, String> sortedClasses = new TreeMap<Float, String>(\n Collections.reverseOrder());\n float maxSize = 0f;\n \n int maxDepCount = 1;\n \n for (String className : GlobalInformation.packageToClasses.get(packageName)) {\n \n float curSize = 0f;\n if (!breakdown.classToPartialSize.containsKey(className)) {\n // This class not present in this code collection\n } else {\n curSize = breakdown.classToPartialSize.get(className);\n }\n \n int depCount = 0;\n if (GlobalInformation.classToWhatItDependsOn.containsKey(className)) {\n depCount = GlobalInformation.classToWhatItDependsOn.get(className).size();\n }\n \n if (curSize != 0f) {\n \n sortedClasses.put(curSize, className);\n if (curSize > maxSize) {\n maxSize = curSize;\n }\n if (depCount > maxDepCount) {\n maxDepCount = depCount;\n }\n }\n }\n \n PrintWriter outFile = new PrintWriter(\n getOutFile(classesInPackageFileName(breakdown, packageName)));\n \n outFile.println(\"<!DOCTYPE HTML PUBLIC \\\"-//W3C//DTD HTML 4.01//EN\\\"\");\n outFile.println(\"\\\"http://www.w3.org/TR/html4/strict.dtd\\\">\");\n outFile.println(\"<html>\");\n outFile.println(\"<head>\");\n outFile.println(\"<meta http-equiv=\\\"content-type\\\" content=\\\"text/html;charset=ISO-8859-1\\\">\");\n outFile.println(\"<link rel=\\\"stylesheet\\\" href=\\\"classLevel.css\\\" media=\\\"screen\\\">\");\n outFile.println(\"<title>Classes in package \\\"\" + packageName\n + \"\\\"</title>\");\n outFile.println(\"</head>\");\n outFile.println(\"<body>\");\n \n outFile.println(\"<center>\");\n outFile.println(\"<h2>Classes in package \\\"\" + packageName + \"\\\"</h2>\");\n addHeaderWithBreakdownContext(breakdown, outFile);\n outFile.println(\"</center>\");\n \n outFile.println(\"<div style=\\\"width:90%; height:80%; overflow-y:auto; overflow-x:auto; top: 120px; left:70px; position:absolute; background-color:white\\\"\");\n \n int yOffset = 0;\n for (Float size : sortedClasses.keySet()) {\n \n String className = sortedClasses.get(size);\n \n // TODO(kprobst): switch out the commented/uncommented lines below when\n // showing dependencies\n // float ratio = (size / maxSize) * 45;\n float ratio = (size / maxSize) * 85;\n \n if (ratio < 3) {\n ratio = 3;\n }\n \n // TODO(kprobst): not currently used, but will be for dependencies\n // get the dependency count\n int depCount = 0;\n if (GlobalInformation.classToWhatItDependsOn.containsKey(className)) {\n depCount = GlobalInformation.classToWhatItDependsOn.get(className).size();\n }\n float depRatio = ((float) depCount / (float) maxDepCount) * 45f;\n if (depRatio < 3.0) {\n depRatio = 3;\n }\n \n outFile.println(\"<div class=\\\"box\\\" style=\\\"width:\" + ratio\n + \"%; top: \" + yOffset + \"px; left: 60px;\\\">\");\n outFile.println(\"<div id=\\\"lb\\\">\");\n outFile.println(\"<div id=\\\"rb\\\">\");\n outFile.println(\"<div id=\\\"bb\\\"><div id=\\\"blc\\\"><div id=\\\"brc\\\">\");\n outFile.println(\"<div id=\\\"tb\\\"><div id=\\\"tlc\\\"><div id=\\\"trc\\\">\");\n outFile.println(\"<div id=\\\"content\\\">\");\n outFile.println(\"</div>\");\n outFile.println(\"</div></div></div></div>\");\n outFile.println(\"</div></div></div></div>\");\n outFile.println(\"</div>\");\n \n // TODO(kprobst): not currently used, but will be for dependencies\n /*\n * outFile.println(\"<div class=\\\"box-right\\\" style=\\\"width:\" + depRatio\n * + \"%; top: \" + yOffset + \"px; left: 50%\\\">\");\n * outFile.println(\"<div id=\\\"lb\\\">\");\n * outFile.println(\"<div id=\\\"rb\\\">\");\n * outFile.println(\"<div id=\\\"bb\\\"><div id=\\\"blc\\\"><div id=\\\"brc\\\">\");\n * outFile.println(\"<div id=\\\"tb\\\"><div id=\\\"tlc\\\"><div id=\\\"trc\\\">\");\n * outFile.println(\"<div id=\\\"content\\\">\"); outFile.println(\"</div>\");\n * outFile.println(\"</div></div></div></div>\");\n * outFile.println(\"</div></div></div></div>\");\n * outFile.println(\"</div>\");\n */\n \n int yOffsetText = yOffset + 8;\n outFile.printf(\"<div class=\\\"barlabel\\\" style=\\\"top:\" + yOffsetText\n + \"px; left:5px;\\\">%.1f</div>\\n\", size);\n if (GlobalInformation.displayDependencies == true) {\n outFile.println(\"<div class=\\\"barlabel\\\" style=\\\"top:\" + yOffsetText\n + \"px; left:70px;\\\"><a href=\\\"methodDependencies-\"\n + filename(packageName) + \".html#\" + className + \"\\\">\"\n + className + \"</a></div>\");\n } else {\n outFile.println(\"<div class=\\\"barlabel\\\" style=\\\"top:\" + yOffsetText\n + \"px; left:70px;\\\">\" + className + \"</div>\");\n }\n /*\n * //TODO(kprobst) make this a link String drillDownFileName = className\n * + \"Deps.html\"; outFile.println(\"<div class=\\\"barlabel\\\" style=\\\"top:\"\n * + yOffsetText + \"px; left:50%;\\\"><a href=\\\"\" + drillDownFileName +\n * \"\\\" target=\\\"_top\\\">Dependencies: \" + depCount + \"</a></div>\");\n */\n yOffset = yOffset + 25;\n }\n \n outFile.println(\"</div>\");\n outFile.println(\"</body>\");\n outFile.println(\"</html>\");\n outFile.close();\n }\n }",
"JPackage _package();",
"public void buildDocument() {\n/* 310 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 312 */ syncAccessMethods();\n/* */ }",
"protected void createContents() {\n\n\t}",
"@Override\r\n public void execute() throws BuildException \r\n {\r\n try {\r\n //Use Xerces as the parser. Does not support Saxon6.5.5 parser \r\n System.setProperty(\"org.xml.sax.driver\", \"org.apache.xerces.parsers.SAXParser\");\r\n System.setProperty(\"javax.xml.parsers.SAXParserFactory\", \"org.apache.xerces.jaxp.SAXParserFactoryImpl\");\r\n // System.setProperty(\"org.xml.sax.driver\", \"com.icl.saxon.aelfred.SAXDriver\");\r\n // System.setProperty(\"javax.xml.parsers.SAXParserFactory\", \"com.icl.saxon.aelfred.SAXParserFactoryImpl\");\r\n } catch (SecurityException se){\r\n System.out.println(\"[WARNING] Default parser is not set to Xerces. Make sure Saxon6.5.5 \" +\r\n \"is not in your CLASSPATH.\");\r\n } catch (Exception e){\r\n System.out.println(\"[WARNING] Default parser is not set to Xerces. Make sure Saxon6.5.5 \" +\r\n \"is not in your CLASSPATH\");\r\n }\r\n\r\n ArrayList<DocFileInfo> filesDescription = null; // list of information about the topic files\r\n ArrayList<File> htmlFiles = null; // topic files listed in the given directory\r\n ArrayList<String> htmlFilesPathRel = null;\r\n Map<String, String> tempDico = new HashMap<String, String>(); \r\n Iterator it;\r\n\r\n //File name initialization\r\n String htmlList = \"htmlFileList.js\";\r\n String htmlInfoList = \"htmlFileInfoList.js\";\r\n String indexName = \".js\";\r\n\r\n //timing\r\n Date dateStart = new Date();\r\n\t\t\r\n if (htmldir == null) {\r\n System.out.println(txt_no_args + \".\");\r\n return;\r\n }\r\n // Init input directory\r\n inputDir = new File(htmldir);\r\n\r\n // Begin of init\r\n\r\n // check if inputdir exists\t\t\r\n if ((inputDir == null) || !inputDir.exists()) {\r\n System.out.println(txt_no_inputdir + \" \"+ inputDir + \".\");\r\n return;\r\n }\r\n\r\n // check if outputdir defined\r\n if (outputDir == null) {\r\n //set the output directory: path= {inputDir}/search \r\n outputDir = inputDir.getPath().concat(File.separator).concat(searchdir);\r\n }\r\n\r\n // check if outputdir exists\r\n File tempfile = new File(outputDir); \r\n if (!tempfile.exists()) {\r\n boolean b = (new File(outputDir)).mkdir();\r\n if (!b) {\r\n System.out.println(txt_cannot_create_outputdir + \" \"+ outputDir + \".\");\r\n return;\r\n }\r\n }\r\n\t\t\r\n String inputPath = inputDir.getPath();\r\n \r\n //end of init\r\n\r\n\r\n // Get the list of all html files but the tocs, covers and indexes\r\n DirList nsiDoc = new DirList(inputDir, \"^.*\\\\.\" + htmlExtension + \"?$\", 1);\r\n htmlFiles = nsiDoc.getListFiles();\r\n // Check if found html files\r\n if ((htmlFiles == null) || htmlFiles.isEmpty()) {\r\n System.out.println(txt_no_html_files + \" \"+ inputDir + \".\");\r\n return;\r\n }\r\n // Get the list of all html files with relative paths \r\n htmlFilesPathRel = nsiDoc.getListFilesRelTo(inputPath);\r\n if (htmlFilesPathRel == null) {\r\n System.out.println(txt_no_relative_files_found);\r\n return;\t\t\t\r\n }\r\n\t\t\r\n // Create the list of the existing html files (index starts at 0)\r\n String htmlListPath = outputDir.concat(File.separator).concat(htmlList);\r\n WriteJSFiles.WriteHTMLList(htmlListPath, htmlFilesPathRel);\r\n\r\n // Parse each html file to retrieve the words:\r\n // ------------------------------------------\r\n\r\n // Retrieve the clean-up properties for indexing\r\n RetrieveCleanUpProps();\r\n RetrieveEncodingProps();\r\n // System.out.print(\"clean\"+\" \" +cleanUpStrings);\r\n\r\n //create a default handler\r\n //SaxHTMLIndex spe = new SaxHTMLIndex (); // do not use clean-up props files\r\n //SaxHTMLIndex spe = new SaxHTMLIndex (cleanUpStrings); // use clean-up props files\r\n FilesIndexer spe = new FilesIndexer(cleanUpStrings, cleanUpChars, encodingProps); // use clean-up props files\r\n\r\n if ( spe.init(tempDico) == 0 ) {\r\n\r\n //create a html file description list\r\n filesDescription = new ArrayList <DocFileInfo> ();\r\n\r\n it = htmlFiles.iterator ( ) ;\r\n\r\n // parse each html files\r\n while ( it.hasNext ( ) ) {\r\n File ftemp = (File) it.next();\r\n //tempMap.put(key, value);\r\n //The HTML file information are added in the list of FileInfoObject\r\n DocFileInfo docFileInfoTemp = new DocFileInfo(spe.runExtractData(ftemp, IndexerTask.indexerLanguage));\r\n\r\n // Set path relative to inputPath\r\n ftemp = docFileInfoTemp.getFullpath();\r\n String stemp = ftemp.toString(); \r\n int i = stemp.indexOf(inputPath);\r\n if ( i != 0 ) {\r\n System.out.println(\"The file path does not match with the input path: \" + stemp);\r\n continue;\r\n }\r\n int ad = stemp.equals(inputPath) ? 0 : 1;\r\n stemp = stemp.substring(inputPath.length() + ad);\r\n ftemp = new File (stemp);\r\n docFileInfoTemp.setFullpath(ftemp);\r\n\r\n filesDescription.add(docFileInfoTemp);\r\n }\r\n \r\n /*remove empty strings from the map*/\r\n if (tempDico.containsKey(\"\")) {\r\n tempDico.remove(\"\");\r\n }\r\n \r\n // write the index files\r\n if (tempDico.isEmpty()) {\r\n System.out.println(txt_no_words_gathered + \" \"+ inputDir + \".\");\r\n return;\r\n }\r\n\r\n WriteJSFiles.WriteIndex(outputDir.concat(File.separator).concat(indexName), tempDico);\r\n\r\n // write the html list file with title and shortdesc\r\n // create the list of the existing html files (index starts at 0)\r\n WriteJSFiles.WriteHTMLInfoList(outputDir.concat(File.separator).concat(htmlInfoList), filesDescription);\r\n\r\n // perf measurement\r\n Date dateEnd = new Date();\r\n long diff = dateEnd.getTime() - dateStart.getTime();\r\n if(diff < 1000) {\r\n System.out.println(\"Delay = \" + diff + \" milliseconds\");\r\n } else {\r\n System.out.println(\"Delay = \" + diff/1000 + \" seconds\");\r\n }\r\n } else {\r\n System.out.println(txt_wrong_dita_basedir);\r\n }\r\n }",
"@Override\n\tpublic void laysEgg() {\n\t\t\n\t}",
"public PublishNoImgJoke() {\n\t\tsuper();\n\t}",
"public void extractKnowledge()\n {\n }",
"public abstract Object getContent();",
"@Override\n\tpublic void renderSource() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"public void buildDocument() {\n/* 220 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 222 */ syncAccessMethods();\n/* */ }",
"public void initializePackageContents() {\n\t\tif (isInitialized) return;\n\t\tisInitialized = true;\n\n\t\t// Initialize package\n\t\tsetName(eNAME);\n\t\tsetNsPrefix(eNS_PREFIX);\n\t\tsetNsURI(eNS_URI);\n\n\t\t// Obtain other dependent packages\n\t\tGraphic_representationPackage theGraphic_representationPackage = (Graphic_representationPackage)EPackage.Registry.INSTANCE.getEPackage(Graphic_representationPackage.eNS_URI);\n\t\tSplitterLibraryPackage theSplitterLibraryPackage = (SplitterLibraryPackage)EPackage.Registry.INSTANCE.getEPackage(SplitterLibraryPackage.eNS_URI);\n\t\tEcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);\n\n\t\t// Create type parameters\n\n\t\t// Set bounds for type parameters\n\n\t\t// Add supertypes to classes\n\t\tconcreteStrategyLabelFirstStringEClass.getESuperTypes().add(this.getStrategyLabel());\n\t\tconcreteStrategyLabelIdentifierEClass.getESuperTypes().add(this.getStrategyLabel());\n\t\tconcreteStrategyLabelParameterEClass.getESuperTypes().add(this.getStrategyLabel());\n\t\tconcreteStrategyMaxContainmentEClass.getESuperTypes().add(this.getStrategyRootSelection());\n\t\tconcreteStrategyNoParentEClass.getESuperTypes().add(this.getStrategyRootSelection());\n\t\tconcreteStrategyPaletteEClass.getESuperTypes().add(this.getStrategyPalette());\n\t\tconcreteStrategyArcSelectionEClass.getESuperTypes().add(this.getStrategyArcSelection());\n\t\tdefaultArcParameterEClass.getESuperTypes().add(this.getArcParameter());\n\t\tconcreteStrategyArcDirectionEClass.getESuperTypes().add(this.getStrategyArcDirection());\n\t\tconcreteStrategyDefaultDirectionEClass.getESuperTypes().add(this.getStrategyArcDirection());\n\t\tconcreteStrategyDefaultNodeSelectionEClass.getESuperTypes().add(this.getStrategyNodeSelection());\n\t\tconcreteStrategyContainmentDiagramElementEClass.getESuperTypes().add(this.getStrategyPossibleElements());\n\t\tconcreteContainmentasAffixedEClass.getESuperTypes().add(this.getStrategyLinkCompartment());\n\t\tconcreteContainmentasLinksEClass.getESuperTypes().add(this.getStrategyLinkCompartment());\n\t\tconcreteContainmentasCompartmentsEClass.getESuperTypes().add(this.getStrategyLinkCompartment());\n\n\t\t// Initialize classes, features, and operations; add parameters\n\t\tinitEClass(heuristicStrategyEClass, HeuristicStrategy.class, \"HeuristicStrategy\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getHeuristicStrategy_Graphic_representation(), theGraphic_representationPackage.getGraphicRepresentation(), null, \"graphic_representation\", null, 0, 1, HeuristicStrategy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getHeuristicStrategy_Nemf(), theSplitterLibraryPackage.getEcoreEMF(), null, \"nemf\", null, 0, 1, HeuristicStrategy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getHeuristicStrategy_EcoreContainment(), this.getEcoreMatrixContainment(), null, \"ecoreContainment\", null, 0, 1, HeuristicStrategy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getHeuristicStrategy_CurrentRepresentation(), ecorePackage.getEIntegerObject(), \"currentRepresentation\", null, 0, 1, HeuristicStrategy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getHeuristicStrategy_CurrentMMGR(), theEcorePackage.getEIntegerObject(), \"currentMMGR\", null, 0, 1, HeuristicStrategy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getHeuristicStrategy_ListRepresentation(), this.getRepreHeurSS(), null, \"listRepresentation\", null, 0, -1, HeuristicStrategy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getHeuristicStrategy__ExecuteHeuristics(), null, \"ExecuteHeuristics\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getHeuristicStrategy__Execute_Root_Element(), null, \"Execute_Root_Element\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getHeuristicStrategy__Execute_Graphical_Elements(), null, \"Execute_Graphical_Elements\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tEOperation op = initEOperation(getHeuristicStrategy__GetFeatureName__EClass_EClass(), ecorePackage.getEReference(), \"GetFeatureName\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, ecorePackage.getEClass(), \"parentEClass\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, ecorePackage.getEClass(), \"childEClass\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\top = initEOperation(getHeuristicStrategy__GetEListEClassfromEReference__EReference(), theGraphic_representationPackage.getNode(), \"GetEListEClassfromEReference\", 0, -1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, ecorePackage.getEReference(), \"anEReference\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getHeuristicStrategy__ExecuteDirectPathMatrix(), null, \"ExecuteDirectPathMatrix\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(concreteStrategyLinkEClass, ConcreteStrategyLink.class, \"ConcreteStrategyLink\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(strategyLabelEClass, StrategyLabel.class, \"StrategyLabel\", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\top = initEOperation(getStrategyLabel__GetLabel__EClass(), ecorePackage.getEAttribute(), \"GetLabel\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, ecorePackage.getEClass(), \"anEClass\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(concreteStrategyLabelFirstStringEClass, ConcreteStrategyLabelFirstString.class, \"ConcreteStrategyLabelFirstString\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(concreteStrategyLabelIdentifierEClass, ConcreteStrategyLabelIdentifier.class, \"ConcreteStrategyLabelIdentifier\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(concreteStrategyLabelParameterEClass, ConcreteStrategyLabelParameter.class, \"ConcreteStrategyLabelParameter\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getConcreteStrategyLabelParameter_Label_parameter(), this.getLabelParameter(), null, \"label_parameter\", null, 0, 1, ConcreteStrategyLabelParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(labelParameterEClass, LabelParameter.class, \"LabelParameter\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getLabelParameter_List_label(), ecorePackage.getEString(), \"list_label\", null, 0, -1, LabelParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getLabelParameter__ToCommaSeparatedStringLabel(), ecorePackage.getEString(), \"toCommaSeparatedStringLabel\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getLabelParameter__DefaultParameters(), null, \"DefaultParameters\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(strategyRootSelectionEClass, StrategyRootSelection.class, \"StrategyRootSelection\", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\top = initEOperation(getStrategyRootSelection__Get_Root__EList_EList(), ecorePackage.getEClass(), \"Get_Root\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\t\tEGenericType g1 = createEGenericType(ecorePackage.getEEList());\n\t\tEGenericType g2 = createEGenericType(ecorePackage.getEBooleanObject());\n\t\tg1.getETypeArguments().add(g2);\n\t\taddEParameter(op, g1, \"ContainmentMatrix\", 0, -1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, ecorePackage.getEClass(), \"listEClass\", 0, -1, IS_UNIQUE, IS_ORDERED);\n\n\t\top = initEOperation(getStrategyRootSelection__List_Root__EList_EList(), ecorePackage.getEClass(), \"List_Root\", 0, -1, IS_UNIQUE, IS_ORDERED);\n\t\tg1 = createEGenericType(ecorePackage.getEEList());\n\t\tg2 = createEGenericType(ecorePackage.getEBooleanObject());\n\t\tg1.getETypeArguments().add(g2);\n\t\taddEParameter(op, g1, \"ContainmentMatrix\", 0, -1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, ecorePackage.getEClass(), \"listEClass\", 0, -1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(concreteStrategyMaxContainmentEClass, ConcreteStrategyMaxContainment.class, \"ConcreteStrategyMaxContainment\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(concreteStrategyNoParentEClass, ConcreteStrategyNoParent.class, \"ConcreteStrategyNoParent\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(strategyPaletteEClass, StrategyPalette.class, \"StrategyPalette\", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\top = initEOperation(getStrategyPalette__Get_Palette__EObject(), ecorePackage.getEString(), \"Get_Palette\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, ecorePackage.getEObject(), \"anEObject\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(concreteStrategyPaletteEClass, ConcreteStrategyPalette.class, \"ConcreteStrategyPalette\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(strategyArcSelectionEClass, StrategyArcSelection.class, \"StrategyArcSelection\", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getStrategyArcSelection_Arc_direction(), this.getStrategyArcDirection(), null, \"arc_direction\", null, 0, 1, StrategyArcSelection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\top = initEOperation(getStrategyArcSelection__IsArc__EClass(), ecorePackage.getEBooleanObject(), \"IsArc\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, ecorePackage.getEClass(), \"anEClass\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(concreteStrategyArcSelectionEClass, ConcreteStrategyArcSelection.class, \"ConcreteStrategyArcSelection\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(strategyArcDirectionEClass, StrategyArcDirection.class, \"StrategyArcDirection\", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\top = initEOperation(getStrategyArcDirection__Get_Direction__EClass(), theGraphic_representationPackage.getEdge_Direction(), \"Get_Direction\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, ecorePackage.getEClass(), \"anEClass\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(arcParameterEClass, ArcParameter.class, \"ArcParameter\", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEAttribute(getArcParameter_Source(), ecorePackage.getEString(), \"source\", null, 0, -1, ArcParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEAttribute(getArcParameter_Target(), ecorePackage.getEString(), \"target\", null, 0, -1, ArcParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEOperation(getArcParameter__DefaultParam(), null, \"DefaultParam\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(defaultArcParameterEClass, DefaultArcParameter.class, \"DefaultArcParameter\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEOperation(getDefaultArcParameter__ToCommaSeparatedStringSource(), ecorePackage.getEString(), \"toCommaSeparatedStringSource\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getDefaultArcParameter__ToCommaSeparatedStringTarget(), ecorePackage.getEString(), \"toCommaSeparatedStringTarget\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(concreteStrategyArcDirectionEClass, ConcreteStrategyArcDirection.class, \"ConcreteStrategyArcDirection\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getConcreteStrategyArcDirection_Param(), this.getArcParameter(), null, \"param\", null, 0, 1, ConcreteStrategyArcDirection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\top = initEOperation(getConcreteStrategyArcDirection__ContainsStringEReferenceName__EList_String(), ecorePackage.getEBoolean(), \"ContainsStringEReferenceName\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, ecorePackage.getEString(), \"ListStrings\", 0, -1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, ecorePackage.getEString(), \"anString\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(concreteStrategyDefaultDirectionEClass, ConcreteStrategyDefaultDirection.class, \"ConcreteStrategyDefaultDirection\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(strategyNodeSelectionEClass, StrategyNodeSelection.class, \"StrategyNodeSelection\", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\top = initEOperation(getStrategyNodeSelection__IsNode__EClass(), ecorePackage.getEBooleanObject(), \"IsNode\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, ecorePackage.getEClass(), \"anEClass\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(concreteStrategyDefaultNodeSelectionEClass, ConcreteStrategyDefaultNodeSelection.class, \"ConcreteStrategyDefaultNodeSelection\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(strategyPossibleElementsEClass, StrategyPossibleElements.class, \"StrategyPossibleElements\", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getStrategyPossibleElements_EClassNoElements(), ecorePackage.getEClass(), null, \"EClassNoElements\", null, 0, -1, StrategyPossibleElements.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\top = initEOperation(getStrategyPossibleElements__PossibleElements__EClass_EList_EList(), ecorePackage.getEClass(), \"PossibleElements\", 0, -1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, ecorePackage.getEClass(), \"rootEClass\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\t\tg1 = createEGenericType(ecorePackage.getEEList());\n\t\tg2 = createEGenericType(ecorePackage.getEEList());\n\t\tg1.getETypeArguments().add(g2);\n\t\tEGenericType g3 = createEGenericType(ecorePackage.getEBooleanObject());\n\t\tg2.getETypeArguments().add(g3);\n\t\taddEParameter(op, g1, \"pathMatrix\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, ecorePackage.getEClass(), \"listEClass\", 0, -1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(concreteStrategyContainmentDiagramElementEClass, ConcreteStrategyContainmentDiagramElement.class, \"ConcreteStrategyContainmentDiagramElement\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(ecoreMatrixContainmentEClass, EcoreMatrixContainment.class, \"EcoreMatrixContainment\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tg1 = createEGenericType(ecorePackage.getEEList());\n\t\tg2 = createEGenericType(ecorePackage.getEEList());\n\t\tg1.getETypeArguments().add(g2);\n\t\tg3 = createEGenericType(ecorePackage.getEBooleanObject());\n\t\tg2.getETypeArguments().add(g3);\n\t\tinitEAttribute(getEcoreMatrixContainment_Direct_MatrixContainment(), g1, \"direct_MatrixContainment\", null, 0, 1, EcoreMatrixContainment.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tg1 = createEGenericType(ecorePackage.getEEList());\n\t\tg2 = createEGenericType(ecorePackage.getEEList());\n\t\tg1.getETypeArguments().add(g2);\n\t\tg3 = createEGenericType(ecorePackage.getEBooleanObject());\n\t\tg2.getETypeArguments().add(g3);\n\t\tinitEAttribute(getEcoreMatrixContainment_PathMatrix(), g1, \"pathMatrix\", null, 0, 1, EcoreMatrixContainment.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\top = initEOperation(getEcoreMatrixContainment__GetParent__Integer(), ecorePackage.getEIntegerObject(), \"GetParent\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, ecorePackage.getEIntegerObject(), \"index\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\top = initEOperation(getEcoreMatrixContainment__GetDirectMatrixContainment__EList(), ecorePackage.getEBooleanObject(), \"GetDirectMatrixContainment\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, ecorePackage.getEClass(), \"listEClass\", 0, -1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getEcoreMatrixContainment__GetPathMatrix(), ecorePackage.getEBooleanObject(), \"GetPathMatrix\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEOperation(getEcoreMatrixContainment__CopyMatrix(), null, \"CopyMatrix\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\top = initEOperation(getEcoreMatrixContainment__PrintDirectMatrixContainment__EList(), null, \"PrintDirectMatrixContainment\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, theEcorePackage.getEClass(), \"listEClass\", 0, -1, IS_UNIQUE, IS_ORDERED);\n\n\t\top = initEOperation(getEcoreMatrixContainment__GetEAllChilds__EClass_EList(), theEcorePackage.getEClass(), \"getEAllChilds\", 0, -1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, theEcorePackage.getEClass(), \"eClass\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, theEcorePackage.getEClass(), \"listEClass\", 0, -1, IS_UNIQUE, IS_ORDERED);\n\n\t\top = initEOperation(getEcoreMatrixContainment__GetAllParents__Integer(), ecorePackage.getEIntegerObject(), \"getAllParents\", 0, -1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, ecorePackage.getEIntegerObject(), \"index\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(heuristicStrategySettingsEClass, HeuristicStrategySettings.class, \"HeuristicStrategySettings\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getHeuristicStrategySettings_Strategy_label(), this.getStrategyLabel(), null, \"strategy_label\", null, 0, 1, HeuristicStrategySettings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getHeuristicStrategySettings_Strategy_root(), this.getStrategyRootSelection(), null, \"strategy_root\", null, 0, 1, HeuristicStrategySettings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getHeuristicStrategySettings_Strategy_palette(), this.getStrategyPalette(), null, \"strategy_palette\", null, 0, 1, HeuristicStrategySettings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getHeuristicStrategySettings_Strategy_arcSelection(), this.getStrategyArcSelection(), null, \"strategy_arcSelection\", null, 0, 1, HeuristicStrategySettings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getHeuristicStrategySettings_Strategy_node_selection(), this.getStrategyNodeSelection(), null, \"strategy_node_selection\", null, 0, 1, HeuristicStrategySettings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getHeuristicStrategySettings_Strategy_possibleElements(), this.getStrategyPossibleElements(), null, \"strategy_possibleElements\", null, 0, 1, HeuristicStrategySettings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getHeuristicStrategySettings_Strategy_linkcompartment(), this.getStrategyLinkCompartment(), null, \"strategy_linkcompartment\", null, 0, 1, HeuristicStrategySettings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\tinitEClass(strategyLinkCompartmentEClass, StrategyLinkCompartment.class, \"StrategyLinkCompartment\", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getStrategyLinkCompartment_ListLinks(), ecorePackage.getEReference(), null, \"listLinks\", null, 0, -1, StrategyLinkCompartment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getStrategyLinkCompartment_ListCompartment(), ecorePackage.getEReference(), null, \"listCompartment\", null, 0, -1, StrategyLinkCompartment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\t\tinitEReference(getStrategyLinkCompartment_ListAffixed(), ecorePackage.getEReference(), null, \"listAffixed\", null, 0, -1, StrategyLinkCompartment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\top = initEOperation(getStrategyLinkCompartment__ExecuteLinkCompartmentsHeuristics__EClass(), null, \"ExecuteLinkCompartmentsHeuristics\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\t\taddEParameter(op, ecorePackage.getEClass(), \"anEClass\", 0, 1, IS_UNIQUE, IS_ORDERED);\n\n\t\tinitEClass(concreteContainmentasAffixedEClass, ConcreteContainmentasAffixed.class, \"ConcreteContainmentasAffixed\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(concreteContainmentasLinksEClass, ConcreteContainmentasLinks.class, \"ConcreteContainmentasLinks\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(concreteContainmentasCompartmentsEClass, ConcreteContainmentasCompartments.class, \"ConcreteContainmentasCompartments\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\n\t\tinitEClass(repreHeurSSEClass, RepreHeurSS.class, \"RepreHeurSS\", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);\n\t\tinitEReference(getRepreHeurSS_HeuristicStrategySettings(), this.getHeuristicStrategySettings(), null, \"heuristicStrategySettings\", null, 0, -1, RepreHeurSS.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);\n\n\t\t// Create resource\n\t\tcreateResource(eNS_URI);\n\t}",
"public void createPackageContents() {\n\t\tif (isCreated)\n\t\t\treturn;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tprojectEClass = createEClass(PROJECT);\n\t\tcreateEReference(projectEClass, PROJECT__PLUGINS);\n\t\tcreateEAttribute(projectEClass, PROJECT__NAME);\n\t\tcreateEReference(projectEClass, PROJECT__REPOSITORIES);\n\t\tcreateEReference(projectEClass, PROJECT__DEPENDENCIES);\n\t\tcreateEReference(projectEClass, PROJECT__VIEWS);\n\t\tcreateEReference(projectEClass, PROJECT__PROPERTIES);\n\n\t\tpluginEClass = createEClass(PLUGIN);\n\t\tcreateEReference(pluginEClass, PLUGIN__REPOSITORIES);\n\t\tcreateEReference(pluginEClass, PLUGIN__OUTPUT_PORTS);\n\t\tcreateEReference(pluginEClass, PLUGIN__DISPLAYS);\n\n\t\tportEClass = createEClass(PORT);\n\t\tcreateEAttribute(portEClass, PORT__NAME);\n\t\tcreateEAttribute(portEClass, PORT__EVENT_TYPES);\n\t\tcreateEAttribute(portEClass, PORT__ID);\n\n\t\tinputPortEClass = createEClass(INPUT_PORT);\n\t\tcreateEReference(inputPortEClass, INPUT_PORT__PARENT);\n\n\t\toutputPortEClass = createEClass(OUTPUT_PORT);\n\t\tcreateEReference(outputPortEClass, OUTPUT_PORT__SUBSCRIBERS);\n\t\tcreateEReference(outputPortEClass, OUTPUT_PORT__PARENT);\n\n\t\tpropertyEClass = createEClass(PROPERTY);\n\t\tcreateEAttribute(propertyEClass, PROPERTY__NAME);\n\t\tcreateEAttribute(propertyEClass, PROPERTY__VALUE);\n\n\t\tfilterEClass = createEClass(FILTER);\n\t\tcreateEReference(filterEClass, FILTER__INPUT_PORTS);\n\n\t\treaderEClass = createEClass(READER);\n\n\t\trepositoryEClass = createEClass(REPOSITORY);\n\n\t\tdependencyEClass = createEClass(DEPENDENCY);\n\t\tcreateEAttribute(dependencyEClass, DEPENDENCY__FILE_PATH);\n\n\t\trepositoryConnectorEClass = createEClass(REPOSITORY_CONNECTOR);\n\t\tcreateEAttribute(repositoryConnectorEClass, REPOSITORY_CONNECTOR__NAME);\n\t\tcreateEReference(repositoryConnectorEClass, REPOSITORY_CONNECTOR__REPOSITORY);\n\t\tcreateEAttribute(repositoryConnectorEClass, REPOSITORY_CONNECTOR__ID);\n\n\t\tdisplayEClass = createEClass(DISPLAY);\n\t\tcreateEAttribute(displayEClass, DISPLAY__NAME);\n\t\tcreateEReference(displayEClass, DISPLAY__PARENT);\n\t\tcreateEAttribute(displayEClass, DISPLAY__ID);\n\n\t\tviewEClass = createEClass(VIEW);\n\t\tcreateEAttribute(viewEClass, VIEW__NAME);\n\t\tcreateEAttribute(viewEClass, VIEW__DESCRIPTION);\n\t\tcreateEReference(viewEClass, VIEW__DISPLAY_CONNECTORS);\n\t\tcreateEAttribute(viewEClass, VIEW__ID);\n\n\t\tdisplayConnectorEClass = createEClass(DISPLAY_CONNECTOR);\n\t\tcreateEAttribute(displayConnectorEClass, DISPLAY_CONNECTOR__NAME);\n\t\tcreateEReference(displayConnectorEClass, DISPLAY_CONNECTOR__DISPLAY);\n\t\tcreateEAttribute(displayConnectorEClass, DISPLAY_CONNECTOR__ID);\n\n\t\tanalysisComponentEClass = createEClass(ANALYSIS_COMPONENT);\n\t\tcreateEAttribute(analysisComponentEClass, ANALYSIS_COMPONENT__NAME);\n\t\tcreateEAttribute(analysisComponentEClass, ANALYSIS_COMPONENT__CLASSNAME);\n\t\tcreateEReference(analysisComponentEClass, ANALYSIS_COMPONENT__PROPERTIES);\n\t\tcreateEAttribute(analysisComponentEClass, ANALYSIS_COMPONENT__ID);\n\t}",
"private stendhal() {\n\t}",
"java.lang.String getContent();",
"java.lang.String getContent();",
"java.lang.String getContent();",
"java.lang.String getContent();",
"java.lang.String getContent();",
"java.lang.String getContent();",
"public void createPackageContents() {\r\n\t\tif (isCreated)\r\n\t\t\treturn;\r\n\t\tisCreated = true;\r\n\r\n\t\t// Create classes and their features\r\n\t\tissueEClass = createEClass(ISSUE);\r\n\t\tcreateEReference(issueEClass, ISSUE__PROPOSALS);\r\n\t\tcreateEReference(issueEClass, ISSUE__SOLUTION);\r\n\t\tcreateEReference(issueEClass, ISSUE__CRITERIA);\r\n\t\tcreateEAttribute(issueEClass, ISSUE__ACTIVITY);\r\n\t\tcreateEReference(issueEClass, ISSUE__ASSESSMENTS);\r\n\r\n\t\tproposalEClass = createEClass(PROPOSAL);\r\n\t\tcreateEReference(proposalEClass, PROPOSAL__ASSESSMENTS);\r\n\t\tcreateEReference(proposalEClass, PROPOSAL__ISSUE);\r\n\r\n\t\tsolutionEClass = createEClass(SOLUTION);\r\n\t\tcreateEReference(solutionEClass, SOLUTION__UNDERLYING_PROPOSALS);\r\n\t\tcreateEReference(solutionEClass, SOLUTION__ISSUE);\r\n\r\n\t\tcriterionEClass = createEClass(CRITERION);\r\n\t\tcreateEReference(criterionEClass, CRITERION__ASSESSMENTS);\r\n\r\n\t\tassessmentEClass = createEClass(ASSESSMENT);\r\n\t\tcreateEReference(assessmentEClass, ASSESSMENT__PROPOSAL);\r\n\t\tcreateEReference(assessmentEClass, ASSESSMENT__CRITERION);\r\n\t\tcreateEAttribute(assessmentEClass, ASSESSMENT__VALUE);\r\n\r\n\t\tcommentEClass = createEClass(COMMENT);\r\n\t\tcreateEReference(commentEClass, COMMENT__SENDER);\r\n\t\tcreateEReference(commentEClass, COMMENT__RECIPIENTS);\r\n\t\tcreateEReference(commentEClass, COMMENT__COMMENTED_ELEMENT);\r\n\r\n\t\taudioCommentEClass = createEClass(AUDIO_COMMENT);\r\n\t\tcreateEReference(audioCommentEClass, AUDIO_COMMENT__AUDIO_FILE);\r\n\t}",
"public void buildDocument() {\n/* 248 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 250 */ syncAccessMethods();\n/* */ }",
"public abstract ModuleDoc doc();",
"@Override\n public String getContentDescription() {\n return null;\n }",
"private StaticContent() {\r\n super(IStaticContent.TYPE_ID);\r\n }",
"public void foundationGrab(){\n\n }",
"private ContentUtil() {\n // do nothing\n }",
"void pramitiTechTutorials() {\n\t\n}",
"public PoaMaestroMultivaloresHTML() {\n/* 253 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 255 */ buildDocument();\n/* */ }",
"Content<?> one();",
"public cn.bran.japid.template.RenderResult render() {\n\t\ttry {super.layout();} catch (RuntimeException __e) { super.handleException(__e);} // line 0, japidviews/Application/photo/Story.html\n\t\treturn getRenderResult();\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"public interface Text {\n\n String HELP = \"Sage 'Alexa, weiter', um die nächste Anweisung zu erhalten. \";\n String STOP = \"Lasst euch weiterhin feiern! \";\n String FALLBACK = \"Leider konnte der Herr dich nicht verstehen \";\n\n String PICOLO_START = \"Willkommen bei Picolo! Möchtest du ein neues Spiel starten? \";\n String[] ANZAHL_SPIELER = {\n \"Wie viele Spieler spielen mit?\",\n \"Nenne mir die Anzahl der teilnehmenden Spieler\",\n \"Wie viele Spieler gibt es heute?\"\n };\n String[] SPIELER_NAME_FRAGEN = {\n \"Nenne mir deinen Namen Spieler \",\n \"Bitte sage mir deinen Namen Spieler \",\n \"Sag mir bitte deinen Namen Spieler \"\n };\n String NAECHSTE_AUFGABE = \"Wollt ihr die nächste Aufgabe Wissen? \";\n String ERSTE_ANWEISUNG = \"Alles klar, Los geht´s! \";\n String WIEDERHOLEN_FEHLER = \"Das Spiel wurde noch nicht gestartet. Deswegen kann ich nichts wiederholen. Bitte starte vorher das Spiel. \";\n\n //SSML Aussprache\n\n /**TODO\n * SSML Text bearbeiten\n */\n String HELP_SSML = \"Sage 'Alexa, weiter', um die nächste Anweisung zu erhalten. \";\n String STOP_SSML = \"Lasst euch weiterhin feiern! \";\n String FALLBACK_SSML = \"Ich habe dich leider nicht verstanden. \";\n}",
"public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tdeferedFlatReferenceTableEditorSampleEClass = createEClass(DEFERED_FLAT_REFERENCE_TABLE_EDITOR_SAMPLE);\n\t\tcreateEReference(deferedFlatReferenceTableEditorSampleEClass, DEFERED_FLAT_REFERENCE_TABLE_EDITOR_SAMPLE__REFERENCES);\n\n\t\tdeferedReferenceEClass = createEClass(DEFERED_REFERENCE);\n\t\tcreateEReference(deferedReferenceEClass, DEFERED_REFERENCE__FLATREFERENCE_EDITOR);\n\n\t\tdeferedReferenceTableEditorSampleEClass = createEClass(DEFERED_REFERENCE_TABLE_EDITOR_SAMPLE);\n\t\tcreateEReference(deferedReferenceTableEditorSampleEClass, DEFERED_REFERENCE_TABLE_EDITOR_SAMPLE__REFERENCES);\n\n\t\townerEClass = createEClass(OWNER);\n\t\tcreateEReference(ownerEClass, OWNER__MULTIPLE_REFERENCERS);\n\t\tcreateEReference(ownerEClass, OWNER__SINGLE_REFERENCERS);\n\n\t\tmultipleReferencerEClass = createEClass(MULTIPLE_REFERENCER);\n\t\tcreateEReference(multipleReferencerEClass, MULTIPLE_REFERENCER__MULTIPLE_SAMPLE_FOR_TABLE_COMPOSITION);\n\t\tcreateEReference(multipleReferencerEClass, MULTIPLE_REFERENCER__MULTIPLE_SAMPLE_FOR_ADVANCED_TABLE_COMPOSITION);\n\t\tcreateEReference(multipleReferencerEClass, MULTIPLE_REFERENCER__MULTIPLE_SAMPLE_FOR_REFERENCES_TABLE);\n\t\tcreateEReference(multipleReferencerEClass, MULTIPLE_REFERENCER__MULTIPLE_SAMPLE_ADVANCED_REFERENCES_TABLE);\n\t\tcreateEReference(multipleReferencerEClass, MULTIPLE_REFERENCER__MULTIPLE_SAMPLE_FOR_FLAT_REFERENCES_TABLE);\n\n\t\tsubtypeEClass = createEClass(SUBTYPE);\n\t\tcreateEAttribute(subtypeEClass, SUBTYPE__SPECIALISED_ELEMENT);\n\n\t\tsingleReferencerEClass = createEClass(SINGLE_REFERENCER);\n\t\tcreateEReference(singleReferencerEClass, SINGLE_REFERENCER__SINGLE_SAMPLE_FOR_TABLE_COMPOSITION);\n\t\tcreateEReference(singleReferencerEClass, SINGLE_REFERENCER__SINGLE_SAMPLE_FOR_ADVANCED_TABLE_COMPOSITION);\n\t\tcreateEReference(singleReferencerEClass, SINGLE_REFERENCER__SINGLE_SAMPLE_FOR_REFERENCES_TABLE);\n\t\tcreateEReference(singleReferencerEClass, SINGLE_REFERENCER__SINGLE_SAMPLE_ADVANCED_REFERENCES_TABLE);\n\t\tcreateEReference(singleReferencerEClass, SINGLE_REFERENCER__SINGLE_SAMPLE_FOR_FLAT_REFERENCES_TABLE);\n\t\tcreateEReference(singleReferencerEClass, SINGLE_REFERENCER__SINGLE_CONTAINMENT_FOR_EOBJECT_FLAT_COMBO_VIEWER);\n\t\tcreateEReference(singleReferencerEClass, SINGLE_REFERENCER__SINGLE_REFERENCE_FOR_EOBJECT_FLAT_COMBO_VIEWER);\n\t\tcreateEReference(singleReferencerEClass, SINGLE_REFERENCER__SINGLE_CONTAINMENT_FOR_ADVANCED_EOBJECT_FLAT_COMBO_VIEWER);\n\t\tcreateEReference(singleReferencerEClass, SINGLE_REFERENCER__SINGLE_REFERENCE_FOR_ADVANCED_EOBJECT_FLAT_COMBO_VIEWER);\n\t\tcreateEAttribute(singleReferencerEClass, SINGLE_REFERENCER__BOOLEAN_ATTRIBUTE);\n\t\tcreateEAttribute(singleReferencerEClass, SINGLE_REFERENCER__EENUM_ATTRIBUTE);\n\t\tcreateEAttribute(singleReferencerEClass, SINGLE_REFERENCER__STRING_ATTRIBUTE);\n\t\tcreateEAttribute(singleReferencerEClass, SINGLE_REFERENCER__LIST_ATTRIBUTE);\n\n\t\tanotherSubTypeEClass = createEClass(ANOTHER_SUB_TYPE);\n\t\tcreateEAttribute(anotherSubTypeEClass, ANOTHER_SUB_TYPE__ANOTHER_SPECIALISATION);\n\n\t\telementEClass = createEClass(ELEMENT);\n\t\tcreateEAttribute(elementEClass, ELEMENT__VISIBLE);\n\n\t\tattributeNavigationSampleEClass = createEClass(ATTRIBUTE_NAVIGATION_SAMPLE);\n\t\tcreateEReference(attributeNavigationSampleEClass, ATTRIBUTE_NAVIGATION_SAMPLE__SINGLE_VALUED_ATTRIBUTE_DELEGATE);\n\t\tcreateEReference(attributeNavigationSampleEClass, ATTRIBUTE_NAVIGATION_SAMPLE__MULTI_VALUED_ATTRIBUTE_DELEGATE);\n\n\t\tattributeDelegateEClass = createEClass(ATTRIBUTE_DELEGATE);\n\t\tcreateEAttribute(attributeDelegateEClass, ATTRIBUTE_DELEGATE__DELEGATE1);\n\t\tcreateEAttribute(attributeDelegateEClass, ATTRIBUTE_DELEGATE__DELEGATE2);\n\t}",
"@Override\n public String getType() {\n return \"golem\";\n }",
"protected abstract int getContentView();",
"public String getDisplayName() {\n return \"Rhapsody Build\";\n }",
"public String getContent();",
"String getContent();",
"String getContent();",
"String getContent();",
"String getContent();",
"String getContent();",
"String getContent();",
"String getContent();",
"String getContent();",
"private DocumentFragment selectFrom(Node n, Module mod) {\n DocumentFragment local_df = mod.getDoc().createDocumentFragment();\n if (isWanted(n)) {\n\n local_df.appendChild(mod.getDoc().importNode(n.cloneNode(true), true));\n if (local_df.getLastChild().getNodeName().compareToIgnoreCase(\"img\") == 0) {\n // we make this a default wxtimage or not \n //((Element)local_df.getLastChild()).setAttribute(\"class\",\"wxtimage\");\n }\n return local_df;\n }\n\n if (n.hasChildNodes()) {\n Node child = n.getFirstChild();\n while (child != null) {\n local_df.appendChild(selectFrom(child, mod));\n child = child.getNextSibling();\n }\n\n }\n return local_df;\n }",
"@Override\n public String getCommonContents(String name) {\n\tif (name.equalsIgnoreCase(\"default\")) {\n\t return \"\\\\documentclass[12pt]{article}\\n\\\\usepackage[utf8]{inputenc}\\n\\\\usepackage{amsmath}\\n\\\\title{\\\\LaTeX}\\n\\\\date{}\\n\\\\begin{document}\\n \\\\maketitle \\n \\\\LaTeX{} is a document preparation system for the \\\\TeX{} \\n typesetting program. It offers programmable desktop publishing \\n features and extensive facilities for automating most aspects of \\n typesetting and desktop publishing, including numbering and \\n cross-referencing, tables and figures, page layout, bibliographies, \\n and much more. \\\\LaTeX{} was originally written in 1984 by Leslie \\n Lamport and has become the dominant method for using \\\\TeX; few \\n people write in plain \\\\TeX{} anymore. The current version is \\n \\\\LaTeXe.\\n \\n % This is a comment; it is not shown in the final output.\\n % The following shows a little of the typesetting power of LaTeX\\n \\\\begin{align}\\n E &= mc^2 \\\\\\\\\\n m &= \\\\frac{m_0}{\\\\sqrt{1-\\\\frac{v^2}{c^2}}}\\n \\\\end{align}\\n\\\\end{document}\\n\";\n\t}\n\treturn null;\n }",
"public DataSummaryOverviewPageModContentFactoryImpl() {\n\t\tsuper();\n\t}",
"@Override\n protected int addContent() {\n return R.layout.activity_runners;\n }",
"@Override\r\n public void run() {\n basicEditor.createEdge(); // replaced Bibianas method with Moritz Roidl, Orthodoxos Kipouridis\r\n }",
"private XStream buildXStream() {\r\n\t\tfinal XStream stream = new XStream();\r\n\r\n\t\tstream.setMode(XStream.XPATH_ABSOLUTE_REFERENCES);\r\n\r\n\t\t// Alias these tags so that it does not care about the packages,\r\n\t\t// plus it makes the XML nicer.\r\n\t\tstream.alias(\"Story\", StoryModel.class);\r\n\t\tstream.alias(\"Library\", LibraryModel.class);\r\n\t\tstream.alias(\"Root\", StoryComponentContainer.class);\r\n\t\tstream.alias(\"KnowIt\", KnowIt.class);\r\n\t\tstream.alias(\"StoryComponentContainer\", StoryComponentContainer.class);\r\n\t\tstream.alias(\"AskIt\", AskIt.class);\r\n\t\tstream.alias(\"PickIt\", PickIt.class);\r\n\t\tstream.alias(\"KnowItBinding\", KnowItBinding.class);\r\n\t\tstream.alias(\"Type\", GameType.class);\r\n\t\tstream.alias(\"Slot\", Slot.class);\r\n\t\tstream.alias(\"Binding\", KnowItBinding.class);\r\n\t\tstream.alias(\"Value\", String.class);\r\n\t\tstream.alias(\"DialogueLine\", DialogueLine.class);\r\n\t\tstream.alias(\"DescribeIt\", DescribeIt.class);\r\n\t\tstream.alias(\"DescribeItNode\", DescribeItNode.class);\r\n\t\tstream.alias(\"CodeBlock\", CodeBlock.class);\r\n\t\tstream.alias(\"CodeBlockSource\", CodeBlockSource.class);\r\n\t\tstream.alias(\"CodeBlockReference\", CodeBlockReference.class);\r\n\t\tstream.alias(\"ScriptIt\", ScriptIt.class);\r\n\t\tstream.alias(\"StoryGroup\", StoryGroup.class);\r\n\t\tstream.alias(\"StoryPoint\", StoryPoint.class);\r\n\t\tstream.alias(\"Note\", Note.class);\r\n\t\tstream.alias(\"ControlIt\", ControlIt.class);\r\n\t\tstream.alias(\"CauseIt\", CauseIt.class);\r\n\t\tstream.alias(\"Behaviour\", Behaviour.class);\r\n\t\tstream.alias(\"IndependentTask\", IndependentTask.class);\r\n\t\tstream.alias(\"CollaborativeTask\", CollaborativeTask.class);\r\n\t\tstream.alias(\"ActivityIt\", ActivityIt.class);\r\n\r\n\t\t// Language Dictionary Fragments\r\n\t\tstream.alias(\"LibraryModel\", LibraryModel.class);\r\n\t\tstream.alias(\"LanguageDictionary\", LanguageDictionary.class);\r\n\t\tstream.alias(\"Format\", FormatDefinitionFragment.class);\r\n\t\tstream.alias(\"Indent\", IndentFragment.class);\r\n\t\tstream.alias(\"Line\", LineFragment.class);\r\n\t\tstream.alias(\"Literal\", LiteralFragment.class);\r\n\t\tstream.alias(\"FormatRef\", FormatReferenceFragment.class);\r\n\t\tstream.alias(\"Scope\", ScopeFragment.class);\r\n\t\tstream.alias(\"Series\", SeriesFragment.class);\r\n\t\tstream.alias(\"Fragment\", SimpleDataFragment.class);\r\n\r\n\t\t// the below are aliased for backwards compatibility\r\n\r\n\t\t/* <Insert backwards-compatible aliases here> */\r\n\r\n\t\t// now register all of the leaf-level converters\r\n\t\tstream.registerConverter(new StoryModelConverter());\r\n\t\tstream.registerConverter(new DialogueLineConverter());\r\n\t\tstream.registerConverter(new StoryComponentContainerConverter());\r\n\t\tstream.registerConverter(new KnowItConverter());\r\n\t\tstream.registerConverter(new PickItConverter());\r\n\t\tstream.registerConverter(new AskItConverter());\r\n\t\tstream.registerConverter(new KnowItBindingConverter());\r\n\t\tstream.registerConverter(new GameTypeConverter());\r\n\t\tstream.registerConverter(new SlotConverter());\r\n\t\tstream.registerConverter(new FormatDefinitionFragmentConverter());\r\n\t\tstream.registerConverter(new IndentedFragmentConverter());\r\n\t\tstream.registerConverter(new LineFragmentConverter());\r\n\t\tstream.registerConverter(new LiteralFragmentConverter());\r\n\t\tstream.registerConverter(new FormatReferenceFragmentConverter());\r\n\t\tstream.registerConverter(new ScopeFragmentConverter());\r\n\t\tstream.registerConverter(new SeriesFragmentConverter());\r\n\t\tstream.registerConverter(new SimpleDataFragmentConverter());\r\n\t\tstream.registerConverter(new LibraryModelConverter());\r\n\t\tstream.registerConverter(new LanguageDictionaryConverter());\r\n\t\tstream.registerConverter(new CodeBlockSourceConverter());\r\n\t\tstream.registerConverter(new CodeBlockReferenceConverter());\r\n\t\tstream.registerConverter(new ScriptItConverter());\r\n\t\tstream.registerConverter(new CauseItConverter());\r\n\t\tstream.registerConverter(new StoryGroupConverter());\r\n\t\tstream.registerConverter(new StoryPointConverter());\r\n\t\tstream.registerConverter(new NoteConverter());\r\n\t\tstream.registerConverter(new DescribeItConverter());\r\n\t\tstream.registerConverter(new DescribeItNodeConverter());\r\n\t\tstream.registerConverter(new ControlItConverter());\r\n\t\tstream.registerConverter(new BehaviourConverter());\r\n\t\tstream.registerConverter(new IndependentTaskConverter());\r\n\t\tstream.registerConverter(new CollaborativeTaskConverter());\r\n\t\tstream.registerConverter(new ActivityItConverter());\r\n\r\n\t\tstream.registerConverter(new IdentityArrayListConverter(stream\r\n\t\t\t\t.getMapper()));\r\n\r\n\t\treturn stream;\r\n\t}",
"@Override\r\n\tpublic Package adaptedPackage() {\n\t\treturn null;\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"public GenericTextHelper() {\n\t\tcontentList = new ArrayList<GenericTextModel>();\n\n\t}",
"@Override\r\n\tpublic void crawl_data() {\n\t\t\r\n\t}",
"public interface Content {\n}",
"private void CreatingBeautyContentTopK() {\n\t\t\tConstraintsPlacement objConstraints= new ConstraintsPlacement(this);\r\n\t\t\t//Creating array with states\r\n\t\t\tArrayList<BlockNode> states = new ArrayList<BlockNode>();\r\n\t\t\t//Building the graph in a deph way\r\n\t \tGraphBuilder objGrapB= new GraphBuilder(1);\r\n\t \tint numElements=objElem.getNumberObjects();\r\n\t \tint numEnemies=objElem.getNumberObjectsEnemies();\r\n\t \tint globalControlSearch=0;\r\n\t \t//Beststates=objGrapB.basicDepthSearch(mediumStraight,height,numElements,numElements,states,objConstraints, objElem.getFinalList(),objElem);\r\n\t \tbestBranches=objGrapB.relativePositionDepthSearchTopK(mediumStraight,height,numElements-numEnemies,numElements-numEnemies,states,objConstraints, objElem.getFinalList(),objElem,-mediumStraight+1,mediumStraight-1,floorTileHeight,0,0,maxScreens,numEnemies,random,globalControlSearch);\r\n\t \t//Beststates=objGrapB.relativeTransPositionDepthSearch(mediumStraight,height,numElements,numElements,states,objConstraints, objElem.getFinalList(),objElem,-mediumStraight+1,mediumStraight-1,floorTileHeight,0,0,currentState,hTable);\r\n\t \r\n\t \tBranch objBranch=new Branch();\r\n\t \t//bestBranches=objBranch.sortBranches(bestBranches);\r\n\t \t\r\n\t \t//System.out.print( \"CounterStates\"+objGrapB.getCounterIDs() );\r\n\t \r\n\t //imprimiendo los estados visitados\r\n\t /*\r\n\t Iterator<BlockNode> nombreIterator = states.iterator();\r\n\t while(nombreIterator.hasNext()){\r\n\t \tBlockNode elemento = nombreIterator.next();\r\n\t \tSystem.out.print(elemento.getID()+\" / \");\r\n\t }*/\r\n\t \r\n\t //here we are painting as the best branches foundeded\r\n\t \r\n\t Iterator<Branch> nombreIterator = bestBranches.iterator();\r\n\t while(nombreIterator.hasNext()){\r\n\t \tBranch elemento = nombreIterator.next();\r\n\t \t//System.out.print(elemento.getHeuristicValue()+ \" / \");\r\n\t }\r\n\t \r\n\t \r\n\t //Here we will put the elements on the tile\r\n\t \t//Just here to implement the n screens!\r\n\t for(int i=0;i<maxScreens;i++)\r\n\t {//block from Lelis and Reis (>class GeradorDeFasses)\r\n/*\t \ttry {\r\n\t \t\tLevel levelScreen=PaintElements(((Branch)bestBranches.get(i)).getStates(),this.clone());\t\t\t\t\t\r\n\t\t\t\t\tScreen objScreen=new Screen();\r\n\t\t\t\t\tobjScreen.SaveScreen(levelScreen,odds,objElem);\r\n\t \t\tInformacoesTelas info = new InformacoesTelas();\r\n\t\t\t CopiaArquivos copiador = new CopiaArquivos();\r\n\t\t\t \r\n\t\t\t info = info.carregaInfoTela(\"infoTela\");\r\n\t\t\t\t\tinfo.setOutrasVariaveis(0, 0); // Salva outras informacoes da Tela\r\n\t\t\t\t\tinfo.salvaInfoTela(\"infoTela\", info);\t\t\t\t\t\r\n\t\t\t\t\tcopiador.copy(\"\" + i, \"Screens/\");\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (CloneNotSupportedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}*/\r\n\t }\r\n\t \r\n\t\t\t\r\n\t\t}",
"public void lookForLiveItems(){\n\t\ttools.findWithScroll(\"com.fic.foxsports:id/HomeViewPager\", \"com.fic.foxsports:id/live_video_title\"); //Texto\r\n\t\ttools.findWithScroll(\"com.fic.foxsports:id/HomeViewPager\", \"com.fic.foxsports:id/overthumb_channelLogo\"); //Logo\r\n\t\ttools.findWithScroll(\"com.fic.foxsports:id/HomeViewPager\", \"com.fic.foxsports:id/clipItemImage\"); //Background\r\n\t}",
"private NaturePackage() {}",
"public String getContent()\n/* */ {\n/* 1329 */ return this.content;\n/* */ }",
"private void createSource(String sourceName, String content) {\n\t\t\n\t}",
"public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tblockArchitecturePkgEClass = createEClass(BLOCK_ARCHITECTURE_PKG);\n\n\t\tblockArchitectureEClass = createEClass(BLOCK_ARCHITECTURE);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__OWNED_REQUIREMENT_PKGS);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__OWNED_ABSTRACT_CAPABILITY_PKG);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__OWNED_INTERFACE_PKG);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__OWNED_DATA_PKG);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__PROVISIONED_ARCHITECTURE_ALLOCATIONS);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__PROVISIONING_ARCHITECTURE_ALLOCATIONS);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__ALLOCATED_ARCHITECTURES);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__ALLOCATING_ARCHITECTURES);\n\n\t\tblockEClass = createEClass(BLOCK);\n\t\tcreateEReference(blockEClass, BLOCK__OWNED_ABSTRACT_CAPABILITY_PKG);\n\t\tcreateEReference(blockEClass, BLOCK__OWNED_INTERFACE_PKG);\n\t\tcreateEReference(blockEClass, BLOCK__OWNED_DATA_PKG);\n\t\tcreateEReference(blockEClass, BLOCK__OWNED_STATE_MACHINES);\n\n\t\tcomponentArchitectureEClass = createEClass(COMPONENT_ARCHITECTURE);\n\n\t\tcomponentEClass = createEClass(COMPONENT);\n\t\tcreateEReference(componentEClass, COMPONENT__OWNED_INTERFACE_USES);\n\t\tcreateEReference(componentEClass, COMPONENT__USED_INTERFACE_LINKS);\n\t\tcreateEReference(componentEClass, COMPONENT__USED_INTERFACES);\n\t\tcreateEReference(componentEClass, COMPONENT__OWNED_INTERFACE_IMPLEMENTATIONS);\n\t\tcreateEReference(componentEClass, COMPONENT__IMPLEMENTED_INTERFACE_LINKS);\n\t\tcreateEReference(componentEClass, COMPONENT__IMPLEMENTED_INTERFACES);\n\t\tcreateEReference(componentEClass, COMPONENT__PROVISIONED_COMPONENT_ALLOCATIONS);\n\t\tcreateEReference(componentEClass, COMPONENT__PROVISIONING_COMPONENT_ALLOCATIONS);\n\t\tcreateEReference(componentEClass, COMPONENT__ALLOCATED_COMPONENTS);\n\t\tcreateEReference(componentEClass, COMPONENT__ALLOCATING_COMPONENTS);\n\t\tcreateEReference(componentEClass, COMPONENT__PROVIDED_INTERFACES);\n\t\tcreateEReference(componentEClass, COMPONENT__REQUIRED_INTERFACES);\n\t\tcreateEReference(componentEClass, COMPONENT__CONTAINED_COMPONENT_PORTS);\n\t\tcreateEReference(componentEClass, COMPONENT__CONTAINED_PARTS);\n\t\tcreateEReference(componentEClass, COMPONENT__CONTAINED_PHYSICAL_PORTS);\n\t\tcreateEReference(componentEClass, COMPONENT__OWNED_PHYSICAL_PATH);\n\t\tcreateEReference(componentEClass, COMPONENT__OWNED_PHYSICAL_LINKS);\n\t\tcreateEReference(componentEClass, COMPONENT__OWNED_PHYSICAL_LINK_CATEGORIES);\n\n\t\tabstractActorEClass = createEClass(ABSTRACT_ACTOR);\n\n\t\tpartEClass = createEClass(PART);\n\t\tcreateEReference(partEClass, PART__PROVIDED_INTERFACES);\n\t\tcreateEReference(partEClass, PART__REQUIRED_INTERFACES);\n\t\tcreateEReference(partEClass, PART__OWNED_DEPLOYMENT_LINKS);\n\t\tcreateEReference(partEClass, PART__DEPLOYED_PARTS);\n\t\tcreateEReference(partEClass, PART__DEPLOYING_PARTS);\n\t\tcreateEReference(partEClass, PART__OWNED_ABSTRACT_TYPE);\n\t\tcreateEAttribute(partEClass, PART__VALUE);\n\t\tcreateEAttribute(partEClass, PART__MAX_VALUE);\n\t\tcreateEAttribute(partEClass, PART__MIN_VALUE);\n\t\tcreateEAttribute(partEClass, PART__CURRENT_MASS);\n\n\t\tarchitectureAllocationEClass = createEClass(ARCHITECTURE_ALLOCATION);\n\t\tcreateEReference(architectureAllocationEClass, ARCHITECTURE_ALLOCATION__ALLOCATED_ARCHITECTURE);\n\t\tcreateEReference(architectureAllocationEClass, ARCHITECTURE_ALLOCATION__ALLOCATING_ARCHITECTURE);\n\n\t\tcomponentAllocationEClass = createEClass(COMPONENT_ALLOCATION);\n\t\tcreateEReference(componentAllocationEClass, COMPONENT_ALLOCATION__ALLOCATED_COMPONENT);\n\t\tcreateEReference(componentAllocationEClass, COMPONENT_ALLOCATION__ALLOCATING_COMPONENT);\n\n\t\tsystemComponentEClass = createEClass(SYSTEM_COMPONENT);\n\t\tcreateEAttribute(systemComponentEClass, SYSTEM_COMPONENT__DATA_COMPONENT);\n\t\tcreateEReference(systemComponentEClass, SYSTEM_COMPONENT__DATA_TYPE);\n\t\tcreateEReference(systemComponentEClass, SYSTEM_COMPONENT__PARTICIPATIONS_IN_CAPABILITY_REALIZATIONS);\n\n\t\tinterfacePkgEClass = createEClass(INTERFACE_PKG);\n\t\tcreateEReference(interfacePkgEClass, INTERFACE_PKG__OWNED_INTERFACES);\n\t\tcreateEReference(interfacePkgEClass, INTERFACE_PKG__OWNED_INTERFACE_PKGS);\n\n\t\tinterfaceEClass = createEClass(INTERFACE);\n\t\tcreateEAttribute(interfaceEClass, INTERFACE__MECHANISM);\n\t\tcreateEAttribute(interfaceEClass, INTERFACE__STRUCTURAL);\n\t\tcreateEReference(interfaceEClass, INTERFACE__IMPLEMENTOR_COMPONENTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__USER_COMPONENTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__INTERFACE_IMPLEMENTATIONS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__INTERFACE_USES);\n\t\tcreateEReference(interfaceEClass, INTERFACE__PROVISIONING_INTERFACE_ALLOCATIONS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__ALLOCATING_INTERFACES);\n\t\tcreateEReference(interfaceEClass, INTERFACE__ALLOCATING_COMPONENTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__EXCHANGE_ITEMS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__OWNED_EXCHANGE_ITEM_ALLOCATIONS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REQUIRING_COMPONENTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REQUIRING_COMPONENT_PORTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__PROVIDING_COMPONENTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__PROVIDING_COMPONENT_PORTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REALIZING_LOGICAL_INTERFACES);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REALIZED_CONTEXT_INTERFACES);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REALIZING_PHYSICAL_INTERFACES);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REALIZED_LOGICAL_INTERFACES);\n\n\t\tinterfaceImplementationEClass = createEClass(INTERFACE_IMPLEMENTATION);\n\t\tcreateEReference(interfaceImplementationEClass, INTERFACE_IMPLEMENTATION__INTERFACE_IMPLEMENTOR);\n\t\tcreateEReference(interfaceImplementationEClass, INTERFACE_IMPLEMENTATION__IMPLEMENTED_INTERFACE);\n\n\t\tinterfaceUseEClass = createEClass(INTERFACE_USE);\n\t\tcreateEReference(interfaceUseEClass, INTERFACE_USE__INTERFACE_USER);\n\t\tcreateEReference(interfaceUseEClass, INTERFACE_USE__USED_INTERFACE);\n\n\t\tprovidedInterfaceLinkEClass = createEClass(PROVIDED_INTERFACE_LINK);\n\t\tcreateEReference(providedInterfaceLinkEClass, PROVIDED_INTERFACE_LINK__INTERFACE);\n\n\t\trequiredInterfaceLinkEClass = createEClass(REQUIRED_INTERFACE_LINK);\n\t\tcreateEReference(requiredInterfaceLinkEClass, REQUIRED_INTERFACE_LINK__INTERFACE);\n\n\t\tinterfaceAllocationEClass = createEClass(INTERFACE_ALLOCATION);\n\t\tcreateEReference(interfaceAllocationEClass, INTERFACE_ALLOCATION__ALLOCATED_INTERFACE);\n\t\tcreateEReference(interfaceAllocationEClass, INTERFACE_ALLOCATION__ALLOCATING_INTERFACE_ALLOCATOR);\n\n\t\tinterfaceAllocatorEClass = createEClass(INTERFACE_ALLOCATOR);\n\t\tcreateEReference(interfaceAllocatorEClass, INTERFACE_ALLOCATOR__OWNED_INTERFACE_ALLOCATIONS);\n\t\tcreateEReference(interfaceAllocatorEClass, INTERFACE_ALLOCATOR__PROVISIONED_INTERFACE_ALLOCATIONS);\n\t\tcreateEReference(interfaceAllocatorEClass, INTERFACE_ALLOCATOR__ALLOCATED_INTERFACES);\n\n\t\tactorCapabilityRealizationInvolvementEClass = createEClass(ACTOR_CAPABILITY_REALIZATION_INVOLVEMENT);\n\n\t\tsystemComponentCapabilityRealizationInvolvementEClass = createEClass(SYSTEM_COMPONENT_CAPABILITY_REALIZATION_INVOLVEMENT);\n\n\t\tcomponentContextEClass = createEClass(COMPONENT_CONTEXT);\n\n\t\texchangeItemAllocationEClass = createEClass(EXCHANGE_ITEM_ALLOCATION);\n\t\tcreateEAttribute(exchangeItemAllocationEClass, EXCHANGE_ITEM_ALLOCATION__SEND_PROTOCOL);\n\t\tcreateEAttribute(exchangeItemAllocationEClass, EXCHANGE_ITEM_ALLOCATION__RECEIVE_PROTOCOL);\n\t\tcreateEReference(exchangeItemAllocationEClass, EXCHANGE_ITEM_ALLOCATION__ALLOCATED_ITEM);\n\t\tcreateEReference(exchangeItemAllocationEClass, EXCHANGE_ITEM_ALLOCATION__ALLOCATING_INTERFACE);\n\n\t\tdeployableElementEClass = createEClass(DEPLOYABLE_ELEMENT);\n\t\tcreateEReference(deployableElementEClass, DEPLOYABLE_ELEMENT__DEPLOYING_LINKS);\n\n\t\tdeploymentTargetEClass = createEClass(DEPLOYMENT_TARGET);\n\t\tcreateEReference(deploymentTargetEClass, DEPLOYMENT_TARGET__DEPLOYMENT_LINKS);\n\n\t\tabstractDeploymentLinkEClass = createEClass(ABSTRACT_DEPLOYMENT_LINK);\n\t\tcreateEReference(abstractDeploymentLinkEClass, ABSTRACT_DEPLOYMENT_LINK__DEPLOYED_ELEMENT);\n\t\tcreateEReference(abstractDeploymentLinkEClass, ABSTRACT_DEPLOYMENT_LINK__LOCATION);\n\n\t\tabstractPathInvolvedElementEClass = createEClass(ABSTRACT_PATH_INVOLVED_ELEMENT);\n\n\t\tabstractPhysicalArtifactEClass = createEClass(ABSTRACT_PHYSICAL_ARTIFACT);\n\t\tcreateEReference(abstractPhysicalArtifactEClass, ABSTRACT_PHYSICAL_ARTIFACT__ALLOCATOR_CONFIGURATION_ITEMS);\n\n\t\tabstractPhysicalLinkEndEClass = createEClass(ABSTRACT_PHYSICAL_LINK_END);\n\t\tcreateEReference(abstractPhysicalLinkEndEClass, ABSTRACT_PHYSICAL_LINK_END__INVOLVED_LINKS);\n\n\t\tabstractPhysicalPathLinkEClass = createEClass(ABSTRACT_PHYSICAL_PATH_LINK);\n\n\t\tphysicalLinkEClass = createEClass(PHYSICAL_LINK);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__LINK_ENDS);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__OWNED_COMPONENT_EXCHANGE_FUNCTIONAL_EXCHANGE_ALLOCATIONS);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__OWNED_PHYSICAL_LINK_ENDS);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__OWNED_PHYSICAL_LINK_REALIZATIONS);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__CATEGORIES);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__SOURCE_PHYSICAL_PORT);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__TARGET_PHYSICAL_PORT);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__REALIZED_PHYSICAL_LINKS);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__REALIZING_PHYSICAL_LINKS);\n\n\t\tphysicalLinkCategoryEClass = createEClass(PHYSICAL_LINK_CATEGORY);\n\t\tcreateEReference(physicalLinkCategoryEClass, PHYSICAL_LINK_CATEGORY__LINKS);\n\n\t\tphysicalLinkEndEClass = createEClass(PHYSICAL_LINK_END);\n\t\tcreateEReference(physicalLinkEndEClass, PHYSICAL_LINK_END__PORT);\n\t\tcreateEReference(physicalLinkEndEClass, PHYSICAL_LINK_END__PART);\n\n\t\tphysicalLinkRealizationEClass = createEClass(PHYSICAL_LINK_REALIZATION);\n\n\t\tphysicalPathEClass = createEClass(PHYSICAL_PATH);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__INVOLVED_LINKS);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__OWNED_PHYSICAL_PATH_INVOLVEMENTS);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__FIRST_PHYSICAL_PATH_INVOLVEMENTS);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__OWNED_PHYSICAL_PATH_REALIZATIONS);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__REALIZED_PHYSICAL_PATHS);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__REALIZING_PHYSICAL_PATHS);\n\n\t\tphysicalPathInvolvementEClass = createEClass(PHYSICAL_PATH_INVOLVEMENT);\n\t\tcreateEReference(physicalPathInvolvementEClass, PHYSICAL_PATH_INVOLVEMENT__NEXT_INVOLVEMENTS);\n\t\tcreateEReference(physicalPathInvolvementEClass, PHYSICAL_PATH_INVOLVEMENT__PREVIOUS_INVOLVEMENTS);\n\t\tcreateEReference(physicalPathInvolvementEClass, PHYSICAL_PATH_INVOLVEMENT__INVOLVED_ELEMENT);\n\t\tcreateEReference(physicalPathInvolvementEClass, PHYSICAL_PATH_INVOLVEMENT__INVOLVED_COMPONENT);\n\n\t\tphysicalPathReferenceEClass = createEClass(PHYSICAL_PATH_REFERENCE);\n\t\tcreateEReference(physicalPathReferenceEClass, PHYSICAL_PATH_REFERENCE__REFERENCED_PHYSICAL_PATH);\n\n\t\tphysicalPathRealizationEClass = createEClass(PHYSICAL_PATH_REALIZATION);\n\n\t\tphysicalPortEClass = createEClass(PHYSICAL_PORT);\n\t\tcreateEReference(physicalPortEClass, PHYSICAL_PORT__OWNED_COMPONENT_PORT_ALLOCATIONS);\n\t\tcreateEReference(physicalPortEClass, PHYSICAL_PORT__OWNED_PHYSICAL_PORT_REALIZATIONS);\n\t\tcreateEReference(physicalPortEClass, PHYSICAL_PORT__ALLOCATED_COMPONENT_PORTS);\n\t\tcreateEReference(physicalPortEClass, PHYSICAL_PORT__REALIZED_PHYSICAL_PORTS);\n\t\tcreateEReference(physicalPortEClass, PHYSICAL_PORT__REALIZING_PHYSICAL_PORTS);\n\n\t\tphysicalPortRealizationEClass = createEClass(PHYSICAL_PORT_REALIZATION);\n\t}",
"public abstract int getContentView();",
"public interface PhrasingContent extends ContentInterface {\r\n\r\n}",
"@Override\n public void run() {\n List<File> files = getContents(TOP_LEVEL + \" and \" + NOT_TRASHED + \" and \" + FOLDER + \" and \" + NOT_SPREADSHEET);\n \n prune(targetDir, files);\n processLanguages(files);\n }",
"private VarietyPackage() {}",
"public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n ledsCodeDSLEClass = createEClass(LEDS_CODE_DSL);\n createEReference(ledsCodeDSLEClass, LEDS_CODE_DSL__PROJECT);\n\n projectEClass = createEClass(PROJECT);\n createEAttribute(projectEClass, PROJECT__NAME);\n createEReference(projectEClass, PROJECT__INFRASTRUCTURE_BLOCK);\n createEReference(projectEClass, PROJECT__INTERFACE_BLOCK);\n createEReference(projectEClass, PROJECT__APPLICATION_BLOCK);\n createEReference(projectEClass, PROJECT__DOMAIN_BLOCK);\n\n interfaceBlockEClass = createEClass(INTERFACE_BLOCK);\n createEAttribute(interfaceBlockEClass, INTERFACE_BLOCK__NAME);\n createEReference(interfaceBlockEClass, INTERFACE_BLOCK__INTERFACE_APPLICATION);\n\n interfaceApplicationEClass = createEClass(INTERFACE_APPLICATION);\n createEAttribute(interfaceApplicationEClass, INTERFACE_APPLICATION__TYPE);\n createEAttribute(interfaceApplicationEClass, INTERFACE_APPLICATION__NAME);\n createEAttribute(interfaceApplicationEClass, INTERFACE_APPLICATION__NAME_APP);\n\n infrastructureBlockEClass = createEClass(INFRASTRUCTURE_BLOCK);\n createEAttribute(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__BASE_PACKAGE);\n createEAttribute(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__PROJECT_VERSION);\n createEReference(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__LANGUAGE);\n createEReference(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__FRAMEWORK);\n createEReference(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__ORM);\n createEReference(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__DATABASE);\n\n databaseEClass = createEClass(DATABASE);\n createEAttribute(databaseEClass, DATABASE__VERSION_VALUE);\n createEAttribute(databaseEClass, DATABASE__NAME_VALUE);\n createEAttribute(databaseEClass, DATABASE__USER_VALUE);\n createEAttribute(databaseEClass, DATABASE__PASS_VALUE);\n createEAttribute(databaseEClass, DATABASE__HOST_VALUE);\n createEAttribute(databaseEClass, DATABASE__ENV_VALUE);\n\n nameVersionEClass = createEClass(NAME_VERSION);\n createEAttribute(nameVersionEClass, NAME_VERSION__NAME_VALUE);\n createEAttribute(nameVersionEClass, NAME_VERSION__VERSION_VALUE);\n\n applicationBlockEClass = createEClass(APPLICATION_BLOCK);\n createEAttribute(applicationBlockEClass, APPLICATION_BLOCK__NAME);\n createEAttribute(applicationBlockEClass, APPLICATION_BLOCK__APPLICATION_DOMAIN);\n\n domainBlockEClass = createEClass(DOMAIN_BLOCK);\n createEAttribute(domainBlockEClass, DOMAIN_BLOCK__NAME);\n createEReference(domainBlockEClass, DOMAIN_BLOCK__MODULE);\n\n moduleBlockEClass = createEClass(MODULE_BLOCK);\n createEAttribute(moduleBlockEClass, MODULE_BLOCK__NAME);\n createEReference(moduleBlockEClass, MODULE_BLOCK__ENUM_BLOCK);\n createEReference(moduleBlockEClass, MODULE_BLOCK__ENTITY_BLOCK);\n createEReference(moduleBlockEClass, MODULE_BLOCK__SERVICE_BLOCK);\n\n serviceBlockEClass = createEClass(SERVICE_BLOCK);\n createEAttribute(serviceBlockEClass, SERVICE_BLOCK__NAME);\n createEReference(serviceBlockEClass, SERVICE_BLOCK__SERVICE_FIELDS);\n\n serviceMethodEClass = createEClass(SERVICE_METHOD);\n createEAttribute(serviceMethodEClass, SERVICE_METHOD__NAME);\n createEReference(serviceMethodEClass, SERVICE_METHOD__METHOD_ACESS);\n\n entityBlockEClass = createEClass(ENTITY_BLOCK);\n createEAttribute(entityBlockEClass, ENTITY_BLOCK__ACESS_MODIFIER);\n createEAttribute(entityBlockEClass, ENTITY_BLOCK__IS_ABSTRACT);\n createEAttribute(entityBlockEClass, ENTITY_BLOCK__NAME);\n createEReference(entityBlockEClass, ENTITY_BLOCK__CLASS_EXTENDS);\n createEReference(entityBlockEClass, ENTITY_BLOCK__ATTRIBUTES);\n createEReference(entityBlockEClass, ENTITY_BLOCK__REPOSITORY);\n\n attributeEClass = createEClass(ATTRIBUTE);\n createEAttribute(attributeEClass, ATTRIBUTE__ACESS_MODIFIER);\n createEAttribute(attributeEClass, ATTRIBUTE__TYPE);\n createEAttribute(attributeEClass, ATTRIBUTE__NAME);\n createEAttribute(attributeEClass, ATTRIBUTE__PK);\n createEAttribute(attributeEClass, ATTRIBUTE__UNIQUE);\n createEAttribute(attributeEClass, ATTRIBUTE__NULLABLE);\n createEAttribute(attributeEClass, ATTRIBUTE__MIN);\n createEAttribute(attributeEClass, ATTRIBUTE__MAX);\n\n repositoryEClass = createEClass(REPOSITORY);\n createEAttribute(repositoryEClass, REPOSITORY__NAME);\n createEReference(repositoryEClass, REPOSITORY__METHODS);\n\n repositoryFieldsEClass = createEClass(REPOSITORY_FIELDS);\n createEAttribute(repositoryFieldsEClass, REPOSITORY_FIELDS__NAME);\n createEReference(repositoryFieldsEClass, REPOSITORY_FIELDS__METHODS_PARAMETERS);\n createEAttribute(repositoryFieldsEClass, REPOSITORY_FIELDS__RETURN_TYPE);\n\n enumBlockEClass = createEClass(ENUM_BLOCK);\n createEAttribute(enumBlockEClass, ENUM_BLOCK__NAME);\n createEAttribute(enumBlockEClass, ENUM_BLOCK__VALUES);\n\n methodParameterEClass = createEClass(METHOD_PARAMETER);\n createEReference(methodParameterEClass, METHOD_PARAMETER__TYPE_AND_ATTR);\n\n typeAndAttributeEClass = createEClass(TYPE_AND_ATTRIBUTE);\n createEAttribute(typeAndAttributeEClass, TYPE_AND_ATTRIBUTE__TYPE);\n createEAttribute(typeAndAttributeEClass, TYPE_AND_ATTRIBUTE__NAME);\n\n extendBlockEClass = createEClass(EXTEND_BLOCK);\n createEReference(extendBlockEClass, EXTEND_BLOCK__VALUES);\n }"
] | [
"0.56927705",
"0.55518794",
"0.55286354",
"0.5457523",
"0.5436082",
"0.5292069",
"0.52880925",
"0.5180246",
"0.51698405",
"0.5165137",
"0.5108451",
"0.5084932",
"0.50717837",
"0.50662374",
"0.50617814",
"0.5054593",
"0.50440407",
"0.50412077",
"0.5009811",
"0.5006891",
"0.50059104",
"0.50021225",
"0.49950078",
"0.49898118",
"0.49820346",
"0.49678776",
"0.4935556",
"0.49316162",
"0.49231946",
"0.4920719",
"0.49133322",
"0.4906262",
"0.48945236",
"0.48789605",
"0.4870005",
"0.4864258",
"0.4862086",
"0.4860252",
"0.48601303",
"0.48554254",
"0.48496994",
"0.48493135",
"0.48481563",
"0.48449573",
"0.48259142",
"0.48188806",
"0.48185977",
"0.48171556",
"0.48171556",
"0.48171556",
"0.48171556",
"0.48171556",
"0.48171556",
"0.48164597",
"0.48138916",
"0.4803491",
"0.479852",
"0.47874662",
"0.47847643",
"0.47844774",
"0.4778546",
"0.4778393",
"0.4777732",
"0.47763774",
"0.47753668",
"0.47743365",
"0.47743094",
"0.47716606",
"0.47709253",
"0.47699353",
"0.47600895",
"0.4759269",
"0.4759269",
"0.4759269",
"0.4759269",
"0.4759269",
"0.4759269",
"0.4759269",
"0.4759269",
"0.4758765",
"0.47585618",
"0.47583225",
"0.47552478",
"0.4750077",
"0.47462937",
"0.47447288",
"0.4744056",
"0.47408554",
"0.473898",
"0.47347605",
"0.47335786",
"0.47315624",
"0.47243935",
"0.4718048",
"0.4718007",
"0.47172517",
"0.47131488",
"0.4710344",
"0.4707375",
"0.47065878",
"0.4704874"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
protected void init() throws SiDCException, Exception {
LogAction.getInstance().debug("Request:" + entity);
} | {
"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
protected Object process() throws SiDCException, Exception {
final int id = ShopManager.getInstance().insertVendor(entity.getStatus(), entity.getTex(), entity.getEmail(),
entity.getAddress(), entity.getList());
LogAction.getInstance().debug("step 1/" + STEP + ":insert success(ShopManager|insertVendor).");
return id;
} | {
"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}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
protected void check() throws SiDCException, Exception {
if (entity == null) {
throw new SiDCException(APIStatus.ILLEGAL_ARGUMENT, "request illegal.");
}
if (StringUtils.isBlank(entity.getToken())) {
throw new SiDCException(APIStatus.ILLEGAL_ARGUMENT, "request illegal(token).");
}
if (entity.getStatus() < 0) {
throw new SiDCException(APIStatus.ILLEGAL_ARGUMENT, "request illegal(status).");
}
if (!StringUtils.isBlank(entity.getTex()) && entity.getTex().length() > 30) {
throw new SiDCException(APIStatus.ILLEGAL_ARGUMENT, "request illegal(tex length).");
}
if (!StringUtils.isBlank(entity.getAddress()) && entity.getTex().length() > 150) {
throw new SiDCException(APIStatus.ILLEGAL_ARGUMENT, "request illegal(address length).");
}
if (!StringUtils.isBlank(entity.getEmail())) {
if (entity.getEmail().length() > 150) {
throw new SiDCException(APIStatus.ILLEGAL_ARGUMENT, "request illegal(email length).");
}
if (!entity.getEmail().matches("[\\w\\.\\-]+@([\\w\\-]+\\.)+[\\w\\-]+")) {
throw new SiDCException(APIStatus.ILLEGAL_ARGUMENT, "request illegal(email format).");
}
}
if (entity.getList() == null || entity.getList().isEmpty()) {
throw new SiDCException(APIStatus.ILLEGAL_ARGUMENT, "request illegal(list).");
}
for (final ShopLangBean langEntity : entity.getList()) {
if (StringUtils.isBlank(langEntity.getName())) {
throw new SiDCException(APIStatus.ILLEGAL_ARGUMENT, "request illegal(name).");
}
if (StringUtils.isBlank(langEntity.getLangcode())) {
throw new SiDCException(APIStatus.ILLEGAL_ARGUMENT, "request illegal(lang code).");
}
if (langEntity.getName().length() > 50) {
throw new SiDCException(APIStatus.ILLEGAL_ARGUMENT, "request illegal(name length).");
}
if (langEntity.getLangcode().length() > 5) {
throw new SiDCException(APIStatus.ILLEGAL_ARGUMENT, "request illegal(lang code length).");
}
if (!StringUtils.isBlank(langEntity.getDescription()) && langEntity.getDescription().length() > 2048) {
throw new SiDCException(APIStatus.ILLEGAL_ARGUMENT, "request illegal(description length).");
}
}
} | {
"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 |
return webdriver.findElements(HUD_BUTTON_BY_CLASSNAME); / This should work, but it looks like a Firefox bug is causing problems return new WebDriverWait(this.webdriver, this.timeoutInSecs) .until(ExpectedConditions.presenceOfAllElementsLocatedBy(HUD_BUTTON_BY_CLASSNAME)); | public List<WebElement> getHudButtons() {
for (int i = 0; i < Constants.GENERIC_TESTS_RETRY_COUNT; i++) {
try {
return webdriver.findElements(HUD_BUTTON_BY_CLASSNAME);
} catch (WebDriverException e1) {
warning(
"HUD.getHudButtons Exception getting buttons, retrying: "
+ e1.getMessage());
// Sometimes helps
webdriver.switchTo().defaultContent();
try {
Thread.sleep(Constants.GENERIC_TESTS_RETRY_SLEEP_MS);
} catch (InterruptedException e) {
// Ignore
}
}
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void waitforvisibleelement(WebDriver driver2, WebElement signoutimg2) {\n\t\r\n}",
"private WebElement button_FindOutMore(){\n return findElementByText(waitForElements(button_FindOutMoreLocator, allPresence), \"Find Out More\");\n }",
"WebElement getSearchButton();",
"public static void waitForRegistrationButton(){\n DriverManager.waitForElement(Constans.REGISTRATION_BUTTON_LOCATOR);\n }",
"protected WebElement waitForExpectedElement(final By by) {\n return wait.until(visibilityOfElementLocated(by));\n }",
"@Test\n public void explicitWait() {\n WebDriverWait wait = new WebDriverWait(driver, 10);\n driver.get(\"https://the-internet.herokuapp.com/dynamic_controls\");\n WebElement removeButton = driver.findElement(By.xpath(\"//button[@type='button']\"));\n removeButton.click();\n //WebElement goneMessage=driver.findElement(By.id(\"message\"));\n WebElement goneMessage = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"message\")));\n String expectedMessage = \"It's gone!\";\n Assert.assertEquals(goneMessage.getText(), expectedMessage);\n\n }",
"public WebElement userLoginDiv() {\r\n return driver.findElement(By.id(\"block-system-main\"));\r\n\r\n}",
"@Test(priority =1)\r\n\tpublic void button() {\r\n button = driver.findElement(By.cssSelector(\"button.black\"));\r\n assertFalse(button.isDisplayed());\r\n //sf.assertFalse(button.isDisplayed());\r\n System.out.println(\"Print this\");\r\n\t}",
"@Test\n public void implicitWait() {\n //We have implicit wait in out testbase class, we driver will automatically use implicit wait whenever we use driver\n driver.get(\"https://the-internet.herokuapp.com/dynamic_controls\");\n WebElement removeButton = driver.findElement(By.xpath(\"//button[@type='button']\"));\n removeButton.click();\n WebElement goneMessage = driver.findElement(By.id(\"message\"));\n String expectedMessage = \"It's gone!\";\n Assert.assertEquals(goneMessage.getText(), expectedMessage);\n }",
"private void waitForElement(WebDriver driver, int timeToWaitInSeconds, By ElementLocater) {\n\t\tWebDriverWait wait = new WebDriverWait(driver, timeToWaitInSeconds);\n\t\twait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(ElementLocater));\n\n\t}",
"public void ensureIsNotVisibleLoginBtn() {\n (new WebDriverWait(driver, 10)).until(ExpectedConditions.invisibilityOfElementLocated(By.id(\"signInBtn\")));\n }",
"@Test\n public void implicitWait(){\n //3. https://the-internet.herokuapp.com/dynamic_controls adresine gidin.\n driver.get(\"https://the-internet.herokuapp.com/dynamic_controls\");\n //4. Remove butonuna basin.\n WebElement removeButton = driver.findElement(By.xpath(\"//button[@type='button']\"));\n removeButton.click();\n //mesajin yuklenmesi biraz zaman aldigi icin wait kullanmamiz gerekir.\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);// ==>>> TestBase'e de koyabilirim\n //5. “It’s gone!” mesajinin goruntulendigini dogrulayin.\n WebElement goneMessage = driver.findElement(By.id(\"message\"));\n Assert.assertEquals(goneMessage.getText(),\"It's gone!\");\n }",
"protected WebElement waitForElementToBeVisible(WebElement element) {\n actionDriver.moveToElement(element);\n WebDriverWait wait = new WebDriverWait(driver, 5);\n wait.until(ExpectedConditions.visibilityOf(element));\n return element;\n }",
"public static boolean waitForListElement(WebDriver driver, List<WebElement> elements, int maxWait) {\r\n boolean statusOfElementToBeReturned = false;\r\n WebDriverWait wait = new WebDriverWait(driver, maxWait);\r\n try {\r\n\t\t\t wait.until(ExpectedConditions.visibilityOfAllElements(elements));\r\n statusOfElementToBeReturned = true;\r\n } catch (Exception ex) {\r\n statusOfElementToBeReturned = false;\r\n }\r\n return statusOfElementToBeReturned;\r\n }",
"public static WebElement btn_clickInqAllForUnvPdtAtInqBar() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(\r\n \t\t\t\tBy.xpath(\"(//*[contains(@class, 'inquiryCon')]//a[contains(text(),'Inquire All')])[last()]\"));\r\n \t\t\r\n \t\tWebDriverWait wait = new WebDriverWait(driver, 25);\r\n \twait.until(ExpectedConditions.elementToBeClickable(element));\r\n \tAdd_Log.info(\"Inquire All button for Unverified Product is click on the page.\");\r\n \t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Inquire All button for Unverified Product is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }",
"private boolean isElementPresent(By cssSelector) {\n\treturn false;\n}",
"public static WebElement btn_clickFollowMe() throws Exception{\r\n \ttry{\r\n \t\t// Wait until Global Navigator is loaded\r\n \t\tWebDriverWait waits = new WebDriverWait(driver, 20);\r\n \t\twaits.until(ExpectedConditions.visibilityOfElementLocated(\r\n \t\t\t\tBy.xpath(\"//*[contains(@class, 'GS_globalNav clearfix')]\")));\r\n \t\tAdd_Log.info(\"Global Nav is displayed.\");\r\n \t\t\r\n \t\t// Wait until Footer Copyright is loaded\r\n \t\twaits.until(ExpectedConditions.visibilityOfElementLocated(\r\n \t\t\t\tBy.xpath(\"//*[contains(@class, 'GS_copyright')]\")));\r\n \t\tAdd_Log.info(\"Footer page is displayed.\");\r\n \t\t\r\n \t\twaits.until(ExpectedConditions.elementToBeClickable(\r\n \t\t\t\tBy.xpath(\"(//img[contains(@class, 'followSupIco')])[position()=1]\")));\r\n \t\t\r\n \t\tWebElement element = driver.findElement(\r\n \t\t\t\tBy.xpath(\"(//img[contains(@class, 'followSupIco')])[position()=1]\"));\r\n \t\tJavascriptExecutor executor = (JavascriptExecutor)driver;\r\n \t\texecutor.executeScript(\"arguments[0].click();\", element);\r\n \t\t\r\n \t\tAdd_Log.info(\"Follow Me button is click on the page.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Follow Me button is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }",
"void waitForAddStatusIsDisplayed() {\n\t\tSeleniumUtility.waitElementToBeVisible(driver, homepageVehiclePlanning.buttonTagAddStatusHomepageVehiclePlanning);\n\t}",
"public static List<WebElement> getElementByclass(WebElement listElements, String className) throws Exception {\n\t\tList<WebElement> element;\n//\t\tList<WebElement> classLocator;\n\t\ttry {\n\t\t\telement = listElements.findElements(By.className(className));\n//\t\t\tclassLocator = listElements.findElements(By.className(className));\n//\t\t\telement = explicitlyWait.until(ExpectedConditions.visibilityOfAllElements(classLocator));\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t}\n\t\treturn element;\n\t}",
"protected WebElement waitForElementToBeClickable(WebElement element) {\n actionDriver.moveToElement(element);\n WebDriverWait wait = new WebDriverWait(driver, 5);\n wait.until(ExpectedConditions.elementToBeClickable(element));\n return element;\n }",
"public boolean waitforelement(int timeout,By by){\n\t\twhile(timeout>0){\n\t\t\tsleep(1);\n\t\t\tList<WebElement> list = driver.findElements(by);\n\t\t\tif(list.size()!=0){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\ttimeout--;\n\t\t}\n\t\tSystem.out.println(\"waiting timeout.... Element not found \" +by.toString());\n\t\treturn false;\n\t}",
"public void waitMainArtifactElementsOnPage() {\n for (String mainArtifactLink : mainArtifactLinks) {\n new WebDriverWait(driver, 10).until(ExpectedConditions.visibilityOfElementLocated(By.partialLinkText(mainArtifactLink)));\n }\n\n }",
"public static void goTo() {\n\tBrowser.instance.findElement(maintenanceMenu).click();\r\n\tWebElement element = Browser.instance.findElement(By.linkText(\"Tender and Bag Maintenance\"));\r\n Actions action = new Actions(Browser.instance);\r\n action.moveToElement(element).build().perform(); \r\n Browser.instance.findElement(By.linkText(\"Bag Types\")).click();\r\n // WebDriverWait wait = new WebDriverWait(Browser.instance,10);\r\n WebDriverWait wait = new WebDriverWait(Browser.instance,10);\r\n\twait.until(ExpectedConditions.elementToBeClickable(editButton));\r\n//\tBrowser.instance.manage().timeouts().implicitlyWait(5,TimeUnit.SECONDS);\r\n}",
"@Test(enabled = true)\n public void searchForFlight() throws InterruptedException {\n driver.findElement(By.xpath(\"//*[@id='uitk-tabs-button-container']/li[2]\")).click();\n\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n driver.findElement(By.xpath(\"//button[contains(@aria-label,'Going to')]\")).sendKeys(Keys.ARROW_DOWN);\n Thread.sleep(15000);\n\n //d1-btn\n\n }",
"public Boolean waitUntilElementAppears(WebDriver driver, final String xpath) throws NumberFormatException, IOException {\n\t\t\t\t\tlong start = System.currentTimeMillis();\n\t\t\t\t\tWebDriverWait wait = new WebDriverWait(driver, 30);\n\t\t\t\t\ttry {\n\t\t\t\t\tExpectedCondition<Boolean> e = new ExpectedCondition<Boolean>() {\n\t\t\t\t public Boolean apply(WebDriver driver) {\t\t\t\t \t\n\t\t\t\t return (driver.findElements(By.xpath(xpath)).size() == 0);\n\t\t\t\t }\n\t\t\t\t };\n\t\t\t\t wait.until(e);}\n\t\t\t\t\tcatch(Exception e) {\n\t\t\t\t\tif (driver.findElements(By.xpath(xpath)).size() == 0) { fileWriterPrinter(\"\\nElement not found!\\nXPATH: \" + xpath); }\n\t\t\t\t\t}\n\t\t\t\t fileWriterPrinter(\"Waiting time for Element appearence: \" + waitTimeConroller(start, 30, xpath) + \" sec\");\n\t\t\t\t return (driver.findElements(By.xpath(xpath)).size() == 0);\n\t\t\t\t}",
"public void click_CheckavailabitlityButton()\r\n\t{\r\n\t\r\n\r\n\t\tSystem.out.println(\"Inside of the checkavailabitlity\");\r\n\t\t\r\n\t\t/*\r\n\t\tExplicitWait(Checkavailability);\r\n\r\n\r\n\t\tJavascriptexecutor(Checkavailability);\r\n\t\t//System.out.println(\"clicked on Checkavailability\");\r\n\t\tSeleniumRepo.waitForPageLoaded();\r\n\t\tlogger.info(\"clicked on Checkavailability\");\r\n\t\ttest.log(Status.INFO, \"clicked on Checkavailability\");\r\n\t\t\r\n\t\t */\r\n\t\r\n\t\tExplicitWait(Checkavailability);\r\n\r\n\t\tif (Checkavailability.isDisplayed() ) \r\n\t\t{\r\n\t\t\t\r\n\t\t\t//Checkavailability.click();\r\n\t\t\tJavascriptexecutor(Checkavailability);\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"clicked on Checkavailability\");\r\n\t\t\t\r\n\t\t\tSeleniumRepo.waitForPageLoaded();\r\n\t\t\tExplicitWait(Checkavailability);\r\n\r\n\t\t\tlogger.info(\"clicked on Checkavailability\");\r\n\t\t\ttest.log(Status.INFO, \"clicked on Checkavailability\");\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\t//System.out.println(\"BookNow button not found\");\r\n\t\t\tlogger.error(\"Check Availability button not found\");\r\n\t\t\ttest.log(Status.FAIL, \"Check Availability button not found\");\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}",
"public static List<MobileElement> waitAll(By locator) {\n return w(driverWait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(locator)));\n }",
"public static void verifyRefreshingAllEquipmentModal(WebDriver driver) {\n FindElement.waitForElementXpath(driver, \"//h3[text() = 'Refreshing All Equipment...']\", \"TV Troubleshooting - modem Reset modal\");\n }",
"public static List<WebElement> waitForListElementsPresent(WebDriver driver,\n\t\t\tfinal By by)\n\t\t\t{\n\t\tList<WebElement> elements;\n\t\tint timeOutInSeconds=Integer.parseInt(Cls_Generic_methods.getConfigValues(\"timeOutInSeconds\"));\n\t\ttry {\n\n\t\t\tlogger.info(\"Waiting for List of Elements to be present\");\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, timeOutInSeconds);\n\t\t\twait.until((new ExpectedCondition<Boolean>() {\n\t\t\t\tpublic Boolean apply(WebDriver driverObject) {\n\t\t\t\t\treturn areElementsPresent(driverObject, by);\n\t\t\t\t}\n\t\t\t}));\n\n\t\t\telements = driver.findElements(by);\n\n\t\t\treturn elements; // return the element\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Exception ocurred \" + e.getMessage());\n\t\t}\n\t\treturn null;\n\t\t\t}",
"public void waitForInvisibilityOfWebElement(By locator){\r\n\t\twait.until(ExpectedConditions.invisibilityOfElementLocated(locator));\r\n\t}",
"public static void waitForElementVisiblity(WebElement element) {\n\t\t\t\n\t\t}",
"public void handlingWaitToElement(By locator){\n WebDriverWait wait = new WebDriverWait(appiumDriver, 60);\n wait.until(ExpectedConditions.presenceOfElementLocated(locator));\n }",
"public void waitForElement(WebElement element) {\n WebDriverWait wait = new WebDriverWait(driver, 30);\n wait.until(ExpectedConditions.visibilityOf(element));\n }",
"public List<WebElement> waitUntilElementList(WebDriver driver, final String xpath) throws NumberFormatException, IOException, InterruptedException {\n\t\t\t\t\tlong start = System.currentTimeMillis();\n\t\t\t\t\tif (driver.findElements(By.xpath(xpath)).size() == 0) {\n\t\t\t\t\tWebDriverWait wait = new WebDriverWait(driver, 30);\t\t\t\t\t\n\t\t\t\t\ttry { wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(xpath))); }\n\t\t\t\t\tcatch(Exception e) {\n\t\t\t\t\tif (driver.findElements(By.xpath(xpath)).size() == 0) { fileWriterPrinter(\"\\nList of Elements is empty!\\nXPATH: \" + xpath); }\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t fileWriterPrinter(\"Waiting time for List of Elements:\" + padSpace(54 - \"Waiting time for List of Elements:\".length()) + waitTimeConroller(start, 30, xpath) + \" sec\");\n\t\t\t\t return (driver.findElements(By.xpath(xpath)));\n\t\t\t\t}",
"public void waitForVisibilityOfAllWebElements(List<WebElement> webElement){\r\n\t\twait.until(ExpectedConditions.visibilityOfAllElements(webElement));\r\n\t}",
"public void openTheListOfGadgets(){\r\n\t\tdriver.findElement(By.xpath(\"\"+TODAY_WIN_XPATH+\"//button[contains(text(),'Add more..')]\")).click();\r\n\t\tReporter.log(\"List Of Gadgets Buttons is clicked\",true);\r\n\t}",
"public static boolean waitForElement(WebDriver driver, WebElement element) {\r\n boolean statusOfElementToBeReturned = false;\r\n WebDriverWait wait = new WebDriverWait(driver, flipKartMaxElementWait);\r\n try {\r\n WebElement waitElement = wait.until(ExpectedConditions.visibilityOf(element));\r\n if (waitElement.isDisplayed() && waitElement.isEnabled()) {\r\n statusOfElementToBeReturned = true;\r\n }\r\n } catch (Exception ex) {\r\n \tSystem.out.println(\"Unable to find a element\" + ex.getMessage());\r\n }\r\n\t\treturn statusOfElementToBeReturned;\r\n }",
"@Override\n protected void waitThePageToLoad() {\n WaitUtils.waitUntil(driver, ExpectedConditions.visibilityOf(driver\n .findElement(By.xpath(SEARCH_XPATH))));\n }",
"public String waitForElementVisibility(String object, String data) {\n logger.debug(\"Waiting for an element to be visible\");\n int start = 0;\n int time = (int) Double.parseDouble(data);\n try {\n while (true) {\n if(start!=time)\n {\n if (driver.findElements(By.xpath(OR.getProperty(object))).size() == 0) {\n Thread.sleep(1000L);\n start++;\n }\n else {\n break; }\n }else {\n break; } \n }\n } catch (Exception e) {\n return Constants.KEYWORD_FAIL + \"Unable to close browser. Check if its open\" + e.getMessage();\n }\n return Constants.KEYWORD_PASS;\n }",
"private void waitForNextNews(final WebDriver webDriver) {\r\n\t\tfinal WebDriverWait wait = new WebDriverWait(webDriver, WAIT_SECONDS);\r\n\t\twait.until(\r\n\t\t\tExpectedConditions.elementToBeClickable(By.className(\"tbutton\"))\r\n\t\t);\r\n\t}",
"public WebElement waitForElement(By by) {\n List<WebElement> elements = waitForElements(by);\n int size = elements.size();\n\n if (size == 0) {\n Assertions.fail(String.format(\"Could not find %s after %d attempts\",\n by.toString(),\n configuration.getRetries()));\n } else {\n // If an element is found then scroll to it.\n scrollTo(elements.get(0));\n }\n\n if (size > 1) {\n Logger.error(\"WARN: There are more than 1 %s 's!\", by.toString());\n }\n\n return getDriver().findElement(by);\n }",
"public static void setWaitSelenium() throws InterruptedException {\n WebDriverManager.chromedriver().setup();\n WebDriver driver = new ChromeDriver();\n driver.get(\"https://google.com\");\n\n WebElement input = driver.findElement(By.xpath(\"//input[@name=\\\"q\\\"]\"));\n input.sendKeys(\"Abcd\");\n Thread.sleep(10000);\n driver.findElement(By.name(\"btnK\")).click();\n //driver.findElement(By.name(\"btnK\")).sendKeys(Keys.RETURN);\n\n // Fluent wait\n // Waiting 30s for an element to be present on the page,\n // for its presence once every 2s\n Wait<WebDriver> wait = new FluentWait<WebDriver>(driver)\n .withTimeout(60, TimeUnit.SECONDS)\n .pollingEvery(2, TimeUnit.SECONDS)\n .ignoring(NoSuchElementException.class);\n\n WebElement clickseleniumlink = wait.until(new Function<WebDriver, WebElement>(){\n\n public WebElement apply(WebDriver driver ) {\n WebElement link = driver.findElement(By.xpath(\"/html[1]/body[1]/div[7]/div[3]/div[10]/div[1]/div[2]/div[1]/div[2]/div[2]/div[1]/div[1]/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/a[1]\"));\n if(link.isEnabled()){\n System.out.println(\"Element found\");\n }\n return link;\n }\n });\n //click on the selenium link\n clickseleniumlink.click();\n\n driver.close();\n driver.quit();\n }",
"public void irParaPaginaDeLogin (){\n\n click(By.className(btnLoginClass));\n }",
"public WebElement clickFindExcursions( ) {\r\n\t\t\r\n\t\t/**\r\n\t\t * At times a survey dialog may appear on any page.\r\n\t\t * This methods waits a period amount of time for the dialog to appear before closing it.\r\n\t\t * Note: If the Survey dialog was already closed, it will not check again. This is only a 1 time check.\r\n\t\t */\r\n\t\tcloseWelcomeSurveyDialog( 10 );\r\n\t\t\r\n\t\t/* --- We then go find the Button \"FIND EXCURSIONS\" to click it. ---- */\r\n\t\tWebElement button = driver.findElement( this.excursionbuttonLocator );\r\n\t\tif( null != button ) {\r\n\t\t\t\r\n\t\t\t/* --- Let's click the button. --- */\r\n\t\t\tbutton.click( );\r\n\t\t\t\r\n\t\t\t/* --- Let's return the WebElement. --- */\r\n\t\t\treturn button;\r\n\t\t}\r\n\t\t\r\n\t\t/* --- Let's set the last error message. --- */\r\n\t\tsetLastErrorMsg( new Object( ) { }.getClass( ).getEnclosingMethod( ).getName( ) + \"Unable to find the 'Find Excursion Button' element.\" );\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public List<WebElement> getElements(WebDriver driver, By locator, int timeout) throws Exception {\n for (int i = 0; i <= timeout; i++) {\n try {\n if (driver.findElements(locator).size() == 0) throw new Exception();\n elements = driver.findElements(locator);\n log.info(\"Found total \" + elements.size() + \" elements with : \" + locator);\n return elements;\n } catch (Exception e) {\n log.info(i + \". Trying to find all elements with \" + locator);\n }\n Thread.sleep(2000);\n }\n StackTraceElement stackTrace = new Throwable().getStackTrace()[1];\n log.error(\"Cannot find all elements with : \" + locator);\n log.error(\"Cannot find all elements : \" + stackTrace.getClassName() + \".\" + stackTrace.getMethodName());\n throw new Exception(\"Unable to find all Elements\");\n }",
"public void clickSubmitInkAndTonnerSearchButton(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Ink and Tonner Search Button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"btnInkSeacrh\"));\r\n\t\t\tclick(locator_split(\"btnInkSeacrh\"));\r\n\t\t\twaitForPageToLoad(10);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Ink and Tonner Search Button is clicked\");\r\n\t\t\tSystem.out.println(\"Ink and Tonner Search icon is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Ink and Tonner Search Button is not clicked \"+elementProperties.getProperty(\"btnSearchSubmit\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnInkSeacrh\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"public static void waitUntilElementIsInvisible(WebElement element) {\n WebDriverWait webDriverWait = getWebDriverWait();\n webDriverWait.until(ExpectedConditions.invisibilityOf(element));\n }",
"protected WebDriverWait wfExpected(){\n return (WebDriverWait) ApplicationContextProvider.getApplicationContext().getBean(webDriverWait, SessionContext.getSession().getWebDriver(),SessionContext.getSession().getWaitUntil());\n }",
"@Test (groups = {\"Regression\"})\n public void verifyElementsOnHarrowWebsiteHomePageAreDisplayed() {\n homePage.isDisplayedServicesBtn();\n }",
"public WebElement wait(WebElement webElement) {\n WebDriverWait webDriverWait = new WebDriverWait(driver, Integer.parseInt(testData.timeout));\n return webDriverWait.until(ExpectedConditions.visibilityOf(webElement));\n }",
"public void verifyUIElements(){\r\n\t\t\tisClickable(Txt_HomePage_Search);\r\n\t\t\tisClickable(Btn_HomePage_Search);\r\n\t\t}",
"protected void waitForVisibilityOf(By locator, Integer... timeOutInSeconds) {\n int attempts = 0;\n while (attempts < 2) {\n try {\n waitFor(ExpectedConditions.visibilityOfElementLocated(locator),\n timeOutInSeconds.length > 0 ? timeOutInSeconds[0] : null);\n break;\n } catch (StaleElementReferenceException e) {\n log.error(e.toString());\n }\n attempts++;\n }\n }",
"public void waitForElementsPresent(By by,int time){\n WebDriverWait wait = new WebDriverWait(driver,time);\n wait.until(ExpectedConditions.presenceOfElementLocated(by));\n }",
"public static void waitForPageLoad() {\n\n\t\tif (!WebController.driver.getCurrentUrl().contains(\"uhc.com/dashboard\") && !WebController.driver.getCurrentUrl().contains(\"myuhc.com/member/\") && !WebController.driver.getCurrentUrl().contains(\"=securityQuestion\")) {\n\t\t\tWaitForLoadingOverlay();\n\t\t}\n\n\t\tJavascriptExecutor js = null;\n\t\tfor (int i = 0; i < AppConfiguration.getWaitTime(); i++) {\n\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tjs = (JavascriptExecutor) WebController.driver;\n\t\t\tif (js.executeScript(\"return document.readyState\").toString().equals(\"complete\"))\n\t\t\t\tbreak;\n\n\t\t}\n\t}",
"public boolean waitForVisibility(By targetElement) {\n try {\n WebDriverWait wait = new WebDriverWait(getDriver(), timeOut);\n wait.until(ExpectedConditions.visibilityOfElementLocated(targetElement));\n return true;\n } catch (TimeoutException e) {\n error(\"Exception Occurred while waiting for visibility of element with definition :: \" +\n targetElement);\n error(Throwables.getStackTraceAsString(e));\n throw new TimeoutException(Throwables.getStackTraceAsString(e));\n }\n }",
"private WebElement getCssSelectorElement(String cssSelectorInfo) {\n\t\tWebElement element = null;\n\t\t// WebDriverWait wait = new WebDriverWait(driver, 60);\n\t\telement = SearchTest.wait.until(visibilityOfElementLocated(By.cssSelector(cssSelectorInfo)));\n\t\treturn element;\n\t}",
"private static void waitForProgressBarToDisappear(){\n\t\tBy androidProgressBar = By.xpath(\"//*[@class=\\\"android.widget.ProgressBar\\\"]\");\n\t\tSystem.out.println(\"----->inside waitForProgressBarToDisappear\");\n\t\t//progress may flicker causing failures\n\t\ttry {\n\t\t\tThread.sleep(500);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif(LocalDriverManagerMobile.INSTANCE.getDriver().findElements(androidProgressBar).size() > 0){\n\t\t\tSystem.out.println(\"----->inside waitForProgressBarToDisappear - progress Bar found and waiting for it to clear\");//TODO delete\n\t\t\ttry{\n\t\t\t\tnew WebDriverWait(LocalDriverManagerMobile.INSTANCE.getDriver(),20)\n\t\t\t\t\t\t.until(ExpectedConditions.invisibilityOfElementLocated(androidProgressBar));\n\t\t\t}catch (TimeoutException t){\n\t\t\t\tSystem.err.println(\"-----> Progress bar flickered or got stucked!!!\");\n\t\t\t}\n\t\t}\n\t}",
"public void waitTillObjectAppears(By locator) {\n\t\ttry {\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, TIMEOUT_S);\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(locator));\n\t\t} catch (TimeoutException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void waitForEndOfAllAjaxes(){\r\n\t\tLOGGER.info(Utilities.getCurrentThreadId()\r\n\t\t\t\t+ \" Wait for the page to load...\");\r\n\t\tWebDriverWait wait = new WebDriverWait(driver,Integer.parseInt(Configurations.TEST_PROPERTIES.get(ELEMENTSEARCHTIMEOUT)));\r\n\t\twait.until(new ExpectedCondition<Boolean>() {\r\n\t\t\t@Override\r\n\t\t\tpublic Boolean apply(WebDriver driver) {\r\n\t\t\t\t//\t\t\t\treturn (Boolean)((JavascriptExecutor)driver).executeScript(\"return jQuery.active == 0\");\r\n\t\t\t\treturn ((JavascriptExecutor)driver).executeScript(\"return document.readyState\").equals(\"complete\");\r\n\t\t\t\t//\t\t\t\t return Boolean.valueOf(((JavascriptExecutor) driver).executeScript(\"return (window.angular !== undefined) && (angular.element(document).injector() !== undefined) && (angular.element(document).injector().get('$http').pendingRequests.length === 0)\").toString());\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}",
"@Given(\"^User navigates to the URL$\")\r\npublic void user_navigates_to_the_URL() throws Throwable {\r\n\tdriver.get(prop.getProperty(\"url\"));Thread.sleep(4000);\r\n WebDriverWait wait = new WebDriverWait(driver,60);\r\n\t wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(prop.getProperty(\"Popup\"))));\r\n\t driver.findElement(By.xpath(prop.getProperty(\"Popup\"))).click();Thread.sleep(5000);\r\n}",
"public void clickOnNotNowBtn() throws Exception {\n\t\tgetHomepagenotnowbtn().waitForVisible();\n\t\tJavascriptExecutor executor = (JavascriptExecutor) driver;\n\t\texecutor.executeScript(\"arguments[0].click()\",homepagenotnowbtn);\n\t\tSystem.out.println(\"alert is closed\" + homepagenotnowbtn);\n\t\twaitForPageToLoad();\n\t}",
"void waitUntilDaysDropdownElementIsVisible() {\n\t\tSeleniumUtility.waitElementToBeVisible(driver, homepageVehiclePlanning.divTagSelectDaysHomepageVehiclePlanning(\"7\"));\n\t}",
"public static WebElement btn_clickInqNowForUnvPdtAtInqBar() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(\r\n \t\t\t\tBy.xpath(\"(//*[contains(@class, 'inquiryCon')]//a[contains(text(),'Inquire Now')])[last()]\"));\r\n \t\t\r\n \t\tWebDriverWait wait = new WebDriverWait(driver, 15);\r\n \t\twait.until(ExpectedConditions.elementToBeClickable(element));\r\n \t\t\r\n \t\tAdd_Log.info(\"Inquire Now button for Unverified Product is click on the page.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Inquire Now button for Unverified Product is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }",
"public static void waitForElementToDisplay(WebDriver driver, By by, long timeOut, long pollingTime) {\n\n\t\tFluentWait<WebDriver> wait = new FluentWait<WebDriver>(driver).withTimeout(Duration.ofSeconds(timeOut))\n\t\t\t\t.pollingEvery(Duration.ofSeconds(pollingTime)).ignoring(NoSuchElementException.class);\n\t\tFunction<WebDriver, Boolean> function = new Function<WebDriver, Boolean>() {\n\t\t\tpublic Boolean apply(WebDriver driver) {\n\t\t\t\tWebElement searchElement = driver.findElement(by);\n\t\t\t\tif (searchElement.isDisplayed()) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\t\twait.until(function);\n\t}",
"public List<WebElement> visibilityOfAllElementsLocatedBy(final By by) {\n return (new WebDriverWait(webDriver, DRIVER_WAIT_TIME))\n .until(ExpectedConditions.visibilityOfAllElementsLocatedBy(by));\n }",
"@Then(\"^click on \\\"([^\\\"]*)\\\" icon$\")\npublic void click_on_icon(String arg1) throws Throwable \n{\n\tThread.sleep(3000);\n\tdriver.findElement(By.xpath(\"//button[@class=' btn btn-primary ']\")).click();\n\tdriver.findElement(By.xpath(\"//div[@class='alert alert-success']\")).isDisplayed();\n\t \n\n}",
"public List<WebElement> presenceOfAllElementsLocatedBy(final By by) {\n return (new WebDriverWait(webDriver, DRIVER_WAIT_TIME))\n .until(ExpectedConditions.presenceOfAllElementsLocatedBy(by));\n }",
"public void scrollDownThePageToFindTheEnrollNowButton() {\n By element =By.xpath(\"//a[@class='btn btn-default enroll']\");\n\t scrollIntoView(element);\n\t _normalWait(3000);\n }",
"protected void findWebElementAndClick (By webElementSelector){\n\t\tWebElement button = findWebElement(webElementSelector);\n\t\ttry {\t\t\n\t\t\tbutton.click();\n\t\t} catch (StaleElementReferenceException e) {\n\t\t\tthrow new AssertionError(\"Found the web element, but cannot perform click action. \" + webElementSelector.toString());\n\t\t}\t\t\n\t}",
"private void waitForPageToLoad(){\n new WebDriverWait(driver,10).until(\n ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//body//table//img[contains(@src,'backtoflights.gif')]\")));\n }",
"public boolean waitForInvisibility(By targetElement) {\n try {\n WebDriverWait wait = new WebDriverWait(getDriver(), timeOut);\n wait.until(ExpectedConditions.invisibilityOfElementLocated(targetElement));\n return true;\n } catch (TimeoutException e) {\n error(\"Exception Occurred in while waiting for invisibility of element with definition :: \" +\n targetElement);\n error(Throwables.getStackTraceAsString(e));\n throw new TimeoutException(Throwables.getStackTraceAsString(e));\n }\n }",
"void clickOnRefreshButton() {\n\t\tSeleniumUtility.clickOnElement(driver, homepageVehiclePlanning.buttonTagRefreshButtonHomepageVehiclePlanning);\n\t}",
"public void waitForElementToBeClickable(WebElement element) {\n wait.until(ExpectedConditions.visibilityOf(element));\n wait.until(ExpectedConditions.elementToBeClickable(element));\n }",
"public void waitForElementToReattachToDOM(final By bySelector)\n {\n // waits for the save to be registered before performing next action.\n System.out.println(\"Wait for element to not be stale \" + bySelector);\n new WebDriverWait(driver, DEFAULT_TIMEOUT, DEFAULT_SLEEP_IN_MILLIS).\n until(ExpectedConditions.not(ExpectedConditions.stalenessOf(waitForDisplay(bySelector))));\n }",
"public void waitForElementVisibility(WebDriver driver, WebElement element)\n\t\t{\n\t\t\tWebDriverWait wait = new WebDriverWait(driver,20);\n\t\t\twait.until(ExpectedConditions.visibilityOf(element));\n\t\t}",
"public static void waitUntilElementIsVisible(WebElement element) {\n WebDriverWait webDriverWait = getWebDriverWait();\n webDriverWait.until(ExpectedConditions.visibilityOf(element));\n }",
"private static boolean isElementClickable(WebDriver driver, By by) {\n\t\tWebElement element;\n\t\ttry {\n\t\t\telement = driver.findElement(by);\n\t\t\tWebDriverWait wait = new WebDriverWait(driver,\n\t\t\t\t\tInteger.parseInt(getConfigValues(\"timeOutInSeconds\")));\n\t\t\twait.until(ExpectedConditions.elementToBeClickable(element));\n\t\t\treturn true;\n\t\t} catch (NoSuchElementException e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"WebElement getNewAccountButton();",
"public void waitForElementPresent(By locator){\n \tWebDriverWait wait=new WebDriverWait(driver,20);\n \twait.until(ExpectedConditions.presenceOfElementLocated(locator));\n }",
"public static void wait_for_element(By locator) throws CheetahException {\n\t\ttry {\n\t\t\tCheetahEngine.logger.logMessage(null, \"SeleniumActions\", \"Locator: \" + locator, Constants.LOG_INFO, false);\n\t\t\tWebDriverWait wait = new WebDriverWait(CheetahEngine.getDriverInstance(), Constants.GLOBAL_TIMEOUT);\n\t\t\tfluent_wait(locator);\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(locator));\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\t\t}\n\t}",
"public void clickbtnReject() {\n\t\twaitForElementClickable(10,btnReject);\n\t\tdriver.findElement(btnReject).click();\n\t\tsleep(1);\n\t}",
"protected void waitForElementToDisplay(By locator, int timeInSeconds) {\n\t\twait = new WebDriverWait(driver, timeInSeconds);\n\t\twait.until(ExpectedConditions.visibilityOfElementLocated(locator));\n\t}",
"public static WebElement btn_clickAddCategories() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(By.xpath(\"//*[contains(@class, 'PA_btn')]//a\"));\r\n \t\tWebDriverWait wait = new WebDriverWait(driver, 15);\r\n \t\twait.until(ExpectedConditions.elementToBeClickable(element));\r\n \t\tAdd_Log.info(\"Add Categories button is click on the page.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Add Categories button is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }",
"public void clickSearchButton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- SearchButton should be clicked\");\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\twaitforElementVisible(locator_split(\"BybtnSearch\"));\r\n\t\t\tclick(locator_split(\"BybtnSearch\"));\r\n\t\t\twaitForPageToLoad(100);\r\n\t\t\tSystem.out.println(\"SearchButton is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- SearchButton is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- SearchButton is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"BybtnSearch\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"public boolean waitForVisibilityOfElement(By locator) {\r\n\t\ttry {\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(locator));\r\n\t\t\treturn true;\r\n\t\t} catch (ElementNotVisibleException e) {\r\n\t\t\tSystem.out.println(\"ElementNotVisibleException\" + e.getMessage());\r\n\t\t\treturn false;\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public void ClickSendApplicationButton()\n {\n\n new WebDriverWait(driver, 30).until(ExpectedConditions.visibilityOf(SendApplicationButton)).click();\n\n }",
"public void waitUntilElementDisappears(WebDriver driver, final String xpath) throws NumberFormatException, IOException {\n\t\t\t\t\tlong start = System.currentTimeMillis();\n\t\t\t\t\tWebDriverWait wait = new WebDriverWait(driver, 30);\n\t\t\t\t\ttry {\n\t\t\t\t\tExpectedCondition<Boolean> e = new ExpectedCondition<Boolean>() {\n\t\t\t\t public Boolean apply(WebDriver driver) {\n\t\t\t\t return (driver.findElements(By.xpath(xpath)).size() > 0);\n\t\t\t\t }\n\t\t\t\t };\n\t\t\t\t wait.until(e);}\n\t\t\t\t\tcatch(Exception e) {\n\t\t\t\t\tif (driver.findElements(By.xpath(xpath)).size() > 0) { fileWriterPrinter(\"\\nElement is still visible!\\nXPATH: \" + xpath); }\n\t\t\t\t\t}\n\t\t\t\t fileWriterPrinter(\"Waiting time for Element disappearence: \" + waitTimeConroller(start, 30, xpath) + \" sec\\n\");\n\t\t\t\t}",
"public boolean waitForElementClickable(By targetElement) {\n try {\n info(\"Verifying readiness of the element :: \" + targetElement + \" to accept click operation\");\n WebDriverWait wait = new WebDriverWait(getDriver(), timeOut);\n wait.until(ExpectedConditions.elementToBeClickable(targetElement));\n return true;\n } catch (TimeoutException e) {\n error(\"Exception occurred while verifying readiness of the element :: \" + targetElement);\n error(Throwables.getStackTraceAsString(e));\n throw new TimeoutException(Throwables.getStackTraceAsString(e));\n }\n }",
"private WebDriverWait WebDriverWait(WebDriver driver, int i) {\n\t\treturn null;\r\n\t}",
"public void waitForElementClickable(String locator) {\n waitForElementVisibility(locator);\n wait.until(ExpectedConditions.elementToBeClickable(By.xpath(locator)));\n }",
"public static void waitForClickability(WebElement element){\n getWait().until(ExpectedConditions.elementToBeClickable(element));\n }",
"public WebElement waitForDisplay(final By by, int timeoutInSeconds)\n {\n System.out.println(\"Wait for display of \" + by);\n return new WebDriverWait(driver, timeoutInSeconds, DEFAULT_SLEEP_IN_MILLIS)\n .ignoring(StaleElementReferenceException.class).\n until(ExpectedConditions.visibilityOfElementLocated(by));\n }",
"@Test\n public void ShowMorePaymentsButton() {\n onView(withId(R.id.showMorePayments)).check(matches(isDisplayed())); // Find button\n onView(withId(R.id.showMorePayments)).check(matches(isClickable())); // Check if clickable\n onView(withId(R.id.showMorePayments)).perform(click()); // Perform click\n intended(hasComponent(showMorePayments.class.getName())); // Opens more payments page\n }",
"public static void waitForelementClickable(By by, long time) {\n WebDriverWait wait = new WebDriverWait(driver, time);\n wait.until(ExpectedConditions.elementToBeClickable(by));\n }",
"protected void clickThenWait(By target, By staleElement) {\n \tint waitTime = 10;\n \tWebElement element = new WebDriverWait(DRIVER, waitTime)\n \t.until(ExpectedConditions.elementToBeClickable(target));\n\n \t element.click();\n \t new WebDriverWait(DRIVER, waitTime)\n \t .until(ExpectedConditions.invisibilityOfElementLocated(staleElement));\n }",
"private static boolean areElementsPresent(WebDriver driver, By by) {\n\t\ttry {\n\t\t\tdriver.findElements(by);\n\t\t\treturn true;\n\t\t} catch (NoSuchElementException e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"public static void fluentWaitPredicate()\n\t{\n\t\t\n\t\t//Locating an element by polling the dom frequently with timeout wait also given \n\t\t\n\t\t//So as a first step ,give the timeout wait,polling seconds ,exception name \n\t FluentWait<WebDriver> fluentwait = new FluentWait<WebDriver>(driver);\n\t fluentwait.withTimeout(5000, TimeUnit.MILLISECONDS);\n\t fluentwait.pollingEvery(250, TimeUnit.MILLISECONDS);\n\t //fluentwait.withTimeout(2, TimeUnit.MINUTES);\n\t fluentwait.ignoring(NoSuchElementException.class);\n\t\t\n\t \n\t //Declaring function with \n\t //WebDriver as input ,WebElement as output\n\t FluentWait<WebDriver> wait = new FluentWait<WebDriver>(driver);\n\t\twait.pollingEvery(250, TimeUnit.MILLISECONDS);\n\t\twait.withTimeout(2, TimeUnit.MINUTES);\n\t\twait.ignoring(NoSuchElementException.class); //make sure that this exception is ignored\n \n\t\tPredicate<WebDriver> predicate = new Predicate<WebDriver>()\n\t\t\t\t{\n \n\t\t\t\t\tpublic boolean apply(WebDriver arg0) \n\t\t\t\t\t{\n\t\t\t\t\t\tWebElement element = arg0.findElement(By.id(\"colorVar\"));\n\t\t\t\t\t\tString color = element.getAttribute(\"color\");\n\t\t\t\t\t\tSystem.out.println(\"The color if the button is \" + color);\n\t\t\t\t\t\tif(color.equals(\"red\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t \n\t}",
"public static void waitUntilElementIsClickable(WebElement element) {\n WebDriverWait webDriverWait = getWebDriverWait();\n webDriverWait.until(ExpectedConditions.elementToBeClickable(element));\n }",
"public void waitForPageToLoad() {\n Wait<WebDriver> wait = new WebDriverWait(WebDriverManager.getDriver(), 90);\n wait.until(new Function<WebDriver, Boolean>() {\n public Boolean apply(WebDriver driver) {\n return String\n .valueOf(((JavascriptExecutor) driver).executeScript(\"return document.readyState\"))\n .equals(\"complete\");\n }\n });\n try {\n wait.until(ExpectedConditions.invisibilityOfElementLocated(By.id(\"waitMessage_div\")));\n wait.until(ExpectedConditions.invisibilityOfElementLocated(By.xpath(\"//div[contains(text(),'Loading')]\")));\n // waitForPageToLoad();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void clickgoButton(){\n \n \t \n driver.findElement(By.cssSelector(goButton)).click();\n }"
] | [
"0.6566896",
"0.62388384",
"0.5958935",
"0.59405816",
"0.5910124",
"0.5805314",
"0.5787266",
"0.5747808",
"0.57427937",
"0.5728812",
"0.5727893",
"0.57184696",
"0.56976885",
"0.56597084",
"0.5654446",
"0.5629016",
"0.56132394",
"0.5607276",
"0.5594469",
"0.55880344",
"0.5583701",
"0.55753195",
"0.5536467",
"0.5515033",
"0.5496255",
"0.5494276",
"0.5487685",
"0.54829985",
"0.5482173",
"0.54803014",
"0.54765266",
"0.54671085",
"0.54649675",
"0.5450721",
"0.5426883",
"0.54259896",
"0.541897",
"0.54180944",
"0.5414627",
"0.5410207",
"0.5408175",
"0.54059803",
"0.5404098",
"0.54009473",
"0.539733",
"0.5394303",
"0.5393825",
"0.5391064",
"0.5384881",
"0.53788453",
"0.5378149",
"0.5366821",
"0.5355148",
"0.5346927",
"0.5332201",
"0.53304243",
"0.53282183",
"0.53181314",
"0.5307698",
"0.5303373",
"0.5289512",
"0.5288542",
"0.52874434",
"0.52857184",
"0.52721214",
"0.52711266",
"0.5269995",
"0.5268207",
"0.526213",
"0.5253211",
"0.5251135",
"0.5248288",
"0.52468383",
"0.5246817",
"0.5236798",
"0.5236192",
"0.52335703",
"0.52294225",
"0.52293634",
"0.5229007",
"0.52284026",
"0.5214795",
"0.52120733",
"0.5208615",
"0.52074385",
"0.5206522",
"0.52013063",
"0.5193725",
"0.5190038",
"0.51887596",
"0.5188714",
"0.5187119",
"0.5185032",
"0.51815534",
"0.51799184",
"0.5178224",
"0.5175962",
"0.5175509",
"0.5173269",
"0.51718545"
] | 0.7461036 | 0 |
Resets all of the tutorial tasks can be used where multiple tests can clear the same task. | public static void callZapApiResetTasks() throws MalformedURLException, IOException {
HUD.callZapApi("/JSON/hud/action/resetTutorialTasks?");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized void resetExercises() {\n exercises = null;\n }",
"private void clearOneTest() {\n corpus.clear();\n Factory.deleteResource(corpus);\n Factory.deleteResource(learningApi);\n controller.remove(learningApi);\n controller.cleanup();\n Factory.deleteResource(controller);\n }",
"@Test\n public void clearTask() {\n TestTask[] currentTaskList = tt.getTypicalTasks();\n TestTask[] filteredTaskList = TestUtil.getFilteredTestTasks(currentTaskList);\n assertTrue(taskListPanel.isListMatching(filteredTaskList));\n assertClearTaskCommandSuccess();\n\n //verify other commands can work after a clear task command\n currentTaskList = TestUtil.removeTasksFromList(currentTaskList, currentTaskList);\n TestTask taskToAdd = tt.homework;\n currentTaskList = TestUtil.addTasksToList(currentTaskList, taskToAdd);\n filteredTaskList = TestUtil.getFilteredTestTasks(currentTaskList);\n commandBox.runCommand(taskToAdd.getAddCommand());\n assertTrue(taskListPanel.isListMatching(filteredTaskList));\n commandBox.runCommand(\"delete ts 1\");\n assertTaskListSize(0);\n\n //verify clear command works when the list is empty\n assertClearTaskCommandSuccess();\n }",
"private void resetAll() {\n resetResources();\n resetStory();\n refresh();\n }",
"public void resetTask() {}",
"public void deleteAll() {\n tasks = new ArrayList<>();\n }",
"@Test\n public void clearAll() {\n TestEvent[] currentEventList = te.getTypicalEvents();\n TestEvent[] filteredEventList = TestUtil.getFilteredTestEvents(currentEventList);\n TestTask[] currentTaskList = tt.getTypicalTasks();\n TestTask[] filteredTaskList = TestUtil.getFilteredTestTasks(currentTaskList);\n assertTrue(eventListPanel.isListMatching(filteredEventList));\n assertTrue(taskListPanel.isListMatching(filteredTaskList));\n assertClearAllCommandSuccess();\n\n //verify other commands can work after a clear command\n //verify add and delete event works after a clear command\n currentEventList = TestUtil.removeEventsFromList(currentEventList, currentEventList);\n TestEvent eventToAdd = te.workshop;\n currentEventList = TestUtil.addEventsToList(currentEventList, eventToAdd);\n filteredEventList = TestUtil.getFilteredTestEvents(currentEventList);\n commandBox.runCommand(eventToAdd.getAddCommand());\n assertTrue(eventListPanel.isListMatching(filteredEventList));\n commandBox.runCommand(\"delete ev 1\");\n assertEventListSize(0);\n\n //verify add and delete task works after a clear command\n currentTaskList = TestUtil.removeTasksFromList(currentTaskList, currentTaskList);\n TestTask taskToAdd = tt.homework;\n currentTaskList = TestUtil.addTasksToList(currentTaskList, taskToAdd);\n filteredTaskList = TestUtil.getFilteredTestTasks(currentTaskList);\n commandBox.runCommand(taskToAdd.getAddCommand());\n assertTrue(taskListPanel.isListMatching(filteredTaskList));\n commandBox.runCommand(\"delete ts 1\");\n assertTaskListSize(0);\n\n //invalid command\n commandBox.runCommand(\"clear all\");\n assertResultMessage(\"Invalid command format! \\n\" + ClearCommand.MESSAGE_USAGE);\n\n //verify clear command works when the list is empty\n assertClearAllCommandSuccess();\n }",
"void resetTesting() {\r\n\t\tcompanyCars.clear();\r\n\t\trentDetails.clear();\r\n\t}",
"void resetToRest() {\n\t\t\t\tsimulate = false;\n\t\t\t\ttask = null;\n\t\t\t}",
"public static void resetGlobals(int numTasks){\n time = 0;\n terminatedCount = 0;\n removeSet.clear();\n resourceArr = maxResourceArr.clone();\n releaseArr = new int [numResources];\n taskPointers = new int [numTasks];\n taskList = bankersTaskList;\n waitingList.clear();\n\n }",
"public void clearFinishedTasks(){\n todayLayout.removeAllViewsInLayout();\n tomorrowLayout.removeAllViewsInLayout();\n weekLayout.removeAllViewsInLayout();\n laterLayout.removeAllViewsInLayout();\n expiredLayout.removeAllViewsInLayout();\n tasksNumber = 0;\n taskManager.updateTasksTimeTag();\n for (Task t : taskManager.getTasksList()){\n t.setIdInView(tasksNumber);\n updateTaskInDatabase(t);\n submit(t.getName(), tasksNumber, t.getTimeForTask(), t.isFinished());\n tasksNumber++;\n }\n }",
"public void resetAll() {\n reset(getAll());\n }",
"public void clearFramework() {\r\n\t\tList<Configuration> tests = testCache.getAllTests();\r\n\t\tlog.info(\"Clearing all tests.\\n\");\r\n\t\tfor (Configuration test : tests) {\r\n\t\t\tkillTest(test.getUniqueId());\r\n\t\t}\r\n\t\tworkQueue.clear();\r\n\t\ttestCache.clear();\r\n\t}",
"public static void resetTestCount() {\n mTestCount = 0;\n }",
"@DISPID(27)\n\t// = 0x1b. The runtime will prefer the VTID if present\n\t@VTID(38)\n\tvoid resetTestSet(boolean deleteRuns);",
"protected void nullifyTutorialObjectsAndStats() {\n\t\tthis.tutorial = null;\n\t\tthis.practiceDrillHuman = null;\n\t\tthis.practiceDrillAI = null;\n\t\tthis.finalMission = null;\n\t\tthis.numOfMoves = 0;\n\t\tthis.numOfTimesAITriggered = 0;\n\t}",
"private void resetAll() {\n\t\tif(mu1 != null)\n\t\t\tmodel.getView().reset(mu1);\n\t\tmu1 = null;\n\t\t\n\t\tif(mu2 != null)\n\t\t\tmodel.getView().reset(mu2);\n\t\tmu2 = null;\n\t\t\n\t\tif(functionWord != null)\n\t\t\tmodel.getView().reset(functionWord);\n\t\tfunctionWord = null;\n\t\t\n\t\tmodel.getSGCreatingMenu().reset();\n\t}",
"public static void reset() {\n HealthCheck.failed = false;\n HealthCheck.checks.clear();\n }",
"public void testReset() {\n\t}",
"public void reset() \n {\n cumulativeTrials = 0;\n\t numTwoHeads = 0;\n\t numTwoTails = 0;\n\t numHeadTails = 0;\n }",
"public static void clearHomework() {\n for(int i = 0; i < homework.size(); i++) {\n homework.get(i).clear();\n }\n }",
"public Builder clearTutorial() {\n bitField0_ = (bitField0_ & ~0x00000008);\n tutorial_ = getDefaultInstance().getTutorial();\n onChanged();\n return this;\n }",
"protected void teardownTask(Task task) {\n }",
"@After\n public void tearDown()\n {\n example = null;\n example2 = null;\n example3 = null;\n }",
"public void reset() {\n\t\tacceptAnswers = false;\n\t\tcurrentQuestion = null;\n\t\tsubmissions = null;\n\t}",
"public void clearAll(boolean clearContext, TaskMonitor monitor);",
"void resetUndoneData(ReadOnlyTaskManager newData);",
"public static void tearDown() {\n reset();\n clear();\n APIConfig.getInstance().setAppId(null, null);\n APIConfig.getInstance().setDeviceId(null);\n APIConfig.getInstance().setToken(null);\n APIConfig.getInstance().setUserId(null);\n Leanplum.setApplicationContext(null);\n }",
"public static void reset() {\n\t\tCAUGHT.clear();\n\t\tLOAD_CACHE.clear();\n\t}",
"public void removeTasks() {\n\t\t\r\n\t}",
"public void resetTestVars() {\n\t\tuser1 = new User();\n\t\tuser2 = new User();\n\t\tuser3 = new User();\n\t\tsn = new SocialNetwork();\n\t\tstatus = SocialNetworkStatus.DEFAULT;\n\t\tearly = new Date(25L);\n\t\tmid = new Date(50L);\n\t\tlate = new Date(75L);\n\t}",
"private void resetStory() {\n storyManager.resetAllStories();\n user.setCurrentStoryNode(0);\n }",
"private void reset() {\n }",
"public void reset(){\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm -r data/games_module\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"sed -i \\\"1s/.*/ \"+\"0\"+\" /\\\" data/winnings\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"sed -i \\\"1s/.*/ \"+\"175\"+\" /\\\" data/tts_speed\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/answered_questions\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/five_random_categories\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/current_player\");\n\t\t_currentPlayer = null;\n\t\t_internationalUnlocked = false;\n\t\t_gamesData.clear();\n\t\t_fiveRandomCategories.clear();\n\t\tfor (int i= 0; i<5;i++) {\n\t\t\t_answeredQuestions[i]=0;\n\t\t}\n\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/answered_questions\");\n\t\tinitialiseCategories();\n\t\ttry {\n\t\t\treadCategories();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsetFiveRandomCategories();\n\t}",
"@Before\n public void setup() {\n // Ensure all clusters have been removed.\n clusterTestTools.deleteAllClusters();\n }",
"public void reset()\n\t{\n\t\t//taskTable.setFilters(new FilterPipeline());\n\t\tmodel = new TaskTableModel(projects);\n\t\ttaskTable.setModel(model);\n\t\tresetComboxes();\n\t}",
"public void reset () {}",
"public void clearEditTextBoxes()\n {\n \ttaskName.setText(\"\");\n \ttaskDetails.setText(\"\");\n \ttaskId.setText(\"\");\n \t//TODO Add alarm stuff here\n }",
"private static void _reset() {\n // clear metrics\n HystrixCommandMetrics.reset();\n HystrixThreadPoolMetrics.reset();\n HystrixCollapserMetrics.reset();\n // clear collapsers\n HystrixCollapser.reset();\n // clear circuit breakers\n HystrixCircuitBreaker.Factory.reset();\n HystrixPlugins.reset();\n HystrixPropertiesFactory.reset();\n currentCommand.set(new LinkedList<HystrixCommandKey>());\n }",
"@AfterAll\n static void cleanOperate()\n { \n //clear reference of operate after all the tests done\n operate = null;\n System.out.println(\"only After all the tests....\");\n }",
"public final void resetAll() {\r\n this._queue = null;\r\n this._delayed = null;\r\n }",
"public void reset() {\n\n }",
"protected void setUp() {\n //Clear all namespace in the ConfigManager\n TestHelper.resetConfig();\n }",
"public void reset() {\n }",
"public void reset() {\n }",
"public void reset() {\n }",
"public void reset() {\n }",
"protected void tearDown() throws Exception {\n action = null;\n manager = null;\n activityGraph = null;\n state = null;\n\n TestHelper.clearProjectConfiguration();\n }",
"void StoryReset() {\n\n //Delete Any Previous Recordings\n\n //Remove Previous Audio Commentary Callbacks\n cancelIdleStoryCountdown();\n }",
"@Before\n\tpublic void reset()\n\t{\n\t\tClientPlayerManager.resetSingleton();\n\t\tChatManager.resetSingleton();\n\t\tQualifiedObservableConnector.resetSingleton();\n\t}",
"public void reset() {\n this.searchDone = false;\n this.taskForResize = null;\n }",
"public void resetTask() {\n super.resetTask();\n this.entity.setAggroed(false);\n this.seeTime = 0;\n this.attackTime = -1;\n this.entity.resetActiveHand();\n }",
"public static void reset() {\n // shutdown thread-pools\n HystrixThreadPool.Factory.shutdown();\n _reset();\n }",
"void reset() {\n errors.clear();\n variables.clear();\n }",
"public void reset() {\n this.done = false;\n }",
"void resetDoneData(ReadOnlyTaskManager newData);",
"public static void reset()\n\t\t{\n\t\t\tfeatureSet = new THashMap();\n\t\t\tfeatureIds = new TObjectIntHashMap();\n\t\t\tnextID = 1;\t\t\t\n\t\t}",
"public void reset()\n\t{\n\t}",
"public void reset()\n\t{\n\t}",
"public void resetTheGame(){\n\t\tfjCount = 0;\n\t\tquestionAnsweredCount = 0;\n\t\tfor(int i = 0 ; i< 5; i++){\n\t\t\tfor(int j = 0 ; j < 5 ; j++){\n\t\t\t\tboard[i][j].reset();\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0 ; i < teamNum; i ++){\n\t\t\tteams[i].reset();\n\t\t\tbets[i] = 0; \n\t\t}\n\t}",
"public void reset() {\n\n\t}",
"void resetData(ReadOnlyTaskList newData);",
"public void clearSeeds() {\n\t\tseedList = new ArrayList<String>();\n\t}",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset() {\n\t}",
"public void reset() {\n\t}",
"public void reset() {\n\t}",
"public void reset() {\n\t}",
"private void resetTemporary(){\n temporaryConstants = null;\n temporaryVariables = null;\n }",
"public void reset() throws Exception;",
"public void reset(){\n }",
"public void reset() {\r\n\t\tsuper.reset();\r\n\t\tfor (TransitionMode mode : transitionModes) {\r\n\r\n\t\t\tmode.reset();\r\n\t\t}\r\n\r\n\t}",
"private void clearList() {\n for (JRadioButton task : toDoButtonList){\n task.setText(\"\");\n }\n }",
"void resetData(ReadOnlyTaskManager newData);",
"public void resetRunCount() {\n\n }",
"public void reset() {\n\r\n\t}",
"void reset()\n {\n\n }",
"void reset() {\n synchronized (instances) {\n instances.clear();\n }\n }",
"public void clearAll();",
"public void clearAll();",
"@Before\r\n\tpublic void cleanStart(){\n\t\tStartupFunctions.clearTabs();\r\n\t}",
"@Before\r\n\tpublic void cleanStart(){\n\t\tStartupFunctions.clearTabs();\r\n\t}",
"public void reset() {\r\n\t\tplayAgain = false;\r\n\t\tmainMenu = false;\r\n\t\tachievement = 0;\r\n\t}",
"private void resetAll() // resetAll method start\n\t{\n\t\theader.reset();\n\t\tdebit.reset();\n\t\tcredit.reset();\n\t}",
"public static void reset() {\n\t\tE_Location.THIS.reset();\n\t\tE_Resource.THIS.reset();\n\t\t\n\t\tT_Object.reset();\n\t\tT_Location.reset();\n\t\tT_Resource.reset();\n\t\t\n\t}",
"public void reset() {\n\t\tmCycleFlip = false;\n\t\tmRepeated = 0;\n\t\tmMore = true;\n //mOneMoreTime = true;\n \n\t\t// 추가\n\t\tmStarted = mEnded = false;\n\t\tmCanceled = false;\n }"
] | [
"0.6918303",
"0.6821782",
"0.68121445",
"0.67463446",
"0.6664667",
"0.6566108",
"0.6519102",
"0.64052033",
"0.63730484",
"0.63723844",
"0.62938666",
"0.6217251",
"0.6174363",
"0.6059896",
"0.6022848",
"0.597549",
"0.5955426",
"0.5946907",
"0.5941571",
"0.5925142",
"0.5922144",
"0.5921487",
"0.58981025",
"0.58917856",
"0.58847976",
"0.5881421",
"0.5869532",
"0.58658403",
"0.584867",
"0.58423173",
"0.584221",
"0.5841225",
"0.5825401",
"0.58129185",
"0.57946736",
"0.57945645",
"0.5783653",
"0.5779234",
"0.57697487",
"0.57584065",
"0.57534164",
"0.5751005",
"0.5750201",
"0.574955",
"0.574955",
"0.574955",
"0.574955",
"0.57484174",
"0.57417315",
"0.57369435",
"0.5736458",
"0.5732618",
"0.5707533",
"0.5688115",
"0.5686618",
"0.5681486",
"0.5676707",
"0.56754166",
"0.56754166",
"0.5668457",
"0.56663966",
"0.56567156",
"0.56458133",
"0.56418073",
"0.56418073",
"0.56418073",
"0.56418073",
"0.56418073",
"0.56418073",
"0.56418073",
"0.56418073",
"0.56418073",
"0.56418073",
"0.56418073",
"0.56418073",
"0.56418073",
"0.56418073",
"0.56418073",
"0.5635961",
"0.5635961",
"0.5635961",
"0.5635961",
"0.56326455",
"0.56325096",
"0.5630169",
"0.56235653",
"0.5621868",
"0.56113523",
"0.56109226",
"0.5608392",
"0.56033003",
"0.5600119",
"0.55976397",
"0.55976397",
"0.559502",
"0.559502",
"0.5588982",
"0.55871224",
"0.5569262",
"0.556335"
] | 0.64253277 | 7 |
TODO Autogenerated method stub | @Override
public void onSongListDeleteClick(View v) {
int position = (Integer) ((ImageView)v).getTag();
MPService.SongList.remove(position);
adapter.notifyDataSetChanged();
tv_songlist.setText("播放列表(" + MPService.SongList.size() + ")" );
} | {
"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}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.img_songlist_order:
switch (MPService.PlayerOrder) {
case MPService.PlayerOrder_Sequentially:
MPService.PlayerOrder = MPService.PlayerOrder_Random;
img_songlist_order.setImageResource(R.drawable.pic_wxh_popwindow_sjbf);
Toast.makeText(context, "随机播放", Toast.LENGTH_SHORT).show();
break;
case MPService.PlayerOrder_Random:
MPService.PlayerOrder = MPService.PlayerOrder_Loop;
img_songlist_order.setImageResource(R.drawable.pic_wxh_popwindow_dqxh);
Toast.makeText(context, "单曲循环", Toast.LENGTH_SHORT).show();
break;
case MPService.PlayerOrder_Loop:
MPService.PlayerOrder = MPService.PlayerOrder_Sequentially;
img_songlist_order.setImageResource(R.drawable.pic_wxh_popwindow_sxbf);
Toast.makeText(context, "顺序播放", Toast.LENGTH_SHORT).show();
break;
}
break;
case R.id.img_songlist_delete:
MPService.SongList.clear();
MPService.SongPosition = 0;
dismiss();
break;
}
} | {
"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 onItemClick(AdapterView<?> parent, View view, int position,
long id) {
playMusic(MPService.MusicPlayer);
MPService.SongPosition = position;
MPService.isLoadImg = true;
adapter.notifyDataSetChanged();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) throws IOException {
File src = new File("C://PhantonJs//bin//phantomjs//bin//phantomjs.exe");
System.setProperty("phantomjs.binary.path",src.getAbsolutePath());
WebDriver driver = new PhantomJSDriver();
driver.get("https://en-gb.facebook.com/login/");
System.out.println("Opening Application URL");
WebElement element=driver.findElement(By.xpath("//input[@id='email']"));
element.sendKeys("****");
WebElement element2=driver.findElement(By.xpath("//input[@id='pass']"));
element2.sendKeys("***");
driver.findElement(By.xpath("//*[@id='loginbutton']")).click();
System.out.println("login sucessful");
File scrFile=((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile,new File("E:\\projects\\pivotal.jpg"),true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Enter numerator : ");
int x = sc.nextInt();
System.out.print("Enter denominator : ");
int y = sc.nextInt();
divide(x, y);
} | {
"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}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
] | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
String[] sortedArray = { "A", "D", "C", "B" };
Arrays.sort(sortedArray);
for (String takenVar : sortedArray) {
// System.out.println(takenVar);
}
int index = Arrays.binarySearch(sortedArray, "c");
System.out.println(index);
index = Arrays.binarySearch(sortedArray, "e");
System.out.println(index);
int[] sortedIntArray = new int[] { 1, 2, 3, 5, 7 };
index = Arrays.binarySearch(sortedIntArray, 6);
System.out.println(index);
List<String> list = Arrays.asList(sortedArray);
Collections.shuffle(list);
System.out.println(list);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
Creates a new instance of AbstractFilteringTestCase | public AbstractFilteringTestCase(String testName) {super(testName);} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void filter() {\n\n }",
"protected IUIFilterable createFilterable() {\n \t\treturn new UIFilterable();\n \t}",
"public Filter() {\n }",
"public FilterData() {\n }",
"protected FilterImpl() {\n this(SparkUtils.ALL_PATHS);\n }",
"public Filter () {\n\t\tsuper();\n\t}",
"private static Filter newFilter()\r\n {\r\n Filter filter = new Filter(\"filter1\", new Source(\"display1\", \"name1\", \"server\", \"key1\"));\r\n filter.getOtherSources().add(filter.getSource());\r\n Group group = new Group();\r\n group.addFilterCriteria(new Criteria(\"field1\", Conditional.EQ, \"123\"));\r\n Group group2 = new Group();\r\n group2.addFilterCriteria(new Criteria(\"field1\", Conditional.EQ, \"124\"));\r\n group.addFilterGroup(group2);\r\n filter.setFilterGroup(group);\r\n return filter;\r\n }",
"private FilterAssert() {\n }",
"protected void setUp() {\r\n columnNames = new HashMap();\r\n columnNames.put(DbBaseFilterFactory.CREATION_DATE_COLUMN_NAME, \"creation_date\");\r\n columnNames.put(DbBaseFilterFactory.MODIFICATION_DATE_COLUMN_NAME, \"modification_date\");\r\n columnNames.put(DbBaseFilterFactory.CREATION_USER_COLUMN_NAME, \"creation_user\");\r\n columnNames.put(DbBaseFilterFactory.MODIFICATION_USER_COLUMN_NAME, \"modification_user\");\r\n\r\n instance = new DbBaseFilterFactory(columnNames);\r\n }",
"public ObjectFilter()\n\t{\n\t}",
"public PipelineFilter()\n {\n }",
"public ValidatorFilter() {\n\n\t}",
"private ProductFilterUtils(){}",
"public Filters() {\n }",
"protected AbstractJoSQLFilter ()\n {\n\n }",
"protected BaseWicketTester newWicketTester() {\n return new BaseWicketTester(newApplication());\n }",
"protected abstract ITitleAndSearchPanelFilter instantiateHeaderAndSearchFilter ( ) ;",
"public abstract Filter<T> filter();",
"@Test\r\n public void testAssemblyFilter()\r\n {\r\n TestSuiteFilterAssembler assembler = new TestSuiteFilterAssembler();\r\n Collection<String> requirements = new ArrayList<String>();\r\n requirements.add(\"FR_TARGET_0025\");\r\n assembler.setRequirementsFilter(requirements);\r\n\r\n TestSuiteFilter<FlowStep> filter = assembler.assemblyFilter();\r\n TestSuite<TestCase<FlowStep>> newSuite = filter.filter(rawTestSuite);\r\n Assert.assertNotNull(\"The filtered test suite is null.\", newSuite);\r\n Assert.assertEquals(\"Wrong number of test cases.\", 9, newSuite.getTestCases().size());\r\n\r\n requirements.add(\"FR_TARGET_0040\");\r\n assembler.setRequirementsFilter(requirements);\r\n filter = assembler.assemblyFilter();\r\n newSuite = filter.filter(rawTestSuite);\r\n Assert.assertNotNull(\"The filtered test suite is null.\", newSuite);\r\n Assert.assertEquals(\"Wrong number of test cases.\", 15, newSuite.getTestCases().size());\r\n\r\n requirements = new ArrayList<String>();\r\n requirements.add(\"FR_TARGET_0040\");\r\n assembler.setRequirementsFilter(requirements);\r\n filter = assembler.assemblyFilter();\r\n newSuite = filter.filter(newSuite);\r\n Assert.assertNotNull(\"The filtered test suite is null.\", newSuite);\r\n Assert.assertEquals(\"Wrong number of test cases.\", 6, newSuite.getTestCases().size());\r\n }",
"@SuppressWarnings(\"unused\")\n\tprivate Filter() {\n\n\t}",
"@Test\n public void testFilter(){\n openActionBarOverflowOrOptionsMenu(getInstrumentation().getTargetContext());\n\n onView(withText(\"Filtrer par salle\")).perform(click());\n onData(anything()).atPosition(0).perform(click());\n\n Meeting meeting = meetingApiService.getMeetingByRoom(MeetingRoom.A).get(0);\n onView(withId(R.id.mainRecyclerView)).check(matches(atPosition(index, hasDescendant(withText(meeting.getMeetingInfos())))));\n\n openActionBarOverflowOrOptionsMenu(getInstrumentation().getTargetContext());\n onView(withText(\"Reinitialiser\")).perform(click());\n onView(allOf(withId(R.id.mainRecyclerView), hasFocus())).check(RecyclerViewItemCountAssertion.withItemCount(itemsCount-1));\n }",
"protected void setUp() {\n // set up for test\n instance = new GeneralizationImpl();\n GeneralizableElement mockChild = EasyMock.createMock(GeneralizableElement.class);\n GeneralizableElement mockParent = EasyMock.createMock(GeneralizableElement.class);\n Classifier mockPowertype = EasyMock.createMock(Classifier.class);\n instance.setChild(mockChild);\n instance.setDiscriminator(TEST_DISCRIMINATORS[0]);\n instance.setParent(mockParent);\n instance.setPowertype(mockPowertype);\n\n }",
"public static NodeFilter makeFilter()\n\t{\n\t\tNodeFilter[] fa = new NodeFilter[3];\n\t\tfa[0] = new HasAttributeFilter(\"HREF\");\n\t\tfa[1] = new TagNameFilter(\"A\");\n\t\tfa[2] = new HasParentFilter(new TagNameFilter(\"H3\"));\n\t\tNodeFilter filter = new AndFilter(fa);\n\t\treturn filter;\n\t}",
"@Override\n public void filter(Filter arg0) throws NoTestsRemainException {\n super.filter(getCustomFilter());\n }",
"@Test\n\tpublic void CreateNewFilter() throws Throwable\n\t{\n\t\t\n\t\tHome h=new Home(driver);\n\t\th.getConatctLink().click();\n\t\t\n\t\tContacts c=new Contacts(driver);\n\t\tc.clickOnFilterLnk();\n\t\t\n\t\tCreateNewFilterPage nfp=new CreateNewFilterPage(driver);\n\t\tnfp.EnterViweName(driver).sendKeys(\"sam\"+\"_\"+wLib.getRamDomNum());\n\t\tnfp.clickOnSaveBtn();\n\t\t\n\t\tContacts c1=new Contacts(driver);\n\t\tc1.clickOnFilterLnk();\n\t\t\n\t\tCreateNewFilterPage nfp1=new CreateNewFilterPage(driver);\n\t\tnfp1.EnterViweName(driver).sendKeys(\"saigun\"+\"_\"+wLib.getRamDomNum());\n\t\tnfp1.clickOnSaveBtn();\n\t\t\n\t\t\n\t}",
"public BazaarTests() {\r\n\t\tsuper();\r\n\t}",
"public GenericTest()\n {\n }",
"public FileFilter() {\n this.filterExpression = \"\";\n }",
"@Test\r\n public void testAssemblyFilterWithSimilarityFilter()\r\n {\r\n TestSuiteFilterAssembler assembler = new TestSuiteFilterAssembler();\r\n Collection<String> requirements = new ArrayList<String>();\r\n requirements.add(\"FR_TARGET_0025\");\r\n requirements.add(\"FR_TARGET_0040\");\r\n assembler.setRequirementsFilter(requirements);\r\n\r\n TestSuiteFilter<FlowStep> filter = null;\r\n TestSuite<TestCase<FlowStep>> newSuite = null;\r\n\r\n try\r\n {\r\n for (int i = 0; i <= 100; i++)\r\n {\r\n assembler.setSimilarityFilter((double) i);\r\n filter = assembler.assemblyFilter();\r\n newSuite = filter.filter(rawTestSuite);\r\n Assert.assertNotNull(\"The filtered test suite is null.\", newSuite);\r\n double expected = Math.round(0.15 * i);\r\n Assert.assertEquals(\"Wrong number of test cases.\", expected, (double) newSuite\r\n .getTestCases().size());\r\n }\r\n }\r\n catch (InvalidSimilarityException e)\r\n {\r\n e.printStackTrace();\r\n Assert.fail(\"An invalid similarity was set.\");\r\n }\r\n\r\n try\r\n {\r\n assembler.setSimilarityFilter(-35.00);\r\n Assert.fail(\"The assembler has accepted an invalid similarity.\");\r\n }\r\n catch (InvalidSimilarityException e)\r\n {\r\n Assert.assertTrue(\"The similarity set was successfully rejected.\", true);\r\n }\r\n }",
"protected NullFilterImpl() {\n }",
"@Test\n public void testCreateFilter() throws Exception {\n System.out.println(\"createFilter\");\n \n String expResult = \"{\\\"key\\\":{\\\"Delivery\\\":\\\"***REMOVED***\\\",\\\"FunctionalEnvironment\\\":\\\"Production\\\"},\"\n + \"\\\"values\\\":[\\\"Company\\\",\\\"VirtualDC\\\",\\\"Manufacturer\\\"]}\";\n \n \n TreeMap<String,String> key = new TreeMap<String,String>();\n List<String> values =new ArrayList<String>();\n key.put(\"Delivery\", \"***REMOVED***\");\n key.put(\"FunctionalEnvironment\", \"Production\");\n \n \n \n values.add(\"Company\");\n values.add(\"VirtualDC\");\n values.add(\"Manufacturer\");\n \n CriteriaFilter instance = new CriteriaFilter(key, values);\n \n List<CriteriaFilter> resultList = new ArrayList<CriteriaFilter>();\n resultList.add(instance);\n \n \n String result = \"\";\n for (CriteriaFilter criterio: resultList){\n System.out.println(\"result is \" + criterio);\n result = criterio.toString();\n }\n \n assertEquals(expResult, result);\n \n }",
"public HttpFilter() { }",
"public static ArticleFilter all() {\n return new ArticleFilter() {\n @Override public boolean testArticle(PubmedArticle article) {\n return true;\n };\n };\n }",
"@Before\r\n public void setupTestCases() {\r\n instance = new ShoppingListArray();\r\n }",
"public Tests(){\n \n }",
"@Test\n public void eventFilterTest() {\n // TODO: test eventFilter\n }",
"public StreamTests (String name)\n {\n super (name);\n }",
"public StrandUnitTest()\n {\n }",
"private StressTestHelper() {\n // Empty constructor.\n }",
"public AxisFilter(AxisIterator base, NodeTest test) {\n this.base = base;\n this.nodeTest = test;\n position = 0;\n }",
"@Override\n public void testCreateRequestListSomeFilteredBySourceSystem(){\n }",
"protected GridCoverageTestBase(final Class<?> testing) {\n super(testing);\n }",
"public void filter(Filter filter) throws NoTestsRemainException {\n runner.filter(filter);\n }",
"@Test\n void constructorTest() {\n super.checkConstruction();\n }",
"public CopyTransformTest() {\n }",
"@Override\n public Filter getFilter() {\n\n return new Filter() {\n @Override\n protected FilterResults performFiltering(CharSequence charSequence) {\n\n String charString = charSequence.toString();\n\n if (charString.isEmpty()) {\n\n mDataset = mArrayList;\n } else {\n\n ArrayList<DataObject> filteredList = new ArrayList<>();\n\n for (DataObject data : mArrayList) {\n\n if (data.getid().toLowerCase().contains(charString.toLowerCase()) || data.getname().toLowerCase().contains(charString.toLowerCase())) {\n\n filteredList.add(data);\n }\n }\n\n mDataset = filteredList;\n }\n\n FilterResults filterResults = new FilterResults();\n filterResults.values = mDataset;\n return filterResults;\n }\n\n @Override\n protected void publishResults(CharSequence charSequence, FilterResults filterResults) {\n mDataset = (ArrayList<DataObject>) filterResults.values;\n notifyDataSetChanged();\n }\n };\n }",
"protected AbstractTest() {\n\t\tlog = LogFactory.getLog(getClass());\n\t}",
"private FilterPipeline createPipeline() {\n Filter filterZero = createDefaultPatternFilter(0);\n Filter filterTwo = createDefaultPatternFilter(2); \n Sorter sorter = new ShuttleSorter();\n Filter[] filters = new Filter[] {filterZero, filterTwo, sorter};\n FilterPipeline pipeline = new FilterPipeline(filters);\n return pipeline;\n }",
"public AbstractTest() {\r\n\t\tlog = LogFactory.getLog(getClass());\r\n\t}",
"protected Object createTest() throws Exception {\n Object test = super.createTest();\n dataPopulator.populate(test);\n return test;\n }",
"public SamFilterParams create() {\n return new SamFilterParams(this);\n }",
"public static ArticleFilter none() {\n return new ArticleFilter() {\n @Override public boolean testArticle(PubmedArticle article) {\n return false;\n };\n };\n }",
"protected AbstractAddAdapterRule createTestableRule() {\n return new AddAdapterRule();\n }",
"public TestCase()\r\n {\r\n super();\r\n resetIO();\r\n }",
"public FilteredSuite(Class<?> arg0, RunnerBuilder arg1) throws InitializationError {\n super(extractMethodNamesFromAnnotation(arg0), arg1);\n }",
"Testcase createTestcase();",
"private BookFilters()\n {\n }",
"public RenderableTest()\n {\n }",
"public SalesItemTest()\n {\n }",
"protected TeststepRunner() {}",
"public abstract void filter();",
"public Testing2FactoryImpl() {\n\t\tsuper();\n\t}",
"public AppTest()\n {\n super(AppTest.class);\n }",
"public UnitTests()\n {\n }",
"public GroupsOnlySenseFilter() {\n \n }",
"public ActivitiTestCase() {\n }",
"public OrFileFilter()\n {\n // Nothing to do\n }",
"@Override\n public void testCreateRequestListAllFilteredBySourceSystem(){\n }",
"public void setUp() {\n // Create mutable field.\n fieldMutable = new Field(\"name\", \"value\", \"description\", false);\n\n fieldReadOnly = new Field(\"name\", \"value\", \"description\", true);\n\n conditionReadOnly = new Condition(\"name\", new NodeList(new Node[0]), \"description\", true, \"name = 'test'\");\n\n // Create node list.\n nodeList = new NodeList(new Node[] {fieldReadOnly, fieldMutable});\n\n // Create mutable loop.\n loopMutable = new Loop(\"loop\", nodeList, \"description\", false);\n\n // Create read-only loop.\n loopReadOnly = new Loop(\"loop\", nodeList, \"description\", true);\n }",
"public BirdFoodTest()\r\n {\r\n }",
"private Test emptyTest() {\n return new TestSuite();\n }",
"public CountryTest()\n {\n }",
"public LogFilter() {}",
"public CategoryTableTest() {\n super(CategoryTable.class);\n }",
"public static FilterBuilder filters()\n {\n return new FilterBuilder();\n }",
"public AbstractJsfConfigurableMockTestCase()\n {\n }",
"public TestDriverProgram(){\n iTestList = new SortableArray(iSize); // tests if parameterized constructor works\n iTestFileList = new SortableArray(); // tests if default constructor works\n runAllTests(); // run all of the tests\n }",
"public static InterfaceTestSuite isuite()\n {\n InterfaceTestSuite suite = new InterfaceTestSuite(ServiceContextExtCannedBenchmark.class);\n suite.setName(ServiceContextExt.class.getName());\n suite.addFactory(new CannedServiceContextExtTestFactory());\n return suite;\n }",
"public static junit.framework.Test suite() {\n return new JUnit4TestAdapter(ClientsPrepopulatingBaseActionTest.class);\n }",
"@Test\n public void ListFilterer()\n {\n IListFilter mock_filter = Mockito.mock(IListFilter.class);\n\n //When the method accept of the class filter is called with -1 it should return true\n Mockito.when(mock_filter.accept(-1)).thenReturn(false);\n Mockito.when(mock_filter.accept(2)).thenReturn(true);\n Mockito.when(mock_filter.accept(-3)).thenReturn(false);\n Mockito.when(mock_filter.accept(4)).thenReturn(true);\n\n List<Integer> expected = new ArrayList<>();\n\n expected.add(2);\n expected.add(4);\n\n //Object of class to be tested\n ListFilterer testing_listFilterer = new ListFilterer(this.list);\n\n //Return list\n List<Integer> return_list = testing_listFilterer.filter(mock_filter);\n\n //Let's compare the two classes\n assertEquals(expected, return_list);\n\n }",
"protected void setUp() {\n\n }",
"public CustomerTest()\n {\n }",
"public Filter (Filter filter) {\n this.name = filter.name;\n this.type = filter.type;\n this.pred = new FilterPred(filter.pred);\n this.enabled = filter.enabled;\n }",
"public test() {\n\t\tsuper();\n\t}",
"public AuthorityFactoriesTest() {\n }",
"public AcuityTest() {\r\n }",
"protected TestBench() {}",
"public InterceptTest() {}",
"public CacheTest() {\n }",
"public PersonsRepositoryTest() {\n }",
"public PerezosoTest()\n {\n }",
"@Test\n public void testFilterStructure() throws Exception {\n assertEquals(300.0, maxFilter.filter(300.0), .01);\n }",
"protected void setUp()\n {\n }",
"protected void setUp()\n {\n }",
"protected abstract Item createTestItem1();",
"private void setUpFilter() {\n List<Department> departmentsList = departmentService.getAll(0, 10000);\n departments.setItems(departmentsList);\n departments.setItemLabelGenerator(Department::getDepartment_name);\n departments.setValue(departmentsList.get(0));\n category.setItems(\"Consumable\", \"Asset\", \"%\");\n category.setValue(\"%\");\n status.setItems(\"FREE\", \"IN USE\", \"%\");\n status.setValue(\"%\");\n show.addClickListener(click -> updateGrid());\n }",
"@Override\n public void setUp() {\n }",
"public AbstractTestBooleanCollection(String name) {\r\n super(name);\r\n }",
"public SubsetFilter createFilter(Dimension dimension);",
"public static Tester create() {\n\t\treturn new Tester();\n\t}"
] | [
"0.66755044",
"0.63891274",
"0.6217477",
"0.62140304",
"0.6208386",
"0.61577827",
"0.6151893",
"0.61233145",
"0.60609764",
"0.5971523",
"0.59654003",
"0.5951776",
"0.59396726",
"0.5938245",
"0.5917757",
"0.5897674",
"0.5897268",
"0.58800393",
"0.5869819",
"0.5845787",
"0.5840969",
"0.5821348",
"0.58041203",
"0.57767385",
"0.5765454",
"0.57569885",
"0.5739743",
"0.5722926",
"0.5718109",
"0.5715822",
"0.57088566",
"0.56713504",
"0.56625485",
"0.564573",
"0.56445813",
"0.56386024",
"0.5614104",
"0.56041205",
"0.56031245",
"0.56010014",
"0.55974305",
"0.5591284",
"0.5591118",
"0.5575702",
"0.5566596",
"0.5558618",
"0.55574125",
"0.5536973",
"0.55367446",
"0.5529267",
"0.55291855",
"0.55082643",
"0.55046004",
"0.5502392",
"0.54963255",
"0.5489177",
"0.5486914",
"0.5480431",
"0.54794836",
"0.54755604",
"0.547006",
"0.5466422",
"0.5465748",
"0.54656273",
"0.54626894",
"0.5454871",
"0.5450055",
"0.5430482",
"0.5417399",
"0.5408099",
"0.5397259",
"0.53850186",
"0.53820556",
"0.5376428",
"0.53736144",
"0.5372498",
"0.53703713",
"0.5367487",
"0.53654695",
"0.5364681",
"0.5361436",
"0.53586066",
"0.53584504",
"0.5358097",
"0.5345652",
"0.53414863",
"0.5337824",
"0.53358436",
"0.5334622",
"0.53328913",
"0.5330105",
"0.53291583",
"0.5323428",
"0.5323428",
"0.53187895",
"0.53185594",
"0.53150916",
"0.5312806",
"0.5312698",
"0.53086275"
] | 0.822626 | 0 |
Methode qui ajoute dans la Bd une nouvelle commande | int newOrder(OrderBean newOrder); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void command(List<Commande> commandes) {\n\t\t\n\t}",
"public void addCommand(String name,CommandInterface command)\n\t{\t\t\n\t\tthis.listedescommande.put(name, command);\n\t}",
"@Override\n\tpublic void onEndGererCommande()\n\t{\n\t\t\n\t}",
"@Override\r\n\tpublic void notificationVente(CommandeProduc c) {\n\t}",
"@Override\n\tpublic void commande(List<commande> listcommande) {\n\n\t}",
"public void printCommand() {\n System.out.println(\"Cette commande n'est pas supportee\");\n System.out.println(\"Quitter : \\\"quit\\\", Total: \\\"total\\\" , Liste: \\\"list\\\" ou Time: \\\"time\\\"\");\n System.out.println(\"--------\");\n }",
"public void afficher (UneCommande22<Integer> cde){ //POURQUOI CETTE MÉTHODE EST STATIQUE??? LA DEPLACER PE DANS COMMANDE\n\t\t\t\tif(cde.taille()==0) {ClientJava1DateUser.affiche(\"\\n\\t\\t COMMANDE EST VIDE\");\n\t\t\t\t}\n\t\t\t\telse {ClientJava1DateUser.affiche(cde.toString());}\t\n\t\t\t}",
"public AbstractCommandeService() {\r\n\t\t\r\n\t\tsuper();\r\n\t\t\r\n\t\tthis.valideur = new ValideurCommande();\r\n\t\t\r\n\t}",
"public Commande addCommande(Commande commande) {\n return commandeDao.save(commande);\r\n \r\n }",
"public void executeCommand (String name) throws CommandeException\n\t{\n\t\t//System.out.println(\"entrer dans execute\");\n\t\t CommandInterface usercommand = listedescommande.get(name);\n\t if (usercommand == null) {\n\t \t//System.out.println(\"erreur de commande\");\n\t throw new CommandeException(name);\n\t }\n\t usercommand.apply();\n\t //System.out.println(\"passe apres interpretreur\");\n\t}",
"public void addCommand(Object cmd) {\n Message msg = this.handler.obtainMessage(0);\n msg.obj = cmd;\n this.handler.sendMessage(msg);\n }",
"private void ajouterPot (int somme) {\r\n\t\tbanque.ajouter(somme);\r\n\t}",
"public void actionPerformed(ActionEvent arg0) {\n String[] BoutonClick = arg0.getActionCommand().split(\":\");\n // System.out.println(\"buttonClick:\" + BoutonClick[1]);\n String[] Prix = BoutonClick[1].split(\"€\");\n String ProduitChoisi = BoutonClick[0];\n // System.out.println(ProduitChoisi);\n Panier.getListeNomProduit().add(ProduitChoisi);\n Panier.getListePrix().add(BoutonClick[1]);\n this.ajouterProduit(Prix[0].trim());\n \n if (MainBDProgram.debug) {\n System.out.println(\"prix du produit: \" + BoutonClick [1]);\n System.out.println(Panier.getListeNomProduit());\n System.out.println(Panier.getListePrix());\n }\n }",
"public Commande() {\n }",
"public void ajouterChambreDeCommerce(){\n }",
"public static void supprCommande(String NCommande, JTable table) {\n\t\ttry {\n\t\t\tConnection conn = bdconnect.getConnection();\n\t\t\tString sql = \"Delete FROM commande where n_commande='\"+NCommande+\"'\";\n\t java.sql.Statement stmt = conn.createStatement();\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tint RS = stmt.executeUpdate(sql);\n\t\t\tCommandeController.toutAfficher(table);\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t}",
"public void aplicarDescuento();",
"@CommandDescription(name=\"createAluno\", kind=CommandKind.Create, requestPrimitive=\"createAluno\", responsePrimitive=\"createAlunoResponse\")\npublic interface CreateAluno extends MessageHandler {\n \n public Aluno createAluno(Aluno toCreate);\n \n}",
"public void addCommand(Command m);",
"public boolean ajouterCommande(Commande commande) {\n\t\tString query = \"SELECT * FROM commande WHERE code_menu = ? AND id_restaurateur = ? AND id_client= ?\";\n\t\tPreparedStatement st = null;\n\t\tResultSet r = null;\n\t\tboolean exist = false;\n\t\tboolean b = false;\n\t\ttry {\n\t\t\tst = this.Connect.prepareStatement(query);\n\t\t\tst.setInt(1, commande.getCode_menu());\n\t\t\tst.setInt(2, commande.getId_restaurateur());\n\t\t\tst.setInt(3, commande.getId_client());\n\n\t\t\tr = st.executeQuery();\n\t\t\tif (r.next())\n\t\t\t\texist = true;\n\t\t\tst.close();\n\t\t\tr.close();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// pour ajouter de commande\n\t\tif (!exist) {\n\t\t\tquery = \"INSERT INTO commande(id_client, code_menu, id_restaurateur, date, prix) VALUES (?, ?, ?, ?, ?)\";\n\t\t\tst = null;\n\t\t\tint rs = 0;\n\n\t\t\tLocalDate commandeDate = LocalDate.now();\n\t\t\tDateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"[yyyy-MM-dd]\");\n\n\t\t\tjava.util.Date date2 = java.sql.Date.valueOf(LocalDate.parse(\"2021-03-04\", formatter));\n\n\t\t\ttry {\n\n\t\t\t\tst = this.Connect.prepareStatement(query);\n\t\t\t\tst.setInt(1, commande.getId_client());\n\t\t\t\tst.setInt(2, commande.getCode_menu());\n\t\t\t\tst.setInt(3, commande.getId_restaurateur());\n\t\t\t\tst.setDate(4, (Date) date2);\n\t\t\t\tst.setInt(5, commande.getPrix());\n\t\t\t\trs = st.executeUpdate();\n\t\t\t\tst.close();\n\t\t\t\tthis.ajouterCinqPoints(this.getClientById(commande.getId_client()));\n\t\t\t\tb = true;\n\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\treturn b;\n\t}",
"public void lance() {\n\t\tthis.laRequete.ecrireMessage(\"202\",\" Commande Non implementee\"); //502 ou 202?\n\t\tthis.laRequete.ecrireLog(\"Commande Non implementee\");\n\t}",
"public static void main(String[] args) {\n\t\tHamburger cheeseBurger = new Hamburger(\"CheeseBurger\");\r\n\t\tHamburger maxiBurger = new Hamburger(\"MaxiBurger\");\r\n\t\tAccompagnement accompagnement = new Accompagnement(\"Frites\");\r\n\t\tBoisson boissonCoca = new Boisson(\"Coca\");\r\n\t\tBoisson boissonOrange = new Boisson(\"Orange\");\r\n\r\n\t\t// Mise en place de l'environnement\r\n\t\tControlCreerProfil controlCreerProfil = new ControlCreerProfil();\r\n\t\tcontrolCreerProfil.creerProfil(ProfilUtilisateur.PERSONNEL, \"Dupond\", \"Jacques\", \"jdu\");\r\n\r\n\t\t// Connexion du cuisinier\r\n\t\tControlSIdentifier controlSIdentifier = new ControlSIdentifier();\r\n\t\tint numCuisinier = controlSIdentifier.sIdentifier(ProfilUtilisateur.PERSONNEL, \"Jacques.Dupond\", \"jdu\");\r\n\r\n\t\t// Initialisation controleur du cas & cas Inclus/etendu\r\n\t\tControlVerifierIdentification controlVerifierIdentification = new ControlVerifierIdentification();\r\n\t\tcontrolVerifierIdentification.verifierIdentification(ProfilUtilisateur.PERSONNEL, numCuisinier);\r\n\r\n\t\t// cas visualiser commande du jour\r\n\t\tControlVisualiserCommandeJour controlVisualiserCommandeJour = new ControlVisualiserCommandeJour(\r\n\t\t\t\tcontrolVerifierIdentification);\r\n\t\tBoundaryVisualiserCommandeJour boundaryVisualiserCommandeJour = new BoundaryVisualiserCommandeJour(\r\n\t\t\t\tcontrolVisualiserCommandeJour);\r\n\t\tboundaryVisualiserCommandeJour.visualiserCommandeJour(numCuisinier);\r\n\r\n\t\ttry {\r\n\t\t\tThread.sleep(1500);\r\n\t\t\tSystem.out.println(\"Ecriture des commandes dans le fichier\");\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t// extrait cas commander\r\n\t\tBDCommande bdCommande = BDCommande.getInstance();\r\n\t\tbdCommande.enregistrerCommande(1, cheeseBurger, accompagnement, boissonCoca);\r\n\t\tbdCommande.enregistrerCommande(1, maxiBurger, accompagnement, boissonOrange);\r\n\r\n\t\t// Ecriture des commandes dans le fichier\r\n\t\t// Commande n°1 : CheeseBurger, Frites, Coca\r\n\t\t// Commande n°2 : MaxiBurger, Frites, Orange\r\n\t}",
"@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}",
"@Override\n\t\t\tpublic void ajouter(Catalogue catalogue) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tpublic boolean add(Commande pCommande) {\n\n\t\ttry {\n\t\t\tps = this.connection.prepareStatement(\"INSERT INTO commandes (date_commande, client_id) VALUES (?,?)\");\n\n\t\t\tps.setDate(1, pCommande.getDateCommande());\n\t\t\tps.setInt(2, pCommande.getClientID());\n\n\t\t\tint verif = ps.executeUpdate();\n\n\t\t\treturn (verif == 1);\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"...(CommandeDAOImpl) erreur de l'execution de add()...\");\n\t\t\te.printStackTrace();\n\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tps.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} // end finally\n\n\t\treturn false;\n\n\t}",
"public LigneCommande() {\n initComponents();\n }",
"public Command(){\n \n comando.put(\"!addGroup\", 1);\n comando.put(\"!addUser\", 2);\n comando.put(\"!delFromGroup\", 3);\n comando.put(\"!removeGroup\", 4);\n comando.put(\"!upload\", 5);\n comando.put(\"!listUsers\",6);\n comando.put(\"!listGroups\",7);\n\n }",
"protected void commandeMiseAJourFamilleJoueur(String pCommande)\n {\n String nomJoueur = pCommande.split(\";\")[1];\n String nomFamille= pCommande.split(\";\")[2];\n JoueurClient joueurClient = this.getAversaireParNom(nomJoueur);\n Famille famille = riskGOTFamilles.getFamilleParNom(nomFamille);\n joueurClient.setMaFamille(famille);\n Platform.runLater(() -> this.mainView.refreshFamilleJoueur(famille, joueurClient));\n\n }",
"public void setCommand(String command){\r\n commandUpdate=command;\r\n }",
"public void setCommand(String command) {\n this.command = command;\n }",
"IDbCommand createCommand();",
"Commands getCommandes();",
"public abstract void setCommand(String cmd);",
"public void sendCommand(Command cmd);",
"@Override\n\tpublic void onCommand(CommandSender sender, String[] args) {\n\t\t\n\t}",
"@Override\n\tpublic void onCommand(CommandSender sender, String[] args) {\n\t\t\n\t}",
"@Override\n\tpublic void setCommand(String cmd) {\n\t\t\n\t}",
"public CommandMAN() {\n super();\n }",
"@Remote\npublic interface PasseUneCommande {\n\n public Commande passeUneCommande(Double prixHT,String rendezvous,String cookies);\n\n public List<String> choisirCookies();\n\n public List<Commande> getCommandes();\n\n\n}",
"@CommandDescription(name=\"retrieveProduto\", kind=CommandKind.Retrieve, requestPrimitive=\"retrieveProduto\", responsePrimitive=\"retrieveProdutoResponse\")\npublic interface RetrieveProduto extends MessageHandler {\n \n public Produto retrieveProduto(Produto.Id id);\n \n}",
"private void ajouterParametre() {\n FenetreAjouterParametre fenetreAjouterParametre = new FenetreAjouterParametre();\n fenetreAjouterParametre.showAndWait();\n if (fenetreAjouterParametre.getParametre() == null) return;\n parametreListView.getItems().add(fenetreAjouterParametre.getParametre());\n }",
"@Override\n public void addCommand(CommandConfig command) {\n }",
"public void onConnect(){\n\t\t String jsonstring = \"{'command': 'addUser','name': '\"+name+\"'}\";\n\t\t this.send(jsonstring);\n\t}",
"Commands createCommands();",
"public void ajouterNouveauMenu(int idLigneprecedente, Menu nouveauMenu);",
"public void joindreGroupe(int g_id) throws RemoteException{\r\n\t\t\t\r\n\t\t String requete = \"INSERT INTO demande VALUES(DEFAULT, \"+ g_id +\", \"+ _etudiant.getId() +\" )\";\r\n\t\t System.out.println(\"\\nrequete joindreGroupe: \" + requete);\r\n\t\t database.executeUpdate(requete);\t\r\n\t\t \r\n\t\t}",
"public void performTambah() {\n\n dialogEntry.postInit();\n dialogEntry.clearFields();\n dialogEntry.setRowToBeEdited(-1);\n //dialogEntry.clearFields ();\n dialogEntry.show(true); // -- modal dialog ya, jd harus menunggu..\n //if (isDirty()) {\n loadTable();\n // TODO : select last item added\n //}\n }",
"void autofinanciarPoliza(AutofinanciarPolizaCancelCommand datosPoliza);",
"public String getCommand(){\r\n return commandUpdate;\r\n }",
"Command createCommand();",
"@Override\r\n public void execute(Command command) {\n\r\n }",
"public void sendCommand(String command){\n sendCommand(command, true);\n fromPlugin = false;\n\n }",
"public abstract CommandResponse onCommand(CommandSender sender, String label, String[] args);",
"public synchronized void ajoutDemande(int pid)\r\n {\r\n demandesAccesSC.add(pid);\r\n\r\n if (demandesAccesSC.size() == 1)\r\n {\r\n notifyAll();\r\n }\r\n }",
"private void comboCarrega() {\n\n try {\n con = BancoDeDados.getConexao();\n //cria a string para inserir no banco\n String query = \"SELECT * FROM servico\";\n\n PreparedStatement cmd;\n cmd = con.prepareStatement(query);\n ResultSet rs;\n\n rs = cmd.executeQuery();\n\n while (rs.next()) {\n JCservico.addItem(rs.getString(\"id\") + \"-\" + rs.getString(\"modalidade\"));\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro de SQL \" + ex.getMessage());\n }\n }",
"public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }",
"public void ventaBilleteMaquina1()\n {\n maquina1.insertMoney(500);\n maquina1.printTicket();\n }",
"@Override\n public void initDefaultCommand() \n {\n }",
"public void afficherMessage () {\r\n System.out.println(\"(\"+valeur+\", \"+type+\")\"); \r\n }",
"private InfoCommand()\n\t{\n\t\t\n\t\t\n\t}",
"public interface CommManagerInterface {\r\n\r\n /**\r\n * 执行comm命令\r\n */\r\n public String comm(List<String> paramerList);\r\n}",
"public String ajouterClient(){\n\t\tClient cAjout=cliService.ajouterClient(client);\r\n\t\t\r\n\t\tif(cAjout.getIdClient()!=0){\r\n\t\r\n\t\r\n\t\t\t\r\n\t\t\treturn \"accueilClient\";\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\t\tnew FacesMessage(\"L'ajout a échoué\"));\r\n\t\t\treturn \"creationClient\";\r\n\t\t}\r\n\t}",
"public void realiserAcahatProduit() {\n\t\t\n\t}",
"@Override\n public void initDefaultCommand() {\n\n }",
"@Override\n\tvoid postarComentario() {\n\n\t}",
"public void setCommand(String command)\n {\n this.command = command;\n }",
"Command(String c, String id) {\n commandWord = c;\n pageId = id;\n\n pageValue = -1;\n }",
"private void creerMethode() {\n if (estValide()) {\n methode = new Methode();\n methode.setNom(textFieldNom.getText());\n methode.setVisibilite(comboBoxVisibilite.getValue());\n methode.setType(comboBoxType.getValue());\n ArrayList<Parametre> temp = new ArrayList<>();\n for (Parametre parametre : parametreListView.getItems())\n temp.add(parametre);\n methode.setParametres(temp);\n close();\n }\n }",
"public abstract String getCommand();",
"public void buscarGestor(){\r\n\t\t\r\n\t}",
"public void annulerDemande (int idGroupe) throws RemoteException {\r\n\t\t\t\r\n\t\t String requete = \"delete from demande where d_idGroupe = \" + idGroupe + \" and d_idEtudiant = \" + \r\n\t\t \t\t\t\t _etudiant.getId(); \r\n\t\t System.out.println(\"requete annulerDemande : \" + requete);\r\n\t\t database.executeUpdate(requete);\r\n\t\t \r\n\t\t}",
"public void nouveauMessage(String message, Integer groupe) throws RemoteException;",
"public interface CommandInterface {\n\n\tpublic static class Commands\n\t{\n\t\tpublic static final String ABORT = \"ABOR\";\n\t\tpublic static final String ACCOUNT_INFO = \"ACCT\";\n\t\tpublic static final String AUTHENTICATION_DATA = \"ADAT\";\n\t\tpublic static final String ALLOCATE_DISK_SPACE = \"ALLO\";\n\t\tpublic static final String APPEND = \"APPE\";\n\t\tpublic static final String AUTHENTICATION_MECHANISM = \"AUTH\";\n\t\tpublic static final String GET_AVAILABLE_SPACE = \"AVBL\";\n\t\tpublic static final String CLEAR_COMMAND_CHANNEL = \"CCC\";\n\t\tpublic static final String CHANGE_TO_PARENT_DIRECTORY = \"CDUP\";\n\t\tpublic static final String CONFIDENTIALITY_PROTECTION_COMMAND = \"CONF\";\n\t\tpublic static final String SERVER_IDENTIFICATION = \"CSID\";\n\t\tpublic static final String CHANGE_WORKING_DIRECTORY = \"CWD\";\n\t\tpublic static final String DELETE_FILE = \"DELE\";\n\t\tpublic static final String GET_DIRECTORY_SIZE = \"DSIZ\";\n\t\tpublic static final String PRIVACY_PROTECTED = \"ENC\";\n\t\tpublic static final String SPECIFY_ADDRESS_AND_PORT = \"EPRT\";\n\t\tpublic static final String ENTER_EXTENDED_PASSIVE_MODE = \"EPSV\";\n\t\tpublic static final String GET_FEATURE_LIST = \"FEAT\";\n\t\tpublic static final String HELP = \"HELP\";\n\t\tpublic static final String GET_HOST_BY_NAME = \"HOST\";\n\t\tpublic static final String LANGUAGE_NEGOTIATION = \"LANG\";\n\t\tpublic static final String GET_FILES_LIST = \"LIST\";\n\t\tpublic static final String SPECIFY_LONGADDRESS_AND_PORT = \"LPRT\";\n\t\tpublic static final String ENTER_LONG_PASSIVE_MODE = \"LPSV\";\n\t\tpublic static final String GET_LAST_MODIFICATION_TIME = \"MDTM\";\n\t\tpublic static final String MODIFY_CREATION_TIME = \"MFCT\";\n\t\tpublic static final String MODIFY_FACT = \"MFF\";\n\t\tpublic static final String MODIFY_MODYFICATION_TIME = \"MFMT\";\n\t\tpublic static final String INTEGRITY_PROTECTION = \"MIC\";\n\t\tpublic static final String MAKE_DIRECTORY = \"MKD\";\n\t\tpublic static final String LIST_A_CONTENT = \"MLSD\";\n\t\tpublic static final String PROVIDES_DATA = \"MLST\";\n\t\tpublic static final String SET_TRANSFER_MODE = \"MODE\";\n\t\tpublic static final String LIST_OF_FILE_NAMES = \"NLST\";\n\t\tpublic static final String NO_OPERATION = \"NOOP\";\n\t\tpublic static final String SELECT_OPTIONS = \"OPTS\";\n\t\tpublic static final String AUTHENTICATION_PASSWORD = \"PASS\";\n\t\tpublic static final String ENTER_PASSIVE_MODE = \"PASV\";\n\t\tpublic static final String PROTECTION_BUFFER_SIZE = \"PBSZ\";\n\t\tpublic static final String SPECIFY_PORT = \"PORT\";\n\t\tpublic static final String DATA_CHANNEL_PROTECTION_LEVEL = \"PROT\";\n\t\tpublic static final String PRINT_WORKING_DIRECTORY = \"PWD\";\n\t\tpublic static final String DISCONNECT = \"QUIT\";\n\t\tpublic static final String REINITIALIZE = \"REIN\";\n\t\tpublic static final String RESTART = \"REST\";\n\t\tpublic static final String RETRIEVE_A_COPY = \"RETR\";\n\t\tpublic static final String REMOVE_DIRECTORY = \"RMD\";\n\t\tpublic static final String REMOVE_DIRECTORY_TREE = \"RMDA\";\n\t\tpublic static final String RENAME_FROM = \"RNFR\";\n\t\tpublic static final String RENAME_TO = \"RNTO\";\n\t\tpublic static final String SITE_SPECIFFIC_COMMAND = \"SITE\";\n\t\tpublic static final String SIZE_OF_FILE = \"SIZE\";\n\t\tpublic static final String MOUNT_FILE_STRUCTURE = \"SMNT\";\n\t\tpublic static final String USE_SINGLE_PORT_PASSIVE_MODE = \"SPSV\";\n\t\tpublic static final String GET_STATUS = \"STAT\";\n\t\tpublic static final String ACCEPT_AND_STORE = \"STOR\";\n\t\tpublic static final String STORE_FILE_UNIQUELY = \"STOU\";\n\t\tpublic static final String SET_FILE_TRANSFER_STRUCT = \"STRU\";\n\t\tpublic static final String GET_SYSTEM_TYPE = \"SYST\";\n\t\tpublic static final String GET_THUMBNAIL = \"THMB\";\n\t\tpublic static final String SET_TRANSFER_TYPE = \"TYPE\";\n\t\tpublic static final String AUTHENTICATION_USERNAME = \"USER\";\n\t}\n\t\n\t/**\n\t * Types of transmission.\n\t * @author P.Gajewski\n\t *\n\t */\n\tpublic static class TransmissionTypes\n\t{\n\t\tpublic static final String BINARY = \"I\";\n\t\tpublic static final String ASCII = \"A\";\n\t}\n\n\t/**\n\t * Inner class for responses from server.\n\t * @author P.Gajewski\n\t *\n\t */\n\tpublic static class ServerResonses\n\t{\n\t\t/**\n\t\t * 1xx replay codes.\n\t\t * @author P.Gajewski\n\t\t *\n\t\t */\n\t\tpublic static class PossitivePreliminaryReply\n\t\t{\n\t\t\tpublic static final String GENERAL = \"100\";\n\t\t\tpublic static final String RESTART_REPLY = \"110\";\n\t\t\tpublic static final String SERVICE_READY = \"120\";\t\n\t\t\tpublic static final String DATA_CONNECTION_ALREADY_OPENED = \"125\";\n\t\t\tpublic static final String FILE_STATUS_OKAY = \"150\";\n\t\t}\n\t\t\n\t\t/**\n\t\t * 2xx replay codes.\n\t\t * @author P.Gajewski\n\t\t *\n\t\t */\n\t\tpublic static class PossitiveCompletionReply\n\t\t{\n\t\t\tpublic static final String GENERAL = \"200\";\n\t\t\tpublic static final String SYSTEM_STATUS = \"211\";\n\t\t\tpublic static final String DIRECTORY_STATUS = \"212\";\n\t\t\tpublic static final String FILE_STATUS = \"213\";\n\t\t\tpublic static final String HELP_MESSAGE = \"214\";\n\t\t\tpublic static final String NAME_SYSTEM_TYPE = \"215\";\n\t\t\tpublic static final String READY_FOR_NEW_USER = \"220\";\n\t\t\tpublic static final String SERVICE_CLOSING_CONTROL_CONNECTION = \"221\";\n\t\t\tpublic static final String OPEN_DATA_CONNECTION = \"225\";\t\t\t\n\t\t\tpublic static final String CLOSING_DATA_CONNECTION = \"226\";\n\t\t\tpublic static final String PASSIVE_MODE = \"227\";\n\t\t\tpublic static final String LONG_PASSIVE_MODE = \"228\";\n\t\t\tpublic static final String EXTENDED_PASSIVE_MODE = \"229\";\n\t\t\tpublic static final String USER_LOG_IN = \"230\";\n\t\t\tpublic static final String USER_LOG_OUT = \"231\";\n\t\t\tpublic static final String LOGOUT_NOTED = \"232\";\n\t\t\tpublic static final String REQUESTED_OK = \"250\";\n\t\t\tpublic static final String PATHNAME_CREATED = \"257\";\t\t\t\n\t\t}\n\t\t\n\t\t/**\n\t\t * 3xx replay codes.\n\t\t * @author P.Gajewski\n\t\t *\n\t\t */\n\t\tpublic static class PositiveIntermediateReply\n\t\t{\n\t\t\tpublic static final String GENERAL = \"300\";\n\t\t\tpublic static final String USERNAME_OK_PASSWORD_NEEDED = \"331\";\n\t\t\tpublic static final String NEED_ACCOUNT_FOR_LOGIN = \"332\";\n\t\t\tpublic static final String REQUESTED_FILE_ACTION = \"350\";\n\t\t}\n\t\t\n\t\t/**\n\t\t * 4xx replay codes.\n\t\t * @author P.Gajewski\n\t\t *\n\t\t */\n\t\tpublic static class TransientNegativeCompletionReply\n\t\t{\n\t\t\tpublic static final String GENERAL = \"400\";\n\t\t\tpublic static final String SERVICE_NOT_AVAILABLE = \"421\";\n\t\t\tpublic static final String CANT_OPEN_DATA_CONNECTION = \"425\";\n\t\t\tpublic static final String CONNECTION_CLOSED = \"426\";\n\t\t\tpublic static final String INVALID_USERNAME_OR_PASSWORD = \"430\";\n\t\t\tpublic static final String REQUESTED_HOST_UNAVAILABLE = \"434\";\n\t\t\tpublic static final String REQUESTED_FILE_ACTION_NOT_TAKEN = \"450\";\n\t\t\tpublic static final String LOCAL_ERROR = \"451\";\n\t\t\tpublic static final String FILE_BUSY = \"452\";\t\n\t\t}\n\t\t\n\t\t/**\n\t\t * 5xx replay codes.\n\t\t * @author P.Gajewski\n\t\t *\n\t\t */\n\t\tpublic static class PermamentNegativeCompletionReply\n\t\t{\n\t\t\tpublic static final String GENERAL = \"500\";\n\t\t\tpublic static final String SYNTAX_ERROR = \"501\";\n\t\t\tpublic static final String COMMAND_NOT_IMPLEMENTED = \"502\";\n\t\t\tpublic static final String BAD_SEQUENCE_OF_COMMANDS = \"503\";\n\t\t\tpublic static final String COMMAND_NOT_IMPLEMENTED_FOR_THAT_PARAMETER = \"504\";\n\t\t\tpublic static final String NOT_LOGGED_IN = \"530\";\n\t\t\tpublic static final String NEED_ACCOUNT_FOR_STORING_FILES = \"532\";\n\t\t\tpublic static final String POLICY_REQUIRES_SSL = \"534\";\n\t\t\tpublic static final String FILE_NOT_FOUND = \"550\";\n\t\t\tpublic static final String PAGE_TYPE_UNKNOWN = \"551\";\t\t\t\n\t\t\tpublic static final String EXCEEDED_STORAGE_ALLOCATION = \"552\";\n\t\t\tpublic static final String FILE_NAME_NOT_ALLOWED = \"553\";\t\t\n\t\t}\n\t\t\n\t\t/**\n\t\t * 6xx replay codes.\n\t\t * @author P.Gajewski\n\t\t *\n\t\t */\n\t\tpublic static class ProtectedReply\n\t\t{\n\t\t\tpublic static final String GENERAL = \"600\";\n\t\t\tpublic static final String INTEGRITY_PROTECTED_REPLY = \"631\";\n\t\t\tpublic static final String CONFIDENTIALITY_AND_INTEGRITY_PROTECTED_REPLY = \"632\";\t\t\t\n\t\t\tpublic static final String CONFIDENTIALITY_PROTECTED_REPLY = \"633\";\t\t\t\n\t\t}\n\t}\n\t\n\t/**\n\t * Language controller.\n\t */\n\tpublic final static LanguageController lc = LanguageController.getInstance();\n\t\n\tpublic void execute(FTPLexer lexer);\n}",
"void addEntry(byte command, int row_index) {\r\n addCommand(command);\r\n addParameter(row_index);\r\n }",
"private void ajoutAffichage(int choix) {\n switch(choix) {\n case AFFICHE_SPOOL :\n ecranSpool.createContents();\n afficheChoix = AFFICHE_SPOOL;\n mntmSpoolUsage.setEnabled(false);\n mntmUser.setEnabled(true);\n mntmConfig.setEnabled(true);\n shell.layout();\n break;\n case AFFICHE_USER :\n ecranUser.createContents();\n afficheChoix = AFFICHE_USER;\n mntmSpoolUsage.setEnabled(true);\n mntmUser.setEnabled(false);\n mntmConfig.setEnabled(true);\n shell.layout();\n break;\n case AFFICHE_CONFIG :\n ecranConfig.createContents();\n afficheChoix = AFFICHE_CONFIG;\n mntmSpoolUsage.setEnabled(true);\n mntmUser.setEnabled(true);\n mntmConfig.setEnabled(false);\n shell.layout();\n break;\n default: break;\n }\n }",
"java.lang.String getCommand();",
"public void ajouterProduit(int idPanier, int idProduit) throws SQLException, RemoteException {\n\t\tConnection c = MysqlDbConnection.getConnection();\n\t\tStatement stmt = null;\n\t\tString sql = \"insert into constituer (`idPanier`, `idProduit`, `quantiteProduit`) values (\"+idPanier+\", \"+idProduit+\", \"+1+\")\";\n\t\tstmt = c.createStatement();\n\t\tstmt.executeUpdate(sql);\t\n\t\tstmt.close();\n\t\tc.close();\n\t}",
"public void enviarValoresCabecera(){\n }",
"public static void helpCommand(){\n\n System.out.println(\"--------list of controls-------\");\n System.out.println(\"'help' : display the list of control\");\n System.out.println(\"'exit' : for quit the app /n\");\n System.out.println(\"'adduser' : you can add user with this command,<fistname>,<lastname>,<country>,<departement>,<age>\");\n System.out.println(\"'edituser' : you can edit an user with this command, <firstname>,<lastname>\");\n System.out.println(\"'removeuser' : you can remove an user with this command, <firstanme>,<lastname>\");\n System.out.println(\"'listusers' : display all of users\");\n System.out.println(\"'addcar' : add a car to the list, <brand>,<model>,<ref>,<year>\");\n System.out.println(\"'editcar' : use this command for edit a car, <ref>\");\n System.out.println(\"'removecar' : use this command for remove a car\");\n System.out.println(\"'listcars' : display all the cars\");\n System.out.println(\"'rentcar' : command for rent a car\");\n System.out.println(\"'returncar' : command for return a car\");\n System.out.println(\"'listrent' : display the list of rents\");\n System.out.println(\"'saveusers' : use this command for save your users file\");\n System.out.println(\"'restoreusers' : use this command open your save users file\");\n System.out.println(\"'serialusers' : use this command serialize object users\");\n System.out.println(\"'saverents' : use this command save the list of rents in file\");\n System.out.println(\"'loadrents' : use this command load the list from file\");\n System.out.println(\"'savecars' : use this command for save the list of cars in a file\");\n System.out.println(\"'loadcars' : use this command for import the list from file \");\n System.out.println(\"'saveall' : use this command for save all the list in a file\");\n System.out.println(\"'loadall' : use this command for import all the list from file\");\n System.out.println(\"----------------------------------\");\n\n }",
"public FiltroRaEncerramentoComando() {\r\n }",
"void legalCommand();",
"public static void CCommand(String name) {\n Person tempPerson = new Person(name);\n if (Interface.persons.contains(Interface.persons, tempPerson)) {\n System.out.println(\"Error: A name only can exists for a person. Either delete the existing person or create a person with different name.\");\n return;\n }\n Interface.persons = Interface.persons.add(Interface.persons, tempPerson);\n System.out.println(name + \" has been added.\");\n }",
"public void initDefaultCommand() \n {\n }",
"public static void ajoutFacture() {\r\n Scanner myObj = new Scanner(System.in);\r\n int numeroFacture = Facture.nouvelleFacture();\r\n System.out.println(\"Création de la facture \" + numeroFacture);\r\n // création d'un boucle pour ajouter autant de produits souhaités à la même facture\r\n boolean continuer = true;\r\n do {\r\n System.out.print(\"Entrez le nom du produit à ajouter ................... \");\r\n String nomProduit = myObj.nextLine();\r\n // vérification que le produit soit dans le catalogue\r\n int indice = Catalogue.chercher(nomProduit);\r\n if(indice == -1) {\r\n System.out.println(\"Le produit demandé n'est pas dans le catalogue\");\r\n } else {\r\n //System.out.println(\"Vous avez choisi le produit \" + Catalogue.getNom(indice));\r\n System.out.print(\"Quelle quantité acheter ? ............................ \");\r\n int quantite = checkInt();\r\n Facture.ajouterProduit(numeroFacture,indice,quantite);\r\n }\r\n System.out.print(\"Souhaitez-vous ajouter un autre produit ? Y/N ........ \");\r\n String choix = myObj.nextLine();\r\n choix = choix.toUpperCase();\r\n if(!choix.equals(\"Y\")) continuer = false;\r\n }while(continuer);\r\n System.out.println(\"Facture \" + numeroFacture + \" ajoutée. FIN\");\r\n }",
"String getCommand();",
"public void initDefaultCommand() {\n \n }",
"@Command\n\tpublic void buscar() {\n\t}",
"public void sendCommFromPlugin(String command){\n\n sendCommand(command, true);\n this.fromPlugin = true;\n }",
"@Override\n\tpublic void onMessage(CommandMessage msg) {\n\t}",
"public ModifyVirtualMachine(){\r\n\t\t super(COMMAND);\r\n\t}",
"public boolean ajouterCompte(String nom, String prenom, String mdp, String email, String numrue, String codeP, String ville);",
"@Override\n public void addPostCommand(String postCommand) {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"private void registerCommands() {\n }",
"@Override\r\n\tpublic LigneCommande addLigneCommandePanier(LigneCommande lc, Commande co) {\r\n\t\tlc.setAttCommande(co);\r\n\t\treturn LigneCommandeDao.addLigneCommandePanier(lc);\r\n\t}",
"public void addCommand(CommandIF command) {\r\n\t\tmelody.add(command);\r\n\t}",
"private Command createUserCommand(Command command) {\n int count = command.getParameters().get(0).getParameters().size();\n var param = new ListBody();\n while(count > 0) {\n param.addParameter(getCommandTree());\n count--;\n }\n command.addParameter(param);\n return command;\n }",
"@Override\n\tpublic void nuevo() {\n\n\t}",
"@Override\r\n public String doCommand(String... parametry) {\n if (parametry.length > 0) {\r\n return \"Show what? I don't understand, why there's another word after this command.\";\r\n }\r\n else {\r\n return this.plan.getCurrentRoom().listingOfExits();\r\n }\r\n }",
"public ComentPregunta addComentario(String c, Pregunta p, Usuario autor);",
"@Override\r\n\tprotected void initDefaultCommand() {\n\t\t\r\n\t}"
] | [
"0.7444889",
"0.7091724",
"0.68559337",
"0.6636553",
"0.66226447",
"0.6343489",
"0.6232139",
"0.6169171",
"0.6128875",
"0.60963476",
"0.6042103",
"0.6022658",
"0.6007365",
"0.59711397",
"0.5969678",
"0.59238565",
"0.5876196",
"0.58559805",
"0.58537996",
"0.58475363",
"0.5840247",
"0.5834917",
"0.5828629",
"0.5805045",
"0.5802931",
"0.5786694",
"0.5776086",
"0.5768137",
"0.57117903",
"0.56920534",
"0.568367",
"0.5672612",
"0.5666671",
"0.5666639",
"0.56588405",
"0.56588405",
"0.5629867",
"0.56218046",
"0.5600395",
"0.5597586",
"0.559714",
"0.55888814",
"0.55874467",
"0.55674064",
"0.55617595",
"0.5556923",
"0.5547684",
"0.5541431",
"0.5539228",
"0.5530592",
"0.55264366",
"0.55212706",
"0.55182487",
"0.5517249",
"0.5498975",
"0.54945207",
"0.54929686",
"0.54803133",
"0.54785895",
"0.5475439",
"0.5474634",
"0.5470586",
"0.5468847",
"0.54669833",
"0.54644674",
"0.54539984",
"0.5452365",
"0.5447599",
"0.54472476",
"0.54461104",
"0.544362",
"0.54371023",
"0.54347825",
"0.5433848",
"0.5431812",
"0.54280585",
"0.542723",
"0.54192495",
"0.5416951",
"0.54162645",
"0.5414987",
"0.54115427",
"0.54091585",
"0.5407278",
"0.5403563",
"0.54029804",
"0.54003185",
"0.5398376",
"0.53935015",
"0.53931063",
"0.5386924",
"0.53864604",
"0.53843856",
"0.5380064",
"0.5370191",
"0.5369041",
"0.53674895",
"0.53640366",
"0.5363992",
"0.53611255",
"0.53448814"
] | 0.0 | -1 |
Methode qui va setter le code de confirmation qui a ete genere et stocke dans le orderBean une fois que tous les items ont ete crees et lies a la commande. | boolean setConfirmationCode(OrderBean orderToUpdate); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String confirmOrder(int oid, int code) {\n \n\t\tOrder order = orderRepo.findById(oid).get();\n\t\tUser user = order.getUser();\n\t\t\n\t\tSystem.out.println(\"code at conifrmOdrer \"+user.getVerficationCode()+\" matches with int code \"+code);\n\t\tif (user.getVerficationCode() == code) {\n\t\t\tfor (Cart c : user.getCart()) {\n\t\t\t\tcartRepo.delete(c);\n\t\t\t}\n\t\t\tuser.getCart().clear();\n\t\t\torder.setPaymentStatus(\"Success\");\n\t\t\temailService.sendConfirmationMail(user, oid); //Order Information sent to Email.\n\t\t\treturn \"Order successfull\";\n\t\t} else {\n\t\t\torder.setPaymentStatus(\"Failed\");\n\t\t\tfor (Cart c : user.getCart()) {\n\t\t\t\tc.getProduct().setStock(c.getProduct().getStock()+c.getQuantity());\n\t\t\t}\t\t\t\n\t\t\treturn \"Order not successfull\";\n\t\t }\n\t\t\n\t\t\n\n\t}",
"@Override\n\tpublic void confirmOrders() {\n\t\t\n\t}",
"@Override\n\tpublic void confirmOrders() {\n\t\t\n\t}",
"@Override\n\tpublic void confirmOrders() {\n\t\t\n\t}",
"public void agregarDatosCliente(Integer codCliente){\n try{\n ClienteDao clienteDao = new ClienteDaoImp();\n //obtenemos la instancia de Cliente en Base a su codigo\n this.cliente = clienteDao.obtenerClientePorCodigo(codCliente);\n //Mensaje de confirmacion de exito de la operacion\n FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO,\"Correcto\", \"Cliente agregado correctamente!\");\n FacesContext.getCurrentInstance().addMessage(null, message);\n }catch(Exception e){\n e.printStackTrace();\n }\n \n }",
"public OrderType getCodeOrderType() {\nreturn this.codeOrderType;\n}",
"public void setCodigo(String codigo) {\n this.codigo = codigo;\n }",
"@Override\n public void execute(ProcessBundle bundle) throws Exception {\n HttpServletRequest request = RequestContext.get().getRequest();\n VariablesSecureApp vars = new VariablesSecureApp(request);\n\n try {\n OBContext.setAdminMode();\n // Variable declaration\n // Variable declaration\n String proposalId = null;\n String proposalattrId = null;\n if (bundle.getParams().get(\"Escm_Proposalmgmt_ID\") != null) {\n proposalId = bundle.getParams().get(\"Escm_Proposalmgmt_ID\").toString();\n }\n if (bundle.getParams().get(\"Escm_Proposal_Attr_ID\") != null) {\n proposalattrId = bundle.getParams().get(\"Escm_Proposal_Attr_ID\").toString();\n EscmProposalAttribute proposalAttr = OBDal.getInstance().get(EscmProposalAttribute.class,\n proposalattrId);\n proposalId = proposalAttr.getEscmProposalmgmt().getId();\n }\n EscmProposalMgmt proposalmgmt = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n final String clientId = bundle.getContext().getClient();\n final String orgId = proposalmgmt.getOrganization().getId();\n final String userId = bundle.getContext().getUser();\n User user = OBDal.getInstance().get(User.class, userId);\n String purchaseOrderType = \"PUR\";\n List<EscmPurchaseOrderConfiguration> config = new ArrayList<EscmPurchaseOrderConfiguration>();\n List<Location> bploclist = new ArrayList<Location>();\n List<Warehouse> warehouselist = new ArrayList<Warehouse>();\n List<PriceList> priceListlist = new ArrayList<PriceList>();\n List<PaymentTerm> paymentTermList = new ArrayList<PaymentTerm>();\n Location bplocation = null;\n String yearId = null, transdoctypeId = null;\n SimpleDateFormat d1 = new SimpleDateFormat(\"dd-MM-yyyy\");\n Warehouse warehouse = null;\n PriceList priceList = null;\n PaymentTerm paymentTerm = null;\n String startingDate = \"\", budgetReferenceId = null;\n\n String motContactPerson = \"\";\n String motContactPosition = \"\";\n String description = null;\n String alertWindow = sa.elm.ob.scm.util.AlertWindow.contractUser;\n String windowId = \"2ADDCB0DD2BF4F6DB13B21BBCCC3038C\";\n NextRoleByRuleVO nextApproval = null;\n\n ProposalManagementProcessDAO proposalDAO = new ProposalManagementProcessDAOImpl();\n // get the connection\n Connection conn = OBDal.getInstance().getConnection();\n\n boolean isMinProposalApproved = false;\n if (proposalmgmt.getProposalstatus().equals(\"PAWD\")) {\n isMinProposalApproved = proposalDAO.isMinProposalApproved(proposalmgmt);\n }\n\n if ((proposalmgmt.getProposalappstatus().equals(\"APP\")\n && proposalmgmt.getProposalstatus().equals(\"AWD\"))\n || (proposalmgmt.getProposalstatus().equals(\"PAWD\")\n && (isMinProposalApproved || proposalmgmt.getProposalappstatus().equals(\"APP\")))) {\n\n // based on configuration minvalue , getting purchase order type is purchase order /contract\n if (proposalmgmt.getProposalstatus().equals(\"PAWD\")) {\n config = proposalDAO.getPOTypeBasedOnValue(orgId, proposalmgmt.getAwardamount());\n } else {\n config = proposalDAO.getPOTypeBasedOnValue(orgId, proposalmgmt.getTotalamount());\n }\n\n if (config.size() > 0) {\n purchaseOrderType = config.get(0).getOrdertype();\n\n // Setting mot contact person and position\n\n EscmPurchaseOrderConfiguration configuration = config.get(0);\n motContactPosition = configuration.getMOTContactPosition();\n motContactPerson = configuration.getMOTContactPerson() != null\n ? configuration.getMOTContactPerson().getName()\n : null;\n\n } else {\n\n // Setting mot contact person and position\n\n EscmPurchaseOrderConfiguration configuration = PurchaseAgreementCalloutDAO\n .checkDocTypeConfig(OBContext.getOBContext().getCurrentClient().getId(),\n proposalmgmt.getOrganization().getId(), purchaseOrderType);\n\n motContactPosition = configuration.getMOTContactPosition();\n motContactPerson = configuration.getMOTContactPerson() != null\n ? configuration.getMOTContactPerson().getName()\n : null;\n\n }\n\n // Throw error if contract category is inactive\n if (proposalmgmt != null && proposalmgmt.getContractType() != null\n && !proposalmgmt.getContractType().isActive()) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@Escm_ContractCategoryInactive@\");\n bundle.setResult(result);\n return;\n }\n\n startingDate = proposalDAO.getPeriodStartDate(clientId);\n budgetReferenceId = proposalDAO.getBudgetFromPeriod(clientId, startingDate);\n if (\"\".equals(budgetReferenceId)) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@Efin_Budget_Init_Mandatory@\");\n bundle.setResult(result);\n return;\n }\n if (budgetReferenceId != null) {\n if (!proposalmgmt.getEfinBudgetinitial().getId().equals(budgetReferenceId)) {\n // OBError result = OBErrorBuilder.buildMessage(null, \"error\", \"@Escm_YearClosed_Err@\");\n // bundle.setResult(result);\n // return;\n }\n }\n\n // fetching finacial year\n yearId = proposalDAO.getFinancialYear(clientId);\n if (\"\".equals(yearId)) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@ESCM_FinancialYear_NotDefine@\");\n bundle.setResult(result);\n return;\n }\n\n // fetching warehouse\n warehouselist = proposalDAO.getWarehouse(proposalmgmt.getClient().getId());\n if (warehouselist.size() > 0) {\n warehouse = warehouselist.get(0);\n } else {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", \"@ESCM_Warehouse_NotDefine@\");\n bundle.setResult(result);\n return;\n }\n\n // fetching bplocation\n bploclist = proposalDAO.getLocation(proposalmgmt.getSupplier().getId());\n if (bploclist.size() > 0)\n bplocation = bploclist.get(0);\n else {\n String message = OBMessageUtils.messageBD(\"ESCM_SuppLoc_NotDefine\");\n message = message.replace(\"%\", proposalmgmt.getSupplier().getName());\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", message);\n bundle.setResult(result);\n return;\n }\n\n // fetching pricelist\n priceListlist = proposalDAO.getPriceList(proposalmgmt.getClient().getId());\n if (priceListlist.size() > 0)\n priceList = priceListlist.get(0);\n else {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", \"@ESCM_PriceList_NotDefine@\");\n bundle.setResult(result);\n return;\n }\n\n // fetching payment term\n paymentTermList = proposalDAO.getPaymentTerm(proposalmgmt.getClient().getId());\n if (paymentTermList.size() > 0)\n paymentTerm = paymentTermList.get(0);\n else {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@ESCM_PaymentTerm_NotDefine@\");\n bundle.setResult(result);\n return;\n }\n if (user.getBusinessPartner() == null) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@ESCM_CrtPOfrmProsal_NotBP@\");\n bundle.setResult(result);\n return;\n }\n // default value brought for mot contact person/position so no need validation.\n /*\n * if (user.getBusinessPartner() != null && user.getBusinessPartner().getEhcmPosition() ==\n * null) { OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n * \"@ESCM_LoggUser_PosNotDef@\"); bundle.setResult(result); return; }\n */\n\n // fetching document type\n Object transdoctype = proposalDAO.getTransactionDoc(orgId, clientId);\n if (transdoctype != null) {\n transdoctypeId = (String) transdoctype;\n } else {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", \"@ESCM_PODocType_NotDefine@\");\n bundle.setResult(result);\n return;\n }\n\n if (transdoctypeId != null && paymentTerm != null && priceList != null && warehouse != null\n && bplocation != null && yearId != null) {\n Order order = OBProvider.getInstance().get(Order.class);\n order.setClient(proposalmgmt.getClient());\n order.setOrganization(proposalmgmt.getOrganization());\n order.setCreatedBy(user);\n order.setUpdatedBy(user);\n order.setSalesTransaction(false);\n order.setDocumentType(OBDal.getInstance().get(DocumentType.class, \"0\"));\n order.setTransactionDocument(OBDal.getInstance().get(DocumentType.class, transdoctypeId));\n order.setDocumentNo(UtilityDAO.getSequenceNo(conn, clientId,\n order.getTransactionDocument().getDocumentSequence().getName(), true));\n order.setDocumentStatus(\"DR\");\n order.setDocumentAction(\"CO\");\n order.setAccountingDate(new java.util.Date());\n order.setOrderDate(new java.util.Date());\n order.setBusinessPartner(proposalmgmt.getSupplier());\n order.setEscmRevision(0L);\n order.setEscmAppstatus(\"DR\");\n order.setEscmFinanyear(OBDal.getInstance().get(Year.class, yearId));\n if (proposalmgmt.getEscmBidmgmt() != null\n && proposalmgmt.getEscmBidmgmt().getBidname() != null) {\n order.setEscmProjectname(proposalmgmt.getEscmBidmgmt().getBidname());\n } else {\n order.setEscmProjectname(proposalmgmt.getBidName());\n }\n // order.setEscmOnboarddateh(new java.util.Date());\n order.setEscmOrdertype(purchaseOrderType);\n // order.setEscmOnboarddategreg(d1.format(new Date()));\n order.setPartnerAddress(bplocation);\n order.setEscmContractduration(null);\n // order.setEscmPeriodtype(\"DT\");\n order.setWarehouse(warehouse);\n order.setPriceList(priceList);\n order.setPaymentTerms(paymentTerm);\n order.setInvoiceTerms(\"D\");\n order.setDeliveryTerms(\"A\");\n order.setFreightCostRule(\"I\");\n order.setFormOfPayment(\"B\");\n order.setDeliveryMethod(\"P\");\n order.setPriority(\"5\");\n order.setEscmAdRole(OBContext.getOBContext().getRole());\n order.setEscmAppstatus(\"DR\");\n order.setEscmAdvpaymntPercntge(BigDecimal.ZERO);\n Currency objCurrency = OBDal.getInstance().get(Currency.class, \"317\");\n order.setCurrency(proposalmgmt.getOrganization().getCurrency() == null ? objCurrency\n : proposalmgmt.getOrganization().getCurrency());\n\n if (proposalmgmt.getProposalstatus().equals(\"PAWD\")) {\n order.setGrandTotalAmount(proposalmgmt.getAwardamount());\n } else {\n order.setGrandTotalAmount(proposalmgmt.getTotalamount());\n }\n\n order.setDocumentStatus(\"DR\");\n order.setEscmDocaction(\"CO\");\n // order.setEscmContractstartdate(new java.util.Date());\n // order.setEscmContractenddate(new java.util.Date());\n order.setEscmBuyername(user);\n order.setEscmRatedategre(d1.format(new Date()));\n if (budgetReferenceId != null)\n order.setEfinBudgetint(\n OBDal.getInstance().get(EfinBudgetIntialization.class, budgetReferenceId));\n order.setEscmProposalmgmt(proposalmgmt);\n // order.setEscmMotcontperson(user.getBusinessPartner().getName());\n // order.setEscmMotcontposition(user.getBusinessPartner().getEhcmPosition());\n order.setEscmMotcontperson(motContactPerson);\n order.setEscmMotcontposition(motContactPosition);\n if (proposalmgmt.getSecondsupplier() != null)\n order.setEscmSecondsupplier(proposalmgmt.getSecondsupplier());\n if (proposalmgmt.getSecondBranchname() != null)\n order.setEscmSecondBranchname(proposalmgmt.getSecondBranchname());\n order.setEscmIssecondsupplier(proposalmgmt.isSecondsupplier());\n if (proposalmgmt.getIBAN() != null)\n order.setEscmSecondIban(proposalmgmt.getIBAN());\n if (proposalmgmt.getSubcontractors() != null)\n order.setEscmSubcontractors(proposalmgmt.getSubcontractors());\n if (proposalmgmt.isTaxLine()) {\n order.setEscmIstax(proposalmgmt.isTaxLine());\n\n }\n if (proposalmgmt.getEfinTaxMethod() != null) {\n order.setEscmTaxMethod(proposalmgmt.getEfinTaxMethod());\n }\n order.setEscmCalculateTaxlines(true);\n if (proposalmgmt.getContractType() != null) {\n order.setEscmContactType(proposalmgmt.getContractType());\n if (proposalmgmt.getContractType().getReceiveType().getSearchKey().equals(\"AMT\")) {\n order.setEscmReceivetype(\"AMT\");\n } else {\n order.setEscmReceivetype(\"QTY\");\n }\n } else {\n order.setEscmContactType(null);\n }\n OBQuery<EscmProposalsourceRef> sourceRef = OBDal.getInstance().createQuery(\n EscmProposalsourceRef.class,\n \"as e where e.escmProposalmgmtLine.id in (select ln.id from \"\n + \"Escm_Proposalmgmt_Line ln where ln.escmProposalmgmt.id=:propId)\");\n sourceRef.setNamedParameter(\"propId\", proposalmgmt.getId());\n List<EscmProposalsourceRef> propSrclist = sourceRef.list();\n if (propSrclist.size() > 0) {\n EscmProposalsourceRef propSrcRef = propSrclist.get(0);\n if (propSrcRef.getRequisition() != null) {\n order.setEscmMaintenanceProject(\n propSrcRef.getRequisition().getEscmMaintenanceProject());\n }\n if (propSrcRef.getRequisition() != null) {\n order.setEscmMaintenanceCntrctNo(\n propSrcRef.getRequisition().getESCMMaintenanceContractNo());\n }\n }\n if (proposalmgmt.getEscmBidmgmt() != null) {\n OBQuery<Escmbidsourceref> bidSrcref = OBDal.getInstance().createQuery(\n Escmbidsourceref.class,\n \"as e where e.escmBidmgmtLine.id in (select bid.id from escm_bidmgmt_line bid where bid.escmBidmgmt.id=:bidId)\");\n bidSrcref.setNamedParameter(\"bidId\", proposalmgmt.getEscmBidmgmt().getId());\n List<Escmbidsourceref> bidSrcList = bidSrcref.list();\n if (bidSrcList.size() > 0) {\n Escmbidsourceref bidSrcRef = bidSrcList.get(0);\n if (bidSrcRef.getRequisition() != null) {\n order.setEscmMaintenanceProject(\n bidSrcRef.getRequisition().getEscmMaintenanceProject());\n order.setEscmMaintenanceCntrctNo(\n bidSrcRef.getRequisition().getESCMMaintenanceContractNo());\n }\n }\n }\n\n OBDal.getInstance().save(order);\n\n proposalmgmt.setDocumentNo(order);\n OBDal.getInstance().save(proposalmgmt);\n\n // Updating the PO reference in PEE(Proposal Attribute)\n // Fetching the PEE irrespective of Proposal Version\n OBQuery<EscmProposalAttribute> proposalAttr = OBDal.getInstance().createQuery(\n EscmProposalAttribute.class,\n \" as a join a.escmProposalevlEvent b where b.status='CO' and a.escmProposalmgmt.proposalno= :proposalID \");\n proposalAttr.setNamedParameter(\"proposalID\", proposalmgmt.getProposalno());\n List<EscmProposalAttribute> proposalAttrList = proposalAttr.list();\n if (proposalAttrList.size() > 0) {\n EscmProposalAttribute proposalAttrObj = proposalAttrList.get(0);\n proposalAttrObj.setOrder(order);\n OBDal.getInstance().save(proposalAttrObj);\n }\n\n OBDal.getInstance().flush();\n\n int ordercount = POcontractAddproposalDAO.insertOrderline(conn, proposalmgmt, order);\n\n if (ordercount == 1) {\n // send an alert to contract user when po is created\n description = sa.elm.ob.scm.properties.Resource\n .getProperty(\"scm.contractuser.alert\", vars.getLanguage())\n .concat(\"\" + proposalmgmt.getProposalno());\n AlertUtility.alertInsertBasedonPreference(order.getId(), order.getDocumentNo(),\n \"ESCM_Contract_User\", order.getClient().getId(), description, \"NEW\", alertWindow,\n \"scm.contractuser.alert\", Constants.GENERIC_TEMPLATE, windowId, null);\n String message = OBMessageUtils.messageBD(\"ESCM_CreatePOForProposal_Success\");\n message = message.replace(\"%\", order.getDocumentNo());\n OBError result = OBErrorBuilder.buildMessage(null, \"success\", message);\n bundle.setResult(result);\n } else {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@ESCM_CreatePOForProsalNotSuccess@\");\n bundle.setResult(result);\n }\n }\n }\n } catch (OBException e) {\n OBDal.getInstance().rollbackAndClose();\n log.error(\" Exception in CreatePOFromProposal: \" + e);\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", e.getMessage());\n bundle.setResult(result);\n return;\n } catch (Exception e) {\n log.error(\"Exeception in CreatePOFromProposal Process:\", e);\n // Throwable t = DbUtility.getUnderlyingSQLException(e);\n final OBError error = OBMessageUtils.translateError(bundle.getConnection(), vars,\n vars.getLanguage(), OBMessageUtils.messageBD(\"HB_INTERNAL_ERROR\"));\n bundle.setResult(error);\n } finally {\n OBContext.restorePreviousMode();\n }\n }",
"public void setCodigo( String codigo ) {\n this.codigo = codigo;\n }",
"public void generarCodigo(){\r\n this.setCodigo(\"c\"+this.getNombre().substring(0,3));\r\n }",
"private void confirmar(){\n\n cliente = new Cliente();\n\n if (validaCampos() == false){\n\n cliente.idade = Integer.parseInt(edtIdade.getText().toString());\n try {\n\n clienteRepositorio.inserir(cliente);\n AlertDialog.Builder dlg = new AlertDialog.Builder(this);\n finish();\n dlg.setTitle(\"Sucess\");\n dlg.setMessage(\"Cadastro realizado com sucesso\");\n dlg.setNeutralButton(\"OK\",null);\n dlg.show();\n\n }catch (SQLException ex){\n AlertDialog.Builder dlg = new AlertDialog.Builder(this);\n dlg.setTitle(\"Error\");\n dlg.setMessage(ex.getMessage());\n dlg.setNeutralButton(\"OK\",null);\n dlg.show();\n }\n }\n }",
"public void setCodigo(int pCodigo){\n this.codigo = pCodigo;\n }",
"public void setCodigo(int codigo) {\n this.codigo = codigo;\n }",
"public void ajouterChambreDeCommerce(){\n }",
"@ApiModelProperty(required = true, value = \"Confirmation Code as retrieved by the TPP from the redirect based SCA process.\")\n @NotNull\n\n\n @JsonProperty(\"confirmationCode\")\n public String getConfirmationCode() {\n return confirmationCode;\n }",
"@RequestMapping(value =\"/customer/buy_now\", method = RequestMethod.POST)\n public String initiateOrder(@RequestParam(\"pcode\") String code,Order order, ModelMap model) {\n logger.info(\"*** OrderController - initiateOrder ***\");\n String username = \"BookMan\";\n Product product = productService.getProduct(code);\n order.setProduct(product);\n order.setStatus(\"initiated\");\n order.setCustomerName(username);\n order.setOrderDate(new Date());\n order.setBill(order.getQuantity()*product.getPrice());\n Order orderInserted = orderService.newOrder(order);\n model.addAttribute(\"order\",orderInserted);\n return \"customer_shipping_details\";\n }",
"public void setComuneNascitaCod(int value) {\r\n this.comuneNascitaCod = value;\r\n }",
"@RequestMapping(value =\"/customer/place_order\", method = RequestMethod.POST)\n public String placeOrder(ModelMap model, Order order, @RequestParam(\"code\") String code) {\n logger.info(\"*** OrderController - placeOrder ***\");\n Product product = productService.getProduct(code);\n order.setProduct(product);\n order.setStatus(\"completed\");\n order.setOrderDate(new Date());\n Order completedOrder = orderService.placeOrder(order);\n if(!completedOrder.equals(null)){\n productService.updateInventory(product,order.getQuantity());\n }\n model.addAttribute(\"completedOrder\", completedOrder);\n return \"success\";\n }",
"public static Result confirmOrder(Orders orderObj){\n \n Result result = Result.FAILURE_PROCESS;\n MysqlDBOperations mysql = new MysqlDBOperations();\n ResourceBundle rs = ResourceBundle.getBundle(\"com.generic.resources.mysqlQuery\");\n Connection conn = mysql.getConnection();\n PreparedStatement preStat;\n boolean isSuccessInsertion;\n \n// if(!Checker.isValidDate(date))\n// return Result.FAILURE_CHECKER_DATE;\n\n try{ \n String order_id = Util.generateID();\n \n preStat = conn.prepareStatement(rs.getString(\"mysql.order.update.insert.1\"));\n preStat.setString(1, order_id);\n preStat.setString(2, \"1\" );\n preStat.setInt(3, 0);\n preStat.setLong(4, orderObj.getDate());\n preStat.setLong(5, orderObj.getDelay());\n preStat.setString(6, orderObj.getNote());\n preStat.setDouble(7, -1);\n preStat.setString(8, orderObj.getUserAddressID());\n preStat.setString(9, orderObj.getDistributerAddressID());\n \n \n if(preStat.executeUpdate()==1){\n List<OrderProduct> orderProductList = orderObj.getOrderProductList();\n isSuccessInsertion = orderProductList.size()>0;\n\n // - * - If process fail then break operation\n insertionFail:\n for(OrderProduct orderProduct:orderProductList){\n preStat = conn.prepareStatement(rs.getString(\"mysql.orderProduct.update.insert.1\"));\n preStat.setString(1, order_id);\n preStat.setString(2, orderProduct.getCompanyProduct_id());\n preStat.setDouble(3, orderProduct.getQuantity());\n\n if(preStat.executeUpdate()!=1){\n isSuccessInsertion = false;\n break insertionFail;\n }\n }\n\n // - * - Return success\n if(isSuccessInsertion){\n mysql.commitAndCloseConnection();\n return Result.SUCCESS.setContent(\"Siparişiniz başarılı bir şekilde verilmiştir...\");\n }\n\n // - * - If operation fail then rollback \n mysql.rollbackAndCloseConnection();\n }\n\n } catch (Exception ex) {\n mysql.rollbackAndCloseConnection();\n Logger.getLogger(DBOrder.class.getName()).log(Level.SEVERE, null, ex);\n return Result.FAILURE_PROCESS.setContent(ex.getMessage());\n } finally {\n mysql.closeAllConnection();\n } \n\n return result;\n }",
"public int getOrder_code_id() {\n return order_code_id;\n }",
"public void setCodigo_pcom(java.lang.String newCodigo_pcom);",
"public abstract BaseQuantityDt setCode(String theCode);",
"public void setCodigo(java.lang.String param){\n \n this.localCodigo=param;\n \n\n }",
"public OrderTransactionManagedBean() \n {\n orders = new ArrayList<>();\n lineItems = new ArrayList<>();\n }",
"@Override\n\tpublic void atualizar() {\n\t\t\n\t\t \n\t\t String idstring = id.getText();\n\t\t UUID idlong = UUID.fromString(idstring);\n\t\t \n\t\t PedidoCompra PedidoCompra = new PedidoCompra();\n\t\t\tPedidoCompra.setId(idlong);\n\t\t\tPedidoCompra.setAtivo(true);\n//\t\t\tPedidoCompra.setNome(nome.getText());\n\t\t\tPedidoCompra.setStatus(StatusPedido.valueOf(status.getSelectionModel().getSelectedItem().name()));\n//\t\t\tPedidoCompra.setSaldoinicial(saldoinicial.getText());\n\t\t\tPedidoCompra.setData(new Date());\n\t\t\tPedidoCompra.setIspago(false);\n\t\t\tPedidoCompra.setData_criacao(new Date());\n//\t\t\tPedidoCompra.setFornecedor(fornecedores.getSelectionModel().getSelectedItem());\n\t\t\tPedidoCompra.setFornecedor(cbfornecedores.getSelectionModel().getSelectedItem());\n\t\t\tPedidoCompra.setTotal(PedidoCompra.CalcularTotal(PedidoCompra.getItems()));\n\t\t\tPedidoCompra.setTotalpago(PedidoCompra.CalculaTotalPago(PedidoCompra.getFormas()));\n\t\t\t\n\t\t\t\n\t\t\tgetservice().edit(PedidoCompra);\n\t\t\tupdateAlert(PedidoCompra);\n\t\t\tclearFields();\n\t\t\tdesligarLuz();\n\t\t\tloadEntityDetails();\n\t\t\tatualizar.setDisable(true);\n\t\t\tsalvar.setDisable(false);\n\t\t\t\n\t\t \n\t\t \n\t\tsuper.atualizar();\n\t}",
"@Override\n\tpublic void commande(List<commande> listcommande) {\n\n\t}",
"public void setCodigo(Integer codigo) { this.codigo = codigo; }",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tObject source = e.getSource();\n\t\tif(source == bConfirm) \n\t\t{\n\t\t\tif\n\t\t\t(listId.getSelectedIndex() == -1)\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(oALert, \"Proszę zaznaczyć zamówienie do potwierdzenia.\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tInterfaceAdmin a = new InterfaceAdmin();\n\t\t\t\t//int max=a.maxOrderId();\n\t\t\t\tint selected=listId.getSelectedIndex();\n\t\t\t\t\n\t\t\t\tint id=Integer.valueOf(a.fillOrderId(selected));\n\t\t\t\tint idUser=Integer.valueOf(a.fillOrderIdUser(selected));\n\t\t\t\tfloat totalPrice=Float.parseFloat(a.fillOrderTotalPrice(selected));\n\t\t\t\tString adress=a.fillOrderDeliveryAddress(selected);\n\t\t\t\tint status =Integer.valueOf(a.fillOrderStatus(selected));\n\t\t\t\tOrder order = new Order(id,idUser,totalPrice,adress,status);\n\t\t\t\tif(status==1)\n\t\t\t\t{\n\t\t\t\t\torder.realize();\n\t\t\t\t}\n\t\t\t\telse JOptionPane.showMessageDialog(oALert, \"Nie można zrealizować zamówienia ze statusem innym niż \\\"przyjęte do realizacji\\\"\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tlTitle.setText(\"wybrano \"+a.fillOrderId(selected)+\"\"+a.fillOrderDeliveryAddress(selected));\n\t\t\t\n\t\t\t\tAdminOrder order2 = new AdminOrder();\n\t\t\t\torder2.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\torder2.setVisible(true);\n\t\t\t\tdispose();\n\t\t\t}\n\t\t}\n\t\t\n\t\telse if(source == bCancel) \n\t\t{\n\t\t\tif\n\t\t\t(listId.getSelectedIndex() == -1)\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(oALert, \"Proszę zaznaczyć zamówienie do potwierdzenia.\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tInterfaceAdmin a = new InterfaceAdmin();\n\t\t\t\tint max=a.maxOrderId();\n\t\t\t\tint selected=listId.getSelectedIndex();\n\t\t\t\t\n\t\t\t\tint id=Integer.valueOf(a.fillOrderId(selected));\n\t\t\t\tint idUser=Integer.valueOf(a.fillOrderIdUser(selected));\n\t\t\t\tfloat totalPrice=Float.parseFloat(a.fillOrderTotalPrice(selected));\n\t\t\t\tString adress=a.fillOrderDeliveryAddress(selected);\n\t\t\t\tint status =Integer.valueOf(a.fillOrderStatus(selected));\n\t\t\t\tOrder order = new Order(id,idUser,totalPrice,adress,status);\n\t\t\t\tif(status==1)\n\t\t\t\t{\n\t\t\t\t\torder.cancel();\n\t\t\t\t}\n\t\t\t\telse JOptionPane.showMessageDialog(oALert, \"Nie można zrealizować zamówienia ze statusem innym niż \\\"przyjęte do realizacji\\\"\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tlTitle.setText(\"wybrano \"+a.fillOrderId(selected)+\"\"+a.fillOrderDeliveryAddress(selected));\n\t\t\t\n\t\t\t\tAdminOrder order2 = new AdminOrder();\n\t\t\t\torder2.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\torder2.setVisible(true);\n\t\t\t\tdispose();\n\t\t\t}\n\t\t}\n\t\t\n\t\telse \n\t\t\t{\n\t\t\tInterfaceAdmin admin = new InterfaceAdmin();\n\t\t\tadmin.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\tadmin.setVisible(true);\n\t\t\tdispose();\n\t\t\t}\n\t\t\t\n\t}",
"public void pedirCantidadProducto(String codBarra){\n this.productoSeleccionado = codBarra;\n }",
"public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }",
"public void setProveedor(int proveedor) { this.proveedor = proveedor; }",
"public void guardarDestruccion() {\n try {\n produccion.setIdMarca(opcionMarca);\n produccion.setIdPlantaProd(opcionPlanta);\n produccion.setIdPaisOrigen(opcionOrigen);\n produccion.setIdTipoRetro(opcionTipo);\n produccion.setFechProduccion(new Date());\n produccion.setDescPaisOrigen(desperdiciosHelper.getNombrePais());\n\n if (!habilitarBtnValidarProd()) {\n if (produccion != null) {\n produccion = produccionService.guardaDestruccion(produccion);\n super.msgInfo(MSGEXITOVALIDAPROD);\n desperdiciosHelper.setDeshabilitaBtnValidarProd(true);\n desperdiciosHelper.setDeshabilitaCargaArchivo(false);\n } else {\n super.msgError(MSGERRORVALIDARPROD);\n }\n }\n } catch (ProduccionServiceException e) {\n LOGGER.error(\"ERROR: Al guardar los datos de produccion\" + e.getMessage(), e);\n }\n }",
"@Override\n\tpublic void sendOrderConfirmationHtmlEmail(Order order) {\n\t\t\n\t}",
"public void setCodigo(java.lang.String codigo) {\n this.codigo = codigo;\n }",
"public void ventaBilleteMaquina1()\n {\n maquina1.insertMoney(500);\n maquina1.printTicket();\n }",
"public confirm_order() {\n initComponents();\n }",
"public void confirmarBusqueda(){\n\t\tList<Producto> productos=productoService.getByAll();\n\t\tfor(Producto p: productos){\n\t\t\tProductoEmpresa proEmpr = new ProductoEmpresa();\n\t\t\tproEmpr.setCantidad(p.getCantidad()==null?0.0:p.getCantidad());\n\t\t\tproEmpr.setPrecio(p.getCostoPublico()==null?0.0:p.getCostoPublico());\n\t\t\tEmpresa empr=new Empresa();\n\t\t\tempr.setEmpresaId(getEmpresaId());\n\t\t\tproEmpr.setEmpresaId(empr);\n\t\t\tproEmpr.setFechaRegistro(new Date());\n\t\t\tproEmpr.setProductoId(p);\n\t\t\tgetProductoEmpresaList().add(proEmpr);\n\t\t\tproductoEmpresaService.save(proEmpr);\t\t\n\t\t\tRequestContext.getCurrentInstance().execute(\"PF('confirmarBusqueda').hide();\");\n\t\t}\n\t\tFacesContext.getCurrentInstance().addMessage(null, new FacesMessage(\"Productos creados Exitosamente para la sucursal seleccionada\"));\n\t\tsetProductoEmpresaList(productoEmpresaService.getByEmpresa(getEmpresaId()));\n\t}",
"@Override\n\tpublic void onEndGererCommande()\n\t{\n\t\t\n\t}",
"int newOrder(OrderBean newOrder);",
"@Override\n public String generaCodigo() {\n return \"\";\n }",
"@TransactionAttribute(TransactionAttributeType.REQUIRED)\n @Override\n public void comprar(ArrayList<Mueble> muebles, Usuario cliente) { \n \n try {\n registrarCompra(muebles, cliente);\n descontarValorCompraTarjeta(muebles, cliente);\n } catch (OperacionInvalidaException | CupoInsuficienteException ex) {\n System.out.println(\"Se hace rollback de la transacción\");\n System.out.println(ex);\n context.setRollbackOnly();\n }\n }",
"public void inicializarComboMoneda(String cod){\n\t\tBeanItemContainer<MonedaVO> monedasObj = new BeanItemContainer<MonedaVO>(MonedaVO.class);\r\n\t\tMonedaVO moneda = new MonedaVO();\r\n\t\tArrayList<MonedaVO> lstMonedas = new ArrayList<MonedaVO>();\r\n\t\tUsuarioPermisosVO permisosAux;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tpermisosAux = \r\n\t\t\t\t\tnew UsuarioPermisosVO(this.permisos.getCodEmp(),\r\n\t\t\t\t\t\t\tthis.permisos.getUsuario(),\r\n\t\t\t\t\t\t\tVariablesPermisos.FORMULARIO_CONCILIACION,\r\n\t\t\t\t\t\t\tVariablesPermisos.OPERACION_LEER);\r\n\t\t\t\r\n\t\t\tlstMonedas = this.controlador.getMonedas(permisosAux);\r\n\t\t\t\r\n\t\t} catch (ObteniendoMonedaException | InicializandoException | ConexionException | ObteniendoPermisosException | NoTienePermisosException e) {\r\n\r\n\t\t\tMensajes.mostrarMensajeError(e.getMessage());\r\n\t\t}\r\n\t\t\r\n\t\tfor (MonedaVO monedaVO : lstMonedas) {\r\n\t\t\t\r\n\t\t\tmonedasObj.addBean(monedaVO);\r\n\t\t\t\r\n\t\t\tif(cod != null){\r\n\t\t\t\tif(cod.equals(monedaVO.getCodMoneda())){\r\n\t\t\t\t\tmoneda = monedaVO;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tthis.comboMoneda.setContainerDataSource(monedasObj);\r\n\t\tthis.comboMoneda.setItemCaptionPropertyId(\"descripcion\");\r\n\t\t\r\n\t\t\r\n\t\tif(cod!=null)\r\n\t\t{\r\n\t\t\ttry{\r\n\t\t\t\tthis.comboMoneda.setReadOnly(false);\r\n\t\t\t\tthis.comboMoneda.setValue(moneda);\r\n\t\t\t\tthis.comboMoneda.setReadOnly(true);\r\n\t\t\t}catch(Exception e)\r\n\t\t\t{}\r\n\t\t}\r\n\t\t\r\n\t}",
"private Order(String value){\r\n\t\t\tthis.value = value;\r\n\t\t}",
"public void send(Order brokerMsg) {\n// System.out.println(\"Sending a transaction from. price\" + brokerMsg.getPrice() + \" buy : \" + brokerMsg.isBuy());\n\n\n MessageCreator messageCreator = new MessageCreator() {\n @Override\n public Message createMessage(Session session) throws JMSException {\n\n\n Message msg = session.createTextMessage(brokerMsg.toString());\n msg.setJMSCorrelationID(brokerMsg.getStratId().toString());\n// System.out.println(msg);\n return msg;\n }\n };\n orderService.writeOrder(brokerMsg);\n jmsTemplate.send(\"OrderBroker\", messageCreator);\n }",
"public void confirmarDuplicarFormulaProceso() {\n if (duplicarFormulaProceso.getProceso().getSecuencia() != null) {\n k++;\n l = BigInteger.valueOf(k);\n duplicarFormulaProceso.setSecuencia(l);\n listFormulasProcesos.add(duplicarFormulaProceso);\n listFormulasProcesosCrear.add(duplicarFormulaProceso);\n RequestContext context = RequestContext.getCurrentInstance();\n infoRegistro = \"Cantidad de registros : \" + listFormulasProcesos.size();\n context.update(\"form:informacionRegistro\");\n context.update(\"form:datosFormulaProceso\");\n context.execute(\"DuplicarRegistroFormulaProceso.hide()\");\n index = -1;\n secRegistro = null;\n if (guardado == true) {\n guardado = false;\n RequestContext.getCurrentInstance().update(\"form:ACEPTAR\");\n }\n if (bandera == 1) {\n altoTabla = \"310\";\n formulaProceso = (Column) FacesContext.getCurrentInstance().getViewRoot().findComponent(\"form:datosFormulaProceso:formulaProceso\");\n formulaProceso.setFilterStyle(\"display: none; visibility: hidden;\");\n\n formulaPeriodicidad = (Column) FacesContext.getCurrentInstance().getViewRoot().findComponent(\"form:datosFormulaProceso:formulaPeriodicidad\");\n formulaPeriodicidad.setFilterStyle(\"display: none; visibility: hidden;\");\n\n RequestContext.getCurrentInstance().update(\"form:datosFormulaProceso\");\n bandera = 0;\n filtrarListFormulasProcesos = null;\n tipoLista = 0;\n }\n duplicarFormulaProceso = new FormulasProcesos();\n } else {\n RequestContext.getCurrentInstance().execute(\"errorRegistroFP.show()\");\n }\n }",
"@Override\r\n\tpublic void notificationVente(CommandeProduc c) {\n\t}",
"public void setCodDistrito(String codDistrito);",
"public void generateCodeItemCode() {\n\t\tcodeItem.generateCodeItemCode();\n\t}",
"public void setContrasena(String contrasena) {this.contrasena = contrasena;}",
"public void setCode(Code code) {\n this.Code = code;\n }",
"@Override\r\n\t\t\t\tprotected void doExecuteCallback() throws Exception {\n\t\t\t\t\tConfirm c ;\r\n\t\t\t\t\tfor(KN_XSGL_RGS r : rgslist){\r\n\t\t\t\t\t\tString myids = idmap.get(r.get认购书id().toString());\r\n\t\t\t\t\t\tif(myids == null)continue;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tint myid = Integer.parseInt(myids);\r\n\t\t\t\t\t\tc = MyPropertyUtils.getConfirmServices().findConfirmById(myid);\r\n\t\t\t\t\t\t//认购书号\r\n\t\t\t\t\t\tif(c==null){\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tc.setAgreeNo(r.get认购书号());\r\n\t\t\t\t\t\t//付款方式\r\n\t\t\t\t\t\tc.setPayWayId(payway(r,c));\r\n\t\t\t\t\t\t//创建时间\r\n\t\t\t\t\t\tc.setCreatedTime(r.get创建时间());\r\n\t\t\t\t\t\t//备注\r\n\t\t\t\t\t\tc.setRemark(r.get备注());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tMyPropertyUtils.getConfirmServices().updateConfirm(c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}",
"void setConfirmed(String value);",
"private String insertarCartaVitalTransfusion() {\n int[] valoresEnemigo = {\n// this.dañoEnemigo=valoresEnemigo[0];\n 3,\n// this.curaEnemigo=valoresEnemigo[1];\n 0,\n// this.cartasEnemigo=valoresEnemigo[2];\n 0,\n// this.descarteEnemigo=valoresEnemigo[3];\n 0,\n// this.recursosEnemigo=valoresEnemigo[4];\n 0,\n// this.moverMesaAManoEnemigo=valoresEnemigo[5];\n 0,\n// this.moverDescarteAManoEnemigo=valoresEnemigo[6];\n 0,\n// this.moverDeckAManoEnemigo=valoresEnemigo[7];\n 0,\n// this.moverMesaADeckEnemigo=valoresEnemigo[8];\n 0,\n// this.moverDescarteADeckEnemigo=valoresEnemigo[9];\n 0,\n// this.moverManoADeckEnemigo=valoresEnemigo[10];\n 0,\n// this.moverMesaADescarteEnemigo=valoresEnemigo[11];\n 0,\n// this.moverManoADescarteEnemigo=valoresEnemigo[12];\n 0,\n// this.moverDeckADescarteEnemigo=valoresEnemigo[13];\n 0,\n// this.moverDescarteAMesaEnemigo=valoresEnemigo[14];\n 0,\n// this.moverManoAMesaEnemigo=valoresEnemigo[15];\n 0,\n// this.moverDeckAMesaEnemigo=valoresEnemigo[16];\n 0\n };\n int[] valoresOwner = {\n// this.dañoOwner=valoresOwner[0];\n 0,\n// this.curaOwner=valoresOwner[1];\n 2,\n// this.cartasOwner=valoresOwner[2];\n 0,\n// this.descarteOwner=valoresOwner[3];\n 0,\n// this.recursosOwner=valoresOwner[4];\n 0,\n// this.moverMesaAManoOwner=valoresOwner[5];\n 0,\n// this.moverDescarteAManoOwner=valoresOwner[6];\n 0,\n// this.moverDeckAManoOwner=valoresOwner[7];\n 0,\n// this.moverMesaADeckOwner=valoresOwner[8];\n 0,\n// this.moverDescarteADeckOwner=valoresOwner[9];\n 0,\n// this.moverManoADeckOwner=valoresOwner[10];\n 0,\n// this.moverMesaADescarteOwner=valoresOwner[11];\n 0,\n// this.moverManoADescarteOwner=valoresOwner[12];\n 0,\n// this.moverDeckADescarteOwner=valoresOwner[13];\n 0,\n// this.moverDescarteAMesaOwner=valoresOwner[14];\n 0,\n// this.moverManoAMesaOwner=valoresOwner[15];\n 0,\n// this.moverDeckAMesaOwner=valoresOwner[16];\n 0\n };\n boolean[]valoresPlay={\n //this.OnMoveMesaADescarte=valoresPlay[0];\n false,\n //this.OnMoveMesaADeck=valoresPlay[1];\n false,\n //this.OnMoveMesaAMano=valoresPlay[2];\n false,\n //this.OnMoveDescarteAMesa=valoresPlay[3];\n false,\n //this.OnMoveDescarteADeck=valoresPlay[4];\n false,\n// this.OnMoveDescarteAMano=valoresPlay[5];\n false,\n// this.OnMoveDeckADescarte=valoresPlay[6];\n false,\n// this.OnMoveDeckAMesa=valoresPlay[7];\n false,\n// this.OnMoveDeckAMano=valoresPlay[8];\n false,\n// this.OnMoveManoADescarte=valoresPlay[9];\n false,\n// this.OnMoveManoAMesa=valoresPlay[10];\n true,\n// this.OnMoveManoADeck=valoresPlay[11];\n false,\n// this.OnStartTurnTable=valoresPlay[12];\n false,\n// this.OnStartTurnHand=valoresPlay[13];\n false,\n// this.OnStartTurnDiscard=valoresPlay[14];\n false,\n// this.OnStartTurnDeck=valoresPlay[15];\n false,\n// this.OnEndTurnTable=valoresPlay[16];\n false,\n// this.OnEndTurnHand=valoresPlay[17];\n false,\n// this.OnEndTurnDiscard=valoresPlay[18];\n false,\n// this.OnEndTurnDeck=valoresPlay[19];\n false,\n };\n ArrayList<Integer> datos = new ArrayList<Integer>();\n String nombre = \"\";\n for (int i = 0; i < valoresEnemigo.length; i++) {\n datos.add(valoresEnemigo[i]);\n }\n for (int i = 0; i < valoresOwner.length; i++) {\n datos.add(valoresOwner[i]);\n }\n for (int i = 0; i < valoresPlay.length; i++) {\n if(valoresPlay[i]){\n datos.add(1);\n }else{\n datos.add(0);\n }\n }\n String insert=\"\";\n for(int i=0;i<datos.size();i++){\n if(i<datos.size()-1) {\n insert += datos.get(i) + \", \";\n }else{\n insert += datos.get(i) + \" )\";\n }\n }\n return insert;\n }",
"@Given(\"En tant qu utilisateur je souhaite acceder au bon de commande afin de valider ma commande\")\n\tpublic void en_tant_qu_utilisateur_je_souhaite_acceder_au_bon_de_commande_afin_de_valider_ma_commande() {\n\t throw new PendingException();\n\t}",
"void salirDelMazo() {\n mazo.inhabilitarCartaEspecial(this);\n }",
"public void setOrderStatus(java.lang.String param){\n \n this.localOrderStatus=param;\n \n\n }",
"public void setComuneResidenzaCod(int value) {\r\n this.comuneResidenzaCod = value;\r\n }",
"public Order(int _orderId){\n this.orderId = _orderId;\n }",
"public alterarSenhaCliente() {\n }",
"public Promo(int id, String code, int discount, int minPrice, boolean active)\n {\n this.id = id;\n this.code = code;\n this.discount = discount;\n this.minPrice = minPrice;\n this.active = active;// initialise instance variables\n \n }",
"private void addConfirmDialog() {\n builder = UIUtil.getConfirmDialog(getContext(),\"You are about to delete data for this payment. proceed ?\");\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n boolean isDeleted = mydb.deletePayment(paymentId);\n if(isDeleted) {\n Bundle bundle = new Bundle();\n bundle.putString(\"orderId\", String.valueOf(orderId));\n FragmentViewPayments mfragment = new FragmentViewPayments();\n UIUtil.refreshFragment(mfragment,bundle, getFragmentManager());\n } else {\n Toast.makeText(getContext(),\"Error deleting data!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }",
"public void setOrderID(java.lang.String param){\n \n this.localOrderID=param;\n \n\n }",
"public void setOrderID(java.lang.String param){\n \n this.localOrderID=param;\n \n\n }",
"public Sesion(String codigoCliente) {\n cliente = new Cliente(codigoCliente);\n estado = Estado.inicioBot;\n accion = Accion.registrar;\n valor = ValorAIngresar.nombre;\n mensajeRecibido = null;\n respuesta = new Respuesta();\n }",
"public OrderResultManagedBean() {\r\n order = new OrderEntity();\r\n thisOrder = new OrderEntity();\r\n }",
"public void setCodigo_produto(int pCodigoProduto){\n this.codigoProduto = pCodigoProduto;\n }",
"public void setOrderId(int value) {\n this.orderId = value;\n }",
"public int getItem_order_code_id() {\n return item_order_code_id;\n }",
"public void ventaBilleteMaquina2()\n {\n maquina2.insertMoney(600);\n maquina1.printTicket();\n }",
"@TransactionAttribute(TransactionAttributeType.REQUIRED)\n @Override\n public void descontarValorCompraTarjeta(ArrayList<Mueble> muebles, Usuario cliente)throws CupoInsuficienteException{\n double valor = calcularValorCompra(muebles);\n \n TarjetaCreditoAlpes tarjeta = (TarjetaCreditoAlpes) entityManagerDerby.createNamedQuery(\"TarjetaCreditoAlpes.findByNombretitular\").setParameter(\"nombreTitular\", cliente.getLogin()).getSingleResult();\n \n // Se valida que la tarjeta exista\n if(tarjeta == null){\n throw new CupoInsuficienteException(\"La tarjeta no existe!!\");\n }\n \n // Se valida el cupo de la tarjeta para realizar la transacción\n if(tarjeta.getCupo()< valor){\n throw new CupoInsuficienteException(\"El cliente no tiene cupo disponible en la tarjeta para realizar la compra.\\n\"\n + \"En el cupo de la tarjeta tiene: \" + tarjeta.getCupo() + \" y la compra es de : \" + valor);\n } else {\n tarjeta.setCupo(tarjeta.getCupo() - valor);\n entityManagerDerby.merge(tarjeta);\n System.out.println(\"Se actualizó el valor del cupo de la tarjeta\");\n }\n \n }",
"private static void crearPedidoConStockDeVariedades() throws RemoteException {\n\t\tlong[] idVariedades = { 25, 33 };\n\t\tint[] cantidades = { 2, 3 };\n\t\tPedidoClienteDTO pedido = crearPedido(\"20362134596\", \"test 1\", idVariedades, cantidades);\n\n\t\tpedido = PedidoController.getInstance().crearPedido(pedido).toDTO();\n\n\t\tPedidoController.getInstance().cambiarEstadoPedidoCliente(pedido.getNroPedido(), EstadoPedidoCliente.ACEPTADO);\n\t}",
"OrderFullDao confirmOrder(String orderNr, String status, Long businessId);",
"public int confirmar(String cpf, String data, String nome) {\n\t\tif(nome.equals(\"\")){\n\t\t\t\n\t\t\treturn 0;\n\t\t}\n\t\tLong aux=Long.parseLong(cpf);\n\t\t\n\t\tCliente c = clienteDAO.buscarClienteCPF(aux);\n\t\tif (c == null) {\n\t\t\tCliente temp=new Cliente();\n\t\t\ttemp.setCPF(aux);\n\t\t\ttemp.setData(data);\n\t\t\ttemp.setNome(nome);\n\t\t\tclienteDAO.salvar(temp);\n\t\t\t//Cliente cliente = new Cliente();\n\t\t\t\n\t\t\treturn 1;\n\t\t\n\t\t}\n\t\treturn 2;\n\t}",
"public abstract void setCod_dpto(java.lang.String newCod_dpto);",
"public void setCodProd(IProduto codigo);",
"public String setCode() {\n\t\treturn null;\n\t}",
"public DialogoAggiungiFissiConto(int codConto) {\n /* rimanda al costruttore della superclasse */\n super();\n\n try { // prova ad eseguire il codice\n\n /* regola le variabili di istanza coi parametri */\n this.setCodConto(codConto);\n\n /* regolazioni iniziali di riferimenti e variabili */\n this.inizia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }",
"private void botaoSalvar4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_botaoSalvar4MouseClicked\n\n // Instancia objeto com metodo de verificacao dos campos.\n VerificacoesCamposCliente verificarCampos = new VerificacoesCamposCliente();\n\n // Insere confirmacao para insercao.\n int confirmar = JOptionPane.showConfirmDialog(null, \"Confirmacao\", \"Deseja prosseguir?\", JOptionPane.OK_OPTION);\n\n // Se positiva a continuacao.\n if (confirmar == 0) {\n\n // Para erros em sql.\n try {\n\n //Cria objeto de verificacao.\n boolean verificar = false;\n\n // Instancia objeto com o metodo de verificacao.\n // Seu parametro tem os campos de verificacao do painel.\n verificar = verificarCampos.verificarFormularios(\n textoNome.getText(),\n textoCPF.getText(),\n comboGenero.getSelectedItem().toString(),\n textoDataDeNascimento.getText(),\n textoEnderecoLogradouro.getText(),\n textoBairro.getText(),\n textoComplemento.getText(),\n textoNumero.getText(),\n textoTelefone.getText(),\n textoCelular.getText(),\n textoCEP.getText(),\n textoDD_Telefone.getText(),\n textoDD_Celular.getText()\n );\n \n // Verifica se ja eh existente o cpf.\n boolean verificaCPF = verificarCampos.verificarCPF(textoCPF.getText());\n \n // Se os campos estiverem de acorda com as regras, insere.\n if (verificar && verificaCPF) {\n\n // Instancia nos objetos os metodos de dados, endereco e contato.\n DadosPessoais dados = new DadosPessoais();\n Endereco endereco = new Endereco();\n Contato contato = new Contato();\n\n // Objeto de dados insere os dados pessoais do cliente.\n dados.setNome(textoNome.getText());\n dados.setCPF(textoCPF.getText());\n dados.setGenero(comboGenero.getSelectedItem().toString());\n dados.setDataNascimento(textoDataDeNascimento.getText());\n\n // Objeto de endereco insere o endereco do cliente.\n endereco.setLogradouro(textoEnderecoLogradouro.getText());\n endereco.setBairro(textoBairro.getText());\n endereco.setComplemento(textoComplemento.getText());\n endereco.setNumero(textoNumero.getText());\n endereco.setCEP(textoCEP.getText());\n\n // Objeto de contato insere os contatos do cliente.\n contato.setEmail(textoEmail.getText());\n contato.setTelefone(textoTelefone.getText());\n contato.setDD_Telefone(textoDD_Telefone.getText());\n contato.setCelular(textoCelular.getText());\n contato.setDD_Celular(textoDD_Celular.getText());\n\n // Verifica se tem imagem selecionada.\n if (imgCaminho == null) {\n\n // Se não, insere um caminho de imagem pre definido.\n imgCaminho = \"src\\\\br\\\\com\\\\Grupo07\\\\Imagens\\\\perfil.jpg\";\n dados.setImagem(imgCaminho);\n\n } else {\n\n // Se sim, insere o caminho da imagem selecionada.\n dados.setImagem(imgCaminho);\n\n }\n\n // Chama classe de servico para cadastrar cliente com seus construtores(objetos).\n ServicosCliente.cadastrarCliente(dados, endereco, contato);\n\n // Mensagem de sucesso\n JOptionPane.showMessageDialog(null, \"Cadastratado\", \"Sucesso\", JOptionPane.INFORMATION_MESSAGE);\n\n // Limpa campos.\n limparCampos();\n\n }\n\n // Mensagem de erro no banco de dados\n } catch (SQLException ex) {\n\n JOptionPane.showMessageDialog(null, \"Erro no banco de dados\", \"Erro\", JOptionPane.ERROR);\n\n // Mensagem de erro na imagem.\n } catch (FileNotFoundException ex) {\n\n JOptionPane.showMessageDialog(null, \"Erro no imagem\", \"Erro\", JOptionPane.ERROR);\n \n }\n\n // Se negativa a continuacao.\n } else {\n\n JOptionPane.showMessageDialog(null, \"Cancelado, sucesso\", \"Cancelamento\", JOptionPane.OK_OPTION);\n\n }\n }",
"@ApiModelProperty(value = \"Unique code assigned to this auto order\")\r\n public String getAutoOrderCode() {\r\n return autoOrderCode;\r\n }",
"public Order() {\n orderID = \"\";\n customerID = \"\";\n status = \"\";\n }",
"public String getCode()\n {\n return code;\n}",
"public String getOrderno() {\n return orderno;\n }",
"public String getOrderno() {\n return orderno;\n }",
"public DocumentVente(String code, Date date, Tier fornisseur, Date datecommande, String codefourni) {\n this.code = code;\n this.date = date;\n this.client = fornisseur;\n this.datecommande = datecommande;\n this.codeclient = codefourni;\n// this.lieu = emplacement;\n \n }",
"public void setM_MovementConfirm_ID (int M_MovementConfirm_ID);",
"@Override\n\t@XmlElement\n\tpublic void setCtarCode(String ctarCode) {\n\t\t\n\t}",
"@Override\n\tpublic void prepare() throws Exception {\n\t\tsuper.prepare();\n\t\t//setto il titolo:\n\t\tthis.model.setTitolo(\"Quote ordinativo\");\n\t\t\n }",
"public void writeOrderId() {\n FacesContext fc = FacesContext.getCurrentInstance();\n HttpSession session = (HttpSession) fc.getExternalContext().getSession(false);\n session.setAttribute(\"orderId\", \"\" + orderId);\n }",
"public void setCod_admin(int cod_admin) {\r\n this.cod_admin = cod_admin;\r\n }",
"public void setCode(String code){\n\t\tthis.code = code;\n\t}",
"public void setCodigoPosse(String codigoPosse) {\n this.codigoPosse = codigoPosse;\n }",
"public void setCode(final int code) {\n this.code = code;\n commited = true;\n }",
"public PromoCodeAlreadyExistsException (Promo promo_input)\n {\n super(\"Promo Code: \");\n this.promo_error=promo_input;\n }",
"BeanPedido crearPedido(BeanCrearPedido pedido);",
"void autofinanciarPoliza(AutofinanciarPolizaCancelCommand datosPoliza);",
"public void setCodDepartamento(String codDepartamento);",
"public void setCodigo(java.lang.Integer codigo) {\r\n this.codigo = codigo;\r\n }",
"public void setCode(BizCodeEnum code) {\n this.code = code;\n }",
"public int getCodigo_producto() {\n return codigo_producto;\n }",
"@Override\n\tpublic boolean doCreate(Orders vo) throws Exception\n\t{\n\t\treturn false;\n\t}"
] | [
"0.64477795",
"0.5949468",
"0.5949468",
"0.5949468",
"0.56040204",
"0.55898273",
"0.55545676",
"0.5526705",
"0.5501165",
"0.54432404",
"0.54370445",
"0.54151756",
"0.5383197",
"0.538052",
"0.53688776",
"0.53656834",
"0.53654593",
"0.5361448",
"0.53377336",
"0.5330913",
"0.5329246",
"0.53239304",
"0.53167176",
"0.53025746",
"0.5290427",
"0.52802974",
"0.52721095",
"0.5264612",
"0.52635336",
"0.5260934",
"0.5253036",
"0.5247711",
"0.5245696",
"0.5235142",
"0.5225473",
"0.52166295",
"0.52122813",
"0.52086097",
"0.5203858",
"0.520295",
"0.5190017",
"0.5187335",
"0.5168992",
"0.515965",
"0.51504076",
"0.51310605",
"0.5124877",
"0.5121048",
"0.51163435",
"0.51132524",
"0.51106954",
"0.5110314",
"0.51079255",
"0.51012146",
"0.5098683",
"0.5096878",
"0.5094737",
"0.5092709",
"0.5087963",
"0.50839293",
"0.5081744",
"0.50807023",
"0.50807023",
"0.508044",
"0.50685143",
"0.50672615",
"0.5066641",
"0.506533",
"0.5060532",
"0.5058799",
"0.5056591",
"0.50536495",
"0.50522506",
"0.5052244",
"0.5047347",
"0.50438714",
"0.5041885",
"0.5036505",
"0.50267667",
"0.50170577",
"0.50161564",
"0.50139517",
"0.50139517",
"0.50136197",
"0.5012806",
"0.50095737",
"0.5006439",
"0.50028473",
"0.500207",
"0.50010115",
"0.4996193",
"0.49909815",
"0.4988522",
"0.49798703",
"0.49798477",
"0.49757454",
"0.49752507",
"0.49719018",
"0.49710685",
"0.49704936"
] | 0.7107849 | 0 |
Methode qui verifie si une commande a deja ete acceptee par un livreur | boolean checkOrderNotAcceptedYet(int idOrder); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void lance() {\n\t\tthis.laRequete.ecrireMessage(\"202\",\" Commande Non implementee\"); //502 ou 202?\n\t\tthis.laRequete.ecrireLog(\"Commande Non implementee\");\n\t}",
"@Given(\"En tant qu utilisateur je souhaite acceder au bon de commande afin de valider ma commande\")\n\tpublic void en_tant_qu_utilisateur_je_souhaite_acceder_au_bon_de_commande_afin_de_valider_ma_commande() {\n\t throw new PendingException();\n\t}",
"public final boolean isNeedParseeErrorMsg() {\r\n return getCommand() == 10;\r\n }",
"public void Pedircarnet() {\n\t\tSystem.out.println(\"solicitar carnet para verificar si es cliente de ese consultorio\");\r\n\t}",
"public void verifierSaisie(){\n boolean ok = true;\n\n // On regarde si le client a ecrit quelque chose\n if(saisieMessage.getText().trim().equals(\"\"))\n ok = false;\n\n if(ok)\n btn.setEnabled(true); //activer le bouton\n else\n btn.setEnabled(false); //griser le bouton\n }",
"@Override\n\tpublic boolean verificarCancelar() {\n\t\treturn true;\n\t}",
"@When(\"je clique sur le bouton Valider ma commande\")\n\tpublic void je_clique_sur_le_bouton_Valider_ma_commande() {\n\t throw new PendingException();\n\t}",
"@Override\r\n\tpublic boolean seLanceSurServiteurProprietaire() {\n\t\treturn false;\r\n\t}",
"@Override\n public void accept(String error) {\n Toast.makeText(EtudiantSemestreActivity.this, error, Toast.LENGTH_SHORT).show();\n }",
"public boolean erreurStandard1() {\r\n\t\t\t\r\n\t\t\t//Initialisation du booléen, identification des champs à vérifer \r\n\t\t\tboolean verif = false;\r\n\t\t\tWebElement messageErreur = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//div[.='Out of range (>= 0).']\")));\r\n\t\t\t\r\n\t\t\t//Vérification\r\n\t\t\tif (messageErreur.isDisplayed()) {\r\n\t\t\t\tverif = true;\r\n\t\t\t}\r\n\t\t\treturn verif;\r\n\t\t}",
"public boolean wasOkay();",
"private boolean verifyInput() {\r\n double comp = 0;\r\n try {\r\n comp = Double.parseDouble(compensation.getText());\r\n } catch (NumberFormatException e) {\r\n showAlert(Alert.AlertType.ERROR, \"Error while trying to send reply\", \"Compensation must be a number.\");\r\n return false;\r\n }\r\n\r\n if(comp < 0 || comp > MAX_COMPENSATION) {\r\n showAlert(Alert.AlertType.ERROR, \"Error while trying to send reply\", \"Compensation must be between 0 and \" + MAX_COMPENSATION + \".\");\r\n return false;\r\n }\r\n\r\n if(reply.getText().isEmpty()) {\r\n showAlert(Alert.AlertType.ERROR, \"Error while trying to send reply\", \"Reply body empty.\");\r\n return false;\r\n }\r\n\r\n if(complaintListView.getSelectionModel().isEmpty()) {\r\n showAlert(Alert.AlertType.ERROR, \"Error while trying to send reply\", \"No complaint selected.\");\r\n return false;\r\n }\r\n\r\n if(complaintListView.getSelectionModel().getSelectedItem().getStatus() != Complaint.Status.FILED) {\r\n showAlert(Alert.AlertType.ERROR, \"Error while trying to send reply\", \"Cannot reply to an already closed complaint.\");\r\n return false;\r\n }\r\n\r\n return true;\r\n }",
"private void checkExecutionStatus() {\r\n\t\tif (detenido) {\r\n\t\t\tthrow new RejectedExecutionException(\"el procesador está detenido. no puede aceptar más tareas\");\r\n\t\t}\r\n\t}",
"@Override\n public boolean valida() {\n mediatorCredito m = new mediatorCredito();\n try{\n BigInteger dit = new BigInteger(JOptionPane.showInputDialog(null,\"Digite su número de \"\n + \"tarjeta de crédito\",\"\"));\n String pag = JOptionPane.showInputDialog(null,\"Ingrese su medio de pago: (Visa, master Card\"\n + \", American Express)\",\"\");\n if(m.verificarForm(dit, pag)==false){\n JOptionPane.showMessageDialog(null,\"ups, el medio de pago o la tarjeta de crédito no es válido\"\n ,\"Error\",0);\n }\n return m.verificarForm(dit, pag);\n \n }catch(Exception e){\n JOptionPane.showMessageDialog(null,\"Acción cancelada\",\"Advertencia\",2);\n return false;\n }\n }",
"private boolean checkListino() {\n /* variabili e costanti locali di lavoro */\n boolean ok = false;\n Date dataInizio;\n Date dataFine;\n AddebitoFissoPannello panServizi;\n\n try { // prova ad eseguire il codice\n dataInizio = this.getDataInizio();\n dataFine = this.getDataFine();\n panServizi = this.getPanServizi();\n ok = panServizi.checkListino(dataInizio, dataFine);\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n /* valore di ritorno */\n return ok;\n }",
"boolean isBadCommunication();",
"public boolean erreurStandard2() {\r\n\t\t\t\r\n\t\t\t//Initialisation du booléen, identification des champs à vérifer \r\n\t\t\tboolean verif = false;\r\n\t\t\tWebElement messageErreur = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//div[.='Out of range (0 ~ 59).']\")));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Vérification\r\n\t\t\tif (messageErreur.isDisplayed()) {\r\n\t\t\t\tverif = true;\r\n\t\t\t}\r\n\t\t\treturn verif;\r\n\t\t}",
"int isProduitFormateUniteValide(ProduitFormate produitFormate, Uniteproduit uniteproduit);",
"public boolean textVacio(JTextField txtDNI, JPasswordField pwsPass, JTextField txtNom,\n JTextField txtApe, JTextField txtTele, JTextField txtCorreo, JComboBox cbx, JLabel lblMensaje) {\n\n try {\n\n boolean veri = txtDNI.getText().trim().isEmpty() || pwsPass.getText().trim().isEmpty() || txtNom.getText().trim().isEmpty()\n || txtApe.getText().trim().isEmpty() || txtTele.getText().trim().isEmpty() || txtCorreo.getText().trim().isEmpty()\n || cbx.getSelectedIndex() == 0;\n\n if (veri == true) {\n lblMensaje.setText(\"TODOS LOS CAMPOS SON NECESARIOS\".toUpperCase());\n return true;\n } else {\n lblMensaje.setText(\"\".toUpperCase());\n return false;\n }\n } catch (Exception e) {\n System.err.println(\"Erro bro :(\");\n }\n return true;\n }",
"public boolean procesarOrdenCompra(OrdenCompra oc) {\n boolean resultado = false;\n try {\n controlOC = new ControlOrdenCompra();\n bitacora.info(\"Registro OrdenCompra Iniciado correctamente\");\n resultado = controlOC.agregarOrden(oc);\n } catch (IOException ex) {\n bitacora.error(\"No se pudo iniciar el registro OrdenCompra por \" + ex.getMessage());\n } finally {\n return resultado;\n }\n }",
"final void checkForComodification() {\n\t}",
"public boolean pregunta(){\n int d = JOptionPane.showConfirmDialog(null, \"¿Desea escribir otra palabra?\", \"¿Escribir?\", JOptionPane.YES_NO_OPTION);\n if (d == 0) {\n return true;\n }else if (d == 1) {\n return false;\n }\n return false;\n }",
"boolean isAccepting();",
"boolean hasErrmsg();",
"public IRecepteur quiEstEnDessous();",
"private void verificaIdade() {\r\n\t\thasErroIdade(idade.getText());\r\n\t\tisCanSave();\r\n\t}",
"private boolean promptCommand() {}",
"public boolean ejecutarDescartar();",
"boolean isStatusSuspensao();",
"boolean hasCommand();",
"boolean hasCommand();",
"@Override\r\n\tpublic boolean cadastrar(Loja loja) {\n\t\treturn false;\r\n\t}",
"protected boolean verificaRedirecionamentoEsquema(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\t\n \tPlcMsgUtil msgUtil = PlcCDIUtil.getInstance().getInstanceByType(PlcMsgUtil.class, QPlcDefaultLiteral.INSTANCE);\n \t\n \tif (request.getSession().getServletContext().getAttribute(PlcConstants.STARTUP)!=null) {\n \t\t\n \t\tmsgUtil.msg(PlcBeanMessages.JCOMPANY_SCHEMA_SCRIPT_STARTUP, PlcMessage.Cor.msgAmareloPlc.toString()); \t\t\n \t\t\n \t\tif (request.getRequestURI()!=null && request.getRequestURI().indexOf(\"/res-plc/esquema\") < 0 ) { \t\t\t\n\t\t\t\tresponse.sendRedirect(request.getContextPath()+\"/f/t/res-plc/esquema?evento=x\");\n \t\t}\n \t}\n \t\n \t\treturn true;\n\t}",
"public boolean deposito(int idConta, double quantia) {\n try {\n Conta conta = new Conta(idConta); //deveria poder fazer isto\n boolean executado = conta.depositoConta(quantia);\n System.out.println(executado ? \"Deposito efetuado com sucesso.\" : \"Erro ao Efeuar o Deposito\" );\n return executado;\n } catch (Exception e) {\n System.out.println(\"Erro no serviço deposito: \" + e.getMessage());\n return false;\n } \n}",
"private boolean checkExecution() {\n if (!checkPhoneStatusOK()) {\n return false;\n }\n if (!checkBatteryLevelOK()) {\n return false;\n }\n return true;\n }",
"private void verificaUnicitaAccertamento() {\n\t\t\n\t\t//chiamo il servizio ricerca accertamento per chiave\n\t\tRicercaAccertamentoPerChiave request = model.creaRequestRicercaAccertamento();\n\t\tRicercaAccertamentoPerChiaveResponse response = movimentoGestioneService.ricercaAccertamentoPerChiave(request);\n\t\tlogServiceResponse(response);\n\t\t// Controllo gli errori\n\t\tif(response.hasErrori()) {\n\t\t\t//si sono verificati degli errori: esco.\n\t\t\taddErrori(response);\n\t\t} else {\n\t\t\t//non si sono verificatui errori, ma devo comunque controllare di aver trovato un accertamento su db\n\t\t\tcheckCondition(response.getAccertamento() != null, ErroreCore.ENTITA_NON_TROVATA.getErrore(\"Movimento Anno e numero\", \"L'impegno indicato\"));\n\t\t\tmodel.setAccertamento(response.getAccertamento());\n\t\t}\n\t}",
"boolean hasMsg();",
"boolean isQuantiteProduitDisponible(ProduitFormateUnite produitFormateUnite, int quantite);",
"@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 }",
"boolean hasErrormessage();",
"public boolean procesarPedido(Pedido p) {\n try {\n this.controlPedido = new ControlPedido();\n bitacora.info(\"Registro Pedido Iniciado correctamente\");\n } catch (IOException ex) {\n bitacora.error(\"No se pudo iniciar el registro Pedido por \" + ex.getMessage());\n } finally {\n return this.controlPedido.agregarUnPedido(p);\n }\n }",
"private static boolean isDone0(Object result)\r\n/* 74: */ {\r\n/* 75:110 */ return (result != null) && (result != UNCANCELLABLE);\r\n/* 76: */ }",
"private void B_InscrireActionPerformed(java.awt.event.ActionEvent evt) {\n \n String ident=T_Email.getText();\n String mdp1=String.valueOf(Ps_Mdp.getPassword());\n String mdp2=String.valueOf(Ps_ConfirmeMdp.getPassword());\n String prenom_uti=prenom.getText();\n String nom_uti=nom.getText();\n \n boolean ajout;\n \n if (mdp1.equals(mdp2)){\n System.out.println(\"Les deux mots de passe correspondent\");\n Bdd bdd = new Bdd();\n \n //On vérifie que l'utilisateur existe pas déjà\n boolean exists = bdd.liste_uti(ident);\n \n if(exists==true){ //alors on ajoute\n bdd.Inscription(ident,mdp1,prenom_uti,nom_uti);\n AffichageConnexion Aff = new AffichageConnexion();\n Aff.setLocationRelativeTo(null);\n Aff.setVisible(true);\n this.dispose();\n }\n else {\n System.out.println(\"existe déjà\");\n } \n }\n else \n System.out.println(\"mdp diff\");\n }",
"private boolean verifica(){\n if(et_nomeAddFamiliar.getText().length()>3 && spinnerParentesco.getSelectedItemPosition()>0){\n return true;\n }\n else return false;\n\n }",
"@Override\n\tpublic void dialogar() {\n\t\tSystem.out.println(\"Ofrece un Discurso \");\n\t\t\n\t}",
"@Override\n\tpublic boolean verificarMensaje(String mensaje) {\n\t\tboolean reenvio = false;\n\t\tSystem.out.println(mensaje.length());\n\t\tSystem.out.println(\"Mensaje recibido: \"+ mensaje);\n\t\tString lectura = mensaje.substring(0, 12);\n\t\tSystem.out.println(\"Inicio de trama: \"+lectura);\n\t\tif (lectura.equals(inicioTrama)) {\n\t\t\tlectura = mensaje.substring(12, 14);\n\t\t\tSystem.out.println(\"Tpo de trama: \"+lectura);\n\t\t\tif (lectura.equals(\"01\")) {\n\t\t\t\treenvio = tipoTrama01(mensaje);\n\t\t\t}\n\t\t}\n\t\treturn reenvio;\n\t}",
"public abstract boolean confirm();",
"public void verificar_que_se_halla_creado() {\n\t\t\n\t}",
"public boolean handleLCA(String command) {\n boolean result = false;\n\n String patt = \".txt was sent successfully\";\n String res = agent.findPattern(command, patt);\n JLog.logger.info(\"res: \" + res);\n if (res == null)\n return false;\n Vector<String> logFiles = extractFileNames(res, \"dla_\", \".txt\");\n for (int i = 0; i < logFiles.size(); i++) {\n res = lennyActions.numLinesinFile(scp_path + logFiles.elementAt(i), EP_Syslog_pattern);\n JLog.logger.info(\"res: \" + res);\n if ((null != res) && (res.contains(right_result)))\n result = true;\n else {\n result = false;\n break;\n }\n }\n return result;\n }",
"public boolean procesarTransferencia(Transferencia trans) {\n boolean resultado = false;\n try {\n controlTransferencia = new ControlTransferencia();\n bitacora.info(\"Registro Transferencia Iniciado correctamente papapa\");\n resultado = controlTransferencia.agregarTransferencia(trans);\n } catch (IOException ex) {\n bitacora.error(\"No se pudo iniciar el registro Transferencia por \" + ex.getMessage());\n } finally {\n return resultado;\n }\n }",
"@Test\n\tpublic void checkStatus() {\n\t\tclient.execute(\"1095C-16-111111\");\n\t}",
"private boolean canSend() {\n\n if (StringUtils.isEmpty(constructedCommand())) return false;\n\n int beginIndex = constructedCommand()\n .indexOf(serialProperties.getCmdBeginMarker());\n int endIndex = constructedCommand()\n .indexOf(serialProperties.getCmdEndMarker());\n\n return beginIndex != -1 && endIndex != -1 && beginIndex < endIndex;\n }",
"int isProduitFormateUniteUniqueInPointvente(ProduitFormate produitFormate, Uniteproduit uniteproduit);",
"public boolean test(CommandListenerWrapper wrapper) {\n/* 48 */ return this.command.testPermissionSilent(wrapper.getBukkitSender());\n/* */ }",
"private void verificar_comando(String comando, InterfazRemota interfaz, int puerto) {\n\tString cmd[] = comando.split(\"[\\\\s]+\");\n\tString aux[];\n\tString servidor;\n\tString archivo;\n\n\tif (cmd[0].equalsIgnoreCase(\"C\") && cmd.length == 3){\n\t if (cmd[1].equalsIgnoreCase(\"-t\") || cmd[1].equalsIgnoreCase(\"-k\")){\n\t\ttry {\n\t\t SalidaDFS salida = interfaz.dfs_distribuido(cmd[1] + \" \" + cmd[2], new Vector<String>());\n\t\t if ((salida.resultado).equals(\"\")){\n\t\t\tSystem.out.println(\"No hubo resultados \\n\");\n\t\t }\n\t\t else {\n\t\t\tSystem.out.println(salida.resultado);\n\t\t }\n\t\t \n\t\t}\n\t\tcatch (java.rmi.RemoteException r) {\n\t\t System.err.println(\"No se pudo establecer conexion con el servidor\");\n\t\t}\n\t\tfinally {\n\t\t return;\n\t\t}\n\t }\n\t /* Comando invalido */\n\t else System.out.println(\"Codigo Invalido\");\n\t}\n\t/* Solicitar una foto */\n\telse if (cmd[0].equalsIgnoreCase(\"D\") && cmd.length == 2 && cmd[1].matches(\"[\\\\S]+[:][\\\\S]+jpg\")){\n\t aux = cmd[1].split(\":\");\n\t servidor = aux[0];\n\t archivo = aux[1];\n\t try {\n\t\tInterfazRemota transferencia = null;\n\t\t\n\t\ttry {\n\t\t transferencia = (InterfazRemota)java.rmi.Naming.lookup(\"//\" + servidor + \":\" + puerto + \"/fotop2p\");\n\t\t}\n\t\tcatch (NotBoundException e) {\n\t\t System.err.println(\"No existe el servicio solicitado en \" + servidor + \":\" + puerto);\n\t\t System.exit(-1);\n\t\t}\n\t\tcatch (MalformedURLException m) {\n\t\t System.err.println(\"No se pudo establecer conexion con el servidor: URL incorrecta\");\n\t\t System.exit(-1);\n\t\t}\n\t\tcatch (java.rmi.RemoteException r) {\n\t\t System.err.println(\"No se pudo establecer conexion con el servidor\");\n\t\t System.exit(-1);\n\t\t}\n\n\t\tbyte [] foto = transferencia.archivo_a_bytes(archivo);\n\t\t\n\t\tif (foto == null) {\n\t\t System.out.println(\"Foto no encontrada o error al abrirla en el servidor\");\n\t\t}\n\t\telse {\n\t\t FileOutputStream fos = new FileOutputStream(\"./\" + archivo);\n\t\t BufferedOutputStream bos = new BufferedOutputStream(fos);\n\t\t bos.write(foto,0,foto.length);\n\t\t System.out.println(\"Foto recibida exitosamente \\n\");\n\n\t\t}\n\t }\n\t catch (java.rmi.RemoteException r) {\n\t\tSystem.err.println(\"No se pudo establecer conexion con el servidor\");\n\t }\n\t catch(IOException i) {\n\t\tSystem.err.println(\"Error al escribir el archivo\");\n\t }\n\t finally {\n\t\treturn;\n\t }\n\t}\n\t/* obterner numero de alcanzables */\n\telse if (cmd[0].equalsIgnoreCase(\"A\") && cmd.length == 1){\n\t try {\n\t\tVector<String> alc = interfaz.alcanzables(new Vector<String>());\n\t\tSystem.out.println(\"Alcanzables: \" + alc.size());\n\t }\n\t catch (java.rmi.RemoteException r) {\n\t\tSystem.out.println(\"No se pudo establecer conexion con el servidor\");\n\t\t\n\t\tSystem.out.println(r.getMessage());\n\t\tr.printStackTrace();\n\t }\n\t finally {\n\t\treturn;\n\t }\n\t}\n\t/* Salir */\n\telse if (cmd[0].equalsIgnoreCase(\"Q\") && cmd.length == 1 ){\n\t System.out.println(\"Chao\");\n\t System.exit(0);\n\t}\n \telse {\n\t System.out.println(\"Comando Invalido\");\n\t return;\n\t}\n }",
"String[] checkIfLegalCommand(String strToChck);",
"public boolean ajouterCommande(Commande commande) {\n\t\tString query = \"SELECT * FROM commande WHERE code_menu = ? AND id_restaurateur = ? AND id_client= ?\";\n\t\tPreparedStatement st = null;\n\t\tResultSet r = null;\n\t\tboolean exist = false;\n\t\tboolean b = false;\n\t\ttry {\n\t\t\tst = this.Connect.prepareStatement(query);\n\t\t\tst.setInt(1, commande.getCode_menu());\n\t\t\tst.setInt(2, commande.getId_restaurateur());\n\t\t\tst.setInt(3, commande.getId_client());\n\n\t\t\tr = st.executeQuery();\n\t\t\tif (r.next())\n\t\t\t\texist = true;\n\t\t\tst.close();\n\t\t\tr.close();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// pour ajouter de commande\n\t\tif (!exist) {\n\t\t\tquery = \"INSERT INTO commande(id_client, code_menu, id_restaurateur, date, prix) VALUES (?, ?, ?, ?, ?)\";\n\t\t\tst = null;\n\t\t\tint rs = 0;\n\n\t\t\tLocalDate commandeDate = LocalDate.now();\n\t\t\tDateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"[yyyy-MM-dd]\");\n\n\t\t\tjava.util.Date date2 = java.sql.Date.valueOf(LocalDate.parse(\"2021-03-04\", formatter));\n\n\t\t\ttry {\n\n\t\t\t\tst = this.Connect.prepareStatement(query);\n\t\t\t\tst.setInt(1, commande.getId_client());\n\t\t\t\tst.setInt(2, commande.getCode_menu());\n\t\t\t\tst.setInt(3, commande.getId_restaurateur());\n\t\t\t\tst.setDate(4, (Date) date2);\n\t\t\t\tst.setInt(5, commande.getPrix());\n\t\t\t\trs = st.executeUpdate();\n\t\t\t\tst.close();\n\t\t\t\tthis.ajouterCinqPoints(this.getClientById(commande.getId_client()));\n\t\t\t\tb = true;\n\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\treturn b;\n\t}",
"boolean hasRemsg();",
"boolean hasErr();",
"protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please specify the path to the RhapsodyCL.exe file\");\n else if(!value.contains(\"RhapsodyCL.exe\")) {\n \terror(\"didn't find RhapsodyCL.exe in the path !\");\n }else{\n \tok(); \t\n }\n }",
"private boolean validacionesSolicitarReserva(int indice, int CodEmp, int CodLoc, int CodCot, boolean isSol){\n boolean blnRes=true;\n try{\n if(!validaItemsServicio(CodEmp, CodLoc, CodCot)){\n blnRes=false;\n MensajeInf(\"La cotizacion contiene Items de Servicio o Transporte, los cuales no deben ser reservados.\");\n }\n\n if(!validaFechasMAX(indice, tblDat.getValueAt(indice,INT_TBL_DAT_STR_TIP_RES_INV).toString(),isSol)){\n blnRes=false;\n MensajeInf(\"La Fecha solicitada es mayor a la permitida, revise la Fecha y vuelva a intentarlo\");\n }\n \n if(!validaTerminalesLSSegunEmpresaLocal(CodEmp,CodLoc,CodCot)){\n blnRes=false;\n MensajeInf(\"No puede solicitar reserva de codigos L/S en este local, debe reservarlo por el local que puede ser facturado\");\n }\n \n if(!validaFechasPrimerDiaLaboral(indice,isSol,CodEmp,CodLoc)){\n blnRes=false;\n MensajeInf(\"La Fecha solicitada, no corresponde al primer dia laboral registrado\");\n } \n \n if(tblDat.getValueAt(indice,INT_TBL_DAT_STR_TIP_RES_INV).toString().equals(\"R\")){\n if(!validaTerminalesLReservaLocal(CodEmp,CodLoc,CodCot)){\n blnRes=false;\n MensajeInf(\"No puede solicitar Reserva en Empresa de Codigos L \");\n }\n }\n }\n catch(Exception e){\n objUti.mostrarMsgErr_F1(null, e);\n blnRes=false;\n }\n return blnRes;\n }",
"boolean getIsOk();",
"private boolean validate(boolean warn) {\n try {\n newOne = getClientFromForm();\n if (warn) {\n ChequeMate.showSuccessMessage(this, \"Todos os valores foram validados com sucesso.\");\n }\n return true;\n } catch (ChequeMateException ex) {\n ex.showExceptionMessage();\n return false;\n }\n }",
"public boolean isSuccess()\r\n/* 79: */ {\r\n/* 80:115 */ Object result = this.result;\r\n/* 81:116 */ if ((result == null) || (result == UNCANCELLABLE)) {\r\n/* 82:117 */ return false;\r\n/* 83: */ }\r\n/* 84:119 */ return !(result instanceof CauseHolder);\r\n/* 85: */ }",
"private boolean isAvailable(String ten, int soTien) {\n boolean result = true;\n if(ten.equals(\"\")){\n notifyError(txtfTenChiPhi);\n result = false;\n }\n if(soTien <= 0){\n notifyError(txtfSoTien,\"Số tiền phải dương!\");\n result = false;\n } \n return result;\n }",
"public synchronized void abilitarAbordaje() {\n abordar = true;\r\n notifyAll();\r\n while(pedidoAbordaje != 0){//Mientras los pasajeros esten abordando\r\n try {\r\n wait();\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(Vuelo.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n //Cuando los pasajeros hayan abordado el vuelo sale\r\n salio = true;\r\n System.out.println(\"El vuelo \" + nro + \" de \" + aerolinea + \" ha despegado\");\r\n }",
"@Override\n\tpublic boolean estVide() {\n\t\treturn getNbClients()==0;\n\t}",
"boolean hasExitStatus();",
"public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }",
"boolean isSuccessful();",
"private boolean validaSituacao() {\r\n\t\treturn Validacao.validaSituacao((String) this.situacao.getSelectedItem()) != 0;\r\n\t}",
"private void msgNoServidorConfigurado() {\r\n\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n\tbuilder.setMessage(R.string.txtSinServidor).setCancelable(false)\r\n\t\t.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\r\n\t\t public void onClick(DialogInterface dialog, int id) {\r\n\t\t\tListaRutasActivity.this.finish();\r\n\t\t }\r\n\t\t});\r\n\tAlertDialog alert = builder.create();\r\n\talert.show();\r\n }",
"public void act() \n {\n verificaClique();\n }",
"@Override\n\tprotected boolean isOkToExecute()\n\t{\n\n\t\tif((super.isOkToExecute())\n\t\t\t&& isColumAvailable(IPersistentObject.R_OBJECT_ID))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\tMessageView.getInstance().addMessage(\n\t\t\tConnectionView.getInstance().getSelectedConnection().getTag()\n\t\t\t\t+ \" No '\" + IPersistentObject.R_OBJECT_ID //$NON-NLS-1$\n\t\t\t\t+ \"' column found.\"); //$NON-NLS-1$\n\t\treturn false;\n\t}",
"public abstract void actualiserNbErreur(int nbErreur) throws RemoteException;",
"private boolean checkCanModifyStatus() {\r\n \r\n RequesterBean requesterBean = new RequesterBean();\r\n ResponderBean responderBean = new ResponderBean();\r\n try{\r\n requesterBean.setFunctionType('c');\r\n String connectTo = CoeusGuiConstants.CONNECTION_URL + \"/rolMntServlet\";\r\n AppletServletCommunicator ascomm = new AppletServletCommunicator(connectTo,requesterBean);\r\n ascomm.setRequest(requesterBean);\r\n ascomm.send();\r\n responderBean = ascomm.getResponse(); \r\n \r\n }catch(Exception e) {\r\n CoeusOptionPane.showErrorDialog(e.getMessage());\r\n }\r\n return (Boolean)responderBean.getDataObject();\r\n }",
"boolean isSetStatus();",
"@Override\n\tpublic String check() throws RemoteException {\n\t\tString msg = \"\";\n\t\tfor (int i = 0; i < chathistory.size(); i++) {\n\t\t\tmsg += chathistory.get(i).getMessage();\n\t\t}\n\t\treturn msg;\n\t}",
"public abstract boolean repOk();",
"public boolean handleSIEM(String command) {\n boolean result = false;\n String patt = \".zip was sent successfully\";\n String res = agent.findPattern(command, patt);\n JLog.logger.info(\"res: \" + res);\n if (res == null)\n return false;\n Vector<String> zipFiles = extractFileNames(res, \"dla_\", \".zip\");\n\n for (int i = 0; i < zipFiles.size(); i++) {\n res = lennyActions.numLinesinFile(scp_path + zipFiles.elementAt(i), EP_Syslog_pattern);\n JLog.logger.info(\"res: \" + res);\n if ((null != res) && (res.contains(right_result)))\n result = true;\n else {\n result = false;\n break;\n }\n }\n return result;\n }",
"public boolean ajouterCompte(String nom, String prenom, String mdp, String email, String numrue, String codeP, String ville);",
"private boolean partAvailable(Piece piece) {\n boolean temp = false;\r\n try {\r\n temp = repairAreaInt.partAvailable(piece, id);\r\n } catch (RemoteException e) {\r\n System.err.println(\"Excepção na invocação remota de método\" + getName() + \": \" + e.getMessage() + \"!\");\r\n System.exit(1);\r\n }\r\n return temp;\r\n }",
"private static boolean valid(String arg) {\n\n /* check if valid option */\n if ( arg.equals(\"-v\") || arg.equals(\"-i\") || arg.equals(\"-p\") || arg.equals(\"-h\") )\n return true;\n\n /* check if valid port */\n try {\n int port = Integer.parseInt(arg);\n if ( ( 0 < port ) && ( port < 65354 ) )\n return true;\n } catch (NumberFormatException ignored) {}\n\n /* check if valid ip address */\n String[] ips = arg.split(\"\\\\.\");\n if ( ips.length != 4 )\n return false;\n try{\n for (int i=0; i<4; i++){\n int ip = Integer.parseInt(ips[i]);\n if ( ( ip < 0) || (255 < ip ) )\n return false;\n }\n } catch (NumberFormatException ignored) {return false;}\n\n return true;\n }",
"public abstract void actualiserLettre(char lettre, boolean valide, String message) throws RemoteException;",
"public abstract boolean esComestible();",
"@Override\n public int iniciar(){\n \n try {\n Process proceso;\n proceso = Runtime.getRuntime().exec(\"/etc/init.d/\"+nombreServicio+\" start\");\n InputStream is = proceso.getInputStream(); \n BufferedReader buffer = new BufferedReader (new InputStreamReader (is));\n String resultado = buffer.readLine();\n \n if(resultado.contains(\"Starting \"+nombreServicio)){\n return 1;\n }\n } \n catch (IOException ex) {\n Logger.getLogger(Servicio.class.getName()).log(Level.SEVERE, null, ex);\n }\n return 0;\n }",
"public boolean isEligible() throws Exception {\n Long commandId = getMainEvent().getEligibilityCommandId();\n \n // by default is eligible\n if (commandId == null) {\n return true;\n }\n \n Command cmd = (Command) createEJB(getInitialContext(), Command.class);\n String cmdName = cmd.getCommandDesc(commandId, DBMS.OLTP_DATASOURCE_NAME);\n \n Request r = new Request();\n r.setContentHandle(cmdName);\n \n r.setProperty(\"cr\", String.valueOf(user.getId()));\n r.setProperty(\"eid\", String.valueOf(getEvent().getId()));\n \n Iterator it = new DataAccess(DBMS.OLTP_DATASOURCE_NAME).getData(r).values().iterator();\n \n ResultSetContainer rsc = (ResultSetContainer) it.next();\n \n return !rsc.isEmpty(); \n }",
"protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please type in the License Server\");\n else {\n \t//TODO add more checks\n \tok();\n }\n }",
"boolean hasSendMessage();",
"private boolean checkMsgIntegrity(Connection con, JsonObject json) throws NullPointerException {\n\t\tInvalidMessage response = new InvalidMessage();\n\t\tif (json.get(\"command\") == null) {\n\t\t\tresponse.setInfo(\"No command\");\n\t\t\tcon.writeMsg(response.toJsonString());\n\t\t\treturn false;\n\t\t}\n\t\tswitch (json.get(\"command\").getAsString()) {\n\t\tcase LOGIN:\n\t\t\tif (json.get(\"username\").isJsonNull()) {\n\t\t\t\tresponse.setInfo(\"Not providing correct username\");\n\t\t\t\tcon.writeMsg(response.toJsonString());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\tcase REGISTER:\n\t\t\tif (json.get(\"username\").isJsonNull() || json.get(\"secret\").isJsonNull()) {\n\t\t\t\tresponse.setInfo(\"Not providing correct username or secret\");\n\t\t\t\tcon.writeMsg(response.toJsonString());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\tcase AUTHENTICATE:\n\t\t\tif (json.get(\"secret\").isJsonNull()) {\n\t\t\t\tresponse.setInfo(\"Not providing secret\");\n\t\t\t\tcon.writeMsg(response.toJsonString());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\tcase ACTIVITY_MESSAGE:\n\t\t\tif (json.get(\"username\").isJsonNull() || json.get(\"activity\").isJsonNull()) {\n\t\t\t\tresponse.setInfo(\"Activity message not complete\");\n\t\t\t\tcon.writeMsg(response.toJsonString());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\tcase SERVER_ANNOUNCE:\n\t\t\tif (json.get(\"hostname\").isJsonNull() || json.get(\"port\").isJsonNull() || json.get(\"load\").isJsonNull()\n\t\t\t\t\t|| json.get(\"id\").isJsonNull()) {\n\t\t\t\tresponse.setInfo(\"Not providing correct server info\");\n\t\t\t\tcon.writeMsg(response.toJsonString());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\tcase ACTIVITY_BROADCAST:\n\t\t\tif (json.get(\"activity\").isJsonNull()) {\n\t\t\t\tresponse.setInfo(\"No activity\");\n\t\t\t\tcon.writeMsg(response.toJsonString());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\tcase LOCK_REQUEST:\n\t\t\tif (json.get(\"username\").isJsonNull() || json.get(\"secret\").isJsonNull()) {\n\t\t\t\tresponse.setInfo(\"Not providing username or secret correctly\");\n\t\t\t\tcon.writeMsg(response.toJsonString());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\tcase LOCK_ALLOWED:\n\t\t\tif (json.get(\"username\").isJsonNull() || json.get(\"secret\").isJsonNull()) {\n\t\t\t\tresponse.setInfo(\"Not providing username or secret correctly\");\n\t\t\t\tcon.writeMsg(response.toJsonString());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\tcase LOCK_DENIED:\n\t\t\tif (json.get(\"username\").isJsonNull() || json.get(\"secret\").isJsonNull()) {\n\t\t\t\tresponse.setInfo(\"Not providing username or secret correctly\");\n\t\t\t\tcon.writeMsg(response.toJsonString());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\tcase LOGOUT:\n\t\t\treturn true;\n\t\tcase INVALID_MESSAGE:\n\t\t\tcon.closeCon();\n\t\t\treturn false;\n\t\tdefault:\n\t\t\tresponse.setInfo(\"No such command\");\n\t\t\tcon.writeMsg(response.toJsonString());\n\t\t\tcon.closeCon();\n\t\t\treturn false;\n\t\t}\n\n\t}",
"boolean hasServiceCmd();",
"@Override\n public Object execute(TransitionSystem ts, Unifier un, Term[] args) throws Exception {\n ts.getAg().getLogger().info(\"executing internal action '<PCK>.warningDialog'\");\n String text=args[0].toString();\n Dialog d=new Dialog(text);\n d.setVisible(true);\n // everything ok, so returns true\n return true;\n }",
"public boolean sucheMitspieler();",
"boolean hasError();",
"boolean hasError();",
"boolean hasError();",
"public boolean indietro();",
"public boolean verificaNumero() {\n if (contemSomenteNumeros(jTextFieldDeposita.getText()) || contemSomenteNumeros(jTextFieldSaca.getText())\n || contemSomenteNumeros(jTextFieldTransfere.getText())) {\n return true;\n } else {\n JOptionPane.showMessageDialog(this, \"Digite somente números, por favor. \", \"Atenção !!\", JOptionPane.ERROR_MESSAGE);\n return false;\n }\n }",
"private void checkResult() {\n if (parent != -1 && (numOfAck == (outgoingLinks.size() - 1))) {\n if (setOfAck.add(this.maxId)) {\n Message message = new Message(this.uid, this.maxId, \"ack\");\n sendTo(message, this.parent);\n }\n if (!termination) {\n marker.addNumOfTerminatedProc();\n termination = true;\n }\n } else if (parent == -1 && (numOfAck == outgoingLinks.size())) {\n System.out.println(this.uid + \" is the leader.\");\n marker.addNumOfTerminatedProc();\n }\n }",
"public boolean execute() {\n if (sc != null && sqlMngr != null) {\n System.out.println(\"\");\n System.out.println(\"***************************\");\n System.out.println(\"******ACCESS GRANTED*******\");\n System.out.println(\"***************************\");\n System.out.println(\"\");\n\n System.out.println(\"Welcome to MyBNB!\");\n System.out.println(\n \"In order to use the system, you must first log into an account.\");\n\n String input = \"\";\n int choice = -1;\n\n boolean loginComplete = false;\n while (!(loginComplete)) {\n loginMenu();\n input = sc.nextLine();\n try {\n choice = Integer.parseInt(input);\n } catch (NumberFormatException exception) {\n System.out.println(\"Invalid option\\n\");\n continue;\n }\n\n switch (choice) {\n case 0:\n System.out.println(\"Goodbye!\");\n System.exit(0);\n break;\n case 1:\n loginComplete = login();\n break;\n case 2:\n loginComplete = signup();\n break;\n default:\n System.out.println(\"Invalid option\\n\");\n break;\n }\n }\n\n if (user instanceof Host) {\n HostMenu.hostMenu((Host) user);\n return true;\n } else {\n RenterMenu.renterMenu((Renter) user);\n return true;\n }\n } else {\n System.out.println(\"\");\n System.out.println(\"Connection could not been established! Bye!\");\n System.out.println(\"\");\n return false;\n }\n }",
"private boolean checkNotCanceledReservation(int id) throws SQLException {\n\t\tcheckNotCanceledReservationStatement.clearParameters();\n\t\tcheckNotCanceledReservationStatement.setInt(1, id);\n\t\tcheckNotCanceledReservationStatement.setString(2, this.username);\n\t\tResultSet result = checkNotCanceledReservationStatement.executeQuery();\n\t\tresult.next();\n\t\tboolean out = result.getInt(1) == 1;\n\t\tif (DEBUG) {\n\t\t\tSystem.out.println(\"checkNotCanceledReservation: \"+result.getInt(1)+\"\\n\");\n\t\t}\n\t\tresult.close();\n\t\treturn out;\n\t}"
] | [
"0.658556",
"0.61318517",
"0.6070521",
"0.6000627",
"0.59333557",
"0.58593583",
"0.57846075",
"0.5765305",
"0.57481",
"0.57319033",
"0.57289875",
"0.57088876",
"0.5703986",
"0.5690878",
"0.56858766",
"0.56713027",
"0.56238145",
"0.5610984",
"0.55764",
"0.551847",
"0.55096793",
"0.5495293",
"0.54932225",
"0.5469437",
"0.5426593",
"0.54263484",
"0.541992",
"0.5397557",
"0.5395299",
"0.539476",
"0.539476",
"0.5382071",
"0.53709096",
"0.53657615",
"0.5364001",
"0.5352422",
"0.5346572",
"0.53461426",
"0.5346105",
"0.5343886",
"0.5338999",
"0.5309626",
"0.52876794",
"0.5280029",
"0.52766055",
"0.5274771",
"0.5270535",
"0.52644134",
"0.5262978",
"0.52557904",
"0.52525765",
"0.5250029",
"0.5243829",
"0.524125",
"0.5236908",
"0.5236024",
"0.52332306",
"0.52312845",
"0.52249295",
"0.5221185",
"0.5216863",
"0.521456",
"0.52143306",
"0.52085584",
"0.5202274",
"0.5201244",
"0.5200557",
"0.5200128",
"0.5192675",
"0.5189886",
"0.5187115",
"0.5170996",
"0.51677555",
"0.51664686",
"0.51662254",
"0.51610893",
"0.5159773",
"0.5153652",
"0.51525545",
"0.5151833",
"0.5149819",
"0.51484317",
"0.5146966",
"0.514292",
"0.5140974",
"0.5140241",
"0.5139998",
"0.51387274",
"0.5137249",
"0.513551",
"0.51287633",
"0.51269686",
"0.512594",
"0.5120508",
"0.5120508",
"0.5120508",
"0.5108415",
"0.51020265",
"0.51018745",
"0.50951225",
"0.5095057"
] | 0.0 | -1 |
Methode qui va assigner une commande au livreur qui veut la prendre en charge | int assignOrderToDelileveryMan(int idOrder, int idDeliveryMan); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void lance() {\n\t\tthis.laRequete.ecrireMessage(\"202\",\" Commande Non implementee\"); //502 ou 202?\n\t\tthis.laRequete.ecrireLog(\"Commande Non implementee\");\n\t}",
"public abstract void actualiserNbErreur(int nbErreur) throws RemoteException;",
"@When(\"je clique sur le bouton Valider ma commande\")\n\tpublic void je_clique_sur_le_bouton_Valider_ma_commande() {\n\t throw new PendingException();\n\t}",
"public void afficher (UneCommande22<Integer> cde){ //POURQUOI CETTE MÉTHODE EST STATIQUE??? LA DEPLACER PE DANS COMMANDE\n\t\t\t\tif(cde.taille()==0) {ClientJava1DateUser.affiche(\"\\n\\t\\t COMMANDE EST VIDE\");\n\t\t\t\t}\n\t\t\t\telse {ClientJava1DateUser.affiche(cde.toString());}\t\n\t\t\t}",
"@Given(\"En tant qu utilisateur je souhaite acceder au bon de commande afin de valider ma commande\")\n\tpublic void en_tant_qu_utilisateur_je_souhaite_acceder_au_bon_de_commande_afin_de_valider_ma_commande() {\n\t throw new PendingException();\n\t}",
"public void estiloError() {\r\n /**Bea y Jose**/\r\n\t}",
"public static void affichageErreur (int codeErreur) {\n\t\tSystem.out.println(\"\\n\\n!!!!!!!!!! ATTENTION !!!!!!!!!!\\n\");\n\t\tString messageErreur;\n\n\t\tswitch (codeErreur) {\n\t\tcase 1 : messageErreur = \"Une ligne comporte moins d'elements que les autres !\"; break;\n\t\tcase 2 : messageErreur = \"Un caractere inconnu a ete detecte !\"; break;\n\t\tcase 3 : messageErreur = \"Le labyrinthe n'a pas une seule entree !\"; break;\n\t\tcase 4 : messageErreur = \"Le labyrinthe n'a pas une seule sortie !\"; break;\n\t\tcase 5 : messageErreur = \"Le labyrinthe n'a pas de filon !\"; break;\n\t\tcase 6 : messageErreur = \"Trop de filons ont été demandés par rapport au nombre de cases vides du labyrinthe !\"; break;\n\t\tdefault : messageErreur = \"Erreur non repertoriee.\"; break;\n\t\t}\n\n\t\tSystem.out.println(messageErreur+\"\\nLe programme va s'interrompre.\");\n\t\tJOptionPane.showMessageDialog(null, messageErreur, \"Erreur\", JOptionPane.ERROR_MESSAGE);\t\t\n\t\tSystem.exit(0);\n\t}",
"public void sendeFehlerHelo();",
"public String createErrorMessage(CommandSender sender, MCommand command);",
"public TemperaturaErradaExcepcion(){\r\n super(\"mensaxe por defecto:temperatura ten que ser naior que 80ºC\");//mensaxe por defecto\r\n }",
"private void ajouterPot (int somme) {\r\n\t\tbanque.ajouter(somme);\r\n\t}",
"private void afficheSuiv(){\n\t\ttry{ // Essayer ceci\n\t\t\tif(numCourant <= rep.taille()){\n\t\t\t\tnumCourant ++;\n\t\t\t\tPersonne e = rep.recherchePersonne(numCourant); // Rechercher la personne en fonction du numCourant\n\t\t\t\tafficherPersonne(e);\n\t\t\t}else{\n\t\t\t\tafficherMessageErreur();\n\t\t\t}\n\t\t}catch(Exception e){ // Permet de voir s'il y a cette exception\n\t\t\tafficherMessageErreur();\n\t\t\tnumCourant --;\n\t\t}\n\t}",
"public void executeCommand (String name) throws CommandeException\n\t{\n\t\t//System.out.println(\"entrer dans execute\");\n\t\t CommandInterface usercommand = listedescommande.get(name);\n\t if (usercommand == null) {\n\t \t//System.out.println(\"erreur de commande\");\n\t throw new CommandeException(name);\n\t }\n\t usercommand.apply();\n\t //System.out.println(\"passe apres interpretreur\");\n\t}",
"@Override\r\n\tpublic void notificationVente(CommandeProduc c) {\n\t}",
"public abstract void actualiserLettre(char lettre, boolean valide, String message) throws RemoteException;",
"private void obtieneError(int error) throws Excepciones{\n String[] err = {\n \"ERROR DE SYNTAXIS\",\n \"PARENTESIS NO BALANCEADOS\",\n \"NO EXISTE EXPRESION\",\n \"DIVISION POR CERO\"\n };\n throw new Excepciones(err[error]);\n}",
"private void executeRicercaAccertamentoPerOrdinativo() {\n \tif (model.getGestioneOrdinativoStep1Model().getAnnoAccertamento() == null || model.getGestioneOrdinativoStep1Model().getNumeroAccertamento() == null) {\n\n \t\tif(!sonoInAggiornamento()){\n \t\t\t\n \t\t\tmodel.getGestioneOrdinativoStep2Model().setListaAccertamento(new ArrayList<Accertamento>());\n \t\t\tmodel.getGestioneOrdinativoStep2Model().setListaAccertamentoOriginale(new ArrayList<Accertamento>());\n \t\t\tmodel.getGestioneOrdinativoStep2Model().setResultSize(0);\n\n \t\t\tRicercaAccertamentiSubAccertamenti request= new RicercaAccertamentiSubAccertamenti();\n \t\t\trequest.setEnte(sessionHandler.getEnte());\n \t\t\trequest.setRichiedente(sessionHandler.getRichiedente());\n\n\n \t\t\tParametroRicercaAccSubAcc param= new ParametroRicercaAccSubAcc();\n \t\t\tparam.setAnnoEsercizio(Integer.parseInt(sessionHandler.getAnnoEsercizio()));\n \t\t\tparam.setAnnoAccertamento(Integer.parseInt(sessionHandler.getAnnoEsercizio()));\n \t\t\tparam.setDisponibilitaAdIncassare(true);\n\n \t\t\t// Capitolo\n \t\t\tif (model.getGestioneOrdinativoStep1Model().getCapitolo() != null) {\n \t\t\t\tparam.setNumeroCapitolo(model.getGestioneOrdinativoStep1Model().getCapitolo().getNumCapitolo());\n \t\t\t\tparam.setNumeroArticolo(model.getGestioneOrdinativoStep1Model().getCapitolo().getArticolo());\n \t\t\t\tif(null!=model.getGestioneOrdinativoStep1Model().getCapitolo().getUeb()){\n \t\t\t\t\tparam.setNumeroUEB(model.getGestioneOrdinativoStep1Model().getCapitolo().getUeb().intValue());\n \t\t\t\t}\n \t\t\t}\n\n\n \t\t\tparam.setCodiceDebitore(model.getGestioneOrdinativoStep1Model().getSoggetto().getCodCreditore());\n \t\t\tparam.setIsRicercaDaAccertamento(false);\n \t\t\trequest.setParametroRicercaAccSubAcc(param);\n\n\n \t\t\taddNumAndPageSize(request, \"listaAccertamentoOrdinativoId\");\n\n \t\t\tRicercaAccertamentiSubAccertamentiResponse response= movimentoGestionService.ricercaAccertamentiSubAccertamentiPerOrdinativoIncasso(request);\n\n \t\t\tif(response.isFallimento() || !response.getErrori().isEmpty()){\n\n \t\t\t\t//setto gli errori cosi che siano segnalati lato app!\n \t\t\t\taddErrori(response.getErrori());\n\n \t\t\t}else{\n\n \t\t\t\tif (response.getListaAccertamenti() != null && response.getListaAccertamenti().size() > 0) {\n \t\t\t\t\tfor (Accertamento currentAccetamento : response.getListaAccertamenti()) {\n \t\t\t\t\t\taddAccertamentiESubAccertamentiInUnicaLista(currentAccetamento);\n \t\t\t\t\t}\n\n \t\t\t\t\tmodel.getGestioneOrdinativoStep2Model().setResultSize(response.getNumRisultati());\n \t\t\t\t\t\n \t\t\t\t\tif(model.getGestioneOrdinativoStep2Model().getListaAccertamento()==null || model.getGestioneOrdinativoStep2Model().getListaAccertamento().size()==0){\n \t\t\t\t\t\taddPersistentActionWarning(ErroreFin.CRU_WAR_1003.getErrore().getCodice()+\" : \"+ErroreFin.CRU_WAR_1003.getErrore(\" accertamenti o subaccertamenti\").getDescrizione());\n \t\t\t\t\t}\n \t\t\t\t} else {\n \t\t\t\t\taddPersistentActionWarning(ErroreFin.CRU_WAR_1003.getErrore().getCodice()+\" : \"+ErroreFin.CRU_WAR_1003.getErrore(\" accertamenti o subaccertamenti\").getDescrizione());\n \t\t\t\t}\n \t\t\t}\n\n \t\t}\n \t}\n }",
"@Override\n public void llenardeposito(){\n this.setCombustible(getTankfuel());\n }",
"@Override\r\n public void execute()\r\n {\r\n printInvalidCommandMessage();\r\n }",
"public void executer()\r\n\t{\r\n\t\tswitch(this.type)\r\n\t\t{\r\n\t\tcase \"Gain\":\r\n\t\t\tPartie.getJoueurCourant().changeSolde(this.valeur);\r\n\t\t\tbreak;\r\n\t\tcase \"Perte\":\r\n\t\t\tPartie.getJoueurCourant().changeSolde(-this.valeur);\r\n\t\t\tbreak;\r\n\t\tcase \"Avancer\":\r\n\t\t\tPartie.getJoueurCourant().deplace(this.valeur);\r\n\t\t\tbreak;\r\n\t\tcase \"Aller en prison\":\r\n\t\t\tPartie.getJoueurCourant().setPosition(this.valeur);\r\n\t\t\tbreak;\r\n\t\tcase \"Sortie de prison\":\r\n\t\t\tPartie.getJoueurCourant().setEnPrison(false);\r\n\t\t\tbreak;\r\n\t\t}\t\r\n\t}",
"public void mensagemErroCadastro() {\n\t\tJOptionPane.showMessageDialog(null, \"Erro!\\nVerifique se todos os campos estão preenchidos.\"\n\t\t\t\t+ \"\\nVerifique se os dados em formato numérico são números.\"\n\t\t\t\t+ \"\\nVerifique se as datas foram inseridas corretamente.\" + \"\\nNão use vírgulas ','. Use pontos!\", null,\n\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t}",
"@Override\n\tpublic void onEndGererCommande()\n\t{\n\t\t\n\t}",
"@Override\n\tpublic void procesar() throws WrongValuesException, ExcEntradaInconsistente {\n\n\t}",
"@Override\n\tpublic void command(List<Commande> commandes) {\n\t\t\n\t}",
"public static void ajoutFacture() {\r\n Scanner myObj = new Scanner(System.in);\r\n int numeroFacture = Facture.nouvelleFacture();\r\n System.out.println(\"Création de la facture \" + numeroFacture);\r\n // création d'un boucle pour ajouter autant de produits souhaités à la même facture\r\n boolean continuer = true;\r\n do {\r\n System.out.print(\"Entrez le nom du produit à ajouter ................... \");\r\n String nomProduit = myObj.nextLine();\r\n // vérification que le produit soit dans le catalogue\r\n int indice = Catalogue.chercher(nomProduit);\r\n if(indice == -1) {\r\n System.out.println(\"Le produit demandé n'est pas dans le catalogue\");\r\n } else {\r\n //System.out.println(\"Vous avez choisi le produit \" + Catalogue.getNom(indice));\r\n System.out.print(\"Quelle quantité acheter ? ............................ \");\r\n int quantite = checkInt();\r\n Facture.ajouterProduit(numeroFacture,indice,quantite);\r\n }\r\n System.out.print(\"Souhaitez-vous ajouter un autre produit ? Y/N ........ \");\r\n String choix = myObj.nextLine();\r\n choix = choix.toUpperCase();\r\n if(!choix.equals(\"Y\")) continuer = false;\r\n }while(continuer);\r\n System.out.println(\"Facture \" + numeroFacture + \" ajoutée. FIN\");\r\n }",
"public void sendError()\n {\n \tString resultText = Integer.toString(stdID);\n \tresultText += \": \";\n\t\tfor(int i = 0; i<registeredCourses.size();i++)\n\t\t{\n\t\t\tresultText += registeredCourses.get(i);\n\t\t\tresultText += \" \";\n\t\t}\n\t\tresultText += \"--\";\n\t\tresultText += \" \";\n\t\tresultText += Integer.toString(semesterNum);\n\t\tresultText += \" \";\n\t\tresultText += Integer.toString(0); \n\t\tresultText += \" \";\n\t\tprintResults.writeResult(resultText);\n \tSystem.exit(1);\n }",
"public PromoNotFoundException (int promo_error)\n {\n super(\"Promo ID: \");\n this.promo_error=promo_error;\n }",
"@Override\r\n\tprotected void processError() {\n\t\tsuper.processError();\r\n\t\tshowToast(error_generico_process);\r\n\t}",
"@Override\n\tpublic void initialisation_type_exercice() {\n\t\tthis.setEnnonce_exo(\"Ecrire un algorithme qui demande deux nombres à l’utilisateur et l’informe ensuite si le produit est négatif ou positif (on inclut cette fois le traitement du cas où le produit peut être nul). Attention toutefois, on ne doit pas calculer le produit !\");\n\n\t}",
"@Override\n public void onExecute() {\n\n resourceB = this.getContext().getGame().getPlayer(idPlayer).getInventory().getValueRessource(type);\n\n if(this.cmd == CmdRessource.ADD) { // si le type de commande est un ajout\n if(type == TypeRessource.GOLD && this.getContext().getGame().getPlayer(idPlayer).getInventory().haveHammer()){ // un ajout de gold\n this.print(\"Player \"+idPlayer+\" have hammer, ressource : \"+value+\" \"+type+\" to \"+idPlayer);\n this.getManager().triggerCommandEffectHammer(idPlayer,value); // on trigger leffet hammer\n }\n else {\n this.print(\"Add ressource : \"+value+\" \"+type+\" to \"+idPlayer);\n getContext().getGame().addRessourcePlayer(idPlayer,type,value); //sinon on ajout la ressource\n this.calculeStatAdd();\n }\n }\n else if(this.cmd == CmdRessource.REMOVE) {\n this.print(\"Remove ressource : \"+value+\" \"+type+\" to \"+idPlayer);\n getContext().getGame().removeRessourcePlayer(idPlayer,type,value); // remove ressource\n this.calculeStatRemove();\n }\n else if(this.cmd == CmdRessource.ADD_AFTER_HAMMER) {\n this.print(\"Add ressource after hammer : \"+value+\" \"+type+\" to \"+idPlayer);\n getContext().getGame().addRessourcePlayer(idPlayer,type,value); //si c'est un ajout apres hammer alors exec la commande d'ajout de ressource\n this.calculeStatAdd();\n }\n }",
"public void declineTransaction(CommandOfService c) throws Exception {\n // We give back the points to the user\n Service s = c.getService();\n User u = c.getOwner();\n if(s.getTypeService() == 0){\n userDAO.addPoints(s.getCost(),u);\n }\n DAO.declineTransaction(c);\n FacadeNotification facadeNotification = FacadeNotification.getInstance();\n String title = \"Transaction declined!\";\n String desc = \"Your command for: \"+s.getTitle()+\" has been declined.\\n\";\n try {\n facadeNotification.createNotification(u.getIdUser(),title,desc);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"void illegalCommand(final String reason);",
"@Override\n protected void adicionarLetrasErradas() {\n }",
"public final void nonRedefinissableParEnfant(){\n\n }",
"public IRecepteur quiEstEnDessous();",
"private void procedureBasePrDessin(){\n if(courante == null){\n reset();\n courante = new Tortue(simpleLogo.getFeuille(), true);\n simpleLogo.setBarreOutilsVisible(true);\n }\n }",
"public abstract String mensajeCrearCelula();",
"public void inquiryError() {\n\t\t\n\t}",
"public boolean deposito(int idConta, double quantia) {\n try {\n Conta conta = new Conta(idConta); //deveria poder fazer isto\n boolean executado = conta.depositoConta(quantia);\n System.out.println(executado ? \"Deposito efetuado com sucesso.\" : \"Erro ao Efeuar o Deposito\" );\n return executado;\n } catch (Exception e) {\n System.out.println(\"Erro no serviço deposito: \" + e.getMessage());\n return false;\n } \n}",
"@Override\r\n\tpublic String getMessage() {\r\n\t\treturn \"Veuillez entrer un nombre positif\";\r\n\t}",
"private void gestionPriseEnCompte() {\r\n\t\tString raison = new String(\"\");\r\n\t\tDate now = new Date();\r\n\t\tString strSql = \"\";\r\n\t\r\n if (tbAlarme.getRowCount() > 0) {\r\n \tif (tbAlarme.getSelectedRowCount() > 0) {\r\n\t\t int[] selection = tbAlarme.getSelectedRows();\r\n\t\t int indexSelection = selection[0];\r\n\t\t int idCapteur = mdlTpsReelAlarme.getIdCapteur(indexSelection); \r\n\t\t String strTypeAlarme = \"\";\r\n\t\t \r\n\t\t\t\t// Motif Prise En Compte seulement si appel Alert\r\n\t\t strTypeAlarme = (String) mdlTpsReelAlarme.getValueAt(indexSelection, JTABLE_ALARME_TYPE_ALARME);\r\n\t\t if (strTypeAlarme.equals(\"Alarme\")) {\r\n\t\t\t\t\tint idPriseEnCompte = 0;\r\n\t\t \tdo {\r\n\t\t\t\t\t\tObject [] possibilites = new Object[tbPriseEnCompte.size()];\r\n\t\t\t\t\t\tfor(int i = 0; i < tbPriseEnCompte.size(); i++) {\r\n\t\t\t\t\t\t\tpossibilites[i] = tbPriseEnCompte.get(i).getNom();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tString strReponse = (String)JOptionPane.showInputDialog(this, \"Choisir un motif de prise en compte : \", \"Prise en compte\", JOptionPane.QUESTION_MESSAGE, null, possibilites, null);\r\n\t\t\t\t\t\tidPriseEnCompte = 1;\r\n\t\t\t\t\t\tif (strReponse != null) {\r\n\t\t\t\t\t\t\tfor(int i = 0; i < tbPriseEnCompte.size(); i++) {\r\n\t\t\t\t\t\t\t\tif(strReponse.equals(tbPriseEnCompte.get(i).getNom())) {\r\n\t\t\t\t\t\t\t\t\tidPriseEnCompte = (int) tbPriseEnCompte.get(i).getId();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} // fin for\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\traison = \"En attente\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// idPriseEncompte == 1 (Autres)\r\n\t\t\t\t\t\tif(idPriseEnCompte == 1) {\r\n\t\t\t\t\t\t\t// Demande de commentaire\r\n\t\t\t\t\t\t\traison = AE_Fonctions.saisieTexte(\"Veuillez entrer une raison : \", \"Raison commentaire ...\");\r\n\t\t\t\t\t\t\tif (raison == null) raison = \"\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\traison = \"---\";\r\n\t\t\t\t\t\t}\r\n\t\t \t} while(raison == \"\");\r\n\t\t \t\r\n\t\t\t\t\tstrSql = \"UPDATE V2_AlarmeEnCours SET idPriseEnCompte = \" + idPriseEnCompte\r\n\t\t\t\t\t\t\t + \" , idUtilisateur = \" + EFS_Client_Variable.idUtilisateur\r\n\t\t\t\t\t\t\t + \" , CommentairePriseEnCompte = '\" + raison + \"'\"\r\n\t\t\t\t\t\t\t + \" WHERE idCapteur = \" + idCapteur;\r\n\t\t\t\t\tctn.fonctionSql(strSql);\r\n\t\t\t\t\tmdlTpsReelAlarme.setMotifIdPriseEncompte(indexSelection, idPriseEnCompte);\r\n\t\t } // fin if appelAlert\r\n\r\n\t\t if(mdlTpsReelAlarme.getValueAt(indexSelection, JTABLE_ALARME_PRISE_EN_COMPTE) == null) {\r\n\t\t\t\t\t// Date prise en compte\r\n\t\t\t\t\tstrSql = \"UPDATE V2_AlarmeEnCours SET DatePriseEnCompte = sysdate, blPriseEnCompte = 1 WHERE idCapteur = \" + idCapteur;\r\n\t\t\t\t\tctn.fonctionSql(strSql);\r\n\t\t\t\t\tmdlTpsReelAlarme.setValueAt(now, indexSelection, JTABLE_ALARME_PRISE_EN_COMPTE);\r\n\t\t } // fin if datePrsieEnCompte\r\n\t\r\n\t\t // Prevenir le programme maitre\r\n\t\t AE_Fonctions.modifierMaitreViaClient(idCapteur, VIA_API_PRISE_EN_COMPTE);\r\n\t\t \r\n\t\t\t\t// Arret klaxon et Alert\r\n//\t\t\t\tgestionKlaxon(false);\r\n//\t\t\t\tgestionAlert(false);\r\n\t\t\t\t\r\n \t} else {\r\n \t JOptionPane.showMessageDialog(this, \"Vous devez sélectionner une ligne pour prendre en compte ...\",\r\n \t \t\t \"GTC Visualize - Programme Maitre\", JOptionPane.WARNING_MESSAGE);\r\n \t}\r\n } else {\r\n//\t\t\tgestionKlaxon(false);\r\n//\t\t\tgestionAlert(false);\r\n }\r\n\t}",
"public void realiserAcahatProduit() {\n\t\t\n\t}",
"@Override\n\tpublic void dialogar() {\n\t\tSystem.out.println(\"Ofrece un Discurso \");\n\t\t\n\t}",
"public AbstractCommandeService() {\r\n\t\t\r\n\t\tsuper();\r\n\t\t\r\n\t\tthis.valideur = new ValideurCommande();\r\n\t\t\r\n\t}",
"public void messageErreur(Exception ex) throws HeadlessException {\n JOptionPane.showMessageDialog(null, ex.getMessage(), \"ERROR\", JOptionPane.ERROR_MESSAGE);\n }",
"public DialogoAggiungiFissi() {\n /* rimanda al costruttore della superclasse */\n super();\n\n\n try { // prova ad eseguire il codice\n /* regolazioni iniziali di riferimenti e variabili */\n this.inizia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }",
"@Override\n\tprotected void error(char c, InterimResult ir)\n\t{\n\t\tErrorAction error = new ErrorAction();\n\t\terror.execute(ir, c);\t\t\n\t}",
"void setError();",
"@Override\r\npublic void actionPerformed(ActionEvent arg0) {\n\tString mensaje;\r\n\tString titulo;\r\n\t\r\n\tmodeloBici = cb.getModelo().getSelectedItem().toString();\r\n\t\r\n\tif (!cb.getCantidad().getText().isEmpty())\r\n\t{\r\n\t\tcantidadBicis = Integer.parseInt(cb.getCantidad().getText());\r\n\t\tmensaje = \"Modelo bici: \" + modeloBici + \" , Cantidad: \" + cantidadBicis;\r\n\t\ttitulo = \"Compra hecha\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\tmensaje = \"Introduzca una cantidad\";\r\n\t\ttitulo = \"Error\";\r\n\t}\r\n\t\r\n\ttry {\r\n\t\tprocesarPedido(cantidadBicis,modeloBici);\t\r\n\t}\r\n\tcatch (BuyNotAllowedModel2Exception | BuyNotAllowedModel3Exception e) {\r\n\t\tif (e instanceof BuyNotAllowedModel2Exception) {\r\n\t\t\ttitulo = \"Compra No Valida Modelo 2\";\r\n\t\t} else if (e instanceof BuyNotAllowedModel3Exception) {\r\n\t\t\ttitulo = \"Compra No Valida Modelo 3\";\r\n\t\t}\r\n\t\t\t\r\n\t\tmensaje = e.getMessage();\r\n\t\t\r\n\r\n\t}\r\n\t\r\n\tmostrarMensaje(titulo,mensaje);\t\t\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n}",
"public void onError(String cadena) {\r\n\t\tJOptionPane.showMessageDialog(null, cadena, \"Movimiento invalido\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\r\n\t}",
"public void afficherMessage () {\r\n System.out.println(\"(\"+valeur+\", \"+type+\")\"); \r\n }",
"public void avvia() {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n getModuloRisultati().avvia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n super.avvia();\n\n }",
"void legalCommand();",
"public static void ComprovarMes(Variables var,TReserva reserva, Menus Menus,bComprobadors comp){\r\n comp.bCancelarRes = false;\r\n\r\n if(reserva.iMesReserva == 13){//Comprova si es 13 per cancel·lar\r\n comp.bReserva = false;\r\n\r\n }else if(reserva.iMesReserva <= 12 && reserva.iMesReserva >= 0){\r\n System.out.println(\"Ha escollit \"+Menus.sMeses[reserva.iMesReserva-1]);\r\n comp.bReserva = false;\r\n\r\n }else{//Mes introduit erroni\r\n sOpcioInvalida();\r\n }\r\n }",
"public IRecepteur quiEstAuDessus();",
"@Override\r\n\tpublic final void showCommandError(String command, String message) {\n\t}",
"void autofinanciarPoliza(AutofinanciarPolizaCancelCommand datosPoliza);",
"@Override\n\tpublic void doit() {\n\t\tafficher_texte(UtilitaireChainesCommunes.demande_saisie_nombre);\n\t\tint i = saisie_entier();\n\t\tafficher_texte(UtilitaireChainesCommunes.demande_saisie_nombre);\n\t\tint j = saisie_entier();\n\t\t// tous deux strictements positifs ou strictement négatifs? \n\t\t// vrai => produit positif\n\t\t// faux => produit negatif ou nul\n\t\tboolean Truth = TrueIfSameTruthValue(i,j,this.estposit);\n if (Truth){afficher_texte(UtilitaireChainesCommunes.resultat_positif);}\n else{ \n \t// l un des deux est soit de signe différent soit nul.\n \t// on vire le cas \"est de signe différent\" (on aurait pu faire l autre)\n \tboolean Truth2 = ((i < 0 && j > 0) || (i > 0 && j < 0));\n \tif (Truth2){afficher_texte(UtilitaireChainesCommunes.resultat_negatif);}\n \telse {afficher_texte(UtilitaireChainesCommunes.nombre_nul);}\n }\n\n\t}",
"public void msgErreur(){\n \n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Entrée invalide\");\n alert.setHeaderText(\"Corriger les entrées invalides.\");\n alert.setContentText(\"Les informations entrées sont erronnées\");\n\n alert.showAndWait();\n \n\n}",
"protected void initError(String message, COMMAND command) {\t\n\t String id = (command != null ? command.getId() : \"no-command\");\t \n\t \n\t COMMAND_DONE done = new COMMAND_DONE(id);\n\t done.setSuccessful(false);\n\t done.setErrorNum(SERVER_INITIALIZATION_ERROR);\n\t done.setErrorString(\"Command: [\"+id+\"]: CAMP::\"+message);\n\t \n\t try { \t\n\t\tif (connection != null)\n\t\t connection.send(done); \n\t } catch (IOException e) {\n\t\tlogger.log(1,CLASS, \"-\", \"impl\",\n\t\t\t \"Failed to send error: \"+e);\n\t }\n\t \n\t if (handler != null)\n\t\thandler.dispose();\n\t if (connection != null)\n\t\tconnection.close();\n\t connection = null;\n\t command = null;\n\t \n\t}",
"public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }",
"public void modificarCompraComic();",
"@Override\n\tpublic void producidoErrorAlCargarListaInfos(String error) {\n\t\t\n\t}",
"public void error();",
"public void ingresaAdministrativo() {\n\tEstableceDatosAdministrativos();\n\tint cambio=0;\n\tdo {\n\t\t\n\t\ttry {\n\t\t\tsetMontoCredito(Double.parseDouble(JOptionPane.showInputDialog(\"Ingrese el monto del credito (�3 600 000 maximo)\")));\n\t\t\tcambio=1;\n\t\t\tif(getMontoCredito()<0||getMontoCredito()>3600000) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"El monto debe ir de �0 a �3600000\");\n\t\t\t}\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Ingrese solo numeros\");\n\t\t}\n\t}while(getMontoCredito()<0||getMontoCredito()>3600000||cambio==0);\n\tsetInteres(12);\n\tsetPlazo(60);\n\tsetCuotaPagar(calculoCuotaEspecialOrdinario());\n\testableceEquipoComputo();\n}",
"@Override\n public Proposition proposerUneCombinaison(IResultat resultat) {\n DemandeInfo demandeInfo = new DemandeInfo();\n return demandeInfo.demandecombinaisonMastermind();\n }",
"@Override\n\tpublic String parler() {\n\t\treturn \"Je suis un Orc\";\n\t}",
"public void cancelOperation() {\n\n System.out.println(\"Sorry, a problem occurred, deposit money operation is unsuccessful\");\n System.out.println(\"Current information : \");\n while (!storage.isEmpty()) {\n Command command = storage.pop();\n command.undo();\n }\n }",
"public void rechercheEtudiantInscripEcheanceParMatricule(){\r\n try { \r\n setViewEtudiantInscripEcheance(viewEtudiantInscripEcheanceFacadeL.findByMatricule(getViewEtudiantInscripEcheance().getMatricule())); \r\n \r\n //initialisation des echeances\r\n// viewEtudiantInscripEcheance.setVers1(0); \r\n// viewEtudiantInscripEcheance.setVers2(0); \r\n// viewEtudiantInscripEcheance.setVers3(0); \r\n// viewEtudiantInscripEcheance.setVers4(0); \r\n// viewEtudiantInscripEcheance.setVers5(0); \r\n// viewEtudiantInscripEcheance.setVers6(0); \r\n } catch (Exception e) {\r\n FacesMessage message = new FacesMessage(\"Accun étudiant n'a été trouvé! \");\r\n message.setSeverity(FacesMessage.SEVERITY_WARN);\r\n FacesContext.getCurrentInstance().addMessage(null, message); \r\n \r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n } \r\n }",
"private void supprAffichage() {\n switch (afficheChoix) {\n case AFFICHE_SPOOL :\n ecranSpool.deleteContents();\n break;\n case AFFICHE_USER :\n ecranUser.deleteContents();\n break;\n case AFFICHE_CONFIG :\n ecranConfig.deleteContents();\n break;\n default: break;\n }\n afficheChoix = AFFICHE_RIEN;\n }",
"public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }",
"public void act() \n {\n verificaClique();\n }",
"@Override\n public void onPeticionesRecibidasObtenidasError() {\n\n Snackbar.make(myView,\"No ha sido posible obtener la lista de peticiones pendientes\", Snackbar.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }",
"public void anularEquiparacion() {\n\n\n try {\n\n if (!equiparacionBeanSelected.getEqp_estado().equals(\"2\")) {\n EquiparacionesDao equiparacionDAo = new EquiparacionesDao();\n equiparacionBeanSelected.setEqp_estado(\"3\");\n\n equiparacionDAo.dmlDr_regt_equiparaciones(2, equiparacionBeanSelected);\n\n MateriasSolicitudDao materiaDao = new MateriasSolicitudDao();\n\n addMessage(\"Registro anulado satisfactoriamente\", 1);\n FacesContext facesContext = FacesContext.getCurrentInstance(); \n Dr_siseg_usuarioBean usuario= new Dr_siseg_usuarioBean();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n \n BitacoraSolicitudDao bitacoraSolicitudDao=new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean=new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(equiparacionBeanSelected.getEqp_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"E\");\n bitacoraSolicitudBean.setBit_detalle(\"La Equiparacion fue Eliminada\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n \n \n listaEquiparaciones();\n }else{\n addMessage(\"Equiparacion NO puede ser Eliminada\", 1);\n }\n\n } catch (ExceptionConnection ex) {\n /* Logger.getLogger(EquivalenciaController.class\n .getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al anular el registro, contacte al administrador del sistema\", 2);\n */ }\n\n }",
"public PromoCodeAlreadyExistsException (Promo promo_input)\n {\n super(\"Promo Code: \");\n this.promo_error=promo_input;\n }",
"@Override\n\tpublic String inserisciQuota() throws Exception {\n\t\t\n \tif(StringUtils.isEmpty(model.getGestioneOrdinativoStep2Model().getRadioIdAccertamento())){\n \t\t//non e' stato selezionato l'accertamento\n \t\taddErrore(ErroreCore.DATO_OBBLIGATORIO_OMESSO.getErrore(\"Selezionare accertamento/subAccertamento\"));\n \t\treturn INPUT;\n \t}\n\n\t\tif(presenzaPaginazione(ServletActionContext.getRequest())){\n\t\t\treturn execute();\n\t\t}\n\t\t\n \tif(!isSoggettoCoerenteConClasse()){\n \t\treturn INPUT;\n \t}\n \t\n \t//rimando al metodo della super classe:\n \tString ritorno = super.inserisciQuotaAccertamento();\n \t\n \t// aggiorno la sommatoria delle quote\n \tsommatoriaQuoteSubOrdIncasso();\n\t\t\n \treturn ritorno; \n\t}",
"public void primerTicketDisponibleEncontrado() {\n\t\tprimerTicketDisponible();\n\t\tint f; int c;\n\t\tString ticket = primerTicketDisponible();\n\t\tString[] dividir = ticket.split(\" \");\n\t\tString fila = dividir[0];\n\t\tString columna = dividir[1];\n\t\tSystem.out.println(fila);\n\t\tSystem.out.println(columna);\n\t\tf = Integer.parseInt(fila);\n\t\tc = Integer.parseInt(columna);\n\t\tactualizarPlazas(f, c);\n\t}",
"public ExceptionParamJeu(error type){\r\n\t\tthis.explication = type;\r\n\t}",
"@When(\"je verifie le montant des frais de port et clique sur suivant\")\n\tpublic void je_verifie_le_montant_des_frais_de_port_et_clique_sur_suivant() {\n\t throw new PendingException();\n\t}",
"public boolean ajouterCommande(Commande commande) {\n\t\tString query = \"SELECT * FROM commande WHERE code_menu = ? AND id_restaurateur = ? AND id_client= ?\";\n\t\tPreparedStatement st = null;\n\t\tResultSet r = null;\n\t\tboolean exist = false;\n\t\tboolean b = false;\n\t\ttry {\n\t\t\tst = this.Connect.prepareStatement(query);\n\t\t\tst.setInt(1, commande.getCode_menu());\n\t\t\tst.setInt(2, commande.getId_restaurateur());\n\t\t\tst.setInt(3, commande.getId_client());\n\n\t\t\tr = st.executeQuery();\n\t\t\tif (r.next())\n\t\t\t\texist = true;\n\t\t\tst.close();\n\t\t\tr.close();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// pour ajouter de commande\n\t\tif (!exist) {\n\t\t\tquery = \"INSERT INTO commande(id_client, code_menu, id_restaurateur, date, prix) VALUES (?, ?, ?, ?, ?)\";\n\t\t\tst = null;\n\t\t\tint rs = 0;\n\n\t\t\tLocalDate commandeDate = LocalDate.now();\n\t\t\tDateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"[yyyy-MM-dd]\");\n\n\t\t\tjava.util.Date date2 = java.sql.Date.valueOf(LocalDate.parse(\"2021-03-04\", formatter));\n\n\t\t\ttry {\n\n\t\t\t\tst = this.Connect.prepareStatement(query);\n\t\t\t\tst.setInt(1, commande.getId_client());\n\t\t\t\tst.setInt(2, commande.getCode_menu());\n\t\t\t\tst.setInt(3, commande.getId_restaurateur());\n\t\t\t\tst.setDate(4, (Date) date2);\n\t\t\t\tst.setInt(5, commande.getPrix());\n\t\t\t\trs = st.executeUpdate();\n\t\t\t\tst.close();\n\t\t\t\tthis.ajouterCinqPoints(this.getClientById(commande.getId_client()));\n\t\t\t\tb = true;\n\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\treturn b;\n\t}",
"public static void ComprovarComensals(Variables var,TReserva reserva,bComprobadors comp){\r\n if(reserva.iComensalsR <= 11 && reserva.iComensalsR > 0){\r\n System.out.println(\"Ha reservat taula per a \"+ reserva.iComensalsR);\r\n comp.bReserva = false;\r\n }else{ \r\n System.out.println(\"\\033[31m\" + \"*Comensals erronis*\" + \"\\033[30m\");\r\n comp.bReserva = true;\r\n }\r\n }",
"@Override\n\tpublic void error(String message, Object p0, Object p1) {\n\n\t}",
"public Erreur() {\n\t}",
"@Override\n\tpublic void commande(List<commande> listcommande) {\n\n\t}",
"public int getMes();",
"public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request,\n HttpServletResponse response) {\n HttpSession session = request.getSession();\n Logger.log(this.getClass().getSimpleName());\n\n // Use Struts actions to record business processing errors.\n ActionErrors errors = new ActionErrors();\n // Store this set in the request scope, in case we need to\n // send the ErrorPage view.\n saveMessages(request, errors);\n \n\tString leeren = (String)request.getParameter(\"leeren\");\n Logger.log(\"Btn leeren =\"+leeren);\n\tString rq_partner_id = (String)request.getParameter(Const.PARTNER_ID);\n Logger.log(\"rq_partner_id =\"+rq_partner_id);\n if(leeren != null)\n {\n Logger.log(\"Warenkorb leeren....\"); \t\n\t\tsession.removeAttribute(Const.ORDERLIST);\n return mapping.findForward(\"error\");\n }\n \t\n try {\n \n Prefs prefs = (Prefs)session.getAttribute(Const.PREFS);\n\tdouble minorderamount = Double.parseDouble(prefs.getMinorderamount());\n\tString gesamt = (String)request.getParameter(\"gesamtwert\");\n Logger.log(\"gesamt =\"+gesamt);\n double differenz = minorderamount - Double.parseDouble(gesamt);\n \n\tif(differenz > 0){\n\t\terrors.add(\"minorderamount\", new ActionMessage(\"error.minorderamount\", prefs.getMinorderamount()));\n request.setAttribute(Globals.ERROR_KEY, errors);\n return mapping.findForward(\"error\"); \n\t}\n return mapping.findForward(\"success\");\n\n // Handle any unexpected expections\n } catch (RuntimeException e) {\n\n // Log stack trace\n Logger.log(\"An unexpected error: \" + e);\n\t e.printStackTrace();\n // Record the error\n errors.add(ActionMessages.GLOBAL_MESSAGE,//Errors.GLOBAL_ERROR,\n new ActionMessage(\"error.unexpectedError\",\n e.getMessage()));\n request.setAttribute(Globals.ERROR_KEY, errors);\n\n // and forward to the error handling page (the form itself)\n return mapping.findForward(\"error\");\n }\n }",
"public boolean erreurStandard1() {\r\n\t\t\t\r\n\t\t\t//Initialisation du booléen, identification des champs à vérifer \r\n\t\t\tboolean verif = false;\r\n\t\t\tWebElement messageErreur = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//div[.='Out of range (>= 0).']\")));\r\n\t\t\t\r\n\t\t\t//Vérification\r\n\t\t\tif (messageErreur.isDisplayed()) {\r\n\t\t\t\tverif = true;\r\n\t\t\t}\r\n\t\t\treturn verif;\r\n\t\t}",
"public interface RoutineException {}",
"public void creaAddebitiGiornalieri(AddebitoFissoPannello pannello,\n int codConto,\n Date dataInizio,\n Date dataFine) {\n /* variabili e costanti locali di lavoro */\n boolean continua = true;\n Modulo modAddFisso;\n ArrayList<CampoValore> campiFissi;\n Campo campoQuery;\n CampoValore campoVal;\n ArrayList<WrapListino> lista;\n ArrayList<AddebitoFissoPannello.Riga> righeDialogo = null;\n int quantita;\n\n try { // prova ad eseguire il codice\n\n modAddFisso = this.getModulo();\n campiFissi = new ArrayList<CampoValore>();\n\n /* recupera dal dialogo il valore obbligatorio del conto */\n if (continua) {\n campoQuery = modAddFisso.getCampo(Addebito.Cam.conto.get());\n campoVal = new CampoValore(campoQuery, codConto);\n campiFissi.add(campoVal);\n }// fine del blocco if\n\n /* recupera dal dialogo il pacchetto di righe selezionate */\n if (continua) {\n righeDialogo = pannello.getRigheSelezionate();\n }// fine del blocco if\n\n /* crea il pacchetto delle righe di addebito fisso da creare */\n if (continua) {\n\n /* traverso tutta la collezione delle righe selezionate nel pannello */\n for (AddebitoFissoPannello.Riga riga : righeDialogo) {\n lista = ListinoModulo.getPrezzi(riga.getCodListino(),\n dataInizio,\n dataFine,\n true,\n false);\n quantita = riga.getQuantita();\n for (WrapListino wrapper : lista) {\n this.creaAddebitoFisso(codConto, dataInizio, wrapper, quantita);\n }\n } // fine del ciclo for-each\n }// fine del blocco if\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }",
"private void esegui() {\n /* variabili e costanti locali di lavoro */\n OperazioneMonitorabile operazione;\n\n try { // prova ad eseguire il codice\n\n /**\n * Lancia l'operazione di analisi dei dati in un thread asincrono\n * al termine il thread aggiorna i dati del dialogo\n */\n operazione = new OpAnalisi(this.getProgressBar());\n operazione.avvia();\n\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n }",
"@Override\r\n\tpublic void executerAction(Object cible) throws HearthstoneException {\n\t\tif ( cible == null )\r\n\t\t\tthrow new CibleInvalideException(\"La cible ne peut pas être nulle.\");\r\n\t\t\r\n\t\tif ( !(cible instanceof ICible) )\r\n\t\t\tthrow new CibleInvalideException(\"La cible doit être une cible valide.\");\r\n\t\t\r\n\t\tICible cibleVisee = (ICible) cible;\r\n\t\tif ( cibleVisee.peutRecevoirDegats() ) {\r\n\t\t\tcibleVisee.recevoirDegats(this.degats);\t\r\n\t\t} else {\r\n\t\t\tthrow new CibleInvalideException(\"La cible ne peut pas recevoir de dégats !\");\r\n\t\t}\r\n\t}",
"private void setErreur( String champ, String message ) {\r\n errors.put( champ, message );\r\n }",
"public void scemess() {\n\t\tUserExcep ue = new UserExcep();\n\t\t\n\t\ttry {\n\t\t\t\tthrow new UserExcep(\"Try different ID\");\n\t\t\t\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}",
"public void terminaCansancio(){\n \tthis.fuerza = 100; \n }",
"public static void afficherProduit() {\r\n Scanner myObj = new Scanner(System.in);\r\n System.out.print(\"Entrez le nom du produit ............................. \");\r\n String input = myObj.nextLine();\r\n int indice = Catalogue.chercher(input);\r\n if(indice == -1) {\r\n System.out.println(\"Le produit demandé n'est pas dans le catalogue\");\r\n } else {\r\n System.out.println(\"Le produit demandé : \" + Catalogue.getNom(indice) + \" est bien dans le catalogue\");\r\n }\r\n System.out.println();\r\n }",
"public void nouveau(){\r\n try {\r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n echeance_etudiant = new EcoEcheanceEtudiant(); \r\n \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur capturée : \"+e);\r\n }\r\n }",
"public void abrirCerradura(){\n cerradura.abrir();\r\n }",
"public final boolean isNeedParseeErrorMsg() {\r\n return getCommand() == 10;\r\n }",
"public static void mensagemErroCadastrar() {\n\t\tJOptionPane.showMessageDialog(null, \"Erro ao cadastrar. Revise os dados inseridos.\", \"Erro\", JOptionPane.ERROR_MESSAGE, new ImageIcon(Toolkit.getDefaultToolkit().getImage(CadastroQuartos.class.getResource(\"/Imagens/Erro32.png\"))));\n\t}",
"@Override\r\n\tprotected String getErrorInfo(String str, String cmds) {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic void error(String message, Object p0) {\n\n\t}"
] | [
"0.6976403",
"0.62592417",
"0.61269474",
"0.58937675",
"0.5835196",
"0.577824",
"0.57498187",
"0.5727283",
"0.56819",
"0.56324494",
"0.5604432",
"0.5567368",
"0.5559027",
"0.5519852",
"0.55031747",
"0.54998857",
"0.54965657",
"0.54932165",
"0.54796714",
"0.54779416",
"0.5476458",
"0.546269",
"0.5454051",
"0.54350156",
"0.5418845",
"0.54157734",
"0.5414875",
"0.54004145",
"0.53967893",
"0.53947264",
"0.53777695",
"0.5356057",
"0.53520495",
"0.5346068",
"0.53455895",
"0.53429407",
"0.5326975",
"0.531257",
"0.53100824",
"0.53080875",
"0.5294031",
"0.5289611",
"0.5269408",
"0.52495587",
"0.5247829",
"0.52420396",
"0.5231643",
"0.52285755",
"0.5224915",
"0.5221441",
"0.52182174",
"0.52135456",
"0.520312",
"0.52012545",
"0.5193606",
"0.5186117",
"0.51854306",
"0.51818657",
"0.5179788",
"0.5178472",
"0.5177337",
"0.5175267",
"0.5173895",
"0.5167015",
"0.51650923",
"0.51611394",
"0.51597106",
"0.51558787",
"0.5155566",
"0.5153704",
"0.5145011",
"0.5144574",
"0.51393986",
"0.51335245",
"0.5129487",
"0.51270705",
"0.51145506",
"0.5112325",
"0.5107779",
"0.51075053",
"0.5106243",
"0.51025033",
"0.5100043",
"0.5097736",
"0.5095199",
"0.5094776",
"0.50914824",
"0.5090654",
"0.50893354",
"0.50842226",
"0.50825953",
"0.50726545",
"0.506933",
"0.50669944",
"0.5059079",
"0.5056695",
"0.5055685",
"0.5049059",
"0.50460577",
"0.50451326",
"0.5041373"
] | 0.0 | -1 |
this method waits for 20 seconds for page loading | public void waitUntilPageLoad(WebDriver driver)
{
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void waitForPageToLoad(){\r\n\t\t\t\tDriver.driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\t}",
"public static void waitForPageLoad() {\n\n\t\tif (!WebController.driver.getCurrentUrl().contains(\"uhc.com/dashboard\") && !WebController.driver.getCurrentUrl().contains(\"myuhc.com/member/\") && !WebController.driver.getCurrentUrl().contains(\"=securityQuestion\")) {\n\t\t\tWaitForLoadingOverlay();\n\t\t}\n\n\t\tJavascriptExecutor js = null;\n\t\tfor (int i = 0; i < AppConfiguration.getWaitTime(); i++) {\n\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tjs = (JavascriptExecutor) WebController.driver;\n\t\t\tif (js.executeScript(\"return document.readyState\").toString().equals(\"complete\"))\n\t\t\t\tbreak;\n\n\t\t}\n\t}",
"public void waitForPageToLoad() {\n Wait<WebDriver> wait = new WebDriverWait(WebDriverManager.getDriver(), 90);\n wait.until(new Function<WebDriver, Boolean>() {\n public Boolean apply(WebDriver driver) {\n return String\n .valueOf(((JavascriptExecutor) driver).executeScript(\"return document.readyState\"))\n .equals(\"complete\");\n }\n });\n try {\n wait.until(ExpectedConditions.invisibilityOfElementLocated(By.id(\"waitMessage_div\")));\n wait.until(ExpectedConditions.invisibilityOfElementLocated(By.xpath(\"//div[contains(text(),'Loading')]\")));\n // waitForPageToLoad();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void loadPage(){\r\n\r\n driver.get(getPAGE_Url());\r\n driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\r\n\r\n }",
"public void waitForPageToLoad(WebDriver driver)\n {\n ExpectedCondition < Boolean > pageLoad = new\n ExpectedCondition<Boolean>() {\n public Boolean apply(WebDriver driver)\n {\n return ((JavascriptExecutor) driver)\n .executeScript(\"return document.readyState\").equals(\"complete\");\n }\n };\n Wait< WebDriver > wait = new WebDriverWait(driver, 60, DEFAULT_SLEEP_IN_MILLIS);\n try\n {\n wait.until(pageLoad);\n }\n catch (TimeoutException pageLoadWaitError)\n {\n System.out.println(\"Timeout during page load:\" + pageLoadWaitError.toString());\n }\n }",
"protected void waitThePageToLoad() {\n ExpectedCondition pageLoadCondition = new ExpectedCondition<Boolean>() {\n public Boolean apply(WebDriver driver) {\n return ((JavascriptExecutor) driver).executeScript(\"return document.readyState\").equals(\"complete\");\n }\n };\n WaitUtils.waitUntil(driver, pageLoadCondition);\n }",
"public static void waitWhileLoading()\r\n {\r\n while (isLoading())\r\n ThreadUtil.sleep(10);\r\n }",
"public void waitLoadPage() {\n WebDriverHelper.waitUntil(inputTeamName);\n }",
"public void waitForLoad() {\n\tExpectedCondition<Boolean> pageLoadCondition = new ExpectedCondition<Boolean>()\r\n\t { \r\n public Boolean apply(WebDriver driver) \r\n {\r\n\t return ((JavascriptExecutor)driver).executeScript(\"return document.readyState\").equals(\"complete\");\r\n\t\t }\r\n\t\t };\r\n\t// a\r\n\t\t if((new WebDriverWait(driver, 0.1).until(PageLoadCondition))==false){\r\n\t\t \t \t\r\n\t\t \t//Takesscreenshot is a java class - screenshot code\r\n\t\t \tTakesScreenshot scrShot=((TakesScreenshot)driver);\r\n\t\t \tFile SrcFile=scrShot.getScreenshotAs(OutputType.FILE);\r\n\t\t \tFile DestFile=new File(fileWithPath);\r\n\t\t \tFileUtils.copyFile(SrcFile, DestFile);\r\n\t\t \tSyso(\"page failed to load in 0.1 sec, refer screenshot saved in ___\");\r\n\t\t }\r\n\t\t// b \r\n\t\t if ((new WebDriverWait(driver, 5).until(PageLoadCondition))==true)){\r\n\t\t System.out.println(\"page loaded in 5 sec\");\t\r\n\t\t }\r\n\t}",
"public void waitForPageLoaded() {\r\n\r\n\t\tExpectedCondition<Boolean> expectation = new ExpectedCondition<Boolean>() {\r\n\t\t\tpublic Boolean apply(WebDriver driver) {\r\n\t\t\t\treturn ((JavascriptExecutor) driver).executeScript(\"return document.readyState\").equals(\"complete\");\r\n\t\t\t}\r\n\t\t};\r\n\t\tWait<WebDriver> wait = new WebDriverWait(driver, timeout);\r\n\t\twait.until(expectation);\r\n\t}",
"public void waitForPageToLoad(WebDriver driver,int seconds)\n {\n driver.manage().timeouts().implicitlyWait(seconds, TimeUnit.SECONDS);\n\n }",
"public static void waitPageLoad(final WebDriver driver, final long seconds) {\n\t\ttry {\n\t\t\tThread.sleep(seconds * 1000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void waitForPageToLoad(WebDriver driver) throws InterruptedException\n\t{\n\t\t\n\t\tThread.sleep(2000);\n\t\t//waitPageLoad.until(executeJavaScript(\"return document.readyState;\", \"complete\"));\n\t}",
"public void waitForContentLoad() {\n // TODO implement generic method to wait until page content is loaded\n\n // wait.until(...);\n // ...\n }",
"public void waitForPageToLoad(long timeout) {\n\t\tlong startTime = System.currentTimeMillis();\n\t\twhile ((System.currentTimeMillis() - startTime) < timeout * 1000) {\n\t\t\tboolean pageLoaded = (String) getExecutor().executeScript(\"return document.readyState\") == \"complete\";\n\t\t\tif (pageLoaded) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} catch (InterruptedException 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\n\t}",
"@Override\n protected void waitThePageToLoad() {\n WaitUtils.waitUntil(driver, ExpectedConditions.visibilityOf(driver\n .findElement(By.xpath(SEARCH_XPATH))));\n }",
"private void waitForPageToLoad(){\n new WebDriverWait(driver,10).until(\n ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//body//table//img[contains(@src,'backtoflights.gif')]\")));\n }",
"public void waitForContentLoad() {\n verifyPageIsOpened(currentPage.get(), \"Please open some page before the waiting for content to load.\");\n currentPage.get().waitLoadFinished();\n }",
"public void waitForPageLoad(int numberOfSeconds) {\n\t\tWebDriverWait wait = new WebDriverWait(driver, numberOfSeconds);\n\n\t\twait.until(new ExpectedCondition<Boolean>() {\n\t\t\tpublic Boolean apply(WebDriver wdriver) {\n\t\t\t\treturn ((JavascriptExecutor) driver).executeScript(\n\t\t\t\t\t\t\"return document.readyState\").equals(\"complete\");\n\t\t\t}\n\t\t});\n\t}",
"public static void waitForAI(){\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"private void waitForFirstPageToBeLoaded() {\n IdlingResource idlingResource = new ElapsedTimeIdlingResource(LATENCY_IN_MS + 1000);\n IdlingRegistry.getInstance().register(idlingResource);\n\n //Check that first item has been loaded\n onView(withItemText(\"POPULAR MOVIE #1 (1999)\")).check(matches(isDisplayed()));\n\n //Clean up\n IdlingRegistry.getInstance().unregister(idlingResource);\n }",
"public void waitForPageToLoad(WebDriver driver)\n\t{\n\t\tConfigProperties config = new ConfigProperties();\n\t\t\n\t\t/* Set the implicit wait to zero */\n\t\tdriver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS);\n\t\t\n\t\t/* Wait for header to be updated */\n\t\tWebDriverWait wait = new WebDriverWait(driver, Long.parseLong(config.getConfigProperties().getProperty(\"TIMEOUT\")));\n\t\twait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(headerLocator));\n\t\twait.until(ExpectedConditions.elementToBeClickable(headerLocator));\n\t\twait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(editGroupButtonLocator));\n\t\twait.until(ExpectedConditions.elementToBeClickable(editGroupButtonLocator));\n\t\twait.until(ExpectedConditions.elementToBeClickable(overviewTabLocator));\n\t\twait.until(ExpectedConditions.elementToBeClickable(membersTabLocator));\n\t\twait.until(ExpectedConditions.elementToBeClickable(resourcesTabLocator));\n\t\twait.until(ExpectedConditions.elementToBeClickable(discussionsTabLocator));\n//\t\twait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(followLinkLocator));\n//\t\twait.until(ExpectedConditions.elementToBeClickable(followLinkLocator));\n//\t\twait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(leaveLinkLocator));\n//\t\twait.until(ExpectedConditions.elementToBeClickable(leaveLinkLocator));\n\t\t\n\t\t/* Reset the implicit wait */\n\t\tdriver.manage().timeouts().implicitlyWait(Long.parseLong(config.getConfigProperties().getProperty(\"TIMEOUT\")), TimeUnit.SECONDS);\n\t}",
"@Override\n public void waitUntilPageObjectIsLoaded() {\n }",
"@Test\n public void pageLoadTimeout()\n {\n\n driver.manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS);\n driver.get(\"https://www.google.com/\");\n\n /*\n In the code above, if your page does not load within 30 seconds, WebDriverException will be thrown.\n\n Selenium Timeouts must be included to create effective, comprehensive and seamlessly running test cases.\n This article intends to help in this regard by briefly explaining how Timeouts work,\n and how they can be incorporated into Selenium test scripts.\n */\n }",
"public void ImplicitlyWait_PageLoadTimeout() throws InterruptedException {\r\n\t//declaration of chrome driver\r\n\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\chromedriver.exe\");\r\n\t WebDriver driver=new ChromeDriver(); \r\n\t \r\n\t\t\tdriver.manage().timeouts().pageLoadTimeout(20, TimeUnit.SECONDS);\r\n\t\t\t\r\n\t //Navigated to the webpage\r\n\tdriver.get(\"https://contentstack.built.io\");\r\n \tdriver.findElement(By.linkText(\"Forgot password?\")).click();\r\n \t\r\n //driver.quit();\r\n}",
"public void waitForPageToLoad() {\n\t\ttry {\n\t\t\twait.until(new ExpectedCondition<Boolean>() {\n\t\t\t\tpublic Boolean apply(WebDriver wd) {\n\t\t\t\t\treturn isPageLoaded(verificationPoints());\n\t\t\t\t}\n\t\t\t});\n\t\t} \n\t\tcatch (TimeoutException timeOutException) {\n\t\t\tthrow new AssertionError(this.getClass().getSimpleName() + \" is not verified. Missing \" + returnMissingElements(verificationPoints()));\n\t\t}\n\t}",
"public void waitForVerifyHhsPage() {\n verifyHHSPageElement.waitForState().enabled(30);\n }",
"public static void waitForPageLoad(WebDriver driver) {\n\t \n\t // wait for Javascript to load\n\t \n\t try {\n\t\t\t(new WebDriverWait(driver, jsciptLoadTime)).until(new ExpectedCondition<Boolean>() {\n\t\t\t public Boolean apply(WebDriver d) {\n\t\t\t JavascriptExecutor js = (JavascriptExecutor) d;\n\t\t\t String javascriptsreadyState = js.executeScript(\"return document.readyState\").toString();\t\t\t \n\t\t\t return (Boolean) javascriptsreadyState.equals(\"complete\");\n\t\t\t }\n\t\t\t});\n\t\t\t\n\t\t\t// wait for jQuery to load\n\t\t\t(new WebDriverWait(driver, jQueryLoadTime)).until(new ExpectedCondition<Boolean>() {\n\t\t\t public Boolean apply(WebDriver d) {\n\t\t\t JavascriptExecutor js = (JavascriptExecutor) d;\n\t\t\t String jqueryLoad = js.executeScript(\"return window.jQuery != undefined && jQuery.active === 0\").toString();\t\t\t \n\t\t\t return (Boolean) jqueryLoad.equals(\"true\");\n\t\t\t }\n\t\t\t});\n\t\t} catch (TimeoutException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.getMessage();\n\n\t\t}\n\t}",
"public static void awaitUntilPageIsLoaded (WebDriver webDriver, int timer)\n\t{\n\t\tawait ().\n\t\t\t\tatMost (timer, SECONDS).\n\t\t\t\tpollDelay (5, SECONDS).\n\t\t\t\tpollInterval (1, SECONDS).\n\t\t\t\tignoreExceptions ().\n\t\t\t\tuntilAsserted (() -> assertThat (((JavascriptExecutor) webDriver).executeScript (\"return document.readyState\").toString ()).\n\t\t\t\t\t\tas (\"Wait for the web Page to be rendered and loaded completely.\").\n\t\t\t\t\t\tisEqualTo (\"complete\"));\n\t}",
"public void waitForPageToLoad(int timeOutInSeconds) {\n\t\tboolean flag=false;\n\t\ttry {\n\t\t\tJavascriptExecutor js = (JavascriptExecutor) driver;\n\t\t\tString jsCommand = \"return document.readyState\";\n\t\t\t\n\t\t\t// Validate readyState before doing any waits\n\t\t\tif (js.executeScript(jsCommand).toString().equals(\"complete\")) {\n\t\t\t\tflag=true;\n\t\t\t} else {\n\t\t\t\tfor (int i = 0; i < timeOutInSeconds; i++) {\n\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\tflag=js.executeScript(jsCommand).toString().equals(\"complete\")?true:false;\n\t\t\t\t\tif(flag)break;\n\t\t\t\t} //for-loop\n\t\t\t} //if-else\n\t\t\t\n\t\t\tif(!flag) {\n\t\t\t\tlog.error(\"Failed to Load Complete Page....\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Exception to Load Complete Page....\");\n\t\t}\n\t}",
"public void waitForScreenLoad() throws Exception {\n try {\n Thread.sleep(2000);\n //TODO implement generic way of handling screen loading, page transaction\n } catch (Exception e) {\n error(\"Exception Occurred in while waiting screen to get loaded\");\n error(Throwables.getStackTraceAsString(e));\n throw new Exception(Throwables.getStackTraceAsString(e));\n }\n }",
"public void waitForBrowserToLoadCompletely(WebDriver driver) {\n\t\tString state = null;\n\t\tString oldstate = null;\n\t\ttry {\n\t\t\tSystem.out.print(\"Waiting for browser loading to complete\");\n\t\t\tint i = 0;\n\t\t\twhile (i < 5) {\n\t\t\t\tThread.sleep(1000);\n\t\t\t\tstate = ((JavascriptExecutor) driver).executeScript(\"return document.readyState;\").toString();\n\t\t\t\tSystem.out.print(\".\" + Character.toUpperCase(state.charAt(0)) + \".\");\n\t\t\t\tif (state.equals(\"interactive\") || state.equals(\"loading\"))\n\t\t\t\t\tbreak;\n\t\t\t\t/*\n\t\t\t\t * If browser in 'complete' state since last X seconds. Return.\n\t\t\t\t */\n\n\t\t\t\tif (i == 1 && state.equals(\"complete\")) {\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\ti = 0;\n\t\t\toldstate = null;\n\t\t\tThread.sleep(2000);\n\n\t\t\t/*\n\t\t\t * Now wait for state to become complete\n\t\t\t */\n\t\t\twhile (true) {\n\t\t\t\tstate = ((JavascriptExecutor) driver).executeScript(\"return document.readyState;\").toString();\n\t\t\t\tSystem.out.print(\".\" + state.charAt(0) + \".\");\n\t\t\t\tif (state.equals(\"complete\"))\n\t\t\t\t\tbreak;\n\n\t\t\t\tif (state.equals(oldstate))\n\t\t\t\t\ti++;\n\t\t\t\telse\n\t\t\t\t\ti = 0;\n\t\t\t\t/*\n\t\t\t\t * If browser state is same (loading/interactive) since last 60\n\t\t\t\t * secs. Refresh the page.\n\t\t\t\t */\n\t\t\t\tif (i == 15 && state.equals(\"loading\")) {\n\t\t\t\t\tSystem.out.println(\"\\nBrowser in \" + state + \" state since last 60 secs. So refreshing browser.\");\n\t\t\t\t\tdriver.navigate().refresh();\n\t\t\t\t\tSystem.out.print(\"Waiting for browser loading to complete\");\n\t\t\t\t\ti = 0;\n\t\t\t\t} else if (i == 6 && state.equals(\"interactive\")) {\n\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\"\\nBrowser in \" + state + \" state since last 30 secs. So starting with execution.\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tThread.sleep(4000);\n\t\t\t\toldstate = state;\n\n\t\t\t}\n\t\t\tSystem.out.println();\n\n\t\t} catch (InterruptedException ie) {\n\t\t\tie.printStackTrace();\n\t\t}\n\t}",
"@Step(\"Waiting for page load\")\n public abstract PageBase load();",
"private void webDriverTimeout(){\n try {\n Thread.sleep(TIMEOUT_SHORT);\n } catch (InterruptedException e){\n e.printStackTrace();\n }\n }",
"public static void waitTillPageLoad(String eleName, AndroidDriver driver, String pageName, int seconds)\n\t\t\tthrows IOException {\n\t\ttry {\n\t\t\tlogger.info(\"---------Method waiting for invisibility of progress bar ---------\");\n\t\t\tWait<AndroidDriver> wait = new FluentWait<AndroidDriver>(driver).withTimeout(seconds, TimeUnit.MINUTES)\n\t\t\t\t\t.pollingEvery(250, TimeUnit.MICROSECONDS).ignoring(NoSuchElementException.class);\n\t\t\tAssert.assertTrue(\n\t\t\t\t\t(wait.until(ExpectedConditions\n\t\t\t\t\t\t\t.invisibilityOfElementLocated(By.className(\"android.widget.ProgressBar\")))),\n\t\t\t\t\t\"On clicking\" + eleName + \" Page is on load, Unable to proceed\");\n\t\t\tMyExtentListners.test.pass(\" Verify On clicking \" + \"\\'\" + eleName + \"\\''\" + \" user is redirected to \"\n\t\t\t\t\t+ \"\\'\" + pageName + \"\\''\" + \" || On clicking \" + \"\\'\" + eleName + \"\\''\"\n\t\t\t\t\t+ \" user is redirected to \" + \"\\'\" + pageName + \"\\''\");\n\t\t} catch (AssertionError e) {\n\t\t\tMyExtentListners.test.fail(MarkupHelper.createLabel(\" Verify On clicking \" + \"\\'\" + eleName + \"\\''\"\n\t\t\t\t\t+ \" user is redirected to \" + \"\\'\" + pageName + \"\\''\" + \" || On clicking \" + \"\\'\" + eleName\n\t\t\t\t\t+ \"\\''\" + \" user is not redirected to \" + \"\\'\" + pageName + \"\\''\", ExtentColor.RED));\n\n\t\t\tMyExtentListners.test.addScreenCaptureFromPath(capture(driver, eleName));\n\t\t\tAssert.fail(\"On clicking \" + \"\\'\" + eleName + \"\\''\" + \", Page is on load, Unable to proceed\");\n\t\t\tthrow e;\n\t\t} catch (Exception e) {\n\t\t\tMyExtentListners.test.fail(MarkupHelper.createLabel(\" Verify On clicking \" + \"\\'\" + eleName + \"\\''\"\n\t\t\t\t\t+ \" user is redirected to \" + \"\\'\" + pageName + \"\\''\" + \" || On clicking \" + \"\\'\" + eleName\n\t\t\t\t\t+ \"\\''\" + \" user is not redirected to \" + \"\\'\" + pageName + \"\\''\", ExtentColor.RED));\n\n\t\t\tMyExtentListners.test.addScreenCaptureFromPath(capture(driver, eleName));\n\t\t\tAssert.fail(\"On clicking \" + \"\\'\" + eleName + \"\\''\" + \", Page is on load, Unable to proceed\");\n\t\t\tthrow e;\n\t\t}\n\t}",
"public void waitForEndOfAllAjaxes(){\r\n\t\tLOGGER.info(Utilities.getCurrentThreadId()\r\n\t\t\t\t+ \" Wait for the page to load...\");\r\n\t\tWebDriverWait wait = new WebDriverWait(driver,Integer.parseInt(Configurations.TEST_PROPERTIES.get(ELEMENTSEARCHTIMEOUT)));\r\n\t\twait.until(new ExpectedCondition<Boolean>() {\r\n\t\t\t@Override\r\n\t\t\tpublic Boolean apply(WebDriver driver) {\r\n\t\t\t\t//\t\t\t\treturn (Boolean)((JavascriptExecutor)driver).executeScript(\"return jQuery.active == 0\");\r\n\t\t\t\treturn ((JavascriptExecutor)driver).executeScript(\"return document.readyState\").equals(\"complete\");\r\n\t\t\t\t//\t\t\t\t return Boolean.valueOf(((JavascriptExecutor) driver).executeScript(\"return (window.angular !== undefined) && (angular.element(document).injector() !== undefined) && (angular.element(document).injector().get('$http').pendingRequests.length === 0)\").toString());\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}",
"@And(\"^I wait for page to load completely$\")\n\tpublic void waitForCompleteLoading(){\n\t\tString result=selenium.synchronize();\n\t\tAssert.assertEquals(selenium.result_pass, result);\n\t}",
"public void implicitTime() {\n\n try {\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"public static void waitUntilDocumentIsReady(WebDriver driver) throws InterruptedException {\r\n\r\n for (int i = 0; i < 30; i++) { \r\n // To check page ready state.\r\n if (getJavascriptExecutor(driver).executeScript(\"return document.readyState\").toString()\r\n .equals(\"complete\")) {\r\n break;\r\n }\r\n else {\r\n Thread.sleep(1000);\r\n }\r\n }\r\n }",
"protected void loadURL(String thisURL) {\n\t\tgetDriver().get(thisURL);\n\t\ttry {\n\t\t\tThread.sleep(2000);\n\t\t} catch (Exception e) {\n\t\t\t// nothing\n\t\t}\n\t}",
"public synchronized void waitUntilLoad() {\n\t\twhile (!this.loaded) {\n\t\t\tSystem.out.println(\"Waiting for news to load\");\n\t\t\ttry {\n\t\t\t\twait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t}\n\t\t}\n\t}",
"private void waitUntilReady() {\n\t\t\twhile (deque.isEmpty() && loadThread.isAlive()) {\n//\t\t\t\ttry {\n//\t\t\t\t\tThread.sleep(100);\n//\t\t\t\t} catch (InterruptedException e) {\n//\t\t\t\t\tExceptionUtils.throwAsRuntimeException(e);\n//\t\t\t\t}\n\t\t\t}\n\t\t}",
"public static void waitForURL (String url, int timer)\n\t{\n\t\tWebDriver driver = getDriver ();\n\t\tWebDriverWait wait = new WebDriverWait (driver, timer);\n\t\twait.until (ExpectedConditions.refreshed (ExpectedConditions.urlContains (url)));\n\t}",
"private void waitForNextNews(final WebDriver webDriver) {\r\n\t\tfinal WebDriverWait wait = new WebDriverWait(webDriver, WAIT_SECONDS);\r\n\t\twait.until(\r\n\t\t\tExpectedConditions.elementToBeClickable(By.className(\"tbutton\"))\r\n\t\t);\r\n\t}",
"public static void waitTillProgressBarLoad(String eleName, AndroidDriver driver, String pageName, int seconds)\n\t\t\tthrows IOException {\n\t\ttry {\n\t\t\tlogger.info(\"---------Method waiting for invisibility of progress bar ---------\");\n\t\t\tWait<AndroidDriver> wait = new FluentWait<AndroidDriver>(driver).withTimeout(seconds, TimeUnit.SECONDS)\n\t\t\t\t\t.pollingEvery(250, TimeUnit.MICROSECONDS).ignoring(NoSuchElementException.class);\n\t\t\tAssert.assertTrue(\n\t\t\t\t\t(wait.until(ExpectedConditions\n\t\t\t\t\t\t\t.invisibilityOfElementLocated(By.id(\"com.stellapps.usb:id/progressBar\")))),\n\t\t\t\t\t\"On clicking\" + eleName + \" Page is on load, Unable to proceed\");\n\t\t\tMyExtentListners.test.pass(\" Verify On clicking \" + \"\\'\" + eleName + \"\\''\" + \" user is redirected to \"\n\t\t\t\t\t+ \"\\'\" + pageName + \"\\''\" + \" || On clicking \" + \"\\'\" + eleName + \"\\''\"\n\t\t\t\t\t+ \" user is redirected to \" + \"\\'\" + pageName + \"\\''\");\n\t\t} catch (AssertionError e) {\n\t\t\tMyExtentListners.test.fail(MarkupHelper.createLabel(\" Verify On clicking \" + \"\\'\" + eleName + \"\\''\"\n\t\t\t\t\t+ \" user is redirected to \" + \"\\'\" + pageName + \"\\''\" + \" || On clicking \" + \"\\'\" + eleName\n\t\t\t\t\t+ \"\\''\" + \" user is not redirected to \" + \"\\'\" + pageName + \"\\''\", ExtentColor.RED));\n\n\t\t\tMyExtentListners.test.addScreenCaptureFromPath(capture(driver, eleName));\n\t\t\tAssert.fail(\"On clicking \" + \"\\'\" + eleName + \"\\''\" + \", Page is on load, Unable to proceed\");\n\t\t\tthrow e;\n\t\t} catch (Exception e) {\n\t\t\tMyExtentListners.test.fail(MarkupHelper.createLabel(\" Verify On clicking \" + \"\\'\" + eleName + \"\\''\"\n\t\t\t\t\t+ \" user is redirected to \" + \"\\'\" + pageName + \"\\''\" + \" || On clicking \" + \"\\'\" + eleName\n\t\t\t\t\t+ \"\\''\" + \" user is not redirected to \" + \"\\'\" + pageName + \"\\''\", ExtentColor.RED));\n\n\t\t\tMyExtentListners.test.addScreenCaptureFromPath(capture(driver, eleName));\n\t\t\tAssert.fail(\"On clicking \" + \"\\'\" + eleName + \"\\''\" + \", Page is on load, Unable to proceed\");\n\t\t\tthrow e;\n\t\t}\n\t}",
"public void waitUntilLoadingDoesNotExistAndVerifyContainerDisplayed(){\n\t\tverifyContainerDisplayedResultsPage();\r\n\t}",
"public void gotoHome() // Wait for Home page or Verify Device page \n\t{\t\t\t\t \n\t\tWebDriverWait wait= new WebDriverWait(driver,90);\n\t\t\n\t\ttry\n\t\t{\n\t\t\twait.until(ExpectedConditions.visibilityOf(checker));\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tAssert.fail(\" Page is taking too much time to load , stopping execution\");\n\t\t}\t\t\n\t}",
"@Test \n\t@Description(\"Wait for Loader to finish TC\")\n\tpublic void waitText() {\n\t\therokuappNavigate();\n\t\therokuapp hero = new herokuapp(driver);\n\t\thero.dynamicloadclick();\n\t\thero.example2click();\n\t\thero.start();\n\t\t//hero.waitToFinish();\n\t\tWebDriverWait wait = new WebDriverWait(driver, 40);\n\t\twait.until(ExpectedConditions.invisibilityOf(hero.ajaxloader));\n\t\tAssert.assertEquals(hero.finishmsg.getText(), \"Hello World!\");\n\t\t//logger.pass(\"Required Search Result appeared\");\n\t\t//logger.fail(\"Required Search Result didn't appear\");\n\t}",
"public void waitForCategorytoLoad() throws Exception {\n\t\twaitForJavascripttoLoad();\n\t}",
"public static Boolean WaitUntilDocumentIsReady(){\n\t\t \n\t\t WebDriverWait wait = new WebDriverWait(driver, 30);\n\t\t \n\t\t ExpectedCondition<Boolean> pageLoad = new ExpectedCondition<Boolean>() \n\t\t {\n\t\t public Boolean apply(WebDriver Wdriver)\n\t\t {\n\t\t \t JavascriptExecutor js1 = (JavascriptExecutor) driver;\n\t\t \t try {\n\t\t \t\t return js1.executeScript(\"return document.readyState\").equals(\"complete\");\n\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t catch (Exception e) \n\t\t \t {\n\t\t\t\t return false;\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t };\n \t\t\t \t return wait.until(pageLoad);\n\t\t\t}",
"@When(\"the user waits for the next news to be loaded\")\r\n\tpublic final void whenTheUserWaitsForTheNextNewsToBeLoaded() {\r\n\t\twaitForNextNews(chromeDriver);\r\n\t\twaitForNextNews(firefoxDriver);\r\n\t\twaitForNextNews(internetExplorerDriver);\r\n\t}",
"private void travelToAirport()\n {\n try\n { sleep ((long) (1 + 30000 * Math.random ()));\n }\n catch (InterruptedException e) {}\n }",
"public static boolean waitForPageLoad(WebDriver driver)\n\t\t\tthrows InterruptedException {\n\t\tboolean isLoaded = false;\n\t\tint iTimeOut = Integer.parseInt(Cls_Generic_methods\n\t\t\t\t.getConfigValues(\"timeOutInSeconds\"));\n\t\tThread.sleep(2000);\n\t\ttry {\n\t\t\tlogger.info(\"Waiting For Page load via JS\");\n\t\t\tExpectedCondition<Boolean> pageLoadCondition = new ExpectedCondition<Boolean>() {\n\t\t\t\tpublic Boolean apply(WebDriver driver) {\n\t\t\t\t\treturn ((JavascriptExecutor) driver).executeScript(\n\t\t\t\t\t\t\t\"return document.readyState\").equals(\"complete\");\n\t\t\t\t}\n\t\t\t};\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, iTimeOut);\n\t\t\twait.until(pageLoadCondition);\n\t\t\tisLoaded = true;\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Error Occured waiting for Page Load \"\n\t\t\t\t\t+ driver.getCurrentUrl());\n\t\t}\n\t\treturn isLoaded;\n\t}",
"private void sleep() {\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"private void waitForElementToBeLoad(String string) {\n\t\n}",
"public static void ImplicitWaitPageWait(int Time) {\n\t\tBrowser.Driver.manage().timeouts().implicitlyWait(Time, TimeUnit.SECONDS);\n\t}",
"public void waitForElement(WebElement element) {\n WebDriverWait wait = new WebDriverWait(driver, 30);\n wait.until(ExpectedConditions.visibilityOf(element));\n }",
"private void loadingPhase() {\n try { Thread.sleep(10000); } catch(InterruptedException e) { return; }\n ClickObserver.getInstance().setTerrainFlag(\"\");\n }",
"private void waitForElement(WebDriver driver, int timeToWaitInSeconds, By ElementLocater) {\n\t\tWebDriverWait wait = new WebDriverWait(driver, timeToWaitInSeconds);\n\t\twait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(ElementLocater));\n\n\t}",
"public boolean waitLoading() {\n\t\t\treturn waitLoading;\n\t\t}",
"public void waitForTransfer() {\n\t\tWebDriverUtil.waitForElementVisible(driver, redirectTimer, 10);\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\n\t\tLOG.info(\"waiting to be transferred to merchant site...\");\n\t\twait.until(ExpectedConditions.invisibilityOfElementLocated(By.id(\"transfer-success\")));\n\t\tLOG.info(\"done waiting\"); \n\t}",
"public void timeout(){\n // close open loading dialogs\n Fragment dialog = getSupportFragmentManager().findFragmentByTag(\"loading\");\n if (dialog != null) {\n loadingDialog.dismiss();\n }\n timeoutDialog.show(getSupportFragmentManager(), \"timeout\");\n }",
"public static void main(String[] args) throws InterruptedException {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"D:/Softwares/chromedriver/chromedriver.exe\");\n\t\tWebDriver driver=new ChromeDriver();\n\t\tdriver.manage().window().maximize();\n\t\t\n\t\tdriver.get(\"https://the-internet.herokuapp.com/dynamic_loading\");\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"content\\\"]/div/a[1]\")).click();\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"start\\\"]/button\")).click();\n\t\t//Thread.sleep(10000);\n\t\t\n\t\tWait <WebDriver> wait=new FluentWait<WebDriver>(driver)\t\t\t\t\t\t\t\n\t\t\t\t.withTimeout(30, TimeUnit.SECONDS) \t\t\t\n\t\t\t\t.pollingEvery(5, TimeUnit.SECONDS) \t\t\t\n\t\t\t\t.ignoring(NoSuchElementException.class);\n\t\t\t\t//new FluentWait<WebDriver>(driver).(30,TimeUnit.SECONDS).;\n\t\t//driver.close();\n\t}",
"public void refreshPage() {\n WebDriverManager.getDriver().navigate().refresh();\n waitForPageToLoad();\n }",
"public static void smallBusiness() throws InterruptedException {\n\n Thread.sleep(3000);\n driver.findElement(By.xpath(\"/html/body/div[3]/div[2]/header[1]/div[2]/div/div[1]/div/ul/li[2]/a\")).click();\n }",
"public static void longWait(){\r\n\t\ttry {\r\n\t\t\tTimeUnit.SECONDS.sleep(15);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\tSystem.out.println(\"Interruption happened due to sleep() method\");\r\n\t\t}\r\n\t}",
"void waitForAddStatusIsDisplayed() {\n\t\tSeleniumUtility.waitElementToBeVisible(driver, homepageVehiclePlanning.buttonTagAddStatusHomepageVehiclePlanning);\n\t}",
"public void LoadedHomePage()\r\n {\r\n //Generating Alert Using Javascript Executor\r\n if (driver instanceof JavascriptExecutor) \r\n ((JavascriptExecutor) driver).executeScript(\"alert('Loaded Home Page');\");\r\n \r\n WaitTime(2000);\r\n driver.switchTo().alert().accept();\r\n driver.switchTo().defaultContent();\r\n }",
"public void crawlDelay()\n\t{\n//\t\tint delay = robot.getCrawlDelay(best_match);\n//\t\tif (delay!=-1)\n//\t\t{\n//\t\t\ttry \n//\t\t\t{\n//\t\t\t\tTimeUnit.SECONDS.sleep(robot.getCrawlDelay(best_match));\n//\t\t\t} \n//\t\t\tcatch (InterruptedException e) \n//\t\t\t{\n//\t\t\t\treturn;\n//\t\t\t}\n//\t\t}\n\t}",
"@BeforeClass\n public void GotoURL() {\n\t\tString URL = Base.GetDataFromPropertiesFile(\"url1\");\n\t\t// set implicit wt at page level\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(300, TimeUnit.SECONDS);\n\t\tdriver.get(URL);\n\t\t\n\n\t \n }",
"private void waitForDialogLoadingBackdropToFade( ) {\r\n\t\t\r\n\t\t/* --- Let's wait for 10 seconds, until the temporary overlay dialog disappears. - */\r\n\t\tWait.invisibilityOfElementLocated (driver, this.overlayDialogRefresher1Locator, 15 );\r\n\t\tWait.invisibilityOfElementLocated (driver, this.overlayDialogRefresher2Locator, 15 );\r\n\t}",
"private void sleep()\n {\n try {\n Thread.sleep(Driver.sleepTimeMs);\n }\n catch (InterruptedException ex)\n {\n\n }\n }",
"private void loadPage() {\n \t\n if (((sPref.equals(ANY)) && (wifiConnected || mobileConnected))\n || ((sPref.equals(WIFI)) && (wifiConnected))) {\n // AsyncTask subclass\n \t\n new DownloadXmlTask().execute(URL);\n } else {\n showErrorPage();\n }\n }",
"public void run() {\n\t\t\t\t\t\tif (__delayCounter == _delayCounter[0]) {\r\n\t\t\t\t\t\t\t_pageBook.showPage(__page);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}",
"public void validatePageLoad() {\n\t\tJavascriptExecutor js;\n\t\tjs = (JavascriptExecutor) uiElementAction.driver;\n\t\tboolean assertion =\n\t\t\t\tjs.executeScript(\"return document.readyState\").equals(\"complete\") == true;\n\t\tLog.info(\"The page loaded successfully: \" + assertion);\n\t\tAssert.assertTrue(\"The page loaded successfully: \" + assertion, assertion);\n\t}",
"public void Wait_ExplictWait() {\r\n\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\chromedriver.exe\");\r\n\t WebDriver driver=new ChromeDriver(); \r\n\t \r\n\t\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n\t \t\t\tdriver.get(\"https://contentstack.built.io\");\r\n\t \t\t\t\r\n\t \t\t\t\r\n\t\t\t\t\t\tWebDriverWait wait=new WebDriverWait(driver, 15);\r\n\t\t\t\t\r\n\t\t\t\t\t\tdriver.findElement(By.id(\"email\")).sendKeys(\"kannan\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tWebElement link;\r\n\t\t\t\t\t\tlink= wait.until(ExpectedConditions.visibilityOfElementLocated(By.linkText(\"kForgot password?\")));\r\n\t\t\t\t\t\tlink.click();\r\n driver.quit();\r\n}",
"private void sleep() {\n try {\n for(long count = 0L; this.DATA_STORE.isButtonPressed() && count < this.sleepTime; count += 20L) {\n Thread.sleep(20L);\n }\n } catch (InterruptedException iEx) {\n // For now, InterruptedException may be ignored if thrown.\n }\n\n if (this.sleepTime > 20L) {\n this.sleepTime = (long)((double)this.sleepTime / 1.3D);\n }\n }",
"private void waitFPS() {\n try {\n Thread.sleep((int) (1000.0f / 60.0f));\n } catch (InterruptedException e) {\n logger.error(\"Unable to wait some milli's !\", e);\n }\n }",
"@Then(\"scroll the page\")\n\tpublic void scroll_the_page() throws InterruptedException {\n\t\tThread.sleep(5000);\n\t\tJavaScriptUtils.scrollPageDown(context.DRIVER);\n\t\tcontext.SCN.write(\"js scroll is successfully\");\n\n\t}",
"public void waitForContentLoad(String element) {\n // TODO implement generic method to wait until page content is loaded\n\n wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.xpath(\".//td[contains(., \" + element + \")]\"))));\n }",
"private static void waiting(int time) {\r\n\t\ttry {\r\n\t\t\tThread.sleep(time);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}",
"public void setUpMethod(){\n driver = WebDriverFactory.getDriver(\"Chrome\");\n //maximize the page\n driver.manage().window().maximize();\n //implicit wait\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n }",
"public static void waitForElementVisible(By by, long time) {\n WebDriverWait wait = new WebDriverWait(driver, time);\n wait.until(ExpectedConditions.visibilityOfElementLocated(by));\n }",
"public void implicitWait(){\r\n\t\tdriver.manage().timeouts().implicitlyWait(Integer.parseInt(FilesAndFolders.getPropValue(\"implicitWaitTime\")), TimeUnit.SECONDS);\r\n\t}",
"private Document getPageWithRetries(URL url) throws IOException {\n Document doc;\n int retries = 3;\n while (true) {\n sendUpdate(STATUS.LOADING_RESOURCE, url.toExternalForm());\n LOGGER.info(\"Retrieving \" + url);\n doc = Http.url(url)\n .referrer(this.url)\n .cookies(cookies)\n .get();\n if (doc.toString().contains(\"IP address will be automatically banned\")) {\n if (retries == 0) {\n throw new IOException(\"Hit rate limit and maximum number of retries, giving up\");\n }\n LOGGER.warn(\"Hit rate limit while loading \" + url + \", sleeping for \" + IP_BLOCK_SLEEP_TIME + \"ms, \" + retries + \" retries remaining\");\n retries--;\n try {\n Thread.sleep(IP_BLOCK_SLEEP_TIME);\n } catch (InterruptedException e) {\n throw new IOException(\"Interrupted while waiting for rate limit to subside\");\n }\n }\n else {\n return doc;\n }\n }\n }",
"public void setUploading()\n {\n jPanel4.setVisible(false);\n th.start();\n }",
"private void delayStart() {\n try {\n Thread.sleep(3000);\n } catch (InterruptedException e) {\n LOGGER.error(\"Could not sleep\", e);\n }\n }",
"protected void waitForElementToDisplay(By locator, int timeInSeconds) {\n\t\twait = new WebDriverWait(driver, timeInSeconds);\n\t\twait.until(ExpectedConditions.visibilityOfElementLocated(locator));\n\t}",
"@BeforeMethod\n public void beforeMethod() {\n\t\t baseUrl = \"http://10.129.50.4/\";\n driver = new FirefoxDriver();\n driver.manage().window().maximize();\n //Put a Implicit wait, this means that any search for elements on the page could take the time the implicit wait is set for before throwing exception\n\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n //Launch the Online Store Website\n\n driver.get(baseUrl + \"/courses/IITB/ABC101/2015-16/courseware/69e79228b2ee49988900ab45c555eedb/\");\n \n }",
"public void waitForVisibility(By by,int time){\n WebDriverWait wait = new WebDriverWait(driver, time);\n wait.until(ExpectedConditions.visibilityOfElementLocated(by));\n }",
"public void waitTillObjectAppears(By locator) {\n\t\ttry {\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, TIMEOUT_S);\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(locator));\n\t\t} catch (TimeoutException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private static void wait(int seconds) {\n try {\n Thread.sleep(seconds * 1000);\n }\n catch(InterruptedException ie) {\n System.out.println(\"ERROR WAITING: Failed to generate a Thread to wait.\");\n ie.printStackTrace();\n }\n }",
"private static void wait(int seconds) {\n try {\n Thread.sleep(seconds * 1000);\n }\n catch(InterruptedException ie) {\n System.out.println(\"ERROR WAITING: Failed to generate a Thread to wait.\");\n ie.printStackTrace();\n }\n }",
"@Override\n\tprotected void load() {\n\t\tisPageLoaded = true;\n\t}",
"@Override\r\n\t\tprotected String doInBackground(String... params) {\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(3000);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}",
"@Given(\"^User navigates to the URL$\")\r\npublic void user_navigates_to_the_URL() throws Throwable {\r\n\tdriver.get(prop.getProperty(\"url\"));Thread.sleep(4000);\r\n WebDriverWait wait = new WebDriverWait(driver,60);\r\n\t wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(prop.getProperty(\"Popup\"))));\r\n\t driver.findElement(By.xpath(prop.getProperty(\"Popup\"))).click();Thread.sleep(5000);\r\n}",
"public void loadPage() {\n\t\tLog.i(TAG, \"MyGardenListActivity::LoadPage ! Nothing to do anymore here :)\");\n\t}",
"@Test\n\tpublic void navigateDemo() throws InterruptedException {\n\t\tdriver.navigate().to(url);\n\t\tdriver.manage().window().maximize();\n\t\tdriver.findElement(By.xpath(\"//input[@type=\\\"submit\\\"]\")).click();\n\t\tThread.sleep(5000);\n\t\tdriver.navigate().back();\n\t\tThread.sleep(5000);\n\t\tdriver.navigate().forward();\n\t\tThread.sleep(3000);\n\t\tdriver.navigate().refresh();\n\t\tThread.sleep(1000);\n\n\t}",
"public static boolean waitForPageLoad(WebDriver driver, int iTimeOut)\n\t\t\tthrows InterruptedException {\n\t\tboolean isLoaded = false;\n\n\n\t\ttry {\n\t\t\tlogger.info(\"Waiting For Page load via JS\");\n\t\t\tExpectedCondition<Boolean> pageLoadCondition = new ExpectedCondition<Boolean>() {\n\t\t\t\tpublic Boolean apply(WebDriver driver) {\n\t\t\t\t\treturn ((JavascriptExecutor) driver).executeScript(\n\t\t\t\t\t\t\t\"return document.readyState\").equals(\"complete\");\n\t\t\t\t}\n\t\t\t};\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, iTimeOut);\n\t\t\twait.until(pageLoadCondition);\n\t\t\tisLoaded = true;\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Error Occured waiting for Page Load \"\n\t\t\t\t\t+ driver.getCurrentUrl());\n\t\t}\n\t\treturn isLoaded;\n\t}",
"public void loadPage() { \n\t \n\t if((sPref.equals(ANY)) && (wifiConnected || mobileConnected)) {\n\t \tnew DownloadXmlTask().execute(URL);\n\t }\n\t else if ((sPref.equals(WIFI)) && (wifiConnected)) {\n\t new DownloadXmlTask().execute(URL);\n\t } else {\n\t // show error\n\t } \n\t }"
] | [
"0.82182896",
"0.7641643",
"0.7559991",
"0.7552112",
"0.73343205",
"0.7292634",
"0.7257564",
"0.7256113",
"0.7246143",
"0.7211818",
"0.7209525",
"0.7204807",
"0.70837146",
"0.7071169",
"0.7057905",
"0.6974048",
"0.69466937",
"0.68562615",
"0.681007",
"0.68008214",
"0.67599577",
"0.6708671",
"0.668806",
"0.6680087",
"0.66761017",
"0.6674085",
"0.66192985",
"0.658863",
"0.6553677",
"0.64979124",
"0.6488837",
"0.6453346",
"0.6448375",
"0.6408065",
"0.6396929",
"0.63876605",
"0.6385989",
"0.6331044",
"0.6315194",
"0.6285039",
"0.6268762",
"0.6233229",
"0.6189463",
"0.6186988",
"0.61855793",
"0.61783284",
"0.6176965",
"0.6174183",
"0.61546165",
"0.6144967",
"0.6111618",
"0.60607064",
"0.60535896",
"0.6046057",
"0.60307485",
"0.59618646",
"0.5957278",
"0.5925003",
"0.5917657",
"0.5916781",
"0.591544",
"0.5905306",
"0.58961713",
"0.5885885",
"0.58680254",
"0.58677924",
"0.5866411",
"0.58497655",
"0.5839628",
"0.5832646",
"0.58103824",
"0.58098197",
"0.5807098",
"0.5791535",
"0.57903224",
"0.57820094",
"0.57717234",
"0.57665884",
"0.5753259",
"0.5753208",
"0.5751689",
"0.5744952",
"0.57448834",
"0.5741463",
"0.57272047",
"0.572658",
"0.56989074",
"0.5698583",
"0.5698242",
"0.5695393",
"0.56829447",
"0.5675849",
"0.5675849",
"0.56758046",
"0.567569",
"0.56737757",
"0.5653303",
"0.5652392",
"0.56450593",
"0.56310385"
] | 0.7631167 | 2 |
This method waits for the element to be visible | public void waitForElementVisibility(WebDriver driver, WebElement element)
{
WebDriverWait wait = new WebDriverWait(driver,20);
wait.until(ExpectedConditions.visibilityOf(element));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void waitForVisibility(WebElement element){\n getWait().until(ExpectedConditions.visibilityOf(element));\n }",
"public void waitElementToBeVisible(WebElement webElement) {\n wait.until(ExpectedConditions.visibilityOf(webElement));\n }",
"protected WebElement waitForElementToBeVisible(WebElement element) {\n actionDriver.moveToElement(element);\n WebDriverWait wait = new WebDriverWait(driver, 5);\n wait.until(ExpectedConditions.visibilityOf(element));\n return element;\n }",
"public void waitForVisibilityOfElement(WebElement element) {\n\t\twait = new WebDriverWait(driver, 10);\n\t\twait.until(ExpectedConditions.visibilityOf(element));\n\t}",
"public static void waitUntilElementIsInvisible(WebElement element) {\n WebDriverWait webDriverWait = getWebDriverWait();\n webDriverWait.until(ExpectedConditions.invisibilityOf(element));\n }",
"public void waitForVisibilityOf(WebElement element) {\n\t\twait.until(ExpectedConditions.visibilityOf(element));\n\t}",
"public static void waitUntilElementIsVisible(WebElement element) {\n WebDriverWait webDriverWait = getWebDriverWait();\n webDriverWait.until(ExpectedConditions.visibilityOf(element));\n }",
"public void waitForVisibilityOfWebElement(WebElement webElement){\r\n\t\twait.until(ExpectedConditions.visibilityOf(webElement));\r\n\t}",
"public void waitForElementVisible(WebElement element) {\r\n\t\ttry {\r\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, timeout);\r\n\t\t\twait.until(ExpectedConditions.visibilityOf(element));\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.info(element.toString() + \" is not present on page\");\r\n\t\t}\r\n\t}",
"public void waitForElement(WebElement element) {\n WebDriverWait wait = new WebDriverWait(driver, 30);\n wait.until(ExpectedConditions.visibilityOf(element));\n }",
"public void checkVisibility(WebElement element) {\n wait = new WebDriverWait(driver, 15, 50);\n wait.until(ExpectedConditions.visibilityOf(element));\n }",
"public static void waitForElementVisiblity(WebElement element) {\n\t\t\t\n\t\t}",
"public void waitForElementToVisisble(WebElement elementToCheck){\n\t\ttry {\n\t\t\twait.until(ExpectedConditions.visibilityOf(elementToCheck));\n\t\t}\n\t\tcatch (Exception ex){\n\t\t\tLog.error(\"Element not visible\");\n\t\t}\n\t}",
"public void waitForElementVisibility(String locator) {\n \t WebDriverWait wait = new WebDriverWait(driver, 10);\n \t wait.until(ExpectedConditions.visibilityOfElementLocated(autoLocator(locator)));\n }",
"public void waitForElementVisibility(String locator) {\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(locator)));\n }",
"public void waitForVisibility(By by,int time){\n WebDriverWait wait = new WebDriverWait(driver, time);\n wait.until(ExpectedConditions.visibilityOfElementLocated(by));\n }",
"public static void waitForElementVisible(By by, long time) {\n WebDriverWait wait = new WebDriverWait(driver, time);\n wait.until(ExpectedConditions.visibilityOfElementLocated(by));\n }",
"public void elementToBeVisible(WebElement element) {\n\t\ttry {\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, 120);\n\t\t\twait.until(ExpectedConditions.visibilityOf (element));\n\t\t} catch (StaleElementReferenceException ex) {\n\t\t\tSystem.out.println(\"Stale Element exception:\" + ex.toString());\n\t\t\tAssert.fail(\"Stale Element exception:\" + ex.toString());\n\t\t} catch (NoSuchElementException ex) {\n\t\t\tSystem.out.println(\"No such element exception:\" + ex.toString());\n\t\t\tAssert.fail(\"No such element exception:\" + ex.toString());\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"Exception in elementToBeVisible method:\" + ex.toString());\n\t\t\tAssert.fail(\"Exception in elementToBeVisible method:\" + ex.toString());\n\t\t}\n\t}",
"public static void waitForElementToBeVisible(WebDriver driver,\n\t\t\tWebElement element) {\n\t\tlogger.info(\"Waiting for an element to be visible \" + element);\n\t\tWebDriverWait wait = new WebDriverWait(driver,\n\t\t\t\tInteger.parseInt(getConfigValues(\"timeOutInSeconds\")));\n\t\twait.until(ExpectedConditions.visibilityOf(element));\n\t}",
"@Override\n public boolean isVisible(){\n \n try\t{\n new WebDriverWait(driver, 1)\n .until((Function<? super WebDriver, ? extends Object>) ExpectedConditions.visibilityOfElementLocated(locator));\n \n return true;\n }\n catch (NoSuchElementException ex){\n return false;\n }\n catch (TimeoutException ex){\n return false;\n }\n \n }",
"public WebElement waitForDisplay(final WebElement webelement)\n {\n return waitForDisplay(webelement, DEFAULT_TIMEOUT);\n }",
"public boolean waitForVisibilityOfElement(By locator) {\r\n\t\ttry {\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(locator));\r\n\t\t\treturn true;\r\n\t\t} catch (ElementNotVisibleException e) {\r\n\t\t\tSystem.out.println(\"ElementNotVisibleException\" + e.getMessage());\r\n\t\t\treturn false;\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"void waitForAddStatusIsDisplayed() {\n\t\tSeleniumUtility.waitElementToBeVisible(driver, homepageVehiclePlanning.buttonTagAddStatusHomepageVehiclePlanning);\n\t}",
"public void isElementVisible(WebElement elem) {\n try {\n driverWait.until(ExpectedConditions.visibilityOf(elem));\n System.out.println(\"Element is present in the page\");\n } catch (Exception e) {\n Assert.fail(\"Element isn't present in the page\");\n }\n }",
"public WebElement checkVisibilityOf(final WebElement element) {\n return (new WebDriverWait(webDriver, WAIT_TIME)).until(ExpectedConditions.visibilityOf(element));\n }",
"public boolean waitForVisibility(By targetElement) {\n try {\n WebDriverWait wait = new WebDriverWait(getDriver(), timeOut);\n wait.until(ExpectedConditions.visibilityOfElementLocated(targetElement));\n return true;\n } catch (TimeoutException e) {\n error(\"Exception Occurred while waiting for visibility of element with definition :: \" +\n targetElement);\n error(Throwables.getStackTraceAsString(e));\n throw new TimeoutException(Throwables.getStackTraceAsString(e));\n }\n }",
"public WebElement waitTillVisible(final WebElement element) {\n return (new WebDriverWait(webDriver, WAIT_TIME)).until(ExpectedConditions.elementToBeClickable(element));\n }",
"public void waitForInvisibilityOfWebElement(By locator){\r\n\t\twait.until(ExpectedConditions.invisibilityOfElementLocated(locator));\r\n\t}",
"public void ensureIsDisplayed() {\n (new WebDriverWait(driver, 10))\n .until(ExpectedConditions.presenceOfElementLocated(\n By.className(\"mat-dialog-container\")));\n }",
"public WebElement visibilityOf(final WebElement element) {\n return (new WebDriverWait(webDriver, DRIVER_WAIT_TIME))\n .until(ExpectedConditions.visibilityOf(element));\n }",
"public WebElement wait(WebElement webElement) {\n WebDriverWait webDriverWait = new WebDriverWait(driver, Integer.parseInt(testData.timeout));\n return webDriverWait.until(ExpectedConditions.visibilityOf(webElement));\n }",
"public static WebElement waitForElementToBeVisible(By locator, int timeOut){\n\t\tWebDriverWait wait = new WebDriverWait(driver, timeOut);\n\t\treturn wait.until(ExpectedConditions.visibilityOf(getElement(locator)));\n\n\t}",
"public WebElement waitForDisplay(final By by)\n {\n return waitForDisplay(by, DEFAULT_TIMEOUT);\n }",
"private void waitforvisibleelement(WebDriver driver2, WebElement signoutimg2) {\n\t\r\n}",
"public void waitModalWindow(By waitForElement) {\n\t\tBaseWaitingWrapper.waitForElementToBeVisible(waitForElement, driver);\r\n\t\t\r\n\r\n\t}",
"public static void explicitWaitTillVisible(WebDriver driver, int sec, WebElement element) {\r\n\r\n\t\tWebDriverWait wait = new WebDriverWait(driver, sec);\r\n\t\twait.until(ExpectedConditions.visibilityOf(element));\r\n\t}",
"public void waitForElementPresent(By locator){\n \tWebDriverWait wait=new WebDriverWait(driver,20);\n \twait.until(ExpectedConditions.presenceOfElementLocated(locator));\n }",
"protected void waitForElementToDisplay(By locator, int timeInSeconds) {\n\t\twait = new WebDriverWait(driver, timeInSeconds);\n\t\twait.until(ExpectedConditions.visibilityOfElementLocated(locator));\n\t}",
"public WebElement wait_until_MobileElementIs_Visible(By locator) throws Exception {\n try {\n info(\"Waiting for element \" + locator + \" visibility state\");\n WebDriverWait wait = new WebDriverWait(getDriver(), timeOut);\n return wait.until(ExpectedConditions.visibilityOfElementLocated(locator));\n } catch (Exception e) {\n error(\"Exception occurred while trying to check visibility of element with definition \" + locator);\n error(Throwables.getStackTraceAsString(e));\n throw new Exception(Throwables.getStackTraceAsString(e));\n }\n }",
"public String waitForElementVisibility(String object, String data) {\n logger.debug(\"Waiting for an element to be visible\");\n int start = 0;\n int time = (int) Double.parseDouble(data);\n try {\n while (true) {\n if(start!=time)\n {\n if (driver.findElements(By.xpath(OR.getProperty(object))).size() == 0) {\n Thread.sleep(1000L);\n start++;\n }\n else {\n break; }\n }else {\n break; } \n }\n } catch (Exception e) {\n return Constants.KEYWORD_FAIL + \"Unable to close browser. Check if its open\" + e.getMessage();\n }\n return Constants.KEYWORD_PASS;\n }",
"public void waitTillObjectAppears(By locator) {\n\t\ttry {\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, TIMEOUT_S);\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(locator));\n\t\t} catch (TimeoutException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void waitForElement(WebDriver driver, WebElement element) throws Exception {\n\t\tWebDriverWait wait = new WebDriverWait(driver, 80);\n\t\twait.until(ExpectedConditions.visibilityOf(element));\n\t\tThread.sleep(1000);\n\t}",
"public void waitForElementToBeClickable(WebElement element) {\n wait.until(ExpectedConditions.visibilityOf(element));\n wait.until(ExpectedConditions.elementToBeClickable(element));\n }",
"protected WebElement waitForExpectedElement(final By by) {\n return wait.until(visibilityOfElementLocated(by));\n }",
"public void waitForVisibilityOfAllWebElements(List<WebElement> webElement){\r\n\t\twait.until(ExpectedConditions.visibilityOfAllElements(webElement));\r\n\t}",
"private void waitForElement(WebDriver driver, int timeToWaitInSeconds, By ElementLocater) {\n\t\tWebDriverWait wait = new WebDriverWait(driver, timeToWaitInSeconds);\n\t\twait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(ElementLocater));\n\n\t}",
"public static void waitForElement(WebElement element, AndroidDriver driver, String elementName, int seconds)\n\t\t\tthrows IOException {\n\t\ttry {\n\t\t\tlogger.info(\"---------Waiting for visibility of element---------\" + element);\n\n\t\t\tWait<AndroidDriver> wait = new FluentWait<AndroidDriver>(driver).withTimeout(seconds, TimeUnit.SECONDS)\n\t\t\t\t\t.pollingEvery(250, TimeUnit.MICROSECONDS).ignoring(NoSuchElementException.class);\n\t\t\t// Assert.assertTrue(wait.until(ExpectedConditions.visibilityOf(element))\n\t\t\t// !=\n\t\t\t// null);\n\t\t\tlogger.info(\"---------Element is visible---------\" + element);\n\t\t} catch (Exception e) {\n\t\t\tMyExtentListners.test.fail(MarkupHelper.createLabel(\"Verify \" + \"\\'\" + elementName + \"\\'\"\n\t\t\t\t\t+ \" is displayed || \" + \"\\'\" + elementName + \"\\'\" + \" is not displayed \", ExtentColor.RED));\n\t\t\tMyExtentListners.test.addScreenCaptureFromPath(capture(driver, elementName));\n\t\t\tlogger.info(\"---------Element is not visible---------\" + element);\n\t\t\tthrow e;\n\t\t} catch (AssertionError e) {\n\t\t\tMyExtentListners.test.fail(MarkupHelper.createLabel(\"Verify \" + \"\\'\" + elementName + \"\\'\"\n\t\t\t\t\t+ \" is displayed || \" + \"\\'\" + elementName + \"\\'\" + \" is not displayed \", ExtentColor.RED));\n\t\t\tMyExtentListners.test.addScreenCaptureFromPath(capture(driver, elementName));\n\t\t\tlogger.info(\"---------Element is not visible---------\" + element);\n\t\t\tthrow e;\n\t\t}\n\t}",
"public boolean isElementPresent(WebElement element) {\n wait.until(ExpectedConditions.elementToBeClickable(element));\n// wait.until(ExpectedConditions.visibilityOf(element));\n return element.isDisplayed();\n }",
"public WebElement waitForDisplay(final By by, int timeoutInSeconds)\n {\n System.out.println(\"Wait for display of \" + by);\n return new WebDriverWait(driver, timeoutInSeconds, DEFAULT_SLEEP_IN_MILLIS)\n .ignoring(StaleElementReferenceException.class).\n until(ExpectedConditions.visibilityOfElementLocated(by));\n }",
"void waitUntilDaysDropdownElementIsVisible() {\n\t\tSeleniumUtility.waitElementToBeVisible(driver, homepageVehiclePlanning.divTagSelectDaysHomepageVehiclePlanning(\"7\"));\n\t}",
"public void waitForAlertDisplay()\n {\n new WebDriverWait(driver,\n DEFAULT_TIMEOUT, 5000).ignoring(StaleElementReferenceException.class).ignoring(\n WebDriverException.class).\n until(ExpectedConditions.alertIsPresent());\n }",
"public void waitUntilElementVisibility(WebDriver driver, int seconds, final String xpath, String elementName, StackTraceElement t) throws IOException {\n\t\t\t\t\tlong start = System.currentTimeMillis();\n\t\t\t\t\tWebDriverWait wait = new WebDriverWait(driver, seconds);\n\t\t\t\t\ttry { wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(xpath))); }\n\t\t\t\t\tcatch(Exception e) {\n\t\t\t\t\t\tif (driver.findElements(By.xpath(xpath)).size() == 0) { \n\t\t\t\t\t\t\tfileWriterPrinter(\"\\n\" + elementName + \" is still not visible!\\nXPATH: \" + xpath);\n\t\t\t\t\t\t\tgetScreenShot(t, elementName.replace(\"\\\"\", \"''\") + \" visibility Time-Out\", driver);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t fileWriterPrinter(\"Waiting time for \" + padRight(elementName, 28 - elementName.length()) + \" visibility: \" + waitTimeConroller(start, seconds, elementName) + \" sec\");\n\t\t\t\t\t}",
"public boolean isVisible() {\n\t\treturn element.isDisplayed();\n\t}",
"public static void waitForVisibility (AndroidDriver<AndroidElement> driver,String id) {\n\n WebDriverWait wait = new WebDriverWait(driver, 15);\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(id)));\n }",
"@Test\n public void explicitWait() {\n WebDriverWait wait = new WebDriverWait(driver, 10);\n driver.get(\"https://the-internet.herokuapp.com/dynamic_controls\");\n WebElement removeButton = driver.findElement(By.xpath(\"//button[@type='button']\"));\n removeButton.click();\n //WebElement goneMessage=driver.findElement(By.id(\"message\"));\n WebElement goneMessage = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"message\")));\n String expectedMessage = \"It's gone!\";\n Assert.assertEquals(goneMessage.getText(), expectedMessage);\n\n }",
"public static void wait_for_element(By locator) throws CheetahException {\n\t\ttry {\n\t\t\tCheetahEngine.logger.logMessage(null, \"SeleniumActions\", \"Locator: \" + locator, Constants.LOG_INFO, false);\n\t\t\tWebDriverWait wait = new WebDriverWait(CheetahEngine.getDriverInstance(), Constants.GLOBAL_TIMEOUT);\n\t\t\tfluent_wait(locator);\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(locator));\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\t\t}\n\t}",
"@Override\n protected void waitThePageToLoad() {\n WaitUtils.waitUntil(driver, ExpectedConditions.visibilityOf(driver\n .findElement(By.xpath(SEARCH_XPATH))));\n }",
"public static boolean waitForElement(WebDriver driver, WebElement element) {\r\n boolean statusOfElementToBeReturned = false;\r\n WebDriverWait wait = new WebDriverWait(driver, flipKartMaxElementWait);\r\n try {\r\n WebElement waitElement = wait.until(ExpectedConditions.visibilityOf(element));\r\n if (waitElement.isDisplayed() && waitElement.isEnabled()) {\r\n statusOfElementToBeReturned = true;\r\n }\r\n } catch (Exception ex) {\r\n \tSystem.out.println(\"Unable to find a element\" + ex.getMessage());\r\n }\r\n\t\treturn statusOfElementToBeReturned;\r\n }",
"default void waitUntilVisible(double timeoutInSeconds)\n {\n SeleniumAsserts\n .assertThatSoon(timeoutInSeconds, \"Component becomes visible: \" + describe(), () -> this,\n SeleniumMatchers.isVisible());\n }",
"public static boolean isDisplayed(final WebElement element) {\n try {\n defaultWait.until(ExpectedConditions.visibilityOf(element));\n return true;\n } catch (Exception exception) {\n Log.info(\"Element not displayed on UI :\" + element.toString() + \" \" + exception.getMessage());\n return false;\n }\n }",
"public void verifyElementIsVisible(String elementName) {\n wait.forElementToBeDisplayed(5, returnElement(elementName), elementName);\n Assert.assertTrue(\"FAIL: Yellow Triangle not present\", returnElement(elementName).isDisplayed());\n }",
"public static boolean displayed(WebElement element){\n waitForVisibility(element);\n return element.isDisplayed();\n }",
"public static void verify_element_is_displayed(By locator) throws CheetahException {\n\t\ttry {\n\t\t\twait_for_element(locator);\n\t\t\tWebElement element = CheetahEngine.getDriverInstance().findElement(locator);\n\t\t\tdriverUtils.highlightElement(element);\n\t\t\tdriverUtils.unHighlightElement(element);\n\t\t\tassertEquals(true, element.isDisplayed());\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\n\t\t}\n\n\t}",
"public void waitForPresenceOfElementToBeLocated(By locator){\r\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(locator));\r\n\t}",
"public boolean waitForInvisibility(By targetElement) {\n try {\n WebDriverWait wait = new WebDriverWait(getDriver(), timeOut);\n wait.until(ExpectedConditions.invisibilityOfElementLocated(targetElement));\n return true;\n } catch (TimeoutException e) {\n error(\"Exception Occurred in while waiting for invisibility of element with definition :: \" +\n targetElement);\n error(Throwables.getStackTraceAsString(e));\n throw new TimeoutException(Throwables.getStackTraceAsString(e));\n }\n }",
"public void waitForElementClickable(String locator) {\n waitForElementVisibility(locator);\n wait.until(ExpectedConditions.elementToBeClickable(By.xpath(locator)));\n }",
"public static boolean verifyVisibilityOfElement(WebElement element) {\n\t\ttry {\n\n\t\t\tif (element.isDisplayed())\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Some exception occured.\" + e.getMessage());\n\t\t\treturn false;\n\t\t}\n\t}",
"public void waitUntilElementInvisibility(WebDriver driver, int seconds, final String xpath, String elementName, StackTraceElement t) throws IOException {\n\t\t\t\t\tlong start = System.currentTimeMillis();\n\t\t\t\t\tWebDriverWait wait = new WebDriverWait(driver, seconds);\n\t\t\t\t\ttry { wait.until(ExpectedConditions.invisibilityOfElementLocated(By.xpath(xpath))); }\n\t\t\t\t\tcatch(Exception e) {\n\t\t\t\t\t\tif (driver.findElements(By.xpath(xpath)).size() > 0) { \n\t\t\t\t\t\t\tfileWriterPrinter(\"\\n\" + elementName + \" is still visible!\\nXPATH: \" + xpath);\n\t\t\t\t\t\t\tgetScreenShot(t, elementName.replace(\"\\\"\", \"''\") + \" invisibility Time-Out\", driver);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t fileWriterPrinter(\"Waiting time for \" + padRight(elementName, 26 - elementName.length()) + \" invisibility: \" + waitTimeConroller(start, seconds, elementName) + \" sec\");\n\t\t\t\t\t}",
"public boolean isElementPresent(WebElement elementName, int timeout){\n //https://github.com/appium/java-client/issues/617\n\t/*try{\n\t WebDriverWait wait = new WebDriverWait(getDriver(), timeout);\n\t wait.until(ExpectedConditions.visibilityOf(elementName));\n\t return true;\n\t}catch(Exception e){\n\t return false;\n\t}*/\n try{\n int counter = 0;\n while(counter < timeout){\n Thread.sleep(1000);\n counter++;\n try{\n if(elementName.isDisplayed()){\n //if(ExpectedConditions.visibilityOf(elementName) !=null ){\n return true;\n }else{\n continue;\n }\n }catch(Exception e){\n continue;\n }\n }\n System.out.println(\"ELEMENT NOT FOUND - \" + elementName + \" AFTER \" + timeout );\n return false;\n }catch(Exception e){\n return false;\n }\n }",
"protected boolean isElementDisplayed(By locator){\n \tboolean displayed;\n \ttry {\n \t\tdisplayed = new WebDriverWait(DRIVER, 10)\n \t\t.until(ExpectedConditions.presenceOfElementLocated(locator)).isDisplayed();\n \t}catch (TimeoutException e){\n \t displayed = false;\t\n \t}\n\n \treturn displayed; \n }",
"public void waitForElement(WebElement element) {\r\n\t\ttry {\r\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, timeout);\r\n\t\t\twait.until(ExpectedConditions.elementToBeClickable(element));\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.info(element.toString() + \" is not present on page or not clickable\");\r\n\t\t}\r\n\r\n\t}",
"public boolean isDisplayed(WebElement ElementToCheck){\n\t\tWebDriverWait wait = new WebDriverWait(driverInstance, Constants.DRIVER_WAIT);\n\t\ttry{\n\t\t\twait.until(ExpectedConditions.visibilityOf(ElementToCheck));\n\t\t\treturn ElementToCheck.isDisplayed();\n\t\t}\n\t\tcatch(Exception E){\n\t\t\tLog.error(\"Element is not getting displayed\");\n\t\t\treturn false;\n\t\t}\n\t}",
"public static void waitForElementPresence(AndroidDriver<AndroidElement> androidDriver, By element){\r\n\t\tWebDriverWait wait= new WebDriverWait(androidDriver, 30);\r\n\t\twait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(element));\r\n\t}",
"public boolean elementIsDisplayed(By locator){\n \twaitForElementPresent(locator);\n \treturn getElement(locator).isDisplayed();\n }",
"public static void waitForClickability(WebElement element){\n getWait().until(ExpectedConditions.elementToBeClickable(element));\n }",
"public void handlingWaitToElement(By locator){\n WebDriverWait wait = new WebDriverWait(appiumDriver, 60);\n wait.until(ExpectedConditions.presenceOfElementLocated(locator));\n }",
"public void waitForElementToAppear(By locator,int timeToOut) {\n\t\tWebDriverWait wait = new WebDriverWait(_eventFiringDriver, timeToOut);\n\t\twait.until(ExpectedConditions.visibilityOfElementLocated(locator));\n\t}",
"public boolean elementIsVisible(WebElement element) {\n\t\ttry {\n\t\t\tif (element.isDisplayed())\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t} catch (NoSuchElementException e) {\n\t\t\treturn false;\n\t\t}\n\n\t}",
"public void waitForContentLoad(String element) {\n // TODO implement generic method to wait until page content is loaded\n\n wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.xpath(\".//td[contains(., \" + element + \")]\"))));\n }",
"public Boolean isElementPresent(WebElement element) {\r\n\t\ttry {\r\n\t\t\twaitForElementVisible(element);\r\n\t\t\telement.isDisplayed();\r\n\t\t\treturn true;\r\n\t\t} catch (Exception ex) {\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public void waitForElementToReattachToDOM(final By bySelector)\n {\n // waits for the save to be registered before performing next action.\n System.out.println(\"Wait for element to not be stale \" + bySelector);\n new WebDriverWait(driver, DEFAULT_TIMEOUT, DEFAULT_SLEEP_IN_MILLIS).\n until(ExpectedConditions.not(ExpectedConditions.stalenessOf(waitForDisplay(bySelector))));\n }",
"public void ensureIsDisplayedEmail() {\n (new WebDriverWait(driver, 30)).until(ExpectedConditions.elementToBeClickable(By.id(\"emailField\")));\n }",
"public void waitForElementsPresent(By by,int time){\n WebDriverWait wait = new WebDriverWait(driver,time);\n wait.until(ExpectedConditions.presenceOfElementLocated(by));\n }",
"public WebElement waitForDisplay(final WebElement webElement, int timeoutInSeconds)\n {\n WebDriverWait myWait = new WebDriverWait(driver, timeoutInSeconds, DEFAULT_SLEEP_IN_MILLIS);\n return myWait.ignoring(StaleElementReferenceException.class)\n .until(ExpectedConditions.visibilityOf(webElement));\n }",
"public void waitForElementToBeClickable(WebElement webElement){\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(webElement));\r\n\t}",
"public static void waitUntilElementIsClickable(WebElement element) {\n WebDriverWait webDriverWait = getWebDriverWait();\n webDriverWait.until(ExpectedConditions.elementToBeClickable(element));\n }",
"public void assertVisible(final String elementLocator);",
"public static void waitFor(WebElement element, int timer, WebDriver driver) {\n\n\t\t// Wait for the static element to appear\n\n\t\tWait<WebDriver> exists = new WebDriverWait(driver, timer).withMessage(\"element not visible\");\n\t\texists.until(ExpectedConditions.refreshed(ExpectedConditions.visibilityOf(element)));\n\t\n\n\t}",
"public void waitLoadPage() {\n WebDriverHelper.waitUntil(inputTeamName);\n }",
"public void waitForPageToLoad() {\n Wait<WebDriver> wait = new WebDriverWait(WebDriverManager.getDriver(), 90);\n wait.until(new Function<WebDriver, Boolean>() {\n public Boolean apply(WebDriver driver) {\n return String\n .valueOf(((JavascriptExecutor) driver).executeScript(\"return document.readyState\"))\n .equals(\"complete\");\n }\n });\n try {\n wait.until(ExpectedConditions.invisibilityOfElementLocated(By.id(\"waitMessage_div\")));\n wait.until(ExpectedConditions.invisibilityOfElementLocated(By.xpath(\"//div[contains(text(),'Loading')]\")));\n // waitForPageToLoad();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public static boolean waitForElementToAppear(WebDriver driver,\n\t\t\tfinal WebElement element, int timeOutInSeconds,\n\t\t\tint pollingInMilliSeconds) throws Exception {\n\t\ttry {\n\t\t\tlogger.info(\"Wait for Element to Appear using Wait until element is Displayed\");\n\t\t\treturn (new WebDriverWait(driver, timeOutInSeconds,\n\t\t\t\t\tpollingInMilliSeconds))\n\t\t\t\t\t.until(new ExpectedCondition<Boolean>() {\n\n\t\t\t\t\t\tpublic Boolean apply(WebDriver driver) {\n\t\t\t\t\t\t\tlogger.info(\"Waiting for element to be displayed \");\n\t\t\t\t\t\t\treturn element.isDisplayed();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t} catch (NoSuchElementException e) {\n\t\t\tlogger.error(\"The element to be serach is not present in the page->waitForElementToBeHidden->\"\n\t\t\t\t\t+ e.getMessage());\n\t\t\tthrow new Exception(\n\t\t\t\t\t\"The element to be serach is not present in the page->waitForElementToBeHidden->\"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Some exception in waitForElementToBeHidden\"\n\t\t\t\t\t+ e.getMessage());\n\t\t\tthrow new Exception(\"Some exception in waitForElementToBeHidden\"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\n\t}",
"public static void isEleDisplayed(WebElement element, AndroidDriver driver, String elementName) throws IOException {\n\t\ttry {\n\t\t\tlogger.info(\"---------Verifying element is displayed or not ---------\");\n\n\t\t\tWait<AndroidDriver> wait = new FluentWait<AndroidDriver>(driver).withTimeout(1, TimeUnit.MINUTES)\n\t\t\t\t\t.pollingEvery(250, TimeUnit.MICROSECONDS).ignoring(NoSuchElementException.class);\n\t\t\tif (element.isDisplayed()) {\n\t\t\t\tSystem.out.println(elementName + \"------ is displayed\");\n\t\t\t\tMyExtentListners.test.pass(\"Verify \" + \"\\'\" + elementName + \"\\'\" + \" is displayed || \" + \"\\'\"\n\t\t\t\t\t\t+ elementName + \"\\'\" + \" is displayed \");\n\t\t\t}\n\t\t} catch (RuntimeException e) {\n\n\t\t\tMyExtentListners.test.fail(MarkupHelper.createLabel(\"Verify \" + \"\\'\" + elementName + \"\\'\"\n\t\t\t\t\t+ \" is displayed || \" + \"\\'\" + elementName + \"\\'\" + \" is not displayed \", ExtentColor.RED));\n\n\t\t\tMyExtentListners.test.addScreenCaptureFromPath(capture(driver, elementName));\n\t\t\tSystem.out.println(elementName + \"------ is not displayed\");\n\t\t\tthrow e;\n\t\t}\n\t}",
"private static ExpectedCondition<WebElement> waitForElementToBeDisplayed(final WebElement we) \n\t{\n\t\treturn new ExpectedCondition<WebElement>() \n\t\t\t\t{\n\t\t\t\t\t/**\n\t\t\t\t\t * This method will retrieve the element.\n\t\t\t\t\t * \n\t\t\t\t\t * @param driver The driver to set.\n\t\t\t\t\t * @return Returns the webelement.\n\t\t\t\t\t */\n\t\t\t\t\tpublic WebElement apply(WebDriver driver) \n\t\t\t\t\t{\n\t\t\t\t\t\tif(we.isDisplayed()){\n\n\t\t\t\t\t\t\treturn we;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn null;\n\n\t\t\t\t\t}\n\t\t\t\t};\n\t}",
"public static void waitForElementToDisplay(WebDriver driver, By by, long timeOut, long pollingTime) {\n\n\t\tFluentWait<WebDriver> wait = new FluentWait<WebDriver>(driver).withTimeout(Duration.ofSeconds(timeOut))\n\t\t\t\t.pollingEvery(Duration.ofSeconds(pollingTime)).ignoring(NoSuchElementException.class);\n\t\tFunction<WebDriver, Boolean> function = new Function<WebDriver, Boolean>() {\n\t\t\tpublic Boolean apply(WebDriver driver) {\n\t\t\t\tWebElement searchElement = driver.findElement(by);\n\t\t\t\tif (searchElement.isDisplayed()) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\t\twait.until(function);\n\t}",
"public static void waitForVisibilityChange(WebElement element, boolean desiredVisibility, Duration maxWait)\n throws SeleniumIdentificationException {\n long startTime = System.currentTimeMillis();\n try {\n // Loop while element doesn't match desired visibility until max time elapsed\n while (desiredVisibility != element.isDisplayed()) {\n // Fail if we've exceeded our wait period\n if (System.currentTimeMillis() - startTime >= maxWait.toMillis()) {\n throw new SeleniumIdentificationException(\"Failed to detect a visibility change.\");\n }\n\n // Reduce spinning with polling delay\n Thread.sleep(POLLING_DELAY_MILLIS);\n }\n } catch (StaleElementReferenceException | InterruptedException e) {\n // In cases where desiredVisibility is false, a StaleElementReferenceException may be thrown\n }\n }",
"public void waitElementToBeClickable(WebElement webElement) {\n wait.until(ExpectedConditions.elementToBeClickable(webElement));\n }",
"protected WebElement waitForElementToBeClickable(WebElement element) {\n actionDriver.moveToElement(element);\n WebDriverWait wait = new WebDriverWait(driver, 5);\n wait.until(ExpectedConditions.elementToBeClickable(element));\n return element;\n }",
"public void waitForElemnetXpathPresent(String xpath){\r\n\t\t\t\tWebDriverWait wait = new WebDriverWait(Driver.driver,20);\r\n\t\t\t\twait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(By.xpath(xpath)));\r\n\t\t\t}",
"public static void waitForElementToBeInvisible(By by, long time) {\n WebDriverWait wait = new WebDriverWait(driver, time);\n wait.until(ExpectedConditions.invisibilityOfAllElements());\n }",
"public boolean waitForInvisibility(By targetElement, int timeOut) {\n try {\n WebDriverWait wait = new WebDriverWait(getDriver(), timeOut);\n wait.until(ExpectedConditions.invisibilityOfElementLocated(targetElement));\n return true;\n } catch (TimeoutException e) {\n error(\"Exception Occurred in while waiting for invisibility of element with definition :: \" +\n targetElement);\n error(Throwables.getStackTraceAsString(e));\n throw new TimeoutException(Throwables.getStackTraceAsString(e));\n }\n }"
] | [
"0.8216739",
"0.81576586",
"0.8128459",
"0.803296",
"0.7982848",
"0.79602015",
"0.78887534",
"0.7879912",
"0.78492004",
"0.7805244",
"0.77948374",
"0.77499557",
"0.7500237",
"0.74591553",
"0.7390666",
"0.7317219",
"0.7281087",
"0.7260699",
"0.7253826",
"0.719079",
"0.7189217",
"0.7177257",
"0.7171586",
"0.71618074",
"0.7150559",
"0.7150361",
"0.7110867",
"0.70349544",
"0.7029714",
"0.69778997",
"0.69745004",
"0.69414866",
"0.6941287",
"0.6937755",
"0.6849112",
"0.6819102",
"0.68075776",
"0.6771821",
"0.6762331",
"0.6738307",
"0.6715693",
"0.6715632",
"0.670605",
"0.67022413",
"0.6698838",
"0.6683648",
"0.66691333",
"0.66135365",
"0.6601125",
"0.659015",
"0.65884316",
"0.65765214",
"0.65683347",
"0.65540737",
"0.6547112",
"0.65451545",
"0.6543354",
"0.654165",
"0.6511623",
"0.64962655",
"0.6490368",
"0.6472987",
"0.64656574",
"0.6462556",
"0.6447607",
"0.64267415",
"0.638166",
"0.6372467",
"0.63532937",
"0.6323848",
"0.6322727",
"0.629826",
"0.62886065",
"0.62878644",
"0.6253841",
"0.62480587",
"0.6247777",
"0.62141514",
"0.6207343",
"0.619194",
"0.61797553",
"0.6166342",
"0.6137035",
"0.6128071",
"0.61271507",
"0.61250424",
"0.61249965",
"0.6123714",
"0.6119957",
"0.6118641",
"0.61156577",
"0.6113575",
"0.6108181",
"0.60974765",
"0.6095799",
"0.60945565",
"0.60589635",
"0.6056195",
"0.6055445",
"0.60408705"
] | 0.77415913 | 12 |
This method waits for the element to be clicked | public void waitAndClick(WebElement element) throws InterruptedException
{
int count=0;
while(count<20)
{
try
{
element.click();
break;
}
catch(Throwable e)
{
Thread.sleep(1000);
count++;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void waitForClickability(WebElement element){\n getWait().until(ExpectedConditions.elementToBeClickable(element));\n }",
"public void waitAndClick(WebElement element) {\r\n\t\twaitForElement(element);\r\n\t\telement.click();\r\n\t}",
"protected WebElement waitForElementToBeClickable(WebElement element) {\n actionDriver.moveToElement(element);\n WebDriverWait wait = new WebDriverWait(driver, 5);\n wait.until(ExpectedConditions.elementToBeClickable(element));\n return element;\n }",
"public void waitForElementToBeClickable(WebElement element) {\n wait.until(ExpectedConditions.visibilityOf(element));\n wait.until(ExpectedConditions.elementToBeClickable(element));\n }",
"public void waitForElementToBeClickable(WebElement webElement){\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(webElement));\r\n\t}",
"public void waitElementToBeClickable(WebElement webElement) {\n wait.until(ExpectedConditions.elementToBeClickable(webElement));\n }",
"public void performClick() {\n\t\tgetWrappedElement().click();\n\t}",
"public void clickElement(WebElement element) {\n wait = new WebDriverWait(eventDriver, 20);\n wait.until(ExpectedConditions.elementToBeClickable(element));\n element.click();\n }",
"public static void waitUntilElementIsClickable(WebElement element) {\n WebDriverWait webDriverWait = getWebDriverWait();\n webDriverWait.until(ExpectedConditions.elementToBeClickable(element));\n }",
"public final void click() {\n getUnderlyingElement().click();\n }",
"public void myClick(WebElement element) \n\t{\n\t\twaitHelper.waitForElement(element, ObjectReader.reader.getExplicitWait());\n\t\telement.click();\t\n\t}",
"public WebElement waitForElementToBeClickable(final WebElement webElement)\n {\n // waits for the save to be registered before performing next action.\n System.out.println(\"Wait for clickable \" + webElement);\n return new WebDriverWait(driver,\n DEFAULT_TIMEOUT, DEFAULT_SLEEP_IN_MILLIS).ignoring(\n WebDriverException.class).ignoring(StaleElementReferenceException.class).\n until(ExpectedConditions.elementToBeClickable(webElement));\n }",
"public void waitForElement(WebElement element) {\r\n\t\ttry {\r\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, timeout);\r\n\t\t\twait.until(ExpectedConditions.elementToBeClickable(element));\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.info(element.toString() + \" is not present on page or not clickable\");\r\n\t\t}\r\n\r\n\t}",
"public void elementToBeSelected(WebElement webElement){\r\n\t\twait.until(ExpectedConditions.elementToBeSelected(webElement));\r\n\t}",
"public static void waitForElementVisiblity(WebElement element) {\n\t\t\t\n\t\t}",
"public void clickIfExists() {\n try {\n\n waitTillElementVisible(5000);\n mouse.click(driver, locator);\n\n } catch (Exception e) {\n log.error(\"exception :\", e);\n }\n }",
"public void clickOnWebElement(WebElement element) {\r\n try {\r\n Thread.sleep(2000);\r\n element.click();\r\n logger.info(\"Element was clicked\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n logger.error(\"Cannot work with element\");\r\n Assert.fail(\"Cannot work with element\");\r\n }\r\n }",
"public void waitForElementClickable(String locator) {\n waitForElementVisibility(locator);\n wait.until(ExpectedConditions.elementToBeClickable(By.xpath(locator)));\n }",
"public static void waitForClick(AndroidDriver<AndroidElement> androidDriver, By element){\r\n\t\tWebDriverWait wait= new WebDriverWait(androidDriver, 30);\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(element));\r\n\t}",
"protected WebElement waitForElementToBeVisible(WebElement element) {\n actionDriver.moveToElement(element);\n WebDriverWait wait = new WebDriverWait(driver, 5);\n wait.until(ExpectedConditions.visibilityOf(element));\n return element;\n }",
"public void click(WebElement element) {\nelement.click();\n\t}",
"protected void click(By locator) {\n \tint waitTime = 10;\n \tWebElement element = new WebDriverWait(DRIVER, waitTime)\n \t.until(ExpectedConditions.visibilityOfElementLocated(locator));\n\n \t element.click();\n }",
"public static void click(WebElement element) {\r\n\t\ttry{\r\n\t\t(element).click();\r\n\t\tlog(element+\" is clicked successfully=PASS\");\r\n\t }\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tlog(\"Failed to click\"+element+\"=FAIL\");\r\n\t\t}\r\n\t}",
"@Test\n\t@TestProperties(name = \"Click element ${by}:${locator}\", paramsInclude = { \"by\", \"locator\" })\n\tpublic void clickElement() {\n\t\tfindElement(by, locator).click();\n\t}",
"protected void click(By locator) {\n waitForVisibilityOf(locator, 5);\n waitForElementToBeClickable(locator);\n find(locator).click();\n }",
"public void isElementClickable(WebElement elem) {\n try {\n driverWait.until(ExpectedConditions.elementToBeClickable(elem));\n System.out.println(\"Element is clickable\");\n } catch (Exception e) {\n Assert.fail(\"The element isn't clickable\");\n }\n }",
"public void clickOn(WebElement element) {\r\n\t\telement.click();\r\n\t}",
"public void waitForElement(WebElement element) {\n WebDriverWait wait = new WebDriverWait(driver, 30);\n wait.until(ExpectedConditions.visibilityOf(element));\n }",
"public static void click(final WebElement element) {\n try {\n defaultWait.until(ExpectedConditions.visibilityOf(element));\n element.click();\n } catch (Exception exception) {\n Log.logError(\"Element not displayed on UI :\" + element + \" \" + exception.getMessage());\n throw new ElementNotVisibleException(\"Cant Find Element\" + element.toString());\n }\n }",
"public boolean waitForElementClickable(By targetElement) {\n try {\n info(\"Verifying readiness of the element :: \" + targetElement + \" to accept click operation\");\n WebDriverWait wait = new WebDriverWait(getDriver(), timeOut);\n wait.until(ExpectedConditions.elementToBeClickable(targetElement));\n return true;\n } catch (TimeoutException e) {\n error(\"Exception occurred while verifying readiness of the element :: \" + targetElement);\n error(Throwables.getStackTraceAsString(e));\n throw new TimeoutException(Throwables.getStackTraceAsString(e));\n }\n }",
"public static void goTo() {\n\tBrowser.instance.findElement(maintenanceMenu).click();\r\n\tWebElement element = Browser.instance.findElement(By.linkText(\"Tender and Bag Maintenance\"));\r\n Actions action = new Actions(Browser.instance);\r\n action.moveToElement(element).build().perform(); \r\n Browser.instance.findElement(By.linkText(\"Bag Types\")).click();\r\n // WebDriverWait wait = new WebDriverWait(Browser.instance,10);\r\n WebDriverWait wait = new WebDriverWait(Browser.instance,10);\r\n\twait.until(ExpectedConditions.elementToBeClickable(editButton));\r\n//\tBrowser.instance.manage().timeouts().implicitlyWait(5,TimeUnit.SECONDS);\r\n}",
"public void clickSearchButton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- SearchButton should be clicked\");\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\twaitforElementVisible(locator_split(\"BybtnSearch\"));\r\n\t\t\tclick(locator_split(\"BybtnSearch\"));\r\n\t\t\twaitForPageToLoad(100);\r\n\t\t\tSystem.out.println(\"SearchButton is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- SearchButton is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- SearchButton is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"BybtnSearch\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"public void clickItem(WebElement element) throws Exception {\n try {\n element.click();\n } catch (StaleElementReferenceException e){\n By by = By.id(element.getAttribute(\"id\"));\n element = findElementWithRetry(by, 10);\n JavascriptExecutor js = (JavascriptExecutor)driver;\n js.executeScript(\"arguments[0].click();\", element);\n } catch (Exception e){\n JavascriptExecutor js = (JavascriptExecutor)driver;\n js.executeScript(\"arguments[0].click();\", element);\n }\n }",
"protected void findWebElementAndClick (By webElementSelector){\n\t\tWebElement button = findWebElement(webElementSelector);\n\t\ttry {\t\t\n\t\t\tbutton.click();\n\t\t} catch (StaleElementReferenceException e) {\n\t\t\tthrow new AssertionError(\"Found the web element, but cannot perform click action. \" + webElementSelector.toString());\n\t\t}\t\t\n\t}",
"public void clickSubmitSearchButton(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Search Button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"btnSearchSubmit\"));\r\n\t\t\tclick(locator_split(\"btnSearchSubmit\"));\r\n\t\t\twaitForPageToLoad(10);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Search Button is clicked\");\r\n\t\t\tSystem.out.println(\"Sarch icon is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Search Button is not clicked \"+elementProperties.getProperty(\"btnSearchSubmit\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnSearchSubmit\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"public static void waitForelementClickable(By by, long time) {\n WebDriverWait wait = new WebDriverWait(driver, time);\n wait.until(ExpectedConditions.elementToBeClickable(by));\n }",
"public void click(WebElement element) {\n\t\telement.click();\n\t}",
"private void clickInvite(){\n WebDriverHelper.clickElement(inviteButton);\n }",
"public static void setWaitSelenium() throws InterruptedException {\n WebDriverManager.chromedriver().setup();\n WebDriver driver = new ChromeDriver();\n driver.get(\"https://google.com\");\n\n WebElement input = driver.findElement(By.xpath(\"//input[@name=\\\"q\\\"]\"));\n input.sendKeys(\"Abcd\");\n Thread.sleep(10000);\n driver.findElement(By.name(\"btnK\")).click();\n //driver.findElement(By.name(\"btnK\")).sendKeys(Keys.RETURN);\n\n // Fluent wait\n // Waiting 30s for an element to be present on the page,\n // for its presence once every 2s\n Wait<WebDriver> wait = new FluentWait<WebDriver>(driver)\n .withTimeout(60, TimeUnit.SECONDS)\n .pollingEvery(2, TimeUnit.SECONDS)\n .ignoring(NoSuchElementException.class);\n\n WebElement clickseleniumlink = wait.until(new Function<WebDriver, WebElement>(){\n\n public WebElement apply(WebDriver driver ) {\n WebElement link = driver.findElement(By.xpath(\"/html[1]/body[1]/div[7]/div[3]/div[10]/div[1]/div[2]/div[1]/div[2]/div[2]/div[1]/div[1]/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/a[1]\"));\n if(link.isEnabled()){\n System.out.println(\"Element found\");\n }\n return link;\n }\n });\n //click on the selenium link\n clickseleniumlink.click();\n\n driver.close();\n driver.quit();\n }",
"public void clickOnElement(String elementName) {\n wait.forElementToBeDisplayed(15, returnElement(elementName), elementName);\n returnElement(elementName).click();\n }",
"@Test\n\t@TestProperties(name = \"Click and hold element ${by}:${locator}\", paramsInclude = { \"by\", \"locator\" })\n\tpublic void clickAndHoldElement() {\n\t\tnew Actions(driver).clickAndHold(findElement(by, locator));\n\t}",
"@Then(\"^click on \\\"([^\\\"]*)\\\" icon$\")\npublic void click_on_icon(String arg1) throws Throwable \n{\n\tThread.sleep(3000);\n\tdriver.findElement(By.xpath(\"//button[@class=' btn btn-primary ']\")).click();\n\tdriver.findElement(By.xpath(\"//div[@class='alert alert-success']\")).isDisplayed();\n\t \n\n}",
"public void clickOnSubmit() {\r\n\r\n\t\treportStep(\"About to click on Submit button \", \"INFO\");\r\n\r\n\t\tif(clickAfterWait(submitButton)) {\r\n\r\n\t\t\treportStep(\"Successfully clicked on the Submit button \", \"PASS\");\r\n\r\n\t\t}else {\r\n\t\t\tclickAfterWait(submitButton);\r\n\t\t\treportStep(\"Failed to click on the Submit button \", \"INFO\");\r\n\r\n\t\t}\r\n\t}",
"protected void clickThenWait(By target, By staleElement) {\n \tint waitTime = 10;\n \tWebElement element = new WebDriverWait(DRIVER, waitTime)\n \t.until(ExpectedConditions.elementToBeClickable(target));\n\n \t element.click();\n \t new WebDriverWait(DRIVER, waitTime)\n \t .until(ExpectedConditions.invisibilityOfElementLocated(staleElement));\n }",
"public void elementToBeClickable(WebElement element) {\n\t\ttry {\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, 60);\n\t\t\twait.until(ExpectedConditions.elementToBeClickable(element));\n\t\t} catch (StaleElementReferenceException ex) {\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, 60);\n\t\t\twait.until(ExpectedConditions.elementToBeClickable(element));\n\t\t\t\n\t\t\tAssert.fail(\"Stale Element exception:\" + ex.getMessage());\n\t\t} catch (NoSuchElementException ex) {\n\t\t\tSystem.out.println(\"No such element exception:\" + ex.toString());\n\t\t\tAssert.fail(\"No such element exception:\" + ex.toString());\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"Exception in elementToBeClickable method:\" + ex.toString());\n\t\t\tAssert.fail(\"Exception in elementToBeClickable method:\" + ex.toString());\n\t\t}\n\t}",
"public void clickSubmitInkAndTonnerSearchButton(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Ink and Tonner Search Button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"btnInkSeacrh\"));\r\n\t\t\tclick(locator_split(\"btnInkSeacrh\"));\r\n\t\t\twaitForPageToLoad(10);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Ink and Tonner Search Button is clicked\");\r\n\t\t\tSystem.out.println(\"Ink and Tonner Search icon is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Ink and Tonner Search Button is not clicked \"+elementProperties.getProperty(\"btnSearchSubmit\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnInkSeacrh\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"public void actionClick(WebElement element) {\r\n\t\twaitForElement(element);\r\n\t\tActions action = new Actions(driver);\r\n\t\taction.click(element).build().perform();\r\n\t}",
"public static void waitForClickable(By by, int time)\n {\n WebDriverWait wait = new WebDriverWait(driver,time);\n wait.until(ExpectedConditions.elementToBeClickable(by));\n }",
"public void waitForUserClick(Player player){\n Log.d(getClass().toString(),\"wait for user click???\");\n }",
"public void waitElementToBeVisible(WebElement webElement) {\n wait.until(ExpectedConditions.visibilityOf(webElement));\n }",
"public static void waitForVisibility(WebElement element){\n getWait().until(ExpectedConditions.visibilityOf(element));\n }",
"@Override\n\tpublic void afterClickOn(WebElement element, WebDriver driver) {\n\t\t\n\t}",
"public void clickOnCEDemo() {\n if(CEDEmo.isDisplayed()) {\n\t waitAndClick(CEDEmo);\n }\t\n }",
"public void waitForVisibilityOfElement(WebElement element) {\n\t\twait = new WebDriverWait(driver, 10);\n\t\twait.until(ExpectedConditions.visibilityOf(element));\n\t}",
"@Override\r\n public void afterClickOn(final WebElement arg0, final WebDriver arg1) {\n\r\n }",
"public static void click(WebElement element) {\r\n\t\tif (isDisplayed(element)) {\r\n\t\t\telement.click();\r\n\t\t} else {\r\n\t\t\tAssert.assertTrue(false, \"WebElement not clickable \" + element);\r\n\t\t}\r\n\t}",
"public static boolean clickOnElement(WebElement element) throws InterruptedException {\n\t\tThread.sleep(2000);\n\t\ttry {\n\n\t\t\tif (element.isDisplayed() && element.isEnabled()) {\n\t\t\t\telement.click();\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"element is not clicked.\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Some exception occured. \" + e.getMessage());\n\t\t\treturn false;\n\t\t}\n\t}",
"@Override\r\npublic void afterClickOn(WebElement arg0, WebDriver arg1) {\n\tSystem.out.println(\"as\");\r\n}",
"public WebElement waitTillVisible(final WebElement element) {\n return (new WebDriverWait(webDriver, WAIT_TIME)).until(ExpectedConditions.elementToBeClickable(element));\n }",
"public void clickElement(WebElement element) {\n\t\ttry {\n\t\t\telement.click();\n\n\t\t} catch (NoSuchElementException e) {\n\t\t\te.printStackTrace();\n\n\t\t} catch (NullPointerException e1) {\n\t\t\te1.printStackTrace();\n\n\t\t}\n\t}",
"public void click_CheckavailabitlityButton()\r\n\t{\r\n\t\r\n\r\n\t\tSystem.out.println(\"Inside of the checkavailabitlity\");\r\n\t\t\r\n\t\t/*\r\n\t\tExplicitWait(Checkavailability);\r\n\r\n\r\n\t\tJavascriptexecutor(Checkavailability);\r\n\t\t//System.out.println(\"clicked on Checkavailability\");\r\n\t\tSeleniumRepo.waitForPageLoaded();\r\n\t\tlogger.info(\"clicked on Checkavailability\");\r\n\t\ttest.log(Status.INFO, \"clicked on Checkavailability\");\r\n\t\t\r\n\t\t */\r\n\t\r\n\t\tExplicitWait(Checkavailability);\r\n\r\n\t\tif (Checkavailability.isDisplayed() ) \r\n\t\t{\r\n\t\t\t\r\n\t\t\t//Checkavailability.click();\r\n\t\t\tJavascriptexecutor(Checkavailability);\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"clicked on Checkavailability\");\r\n\t\t\t\r\n\t\t\tSeleniumRepo.waitForPageLoaded();\r\n\t\t\tExplicitWait(Checkavailability);\r\n\r\n\t\t\tlogger.info(\"clicked on Checkavailability\");\r\n\t\t\ttest.log(Status.INFO, \"clicked on Checkavailability\");\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\t//System.out.println(\"BookNow button not found\");\r\n\t\t\tlogger.error(\"Check Availability button not found\");\r\n\t\t\ttest.log(Status.FAIL, \"Check Availability button not found\");\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}",
"public void execute(Element element) {\n if (\"true\".equals(element.getStyle().getProperty(\"visible\"))\n && element.getState().isRelease()) {\n String method = element.getStyle().getProperty(\"onClick\");\n String controller = element.getUI().getController();\n if (method != null && controller != null) {\n UIUtil.invokeClickMethod(controller, method);\n }\n }\n }",
"public WebElement elementToBeClickable(final WebElement element) {\n return (new WebDriverWait(webDriver, DRIVER_WAIT_TIME))\n .until(ExpectedConditions.elementToBeClickable(element));\n }",
"public void afterClickOn(WebElement element, WebDriver driver) {\n\t}",
"public void ClickOrderByItemLink(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- OrderByItem Link should be clicked\");\r\n\t\ttry{\r\n\t\t\tsleep(1000);\r\n\t\t\twaitforElementVisible(returnByValue(getValue(\"OrderbyItemLinkText\")));\r\n\t\t\tclick(returnByValue(getValue(\"OrderbyItemLinkText\")));\r\n\t\t\twaitForPageToLoad(100);\r\n\t\t\tSystem.out.println(\"OrderByItem Link is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- OrderByItem is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- OrderByItem Link is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(getValue(\"OrderbyItemLinkText\")).toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"public void clickElement(String strElement, WebElement element) {\n log.traceEntry();\n try {\n if (webWaitsutil.isElementPresent(element) && element.isEnabled()) {\n log.info(\"Clicking element: [{}]\", strElement);\n scrollIntoView(element);\n highlightElement(element);\n element.click();\n } else {\n driver.manage().timeouts().implicitlyWait(ZERO_TIMEOUT, TimeUnit.SECONDS);\n WebDriverWait driverWait = new WebDriverWait(driver, EXPLICIT_WAIT_TIMEOUT);\n driverWait.until(ExpectedConditions.elementToBeClickable(element));\n log.info(\"Clicking element: [{}]\", strElement);\n scrollIntoView(element);\n highlightElement(element);\n element.click();\n }\n } catch (Exception e) {\n log.error(\"Unable to click element! [{}] -- [{}]\", strElement, e.getMessage());\n } finally {\n driver.manage().timeouts().implicitlyWait(FileMgmtUtility.getNumberValue(CommonConstants.DEFAULT_TIMEOUT), TimeUnit.SECONDS);\n }\n log.traceExit();\n }",
"private void waitForElement(WebDriver driver, int timeToWaitInSeconds, By ElementLocater) {\n\t\tWebDriverWait wait = new WebDriverWait(driver, timeToWaitInSeconds);\n\t\twait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(ElementLocater));\n\n\t}",
"public void waitForVisibilityOf(WebElement element) {\n\t\twait.until(ExpectedConditions.visibilityOf(element));\n\t}",
"public void Click_Done()\r\n\t{\r\n\t\tExplicitWait(Specialdone);\r\n\t\tif (Specialdone.isDisplayed()) \r\n\t\t{\r\n\t\t\tJavascriptexecutor(Specialdone);\r\n\t\t\tExplicitWait(Checkavailability);\r\n\t\t\t//System.out.println(\"Clicked on Special Rate plan done button \");\r\n\t\t\tlogger.info(\"Clicked on Special Rate plan done button\");\r\n\t\t\ttest.log(Status.INFO, \"Clicked on Special Rate plan done button\");\r\n\r\n\t\t} else {\r\n\t\t\t//System.out.println(\"Special Rate plan done button not found\");\r\n\t\t\tlogger.error(\"Special Rate plan done button not found\");\r\n\t\t\ttest.log(Status.FAIL, \"Special Rate plan done button not found\");\r\n\r\n\t\t}\r\n\t}",
"public void waitForVisibilityOfWebElement(WebElement webElement){\r\n\t\twait.until(ExpectedConditions.visibilityOf(webElement));\r\n\t}",
"public static void clickUntilSuccessful(WebElement element) throws InterruptedException,\n SeleniumIdentificationException {\n clickUntilSuccessful(element, Duration.ofSeconds(30));\n }",
"public void ClickMyAccountContinueShopping(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account Registration continue shopping should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"btnMyAccountContinueShopping\"));\r\n\t\t\tThread.sleep(3000);\r\n\t\t\tSystem.out.println(\"My Account Registration continue shopping is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- My Account Registration continue shopping is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- My Account Registration continue shopping is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnMyAccountContinueShopping\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}",
"public void clickloginbutton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Login Button should be clicked\");\r\n\t\ttry{\r\n\t\t\tclick(locator_split(\"btnLogin\"));\r\n\t\t\tsleep(2000);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Login Button is clicked\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Login button is not clicked with WebElement \"+elementProperties.getProperty(\"btnLogin\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnLogin\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"public static void clickElement(WebElement element, AndroidDriver driver, String elementName) throws IOException {\n\n\t\ttry {\n\t\t\tlogger.info(\"---------Verifying element is displayed or not ---------\");\n\t\t\twaitForElement(element, driver, elementName, 30);\n\t\t\telement.click();\n\t\t\tMyExtentListners.test.pass(\"Verify user is able to click on \" + \"\\'\" + elementName + \"\\'\"\n\t\t\t\t\t+ \" || User is able to click on \" + \"\\'\" + elementName + \"\\'\");\n\t\t} catch (AssertionError error) {\n\t\t\tMyExtentListners.test.fail(MarkupHelper.createLabel(\"Verify user is able to click on \" + \"\\'\" + elementName\n\t\t\t\t\t+ \"\\'\" + \" || User is not able to click on \" + \"\\'\" + elementName + \"\\'\", ExtentColor.RED));\n\n\t\t\tMyExtentListners.test.addScreenCaptureFromPath(capture(driver, elementName));\n\t\t\tAssert.fail(\"unable to Click on \" + \"\\'\" + elementName + \"\\'\");\n\n\t\t\tMyExtentListners.test.addScreenCaptureFromPath(capture(driver, elementName));\n\t\t\tthrow error;\n\t\t} catch (Exception error) {\n\t\t\tMyExtentListners.test.fail(MarkupHelper.createLabel(\"Verify user is able to click on \" + \"\\'\" + elementName\n\t\t\t\t\t+ \"\\'\" + \" || User is not able to click on \" + \"\\'\" + elementName + \"\\'\", ExtentColor.RED));\n\n\t\t\tMyExtentListners.test.addScreenCaptureFromPath(capture(driver, elementName));\n\t\t\tAssert.fail(\"unable to Click on \" + \"\\'\" + elementName + \"\\'\");\n\t\t\tthrow error;\n\t\t}\n\n\t}",
"public void clickSalvar (){driver.findElement(botaoSalvar).click();}",
"public void click(WebElement element) {\n\t\ttry {\n\t\t\telement.click();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}",
"public static void clickOnElement(WebElement element) {\n\t\telement.click();\n\t}",
"public boolean elementToBeSelected(final WebElement element) {\n return (new WebDriverWait(webDriver, DRIVER_WAIT_TIME))\n .until(ExpectedConditions.elementToBeSelected(element));\n }",
"public void clickFavoritieslink(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Favorities Link should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitForElement(locator_split(\"lnkFavorities\"));\r\n\t\t\tclick(locator_split(\"lnkFavorities\")); \r\n\t\t\tsleep(1000);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Favorities Link is clicked\");\r\n\t\t\tSystem.out.println(\"Favourites link clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Favorities is not clicked \"+elementProperties.getProperty(\"lnkFavorities\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"lnkFavorities\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t}",
"public void clickNavigatorDropDown() {\r\n\t\ttry {\r\n\t\t\t(new WebDriverWait(driver, 120)).until(ExpectedConditions\r\n\t\t\t\t\t.elementToBeClickable(By\r\n\t\t\t\t\t\t\t.xpath(\"(//input[@name='Bala_Test']\")));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// Do nothing\r\n\t\t}\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(By\r\n\t\t\t\t.xpath(\"(//span/span[@class='k-select'])[1]\")));\r\n\t\tWebElement navigatorDropDown = driver.findElement(By\r\n\t\t\t\t.xpath(\"(//span/span[@class='k-select'])[1]\"));\r\n\t\tsleep(5000);\r\n\t\tnavigatorDropDown.click();\r\n\t\tReporter.log(\"Navigator Drop Down Clicked<br/>\");\r\n\t}",
"public void elementClick(WebElement element) {\n\t\telementToBeClickable(element);\n\t\telement.click();\n\t}",
"public static void clickAndWait(WebDriver driver, WebElement element,\n\t\t\tint iTimeOut) throws Exception {\n\t\tlogger.info(\"into click and Wait method\");\n\t\tclickElement(driver, element);\n\t\tThread.sleep(iTimeOut);\n\t\tlogger.info(\"Clicked element \" + element + \"and waited for \" + iTimeOut\n\t\t\t\t+ \"seconds\");\n\t}",
"public void ButtonStatusToOneWay() throws InterruptedException {\n\n Thread.sleep(10000);\n //action=new Actions(this.driver);\n if (oneWayButton.isSelected()) {\n System.out.println(\"One way Button is already selected\");\n } else {\n wait.until(ExpectedConditions.elementSelectionStateToBe(oneWayButton,false));\n oneWayButton.click();\n System.out.println(\"one way button is clicked\");\n }\n\n\n }",
"public void clickFirstQviewbutton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Qview First Buy button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\t/*List<WebElement> eles=driver.findElements((locator_split(\"btnQview\")));\r\n\t\t\tSystem.out.println(eles.size());\r\n\t\t\teles.get(0).click();*/\r\n\r\n\t\t\tclick(locator_split(\"btnQview\"));\t\t\t\t\r\n\t\t\tSystem.out.println(\"Clicked on the First Buy button\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- First Buy Button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Qview First Buy button is not clicked or Not Available\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnQview\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"void letterWait(String path) {\n WebDriverWait newsWait = new WebDriverWait(chrome, 3);\n try {\n newsWait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(path)));\n chrome.findElement(By.xpath(path)).click();\n\n } catch (Throwable e) {\n// e.printStackTrace();\n }\n }",
"@Test(priority = 4)\n\tpublic void select() throws InterruptedException {\n\t\tThread.sleep(800);\t\t\n\t\tWebElement click = driver.findElement(By.xpath(\"/html/body/div[1]/div[3]/div/div/div/div/ul/li[2]/a\"));\n\t\tclick.click();\n\t\tSystem.out.println(click.getText());\n\n\t\tWebElement item = driver.findElement(By.xpath(\"/html/body/div[2]/div/div/div/div/div/div/div[11]/div/div[2]/div/div/div[1]/div\"));\n\t\titem.click();\n\t\tThread.sleep(800);\n\t\t\n\t\tWebElement data = driver.findElement(By.xpath(\"/html/body/div[2]/div/div/div/div/div/div/div[12]/div/div/div[2]/div[2]\"));\n\t\tdata.click(); \n\t\tSystem.out.println(data.getText());\n\t\t\n\t\tThread.sleep(1000);\n\t\tWebElement expandsize = driver.findElement(By.id(\"headingOne265\"));\n\t\texpandsize.click();\n\t\n\t\tThread.sleep(2000);\n\t\tWebElement expandextra = driver.findElement(By.id(\"heading265\"));\n\t\texpandextra.click();\n\t\t\n\t\tThread.sleep(2000);\n\t\tWebElement closeitem = driver.findElement(By.xpath(\"/html/body/div[2]/div/div/div/div/div/div/div[12]/div/div/div[1]/button\"));\n\t\tcloseitem.click();\n\n\t\tJavascriptExecutor js = (JavascriptExecutor) driver;\n\t\tjs.executeScript(\"window.scrollBy(0,-800)\");\n\n\t\t// *********** changing the language of digital menu ***********\n\n\t\tWebElement restaurantlanguage = driver.findElement(By.xpath(\"/html/body/div[1]/div[1]/div/div/div/div[1]/a\"));\n\t\trestaurantlanguage.click();\n\t\tThread.sleep(800);\n\t\tclosedialog();\n\t\tThread.sleep(1000);\n\t\tjs.executeScript(\"window.scrollBy(0,1500)\");\n\n\t\t// *********** downloading the App ***********\n\n/**\t\tThread.sleep(800);\n\t\tWebElement downloadapp = driver.findElement(By.xpath(\"/html/body/div[3]/div[1]/div/section/div/div[4]/a[2]/img\"));\n\t\tdownloadapp.click();\n**/\n\n\t}",
"public boolean jsClick(By locator){\n \tboolean isClicked = false;\n \tfor(int attempt=0;attempt<3;attempt++) {\n \ttry {\n \t\tif(!isClicked) {\n \t\t//waitForElementClickable(locator);\n \t\t\twaitForElementPresent(elementTimeout);\n WebElement element = driver.findElement(locator);\n JavascriptExecutor executor = (JavascriptExecutor)driver;\n executor.executeScript(\"arguments[0].click();\", element);\n isClicked = true;\n \t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tisClicked = false;\n\t\t}\n \t}\n \treturn isClicked;\n }",
"private void waitforvisibleelement(WebDriver driver2, WebElement signoutimg2) {\n\t\r\n}",
"public void waitModalWindow(By waitForElement) {\n\t\tBaseWaitingWrapper.waitForElementToBeVisible(waitForElement, driver);\r\n\t\t\r\n\r\n\t}",
"public static boolean clickElement(WebElement element) {\n\n\t\tboolean status;\n\n\t\ttry {\n\t\t\thighlight(element);\n\t\t\telement.click();\n\t\t\tstatus = true;\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\tstatus = false;\n\t\t}\n\n\t\treturn status;\n\t}",
"@Test\n public final void testClickButton() {\n spysizedialog.getStartButton().doClick();\n }",
"public static void waitUntilElementIsInvisible(WebElement element) {\n WebDriverWait webDriverWait = getWebDriverWait();\n webDriverWait.until(ExpectedConditions.invisibilityOf(element));\n }",
"public static void clickElement(WebDriver driver, WebElement element) throws Exception {\n\n\t\tlogger.info(\"Clicking element \" + element);\n\t\tif(driver instanceof InternetExplorerDriver)\n\t\t{\n\t\t\tmoveToElementAndClick(driver, element);\n\t\t}\n\t\telse{\n\t\t\tif (isElementClickable(driver, element)) {\n\t\t\t\thighlightElementBorder(driver, element);\n\t\t\t\telement.click();\n\t\t\t} else {\n\t\t\t\tthrow new Exception(\"Element not in state of clickable\");\n\t\t\t}\n\t\t}\n\n\t\tlogger.info(\"Waited and Clicked on element \");\n\n\t}",
"public void waitForElementVisibility(WebDriver driver, WebElement element)\n\t\t{\n\t\t\tWebDriverWait wait = new WebDriverWait(driver,20);\n\t\t\twait.until(ExpectedConditions.visibilityOf(element));\n\t\t}",
"public void clickOnSendNotification() {\r\n\r\n\t\treportStep(\"About to click on Send Notification button \", \"INFO\");\r\n\r\n\t\tif(clickAfterWait(sendNotificationButton)) {\r\n\r\n\t\t\treportStep(\"Successfully clicked on the Send notification Button \", \"PASS\");\r\n\r\n\t\t}else {\r\n\r\n\t\t\treportStep(\"Failed to click onn the Send Notificationn Buttonn \", \"FAIL\");\r\n\t\t}\r\n\t}",
"public static void asyncClick( final SWTWorkbenchBot bot, final SWTBotTreeItem item, final ICondition waitCondition )\n throws TimeoutException\n {\n UIThreadRunnable.asyncExec( bot.getDisplay(), new VoidResult()\n {\n public void run()\n {\n item.click();\n }\n } );\n\n if ( waitCondition != null )\n {\n bot.waitUntil( waitCondition );\n }\n }",
"public static void clickElement(WebElement obj, String objName) throws IOException {\r\n\r\n\t\tif (obj.isDisplayed()){\r\n\t\t\tobj.click();\r\n\t\t\tUpdate_Report( \"Pass\", \"clickElement\", objName +\" is clicked\");\r\n\t\t}else{\r\n\t\t\tUpdate_Report( \"Fail\", \"clickElement\", objName +\" is not displayed please check your application \");\r\n\t\t}\r\n\t}",
"public void clickOnMenu() {\n\t\tgetAndroidmenubtn().isPresent();\n\t\tgetAndroidmenubtn().click();\n\t\twaitForPageToLoad();\n\t}",
"public WebElement wait(WebElement webElement) {\n WebDriverWait webDriverWait = new WebDriverWait(driver, Integer.parseInt(testData.timeout));\n return webDriverWait.until(ExpectedConditions.visibilityOf(webElement));\n }",
"public void waitForElementToVisisble(WebElement elementToCheck){\n\t\ttry {\n\t\t\twait.until(ExpectedConditions.visibilityOf(elementToCheck));\n\t\t}\n\t\tcatch (Exception ex){\n\t\t\tLog.error(\"Element not visible\");\n\t\t}\n\t}"
] | [
"0.7634611",
"0.74887663",
"0.74828637",
"0.73629546",
"0.7190009",
"0.71788144",
"0.7059814",
"0.70589334",
"0.702198",
"0.7021223",
"0.70172614",
"0.70107883",
"0.6883761",
"0.68574977",
"0.6770949",
"0.676757",
"0.6752164",
"0.6744951",
"0.6731481",
"0.6717596",
"0.6689084",
"0.6615756",
"0.6553453",
"0.65344155",
"0.64684707",
"0.64262336",
"0.64183193",
"0.6416333",
"0.64127195",
"0.6412038",
"0.6396504",
"0.63961047",
"0.6381754",
"0.6359228",
"0.63522166",
"0.63433355",
"0.6328732",
"0.63062406",
"0.6304352",
"0.6297172",
"0.62940526",
"0.62905055",
"0.62764126",
"0.6262988",
"0.62564427",
"0.6247864",
"0.6245114",
"0.62434036",
"0.62097555",
"0.62057",
"0.6203115",
"0.6197984",
"0.6192863",
"0.6173695",
"0.61734647",
"0.61528265",
"0.6130789",
"0.6129655",
"0.61223704",
"0.61179334",
"0.6113253",
"0.61059767",
"0.6099866",
"0.60984653",
"0.6095501",
"0.609188",
"0.60877216",
"0.6087036",
"0.60809547",
"0.6078677",
"0.6075853",
"0.60699075",
"0.6068144",
"0.6063712",
"0.60559213",
"0.60535294",
"0.6050275",
"0.60496956",
"0.60441744",
"0.60438466",
"0.602411",
"0.6021177",
"0.60171646",
"0.60117084",
"0.60098326",
"0.6001859",
"0.5987522",
"0.5986839",
"0.5984743",
"0.5974141",
"0.5970914",
"0.5954404",
"0.594585",
"0.5944909",
"0.5937296",
"0.5935293",
"0.5931068",
"0.59308946",
"0.59285367",
"0.5925683"
] | 0.654737 | 23 |
data is passed into the constructor | public ConversationsRecyclerViewAdapter(Context context, ArrayList<ConversationDMResponse> data) {
this.mInflater = LayoutInflater.from(context);
this.mData = data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void initData() {\n }",
"@Override\n protected void initData() {\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}",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void initData() {\n\n\n\n\t}",
"public mainData() {\n }",
"public Model(DataHandler data){\n //assign the data parameter to the instance\n //level variable data. The scope of the parameter\n //is within the method and that is where the JVM \n //looks first for a variable or parameter so we \n //need to specify that the instance level variable \n //is to be used by using the keyword 'this' followed \n //by the '.' operator.\n this.data = data;\n }",
"public Data() {\n }",
"public Data() {\n }",
"@Override\n\tpublic void initData() {\n\t\t\n\t}",
"public Data() {}",
"@Override\n\tpublic void initData() {\n\n\t}",
"@Override\n\tpublic void initData() {\n\n\t}",
"@Override\n\tpublic void initData() {\n\n\t}",
"private void initData() {\n\n }",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"private Noder(E data) {\n this.data = data;\n }",
"private void initData(){\n\n }",
"public Data() {\n \n }",
"@Override\r\n\tpublic void initData() {\n\t}",
"@Override\n\tprotected void initdata() {\n\n\t}",
"private void initData() {\n }",
"private void initData() {\n\t}",
"@Override\n\tprotected void initData(){\n\t\tsuper.initData();\n\t}",
"protected @Override\r\n abstract void initData();",
"public void initData(){\r\n \r\n }",
"public void initData() {\n }",
"public void initData() {\n }",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public InitialData(){}",
"public ChangeData()\r\n\t\t{\r\n\t\t}",
"public DataMessage(final Object data){\n\t\tthis.data=data;\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}",
"public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"public CreateData() {\n\t\t\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public DesastreData() { //\r\n\t}",
"private void InitData() {\n\t}",
"void initData(){\n }",
"private Node( T data_ )\n {\n data = data_;\n parent = this;\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"private Cell(E data) {\n Cell.this.data = data;\n }",
"public void InitData() {\n }",
"private ProcessedDynamicData( ) {\r\n super();\r\n }",
"public StringData1() {\n }",
"private SimpleBuildingJob(BuildingJobData data) {\n\t\tsuper(data.getDx(), data.getDy());\n\t\ttype = data.getType();\n\t\ttime = data.getTime();\n\t\tmaterial = data.getMaterial();\n\t\tdirection = data.getDirection();\n\t\tsearch = data.getSearchType();\n\t\tname = data.getName();\n\t\ttakeMaterialFromMap = data.isTakeMaterialFromMap();\n\t\tfoodOrder = data.getFoodOrder();\n\t}",
"void initData() {\r\n\t\tthis.daVinci = new Artist(\"da Vinci\");\r\n\t\tthis.mona = new Painting(daVinci, \"Mona Lisa\");\r\n\t\t//this.lastSupper = new Painting(this.daVinci, \"Last Supper\");\r\n\t}",
"public SensorData() {\n\n\t}",
"@Override\r\n\tprotected void setData(Object data) {\n\t\t\r\n\t}",
"public Node(Object data) {\n\t\t\tthis.data = data;\n\t\t}",
"public Node(T data) {\r\n this.data = data;\r\n }",
"Data() {\n\t\t// dia = 01;\n\t\t// mes = 01;\n\t\t// ano = 1970;\n\t\tthis(1, 1, 1970); // usar um construtor dentro de outro\n\t}",
"public Node(T data) {\n\n this.data = data;\n\n\n }",
"public StringData() {\n\n }",
"protected abstract D createData();",
"private void initialData() {\n\n }",
"public LineData()\n\t{\n\t}",
"public Node(T data){\n this.data = data;\n }",
"public RegisterNewData() {\n }",
"public Node(T data) {this.data = data;}",
"public TradeData() {\r\n\r\n\t}",
"private void parseData() {\n\t\t\r\n\t}",
"@Override\n\tpublic void getData() {\n\t\t\n\t}",
"public Matchdata()\n {\n }",
"private void initData() {\n getCourse();\n// getMessage();\n\n }",
"public Data(SearchTree<Software> dataStructure){\n administratorMyArray = new ArrayList<>();\n IDList = new ArrayList<>();\n products = dataStructure;\n money=0.0;\n }",
"public Node(E data) {\n this.data = data;\n }",
"public Data() {\n initComponents();\n getData();\n }",
"Constructor() {\r\n\t\t \r\n\t }",
"public Node(E data) {\r\n\t\tthis.data = data;\r\n\t}",
"private void fillData()\n {\n\n }",
"public StreamData(String name)\n {\n _data = new LinkedList<byte[]>();\n this.Name = name;\n this.Length = 0;\n }",
"private TigerData() {\n initFields();\n }",
"public FilterData() {\n }",
"public CompanyData() {\r\n }",
"public Data (String name, int type) {\n\t\tthis.name = name;\n\t\tthis.type = type;\n\t\tstream = new MyReader();\n\t}",
"public CreateStatus(DataMap data)\n {\n super(data, null);\n }",
"public PassPinDataItem() {\n }",
"public NetworkData() {\n }",
"public CompositeData()\r\n {\r\n }",
"public Data(String data){\n String[] dataAux = data.split(\"/\");\n dia = Integer.parseInt(dataAux[0]);\n mes = Integer.parseInt(dataAux[1]);\n ano = Integer.parseInt(dataAux[2]);\n }",
"public DummyModel(String data) {\n textData = data;\n }",
"protected void loadData()\n {\n }",
"public ListingData() {\r\n\t\tsuper();\r\n\t}",
"private PassedData(Parcel p) {\n this.a = p.readInt();\n this.b = p.readLong();\n this.c = p.readString();\n }",
"private Node(E dataItem)\n {\n data = dataItem;\n next = null;\n }",
"protected Node(T dataPortion) {\n data = dataPortion;\n next = null;\n }",
"public UserData() {\n }",
"public void setData(Object data) {\r\n this.data = data;\r\n }",
"void setData(T data) {\n\t\tthis.data = data;\n\t}",
"public LocationData()\n {\n }",
"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 }",
"CreationData creationData();",
"protected UserWordData() {\n\n\t}"
] | [
"0.75053096",
"0.75053096",
"0.7498755",
"0.7498755",
"0.7498755",
"0.7498755",
"0.7498755",
"0.7498755",
"0.7441991",
"0.743197",
"0.743197",
"0.73840797",
"0.73593724",
"0.7342546",
"0.73139405",
"0.73139405",
"0.7302213",
"0.7290977",
"0.7270768",
"0.7270768",
"0.7270768",
"0.72706854",
"0.72638535",
"0.72526044",
"0.7241215",
"0.7230557",
"0.7228211",
"0.72076404",
"0.71757936",
"0.71265954",
"0.7037175",
"0.70270073",
"0.70184124",
"0.70167583",
"0.70167583",
"0.7009937",
"0.70032144",
"0.7002726",
"0.69848883",
"0.69675905",
"0.69675905",
"0.69663846",
"0.69540703",
"0.6940786",
"0.6930493",
"0.68968284",
"0.687104",
"0.68105686",
"0.6760824",
"0.67597604",
"0.6709227",
"0.67056525",
"0.66995364",
"0.6646523",
"0.6579214",
"0.6573359",
"0.6570766",
"0.6559903",
"0.6555413",
"0.65495485",
"0.65421146",
"0.65334964",
"0.6529477",
"0.650508",
"0.648739",
"0.6486625",
"0.64825916",
"0.64759",
"0.6469128",
"0.64540136",
"0.643022",
"0.6412987",
"0.6367767",
"0.63662887",
"0.63557035",
"0.6339456",
"0.62985146",
"0.6296511",
"0.62888646",
"0.6281984",
"0.627371",
"0.6257719",
"0.62561655",
"0.62439096",
"0.6243267",
"0.622766",
"0.62218034",
"0.6215568",
"0.62100136",
"0.6198525",
"0.61962754",
"0.61952037",
"0.61943346",
"0.6186838",
"0.6180866",
"0.6174343",
"0.61660147",
"0.6165505",
"0.6149496",
"0.6148171",
"0.6146466"
] | 0.0 | -1 |
inflates the row layout from xml when needed | @Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
int recyclerRow;
recyclerRow = R.layout.recycler_row_conversations;
View view = mInflater.inflate(recyclerRow, parent, false);
return new ConversationsRecyclerViewAdapter.ViewHolder(view);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void inflateTextLayout(View row, BeadInfo beadInfo) {\n\t\tTextView colorCodeTV = (TextView) row.findViewById(R.id.colorNumber);\n\t\tif (colorCodeTV != null){\n\t\t\tString colorCode = beadInfo.getColorCode();\n\t\t\tif (colorCode != null){\n\t\t\t\tcolorCodeTV.setText(colorCode);\n\t\t\t}\n\t\t}\n\t\tLocation loc = beadInfo.getLocation(); \n\t\tif (loc != null){\n\t\t\tString wing = loc.getWing();\n\t\t\tString locRow = String.valueOf(loc.getRow());\n\t\t\tString locCol = String.valueOf(loc.getCol());\n\t\t\tString quantity = String.valueOf(beadInfo.getQuantity());\n\n\t\t\tTextView wingTV = (TextView) row.findViewById(R.id.beadLocationWing);\n\t\t\tif (wingTV != null){\n\t\t\t\twingTV.setText(wing);\n\t\t\t}\n\t\t\tTextView locRowTV = (TextView) row.findViewById(R.id.beadLocationRow);\n\t\t\tif (locRowTV != null){\n\t\t\t\tlocRowTV.setText(locRow);\n\t\t\t}\n\t\t\tTextView locColTV = (TextView) row.findViewById(R.id.beadLocationColumn);\n\t\t\tif (locColTV != null){\n\t\t\t\tlocColTV.setText(locCol);\n\t\t\t}\n\t\t\tTextView quantityTV = (TextView) row.findViewById(R.id.beadQuantity);\n\t\t\tif (quantityTV != null){\n\t\t\t\tquantityTV.setText(quantity);\n\t\t\t}\n\n\n\n\t\t}\n\n\t\t\n\t}",
"public void onFinishInflate() {\n AppMethodBeat.i(103009);\n if (getChildCount() > 0) {\n View childAt = getChildAt(0);\n if (!(childAt instanceof RadarSpecialTableLayout)) {\n childAt = null;\n }\n this.pCL = (RadarSpecialTableLayout) childAt;\n }\n AppMethodBeat.o(103009);\n }",
"private void inflateThumbnailLayout(View row, BeadInfo beadInfo) {\n\t\tTextView colorCodeTV = (TextView) row.findViewById(R.id.colorNumber);\n\t\tif (colorCodeTV != null){\n\t\t\tString colorCode = beadInfo.getColorCode();\n\t\t\tif (colorCode != null){\n\t\t\t\tcolorCodeTV.setText(colorCode);\n\t\t\t\timageInserter = new BitmapInserter();\n\t\t\t\timageInserter.setLocation((ImageView) row.findViewById(R.id.beadIconColumn));\n\t\t\t\timageInserter.setStorage(new File(APPFOLDER, IMAGEFOLDER));\n\t\t\t\timageInserter.execute(colorCode);\n\t\t\t}\n\t\t}\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}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View layout = inflater.inflate(R.layout.custom_row, container, false);\n recyclerView = (RecyclerView) layout.findViewById(R.id.rv);\n adapter = new WebCrawlerRecyclerViewAdapter(getActivity(), getData());\n recyclerView.setAdapter(adapter);\n LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());\n layoutManager.setOrientation(LinearLayoutManager.VERTICAL);\n recyclerView.setLayoutManager(layoutManager);\n return layout;\n\n }",
"protected View inflateRow(ViewHolder holder){\n View row = null;\n switch (type)\n {\n case TYPE_TEXT_USER:\n row = inflater.inflate(textUserRowResId, null);\n holder.readStatus = (ImageSwitcher) row.findViewById(R.id.read_status);\n holder.readStatus.setFactory(new ViewSwitcher.ViewFactory() {\n @Override\n public View makeView() {\n ImageView imageView = new ImageView(mActivity.getApplicationContext());\n imageView.setScaleType(ImageView.ScaleType.CENTER);\n return imageView;\n }\n });\n holder.readStatus.setInAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_in));\n holder.readStatus.setOutAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_out));\n holder.txtContent = (TextView) row.findViewById(R.id.txt_content);\n\n break;\n\n case TYPE_TEXT_FRIEND:\n\n row = inflater.inflate(textFriendRowResId, null);\n\n holder.txtContent = (TextView) row.findViewById(R.id.txt_content);\n\n break;\n\n case TYPE_IMAGE_USER:\n row = inflater.inflate(imageUserRowResId, null);\n holder.readStatus = (ImageSwitcher) row.findViewById(R.id.read_status);\n\n holder.readStatus.setFactory(new ViewSwitcher.ViewFactory() {\n @Override\n public View makeView() {\n ImageView imageView = new ImageView(mActivity.getApplicationContext());\n imageView.setScaleType(ImageView.ScaleType.CENTER);\n return imageView;\n }\n });\n holder.readStatus.setInAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_in));\n holder.readStatus.setOutAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_out));\n holder.progressBar = (ProgressBar) row.findViewById(R.id.chat_sdk_progress_bar);\n holder.image = (ChatBubbleImageView) row.findViewById(R.id.chat_sdk_image);\n\n break;\n\n case TYPE_IMAGE_FRIEND:\n row = inflater.inflate(imageFriendRowResId, null);\n\n holder.progressBar = (ProgressBar) row.findViewById(R.id.chat_sdk_progress_bar);\n holder.image = (ChatBubbleImageView) row.findViewById(R.id.chat_sdk_image);\n break;\n\n case TYPE_LOCATION_USER:\n row = inflater.inflate(locationUserResId, null);\n holder.readStatus = (ImageSwitcher) row.findViewById(R.id.read_status);\n holder.readStatus.setFactory(new ViewSwitcher.ViewFactory() {\n @Override\n public View makeView() {\n ImageView imageView = new ImageView(mActivity.getApplicationContext());\n imageView.setScaleType(ImageView.ScaleType.CENTER);\n return imageView;\n }\n });\n holder.readStatus.setInAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_in));\n holder.readStatus.setOutAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_out));\n holder.progressBar = (ProgressBar) row.findViewById(R.id.chat_sdk_progress_bar);\n holder.image = (ChatBubbleImageView) row.findViewById(R.id.chat_sdk_image);\n\n break;\n\n case TYPE_LOCATION_FRIEND:\n row = inflater.inflate(locationFriendRowResId, null);\n\n holder.progressBar = (ProgressBar) row.findViewById(R.id.chat_sdk_progress_bar);\n holder.image = (ChatBubbleImageView) row.findViewById(R.id.chat_sdk_image);\n\n break;\n }\n\n return row;\n }",
"private void getRows() {\n int count = metroTileView.getChildCount();\n for (int i=0; i<count; i++) {\n LinearLayout layout = (LinearLayout) metroTileView.getChildAt(i);\n rows.add(layout);\n }\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.layout_true_false_row, container, false);\n }",
"@Override\n\tpublic View getView(final int position, View row, ViewGroup parent) {\n\t\tif (row == null) {\n\t\t\tLayoutInflater inflater = context.getLayoutInflater();\n\t\t\trow = inflater.inflate(LayoutId, parent, false);\n\t\t}\n\n\t\treturn row;\n\t}",
"@Override\n public void initialiseUiRows() {\n }",
"@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}",
"protected static XmlElement getRowXml(XmlElement xml)\n {\n XmlElement xmlTemp = xml;\n while (xmlTemp.getElement(TAG_ROW) == null)\n {\n xmlTemp = xmlTemp.getParent();\n if (xmlTemp == null)\n {\n return null;\n }\n }\n return xmlTemp.getElement(TAG_ROW);\n }",
"private View initView(int position, View convertView, ViewGroup parent) {\n View row = convertView;\n if (row == null) {\n LayoutInflater inflater = ((Activity) context).getLayoutInflater();\n row = inflater.inflate(resourceId, parent, false);\n }\n Scenario record = getItem(position);\n if (record != null) {\n TextView scenarioId = (TextView) row.findViewById(R.id.rowScenarioId);\n TextView scenarioName = (TextView) row.findViewById(R.id.rowScenarioName);\n TextView scenarioFileName = (TextView) row.findViewById(R.id.rowScenarioFile);\n TextView scenarioMime = (TextView) row.findViewById(R.id.rowScenarioMime);\n\n if (scenarioId != null) {\n scenarioId.setText(Integer.toString(record.getScenarioId()));\n }\n if (scenarioName != null) {\n scenarioName.setText(record.getScenarioName());\n }\n if (scenarioFileName != null) {\n scenarioFileName.setText(record.getFileName());\n }\n if (scenarioMime != null) {\n scenarioMime.setText(record.getMimeType());\n }\n }\n return row;\n }",
"@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\t\t\tLayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t\tView view = inflater.inflate(R.layout.list_item_table_row_read, parent, false);\n\t\t\tSet<Entry<String, JsonElement>> set = mTableRows[position].getAsJsonObject().entrySet();\n\t\t\tLinearLayout layoutItem = (LinearLayout) view.findViewById(R.id.layoutItem);\n\t\t\t//Loop through each data item in the row and create a layout with the key and \n\t\t\t//value displayed in TextViews within it\n\t\t\tfor (Entry<String, JsonElement> entry : set) {\n\t\t\t\tLog.i(TAG, entry.getKey());\t\t\t\t\n\t\t\t\tRelativeLayout rowLayout = new RelativeLayout(mContext);\n\t\t\t\tRelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);\t\t\t\t\n\t\t\t\trowLayout.setLayoutParams(params);\t\t\t\t\n\t\t\t\tTextView lblKey = new TextView(mContext);\n\t\t\t\tlblKey.setText(entry.getKey());\t\t\t\t\n\t\t\t\tRelativeLayout.LayoutParams keyParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\t\tkeyParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT);\n\t\t\t\tkeyParams.leftMargin = 20;\n\t\t\t\tlblKey.setLayoutParams(keyParams);\t\t\t\t\n\t\t\t\tTextView lblValue = new TextView(mContext);\t\t\t\t\n\t\t\t\tRelativeLayout.LayoutParams valueParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\t\tvalueParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);\n\t\t\t\tlblValue.setLayoutParams(valueParams);\n\t\t\t\t//Limit the amount of text we show so the UI isn't dirty\n\t\t\t\tInputFilter[] FilterArray = new InputFilter[1];\n\t\t\t\tFilterArray[0] = new InputFilter.LengthFilter(25);\n\t\t\t\tlblValue.setFilters(FilterArray);\n\t\t\t\tlblValue.setText(entry.getValue().getAsString());\n\t\t\t\tlblValue.setGravity(Gravity.RIGHT);\n\t\t\t\trowLayout.addView(lblKey);\n\t\t\t\trowLayout.addView(lblValue);\n\t\t\t\tlayoutItem.addView(rowLayout);\n\t\t\t}\t\t\t\n\t\t\treturn view;\n\t\t}",
"@Override\n\tpublic View newView(Context arg0, Cursor arg1, ViewGroup arg2) {\n\t\tView row = (View) inflater.inflate(R.layout.list_row, arg2, false);\n\t\treturn row;\n\t}",
"public void fillTheLayout() {\n for (int i = 0; i < ROW_COUNT; i++) {\n //these are horizontal linear layouts that will be part of the vertical linear layout, shown in XML\n LinearLayout sublinearLayout = new LinearLayout(this);\n LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT,\n ViewGroup.LayoutParams.WRAP_CONTENT);\n layoutParams.weight = 1;\n\n sublinearLayout.setLayoutParams(layoutParams);\n //center align the contents\n sublinearLayout.setGravity(Gravity.CENTER);\n sublinearLayout.setPadding(PADDING, PADDING, PADDING, PADDING);\n\n for (int j = 0; j < COLUMN_COUNT; j++) {\n\n// Add the gifImageViews to the linear layout created above\n GifImageView gifImageView = new GifImageView(this);\n LinearLayout.LayoutParams imageViewlayoutParam = new LinearLayout.LayoutParams(\n ViewGroup.LayoutParams.WRAP_CONTENT,\n ViewGroup.LayoutParams.WRAP_CONTENT);\n imageViewlayoutParam.weight = 1;\n\n gifImageView.setLayoutParams(imageViewlayoutParam);\n //this padding helps in showing the white boundaries\n gifImageView.setPadding(PADDING, PADDING, PADDING, PADDING);\n //Similar to storing in row-major form, used that logic to set id's\n gifImageView.setId(i * COLUMN_COUNT + j);\n //main activity implements the onClick\n gifImageView.setOnClickListener(this);\n Block block = new Block(gifImageView);\n block.display();\n arrayList.add(block);\n sublinearLayout.addView(gifImageView);\n\n }\n linearLayout.addView(sublinearLayout);\n }\n //change grid's color, after initialising the layout\n changeColor();\n }",
"private void setUpLayout() {\n myLinearLayout=(LinearLayout)rootView.findViewById(R.id.container_wartaMingguan);\n\n // Add LayoutParams\n params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n myLinearLayout.setOrientation(LinearLayout.VERTICAL);\n params.setMargins(0, 10, 0, 0);\n\n // Param untuk deskripsi\n paramsDeskripsi = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n myLinearLayout.setOrientation(LinearLayout.VERTICAL);\n paramsDeskripsi.setMargins(0, 0, 0, 0);\n\n tableParams = new TableLayout.LayoutParams(TableLayout.LayoutParams.MATCH_PARENT, TableLayout.LayoutParams.WRAP_CONTENT);\n rowTableParams = new TableLayout.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT);\n\n // Untuk tag \"warta\"\n LinearLayout rowLayout = new LinearLayout(getActivity());\n rowLayout.setOrientation(LinearLayout.HORIZONTAL);\n\n // Membuat linear layout vertical untuk menampung kata-kata\n LinearLayout colLayout = new LinearLayout(getActivity());\n colLayout.setOrientation(LinearLayout.VERTICAL);\n colLayout.setPadding(0, 5, 0, 0);\n }",
"@Override\n public MyAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n\n if (viewType == TYPE_ITEM) {\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_row,parent,false); //Inflating the layout\n\n ViewHolder vhItem = new ViewHolder(v,viewType); //Creating ViewHolder and passing the object of type view\n\n return vhItem; // Returning the created object\n\n //inflate your layout and pass it to view holder\n\n } else if (viewType == TYPE_HEADER) {\n\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.header,parent,false); //Inflating the layout\n\n ViewHolder vhHeader = new ViewHolder(v,viewType); //Creating ViewHolder and passing the object of type view\n\n return vhHeader; //returning the object created\n\n\n }\n return null;\n\n }",
"@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n\n //'this' refers to the LinearLayout, cause we are currently in LinearLayout\n\n //access the day UI element\n mTextDate = (TextView) this.findViewById(R.id.tv_day);\n\n //access the month UI element\n mTextMonth = (TextView) this.findViewById(R.id.tv_month);\n\n //access the year UI element\n mTextYear = (TextView) this.findViewById(R.id.tv_year);\n\n //setOnTouchListener on the UI elements\n\n mTextDate.setOnTouchListener(this);\n mTextMonth.setOnTouchListener(this);\n mTextYear.setOnTouchListener(this);\n\n //get the current date from the Calendar\n int date = mCalendar.get(Calendar.DATE);\n\n //get current month\n int month = mCalendar.get(Calendar.MONTH);\n\n //get current year\n int year = mCalendar.get(Calendar.YEAR);\n\n //pass the date, month and year to update method which will update the UI\n update(date, month, year, 0, 0, 0);\n\n\n }",
"public RowListaCustomAdapter ( Context c, ArrayList<Row>data){\n Log.v(TAG, \"Construir Adaptador\");\n this.data = data;\n inflater = LayoutInflater.from(c);\n\n }",
"com.google.monitoring.dashboard.v1.RowLayout getRowLayout();",
"private void initView() {\n\n LayoutInflater inflater = getLayoutInflater();\n final int screenWidth = MyUtils.getScreenMetrics(this).widthPixels;\n final int screenHeight = MyUtils.getScreenMetrics(this).heightPixels;\n for (int i = 0; i < 3; i++) {\n ViewGroup layout = (ViewGroup) inflater.inflate(\n R.layout.content_layout, myHorizontal, false);\n layout.getLayoutParams().width = screenWidth;\n TextView textView = (TextView) layout.findViewById(R.id.title);\n textView.setText(\"page \" + (i + 1));\n layout.setBackgroundColor(Color.rgb(255 / (i + 1), 255 / (i + 1), 0));\n createList(layout);\n myHorizontal.addView(layout);\n }\n }",
"public final void onFinishInflate() {\n super.onFinishInflate();\n TextView textView = (TextView) findViewById(C0126R.C0129id.title);\n this.f110062a = textView;\n C1280ps.m19893a(textView, \"excludeViewFromChangeBounds\");\n this.f110062a.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n TextView textView2 = (TextView) findViewById(C0126R.C0129id.subtitle);\n this.f110063b = textView2;\n textView2.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n LinearLayout linearLayout = (LinearLayout) findViewById(C0126R.C0129id.collapsed_image_container);\n this.f110064c = linearLayout;\n linearLayout.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n LinearLayout linearLayout2 = (LinearLayout) findViewById(C0126R.C0129id.expanded_image_container);\n this.f110065d = linearLayout2;\n linearLayout2.setTag(C0126R.C0129id.summary_expander_transition_name, \"summaryField\");\n this.f110066e = (ImageView) findViewById(C0126R.C0129id.expand_collapse_icon);\n ImageWithCaptionView imageWithCaptionView = (ImageWithCaptionView) findViewById(C0126R.C0129id.tooltip_view);\n this.f110068g = imageWithCaptionView;\n imageWithCaptionView.setDefaultImageResId(bkfr.m105543a(getContext(), (int) ErrorInfo.TYPE_SDU_MEMORY_FULL, -1));\n this.f110068g.setOnClickListener(this);\n }",
"protected abstract ReadCell<DataType> createItemCell(LayoutInflater inflater, View convertView, ViewGroup parent);",
"private void inflateRV(String latlng) {\n GridLayoutManager layoutManager = new GridLayoutManager(this, 2);\n //StaggeredGridLayoutManager layoutManager = new StaggeredGridLayoutManager(2,StaggeredGridLayoutManager.VERTICAL);\n rvRestaurant.setHasFixedSize(true);\n rvRestaurant.setLayoutManager(layoutManager);\n\n (new AsyncTaskGetJSON(HomeActivity.this, rvRestaurant)).execute(latlng);\n\n }",
"@Override\n protected void onFinishInflate() {\n mRootView = getChildAt(0);\n super.onFinishInflate();\n }",
"@Override\n public View getView(int position, View ConvertView, ViewGroup parent){ ///position starts from zero,one and goes on, parent would be the layout we want to display all elements\n View row=ConvertView; //to optimize we inflate the item only first else we recycle the view using converterView\n if(row==null) {\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n //**View of which we want to convert to java view object\n row = inflater.inflate(R.layout.single_row, parent, false);\n }\n //*****From row view we can access the view items and populate it data\n ImageView imageView = (ImageView)row.findViewById(R.id.imageView);\n TextView myDiscription=(TextView)row.findViewById(R.id.myDescription);\n TextView myTitle=(TextView)row.findViewById(R.id.mytitle);\n\n imageView.setImageResource(images[position]); //postion will incremented automaticlly as views will populate\n myDiscription.setText(description[position]);\n myTitle.setText(titles[position]);\n\n return row;\n }",
"private View createDarkCell(){\n return LayoutInflater.from(this.context).inflate(R.layout.back, this.tableRoot, false);\n }",
"private void prepareViews() {\n mTextViewHeader = (TextView) mHeaderView.findViewById(R.id.tv_text_header_enhanced_listview);\n mTextViewFooter = (TextView) mFooterView.findViewById(R.id.tv_text_footer_enhanced_listview);\n mTextViewTime = (TextView) mHeaderView.findViewById(R.id.tv_time_update_header);\n\n mArrowHeader = mHeaderView.findViewById(R.id.arrow_header);\n mArrowFooter = mFooterView.findViewById(R.id.arrow_footer);\n\n mPbHeader = mHeaderView.findViewById(R.id.pb_header_enhanced_listview);\n mPbFooter = mFooterView.findViewById(R.id.pb_footer_enhanced_listview);\n\n }",
"public void onFinishInflate() {\n super.onFinishInflate();\n this.mIconView = (ImageView) findViewById(R.id.icon);\n this.mTitleView = (TextView) findViewById(R.id.title);\n this.mSummaryView = (TextView) findViewById(R.id.summary);\n this.mSlidingButton = findViewById(R.id.sliding_button);\n }",
"public ViewGroup getRowLayout(View rowView) {\r\n LinearLayout rowLayout = mLayout.getContainerRowLayout();\r\n rowLayout.addView(rowView);\r\n return rowLayout;\r\n }",
"private View getCustomView(int position, View convertView, ViewGroup parent) {\n\n /********** Inflate spinner_rows.xml file for each row ( Defined below ) ************/\n View row = inflater.inflate(R.layout.spinner_item_white, parent, false);\n\n TextView tv_item_name = (TextView) row.findViewById(R.id.tv_item_name);\n// ImageView iv_spinner_icon = (ImageView) row.findViewById(R.id.iv_spinner_icon);\n\n tv_item_name.setText(arrayList.get(position));\n// iv_spinner_icon.setImageResource(arrayIcons.getResourceId(position, -1));\n return row;\n }",
"private void castLayoutElements() {\n linlaHeaderProgress = (LinearLayout) view.findViewById(R.id.linlaHeaderProgress);\n listPrinters = (RecyclerView) view.findViewById(R.id.listPrinters);\n linlaEmpty = (LinearLayout) view.findViewById(R.id.linlaEmpty);\n \n /* CONFIGURE THE RECYCLERVIEW */\n listPrinters.setHasFixedSize(true);\n LinearLayoutManager llm = new LinearLayoutManager(getActivity());\n llm.setOrientation(LinearLayoutManager.VERTICAL);\n listPrinters.setLayoutManager(llm);\n }",
"@Override\n public CustomViewHolder onCreateViewHolder(ViewGroup parent, int type)\n {\n View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.row_view, null, false);\n return new CustomViewHolder(view);\n }",
"@Override\n public void init(LayoutInflater inflater, ViewGroup parent) {\n mView = inflater.inflate(R.layout.project_task_layout, parent, false);\n mTaskList = (ExpandableListView) mView.findViewById(R.id.task_list);\n// mTaskList.setHasFixedSize(true);\n// final LinearLayoutManager mLayoutManager = new LinearLayoutManager(inflater.getContext());\n// mTaskList.setLayoutManager(mLayoutManager);\n mProjectName = (TextView) mView.findViewById(R.id.project_name);\n\n final LinearLayout linearLayout = (LinearLayout) mView.findViewById(R.id.collapse_layout);\n\n mProjectName.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(linearLayout.getVisibility() == View.VISIBLE)\n collapse(linearLayout);\n else\n expand(linearLayout);\n\n }\n });\n\n mTaskList.setOnGroupClickListener(new ExpandableListView.OnGroupClickListener() {\n @Override\n public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {\n // We call collapseGroupWithAnimation(int) and\n // expandGroupWithAnimation(int) to animate group\n // expansion/collapse.\n if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n return parent.expandGroup(groupPosition, true);\n }else\n\n return true;\n }\n });\n\n\n }",
"@Override\n public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n\n View view;\n\n view = LayoutInflater.from(parent.getContext()).inflate(R.layout.row_service_text, parent, false);\n\n mview=view;\n return new ViewHolder(view); // Inflater means reading a layout XML\n }",
"@Override\n public MyAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { //RECETA\n // create a new view\n LayoutInflater inflater = LayoutInflater.from (parent.getContext());\n View v = inflater.inflate(R.layout.row_layout, parent, false);\n // set the view's size, margins, paddings and layout parameters\n ViewHolder vh = new ViewHolder(v);\n return vh;\n }",
"private void initView() {\n // set layout for recycle view\n //hasFixedSize true if adapter changes cannot affect the size of the RecyclerView\n recyclerView.setHasFixedSize(true);\n // this layout can be vertical or horizontal by change the second param\n // of LinearLayoutManager, and display up to down by set the third param false\n LinearLayoutManager layoutManager = new LinearLayoutManager(this,\n LinearLayoutManager.VERTICAL, false);\n\n recyclerView.setLayoutManager(layoutManager);\n importData();\n // set adapter for recycle view\n recyclerView.setAdapter(alarmAdapter);\n }",
"private void initView(){\n\n btnBack = (ImageView)findViewById(R.id.btnBack);\n btnQuit = (ImageView)findViewById(R.id.btnQuit);\n btnQuit.setVisibility(View.GONE);\n\n title = (TextView)this.findViewById(R.id.title);\n title.setText(R.string.assetInquire);\n barCode = (EditText)findViewById(R.id.barCode);\n\n loadAssetData = (ListView)findViewById(R.id.loadAssetData);\n\n hs_ledger_hslist = (HorizontalScrollView)findViewById(R.id.hs_ledger_hslist);\n initListViewHead(R.id.tv_list_table_tvhead1, false, rowName[0]);\n initListViewHead(R.id.tv_list_table_tvhead2, false, rowName[1]);\n initListViewHead(R.id.tv_list_table_tvhead3, false, rowName[2]);\n initListViewHead(R.id.tv_list_table_tvhead4, false, rowName[3]);\n initListViewHead(R.id.tv_list_table_tvhead5, false, rowName[4]);\n\n lvx = (ListViewEx)findViewById(R.id.lv_table_lvLedgerList);\n\n lvx.inital(R.layout.list_table_inquire, row, new int[]{\n R.id.tv_list_table_tvhead1,\n R.id.tv_list_table_tvhead2,\n R.id.tv_list_table_tvhead3,\n R.id.tv_list_table_tvhead4,\n R.id.tv_list_table_tvhead5\n });\n\n if (barCodeStr!=null&&!barCodeStr.trim().equals(\"\")){\n barCode.setText(barCodeStr);\n selBarCode();\n }\n }",
"public FXMLTuple inflate()\n {\n FXMLLoader loader = new FXMLLoader(resource);\n try {\n return new FXMLTuple(loader.load(), loader.getController());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"public void inflate(){\n\t\tInflateTextContent();\n\t\tif(tempData.get(\"Media_Type\").equals(\"1\")){\n\t\t\tgenerateMediaView();\n\t\t}else if(tempData.get(\"Media_Type\").equals(\"2\")){\n\t\t\tprocessURL(2);\n\t\t}else if(tempData.get(\"Media_Type\").equals(\"3\")){\n\t\t\tprocessURL(3);\n\t\t}\t\n\t}",
"@Override \n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.article_reader_layout, container, false);\n textView = (TextView)view.findViewById(R.id.text) ;\n return view;\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tinflater = LayoutInflater.from(getApplicationContext());\n\t}",
"@Override\n\tprotected int initView() {\n\t\treturn R.layout.activity_zhusu_detail;\n\t}",
"public void onFinishInflate() {\n super.onFinishInflate();\n this.mTextAndBackground = (ViewGroup) findViewById(C0622R.C0625id.text_and_background);\n ColorDrawable colorDrawable = (ColorDrawable) this.mTextAndBackground.getBackground();\n this.mBackgroundColor = colorDrawable.getColor();\n this.mTextAndBackground.setBackground(new RippleDrawable(ColorStateList.valueOf(Themes.getAttrColor(getContext(), 16843820)), colorDrawable, null));\n this.mTitleView = (TextView) this.mTextAndBackground.findViewById(C0622R.C0625id.title);\n this.mTextView = (TextView) this.mTextAndBackground.findViewById(C0622R.C0625id.text);\n }",
"private void rowIterator(LinearLayout row, Bitmap image) {\n\n for (int position = 0; position < row.getChildCount(); position++) {\n\n ImageView placeHolder = (ImageView) row.getChildAt(position);\n\n if ( isPlaceHolderImage(placeHolder)) {\n placeHolder.setId(imagemid);\n //place_holder.setImageBitmap(Bitmap.createScaledBitmap(image,160,110,true));\n placeHolder.setImageBitmap(image);\n return;\n }\n }\n }",
"boolean hasRowLayout();",
"@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n mTitleContent = (TextView) findViewById(R.id.title_content);\n mLeftTv = (TextView) findViewById(R.id.title_left_tv);\n mRightTv = (TextView) findViewById(R.id.title_right_tv);\n mRightImg = (ImageView) findViewById(R.id.title_right_img);\n mMessageView = (RelativeLayout) findViewById(R.id.toolbar_message_view);\n mUnReadImg = (ImageView) findViewById(R.id.toolbar_message_unread_img);\n }",
"public void loadIngredients(){\n llingerdientDetails.removeAllViews();\n for(int i = 0; i < llDishes.getChildCount();i++) {\n\n ((LinearLayout) llDishes.getChildAt(i).findViewById(R.id.llborderColor)).setBackgroundColor(Color.parseColor(\"#00800000\"));\n\n }\n //llborderColor_ingredients.setBackgroundColor(Color.parseColor(\"#800000\"));\n for(Dish dish: dinnerModel.getDishes()){\n\n for (Ingredient ing : dish.getIngredients()) {\n\n View ingtredientsItemView = layoutInflater.inflate(R.layout.ingredients_item_view,null);\n TextView txtingredientName = (TextView)ingtredientsItemView.findViewById(R.id.txtIngredientName);\n TextView txtingredientUnit = (TextView)ingtredientsItemView.findViewById(R.id.txtIngredientUnit);\n TextView txtingredientqty = (TextView)ingtredientsItemView.findViewById(R.id.txtIngredientqty);\n txtingredientName.setText(ing.getName());\n txtingredientqty.setText(Double.toString(Double.parseDouble(ing.getQuantity()) * dinnerModel.getNumberOfGuests()));\n txtingredientUnit.setText(ing.getUnit());\n llingerdientDetails.addView(ingtredientsItemView);\n }\n }\n }",
"public void onFinishInflate() {\n super.onFinishInflate();\n this.mTvMain = (TextView) findViewById(R.id.tv_main);\n this.mTvSub = (TextView) findViewById(R.id.tv_second);\n this.mIvIcon = (ImageView) findViewById(R.id.iv_icon);\n this.mIvIcon.setVisibility(8);\n this.mTvSub.setMovementMethod(ScrollingMovementMethod.getInstance());\n }",
"@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n //inflate(XmlPullParser parser, ViewGroup root, boolean attachToRoot)\n //Inflate a new view hierarchy from the specified XML node\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);\n }",
"public RowAdapter(Activity a, ArrayList pc_no_array, ArrayList lab_no_array,ArrayList status_array,ArrayList date_array,ArrayList desc_array) {\n activity = a;\n this.pc_no_array = pc_no_array;\n this.lab_no_array = lab_no_array;\n RowAdapter.status_array = status_array;\n this.date_array = date_array;\n this.desc_array = desc_array;\n inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n }",
"@Override\n public View newView (Context context, Cursor cursor, ViewGroup parent) {\n return LayoutInflater.from(context).inflate(R.layout.fragment_city_list_row, parent, false);\n }",
"protected void inflate() {\n matrix.walkInOptimizedOrder(inflateVisitor);\n }",
"public View getCustomView(int position, View convertView, ViewGroup parent) {\n \n /********** Inflate spinner_rows.xml file for each row ( Defined below ) ************/\n \t\n View row = inflater.inflate(R.layout.spinner_rows, parent, false);\n \n /***** Get each Model object from Arraylist ********/\n tempValues = null;\n tempValues = (Province) data.get(position);\n \n TextView label = (TextView)row.findViewById(R.id.customprovince);\n //TextView sub = (TextView)row.findViewById(R.id.sub);\n /* if(position==0){\n // Default selected Spinner item\n label.setText(\"Please select company\");\n }\n else\n { // Set values for spinner each row\n label.setText(tempValues.getProvince_name());\n } */ \n label.setText(tempValues.getProvince_name());\n return row;\n }",
"@Override\n protected int getNormalLayoutResId() {\n return itemCommonBinder.layout;\n }",
"public void onFinishInflate() {\n super.onFinishInflate();\n bringChildToFront(this.menuButton);\n this.buttonsCount = getChildCount();\n createLabels();\n }",
"public LinearLayout rootView(){\n buttonIndex = 0;\n buttonPayIndex = 0;\n buttonFunctionIndex = 0;\n\n\n LinearLayout lrl = new LinearLayout(getContext());\n LinearLayout.LayoutParams rlp = new LinearLayout.LayoutParams(\n LinearLayout.LayoutParams.MATCH_PARENT,\n LinearLayout.LayoutParams.MATCH_PARENT);\n rlp.setMargins(0,5,0,0);\n lrl.setLayoutParams(rlp);\n lrl.setOrientation(LinearLayout.VERTICAL);\n lrl.setBackgroundColor(getResources().getColor(R.color.colorPrimary));\n lrl.setWeightSum(rows);\n\n for(int index = 0; index < rows; index++){\n lrl.addView(createLinearLayout());\n }\n return lrl;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n convertView = inflater.inflate(R.layout.fragment_homecircles, container, false);\n init();\n return convertView;\n }",
"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 }",
"public TableLayout loadUserList(ArrayList<User> row, String [] cv, int columnCount){\n TableLayout.LayoutParams tableLayoutParams = new TableLayout.LayoutParams();\n TableLayout tableLayout = new TableLayout(this);\n\n\n // 2) create tableRow params\n TableRow.LayoutParams tableRowParams = new TableRow.LayoutParams();\n tableRowParams.setMargins(5, 5, 5, 5);\n tableRowParams.weight = 1;\n\n int count = 1;\n\n for (int i = 0; i < rowCount; i++)\n {\n // 3) create tableRow\n TableRow tableRow = new TableRow(this);\n\n\n for (int j= 0; j <= columnCount; j++)\n {\n // 4) create textView\n TextView textView = new TextView(this);\n EditText editText = new EditText(this);\n editText.setBackgroundColor(Color.TRANSPARENT);\n editText.setGravity(Gravity.CENTER);\n editText.setEnabled(false);\n\n // textView.setText(String.valueOf(j));\n textView.setBackgroundColor(Color.WHITE);\n textView.setGravity(Gravity.CENTER);\n\n\n\n if (i ==0 && j==0)\n {\n textView.setText(\"No/Info\");\n tableRow.addView(textView, tableRowParams);\n }\n else if(i==0)\n {\n\n textView.setText(cv[j-1]);\n tableRow.addView(textView, tableRowParams);\n }\n else if( j==0)\n {\n\n textView.setText(Integer.toString(count));\n tableRow.addView(textView, tableRowParams);\n count = count +1;\n }\n else\n {\n // \"Tên người dùng\", \"Email\", \"Ngày sinh\",\"Giới tính\", \"Loại tài khoản\",\n ;\n switch (j){\n case 1:\n editText.setText(row.get(i).name);\n tableRow.addView(editText, tableRowParams);\n break;\n case 2:\n editText.setText(row.get(i).email);\n tableRow.addView(editText, tableRowParams);\n break;\n case 3:\n editText.setText(row.get(i).date);\n tableRow.addView(editText, tableRowParams);\n break;\n case 4:\n editText.setText(row.get(i).gender);\n tableRow.addView(editText, tableRowParams);\n break;\n case 5:\n editText.setText(row.get(i).role);\n tableRow.addView(editText, tableRowParams);\n break;\n\n case 6:\n Button btn=new Button(this);\n btn.setId(1);\n btn.setText(\"Ban\");\n btn.setLayoutParams(new TableLayout.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT,TableRow.LayoutParams.WRAP_CONTENT));\n tableRow.addView(btn, tableRowParams);\n break;\n case 7:\n Button btn2=new Button(this);\n btn2.setId(2);\n btn2.setText(\"Change\");\n btn2.setLayoutParams(new TableLayout.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT,TableRow.LayoutParams.WRAP_CONTENT));\n tableRow.addView(btn2, tableRowParams);\n break;\n default:\n break;\n\n }\n\n\n }\n\n }\n\n // 6) add tableRow to tableLayout\n tableLayout.addView(tableRow, tableLayoutParams);\n }\n\n return tableLayout;\n\n\n // --------------------------end of headers ----------------------\n\n }",
"@Override\n\tpublic int bindLayout() {\n\t\treturn R.layout.activity_init;\n\t}",
"public void onFinishInflate() {\n super.onFinishInflate();\n this.logo = findViewById(C1167R.C1170id.channel_logo);\n this.logoTitle = findViewById(C1167R.C1170id.logo_title);\n this.actionsHint = findViewById(C1167R.C1170id.actions_hint);\n this.sponsoredChannelBackground = findViewById(C1167R.C1170id.sponsored_channel_background);\n this.channelViewMainLinearLayout = findViewById(C1167R.C1170id.main_linear_layout);\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tif (mObjView == null) {\n\t\t\tmObjView = inflater.inflate(R.layout.jeep_airset, container, false);\n\t\t\tinit();\n\t\t}\n\n\t\treturn mObjView;\n\t}",
"@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)\n public void init(View v) {\n\n LinearLayout li1 = (LinearLayout) v.findViewById(R.id.table_main);\n\n TableRow tbrow0 = new TableRow(getActivity());\n tbrow0.setPadding(10, 15, 15, 15);\n\n TextView tv0 = new TextView(getActivity());\n tv0.setText(\" Sl.No \");\n tv0.setTextSize(20);\n tv0.setTextColor(Color.BLACK);\n tbrow0.addView(tv0);\n\n TextView tv1 = new TextView(getActivity());\n tv1.setText(\" Name \");\n tv1.setTextSize(20);\n tv1.setTextColor(Color.BLACK);\n tbrow0.addView(tv1);\n\n TextView tv2 = new TextView(getActivity());\n tv2.setText(\" Field \");\n tv2.setTextSize(20);\n tv2.setTextColor(Color.BLACK);\n tbrow0.addView(tv2);\n\n li1.addView(tbrow0);\n\n\n for (int i = 0; i < name.length; i++) {\n TableRow tbrow = new TableRow(getActivity());\n TextView t1v = new TextView(getActivity());\n\n ShapeDrawable shape = new ShapeDrawable(new RectShape());\n shape.getPaint().setColor(Color.RED);\n shape.getPaint().setStyle(Paint.Style.STROKE);\n shape.getPaint().setStrokeWidth(3);\n\n tbrow.setPadding(10, 15, 15, 15);\n // Assign the created border to EditText widget\n // tbrow.setBackground(shape);\n t1v.setText(\"\" + i);\n t1v.setTextColor(Color.BLACK);\n t1v.setGravity(Gravity.CENTER);\n\n tbrow.addView(t1v);\n TextView t2v = new TextView(getActivity());\n t2v.setText(name[i] + i);\n t2v.setTextColor(Color.BLACK);\n t2v.setGravity(Gravity.CENTER);\n tbrow.addView(t2v);\n\n TableRow.LayoutParams lparams = new TableRow.LayoutParams(400, ViewGroup.LayoutParams.WRAP_CONTENT);\n EditText edT_v = new EditText(getActivity());\n edT_v.setLayoutParams(lparams);\n edT_v.setBackground(shape);\n\n edT_v.setTextColor(Color.BLACK);\n edT_v.setGravity(Gravity.CENTER);\n\n\n tbrow.addView(edT_v);\n li1.addView(tbrow);\n }\n\n }",
"@Override\n public rViewHolder onCreateViewHolder(ViewGroup parent, int viewType)\n {\n View view = mInflater.inflate(R.layout.recycler_row, parent, false);\n return new rViewHolder(view);\n }",
"@NonNull\n @Override\n public HorizontalViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {\n View view= LayoutInflater.from(context).inflate(R.layout.row_data,null);\n return new HorizontalViewHolder(view);\n }",
"protected void onLoadLayout(View view) {\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n Purchase purchase = getItem(position);\n // Check if an existing view is being reused, otherwise inflate the view\n ViewHolder viewHolder; // view lookup cache stored in tag\n\n final View result;\n\n if (convertView == null) {\n\n viewHolder = new ViewHolder();\n LayoutInflater inflater = LayoutInflater.from(getContext());\n convertView = inflater.inflate(R.layout.history_purchase, parent, false);\n viewHolder.purchaseID = (TextView) convertView.findViewById(R.id.purchase_id);\n viewHolder.purchaseDate = (TextView) convertView.findViewById(R.id.purchase_date);\n viewHolder.totalPrice = (TextView) convertView.findViewById(R.id.purchase_price);\n viewHolder.paidPrice = (TextView) convertView.findViewById(R.id.purchase_paid_price);\n viewHolder.purchaseProducts = (LinearLayout) convertView.findViewById(R.id.purchase_prdsucts);\n viewHolder.item = (LinearLayout) convertView.findViewById(R.id.item);\n\n result=convertView;\n\n convertView.setTag(viewHolder);\n } else {\n viewHolder = (ViewHolder) convertView.getTag();\n result=convertView;\n }\n\n viewHolder.purchaseID.setText(purchase.getUuid().toString().substring(0, 6));\n viewHolder.purchaseDate.setText(purchase.getDateString());\n viewHolder.totalPrice.setText(String.format (\"%.2f\", purchase.getTotalPrice()) +\"€\");\n viewHolder.paidPrice.setText(String.format (\"%.2f\", purchase.getPaidPrice()) +\"€\");\n viewHolder.purchaseProducts.removeAllViews();\n\n for(int i = 0; i < purchase.getProducts().size(); i++){\n TextView textView = new TextView(this.mContext);\n textView.setText(purchase.getProducts().get(i).getName() + \" - \" + String.format (\"%.2f\", purchase.getProducts().get(i).getPrice())+\"€\");\n textView.setTextSize((float) 17);\n textView.setTextColor(Color.parseColor(\"#003845\"));\n Typeface font = Typeface.createFromAsset(mContext.getAssets(), \"raleway.ttf\");\n textView.setTypeface(font);\n\n LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n params.setMargins(0,0,0,10);\n textView.setLayoutParams(params);\n\n viewHolder.purchaseProducts.addView(textView);\n }\n\n //EXTRA FEATURE\n viewHolder.item.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n LinearLayout itemView = (LinearLayout) v;\n TextView objectID = (TextView) itemView.findViewById(R.id.purchase_id);\n\n Toast.makeText(mContext, \"ID: \" + objectID.getText(), Toast.LENGTH_SHORT).show();\n\n Preferences preferences = new Preferences(mContext);\n ArrayList<Purchase> history = new ArrayList<>();\n try {\n history = preferences.getPurchases();\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n ArrayList<Product> newProducts = new ArrayList<>();\n for(int i=0; i<history.size(); i++){\n String id = history.get(i).getUuid().toString().substring(0, 6);\n if(objectID.getText().equals(id)){\n newProducts = history.get(i).getProducts();\n break;\n }\n }\n\n try {\n ArrayList<Product> basketP = null;\n basketP = preferences.getBasket();\n\n if (basketP.size() + newProducts.size() <= 10) {\n for (int i = 0; i < newProducts.size(); i++) {\n basketP.add(newProducts.get(i));\n }\n\n preferences.saveBasket(basketP);\n Toast.makeText(mContext, \"Products added to your basket with success.\", Toast.LENGTH_SHORT).show();\n }\n else{\n Toast.makeText(mContext, \"You can only have 10 items in basket.\", Toast.LENGTH_SHORT).show();\n }\n\n } catch (JSONException e) {\n Toast.makeText(mContext, \"There was a problem adding products to basket, please try again.\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n return convertView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.activity_recetas, parent, false);\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 View view = inflater.inflate(R.layout.layout_number_full,container,false);\n itemView(view);\n return view;\n }",
"@Override\n\tpublic TiUIView createView(Activity activity)\n\t{\n\t\tif (placeholder) {\n\n\t\t\t// Placeholder for header or footer, do not create view.\n\t\t\treturn null;\n\t\t}\n\n\t\treturn new RowView(this);\n\t}",
"@Override\n public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n initRow1();\n setScrollRow2();\n if(typeSprint.equals(getString(R.string.mon1_col2_row1))){\n initRow2(getString(R.string.mon1_col2_row1)\n ,getString(R.string.mon1_col2_row2),getString(R.string.mon1_col2_row3),\n getString(R.string.mon1_col2_row4),\n getString(R.string.mon1_col2_row5),getString(R.string.mon1_col2_row6),\n getString(R.string.mon1_col2_row7),getString(R.string.mon1_col2_row8));\n } else if( typeSprint.equals(getString(R.string.mon1_col3_row1))){\n initRow2(getString(R.string.mon1_col3_row1)\n ,getString(R.string.mon1_col3_row2),getString(R.string.mon1_col3_row3),\n getString(R.string.mon1_col3_row4),\n getString(R.string.mon1_col3_row5),getString(R.string.mon1_col3_row6),\n getString(R.string.mon1_col3_row7),getString(R.string.mon1_col3_row8));\n } else if( typeSprint.equals(getString(R.string.mon1_col4_row1))){\n initRow2(getString(R.string.mon1_col4_row1)\n ,getString(R.string.mon1_col4_row2),getString(R.string.mon1_col4_row3),\n getString(R.string.mon1_col4_row4),\n getString(R.string.mon1_col4_row5),getString(R.string.mon1_col4_row6),\n getString(R.string.mon1_col4_row7),getString(R.string.mon1_col4_row8));\n }\n else if( typeSprint.equals(getString(R.string.mon1_col5_row1))){\n initRow2(getString(R.string.mon1_col5_row1)\n ,getString(R.string.mon1_col5_row2),getString(R.string.mon1_col5_row3),\n getString(R.string.mon1_col5_row4),\n getString(R.string.mon1_col5_row5),getString(R.string.mon1_col5_row6),\n getString(R.string.mon1_col5_row7),getString(R.string.mon1_col5_row8));\n } else if( typeSprint.equals(getString(R.string.tue1_col2_row1))){\n initRow2(getString(R.string.tue1_col2_row1)\n ,getString(R.string.tue1_col2_row2),getString(R.string.tue1_col2_row3),\n getString(R.string.tue1_col2_row4),\n getString(R.string.tue1_col2_row5),getString(R.string.tue1_col2_row6),\n getString(R.string.tue1_col2_row7),getString(R.string.tue1_col2_row8));\n } else if( typeSprint.equals(getString(R.string.mon2_col2_row1))){\n initRow2(getString(R.string.mon2_col2_row1)\n ,getString(R.string.mon2_col2_row2),getString(R.string.mon2_col2_row3),\n getString(R.string.mon2_col2_row4),\n getString(R.string.mon2_col2_row5),getString(R.string.mon2_col2_row6),\n getString(R.string.mon2_col2_row7),getString(R.string.mon2_col2_row8));\n } else if( typeSprint.equals(getString(R.string.thu2_col2_row1))){\n initRow2(getString(R.string.thu2_col2_row1)\n ,getString(R.string.thu2_col2_row2),getString(R.string.thu2_col2_row3),\n getString(R.string.thu2_col2_row4),\n getString(R.string.thu2_col2_row5),getString(R.string.thu2_col2_row6),\n getString(R.string.thu2_col2_row7),getString(R.string.thu2_col2_row8));\n }\n else if( typeSprint.equals(getString(R.string.fri2_col3_row1))){\n initRow2(getString(R.string.fri2_col3_row1)\n ,getString(R.string.fri2_col3_row2),getString(R.string.fri2_col3_row3),\n getString(R.string.fri2_col3_row4),\n getString(R.string.fri2_col3_row5),getString(R.string.fri2_col3_row6),\n getString(R.string.fri2_col3_row7),getString(R.string.fri2_col3_row8));\n }if( typeSprint.equals(getString(R.string.fri2_col2_row1))){\n initRow2(getString(R.string.fri2_col2_row1)\n ,getString(R.string.fri2_col2_row2),getString(R.string.fri2_col2_row3),\n getString(R.string.fri2_col2_row4),\n getString(R.string.fri2_col2_row5),getString(R.string.fri2_col2_row6),\n getString(R.string.fri2_col2_row7),getString(R.string.fri2_col2_row8));\n }\n\n\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 }",
"private View inflateSectionView(RecyclerView parent) {\n trace();\n return LayoutInflater.from(parent.getContext())\n .inflate(R.layout.app_list_section, parent, false);\n }",
"private void createAndAddViews() {\n \t\t// Create the layout parameters for each field\n \t\tfinal LinearLayout.LayoutParams labelParams = new LinearLayout.LayoutParams(\n \t\t\t\t0, LayoutParams.WRAP_CONTENT, 0.3f);\n \t\tlabelParams.gravity = Gravity.RIGHT;\n \t\tlabelParams.setMargins(0, 25, 0, 0);\n \t\tfinal LinearLayout.LayoutParams valueParams = new LinearLayout.LayoutParams(\n \t\t\t\t0, LayoutParams.WRAP_CONTENT, 0.7f);\n \t\tvalueParams.gravity = Gravity.LEFT;\n \t\tvalueParams.setMargins(0, 25, 0, 0);\n \n \t\t// Add a layout and text views for each property\n \t\tfor (final StockProperty property : m_propertyList) {\n \t\t\tLog.d(TAG, \"Adding row for property: \" + property.getPropertyName());\n \n \t\t\t// Create a horizontal layout for the label and value\n \t\t\tfinal LinearLayout layout = new LinearLayout(this);\n \t\t\tlayout.setLayoutParams(new LinearLayout.LayoutParams(\n \t\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));\n \n \t\t\t// Create a TextView for the label\n \t\t\tfinal TextView label = new TextView(this);\n \t\t\tlabel.setLayoutParams(labelParams);\n \t\t\tlabel.setText(property.getLabelText());\n \t\t\tlabel.setTextAppearance(this, android.R.style.TextAppearance_Medium);\n \t\t\tlayout.addView(label);\n \n \t\t\t// Configure and add the value TextView (created when the property\n \t\t\t// was constructed)\n \t\t\tfinal TextView value = property.getView();\n \t\t\tvalue.setLayoutParams(valueParams);\n \t\t\tvalue.setHint(\"None\");\n \t\t\tvalue.setTextAppearance(this, android.R.style.TextAppearance_Medium);\n \t\t\tvalue.setTypeface(null, Typeface.BOLD);\n \t\t\tlayout.addView(value);\n \n \t\t\t// Add the row to the main layout\n \t\t\tm_resultsLayout.addView(layout);\n \t\t}\n \t}",
"static public View inflateLayout(int Presid,View PlayoutView) //~1410I~\r\n { //~1410I~\r\n if (Dump.Y) Dump.println(\"AView:inflateLayout2 res=\"+Integer.toHexString(Presid)+\",view=\"+PlayoutView.toString());//~@@@@R~\r\n \tAG.setCurrentView(Presid,PlayoutView); //~1410I~\r\n return PlayoutView; //~1410I~\r\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\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}",
"@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 }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\t\n\t\tView arrangeOrderLayout = inflater.inflate(R.layout.arrange_order, container, false);\n\t\tinitButton(arrangeOrderLayout);\n\t\tinitListView(arrangeOrderLayout);\n\t\treturn arrangeOrderLayout;\n\t}",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tView layout3_item = inflater.inflate(R.layout.layout4_lvitem,null);\n\t\treturn layout3_item;\n\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent)\n {\n //position = position of array element\n //this function will pick the first value of array\n //we give it the theme of a single row\n //it implements that theme, makes a row graphic and returns back to OS\n //OS prints it on screen\n //we make an xml file\n //supply data to this function\n //and create the custom list\n //this code runs for every element in the array\n View row=null;\n LayoutInflater li = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n //OS uses this service to display graphic\n //We customise the theme and use that service to display our theme\n //only one function to get system services and modiffy it\n //we can either learn all the names of internal services\n //or you press ctrl plus space after context.\n row = li.inflate(R.layout.activity_custom_list,parent,false);\n ImageView iv = (ImageView)row.findViewById(R.id.imageView); //row - pehli line ka variable\n //xml se row bana\n\n TextView tv1 = (TextView)row.findViewById(R.id.textView1);\n TextView tv2 = (TextView)row.findViewById(R.id.textView2);\n tv1.setText(nameArray[position]);\n tv2.setText(infoArray[position]);\n\n if(position%2==0)\n iv.setImageResource(android.R.drawable.star_big_on);\n else\n iv.setImageResource(android.R.drawable.star_big_off);\n\n return row;\n\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.read_layout,container,false);\n mContext = view.getContext();\n if(readPresenter ==null)\n readPresenter = new ReadPresenter(getContext(),this);\n initUI(view);\n return view;\n\n }",
"public void addRow(String itemName, String itemPrice, String username) {\n LinearLayout parentLayout = findViewById(R.id.itemList);\n\n // Create layout for new item\n LinearLayout l = new LinearLayout(this);\n l.setOrientation(LinearLayout.HORIZONTAL);\n LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 100);\n layoutParams.bottomMargin = 10;\n l.setBackgroundResource(R.drawable.customborder);\n l.setLayoutParams(layoutParams);\n\n // Create item_name textview\n TextView name_textview = new TextView(this);\n name_textview.setText(itemName);\n name_textview.setTextSize(24);\n LinearLayout.LayoutParams nameParams = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT);\n nameParams.weight = 1;\n name_textview.setLayoutParams(nameParams);\n\n // Create price textview\n TextView price_textview = new TextView(this);\n price_textview.setText(\"$\"+itemPrice);\n price_textview.setTextSize(24);\n LinearLayout.LayoutParams priceParams = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT);\n priceParams.weight = 1;\n price_textview.setLayoutParams(priceParams);\n\n // Create username textview\n TextView username_textview = new TextView(this);\n username_textview.setText(username);\n username_textview.setTextSize(24);\n LinearLayout.LayoutParams usernameParams = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT);\n usernameParams.weight = 1;\n username_textview.setLayoutParams(usernameParams);\n\n // Add views to layout\n l.addView(name_textview);\n l.addView(price_textview);\n l.addView(username_textview);\n parentLayout.addView(l);\n\n }",
"@Override\n public listAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n // create a new view\n LayoutInflater inflater = LayoutInflater.from(parent.getContext());\n View v = inflater.inflate(R.layout.row_layout, parent, false);\n // set the view's size, margins, paddings and layout parameters\n ViewHolder vh = new ViewHolder(v);\n return vh;\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 }",
"private void initViews() {\n user_name = (LinearLayout)findViewById(R.id.user_name);\n user_photo = (LinearLayout)findViewById(R.id.user_photo);\n user_sex = (LinearLayout)findViewById(R.id.user_sex);\n user_notes = (LinearLayout)findViewById(R.id.user_notes);\n name = (TextView)findViewById(R.id.name);\n sex = (TextView)findViewById(R.id.sex);\n notes = (TextView)findViewById(R.id.notes);\n email = (TextView)findViewById(R.id.email);\n photo = (ImageView)findViewById(R.id.photo);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_four_in_row, container, false);\n board = new Board(numberOfRows, numberOfColumns);\n viewHolder = new ViewHolder();\n initUi(view);\n buildCells();\n boardView.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n switch (motionEvent.getAction()) {\n case MotionEvent.ACTION_POINTER_UP:\n case MotionEvent.ACTION_UP: {\n int col = colAtX(motionEvent.getX());\n if (col != -1)\n drop(col);\n }\n }\n return true;\n }\n });\n\n viewHolder.redPlayerWinTextView.setText(\"0\");\n viewHolder.yellowPlayerWinTextView.setText(\"0\");\n viewHolder.turnIndicatorImageView.setImageResource(resourceForTurn());\n\n viewHolder.resetButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if (snackbar != null){\n snackbar.dismiss();\n }\n reset();\n }\n });\n return view;\n }",
"public void setSoundBoardLayout() {\n\n soundBoardList = new SoundBoardListType();\n soundBoardList = db.getAllSoundboards();\n soundBoardNames = new ArrayList();\n\n for (int i = 0; i < soundBoardList.getSoundBoardList().size(); i++) {\n soundBoardNames.add(soundBoardList.getSoundBoardList().get(i).getSoundBoardName());\n }\n\n soundBoardNames.add(\"+\");\n setContentView(R.layout.main_grid);\n GridView gridView = (GridView) findViewById(R.id.soundboardgrid);\n\n soundBoardListAdapter = new ArrayAdapter<String>(this, R.layout.main_sbrowtext, soundBoardNames);\n gridView.setAdapter(soundBoardListAdapter);\n gridView.setOnItemClickListener(openSoundBoardListener);\n gridView.setOnItemLongClickListener(editSoundBoardListener);\n gridView.setBackgroundColor(Color.BLACK);\n gridView.setStretchMode(GridView.STRETCH_COLUMN_WIDTH);\n gridView.getSelector().setAlpha(100);\n\n }",
"private void initLayouts() {\n mRelativeLayout1WA = findViewById(R.id.history_layout_one_week_ago);\n mRelativeLayout6DA = findViewById(R.id.history_layout_six_days_ago);\n mRelativeLayout5DA = findViewById(R.id.history_layout_five_days_ago);\n mRelativeLayout4DA = findViewById(R.id.history_layout_four_days_ago);\n mRelativeLayout3DA = findViewById(R.id.history_layout_three_days_ago);\n mRelativeLayout2DA = findViewById(R.id.history_layout_two_days_ago);\n mRelativeLayoutY = findViewById(R.id.history_layout_yesterday);\n\n layoutsList.add(mRelativeLayoutY);\n layoutsList.add(mRelativeLayout2DA);\n layoutsList.add(mRelativeLayout3DA);\n layoutsList.add(mRelativeLayout4DA);\n layoutsList.add(mRelativeLayout5DA);\n layoutsList.add(mRelativeLayout6DA);\n layoutsList.add(mRelativeLayout1WA);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.day_layout, container,false);\n setPieMap(v);\n loadDatas();\n simulator();\n return v;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tv = inflater.inflate(R.layout.wisata, container, false);\r\n \r\n\t\t\r\n\t\t\r\n\t\treturn v;\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.item_error, container, false);\n ImageButton b = (ImageButton) v.findViewById(R.id.button_reload_feed);\n\n if (mParent != null) {\n b.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n mParent.launchParser();\n }\n });\n }\n\n return v;\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}",
"@Override\n protected void loadViewLayout() {\n setContentView(R.layout.ui_imgs_graffit);\n }",
"@Override\n\tprotected void loadXml() {\n\t\tsetContentView(R.layout.activity_my_message);\n\t}",
"@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n return LayoutInflater.from(context).inflate(R.layout.todo_row, parent, false);\n }",
"@Override\n protected void onLayout(boolean changed, int l, int t, int r, int b) {\n Log.v(TAG, \"onLayout l = \" + l + \"; t = \" + t + \"; r = \" + r + \"; b = \" + b);\n int count = getChildCount();\n int x = l;\n int y = t;\n for(int i = 0; i < count; i++){\n View child = (View)getChildAt(i);\n child.layout(x, y, x + r, y + b);\n x = x + r;\n }\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.activity_click_product_layout, container, false);\n\n ivList=view.findViewById(R.id.iv_list);\n txtProductDescription=view.findViewById(R.id.txt_productDescription);\n txtShowOfeerPrice=view.findViewById(R.id.txt_showOfferPrice);\n txtShowPrice=view.findViewById(R.id.txt_showPrice);\n txtTitleName=view.findViewById(R.id.tv_list_name);\n edtEnterPinCode=view.findViewById(R.id.edt_enterPinCode);\n\n return view;\n }"
] | [
"0.64567065",
"0.62573504",
"0.62216866",
"0.6109305",
"0.6047628",
"0.60140324",
"0.5988293",
"0.59790826",
"0.59150535",
"0.58774203",
"0.5854075",
"0.58520705",
"0.58051527",
"0.5749758",
"0.5724523",
"0.5630355",
"0.562193",
"0.56048095",
"0.557708",
"0.5576931",
"0.5552332",
"0.5546868",
"0.5540314",
"0.55270356",
"0.55213296",
"0.5520964",
"0.5493831",
"0.5440582",
"0.54244244",
"0.54142183",
"0.541201",
"0.541179",
"0.5405723",
"0.54050905",
"0.53965497",
"0.5389432",
"0.537406",
"0.5363235",
"0.5343431",
"0.5333899",
"0.53269863",
"0.53145915",
"0.5301664",
"0.529729",
"0.52970386",
"0.5295058",
"0.5294452",
"0.5269563",
"0.5263638",
"0.5252092",
"0.52316195",
"0.5226532",
"0.5211693",
"0.5204267",
"0.52031136",
"0.5202645",
"0.51913756",
"0.5189554",
"0.51892537",
"0.5188619",
"0.5181178",
"0.51696885",
"0.51695216",
"0.516501",
"0.5163399",
"0.51613647",
"0.5159253",
"0.5147188",
"0.51429623",
"0.5141872",
"0.5127163",
"0.5124082",
"0.51228166",
"0.5122652",
"0.51226056",
"0.51182115",
"0.51121396",
"0.5106205",
"0.51008856",
"0.5090445",
"0.50895774",
"0.50871176",
"0.5086909",
"0.50835526",
"0.5080966",
"0.5080248",
"0.5077487",
"0.5074867",
"0.5071162",
"0.5066812",
"0.5064441",
"0.5058881",
"0.505762",
"0.5055871",
"0.50535095",
"0.5052449",
"0.50504565",
"0.50448895",
"0.50443244",
"0.5042695",
"0.50385666"
] | 0.0 | -1 |
binds the data to the TextView in each row | @Override
public void onBindViewHolder(ViewHolder holder, int position) {
String name, message, profilePicString;
Long timestamp;
name = mData.get(position).name;
message = mData.get(position).message;
timestamp = mData.get(position).timestamp;
profilePicString = mData.get(position).profile_pic;
if (!profilePicString.isEmpty()) {
holder.profilePicImageView.setImageBitmap(Base64UtilityClass.toBitmap(profilePicString));
}
holder.nameTextView.setText(name);
holder.messageTextView.setText(message);
holder.timestampTextView.setText(new SimpleDateFormat(DATE_FORMAT).format(new Date(timestamp)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void populateTextViews() {\n full_name_tv.setText(contact.getFullName());\n school_tv.setText(contact.getSchool());\n department_tv.setText(getDepartmentString());\n email.setText(contact.getEmail());\n number_tv.setText(contact.getNumber());\n }",
"@Override\r\n\t\tpublic void bindView(View v, Context arg1, Cursor arg2) {\n\t\t\t String tv1 = arg2.getString(2);\r\n\t\t\t String tv3 = CommonCode.change_Date_Format(arg2.getString(3), \"yyyy-MM-dd HH:mm:ss\", \"MM-dd-yyyy HH:mm:ss\");\r\n\t\t\t String tv4 = arg2.getString(4);\r\n\t\t\t String tv2 = arg2.getString(1);\r\n\t\t\t String tv6 = arg2.getString(7);\r\n\t\t\t String tv5 = arg2.getString(6);\r\n\t\t\t String tv8 = arg2.getString(8);//randomnumber\r\n\t\t\t String tv7 = arg2.getString(5);\r\n\t\t\t \r\n\t\t\t final TextView text1 = (TextView) v.findViewById(R.id.textView1);\r\n\t\t\t final TextView text2 = (TextView) v.findViewById(R.id.textView2);\r\n\t\t\t final TextView text3 = (TextView) v.findViewById(R.id.textView3);\r\n\t\t\t final TextView text4 = (TextView) v.findViewById(R.id.textView4);\r\n\t\t\t final TextView text5 = (TextView) v.findViewById(R.id.textView5);\r\n\t\t\t final TextView text6 = (TextView) v.findViewById(R.id.textView6);\r\n\t\t\t final TextView text7 = (TextView) v.findViewById(R.id.textView7); \r\n\t\t\t final TextView text8 = (TextView) v.findViewById(R.id.textView8);\r\n\t\t\t \r\n\t\t\t\ttext1.setText(tv1);\r\n\t\t\t\ttext2.setText(tv2);\r\n\t\t\t\ttext3.setText(tv3);\r\n\t\t\t\ttext4.setText(tv4);\r\n\t\t\t\ttext5.setText(tv5);\r\n\t\t\t\ttext6.setText(tv6);\r\n\t\t\t\ttext7.setText(\"\");\r\n\t\t\t\ttext8.setText(\"\");\r\n\t\t}",
"public void addData(){\n Typeface mtypeFace = Typeface.createFromAsset(getAssets(),\n \"fonts/Lato-Regular.ttf\");\n if (dummy != 0) {\n dummy--;\n }\n int value = dummy;\n for (int i = value; i < repdataresponselist.size()&&i<(dummy+20); i++)\n\n {\nvalue++;\n /** Create a TableRow dynamically **/\n\n tr = new TableRow(this);\n /*if (i % 2 == 0) {*/\n/*\n } else {\n tr.setBackgroundResource(R.color.grey);\n\n }*/\n ReportsDataResponse reportdataobj=repdataresponselist.get(i);\n ArrayList<String> responsestrarr=new ArrayList<>();\n responsestrarr.add(reportdataobj.getBkRefid());\n\n responsestrarr.add(reportdataobj.getStatus());\n responsestrarr.add(reportdataobj.getSource());\n\n responsestrarr.add(reportdataobj.getBookingtype());\n\n responsestrarr.add(reportdataobj.getBookingdate());\n responsestrarr.add(reportdataobj.getPNR());\n responsestrarr.add(reportdataobj.getName());\n responsestrarr.add(reportdataobj.getAirline());\n responsestrarr.add(reportdataobj.getFrom());\n responsestrarr.add(reportdataobj.getTo());\n responsestrarr.add(reportdataobj.getClasstype());\n responsestrarr.add(reportdataobj.getTriptype());\n responsestrarr.add(reportdataobj.getTotalpax());\n responsestrarr.add(reportdataobj.getTotalfare());\n\n for (int j = 0; j < 14; j++) {\n\ntry {\n\n tr.setLayoutParams(new LayoutParams(\n\n LayoutParams.FILL_PARENT,\n\n LayoutParams.WRAP_CONTENT));\n\n /** Creating a TextView to add to the row **/\n companyTV = new TextView(this);\n\n\n\n\n companyTV.setText(responsestrarr.get(j));\n\n companyTV.setTextColor(Color.parseColor(\"#000000\"));\n\n companyTV.setTypeface(mtypeFace);\n\n companyTV.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));\n\n if(j==1)\n {\n\n switch(responsestrarr.get(j)) {\n case \"Confirmed\":\n companyTV.setBackgroundColor(Color.parseColor(\"#fdba52\"));\n\n break;\n case \"Ticketed\":\n companyTV.setBackgroundColor(Color.parseColor(\"#b9eeb9\"));\n\n break;\n case \"Cancelled\":\n companyTV.setBackgroundColor(Color.parseColor(\"#f6bcbc\"));\n\n break;\n case \"Booking Started\":\n companyTV.setBackgroundColor(Color.parseColor(\"#e6c295\"));\n\n break;\n\n }\n }\n\n\n switch (j)\n {\n case 2:\n companyTV.setPadding(40, 30, 5, 30);\n break;\n case 3:\n companyTV.setPadding(50, 30, 5, 30);\n break;\n case 7:\n companyTV.setPadding(40, 30, 5, 30);\n break;\n case 8:\n companyTV.setPadding(25, 30, 5, 30);\n break;\n case 12:\n companyTV.setPadding(70, 30, 5, 30);\n break;\n case 13:\n companyTV.setPadding(40, 30, 5, 30);\n break;\n\n /* case 11:\n companyTV.setPadding(40, 30, 5, 30);\n break;\n case 12:\n companyTV.setPadding(40, 30, 5, 30);\n break;*/\n default:\n companyTV.setPadding(20, 30, 5, 30);\n\n break;\n\n\n\n\n\n\n\n }\n\n\n tr.addView(companyTV); // Adding textView to tablerow.\n\n tl.addView(tr, new TableLayout.LayoutParams(\n\n LayoutParams.FILL_PARENT,\n\n LayoutParams.WRAP_CONTENT));\n}\ncatch (Exception e)\n{\n e.printStackTrace();\n}\n\n\n }\n\n }\n dummy=value;\ntabledata=getHtmlData();\n\n }",
"private void addData(){\n\n for (Recipe obj : frecipes)\n {\n /** Create a TableRow dynamically **/\n tr = new TableRow(this);\n tr.setLayoutParams(new TableRow.LayoutParams(\n TableRow.LayoutParams.MATCH_PARENT,\n TableRow.LayoutParams.WRAP_CONTENT));\n\n /** Creating a TextView to add to the row **/\n name = new TextView(this);\n name.setText(obj.getName());\n name.setWidth(320);\n name.setTypeface(Typeface.DEFAULT, Typeface.NORMAL);\n name.setPadding(5, 5, 5, 5);\n tr.addView(name); // Adding textView to tablerow.\n\n // Add the TableRow to the TableLayout\n tl.addView(tr, new TableLayout.LayoutParams(\n TableRow.LayoutParams.MATCH_PARENT,\n TableRow.LayoutParams.WRAP_CONTENT));\n }\n }",
"public void populateTerms(){\n\n //clear existing view\n table.removeAllViews();\n\n //get existing Terms from Database\n ArrayList<List> allTerms = getTerms();\n\n //fill TableLayout with existing Terms\n for (List<String> list : allTerms){\n\n TableRow row = new TableRow(TermsActivity.this);\n TextView idCol = new TextView(TermsActivity.this);\n TextView nameCol = new TextView(TermsActivity.this);\n TextView startCol = new TextView(TermsActivity.this);\n TextView spaceCol = new TextView(TermsActivity.this);\n TextView endCol = new TextView(TermsActivity.this);\n Button detailBtn = new Button(TermsActivity.this);\n\n //convert dates\n long start = Long.valueOf(list.get(2));\n long end = Long.valueOf(list.get(3));\n\n idCol.setText(list.get(0));\n idCol.setMinWidth(120);\n final String idNum = idCol.getText().toString();\n nameCol.setText(list.get(1));\n nameCol.setMinWidth(250);\n startCol.setText(new SimpleDateFormat(\"MM/dd/yyyy\", Locale.US).format(new Date(start)));\n startCol.setMinWidth(250);\n spaceCol.setMinWidth(45);\n endCol.setText(new SimpleDateFormat(\"MM/dd/yyyy\", Locale.US).format(new Date(end)));\n endCol.setMinWidth(250);\n\n detailBtn.setText(\"Details\");\n detailBtn.setPadding(15,0, 0, 0);\n detailBtn.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v){\n\n //put term data into Shared Preferences to send to next activity\n editor.putString(\"term\", idNum);\n editor.commit();\n\n //switch to Details activity\n Intent intent = new Intent(v.getContext(), TermDetailsActivity.class);\n v.getContext().startActivity(intent);\n }\n });\n\n row.addView(idCol);\n row.addView(nameCol);\n row.addView(startCol);\n row.addView(spaceCol);\n row.addView(endCol);\n row.addView(detailBtn);\n table.addView(row);\n }\n }",
"private void displayDetails(){\n Intent intent=getIntent();\n message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);\n\n // The ArrayList that holds the row data\n ArrayList<Object> row;\n // ask the database manager to retrieve the row with the given rowID\n row = dbHelper.getRowAsArray(message);\n Log.w(\"rows\", row.toString());\n try{\n // update the form fields to hold the retrieved data\n String sn = (String)row.get(0);\n String fn = (String)row.get(1);\n String cn = (String)row.get(2);\n String em= (String)row.get(3);\n String ad = (String)row.get(4);\n\n SnameTextView.setText(sn);\n FnameTextView.setText(fn);\n cellnumbTextView.setText(cn);\n emailsTextView.setText(em);\n homeATextView.setText(ad);\n }catch (Exception e){\n Log.e(\"Retrieve Error\", e.toString());\n e.printStackTrace();\n }\n\n\n Cursor cursor = dbHelper.fetchCountriesByName(message);\n\n // The desired columns to be bound\n String[] columns = new String[] {\n ContactsDbAdapter.KEY_SURNAME,\n ContactsDbAdapter.KEY_NAME,\n ContactsDbAdapter.KEY_CELLNUM,\n ContactsDbAdapter.KEY_EMAILADDR,\n ContactsDbAdapter.KEY_HOMEADDR\n };\n\n // the XML defined views which the data will be bound to\n int[] to = new int[] {\n R.id.FNdetails_text_view,\n R.id.LNdetails_text_view,\n R.id.cellDetails_text_view,\n R.id.EmailDetails_text_view,\n R.id.homedetails_text_view,\n };\n\n // create the adapter using the cursor pointing to the desired data\n //as well as the layout information\n dataAdapter = new SimpleCursorAdapter(\n this, R.layout.activity_details,\n cursor,\n columns,\n to,\n 0);\n\n\n\n\n }",
"private void fillData() {\n\t\tmCursor = dbHelper.getResultsByTime();\n\t\tstartManagingCursor(mCursor);\n\n\t\tdataListAdapter = new SimpleCursorAdapter(this, R.layout.row, mCursor,\n\t\t\t\tFROM, TO);\n\t\tmConversationView.setAdapter(dataListAdapter);\n\t}",
"@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\t\t\tLayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t\tView view = inflater.inflate(R.layout.list_item_table_row_read, parent, false);\n\t\t\tSet<Entry<String, JsonElement>> set = mTableRows[position].getAsJsonObject().entrySet();\n\t\t\tLinearLayout layoutItem = (LinearLayout) view.findViewById(R.id.layoutItem);\n\t\t\t//Loop through each data item in the row and create a layout with the key and \n\t\t\t//value displayed in TextViews within it\n\t\t\tfor (Entry<String, JsonElement> entry : set) {\n\t\t\t\tLog.i(TAG, entry.getKey());\t\t\t\t\n\t\t\t\tRelativeLayout rowLayout = new RelativeLayout(mContext);\n\t\t\t\tRelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);\t\t\t\t\n\t\t\t\trowLayout.setLayoutParams(params);\t\t\t\t\n\t\t\t\tTextView lblKey = new TextView(mContext);\n\t\t\t\tlblKey.setText(entry.getKey());\t\t\t\t\n\t\t\t\tRelativeLayout.LayoutParams keyParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\t\tkeyParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT);\n\t\t\t\tkeyParams.leftMargin = 20;\n\t\t\t\tlblKey.setLayoutParams(keyParams);\t\t\t\t\n\t\t\t\tTextView lblValue = new TextView(mContext);\t\t\t\t\n\t\t\t\tRelativeLayout.LayoutParams valueParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\t\tvalueParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);\n\t\t\t\tlblValue.setLayoutParams(valueParams);\n\t\t\t\t//Limit the amount of text we show so the UI isn't dirty\n\t\t\t\tInputFilter[] FilterArray = new InputFilter[1];\n\t\t\t\tFilterArray[0] = new InputFilter.LengthFilter(25);\n\t\t\t\tlblValue.setFilters(FilterArray);\n\t\t\t\tlblValue.setText(entry.getValue().getAsString());\n\t\t\t\tlblValue.setGravity(Gravity.RIGHT);\n\t\t\t\trowLayout.addView(lblKey);\n\t\t\t\trowLayout.addView(lblValue);\n\t\t\t\tlayoutItem.addView(rowLayout);\n\t\t\t}\t\t\t\n\t\t\treturn view;\n\t\t}",
"private void populateResultsUI(){\n\n totalPayTextView.setText(Double.toString(totalPay));\n totalTipTextView.setText(Double.toString(totalTip));\n totalPerPersonTextView.setText(Double.toString(totalPerPerson));\n }",
"public void populateListView() {\n Cursor scores = myDb.getAllData();\n\n String[] columns = new String[]{\n myDb.COL_2,\n myDb.COL_3,\n myDb.COL_4,\n myDb.COL_5\n };\n\n int[] boundTo = new int[]{\n R.id.topScore,\n R.id.topCount,\n R.id.bottomScore,\n R.id.bottomCount\n };\n\n simpleCursorAdapter = new SimpleCursorAdapter(this,\n R.layout.history_list,\n scores,\n columns,\n boundTo,\n 0);\n scoreHistory.setAdapter(simpleCursorAdapter);\n\n// topScore.setTypeface(numberFont);\n// topCount.setTypeface(numberFont);\n// bottomScore.setTypeface(numberFont);\n// bottomCount.setTypeface(numberFont);\n\n\n }",
"public void fillTextView(){\n\n data += \"Distance: \" + Math.round(distanceValue * 1000) / 1000.0 + \"\\n\";\n data += \"minSpeed: \" + minSpeed +\"\\n\";\n data += \"maxSpeed: \" + maxSpeed +\"\\n\";\n data += \"Avg Speed: \"+ Math.round(averageSpeed * 1000) / 1000.0 +\"\\n\";\n data += \"minAltitude: \"+minAlt +\"\\n\";\n data += \"maxAltitude: \"+maxAlt+\"\\n\";\n data += \"Avg Alt: \"+Math.round(averageAlt * 1000) / 1000.0 +\"\\n\";\n\n textView.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);\n textView.setText(data);\n\n }",
"private void bindGridView(View root) {\n ListView listView = (ListView) root.findViewById(R.id.DBList);\n\n readDBrow();\n final Long[] elements = rowsMap.keySet().toArray(new Long[]{});\n\n Log.d(Utils.getTag(this), \"keyset has \" + elements.length + \" elements\");\n ArrayAdapter adapter = new ArrayAdapter<Long>(savingActivity, R.layout.my_two_line_listitem, elements) {\n @NonNull\n @Override\n public View getView(int position, View convertView, @NonNull ViewGroup parent) {\n\n if (convertView == null)\n convertView = LayoutInflater.from(getContext()).inflate(R.layout.my_two_line_listitem, parent, false);\n\n TextView tvTitle = (TextView) convertView.findViewById(android.R.id.text1);\n if (tvTitle != null) tvTitle.setText(rowsMap.get(getItem(position))[0]);\n\n TextView tvSubTitle = (TextView) convertView.findViewById(android.R.id.text2);\n if (tvSubTitle != null) tvSubTitle.setText(rowsMap.get(getItem(position))[1]);\n\n return convertView;\n }\n };\n\n listView.setAdapter(adapter);\n adapter.notifyDataSetChanged();\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n public void onItemClick(AdapterView<?> parent, View v, int position, long id) {\n showRowOptions((Long) parent.getAdapter().getItem(position));\n }\n });\n }",
"@Override\n\t public void bindView(View view, Context context, Cursor cursor) {\n\t //final String text = convertToString(cursor);\n\t //((TextView) view).setText(text);\n\t final int itemColumnIndex = cursor.getColumnIndexOrThrow(ItemsDbAdapter.COL_WORD);\n\t TextView text1 = (TextView) view.findViewById(R.id.text1);\n\t text1.setText(cursor.getString(itemColumnIndex));\n\t }",
"private void initData(View view) {\n /*\n * the array of item which need to show in gridview\n * it contains string and a picture\n * */\n ArrayList<HashMap<String, Object>> mList = new ArrayList<HashMap<String, Object>>();\n\n\n /**\n * download info from local database\n * */\n ContentResolver contentResolver = mContext.getContentResolver();\n Uri uri = Uri.parse(\"content://com.example.root.libapp_v1.SQLiteModule.Bookpage.BookpageProvider/bookpage\");\n Cursor cursor = contentResolver.query(uri, null, null, null, null);\n if (cursor != null) {\n while (cursor.moveToNext()) {\n HashMap<String, Object> map = new HashMap<String, Object>();\n String bookname = cursor.getString(cursor.getColumnIndex(\"name\"));\n map.put(\"image\", mImgUrl+\"bookimg_\"+bookname+\".png\");\n map.put(\"text\", bookname);\n mList.add(map);\n }\n /**\n * use the new data to show in gridview\n * */\n initGridView(view, mList);\n }\n cursor.close();\n }",
"private void setInfo(int row)\n {\n String ID=table.getModel().getValueAt(row, 0).toString();\n String Name=table.getModel().getValueAt(row, 1).toString(); \n idText.setText(ID);\n nameText.setText(Name);\n }",
"@Override\n public void bindView(View view, Context context, Cursor data) {\n TextView svcIdTextView = view.findViewById(R.id.text_iteminvoices_svcid);\n TextView medicalServicesTextView = view.findViewById(R.id.text_iteminvoices_medicalservices);\n TextView medicationTextView = view.findViewById(R.id.text_iteminvoices_mediction);\n TextView costTextView = view.findViewById(R.id.text_iteminvoices_cost);\n\n int svcIdColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_SVC_ID);\n int medicalServicesColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_MEDICAL_SERVICES);\n int medicationColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_MEDICATION);\n int costColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_COST);\n\n String svcId = data.getString(svcIdColumnIndex);\n String medicalServices = data.getString(medicalServicesColumnIndex);\n String medication = data.getString(medicationColumnIndex);\n String cost = data.getString(costColumnIndex);\n\n svcIdTextView.setText(svcId);\n medicalServicesTextView.setText(medicalServices);\n medicationTextView.setText(medication);\n costTextView.setText(cost);\n\n/*\n\n int dateOfSvcColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_DATE_OF_SVC);\n int invoiceColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_INVOICE_DATE);\n int dateDueColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_DATE_DUE);\n int billToNameColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_BILL_TO_NAME);\n int billToAddressColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_BILL_TO_ADDRESS);\n int billToPhoneColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_BILL_TO_PHONE);\n int billToFaxColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_BILL_TO_FAX);\n int billToEmailColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_BILL_TO_EMAIL);\n\n int supTotalColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_SUBTOTAL);\n int taxRateColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_TAX_RATE);\n int totalTaxColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_TOTAL_TAX);\n int otherColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_OTHER);\n int totalColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_TOTAL);\n int questionsNameColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_QUESTIONS_NAME);\n int questionsEmailColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_QUESTIONS_EMAIL);\n int questionsPhoneColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_QUESTIONS_PHONE);\n int questionsWebColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_QUESTIONS_WEB);\n int procedureColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_PROCEDURE);\n int patientIdColumnIndex = data.getColumnIndex(ImsContract.InvoicesEntry.COLUMN_PATIENT_ID);\n\n\n String dateOfSvc = data.getString(dateOfSvcColumnIndex);\n String invoice = data.getString(invoiceColumnIndex);\n String dateDue = data.getString(dateDueColumnIndex);\n String billToName = data.getString(billToNameColumnIndex);\n String billToAddress = data.getString(billToAddressColumnIndex);\n String billToPhone = data.getString(billToPhoneColumnIndex);\n String billToFax = data.getString(billToFaxColumnIndex);\n String billToEmail = data.getString(billToEmailColumnIndex);\n String svcId = data.getString(svcIdColumnIndex);\n String medicalServices = data.getString(medicalServicesColumnIndex);\n String medication = data.getString(medicationColumnIndex);\n String cost = data.getString(costColumnIndex);\n String supTotal = data.getString(supTotalColumnIndex);\n String taxRate = data.getString(taxRateColumnIndex);\n String totalTax = data.getString(totalTaxColumnIndex);\n String other = data.getString(otherColumnIndex);\n String total = data.getString(totalColumnIndex);\n String questionsName = data.getString(questionsNameColumnIndex);\n String questionsEmail = data.getString(questionsEmailColumnIndex);\n String questionsPhone = data.getString(questionsPhoneColumnIndex);\n String questionsWeb = data.getString(questionsWebColumnIndex);\n String procedure = data.getString(procedureColumnIndex);\n String patientId = data.getString(patientIdColumnIndex);\n\n\n dateOfSvcTextView.setText(dateOfSvc);\n invoiceDateTextView.setText(invoice);\n dateDueTextView.setText(dateDue);\n\n billFixEditText.setText(billToFax);\n billNameEditText.setText(billToName);\n billAddressEditText.setText(billToAddress);\n billEmailEditText.setText(billToEmail);\n billPhoneEditText.setText(billToPhone);\n\n svcIdEditText.setText(svcId);\n medicalServicesEditText.setText(medicalServices);\n medicationEditText.setText(medication);\n costEditText.setText(cost);\n subtotalEditText.setText(supTotal);\n taxRateEditText.setText(taxRate);\n totalTaxEditText.setText(totalTax);\n otherEditText.setText(other);\n totalEditText.setText(total);\n\n questionsNameEditText.setText(questionsName);\n questionsPhoneEditText.setText(questionsPhone);\n questionEmailEditText.setText(questionsEmail);\n questionsWebEditText.setText(questionsWeb);\n procedureEditText.setText(procedure);\n*/\n }",
"private void setUpTextViews() {\n // Find views\n TextView userName0 = (TextView) findViewById(R.id.user_name_0);\n TextView userInfo0 = (TextView) findViewById(R.id.user_info_0);\n TextView userName1 = (TextView) findViewById(R.id.user_name_1);\n TextView userInfo1 = (TextView) findViewById(R.id.user_info_1);\n TextView userName2 = (TextView) findViewById(R.id.user_name_2);\n TextView userInfo2 = (TextView) findViewById(R.id.user_info_2);\n\n // Set text\n userName0.setText(mGroupMembers.get(0).getString(ParseConstants.KEY_FIRST_NAME));\n userInfo0.setText(mGroupMembers.get(0).getString(ParseConstants.KEY_AGE) +\n \" : : \" +\n (mGroupMembers.get(0).getString(ParseConstants.KEY_HOMETOWN)));\n\n userName1.setText(mGroupMembers.get(1).getString(ParseConstants.KEY_FIRST_NAME));\n userInfo1.setText(mGroupMembers.get(1).getString(ParseConstants.KEY_AGE) +\n \" : : \" +\n (mGroupMembers.get(1).getString(ParseConstants.KEY_HOMETOWN)));\n\n userName2.setText(mGroupMembers.get(2).getString(ParseConstants.KEY_FIRST_NAME));\n userInfo2.setText(mGroupMembers.get(2).getString(ParseConstants.KEY_AGE) +\n \" : : \" +\n (mGroupMembers.get(2).getString(ParseConstants.KEY_HOMETOWN)));\n }",
"public TableLayout loadUserList(ArrayList<User> row, String [] cv, int columnCount){\n TableLayout.LayoutParams tableLayoutParams = new TableLayout.LayoutParams();\n TableLayout tableLayout = new TableLayout(this);\n\n\n // 2) create tableRow params\n TableRow.LayoutParams tableRowParams = new TableRow.LayoutParams();\n tableRowParams.setMargins(5, 5, 5, 5);\n tableRowParams.weight = 1;\n\n int count = 1;\n\n for (int i = 0; i < rowCount; i++)\n {\n // 3) create tableRow\n TableRow tableRow = new TableRow(this);\n\n\n for (int j= 0; j <= columnCount; j++)\n {\n // 4) create textView\n TextView textView = new TextView(this);\n EditText editText = new EditText(this);\n editText.setBackgroundColor(Color.TRANSPARENT);\n editText.setGravity(Gravity.CENTER);\n editText.setEnabled(false);\n\n // textView.setText(String.valueOf(j));\n textView.setBackgroundColor(Color.WHITE);\n textView.setGravity(Gravity.CENTER);\n\n\n\n if (i ==0 && j==0)\n {\n textView.setText(\"No/Info\");\n tableRow.addView(textView, tableRowParams);\n }\n else if(i==0)\n {\n\n textView.setText(cv[j-1]);\n tableRow.addView(textView, tableRowParams);\n }\n else if( j==0)\n {\n\n textView.setText(Integer.toString(count));\n tableRow.addView(textView, tableRowParams);\n count = count +1;\n }\n else\n {\n // \"Tên người dùng\", \"Email\", \"Ngày sinh\",\"Giới tính\", \"Loại tài khoản\",\n ;\n switch (j){\n case 1:\n editText.setText(row.get(i).name);\n tableRow.addView(editText, tableRowParams);\n break;\n case 2:\n editText.setText(row.get(i).email);\n tableRow.addView(editText, tableRowParams);\n break;\n case 3:\n editText.setText(row.get(i).date);\n tableRow.addView(editText, tableRowParams);\n break;\n case 4:\n editText.setText(row.get(i).gender);\n tableRow.addView(editText, tableRowParams);\n break;\n case 5:\n editText.setText(row.get(i).role);\n tableRow.addView(editText, tableRowParams);\n break;\n\n case 6:\n Button btn=new Button(this);\n btn.setId(1);\n btn.setText(\"Ban\");\n btn.setLayoutParams(new TableLayout.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT,TableRow.LayoutParams.WRAP_CONTENT));\n tableRow.addView(btn, tableRowParams);\n break;\n case 7:\n Button btn2=new Button(this);\n btn2.setId(2);\n btn2.setText(\"Change\");\n btn2.setLayoutParams(new TableLayout.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT,TableRow.LayoutParams.WRAP_CONTENT));\n tableRow.addView(btn2, tableRowParams);\n break;\n default:\n break;\n\n }\n\n\n }\n\n }\n\n // 6) add tableRow to tableLayout\n tableLayout.addView(tableRow, tableLayoutParams);\n }\n\n return tableLayout;\n\n\n // --------------------------end of headers ----------------------\n\n }",
"@Override\n public void bindView(View view, Context context, Cursor cursor) {\n TextView tanggal = (TextView) view.findViewById(R.id.tanggal);\n TextView Pemasukan = (TextView) view.findViewById(R.id.Dana);\n TextView keterangan = (TextView) view.findViewById(R.id.keterangan);\n // Read the pet attributes from the Cursor for the current pet\n String editTanggal = cursor.getString(cursor.getColumnIndex(tabeldb.listtabeldb.COL_1_Pemasukan));\n double editPemasukan = cursor.getInt(cursor.getColumnIndex(tabeldb.listtabeldb.COL_2_Pemasukan));\n String editKeterangan= cursor.getString(cursor.getColumnIndex(tabeldb.listtabeldb.COL_3_Pemasukan));\n\n // Update the TextViews with the attributes for the current pet\n DecimalFormat decim = new DecimalFormat(\"#,###.##\");\n tanggal.setText(editTanggal);\n Pemasukan.setText(decim.format(editPemasukan));\n keterangan.setText(editKeterangan);\n }",
"@Override\r\n\t\t\tpublic View getView(int position, View convertView,\r\n\t\t\t\t\tViewGroup parent) {\n\t\t\t\tTableLayout tl=new TableLayout(ShouZhiActivity.this);\r\n\t\t\t\t//tl.setOrientation(TableLayout.HORIZONTAL);\r\n\t\t\t\ttl.setShrinkAllColumns(false);\r\n\t\t\t\t\r\n\t\t\t\t TableRow tr=new TableRow(ShouZhiActivity.this);\r\n\t\t\t\t for(int j=0;j<4;j++)\r\n\t\t\t\t { TextView tv=new TextView(ShouZhiActivity.this);\r\n\t\t\t\t if(j==0||j==1||j==2){\t\r\n\t\t\t\t\t if(j==1){\r\n\t\t\t\t\t\ttv.setWidth(110);\r\n\t\t\t\t\t\ttv.setPadding(20, 20, 5, 5);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t if(j==0){\r\n\t\t\t\t\t\ttv.setWidth(110);\r\n\t\t\t\t\t\ttv.setPadding(0, 20, 5, 5);}\r\n\t\t\t\t\t if(j==2){\r\n\t\t\t\t\t\ttv.setWidth(110);\r\n\t\t\t\t\t\ttv.setPadding(20, 20, 5, 5);\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t else{\r\n\t\t\t\t\t\ttv.setWidth(140);\r\n\t\t\t\t\t\ttv.setPadding(20, 15, 5, 5);\r\n\t\t\t\t\t}\r\n\t\t\t\t tv.setText(bl.get(position)[j]);\r\n\t\t\t\t tr.setLayoutParams(new LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT,\r\n\t\t\t\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT));\r\n\t\t\t\t\t\ttv.setEllipsize(TruncateAt.END);\r\n\t\t\t\t\t\ttv.setTextSize(14);\r\n\t\t\t\t\t\ttv.setSingleLine(true);\r\n\t\t\t\t\t\ttv.setGravity(Gravity.CENTER);\r\n\t\t\t\t\t\ttv.setTextColor(ShouZhiActivity.this.getResources().getColor(R.color.black));\t\r\n\t\t\t\t\t\ttr.addView(tv);}\r\n\t\t\t\t\t\ttl.addView(tr);\r\n\t\t\t\t\t\treturn tl;\r\n\t\t\t}",
"@Override\n public void bindView(View view, Context context, Cursor cursor) {\n // Find fields to populate in inflated template\n\n TextView name = (TextView) view.findViewById(R.id.label3nazwa);\n TextView date = (TextView) view.findViewById(R.id.label1data);\n TextView type = (TextView) view.findViewById(R.id.label2typ);\n TextView value = (TextView) view.findViewById(R.id.label4wartosc);\n // Extract properties from cursor\n String nazwa = cursor.getString(cursor.getColumnIndexOrThrow(\"nazwa\"));\n String typ_id = cursor.getString(cursor.getColumnIndexOrThrow(\"typ_id\"));\n String data = cursor.getString(cursor.getColumnIndexOrThrow(\"data\"));\n String wartosc = cursor.getString(cursor.getColumnIndexOrThrow(\"wartosc\"));\n // Populate fields with extracted properties\n name.setText(nazwa);\n date.setText(data);\n type.setText(typ_id);\n value.setText(wartosc);\n }",
"@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)\n public void init(View v) {\n\n LinearLayout li1 = (LinearLayout) v.findViewById(R.id.table_main);\n\n TableRow tbrow0 = new TableRow(getActivity());\n tbrow0.setPadding(10, 15, 15, 15);\n\n TextView tv0 = new TextView(getActivity());\n tv0.setText(\" Sl.No \");\n tv0.setTextSize(20);\n tv0.setTextColor(Color.BLACK);\n tbrow0.addView(tv0);\n\n TextView tv1 = new TextView(getActivity());\n tv1.setText(\" Name \");\n tv1.setTextSize(20);\n tv1.setTextColor(Color.BLACK);\n tbrow0.addView(tv1);\n\n TextView tv2 = new TextView(getActivity());\n tv2.setText(\" Field \");\n tv2.setTextSize(20);\n tv2.setTextColor(Color.BLACK);\n tbrow0.addView(tv2);\n\n li1.addView(tbrow0);\n\n\n for (int i = 0; i < name.length; i++) {\n TableRow tbrow = new TableRow(getActivity());\n TextView t1v = new TextView(getActivity());\n\n ShapeDrawable shape = new ShapeDrawable(new RectShape());\n shape.getPaint().setColor(Color.RED);\n shape.getPaint().setStyle(Paint.Style.STROKE);\n shape.getPaint().setStrokeWidth(3);\n\n tbrow.setPadding(10, 15, 15, 15);\n // Assign the created border to EditText widget\n // tbrow.setBackground(shape);\n t1v.setText(\"\" + i);\n t1v.setTextColor(Color.BLACK);\n t1v.setGravity(Gravity.CENTER);\n\n tbrow.addView(t1v);\n TextView t2v = new TextView(getActivity());\n t2v.setText(name[i] + i);\n t2v.setTextColor(Color.BLACK);\n t2v.setGravity(Gravity.CENTER);\n tbrow.addView(t2v);\n\n TableRow.LayoutParams lparams = new TableRow.LayoutParams(400, ViewGroup.LayoutParams.WRAP_CONTENT);\n EditText edT_v = new EditText(getActivity());\n edT_v.setLayoutParams(lparams);\n edT_v.setBackground(shape);\n\n edT_v.setTextColor(Color.BLACK);\n edT_v.setGravity(Gravity.CENTER);\n\n\n tbrow.addView(edT_v);\n li1.addView(tbrow);\n }\n\n }",
"private void fillData() {\n\tparname.setText(UpStudentController.getName());\r\n\tparphone.setText(UpStudentController.getPhone());\r\n\tparmail.setText(UpStudentController.getMail());\r\n\taddres.setText(UpStudentController.getAdr());\r\n\tlocation.setText(UpStudentController.getLoc());\r\n\tkazi.setText(UpStudentController.getOc());\r\n\ttaifa.setText(UpStudentController.getNat());\r\n\t}",
"public void addData(View view) {\n int numCompanies = companies.length;\n TableLayout tl = view.findViewById(R.id.tableLayout);\n Log.d(\"TableViewFragment\", \"addData() invoked\");\n for (int i = 0; i < numCompanies; i++) {\n Log.d(\"TableViewFragment\", \"addData()\" + (i));\n TableRow tr = new TableRow(getContext());\n tr.setLayoutParams(getLayoutParams());\n tr.addView(getTextView(i + 1, companies[i], Color.WHITE, Typeface.NORMAL, ContextCompat.getColor(getContext(), R.color.colorAccent)));\n tr.addView(getTextView(i + numCompanies, os[i], Color.WHITE, Typeface.NORMAL, ContextCompat.getColor(getContext(), R.color.colorAccent)));\n tl.addView(tr, getTblLayoutParams());\n }\n }",
"private void bindAllViewElements() {\n\t\tseatingInfoList = (LinearLayoutForListView) findViewById(R.id.ticket_detail_view_seating_info_list);\n\t\tqrCodeButton = (Button) findViewById(R.id.ticket_detail_view_view_qr_code_btn);\n\t\tpdfButton = (Button) findViewById(R.id.ticket_detail_view_view_pdf_btn);\n\n\t\tdnrNumberValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_reference_number_value);\n\t\tpnrNumberValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_resevation_code_value);\n\t\t//paymentMethod = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_payment_method_TextView);\n\t\t//paymentMethodValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_payment_method_value);\n\t\ttotalPriceValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_total_price_value);\n\t\tinsurance = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_insurance_TextView);\n\t\tinsuranceValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_insurance_value);\n\t\ttariffValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_tariff_value);\n\n\t\ttariffDetail = (TextView) findViewById(R.id.ticket_detail_view_tariff_details_TextView);\n\n\t\tdeliveryMethodValue = (TextView) findViewById(R.id.ticket_detail_view_delivery_method_value);\n\t\tdeliveryMethodInfo = (TextView) findViewById(R.id.ticket_detail_view_delivery_method_info_TextView);\n\t\tdeliveryMethodInfoDetail1 = (TextView) findViewById(R.id.ticket_detail_view_delivery_method_info_detail1_TextView);\n\t\tdeliveryMethodInfoDetail2 = (TextView) findViewById(R.id.ticket_detail_view_delivery_method_info_detail2_TextView);\n\n\t\texchangeButton = (Button) findViewById(R.id.ticket_detail_view_view_exchange_btn);\n\t\tcancelButton = (Button) findViewById(R.id.ticket_detail_view_view_cancel_btn);\n\n\t\ttitle = (TextView) findViewById(R.id.ticket_detail_view_title);\n\n\t\tstationList = (LinearLayoutForListView) findViewById(R.id.ticket_detail_view_station_list);\n\t\trooView = findViewById(R.id.ticket_detail_root_view);\n\t\trooView.setVisibility(View.VISIBLE);\n\t\tprogressBar = (LinearLayout)findViewById(R.id.tickets_detail_view_progressBarLayout);\n\t\terrorLayout = (LinearLayout) findViewById(R.id.tickets_detail_view_service_error_Layout);\n\t\t\n\t\terrorTextview = (TextView) findViewById(R.id.tickets_detail_view_retrieving_real_time_service_error_textview);\n\t\t\n\t\trunProgressBar();\n\t\t\n\t\tbindAllListeners();\n\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View row = convertView;\n RecordHolder holder = null;\n // Check if an existing view is being reused, otherwise inflate the view\n if (row == null) {\n LayoutInflater inflater = ((Activity) context).getLayoutInflater();\n row = inflater.inflate(id,parent,false);\n holder = new RecordHolder();\n holder.tvName = (TextView) row.findViewById(R.id.tvName);\n row.setTag(holder);\n }\n Cursos c = data.get(position);\n holder.tvName.setText(c.getNombre_curso());\n\n return row;\n }",
"private TableLayout createTableLayout(String [] rv, String [] cv,int rowCount, int columnCount) {\n TableLayout.LayoutParams tableLayoutParams = new TableLayout.LayoutParams();\n TableLayout tableLayout = new TableLayout(this);\n tableLayout.setBackgroundColor(Color.BLACK);\n\n // 2) create tableRow params\n TableRow.LayoutParams tableRowParams = new TableRow.LayoutParams();\n tableRowParams.setMargins(1, 1, 1, 1);\n tableRowParams.weight = 1;\n\n for (int i = 0; i < rowCount; i++) {\n // 3) create tableRow\n TableRow tableRow = new TableRow(this);\n tableRow.setBackgroundColor(Color.BLACK);\n\n for (int j= 0; j < columnCount; j++) {\n // 4) create textView\n TextView textView = new TextView(this);\n // textView.setText(String.valueOf(j));\n textView.setBackgroundColor(Color.WHITE);\n textView.setGravity(Gravity.CENTER);\n\n String s1 = Integer.toString(i);\n String s2 = Integer.toString(j);\n String s3 = s1 + s2;\n int id = Integer.parseInt(s3);\n Log.d(\"TAG\", \"-___>\" + id);\n if (i ==0 && j==0){\n textView.setText(\"Name\");\n } else if(i==0){\n Log.d(\"TAAG\", \"set Column Headers\");\n textView.setText(cv[j-1]);\n }else if( j==0){\n Log.d(\"TAAG\", \"Set Row Headers\");\n textView.setText(rv[i-1]);\n }else if(j==4) {\n textView.setText(\"\"+totalmarks.get(i));\n // check id=23\n } else if(j==3){\n textView.setText(\"\"+englishmarks[i]);\n }else if(j==2) {\n textView.setText(\"\"+sciencemarks[i]);\n } else if(j==1) {\n textView.setText(\"\"+mathsmarks[i]);\n } else{\n textView.setText(\"\" + id);\n }\n // 5) add textView to tableRow\n tableRow.addView(textView, tableRowParams);\n }\n // 6) add tableRow to tableLayout\n tableLayout.addView(tableRow, tableLayoutParams);\n }\n\n return tableLayout;\n }",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n tableLayoutChat.removeAllViews();\n for (DataSnapshot postSnapshot : dataSnapshot.getChildren()) {\n //getting artist;\n ChatMessage chatMessage = postSnapshot.getValue(ChatMessage.class);\n String theMessege=chatMessage.getMessage();\n String theSender=chatMessage.getSender();\n String theTime=chatMessage.getTime();\n\n\n TableRow header=new TableRow(AcceptedTaskActivity.this);\n ViewGroup.MarginLayoutParams params = new ViewGroup.MarginLayoutParams(\n ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n header.setLayoutParams(params);\n\n TextView sender = new TextView(AcceptedTaskActivity.this);\n sender.setGravity(Gravity.LEFT);\n if (theSender.equals(userName)){\n sender.setTextColor(Color.BLUE);\n }\n else{\n sender.setTextColor(Color.GREEN);\n }\n sender.setText(theSender);\n\n TextView time = new TextView(AcceptedTaskActivity.this);\n time.setGravity(Gravity.LEFT);\n time.setTextColor(Color.GRAY);\n time.setText(theTime);\n //Log.d(\"theTime\",theTime);\n\n\n TableRow body=new TableRow(AcceptedTaskActivity.this);\n body.setLayoutParams(params);\n TextView message = new TextView(AcceptedTaskActivity.this);\n message.setGravity(Gravity.LEFT);\n\n message.setText(theMessege);\n\n TableRow spacing=new TableRow(AcceptedTaskActivity.this);\n spacing.setLayoutParams(params);\n TextView space = new TextView(AcceptedTaskActivity.this);\n\n\n header.addView(sender);\n header.addView(time);\n body.addView(message);\n spacing.addView(space);\n\n tableLayoutChat.addView(header, params);\n tableLayoutChat.addView(body, params);\n tableLayoutChat.addView(spacing,params);\n scrolview.fullScroll(ScrollView.FOCUS_DOWN);\n\n }\n\n }",
"public void showDataBase(){\n List<Mission> missions = appDatabase.myDao().getMissions();\n\n\n String info = \"\";\n\n for(Mission mis : missions){\n int id = mis.getId();\n String name = mis.getName();\n String diffic = mis.getDifficulty();\n int pong = mis.getPoints();\n String desc = mis.getDescription();\n\n info = info+\"Id : \" + id + \"\\n\" + \"Name : \" + name + \"\\n\" + \"Difficulty : \" + diffic + \"\\n\" + \"Points : \" + pong + \"\\n\" + \"Description: \" + desc + \"\\n\\n\";\n }\n\n TextView databaseData = (TextView)getView().findViewById(R.id.DatabaseData);\n databaseData.setText(info);\n\n //Toggle visibility for the textview containing the data\n if(databaseData.getVisibility() == View.VISIBLE)\n databaseData.setVisibility(View.GONE);\n else\n databaseData.setVisibility(View.VISIBLE);\n\n }",
"@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n c.moveToPosition(position);\n holder.tv1.setText(c.getInt(0)+\"\");\n holder.tv2.setText(c.getString(1));\n holder.tv3.setText(c.getString(2));\n }",
"@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, final int arg2,\r\n\t\t\t\t\tlong arg3) {\n\t\t\t\tTableLayout tl=(TableLayout)arg1;\r\n\t\t\t\tTableRow tr=(TableRow)tl.getChildAt(0);\r\n\t\t\t\tfor(int i=0;i<4;i++){\r\n\t\t\t\t\tfinal TextView tv=(TextView)tr.getChildAt(i);\r\n\t\t\t\t\tTextPaint mTextPaint=tv.getPaint();\r\n\t\t\t\t\tfinal float textWidth=mTextPaint.measureText(bl.get(arg2)[i]);\r\n\t\t\t\t\tif(i==1){\r\n\t\t\t\t\t\tif(textWidth>84.0){\r\n\t\t\t\t\t\t\ttv.setOnClickListener(new View.OnClickListener() {\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\tisubject=bl.get(arg2)[0];\r\n\t\t\t\t\t\t\t\t\tiamount=bl.get(arg2)[1];\r\n\t\t\t\t\t\t\t\t\timode=bl.get(arg2)[2];\r\n\t\t\t\t\t\t\t\t\tidate=bl.get(arg2)[3];\r\n\t\t\t\t\t\t\t\t\tshowDialog(DETAIL_DIALOG);\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\t}\r\n\t\t\t\t\tif(i==0||i==2){\r\n\t\t\t\t\t\tif(textWidth>100.0){\r\n\t\t\t\t\t\t tv.setOnClickListener(new View.OnClickListener() {\t\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\t\t\t\tisubject=bl.get(arg2)[0];\r\n\t\t\t\t\t\t\t\tiamount=bl.get(arg2)[1];\r\n\t\t\t\t\t\t\t\timode=bl.get(arg2)[2];\r\n\t\t\t\t\t\t\t\tidate=bl.get(arg2)[3];\r\n\t\t\t\t\t\t\t\tshowDialog(DETAIL_DIALOG);\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}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\n\n\t\tLayoutInflater inflater=activity.getLayoutInflater();\n\n\t\tif(convertView == null){\n\n\t\t\tconvertView=inflater.inflate(R.layout.column_row, null);\n }\n\t\t \n\t\ttxtFirst=(TextView) convertView.findViewById(R.id.idView);\n\t\ttxtSecond=(TextView) convertView.findViewById(R.id.dateView);\n\t\ttxtThird=(TextView) convertView.findViewById(R.id.discriptionView);\n\t\ttxtFourth=(TextView) convertView.findViewById(R.id.amountView);\n\n\t\tHashMap<String, String> map=list.get(position);\n\t\ttxtFirst.setText(map.get(FIRST_COLUMN));\n\t\ttxtSecond.setText(map.get(SECOND_COLUMN));\n\t\ttxtThird.setText(map.get(THIRD_COLUMN));\n\t\ttxtFourth.setText(map.get(FOURTH_COLUMN));\n\n\t\treturn convertView;\n\t}",
"@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\t ViewHolder viewholder = null;\n\n\t\t\t if(convertView == null)\n\t {\n\t\t\t\t viewholder = new ViewHolder();\n\t convertView = mInflater.inflate(R.layout.dialog_edit_bill_item, null);\n\t \n\t viewholder.textView1 = (TextView)convertView.findViewById(R.id.diaTextView1);\n\t \n\t convertView.setTag(viewholder);\n\t }else\n\t {\n\t \t viewholder = (ViewHolder)convertView.getTag();\n\t }\n\n\t\t\t viewholder.textView1.setText(data[position]);\n\t return convertView;\n\t\t}",
"@Override\n public void onBindViewHolder(DetailAdapter.ViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n //holder.mTextView.setText(mDataset[position]);\n holder.informacion.setText(mDataset[position]); //informacion es el dato que nos entrega el arreglo\n }",
"private void initObjects() {\n databaseHelper = new DatabaseHelper(activity);\n currentUser = databaseHelper.getAllUser().get(userIndex);\n\n textViewName.setText(userName);\n textViewEmail.setText(currentUser.getEmail());\n textViewPhone.setText(currentUser.getNumber());\n double rent = currentUser.getRent();\n String rentStr = new Double(rent).toString();\n textViewRent.setText(rentStr);\n textViewChores.setText(currentUser.getChores());\n\n /*for(int i=0; i<listUsers.size(); i++){\n TextView textView = new TextView(this);\n final int passingInt = i;\n textView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String testMsg = listUsers.get(passingInt).getName();\n Log.d(\"User Clicked: \", testMsg);\n\n Intent editUserIntent = new Intent(EditChosenUserActivity.this, EditChosenUserActivity.class);\n }\n });\n\n textView.setTextSize(60.0f);\n textView.setText(listUsers.get(i).getName());\n users_list.addView(textView);\n }*/\n }",
"@Override\r\n protected void onPostExecute(Cursor result)\r\n {\r\n super.onPostExecute(result);\r\n \r\n result.moveToFirst(); // move to the first item \r\n \r\n // get the column index for each data item\r\n int nameIndex = result.getColumnIndex(\"name\");\r\n int phoneIndex = result.getColumnIndex(\"phone\");\r\n int emailIndex = result.getColumnIndex(\"email\");\r\n int streetIndex = result.getColumnIndex(\"street\");\r\n int cityIndex = result.getColumnIndex(\"city\");\r\n \r\n // fill TextViews with the retrieved data\r\n nameTextView.setText(result.getString(nameIndex));\r\n phoneTextView.setText(result.getString(phoneIndex));\r\n emailTextView.setText(result.getString(emailIndex));\r\n streetTextView.setText(result.getString(streetIndex));\r\n cityTextView.setText(result.getString(cityIndex));\r\n \r\n result.close(); // close the result cursor\r\n databaseConnector.close(); // close database connection\r\n }",
"private void fillData() {\n String[] from = new String[] {\n NOMBRE_OBJETO,\n DESCRIPCION,\n TEXTURA\n };\n // Campos de la interfaz a los que mapeamos\n int[] to = new int[] {\n R.id.txtNombreObjeto,\n R.id.txtDescripcion,\n R.id.imgIconoObjeto\n };\n getLoaderManager().initLoader(OBJETOS_LOADER, null, this);\n ListView lvObjetos = (ListView) findViewById(R.id.listaObjetos);\n adapter = new SimpleCursorAdapter(this, R.layout.activity_tiendaobjetos_filaobjeto, null, from, to, 0);\n lvObjetos.setAdapter(adapter);\n }",
"@Override\n public void onClick(View v) {\n Cursor c=myDatabase.queryStudent();\n if (c!=null){\n StringBuilder sb=new StringBuilder();\n //that means there\n while (c.moveToNext()){\n int sno=c.getInt(0);\n String sname=c.getString(1);\n String scourse=c.getString(2);\n sb.append(sno+\":\"+sname+\":\"+scourse+\"\\n\");\n }\n //let us apply on textview\n tv.setText(sb.toString());\n }\n }",
"@Override\n public void bindView(View view, Context context, Cursor cursor) {\n // Find fields to populate in inflated template\n TextView Ename = (TextView) view.findViewById(R.id.Ename);\n TextView Designation = (TextView) view.findViewById(R.id.Designation);\n TextView Salary = (TextView) view.findViewById(R.id.Salary);\n // Extract properties from cursor\n String ename = cursor.getString(cursor.getColumnIndexOrThrow(\"ename\"));\n String designation = cursor.getString(cursor.getColumnIndexOrThrow(\"designation\"));\n int salary = cursor.getInt(cursor.getColumnIndexOrThrow(\"salary\"));\n\n ImageView imgView =(ImageView)view.findViewById(R.id.ImageView01);\n\n\n imgView.setImageResource(R.drawable.ic_launcher);\n\n\n\n\n\n // Populate fields with extracted properties\n Ename.setText(ename);\n Designation.setText(designation);\n Salary.setText(String.valueOf(salary));\n }",
"private void setViews() {\n\n TextView currentApixu = findViewById(R.id.currentApixu);\n TextView currentOwm = findViewById(R.id.currentOwm);\n TextView currentWu = findViewById(R.id.currentWu);\n\n currentApixu.setText(feedValues[0]);\n currentOwm.setText(feedValues[1]);\n currentWu.setText(feedValues[2]);\n }",
"public View getView(int position, View convertView, ViewGroup parent){\n\n\t\t// assign the view we are converting to a local variable\n\t\tView v = convertView;\n\n\t\t// first check to see if the view is null. if so, we have to inflate it.\n\t\t// to inflate it basically means to render, or show, the view.\n\t\tif (v == null) {\n\t\t\tLayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t\tv = inflater.inflate(R.layout.list_item, null);\n\t\t}\n\n\t\t/*\n\t\t * Recall that the variable position is sent in as an argument to this method.\n\t\t * The variable simply refers to the position of the current object in the list. (The ArrayAdapter\n\t\t * iterates through the list we sent it)\n\t\t * \n\t\t * Therefore, i refers to the current Item object.\n\t\t */\n\t\titem i = objects.get(position);\n\n\t\tif (i != null) {\n\n\t\t\t// This is how you obtain a reference to the TextViews.\n\t\t\t// These TextViews are created in the XML files we defined.\n\n\t\t\tTextView tn = (TextView) v.findViewById(R.id.tnLabel);\n\t\t\tTextView tnd = (TextView) v.findViewById(R.id.tnData);\n\t\t\tTextView dt = (TextView) v.findViewById(R.id.dtLabel);\n\t\t\tTextView dtd = (TextView) v.findViewById(R.id.dtData);\n\t\t\tTextView at = (TextView) v.findViewById(R.id.atLabel);\n\t\t\tTextView atd = (TextView) v.findViewById(R.id.atData);\n\n\t\t\t// check to see if each individual textview is null.\n\t\t\t// if not, assign some text\n\t\t\tif (tn != null){\n\t\t\t\ttn.setText(\"Train Number: \");\n\t\t\t}\n\t\t\tif (tnd != null){\n\t\t\t\ttnd.setText(i.getTrainNum());\n\t\t\t}\n\t\t\tif (dt != null){\n\t\t\t\tdt.setText(\"Departure Time: \");\n\t\t\t}\n\t\t\tif (dtd != null){\n\t\t\t\tdtd.setText(i.getDepTime());\n\t\t\t}\n\t\t\tif (at != null){\n\t\t\t\tat.setText(\"Arrival Time: \");\n\t\t\t}\n\t\t\tif (atd != null){\n\t\t\t\tatd.setText(i.getArrTime());\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t// the view must be returned to our activity\n\t\treturn v;\n\n\t}",
"@Override\n public void run() {\n receivedTextView6.setText(str5);\n receivedTextView5.setText(str4);\n receivedTextView4.setText(str3);\n receivedTextView3.setText(str2);\n receivedTextView2.setText(str1);\n receivedTextView1.setText(str0);\n }",
"public void viewdata(View view){\n\n viewall.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n Cursor data = dbHandler.getSeller();\n if(data.getCount() == 0){\n\n showMessage(\"Error\",\"Nothing found\");\n return;\n }\n\n StringBuffer buffer = new StringBuffer();\n\n while (data.moveToNext()){\n\n buffer.append(\"User Name\" +data.getString(0)+ \"\\n\");\n buffer.append(\"Password\" +data.getString(1)+ \"\\n\");\n buffer.append(\"Email\" +data.getString(2)+\"\\n\");\n buffer.append(\"Seller Name\" +data.getString(3)+\"\\n\");\n buffer.append(\"Contatct\" +data.getString(4)+\"\\n\\n\");\n\n //ShowableListMenu(\"Data\",buffer.toString());\n showMessage(\"Data\",buffer.toString());\n\n }\n\n }\n });\n\n\n }",
"private void addDataToTable() {\n\n /* Get the main table from the xml */\n TableLayout mainTable = (TableLayout) findViewById(R.id.mainTable);\n\n /* Retrieve which products need to be displayed */\n int product_type = getIntent().getExtras().getInt(\"product_type\");\n String[] product_types_array = getResources().getStringArray(product_type);\n\n /* Retrieve product images for the above list of products */\n int[] product_images = getIntent().getExtras().getIntArray(\"product_images\");\n\n /* Loop through to add each product details in the table */\n for (int i = 0; i < product_types_array.length; i++) {\n\n TableRow tableRow = new TableRow(this);\n TableRow.LayoutParams tableRowParams =\n new TableRow.LayoutParams\n (TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT);\n tableRow.setLayoutParams(tableRowParams);\n tableRow.setPadding(20, 20, 20, 20);\n\n // Initialize Linearlayout to set product name and images\n LinearLayout product_desc = new LinearLayout(this);\n product_desc.setId(R.id.product_linearlayout);\n product_desc.setOrientation(LinearLayout.VERTICAL);\n product_desc.setGravity(Gravity.START);\n product_desc.setPadding(10,0,10,0);\n\n // initialize string to separate product type\n String[] pn_str = product_types_array[i].split(\";\");\n // initialize string to get product name\n String prod_name_str = pn_str[0];\n // initialize string to get product color\n String prod_color = pn_str[1];\n\n /* Product Name Details */\n TextView textView_PN = new TextView(this);\n textView_PN.setText(prod_name_str);\n textView_PN.setWidth(350);\n textView_PN.setHeight(50);\n textView_PN.setId(R.id.product_name);\n textView_PN.setGravity(Gravity.CENTER_HORIZONTAL);\n textView_PN.setTypeface(null, Typeface.BOLD);\n textView_PN.setTextSize(13);\n textView_PN.setPadding(0, 0, 0, 0);\n product_desc.addView(textView_PN);\n\n /* Product Color */\n TextView textView_PC = new TextView(this);\n textView_PC.setText(\"Color : \" + prod_color);\n textView_PC.setId(R.id.product_color);\n textView_PC.setGravity(Gravity.CENTER_HORIZONTAL);\n textView_PC.setTypeface(null, Typeface.BOLD);\n textView_PC.setTextSize(13);\n textView_PC.setPadding(10, 10, 10, 10);\n product_desc.addView(textView_PC);\n\n /* Product Image Details */\n ImageView imageView = new ImageView(this);\n imageView.setImageResource(product_images[i]);\n imageView.setId(R.id.product_image);\n imageView.setPadding(20, 20, 20, 20);\n product_desc.addView(imageView);\n\n // add row in table\n tableRow.addView(product_desc, new TableRow.LayoutParams\n (TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT, 1.0f));\n\n /* LinearLayout for checkboxes */\n LinearLayout product_types = new LinearLayout(this);\n product_types.setOrientation(LinearLayout.VERTICAL);\n product_types.setGravity(Gravity.CENTER_VERTICAL);\n\n int box_type_value = decide_type(prod_name_str);\n\n /* show all products item with checkbox */\n if( box_type_value != -1){\n\n String[] product_modules_array = getResources().getStringArray(box_type_value);\n\n /* Loop for printing multiple checkboxes */\n for (int j = 0; j < product_modules_array.length; j++) {\n\n CheckBox checkBox = new CheckBox(this);\n checkBox.setTextSize(13);\n checkBox.setText(product_modules_array[j]);\n checkBox.setChecked(false);\n checkBox.setId(count);\n\n /* check condition if particular item name belongs to product hashmap */\n if (to_refer_each_item.containsKey(i)) {\n (to_refer_each_item.get(i)).add(count);\n } else {\n ArrayList<Integer> arrayList = new ArrayList<Integer>();\n arrayList.add(count);\n to_refer_each_item.put(i, arrayList);\n }\n count++;\n product_types.addView(checkBox);\n }\n }\n tableRow.addView(product_types, new TableRow.LayoutParams\n (TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT,1.0f));\n mainTable.addView(tableRow);\n }\n }",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tView row = convertView;\n\t\t\n\t\tif(row == null){\n\t\t\tLayoutInflater inflater = context.getLayoutInflater();\n\t\t\trow = inflater.inflate(R.layout.item_total_average, null);\n\t\t\t\n\t\t\t// configure RecordHolder\n\t\t\tViewHolder viewHolder = new ViewHolder();\n\t\t\tviewHolder.txtTitle = (TextView) row.findViewById(R.id.total_average_title);\n\t\t\tviewHolder.txtValue = (TextView) row.findViewById(R.id.total_average_value);\n\t\t\trow.setTag(viewHolder);\t\t\t\n\t\t}\n\t\t\n\t\t// fill data\n\t\tViewHolder holder = (ViewHolder) row.getTag();\n\t\tTuple values = data.get(position);\n\t\tholder.txtTitle.setText(values.getValue1());\n\t\tholder.txtValue.setText(values.getValue2());\n\t\t\n\t\treturn row;\n\t}",
"@Override\n public void bindView(View view, Context context, Cursor cursor) {\n // Find fields to populate in inflated template\n TextView txtTitle = (TextView) view.findViewById(R.id.schoolTitle);\n TextView txtSchoolNo = (TextView) view.findViewById(R.id.schoolNo);\n TextView txtMajor = (TextView) view.findViewById(R.id.schoolMajor);\n TextView txtStartDate = (TextView) view.findViewById(R.id.schoolStartDate);\n TextView txtEndDate = (TextView) view.findViewById(R.id.schoolEndDate);\n TextView txtLocation = (TextView) view.findViewById(R.id.schoolLocation);\n TextView txtStatus = (TextView) view.findViewById(R.id.schoolStatus);\n\n // Extract properties from cursor\n String mTitle = cursor.getString(cursor.getColumnIndexOrThrow(\"school_title\"));\n String mSchoolNo = cursor.getString(cursor.getColumnIndexOrThrow(\"school_cardno\"));\n String mMajor = cursor.getString(cursor.getColumnIndexOrThrow(\"school_major\"));\n String mStartDate = cursor.getString(cursor.getColumnIndexOrThrow(\"start_date\"));\n String mEndDate = cursor.getString(cursor.getColumnIndexOrThrow(\"end_date\"));\n String mLocation = cursor.getString(cursor.getColumnIndexOrThrow(\"school_location\"));\n String mStatus = cursor.getString(cursor.getColumnIndexOrThrow(\"status\"));\n // Populate fields with extracted properties\n txtTitle.setText(mTitle);\n txtSchoolNo.setText(mSchoolNo);\n txtMajor.setText(mMajor);\n txtStartDate.setText(mStartDate);\n txtEndDate.setText(mEndDate);\n txtLocation.setText(mLocation);\n txtStatus.setText(mStatus);\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n Item item = getItem(position);\n // Check if an existing view is being reused, otherwise inflate the view\n if (convertView == null) {\n convertView = LayoutInflater.from(getContext()).inflate(R.layout.list_layout, parent, false);\n }\n\n // Lookup view for data population\n TextView tvName = convertView.findViewById(R.id.item_textview);\n TextView tvNum = convertView.findViewById(R.id.num_textview);\n\n // TODO\n // Set the text used by tvName and tvNum using the data object\n // This will need to updated once the entity model has been updated\n tvName.setText(item.getName());\n tvNum.setText(item.getNum());\n\n // Return the completed view to render on screen\n return convertView;\n }",
"@Override\n public View getView(final int position, View convertView, ViewGroup parent) {\n Holder holder=new Holder();\n View rowView;\n rowView = inflater.inflate(R.layout.teamrow, null);\n holder.tv=(TextView) rowView.findViewById(R.id.teamrowitem);\n holder.tv.setText(result.get(position).get(\"title\"));\n Log.d(\"adapter\",result.get(position).get(\"title\"));\n\n\n\n\n return rowView;\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position, convertView, parent);\n\n // Initialize a TextView for ListView each Item\n TextView tv = (TextView) view.findViewById(android.R.id.text1);\n\n // Set the text color of TextView (ListView Item)\n tv.setTextColor(Color.BLACK);\n\n // Generate ListView Item using TextView\n return view;\n }",
"private void displayData() {\n int j = finalList.size() - 1;\n\n while (j >= 0) {\n Log.d(\"j\", \"\" + j);\n SleepNormalRow normalRow = new SleepNormalRow(\n finalList.get(j).getDateOfSleep(),\n finalList.get(j).getDurationString(),\n finalList.get(j).getSleepTimeToWakeTime());\n recyclerViewItems.add(normalRow);\n j--;\n }\n\n adapter = new SleepAdapter(SleepActivity.this, recyclerViewItems);\n mRecyclerView.setAdapter(adapter);\n\n }",
"@Override\r\n public void onBindViewHolder(MyViewHolder holder, int position) {\r\n // - get element from your dataset at this position\r\n // - replace the contents of the view with that element\r\n holder.textView_longitude.setText(dataset.get(position).dataLongitude);\r\n holder.textView_latitude.setText(dataset.get(position).dataLatitude);\r\n holder.textView_speed.setText(dataset.get(position).dataSpeed);\r\n holder.textView_time.setText(dataset.get(position).dataTime);\r\n\r\n }",
"@Override\n public void bindView(View view, Context context, Cursor cursor) {\n //Find fields to populate in inflated template\n TextView sportClubFirstName = (TextView)view.findViewById(R.id.firstNameTextView);\n TextView sportClubLastName = (TextView)view.findViewById(R.id.lastNameTextView);\n TextView sportClubSport = (TextView)view.findViewById(R.id.sportTextView);\n //Extract properties from cursor\n String firstName = cursor.getString(cursor.getColumnIndexOrThrow(MemberEntry.COLUMN_FIRST_NAME));\n String lastName = cursor.getString(cursor.getColumnIndexOrThrow(MemberEntry.COLUMN_LAST_NAME));\n String sportName = cursor.getString(cursor.getColumnIndexOrThrow(MemberEntry.COLUMN_SPORT));\n //Populate fields with extracted properties\n sportClubFirstName.setText(firstName);\n sportClubLastName.setText(lastName);\n sportClubSport.setText(sportName);\n }",
"public void setDataCount(TextView textView, int i) {\n textView.setText(Html.fromHtml(getContext().getString(R.string.activities_destination_record_count, new Object[]{Integer.valueOf(i)})));\n }",
"private void inflateTextLayout(View row, BeadInfo beadInfo) {\n\t\tTextView colorCodeTV = (TextView) row.findViewById(R.id.colorNumber);\n\t\tif (colorCodeTV != null){\n\t\t\tString colorCode = beadInfo.getColorCode();\n\t\t\tif (colorCode != null){\n\t\t\t\tcolorCodeTV.setText(colorCode);\n\t\t\t}\n\t\t}\n\t\tLocation loc = beadInfo.getLocation(); \n\t\tif (loc != null){\n\t\t\tString wing = loc.getWing();\n\t\t\tString locRow = String.valueOf(loc.getRow());\n\t\t\tString locCol = String.valueOf(loc.getCol());\n\t\t\tString quantity = String.valueOf(beadInfo.getQuantity());\n\n\t\t\tTextView wingTV = (TextView) row.findViewById(R.id.beadLocationWing);\n\t\t\tif (wingTV != null){\n\t\t\t\twingTV.setText(wing);\n\t\t\t}\n\t\t\tTextView locRowTV = (TextView) row.findViewById(R.id.beadLocationRow);\n\t\t\tif (locRowTV != null){\n\t\t\t\tlocRowTV.setText(locRow);\n\t\t\t}\n\t\t\tTextView locColTV = (TextView) row.findViewById(R.id.beadLocationColumn);\n\t\t\tif (locColTV != null){\n\t\t\t\tlocColTV.setText(locCol);\n\t\t\t}\n\t\t\tTextView quantityTV = (TextView) row.findViewById(R.id.beadQuantity);\n\t\t\tif (quantityTV != null){\n\t\t\t\tquantityTV.setText(quantity);\n\t\t\t}\n\n\n\n\t\t}\n\n\t\t\n\t}",
"public void ViewAllData(View v){\n Cursor res = myDB.viewAllData();\n // if there are no data\n if (res.getCount() == 0) {\n // show an error message\n showMessage(\"Error\", \"Nothing found\");\n return;\n }\n\n StringBuffer buffer = new StringBuffer();\n while(res.moveToNext()){\n buffer.append(\"Id :\" + res.getString(0) + \"\\n\");\n buffer.append(\"Name :\" + res.getString(1) + \"\\n\");\n buffer.append(\"Surname :\" + res.getString(2) + \"\\n\");\n buffer.append(\"Marks :\" + res.getString(3) + \"\\n\\n\");\n }\n\n // then show all the data inside the buffer\n showMessage(\"Data\", buffer.toString());\n }",
"public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position,convertView,parent);\n\n // Convert the view as a TextView widget\n TextView tv = (TextView) view;\n\n //tv.setTextColor(Color.DKGRAY);\n\n // Set the layout parameters for TextView widget\n RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(\n RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT\n );\n tv.setLayoutParams(lp);\n\n // Get the TextView LayoutParams\n RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams)tv.getLayoutParams();\n\n // Set the width of TextView widget (item of GridView)\n /*\n IMPORTANT\n Adjust the TextView widget width depending\n on GridView width and number of columns.\n\n GridView width / Number of columns = TextView width.\n\n Also calculate the GridView padding, margins, vertical spacing\n and horizontal spacing.\n */\n\n\n Resources r = reports2.this.getResources();\n int px = (int) (TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, 100, r.getDisplayMetrics()));\n // tv.setLayoutParams(new GridView.LayoutParams((width/10)*6, 50));\n\n // if (position==0 || position==5) {\n // params.width = px/2; // getPixelsFromDPs(EpiloghEid.this,168);\n // tv.setLayoutParams(new GridView.LayoutParams((px*6), 100));\n // }else{\n params.width = px; // getPixelsFromDPs(EpiloghEid.this,168);\n // }\n\n\n // Set the TextView layout parameters\n tv.setLayoutParams(params);\n\n // Display TextView text in center position\n tv.setGravity(Gravity.CENTER);\n\n // Set the TextView text font family and text size\n tv.setTypeface(Typeface.SANS_SERIF, Typeface.NORMAL);\n tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 12);\n\n // Set the TextView text (GridView item text)\n tv.setText(values.get(position));\n\n // Set the TextView background color\n tv.setBackgroundColor(Color.parseColor(\"#d9d5dc\"));\n\n // Return the TextView widget as GridView item\n return tv;\n }",
"public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position,convertView,parent);\n\n // Convert the view as a TextView widget\n TextView tv = (TextView) view;\n\n //tv.setTextColor(Color.DKGRAY);\n\n // Set the layout parameters for TextView widget\n RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(\n RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT\n );\n tv.setLayoutParams(lp);\n\n // Get the TextView LayoutParams\n RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams)tv.getLayoutParams();\n\n // Set the width of TextView widget (item of GridView)\n /*\n IMPORTANT\n Adjust the TextView widget width depending\n on GridView width and number of columns.\n\n GridView width / Number of columns = TextView width.\n\n Also calculate the GridView padding, margins, vertical spacing\n and horizontal spacing.\n */\n\n\n Resources r = reports2.this.getResources();\n int px = (int) (TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, 100, r.getDisplayMetrics()));\n // tv.setLayoutParams(new GridView.LayoutParams((width/10)*6, 50));\n\n // if (position==0 || position==5) {\n // params.width = px/2; // getPixelsFromDPs(EpiloghEid.this,168);\n // tv.setLayoutParams(new GridView.LayoutParams((px*6), 100));\n // }else{\n params.width = px; // getPixelsFromDPs(EpiloghEid.this,168);\n // }\n\n\n // Set the TextView layout parameters\n tv.setLayoutParams(params);\n\n // Display TextView text in center position\n tv.setGravity(Gravity.CENTER);\n\n // Set the TextView text font family and text size\n tv.setTypeface(Typeface.SANS_SERIF, Typeface.NORMAL);\n tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 12);\n\n // Set the TextView text (GridView item text)\n tv.setText(values.get(position));\n\n // Set the TextView background color\n tv.setBackgroundColor(Color.parseColor(\"#d9d5dc\"));\n\n // Return the TextView widget as GridView item\n return tv;\n }",
"public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position,convertView,parent);\n\n // Convert the view as a TextView widget\n TextView tv = (TextView) view;\n\n //tv.setTextColor(Color.DKGRAY);\n\n // Set the layout parameters for TextView widget\n RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(\n RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT\n );\n tv.setLayoutParams(lp);\n\n // Get the TextView LayoutParams\n RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams)tv.getLayoutParams();\n\n // Set the width of TextView widget (item of GridView)\n /*\n IMPORTANT\n Adjust the TextView widget width depending\n on GridView width and number of columns.\n\n GridView width / Number of columns = TextView width.\n\n Also calculate the GridView padding, margins, vertical spacing\n and horizontal spacing.\n */\n\n\n Resources r = reports2.this.getResources();\n int px = (int) (TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, 100, r.getDisplayMetrics()));\n // tv.setLayoutParams(new GridView.LayoutParams((width/10)*6, 50));\n\n // if (position==0 || position==5) {\n // params.width = px/2; // getPixelsFromDPs(EpiloghEid.this,168);\n // tv.setLayoutParams(new GridView.LayoutParams((px*6), 100));\n // }else{\n params.width = px; // getPixelsFromDPs(EpiloghEid.this,168);\n // }\n\n\n // Set the TextView layout parameters\n tv.setLayoutParams(params);\n\n // Display TextView text in center position\n tv.setGravity(Gravity.CENTER);\n\n // Set the TextView text font family and text size\n tv.setTypeface(Typeface.SANS_SERIF, Typeface.NORMAL);\n tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 12);\n\n // Set the TextView text (GridView item text)\n tv.setText(values.get(position));\n\n // Set the TextView background color\n tv.setBackgroundColor(Color.parseColor(\"#d9d5dc\"));\n\n // Return the TextView widget as GridView item\n return tv;\n }",
"@Override\n public void bindView(View view, Context context, Cursor cursor) {\n TextView subcode = (TextView) view.findViewById(R.id.subjectCodeListView);\n TextView subname = (TextView) view.findViewById(R.id.subjectNameListView);\n // Extract properties from cursor\n String subjectcode = cursor.getString(0);\n String subjectname = cursor.getString(1);\n // Populate fields with extracted properties\n subcode.setText(subjectcode);\n subname.setText(subjectname);\n }",
"public void showData(){\n listName.setText(this.listName);\n listDescription.setText(this.description);\n Double Total = Lists.getInstance().getLists(this.listName).getTotal();\n listTotal.setText(pending.toString());\n\n this.data = FXCollections.observableArrayList(Lists.getInstance().getLists(this.listName).getItems());\n articleColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"name\")\n );\n quantityColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"quantity\")\n );\n priceColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"price\")\n );\n totalColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"total\")\n );\n stateColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"state\")\n );\n this.itemsTable.setItems(data);\n\n }",
"@Override\n public void onBindViewHolder(MyViewHolder viewHolder, int i) {\n viewHolder.name.setText(ps.get(i).getName());\n viewHolder.schar.setText(ps.get(i).getScharr());\n viewHolder.schdep.setText(ps.get(i).getSchdep());\n viewHolder.actar.setText(ps.get(i).getActarr());\n viewHolder.actdep.setText(ps.get(i).getActdep());\n viewHolder.tnum.setText(ps.get(i).getNumber());\n\n\n\n }",
"private void populateUI() {\n\n tipPercentTextView.setText(Double.toString(tipPercent));\n noPersonsTextView.setText(Integer.toString(noPersons));\n populateResultsUI();\n }",
"private void displayContactDetails() {\n bindTextViews();\n populateTextViews();\n }",
"private void displayData() {\n dataBase = mHelper.getWritableDatabase();\n Cursor mCursor = dataBase.rawQuery(\"SELECT * FROM \"\n + DbHelper.TABLE_NAME, null);\n\n userId.clear();\n user_fName.clear();\n user_lName.clear();\n user_size.clear();\n user_pay.clear();\n user_produce.clear();\n user_genre.clear();\n if (mCursor.moveToFirst()) {\n do {\n userId.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_ID)));\n user_fName.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_FNAME)));\n user_lName.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_LNAME)));\n user_size.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_SIZE)));\n user_pay.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_PAY)));\n user_produce.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_PRODUCE)));\n user_genre.add(mCursor.getString(mCursor.getColumnIndex(DbHelper.KEY_GENRE)));\n\n } while (mCursor.moveToNext());\n }\n DisplayAdapter disadpt = new DisplayAdapter(DisplayActivity.this, userId, user_fName, user_lName, user_size, user_pay, user_produce, user_genre);\n userList.setAdapter(disadpt);\n mCursor.close();\n }",
"@Override\n public void onBindViewHolder(MyAdapter.ViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n View holder1, holder2, holder3, holder4;\n holder1 = holder.mView.findViewById(R.id.subText);\n holder2 = holder.mView.findViewById(R.id.dueDateText);\n // holder3 = holder.mView.findViewById(R.id.gradeText);\n// holder4 = holder.mView.findViewById(R.id.descText);\n if (mDataset.get(position).getCourse() != null) {\n ((TextView) holder1).setText(mDataset.get(position).getCourse().getSub());\n }\n if (mDataset.get(position).getDueDate() != null) {\n ((TextView) holder2).setText((CharSequence) mDataset.get(position).getDueDate());\n }\n // ((TextView) holder3).setText(mDataset.get(position).get);\n// ((TextView) holder4).setText(mDataset[position]);\n //.setText(mDataset[position]));\n //setText(mDataset[position]);\n }",
"private void updateText() {\n updateDateText();\n\n TextView weightText = findViewById(R.id.tvWeight);\n TextView lowerBPText = findViewById(R.id.tvLowerBP);\n TextView upperBPText = findViewById(R.id.tvUpperBP);\n\n mUser.weight.sortListByDate();\n mUser.bloodPressure.sortListsByDate();\n\n double weight = mUser.weight.getWeightByDate(mDate.getTime());\n int upperBP = mUser.bloodPressure.getUpperBPByDate(mDate.getTime());\n int lowerBP = mUser.bloodPressure.getLowerBPByDate(mDate.getTime());\n\n weightText.setText(String.format(Locale.getDefault(), \"Paino\\n%.1f\", weight));\n lowerBPText.setText(String.format(Locale.getDefault(), \"AlaP\\n%d\", lowerBP));\n upperBPText.setText(String.format(Locale.getDefault(), \"YläP\\n%d\", upperBP));\n\n ((EditText)findViewById(R.id.etWeight)).setText(\"\");\n ((EditText)findViewById(R.id.etLowerBP)).setText(\"\");\n ((EditText)findViewById(R.id.etUpperBP)).setText(\"\");\n }",
"@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\taProgressDialog.dismiss();\n\n\t\t\ttry {\n\t\t\t\taJSONArray = aJSONObject.getJSONArray(\"Value\");\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tint size = aJSONArray.length();\n\n\t\t\tfor (int I = 0; I < size; I++) {\n\n\t\t\t\tString productName = null, soldQuantity = null, soldAmount = null;\n\t\t\t\tJSONObject mJSONObject;\n\t\t\t\ttry {\n\t\t\t\t\tmJSONObject = aJSONArray.getJSONObject(I);\n\t\t\t\t\tproductName = mJSONObject.getString(\"productName\");\n\t\t\t\t\tsoldQuantity = mJSONObject.getString(\"sellQuantity\");\n\t\t\t\t\tsoldAmount = mJSONObject.getString(\"totalPrice\");\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\t// TableRow aRow = new TableRow(this);\n\t\t\t\tTableRow aRow = new TableRow(TargetProducts.this);\n\n\t\t\t\taRow.setLayoutParams(new LayoutParams(\n\t\t\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));\n\n\t\t\t\tTextView column1 = new TextView(TargetProducts.this);\n\t\t\t\tTextView column2 = new TextView(TargetProducts.this);\n\t\t\t\tTextView column3 = new TextView(TargetProducts.this);\n\n\t\t\t\tcolumn1.setText(productName);\n\t\t\t\tcolumn1.setGravity(Gravity.CENTER);\n\t\t\t\tcolumn1.setPadding(2, 0, 2, 0);\n\t\t\t\tcolumn1.setTextSize(15);\n\t\t\t\tcolumn1.setBackgroundColor(Color.parseColor(\"#dcdcdc\"));\n\t\t\t\tcolumn1.setTextColor(Color.parseColor(\"#000000\"));\n\n\t\t\t\tcolumn2.setText(soldQuantity);\n\t\t\t\tcolumn2.setGravity(Gravity.CENTER);\n\t\t\t\tcolumn2.setPadding(2, 0, 2, 0);\n\t\t\t\tcolumn2.setTextSize(15);\n\t\t\t\tcolumn2.setBackgroundColor(Color.parseColor(\"#d3d3d3\"));\n\t\t\t\tcolumn2.setTextColor(Color.parseColor(\"#000000\"));\n\n\t\t\t\tcolumn3.setText(soldAmount);\n\t\t\t\tcolumn3.setGravity(Gravity.CENTER);\n\t\t\t\tcolumn3.setPadding(2, 0, 2, 0);\n\t\t\t\tcolumn3.setTextSize(15);\n\t\t\t\tcolumn3.setBackgroundColor(Color.parseColor(\"#cac9c9\"));\n\t\t\t\tcolumn3.setTextColor(Color.parseColor(\"#000000\"));\n\n\t\t\t\taRow.addView(column1);\n\t\t\t\taRow.addView(column2);\n\t\t\t\taRow.addView(column3);\n\n\t\t\t\tmyTableLayout.addView(aRow);\n\t\t\t}\n\n\t\t}",
"private void setStatTextViews() {\n TextView numLives = findViewById(R.id.lives);\n numLives.setText(String.valueOf(player.getLives()));\n\n TextView multiplier = findViewById(R.id.currMultiply);\n multiplier.setText(String.valueOf(player.getMultiplier()));\n\n TextView totalPoint = findViewById(R.id.currScore);\n totalPoint.setText(String.valueOf(player.getPoints()));\n }",
"@Override\n public void bindView(View view, Context context, Cursor cursor) {\n // Find fields to populate in inflated template\n TextView textViewListName = view.findViewById(R.id.textView_list_name);\n TextView textViewListNumber = view.findViewById(R.id.textView_list_Number);\n TextView textViewListDescription = view.findViewById(R.id.textView_sub_name);\n\n // Extract properties from cursor\n int getID = cursor.getInt(cursor.getColumnIndexOrThrow(\"food_calories\"));\n String getName = cursor.getString(cursor.getColumnIndexOrThrow(\"food_name\"));\n String getDescription = cursor.getString(cursor.getColumnIndexOrThrow(\"food_description\"));\n\n // Populate fields with extracted properties\n textViewListName.setText(getName);\n textViewListNumber.setText(String.valueOf(getID));\n textViewListDescription.setText(String.valueOf(getDescription));\n }",
"public void generate(GridLayout glr, List<String> inpg){\n\t\ttry{\n\t\t\tif(glr.getRowCount()<1){\n\t\t\t\tfor(int i=0; i<clmn; i++){\n\t\t\t\t\ttv.add(new TextView(this));\n\t\t\t\t\ttv.get(tv.size()-1).setId(id); id++;\n\t\t\t\t\trw.add(GridLayout.spec(0));\n\t\t\t\t\tcl.add(GridLayout.spec(i));\n\t\t\t\t\tglp.add(new GridLayout.LayoutParams(rw.get(i), cl.get(i)));\n\t\t\t\t\tglp.get(glp.size()-1).setGravity(Gravity.FILL);\n\t\t\t\t\ttv.get(tv.size()-1).setLayoutParams(glp.get(glp.size()-1));\n\t\t\t\t\ttv.get(tv.size()-1).setPadding(25,10,25,10);\n\t\t\t\t\tGradientDrawable gd = new GradientDrawable();\n\t\t\t\t\tgd.setColor(Color.WHITE);\n\t\t\t\t\tgd.setCornerRadius(5);\n\t\t\t\t\tgd.setStroke(10, BROWN);\n\t\t\t\t\ttv.get(tv.size()-1).setBackgroundDrawable(gd);\n\t\t\t\t\ttv.get(tv.size()-1).setTextSize(25);\n\t\t\t\t\ttv.get(tv.size()-1).setTextColor(Color.BLACK);\n\t\t\t\t\ttv.get(tv.size()-1).setText(dt.get(i));\n\t\t\t\t\ttv.get(tv.size()-1).setGravity(Gravity.CENTER);\n\t\t\t\t\tglr.addView(tv.get(tv.size()-1), glp.get(glp.size()-1));\n\t\t\t\t}\n\t\t\t}\n\t\t\tint iref = glr.getRowCount()*clmn;\n\t\t\tint rc = glr.getRowCount();\n\t\t\tfor(int i=0; i<inpg.size(); i++){\n\t\t\t\tint r = i/clmn+rc;\n\t\t\t\trw.add(GridLayout.spec(r));\n\t\t\t\tint c = (i)-(r-rc)*clmn;\n\t\t\t\tcl.add(GridLayout.spec(c));\n\t\t\t\tGradientDrawable gd = new GradientDrawable();\n\t\t\t\tgd.setColor(Color.WHITE); // Changes this drawbale to use a single color instead of a gradient\n\t\t\t\tgd.setCornerRadius(5);\n\t\t\t\tgd.setStroke(10, BROWN);\n\t\t\t\tglp.add(new GridLayout.LayoutParams(rw.get(rw.size()-1), cl.get(cl.size()-1)));\n\t\t\t\tglp.get(glp.size()-1).setGravity(Gravity.FILL);\n\n\t\t\t\tswitch(dt.get(c)){\n\n\t\t\t\t\tcase(\"TOTAL\"):\n\t\t\t\t\tcase(\"DUE\"):\n\t\t\t\t\t\ttve.add(new TextView(this));\n\t\t\t\t\t\ttve.get(tve.size()-1).setId(id); id++;\n\t\t\t\t\t\ttve.get(tve.size()-1).setLayoutParams(glp.get(glp.size()-1));\n\t\t\t\t\t\ttve.get(tve.size()-1).setPadding(25,10,25,10);\n\t\t\t\t\t\ttve.get(tve.size()-1).setBackgroundDrawable(gd);\n\t\t\t\t\t\ttve.get(tve.size()-1).setGravity(Gravity.CENTER);\n\t\t\t\t\t\ttve.get(tve.size()-1).setTextSize(20);\n\t\t\t\t\t\ttve.get(tve.size()-1).setTextColor(Color.BLACK);\n\t\t\t\t\t\ttve.get(tve.size()-1).setText(inpg.get(i));\n\t\t\t\t\t\tcv.add(tve.get(tve.size()-1));\n\t\t\t\t\t\tcv.get(cv.size()-1).setTag(i+iref);\n\t\t\t\t\t\tglr.addView(tve.get(tve.size()-1), glp.get(glp.size()-1));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tet.add(new EditText(this));\n\t\t\t\t\t\tet.get(et.size()-1).setId(id); id++;\n\t\t\t\t\t\tet.get(et.size()-1).setLayoutParams(glp.get(glp.size()-1));\n\t\t\t\t\t\tet.get(et.size()-1).setPadding(25,10,25,10);\n\t\t\t\t\t\tet.get(et.size()-1).setBackgroundDrawable(gd);\n\t\t\t\t\t\tet.get(et.size()-1).setGravity(Gravity.CENTER);\n\t\t\t\t\t\tet.get(et.size()-1).setTextSize(20);\n\t\t\t\t\t\tet.get(et.size()-1).setHint(dth.get(c));\n\t\t\t\t\t\tet.get(et.size()-1).setText(inpg.get(i));\n\t\t\t\t\t\tet.get(et.size()-1).setOnFocusChangeListener(this);\n\t\t\t\t\t\tet.get(et.size()-1).setTag(i+iref);\n\t\t\t\t\t\tcv.add(et.get(et.size()-1));\n\t\t\t\t\t\tglr.addView(et.get(et.size()-1), glp.get(glp.size()-1));\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tswitch(dt.get(c)){\n\n\t\t\t\t\t//case(\"DATE\"):\n\t\t\t\t\tcase(\"TIME\"):\n\t\t\t\t\tcase(\"RATE\"):\n\t\t\t\t\tcase(\"TRVL\"):\n\t\t\t\t\tcase(\"PAID\"):\n\t\t\t\t\t\tet.get(et.size()-1).setInputType(number0);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase(\"DUE\"):\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\tDouble grn = Double.valueOf(tve.get(tve.size()-1).getText().toString().substring(1, tve.get(tve.size()-1).length()));\n\t\t\t\t\t\t\tif(grn>0){tve.get(tve.size()-1).setTextColor(Color.RED);}\n\t\t\t\t\t\t\tif(grn<=0){tve.get(tve.size()-1).setTextColor(Color.GREEN);}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(Exception e){\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tToast.makeText(getBaseContext(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t}\n\t}",
"@Override\n\tpublic void setData() {\n\t\tsuper.setData();\n\t\tif (!isAdult) {\n\t\t\ttv_title1.setText(\"作息规律\");\n\t\t\ttv_title2.setText(\"对人态度\");\n\t\t\ttv_title3.setText(\"学习专注\");\n\t\t\ttv_title4.setText(\"爱心善意\");\n\t\t\ttv_title5.setText(\"尊师重教\");\n\t\t\ttv_title6.setText(\"思考行动\");\n\t\t\ttv_title7.setText(\"其 它\");\n\t\t}\n\t\tif (isYesterday) {\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tcal.add(Calendar.DATE, -1);\n\t\t\ttime = new SimpleDateFormat(\"yyyy-MM-dd \").format(cal.getTime());\n\n\t\t} else {\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tcal.add(Calendar.DATE, -2);\n\t\t\ttime = new SimpleDateFormat(\"yyyy-MM-dd \").format(cal.getTime());\n\t\t}\n\t\tHttpUtils.searchTable(UserInfo.instance().getUid(), time, time,\n\t\t\t\tisAdult, this, this);\n\t}",
"private void bindViews() {\n txt_home = (TextView) findViewById(R.id.txt_home);\n txt_progress = (TextView) findViewById(R.id.txt_progress);\n txt_community = (TextView) findViewById(R.id.txt_community);\n txt_profile = (TextView) findViewById(R.id.txt_profile);\n\n txt_home.setOnClickListener(this);\n txt_progress.setOnClickListener(this);\n txt_community.setOnClickListener(this);\n txt_profile.setOnClickListener(this);\n }",
"private void createAndAddViews() {\n \t\t// Create the layout parameters for each field\n \t\tfinal LinearLayout.LayoutParams labelParams = new LinearLayout.LayoutParams(\n \t\t\t\t0, LayoutParams.WRAP_CONTENT, 0.3f);\n \t\tlabelParams.gravity = Gravity.RIGHT;\n \t\tlabelParams.setMargins(0, 25, 0, 0);\n \t\tfinal LinearLayout.LayoutParams valueParams = new LinearLayout.LayoutParams(\n \t\t\t\t0, LayoutParams.WRAP_CONTENT, 0.7f);\n \t\tvalueParams.gravity = Gravity.LEFT;\n \t\tvalueParams.setMargins(0, 25, 0, 0);\n \n \t\t// Add a layout and text views for each property\n \t\tfor (final StockProperty property : m_propertyList) {\n \t\t\tLog.d(TAG, \"Adding row for property: \" + property.getPropertyName());\n \n \t\t\t// Create a horizontal layout for the label and value\n \t\t\tfinal LinearLayout layout = new LinearLayout(this);\n \t\t\tlayout.setLayoutParams(new LinearLayout.LayoutParams(\n \t\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));\n \n \t\t\t// Create a TextView for the label\n \t\t\tfinal TextView label = new TextView(this);\n \t\t\tlabel.setLayoutParams(labelParams);\n \t\t\tlabel.setText(property.getLabelText());\n \t\t\tlabel.setTextAppearance(this, android.R.style.TextAppearance_Medium);\n \t\t\tlayout.addView(label);\n \n \t\t\t// Configure and add the value TextView (created when the property\n \t\t\t// was constructed)\n \t\t\tfinal TextView value = property.getView();\n \t\t\tvalue.setLayoutParams(valueParams);\n \t\t\tvalue.setHint(\"None\");\n \t\t\tvalue.setTextAppearance(this, android.R.style.TextAppearance_Medium);\n \t\t\tvalue.setTypeface(null, Typeface.BOLD);\n \t\t\tlayout.addView(value);\n \n \t\t\t// Add the row to the main layout\n \t\t\tm_resultsLayout.addView(layout);\n \t\t}\n \t}",
"public void setTxtViews(){\n \tupdateTextView(\"Phil Simms\", \"txtPatientName\");\n \tupdateTextView(\"Male\", \"txtPatientGender\");\n \tupdateTextView(\"24\", \"txtPatientAge\");\n \tupdateTextView(\"13\", \"txtPatientRoom\");\n \tupdateTextView(\"Melanoma\", \"txtPatientDiagnosis\");\n \tupdateTextView(\"165\", \"txtPatientWeight\");\n \tupdateTextView(\"10am: Gave tylenol for headache.\", \"txtPatientRecentActions\");\n \tupdateTextView(\"Beach\", \"txtPatientNotes\");\n }",
"@Override\n public View getView(int position, View ConvertView, ViewGroup parent){ ///position starts from zero,one and goes on, parent would be the layout we want to display all elements\n View row=ConvertView; //to optimize we inflate the item only first else we recycle the view using converterView\n if(row==null) {\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n //**View of which we want to convert to java view object\n row = inflater.inflate(R.layout.single_row, parent, false);\n }\n //*****From row view we can access the view items and populate it data\n ImageView imageView = (ImageView)row.findViewById(R.id.imageView);\n TextView myDiscription=(TextView)row.findViewById(R.id.myDescription);\n TextView myTitle=(TextView)row.findViewById(R.id.mytitle);\n\n imageView.setImageResource(images[position]); //postion will incremented automaticlly as views will populate\n myDiscription.setText(description[position]);\n myTitle.setText(titles[position]);\n\n return row;\n }",
"public void setupTextFields(View v) {\n other = (EditText) v.findViewById(R.id.eText_Notes);\n totalTotes = (EditText) v.findViewById(R.id.eText_NumStacked);\n\n other.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n ((ScoutFormActivity) getActivity()).getScoutForm().setENOTES_COLUMN(other.getText().toString());\n }\n });\n\n totalTotes.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n ((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSTOTAL_COLUMN(totalTotes.getText().toString());\n }\n });\n }",
"public void fetRowList() {\n try {\n data.clear();\n if (rsAllEntries != null) {\n ObservableList row = null;\n //Iterate Row\n while (rsAllEntries.next()) {\n row = FXCollections.observableArrayList();\n //Iterate Column\n for (int i = 1; i <= rsAllEntries.getMetaData().getColumnCount(); i++) {\n row.add(rsAllEntries.getString(i));\n }\n data.add(row);\n }\n //connects table with list\n table.setItems(data);\n // cell instances are generated for Order Status column and then colored\n customiseStatusCells();\n\n } else {\n warning.setText(\"No rows to display\");\n }\n } catch (SQLException ex) {\n System.out.println(\"Failure getting row data from SQL \");\n }\n }",
"private void updateView() {\n model.inlezenHighscore();\n for (int i = 0; i < 10; i++) {\n view.getNaamLabels(i).setText(model.getNaam(i));\n view.getScoreLabels(i).setText(model.getScores(i));\n }\n }",
"public void updateTextViews() {\n // Set the inputs according to the initial input from the entry.\n //TextView dateTextView = (TextView) findViewById(R.id.date_textview);\n //dateTextView.setText(DateUtils.formatDateTime(getApplicationContext(), mEntry.getStart(), DateUtils.FORMAT_SHOW_DATE));\n\n EditText dateEdit = (EditText) findViewById(R.id.date_text_edit);\n dateEdit.setText(DateUtils.formatDateTime(this, mEntry.getStart(), DateUtils.FORMAT_NUMERIC_DATE | DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_YEAR | DateUtils.FORMAT_ABBREV_ALL));\n\n EditText startTimeEdit = (EditText) findViewById(R.id.start_time_text_edit);\n startTimeEdit.setText(DateUtils.formatDateTime(this, mEntry.getStart(), DateUtils.FORMAT_SHOW_TIME));\n\n EditText endTimeEdit = (EditText) findViewById(R.id.end_time_text_edit);\n endTimeEdit.setText(DateUtils.formatDateTime(this, mEntry.getEnd(), DateUtils.FORMAT_SHOW_TIME));\n\n\n TextView descriptionView = (TextView) findViewById(R.id.description);\n descriptionView.setText(mEntry.getDescription());\n\n\n enableSendButtonIfPossible();\n }",
"private void loadRec() {\n\t\tString test = \"ID, Name, Amount, Price\\n\";\n\t\t//formatting for string to load into the screen\n\t\tfor(int i=0 ; i< t.items.size() ; i++) {\n\t\t\ttest += (i+1) + \" \" + t.items.get(i).name +\", \" \n\t\t\t\t\t+ t.items.get(i).amount + \n\t\t\t\t\t\", $\"+ t.items.get(i).price +\"\\n\";\n\t\t}\n\t\tthis.reciet.setText(test);\n\t}",
"@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tLayoutInflater inflater=(LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE);\n\t\t\tView v=inflater.inflate(R.layout.custom, null);\n\t\t\t\n\t\t\ttv1=(TextView)v.findViewById(R.id.text1);\n\t\t\ttv1.setText(names[position]);\n\t\t\t\n\t\t\t\n\t\t\ttv2=(TextView)v.findViewById(R.id.text2);\n\t\t\ttv2.setText(phones[position]);\n\t\t\t\n\t\t\t\n\t\t\treturn v;\n\t\t}",
"@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\taProgressDialog.dismiss();\n\n\t\t\t// Toast.makeText(TargetProducts.this, aJSONObject.toString(),\n\t\t\t// Toast.LENGTH_LONG).show();\n\n\t\t\ttry {\n\t\t\t\taJSONArray = aJSONObject.getJSONArray(\"Value\");\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tint size = aJSONArray.length();\n\n\t\t\tfor (int I = 0; I < size; I++) {\n\n\t\t\t\tString productName = null, soldQuantity = null, soldAmount = null;\n\t\t\t\tJSONObject mJSONObject;\n\t\t\t\ttry {\n\t\t\t\t\tmJSONObject = aJSONArray.getJSONObject(I);\n\t\t\t\t\tproductName = mJSONObject.getString(\"productName\");\n\t\t\t\t\tsoldQuantity = mJSONObject.getString(\"sellQuantity\");\n\t\t\t\t\tsoldAmount = mJSONObject.getString(\"totalPrice\");\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\t// TableRow aRow = new TableRow(this);\n\t\t\t\tTableRow aRow = new TableRow(TargetProducts.this);\n\n\t\t\t\taRow.setLayoutParams(new LayoutParams(\n\t\t\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));\n\n\t\t\t\tTextView column1 = new TextView(TargetProducts.this);\n\t\t\t\tTextView column2 = new TextView(TargetProducts.this);\n\t\t\t\tTextView column3 = new TextView(TargetProducts.this);\n\n\t\t\t\tcolumn1.setText(productName);\n\t\t\t\tcolumn1.setGravity(Gravity.CENTER);\n\t\t\t\tcolumn1.setPadding(2, 0, 2, 0);\n\t\t\t\tcolumn1.setTextSize(15);\n\t\t\t\tcolumn1.setBackgroundColor(Color.parseColor(\"#dcdcdc\"));\n\t\t\t\tcolumn1.setTextColor(Color.parseColor(\"#000000\"));\n\n\t\t\t\tcolumn2.setText(soldQuantity);\n\t\t\t\tcolumn2.setGravity(Gravity.CENTER);\n\t\t\t\tcolumn2.setPadding(2, 0, 2, 0);\n\t\t\t\tcolumn2.setTextSize(15);\n\t\t\t\tcolumn2.setBackgroundColor(Color.parseColor(\"#d3d3d3\"));\n\t\t\t\tcolumn2.setTextColor(Color.parseColor(\"#000000\"));\n\n\t\t\t\tcolumn3.setText(soldAmount);\n\t\t\t\tcolumn3.setGravity(Gravity.CENTER);\n\t\t\t\tcolumn3.setPadding(2, 0, 2, 0);\n\t\t\t\tcolumn3.setTextSize(15);\n\t\t\t\tcolumn3.setBackgroundColor(Color.parseColor(\"#cac9c9\"));\n\t\t\t\tcolumn3.setTextColor(Color.parseColor(\"#000000\"));\n\n\t\t\t\taRow.addView(column1);\n\t\t\t\taRow.addView(column2);\n\t\t\t\taRow.addView(column3);\n\n\t\t\t\tmyTableLayout.addView(aRow);\n\t\t\t}\n\n\t\t}",
"@Override\n public void setView(View row){\n TextView uid = row.findViewById(R.id.user_uid);\n TextView name = row.findViewById(R.id.user_name);\n TextView agender = row.findViewById(R.id.user_agender);\n\n uid.setText(\"UID: \" + this.id);\n name.setText(this.name);\n agender.setText(this.gender + \", DOB: \" + this.dob);\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n ViewHolder viewHolder;\n if(convertView == null){\n viewHolder = new ViewHolder();\n LayoutInflater lukesInflater = LayoutInflater.from(getContext());\n convertView = lukesInflater.inflate(R.layout.infolink_row, parent, false);\n viewHolder.urlTitle = (TextView) convertView.findViewById(R.id.urlTitle);\n viewHolder.urlText = (TextView) convertView.findViewById(R.id.urlText);\n convertView.setTag(viewHolder);\n }else{\n viewHolder = (ViewHolder) convertView.getTag();\n }\n\n //Populate the data into the view using data object\n\n InfoLink infoLink = getItem(position);\n\n\n viewHolder.urlTitle.setText(infoLink.getDisplayName());\n viewHolder.urlText.setText(infoLink.getUrl());\n\n viewHolder.urlTitle.setTextColor(Color.DKGRAY);\n viewHolder.urlText.setTextColor(Color.DKGRAY);\n\n return convertView;\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent){\n View view = super.getView(position, convertView, parent);\n\n // Initialize a TextView for ListView each Item\n TextView tv = (TextView) view.findViewById(android.R.id.text1);\n\n // Set the text color of TextView (ListView Item)\n tv.setTextColor(Color.WHITE);\n // Generate ListView Item using TextView\n return view;\n }",
"public void setarText() {\n txdata2 = (TextView) findViewById(R.id.txdata2);\n txdata1 = (TextView) findViewById(R.id.txdata3);\n txCpf = (TextView) findViewById(R.id.cpf1);\n txRenda = (TextView) findViewById(R.id.renda1);\n txCpf.setText(cpf3);\n txRenda.setText(renda.toString());\n txdata1.setText(data);\n txdata2.setText(data2);\n\n\n }",
"void bind(int listIndex){\n cursor.moveToPosition(listIndex);\n\n projectName = cursor.getString(cursor.getColumnIndex(Contract.TABLE_PROJECT.COLUMN_NAME_TITLE));\n numberOfTask = cursor.getString(cursor.getColumnIndex(Contract.TABLE_PROJECT.COLUMN_NAME_NUMBER_OF_TASKS));\n projectId = cursor.getInt(cursor.getColumnIndex(Contract.TABLE_PROJECT._ID));\n\n if(numberOfTask.equals(\"0\")){\n if (excelExportButton.getVisibility()==View.VISIBLE)\n excelExportButton.setVisibility(View.INVISIBLE);\n\n }else {\n if(numberOfTask.equals(\"1\")){\n itemProjectName.setText(projectName + \" ( \" + numberOfTask + \" task )\");\n }\n else{\n itemProjectName.setText(projectName + \" ( \" + numberOfTask + \" tasks )\");\n }\n\n if (excelExportButton.getVisibility()==View.INVISIBLE)\n excelExportButton.setVisibility(View.VISIBLE);\n }\n }",
"@Override\n public View getView(final int i, View convertView, ViewGroup parent) {\n\n if (convertView == null) {\n li = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n convertView = li.inflate(R.layout.row_speaker, null);\n h = new ViewHolder(convertView);\n convertView.setTag(h);\n\n } else {\n h = (ViewHolder) convertView.getTag();\n }\n\n\n //___________________set data___________________\n h.sl.setText(list.get(i).sl+\". \");\n h.name.setText( list.get(i).name);\n h.topic.setText(list.get(i).topicExtra);\n\n\n /* h.theme.setText(list.get(i).themeExtra);\n h.country.setText(list.get(i).countryExtra);\n h.digit.setText(list.get(i).digitExtra);*/\n\n // hideBlankTextView();\n\n\n h.cardView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n A.setPerson(list.get(i));\n DialogFragment dialog = new InfoDialog();\n dialog.show(((AppCompatActivity) context).getSupportFragmentManager(), \"dialog\");\n }\n });\n return convertView;\n }",
"private void update_text() {\n\n if(i < text_data.length) {\n i++;\n // text_data.setText(String.valueOf(i)); = avoid the RunTime error\n myHandler.post(myRunnable); // relate this to a Runnable\n } else {\n myTimer.cancel(); // stop the timer\n return;\n }\n }",
"private void fillData() {\n table.setRowList(data);\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n History user = getItem(position);\n // Check if an existing view is being reused, otherwise inflate the view\n if (convertView == null) {\n convertView = LayoutInflater.from(getContext()).inflate(R.layout.activity_riwayat2, parent, false);\n }\n // Lookup view for data population\n TextView tvTanggal = (TextView) convertView.findViewById(R.id.tanggalTextViewID);\n TextView tvRS = (TextView) convertView.findViewById(R.id.RSTextViewID);\n TextView tvPoli = (TextView) convertView.findViewById(R.id.PoliTextViewID);\n // Populate the data into the template view using the data object\n tvTanggal.setText(user.ambilTanggalHis());\n tvRS.setText(user.ambilNamaRSHis());\n tvPoli.setText(user.ambilNamaPoliHis());\n // Return the completed view to render on screen\n return convertView;\n }",
"public void updateViews() {\n textView.setText(contactName);\n\n }",
"public void populateDetails() {\n\n txtpn_NameHeading.setText(selStudent.getfName() + \" \" + selStudent.getlName());\n\n txtpn_RacesComplete.setText(String.valueOf(dataCur.countNumberRaces(selStudent.getId())));\n txtpn_DaysAbsent.setText(String.valueOf(selStudent.getAttend()));\n txtpn_AgeGroup.setText(String.valueOf(selStudent.getAge()));\n\n }",
"@Override\n public View getView(final int position, View convertView, ViewGroup parent) {\n Holder holder=new Holder();\n View rowView;\n\n rowView = inflater.inflate(R.layout.sample_gridlayout, null);\n holder.os_text =(TextView) rowView.findViewById(R.id.os_texts);\n holder.os_img =(ImageView) rowView.findViewById(R.id.os_images);\n\n holder.os_text.setText(result[position]);\n holder.os_img.setImageResource(imageId[position]);\n\n rowView.setOnClickListener(new OnClickListener() {\n double years;\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n switch (result[position]){\n case \"Java\": years = 8;\n break;\n case \"Python\": years = 6;\n break;\n case \"C\": years = 6;\n break;\n case \"Embedded\": years = 6;\n break;\n case \"C++\": years = 6;\n break;\n case \"XML\": years = 0.25;\n break;\n case \"JavaScript\": years = 1;\n break;\n case \"IAM\": years = 1;\n break;\n case \"SQL\": years = 7;\n break;\n case \"Automation\": years = 3;\n break;\n }\n Toast.makeText(context, result[position]+\" Experience: \"+years+ \" years\", Toast.LENGTH_SHORT).show();\n }\n });\n\n return rowView;\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position, convertView, parent);\n\n // Initialize a TextView for ListView each Item\n TextView tv = (TextView) view.findViewById(android.R.id.text1);\n\n // Set the text color of TextView (ListView Item)\n tv.setTextColor(Color.BLACK);\n\n // Generate ListView Item using TextView\n return view;\n }",
"private void loadData() {\n\n // connect the table column with the attributes of the patient from the Queries class\n id_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"pstiantID\"));\n name_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n date_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"reserveDate\"));\n time_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"reserveTime\"));\n\n try {\n\n // database related code \"MySql\"\n ps = con.prepareStatement(\"select * from visitInfo \");\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n\n // load data to the observable list\n editOL.add(new Queries(new SimpleStringProperty(rs.getString(\"id\")),\n new SimpleStringProperty(rs.getString(\"patiantID\")),\n new SimpleStringProperty(rs.getString(\"patiant_name\")),\n new SimpleStringProperty(rs.getString(\"visit_type\")),\n new SimpleStringProperty(rs.getString(\"payment_value\")),\n new SimpleStringProperty(rs.getString(\"reserve_date\")),\n new SimpleStringProperty(rs.getString(\"reserve_time\")),\n new SimpleStringProperty(rs.getString(\"attend_date\")),\n new SimpleStringProperty(rs.getString(\"attend_time\")),\n new SimpleStringProperty(rs.getString(\"payment_date\")),\n new SimpleStringProperty(rs.getString(\"attend\")),\n new SimpleStringProperty(rs.getString(\"attend_type\"))\n\n ));\n }\n\n // assigning the observable list to the table\n table_view_in_edit.setItems(editOL);\n\n ps.close();\n rs.close();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }",
"public View getView(int position, View convertView, ViewGroup parent) {\n\n LayoutInflater myCustomInflater = LayoutInflater.from(getContext());\n View customView = myCustomInflater.inflate(R.layout.customrow, parent, false);\n\n\n TextView startOdo = (TextView) customView.findViewById(R.id.startOdo);\n TextView endOdo = (TextView) customView.findViewById(R.id.endOdo);\n TextView date = (TextView) customView.findViewById(R.id.date);\n TextView note = (TextView) customView.findViewById(R.id.note);\n\n String startOdo1 = String.valueOf(getItem(position).getStartOdo());\n String endOdo1 = String.valueOf(getItem(position).getEndOdo());\n String date1 = getItem(position).getDate();\n String note1 = getItem(position).getNote();\n\n\n startOdo.setText(\"Starting Odometer: \" + startOdo1);\n endOdo.setText(\"Ending Odometer: \" + endOdo1);\n date.setText(\"Date: \" + date1);\n note.setText(note1);\n\n return customView;\n\n }",
"private void populateFriendsTables(){\r\n TableLayout tl = (TableLayout) findViewById(R.id.friendTable);\r\n tl.removeAllViews();\r\n TableRow row, titleRow;\r\n TextView view, titleViewEmail, tileViewButton;\r\n\r\n List<String> friends = (List<String>) mFriendData.get(\"friends\");\r\n\r\n titleRow = new TableRow(getApplicationContext());\r\n titleViewEmail = new TextView(getApplicationContext());\r\n titleViewEmail.setText(\"Friend Email\");\r\n titleViewEmail.setPadding(20, 20, 20, 20);\r\n\r\n tileViewButton = new TextView(getApplicationContext());\r\n tileViewButton.setText(\"Remove\");\r\n tileViewButton.setPadding(20, 20, 20, 20);\r\n\r\n titleRow.addView(titleViewEmail);\r\n titleRow.addView(tileViewButton);\r\n\r\n tl.addView(titleRow);\r\n for (String email : friends) {\r\n row = new TableRow(getApplicationContext());\r\n view = new TextView(getApplicationContext());\r\n view.setText(email);\r\n view.setPadding(20, 20, 20, 20);\r\n\r\n TextView button = new Button(getApplicationContext());\r\n button.setText(\"Remove Friend\");\r\n button.setPadding(20, 20, 20, 20);\r\n\r\n row.addView(view);\r\n row.addView(button);\r\n tl.addView(row);\r\n }\r\n }",
"@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n holder.tv.setText(arr.get(position));\n\n // .setText(arr[position]);\n // ((ImageView)temp.findViewById(R.id.iconimage)).setImageResource(ico[position]);\n\n }",
"public void llenar2(ArrayList<String> values1,ArrayList<String[]> values,String txt){\n this.txt.setText(txt);\n DefaultTableModel t=new DefaultTableModel();\n for (int i = 0; i < values1.size(); i++) {\n t.addColumn(values1.get(i));\n }\n this.tv.setModel(t);\n for (int i = 0; i < values.size(); i++) {\n String array[]=values.get(i);\n t.addRow(array);\n \n }\n this.tv.setModel(t);\n \n \n \n }",
"public void update() {\r\n\t\tfor (int i = 0; i < myRows; i++)\r\n\t\t\tfor (int j = 0; j < myColumns; j++)\r\n\t\t\t\tsetCellText(cellArray[i][j]);\r\n\t}"
] | [
"0.6982313",
"0.68894213",
"0.6501424",
"0.6433317",
"0.6420944",
"0.6319818",
"0.6300091",
"0.62764186",
"0.6272075",
"0.6235838",
"0.6232366",
"0.622781",
"0.6196356",
"0.61860996",
"0.61660516",
"0.6153516",
"0.61533123",
"0.6152946",
"0.615213",
"0.6126933",
"0.6105129",
"0.60882914",
"0.607675",
"0.6024062",
"0.60065645",
"0.5999325",
"0.5993697",
"0.598658",
"0.59843993",
"0.5982421",
"0.59797597",
"0.5965169",
"0.59632385",
"0.5954408",
"0.5953609",
"0.59462035",
"0.59436697",
"0.5941593",
"0.5932617",
"0.5931511",
"0.5925044",
"0.5922907",
"0.59207845",
"0.5902897",
"0.58976257",
"0.58644634",
"0.5863738",
"0.5862391",
"0.5856274",
"0.5852786",
"0.58439887",
"0.5838902",
"0.58386487",
"0.58358115",
"0.58295363",
"0.5824998",
"0.5824998",
"0.5824998",
"0.58212364",
"0.581312",
"0.5810428",
"0.58070785",
"0.5801854",
"0.5801823",
"0.57997787",
"0.57808965",
"0.57764995",
"0.57694143",
"0.57689375",
"0.57501066",
"0.5749263",
"0.5744395",
"0.5741237",
"0.5716004",
"0.57075727",
"0.57039833",
"0.5700748",
"0.569872",
"0.5697314",
"0.5696966",
"0.5692014",
"0.56886995",
"0.56871796",
"0.5683634",
"0.5677271",
"0.56772685",
"0.56687206",
"0.5667931",
"0.5666374",
"0.5661541",
"0.5643162",
"0.5641221",
"0.5640471",
"0.56371915",
"0.56324154",
"0.5631275",
"0.563107",
"0.5630778",
"0.56274873",
"0.5622625",
"0.56226057"
] | 0.0 | -1 |
total number of rows | @Override
public int getItemCount() {
return mData.size();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int totalRowsCount();",
"int getRowsCount();",
"public int getTotalRows();",
"int getRowsAmount();",
"public int getNumRows() {\n\t\treturn NUM_ROWS; \n\t}",
"public abstract int getNumOfRows();",
"public abstract int getNumRows();",
"public int getRowsCount() {\n return rows_.size();\n }",
"public int getRowsCount() {\n return rows_.size();\n }",
"public int getNumRows() { \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Getter for the number of rows\n\t\treturn numRows; \n\t}",
"public int getNumRows () {\n\t\treturn numrows_;\n\t}",
"public int getRows() {\n\t\treturn NUM_OF_ROWS;\n\t}",
"public int getNumRows() { return numRows; }",
"public int getRowCount() {\r\n\t\treturn(noOfRows);\r\n\t}",
"public int getRowCount();",
"public int getNumRows() {\n\t\treturn numRows;\n\t}",
"int getRowCount();",
"int getRowCount();",
"int getRowCount();",
"int getRowCount();",
"int getRowCount();",
"int getRowCount();",
"int getRowCount();",
"private int numRows(){\n return attrTable.getModel().getRowCount();\n }",
"public int getRowCount() {\r\n //return outputs.length;\r\n return NUM_ROW;\r\n }",
"public int getNumRows() {\n return numRows;\n }",
"public int getNumRows() {\n return numRows;\n }",
"public int size() {\n return numberOfRows();\n }",
"public int getRowCount()\n {\n return numRows;\n }",
"public int getTotalRowCount() {\r\n return totalRowCount;\r\n }",
"public int getNumberOfRows() {\n return this.numberOfRows;\n }",
"public int getnRows() {\n return nRows;\n }",
"public int getnRows() {\n return nRows;\n }",
"public int numberOfRows(){\n SQLiteDatabase db = this.getReadableDatabase();\n int numRows = (int) DatabaseUtils.queryNumEntries(db,TABLE_NAME);\n return numRows;\n }",
"public int getRowCount() {\n\t\treturn(data.length);\n\t}",
"int countRows() throws IOException {\n Scan s = new Scan();\n ResultScanner rs = tbl.getScanner(s);\n int i = 0;\n while(rs.next() !=null) {\n i++;\n }\n return i;\n }",
"int getTotalsRowCount();",
"public int getRowCount() { return this.underlying.getRowCount(); }",
"public int numberOfRows() {\n\t\treturn rowCount;\n\t}",
"private int getJTableNumberOfRows() {\n\n\t\tint count = 0; /* create a integer object for rows count */\n\t\tConnection connection = null;\n\t\tStatement statement = null;\n\t\ttry {\n\t\t\tconnection = DriverManager.getConnection(DATABASE_URL, UserName_SQL, Password_SQL);\n\t\t\tstatement = connection.createStatement();\n\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT COUNT(*) as numberOfRows FROM invoice\");\n\t\t\tresultSet.next();\n\t\t\tcount = resultSet.getInt(\"numberOfRows\");\n\t\t\tresultSet.close();\n\t\t} // end try\n\t\tcatch (SQLException sqlException) {\n\t\t\tsqlException.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t} // end catch\n\t\tfinally // ensure statement and connection are closed properly\n\t\t{\n\t\t\ttry {\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t} // end try\n\t\t\tcatch (Exception exception) {\n\t\t\t\texception.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t} // end catch\n\t\t} // end finally\n\t\treturn count; /* return the result of rows count */\n\t}",
"public int getRowCount() {\r\n return this.data.length;\r\n }",
"public int getActualRowCount() {\r\n int ret = 0;\r\n if (rows != null) ret = rows.size();\r\n return ret;\r\n }",
"public int resultCount(){\n\n int c = 0;\n\n try{\n if(res.last()){\n c = res.getRow();\n res.beforeFirst();\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return c;\n }",
"public int getRows();",
"public int getRows();",
"int totalRows(){\n return row;\n }",
"public int rowCount() {\n\t\treturn n_;\n\t}",
"public int getRowCount() {\n return _data.size();\n }",
"public int getRowCount()\n\t{\n\t\treturn datas.size();\n\t}",
"double getRowCount();",
"public int getRowCount() {\n\t\treturn(data.size());\n\t}",
"public int getRowCount() {\n return row_.size();\n }",
"public int getRowCount() {\n return row_.size();\n }",
"public int getRowCount() {\n return row_.size();\n }",
"public int getRowCount() {\n return row_.size();\n }",
"public int getRowCount() {\n return row_.size();\n }",
"public int getRowCount() {\n return row_.size();\n }",
"public int getRowCount() {\n\t\treturn this.records.size();\n\t}",
"@Override\n\tpublic int getNumRows() {\n\t\treturn 0;\n\t}",
"public int rows() {\n\treturn rows;\n}",
"public int getRowCount() {\n return data.size();\n }",
"public int getRowCount() {\n return data.length;\n }",
"int getRows();",
"int getRows();",
"@Transactional\n\t\tpublic Long getNumberRows (){\n\t\t\n\t\t\treturn pharmacyRepository1.getNumberOfRows();\n\t\t\t\n\t\t}",
"public long getNRowsTotal() {\n return cGetNRowsTotal(this.cObject);\n }",
"@Override\n\t\tpublic int getRowCount() \n\t\t{\n\t\t\treturn tables.size();\n\t\t}",
"public int getRowSize() {\n \t\treturn this.rows;\n \t}",
"public int getRowCount()\r\n\t{\r\n\t\treturn rowCount;\r\n\t}",
"int getNumberOfRows() {\n lock.readLock().lock();\n try {\n return extensionPointPluginMap.rowMap().size();\n } finally {\n lock.readLock().unlock();\n }\n }",
"public int getRowCount()\n\t{\n\t\treturn m_data.rows.size();\n\t}",
"public int numberOfRows(){\n int numRows = (int) DatabaseUtils.queryNumEntries(db, TRACKINGS_TABLE_NAME);\n return numRows;\n }",
"public int getRows()\n\t{\n\t\treturn rows;\n\t}",
"public int getRowCount() {\n return noeuds.size();\n }",
"public int getRowCount() {\n return 0;\n }",
"@Override\r\n\tpublic long getTotalRows() {\n\t\treturn warehouseDao.getTotalRows();\r\n\t}",
"@Override\r\n\tpublic int getRowCount() {\n\t\treturn rowData.length;\r\n\t}",
"public int getRowCount() {\r\n return this.rowCount;\r\n }",
"public int getRowCount(){\n return dataEntries.length;\n }",
"int rowCount();",
"@Override\n public int getRowCount() {\n \n return data.size();\n }",
"@Override\n\tpublic int getRowCount() {\n\t\treturn records.size();\n\t}",
"public int getNumRows() {\n\t\treturn this.subset.length;\n\t}",
"public int total(){\n int rows = 0;\n \n try {\n rs = stmt.executeQuery \n (\"SELECT * FROM JEREMY.TICKET\");\n while (rs.next()) {rows++;}\n System.out.println(\"There are \"+ rows + \" record in the table\"); \n \n } catch (Exception e) {}\n \n return rows;\n }",
"public int getRowCount() {\n return this.rowCount;\n }",
"@Override\r\n public int getRowCount() {\n if (leitores != null) {\r\n return leitores.size();\r\n }\r\n return 0;\r\n }",
"public int getRowCount() {\n\t\treturn rowcount;\n\t}",
"public static int rowCount() {\n\t return sheet.getPhysicalNumberOfRows();\n\t}",
"@Override\r\n public int getRowCount() {\n return this.rowData.size();\r\n }",
"public int getRows() {\n\treturn rows;\n }",
"@Override\n\tpublic int getRowCount() {\n\t\treturn rowData.size();\n\t}",
"@Override\n public int getRowCount() {\n return this.data.length;\n }",
"@Override\n\tpublic int getRowCount() {\n\t\treturn data.length;\n\t}",
"@Override\n\tpublic int getRowCount() {\n\t\treturn data.length;\n\t}",
"public static int RowCount()\r\n\t{\r\n\t\treturn wrksheet.getRows();\r\n\t}",
"public int getRowCount()\n {\n return al.size();\n }",
"@Override\r\n\tpublic int getRowCount() {\n\t\t\r\n\t\treturn variableData.size();\r\n\t}",
"public int getRows() {\n\t\treturn rows;\n\t}",
"public int getRows() {\n\t\treturn rows;\n\t}",
"public int getRowCount() {\n if (rowBuilder_ == null) {\n return row_.size();\n } else {\n return rowBuilder_.getCount();\n }\n }",
"public int getRowCount() {\n if (rowBuilder_ == null) {\n return row_.size();\n } else {\n return rowBuilder_.getCount();\n }\n }"
] | [
"0.89423",
"0.8816092",
"0.8756285",
"0.83867955",
"0.826321",
"0.8253855",
"0.82385814",
"0.8223367",
"0.813764",
"0.80901676",
"0.806456",
"0.80634147",
"0.80603546",
"0.8012233",
"0.7973971",
"0.79449266",
"0.79239774",
"0.79239774",
"0.79239774",
"0.79239774",
"0.79239774",
"0.79239774",
"0.79239774",
"0.79187477",
"0.79165345",
"0.78954744",
"0.78954744",
"0.787209",
"0.7869677",
"0.7865936",
"0.7863243",
"0.7847828",
"0.7847828",
"0.78190917",
"0.781285",
"0.78098345",
"0.7807746",
"0.7804547",
"0.77874625",
"0.7786358",
"0.7758551",
"0.77461916",
"0.77429044",
"0.77424127",
"0.77424127",
"0.77380383",
"0.77260375",
"0.77213657",
"0.7713713",
"0.770821",
"0.77000666",
"0.7685215",
"0.7685215",
"0.7685215",
"0.7685215",
"0.7685215",
"0.7685215",
"0.7671131",
"0.76577103",
"0.76486516",
"0.7643908",
"0.7640068",
"0.7638655",
"0.7638655",
"0.76261526",
"0.7618294",
"0.76177806",
"0.7617056",
"0.7613704",
"0.7608602",
"0.76078916",
"0.7602616",
"0.75951755",
"0.7591753",
"0.75908965",
"0.7588797",
"0.7588495",
"0.7578705",
"0.7576107",
"0.7565837",
"0.7556519",
"0.75512236",
"0.75457895",
"0.75342155",
"0.7527505",
"0.75253457",
"0.75106597",
"0.7498647",
"0.7498612",
"0.7498525",
"0.7485869",
"0.74843025",
"0.74822074",
"0.74822074",
"0.7470514",
"0.7470262",
"0.7467684",
"0.7462442",
"0.7462442",
"0.7461483",
"0.7461483"
] | 0.0 | -1 |
convenience method for getting data at click position | public ConversationDMResponse getItem(int id) {
return mData.get(id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Point userClickPoint();",
"public interface ClickedPosition {\n\n public void getClickedPosition(int position);\n\n}",
"public void getDataButtonClicked() {\n\n //we will get data heree.....>>>\n getdata();\n\n\n }",
"public Point getclickedPoint() {\r\n return clickedPoint;\r\n }",
"public Flowable<Point2D> readMouseClick() {\n return mouseClick;\n }",
"public Object getData(Component componentAt, Point location);",
"@Override\n public void onClick(View v) {\n\n listener.onClickPosition(getAdapterPosition());\n // Log.d(\"TAG\", \"Element \" + getAdapterPosition() + \" clicked. \");\n }",
"@Override\n public void onItemClicked(int itemPosition, Object dataObject) {\n }",
"public E getData(int pos) {\n\t\tif (pos >= 0 && pos < dataSize()) {\n\t\t\treturn data.get(pos);\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}",
"public MovieInfo onItemClick(View view, int position) {\n //String movieInfoToastTest = \"You clicked movie \" + getItemTitle(position) + \", which is at cell position \" + position;\n return getItem(position);\n }",
"public BubbleData getBubbleData() { return (BubbleData)this.mData; }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Log.w(TAG , \"POSITION : \" + position);\n\n itemClick(position);\n }",
"@Override\r\n\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tdata(childPosition, groupPosition);\r\n\r\n\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}",
"@Override\n public void onClick(View view) {\n int position = getAdapterPosition();\n\n // Check if listener!=null bcz it is not guarantee that we'll call setOnItemClickListener\n // RecyclerView.NO_POSITION - Constant for -1, so that we don't click item at Invalid position (safety measure)\n if (listener != null && position != RecyclerView.NO_POSITION) {\n //listener.onItemClick(notes.get(position)); - used in RecyclerView.Adapter\n listener.onItemClick(getItem(position)); // getting data from superclass\n }\n }",
"Object getDataValue(final int row, final int column);",
"TraceDataView data();",
"@Override\n public void itemClick(int pos) {\n }",
"@Override\r\n public void onClick(View view) {\n\r\n getData();\r\n }",
"public abstract int [] getPressPosition();",
"@Override\n public void onClick(int position, Object obj) {\n }",
"public double getDataPoint(int i) {\n\t\treturn data[i];\n\t}",
"public void mousePressed(MouseEvent e) {\n mouseX = e.getX();\n mouseY = e.getY();\n\n lastClicked = canvas.getElementAt(new GPoint(e.getPoint()));\n\n }",
"@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tDataInfo info1 = (DataInfo) arg0.getTag();\n\t\t\tSystem.out.println(\"MyDownloadVideoActivity on item clicked\" + \"name = \" + info1.getName() + \"position = \" + info1.getPosition() + \"url = \" + info1.getUrl() );\t\n\t\t\t\n\t\t\tif(info1.getSecurity()!=null &&info1.getSecurity().equals(\"1\")){\n\t\t\t\tshowInputPsw(info1);\n\t\t\t}else{\n\t\t\t\texecute(info1);\n\t\t\t}\n\t\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tLog.i(\"TEST\",\"onItemClick\");\n\t\t\t\tIntent NextIntent = new Intent(mContext, ViewActivity.class);\n\t\t\t\tNextIntent.putExtra(\"data\", mData.get(position));\n\t\t\t\tstartActivity(NextIntent);\n\t\t\t\t\n\t\t\t}",
"void onItemClick(int position);",
"private void retrieveLocationClicked() {\n locationClikedId = getIntent().getIntExtra(GeneralConstants.EDIT_LOCATION_DETAILS_KEY, 0);\n }",
"@Override\npublic void mouseClicked(MouseEvent e)\n{\n\tSystem.out.println(e.getX() + \" :: \" + e.getY());\n}",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n int itemPosition = position;\n\n // ListView Clicked item value\n String itemValue = (String) listView.getItemAtPosition(position);\n\n // Show Alert\n Toast.makeText(getApplicationContext(), \"Position :\" + itemPosition + \" ListItem : \" + itemValue , Toast.LENGTH_LONG).show();\n }",
"@Override\n public void onItemClick(int pos) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n int itemPosition = position;\n\n // ListView Clicked item value\n String itemValue = (String) listView.getItemAtPosition(position);\n\n // Show Alert\n Toast.makeText(getApplicationContext(),\n \"Position :\" + itemPosition + \" ListItem : \" + itemValue, Toast.LENGTH_LONG)\n .show();\n\n }",
"void mouseClicked(double x, double y, MouseEvent e );",
"public interface ClickListener {\n void onPositionClicked(int position);\n}",
"public void mouseClicked(MouseEvent e) {\n System.out.println(e.getX()+\" \"+e.getY());\n \n switch(state){\n case DEFAULT:\n if(e.isMetaDown()){\n String info = \"\";\n \n }\n break;\n \n case ROAD_BUILDING:\n //TODO\n break;\n \n case SETTLEMENT_BUILDING:\n //TODO\n break;\n \n case CITY_BUILDING:\n //TODO\n break;\n \n case ROBBER:\n int[] coordinates = new int[2];\n //coordinates[0]\n break;\n }\n }",
"String getDataFromScreen();",
"public int getData(int index) {\n return data_.get(index);\n }",
"public Object getOnclick() {\r\n\t\treturn getOnClick();\r\n\t}",
"public void mouseClicked(int mouseX, int mouseY, int mouse) {}",
"@Override\n public void clicked(InputEvent e, float x, float y) {\n }",
"@Override\r\n public void onClick(View view) {\r\n Toast.makeText(context, \"satu\" +list_data.get(getAdapterPosition()), Toast.LENGTH_SHORT).show();\r\n\r\n }",
"public interface RecyclerViewClickListener {\n\n public void onClick(View v, int position, int[] coordination);\n}",
"@Override\r\n public void onItemClick(AdapterView<?> parent, View view,\r\n int position, long id) {\n int itemPosition = position;\r\n\r\n // ListView Clicked item value\r\n String itemValue = (String) listView.getItemAtPosition(position);\r\n\r\n // Show Alert\r\n Toast.makeText(getApplicationContext(),\r\n \"Position :\"+itemPosition+\" ListItem : \" +itemValue , Toast.LENGTH_LONG)\r\n .show();\r\n }",
"public Data getDataAt(Address addr);",
"void clickItem(int uid);",
"E getData(int index);",
"public int getData(int index) {\n return data_.get(index);\n }",
"@Override\n public void OnItemClick(int position) {\n }",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tint x = e.getX();\n\t\tint y = e.getY();\n\t\tSystem.out.println(x);\n\t\tSystem.out.println(y);\n\t}",
"void onChamaItemClicked(int position);",
"public void handleItemClick(Integer position) {\n\n\n if(position>=mDataset.size() || position <0){\n //not valid\n }\n else {\n //go to study view for this flashcard set\n Intent intent = new Intent(this, FlashcardActivity.class);\n intent.putExtra(\"setId\", mDataset.get(position).getSetId());\n intent.putExtra(\"setName\", mDataset.get(position).getName());\n startActivity(intent);\n }\n\n\n }",
"@Override\r\n public void onItemClick(AdapterView<?> parent, View view,\r\n int position, long id) {\n int itemPosition = position;\r\n\r\n // ListView Clicked item value\r\n String itemValue = (String) listView.getItemAtPosition(position);\r\n\r\n // Show Alert\r\n Toast.makeText(getApplicationContext(),\r\n \"Position :\"+itemPosition+\" ListItem : \" +itemValue , Toast.LENGTH_LONG)\r\n .show();\r\n\r\n }",
"@Override\n\t\t \t public void onItemClick(AdapterView<?> arg0, View arg1,int position, long arg3) {\n\t\t \t \n\t\t \t Toast.makeText(getApplicationContext(), \"Clicked at Position\"+position, Toast.LENGTH_SHORT).show();\n\t\t \t }",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {\n\t\tToast.makeText(this, \"Selected=\"+data[position], Toast.LENGTH_SHORT).show();\n\t}",
"public void onItemClick(View view, int position);",
"void mo15854a(int i, DynamicClickInfo iVar);",
"com.rpg.framework.database.Protocol.ActionCommand getData(int index);",
"int readCurrentTrackData(int position) {\n return currentTrackData[position].read(position);\n }",
"public T getInfo(Coordinate where, boolean hit) { // where?\n if (hit) {\n return onHit;\n } \n return myData;\n }",
"@Override\n public void onClick(View v) {\n listener.onClickPosition(getAdapterPosition());\n Log.d(\"TAG\", \"Element \" + getAdapterPosition() + \" clicked. \" + txtTitulo.getText());\n\n }",
"void notifyMouseEvent(int id, long when, int button,\n int x, int y, int absX, int absY,\n int modifiers, int clickCount, boolean popupTrigger,\n byte[] bdata);",
"public void onClick(View v) {\n\t \t\t\tSeriesSelection seriesSelection = mChartView.getCurrentSeriesAndPoint();\n\t \t\t\tif (seriesSelection == null) {\n\t \t\t\t\tToast.makeText(XYChartActivity.this, \"No chart element\", Toast.LENGTH_SHORT).show();\n\t \t\t\t} else {\n\t \t\t\t\t// display information of the clicked point\n\t \t\t\t\tToast.makeText(\n\t \t\t\t\t\t\tXYChartActivity.this,\n\t \t\t\t\t\t\t\"Chart element in series index \" + seriesSelection.getSeriesIndex()\n\t \t\t\t\t\t\t+ \" data point index \" + seriesSelection.getPointIndex() + \" was clicked\"\n\t \t\t\t\t\t\t+ \" closest point value X=\" + seriesSelection.getXValue() + \", Y=\"\n\t \t\t\t\t\t\t+ seriesSelection.getValue(), Toast.LENGTH_SHORT).show();\n\t \t\t\t}\n\t \t\t}",
"@Override\n public void onClick(View v) {\n //getAdapterPosition() get's an Integer based on which the position of the current\n //ViewHolder (this) in the Adapter. This is how we get the correct Data.\n ListItem listItem = listOfData.get(\n this.getAdapterPosition()\n );\n\n controller.onListItemClick(\n listItem,\n v\n );\n\n }",
"public void mouseClicked(MouseEvent e) {\n\t\tdouble[] pointLocation = new double[3];\n\t\tdouble x = e.getX();\n\t\tdouble y = e.getY();\n\t\t\n\t\tplotContent.Click(x, y, pointLocation);\n\t\tif(pointLocation[0]==0.0&&pointLocation[1]==0.0&&pointLocation[2]==0.0) {\n\t\t\t\n\t\t}else {\n\t\t\ttradedetail.setText(\"\\n\"+\"Yield = \"+pointLocation[0]+\"\\n\"+\"Days_To_Maturity = \"+pointLocation[1]+\"\\n\"+\"Amount_CHF = \"+pointLocation[2]);\n\t\t}\n\t}",
"@Override\n\tpublic void onItemClick(Object o, int position) {\n\n\t}",
"void click(int slot, ClickType type);",
"double clientData(final int index, final int data);",
"void onItemClick(View view, int position);",
"public interface ClickListener {\n void onCLickItem(int position);\n }",
"public void onEventSelected(int position);",
"public interface ClickListener {\n\n public void Onclick(int pos);\n}",
"public Integer getClickNum() {\n return clickNum;\n }",
"@Override\n public void onClick(View v) {\n if(handler!=null){\n Message msg = new Message();\n Bundle bundle = new Bundle();\n bundle.putInt(\"data\", loc);\n msg.what = CHOICE_CONTROL_1;\n msg.setData(bundle);\n handler.sendMessage(msg);\n }\n }",
"@Override\n public void onItemClick(AdapterView<?> av, View v, int position, long id) {\n\n getLocation(id);\n\n\n }",
"@Override\n public void onClick(View v) {\n Toast.makeText(RecycleTestActivity.this, pos + \"\", Toast.LENGTH_SHORT)\n .show();\n }",
"@Basic @Raw\n public double[] getPosition(){\n\t double[] result = {this.position[0], this.position[1]};\n\t return result;\n }",
"void onMouseClicked(MouseEventContext mouseEvent);",
"@Override\n public void getData(int a, int b) {\n\n }",
"@Override\n public void onClick(View view, int position) {\n }",
"@Override\n public void onClick(View v) {\n if(handler!=null){\n Message msg = new Message();\n Bundle bundle = new Bundle();\n bundle.putInt(\"data\", loc);\n msg.what = CHOICE_CONTROL_HEAD;\n msg.setData(bundle);\n handler.sendMessage(msg);\n }\n }",
"void click(int x, int y, Keys... modifiers);",
"@Override\n public void onCompletedClick(int position) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n Log.i(\"TEST\",\"onItemClick\");\n Intent NextIntent = new Intent(mContext, WebActivity.class);\n NextIntent.putExtra(\"data\", mData.get(position));\n startActivity(NextIntent);\n\n }",
"@Override\n public void onClick(View v) {\n if(handler!=null){\n Message msg = new Message();\n Bundle bundle = new Bundle();\n bundle.putInt(\"data\", loc);\n msg.what = CHOICE_CONTROL_TAIL;\n msg.setData(bundle);\n handler.sendMessage(msg);\n }\n }",
"@Override\n public void mouseClicked(MouseEvent e){\n String boton = W.detClick( e.getButton() );\n \n System.out.println(\" Mouse: Click \" + boton ); \n }",
"fintech.HistoryResponse.Data getData();",
"@Override\n public void onClick(View view) {\n context.startActivity(FirebaseDBReadSingleActivity.getActIntent((Activity) context).putExtra(\"data\", daftarBarang.get(position)));\n }",
"@Override\n public void onClick(View view) {\n context.startActivity(FirebaseDBReadSingleActivity.getActIntent((Activity) context).putExtra(\"data\", daftarBarang.get(position)));\n }",
"public int PositionGet();",
"@Override\n\tpublic void mouseClicked(int arg0, int arg1, int arg2, int arg3) {\n\n\t}",
"public double getElementFromFirst(int channel, int position, int DataPointer){\n\t\t\tint index = datapointer + position;\r\n\t\t\tif(index >= this.datalen) index -= this.datalen;\r\n\r\n\t\t\treturn databuffer[channel][index];\r\n\t\t}",
"public interface ClickListener {\n void onClick(View view, int position);\n }",
"@NativeType(\"VREvent_Data_t\")\n public VREventData data() { return ndata(address()); }",
"private String getDataColumn(Context context, Uri uri, String selection, String[] selectionArgs) {\r\n Cursor cursor = null;\r\n final String column = \"_data\";\r\n final String[] projection = {column};\r\n try {\r\n cursor = context.getContentResolver().query(uri, projection, selection, selectionArgs, null);\r\n if (cursor != null && cursor.moveToFirst()) {\r\n final int column_index = cursor.getColumnIndexOrThrow(column);\r\n return cursor.getString(column_index);\r\n }\r\n } finally {\r\n if (cursor != null)\r\n cursor.close();\r\n }\r\n return null;\r\n }",
"public ContentSpan getData(){\n return this.data;\n }",
"@Override\n public void onItemClick(View view, int position) {\n Log.e(\"You Clicked\", mapRecyclerAdapter.getItem(position).getLocationName());\n }",
"@Override\n public void onItemClick(View view, String data) {\n }",
"@Override\n public void onItemClick(int pos, RvViewHolder holder) {\n }",
"interface onItemClicked {\n void sendDataToActivity(String data);\n }",
"public Location getClickedLocation()\n {\n lastLocationClicked = null;\n while (lastLocationClicked == null)\n {\n try{Thread.sleep(100);}catch(Exception e){};\n }\n return lastLocationClicked;\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n sendOperationMessage(data.get(+position));\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tgeti();\n\t\t\t}",
"public int getPosition();"
] | [
"0.64075285",
"0.6174356",
"0.60661244",
"0.6052871",
"0.5936765",
"0.57602787",
"0.5742449",
"0.57080203",
"0.569312",
"0.5678916",
"0.5607126",
"0.55823684",
"0.55739385",
"0.5568487",
"0.5562384",
"0.5553724",
"0.55458194",
"0.55374986",
"0.5521853",
"0.5497121",
"0.5475773",
"0.54648894",
"0.5463778",
"0.54555845",
"0.54239476",
"0.54120696",
"0.540536",
"0.53989965",
"0.53972226",
"0.53958213",
"0.53937525",
"0.5386283",
"0.5383312",
"0.53754324",
"0.5369787",
"0.5356943",
"0.5345989",
"0.53454214",
"0.53403634",
"0.5323703",
"0.5313207",
"0.531279",
"0.5300967",
"0.52979875",
"0.5297742",
"0.5290844",
"0.52899015",
"0.5289572",
"0.52797997",
"0.5276761",
"0.5273483",
"0.52724624",
"0.5260767",
"0.5244541",
"0.52413",
"0.5236776",
"0.52309567",
"0.5218984",
"0.5206522",
"0.52039015",
"0.52027124",
"0.52014357",
"0.51993203",
"0.51919174",
"0.5179453",
"0.5171947",
"0.51664406",
"0.51544356",
"0.5148822",
"0.51483214",
"0.5147288",
"0.51440465",
"0.51344067",
"0.5134398",
"0.51304954",
"0.51275",
"0.51196706",
"0.51178074",
"0.5116074",
"0.51151085",
"0.51149154",
"0.5113935",
"0.51113784",
"0.5108344",
"0.5107196",
"0.5107196",
"0.5105398",
"0.5103929",
"0.5103723",
"0.51025444",
"0.5097519",
"0.5089639",
"0.5089437",
"0.50891066",
"0.50856555",
"0.5084472",
"0.5082284",
"0.5081271",
"0.50798994",
"0.507983",
"0.50795406"
] | 0.0 | -1 |
allows clicks events to be caught | public void setClickListener(ItemClickListener itemClickListener) {
this.mClickListener = itemClickListener;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean performClick() {\n throwEvents = true;\n return super.performClick();\n }",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}",
"public void mouseClicked(MouseEvent e) \t{\n\t\t\t\t\r\n\t\t\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t\t\t}",
"public void mouseClicked(MouseEvent e) {\r\n\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}",
"public void mouseClicked(MouseEvent e) {\n\t}",
"public void mouseClicked(MouseEvent e) {\n\t}",
"public void mouseClicked(MouseEvent e) {\n\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"public void mouseClicked(MouseEvent e) {\n\n\t\t\t}",
"public void mouseClicked(MouseEvent e) {\n\n\t\t\t}",
"public void mouseClicked(MouseEvent e) {\n\n }",
"@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"public void mouseClicked(java.awt.event.MouseEvent e)\n\t{\n\t\tsuper.collectMouseEvent(e);\n\t}",
"public void mouseClicked(MouseEvent e) {\n \t\t\r\n \t}",
"public void mouseClicked(MouseEvent e) {}",
"public void mouseClicked(MouseEvent e) {}",
"public void mouseClicked(MouseEvent e) {}",
"public void mouseClicked(MouseEvent e) {}",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\r\n\t\t\t\t}",
"public void click(){\n\t\t\n\tfor(MouseListener m: listeners){\n\t\t\t\n\t\t\tm.mouseClicked();\n\t\t}\n\t\t\n\t}",
"public abstract void mouseClicked(MouseClickedEvent event);",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {}",
"@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}",
"public void mouseClicked( MouseEvent event ){}",
"public void mouseClicked(MouseEvent event){\n\t\t//Don't do anything, click defined elsewhere\n\t\t//Java clicks are too picky\n\t}",
"@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\r\n public void mouseClicked(MouseEvent e) {\n }",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\r\n\t}",
"public void mouseClicked(MouseEvent e) { \r\n }",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t}",
"public static void clickEvent() {\n counterClicks += 1;\n }",
"public void mouseClicked(MouseEvent event) { \n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}",
"public void mouseClicked(MouseEvent e) {\r\n\t\t// nothing\r\n\t}",
"@Override\r\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void mouseClicked(\n\t\t\tMouseEvent e)\n\t\t{\n\t\t\t\n\t\t}",
"public void mouseClicked(MouseEvent e) {\n\r\n\t}",
"@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\n\n\t\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e)\n\t{\n\n\t}",
"@Override\n public void mouseClicked(MouseEvent e) {\n if (e.getClickCount() == 2) {\n getDoubleClick();\n }\n }",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t}",
"public void mouseClicked(MouseEvent event){}",
"public void mouseClicked(MouseEvent e)\n {}",
"@Override\r\n public void mouseClicked(MouseEvent e) {}",
"@Override\n public void mouseClicked(MouseEvent e) {\n clicked = true;\n }",
"@Override\r\n public void mouseClicked(MouseEvent e) {\n }"
] | [
"0.722125",
"0.7161246",
"0.7161246",
"0.71534663",
"0.7152141",
"0.7152141",
"0.71458495",
"0.7144277",
"0.71291804",
"0.71183324",
"0.71090615",
"0.71040416",
"0.71040416",
"0.71040416",
"0.7103777",
"0.7103777",
"0.7103777",
"0.71035403",
"0.709386",
"0.7092651",
"0.7092651",
"0.70821357",
"0.70779735",
"0.70779735",
"0.70779735",
"0.70766807",
"0.7076547",
"0.7072651",
"0.7072651",
"0.7072651",
"0.7072651",
"0.7065098",
"0.705706",
"0.705706",
"0.705706",
"0.705706",
"0.705706",
"0.705706",
"0.705706",
"0.705706",
"0.705706",
"0.705706",
"0.705706",
"0.7046756",
"0.7045791",
"0.7045497",
"0.7039192",
"0.7038601",
"0.7038601",
"0.7038601",
"0.7033656",
"0.70272297",
"0.70236534",
"0.70236534",
"0.70197684",
"0.70186347",
"0.70107186",
"0.7004356",
"0.70037603",
"0.7000953",
"0.6994213",
"0.6994213",
"0.6994213",
"0.6994213",
"0.6994213",
"0.6994213",
"0.6994213",
"0.6994213",
"0.6994213",
"0.6994213",
"0.6994213",
"0.6994213",
"0.6994213",
"0.6994213",
"0.69882387",
"0.69882387",
"0.69882387",
"0.69882387",
"0.69882387",
"0.69882387",
"0.69882387",
"0.69882387",
"0.6985425",
"0.6984347",
"0.698195",
"0.69772637",
"0.6973504",
"0.69720376",
"0.6967125",
"0.6961202",
"0.6961202",
"0.6961202",
"0.6961202",
"0.6961202",
"0.6961202",
"0.695975",
"0.6954502",
"0.6954239",
"0.69524",
"0.69494116",
"0.6947217"
] | 0.0 | -1 |
parent activity will implement this method to respond to click events | public interface ItemClickListener {
void onItemClick(View view, int position);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onClick(View view) {\n\n }",
"@Override public void onClick(View arg0) {\n\n }",
"@Override\n public void onClick(View view) {\n\n\n }",
"@Override\n public void onClick(View view) {\n\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onClick(View view) {\n\n }",
"@Override\n public void onClick(View view) {\n\n }",
"@Override\n public void onClick(View view) {\n\n }",
"@Override\n public void onClick(View view) {\n\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\r\n public void onClick(View view) {\n }",
"@Override\r\n public void onClick(View view) {\n }",
"@Override\r\n public void onClick(View view) {\n }",
"@Override\n \t\tpublic void onClick(View v) {\n \t\t\t\n \t\t}",
"@Override\n \t\tpublic void onClick(View v) {\n \t\t\t\n \t\t}",
"@Override\r\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View v) {\n\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view){\n }",
"@Override\n public void onClick(View arg0) {\n }",
"@Override\n public void onClick(View arg0) {\n }",
"@Override\n public void onClick(View arg0) {\n }",
"@Override\n public void onClick(View arg0) {\n }",
"@Override\n public void onClick(View arg0) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\r\n\tpublic void onClick(View arg0) {\n\t\t\r\n\t}",
"@Override\n public void onClick(View view) {\n\n\n\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tputExtra();\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onClick(View v) {\n\n\n }",
"@Override\n public void onClick(View v) {\n\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n public void onClick(View v) \r\n {\n }",
"@Override\n public void onClick(View view) {\n\n }",
"@Override\n public void onClick(View v) {\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t}",
"public void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t}",
"@Override\n\tprotected void OnClick() {\n\t\t\n\t}",
"@Override\n\tpublic void onClick(View arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onClick(View arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onClick(View arg0) {\n\t\t\n\t}",
"@Override\n public void onClick(View v) {\n\n }",
"@Override\n public void onClick(View v) {\n }",
"@Override\n public void onClick(View v) {\n }",
"@Override\n public void onClick(View v) {\n }",
"@Override\n public void onClick(View v) {\n\n }",
"@Override\n public void onClick(View v) {\n\n }"
] | [
"0.7429819",
"0.7429819",
"0.7429819",
"0.73605937",
"0.7358316",
"0.73416644",
"0.73415333",
"0.73349893",
"0.7333322",
"0.7333322",
"0.7333322",
"0.7333322",
"0.7332782",
"0.7332782",
"0.73224324",
"0.73224324",
"0.73224324",
"0.7313023",
"0.7313023",
"0.73126453",
"0.72924924",
"0.7292184",
"0.7292184",
"0.7292184",
"0.7292184",
"0.7286495",
"0.72764176",
"0.72764176",
"0.72764176",
"0.72764176",
"0.72764176",
"0.72635126",
"0.72635126",
"0.72635126",
"0.72635126",
"0.72635126",
"0.72635126",
"0.72635126",
"0.72635126",
"0.72635126",
"0.72635126",
"0.72635126",
"0.72635126",
"0.72635126",
"0.72635126",
"0.72635126",
"0.72635126",
"0.72635126",
"0.72635126",
"0.72635126",
"0.72635126",
"0.72635126",
"0.72635126",
"0.72635126",
"0.7255809",
"0.7253562",
"0.7249877",
"0.7245745",
"0.72414804",
"0.72341883",
"0.72319895",
"0.7229321",
"0.7229321",
"0.7229321",
"0.7229321",
"0.7229321",
"0.7229321",
"0.7229321",
"0.7229321",
"0.7229321",
"0.7229321",
"0.7229321",
"0.7229321",
"0.7229321",
"0.7229321",
"0.7229321",
"0.7229321",
"0.7229321",
"0.7229321",
"0.7229321",
"0.7229321",
"0.7229321",
"0.72261643",
"0.72191614",
"0.72186977",
"0.72083205",
"0.7198795",
"0.7198331",
"0.7198331",
"0.7198331",
"0.7198331",
"0.7187439",
"0.71862644",
"0.71862644",
"0.71862644",
"0.718448",
"0.71829545",
"0.71829545",
"0.71829545",
"0.71757513",
"0.71757513"
] | 0.0 | -1 |
Send all buffered data to the output | public void send(Output output) {
for (byte[] buff : buffers) {
output.write(buff);
}
if(position > 0) {
output.write(buffer, 0, position);
}
buffers.clear();
position = 0;
written = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void flush() throws IOException {\n byteBufferStreamOutput.flush();\n }",
"@Override\n\tpublic void flushBuffer() throws IOException {\n\t}",
"@Override\n public void flushBuffer() throws IOException {\n\n }",
"void flushBuffer();",
"@Override\n public void flush() throws IOException {\n FileDescriptor myFd = fd;\n if (myFd == null) throw new IOException(\"socket closed\");\n\n // Loop until the output buffer is empty.\n Int32Ref pending = new Int32Ref(0);\n while (true) {\n try {\n // See linux/net/unix/af_unix.c\n Os.ioctlInt(myFd, OsConstants.TIOCOUTQ, pending);\n } catch (ErrnoException e) {\n throw e.rethrowAsIOException();\n }\n\n if (pending.value <= 0) {\n // The output buffer is empty.\n break;\n }\n\n try {\n Thread.sleep(10);\n } catch (InterruptedException ie) {\n break;\n }\n }\n }",
"@Override\r\n public synchronized void flush() throws IOException {\r\n\t\tif ( count != 0 ) {\r\n\t\t writeBuffer(buf, 0, count );\r\n\t\t count = 0;\r\n\t\t}\r\n\t}",
"public static void flush() {\n if (outputEnabled)\n out.flush();\n }",
"public void flush(){\r\n mBufferData.clear();\r\n }",
"void flush();",
"void flush();",
"void flush();",
"void flush();",
"void flush();",
"void flush();",
"void flush();",
"void flush();",
"public void flush(){\n\t\ttry{\n\t\t\tse.write(buffer, 0, bufferPos);\n\t\t\tbufferPos = 0;\n\t\t\tse.flush();\n\t\t}catch(IOException ioex){\n\t\t\tfailures = true;\n\t\t}\n\t}",
"public void flush();",
"public void flush();",
"public void flush();",
"public void flush();",
"public abstract void flush();",
"public void flush() throws IOException {\n\t\tif ((buffer.length - cursor) > 50000) {\n\t\t\tSystem.out.println(\"WASTED: \" + (buffer.length - cursor));\n\t\t}\n\t}",
"private void flush() {\n try {\n output.write(digits);\n } catch (IOException e) {\n throw new RuntimeException(e.toString());\n }\n digits = 0;\n numDigits = 0;\n }",
"public void flush() throws IOException;",
"public void flush() throws IOException;",
"public void flush() throws IOException;",
"@Override\r\n public void flush ()\r\n {\r\n }",
"@Override\n public void flush() throws IOException {\n ConsoleRedirect.this.flush(buffer, 0, pos);\n pos = 0;\n }",
"@Override\n\t\tpublic void run() {\n\t\t\tsuper.run();\n\t\t\twhile(runFlg){\n\t\t\t\ttry{\n\t\t\t\t\t\n\t\t\t\t\twhile(mQueue.getSize() >0 ){\n\t\t\t\t\t\tbyte[] data = getData();\n\t\t\t\t\t\tmOut.write(data);\n\t\t\t\t\t}\n\t\t\t\t}catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\tLog.e(TAG,e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"void flush() throws IOException;",
"void flush() throws IOException;",
"void flush() throws IOException;",
"public void run() {\n try {\n byte b[] = new byte[100];\n for (;;) {\n int n = in.read(b);\n String str;\n if (n < 0) {\n break;\n }\n str = new String(b, 0, n);\n buffer.append(str);\n System.out.print(str);\n }\n } catch (IOException ioe) { /* skip */ }\n }",
"public void outputBuffers ()\n\t{\n\t\toutput (\"\\n> (buffers)\\n\");\n\t\tif (model!=null) model.outputBuffers();\n\t}",
"public void run() {\n\t\tboolean completed = false;\n\t\t\n\t\ttry {\n\t\t\twhile (buffer.hasNext()) {\n\t\t\t\tsink.process(buffer.getNext());\n\t\t\t}\n\t\t\t\n\t\t\tsink.complete();\n\t\t\tcompleted = true;\n\t\t\t\n\t\t} finally {\n\t\t\tif (!completed) {\n\t\t\t\tbuffer.setOutputError();\n\t\t\t}\n\t\t\t\n\t\t\tsink.release();\n\t\t}\n\t}",
"@Override\n public void flush() {\n }",
"@Override\n public void flush() {\n }",
"@Override\n public void flush() {\n }",
"private void sendData() {\n final ByteBuf data = Unpooled.buffer();\n data.writeShort(input);\n data.writeShort(output);\n getCasing().sendData(getFace(), data, DATA_TYPE_UPDATE);\n }",
"@Override\n public void flush() throws IOException {\n }",
"public abstract void outputBmp(FastStringBuffer buf);",
"protected abstract void sendInternal(ByteBuffer outputBuffer) throws IOException;",
"public synchronized void flush() throws IOException {\n if (sink != null) {\n synchronized (sink) {\n sink.notifyAll();\n }\n }\n }",
"public void flush()\n/* */ throws IOException\n/* */ {\n/* 833 */ _flushBuffer();\n/* 834 */ if ((this._writer != null) && \n/* 835 */ (isEnabled(JsonGenerator.Feature.FLUSH_PASSED_TO_STREAM))) {\n/* 836 */ this._writer.flush();\n/* */ }\n/* */ }",
"@Override\n\t\tpublic void flush() throws IOException {\n\t\t\twriteBlock(true);\n\t\t\tout.flush();\n\n\t\t\t// it's a bit nasty if an exception is thrown from the log,\n\t\t\t// but ignoring it can be nasty as well, so it is decided to\n\t\t\t// let it go so there is feedback about something going wrong\n\t\t\t// it's a bit nasty if an exception is thrown from the log,\n\t\t\t// but ignoring it can be nasty as well, so it is decided to\n\t\t\t// let it go so there is feedback about something going wrong\n\t\t\tif (debug) {\n\t\t\t\tlog.flush();\n\t\t\t}\n\t\t}",
"@Override\n public void flush()\n {\n }",
"@Override\n\tpublic void flush() {\n\t\t\n\t}",
"@Override\n\tpublic void flush() {\n\t\t\n\t}",
"@Override\n\tpublic void flush() {\n\t\t\n\t}",
"@Override\n\tpublic void flush() {\n\t\t\n\t}",
"public void flush() {\n\t\t\n\t}",
"public void flush() throws Exception{\r\n\tout.flush();\r\n}",
"@Override\r\n\tpublic void flush() {\n\t\t\r\n\t}",
"public void flushBuffer() throws IOException {\n this.response.flushBuffer();\n }",
"@Override\n public void flush() throws IOException {\n checkStreamState();\n flushIOBuffers();\n }",
"@Override\r\n\tpublic void flush() {\n\t}",
"public void flush() throws IOException {\n\t\tmFile.seek(mOffset);\n\t\tmWriter.write(mBuffer, 0, mBufferLength);\n\t\tmOffset += mBufferLength;\n\t\tmBufferLength = 0;\n\t}",
"public void flush () throws IOException\n {\n if (m_nBufferedBitCount > 0)\n {\n if (m_nBufferedBitCount != CGlobal.BITS_PER_BYTE)\n if (LOGGER.isDebugEnabled ())\n LOGGER.debug (\"Flushing BitOutputStream with only \" + m_nBufferedBitCount + \" bits\");\n m_aOS.write ((byte) m_nBuffer);\n m_nBufferedBitCount = 0;\n m_nBuffer = 0;\n }\n }",
"void flushBlocking();",
"@Override\n public void run() {\n try {\n\n byte[] data = new byte[TcpClient.BUFFER_SIZE * 2];\n\n while(!Rebroadcaster.INSTANCE.isHalted()) {\n int len = is.read(data, 0, data.length);\n os.write(data, 0, len);\n os.flush();\n }\n } catch (IOException ex) {\n LOGGER.log(Level.SEVERE, null, ex);\n }\n }",
"public void flush() {\n\r\n int inflatedSize = buffer.position();\r\n deflator.setInput(buffer.getBuffer(), 0, inflatedSize);\r\n deflator.finish();\r\n int deflatedSize = deflator.deflate(compressionBuffer.array());\r\n deflator.reset();\r\n\r\n try {\r\n outputStream.writeInt(deflatedSize);\r\n outputStream.writeInt(inflatedSize);\r\n outputStream.write(compressionBuffer.array(), 0, deflatedSize);\r\n }\r\n catch (IOException e) {\r\n throw new RuntimeException(\"Failed to write compressed data to stream\", e);\r\n }\r\n\r\n buffer.clear();\r\n compressionBuffer.clear();\r\n }",
"private synchronized void flush() {\r\n\t\tif (!buffer.isEmpty()) {\r\n\t\t\tfor (final LoggingRecord record : buffer) {\r\n\t\t\t\thandler.handle(record);\r\n\t\t\t}\r\n\t\t\tbuffer.clear();\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"GuardedByChecker\")\n private void sendFlushDataLocked() {\n assert mWriteState == State.WAITING_FOR_FLUSH;\n int size = mFlushData.size();\n ByteBuffer[] buffers = new ByteBuffer[size];\n int[] positions = new int[size];\n int[] limits = new int[size];\n for (int i = 0; i < size; i++) {\n ByteBuffer buffer = mFlushData.poll();\n buffers[i] = buffer;\n positions[i] = buffer.position();\n limits[i] = buffer.limit();\n }\n assert mFlushData.isEmpty();\n assert buffers.length >= 1;\n mWriteState = State.WRITING;\n mRequestHeadersSent = true;\n if (!CronetBidirectionalStreamJni.get().writevData(mNativeStream,\n CronetBidirectionalStream.this, buffers, positions, limits,\n mEndOfStreamWritten && mPendingData.isEmpty())) {\n // Still waiting on flush. This is just to have consistent\n // behavior with the other error cases.\n mWriteState = State.WAITING_FOR_FLUSH;\n throw new IllegalArgumentException(\"Unable to call native writev.\");\n }\n }",
"void writeCurrentBuffer();",
"@Override\r\n public void flush() {\n\r\n }",
"@Override\n\tpublic void flush() {\n\t}",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"public void flush() {\r\n\t\ttry {\r\n\t\t\tdos.flush();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public int flush() throws IOException {\n while (sendbuffer != null) {\n channel.write(sendbuffer);\n if (sendbuffer.remaining() == 0) {\n sendbuffer = sendqueue.poll();\n } else {\n return sendbuffer.remaining();\n }\n }\n return 0;\n }",
"@Override\r\n public void flush() {\n\r\n }",
"public void flush() throws IOException{\r\n if(closed){\r\n throw new IOException(\"The stream is not open.\");\r\n }\r\n // the newline character should not be necessary. The PrintWriter\r\n // should autmatically put the newline, but it doesn't seem to work\r\n textArea.append(getBuffer().toString());\r\n if(System.getProperty(\"java.version\").startsWith(\"1.1\")){\r\n textArea.append(\"\\n\");\r\n }\r\n textArea.setCaretPosition(textArea.getDocument().getLength());\r\n buffer = new StringBuffer();\r\n }",
"private void processBuffer(boolean flushBuffer, boolean endOfInput) throws IOException {\n decodeBuffer(flushBuffer || endOfInput);\n if (!endOfInput && !flushBuffer && cb.position() < PROCESS_THRESHOLD) {\n return;\n }\n cb.flip();\n found = SubstituteUtil.processSubstitute(cb, substitute, endOfInput, outputCharset, stream);\n // Write the tail bytes in the byte buffer if required\n if (bb.position() > 0 && (found || endOfInput)) {\n bb.flip();\n while (bb.hasRemaining()) {\n stream.write(bb.get());\n }\n bb.clear();\n }\n }",
"void suspendOutput();",
"private void flushBuffer(Runnable paramRunnable) {\n/* 149 */ int i = this.buf.position();\n/* 150 */ if (i > 0 || paramRunnable != null)\n/* */ {\n/* 152 */ flushBuffer(this.buf.getAddress(), i, paramRunnable);\n/* */ }\n/* */ \n/* 155 */ this.buf.clear();\n/* */ \n/* 157 */ this.refSet.clear();\n/* */ }",
"@Override\n\tpublic void run() {\n\t\tdispBlocks();\n\t\tsendData();\n\t}",
"protected void finish() {\n writerServerTimingHeader();\n\n try {\n\n // maybe nobody ever call getOutputStream() or getWriter()\n if (bufferedOutputStream != null) {\n\n // make sure the writer flushes everything to the underlying output stream\n if (bufferedWriter != null) {\n bufferedWriter.flush();\n }\n\n // send the buffered response to the client\n bufferedOutputStream.writeBufferTo(getResponse().getOutputStream());\n\n }\n\n } catch (IOException e) {\n throw new IllegalStateException(\"Could not flush response buffer\", e);\n }\n\n }",
"@Override\n public void emitOutput() {\n }",
"@Override\n public void run() {\n try {\n synchronized (this) {\n output.write('\\r');\n flush();\n output.write('\\n');\n flush();\n }\n // We could write, reschedule heartbeat\n scheduleHeartBeat();\n } catch (IOException x) {\n // The other peer closed the connection\n close();\n eventSource.onClose();\n }\n }",
"private static void flushInternalBuffer() {\n\n //Strongly set the last byte to \"0A\"(new line)\n if (mPos < LOG_BUFFER_SIZE_MAX) {\n buffer[LOG_BUFFER_SIZE_MAX - 1] = 10;\n }\n\n long t1, t2;\n\n //Save buffer to SD card.\n t1 = System.currentTimeMillis();\n writeToSDCard();\n //calculate write file cost\n t2 = System.currentTimeMillis();\n Log.i(LOG_TAG, \"internalLog():Cost of write file to SD card is \" + (t2 - t1) + \" ms!\");\n\n //flush buffer.\n Arrays.fill(buffer, (byte) 0);\n mPos = 0;\n }",
"private void run() throws InterruptedException, IOException {\n endpoint.getWcEvents().take();\n\n //process received data\n processRecv();\n\n for (int i=0; i < 1000000; i++) {\n //change data in remote memory\n writeData(i);\n\n //wait for writing remote memory to complete\n endpoint.getWcEvents().take();\n }\n System.out.println(\"ClientWrite::finished!\");\n }",
"public void sendDone()\n\t{\n\t\tmSendBusy = false;\n\t\tStatistics.numPacketsSent++;\n\t\tmWriteHandler.call(mHandlerArg);\n\t}",
"public void run() {\n xmitsInProgress++;\n try {\n Socket s = new Socket();\n s.connect(curTarget, READ_TIMEOUT);\n s.setSoTimeout(READ_TIMEOUT);\n DataOutputStream out = new DataOutputStream(new BufferedOutputStream(s.getOutputStream()));\n try {\n long filelen = data.getLength(b);\n DataInputStream in = new DataInputStream(new BufferedInputStream(data.getBlockData(b)));\n try {\n //\n // Header info\n //\n out.write(OP_WRITE_BLOCK);\n out.writeBoolean(true);\n b.write(out);\n out.writeInt(targets.length);\n for (int i = 0; i < targets.length; i++) {\n targets[i].write(out);\n }\n out.write(RUNLENGTH_ENCODING);\n out.writeLong(filelen);\n\n //\n // Write the data\n //\n while (filelen > 0) {\n int bytesRead = in.read(buf, 0, (int) Math.min(filelen, buf.length));\n out.write(buf, 0, bytesRead);\n filelen -= bytesRead;\n }\n } finally {\n in.close();\n }\n } finally {\n out.close();\n }\n LOG.info(\"Transmitted block \" + b + \" to \" + curTarget);\n } catch (IOException ie) {\n LOG.warn(\"Failed to transfer \"+b+\" to \"+curTarget, ie);\n } finally {\n xmitsInProgress--;\n }\n }",
"public void flush() throws IOException\n {\n getStream().flush();\n }",
"private void byteOut(){\n if(nrOfWrittenBytes >= 0){\n if(b==0xFF){\n // Delay 0xFF byte\n delFF = true;\n b=c>>>20;\n c &= 0xFFFFF;\n cT=7;\n }\n else if(c < 0x8000000){\n // Write delayed 0xFF bytes\n if (delFF) {\n out.write(0xFF);\n delFF = false;\n nrOfWrittenBytes++;\n }\n out.write(b);\n nrOfWrittenBytes++;\n b=c>>>19;\n c &= 0x7FFFF;\n cT=8;\n }\n else{\n b++;\n if(b==0xFF){\n // Delay 0xFF byte\n delFF = true;\n c &= 0x7FFFFFF;\n b=c>>>20;\n c &= 0xFFFFF;\n cT=7;\n }\n else{\n // Write delayed 0xFF bytes\n if (delFF) {\n out.write(0xFF);\n delFF = false;\n nrOfWrittenBytes++;\n }\n out.write(b);\n nrOfWrittenBytes++;\n b=((c>>>19)&0xFF);\n c &= 0x7FFFF;\n cT=8;\n }\n }\n }\n else {\n // NOTE: carry bit can never be set if the byte buffer was empty\n b= (c>>>19);\n c &= 0x7FFFF;\n cT=8;\n nrOfWrittenBytes++;\n }\n }",
"void flushToOutputStream(OutputStream outputStream) throws IOException;",
"public void flush() throws IOException {\n // nothing to do with cached bytes\n }",
"public void flush() throws IOException {\n try {\n out.flush();\n } catch (IOException ioe) {\n String msg = \"Failed to flush \" + this;\n LOG.error(msg, ioe);\n throw new IOException(msg, ioe);\n }\n }",
"public synchronized void flush() throws java.io.IOException { throw new RuntimeException(\"Stub!\"); }",
"public void send(byte[] data) throws IOException {\n dataOutput.write(data);\n dataOutput.flush();\n }",
"public void flush()\r\n\tthrows IOException\r\n\t{\r\n\tgetWriter().flush();\r\n\treturn;\r\n\t}",
"public abstract void inClassOutputBmp(FastStringBuffer buf);",
"void flush() throws Exception;",
"public void flush() throws IOException {\n\t\t// TODO implement me\n\t}",
"@Override\n\tpublic void send(OutputStream stream) throws IOException {\n\t\tstream.write(this.data);\n\t}",
"public void flush() {\n flushed = true;\n }",
"public void flush() throws IOException {\n dos.flush();\n }",
"public void processOutput() {\n\n\t}",
"@Override\n public void write(byte[] data) throws IOException {\n for (int i = 0; i < data.length; i++) {\n write(data[i]);\n }\n }",
"public boolean flushPipelinedData() throws IOException {\n if (buffer == null || (buffer.getBuffer().position() == 0 && allAreClear(state, FLUSHING))) {\n return next.flush();\n }\n return flushBuffer();\n }"
] | [
"0.73481095",
"0.69235134",
"0.6895551",
"0.6868921",
"0.6732925",
"0.67246026",
"0.67229027",
"0.67048687",
"0.6608385",
"0.6608385",
"0.6608385",
"0.6608385",
"0.6608385",
"0.6608385",
"0.6608385",
"0.6608385",
"0.6516323",
"0.64750564",
"0.64750564",
"0.64750564",
"0.64750564",
"0.64637035",
"0.639591",
"0.6356718",
"0.63488376",
"0.63488376",
"0.63488376",
"0.63442194",
"0.63404936",
"0.6333611",
"0.6282615",
"0.6282615",
"0.6282615",
"0.6274386",
"0.626774",
"0.6251653",
"0.62456995",
"0.62456995",
"0.62456995",
"0.6242098",
"0.62308115",
"0.6216414",
"0.62131965",
"0.6183826",
"0.6183268",
"0.616265",
"0.61574084",
"0.6145656",
"0.6145656",
"0.6145656",
"0.6145656",
"0.614228",
"0.61363804",
"0.61135525",
"0.6113044",
"0.6103542",
"0.60961497",
"0.6094915",
"0.6090138",
"0.6088503",
"0.60859877",
"0.6046721",
"0.60414356",
"0.59979117",
"0.59832054",
"0.5962646",
"0.59612864",
"0.5934117",
"0.5931776",
"0.59280777",
"0.592669",
"0.5923785",
"0.5922441",
"0.58982414",
"0.58941585",
"0.5892812",
"0.58826107",
"0.58333707",
"0.58186",
"0.58119184",
"0.5807831",
"0.58045626",
"0.5799769",
"0.5795918",
"0.57875496",
"0.5783985",
"0.5756221",
"0.57517266",
"0.5741623",
"0.57281387",
"0.5727814",
"0.5718835",
"0.570401",
"0.5700893",
"0.56963027",
"0.5687782",
"0.5671319",
"0.56668067",
"0.5660924",
"0.5658997"
] | 0.6548666 | 16 |
public static final String FILE = "samples/T.R.A.M. Seven Ways Till Sunday.mp3"; | public static void main( String[] argv ) throws Exception
{
//Browse file system for the desired .mp3 file to be visualized
//SELECTED FILE MUST BE A .mp3 FILE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
JFileChooser jfc = new JFileChooser();
jfc.showDialog(null,"Please Select the desired .mp3 file. \n ***MUST BE A .mp3 FILE***");
jfc.setVisible(true);
final String FILE = jfc.getSelectedFile().getPath();
System.out.println("File name "+FILE);
MP3Decoder decoder = new MP3Decoder( new FileInputStream( FILE ) );
AudioDevice device = new AudioDevice( );
//Opens a color chooser so that the user can pick their desired colors for the animation
Color bgcolor = JColorChooser.showDialog(null, "Choose the background color for the animation:", Color.BLACK);
Color color1 = JColorChooser.showDialog(null, "Choose the first animation color:", Color.BLUE);
Color color2 = JColorChooser.showDialog(null, "Choose the second animation color:", Color.WHITE);
//Get Screen Dimensions
//Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
//Convert Screen Dimensions to length and width
//final int width = (int)screenSize.getWidth();
//final int height = (int)screenSize.getHeight();
MyPlot plot = new MyPlot( "Animation", 1024, 512 );
FFT fft = new FFT( 1024, 44100 );
float[] samples = new float[1024];
float[] spectrum = new float[1024 / 2 + 1];
float[] lastSpectrum = new float[1024 / 2 + 1];
long time = System.currentTimeMillis();
long lastTime = time;
int count = 0;
int bands = 64;
int currentBands = bands;
int cycle = 4;
int c = cycle;
while( decoder.readSamples( samples ) > 0 )
{
fft.forward( samples );
System.arraycopy( spectrum, 0, lastSpectrum, 0, spectrum.length );
System.arraycopy( fft.getSpectrum(), 0, spectrum, 0, spectrum.length );
if((time - lastTime) > 100) {
plot.animate( spectrum, lastSpectrum, 1, bgcolor, color1, color2 , currentBands, count);
lastTime = time;
count++;
if(count%currentBands == 0){
if(currentBands <= c || currentBands == bands) {
cycle *= -1;
}
currentBands += cycle;
}
System.out.println(currentBands);
}
device.writeSamples(samples);
time = System.currentTimeMillis();
Thread.sleep(15);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private SoundPlayer(String mp3) {\n\t\tfile = new File(mp3);\n\t}",
"public String getPlayFile();",
"private static void playAudio(String musicFile) {\n }",
"private String getShortWaveFile() {\n return \"whatstheweatherlike.wav\";\n }",
"public Sound createSound(String file);",
"public Sound loadSound(String file);",
"public Music createMusic(String file);",
"public void playLocal(String audiofile);",
"String getFile();",
"String getFile();",
"String getFile();",
"String sound();",
"public void loadMusic(File f) {\n music = new MP3(f);\n }",
"public String getSoundPath();",
"public Track(String fileName) {\n \t\tsoundFile = new File(fileName);\n \t\tSystem.out.println(\"absolute path: \" + soundFile.getAbsolutePath());\n \t}",
"public void setPlayFile(String file);",
"private String getVideofilename() {\n String mFileName;\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String audioFileName = \"mp4_\" + timeStamp + \"_\";\n\n // Save a file: path for use with ACTION_VIEW intents\n mFileName = getExternalFilesDir(\"DIRECTORY_VIDEO\").getAbsolutePath();\n mFileName += \"/\" +audioFileName + \".mp4\";\n return mFileName;\n }",
"public static void play(String file) throws IOException {\n File abcFile = new File(file);\n \n Header header = Parser.parseHeader(abcFile);\n// MusicBody music = Parser.parseMusic(abcFile);\n }",
"public static void music (String fileName)\r\n {\r\n\tAudioPlayer MGP = AudioPlayer.player;\r\n\tAudioStream BGM;\r\n\tAudioData MD;\r\n\r\n\tContinuousAudioDataStream loop = null;\r\n\r\n\ttry\r\n\t{\r\n\t InputStream test = new FileInputStream (\"lamarBackgroundMusic.wav\");\r\n\t BGM = new AudioStream (test);\r\n\t AudioPlayer.player.start (BGM);\r\n\r\n\t}\r\n\tcatch (FileNotFoundException e)\r\n\t{\r\n\t System.out.print (e.toString ());\r\n\t}\r\n\tcatch (IOException error)\r\n\t{\r\n\t System.out.print (error.toString ());\r\n\t}\r\n\tMGP.start (loop);\r\n }",
"public void playSound(File soundFile);",
"private String getLongWaveFile() {\n return \"batman.wav\";\n }",
"private static void playSound(String s) {\n try {\n Media hit = new Media(new File(s).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(hit);\n mediaPlayer.play();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"public Music loadMusic(String fileName);",
"public void playSound() {\n String path = \"Data\\\\\\\\Acceptance.wav\";\n InputStream success;\n try {\n success = new FileInputStream(new File(path));\n AudioStream audioStream = new AudioStream(success);\n AudioPlayer.player.start(audioStream);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error playing sounds\");\n }\n }",
"private File createAudioFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"3gp_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_MUSIC);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".3gp\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n String z = image.getAbsolutePath();\n return image;\n }",
"public File getSoundFile() {\n \t\treturn soundFile;\n \t}",
"public PlayMP3(String filename, GUIView gui) {\n\t\tthis.gui = gui;\n\t\tthis.filename = filename;\n\t}",
"@SuppressLint(\"NewApi\")\r\n\tprivate void downloadFile() {\n\t\tLog.d(TAG, \"In fuction downloadFile()\");\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yy\");\r\n \tCalendar cal = Calendar.getInstance();\r\n \tString programmaNameUnderscore = mName.replace(\" \", \"_\");\r\n \tprogrammaNameUnderscore = programmaNameUnderscore.replace(\",\",\"\");\r\n \tString fileName = programmaNameUnderscore + \"_\" + dateFormat.format(cal.getTime())+\".mp3\";\r\n \t\r\n \t\r\n\t\tRequest request = new Request(Uri.parse(mDownloadUrl));\r\n\t\trequest.setDescription(mName);\r\n \t// in order for this if to run, you must use the android 3.2 to compile your app\r\n \tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {\r\n \t request.allowScanningByMediaScanner();\r\n \t request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);\r\n \t}\r\n \trequest.setDestinationInExternalPublicDir(Environment.DIRECTORY_MUSIC, getString(R.string.download_subdir_test) + File.separator + fileName);\r\n\t}",
"private File createAudioFile() throws IOException{\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String audioFileName = \"Audio_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_MUSIC);\n File image = File.createTempFile(\n audioFileName, /* prefix */\n \".3gp\", /* suffix */\n storageDir /* directory */\n );\n\n return image;\n }",
"public static void playPickupSound(){\n String musicFile = \"Sounds\\\\Pickup.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }",
"static void PlaySound(File Sound)\n {\n try{\n Clip clip = AudioSystem.getClip();\n clip.open(AudioSystem.getAudioInputStream(Sound));\n clip.start();\n //BGM = new AudioStream(new FileInputStream(\"OST.WAV\"));\n //MD = BGM.getData();\n //loop = new ContinuousAudioDataStream(MD);\n }catch(Exception e) {}\n //MGP.start(loop); \n }",
"private SoundPlayer(URI uri) {\n\t\tfile = new File(uri.getPath());\n\t}",
"public String getSound();",
"abstract String getSound();",
"private String getNextFileName() {\n\n File fileDir = new File(Environment.getExternalStorageDirectory()\n + File.separator + mTestFolderName\n + File.separator);\n\n if (!fileDir.exists()) {\n fileDir.mkdirs();\n }\n //build filename\n GregorianCalendar gregorianCalendar = new GregorianCalendar();\n gregorianCalendar.setTime(new Date(System.currentTimeMillis()));\n String date = new SimpleDateFormat(\"dd-MM-yy_HH-mm\").format(gregorianCalendar.getTime());\n MainActivity.sTestFileDate = date;\n return Environment.getExternalStorageDirectory()\n + File.separator + mTestFolderName\n + File.separator + \"merge_T1_\" + date\n + \".mp4\";\n }",
"public String getSound()\r\n\t{\r\n\t\treturn \"Squeak Squeak Squeak\";\r\n\t}",
"public static void play(String filename) {\r\n javax.sound.sampled.Clip sonido;\r\n InputStream path=load(filename);\r\n \r\n try\r\n {\r\n sonido=AudioSystem.getClip();\r\n sonido.open(AudioSystem.getAudioInputStream(new BufferedInputStream(path)));\r\n sonido.start();\r\n\r\n }catch(Exception fallo)\r\n {\r\n \r\n }\r\n }",
"public interface ConsValues {\n\n public String PATH = \"/storage/extSdCard/Videos/Others/灵梦和幽幽子的弹幕.mp4\";\n}",
"public static String getFileName()\r\n\t{\r\n\t\tString name = \"d3_\";\r\n\t\tjava.util.Date tNow = new java.util.Date();\r\n\r\n\t\tjava.text.SimpleDateFormat df = new java.text.SimpleDateFormat(\"mm_ss\");\r\n\r\n\t\tname = name + \"_\" + df.format(tNow) + \".wmf\";\r\n\r\n\t\treturn name;\r\n\t}",
"public void playSound(String fileName){\n \n Random rand = new Random();\n if (fileName == null) {\n int nextSongNumber = rand.nextInt(soundList.size());\n while(nextSongNumber == currentSongNumber){\n nextSongNumber = rand.nextInt(soundList.size());\n }\n currentSongNumber = nextSongNumber;\n fileName = soundList.get(currentSongNumber);\n }\n \n try {\n \n \n soundSequencer = MidiSystem.getSequencer();\n soundSequencer.open();\n \n soundSequencer.setSequence(this.getClass().getResourceAsStream(fileName));\n soundSequencer.setLoopCount(Sequencer.LOOP_CONTINUOUSLY);\n soundSequencer.start();\n \n } catch (IOException | InvalidMidiDataException | MidiUnavailableException ex) {\n //Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"SoundEffect(String n) {\n\t\ttry{\n\t\t\tURL url = this.getClass().getClassLoader().getResource(n); //Create url with filename\n\t\t\tAudioInputStream audioInputStream = AudioSystem.getAudioInputStream(url); //Create AudioInputStream with url\n\t\t\tclip = AudioSystem.getClip(); //Assign the wav to clip\n\t\t\tclip.open(audioInputStream); //Open the clip\n\t\t}\n\t\tcatch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace(); //Print stack trace for debugging\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace(); //Print stack trace for debugging\n\t\t}\n\t\tcatch (LineUnavailableException e) {\n\t\t\te.printStackTrace(); //Print stack trace for debugging\n\t\t}\n\t}",
"private static String getFileRoot(String file) {\r\n \treturn file.substring(0, file.indexOf('.'));\r\n }",
"public static void playShootingSound(){\n String musicFile = \"Sounds\\\\Shoot.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }",
"public void tripleHSounds()\n {\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setTitle(\"Test Sound Clip\");\n this.setSize(300, 200);\n this.setVisible(false);\n\n try {\n // Open an audio input stream.\n URL url= new URL(\"http://shortmp3.mobi/u/files/WAV/39629-Triple_H_(ShortMp3.com).wav\");\n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\n // Get a sound clip resource.\n Clip clip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n clip.open(audioIn);\n clip.start();\n\n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n }\n\n }",
"private String getAlbum(File mp3){\n\t\tString tempString = \"\";\n\t InputStream input;\n\t ContentHandler handler = new DefaultHandler();\n\t Metadata metadata = new Metadata();\n\t Parser parser = new Mp3Parser();\n\t ParseContext parseCtx = new ParseContext();\n\t \n\t\ttry {\n\t\t\tinput = new FileInputStream(mp3);\n\t\t\tparser.parse(input, handler, metadata, parseCtx);\n\t\t input.close();\n\t\t} \n\t\tcatch (IOException | SAXException | TikaException e) {\n\t\t\tSystem.out.println(\"Error with: \" + mp3.getPath());\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t tempString = metadata.get(\"xmpDM:album\");\n\t\t\n\t\tif (tempString.isEmpty() || tempString.contentEquals(\" \")){\n\t\t\treturn \"Unknown\";\n\t\t}\n\t\treturn tempString;\n\t}",
"String getFilename();",
"public static void play(String w) {\n\n\t\ttry {\n\t\t\t// Open an audio input stream.\n\t\t\t//URL url = this.getClass().getClassLoader().getResource(wavMusicFile);\n\t\t\tURL url = new File(w).toURI().toURL();\n\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\t\t\t// Get a sound clip resource.\n\t\t\tClip c = AudioSystem.getClip();\n\t\t\t// Open audio clip and load samples from the audio input stream.\n\t\t\tc.open(audioIn);\n\t\t\tc.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"abstract public String getSoundResourcesDir();",
"String getFileName();",
"String getFileName();",
"String getFileName();",
"String getFileName();",
"String getFileName();",
"public String getPath() {\n\t\treturn mFileToPlay;\n\t}",
"String getFilepath();",
"public void specialSong()\n {\n if(!mute)\n {\n try {\n \n bclip.stop();\n \n // Open an audio input stream.\n //URL url = this.getClass().getClassLoader().getResource(\"Glitzville.wav\"); \n //if(lastpowerUp.equals(\"RAINBOW\"))\n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Starman.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n sclip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n sclip.open(audioIn); \n \n sclip.start();\n \n \n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n } \n }\n }",
"public abstract SoundContainer loadSound( String filename ) throws IOException;",
"SoundType (String dir)\n\t{\n\t\tmDirectory = mRootURL + dir;\n\t}",
"public void playWinSounds(){\r\n try {\r\n File mFile = new File(Filepath3);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput4 = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip4 = AudioSystem.getClip();\r\n clip4.open(audioInput4);\r\n FloatControl gainControl4 = (FloatControl) clip4.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl4.setValue(-10.0f); //reduces the volume by 10 decibels\r\n clip4.start();\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"private String getArtist(File mp3){\n\t\tString tempString = \"\";\n\t InputStream input;\n\t ContentHandler handler = new DefaultHandler();\n\t Metadata metadata = new Metadata();\n\t Parser parser = new Mp3Parser();\n\t ParseContext parseCtx = new ParseContext();\n\t \n\t\ttry {\n\t\t\tinput = new FileInputStream(mp3);\n\t\t\tparser.parse(input, handler, metadata, parseCtx);\n\t\t input.close();\n\t\t} \n\t\tcatch (IOException | SAXException | TikaException e) {\n\t\t\tSystem.out.println(\"Error with: \" + mp3.getPath());\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t tempString = metadata.get(\"xmpDM:artist\");\n\t\t\n\t\tif (tempString.isEmpty() || tempString.contentEquals(\" \")){\n\t\t\treturn \"Unknown\";\n\t\t}\n\t\treturn tempString;\n\t\t\n\t}",
"public String sing(){\r\n\t\tlinesOfSong = new ArrayList<String>();\r\n\t\tString line;\r\n String fileName = \"OompaLoompaSong.txt\";\r\n\t\t\r\n\t\ttry{\r\n BufferedReader br = new BufferedReader(new FileReader(fileName));\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\t//line = br.readLine();\t\r\n\t\t\t\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n linesOfSong.add(line);\r\n\t\t\t}\r\n\t\t\tbr.close(); \r\n\t\t}\r\n\t\tcatch(IOException e){\r\n\t\t\tSystem.out.println(\"Sorry, we couldn't make this song! \");\r\n\t\t}\r\n\t\tRandomSong();\r\n\t\treturn song;\r\n\t}",
"public static File getSdCardMediaMusicDirectory(){\n return getSdDirectoryStoragePath(\"/NWD-MEDIA\");\n }",
"public void openDiskFile(String musicFileName) throws IOException;",
"public Music loadMusic(String fileName, float volume);",
"@Override\n public String generate(String url) {\n int startIndex = url.lastIndexOf(\"/\");\n int endIndex = url.indexOf(\".mp4\");\n try {\n return url.substring(startIndex, endIndex) + \".temp\";\n } catch (Exception e) {\n e.printStackTrace();\n return url + \".temp\";\n }\n }",
"@SuppressLint(\"SimpleDateFormat\")\n public static File createVideoFile3gp() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = VIDEO_FILE_PREFIX + timeStamp + F3GP_FILE_SUFFIX;\n String nameAlbum = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/\" + nameDir;// getString(R.string.app_name);\n File albumF = new File(nameAlbum);\n if (!albumF.exists()) {\n albumF.mkdirs();\n File noMedia = new File(albumF, \".nomedia\");\n noMedia.createNewFile();\n }\n\n File imageF = new File(albumF, imageFileName);\n imageF.createNewFile();\n return imageF;\n }",
"private void makeNewMusic() {\n File f = music.getFile();\n boolean playing = music.isPlaying();\n music.stop();\n music = new MP3(f);\n if (playing) {\n music.play(nextStartTime);\n }\n }",
"public static void AlertaSimples(File file) {\n try {\n Clip clip = AudioSystem.getClip();\n clip.open(AudioSystem.getAudioInputStream(file));\n clip.start();\n \n \n } catch (Exception e) {\n \n \n }\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsongrandom.equals(\"\");\r\n\t\t\t\tsongrandom = piff.get(3);\r\n\t\t\t\tSongchoice = new File(songrandom + \".WAV\");\r\n\t\t\t}",
"public static void main(String args[]) throws Exception\r\n {\n File f=new File(\"song.mp3\");\r\n\r\n\r\n // Create a Player object that realizes the audio\r\n final Player p=Manager.createRealizedPlayer(f.toURI().toURL());\r\n\r\n\r\n // Start the music\r\n p.start();\r\n\r\n\r\n // Create a Scanner object for taking input from cmd\r\n Scanner s=new Scanner(System.in);\r\n\r\n\r\n // Read a line and store it in st\r\n String st=s.nextLine();\r\n\r\n\r\n // If user types 's', stop the audio\r\n if(st.equals(\"s\"))\r\n {\r\n p.stop();\r\n }\r\n }",
"public WavPlayer(String track) {\n\t\tthis.wavMusicFile = track;\n\t\t//startSound();\n\n\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsongrandom.equals(\"\");\r\n\t\t\t\tsongrandom = piff.get(1);\r\n\t\t\t\tSongchoice = new File(songrandom + \".WAV\");\r\n\t\t\t\t\r\n\t\t\t}",
"public static File createPlayerFile(){\n try {\n playerFile = new File(System.getProperty(\"user.dir\") + \"/PlayerFiles/\" + \".txt\"); //creates player file, can it run on android?\n playerFile.createNewFile();\n }catch (IOException e){\n e.printStackTrace();\n }\n finally {\n return playerFile;\n }\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsongrandom.equals(\"\");\r\n\t\t\t\tsongrandom = piff.get(7);\r\n\t\t\t\tSongchoice = new File(songrandom + \".WAV\");\r\n\t\t\t}",
"@Override\r\n \tpublic void play() {\n \t\tFile file = new File(location);\r\n \t\tlong audioFileLength = file.length();\r\n \t\tAudioInputStream audioInputStream;\r\n \t\ttry {\r\n \t\t\taudioInputStream = AudioSystem.getAudioInputStream(file);\r\n \r\n \t\t\tAudioFormat format = audioInputStream.getFormat();\r\n \r\n \t\t\tint frameSize = format.getFrameSize();\r\n \t\t\tfloat frameRate = format.getFrameRate();\r\n \t\t\tdurationInSeconds = (audioFileLength / (frameSize * frameRate));\r\n \r\n \r\n \t\t\tLine.Info linfo = new Line.Info(Clip.class);\r\n \t\t\tLine line = AudioSystem.getLine(linfo);\r\n \t\t\tclip = (Clip) line;\r\n \t\t\t//clip.addLineListener(this);\r\n \t\t\tclip.open(audioInputStream);\r\n \t\t\tclip.start();\r\n \r\n \t\t} catch (UnsupportedAudioFileException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t} catch (IOException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t} catch (LineUnavailableException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t}\t\r\n \r\n \t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsongrandom.equals(\"\");\r\n\t\t\t\tsongrandom = piff.get(5);\r\n\t\t\t\tSongchoice = new File(songrandom + \".WAV\");\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsongrandom.equals(\"\");\r\n\t\t\t\tsongrandom = piff.get(4);\r\n\t\t\t\tSongchoice = new File(songrandom + \".WAV\");\r\n\t\t\t}",
"public void playMusic() {\r\n try {\r\n File mFile = new File(Filepath);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(audioInput);\r\n FloatControl gainControl = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl.setValue(-25.0f); //reduces the volume by 25 decibels\r\n clip.start();\r\n clip.loop(Clip.LOOP_CONTINUOUSLY);\r\n\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsongrandom.equals(\"\");\r\n\t\t\t\tsongrandom = piff.get(6);\r\n\t\t\t\tSongchoice = new File(songrandom + \".WAV\");\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsongrandom.equals(\"\");\r\n\t\t\t\tsongrandom = piff.get(8);\r\n\t\t\t\tSongchoice = new File(songrandom + \".WAV\");\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsongrandom.equals(\"\");\r\n\t\t\t\tsongrandom = piff.get(2);\r\n\t\t\t\tSongchoice = new File(songrandom + \".WAV\");\r\n\t\t\t}",
"private boolean isMp3(File file){\n\t\tif (file.getName().endsWith(\".mp3\")){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public Sound(String theSong)\n\t{\n\t\tminim = new Minim(new PApplet());\n\t\tthis.theSong = theSong;\n\t\tcanPlay = true;\n\t\tswitch (theSong)\n\t\t{\n\t\tcase \"SG1\":\n\t\t\tsong = minim.loadFile(\"assets/shotgunCock1.wav\");\n\t\t\tbreak;\n\t\tcase \"SG2\":\n\t\t\tsong = minim.loadFile(\"assets/shotgunCock2.wav\");\n\t\t\tbreak;\n\t\tcase \"ARFire\":\n\t\t\tsong = minim.loadFile(\"assets/M4Fire.mp3\");\n\t\t\tbreak;\n\t\tcase \"click\":\n\t\t\tsong = minim.loadFile(\"assets/gunClick.mp3\");\n\t\t\tbreak;\n\t\tcase \"clipIn\":\n\t\t\tsong = minim.loadFile(\"assets/clipIn.mp3\");\n\t\t\tbreak;\n\t\tcase \"clipOut\":\n\t\t\tsong = minim.loadFile(\"assets/clipOut.mp3\");\n\t\t\tbreak;\n\t\tcase \"chamberOut\":\n\t\t\tsong = minim.loadFile(\"assets/ARChamberOut.mp3\");\n\t\t\tbreak;\n\t\tcase \"chamberIn\":\n\t\t\tsong = minim.loadFile(\"assets/ARChamberIn.mp3\");\n\t\t\tbreak;\t\t\n\t\tcase \"shell\":\n\t\t\tsong = minim.loadFile(\"assets/shellFall.mp3\");\n\t\t\tbreak;\n\t\tcase \"SGFire\":\n\t\t\tsong = minim.loadFile(\"assets/SGBlast.mp3\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tsong = null;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}",
"private Song(String path) {\n\t\tthis.filepath = path + \"\";\n\t\tAudioFileFormat baseFileFormat;\n\t\tClassLoader classloader = Thread.currentThread().getContextClassLoader();\n\t\tInputStream is = classloader.getResourceAsStream(path);\n\t\ttry {\n\t\t\tbaseFileFormat = new MpegAudioFileReader().getAudioFileFormat(is);\n\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\tMap properties = baseFileFormat.properties();\n\t\t\tlong duration = (long) properties.get(\"duration\");\n\t\t\tthis.length = (int) duration / 1000;\n\t\t\tthis.author = (String) properties.get(\"author\");\n\t\t\tthis.name = (String) properties.get(\"title\");\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Couldn't read the detailed informations for song:\" + path);\n\t\t}\n\t\tFile tempfile = new File(path);\n\t\tthis.displayname = tempfile.getName();\n\t\tif (this.author != null && !this.author.equals(\"\") && this.name != null && !this.name.equals(\"\"))\n\t\t\tthis.displayname = this.author + \" - \" + this.name;\n\t}",
"static void bark(String soundFile)\n {\n Media sound = new Media(new File(soundDir + soundFile + \".wav\").toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.play();\n }",
"int select_musics(Musica mus, int n, String target_Folder, int ids_file[]) {\n File temp;\n File target;\n File mpos;\n int pos, i;\n boolean copy_files = false;\n boolean aleatory = true;\n\n target = new File(target_Folder);\n String target_Original=target_Folder;\n if (target.exists()) copy_files = true;\n\n\n\n if (n == -1) /* n=-1 when selection is not random. */ {\n n = ids_quantity;\n aleatory = false;\n }\n\n for (i = 0; i < n; i++) { /* For each music from list or to be selected randomly */\n System.out.println(\"\\n\" + (i + 1) + \"/\" + n);\n if (music_count == 1) /* if only one music remaining, play this one and select all again */\n {\n pos = 0;\n temp = AllFiles[pos];\n System.out.println(temp.getName());\n System.out.println(temp.getAbsolutePath());\n music_count = music_total;\n }\n else\n {\n if (aleatory) {\n Random rand = new Random(); /* Select one music randomly */\n pos = rand.nextInt(music_count);\n System.out.println(\"id#:[\" + pos+ \"]\");\n temp = AllFiles[pos];\n music_count--; /* Exchange selected music with last one and reduce list size to not repeat */\n AllFiles[pos] = AllFiles[music_count];\n AllFiles[music_count] = temp;\n System.out.println(temp.getName());\n System.out.println(temp.getAbsolutePath());\n\n } else {\n pos = ids_file[i]; /* not random, just take file from array */\n System.out.println(\"id#:[\" + pos+\"]\");\n temp = AllFiles[pos];\n System.out.println(temp.getName());\n System.out.println(temp.getAbsolutePath());\n }\n }\n Path FROM = Paths.get(temp.getAbsolutePath());\n\n String ext = temp.getName().substring(temp.getName().length() - 3); /* Set extension according */\n\n if ((Objects.equals(ext.toLowerCase(), \"mp3\")))\n ext = \"mp3\";\n else\n ext = \"wma\";\n\n\n\n if (copy_files) /* If subfolder should be created, create them,if not use one folder only */\n {\n if (Main.subgroup)\n {\n target_Folder = target_Original + \"\\\\LetTheMusicPlay\" + (i/Main.maxsubgroup+1);\n }\n else\n {\n target_Folder = target_Original + \"\\\\LetTheMusicPlay\";\n }\n }\n target = new File(target_Folder);\n if (!target.exists()) target.mkdir();\n\n if (copy_files) { /* when copying if same filename exist, copy to a different folder */\n\n\n String path_text = target_Folder + \"\\\\\" + temp.getName();\n if (Main.number_files) path_text = target_Folder + \"\\\\(\" + zerofill(i+1,n) + \")\"+ temp.getName();\n target = new File(path_text);\n int j = 0;\n while (target.exists()) {\n j++;\n target = new File(target_Folder + \"\\\\\" + j);\n if (!target.exists()) target.mkdir();\n path_text = target_Folder + \"\\\\\" + j + \"\\\\\" + temp.getName();\n target = new File(path_text);\n }\n Path TO = Paths.get(path_text);\n CopyOption[] options = new CopyOption[]{\n StandardCopyOption.REPLACE_EXISTING,\n StandardCopyOption.COPY_ATTRIBUTES};\n try {\n Files.copy(FROM, TO, options);\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else {\n Path TO = Paths.get(\"music1.\" + ext); /* to play, copy file to a temporary file to avoid issues due name*/\n if (flag_music_copy == 0) TO = Paths.get(\"music2.\" + ext);\n //overwrite existing file, if exists\n CopyOption[] options = new CopyOption[]{\n StandardCopyOption.REPLACE_EXISTING,\n StandardCopyOption.COPY_ATTRIBUTES};\n try {\n Files.copy(FROM, TO, options);\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n PrintWriter writer = new PrintWriter(\"playmusic.bat\", \"ISO-8859-1\");\n if (flag_music_copy == 1) {\n writer.println(\"music1.\" + ext);\n File f = new File(\"music1.\" + ext);\n f.setWritable(true);\n }\n if (flag_music_copy == 0) {\n writer.println(\"music2.\" + ext);\n File f = new File(\"music2.\" + ext);\n f.setWritable(true);\n }\n\n flag_music_copy = (flag_music_copy + 1) % 2; /* Exchange between 1 and 2 */\n\n writer.close();\n Runtime.getRuntime().exec(\"playmusic.bat\"); /* Play Music */\n Thread.sleep(250);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n Scanner in = new Scanner(System.in);\n int s;\n s = -1;\n\n while ((i < n - 1) && (s == -1)) {\n System.out.print(\"Type any number greater than 0 to next music or 0 to exit: \"); /* Wait user select next one */\n s = in.nextInt();\n\n }\n ;\n if (s == 0) break;\n }\n }\n return (0);\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsongrandom.equals(\"\");\r\n\t\t\t\tsongrandom = piff.get(0);\r\n\t\t\t\tSongchoice = new File(songrandom + \".WAV\");\r\n\t\t\t}",
"public String getFilename();",
"File getFile();",
"File getFile();",
"private void sendMusic(String path) {\n try {\n System.out.println(\"start sendMusic\");\n File myFile = new File(path);\n System.out.println(\"openFile\");\n byte[] mybytearray = new byte[(int) myFile.length()];\n FileInputStream fis = new FileInputStream(myFile);\n System.out.println(\"Sending...\");\n int count;\n if ((count = fis.read(mybytearray)) > 0) {\n output.write(mybytearray, 0, count);\n System.out.println(count);\n output.flush();\n }\n output.write(0);\n output.flush();\n fis.close();\n System.out.println(\"finish sending\");\n }catch (Exception e){\n System.out.println(\"sendMusic method\");\n System.err.println();\n }\n }",
"private static void displaySoundDir(){\n System.out.println(SOUNDS_DIR);\n }",
"public WritableMp3File() {\n super();\n // TODO Auto-generated constructor stub\n }",
"public void playFile(final String path) {\n\t\tLog.d(TAG, \"Play file path = \" + path);\n\t\tif (mPlayList == null || mPlayPos < 0) {\n\t\t\tContentResolver resolver = getContentResolver();\n\t\t\tUri uri;\n\t\t\tString where;\n\t\t\tString selectionArgs[];\n\t\t\tif (path.startsWith(\"content://media/\")) {\n\t\t\t\turi = Uri.parse(path);\n\t\t\t\twhere = null;\n\t\t\t\tselectionArgs = null;\n\t\t\t} else {\n\t\t\t\turi = MediaStore.Audio.Media.getContentUriForPath(path);\n\t\t\t\twhere = MediaStore.Audio.Media.DATA + \"=?\";\n\t\t\t\tselectionArgs = new String[] { path };\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tCursor c = resolver.query(uri,\n\t\t\t\t\t\tnew String[] { MediaStore.Audio.Media._ID }, where,\n\t\t\t\t\t\tselectionArgs, null);\n\t\t\t\tif (c != null) {\n\t\t\t\t\tif (c.getCount() > 0) {\n\t\t\t\t\t\tc.moveToNext();\n\t\t\t\t\t\tensurePlayListCapacity(1);\n\t\t\t\t\t\tmPlayListLen = 1;\n\t\t\t\t\t\tmPlayOrder = new int[] { 0 };\n\t\t\t\t\t\tmPlayList[0] = SongFactory.newSong(HostType.LOCAL,\n\t\t\t\t\t\t\t\tc.getString(0));\n\t\t\t\t\t\tmPlayPos = 0;\n\t\t\t\t\t}\n\t\t\t\t\tc.close();\n\t\t\t\t\tc = null;\n\t\t\t\t}\n\t\t\t} catch (UnsupportedOperationException ex) {\n\t\t\t}\n\t\t}\n\t\tmFileToPlay = path;\n\t\tmPlayer.setPreparedListener(new OnPreparedListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onPrepared(MediaPlayer mp) {\n\t\t\t\tmOpenFailedCounter = 0;\n\t\t\t\tplay();\n\t\t\t\tsetNextTrack();\n\t\t\t\tnotifyChange(EVENT_META_CHANGED);\n\t\t\t\tupdateNotification();\n\t\t\t}\n\t\t});\n\t\tmPlayer.setErrorListener(new OnErrorListener() {\n\t\t\t@Override\n\t\t\tpublic boolean onError(MediaPlayer mp, int what, int extra) {\n\t\t\t\t// if we get here then opening the file failed. We're\n\t\t\t\t// either going to create a new one next, or stop trying\n\t\t\t\tif (mOpenFailedCounter < 10 && mPlayListLen > 1) {\n\t\t\t\t\tmOpenFailedCounter++;\n\t\t\t\t\tLog.w(TAG,\n\t\t\t\t\t\t\t\"Failed to open file for playback. Try count: \"\n\t\t\t\t\t\t\t\t\t+ mOpenFailedCounter);\n\t\t\t\t\tgotoNext(false);\n\t\t\t\t} else {\n\t\t\t\t\tmOpenFailedCounter = 0;\n\t\t\t\t\tstop(true);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\t\tmPlayer.setDataSource(mFileToPlay);\n\t}",
"private void playMusic(File filepath) {\r\n\t\ttry {\r\n\t\t AudioInputStream song = AudioSystem.getAudioInputStream(filepath);\r\n\t\t\tAudioFormat format = song.getFormat();\r\n\t\t DataLine.Info info = new DataLine.Info(Clip.class, format);\r\n\t\t Clip clip = (Clip) AudioSystem.getLine(info);\r\n\t\t clip.open(song);\r\n\t\t clip.start();\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\tthrow new ErrorException(ex);\r\n\t\t}\r\n\t}",
"private String soundConversion() {\n int reading = (record[18] & 255) + ((record[21] & 0x0C) << 6);\n return (reading * 100) / 1024 + \"\";\n }",
"public String getFILE_SAMPLE() {\r\n return FILE_SAMPLE;\r\n }",
"public void playDonkeySounds(){\r\n try {\r\n File mFile = new File(Filepath2);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput3 = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip3 = AudioSystem.getClip();\r\n clip3.open(audioInput3);\r\n FloatControl gainControl3 = (FloatControl) clip3.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl3.setValue(-10.0f); //reduces the volume by 10 decibels\r\n clip3.start();\r\n\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"java.lang.String getFileName();",
"java.lang.String getFileName();",
"java.lang.String getFileName();"
] | [
"0.68998444",
"0.6824821",
"0.6731756",
"0.6506533",
"0.6478054",
"0.6373859",
"0.6343999",
"0.63306123",
"0.6212401",
"0.6212401",
"0.6212401",
"0.6207613",
"0.6143975",
"0.6111536",
"0.6103953",
"0.609632",
"0.6072625",
"0.59576803",
"0.59576315",
"0.5927872",
"0.59197485",
"0.5888013",
"0.5860841",
"0.58236146",
"0.5798691",
"0.5755606",
"0.5751843",
"0.5750926",
"0.5739112",
"0.5734939",
"0.5724616",
"0.5706121",
"0.570372",
"0.56964946",
"0.5693642",
"0.5650679",
"0.5634711",
"0.5626725",
"0.5615481",
"0.55987185",
"0.55890524",
"0.55861574",
"0.5579168",
"0.55787915",
"0.5560358",
"0.55583394",
"0.5551504",
"0.55364007",
"0.55323",
"0.55323",
"0.55323",
"0.55323",
"0.55323",
"0.55192953",
"0.5516655",
"0.5509132",
"0.5498276",
"0.54801303",
"0.5468647",
"0.54660594",
"0.54566383",
"0.544858",
"0.54468745",
"0.54443574",
"0.54401577",
"0.54378605",
"0.5437441",
"0.54333013",
"0.542915",
"0.5425802",
"0.542381",
"0.5421641",
"0.5421241",
"0.5419486",
"0.54124624",
"0.54112005",
"0.5407064",
"0.5401366",
"0.54006445",
"0.5394843",
"0.5391352",
"0.5375965",
"0.5367754",
"0.5367054",
"0.5364429",
"0.53620553",
"0.5360291",
"0.5359199",
"0.53578585",
"0.53578585",
"0.5354224",
"0.5353076",
"0.53521174",
"0.5341706",
"0.53416854",
"0.53403956",
"0.5337941",
"0.53351027",
"0.5332662",
"0.5332662",
"0.5332662"
] | 0.0 | -1 |
===============Paint Ridersmethod for the grid================== | public void paintRiders(Graphics g){
Graphics2D g2D;
g2D=(Graphics2D)pnRider1.getGraphics();
g2D.drawImage(Rider.rider1Image,1,20,this);
g2D=(Graphics2D)pnRider2.getGraphics();
g2D.drawImage(Rider.rider2Image,1,20,this);
g2D=(Graphics2D)pnRider3.getGraphics();
g2D.drawImage(Rider.rider3Image,1,20,this);
g2D=(Graphics2D)pnRider4.getGraphics();
g2D.drawImage(Rider.rider4Image,1,20,this);
g2D=(Graphics2D)pnRider5.getGraphics();
g2D.drawImage(Rider.rider5Image,1,20,this);
g2D=(Graphics2D)pnRider6.getGraphics();
g2D.drawImage(Rider.rider6Image,1,20,this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void drawGrid(){\r\n\r\n\t\tdrawHorizontalLines();\r\n\t\tdrawVerticalLines();\r\n\t}",
"private void paintGrid() {\n\n g2d.setColor(_BOARDCOLOR); //Set the color to specific color of the board.\n\n for(int i = 0; i < grids.size(); i++) { //Iterating the 16 grids while drawing each on JComponent.\n\n g2d.draw(grids.get(i));\n }\n }",
"protected abstract void paintGrid(Graphics2D g);",
"public void draw_grid() {\n for (int i = 0; i <= xNumTiles; i++) {\n stroke(100);\n line(i * tileSize, 0, i * tileSize, yNumTiles * tileSize);\n }\n\n for (int j = 0; j <= yNumTiles; j++) {\n stroke(100);\n line(0, j * tileSize, xNumTiles * tileSize, j * tileSize);\n }\n }",
"public void paintComponent(Graphics g){\n \t\tsuper.paintComponent(g);\r\n \r\n \t\tint numOfRows = (int)blockShape.getResolution().x;\r\n \t\tint numOfCols = (int)blockShape.getResolution().y;\r\n \t\tint gridSize = (int)(SHAPE_WIN_SIZE/numOfRows);\r\n \t\t\r\n \t\t//1st: paint each element in the BlockShape -> shape(Color[][])\r\n \t\tfor(int i=0; i< numOfRows;i++){\r\n \t\t\tfor(int j=0; j< numOfCols; j++){\r\n \t\t\t\tg.setColor(blockShape.getShapeElement(i, j));\r\n \r\n \t\t\t\tif(i == numOfRows-1 || j == numOfCols-1){\r\n \t\t\t\t\t//the last row and last column is a bit wider because of the type casting =_=\r\n \t\t\t\t\tg.fillRect(j*gridSize, i*gridSize, gridSize+10, gridSize+10);\r\n \t\t\t\t}else{\r\n \t\t\t\t\tg.fillRect(j*gridSize, i*gridSize, gridSize, gridSize);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\r\n \t\t//2nd: paint the grid corresponding to the resolution of blockShape\r\n \t\tg.setColor(Color.orange);\r\n \t\tfor (int row = 0; row < numOfRows; row++) {\r\n \t\t\tg.drawLine(0,row*gridSize ,SHAPE_WIN_SIZE, row*gridSize);\r\n \t\t}\r\n \t\tg.drawLine(0,SHAPE_WIN_SIZE, SHAPE_WIN_SIZE, SHAPE_WIN_SIZE);\r\n \r\n \t\tfor (int col = 0; col < numOfCols; col++) {\r\n \t\t\tg.drawLine(col*gridSize, 0 , col*gridSize , SHAPE_WIN_SIZE);\r\n \t\t}\r\n \t\tg.drawLine(SHAPE_WIN_SIZE-1, 0, SHAPE_WIN_SIZE-1, SHAPE_WIN_SIZE);\r\n \t}",
"public void drawGrid()\n {\n noStroke();\n for(int i = 0; i < xCells; i++)\n {\n for(int j = 0; j < yCells; j++)\n {\n if(pattern[i][j])\n fill(0);\n else\n fill(255);\n rect(firstCellPosition[0]+i*cellSize,firstCellPosition[1]+j*cellSize,cellSize-1,cellSize-1);\n }\n }\n }",
"@Override\n\tpublic void draw(RoomBlocks grid) {\n\t\trenderer.setProjectionMatrix(CameraHolder.instance().getOrtho().combined);\n//\t\tCont tot = new Cont();\n\t\tColor color = new Color();\n\n\t\t\n\t\tDimensions dim = grid.getDimensions().toRoomWorldDimmensions();\n\t\tgrid.forEach(bl -> {\n//\t\t\t\n\t\t\tint x = (GeneratorConstants.ROOM_BLOCK_SIZE * bl.getX()) + GeneratorConstants.ROOM_BLOCK_SIZE;\n\t\t\t\n\t\t\tx = (dim.getW() - x) + dim.getX();\n\t\t\t\n\t\t\tint pseudWorldRoomY = grid.getDimensions().getY() * Configuration.getLevelGridElementContentSize();\n\t\t\tint y = (bl.getY() + pseudWorldRoomY) * (GeneratorConstants.ROOM_BLOCK_SIZE);\n\t\t\t\n\t\t\tShapeType shType = ShapeType.Filled;\n\t\t\tboolean render = false;\n\t\t\t\n\t\t\tif(bl.isDoor()) {\n\t\t\t\trender = true;\n\t\t\t\tcolor.set(0, 0, 0, 1);\n\t\t\t} else if(bl.isWall()) {\n//\t\t\t\trender = true;\n//\t\t\t\tcolor.set(1, 1, 1, 1);\n//\t\t\t\tshType = ShapeType.Line;\n\t\t\t} else if(bl.getMetaInfo() != null) {//TODO\n\t\t\t\t\n\t\t\t\tif(bl.getMetaInfo().getType().equals(\".\")) {\n\t\t\t\t\trender = true;\n\t\t\t\t\tcolor.set(0, 0, 0, 1);\n\t\t\t\t} else if(!bl.getMetaInfo().getType().equals(\"x\")) {\n\t\t\t\t\t\n\t\t\t\t\tBrush brush = Configuration.brushesPerTile.get(bl.getMetaInfo().getType().charAt(0));\n\t\t\t\t\tif(brush != null) {// && bl.getOwner() != null\n\t\t\t\t\t\t\n//\t\t\t\t\t\tif(bl.getOwner() != null) {\n//\t\t\t\t\t\t\tSystem.out.println(\"owner: \" + brush.tile);\n//\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\trender = true;\n\t\t\t\t\t\tcolor.set(brush.color[0], brush.color[1], brush.color[2], 1);\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(render) {\n\t\t\t\t\n\t\t\t\tint size = GeneratorConstants.ROOM_BLOCK_SIZE;\n\t\t\t\t\n\t\t\t\trenderer.begin(shType);\n\t\t\t\trenderer.setColor(color);\n\t\t\t\trenderer.rect(x, y, size, size);\n\t\t\t\trenderer.end();\n\t\t\t}\n\t\t\t\n//\t\t\tif(bl.getOwner() != null ) {\n//\t\t\t\tfinal int fx = x;\n//\t\t\t\tfinal int fy = y;\n//\t\t\t\t\n//\t\t\t\tbl.getOwner().forEachItems(itm -> {//desenhando os items\n//\t\t\t\t\trenderer.begin(ShapeType.Filled);\n//\t\t\t\t\trenderer.setColor(itm.color[0], itm.color[1], itm.color[2], 1);\n//\t\t\t\t\trenderer.rect(fx + itm.dx, fy + itm.dy, itm.width, itm.height);\n//\t\t\t\t\trenderer.end();\t\t\t\t\t\t\n//\t\t\t\t});\n//\t\t\t}\t\t\t\n\t\t});\n\t}",
"private void redraw() {\r\n for (int row = 0; row < maxRows; row++) {\r\n for (int column = 0; column < maxColumns; column++) {\r\n grid[row][column].setBackground(SQUARE_COLOR);\r\n }\r\n }\r\n grid[snake[HEAD].row][snake[HEAD].column].setBackground(\r\n SNAKE_HEAD_COLOR);\r\n for (int i = 1; i < length; i++) {\r\n grid[snake[i].row][snake[i].column].setBackground(SNAKE_BODY_COLOR);\r\n }\r\n grid[powerUp.row][powerUp.column].setBackground(POWER_UP_COLOR);\r\n }",
"@Override\n public void paintComponent(final Graphics theGraphics) {\n super.paintComponent(theGraphics);\n final Graphics2D g2d = (Graphics2D) theGraphics;\n\n for (int i = 0; i < myDrawingArray.size(); i++) {\n final Drawing drawing = myDrawingArray.get(i);\n g2d.setPaint(drawing.getColor());\n g2d.setStroke(new BasicStroke(drawing.getWidth()));\n g2d.draw(drawing.getShape());\n }\n \n if (myCurrentShape != null) {\n g2d.setPaint(myCurrentShape.getColor());\n g2d.setStroke(new BasicStroke(myCurrentShape.getWidth()));\n g2d.draw(myCurrentShape.getShape());\n }\n \n if (myGrid) { //Paints the grid if myGrid is true.\n g2d.setStroke(new BasicStroke(1));\n g2d.setPaint(Color.GRAY);\n for (int row = 0; row < getHeight() / GRID_SPACING; row++) {\n final Line2D line = new Line2D.Float(0, GRID_SPACING + (row * GRID_SPACING),\n getWidth(), GRID_SPACING + (row * GRID_SPACING));\n g2d.draw(line);\n }\n for (int col = 0; col < getWidth() / GRID_SPACING; col++) {\n final Line2D line = new Line2D.Float(GRID_SPACING \n + (col * GRID_SPACING), 0,\n GRID_SPACING\n + (col * GRID_SPACING), getHeight());\n g2d.draw(line);\n }\n \n }\n }",
"private void paintField() {\r\n // one brick length\r\n int brickLength = (getHeight() - (BRICKS_PER_ROW + 1) * BRICK_SEP) / BRICKS_PER_ROW;\r\n // x coordinate for creating one brick\r\n int x1;\r\n // y coordinates for creating one brick\r\n int y1, y2 = 0;\r\n Brick brick;\r\n for (int i = 0; i < BRICKS_PER_ROW; i++) {\r\n y1 = y2 + BRICK_SEP;\r\n y2 = y1 + brickLength;\r\n\r\n for (int j = 0; j < BRICKS_PER_ROW; j++) {\r\n x1 = BRICK_SEP + brickLength * j + BRICK_SEP * j;\r\n brick = new Brick(x1, y1, brickLength, brickLength);\r\n brick.setFilled(true);\r\n brick.setColor(Color.WHITE);\r\n brick.setBrickColor(Color.WHITE);\r\n add(brick);\r\n bricks[i][j] = brick;\r\n }\r\n }\r\n }",
"public void draw() {\r\n\t\tthis.sprite.draw(this.col * MainApp.getGridSize(), this.row * MainApp.getGridSize());\r\n\t}",
"@Override\n protected void drawGrid(Graphics2D g2, int startPos, int rightEdgePos, int bottomEdgePos, int start,\n int nrows1, int ncols1, int gridOffset) {}",
"@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tfor (int i = 0; i < inc.length; i++) {\n\t\t\t\t\tg.setColor(new Color(220 - i * 50, 220 - i * 50, 220 - i * 50));\n\t\t\t\t\tg.fillOval(inc[i][0], inc[i][1], 30, 30);\n\t\t\t\t}\n\t\t\t\tg.setColor(Color.yellow);\n\t\t\t\tg.fillOval(x, h, 30, 30);\n\n\t\t\t\t// 장애물\n\t\t\t\tg.setColor(Color.red);\n\t\t\t\tg.fillRect(0, 480, 800, 20);\n\t\t\t\tg.fillRect(400, 200, 50, 300);\n\t\t\t\tg.fillRect(300, 350, 100, 30);\n\t\t\t\t//\n\t\t\t\tGraphics2D g2 = bi.createGraphics();\n//\t\t\t\tthis.paintAll(g2);\n\t\t\t}",
"public void paint () {\n\t\tPaint.clear();\n\t\t\n\t\tPaint.setColor(Color.WHITE);\n\t\tPaint.fillRect(0,0,numcols_ * cellsize_,numrows_ * cellsize_);\n\t\tPaint.setColor(Color.GRAY);\n\t\tPaint.drawRect(0,0,numcols_ * cellsize_ - 1,numrows_ * cellsize_ - 1);\n\n\t\tfor ( int row = 0 ; row < numrows_ ; row++ ) {\n\t\t\tfor ( int col = 0 ; col < numcols_ ; col++ ) {\n\t\t\t\tint x = col * cellsize_;\n\t\t\t\tint y = row * cellsize_;\n\n\t\t\t\tThing thing = at(row,col);\n\t\t\t\tif ( thing != null ) {\n\t\t\t\t\tthing.paint(x,y,cellsize_,cellsize_);\n\t\t\t\t}\n\t\t\t\tPaint.setColor(Color.GRAY);\n\t\t\t\tPaint.drawRect(x,y,cellsize_,cellsize_);\n\t\t\t}\n\t\t}\n\n\t}",
"private void markGrid(int row, int col, boolean p1Turn) {\n if (col == 1) {\n if (row == 5) {\n r6c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n } else if (col == 2) {\n if (row == 5) {\n r6c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 3) {\n if (row == 5) {\n r6c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 4) {\n if (row == 5) {\n r6c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 5) {\n if (row == 5) {\n r6c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 6) {\n if (row == 5) {\n r6c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 7) {\n if (row == 5) {\n r6c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n if (game.checkForWin()) { // This shows the final screen when the algorithm declares a win; buttons are disabled\n textOutput.setText(\"Game Over! \" + (game.getPlayerOneTurn() ? \" Player 1 Wins!\" : \" Player 2 Wins!\"));\n a1Button.setEnabled(false);\n a2Button.setEnabled(false);\n a3Button.setEnabled(false);\n a4Button.setEnabled(false);\n a5Button.setEnabled(false);\n a6Button.setEnabled(false);\n a7Button.setEnabled(false);\n }\n else {\n textOutput.setText(game.getPlayerOneTurn() ? \"Player 1 Turn\" : \"Player 2 Turn\"); // If there is no win, the turn alternates\n }\n game.setPlayerOneTurn();\n }",
"@Override\n protected void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n\n int width = getWidth();\n int height = getHeight();\n float pieceWidth = width/5.0f-5;\n float pieceHeight = height/3.0f-20;\n Log.d(\"hello\", \"DRAWINGGGGGGG\");\n\n //this.paint.setColor(Color.WHITE);\n this.paint.setStyle(Paint.Style.FILL);\n //canvas.drawPaint(this.paint);\n canvas.drawColor(0x00000000);\n\n this.paint.setColor(Color.WHITE);\n //canvas.drawRect(0, 0, 100, 100, this.paint);\n\n\n for(int i = 0; i < 5; i++)\n for(int j = 0; j<3; j++){\n Cell cell = grid.getCellAt(i, j);\n if(cell!=null){\n //Before you can call any drawing methods, though, it's necessary to create a Paint object.\n\n this.paint.setColor(cell.getColor());\n canvas.drawRect(i*pieceWidth, j*pieceHeight, i*pieceWidth + pieceWidth, j*pieceHeight + pieceHeight, this.paint);\n\n this.paint.setColor(Color.WHITE);\n this.paint.setStrokeWidth(4);\n //Lines on window\n canvas.drawLine(i*pieceWidth, j*pieceHeight, i*pieceWidth, j*pieceHeight + pieceHeight, this.paint);\n canvas.drawLine(i*pieceWidth, j*pieceHeight, i*pieceWidth + pieceWidth, j*pieceHeight, this.paint);\n canvas.drawLine(i*pieceWidth + pieceWidth, j*pieceHeight, i*pieceWidth + pieceWidth, j*pieceHeight + pieceHeight, this.paint);\n canvas.drawLine(i*pieceWidth, j*pieceHeight + pieceHeight, i*pieceWidth + pieceWidth, j*pieceHeight + pieceHeight, this.paint);\n\n }\n }\n\n\n\n }",
"@Override\n protected void paintComponent(Graphics g)\n {\n Graphics2D g2 = (Graphics2D) g;\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n\n Rectangle r = getBounds();\n g2.setColor(theme.getPitColor());\n // Paint different shapes depending on the shape type\n switch(theme.getPitShape())\n {\n case CIRCLE:\n g2.fillOval(0, 0, r.width, r.height);\n break;\n case SQUARE:\n g2.fillRect(0, 0, r.width, r.height);\n break;\n }\n\n paintStoneCount(g2);\n }",
"@Override\n public void paintComponent(Graphics g) {\n if (!(drawStripes = isOpaque())) {\n super.paintComponent(g);\n return;\n }\n\n // Paint zebra background stripes\n// updateZebraColors();\n final Insets insets = getInsets();\n final int w = getWidth() - insets.left - insets.right;\n final int h = getHeight() - insets.top - insets.bottom;\n final int x = insets.left;\n int y = insets.top;\n int nRows = 0;\n int startRow = 0;\n int height = getRowHeight();\n if (height > 0) {\n nRows = h / height;\n } else {\n // Paint non-uniform height rows first\n final int nItems = getRowCount();\n height = 17; // A default for empty trees\n for (int i = 0; i < nItems; i++, y += height) {\n height = getRowBounds(i).height;\n g.setColor(rowColors[i & 1]);\n g.fillRect(x, y, w, height);\n }\n // Use last row height for remainder of tree area\n nRows = nItems + (insets.top + h - y) / height;\n startRow = nItems;\n }\n\n for (int i = startRow; i < nRows; i++, y += height) {\n g.setColor(rowColors[i & 1]);\n g.fillRect(x, y, w, height);\n }\n\n final int remainder = insets.top + h - y;\n if (remainder > 0) {\n g.setColor(rowColors[nRows & 1]);\n g.fillRect(x, y, w, remainder);\n }\n\n // Paint component\n setOpaque(false);\n super.paintComponent(g);\n setOpaque(true);\n }",
"@Override\r\n\t\tpublic void paintComponent(Graphics g) {\r\n\r\n\t\t\tsuper.paintComponent(g); // Fills the background color.\r\n\r\n\t\t\tg.setColor(Color.DARK_GRAY);\r\n\t\t\tg.fillRect(10, 10, columns * squareSize + 1, rows * squareSize + 1);\r\n\r\n\t\t\tfor (int r = 0; r < rows; r++) {\r\n\t\t\t\tfor (int c = 0; c < columns; c++) {\r\n\t\t\t\t\tif (grid[r][c] == EMPTY) {\r\n\t\t\t\t\t\tg.setColor(Color.WHITE);\r\n\t\t\t\t\t} else if (grid[r][c] == ROBOT) {\r\n\t\t\t\t\t\tg.setColor(Color.RED);\r\n\t\t\t\t\t} else if (grid[r][c] == TARGET) {\r\n\t\t\t\t\t\tg.setColor(Color.GREEN);\r\n\t\t\t\t\t} else if (grid[r][c] == OBST) {\r\n\t\t\t\t\t\tg.setColor(Color.BLACK);\r\n\t\t\t\t\t} else if (grid[r][c] == FRONTIER) {\r\n\t\t\t\t\t\tg.setColor(Color.BLUE);\r\n\t\t\t\t\t} else if (grid[r][c] == CLOSED) {\r\n\t\t\t\t\t\tg.setColor(Color.CYAN);\r\n\t\t\t\t\t} else if (grid[r][c] == ROUTE) {\r\n\t\t\t\t\t\tg.setColor(Color.YELLOW);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tg.fillRect(11 + c * squareSize, 11 + r * squareSize, squareSize - 1, squareSize - 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (drawArrows.isSelected()) {\r\n\t\t\t\t// We draw all arrows from each open or closed state\r\n\t\t\t\t// to its predecessor.\r\n\t\t\t\tfor (int r = 0; r < rows; r++) {\r\n\t\t\t\t\tfor (int c = 0; c < columns; c++) {\r\n\t\t\t\t\t\t// If the current cell is the goal and the solution has\r\n\t\t\t\t\t\t// been found,\r\n\t\t\t\t\t\t// or belongs in the route to the target,\r\n\t\t\t\t\t\t// or is an open state,\r\n\t\t\t\t\t\t// or is a closed state but not the initial position of\r\n\t\t\t\t\t\t// the robot\r\n\t\t\t\t\t\tif ((grid[r][c] == TARGET && found) || grid[r][c] == ROUTE || grid[r][c] == FRONTIER\r\n\t\t\t\t\t\t\t\t|| (grid[r][c] == CLOSED && !(r == robotStart.row && c == robotStart.col))) {\r\n\t\t\t\t\t\t\t// The tail of the arrow is the current cell, while\r\n\t\t\t\t\t\t\t// the arrowhead is the predecessor cell.\r\n\t\t\t\t\t\t\tCell head;\r\n\t\t\t\t\t\t\tif (grid[r][c] == FRONTIER) {\r\n\t\t\t\t\t\t\t\tif (dijkstra.isSelected()) {\r\n\t\t\t\t\t\t\t\t\thead = findPrev(graph, new Cell(r, c));\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\thead = findPrev(openSet, new Cell(r, c));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\thead = findPrev(closedSet, new Cell(r, c));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// The coordinates of the center of the current cell\r\n\t\t\t\t\t\t\tint tailX = 11 + c * squareSize + squareSize / 2;\r\n\t\t\t\t\t\t\tint tailY = 11 + r * squareSize + squareSize / 2;\r\n\t\t\t\t\t\t\t// The coordinates of the center of the predecessor\r\n\t\t\t\t\t\t\t// cell\r\n\t\t\t\t\t\t\tint headX = 11 + head.col * squareSize + squareSize / 2;\r\n\t\t\t\t\t\t\tint headY = 11 + head.row * squareSize + squareSize / 2;\r\n\t\t\t\t\t\t\t// If the current cell is the target\r\n\t\t\t\t\t\t\t// or belongs to the path to the target ...\r\n\t\t\t\t\t\t\tif (grid[r][c] == TARGET || grid[r][c] == ROUTE) {\r\n\t\t\t\t\t\t\t\t// ... draw a red arrow directing to the target.\r\n\t\t\t\t\t\t\t\tg.setColor(Color.RED);\r\n\t\t\t\t\t\t\t\tdrawArrow(g, tailX, tailY, headX, headY);\r\n\t\t\t\t\t\t\t\t// Else ...\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// ... draw a black arrow to the predecessor\r\n\t\t\t\t\t\t\t\t// cell.\r\n\t\t\t\t\t\t\t\tg.setColor(Color.BLACK);\r\n\t\t\t\t\t\t\t\tdrawArrow(g, headX, headY, tailX, tailY);\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}\r\n\t\t}",
"@Override\r\n\tpublic void draw() {\r\n\t\t//Set the background to dark grey\r\n\t\tbackground(50, 50, 50);\t\r\n\t\t//If the current state is processing, display text explaining this\r\n\t\tif (this.currentGameState == DisplayStates.PROCESSING) {\r\n\t\t\ttext(\"Processing, please wait...\", 30, 340); \r\n\t\t} else { //Otherwise, the grid should be drawn in it's current state\r\n\t\t\tthis.zoomer.transform(); //Transform the zoom based on user input\r\n\t\t\t//Get the cells in their current state\r\n\t\t\tthis.gridCells = this.world.getCells(); \r\n\t\t\t//Work out which size images to use.\r\n\t\t\tupdateImageScale();\r\n\t\t\t//Draw the images to the sketch based on the current scale\r\n\t\t\tif (this.currentImageScale == ImageDrawScales.LARGE) {\r\n\t\t\t\tdrawImages(LARGE_IMAGE, this.gridCells);\r\n\t\t\t} else if (this.currentImageScale == ImageDrawScales.MEDIUM) {\r\n\t\t\t\tdrawImages(MEDIUM_IMAGE, this.gridCells);\r\n\t\t\t} else {\r\n\t\t\t\tdrawImages(SMALL_IMAGE, this.gridCells);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override \r\n public void paintComponent(final Graphics theGraphics) { \r\n super.paintComponent(theGraphics); \r\n final Graphics2D g2d = (Graphics2D) theGraphics; \r\n \r\n final int width = myBoard.getWidth(); \r\n final int height = myBoard.getHeight(); \r\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, \r\n RenderingHints.VALUE_ANTIALIAS_ON); \r\n \r\n // draw purple game grid\r\n g2d.setColor(PURPLE); \r\n for (int i = 0; i < Math.max(width, height); i++) { \r\n final int lines = i * GRID_SIZING; \r\n \r\n //draws horizontal lines\r\n g2d.draw(new Line2D.Double(lines, ZERO, lines, height * GRID_SIZING));\r\n \r\n //draws vertical lines\r\n g2d.draw(new Line2D.Double(ZERO, lines, width * GRID_SIZING, lines));\r\n \r\n if (myBoard.isGameOver()) { \r\n myGameOver = true; \r\n myGamePaused = true; \r\n }\r\n } \r\n \r\n //update blocks\r\n drawCurrentPiece(g2d, height, width);\r\n drawFrozenBlocks(g2d, height, width);\r\n handlePausedGame(g2d);\r\n }",
"public void PRCRender() {\n if(rollOver) {\n object.getStyle().setFillColorFloat(20);\n } else if(dragging) {\n object.getStyle().setFillColorFloat(5);\n } else {\n object.style.setFillColorFloat(100);\n }\n object.render();\n }",
"@Override\n public void draw(Graphics g) {\n for (int i = 0; i < values.size(); i++) {\n g.setColor(Color.GRAY);\n g.fillRect(i * 25 - 5, 250 - values.get(i), 10, values.get(i));\n }\n super.draw(g);\n }",
"void drawGridLayout() {\n\t\tpiecesGrid = (GridLayout) findViewById(R.id.layout_container); //get a reference to the GridLayout\n\t\tpiecesGrid.setColumnCount(NUM[COLS]); //set number of columns\n\t\tpiecesGrid.setRowCount(NUM[ROWS]); //set number of rows\n\t\tfor (int i=0; i<NUM[TOTAL]; i++) {\n\t\t\tpiecesGrid.addView(pieceViews.get(i), i); //add the ImageViews\n\t\t}\n\t}",
"public void drawGrid(Graphics2D g, int width, int height, double minX,\n double minY, double maxX, double maxY) {\n g.setColor(Color.BLACK);\n Color gridC; //= new Color(Color.white.getRGB() - BackgroundColor.getRGB());\n Color LightGridC;\n double lumin = BackgroundColor.getRed() * 0.2126 + BackgroundColor.getGreen() * 0.7152\n + BackgroundColor.getBlue() * 0.0722;\n if (lumin > 255 / 2d) {\n gridC = Color.black;\n LightGridC = Color.GRAY;\n } else {\n gridC = Color.white;\n LightGridC = Color.lightGray;\n }\n g.setColor(gridC);\n upperX = maxX;\n lowerX = minX;\n\n upperY = maxY;\n lowerY = minY;\n //debug, drawLine bounds\n// g.drawLine(XOffSet, YOffSet, width, YOffSet);\n// g.drawLine(XOffSet, height, width, height); //X\n//\n// g.drawLine(XOffSet, YOffSet, XOffSet, height);\n// g.drawLine(width, YOffSet, width, height); //Y\n // g.drawLine(30, YOffSet, 30, 0);\n //g.drawLine(XOffSet, 30, 0, 30);\n double Xscale = GetXScale(width);\n double Yscale = GetYScale(height);\n int centerX = getCenterX(width);\n int centerY = getCenterY(height);//-lowerY*Yscale);\n\n // drawLine axis\n g.drawLine(XOffSet, centerY, width, centerY); //X axis\n g.drawLine(centerX, YOffSet, centerX, height); //Y axis\n\n\n //draws grid, numbers and increment lines\n int fontSizeX = (width / (increments * 4));\n int fontSizeY = (height / increments);\n if (fontSizeX > 15) {\n fontSizeX = 15;\n }\n if (fontSizeY > 15) {\n fontSizeY = 15;\n }\n //x-axis\n int t = (int) ((width) * 0.01);\n g.setFont(new Font(\"MonoType\", Font.PLAIN, (fontSizeX)));\n FontMetrics font = g.getFontMetrics();\n for (double i = XOffSet; i <= width; i += ((width - XOffSet) / increments)) {\n if (t == 0) {\n t = 1;\n }\n if (showGrid && i != centerX) {\n g.setColor(LightGridC);\n g.drawLine((int) i, YOffSet, (int) i, height);\n g.setColor(gridC);\n }\n if (showScale) {\n g.drawLine((int) i, (centerY + t), (int) i, (centerY - t));\n }\n\n if (showNumbers) {\n double d = Math.round(100 * ((((width - XOffSet) / Xscale) / (upperX - lowerX)\n * (((i - XOffSet) / Xscale))) + lowerX));\n String o = Double.toString(\n d / 100);\n int textWidth = font.stringWidth(o);\n g.drawString(o, (int) i - textWidth / 2, (centerY + t + font.getHeight()));\n }\n }\n //y axis\n t = (int) (height * 0.01);\n g.setFont(new Font(\"MonoType\", Font.PLAIN, (fontSizeY)));\n font = g.getFontMetrics();\n for (double i = YOffSet; i <= height; i += ((height - YOffSet) / increments)) {\n if (t == 0) {\n t = 1;\n }\n if (showGrid && i != centerY) {\n g.setColor(LightGridC);\n g.drawLine(XOffSet, (int) i, width, (int) i);\n g.setColor(gridC);\n }\n if (showScale) {\n g.drawLine(centerX - t, (int) i, centerX + t, (int) i);\n }\n\n if (showNumbers) {\n double d = Math.round(100 * ((((upperY - lowerY) / ((height - YOffSet) / Yscale)\n * (height - (i)) / Yscale) + lowerY)));\n String o = Double.toString(\n d / 100);\n int textWidth = font.stringWidth(o);\n g.drawString(o, centerX - t - textWidth,\n (int) ((i + font.getHeight() / 2)));\n }\n }\n }",
"private void renderGrid(Graphics g, int width, int height, GridLocation gridPosition){\n g.setColor(Color.GRAY);\n for(int x = 0; x < width; x++){\n for(int y = 0; y < height; y++){\n g.drawRect(gridPosition.getX() + x * CELL_SIZE, gridPosition.getY() + y*CELL_SIZE, CELL_SIZE, CELL_SIZE);\n }\n }\n }",
"private void draw(){\n GraphicsContext gc = canvasArea.getGraphicsContext2D();\n canvasDrawer.drawBoard(canvasArea, board, gc, currentCellColor, currentBackgroundColor, gridToggle);\n }",
"@Override public void paintComponent(Graphics g)\n{\n Dimension sz = getSize();\n Shape r = new Rectangle2D.Float(0,0,sz.width,sz.height);\n Graphics2D g2 = (Graphics2D) g.create();\n Color top = BoardColors.getColor(BICEX_EVAL_SCROLL_COLOR_PROP);\n g2.setColor(top);\n g2.fill(r);\n\n Collection<BicexEvaluationContext> inners = null;\n if (getContext() != null) inners = getContext().getInnerContexts();\n if (inners != null) {\n long start0 = getContext().getStartTime();\n long end0 = getContext().getEndTime();\n g2.setColor(BoardColors.getColor(BICEX_EVAL_SCROLL_CONTEXT_COLOR_PROP));\n for (BicexEvaluationContext ctx : inners) {\n\t double start = ctx.getStartTime();\n\t double end = ctx.getEndTime();\n\t double v0 = (start-start0)/(end0-start0)*sz.getWidth();\n\t double v1 = (end - start0)/(end0-start0)*sz.getWidth();\n\t Shape r1 = new Rectangle2D.Double(v0,0,v1-v0,sz.height);\n\t g2.fill(r1);\n }\n }\n super.paintComponent(g);\n}",
"public void render() {\n int pixel = getPixelSize();\n for (int xx = x; xx<x+w; xx += pixel) {\n for (int yy = y; yy<y+h; yy += pixel) {\n Location next = getLocation(xx, yy);\n if (next != null) { // This way if a wall is spawned at the edge it's ok\n next.setColor(color(255,255,255));\n next.setType(LocationType.WALL);\n getGridCache().add(next);\n }\n }\n }\n }",
"public void draw() {\n final int columns = (int) (2 * Math.ceil(Math.max(-minx, maxx)));\n final int rows = (int) (2 * Math.ceil(Math.max(-miny, maxy)));\n\n final int drawColumns;\n final int drawRows;\n drawColumns = drawRows = Math.max(columns, rows);\n\n double leftOffsetPx = BORDER;\n double rightOffsetPx = BORDER;\n double topOffsetPx = BORDER;\n double bottomOffsetPx = BORDER;\n\n final double availableWidth = view.getWidth() - leftOffsetPx - rightOffsetPx;\n final double availableHeight = view.getHeight() - topOffsetPx - bottomOffsetPx;\n\n final double drawWidth;\n final double drawHeight;\n drawWidth = drawHeight = Math.min(availableWidth, availableHeight);\n\n leftOffsetPx = rightOffsetPx = (view.getWidth() - drawWidth) / 2;\n topOffsetPx = bottomOffsetPx = (view.getHeight() - drawHeight) / 2;\n\n // Adjust for aspect ratio\n columnWidth = rowHeight = drawHeight / columns;\n\n centerX = (drawColumns / 2.0) * columnWidth + leftOffsetPx;\n centerY = (drawRows / 2.0) * rowHeight + topOffsetPx;\n\n drawVerticalLine((float) centerX, topOffsetPx, bottomOffsetPx);\n drawHorizontalLine((float) centerY, leftOffsetPx, rightOffsetPx);\n\n int yTick = (int) (-drawRows / 2.0 / TICK_INTERVAL) * TICK_INTERVAL;\n while (yTick <= drawRows / 2.0) {\n if (yTick != 0) {\n final String label = yTick % (TICK_INTERVAL * 2) == 0 ? String.format(\"%d\", yTick) : null;\n drawYTick(-yTick * rowHeight + centerY, centerX, label);\n }\n yTick += TICK_INTERVAL;\n }\n\n int xTick = (int) (-drawColumns / 2.0 / TICK_INTERVAL) * TICK_INTERVAL;\n while (xTick <= drawColumns / 2.0) {\n if (xTick != 0) {\n final String label = xTick % (TICK_INTERVAL * 2) == 0 ? String.format(\"%d\", xTick) : null;\n drawXTick(xTick * columnWidth + centerX, centerY, label);\n }\n xTick += TICK_INTERVAL;\n }\n\n double adaptiveTextSize = getAdaptiveTextSize();\n\n final Paint paint = new Paint();\n final float textSize = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, (float)adaptiveTextSize, view.getResources().getDisplayMetrics());\n paint.setTextSize(textSize);\n paint.setTypeface(Typeface.create(Typeface.MONOSPACE, Typeface.NORMAL));\n for (Entry entry : data.getEntries()) {\n final double x = entry.getX();\n final double y = entry.getY();\n\n final double xDraw = x * columnWidth + centerX;\n final double yDraw = -y * rowHeight + centerY;\n\n CharSequence dispStr = entry.getStringLabel();\n if (dispStr == null) {\n dispStr = String.format(\"%.0f\", entry.getValue());\n }\n\n\n\n\n Rect bounds = getTextRectBounds(dispStr, paint);\n int textHeight = bounds.height();\n int textWidth = bounds.width();\n canvas.drawText(dispStr, 0, dispStr.length(),\n (float) xDraw - textWidth * 0.5f, (float) yDraw + textHeight * 0.5f,\n paint);\n }\n\n }",
"public void paint(Graphics g){\n \n for (int r=0; r < hexes.length; r++){ \n for (int c=0; c < hexes[r].length; c++){\n int x = (c*(55+HORIZONTAL_GAP))+(200-((2-(Math.abs(r-2)))*(55+HORIZONTAL_GAP)/2));\n int y = (r*(45+VERTICAL_GAP))+50;\n g.drawImage(hexes[r][c],x,y,this);\n g.drawImage(rolls[r][c],x+15,y+20,this);\n } \n }\n }",
"@Override\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tGraphics2D g2 = (Graphics2D) g;\n\t\tg2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\n\t\tfillSquares(g2);\n\t\tdrawGrid(g2);\n\t}",
"public void paint(Graphics g){\n super.paint(g);\n Graphics2D g2d = (Graphics2D) g;\n g.setColor(Color.WHITE);\n for(int i = 0; i < ROWS; i++){\n g.drawLine(0, i * HEIGHT / ROWS - 1, \n WIDTH, i * HEIGHT / ROWS - 1);\n g.drawLine(0, i * HEIGHT / ROWS - 2, \n WIDTH, i * HEIGHT / ROWS - 2);\n }\n for (int i = 0; i <= COLS; i++) {\n g.drawLine(i * Game.getWindowWidth() / Game.getCols(), 0,\n i * Game.getWindowWidth() / Game.getCols(), HEIGHT);\n g.drawLine(i * Game.getWindowWidth() / Game.getCols() - 1, 0,\n i * Game.getWindowWidth() / Game.getCols() - 1, HEIGHT);\n }\n for (int i = 0; i < ROWS; i++) {\n for (int j = 0; j < COLS; j++) {\n grid[i][j].paintShadow(g2d);\n }\n }\n for (int i = 0; i < ROWS; i++) {\n for (int j = 0; j < COLS; j++) {\n grid[i][j].paint(g2d);\n }\n }\n \n for(Ball b : balls) {\n b.paint(g2d);\n }\n g2d.setColor(Color.BLACK);\n //segment at the top\n g2d.drawLine(0, 0, WIDTH, 0);\n g2d.drawLine(0, 1, WIDTH, 1);\n g2d.drawLine(0, 2, WIDTH, 2);\n //segment at the bottom\n g2d.drawLine(0, HEIGHT, WIDTH, HEIGHT);\n g2d.drawLine(0, HEIGHT + 1, WIDTH, HEIGHT + 1);\n g2d.drawLine(0, HEIGHT + 2, WIDTH, HEIGHT + 2);\n \n for(Point p : corners){\n g2d.drawOval(p.x, p.y, 3, 3);\n }\n\n if(aimStage){\n //draw the firing line\n g2d.setColor(lineColor);\n drawFatPath(g2d, startX, startY, endX, endY);\n g2d.setColor(arrowColor);\n drawArrow(g2d);\n }\n if(mouseHeld){\n// drawFatPath(g, Ball.restPositionX, HEIGHT - Ball.diameter, \n// getEndPoint().x, getEndPoint().y);\n }\n }",
"public void paint() {\n for (int row = 0; row < ROWS; ++row) {\n for (int col = 0; col < COLS; ++col) {\n cells[row][col].paint();\n if (col < COLS - 1) System.out.print(\"|\");\n }\n System.out.println();\n if (row < ROWS - 1) {\n System.out.println(\"-----------\");\n }\n }\n }",
"private void paintBeanMachine(){\n Line baseLine = new Line();\n\n baseLine.startXProperty().bind(widthProperty().multiply(0.2));\n baseLine.startYProperty().bind(heightProperty().multiply(0.8));\n baseLine.endXProperty().bind(widthProperty().multiply(0.8));\n baseLine.endYProperty().bind(heightProperty().multiply(0.8));\n\n // distance gap per circle\n double distance = (baseLine.getEndX() - baseLine.getStartX()) / SLOTS;\n ballRadius = distance / 2;\n\n //Draw pegs\n DoubleBinding dist = baseLine.endXProperty().subtract(baseLine.startXProperty()).divide(SLOTS);\n Circle[] pegs = new Circle[factorialSum(SLOTS)];\n int index = 0;\n\n for(int row = 0; row < SLOTS; row++){\n DoubleBinding y = baseLine.startYProperty().subtract(heightProperty().multiply(0.2).divide(row + 1));\n\n for(int col = 0; col < SLOTS - row; col++){\n Circle peg = new Circle(5, Color.BLUE);\n\n peg.centerXProperty().bind(baseLine.startXProperty()\n .add(dist.multiply(row).multiply(0.5))\n .add(dist.divide(2))\n .add(dist.multiply(row)));\n peg.centerYProperty().bind(y);\n\n //peg = new Circle(x, y, mWidth * 0.012, Color.BLUE);\n System.out.println(index);\n pegs[index++] = peg;\n\n Line line = new Line();\n line.startXProperty().bind(peg.centerXProperty());\n line.startYProperty().bind(peg.centerYProperty());\n line.endXProperty().bind(peg.centerXProperty());\n line.endYProperty().bind(baseLine.startYProperty());\n getChildren().add(line);\n }\n }\n\n /*\n for(int i = 1; i <= SLOTS; i++){\n double x = baseLine.getStartX() + (i * distance * 0.50) + distance / 2;\n double y = baseLine.getStartY() - (distance * i) - distance / 2;\n\n for(int j = 0; j <= SLOTS - i; j++){\n Circle peg = new Circle(5, Color.BLUE);\n DoubleBinding dist = baseLine.endXProperty().subtract(baseLine.startXProperty()).divide(SLOTS);\n\n peg.centerXProperty().bind(baseLine.startXProperty()\n .add(dist.multiply(i).multiply(0.5))\n .add(dist.divide(2)));\n peg.centerYProperty().bind(baseLine.startYProperty()\n .subtract(dist.multiply(i))\n .subtract(dist.divide(2)));\n\n //peg = new Circle(x, y, mWidth * 0.012, Color.BLUE);\n System.out.println(index);\n pegs[index++] = peg;\n x += distance;\n }\n }\n */\n\n distance = distance + (distance / 2) - pegs[0].getRadius();\n // Connect the base of the triangle with lowerLine\n // NOT including left most and right most line\n Line[] lines = new Line[SLOTS - 1];\n for (int i = 0; i < SLOTS - 1; i++) {\n double x1 = pegs[i].getCenterX() + pegs[i].getRadius() * Math.sin(Math.PI);\n double y1 = pegs[i].getCenterY() - pegs[i].getRadius() * Math.cos(Math.PI);\n lines[i] = new Line(x1, y1, x1, y1 + distance);\n\n }\n // Draw right most and left most most line\n Line[] sides = new Line[6];\n sides[0] = new Line(\n baseLine.getEndX(), baseLine.getEndY(),\n baseLine.getEndX(), baseLine.getEndY() - distance);\n sides[1] = new Line(\n baseLine.getStartX(), baseLine.getStartY(),\n baseLine.getStartX(), baseLine.getStartY() - distance);\n\n //Draw left side line\n /*\n for(int i = 2; i < 4; i++){\n double x = pegs[pegs.length - i].getCenterX();\n double y = pegs[pegs.length - i].getCenterY() - distance;\n sides[i] = new Line(x, y, sides[i - 2].getEndX(), sides[i - 2].getEndY());\n }\n */\n\n // Draw the upper 2 lines on top of the triangle\n /*\n for (int i = 4; i < sides.length; i++){\n sides[i] = new Line(\n sides[i-2].getStartX(), sides[i-2].getStartY(),\n sides[i-2].getStartX(), sides[i-2].getStartY() - (distance * 0.6)\n );\n }\n */\n\n getChildren().addAll(baseLine);\n getChildren().addAll(pegs);\n //getChildren().addAll(lines);\n //getChildren().addAll(sides);\n }",
"public void drawGrid() {\r\n\t\tsetLayout(new GridLayout(getSize_w(), getSize_h()));\r\n\t\tfor (int i = 0; i < getSize_h(); i++) {\r\n\t\t\tfor (int j = 0; j < getSize_w(); j++) {\r\n\t\t\t\tcity_squares[i][j] = new Gridpanel(j, i);\r\n\t\t\t\tadd(city_squares[i][j]);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n // Clear the board\n g.clearRect(0, 0, getWidth(), getHeight());\n // Draw the grid\n int rectWidth = getWidth() / NUM_COLS;\n int rectHeight = getHeight() / NUM_ROWS;\n\n for (int i = 0; i < NUM_ROWS; i++) {\n for (int j = 0; j < NUM_COLS; j++) {\n // Upper left corner of this terrain rect\n int x = i * rectWidth;\n int y = j * rectHeight;\n Color terrainColor = terrainGrid[i][j];\n g.setColor(terrainColor);\n g.fillRect(x, y, rectWidth, rectHeight);\n }\n }\n }",
"public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n\n Dimension d = getSize();\n //current block\n for (j = 0; j < 16; j++)\n {\n if (shapes[blockType][turnState][j] == 1)\n {\n g.setColor(Color.BLUE);\n g.fillRect((j%4 + x + 1)*d.width/20,(j/4 + y - 4)*d.width/20, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + x + 1)*d.width/20,(j/4 + y - 4)*d.width/20, d.width/20, d.width/20);\n }\n }\n //next block\n for (j = 0; j < 16; j++)\n {\n if (shapes[nextb][nextt][j] == 1)\n {\n g.setColor(Color.RED);\n g.fillRect((j%4 + 1)*d.width/20+d.width*13/20,(j/4)*d.width/20+d.width*3/20, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + 1)*d.width/20+d.width*13/20,(j/4)*d.width/20+d.width*3/20, d.width/20, d.width/20);\n\n }\n }\n //left boundary drawing\n for (j = 4; j < 36; j++)\n { \n int i = 0;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/20,(j-4)*d.width/20,(i+1)*d.width/20,(j-5)*d.width/20);\n }\n }\n //right boundary drawing\n for (j = 4; j < 36; j++)\n { \n int i = 11;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine(i*d.width/20,(j-4)*d.width/20,i*d.width/20,(j-5)*d.width/20);\n }\n }\n //bottom boundary drawing\n for (i = 0; i < 10; i++)\n {\n int j = 35;\n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/20,(j-4)*d.width/20,(i+2)*d.width/20,(j-4)*d.width/20);\n }\n //draw blocks which reached the bottom or on top of another block\n for (j = 4; j < 36; j++)\n {\n for (i = 0; i < 12; i++)\n {\n if (map[i][j] == 1)\n { \n g.setColor(Color.GREEN);\n g.fillRect(i*d.width/20,(j-4)*d.width/20, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect(i*d.width/20,(j-4)*d.width/20, d.width/20, d.width/20);\n } \n }\n }\n\n //next label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.ITALIC, d.width/20));\n g.drawString(\"Next Shape:\", d.width*13/20, d.width/8);\n //level label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Level: \" + level, d.width*13/20, d.width*5/8);\n //line label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Line: \" + showline, d.width*13/20, d.width*7/8);\n //score label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Score: \" + score, d.width*13/20, d.width*9/8);\n }",
"private void paintNumbers() {\n\n g2d.setColor(_BOARDCOLOR);\n g2d.drawString(\"0\", 100, 150);\n g2d.drawString(\"1\", 200, 150);\n g2d.drawString(\"2\", 300, 150);\n g2d.drawString(\"3\", 400, 150);\n g2d.drawString(\"4\", 100, 250);\n g2d.drawString(\"5\", 200, 250);\n g2d.drawString(\"6\", 300, 250);\n g2d.drawString(\"7\", 400, 250);\n g2d.drawString(\"8\", 100, 350);\n g2d.drawString(\"9\", 200, 350);\n g2d.drawString(\"10\", 300, 350);\n g2d.drawString(\"11\", 400, 350);\n g2d.drawString(\"12\", 100, 450);\n g2d.drawString(\"13\", 200, 450);\n g2d.drawString(\"14\", 300, 450);\n g2d.drawString(\"15\", 400, 450);\n }",
"private static void drawGrid(int[][] grid) {\n BufferStrategy buf = canvas.getBufferStrategy();\n Graphics g = buf.getDrawGraphics();\n\n g.clearRect(0, 0, (2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_X), (2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_Y));\n\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[0].length; j++) {\n g.setColor(pallette[grid[i][j]]);\n g.fillRect(WINDOW_MARGINS + (CELL_SIZE * i), WINDOW_MARGINS + (CELL_SIZE * j), CELL_SIZE, CELL_SIZE);\n }\n }\n\n if (!buf.contentsLost()) buf.show();\n g.dispose();\n }",
"public void drawGrid(){\r\n gc.setLineWidth(0.5f);//this is how thick the 'pen' will be, 1 pixel for now\r\n gc.setStroke(divisionsColour);\r\n //this for loop will start at (canvas.widthProperty().intValue()/2)%pixelsPerDivision\r\n //this means that one line will pass through the center of the screen, for 0 which we need\r\n //canvas width and height properties are the width and height of the display of the waves only\r\n //then we draw a line every pixelsPerDivision pixels, this is so one division is pixelsPerDivision pixels.\r\n //the one directly below is for the time domain\r\n for (int x = (canvas.widthProperty().intValue() / 2) % pixelsPerDivision; x < canvas.widthProperty().intValue(); x += pixelsPerDivision) {\r\n //we begin to draw a line\r\n gc.beginPath();\r\n //starting at the top of the page\r\n gc.moveTo(x, 0);\r\n //going to the bottom\r\n gc.lineTo(x, canvas.heightProperty().intValue());\r\n //then finish this line\r\n gc.stroke();\r\n }\r\n\r\n\r\n //the one directly below is for the voltage domain\r\n //this one it is much more important that a line goes through the center as this is where the 0 mark for the waves is\r\n for (int y = (canvas.heightProperty().intValue() / 2) % pixelsPerDivision; y < canvas.heightProperty().intValue(); y += pixelsPerDivision) {\r\n gc.beginPath();\r\n gc.moveTo(0, y);\r\n gc.lineTo(canvas.widthProperty().intValue(), y);\r\n gc.stroke();\r\n }\r\n gc.setStroke(voltageTextColour);\r\n int numberOfPositiveDivisions = (canvas.heightProperty().intValue() / 2) / pixelsPerDivision;\r\n\r\n\r\n\r\n\r\n for (int i = 0; i < numberOfPositiveDivisions; i+=2) {\r\n gc.strokeText(\"+\" + getScienceNumber(i * VoltagePerDivision) + \"V\", 5, canvas.heightProperty().intValue() / 2 - (pixelsPerDivision * i)+5);\r\n // gc.strokeText(\"+\" + i / voltageMultiplier + \"V\", canvas.widthProperty().intValue() - 25, canvas.heightProperty().intValue() / 2 - (pixelsPerDivision * i));\r\n if (i != 0) {\r\n gc.strokeText(\"-\" + getScienceNumber(i * VoltagePerDivision) + \"V\", 5, canvas.heightProperty().intValue() / 2 + (pixelsPerDivision * i)+5);\r\n // gc.strokeText(\"-\" + i / voltageMultiplier + \"V\", canvas.widthProperty().intValue() - 25, canvas.heightProperty().intValue() / 2 + (pixelsPerDivision * i));\r\n }\r\n }\r\n gc.rotate(-90);\r\n\r\n for (int i=4; i<canvasSizeXY/pixelsPerDivision;i+=4){\r\n gc.strokeText(getScienceNumber(i*secondsPerDivision)+\"ms\", -(canvasSizeXY-10),(pixelsPerDivision * i)+5);\r\n }\r\n gc.rotate(90);\r\n //the following will draw a center line over the 0V axis part, but with a thicker pen so we can see 0 clearer\r\n gc.beginPath();\r\n gc.setLineWidth(3);//makes the line thicker\r\n gc.moveTo(0, canvas.heightProperty().intValue() / 2);\r\n gc.lineTo(canvas.widthProperty().intValue(), canvas.heightProperty().intValue() / 2);\r\n gc.stroke();\r\n\r\n }",
"public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n\n Dimension d = getSize();\n //current block\n for (j = 0; j < 16; j++)\n {\n if (shapes[blockType][turnState][j] == 1)\n {\n g.setColor(Color.BLUE);\n g.fillRect((j%4 + x + 1)*d.width/20,(j/4 + y - 4)*d.width/20, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + x + 1)*d.width/20,(j/4 + y - 4)*d.width/20, d.width/20, d.width/20);\n }\n }\n //next block\n for (j = 0; j < 16; j++)\n {\n if (shapes[nextb][nextt][j] == 1)\n {\n g.setColor(Color.RED);\n g.fillRect((j%4 + 1)*d.width/20+d.width*13/20,(j/4)*d.width/20+d.width/10, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + 1)*d.width/20+d.width*13/20,(j/4)*d.width/20+d.width/10, d.width/20, d.width/20);\n\n }\n }\n //left boundary drawing\n for (j = 4; j < 26; j++)\n { \n int i = 0;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/20,(j-4)*d.width/20,(i+1)*d.width/20,(j-5)*d.width/20);\n }\n }\n //right boundary drawing\n for (j = 4; j < 26; j++)\n { \n int i = 11;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine(i*d.width/20,(j-4)*d.width/20,i*d.width/20,(j-5)*d.width/20);\n }\n }\n //bottom boundary drawing\n for (i = 0; i < 10; i++)\n {\n int j = 25;\n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/20,(j-4)*d.width/20,(i+2)*d.width/20,(j-4)*d.width/20);\n }\n //draw blocks which reached the bottom or on top of another block\n for (j = 4; j < 26; j++)\n {\n for (i = 0; i < 12; i++)\n {\n if (map[i][j] == 1)\n { \n g.setColor(Color.GREEN);\n g.fillRect(i*d.width/20,(j-4)*d.width/20, d.width/20, d.width/20);\n g.setColor(Color.BLACK);\n g.drawRect(i*d.width/20,(j-4)*d.width/20, d.width/20, d.width/20);\n } \n }\n }\n\n //next label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.ITALIC, d.width/20));\n g.drawString(\"Next Shape:\", d.width*13/20, d.width*3/40);\n //level label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Level: \" + level, d.width*13/20, d.width/2);\n //line label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Line: \" + showline, d.width*13/20, d.width*3/5);\n //score label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/80));\n g.drawString(\"Score: \" + score, d.width*13/20, d.width*7/10);\n }",
"@Override\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tGraphics2D g2 = (Graphics2D) g; \n\t\tg2.setColor(Color.lightGray);\n\t\tg2.fill(model.bg);\n\t\tg2.setColor(Color.darkGray);\n\t\tg2.fillPolygon(model.terrain);\n\t\tg2.setColor(Color.gray);\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\tg2.draw(model.circles.get(i));\n\t\t}\n\t\tif (model.curCircleSel != -1) {\n\t\t\tg2.setColor(Color.white);\n\t\t\tg2.setStroke(new BasicStroke(3));\n\t\t\tg2.draw(model.circles.get(model.curCircleSel));\n\t\t}\n\t\tg2.setColor(Color.RED);\n\t\tg2.fill(model.pad);\n\t\tif (curPadSel) {\n\t\t\tg2.setColor(Color.white);\n\t\t\tg2.setStroke(new BasicStroke(3));\n\t\t\tg2.draw(model.pad);\n\t\t}\n\t}",
"public void drawGrid(Graphics g)\n {\n //g.setColor(Color.GREEN);\n \n \n if(lastpowerUp.equals(\"RAINBOW\") && powerupTimer > 0)\n {\n int x = (int)(Math.random()*250);\n int y = (int)(Math.random()*250);\n int z = (int)(Math.random()*250);\n \n Color randomColor = new Color(x,y,z);\n g.setColor(randomColor); \n \n g.drawLine(150,150,1260,150);\n g.drawLine(150,150,150,630);\n g.drawLine(150,630,1260,630);\n g.drawLine(1260,150,1260,630);\n }\n else\n { \n if(lastpowerUp.equals(\"BLUE\") && powerupTimer > 0)\n {\n Color transGray = new Color(55,55,55);\n g.setColor(transGray); \n } \n else if(difficult.equals(\"GHOST\"))\n g.setColor(Color.WHITE);\n else if(color.equals(\"GREEN\"))\n g.setColor(Color.GREEN); //Green outline\n else if(color.equals(\"BLUE\"))\n g.setColor(Color.BLUE); \n else if(color.equals(\"CYAN\"))\n g.setColor(Color.CYAN); \n else if(color.equals(\"WHITE\"))\n g.setColor(Color.WHITE); \n else if(color.equals(\"GRAY\"))\n g.setColor(Color.GRAY);\n else if(color.equals(\"YELLOW\"))\n g.setColor(Color.YELLOW); \n else if(color.equals(\"MAGENTA\"))\n g.setColor(Color.MAGENTA); \n else if(color.equals(\"ORANGE\"))\n g.setColor(Color.ORANGE); \n else if(color.equals(\"PINK\"))\n g.setColor(Color.PINK); \n else if(color.equals(\"RED\"))\n g.setColor(Color.RED); \n \n \n g.drawLine(150,150,1260,150);\n g.drawLine(150,150,150,630);\n g.drawLine(150,630,1260,630);\n g.drawLine(1260,150,1260,630);\n }\n }",
"public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n\n Dimension d = getSize();\n //current block\n for (j = 0; j < 16; j++)\n {\n if (shapes[blockType][turnState][j] == 1)\n {\n g.setColor(Color.BLUE);\n g.fillRect((j%4 + x + 1)*d.width/30,(j/4 + y - 4)*d.width/30, d.width/30, d.width/30);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + x + 1)*d.width/30,(j/4 + y - 4)*d.width/30, d.width/30, d.width/30);\n }\n }\n //next block\n for (j = 0; j < 16; j++)\n {\n if (shapes[nextb][nextt][j] == 1)\n {\n g.setColor(Color.RED);\n g.fillRect((j%4 + 1)*d.width/30+d.width*23/30,(j/4)*d.width/30+d.width/15, d.width/30, d.width/30);\n g.setColor(Color.BLACK);\n g.drawRect((j%4 + 1)*d.width/30+d.width*23/30,(j/4)*d.width/30+d.width/15, d.width/30, d.width/30);\n\n }\n }\n //left boundary drawing\n for (j = 4; j < 26; j++)\n { \n int i = 0;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/30,(j-4)*d.width/30,(i+1)*d.width/30,(j-5)*d.width/30);\n }\n }\n //right boundary drawing\n for (j = 4; j < 26; j++)\n { \n int i = 21;\n if (map[i][j]==2)\n { \n g.setColor(Color.BLACK);\n g.drawLine(i*d.width/30,(j-4)*d.width/30,i*d.width/30,(j-5)*d.width/30);\n }\n }\n //bottom boundary drawing\n for (i = 0; i < 20; i++)\n {\n int j = 25;\n g.setColor(Color.BLACK);\n g.drawLine((i+1)*d.width/30,(j-4)*d.width/30,(i+2)*d.width/30,(j-4)*d.width/30);\n }\n //draw blocks which reached the bottom or on top of another block\n for (j = 4; j < 26; j++)\n {\n for (i = 0; i < 21; i++)\n {\n if (map[i][j] == 1)\n { \n g.setColor(Color.GREEN);\n g.fillRect(i*d.width/30,(j-4)*d.width/30, d.width/30, d.width/30);\n g.setColor(Color.BLACK);\n g.drawRect(i*d.width/30,(j-4)*d.width/30, d.width/30, d.width/30);\n } \n }\n }\n\n //next label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.ITALIC, d.width/30));\n g.drawString(\"Next Shape:\", d.width*23/30, d.width*3/60);\n //level label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/120));\n g.drawString(\"Level: \" + level, d.width*23/30, d.width/3);\n //line label\n g.setColor(Color.black);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/120));\n g.drawString(\"Line: \" + showline, d.width*23/30, d.width*2/5);\n //score label\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"Serif\", Font.BOLD, d.width*3/120));\n g.drawString(\"Score: \" + score, d.width*23/30, d.width*7/15);\n }",
"@Override\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tfor (int i = 0; i < MyFrame.ROW; i++)\n\t\t\tfor (int j = 0; j < MyFrame.COLUMN; j++)\n\t\t\t\tMyFrame.cells[i][j].paint(g);\n\t}",
"@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tfor (int i = 0; i < wall.length; i++) {\n\t\t\t\t\tfor (int j = 0; j < wall[i].length; j++) {\n\t\t\t\t\t\tg.setColor(Color.blue);\n\t\t\t\t\t\tg.drawRect(i*30, j*30, 30, 30);\n\t\t\t\t\t\tif (wall[i][j] == 1) {\n\t\t\t\t\t\t\tg.fillRect(i*30, j*30, 30, 30);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"private void draw() {\n\n // Current generation (y-position on canvas)\n int generation = 0;\n\n // Looping while still on canvas\n while (generation < canvasHeight / CELL_SIZE) {\n\n // Next generation\n cells = generate(cells);\n\n // Drawing\n for (int i = 0; i < cells.length; i++) {\n gc.setFill(colors[cells[i]]);\n gc.fillRect(i * CELL_SIZE, generation * CELL_SIZE, CELL_SIZE, CELL_SIZE);\n }\n\n // Next line..\n generation++;\n }\n }",
"public void drawGrid(Graphics g) \n {\n int wide = getWidth();\n int tall = getHeight();\n // go into Graphics2D for all the fine art, more options\n // optional, here I just get variable Stroke sizes\n Graphics2D g2 = (Graphics2D)g;\n g.setColor(Color.GRAY);\n int w = wide / 20;\n int h = tall / 20;\n g2.setColor(Color.BLACK);\n g2.setStroke(new BasicStroke(1));\n // Draw Grid lines\n for (int i = 1; i < 20; i++) {\n // Verticals\n g2.drawLine(i * w, 0, i * w, tall);\n // Horizontals\n g2.drawLine(0, i * h, wide, i * h);\n }\n }",
"public void paintItem(Graphics2D g, \n int ulx, int uly, \n int lrx, int lry) {\n if (!canPaint()) {\n return;\n }\n boolean any = true;\n int i = 0,j = 0;\n Color repcolor = colors.getColor(getLabel());\n int startindex = data.baseToIndex(getRegion().getStart());\n int endindex = data.baseToIndex(getRegion().getEnd());\n\n g.setColor(Color.BLACK);\n while (any || (j == 0)) {\n g.setColor(repcolor);\n repcolor = repcolor.darker();\n any = false;\n int lastx = -1;\n int lasty = -1;\n int lasti = -1;\n for (i = startindex; i < endindex; i++) {\n if (j >= data.getReplicates(i)) {lasti = -1; continue;}\n any = true;\n double maxratio;\n if (getProperties().MaxRatio > 0) {\n maxratio = getProperties().MaxRatio;\n } else {\n maxratio = scale.getMaxVal();\n }\n int x = getXPos(data.getPos(i),\n getRegion().getStart(), getRegion().getEnd(),\n ulx,lrx);\n int y = getYPos(data.getValue(i,j),\n 0, maxratio,\n uly,lry,props.RatiosOnLogScale);\n paintDatapointAt(g,x,y,i,j);\n// System.err.println(\"Painting (\" + i + \"=\" + data.getPos(i) + \",\" + j +\n// \")=\" + data.getValue(i,j) + \" -> (\" + x + \",\"+y+\") lastx=\" +\n// lastx +\" lasty=\" + lasty + \" lasti=\" + lasti);\n if ((lasti != -1) && \n (Math.abs(data.getPos(i) - data.getPos(lasti)) < 500)) {\n connectDatapoints(g,lastx,lasty,x,y);\n }\n lastx = x;\n lasty = y;\n lasti = i;\n }\n j++;\n }\n if (props.DrawTrackLabel) {\n g.setColor(Color.BLACK);\n g.setFont(attrib.getLargeLabelFont(lrx - ulx,lry - uly));\n g.drawString(getLabel(),ulx,uly + g.getFont().getSize() * 2);\n }\n }",
"public void draw(){\n if (! this.isFinished() ){\n UI.setColor(this.color);\n double left = this.xPos-this.radius;\n double top = GROUND-this.ht-this.radius;\n UI.fillOval(left, top, this.radius*2, this.radius*2);\n }\n }",
"private void paintCourbePoints() {\n\t\tfloat x, y;\n\t\tint i, j;\n\t\t\n\t\tfor(x=xMin; x<=xMax; x++) {\n\t\t\ty = parent.getY(x);\n\t\t\t\n\t\t\tif(y>yMin && y<yMax) {\n\t\t\t\ti = convertX(x);\n\t\t\t\tj = convertY(y);\n\t\t\t\t\n\t\t\t\t//Utilisation d'un carre/losange pour simuler un point \n\t\t\t\t//de taille superieur a un pixel car celui-ci est peu visible.\n\t\t\t\tpaintPointInColor(i-2, j);\n\t\t\t\tpaintPointInColor(i-1, j-1);\t\t\t\t\n\t\t\t\tpaintPointInColor(i-1, j);\n\t\t\t\tpaintPointInColor(i-1, j+1);\n\t\t\t\tpaintPointInColor(i, j-2);\t//\t *\n\t\t\t\tpaintPointInColor(i, j-1);\t//\t * * *\n\t\t\t\tpaintPointInColor(i, j);\t//\t* * * * *\n\t\t\t\tpaintPointInColor(i, j+1);\t//\t * * *\n\t\t\t\tpaintPointInColor(i, j+2);\t//\t *\n\t\t\t\tpaintPointInColor(i+1, j-1);\n\t\t\t\tpaintPointInColor(i+1, j);\n\t\t\t\tpaintPointInColor(i+1, j+1);\n\t\t\t\tpaintPointInColor(i+2, j);\n\t\t\t}\n\t\t}\t\t\n\t}",
"private void drawGrid() {\r\n\t\t// loops through the 2d array of the grid.\r\n\t\tfor (int i = 0; i < TetrisGame.PANEL_WIDTH; i++) {\r\n\t\t\tfor (int j = 0; j < TetrisGame.PANEL_HEIGHT; j++) {\r\n\t\t\t\t// checks to see if the piece isn't empty, and draws the piece at it's position.\r\n\t\t\t\tif (game.grid[i][j] != Piece.PieceShape.E) {\r\n\t\t\t\t\tdrawSquare(i, j, Piece.getColor(game.grid[i][j]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public void paint(Graphics g) {\n g.setColor(Color.white);\n g.fillRect(0, 0, getWidth(), getHeight() );\n\n for (PieceUI pieceUI : pieceUIList) {\n pieceUI.draw(g);\n }\n\n g.drawImage(trapeze.getTrapezeView(), 200, 400, null);\n }",
"public void paint(Graphics g){\r\n super.paintComponent(g);\r\n for(int row = 0; row < 8; row++) {\r\n for (int col = 0; col < 8; col++) {\r\n if((row % 2 == 0 && col % 2 == 0) || (row % 2 != 0 && col % 2 != 0)){\r\n g.setColor(Color.gray.brighter()); //pale yellow\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n else{\r\n g.setColor(Color.gray.darker()); //dark brown\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n if ((currentPlayer.getColor()==checks[row][col])) {\r\n g.setColor(Color.darkGray.darker());\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n if (this.nextMove[row][col] == 1) {\r\n g.setColor(Color.getHSBColor(98,70,43));\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n if (this.checks[row][col] != 0) {\r\n if (this.checks[row][col] == WHITE) {\r\n drawPiece(row, col, g, Color.yellow.brighter());\r\n if (row == 7)\r\n g.drawImage(crownImage, (col * tileSize)+6, (row * tileSize) + 6, tileSize - 12, tileSize - 12, null);\r\n }\r\n else{\r\n drawPiece(row, col, g, Color.black);\r\n if (row == 0)\r\n g.drawImage(crownImage, (col * tileSize)+6, (row * tileSize) + 6, tileSize - 12, tileSize - 12, null);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if(isOver && isGame){\r\n gameOverDisplay(g);\r\n }\r\n }",
"@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n Graphics2D g2 = (Graphics2D) g;\n g2.scale(2, 2);\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2.setColor(Color.WHITE);\n\n Application.grid.draw(g2);\n ui.draw(g2);\n }",
"@Override\n public void paintComponent() {\n Graphics2D graphics = gameInstance.getGameGraphics();\n graphics.setColor(Color.ORANGE);\n\n final int diff = (PacmanGame.GRID_SIZE/2) - pointCircleRadius;\n graphics.fill(new Ellipse2D.Double(this.x + diff, this.y + diff, pointCircleRadius*2, pointCircleRadius*2));\n }",
"protected\tvoid\t\trender(MiRenderer renderer)\n\t\t{\n\t\t// Draw background, valueDisplay and label\n\t\tsuper.render(renderer);\n\n\t\tMiBounds innerBounds = getInnerBounds(tmpBounds);\n\n\t\t// Move Strip over\n\t\trenderer.moveImageArea(innerBounds, scroll.x, scroll.y);\n\t\tscroll.zeroOut();\n\n\t\t// Draw ticks:\n\t\tfor (int i = 0; i < ticksToDrawX.size(); ++i)\n\t\t\t{\n\t\t\tticks.setCenterX(ticksToDrawX.elementAt(i));\n\t\t\tticks.setYmin(innerBounds.ymin);\n\t\t\tticks.setYmax(innerBounds.ymin + ticksToDrawHeight.elementAt(i));\n\t\t\tticks.render(renderer);\n\t\t\t}\n\t\tticksToDrawX.removeAllElements();\n\t\tticksToDrawHeight.removeAllElements();\n\t\t}",
"@Override\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(Color.BLACK);\n for(int j = 0 ; j < 3 ; j++) {\n \tg.drawRect(0,50*j, 120, 50);\n }\n \n if(super.selected) {\n\t\t\tg.fillRect(super.north_port.x, super.north_port.y, super.connection_port_width ,super.connection_port_width);\n\t g.fillRect(super.east_port.x-super.connection_port_width, super.east_port.y, super.connection_port_width,super.connection_port_width);\n\t g.fillRect(super.south_port.x, super.south_port.y-super.connection_port_width ,super.connection_port_width,super.connection_port_width);\n\t g.fillRect(super.west_port.x, super.west_port.y, super.connection_port_width,super.connection_port_width);\n\t\t}\n \t\n \n }",
"public void draw() {\r\n background(255);\r\n\r\n float mouseXFactor = map(mouseX, 0, width, 0.05f, 1);\r\n float mouseYFactor = map(mouseY, 0, height, 0.05f, 1);\r\n\r\n for (int gridX = 0; gridX < img.width; gridX++) {\r\n for (int gridY = 0; gridY < img.height; gridY++) {\r\n // grid position + tile size\r\n float tileWidth = width / (float) img.width;\r\n float tileHeight = height / (float) img.height;\r\n float posX = tileWidth * gridX;\r\n float posY = tileHeight * gridY;\r\n\r\n // get current color\r\n int c = pixelArray[gridX][gridY];\r\n\r\n // greyscale conversion\r\n int greyscale = round(red(c) * 0.222f + green(c) * 0.707f + blue(c) * 0.071f);\r\n\r\n if (drawMode == 1) {\r\n // greyscale to ellipse area\r\n fill(0);\r\n noStroke();\r\n float r2 = 1.1284f * sqrt(tileWidth * tileWidth * (1 - greyscale / 255.0f));\r\n r2 = r2 * mouseXFactor * 3;\r\n ellipse(posX, posY, r2, r2);\r\n } else if (drawMode == 2) {\r\n // greyscale to rotation, line length and stroke weight\r\n stroke(0);\r\n float w4 = map(greyscale, 0, 255, 10, 0);\r\n strokeWeight(w4 * mouseXFactor + 0.1f);\r\n float l4 = map(greyscale, 0, 255, 35, 0);\r\n l4 = l4 * mouseYFactor;\r\n pushMatrix();\r\n translate(posX, posY);\r\n rotate(greyscale / 255.0f * PI);\r\n line(0, 0, 0 + l4, 0 + l4);\r\n popMatrix();\r\n } else if (drawMode == 3) {\r\n // greyscale to line relief\r\n float w5 = map(greyscale, 0, 255, 5, 0.2f);\r\n strokeWeight(w5 * mouseYFactor + 0.1f);\r\n // get neighbour pixel, limit it to image width\r\n int /* color */ c2 = img.get(min(gridX + 1, img.width - 1), gridY);\r\n stroke(c2);\r\n int greyscale2 = (int) (red(c2) * 0.222f + green(c2) * 0.707f + blue(c2) * 0.071f);\r\n float h5 = 50 * mouseXFactor;\r\n float d1 = map(greyscale, 0, 255, h5, 0);\r\n float d2 = map(greyscale2, 0, 255, h5, 0);\r\n line(posX - d1, posY + d1, posX + tileWidth - d2, posY + d2);\r\n } else if (drawMode == 4) {\r\n // pixel color to fill, greyscale to ellipse size\r\n float w6 = map(greyscale, 0, 255, 25, 0);\r\n noStroke();\r\n fill(c);\r\n ellipse(posX, posY, w6 * mouseXFactor, w6 * mouseXFactor);\r\n // TODO 2: Add the following: if(Math.random()<0.1) {pixelArray[gridX][gridY] = lerpColor(c,0xff0000, 0.1f);}\r\n } else if (drawMode == 5) {\r\n stroke(c);\r\n float w7 = map(greyscale, 0, 255, 5, 0.1f);\r\n strokeWeight(w7);\r\n fill(255, 255 * mouseXFactor);\r\n pushMatrix();\r\n translate(posX, posY);\r\n rotate(greyscale / 255.0f * PI * mouseYFactor);\r\n rect(0, 0, 15, 15);\r\n popMatrix();\r\n }\r\n /*\r\n * TODO 3: Add a drawMode == 6 case. \r\n * Try modifying the pixelArray \r\n * Try drawing shapes or colors depending on c and grayscale variables \r\n * Try adding other forms of animation\r\n */\r\n }\r\n }\r\n }",
"@Override\n protected void paint2d(Graphics2D g) {\n \n }",
"public void paintComponent(Graphics g) {\n\t\tint[] bornes = parent.getBornes();\n\t\txMin = bornes[0];\n\t\txMax = bornes[1];\n\t\tyMin = bornes[2];\n\t\tyMax = bornes[3];\n\n\t\tint[] spacing = parent.getTicks();\n\t\tmajorX = spacing[0];\n\t\tmajorY = spacing[1];\n\t\tminorX = spacing[2];\n\t\tminorY = spacing[3];\n\n\t\tc = parent.getColor();\n\t\t\n\t\twidth = getWidth();\n\t\theight = getHeight();\n\n\t\tpointsParX = width/(abs(xMin-xMax));\n\t\tpointsParY = height/(abs(yMin-yMax));\n\n\t\taxis.setLocation(\n\t\t\t\twidth*abs(xMin)/(float)(xMax+abs(xMin)), \n\t\t\t\theight*abs(yMax)/(float)(yMax+abs(yMin)));\n\n\t\timage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n\t\traster = image.getRaster();\n\t\tmodel = image.getColorModel();\t\t\n\t\t\n\t\tString style = parent.getStyle();\n\n\t\tpaintBackground();\n\t\tpaintAxis();\n\t\tpaintTicks();\n\t\t\t\t\n\t\tif(style.equals(\"lie\"))\n\t\t\tpaintCourbeLie();\n\t\t\n\t\telse if(style.equals(\"points\"))\n\t\t\tpaintCourbePoints();\n\t\t\n\t\telse if(style.equals(\"croix\"))\n\t\t\tpaintCourbeCroix();\n\n\t\tg.drawImage(image, 0, 0, null);\n\t}",
"@Override\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\n\t\tint length = cont.getLength();\n\t\tint start = cont.getStart();\n\t\tint stop = cont.getStop();\n\n\t\tg.drawString(String.valueOf(length)+\"bp\",(int)(this.getSize().getWidth()/2),15); // tekend de lengte in baseparen in het midden van de panel\n\t\tg.fillRect(5,40,(int)(this.getSize().getWidth()-10),5);\n\n\t\tint stepSize = calculateStepSize(length);\n\t\tint first = (start - (start % stepSize)) + stepSize - 1;\t// de waarde van first is gelijk aan de positie in de sequentie van de\n\t\t// eerste nucleotide waarboven de eerste ruler lijn getekend word\n\n\t\tfor (int j = first; j < stop; j+= stepSize){\n\n\n\t\t\tint pos = (int) DrawingTools.calculateLetterPosition(this.getWidth(), length,Double.valueOf(j-start)); //schaald de posities in sequentie naar de breedte van de panel\n\t\t\tg.drawLine(pos,40,pos,30);\t\t\t\t\t\t\t\t// draws line on the ruler\n\t\t\tg.drawString(String.valueOf(j + 1) , pos, 30);\t\t// draws the nucleotide position(in sequence) above the line\n\n\t\t}\n\n\t\tint alpha = 127; // 50% transparent/\n\t\tColor myColour = new Color(255, 0, 0, alpha);\n\t\tg.setColor(myColour);\n\n\t\tif (x < x2){\n\t\t\tg.fillRect(x,0,x2-x,getHeight()); //selectie rechthoek\n\t\t}\n\t\telse{\n\t\t\tg.fillRect(x2,0,x-x2,getHeight()); //inverse rechthoek.\n\t\t}\n\t}",
"@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}",
"private void drawGrid(Graphics2D g2) {\r\n Stroke stroke = g2.getStroke();\r\n\r\n if (isGridPainted()) {\r\n drawVerticalGrid(g2);\r\n drawHorizontalGrid(g2);\r\n }\r\n\r\n g2.setStroke(stroke);\r\n }",
"@Override\n\t protected void paintComponent(Graphics g) {\n\t super.paintComponent(g);\n\t for (int y = 0; y < MAX_Y; y++) {\n\t for (int x = 0; x < MAX_X; x++) { \n\t if(seed[x][y].isAlive) {\n\t g.setColor(FILL_COLOR);\n\t g.fillRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }\n\t else{\n\t g.setColor(defaultBackground);\n\t g.fillRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }//end if..\n\t g.setColor(Color.GRAY);\n\t g.drawRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }//end for x\n\t }//end for y\n\t }",
"public abstract WorldImage drawCell(int blocks);",
"@Override\n public void paintComponent(Graphics g){\n // Paint the well\n g.setColor(Color.DARK_GRAY);\n g.fillRoundRect(0, 0, 338, 546, 8, 8);\n\n for (int i = 1; i < 21; i++){\n for (int j = 1; j < 13; j++){\n g.setColor(Color.BLACK);\n g.fillRoundRect(26 * j - 13, 26 * i - 13, 25, 25, 2, 2);\n }\n }\n\n drawPiece(g);\n }",
"private void drawBricks() {\n int topLeftX = (getWidth() - (BRICK_WIDTH * NBRICKS_PER_ROW + BRICK_SEP * (NBRICKS_PER_ROW - 1))) / 2;\n int topLeftY = (BRICK_Y_OFFSET);\n Color [] bricksColor ={Color.RED, Color.RED, Color.ORANGE, Color.ORANGE, Color.YELLOW, Color.YELLOW,\n Color.GREEN, Color.GREEN, Color.CYAN, Color.CYAN};\n\n for (int i = 0; i < NBRICK_ROWS; i++){\n for (int j = 0; j <NBRICKS_PER_ROW; j++){\n drawBrick(topLeftX + (BRICK_WIDTH + BRICK_SEP) * j, topLeftY + (BRICK_HEIGHT + BRICK_SEP) * i, bricksColor[i % 10]);\n }\n }\n }",
"@Override\npublic void paint(Graphics g) {\n\tsuper.paint(g);\n\tg.drawImage(bak, 0, 0, null);\n\t\n\t//画线\n\tfor(int i=0;i<Config.ROWS;i++)\n\t{\n\t\tfor(int j=0;j<Config.COLS;j++)\n\t\t{\n\t\t\tg.setColor(new Color(137,92,44));\n\t\t\tg.drawRect(j*Config.CELL+Config.OFFSETX, i*Config.CELL+Config.OFFSETY, Config.CELL, Config.CELL);\n\t\t}\n\t}\n\t//画焦点\n\tfor(int i=0;i<Config.ROWS;i++)\n\t{\n\t\tfor(int j=0;j<Config.COLS;j++)\n\t\t{\n\t\t\tif(Config.MAP[i][j]==Config.FOCUS)\n\t\t\t{\n\t\t\t\tg.setColor(new Color(137,92,44));\n\t\t\t\tg.fillRect(j*Config.CELL+Config.OFFSETX-5, i*Config.CELL+Config.OFFSETY-5, 10, 10);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//画子\n\t\tfor(int i=0;i<Config.ROWS;i++)\n\t\t{\n\t\t\tfor(int j=0;j<Config.COLS;j++)\n\t\t\t{\n\t\t\t\tif(Config.MAP[i][j]==Config.BLACK)\n\t\t\t\t{\n\t\t\t\t g.drawImage(black, Config.CELL*j+Config.OFFSETX-20, i*Config.CELL+Config.OFFSETY-20, null);\n\t\t\t\t \n\t\t\t\t}\n\t\t\t\tif(Config.MAP[i][j]==Config.WHITE)\n\t\t\t\t{\n\t\t\t\t g.drawImage(white, Config.CELL*j+Config.OFFSETX-20, i*Config.CELL+Config.OFFSETY-20, null);\n\t\t\t\t \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n //画提拉\n\t\tg.setFont(new Font(\"微软雅黑\",Font.BOLD,24));\n\t\tg.setColor(step%2==0?Color.black:Color.white);\n\t\tg.drawString(step%2==0?\"黑子下\":\"白子下\", 640, 80);\n}",
"public BoardCell draw(Graphics g, boolean specialColor) { \n\t\tx = (width * column);\n\t\ty = (height * row);\n\n\t\tif(specialColor) {\n\t\t\tsuper.repaint();\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.cyan);\n\t\t\tg.fillRect(x, y, width, height);\n\t\t}\n\n\t\t//if is not doorway\n\t\tif(this.isWalkway) {\n\t\t\tsuper.repaint();\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(handleColor(Color.YELLOW, specialColor));\n\t\t\t//x, y, width, height\n\t\t\tg.fillRect(x, y, width, height);\n\t\t\tg.setColor(Color.BLACK);\n\t\t\tg.drawRect(x, y, width, height);\n\t\t}\n\t\t\n\t\t//if is doorway\n\t\telse if (this.isDoorway && this.isRoom){\n\t\t\t//display doorway direction\n\t\t\tswitch (this.doorDirection) {\n\t\t\t//display each cell's direction image\n\t\t\tcase LEFT:\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tg.setColor(handleColor(Color.GRAY, specialColor));\n\t\t\t\tg.fillRect(x, y, width + 10, height );\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(x , y, doorWidth, height);\n\t\t\t\tbreak;\n\t\t\tcase RIGHT:\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tg.setColor(handleColor(Color.GRAY, specialColor));\n\t\t\t\tg.fillRect(x, y, width, height);\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(x + 20, y, doorWidth, height);\n\t\t\t\tbreak;\n\t\t\tcase UP:\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tg.setColor(handleColor(Color.GRAY, specialColor));\n\t\t\t\tg.fillRect(x, y, width, height);\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(x, y, width, doorHeight);\n\t\t\t\tbreak;\n\t\t\tcase DOWN:\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tg.setColor(handleColor(Color.GRAY, specialColor));\n\t\t\t\tg.fillRect(x, y, width, height);\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(x, y + 20, width, doorHeight);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//if the cell is a room\n\t\tif(this.isRoom && !this.isDoorway) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.gray);\n\t\t\tg.fillRect(x, y, width, height );\n\t\t}\n\t\t//if is closet\n\t\tif(this.isCloset && !this.isDoorway) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.RED);\n\t\t\tg.fillRect(x, y, width, height);\n\t\t}\n\t\t//draw the players and the player colors\n\t\tif(this.isPlayer) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(this.playerColor);\n\t\t\tg.fillOval(x, y, width, height);\n\t\t}\n\t\t\n\t\t//this displays the room name\n\t\tif(isNameDrawer && !this.isDoorway) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.BLUE);\n\t\t\tg.drawString(board.getLegend().get(initial), x, y);\n\t\t\treturn this;\n\t\t} \n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n\tpublic void render()\n\t{\n\t\tbackground.color().set(grid.backgroundColor());\n\t\tsuper.render();\n\t\tfade.render();\n\t}",
"public final Paint getGridPaint() {\n return gridPaint;\n }",
"public void updateGridX();",
"public void paintComponent(Graphics g){\n \t\t\t g.setColor(Color.white);\n \t\t\t g.fillRect(0,0,getWidth(),getHeight());\n for(Block z : blocks){\n z.draw(g);\n }\n \t\t }",
"@Override\r\n protected void paintComponent(Graphics g) {\n paintWater(g);\r\n \r\n g.setColor(new Color(255, 255, 255, 70));\r\n g.fillRect(0, 0, 500, 500);\r\n \r\n \r\n // Paint the Grid ------------------------------------------\r\n g.setColor(Color.BLACK);\r\n \r\n for (int i = -1; i < 500; i += 50) {\r\n \r\n g.fillRect(i, 0, 2, 500);\r\n g.fillRect(0, i, 500, 2);\r\n \r\n }\r\n \r\n paintShips(g);\r\n paintHits(g);\r\n \r\n \r\n if (isPainted && shortBoard == ATTACK_BOARD && newGD.isMyTurn() && !missile.isPlaced()) {\r\n g.drawImage(Assets.imgMissile, mouseX, mouseY, null);\r\n }\r\n \r\n if (shortBoard == ATTACK_BOARD && newGD.isMyTurn() && missile.isPlaced()) {\r\n g.drawImage(Assets.imgMissile, missile.getPosition().x, missile.getPosition().y, null);\r\n }\r\n \r\n // Paint square under mouse pointer (also for testing)\r\n /*if (isPainted) {\r\n \r\n g.setColor(colorSquare);\r\n g.fillRect(mouseX, mouseY, 50, 50);\r\n \r\n }*/\r\n \r\n }",
"void draw() {\n canvas.drawColor(Color.BLACK);\n insertSort(vstar);\n for( int i=0; i<NUMSTARS; i++){\n vstar[i].draw();\n }\n }",
"@Override\n\tpublic void draw() {\n\n\t}",
"@Override\n\tpublic void draw() {\n\n\t}",
"private void draw() {\n GraphicsContext gc = canvas.getGraphicsContext2D();\n\n double size = getCellSize();\n Point2D boardPosition = getBoardPosition();\n\n // Clear the canvas\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\n\n // Draw the grid\n gc.setStroke(Color.LIGHTGRAY);\n for (int i = 0; i <= board.getWidth(); i++) {\n gc.strokeLine(boardPosition.getX() + i * size, boardPosition.getY(),\n boardPosition.getX() + i * size, boardPosition.getY() + board.getHeight() * size);\n }\n\n for (int i = 0; i <= board.getHeight(); i++) {\n gc.strokeLine(boardPosition.getX(), boardPosition.getY() + i * size,\n boardPosition.getX() + board.getWidth() * size, boardPosition.getY() + i * size);\n }\n\n // Draw cells\n gc.setFill(Color.ORANGE);\n for (int i = 0; i < board.getWidth(); i++) {\n for (int j = 0; j < board.getHeight(); j++) {\n if (board.isAlive(i, j)) {\n gc.fillRect(boardPosition.getX() + i * size, boardPosition.getY() + j * size, size, size);\n }\n }\n }\n }",
"public void draw() {\n\t\tp.pushStyle();\n\t\t{\n\t\t\tp.rectMode(PConstants.CORNER);\n\t\t\tp.fill(360, 0, 70, 180);\n\t\t\tp.rect(60f, 50f, p.width - 110f, p.height * 2f * 0.33f - 50f);\n\t\t\tp.rect(60f, p.height * 2f * 0.33f + 50f, p.width - 110f, p.height * 0.33f - 130f);\n\t\t}\n\t\tp.popStyle();\n\n\t\tlineChart.draw(40f, 40f, p.width - 80f, p.height * 2f * 0.33f - 30f);\n\t\tlineChart2.draw(40f, p.height * 2f * 0.33f + 45f, p.width - 80f, p.height * 0.33f - 110f);\n\t\t//p.line(x1, y1, x2, y2);\n\n\t}",
"public void paint() {\n int L = 150; // Local convenience var\n\n // Declare three lines (left, middle, and right)\n Line left = new Line(L, L, L, getHeight() - L);\n Line middle = new Line(L, getHeight() / 2, getWidth() - L, getHeight() / 2);\n Line right = new Line(getWidth() - L, L, getWidth() - L, getHeight() - L);\n\n getChildren().clear(); // Clear the pane before redisplay\n\n displayHTree(order, left, middle, right); // Call the recursive method\n }",
"@Override\n\tpublic void paintComponent(Graphics g) {\n\t\thoehe = this.getHeight();\n\t\tbreite = this.getWidth();\n\t\tif(radius<breite/4) {\n\t\t\tg.setColor(Color.RED);\n\t\t}else{\n\t\t\tif(radius<breite/2) {\n\t\t\t\tg.setColor(Color.YELLOW);\n\t\t\t}else{\n\t\t\t\tif(radius<breite*3/4) {\n\t\t\t\t\tg.setColor(Color.GREEN);\n\t\t\t\t}else{\n\t\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tg.fillOval(breite/2-radius/2, hoehe/2-radius/2, radius, radius); // In der Mitte platziert.\n\t}",
"@Override\n public void paint(Graphics g) {\n }",
"@Override\n public void process() {\n getTelemetry().addData(\" start move\", \"BaseColor %s relic side %s\", baseColor.name(), (relicSide)?\"true\" :\"false\" );\n getTelemetry().update();\n if (JewelSensorAutoArmProcessor.JewelColor.RED.equals(baseColor)){\n if (relicSide) {\n RedRelicCorner();\n } else{\n RedNonRelicCorner();\n }\n }else{\n if (relicSide) {\n BlueRelicCorner();\n } else{\n BlueNonRelicCorner();\n }\n }\n releaseGlyph();\n }",
"public void draw() {\n PImage grid = loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/tile.png\");\n for(int i = 0 ; i < 10 ; i++){\n for(int j = 0 ; j < 6 ; j++){\n image(grid, i*grid.width, j*grid.height);\n if(gridPlane.get(List.of(i, j)).getOwner() != null){\n if(gridPlane.get(List.of(i, j)).getOwner().getColor().equals(\"Red\")){\n if(gridPlane.get(List.of(i, j)).getAtomCount() == 1){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red1.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 2){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red2.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 3){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red3.png\"), i*grid.width, j*grid.height);\n }\n }else if(gridPlane.get(List.of(i, j)).getOwner().getColor().equals(\"Green\")){\n if(gridPlane.get(List.of(i, j)).getAtomCount() == 1){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green1.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 2){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green2.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 3){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green3.png\"), i*grid.width, j*grid.height);\n }\n }\n }\n }\n }\n if(this.finish == true){\n System.exit(0);\n }\n }",
"protected abstract void paintBoard() throws TilePixelOutOfRangeException;",
"public void paintComponent(Graphics arg0) {\n\t\tsuper.paintComponent(arg0);\n\t\targ0.setColor(Color.BLACK); \n\t\tboard(arg0); \n\t\tdrawStone(arg0);\n\t}",
"@Override\r\n public void paintComponent(Graphics brush)\r\n {\r\n super.paintComponent(brush);\r\n Graphics2D g2 = (Graphics2D) brush;\r\n /*Faster Rendering for mouse interaction*/\r\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\r\n g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);\r\n \r\n \r\n if (!wps.getWalls().isEmpty())\r\n {\r\n x = INITIAL_X;\r\n int wallNo = 1;\r\n /*Iterate for all Walls*/\r\n for (Wall wa : wps.getWalls())\r\n {\r\n /*Rectangle counters*/\r\n int rectangles = 0;\r\n for (int bays : wa.getBaysArray())\r\n {\r\n y = INITIAL_Y;\r\n for (int i=0; i<bays;i++)\r\n {\r\n brush.drawRect(x,y, SLEEPER_W, SLEEPER_H);\r\n brush.setFont(f);\r\n //Centering the Name\r\n brush.drawString(\"Wall \"+wallNo, x+28, y+16);\r\n y = y - SLEEPER_H;\r\n }\r\n \r\n /*Painting rectangles to simulate at entire bay*/\r\n if(wps.getWalls().get(wallNo-1).getArrayRect().size() != wps.getWalls().get(wallNo-1).getBaysArray().size())\r\n {\r\n wps.getWalls().get(wallNo-1).getArrayRect().add(new Rectangle(x,y+SLEEPER_H, SLEEPER_W, (SLEEPER_H*bays)));\r\n }\r\n g2.draw(wps.getWalls().get(wallNo-1).getArrayRect().get(rectangles));\r\n rectangles++;\r\n x = x + SLEEPER_W;\r\n \r\n }\r\n wallNo++;\r\n }\r\n }\r\n \r\n if (x> 830)\r\n {\r\n this.setPreferredSize(new Dimension(x+20,560));\r\n this.revalidate();\r\n }\r\n }",
"private void refresh(int width, int height) {\n Integer numUnexposed = mainField.numUnexposed();\n nonminesLabel.setText(numUnexposed.toString());\n Integer numMarked = mainField.numMarked();\n if (numMarked < 0) {\n cellsUnmarked.setText(\"Too Many Marked!\");\n }\n else {\n cellsUnmarked.setText(numMarked.toString());\n }\n // iterate through all the buttons and update the text if it's an exposed cell\n for (int i = 0;i < width;i++) {\n for (int j = 0;j < height;j++) {\n int cellState = mainField.getCellState(i,j);\n if (cellState == mainField.EXPOSED) {\n Integer numValue = mainField.getValue(i,j);\n if (numValue == -1) {\n btArray[i][j].setText(\"B\");\n btArray[i][j].setStyle(\"-fx-background-color: #FF0000;\");\n }\n else if (numValue == 0) {\n btArray[i][j].setStyle(\"-fx-background-color: #CCCCCC;\");\n }\n else {\n btArray[i][j].setText(numValue.toString());\n btArray[i][j].setStyle(\"-fx-background-color: #CCCCCC;\");\n }\n }\n }\n }\n }",
"@Override\r\n public final void draw(final Rectangle r, final BufferedImage paper) {\n String red;\r\n String green;\r\n String blue;\r\n if (Integer.toHexString(r.getBorderColor().getRed()).length() == 1) {\r\n red = \"0\" + Integer.toHexString(r.getBorderColor().getRed());\r\n } else {\r\n red = Integer.toHexString(r.getBorderColor().getRed());\r\n }\r\n if (Integer.toHexString(r.getBorderColor().getGreen()).length() == 1) {\r\n green = \"0\" + Integer.toHexString(r.getBorderColor().getGreen());\r\n } else {\r\n green = Integer.toHexString(r.getBorderColor().getGreen());\r\n }\r\n if (Integer.toHexString(r.getBorderColor().getBlue()).length() == 1) {\r\n blue = \"0\" + Integer.toHexString(r.getBorderColor().getBlue());\r\n } else {\r\n blue = Integer.toHexString(r.getBorderColor().getBlue());\r\n }\r\n String color = \"#\" + red + green + blue;\r\n\r\n draw(new Line((String.valueOf(r.getxSus())), String.valueOf(r.getySus()),\r\n String.valueOf(r.getxSus() + r.getLungime() - 1), String.valueOf(r.getySus()),\r\n color, String.valueOf(r.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(r.getxSus() + r.getLungime() - 1)),\r\n String.valueOf(r.getySus()), String.valueOf(r.getxSus() + r.getLungime() - 1),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), color,\r\n String.valueOf(r.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(r.getxSus() + r.getLungime() - 1)),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), String.valueOf(r.getxSus()),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), color,\r\n String.valueOf(r.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(r.getxSus())),\r\n String.valueOf(r.getySus() + r.getInaltime() - 1), String.valueOf(r.getxSus()),\r\n String.valueOf(r.getySus()), color, String.valueOf(r.getBorderColor().getAlpha()),\r\n paper), paper);\r\n\r\n for (int i = r.getxSus() + 1; i < r.getxSus() + r.getLungime() - 1; i++) {\r\n for (int j = r.getySus() + 1; j < r.getySus() + r.getInaltime() - 1; j++) {\r\n if (checkBorder(i, j, paper)) {\r\n paper.setRGB(i, j, r.getFillColor().getRGB());\r\n }\r\n }\r\n }\r\n }",
"public void paintComponent(final Graphics the_graphics)\n {\n super.paintComponent(the_graphics);\n final Graphics2D g2d = (Graphics2D) the_graphics;\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, \n RenderingHints.VALUE_ANTIALIAS_ON);\n g2d.setFont(my_font);\n g2d.setColor(Color.WHITE);\n g2d.setStroke(new BasicStroke(STROKE_SIZE));\n g2d.drawString(PIECE_STRING, (getWidth() / (STROKE_SIZE * STROKE_SIZE)) - \n (PIECE_STRING.length() / STROKE_SIZE), (int) (getHeight() * LABEL_STARTING_Y));\n \n for (int y = Piece.NUMBER_OF_BLOCKS - 1; 0 <= y; y--) \n {\n for (int x = 0; x < Piece.NUMBER_OF_BLOCKS; x++) \n {\n for (int i = 0; i < Piece.NUMBER_OF_BLOCKS; i++) \n {\n final Point block = my_board.nextPiece().blocks()[i];\n if (block.x() == x && block.y() == y) \n {\n g2d.setColor(my_board.nextPiece().color());\n g2d.fill(new Rectangle2D.Double((x * getWidth() * BLOCK_SIZE_CONSTANT) + \n (int) (getWidth() * BLOCK_STARTING_X), (getHeight() / 2) + \n (float) (getWidth() * BLOCK_SIZE_CONSTANT) - (y * getWidth() * \n BLOCK_SIZE_CONSTANT), getWidth() * BLOCK_SIZE_CONSTANT, getWidth() * \n BLOCK_SIZE_CONSTANT));\n g2d.setColor(Color.DARK_GRAY);\n g2d.draw(new Rectangle2D.Double((x * getWidth() * BLOCK_SIZE_CONSTANT) + \n (int) (getWidth() * BLOCK_STARTING_X), (getHeight() / 2) + \n (float) (getWidth() * BLOCK_SIZE_CONSTANT) - (y * getWidth() * \n BLOCK_SIZE_CONSTANT), getWidth() * BLOCK_SIZE_CONSTANT, getWidth() * \n BLOCK_SIZE_CONSTANT));\n } \n }\n }\n }\n }",
"@Override\r\n public void draw() {\n }",
"private void displayGrid() {\r\n System.out.print(this.grid);\r\n }",
"public void drawRadar () {\n // material red (229,28,35)\n // philo red 204,17, 17 \n stroke(229,28,35, 255-cursorRad*(255/cursorRadMax));\n if (cursorRad < cursorRadMax) {\n ellipse(mouseX, mouseY, cursorRad, cursorRad);\n }\n else if (cursorRad > (cursorRadMax + cursorThreshold)) {\n cursorRad = 5;\n }\n cursorRad = cursorRad + cursorDelta;\n noStroke();\n }",
"private void drawColoredRelief(Graphics g) throws InterruptedException {\n\t\tRectangle field = g.getClipBounds();\n\t\t\n\t\tBufferedImage[] bimages = new BufferedImage[threadCnt];\n\t\tfor(int i = 0; i< bimages.length; i++){\n\t\t\tbimages[i] = new BufferedImage(field.width, field.height, BufferedImage.TYPE_INT_ARGB);\n\t\t}\n\t\t\n//\t\tdouble[] thisCoordinate = plotSheet.toCoordinatePoint(0, 0, field);\n//\t\t\n//\t\tdouble thisF_xy;\n//\t\tfor(int i = field.x+plotSheet.getFrameThickness() ; i < field.x + field.width -plotSheet.getFrameThickness(); i++) {\n//\t\t\tfor(int j = field.y + +plotSheet.getFrameThickness() ; j < field.y +field.height -plotSheet.getFrameThickness(); j++) {\n//\t\t\t\tthisCoordinate = plotSheet.toCoordinatePoint(i, j, field);\n//\t\t\t\tthisF_xy = function.f(thisCoordinate[0], thisCoordinate[1]);\n//\t\t\t\tg.setColor(getColor(thisF_xy));\n//\t\t\t\tg.drawLine(i, j, i, j);\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n\t\t\n\t\tint length = (field.x + field.width-plotSheet.getFrameThickness()) - (field.x+plotSheet.getFrameThickness());\n\t\tThread[] threads = new Thread[threadCnt];\n\t\t\n\t\tPartRenderer[] partRenderer = new PartRenderer[threadCnt];\n\t\t\n\t\tGraphics gnew = bimages[0].getGraphics();\n\t\tgnew.setClip(field);\n\t\tpartRenderer[0] = new PartRenderer(gnew, field.x+plotSheet.getFrameThickness(), field.x + plotSheet.getFrameThickness()+ length/threadCnt);\n\t\tthreads[0] = new Thread(partRenderer[0]);\n\t\tfor(int i = 1; i< threads.length-1; i++){\n\t\t\tgnew = bimages[i].getGraphics();\n\t\t\tgnew.setClip(field);\n\t\t\tpartRenderer[i] = new PartRenderer(gnew, field.x + plotSheet.getFrameThickness() + length*i/threadCnt +1, field.x+ plotSheet.getFrameThickness() + length*(i+1)/threadCnt);\n\t\t\tthreads[i] = new Thread(partRenderer[i]);\n\t\t}\n\t\tif(threadCnt > 1){\n\t\tgnew = bimages[threadCnt-1].getGraphics();\n\t\tgnew.setClip(field);\n\t\tpartRenderer[threadCnt-1] = new PartRenderer(gnew, field.x + plotSheet.getFrameThickness() + length*(threadCnt-1)/threadCnt +1, field.x+ plotSheet.getFrameThickness() + length);\n\t\tthreads[threadCnt-1] = new Thread(partRenderer[threadCnt-1]);\n\t\t}\n\t\tfor(Thread thread : threads) {\n\t\t\tthread.start();\n\t\t}\n\t\t\n\t\tfor(Thread thread : threads) {\n\t\t\tthread.join();\n\t\t}\n\t\t\n\t\tfor(BufferedImage bimage: bimages){\n\t\t\t((Graphics2D)g).drawImage(bimage, null, 0, 0);\n\t\t}\n\t\t\n\t\t//\n\t}",
"public boolean onGrid(int xValue, int yValue);",
"public void drawBackgroundItems(Graphics g, int roofPos, int elvHeight, int elvWidth, int numFloors) {\n\t\t\tif(numFloors > 0) {\n\t\t\t\tg.drawLine(elvWidth, roofPos, DRAW_SURFACE_SIZE.width - elvWidth, roofPos); // draw the roof\n\t\t\t\tfor(int i = 1; i <= numFloors; i++) {\n\t\t\t\t\tint floorSpacing = i*elvHeight;\n\t\t\t\t\tg.drawString(String.format(\"FLOOR %d\", NUM_FLOORS - i + 1), DRAW_SURFACE_SIZE.width / 2, roofPos + floorSpacing - elvHeight/2);\n\t\t\t\t\tg.drawLine(elvWidth, roofPos + floorSpacing, DRAW_SURFACE_SIZE.width - elvWidth, roofPos + floorSpacing);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// draw labels for the panels\n\t\t\tg.drawString(\"Left Elevator Controls\", 80, DRAW_SURFACE_SIZE.height - 10);\n\t\t\tg.drawString(\"Right Elevator Controls\", DRAW_SURFACE_SIZE.width - 220, DRAW_SURFACE_SIZE.height - 10);\n\t\t}",
"public void updateDisplay()\n {\n //Step 3\n\t Color color = null;\n //Hint - use a nested for loop\n\t for(int row = 0; row < grid.length; row++)\n\t {\n\t\t for(int col = 0; col < grid[0].length; col++)\n\t\t {\n\t\t\t if(grid[row][col] == EMPTY)\n\t\t\t {\n\t\t\t\t color = Color.BLACK;\n\t\t\t }\n\t\t\t else if(grid[row][col] == METAL)\n\t\t\t {\n\t\t\t\t color = Color.GRAY;\n\t\t\t }\n\t\t\t else if(grid[row][col] == SAND)\n\t\t\t {\n\t\t\t\t color = new Color(204, 186, 25);\n\t\t\t }\n\t\t\t else if(grid[row][col] == WATER)\n\t\t\t {\n\t\t\t\t color = new Color(7, 125, 116);\n\t\t\t }\n\t\t\t else if(grid[row][col] == HELIUM)\n\t\t\t {\n\t\t\t\t color = Color.WHITE;\n\t\t\t }\n\t\t\t else if(grid[row][col] == BOUNCE)\n\t\t\t {\n\t\t\t\t color = new Color(255, 0, 200);\n\t\t\t }\n\t\t\t else if(grid[row][col] == VIRUS)\n\t\t\t {\n\t\t\t\t color = new Color(153, 51, 204);\n\t\t\t }\n\t\t\t else if(grid[row][col] == FIRE)\n\t\t\t {\n\t\t\t\t color = new Color(229, 64, 0);\n\t\t\t }\n\t\t\t else if(grid[row][col] == VINE)\n\t\t\t {\n\t\t\t\t color = new Color(45, 102, 25);\n\t\t\t }\n\t\t\t else if(grid[row][col] == TELEPORT)\n\t\t\t {\n\t\t\t\t color = new Color(255, 255, 0);\n\t\t\t }\n\t\t\t else if(grid[row][col] == LASER)\n\t\t\t {\n\t\t\t\t color = new Color(245, 50, 41);\n\t\t\t }\n\t\t\t display.setColor(row, col, color);\n\t\t }\n\t }\n\t \n }"
] | [
"0.73947567",
"0.71242",
"0.7095211",
"0.68893546",
"0.6825245",
"0.6756929",
"0.66804785",
"0.6670424",
"0.66468066",
"0.66287774",
"0.65599644",
"0.6559163",
"0.6504619",
"0.6469711",
"0.64374906",
"0.6391717",
"0.6385775",
"0.63708365",
"0.6359538",
"0.6319294",
"0.63183856",
"0.6312793",
"0.62706286",
"0.6240143",
"0.6233116",
"0.6232384",
"0.6229603",
"0.6216208",
"0.6214042",
"0.6197373",
"0.61899406",
"0.6175681",
"0.6164728",
"0.6153843",
"0.61260563",
"0.6116934",
"0.61080974",
"0.6096019",
"0.6095617",
"0.6093267",
"0.6089422",
"0.6080811",
"0.60687155",
"0.60646576",
"0.6063401",
"0.60588807",
"0.6058581",
"0.60529596",
"0.605019",
"0.6030508",
"0.602874",
"0.6028275",
"0.6019685",
"0.601308",
"0.6010203",
"0.6006842",
"0.6006838",
"0.59969836",
"0.5996026",
"0.59952146",
"0.5991705",
"0.598107",
"0.59792477",
"0.5978639",
"0.5978639",
"0.59739965",
"0.5971888",
"0.5968905",
"0.5961679",
"0.5952498",
"0.594588",
"0.59456456",
"0.59406173",
"0.59219754",
"0.5919801",
"0.59159",
"0.59110796",
"0.589885",
"0.5893841",
"0.5893841",
"0.5891647",
"0.58914596",
"0.5891012",
"0.58877045",
"0.5887348",
"0.5885332",
"0.5883306",
"0.5882159",
"0.5873951",
"0.5868805",
"0.58624536",
"0.5860525",
"0.5850166",
"0.5848683",
"0.5848651",
"0.5845372",
"0.58445865",
"0.58412457",
"0.5834695",
"0.58268285"
] | 0.6400604 | 15 |
TODO Autogenerated method stub | @Override
public String toString() {
return title;
} | {
"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}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
] | 0.0 | -1 |
static private HashMap hotPicPathMap; private File [] hotPics; | public getPicPath(HashMap< String, String> picPath) {
// TODO Auto-generated constructor stub
this.picPathMap = picPath;
//hotPicPathMap = new HashMap<String, String>();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createHash() throws IOException\n\t{\n\t\tmap = new HashMap<String, ImageIcon>();\n\t\t\n\t\tfor(int i = 0; i < pokemonNames.length; i++)\n\t\t{\n\t\t\tmap.put(pokemonNames[i], new ImageIcon(getClass().getResource(fileLocations[i])));\n\t\t}\n\t}",
"public ImageFileNameMap()\r\n {\r\n prevMap = null;\r\n }",
"private TagListSingleton() {\n\t\t// The file is always going to have same pathname\n\t\tFile f = new File(pathName);\n\t\ttry {\n\t\t\tif (f.exists()) {\n\t\t\t\treadFromFile();\n\t\t\t} else {\n\t\t\t\t// If file does not exist, create new map\n\t\t\t\tf.createNewFile();\n\t\t\t\ttagToImg = new HashMap<String, HashSet<String>>();\n\t\t\t}\n\t\t} catch (IOException | ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// Initialize the other map\n\t\tmakeImgToTag();\n\t}",
"public void cargarHashMap() throws IOException {\r\n\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.BUTTERFLY,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/butterfly.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.AMOEBA,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/amoeba.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.DIAMOND,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/diamond.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.FALLINGDIAMOND,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/diamond.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.WALL,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/wall.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.DIRT,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/dirt.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.EMPTY,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/empty.jpg\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.PLAYER,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/rockford.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.ROCK,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/boulder.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.FALLINGROCK,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/boulder.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.FIREFLY,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/firefly.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.TITANIUM,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/steel.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.EXIT,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/exit.gif\")));\r\n\t\t//imagenes.put(\r\n\t\t\t//\tBDTile.EXPLOSION,\r\n\t\t\t\t//toolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t//\t.getResource(\"resources/explosion.gif\")));\r\n\r\n\t}",
"public void getPictures(){\n\t\t\ttry{\n\t\t\t\timg = ImageIO.read(new File(\"background.jpg\"));\n\t\t\t\ttank = ImageIO.read(new File(\"Tank.png\"));\n\t\t\t\tbackground2 = ImageIO.read(new File(\"background2.png\"));\n\t\t\t\t\n\t\t\t\trtank = ImageIO.read(new File(\"RTank.png\"));\n\t\t\t\tboom = ImageIO.read(new File(\"Boom.png\"));\n\t\t\t\tboom2 = ImageIO.read(new File(\"Boom2.png\"));\n\t\t\t\tinstructions = ImageIO.read(new File(\"Instructions.png\"));\n\t\t\t\tshotman = ImageIO.read(new File(\"ShotMan.png\"));\n\t\t\t\tlshotman = ImageIO.read(newFile(\"LShotMan.png\"));\n\t\t\t\tboomshotman = ImageIO.read(new File(\"AfterShotMan\"));\n\t\t\t\tlboomshotman = ImageIO.read(new File(\"LAfterShotMan\"));\n\t\t\t\t\n\t\t\t}catch(IOException e){\n\t\t\t\tSystem.err.println(\"d\");\n\t\t\t}\n\t\t}",
"private void getWeatherPic() {\n\t\tweatherPic=new HashMap<String, Integer>();\n\t\tweatherPic.put(\"晴\", R.drawable.weather_qing_tian);\n\t\tweatherPic.put(\"多云\", R.drawable.weather_yin_tian);\n\t\tweatherPic.put(\"阴\", R.drawable.weather_yin_tian);\n\t\tweatherPic.put(\"阵雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"雷阵雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"雷阵雨伴有冰雹\", R.drawable.weather_bing_tian);\n\t\tweatherPic.put(\"雨夹雪\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"小雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"中雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"大雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"暴雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"大暴雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"特大暴雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"阵雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"小雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"中雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"大雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"暴雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"雾\", R.drawable.weather_wu_tian);\n\t\tweatherPic.put(\"冻雨\", R.drawable.weather_bing_tian);\n\t\tweatherPic.put(\"沙尘暴\", R.drawable.weather_sha_chen_tian);\n\t\tweatherPic.put(\"小雨-中雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"中雨-大雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"大雨-暴雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"暴雨-大暴雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"大暴雨-特大暴雨\", R.drawable.weather_yu_tian);\n\t\tweatherPic.put(\"小雪-中雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"中雪-大雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"大雪-暴雪\", R.drawable.weather_xuetian);\n\t\tweatherPic.put(\"浮尘\", R.drawable.weather_wu_tian);\n\t\tweatherPic.put(\"扬沙\", R.drawable.weather_wu_tian);\n\t\tweatherPic.put(\"强沙尘暴\", R.drawable.weather_sha_chen_tian);\n\t\tweatherPic.put(\"霾\", R.drawable.weather_wu_mai_tian);\n\t}",
"@Override\n public HashMap initFileSet()\n {\n return null;\n }",
"private void init() {\n\n File folder = new File(MAP_PATH);\n File[] listOfFiles = folder.listFiles();\n\n for (int i = 0; i < Objects.requireNonNull(listOfFiles).length; i++) {\n this.mapFiles.add(new File(MAP_PATH + listOfFiles[i].getName()));\n }\n }",
"private ImageMappings() {}",
"public ImageFileNameMap(FileNameMap map)\r\n {\r\n prevMap = map;\r\n }",
"List<Bitmap> getFavoriteRecipeImgs();",
"@Override\n public String getPicPhoto() {\n return pic_filekey;\n }",
"protected void setPic() {\n }",
"public ImageFiles() {\n\t\tthis.listOne = new ArrayList<String>();\n\t\tthis.listTwo = new ArrayList<String>();\n\t\tthis.listThree = new ArrayList<String>();\n\t\tthis.seenImages = new ArrayList<String>();\n\t\tthis.unseenImages = new ArrayList<String>();\n\t}",
"private void fillImageMap() {\n Image shipImage;\n try {\n shipImage = ImageIO.read(getClass().getResource(\"img/patrol_boat.png\"));\n imageMap.put(ShipType.PATROL_BOAT, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/patrol_boat_sunken.png\"));\n imageMap.put(ShipType.PATROL_BOAT_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_horizontal.gif\"));\n imageMap.put(ShipType.CRUISER_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_horizontal_sunken.gif\"));\n imageMap.put(ShipType.CRUISER_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_vertical.gif\"));\n imageMap.put(ShipType.CRUISER_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_vertical_sunken.gif\"));\n imageMap.put(ShipType.CRUISER_VERTICAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_horizontal.gif\"));\n imageMap.put(ShipType.SUBMARINE_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_horizontal_sunken.gif\"));\n imageMap.put(ShipType.SUBMARINE_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_vertical.gif\"));\n imageMap.put(ShipType.SUBMARINE_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_vertical_sunken.gif\"));\n imageMap.put(ShipType.SUBMARINE_VERTICAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_horizontal.gif\"));\n imageMap.put(ShipType.BATTLESHIP_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_horizontal_sunken.gif\"));\n imageMap.put(ShipType.BATTLESHIP_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_vertical.gif\"));\n imageMap.put(ShipType.BATTLESHIP_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_vertical_sunken.gif\"));\n imageMap.put(ShipType.BATTLESHIP_VERTICAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_horizontal.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_horizontal_sunken.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_vertical.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_vertical_sunken.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_VERTICAL_SUNKEN, shipImage);\n } catch(IOException e) {\n e.printStackTrace();\n }\n }",
"public void findImages() {\n URL imgURL = ImageLoader.class.getResource(\"/BackgroundMenu.jpg\");\n this.backgroundImages.put(MenuP.TITLE, loadImage(imgURL));\n\n imgURL = ImageLoader.class.getResource(\"/backgroundGame.png\");\n this.backgroundImages.put(ArenaView.TITLE, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/gameOver.jpg\");\n this.backgroundImages.put(GameOverView.TITLE, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Player.png\");\n this.entityImages.put(ID.PLAYER, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Enemy1.png\");\n this.entityImages.put(ID.BASIC_ENEMY, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/boss.png\");\n this.entityImages.put(ID.BOSS_ENEMY, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/meteorBrown_big1.png\");\n this.entityImages.put(ID.METEOR, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/BlueBullet.png\");\n this.bulletImages.put(new Pair<>(ID.PLAYER_BULLET, ID.PLAYER), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/redBullet.png\");\n this.entityImages.put(ID.ENEMY_BULLET, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_FireBoost.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.FIRE_BOOST), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_Freeze.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.FREEZE), loadImage(imgURL)); \n \n imgURL = ImageLoader.class.getResource(\"/powerup_Health.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.HEALTH), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_Shield.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.SHIELD), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/bulletSpeedUp.png\");\n this.AnimationsPowerUp.put(new Pair<>(ID.POWER_UP, PowerUpT.FIRE_BOOST), loadEffect(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Explosion.png\");\n this.AnimationsEffect.put(new Pair<>(ID.EFFECT, SpecialEffectT.EXPLOSION), loadEffect(imgURL));\n\n imgURL = ImageLoader.class.getResource(\"/freeze.png\");\n this.AnimationsPowerUp.put(new Pair<>(ID.POWER_UP, PowerUpT.FREEZE), loadImage(imgURL));\n }",
"private void addImgList() {\n\t\tdogImg.add(\"./data/img/labrador.jpg\");\t\t\t\t\n\t\tdogImg.add(\"./data/img/germanshepherd.jpg\");\t\n\t\tdogImg.add(\"./data/img/bulldog.jpg\");\t\t\t\t\t\t\t\t\n\t\tdogImg.add(\"./data/img/rottweiler.jpg\");\n\t\tdogImg.add(\"./data/img/husky.jpg\");\n\n\t}",
"public HashMap<String,File> getFile(){\r\n\t\treturn files;\r\n\t}",
"HashMap<String, ?> getOutputFiles();",
"Map<File, File> getOutputFileMap();",
"public static void loadImages()\n \t{\n \t\tSystem.out.print(\"Loading images... \");\n \t\t\n \t\tallImages = new TreeMap<ImageEnum, ImageIcon>();\n \t\t\n \t\ttry {\n \t\taddImage(ImageEnum.RAISIN, \"images/parts/raisin.png\");\n \t\taddImage(ImageEnum.NUT, \"images/parts/nut.png\");\n \t\taddImage(ImageEnum.PUFF_CHOCOLATE, \"images/parts/puff_chocolate.png\");\n \t\taddImage(ImageEnum.PUFF_CORN, \"images/parts/puff_corn.png\");\n \t\taddImage(ImageEnum.BANANA, \"images/parts/banana.png\");\n \t\taddImage(ImageEnum.CHEERIO, \"images/parts/cheerio.png\");\n \t\taddImage(ImageEnum.CINNATOAST, \"images/parts/cinnatoast.png\");\n\t\taddImage(ImageEnum.CORNFLAKE, \"images/parts/flake_corn.png\");\n \t\taddImage(ImageEnum.FLAKE_BRAN, \"images/parts/flake_bran.png\");\n \t\taddImage(ImageEnum.GOLDGRAHAM, \"images/parts/goldgraham.png\");\n \t\taddImage(ImageEnum.STRAWBERRY, \"images/parts/strawberry.png\");\n \t\t\n \t\taddImage(ImageEnum.PART_ROBOT_HAND, \"images/robots/part_robot_hand.png\");\n \t\taddImage(ImageEnum.KIT_ROBOT_HAND, \"images/robots/kit_robot_hand.png\");\n \t\taddImage(ImageEnum.ROBOT_ARM_1, \"images/robots/robot_arm_1.png\");\n \t\taddImage(ImageEnum.ROBOT_BASE, \"images/robots/robot_base.png\");\n \t\taddImage(ImageEnum.ROBOT_RAIL, \"images/robots/robot_rail.png\");\n \t\t\n \t\taddImage(ImageEnum.KIT, \"images/kit/empty_kit.png\");\n \t\taddImage(ImageEnum.KIT_TABLE, \"images/kit/kit_table.png\");\n \t\taddImage(ImageEnum.KITPORT, \"images/kit/kitport.png\");\n \t\taddImage(ImageEnum.KITPORT_HOOD_IN, \"images/kit/kitport_hood_in.png\");\n \t\taddImage(ImageEnum.KITPORT_HOOD_OUT, \"images/kit/kitport_hood_out.png\");\n \t\taddImage(ImageEnum.PALLET, \"images/kit/pallet.png\");\n \t\t\n \t\taddImage(ImageEnum.FEEDER, \"images/lane/feeder.png\");\n \t\taddImage(ImageEnum.LANE, \"images/lane/lane.png\");\n \t\taddImage(ImageEnum.NEST, \"images/lane/nest.png\");\n \t\taddImage(ImageEnum.DIVERTER, \"images/lane/diverter.png\");\n \t\taddImage(ImageEnum.DIVERTER_ARM, \"images/lane/diverter_arm.png\");\n \t\taddImage(ImageEnum.PARTS_BOX, \"images/lane/partsbox.png\");\n \t\t\n \t\taddImage(ImageEnum.CAMERA_FLASH, \"images/misc/camera_flash.png\");\n \t\taddImage(ImageEnum.SHADOW1, \"images/misc/shadow1.png\");\n \t\taddImage(ImageEnum.SHADOW2, \"images/misc/shadow2.png\");\n \t\t\n \t\taddImage(ImageEnum.GANTRY_BASE, \"images/gantry/gantry_base.png\");\n \t\taddImage(ImageEnum.GANTRY_CRANE, \"images/gantry/gantry_crane.png\");\n \t\taddImage(ImageEnum.GANTRY_TRUSS_H, \"images/gantry/gantry_truss_h.png\");\n \t\taddImage(ImageEnum.GANTRY_TRUSS_V, \"images/gantry/gantry_truss_v.png\");\n \t\taddImage(ImageEnum.GANTRY_WHEEL, \"images/gantry/gantry_wheel.png\");\n \t\t} catch (Exception e) {\n \t\t\te.printStackTrace();\n \t\t\tSystem.exit(1);\n \t\t}\n \t\tSystem.out.println(\"Done\");\n \t}",
"List<Bitmap> getRecipeImgSmall();",
"public String getPicPath() {\n return picPath;\n }",
"public String getPicPath() {\n return picPath;\n }",
"public String getPicpath() {\n return picpath;\n }",
"@Override\r\n\tpublic void initTripPicture(Set<Trippicture> pictures, String basePath) {\n\t\tfor (Trippicture tp : pictures) {\r\n\t\t\tString path = basePath + \"image_cache\\\\\" + tp.getName();\r\n\t\t\tif (!new File(path).exists()) {\r\n\t\t\t\tUtils.getFile(tp.getData(), path);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"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 createImageSet() {\n\t\t\n\t\t\n\t\tString image_folder = getLevelImagePatternFolder();\n \n String resource = \"0.png\";\n ImageIcon ii = new ImageIcon(this.getClass().getResource(image_folder + resource));\n images.put(\"navigable\", ii.getImage());\n\n\t}",
"public void listPictures()\r\n {\r\n int index = 0;\r\n while(index >=0 && index < pictures.size()) \r\n {\r\n String filename = pictures.get(index);\r\n System.out.println(index + \": \"+ filename);\r\n index++;\r\n }\r\n }",
"Board() {\n currentlyPlacedShip = null;\n imageMap = new TreeMap<ShipType, Image>();\n fillImageMap();\n try {\n hit = ImageIO.read(getClass().getResource(\"img/hit.gif\"));\n board = ImageIO.read(getClass().getResource(\"img/board.gif\"));\n mishit = ImageIO.read(getClass().getResource(\"img/mishit.gif\"));\n } catch(IOException e) {\n e.printStackTrace();\n }\n }",
"private void createImageFiles() {\n\t\tswitchIconClosed = Icon.createImageIcon(\"/images/events/switchImageClosed.png\");\n\t\tswitchIconOpen = Icon.createImageIcon(\"/images/events/switchImageOpen.png\");\n\t\tswitchIconEmpty = Icon.createImageIcon(\"/images/events/switchImageEmpty.png\");\n\t\tswitchIconOff = Icon.createImageIcon(\"/images/events/switchImageOff.png\");\n\t\tswitchIconOn = Icon.createImageIcon(\"/images/events/switchImageOn.png\");\n\t\tleverIconClean = Icon.createImageIcon(\"/images/events/leverImageClean.png\");\n\t\tleverIconRusty = Icon.createImageIcon(\"/images/events/leverImageRusty.png\");\n\t\tleverIconOn = Icon.createImageIcon(\"/images/events/leverImageOn.png\");\n\t}",
"public static void cheat() {\n\t\tlocations = new ArrayList<Location>();\n \tLocation temp = new Location();\n \ttemp.setLongitude(20.0);\n \ttemp.setLatitude(30.0);\n \tlocations.add(temp);\n \tLocation temp0 = new Location();\n \ttemp0.setLongitude(21.0);\n \ttemp0.setLatitude(30.0);\n \tlocations.add(temp0);\n \tLocation temp1 = new Location();\n \ttemp1.setLongitude(15.0);\n \ttemp1.setLatitude(40.0);\n \tlocations.add(temp1);\n \tLocation temp2 = new Location();\n \ttemp2.setLongitude(20.0);\n \ttemp2.setLatitude(30.1);\n \tlocations.add(temp2);\n \tLocation temp3 = new Location();\n \ttemp3.setLongitude(22.0);\n \ttemp3.setLatitude(33.1);\n \tlocations.add(temp3);\n \tLocation temp4 = new Location();\n \ttemp4.setLongitude(22.1);\n \ttemp4.setLatitude(33.0);\n \tlocations.add(temp4);\n \tLocation temp5 = new Location();\n \ttemp5.setLongitude(22.1);\n \ttemp5.setLatitude(33.2);\n \tlocations.add(temp5);\n\t\tList<PictureObject> pictures = new ArrayList<PictureObject>();\n\t\tint nbrOfLocations = locations.size();\n\t\tfor (int index = 0; index < nbrOfLocations; index++) {\n\t\t\tPicture pic = new Picture();\n\t\t\tpic.setLocation(locations.get(index));\n\t\t\tpictures.add(pic);\n\t\t}\n\t\tFiles.getInstance().setPictureList(pictures);\n\t}",
"public HashMap<String, InputStream> getPlaceFiles() {\n\t\treturn getFilesByPath(PLACES_PATH);\n\t}",
"public Map getMap(){\n\t image = ImageIO.read(getClass().getResource(\"/images/maps/\" + mapName + \".png\"));\n\t\t\n\t\t\n\t\treturn null;\t\t\n\t}",
"public void setStaticPicture(String path);",
"abstract ImmutableMap<Path, Supplier<byte[]>> files();",
"public HashMap<String,Image> getIcons(){\n\t\treturn iconMap;\n\t}",
"private void loadGameFiles(){\n\t}",
"private void initImageBitmaps(){\n imageUrls.add(\"https://i.redd.it/j6myfqglup501.jpg\");\n names.add(\"Rocky Mountains\");\n\n imageUrls.add(\"https://i.redd.it/0u1u2m73uoz11.jpg\");\n names.add(\"Mt. Baker, WA\");\n\n imageUrls.add(\"https://i.redd.it/xgd2lnk56mz11.jpg\");\n names.add(\"Falls Creek Falls, TN\");\n\n imageUrls.add(\"https://i.redd.it/o6jc7peiimz11.jpg\");\n names.add(\"Skogafoss, Iceland\");\n\n imageUrls.add(\"https://i.redd.it/zxd44dfbyiz11.jpg\");\n names.add(\"Black Forest, Germany\");\n\n imageUrls.add(\"https://www.mountainphotography.com/images/xl/20090803-Hermannsdalstinden-Sunset.jpg\");\n names.add(\"Lofoten Islands, Norway\");\n\n imageUrls.add(\"https://i.redd.it/6vdpsld78cz11.jpg\");\n names.add(\"Isle of Skye\");\n\n imageUrls.add(\"https://i.redd.it/i4xb66v5eyy11.jpg\");\n names.add(\"Lago di Carezza, Italy\");\n\n imageUrls.add(\"https://i.redd.it/ttl7f4pwhhy11.jpg\");\n names.add(\"Arches National Park, UT\");\n\n imageUrls.add(\"https://i.redd.it/mcsxhejtkqy11.jpg\");\n names.add(\"Northern Lights\");\n\n imageUrls.add(\"https://i.redd.it/0rhq46ve83z11.jpg\");\n names.add(\"Swiss Alps\");\n\n imageUrls.add(\"https://i.redd.it/0dfwwitwjez11.jpg\");\n names.add(\"Hunan, China\");\n\n //Initialize our recyclerView now that we have our images/names\n initRecyclerView();\n }",
"private void loadImages(){\n try{\n System.out.println(System.getProperty(\"user.dir\"));\n\n t1img = read(new File(\"resources/tank1.png\"));\n t2img = read(new File(\"resources/tank1.png\"));\n backgroundImg = read(new File(\"resources/background.jpg\"));\n wall1 = read(new File(\"resources/Wall1.gif\"));\n wall2 = read(new File(\"resources/Wall2.gif\"));\n heart = resize(read(new File(\"resources/Hearts/basic/heart.png\")), 35,35);\n heart2 = resize(read( new File(\"resources/Hearts/basic/heart.png\")), 25,25);\n bullet1 = read(new File(\"resources/bullet1.png\"));\n bullet2 = read(new File(\"resources/bullet2.png\"));\n\n }\n catch(IOException e){\n System.out.println(e.getMessage());\n }\n }",
"public Map<Pair<ID, PowerUpT>, List<Image>> getPowerUpImages() {\n return powerUpImages;\n }",
"public void setImageGenResults(HashMap<String, View> viewMap, HashMap<String, Bitmap> imageMap) {\n if (map != null) {\n// calling addImages is faster as separate addImage calls for each bitmap.\n map.addImages(imageMap);\n }\n// need to store reference to views to be able to use them as hitboxes for click events.\n this.viewMap = viewMap;\n\n }",
"public static Map<String, ArrayList<ImageDataModel>> getImageFolderMap(Activity activity) {\r\n imageFolderMap.clear();\r\n keyList.clear();\r\n imageDataModelList.clear();\r\n String BUCKET_ORDER_BY;\r\n Uri uri;\r\n Cursor cursor;\r\n int columnIndexDataPath, columnIndexFolderName, columnIndexTitleName,\r\n columnIndexDate, columnIndexSize, columnIndexBucketId, columnIndexAlbumId, columnIndexDuration;\r\n String absolutePathOfImage, folderName, imageTitle, fileDate, bucketId, AlbumId, fileSize, duration;\r\n\r\n /**\r\n * Fetching Audio type of files through content provider\r\n */\r\n /**\r\n * Fetching audio type of files through content provider\r\n */\r\n uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;\r\n BUCKET_ORDER_BY = MediaStore.Audio.Media.DATE_MODIFIED + \" DESC\";\r\n String selection = MediaStore.Audio.Media.IS_MUSIC + \" != 0\";\r\n String[] projection1 = new String[]{MediaStore.Audio.AudioColumns.ALBUM,\r\n MediaStore.Audio.AudioColumns.ALBUM_ID,\r\n MediaStore.Audio.AudioColumns.DISPLAY_NAME,\r\n MediaStore.Audio.AudioColumns.DATA,\r\n MediaStore.Audio.AudioColumns.SIZE,\r\n MediaStore.Audio.AudioColumns.DATE_MODIFIED,\r\n\r\n MediaStore.Audio.AudioColumns.DURATION};\r\n\r\n cursor = activity.getContentResolver().query(uri, projection1, selection, null, BUCKET_ORDER_BY);\r\n if (cursor != null) {\r\n columnIndexFolderName = cursor\r\n .getColumnIndexOrThrow(MediaStore.Audio.AudioColumns.ALBUM);\r\n columnIndexAlbumId = cursor\r\n .getColumnIndexOrThrow(MediaStore.Audio.AudioColumns.ALBUM_ID);\r\n columnIndexTitleName = cursor\r\n .getColumnIndexOrThrow(MediaStore.Audio.AudioColumns.DISPLAY_NAME);\r\n\r\n columnIndexDataPath = cursor.getColumnIndexOrThrow(MediaStore.Audio.AudioColumns.DATA);\r\n while (cursor.moveToNext()) {\r\n absolutePathOfImage = cursor.getString(columnIndexDataPath);\r\n folderName = Constant.AUDIO_FOLDER_NAME;\r\n imageTitle = cursor.getString(columnIndexTitleName);\r\n\r\n ImageDataModel imageDataModel = new ImageDataModel();\r\n imageDataModel.setFile(new File(absolutePathOfImage));\r\n imageDataModel.setFolderName(folderName);\r\n imageDataModel.setPath(absolutePathOfImage);\r\n imageDataModel.setImageTitle(imageTitle);\r\n imageDataModel.setBucketId(\"1\");\r\n imageDataModel.setTimeDuration(\"0\");\r\n imageDataModel.setSelected(false);\r\n if (FileUtils.isImageFile(absolutePathOfImage)) {\r\n imageDataModel.setImage(true);\r\n } else if (FileUtils.isVideoFile(absolutePathOfImage)) {\r\n imageDataModel.setVideo(true);\r\n } else if (FileUtils.isAudioFile(absolutePathOfImage)) {\r\n imageDataModel.setAudio(true);\r\n }\r\n if (imageDataModel.getFile().length() > 0) {\r\n imageDataModelList.add(imageDataModel);\r\n if (imageFolderMap.containsKey(folderName)) {\r\n imageFolderMap.get(folderName).add(imageDataModel);\r\n } else {\r\n ArrayList<ImageDataModel> listOfAllImages = new ArrayList<ImageDataModel>();\r\n listOfAllImages.add(imageDataModel);\r\n imageFolderMap.put(folderName, listOfAllImages);\r\n }\r\n }\r\n }\r\n cursor.close();\r\n }\r\n keyList.addAll(imageFolderMap.keySet());\r\n //Send notification through main thread\r\n new Handler(Looper.getMainLooper()).post(new Runnable() {\r\n @Override\r\n public void run() {\r\n GlobalBus.getBus().post(new LandingFragmentNotification(Constant.UPDATE_UI));\r\n }\r\n });\r\n return imageFolderMap;\r\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tprivate void loadMap(){\r\n\t\t//Datei anlegen, falls nicht vorhanden\r\n\t\ttry {\r\n\t\t\tFile file = new File(homeFileLocation);\r\n\t\t\tif(!file.exists()){\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t\tSystem.out.println(\"Created new File.\");\r\n\r\n\t\t\t\t//Leere Map schreiben\r\n\t\t\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(homeFileLocation));\r\n\t\t\t\toos.writeObject(new HashMap<String, String>());\r\n\t\t\t\toos.flush();\r\n\t\t\t\toos.close();\r\n\r\n\t\t\t\tSystem.out.println(\"Wrote empty HashMap.\");\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\r\n\t\t//Map laden\r\n\t\ttry {\r\n\t\t\tObjectInputStream ois = new ObjectInputStream(new FileInputStream(homeFileLocation));\r\n\t\t\tthis.map = (HashMap<String, String>) ois.readObject();\r\n\t\t\tois.close();\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(\"pic\", new DataPart(imagename + \".jpg\", getFileDataFromDrawable(bitmap)));\n return params;\n }",
"public String getPic() {\n return pic;\n }",
"public String getPic() {\n return pic;\n }",
"public Set<HerbierPic> getPics() {\n\t\treturn pics;\n\t}",
"public HashMap<URL, HashSet<Nodemapper>> getLoadedFilesMap()\n {\n return this.loadedFiles;\n }",
"public void loadTileImages() {\n // keep looking for tile A,B,C, etc. this makes it\n // easy to drop new tiles in the images/ directory\n tiles = new ArrayList();\n char ch = 'A';\n while (true) {\n String name = \"tile_\" + ch + \".png\";\n File file = new File(\"images/\" + name);\n if (!file.exists()) {\n break;\n }\n tiles.add(loadImage(name));\n ch++;\n }\n }",
"public String getStaticPicture();",
"public static void loadFruitPic() {\n //images are from the public domain website: https://www.clipartmax.com/\n Toolkit toolkit = Toolkit.getDefaultToolkit();\n Banana.fruitPic = toolkit.getImage(\"Images/banana.png\");\n Banana.fruitSlice = toolkit.getImage(\"Images/bananaSlice.png\");\n }",
"private static CopyOnWriteArrayList<String> getListOfImages(String username){\r\n\t\treturn getUser(username).getImageList();\r\n\t}",
"public abstract String getFotoPath();",
"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}",
"public void makeMap(){\r\n\t\tint m =1;\r\n\t\t//EnvironObj temp = new EnvironObj(null, 0, 0);\r\n\t\tfor(int i=0; i<map.size(); i++){\r\n\t\t\tfor(int j =0; j<map.get(i).size(); j++){\r\n\t\t\t\tString o = map.get(i).get(j);\r\n\t\t\t\t//System.out.println(\"grabbing o from map, o = \" + o);\r\n\t\t\t\tif(o.equals(\"t\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"treee.png\", j+m, i*20);\r\n\t\t\t\t\tobjectList.add(temp);\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t\t//System.out.println(\"objectList: \" + objectList);\r\n\t\t\t\t}else if(o.equals(\"p\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"path.png\", j+m, i*20, true);\r\n\t\t\t\t\t//dont need to add to obj list bc its always in back\r\n\t\t\t\t\twalkables.add(temp);\r\n\r\n\t\t\t\t}else if(o.equals(\"h\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"house.png\", j+m, i*20);\r\n\t\t\t\t\tobjectList.add(temp);\r\n\t\t\t\t}else if(o.equals(\"g\")){\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t}\r\n\t\t\t\telse if(!o.equals(\"g\")){\r\n\t\t\t\t\tString fn = o +\".txt\";\r\n\t\t\t\t\tSystem.out.println(\"filename for NPC: \" + fn);\r\n\t\t\t\t\tnp = new NPC(o, fn, j+m, i*20);\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t\tcharacters.add(np);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tm=0;\r\n\t\t}\r\n\t}",
"public Image getPic() {\n return pic;\n }",
"public Map<String, List<Image>> getBackgroundImages(){\n return backgroundImages;\n }",
"List<Photo> homePagePhotos();",
"public static void loadImages() {\n PonySprite.loadImages(imgKey, \"graphics/ponies/GrannySmith.png\");\n }",
"private void makeImgToTag() {\n\t\timgToTag = new HashMap<String, HashSet<String>>();\n\t\t// Goes through the tagtoimg map to create this map\n\t\tfor (String tag : tagToImg.keySet()) {\n\t\t\tfor (String pathName : tagToImg.get(tag)) {\n\t\t\t\tif (imgToTag.containsKey(pathName))\n\t\t\t\t\timgToTag.get(pathName).add(tag);\n\t\t\t\telse {\n\t\t\t\t\tHashSet<String> tags = new HashSet<String>();\n\t\t\t\t\ttags.add(tag);\n\t\t\t\t\timgToTag.put(pathName, tags);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void galleryAddPic() {\n\t}",
"public void printImageMap(){\n for(int counter = savedMap.length-1 ; counter != -1;counter--)\n System.out.println(Arrays.toString(savedMap[counter]));\n }",
"private Images() {}",
"@SuppressWarnings(\"unchecked\")\n\tprivate void readFromFile() throws IOException, ClassNotFoundException {\n\t\ttry {\n\t\t\tInputStream file = new FileInputStream(pathName);\n\n\t\t\tInputStream buffer = new BufferedInputStream(file);\n\n\t\t\tObjectInput input = new ObjectInputStream(buffer);\n\n\t\t\ttagToImg = (Map<String, HashSet<String>>) input.readObject();\n\n\t\t\tinput.close();\n\t\t\tfile.close();\n\t\t} catch (EOFException e) {\n\t\t\ttagToImg = new HashMap<String, HashSet<String>>();\n\t\t} catch (InvalidClassException e) {\n\t\t\tSystem.out.println(\"file doesnt match the type\");\n\t\t}\n\t}",
"public File getFoto() {\r\n\t\treturn temp;\r\n\t}",
"public void run() {\nif(i[0] ==le.size()){\n i[0]=0;}\n File file = new File(\"/var/www/html/PawsAndClaws/web/bundles/uploads/brochures/\" + le.get( i[0]).getBrochure());\n\n Image it = new Image(file.toURI().toString(), 500, 310, false, false);\n eventspicture.setImage(it);\n i[0]++;\n }",
"public void createImages(){\n for(String s : allPlayerMoves){\n String a = \"Left\";\n for(int i = 0; i < 2; i++) {\n ArrayList<Image> tempImg = new ArrayList();\n boolean done = false;\n int j = 1;\n while(!done){\n try{\n tempImg.add(ImageIO.read(new File(pathToImageFolder+s+a+j+\".png\")));\n j++;\n } catch (IOException ex) {\n done = true;\n }\n }\n String temp = s.replace(\"/\",\"\") + a;\n playerImages.put(temp, tempImg);\n a = \"Right\";\n }\n }\n imagesCreated = true;\n }",
"static public ObservableList<ImageMetaInfo> getImagesInfo(File path) {\n ObservableList<ImageMetaInfo> observableList = FXCollections.observableArrayList();\n ExtFilter fileFilter = new ExtFilter();\n File[] imageFilesArray = path.listFiles(fileFilter);\n for (File file : imageFilesArray) {\n ImageMetaInfo imageMetaInfo = getImageMetaInfo(file);\n observableList.add(imageMetaInfo);\n }\n return observableList;\n }",
"public HashMap<String, InputStream> getOverlayFiles() {\n\t\treturn getFilesByPath(OVERLAYS_PATH);\n\t}",
"public void initIcons(){\n\t \troot_iconsFileNames = new ArrayList<String>();\n\t root_iconsBitmaps = new ArrayList<Bitmap>(); \n \t\ttry{\n \t\t\tResources res = this.getResources();\n \t\t\tInputStream iconInputStream = res.openRawResource(R.raw.icons);\n \t\t\tZipInputStream zipStream = new ZipInputStream(iconInputStream);\n \t\t ZipEntry entry;\n\n \t\t while ((entry = zipStream.getNextEntry()) != null) {\n \t\t \t//file name may start with MACOSX. This is strange, ignore it.\n \t\t \tString fileName = entry.getName();\n \t\t \tif(fileName.length() > 1){\n\t \t\t \tif(fileName.contains(\".png\") && !entry.isDirectory()){\n\t \t\t \t\tif(!fileName.contains(\"MACOSX\")){ //OSX adds junk sometimes, ignore it\n\t \t\t \t\t\tfileName = fileName.replace(\"icons/\",\"\");\n\t \t\t \t\t\tBitmap iconBitmap = BitmapFactory.decodeStream(zipStream); \n\t \t\t \t\t\troot_iconsFileNames.add(fileName);\n\t \t\t \t\t\troot_iconsBitmaps.add(iconBitmap);\n\t \t\t \t\t\t//Log.i(\"ZZ\", \"loading bitmaps: \" + fileName); \n\t \t\t \t\t}\n\t \t\t \t} //macosx\n\t \t\t } // fileName\n \t\t }//end while\n \t\t \n \t\t //clean up\n \t\t if(zipStream != null){\n \t\t \tzipStream.close();\n \t\t }\n \t\t \n \t\t}catch(Exception ex){\n \t\t\t Log.i(\"ZZ\", \"getZippedIcon: \" + ex.toString()); \n \t\t}\t \n\t }",
"private BufferedImage loadPic(String name) {\n\t\tBufferedImage pic=null;\n\t\ttry {\n\t\t\tpic = ImageIO.read(new File(\"store/\"+name));\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tSystem.out.println(ex);\n\t\t}\n\t\treturn pic;\n\t}",
"public void createHashMap() {\n myList = new HashMap<>();\n scrabbleList = new HashMap<>();\n }",
"@Override\n\tpublic List<URL> getPhotos() {\n\t\timages.clear(); //vide la liste des images\n\t\t\n\t\t\n\t\tList<URL> allImagesURL = new ArrayList<URL>();\n\t\t\n\t\t/* On initialise la liste de toutes les images */\n\t\tList<String> filelocations = null;\n\t\t\n\t\t/*Nous allons retrouver les fichiers images présent dans le répertoire et tous ses sous-répertoires*/\n\t\tPath start = Paths.get(path); //détermine le point de départ \n\t\ttry (Stream<Path> stream = Files.walk(start, Integer.MAX_VALUE)) {\n\t\t filelocations = stream\n\t\t .map(String::valueOf) //transforme les Path en string\n\t\t .filter(filename -> filename.contains(\".jpg\") || filename.contains(\".png\")) //ne prend que les images jpg et png\n\t\t .collect(Collectors.toList());\n\t\t \n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t/* Pour chaque fichier retrouvé, on essaie de retrouver son chemin absolu pour le stocker dans le allImagesURL */\n\t\tfor (String filelocation : filelocations) {\n\t\t\tString relativeLocation = filelocation.replace(path+\"/\", \"\"); // Pour ne pas partir de src mais de la classe courante\n\t\t\trelativeLocation = relativeLocation.replace(windowspath+\"\\\\\", \"\");\n\t\t\tallImagesURL.add(this.getClass().getResource(relativeLocation)); //on ajoute le chemin absolu dans la liste\n\t\t}\n\t\t\n\t\t\n\t\treturn allImagesURL; //on retourne la liste\n\t}",
"@Override\n public int hashCode() {\n return Objects.hash(filePath);\n }",
"public static void load(){\n\t\trobot=new BufferedImage[5];\n\t\ttry {\n\t\t\tfor(int i=0;i<5;i++)\n\t\t\t\trobot[i]=ImageIO.read(new File(\"robot\" + i +\".png\"));\n\t\t\t\n\t\t\tminiRobot=ImageIO.read(new File(\"miniRobot.png\"));\n\t\t\toil=ImageIO.read(new File(\"oil.png\"));\n\t\t\tslime=ImageIO.read(new File(\"slime.png\"));\n\t\t\tmap=ImageIO.read(new File(\"map.png\"));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e + \"Failed to load images\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}",
"public HashMap<String, InputStream> getSprites() {\n\t\treturn getFilesByPath(simulationConfig.getString(\"spritepath\"));\n\t}",
"public ImageIcon getImage(String key) throws IOException\n\t{\n\t\tif(map == null)\n\t\t{\n\t\t\tcreateHash();\n\t\t}\n\t\t\n\t\treturn(map.get(key));\n\t}",
"public static void loadImages(){\n\t\tsetPath(main.getShop().inventory.getEquipID());\n\t\ttry {\n\t\t\tbackground = ImageIO.read(new File(\"res/world/bg.png\"));\n\t\t\tterrain = ImageIO.read(new File(\"res/world/solids.png\"));\n\t\t\t// Character and Armour\n\t\t\tcharacters = ImageIO.read(new File(\"res/world/char3.png\"));\n\t\t\tcharactersHead =ImageIO.read(new File(\"res/world/charhead\"+path[0]+\".png\"));\n\t\t\tcharactersTop = ImageIO.read(new File(\"res/world/chartop\"+path[2]+\".png\"));\n\t\t\tcharactersShoulder = ImageIO.read(new File(\"res/world/charshoulders\"+path[3]+\".png\"));\n\t\t\tcharactersHand = ImageIO.read(new File(\"res/world/charhands\"+path[5]+\".png\"));\n\t\t\tcharactersBottom = ImageIO.read(new File(\"res/world/charbottom\"+path[8]+\".png\"));\n\t\t\tcharactersShoes = ImageIO.read(new File(\"res/world/charshoes\"+path[9]+\".png\"));\n\t\t\tcharactersBelt = ImageIO.read(new File(\"res/world/charBelt\"+path[4]+\".png\"));\n\n\t\t\tweaponBow = ImageIO.read(new File(\"res/world/bow.png\"));\n\t\t\tweaponArrow = ImageIO.read(new File(\"res/world/arrow.png\"));\n\t\t\tweaponSword = ImageIO.read(new File(\"res/world/sword.png\"));\n\t\t\titems = ImageIO.read(new File(\"res/world/items.png\"));\n\t\t\tnpc = ImageIO.read(new File(\"res/world/npc.png\"));\n\t\t\thealth = ImageIO.read(new File(\"res/world/health.png\"));\n\t\t\tenemies = ImageIO.read(new File(\"res/world/enemies.png\"));\n\t\t\tcoin = ImageIO.read(new File(\"res/world/coin.png\"));\n\t\t\tmana = ImageIO.read(new File(\"res/world/mana.gif\"));\n\t\t\tarrowP = ImageIO.read(new File(\"res/world/arrowP.png\"));\n\t\t\tbutton = ImageIO.read(new File(\"res/world/button.png\"));\n\t\t\tblood = ImageIO.read(new File(\"res/world/blood.png\"));\n\t\t\tarrowDisp = ImageIO.read(new File(\"res/world/arrowDisp.png\"));\n\t\t\tboss1 = ImageIO.read(new File(\"res/world/boss1.png\"));\n\t\t\tmagic = ImageIO.read(new File(\"res/world/magic.png\"));\n\t\t\tmainMenu = ImageIO.read(new File(\"res/world/MainMenu.png\"));\n\t\t\tinstructions = ImageIO.read(new File(\"res/world/instructions.png\"));\n\t\t\trespawn = ImageIO.read(new File(\"res/world/respawn.png\"));\n\t\t\tinventory = ImageIO.read(new File(\"res/world/inventory.png\"));\n shop = ImageIO.read(new File(\"res/world/shop.png\"));\n dizzy = ImageIO.read(new File(\"res/world/dizzy.png\"));\n pet = ImageIO.read(new File(\"res/world/pet.png\"));\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error Loading Images\");\n\t\t}\n\t}",
"private static void initFileNames() {\n if (fileNames == null) {\n fileNames = new HashMap<>();\n }\n fileNames.put(\"Linked List (simple)\", \"MySimpleLinkedList\");\n fileNames.put(\"Linked List\", \"MyLinkedList\");\n fileNames.put(\"Stack\", \"MyStack\");\n fileNames.put(\"Queue\", \"MyArrayDeque\");\n fileNames.put(\"Graph\", \"MyGraph\");\n fileNames.put(\"HashTable\", \"MyHashTable\");\n fileNames.put(\"Linear Search\", \"Algorithms\");\n fileNames.put(\"Binary Search\", \"Algorithms\");\n fileNames.put(\"Bubble Sort\", \"Algorithms\");\n fileNames.put(\"Insertion Sort\", \"Algorithms\");\n fileNames.put(\"Selection Sort\", \"Algorithms\");\n fileNames.put(\"Shell Sort\", \"Algorithms\");\n fileNames.put(\"Merge Sort\", \"Algorithms\");\n fileNames.put(\"Merge Sort (in-place)\", \"Algorithms\");\n fileNames.put(\"Quick Sort\", \"Algorithms\");\n }",
"public FileEntry(CarData carData, List<FileCarImage> carImages) {\n this.carData = carData;\n this.carImages = carImages;\n }",
"Map<String, Object> getTempStorage();",
"public FileServer (Map<String, String> filePath){\n\t\tthis.filePath = new ConcurrentHashMap<String, String>();\n\n\t\tfor(String filename : filePath.keySet()){\n\t\t\tthis.filePath.putIfAbsent(filename, filePath.get(filename));\n\t\t}\n\t\t\n\t}",
"public interface ResourcePaths {\n String imageFolderPath();\n String imageResourcePath();\n String videoFolderPath();\n String videoResourcePath();\n}",
"String getImagePath();",
"String getImagePath();",
"public HashMap<String, BufferedImage> getSprites() {\n \t\treturn sprites;\n \t}",
"public void refreshImages() {\n\t\tsetContentView(R.layout.activity_overview);\n\t\trow = 0;\n\t\tcolumn = 0;\n\t\t// Open the file\n\t\tFile file = new File(getFilesDir().getAbsoluteFile() + \"/photos.txt\");\n\t\tLog.i(TAG, file.getAbsolutePath());\n\t\t// If there is no file, create a new one\n\t\tif (!file.exists()) {\n\t\t\ttry {\n\t\t\t\tfile.createNewFile();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\t// Open an inputStream for reading the file\n\t\t\tFileInputStream inStream = openFileInput(\"photos.txt\");\n\t\t\tBufferedReader readFile = new BufferedReader(new InputStreamReader(inStream));\n\t\t\tpicturePaths = new ArrayList<String>();\n\t\t\tString receiveString = \"\";\n\t\t\t// Read in each line\n\t\t\twhile ((receiveString = readFile.readLine()) != null) {\n\t\t\t\t// Add the line to picturePaths and add an Image with the path specified\n\t\t\t\tpicturePaths.add(receiveString);\n\t\t\t\tLog.i(\"picture\", receiveString);\n\t\t\t\taddImage(receiveString);\n\t\t\t\treceiveString = \"\";\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void populateCachedImages(File dir)\n {\n if (dir.exists())\n {\n File[] files = dir.listFiles();\n for (int i = 0; i < files.length; i++)\n {\n File file = files[i];\n if (!file.isDirectory())\n {\n //Record all filenames from the cache so we know which photos to retrieve from database\n cachedFileNames.add(file.getName());\n imageList.add(file);\n }\n }\n }\n }",
"public Image getHotImage () {\r\n\tcheckWidget();\r\n\treturn hotImage;\r\n}",
"public void loadMapTiles(String[] paths) throws FileNotFoundException {\n\t\tthis.paths=paths;\n\t\tfor (int i = 0; i < tileMap.length; i++) {\n\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\n\t\t\t\tif (tileMap[i][j] < 0) {\n\t\t\t\t\ttiles[i][j] = null;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tTile tile = new Tile();\n\t\t\t\ttile.getPosition().setX(j*tileDimensions.getX());\n\t\t\t\ttile.getPosition().setY(i*tileDimensions.getY());\n\t\t\t\ttile.getDimensions().setX(tileDimensions.getX());\n\t\t\t\ttile.getDimensions().setY(tileDimensions.getY());\n\t\t\t\tFileInputStream fin = new FileInputStream(paths[tileMap[i][j]]);\n\t\t\t\tImage img = new Image(fin, tileDimensions.getX(), tileDimensions.getY(), false, false);\n\t\t\t\tSprite sprite = new Sprite(img);\n\t\t\t\ttile.setSprite(sprite);\n\t\t\t\ttiles[i][j] = tile;\n\t\t\t}\n\t\t}\n\t}",
"public Files(){\n this.fileNameArray.add(\"bridge_1.txt\");\n this.fileNameArray.add(\"bridge_2.txt\");\n this.fileNameArray.add(\"bridge_3.txt\");\n this.fileNameArray.add(\"bridge_4.txt\");\n this.fileNameArray.add(\"bridge_5.txt\");\n this.fileNameArray.add(\"bridge_6.txt\");\n this.fileNameArray.add(\"bridge_7.txt\");\n this.fileNameArray.add(\"bridge_8.txt\");\n this.fileNameArray.add(\"bridge_9.txt\");\n this.fileNameArray.add(\"ladder_1.txt\");\n this.fileNameArray.add(\"ladder_2.txt\");\n this.fileNameArray.add(\"ladder_3.txt\");\n this.fileNameArray.add(\"ladder_4.txt\");\n this.fileNameArray.add(\"ladder_5.txt\");\n this.fileNameArray.add(\"ladder_6.txt\");\n this.fileNameArray.add(\"ladder_7.txt\");\n this.fileNameArray.add(\"ladder_8.txt\");\n this.fileNameArray.add(\"ladder_9.txt\");\n }",
"public Map<MediaFileType, String> getArtworkUrls() {\n return artworkUrlMap;\n }",
"private Map<Integer, String> getDefaultImageMap(List<Book> bookList) {\n Map<Integer, String> defaultImageMap = new HashMap<Integer, String>();\n for(Book book : bookList) {\n int bookId = book.getBookId();\n DAOImage daoImage = new DAOImage();\n Image image = daoImage.getDefaultImageByBookId(bookId);\n\n if(image != null) {\n String defaultImagePath = image.getPath();\n defaultImageMap.put(bookId, defaultImagePath);\n } else {\n defaultImageMap.put(bookId, \"no_image.jpg\");\n }\n }\n return defaultImageMap;\n }",
"public void SaveState() {\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n temp_pictures[i][j] = pictures[i][j];\n\n }\n }\n }",
"private void init() {\n UNIGRAM = new HashMap<>();\n }",
"public void initImage() {\n if (isInited())\n return;\n //获取大图的游标\n Cursor cursor = context.getContentResolver().query(\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI, // 大图URI\n STORE_IMAGES, // 字段\n null, // No where clause\n null, // No where clause\n MediaStore.Images.Media.DATE_TAKEN + \" DESC\"); //根据时间升序\n Log.e(\"eeeeeeeeeeeeeeeeeee\", \"------cursor:\" + cursor);\n if (cursor == null)\n return;\n while (cursor.moveToNext()) {\n int id = cursor.getInt(0);//大图ID\n String path = cursor.getString(1);//大图路径\n LogTool.setLog(\"大图路径1\", path);\n File file = new File(path);\n //判断大图是否存在\n if (file.exists()) {\n //小图URI\n String thumbUri = getThumbnail(id, path);\n //获取大图URI\n String uri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI.buildUpon().\n appendPath(Integer.toString(id)).build().toString();\n LogTool.setLog(\"大图路径2\", uri);\n if (Tools.isEmpty(uri))\n continue;\n if (Tools.isEmpty(thumbUri))\n thumbUri = uri;\n //获取目录名\n String folder = file.getParentFile().getName();\n String appFile = context.getResources().getString(R.string.app_name);\n if (!folder.equals(appFile)) {\n LocalFile localFile = new LocalFile();\n localFile.setPath(path);\n localFile.setOriginalUri(uri);\n localFile.setThumbnailUri(thumbUri);\n int degree = cursor.getInt(2);\n if (degree != 0) {\n degree = degree + 180;\n }\n localFile.setOrientation(360 - degree);\n\n\n paths.add(localFile);\n\n\n //判断文件夹是否已经存在\n if (folders.containsKey(folder)) {\n folders.get(folder).add(localFile);\n } else {\n List<LocalFile> files = new ArrayList<>();\n files.add(localFile);\n folders.put(folder, files);\n }\n }\n }\n }\n folders.put(\"所有图片\", paths);\n cursor.close();\n isRunning = false;\n }",
"public String getImgKey() {\n return imgKey;\n }",
"@Override\n\tpublic int hashCode() {\n\t\treturn this.filePath.hashCode();\n\t}",
"static Multimap<String, File> createMapOfFiles(File folder) throws Exception {\n Multimap<String, File> map = ArrayListMultimap.create();\n return createMapOfFiles(folder, map);\n }"
] | [
"0.6732472",
"0.65222996",
"0.65149635",
"0.63795775",
"0.6119285",
"0.6093346",
"0.6067181",
"0.60136306",
"0.5985728",
"0.5976361",
"0.5939636",
"0.59195054",
"0.591777",
"0.59143347",
"0.5903173",
"0.58727443",
"0.58544993",
"0.5828164",
"0.5804291",
"0.58005303",
"0.5772252",
"0.5764544",
"0.5677426",
"0.5677426",
"0.5623703",
"0.56088537",
"0.5594458",
"0.55722886",
"0.5569364",
"0.5564677",
"0.55562925",
"0.55489135",
"0.5539685",
"0.5519558",
"0.55145746",
"0.5510943",
"0.5490892",
"0.54799837",
"0.5477646",
"0.54692507",
"0.54679084",
"0.5466676",
"0.5462775",
"0.545272",
"0.5448282",
"0.54253733",
"0.54253733",
"0.5425107",
"0.54078937",
"0.53782725",
"0.5377918",
"0.5363914",
"0.53530365",
"0.5332936",
"0.53316224",
"0.53305537",
"0.5327644",
"0.5318106",
"0.53132373",
"0.53129673",
"0.53024626",
"0.52977854",
"0.5288104",
"0.5287094",
"0.5277163",
"0.5276531",
"0.5271209",
"0.5266663",
"0.5262771",
"0.5262313",
"0.525488",
"0.5253133",
"0.52512",
"0.5250564",
"0.52342933",
"0.5232477",
"0.52296174",
"0.5215777",
"0.5201335",
"0.5200109",
"0.5189624",
"0.5186898",
"0.51846063",
"0.5179011",
"0.51754624",
"0.51754624",
"0.5173943",
"0.51738155",
"0.51670116",
"0.51564384",
"0.5156143",
"0.5153848",
"0.51530445",
"0.5151372",
"0.5149207",
"0.5143971",
"0.5143623",
"0.5138833",
"0.51322186",
"0.51319563"
] | 0.763249 | 0 |
TODO: Return the communication channel to the service. | @Override
public IBinder onBind(Intent intent) {
throw new UnsupportedOperationException("Not yet implemented");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Channel channel() {\n return channel;\n }",
"public IChannel getChannel() {\n\t\treturn message.getChannel();\n\t}",
"SocketChannel getChannel();",
"EzyChannel getChannel();",
"public Channel getChannel()\n {\n return channel;\n }",
"java.lang.String getChannel();",
"protected Channel getChannel()\n {\n return mChannel;\n }",
"@Override\n public int getChannel()\n {\n return channel;\n }",
"public SocketChannel getChannel() {\n return channel;\n }",
"public Channel getChannel()\n\t{\n\t\treturn channel;\n\t}",
"public Channel getChannel() {\n return channel;\n }",
"private ManagedChannel getManagedChannel() {\n return ManagedChannelBuilder.forAddress(\"localhost\", mGrpcPortNum)\n .usePlaintext()\n .build();\n }",
"public Channel getChannel() {\r\n\t\treturn channel;\r\n\t}",
"public int GetChannel();",
"public ChannelManager getChannelManager() {\n return channelMgr;\n }",
"public String getChannel() {\r\n return channel;\r\n }",
"public String getChannel() {\n return channel;\n }",
"public Channel getChannel() throws ConnectException\n {\n return getChannel(null);\n }",
"public Object getCommunicationChannel()\r\n\t\t\tthrows PersistenceMechanismException {\n\t\treturn null;\r\n\t}",
"public Channel channel()\r\n/* 36: */ {\r\n/* 37: 68 */ return this.channel;\r\n/* 38: */ }",
"public String getChannel() {\r\n\t\treturn this.channel;\r\n\t}",
"private SocketChannel getChannel(){\n if ( key == null ) {\n return getSocket().getChannel();\n } else {\n return (SocketChannel)key.channel();\n }\n }",
"public String getChannel() {\n\t\treturn channel;\n\t}",
"public String getChannel() {\n\t\treturn channel;\n\t}",
"public int getChannel() {\n return channel;\n }",
"public interface Channel\r\n{\r\n /**\r\n * Get a duplex connection for this channel. This method must be called for each request-response message exchange.\r\n * @param msgProps message specific properties\r\n * @param xmlOptions XML formatting options\r\n * @return connection\r\n * @throws IOException on I/O error\r\n * @throws WsConfigurationException on configuration error\r\n */\r\n DuplexConnection getDuplex(MessageProperties msgProps, XmlOptions xmlOptions) throws IOException, \r\n WsConfigurationException;\r\n \r\n /**\r\n * Get a send-only connection for this channel. This method must be called for each message to be sent without a\r\n * response.\r\n * @param msgProps message specific properties\r\n * @param xmlOptions XML formatting options\r\n * @return connection\r\n * @throws IOException on I/O error\r\n * @throws WsConfigurationException on configuration error\r\n */\r\n OutConnection getOutbound(MessageProperties msgProps, XmlOptions xmlOptions) throws IOException, \r\n WsConfigurationException;\r\n \r\n /**\r\n * Get a receive-only connection for this channel. This method must be called for each message to be received, and\r\n * will wait for a message to be available before returning.\r\n * \r\n * @return connection\r\n * @throws IOException on I/O error\r\n * @throws WsConfigurationException on configuration error\r\n */\r\n InConnection getInbound() throws IOException, WsConfigurationException;\r\n \r\n /**\r\n * Close the channel. Implementations should disconnect and free any resources allocated to the channel.\r\n * @throws IOException on I/O error\r\n */\r\n void close() throws IOException;\r\n}",
"public int getChannel() {\r\n\t\treturn channel;\r\n\t}",
"public Byte getChannel() {\n return channel;\n }",
"public SocketChannel getChannel() { return null; }",
"public ChannelFuture getChannelFuture() {\n return channelFuture;\n }",
"public interface ChannelsService {\n\n /**\n * Gets the Facebook data-ref to create send to messenger button.\n *\n * @param callback Callback with the result.\n */\n void createFbOptInState(@Nullable Callback<ComapiResult<String>> callback);\n }",
"private static ManagedChannel getManagedChannel(int port) {\n return ManagedChannelBuilder.forAddress(\"localhost\", port)\n .usePlaintext(true)\n .build();\n }",
"protected SocketChannel getSocket() {\n\t\treturn channel;\n\t}",
"public interface MessagingService {\n\n /**\n * Checks whether message receivers are registered for this channel.\n * \n * @param ccid the channel id\n * @return <code>true</code> if there are message receivers on this channel,\n * <code>false</code> if not.\n */\n boolean hasMessageReceiver(String ccid);\n\n /**\n * Passes the message to the registered message receiver.\n * \n * @param ccid the channel to pass the message on\n * @param serializedMessage the message to send (serialized SMRF message)\n */\n void passMessageToReceiver(String ccid, byte[] serializedMessage);\n\n /**\n * Check whether the messaging component is responsible to send messages on\n * this channel.<br>\n * \n * In scenarios with only one messaging component, this will always return\n * <code>true</code>. In scenarios in which channels are assigned to several\n * messaging components, only the component that the channel was assigned\n * to, returns <code>true</code>.\n * \n * @param ccid\n * the channel ID or cluster controller ID, respectively.\n * @return <code>true</code> if the messaging component is responsible for\n * forwarding messages on this channel, <code>false</code>\n * otherwise.\n */\n boolean isAssignedForChannel(String ccid);\n\n /**\n * Check whether the messaging component was responsible before but the\n * channel has been assigned to a new messaging component in the mean time.\n * \n * @param ccid the channel id\n * @return <code>true</code> if the messaging component was responsible\n * before but isn't any more, <code>false</code> if it either never\n * was responsible or still is responsible.\n */\n boolean hasChannelAssignmentMoved(String ccid);\n}",
"org.apache.drill.exec.proto.UserBitShared.RpcChannel getChannel();",
"public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\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 channel_ = s;\n return s;\n }\n }",
"public final int getChannel() {\n return device.getChannel();\n }",
"public String getChannelName()\r\n\t{\r\n\t\treturn this.sChannelName;\r\n\t}",
"public ChannelLogger getChannelLogger() {\n return this.channelLogger;\n }",
"public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\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 channel_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n channel_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public NotificationsChannel getChannel(String channelId) throws Exception;",
"java.lang.String getChannelName();",
"public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n channel_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public TextChannel getSupportChannel() { return supportChannel; }",
"public ChannelLocator getChannelLocator();",
"com.google.protobuf.ByteString\n getChannelBytes();",
"private SmartCardChannel getChannel() throws UsbDeviceException, NotAvailableUSBDeviceException{\n\t\tif(this.channel != null){\n\t\t\treturn this.channel;\n\t\t}\n\t\tif(getUsbInterface() != null){\n\t\t\tif (!getUsbDeviceConnection().claimInterface(getUsbInterface(), true)) {\n\t\t\t\tthrow new NotAvailableUSBDeviceException(\"Imposible acceder al interfaz del dispositivo USB\"); //$NON-NLS-1$\n\t\t\t}\n\t\t\tthis.channel = new SmartCardChannel(getUsbDeviceConnection(), getUsbInterface());\n\t\t\treturn this.channel;\n\t\t}\n\t\tthrow new UsbDeviceException(\"usbInterface cannot be NULL\"); //$NON-NLS-1$\n\t}",
"public String getChannel() {\n if(this.isRFC2812())\n return this.getNumericArg(1);\n else\n return this.getNumericArg(0);\n }",
"@PreAuthorize(\"hasRole('superman')\")\n\tpublic abstract Channel getChannel(String name);",
"public interface Channels {\n \n public void createChannel();\n\n}",
"public int getChannelId( ) {\r\n return channelId;\r\n }",
"public String getChannelId()\n {\n return channelId;\n }",
"public Channel method_4090() {\n return null;\n }",
"public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@Override\n\tpublic int getChannel() {\n\t\treturn super.getDeviceID();\n\t}",
"public interface ChannelServiceI {\r\n Channel createChannel(Channel channel);\r\n\r\n int updateChannelUser(int id);\r\n\r\n int minusChannelUser(int id);\r\n\r\n List<Channel> getChannelPage(Channel channel);\r\n\r\n int count();\r\n\r\n Channel getChannel(String channelToken);\r\n\r\n List<Channel> getUserChannel(Channel channel);\r\n\r\n int deleteUser(Integer id);\r\n\r\n List<Channel> getUserChannelTotal(Channel channel);\r\n\r\n int updateChannel(Channel channel);\r\n}",
"protected Channel connect() {\n\t\t\tif (channel == null) {\n\t\t\t\tinit();\n\t\t\t}\n\t\t\tSystem.out.println(\"channel === \"+channel);\n\t\t\tif (channel.isDone() && channel.isSuccess())\n\t\t\t\treturn channel.channel();\n\t\t\telse\n\t\t\t\tthrow new RuntimeException(\"Not able to establish connection to server\");\n\t\t}",
"public abstract ManagedChannelBuilder<?> delegate();",
"public io.grpc.channelz.v1.Channel getChannel(int index) {\n if (channelBuilder_ == null) {\n return channel_.get(index);\n } else {\n return channelBuilder_.getMessage(index);\n }\n }",
"public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"java.lang.String getChannelToken();",
"java.lang.String getChannelToken();",
"public String getChannelId()\r\n\t{\r\n\t\treturn this.sChannelId;\r\n\t}",
"String getServerConnectionChannelName();",
"public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@Bean\n\tpublic DirectChannel requestChooserOutputChannel() {\n\t\treturn MessageChannels.direct().get();\n\t}",
"public ManagedChannelBuilder<?> delegate() {\n return this.delegateBuilder;\n }",
"@Override\n public ScheduledExecutorService getSchedExecService() {\n return channelExecutor;\n }",
"@objid (\"1bb2731c-131f-497d-9749-1f4f1e705acb\")\n Link getChannel();",
"private ManagedChannel emulatedPubSubChannel() {\n if (!useEmulator) {\n throw new RuntimeException(\"You shouldn't be calling this when using the real \"\n + \"(non-emulator) implementation\");\n }\n String hostport = System.getenv(\"PUBSUB_EMULATOR_HOST\");\n return ManagedChannelBuilder.forTarget(hostport).usePlaintext().build();\n }",
"public String getChannelId() {\n return channelId;\n }",
"public Channel method_4112() {\n return null;\n }",
"public Channel method_4121() {\n return null;\n }",
"public SodiumChannel getSodiumChannel() {\n\t\t\treturn sodiumChannel;\n\t\t}",
"public interface ChannelManager {\n int createChannel(String channel, long ttlInSeconds);\n int publishToChannel(String channel, String msg);\n}",
"public interface ChannelConnection {\n public Channel getChannel();\n public Connector getConnector();\n}",
"public io.grpc.channelz.v1.Channel getChannel(int index) {\n return channel_.get(index);\n }",
"public ChannelType getChannelType() {\n return type;\n }",
"@Override\n\tprotected void channelRead0(ChannelHandlerContext ctx, WsClientMessage msg) throws Exception {\n\t}",
"public interface ChatPlayerService extends PlayerService, Chatter\n{\n /**\n * Sets the player's ChatTarget focus.\n * \n * @param focus The new ChatTarget to focus\n */\n void setFocus( ChatTarget focus );\n \n /**\n * Gets the player's current focus.\n * \n * @return The channel the player has focused\n */\n ChatTarget getFocus();\n \n /**\n * Gets the player's BaseComponent name.\n * \n * @return The player's BaseComponent name.\n */\n BaseComponent getComponentName();\n \n /**\n * Gets the ChatManagerImpl.\n * \n * @return The ChatManagerImpl instance\n */\n ChatManager getChatManager();\n \n /**\n * Gets the PrivateMessageTarget from the last inbound PM.\n * \n * @return The PrivateMessageTarget from the last PM received\n */\n PrivateMessageTarget getLastInboundWhisperTarget();\n \n /**\n * Sets the most recent inbound PM's PrivateMessageTarget.\n * \n * @param lastInboundWhisperTarget The new target.\n * @return This ChatPlayerService object.\n */\n ChatPlayerService setLastInboundWhisperTarget( PrivateMessageTarget lastInboundWhisperTarget );\n \n /**\n * Gets a formatted message to show all of the channels the\n * player is currently in.\n * \n * @return A formatted message showing the channels the player is in.\n */\n BaseComponent[] getChannelsJoinedMessage();\n}",
"public String getSubChannel() {\r\n\t\treturn this.subChannel;\r\n\t}",
"public String getChannelId() {\n\t\treturn channelId;\n\t}",
"public ReadableByteChannel getByteChannel() throws IOException {\n InputStream source = getInputStream();\n \n if(source != null) {\n return Channels.newChannel(source);\n }\n return null;\n }",
"public DmaChannel getChannelAt(int i);",
"public interface MessageInputChannel extends\r\n Channel<MessageInput, MessageInputChannelAPI>, OneDimensional, MessageCallback {\r\n\r\n}",
"public int getChannelType( ) {\r\n return 1;\r\n }",
"public interface IRemoteMessageService {\n\n void unsubscribeToMessage(UnSubscribeToMessage cmd);\n\n /**\n * Sets a message element to a specified value\n */\n void setElementValue(SetElementValue cmd);\n\n void zeroizeElement(ZeroizeElement cmd);\n\n /**\n * Notifies service to send message updates to the specified ip address\n */\n SubscriptionDetails subscribeToMessage(SubscribeToMessage cmd);\n\n Set<? extends DataType> getAvailablePhysicalTypes();\n\n boolean startRecording(RecordCommand cmd);\n\n InetSocketAddress getRecorderSocketAddress();\n\n InetSocketAddress getMsgUpdateSocketAddress();\n\n void stopRecording();\n\n void terminateService();\n\n void reset();\n\n void setupRecorder(IMessageEntryFactory factory);\n\n public Map<String, Throwable> getCancelledSubscriptions();\n}",
"@Test\n\tpublic void testChannel() {\n\t\tString requestXml =\n\t\t\t\t\"<FahrenheitToCelsius xmlns=\\\"http://www.w3schools.com/webservices/\\\">\" +\n\t\t\t\t\" <Fahrenheit>55</Fahrenheit>\" +\n\t\t\t\t\"</FahrenheitToCelsius>\";\n\n\t\t// Create the Message object\n\t\tMessage<String> message = MessageBuilder.withPayload(requestXml).build();\n\n\t\t// Send the Message to the handler's input channel\n\t\t//MessageChannel channel = channelResolver.resolveChannelName(\"fahrenheitChannel\");\n\t\tchannel.send(message);\n\t}",
"public Message getMessageWizardChannel() {\n\t\tMessage temp = null;\n\t\t\n\t\ttry {\n\t\t\t//se ia mesajul din buffer\n\t\t\ttemp = bufferWizardChannel.take();\t\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn temp;\n\t\t\n\t}",
"public MessageChannel getGameChannel() {\r\n\t\treturn gameChannel;\r\n\t}",
"public Message getMessageWizardChannel() {\n\t\tMessage msg1=null;\n\t\ttry{\n\t\t\tmsg1=chann1.take();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn msg1;\n\t}",
"void start(Channel channel, Object msg);",
"@Override\n\tpublic String getChannelId()\n\t{\n\t\treturn null;\n\t}",
"public String getChannelCode() {\n return channelCode;\n }",
"byte[] getChannelCommand() throws IOException {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n baos.write(rgbCommand(r, g, b));\n baos.write(wwcwCommand(ww, cw));\n return baos.toByteArray();\n }",
"java.lang.String getChannelId();",
"protected Channel createChannel() throws IOException, TimeoutException, NoSuchAlgorithmException {\n LOGGER.debug(\"Creating channel\");\n Channel channel = connectionProducer.getConnection(config).createChannel();\n LOGGER.debug(\"Created channel\");\n return channel;\n }",
"public org.apache.axis.types.UnsignedInt getChannel() {\n return channel;\n }",
"public interface SendService {\n\n public void sendMessage(RemotingCommand remotingCommand, long timeout);\n}"
] | [
"0.7437254",
"0.73157257",
"0.7183302",
"0.7135984",
"0.7129005",
"0.71285546",
"0.7090409",
"0.7070889",
"0.7067624",
"0.7038997",
"0.6988283",
"0.6917885",
"0.68884337",
"0.67946744",
"0.67914945",
"0.67852235",
"0.677885",
"0.674656",
"0.67354923",
"0.6681876",
"0.66714543",
"0.6667951",
"0.6658963",
"0.6658963",
"0.6637923",
"0.65924364",
"0.6589948",
"0.65803987",
"0.65801334",
"0.656291",
"0.6394705",
"0.6370899",
"0.6364142",
"0.6360486",
"0.63541204",
"0.63400555",
"0.6295168",
"0.62838054",
"0.6278035",
"0.6249136",
"0.62438136",
"0.62114525",
"0.6202571",
"0.6174055",
"0.6163322",
"0.61605746",
"0.6151532",
"0.614542",
"0.6134949",
"0.61321455",
"0.60943747",
"0.6087775",
"0.60815173",
"0.60634476",
"0.6059933",
"0.60573",
"0.6053354",
"0.6047734",
"0.60389555",
"0.6030655",
"0.6022905",
"0.60092485",
"0.6005142",
"0.6005142",
"0.60051006",
"0.60014427",
"0.6001328",
"0.5996678",
"0.59943444",
"0.59914345",
"0.59837997",
"0.5970838",
"0.59568334",
"0.5928881",
"0.5895364",
"0.58861846",
"0.58624125",
"0.5857131",
"0.58528924",
"0.581504",
"0.581163",
"0.58108175",
"0.58004445",
"0.57914156",
"0.57894915",
"0.578917",
"0.5776858",
"0.57738584",
"0.576785",
"0.57609695",
"0.5759547",
"0.5758005",
"0.57573795",
"0.5743325",
"0.5738268",
"0.5733163",
"0.57316715",
"0.5726644",
"0.5715349",
"0.57023185",
"0.5701523"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void largeSize() {
System.out.println("Large size photo completed");
} | {
"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 date() {
System.out.println("10/19/21");
} | {
"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}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
] | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.