query
stringlengths 8
1.54M
| document
stringlengths 9
312k
| negatives
sequencelengths 19
20
| metadata
dict |
---|---|---|---|
Sets the value of the allowPaymentEdit property. | public void setAllowPaymentEdit(boolean value) {
this.allowPaymentEdit = value;
} | [
"public void setAllowpaymentedit(String allowpaymentedit) {\r\n this.allowpaymentedit = allowpaymentedit == null ? null : allowpaymentedit.trim();\r\n }",
"public boolean isAllowPaymentEdit() {\n return allowPaymentEdit;\n }",
"public void setAllowInvoiceEdit(java.lang.Boolean allowInvoiceEdit) {\n this.allowInvoiceEdit = allowInvoiceEdit;\n }",
"public String getAllowpaymentedit() {\r\n return allowpaymentedit;\r\n }",
"public void setAllowEditCost(boolean allowEditCost) {\n this.allowEditCost = allowEditCost;\n }",
"public void setEdit(java.lang.Boolean edit) {\n this.edit = edit;\n }",
"public void setKpiEditEnabled(final boolean kpiEditEnabled) {\n this.kpiEditEnabled = kpiEditEnabled;\n }",
"public void setAllowUserEditing(boolean allowUserEditing) {\n\n if (this.allowUserEditing && !allowUserEditing) {\n unregisterKeys();\n\n this.allowUserEditing = false;\n }\n else if (!this.allowUserEditing && allowUserEditing) {\n registerKeys();\n\n this.allowUserEditing = true;\n }\n }",
"public java.lang.Boolean getAllowInvoiceEdit() {\n return allowInvoiceEdit;\n }",
"public void setEditing( boolean b ) { editing = b; }",
"public void setEditFlag(Boolean editFlag) {\n this.editFlag = editFlag;\n }",
"public void setEditingValue(boolean editing) {\n\t\tthis.editingValue = editing;\n\t}",
"void setEditButtonEnabled(boolean isEnabled);",
"public com.softserveinc.cross_api_objects.avro.AvroUserBookPaymentAction.Builder setPayment(java.lang.CharSequence value) {\n validate(fields()[3], value);\n this.payment = value;\n fieldSetFlags()[3] = true;\n return this;\n }",
"public void setEditFlag(int editFlag) {\r\n this.editFlag = editFlag;\r\n }",
"public void setEditable(boolean value) {\n this.editable = value;\n }",
"public void setEditable(boolean value) {\n editable = value;\n }",
"public com.diviso.graeshoppe.order.avro.Order.Builder setPaymentMode(java.lang.String value) {\n validate(fields()[8], value);\n this.paymentMode = value;\n fieldSetFlags()[8] = true;\n return this;\n }",
"public void setEditable(boolean b) { _editable = b; }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the value related to the column: inj_detail_vagina | public void setInjDetailVagina (java.lang.String injDetailVagina) {
this.injDetailVagina = injDetailVagina;
} | [
"public void setVaginaInjDetail (java.lang.String vaginaInjDetail) {\n\t\tthis.vaginaInjDetail = vaginaInjDetail;\n\t}",
"public java.lang.String getInjDetailVagina () {\n\t\treturn injDetailVagina;\n\t}",
"public java.lang.String getVaginaInjDetail () {\n\t\treturn vaginaInjDetail;\n\t}",
"public void setVigencia(int value) {\n this.vigencia = value;\n }",
"public void setMauzaLibrDetail(Number value) {\r\n setAttributeInternal(MAUZALIBRDETAIL, value);\r\n }",
"public void setVida(int iVida) {\r\n this.iVida = iVida;\r\n }",
"public void setValue(V v) {\n\tvalor=v;\n }",
"public void setVillageLibrDetail(Number value) {\r\n setAttributeInternal(VILLAGELIBRDETAIL, value);\r\n }",
"public void setINDICA(String newvalue) {\n fieldINDICA.setString(newvalue);\n }",
"public void setIva(int iva) {\n\t\tproducto.setIva(iva);\n\t}",
"public void setItVatInvoice(int value) {\n this.itVatInvoice = value;\n }",
"public void setIrudia(String irudia);",
"public void setIva(Double iva) {\n this.iva = iva;\n }",
"public void setNhanvienManv(String aManv) {\n if (getNhanvien() == null) {\n tempNhanvienManv = aManv;\n } else {\n getNhanvien().setManv(aManv);\n }\n }",
"public void setPossalesdetailid(Integer possalesdetailid) {\r\n this.possalesdetailid = possalesdetailid;\r\n }",
"public void setIVA(Double IVA) {\n this.IVA = IVA;\n }",
"public void setDJAI_V(DJAI_LV djai_LV){\r\n\t\tthis.DJAI_V = DJAI_V;\r\n\t}",
"public abstract void setPs_vigente(java.lang.Short newPs_vigente);",
"public void setIdVenta(Integer idVenta) {\r\n this.idVenta = idVenta;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form EditThreadsPage | public EditThreadsPage() {
initComponents();
oldthreadname = SelectThreadPage.threadname;
client = new Client();
} | [
"private void editBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editBtnActionPerformed\n //getting the selected item from the list of threads\n String selectedListItem = chatList.getSelectedValue();\n \n //new chatthread list from the server\n List<ChatThread> chatThreadListVal=chatThreadList();\n //looping each chat thread\n for(ChatThread cT:chatThreadListVal){\n //get chat thread if equals to the selectedListItem\n if(selectedListItem.contains(cT.getThreadTitle())){\n JOptionPane.showMessageDialog(rootPane, \"Editing \"+cT.getThreadTitle()+\" Thread\");\n \n //create new thread page\n new EditThread(loggedUser,cT.getThreadId(),cT.getThreadTitle()).setVisible(true);\n //closes the current window\n this.dispose();\n //break the loop if not it will interfere with the result\n break;\n }\n }\n \n }",
"private void newChatBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newChatBtnActionPerformed\n \n //create new thread page\n new AddChatThread(loggedUser).setVisible(true);\n //closes the current window\n this.dispose();\n \n }",
"public SelectThreadPage() {\n initComponents();\n tbm = (DefaultTableModel) tblthread.getModel();\n isrun = true;\n oldcount = 0;\n client = new Client();\n loadThread();\n }",
"private void createTask() {\n\n if (editFragment == null) {\n //smartphone layout, start a new activity for editing a task\n Intent intent = new Intent(MainActivityYeSimplistic.this, EditTaskActivity.class);\n intent.putExtra(AppController.INTENT_EXTRA_TASK_LIST_POSITION, tasks.size());\n startActivity(intent);\n }else{\n //tablet layout, update the editFragment\n Task newTask = new Task(\"\");\n newTask.setListPosition(tasks.size());\n editFragment.setTask(newTask);\n ActionBar actionBar = getSupportActionBar();\n if(actionBar != null) actionBar.setTitle(\"New task\");\n }\n }",
"public EditHarvestSitePage() {\n }",
"protected void newPost() {\n\t\tIntent intent = new Intent(this, EditTopicActivity.class);\n\t\tintent.putExtra(EditPostActivity.IS_NEW, true);\n\n\t\tstartActivity(intent);\n\t}",
"int addThread(String name, int catID, int authID);",
"public NewProjectCreationPage(String pageName) {\n super(pageName);\n setPageComplete(false);\n }",
"public EditTasks() {\n initComponents();\n \n }",
"private void editPost(View v) {\r\n \tIntent viewIntent = new Intent(View_Thread.this, Edit_Post.class);\r\n \tBundle threadData = new Bundle();\r\n \tthreadData.putString(\"ID\", Integer.toString(v.getId()));\r\n \tthreadData.putString(\"Thread_ID\", currentThreadID);\r\n \tviewIntent.putExtras(threadData);\r\n \tView_Thread.this.startActivityForResult(viewIntent,Helper.EDIT_REQUEST_CODE);\r\n }",
"public EditBoardThreadRequest editBoardThreadRequest() {\n\n return new EditBoardThreadRequest(title, statement, boardId, locked, id);\n }",
"public void buttonClick(ClickEvent event) {\n\t\t\t\tFormWindow editTask = new FormWindow(task, false, taskList);\n\t\t\t\tUI.getCurrent().addWindow(editTask);\n\t\t\t}",
"@RequestMapping(value = \"/addNewThread\",\n\t\t\tmethod = RequestMethod.POST)\n\tpublic ResponseEntity<String> recvAddThreadRequest(@RequestHeader(value = \"Authorization\", required=false) String sessionKey,\n\t\t\t@RequestBody Map<String, String> tData)\n\t{\n\t\t// Validate client's session key\n\t\tif (!DatabaseAPI.getInstance().validateSessionKey(tData.get(\"userId\"), sessionKey))\n\t\t\treturn new ResponseEntity<>(\"INVALID SESSION KEY\", HttpStatus.NETWORK_AUTHENTICATION_REQUIRED);\n\t\t\n\t\t// Add thread to database\n\t\tif (DatabaseAPI.getInstance().addThread_safe(tData.get(\"title\"), tData.get(\"content\"), tData.get(\"userId\")))\n\t\t\treturn new ResponseEntity<>(\"Thread Submitted\", HttpStatus.OK);\n\t\telse\n\t\t\t// Fail to add new thread to database\n\t\t\treturn new ResponseEntity<>(\"DATABASE ERROR\", HttpStatus.BAD_GATEWAY);\n\t\t\n\t\t// Client should display success message and refresh page by requesting for the thread content again\n\t}",
"public ThreadListAdapter createThreadAdapter(int threadid, ThreadDisplayFragment display, int page) {\n \t\tThreadListAdapter ad = new ThreadListAdapter(threadid, display, page);\n \t\tfragments.add(ad);\n \t\treturn ad;\n \t}",
"private void createNetworkManagementFileEditor() {\n\n try {\n\n ntwrkMgmteditorPage = new NetworkManagementEditorPage(this, getTitle(), getDocumentRoot());\n int index = this.addPage(ntwrkMgmteditorPage, getEditorInput());\n setPageText(index, DeviceDescriptionFileEditor.NETWORK_MANAGEMENT_EDITOR_PAGE_NAME);\n ntwrkMgmteditorPage.setIndex(index);\n\n } catch (PartInitException e) {\n ErrorDialog.openError(getSite().getShell(), null,\n DeviceDescriptionFileEditor.PROJECT_EDITOR_CREATION_ERROR_MESSAGE, e.getStatus());\n e.printStackTrace();\n }\n }",
"public Thread seeThread(int number) throws IOException{\n Thread chosenThread = getThread(number);\n ServerUpdate.seeThread(chosenThread.getId());\n chosenThread.increaseViews();\n\n return chosenThread;\n }",
"public DelhiWaitListPage() {\n initComponents();\n }",
"private void createPost() {\n //initializes intent for EditPostActivity\n Intent CreatePostIntent = new Intent(this, EditPostActivity.class);\n //using startActivityForResult for getting an intent with info for new activity\n startActivityForResult(CreatePostIntent, 1);\n }",
"@Override\n public void onClick(View view)\n {\n ThreadFragment fragment = new ThreadFragment();\n fragment.setThread(thread, thread.getLastPage());\n MainActivity.swapFragment(fragment, true);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update the text in the status label GUI component. | private void updateStatus(final String statusText) {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
statusLabel.setText(statusText);
}
});
} | [
"private void updateStatus(String text)\n\t{\n\t\tlblStatusLine.setText( text );\n\t}",
"private void updateStatusLabel()\n {\n StringBuilder status = new StringBuilder(_status);\n if (!_displayError) {\n for (int ii = 0; ii < _statusDots; ii++) {\n status.append(\" .\");\n }\n }\n _newlab = createLabel(status.toString(), new Color(_ifc.statusText, true));\n // set the width of the label to the width specified\n int width = _ifc.status.width;\n if (width == 0) {\n // unless we had trouble reading that width, in which case use the entire window\n width = getWidth();\n }\n // but the window itself might not be initialized and have a width of 0\n if (width > 0) {\n _newlab.setTargetWidth(width);\n }\n repaint();\n }",
"public void updateStatus() {\n title.setBackground(worker.getStatusColor());\n status.setText(worker.getStatusText());\n info.setText(worker.getInfoText());\n currentAction.setText(worker.getActionText());\n }",
"private void updateStatusText() {\r\n float v = cube.getLinearVelocity().length();\r\n float omega = cube.getAngularVelocity().length();\r\n String message = String.format(\" v=%f psu/s, omega=%f rad/s\", v, omega);\r\n statusText.setText(message);\r\n }",
"public void setStatusText(String s) {\n statusLabel.setText(s);\n }",
"private synchronized void updateStatusText(String newText) {\n if (newText != null) {\n mStatusTextRaw = newText;\n }\n StringBuilder sb = new StringBuilder();\n sb.append(mStatusTextRaw);\n sb.append(\" (\");\n for (int i = 0; i < mSpinDots; i++) {\n sb.append('.');\n }\n sb.append(')');\n final String nextText = sb.toString();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mStatusTextView.setText(nextText);\n }\n });\n }",
"@Override\n protected void onProgressUpdate(String... values) {\n labelStatus.setText(values[0]);\n }",
"public void update() {\r\n lblNickname.setText(statusFormat(this.nickName, this.status));\r\n lblMsn.setText(this.signature);\r\n }",
"public void updateLabel()\r\n\t{\r\n\t\tm_label.setText(\"#\" + m_nIndex + \" \" + m_fraction.getDelayMillis() + \" ms\");\r\n\t}",
"public final void setStatusLabelText(final String text) {\n\t\tstatusLabel.setText(text);\n\t}",
"public void showStatusLabel(String text) {\n\t\tthis.statusLabel.setText(text);\n\t\tthis.statusLabel.setVisible(true);\n\t}",
"private void updateLabel() {\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n label.setText(\"Done.\");\n }\n });\n }",
"public void setStatus(String message)\n\t{\n\t\ttextPane.add(new JLabel(message));\n\t\ttextPane.updateUI();\n\t}",
"public void refreshLabel() {\n\t\tresultLabel.setText(String.format(snakeGame.getStatus().getStatus(),\n\t\t\t\tsnakeGame.getScore()));\n\t}",
"private void updateGUIStatus() {\r\n\r\n }",
"private void updateStatusText() {\n Piece.Color playerColor = board.getTurnColor();\n\n if(board.isGameOver()) {\n if(board.isDraw()) {\n tvShowStatus.setTextColor(Color.BLUE);\n tvShowStatus.setText(\"DRAW\");\n }\n else if (board.getWinnerColor() == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK WINS\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE WINS\");\n }\n }\n else if(playerColor == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE\");\n }\n }",
"public void setStatusText(String text);",
"private void updateLabel() {\n\t\tString translation = lp.getString(key);\n\t\tsetText(translation);\n\n\t}",
"public void setStatusText(String text) {\r\n\t\tthis.status_text.setText(text);\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a listener for closing the given GameFrame, to reopen the menu and record a win/loss. | private static void setWindowListener(GameFrame gframe)
{
gframe.addWindowListener(new WindowAdapter()
{
@Override
public void windowClosed(WindowEvent e)
{
frame.setVisible(true);
if (gframe.isWin())
{
recordWin();
}
else
{
recordLoss();
}
}
});
} | [
"public void closeGame() {\r\n if(gameEngine.isGameRunning())\r\n gameEngine.stopGameEngine();\r\n menuFrame.dispose();\r\n System.exit(0);\r\n }",
"@Override\n public void endGameAsLoss()\n {\n // UPDATE THE GAME STATE USING THE INHERITED FUNCTIONALITY\n super.endGameAsLoss();\n \n // RECORD IT AS A loss\n ((MahjongSolitaireMiniGame)miniGame).getPlayerRecord().addLoss(currentLevel);\n ((MahjongSolitaireMiniGame)miniGame).savePlayerRecord();\n \n // DISPLAY THE loss DIALOG\n miniGame.getGUIDialogs().get(LOSS_DIALOG_TYPE).setState(VISIBLE_STATE); \n\n // AND PLAY THE LOSS AUDIO\n miniGame.getAudio().stop(MahjongSolitairePropertyType.SPLASH_SCREEN_SONG_CUE.toString()); \n miniGame.getAudio().stop(MahjongSolitairePropertyType.GAMEPLAY_SONG_CUE.toString());\n miniGame.getAudio().play(MahjongSolitairePropertyType.LOSS_AUDIO_CUE.toString(), false);\n }",
"public void handleQuit() {\r\n JOptionPane.showMessageDialog(null, \"They quit!\");\r\n contGame.listen(\"lobby\");\r\n close(); \r\n }",
"public void onMenuExitApplication() {\n this.processWindowEvent(new WindowEvent(this,WindowEvent.WINDOW_CLOSING));\n }",
"private void closeMenu() {\n mBrailleMenuListener.onMenuClosed();\n }",
"public void quitGame(){\n\t\t\tMenu.setEnabled(true);\n\t\t\tquit.setEnabled(false);\n\t\t\tif(currentPlayer==CheckersData.GREY){\n\t\t\t\tgameOver(CheckersData.YELLOW);\n\t\t\t}\n\t\t\telse gameOver(CheckersData.GREY);\n\t\t}",
"public void quit(){\n IO.println(\"GAME OVER, Your score was \" + player.getScore() + \". Quiting...\"); \n stop();\n frame.dispose();\n frame = null;\n }",
"public void endGame() {\n if (numShots == 0) {\n Window.close();\n }\n }",
"public void closeGame(int gameID){\n\t}",
"public void windowClosed() {\n SoundManager.killData();\n }",
"public interface OnClosedListener {\n\n\t\t/**\n\t\t * On closed.\n\t\t */\n\t\tpublic void onMenuClosed();\n\t}",
"public void onLeaveClick(ActionEvent actionEvent) {\n GUIUtility.handleLeaveGame();\n }",
"public void GameOver() {\n\t\tGameFrame.frame.dispose();\n\t\tGameOverGUI g = new GameOverGUI();\n\t\tg.setCurrentScore(this.hitcount);\n\t\tg.frame.setVisible(true);\n\t\tg.frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t}",
"void leaveGameSession();",
"public void close()\r\n {\r\n gameInstance.setActiveGui(null);\r\n }",
"public void finishedWindow() {\r\n\t\tgame.closeBattleSCREEN(this);\r\n\t}",
"public void windowClosed(WindowEvent event) {\n System.exit(0);\n }",
"private void endGame()\n {\n AlertBox.display(\"In Between Game of Cards\", \"The game has ended.\");\n window.close();\n System.exit(0);\n }",
"public static void gameLost() {\n\t\tHangmanViewModel.controller.gameLost();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the TileImprovementPlan which should be the next target. | public void setTileImprovementPlan(TileImprovementPlan tip) {
this.tileImprovementPlan = tip;
} | [
"public TileImprovementPlan getTileImprovementPlan() {\n return tileImprovementPlan;\n }",
"public void setNextTile(PathTile nextTile) {\n\t\tthis.nextTile = nextTile;\n\t}",
"public void setPlan(Plan plan) {\n this.plan = plan;\n }",
"public static TileImprovementPlan findTileImprovementPlan(AIUnit aiUnit) {\n final Unit unit = aiUnit.getUnit();\n if (unit == null || unit.isDisposed()) return null;\n\n final Tile startTile = getPathStartTile(unit);\n if (startTile == null) return null;\n\n // Build the TileImprovementPlan map.\n final HashMap<Tile, TileImprovementPlan> tipMap\n = new HashMap<Tile, TileImprovementPlan>();\n final EuropeanAIPlayer aiPlayer\n = (EuropeanAIPlayer)aiUnit.getAIMain().getAIPlayer(unit.getOwner());\n for (TileImprovementPlan tip : aiPlayer.getTileImprovementPlans()) {\n if (!validateTileImprovementPlan(tip, aiPlayer)) continue;\n if (tip.getPioneer() == aiUnit) return tip;\n if (tip.getPioneer() != null) continue;\n if (startTile == tip.getTarget()) return tip;\n TileImprovementPlan other = tipMap.get(tip.getTarget());\n if (other == null || other.getValue() < tip.getValue()) {\n tipMap.put(tip.getTarget(), tip);\n }\n }\n\n // Find the best TileImprovementPlan.\n final GoalDecider tipDecider = new GoalDecider() {\n private PathNode best = null;\n private int bestValue = Integer.MIN_VALUE;\n\n public PathNode getGoal() { return best; }\n public boolean hasSubGoals() { return false; }\n public boolean check(Unit u, PathNode path) {\n TileImprovementPlan tip = tipMap.get(path.getTile());\n if (tip != null) {\n int value = tip.getValue() - 5 * path.getTotalTurns();\n if (value > bestValue) {\n bestValue = value;\n best = path;\n return true;\n }\n }\n return false;\n }\n };\n if (tipMap.get(startTile) != null) return tipMap.get(startTile);\n PathNode path = (tipMap.isEmpty()) ? null\n : unit.search(startTile, tipDecider,\n CostDeciders.avoidIllegal(), MAX_TURNS,\n (unit.isOnCarrier()) ? ((Unit)unit.getLocation()) : null);\n return (path == null) ? null : tipMap.get(path.getLastNode().getTile());\n }",
"public void setPlanWork(ActionPlanWork tmp) {\n this.planWork = tmp;\n }",
"void setProductPlan(final ProductPlan productPlan);",
"public void setPlan( Plan plan ) {\n getUser().setPlan( plan );\n }",
"protected synchronized void setNewPlan(Plan newPlan) {\n\t\tif (newPlan == null || newPlan.equals(this.currentPlan)) {\n\t\t\tthis.newPlan = null;\n\t\t} else {\n\t\t\tthis.newPlan = newPlan;\n\t\t\t// Set the new time\n\t\t\tsetNewPlanSetTime(RPubUtil.getCurrentSystemTime());\n\t\t\t\n\t\t\t//System.out.println(\"New plan summary:\");\n\t\t\t//printPlanInfo(newPlan);\n\t\t}\n\t}",
"public void setPlanFlag(int flag) {\n\tplanFlag = flag;\n }",
"public void setNext(HeapNode newNext) {\r\n \t this.next = newNext;\r\n }",
"public void setPlanManager(IAePlanManager aPlanManager) throws AeBusinessProcessException;",
"public void setNext(TripStopNode newNext){\r\n next = newNext;\r\n }",
"public void setPlan(java.lang.String value) {\n this.plan = value;\n }",
"public Operator getOptimalPlanBySimulatedAnnealing(Operator initPlan) {\n\n int initCost = getPlanCost(initPlan);\n int numMoves = 4 * numJoin;\n double temperature = 2.0 * initCost;\n Random random = new Random();\n\n while (temperature >= 1) {\n\n for (int i = 0; i < numMoves; i++) {\n Operator neighbor = getNeighbor((Operator) initPlan.clone());\n int neighborCost = getPlanCost(neighbor);\n\n if (neighborCost < initCost) {\n initCost = neighborCost;\n initPlan = neighbor;\n } else {\n int delta = neighborCost - initCost;\n double probability = Math.exp(((double)-delta) / temperature);\n\n if (random.nextDouble() <= probability) {\n initCost = neighborCost;\n initPlan = neighbor;\n }\n }\n }\n\n temperature = temperature * 0.95;\n }\n return initPlan;\n }",
"protected void setPlannerDecision(int plannerDecision){\n this.plannerDecision = plannerDecision;\n }",
"@Override\n public void setNextPoint(Point thePoint) {\n myNextPoint = thePoint;\n }",
"public void setNextStep(ActionItemWork tmp) {\n this.nextStep = tmp;\n }",
"public void setPlan(String plan) {\n this.plan = plan;\n }",
"public void setNext(QueueElement<E> next)\r\n {\r\n this.next = next;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a batch of entities of a given kind | private QueryResultList<Entity> getEntitiesByKind_withCursor(String kind,
Cursor cursor, int pageSize){
int thread_id = 0;
if(TWTs_NO!=0)
thread_id = (int) (Thread.currentThread().getId()%TWTs_NO);
boolean proof = true;
QueryResultList<Entity> results = null;
/**
* Bullet proof reads from the Datastore.
*/
while(proof){
try{
FetchOptions fetchOptions = FetchOptions.Builder.withLimit(pageSize);
if(cursor!=null)
fetchOptions.startCursor(cursor);
Query q = new Query(kind);
PreparedQuery pq = connectionList.get(thread_id).ds.prepare(q);
results = pq.asQueryResultList(fetchOptions);
proof = false;
}catch(Exception e){
log.error(Thread.currentThread().getName() +
"ERROR: getEntitiesByKind_withCursor -> "+e.getMessage());
}
}
return results;
} | [
"public <T extends Object> List<? extends T> getEntities(Class<T> entityType);",
"public <ENTITY extends Persistable> List<ENTITY> getAll(Class<ENTITY> clazz);",
"public List<Entity> all(int limit, int offset);",
"protected abstract List<?> findAll(Class<?> entityClass);",
"List<Entity> getEntities();",
"public List<T> fetchItemBatch(int startIndex, int count);",
"public List<Entity> all(int limit);",
"io.cloudstate.protocol.EntityProto.Entity getEntities(int index);",
"private <I extends Serializable, T extends Entity<I>> List<T> getForClassAndIds(final Class<T> entityClazz,\n final List<I> ids) {\n Objects.requireNonNull(entityClazz, \"Cannot load for null class\");\n final boolean isWithIds = (ids != null);\n // id list given but empty means no result\n if ((isWithIds) && (ids.isEmpty())) {\n return new ArrayList<>(0);\n }\n final String entityName = entityClazz.getSimpleName();\n final String query = (\"SELECT entity FROM \" + entityName + \" entity\") + ((isWithIds) ? \" WHERE entity.id in (:ids)\" : \"\");\n final Map<String, Object> parameters = (isWithIds) ? new HashMap() {{\n put(\"ids\", ids);\n }} : null;\n return queryMultipleResult(query, entityClazz, parameters);\n }",
"ServiceResponse<Entity> readAllEntities(String type, Long exceptId);",
"List<T> getEntitiesByIds(List<ID_TYPE> ids) throws NotImplementedException;",
"public List<SomeEntity> getAllSomeEntities();",
"<T> List<T> getEntitiesByPage(Class<T> entityType, int pageNumber, \n\t\t\tint pageRowCount);",
"public <T extends IDBEntities> List<T> retrieveAll(Class<? extends IDBEntities> type) {\n\t\tif (type == null)\n\t\t\treturn new ArrayList<>();\n\t\tList<T> result;\n\t\tEntityManager em = getEM();\n\t\ttry {\n\t\t\tQuery q = em.createNamedQuery(type.getSimpleName() + \".findAll\", type);\n\t\t\tresult = q.getResultList();\n\t\t} catch (Exception ex) {\n\t\t\t// No records exist\n\t\t\treturn null;\n\t\t} finally {\n\t\t\tem.close();\n\t\t}\n\t\t// Dealing with EclipseLink Vector overriding issues (iterators don't work properly)\n\t\tList<T> output = new ArrayList<>();\n\t\toutput.addAll(result);\n\t\treturn output;\n\t}",
"public Collection<Entity> getEntitiesInChunk(Location location, Predicate<Entity> predicate) {\n World world = location.getWorld();\n if (world == null)\n return new ArrayList<>();\n\n return this.entityCache.get(new ChunkLocation(world, location.getBlockX() >> 4, location.getBlockZ() >> 4))\n .stream()\n .filter(predicate)\n .collect(Collectors.toSet());\n }",
"public List<WrapperEntity> getEntitiesClassNamed(String className){\r\n\t\tList<WrapperEntity> entities = new ArrayList<WrapperEntity>();\r\n\t\tfor(Entity entity : world.loadedEntityList){\r\n\t\t\tif(entity.getClass().getCanonicalName().equals(className)){\r\n\t\t\t\tentities.add(WrapperEntity.getWrapperFor(entity));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn entities;\r\n\t}",
"public List<Lot> getLotsByEntityTypeAndEntityId(String type, Integer entityId, int start, int numOfRows) throws MiddlewareQueryException;",
"public static Entity[] getFilteredEntities(final ISpecification filter, final SortType sortType) {\n // Get the repository.\n IRepository repository = ServiceProvider.getRepository();\n Map<String, Object> map = null;\n if (filter != null) {\n // If the filter is not null, then use it.\n map = repository.get(filter);\n } else {\n // Otherwise, get all the entities.\n map = repository.getAll();\n }\n Entity[] entities = map.values().toArray(new Entity[0]);\n if (sortType == SortType.NONE) {\n return entities;\n }\n\n // Sort the list of entities.\n int i, j;\n int numEntities = entities.length;\n for (i = 1; i < numEntities; i++) {\n Entity temp = entities[i];\n for (j = i; j > 0; j--) {\n String tempName = temp.getDisplayName();\n String itemName = entities[j - 1].getDisplayName();\n if (tempName.compareTo(itemName) < 0) {\n entities[j] = entities[j - 1];\n } else {\n break;\n }\n }\n entities[j] = temp;\n }\n // Return the filtered results an an entity array.\n return entities;\n }",
"private CompletableFuture<Iterator<T>> batch() {\n return batch.thenCompose(iterator -> {\n if (iterator != null && !iterator.hasNext()) {\n batch = fetch(iterator.position());\n return batch.thenApply(Function.identity());\n }\n return CompletableFuture.completedFuture(iterator);\n });\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
auto generated Axis2 call back method for checkPayPassword method override this method for handling normal response from checkPayPassword operation | public void receiveResultcheckPayPassword(
org.tempuri.UserWcfStub.CheckPayPasswordResponse result) {
} | [
"public void receiveResultuserRePayPassword(\r\n org.tempuri.UserWcfStub.UserRePayPasswordResponse result) {\r\n }",
"void onChangePasswordSuccess(ConformationRes data);",
"public void receiveResultaccountMatchPwd(\r\n org.tempuri.UserWcfStub.AccountMatchPwdResponse result) {\r\n }",
"void onPasswordSuccess();",
"public void receiveResultuserRePassword(\r\n org.tempuri.UserWcfStub.UserRePasswordResponse result) {\r\n }",
"public void receiveResulteditUserPassword(\r\n org.tempuri.UserWcfStub.EditUserPasswordResponse result) {\r\n }",
"ChangePassword.Rsp getChangePasswordRsp();",
"public void receiveResultsetPassword(\r\n com.icoserve.www.va20_useradministrationservice.VA20_UserAdministrationServiceStub.SetPasswordResponse result\r\n ) {\r\n }",
"private void callForgotPasswordAPI() {\n\n HashMap<String, String> param = new HashMap<>();\n param.put(\"email\", edt_forgot_pwd_email.getText().toString().trim());\n\n UserService.forgotPassword(ForgotPwdActivity.this, param, new APIService.Success<JSONObject>() {\n @Override\n public void onSuccess(JSONObject response) {\n String status = response.optString(\"status\");\n String message = response.optString(\"message\");\n\n if (status.equals(\"1\")) {\n AlertDialog.Builder builder = new AlertDialog.Builder(ForgotPwdActivity.this);\n builder.setMessage(message);\n builder.setCancelable(false);\n String positiveText = \"OK\";/*getString(android.R.string.yes);*/\n builder.setPositiveButton(positiveText,\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // positive button logic\n if (dialog != null)\n dialog.cancel();\n\n Intent intent = new Intent(ForgotPwdActivity.this, VerifyCodeForgotPwdActivity_.class);\n startActivity(intent);\n }\n });\n\n AlertDialog dialog = builder.create();\n // display dialog\n dialog.show();\n\n } else {\n DialogUtility.dialogWithPositiveButton(message,ForgotPwdActivity.this);\n }\n }\n });\n }",
"Boolean validateOldPassword(LoginInformationDTO loginInformationDTO) throws BusinessException;",
"public void receiveResultgetAuthSecureCust(\r\n com.solusoft.jpa.IDocServiceStub.GetAuthSecureCustResponse result\r\n ) {\r\n }",
"public void receiveResultauthSecureCust(\r\n com.solusoft.jpa.IDocServiceStub.AuthSecureCustResponse result\r\n ) {\r\n }",
"protected void validateReturn_signs(SignReturnV2[] param){\r\n \r\n }",
"public void receiveResultChangeUserPassword(\r\n\t\t\tcom.autometrics.analytics.v9.j2ee.webservices.v1_0.ChangeUserPasswordResponse result) {\r\n\t}",
"@Override\n public void onResponse(JSONObject response) {\n Log.d(\"accessToken2\",response.toString());\n if(response.toString().contains(\"OK\") && response.toString().contains(\"1000\"))\n isPaymentSuccessful = true;\n\n\n }",
"boolean hasPassCardsResponse();",
"public CredentialValidationResult validate(UsernamePasswordCredential unpc){\r\n \r\n \r\n return null;\r\n}",
"public boolean checkpay(){\n return pay;\n }",
"@Virtual(7) \n\tpublic native void OnRspTradingAccountPasswordUpdate(Pointer<CThostFtdcTradingAccountPasswordUpdateField > pTradingAccountPasswordUpdate, Pointer<CThostFtdcRspInfoField > pRspInfo, int nRequestID, boolean bIsLast);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculate a value from one range into another range by first calculating the fraction in the 'from range' and then back to a value in the 'to range'. | public static double calculateFromRangeToRange(final double fromMin, final double fromMax, final double fromValue,
final double toMin, final double toMax) {
return calculateValueInRange(toMin, toMax, calculateFractionInRange(fromMin, fromMax, fromValue));
} | [
"public static double mapValueFromRangeToRange(\n double value,\n double fromLow,\n double fromHigh,\n double toLow,\n double toHigh) {\n double fromRangeSize = fromHigh - fromLow;\n double toRangeSize = toHigh - toLow;\n double valueScale = (value - fromLow) / fromRangeSize;\n return toLow + (valueScale * toRangeSize);\n }",
"public static float map(float val, float fromStart, float fromStop, float toStart, float toStop) {\n if (fromStart == fromStop) {\n return toStart;\n }\n return toStart + (toStop - toStart) * ((val - fromStart) / (fromStop - fromStart));\n }",
"public static double map(double value,\n double range1Start, double range1End,\n double range2Start, double range2End) {\n\n final double EPSILON = 1e-12;\n\n if (Math.abs(range1End - range1Start) < EPSILON) {\n throw new ArithmeticException(\"/ 0\");\n }\n\n double ratio = (range2End - range2Start) / (range1End - range1Start);\n return ratio * (value - range1Start) + range2Start;\n }",
"@Override\n public Point evaluate(float fraction, Point startValue, Point endValue) {\n float x = startValue.x + (endValue.x - startValue.x) * fraction;\n float y = startValue.y + (endValue.y - startValue.y) * fraction;\n return new Point((int) x, (int) y);\n }",
"public static double calculateValueInRange(final double min, final double max, final double fraction) {\n return min + fraction * (max - min);\n }",
"public abstract double to(TempUnit to, double fromValue);",
"private float ratioToValue (float ratio){\n return ratio * (mMax - mMin) + mMin;\n }",
"public static Fraction getFraction(double value) {\n if (Double.isInfinite(value) || Double.isNaN(value)) {\n throw new ArithmeticException(\"The value must not be infinite or NaN\");\n }\n int sign = (value < 0 ? -1 : 1);\n value = Math.abs(value);\n int wholeNumber = (int) value;\n value -= wholeNumber;\n \n // http://archives.math.utk.edu/articles/atuyl/confrac/\n int numer0 = 0; // the pre-previous\n int denom0 = 1; // the pre-previous\n int numer1 = 1; // the previous\n int denom1 = 0; // the previous\n int numer2 = 0; // the current, setup in calculation\n int denom2 = 0; // the current, setup in calculation\n int a1 = (int) value;\n int a2 = 0;\n double x1 = 1;\n double x2 = 0;\n double y1 = value - a1;\n double y2 = 0;\n double delta1, delta2 = Double.MAX_VALUE;\n double fraction;\n int i = 1;\n// System.out.println(\"---\");\n do {\n delta1 = delta2;\n a2 = (int) (x1 / y1);\n x2 = y1;\n y2 = x1 - a2 * y1;\n numer2 = a1 * numer1 + numer0;\n denom2 = a1 * denom1 + denom0;\n fraction = (double) numer2 / (double) denom2;\n delta2 = Math.abs(value - fraction);\n// System.out.println(numer2 + \" \" + denom2 + \" \" + fraction + \" \" + delta2 + \" \" + y1);\n a1 = a2;\n x1 = x2;\n y1 = y2;\n numer0 = numer1;\n denom0 = denom1;\n numer1 = numer2;\n denom1 = denom2;\n i++;\n// System.out.println(\">>\" + delta1 +\" \"+ delta2+\" \"+(delta1 > delta2)+\" \"+i+\" \"+denom2);\n } while ((delta1 > delta2) && (denom2 <= 10000) && (denom2 > 0) && (i < 25));\n if (i == 25) {\n throw new ArithmeticException(\"Unable to convert double to fraction\");\n }\n return getReducedFraction((numer0 + wholeNumber * denom0) * sign, denom0);\n }",
"public static double calculateFractionInRange(double min, double max, double value) {\n if (value < min || value > max) {\n throw new IllegalArgumentException(\"Value \" + value + \" must be between \" + min + \" and \" + max);\n }\n double diff = max - min;\n double fraction;\n if (diff == 0) {\n // Special case: no diff, so default to 1.\n fraction = 1;\n } else {\n fraction = (value - min) / diff;\n }\n return fraction;\n }",
"protected CCProgressFromTo(float t, float fromPercentage, float toPercentage) {\n super(t);\n to_ = toPercentage;\n from_ = fromPercentage;\n }",
"protected abstract R toRange(D lower, D upper);",
"public static LatLng interpolate(LatLng from, LatLng to, double fraction) {\n\t\tdouble fromLat = Math.toRadians(from.latitude);\n\t\tdouble fromLng = Math.toRadians(from.longitude);\n\t\tdouble toLat = Math.toRadians(to.latitude);\n\t\tdouble toLng = Math.toRadians(to.longitude);\n\t\tdouble cosFromLat = Math.cos(fromLat);\n\t\tdouble cosToLat = Math.cos(toLat);\n\t\tdouble angle = computeAngleBetween(from, to);\n\t\tdouble sinAngle = Math.sin(angle);\n\t\tif (sinAngle < 1.0E-6D) {\n\t\t\treturn from;\n\t\t} else {\n\t\t\tdouble a = Math.sin((1.0D - fraction) * angle) / sinAngle;\n\t\t\tdouble b = Math.sin(fraction * angle) / sinAngle;\n\t\t\tdouble x = a * cosFromLat * Math.cos(fromLng) + b * cosToLat * Math.cos(toLng);\n\t\t\tdouble y = a * cosFromLat * Math.sin(fromLng) + b * cosToLat * Math.sin(toLng);\n\t\t\tdouble z = a * Math.sin(fromLat) + b * Math.sin(toLat);\n\t\t\tdouble lat = Math.atan2(z, Math.sqrt(x * x + y * y));\n\t\t\tdouble lng = Math.atan2(y, x);\n\t\t\treturn new LatLng(Math.toDegrees(lat), Math.toDegrees(lng));\n\t\t}\n\t}",
"double getRange();",
"private static double map( double fVal, double fStart, double fEnd, double tStart, double tEnd) {\n return (tEnd - tStart) / (fEnd - fStart) * (fVal - fStart) + tStart;\n }",
"public Number calculatePercent(Number value, Number minValue,\r\n Number maxValue) {\r\n if (minValue.doubleValue() < value.doubleValue()\r\n && value.doubleValue() < maxValue.doubleValue()) {\r\n return (Number) ((value.doubleValue() - minValue.doubleValue()) * 100.0 / (maxValue\r\n .doubleValue() - minValue.doubleValue()));\r\n } else if (value.doubleValue() <= minValue.doubleValue()) {\r\n return 0;\r\n } else if (value.doubleValue() >= maxValue.doubleValue()) {\r\n return 100;\r\n } \r\n return 0;\r\n }",
"public float percent(int number1, int number2)\r\n\t{\r\n\t\treturn (float) number1 / number2;\r\n\t}",
"@Override\n protected Long compute() {\n if((to-from) <= N/NUM_THREADS){\n\n long localSum = 0;\n // add in range 'from' .. 'to' inclusive of the value 'to'\n for(long i = from; i <= to; i++) {\n localSum += i;\n }\n System.out.printf(\"\\tSum of value range %d to %d is %d %n\",\n from, to, localSum);\n return localSum;\n }\n // no, the range is too big for a thread to handle,\n // so fork the computation\n // we find the mid-point value in the range from..to\n else{\n\n long mid = (from + to)/2;\n System.out.printf(\"Forking computation into two ranges: \" +\n \"%d to %d and %d to %d %n\", from, mid, mid, to);\n // determine the computation for first half\n // with the range from..mid\n SumOfNUsingForkJoin firstHalfTask = new SumOfNUsingForkJoin(from, mid);\n // now, fork off that task\n firstHalfTask.fork();\n // determine the computation for second half\n // with the range mid+1..to\n SumOfNUsingForkJoin secondHalfTask = new SumOfNUsingForkJoin(mid + 1, to);\n long resultSecond = secondHalfTask.compute();\n // now, wait for the first half of computing sum to\n // complete, once done, add it to the remaining part\n return firstHalfTask.join() + resultSecond;\n }\n }",
"private static double lirp(double startVal, double smin, double smax, double emin, double emax) {\n return emin + (emax - emin) * ((startVal - smin) / (smax - smin));\n }",
"private void reduce()\n {\n // If this is a negative fraction, set a boolean negativeFraction to true.\n\t\t\tboolean negativeFraction = false;\n \t\tif (numerator * denominator < 0) {\n \t\t\tnegativeFraction = true;\n \t\t}\n\n // Set numerator and denominator to their absolute values.\n \t\tnumerator = Math.abs(numerator);\n\t \tdenominator = Math.abs(denominator);\n\n // Set the greatest common factor to the value of numerator.\n\t \t\n\t \tint GCF = numerator;\n \n\t // While the greatest common factor is greater than 1:\n\t while (GCF > 1) {\n\t \tif (numerator % GCF != 0 || denominator % GCF != 0) {\n\t \t\tGCF --;\n\t \t}\n\t \telse {\n\t \t\tbreak;\n\t \t}\n\t }\n\t // End While\n\n\t // Divide both numerator and denominator by the greatest common factor to \n\t // reduce the fraction.\n\t numerator = numerator / GCF;\n\t denominator = denominator / GCF;\n\n // If this was a negative fraction, then make numerator negative.\n\t if (negativeFraction) {\n\t \tnumerator = numerator / -1;\n\t }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the reward held by the briefcase | public double getReward() {
return reward;
} | [
"public int getReward() {\n return reward;\n }",
"public double getReward(){\n return this.params.reward;\n }",
"public double getReward()\n {\n return this.reward;\n }",
"double getTotalReward();",
"public double getLastReward();",
"public BigDecimal getReward() {\n return reward;\n }",
"int getRewardTrackValue();",
"private SCActivityPinTuGetReward() {}",
"POGOProtos.Rpc.VsSeekerRewardTrack getRewardTrack();",
"public Reward getRewards(){\n reward = ((EnemyRoom)room).giveReward();\n return reward;\n }",
"public int getCashReward(){\n\t\treturn 0;\n\t}",
"private CSActivityPinTuGetReward() {}",
"public Integer getDirectReward() {\r\n\t\treturn directReward;\r\n\t}",
"public int getQuestPointsReward(){\n return questPointsReward;\n }",
"int getExtraRewardCount();",
"public Reward getRandomReward() {\n double v = r.nextDouble() * 100, currently = 0;\n\n for (Reward reward : this.rewards) {\n if (v >= currently && v <= (currently += reward.getProbability())) {\n return reward;\n }\n }\n\n return null;\n }",
"public int getCashReward(){\n\t\treturn cash;\n\t}",
"public BigDecimal getRewardMoney() {\r\n return rewardMoney;\r\n }",
"void update(int chosenArm, BigDecimal reward);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Print to a postscript file, EPS if requested. | public static void printPostscript( Printable printable, boolean eps,
PrintRequestAttributeSet pageSet,
Rectangle bounds, String fileName )
throws SplatException
{
if ( eps ) {
try {
BufferedOutputStream ostrm =
new BufferedOutputStream( new FileOutputStream(fileName) );
EpsGraphics2D g2 =
new EpsGraphics2D( fileName, ostrm,
bounds.x, bounds.y,
bounds.x + bounds.width,
bounds.y + bounds.height );
printable.print( g2, null, 0 );
g2.close();
}
catch (Exception e) {
throw new SplatException( e );
}
}
else {
PrintService service =
PrintUtilities.getPostscriptPrintService( fileName );
if ( service != null ) {
try {
PrinterJob pj = PrinterJob.getPrinterJob();
pj.setPrintService( service );
pj.setPrintable( printable );
if ( pj.printDialog( pageSet ) ) {
pj.print( pageSet );
StreamPrintService sps = (StreamPrintService) service;
sps.dispose();
sps.getOutputStream().close();
}
}
catch ( PrinterException e ) {
throw new SplatException( e );
}
catch ( IOException e ) {
throw new SplatException( e );
}
}
else {
// Report there are no printers available.
throw new SplatException( "Sorry no printers are available" );
}
}
} | [
"public static void writePostscript(final String filename) {\n// psfile = file(filename, 'w');\n// psfile.write(_canvas.postscript(pageanchor='sw',\n// y='0.c',\n// x='0.c'));\n// psfile.close();\n throw new UnsupportedOperationException();\n }",
"public void PSfile (String fileName) {\r\n\r\n try {\r\n FileWriter psOut = new FileWriter(fileName);\r\n Graphics postscript = new PSGr1(psOut);\r\n drawMesh(this.xoffset,this.yoffset,this.boxWidth, this.boxHeight,postscript);\r\n \r\n // The following commented-out statement also\r\n // generates a postscript file of the Segre\r\n // chart. However, because it is all copied\r\n // at once using drawImage from the offscreen image buffer,\r\n // it is output as a single object that will not\r\n // ungroup in Illustrator. To ungroup, the objects\r\n // appear to need to be written one at a time to the\r\n // postscript output stream, as done by the\r\n // drawMesh command above to the postscript graphics\r\n // object.\r\n \r\n //postscript.drawImage(image,0,0,null);\r\n \r\n } catch (Exception e) {System.out.println(e);}\r\n }",
"private boolean openPostscript(String outputFile) throws FileNotFoundException {\n if (\"\".equals(outputFile)) {\n out = System.out;\n } else {\n out = new PrintStream(new File(outputFile));\n }\n fprintf(out, \"%%!PS-Adobe-1.0\\n\");\n fprintf(out, \"%%%%Creator: postgen written by Tom Flores\\n\");\n fprintf(out, \"%%%%Title: postscript procedure\\n\");\n fprintf(out, \"%%%%CreationDate: Unknown\\n\");\n fprintf(out, \"%%%%Pages: 1\\n\");\n\n return true; // XXX TODO\n }",
"public void onPrintFile(ActionEvent ev) {\n String fileName = ev.getActionCommand();\n File file = new File(fileName);\n \n try {\n \tdesktop.print(file);\n } catch (IOException ioe) {\n //ioe.printStackTrace();\n \t//JOptionPane\n System.out.println(\"Cannot perform the given operation to the \" + file + \" file\");\n }\n }",
"public void _print(){\n boolean result = true ;\n\n final String file = \"XPrintable.prt\" ;\n final String fileName = utils.getOfficeTempDirSys((XMultiServiceFactory)tParam.getMSF())+file ;\n final String fileURL = utils.getOfficeTemp((XMultiServiceFactory)tParam.getMSF()) + file ;\n\n XSimpleFileAccess fAcc = null ;\n try {\n Object oFAcc =\n ((XMultiServiceFactory)tParam.getMSF()).createInstance\n (\"com.sun.star.ucb.SimpleFileAccess\") ;\n fAcc = (XSimpleFileAccess) UnoRuntime.queryInterface\n (XSimpleFileAccess.class, oFAcc) ;\n if (fAcc == null) throw new StatusException\n (Status.failed(\"Can't create SimpleFileAccess service\")) ;\n if (fAcc.exists(fileURL)) {\n log.println(\"Old file exists and will be deleted\");\n fAcc.kill(fileURL);\n }\n } catch (com.sun.star.uno.Exception e) {\n log.println(\"Error accessing file '\" + fileURL + \"'\");\n e.printStackTrace(log);\n }\n\n try {\n PropertyValue[] PrintOptions = new PropertyValue[2];\n PropertyValue firstProp = new PropertyValue();\n firstProp.Name = \"FileName\";\n log.println(\"Printing to :\"+fileName);\n firstProp.Value = fileName;\n firstProp.State = com.sun.star.beans.PropertyState.DEFAULT_VALUE;\n PrintOptions[0] = firstProp;\n PrintOptions[1] = new PropertyValue();\n PrintOptions[1].Name = \"Wait\";\n PrintOptions[1].Value = new Boolean(true);\n oObj.print(PrintOptions);\n }\n catch (com.sun.star.lang.IllegalArgumentException ex) {\n log.println(\"couldn't print\");\n ex.printStackTrace(log);\n result = false ;\n }\n\n try {\n boolean fileExists = fAcc.exists(fileURL);\n \n log.println(\"File \"+fileName+\" exists = \"+fileExists);\n\n if (result) {\n result &= fileExists ;\n }\n } catch (com.sun.star.uno.Exception e) {\n log.println(\"Error while while checking file '\" +\n fileURL + \"': \");\n e.printStackTrace(log);\n result = false ;\n }\n\n tRes.tested(\"print()\", result) ;\n\n }",
"public void printToFile(String pathName);",
"public void ps2pdf(File input, File output) throws IOException {\n log.debug(\"** Convert from PS to PDF **\");\n FileOutputStream fos = null;\n String cmd = null;\n\n if (!input.getName().toLowerCase().endsWith(\".ps\")) {\n log.warn(\"ps2pdf conversion needs *.ps as input file\");\n }\n\n try {\n // Performs conversion\n HashMap<String, Object> hm = new HashMap<String, Object>();\n hm.put(\"fileIn\", input.getPath());\n hm.put(\"fileOut\", output.getPath());\n String tpl = config.getGhostscript() + \" ${fileIn} ${fileOut}\";\n cmd = TemplateUtils.replace(\"SYSTEM_GHOSTSCRIPT_PS2PDF\", tpl, hm);\n ExecutionResult er = ExecutionUtils.runCmd(cmd);\n\n if (er.getExitValue() != 0) {\n throw new ConversionException(er.getStderr());\n }\n } catch (SecurityException e) {\n throw new ConversionException(\"Security exception executing command: \" + cmd, e);\n } catch (InterruptedException e) {\n throw new ConversionException(\"Interrupted exception executing command: \" + cmd, e);\n } catch (IOException e) {\n throw new ConversionException(\"IO exception executing command: \" + cmd, e);\n } catch (TemplateException e) {\n throw new ConversionException(\"Template exception\", e);\n } finally {\n IOUtils.closeQuietly(fos);\n }\n }",
"private void endPostscript() {\n fprintf(out, \"showpage\\n\");\n if (out != System.out)\n out.close();\n }",
"public void print() throws PrintException {\n setRequest();\n service = null;\n if (useDialog) {\n Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();\n int defaultPSidx = 0;\n PrintService dps = PrintServiceLookup.lookupDefaultPrintService();\n for (int i=0; i<services.length; i++) {\n if (dps != null) {\n if (dps.equals(services[i])) defaultPSidx = i;\n }\n }\n service = ServiceUI.printDialog(null, (screen.width/2)-220, (screen.height/2)-220, services, services[defaultPSidx], null, aset);\n try {\n String serviceName = service.getName();\n } catch (NullPointerException npe) {\n throw new PrintException(\"no printer selected - printing cancelled\", npe);\n }\n } else {\n service = PrintServiceLookup.lookupDefaultPrintService();\n }\n if(!(isSupportedFileType(filetypestr))) {\n throw new PrintException(\"File Type \"+filetypestr+\" is not supported.\\n\" +\n \"Supported filetypes (case insensitive):\\n\" +\n \"\\tunknown\\n\" +\n \"\\ttext\\n\" +\n \"\\ttext/plain (rendered by JEditorPane)\\n\" +\n \"\\tHTML (rendered by JEditorPane)\\n\" +\n \"\\ttext/html (rendered by JEditorPane)\\n\" +\n \"\\tRTF (rendered by JEditorPane)\\n\" +\n \"\\ttext/rtf (rendered by JEditorPane)\\n\" +\n \"\\tGIF\\n\" +\n \"\\tJPEG\\n\" +\n \"\\tPCL\\n\" +\n \"\\tPDF\\n\" +\n \"\\tPOSTSCRIPT\");\n }\n setDocFlavor(); //Calling this method sets the appropriate DocFlavor\n //addPrintAListener(service);\n DocPrintJob pj = createDocPrintJob(service);\n //addPrintJListener(pj);\n \n log.info(\"File being printed: \" + url);\n if (filetypestr.equalsIgnoreCase(\"html\") || filetypestr.equalsIgnoreCase(\"text/html\") || filetypestr.equalsIgnoreCase(\"rtf\") || filetypestr.equalsIgnoreCase(\"text/rtf\") || filetypestr.equalsIgnoreCase(\"text/plain\")) {\n printHtmlJob();\n } else {\n Doc d = createFinalDoc(is);\n printJob(pj,d);\n }\n \n }",
"public static void printFile(String printerName, File fileToPrint) throws IOException, PrintException {\r\n \tif (printerName == null || printerName.trim().length() == 0) {\r\n \t\tlog.error(\"A valid printerName parameter was not provided: {}\", printerName);\r\n \t\tthrow new IllegalArgumentException(\"A valid printerName parameter was not provided: \" + printerName);\r\n \t} else if (fileToPrint == null || !fileToPrint.exists() || !fileToPrint.canRead()) {\r\n \t\tlog.error(\"A valid fileToPrint parameter was not provided: {}\", fileToPrint);\r\n \t\tthrow new IllegalArgumentException(\"A valid printerName parameter was not provided: \" + fileToPrint);\r\n \t}\r\n \t\r\n \tPrintServiceAttributeSet printServiceAttributeSet = new HashPrintServiceAttributeSet();\r\n printServiceAttributeSet.add(new PrinterName(printerName, null)); \r\n PrintService[] printServices = PrintServiceLookup.lookupPrintServices(DocFlavor.SERVICE_FORMATTED.PAGEABLE, printServiceAttributeSet);\r\n if (printServices == null || printServices.length == 0) {\r\n \tlog.error(\"No printers found for {}\", printerName);\r\n \tthrow new IllegalArgumentException(\"No printers found for \" + printerName);\r\n }\r\n \r\n PrintService selectedService = printServices[0];\r\n FileInputStream psStream = null; \r\n psStream = new FileInputStream(fileToPrint); \r\n \r\n DocPrintJob printJob = selectedService.createPrintJob();\r\n DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;\r\n Doc document = new SimpleDoc(psStream, flavor, null);\r\n printJob.print(document, null);\r\n }",
"protected void process_DotPostscript_display(Writer stream,\r\n DisplayPref dp,\r\n boolean hasNodeLosses,\r\n boolean hasLossMatrix) {\r\n try {\r\n //Originally this used a temporary file name for dot file output -JL\r\n FileWriter tempfile = new FileWriter(\"catgraph.dot-in\");\r\n convertToDotFormat(tempfile, dp, hasNodeLosses, hasLossMatrix);\r\n tempfile.close();\r\n \r\n //This is a system call to the dot program -JL\r\n //TmpFileName tmpfile2(\".dot-out\");\r\n //if(system(*GlobalOptions::dotUtil + \" -Tps \" + tmpfile1 + \" -o \" + tmpfile2))\r\n //Mcerr << \"CatGraph::display: Call to dot failed.\" << endl;\r\n //stream.include_file(tmpfile2); // this feeds the correct output\r\n } catch(IOException e) {\r\n e.printStackTrace();\r\n System.exit(1);\r\n }\r\n }",
"static void writePDFAsText() {\r\n\t\t\t\t\r\n\t\ttry {\r\n\t\t\tString text = getText(new File(file));\r\n\t\t FileWriter fw = new FileWriter(\"pdfTextWeb.txt\");\r\n\t\t fw.write(text);\r\n\t\t fw.close();\r\n\t\t} catch (IOException e) {\r\n\t\t System.out.println(\"IO Exception - unable to create or write file\");\r\n\t\t}\r\n\t}",
"public void printToFile(String file, String type) throws IOException {\n\t\tImageIO.write((RenderedImage) image, type, new File(file));\n\t}",
"public void filePrint(String print) throws IOException \n { \n bfw.write(print);\n }",
"public void PrinterStatus(){\n PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);\n System.out.println(\"Printer Services found:\");\n printService(services);\n\n // Look up the default print service\n PrintService service = PrintServiceLookup.lookupDefaultPrintService();\n if (service!=null) {\n System.out.println(\"Default Printer Service found:\");\n System.out.println(\"t\" + service);\n }\n\n\t\n // find printer service by name\n AttributeSet aset_name = new HashAttributeSet();\n aset_name.add(new PrinterName(\"Microsoft XPS Document Writer\", null));\n services = PrintServiceLookup.lookupPrintServices(null, aset_name);\n\n System.out.println(\"Printer Service Microsoft XPS Document Writer:\");\n printService(services);\n \n // find printer service by ip\n PrintServiceAttributeSet aset_URI = new HashPrintServiceAttributeSet();\n try {\n aset_URI.add(new PrinterURI(new URI(\"this ipp is wrong --ipp://hostName/printerName\")));\n } catch (URISyntaxException e) {\n System.out.println(\"URI exception caught: \"+e);\n }\n services = PrintServiceLookup.lookupPrintServices(null,aset_URI); \n // null could be replaced by DocFlavor.INPUT_STREAM.POSTSCRIPT, etc...\n System.out.println(\"Printer specific URI :\");\n printService(services);\n \n /*\n //another way to print to a specific uri\n URI printerURI = null;\n try {\n printerURI = new URI(\"ipp://SERVER:631/printers/PRINTER_NAME\");\n } catch (URISyntaxException ex) {\n Logger.getLogger(PrinterStatus.class.getName()).log(Level.SEVERE, null, ex);\n }\n IppPrintService svc = new IppPrintService(printerURI);\n services = PrintServiceLookup.lookupPrintServices(null,aset_URI); \n // null could be replaced by DocFlavor.INPUT_STREAM.POSTSCRIPT, etc...\n System.out.println(\"Printer specific URI :\");\n printService(services);\n // following is the way to print sth in a format of flavor\n InputStream stream = new BufferedInputStream(new FileInputStream(\"image.epl\"));\n DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;\n Doc myDoc = new SimpleDoc(stream, flavor, null);\n DocPrintJob job = svc.createPrintJob();\n job.print(myDoc, null);\n */\n \n /*\n // find services that support a particular input format (e.g. JPEG)\n services = PrintServiceLookup.lookupPrintServices(DocFlavor.INPUT_STREAM.JPEG, null);\n System.out.println(\"Printer Services with JPEG support:\");\n printService(services);\n\n //find services that support a set of print job capabilities (e.g. color)\n aset = new HashAttributeSet();\n aset.add(ColorSupported.SUPPORTED);\n services = PrintServiceLookup.lookupPrintServices(null, aset);\n\n System.out.println(\"Printer Services with color support:\");\n printService(services);\n */ \n }",
"private void printToFile(String s) {\n try {\n fw.write(s);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static void fileWriterPrinter() throws NumberFormatException, IOException {\n // Create File:\n\t\t\t\tFile f = new File(Common.testOutputFileDir + \"print.log\");\t\t\t\t \n\t\t\t // Write or add a String line into File:\t\n\t\t\t FileWriter fw = new FileWriter(f,true);\n\t\t\t PrintWriter pw = new PrintWriter(fw);\n\t\t\t pw.println();\n\t\t\t pw.close();\n\t\t\t // System Out Print Line:\n\t\t\t // if (printLine instanceof String) {}\n\t\t\t // if (printLine instanceof Integer) {}\n\t\t\t // if (printLine instanceof Long) {}\n\t\t\t // if (printLine instanceof Boolean) {}\n\t\t\t // if (printLine instanceof Double) {}\n\t\t\t System.out.print(\"\\n\");\t\t \n\t\t\t}",
"private void export() {\n\t\tProduction[] p = editingGrammarModel.getProductions();\n\t/*\tSystem.out.println(\"PRINTTITTING\");\n\t\tfor (int i=0; i<p.length; i++)\n\t\t{\n\t\t\tSystem.out.println(p[i]);\n\t\t}*/\n\t\ttry {\n\t\t\tp = CNFConverter.convert(p);\n\t\t} catch (UnsupportedOperationException e) {\n\t\t\tJOptionPane.showMessageDialog(this, e.getMessage(), \"Export Error\",\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tGrammar g = (Grammar) grammar.getClass().newInstance();\n\t\t\tg.addProductions(p);\n\t\t\tg.setStartVariable(grammar.getStartVariable());\n\t\t\tFrameFactory.createFrame(g);\n\t\t} catch (Throwable e) {\n\t\t\tSystem.err.println(e);\n\t\t}\n\t}",
"public void print() {\n\t\tSystem.out.println(\"document \" + name + \" is printing...\");\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update the timestamps for the folders specified and notifies on the recent folder URI. | private int updateTimestamp(final Context context, String id, Uri[] folders){
int updated = 0;
final long now = System.currentTimeMillis();
final ContentResolver resolver = context.getContentResolver();
final ContentValues touchValues = new ContentValues();
for (int i=0, size=folders.length; i < size; ++i) {
touchValues.put(MailboxColumns.LAST_TOUCHED_TIME, now);
LogUtils.d(TAG, "updateStamp: %s updated", folders[i]);
updated += resolver.update(folders[i], touchValues, null, null);
}
final Uri toNotify =
UIPROVIDER_RECENT_FOLDERS_NOTIFIER.buildUpon().appendPath(id).build();
LogUtils.d(TAG, "updateTimestamp: Notifying on %s", toNotify);
resolver.notifyChange(toNotify, null);
return updated;
} | [
"public void findFoldersLastUpdateTimeIn() {\n AdhocQueryRequest req = getQueryRequest(XDSConstants.XDS_FindFolders, XDSConstants.QUERY_RETURN_TYPE_LEAF, DEFAULT_PARAMS);\n Calendar cal = Calendar.getInstance();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMddHHmmss\");\n String now = sdf.format(cal.getTime());\n cal.add(Calendar.YEAR, -1);\n String lastYear = sdf.format(cal.getTime());\n addQueryParam(XDSConstants.QRY_FOLDER_LAST_UPDATE_TIME_FROM, lastYear);\n addQueryParam(XDSConstants.QRY_FOLDER_LAST_UPDATE_TIME_TO, now);\n AdhocQueryResponse rsp = session.documentRegistryRegistryStoredQuery(req);\n new QueryResultCheck().setNrOfFolders(2).setNrOfDocs(0).setNrOfSubmissions(0)\n .setNrOfAssocs(0).checkResponse(rsp);\n }",
"private int uiUpdateRecentFolders(Uri uri, ContentValues values) {\n final int numFolders = values.size();\n final String id = uri.getPathSegments().get(1);\n final Uri[] folders = new Uri[numFolders];\n final Context context = getContext();\n final NotificationController controller = NotificationController.getInstance(context);\n int i = 0;\n for (final String uriString: values.keySet()) {\n folders[i] = Uri.parse(uriString);\n try {\n final String mailboxIdString = folders[i].getLastPathSegment();\n final long mailboxId = Long.parseLong(mailboxIdString);\n controller.cancelNewMessageNotification(mailboxId);\n } catch (NumberFormatException e) {\n // Keep on going...\n }\n }\n return updateTimestamp(context, id, folders);\n }",
"public void updateFolder(){\n\t\t\n\t\timaproc.updateFolder();\n\t\tsetChanged();\n\t\tnotifyObservers();\n\t\tSystem.out.println(\"UPDATED\");\n\n\t}",
"void updateFolderPublishInfo(List<Folder> folders, String publishedAuthor, Date publishedDate)\n throws JackrabbitException;",
"public void findFoldersLastUpdateTimeOut() {\n AdhocQueryRequest req = getQueryRequest(XDSConstants.XDS_FindFolders, XDSConstants.QUERY_RETURN_TYPE_LEAF, DEFAULT_PARAMS);\n addQueryParam(XDSConstants.QRY_FOLDER_LAST_UPDATE_TIME_FROM, \"2001\");\n addQueryParam(XDSConstants.QRY_FOLDER_LAST_UPDATE_TIME_TO, \"2003\");\n AdhocQueryResponse rsp = session.documentRegistryRegistryStoredQuery(req);\n new QueryResultCheck().setNrOfFolders(0).setNrOfDocs(0).setNrOfSubmissions(0)\n .setNrOfAssocs(0).checkResponse(rsp);\n }",
"void touchAllFolders() throws ServiceException {\n for (Folder folder : mMailbox.listAllFolders()) {\n if (folder.getItemCount() > 0) {\n folder.updateHighestMODSEQ();\n }\n }\n }",
"public boolean changeTimeAttribute(String date, String time, String folderPath, Boolean ifChangeSubdirs, Boolean ifChangeFiles, Boolean ifChangeRoot, Boolean ifPrompt) throws IOException, ParseException { \n long milliseconds = convertCalendarDateTimeHourMinSecToMillisecondsAsLong(date + \" \" + time);\n folderPath = folderPath.replace(\"\\\\\", \"/\");\n if(folderPath.endsWith(\"/\")) { folderPath = folderPath.substring(0, folderPath.length() - 1); }\n File dir = new File(folderPath);\n String dirTimeStamp = getLastModifiedTimeStamp(dir);\n String how = \"\", action = null;\n Boolean success = false;\n Boolean current = false;\n if (dir.exists() && dir.isDirectory()) { \n try{ \n success = true;\n String[] children = dir.list();\n if(children.length > 0) {\n action = \"TIME RESET\";\n for (int i = 0; i < children.length; i++) {\n File child = new File(dir, children[i]);\n String childTimeStamp = getLastModifiedTimeStamp(child);\n if(child.isDirectory()){ if(ifChangeSubdirs) { child.setLastModified(milliseconds); } if(ifPrompt && ifChangeSubdirs) {System.out.print(\"DIRECTORY \");} }\n else { if(ifChangeFiles) { child.setLastModified(milliseconds); } if(ifPrompt && ifChangeFiles) {System.out.print(\" FILE \");} }\n \n current = child.exists() && !getLastModifiedTimeStamp(child).equals(childTimeStamp);\n success = success && current;\n if(current) { how = \"TIME CHANGED: \\\"\"; } else { how = \"TIME NOT CHANGED: \\\"\"; }\n if(ifPrompt) System.out.print(how + child.getAbsolutePath() + \"\\n\");\n }\n }\n // THE DIRECTORY IS EMPTY - DELETE IT IF REQUIRED\n if (ifChangeRoot) { dir.setLastModified(milliseconds); success = success && dir.exists() && !getLastModifiedTimeStamp(dir).equals(dirTimeStamp); action = \"TIME CHANGED\"; }\n if(ifPrompt && (!action.equals(null))) {\n if (success) { \n System.out.println(\"\\n\" + \"FULLY \" + action + \" DIRECTORY: \\\"\" + folderPath.substring(folderPath.lastIndexOf(\"/\") + 1, folderPath.length()) + \"\\\"\\n\");\n } else {\n System.out.println(\"\\n\" + \"NOT FULLY \" + action + \" DIRECTORY: \\\"\" + folderPath.substring(folderPath.lastIndexOf(\"/\") + 1, folderPath.length()) + \"\\\"\\n\");\n }\n }\n } catch (Exception e) {} \n }\n return success;\n }",
"private void observeFolder() {\n folderObserver = new Thread(new Runnable() {\n @Override\n public void run() {\n while (true) {\n List<String> newFileList = FileManager.listDir(path);\n Hashtable<String, List<String>> diff = FileManager.compareLists(filesList, newFileList);\n try {\n sendAdded(diff.get(\"Added\"));\n sendDeleted(diff.get(\"Deleted\"));\n } catch (IOException e) {\n throw new StreamException(\"Error with sending files to server\");\n }\n filesList.clear();\n filesList.addAll(newFileList);\n }\n }\n });\n folderObserver.setDaemon(true);\n folderObserver.start();\n }",
"private void watchDirectory() {\n WatchKey key;\n key = watchService.poll();\n if (key != null) {\n for (WatchEvent<?> event : key.pollEvents()) {\n Path newFileName = (Path) event.context();\n String fileName = newFileName.toFile().getName();\n if (fileName.endsWith(\".log\")) {\n LOG.info(\"New logfile found: {}\", newFileName);\n listeners.forEach(listener ->\n listener.fireNotification(\n new EventNotification(\"New log\", \"There is a new log file: \" + fileName, NotificationType.INFORMATION)));\n }\n }\n key.reset();\n }\n\n }",
"@Override\n\tpublic void update(Observable watchDirectory, Object arg1) {\n\n\t\tif (watchDirectory instanceof WatchDirectory) {\n\t\t\tWatchDirectory watch = (WatchDirectory) watchDirectory;\n\t\t\tlong time = watch.getTimeConfigFile();\n\t\t\tString fileChanged = watch.getFileChanged();\n\t\t\tPattern regexPhysical = Pattern.compile(\"(?:/physical\\\\d*.xml|/physical.xml|/physical\\\\d*.conf|/physical.conf)\");\n\t\t\tMatcher regexMatcherPhysical = regexPhysical.matcher(fileChanged);\n\t\t\tPattern regexVirtual = Pattern.compile(\"(?:/request\\\\d*.xml|/request.xml|/request\\\\d*.conf|/request.conf)\");\n\t\t\tMatcher regexMatcherVirtual = regexVirtual.matcher(fileChanged);\n\t\t\tif(time > this.timeStampCreatePhysicalNetwork && (regexMatcherPhysical.find())){\n\t\t\t\tthis.timeStampCreatePhysicalNetwork = time;\n\t\t\t\ttry {\n\t\t\t\t\tInputStream is = new FileInputStream(fileChanged);\n\t\t\t\t\twhile (true){\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (is.available() != 0){\n\t\t\t\t\t\t\t\tis.close();\n\t\t\t\t\t\t\t\tbreak;\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\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tThread.sleep(3300);\n\t\t\t\t\tenvironmentOfServers.initEnvironmentOfServers(fileChanged, false);\n\t\t\t\t\tThread.sleep(3300);\n\t\t\t\t\tthis.populateServerIDAndDatapathidToServer();\n\t\t\t\t\tThread.sleep(3300);\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tthis.canInitEnvironmentOfTenants = true;\n\t\t\t}\n\t\t\tif(time > this.timeStampCreateVirtualNetwork && (regexMatcherVirtual.find())){\n\n\t\t\t\tthis.timeStampCreateVirtualNetwork = time;\n\t\t\t\twhile(true){\n\t\t\t\t\tif(this.canInitEnvironmentOfTenants){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tInputStream is = null;\n\t\t\t\ttry {\n\t\t\t\t\tis = new FileInputStream(fileChanged);\n\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\twhile (true){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (is.available() != 0){\n\t\t\t\t\t\t\tis.close();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n//\t\t\t\ttry {\n//\t\t\t\t\tif(environmentOfTenants.initEnvironmentOfTenantsRequest(fileChanged, this.environmentOfServers, this.socket, this.clientChangeInfoOrquestrator)){\n//\t\t\t\t\t\t//TODO uncomment\n//\t\t\t\t\t\tthis.handleIOFSwitches();\n//\t\t\t\t\t\tthis.populateInfoSwitchTenantMap2();\n//\t\t\t\t\t\tfor(int i = 0; i < this.linkArrayList.size(); i++){\n//\t\t\t\t\t\t\tthis.populateInfoLinks(this.linkArrayList.get(i));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tthis.populateDatapathIdSwitchSrcSwitchDstLinkMap();\n//\t\t\t\t\t\t//TODO uncomment\n//\t\t\t\t\t\tthis.insertAllFlowsProactivily(this.environmentOfTenants, start);\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\tlog.info(\"Finish!!!!\");\n\t\t\t}\n\t\t}\n\t}",
"void update(Folder folder) throws JackrabbitException;",
"private int uiPopulateRecentFolders(Uri uri) {\n final Context context = getContext();\n final String id = uri.getLastPathSegment();\n final Uri[] recentFolders = defaultRecentFolders(id);\n final int numFolders = recentFolders.length;\n if (numFolders <= 0) {\n return 0;\n }\n final int rowsUpdated = updateTimestamp(context, id, recentFolders);\n LogUtils.d(TAG, \"uiPopulateRecentFolders: %d folders changed\", rowsUpdated);\n return rowsUpdated;\n }",
"private void syncRecentEvents() {\n\t\tAcalDateTime from = new AcalDateTime().applyLocalTimeZone().addDays(-32).shiftTimeZone(\"UTC\");\n\t\tAcalDateTime until = new AcalDateTime().applyLocalTimeZone().addDays(+68).shiftTimeZone(\"UTC\");\n\n\t\tif (Constants.LOG_DEBUG)\n\t\t\tLog.println(Constants.LOGD,TAG, \"Doing a recent sync of events from \"+from.toString()+\" to \"+until.toString());\t\t\t\n\n\t\tDavNode root;\n\t\ttry {\n\t\t\troot = requestor.doXmlRequest(\"REPORT\", collectionPath, SynchronisationJobs.getReportHeaders(1),\n\t\t\t\t\tString.format(calendarQuery, from.fmtIcal(), until.fmtIcal()));\n\t\t}\n\t\tcatch ( SSLHandshakeException e ) {\n\t\t\tLog.w(TAG,\"SSL Handshake Exception\", e);\n\t\t\treturn;\n\t\t}\n\n\t\tif ( root == null ) {\n\t\t\tLog.println(Constants.LOGD,TAG, \"REPORT failed for events \"+from.toString()+\" to \"+until.toString()+\" on \"+requestor.fullUrl());\n\t\t\treturn;\n\t\t}\n\n\t\t//ArrayList<ResourceModification> changeList = new ArrayList<ResourceModification>(); \n\t\tDMQueryList queryList = processor.getNewQueryList();\n\n\t\tList<DavNode> responses = root.getNodesFromPath(\"multistatus/response\");\n\n\t\tfor (DavNode response : responses) {\n\t\t\tString name = response.segmentFromFirstHref(\"href\");\n\t\t\tContentValues cv = null;\n\t\t\tArrayList<ContentValues> cvList = processor.query(null,\n\t\t\t\t\t\t\t\t\t\tResourceTableManager.COLLECTION_ID+\"=? AND \"+ResourceTableManager.RESOURCE_NAME+\"=?\",\n\t\t\t\t\t\t\t\t\t\tnew String[] {Long.toString(collectionId), name}, null, null, null);\n\t\t\tif (!cvList.isEmpty()) cv = cvList.get(0);\n\n\t\t\t//WriteActions action = WriteActions.UPDATE;\n\t\t\tDMQueryBuilder builder = processor.getNewQueryBuilder();\n\t\t\tbuilder.setAction(QUERY_ACTION.UPDATE);\n\t\t\tif ( cv == null ) {\n\t\t\t\tcv = new ContentValues();\n\t\t\t\tcv.put(ResourceTableManager.COLLECTION_ID, collectionId);\n\t\t\t\tcv.put(ResourceTableManager.RESOURCE_NAME, name);\n\t\t\t\tcv.put(ResourceTableManager.NEEDS_SYNC, 1);\n\t\t\t\tbuilder.setAction(QUERY_ACTION.INSERT);\n\t\t\t\t//action= WriteActions.INSERT;\n\t\t\t} else {\n\t\t\t\tbuilder.setWhereClause(ResourceTableManager.RESOURCE_ID+\" = ?\")\n\t\t\t\t\t.setwhereArgs(new String[]{cv.getAsString(ResourceTableManager.RESOURCE_ID)});\n\t\t\t}\n\t\t\tif ( !parseResponseNode(response, cv) ) continue;\n\n\t\t\t//changeList.add( new ResourceModification(action,cv,null));\n\t\t\tbuilder.setValues(cv);\n\t\t\tqueryList.addAction(builder.build());\n\t\t}\n\n\t\t//ResourceModification.commitChangeList(acalService, changeList, processor.getTableName());\n\t\tprocessor.processActions(queryList);\n\n\t}",
"private void checkChanges(final String path) {\n for(String root : roots) {\n if (path.startsWith(root)) {\n logger.info(\"Got event for root {}, scheduling scanning of new folders\", root);\n updateFoldersListTimer.scheduleScan();\n }\n }\n }",
"public FolderMonitor() {\n\n xmlFolder = Paths.get(DEFAULTT_FOLDER_PATH);\n\n try {\n\n watchService = FileSystems.getDefault().newWatchService();\n xmlFolder.register(watchService, StandardWatchEventKinds.ENTRY_CREATE, StandardWatchEventKinds.ENTRY_MODIFY);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"private void updateAllFoldersTreeSet() throws MessagingException {\n\n Folder[] allFoldersArray = this.store.getDefaultFolder().list(\"*\");\n TreeSet<Folder> allFoldersTreeSet =\n new TreeSet<Folder>(new FolderByFullNameComparator());\n\n for(int ii = 0; ii < allFoldersArray.length; ii++) {\n\n allFoldersTreeSet.add(allFoldersArray[ii]);\n }\n\n this.allFolders = allFoldersTreeSet;\n }",
"void setLastUpdatedTime();",
"public void startWatching() {\n LOG.info(\"Started watching {} directory for new log files\", dirPath);\n taskHandle = service.scheduleAtFixedRate(this, refreshInterval, refreshInterval, TimeUnit.MILLISECONDS);\n }",
"private void processFolders(List<File> folderList, java.io.File parentFolder) {\n // process each folder to see if it needs to be updated;\n for (File f : folderList) {\n String folderName = f.getTitle();\n java.io.File localFolder = new java.io.File(parentFolder, folderName);\n Log.e(\"folder\",localFolder.getAbsolutePath());\n if (!localFolder.exists())\n localFolder.mkdirs();\n getFolderContents(f, localFolder);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the CEDEXBureauInternal field. | public void setCEDEXBureauInternal(java.lang.String value) {
__getInternalInterface().setFieldValueForCodegen(CEDEXBUREAUINTERNAL_PROP.get(), value);
} | [
"public void setCEDEXBureauInternal(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(CEDEXBUREAUINTERNAL_PROP.get(), value);\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getCEDEXBureauInternal() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(CEDEXBUREAUINTERNAL_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getCEDEXBureauInternal() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(CEDEXBUREAUINTERNAL_PROP.get());\n }",
"public void setBungaBank(double bungaBank) {\n this.bungaBank = bungaBank;\n }",
"public void placerBateauSurVue() {\n\t\tint compteur = 1;\n\t\tif (partie.verifierSiPoseBateauPossible()) {\n\t\t\tfor (int i : partie.getJoueur().getBateau()[partie.getJoueur().getIndiceBateauEnCours()].getCaseOnId()) {\n\t\t\t\tif (i != -1)\n\t\t\t\t\tvue.setfield(i, partie.getJoueur().getBateau()[partie.getJoueur().getIndiceBateauEnCours()]\n\t\t\t\t\t\t\t.getImageDirectoryFinal(), compteur, true);\n\n\t\t\t\tcompteur++;\n\t\t\t}\n\t\t} else {\n\t\t\tfor (int i : partie.getJoueur().getBateau()[partie.getJoueur().getIndiceBateauEnCours()].getCaseOnId()) {\n\t\t\t\tif (i != -1)\n\t\t\t\t\tvue.setfield(i, partie.getJoueur().getBateau()[partie.getJoueur().getIndiceBateauEnCours()]\n\t\t\t\t\t\t\t.getImageDirectoryFinal(), compteur, false);\n\n\t\t\t\tcompteur++;\n\t\t\t}\n\t\t}\n\t}",
"public void setGUARANTOR_CIF(BigDecimal GUARANTOR_CIF)\r\n {\r\n\tthis.GUARANTOR_CIF = GUARANTOR_CIF;\r\n }",
"public void setUsableCash(BigDecimal usableCash) {\r\n this.usableCash = usableCash;\r\n }",
"public void setBalorazioenBB(double balorazioenBB);",
"public void setCountyInternal(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(COUNTYINTERNAL_PROP.get(), value);\n }",
"public void setUsableBill(BigDecimal usableBill) {\r\n this.usableBill = usableBill;\r\n }",
"public void setCellUpperPrice(double cellUpperPrice) {\r\n\t\tCellUpperPrice = cellUpperPrice;\r\n\t}",
"private void setCountyInternal(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(COUNTYINTERNAL_PROP.get(), value);\n }",
"public void setInternal(boolean internal)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INTERNAL$4, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(INTERNAL$4);\n }\n target.setBooleanValue(internal);\n }\n }",
"public void setBENEF_CITY(BigDecimal BENEF_CITY) {\r\n this.BENEF_CITY = BENEF_CITY;\r\n }",
"public void setUserrefundMoneyreal(BigDecimal userrefundMoneyreal) {\n this.userrefundMoneyreal = userrefundMoneyreal;\n }",
"public void setCreditBureaus(java.lang.String creditBureaus) {\n this.creditBureaus = creditBureaus;\n }",
"public void setBSCA_ProfitPriceLimit (BigDecimal BSCA_ProfitPriceLimit);",
"public void setDEAL_COLL_VALUE(BigDecimal DEAL_COLL_VALUE) {\r\n this.DEAL_COLL_VALUE = DEAL_COLL_VALUE;\r\n }",
"public void setCEDEXInternal(java.lang.Boolean value) {\n __getInternalInterface().setFieldValue(CEDEXINTERNAL_PROP.get(), value);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Lists the assessment templates that correspond to the assessment targets that are specified by the ARNs of the assessment targets. | java.util.concurrent.Future<ListAssessmentTemplatesResult> listAssessmentTemplatesAsync(ListAssessmentTemplatesRequest listAssessmentTemplatesRequest,
com.amazonaws.handlers.AsyncHandler<ListAssessmentTemplatesRequest, ListAssessmentTemplatesResult> asyncHandler); | [
"java.util.concurrent.Future<ListAssessmentTemplatesResult> listAssessmentTemplatesAsync(ListAssessmentTemplatesRequest listAssessmentTemplatesRequest);",
"public Collection findTemplatesByOwner(Agent owner);",
"public List<InsightsAssessmentReportTemplate> getAllReportTemplatesList() {\n\t\ttry {\n\t\t\tMap<String,Object> parameters = new HashMap<>();\n\t\t\treturn getResultList(\n\t\t\t\t\t\"FROM InsightsAssessmentReportTemplate RE\",\n\t\t\t\t\tInsightsAssessmentReportTemplate.class,\n\t\t\t\t\tparameters);\n\t\t} catch (Exception e) {\n\t\t\tlog.error(e);\n\t\t\tthrow e;\n\t\t}\n\n\t}",
"public ResultSet getAllQuestionnaireTemplates () throws Exception {\r\n String sql = \"SELECT * FROM questionnairetemplates;\";\r\n return stmt.executeQuery(sql);\r\n }",
"public List<InsightsAssessmentReportTemplate> getAllReportTemplates() {\n\t\ttry {\n\t\t\tMap<String,Object> parameters = new HashMap<>();\n\t\t\treturn getResultList(\n\t\t\t\t\t\"FROM InsightsAssessmentReportTemplate RE where RE.isActive =TRUE ORDER BY RE.reportId\",\n\t\t\t\t\tInsightsAssessmentReportTemplate.class,\n\t\t\t\t\tparameters);\n\t\t} catch (Exception e) {\n\t\t\tlog.error(e);\n\t\t\tthrow e;\n\t\t}\n\n\t}",
"List<Template> getTemplates() throws AccessDeniedException;",
"public Collection findTemplatesByOwner(Agent owner, String siteId);",
"ImmutableList<TemplateMetadata> getAllTemplates() {\n return ImmutableList.copyOf(templateNamesToValues.values());\n }",
"java.util.concurrent.Future<ListAssessmentTargetsResult> listAssessmentTargetsAsync(ListAssessmentTargetsRequest listAssessmentTargetsRequest);",
"java.util.concurrent.Future<DescribeAssessmentTemplatesResult> describeAssessmentTemplatesAsync(\n DescribeAssessmentTemplatesRequest describeAssessmentTemplatesRequest);",
"@GetMapping(\"/analysis-templates\")\n\tpublic List<AnalysisTemplate> getProjectAnalysisTemplates(@PathVariable long projectId, Locale locale) {\n\t\treturn pipelineService.getProjectAnalysisTemplates(projectId, locale);\n\t}",
"public List<String> getTemplates() {\r\n\t\treturn this.templates;\r\n\t}",
"@RequestMapping(value = \"/coupon-template/template/sdk/all\",\n method = RequestMethod.GET)\n CommonResponse<List<CouponTemplateSDK>> findAllUsableTemplate();",
"@Test\n public void getArtistTemplatesTest() {\n Integer size = null;\n Integer page = null;\n String order = null;\n // PageResourceTemplateResource response = api.getArtistTemplates(size, page, order);\n\n // TODO: test validations\n }",
"@RequestMapping(value = \"/getAllTemplates\", method = RequestMethod.GET)\r\n\tprotected @ResponseBody String getAllTemplates()\r\n\t{\t\t\t\r\n\t\tString[] templates = NOpenFileUtil.getAllTemplateJSONFileNames();\r\n\t\treturn NOpenFileUtil.parseStringToJSON(\"template\", templates);\t\t\r\n\t}",
"HashMap<String, Template> getTemplates();",
"public Collection<String> getTemplates() {\n for (String templateRootUrl : templateRootUrls) {\n \tString trimmedTemplateRootUrl = templateRootUrl.trim();\n \tif (trimmedTemplateRootUrl.isEmpty()) continue;\n \t\tString templateListUrl = trimmedTemplateRootUrl + \"/templatelist.txt\";\n \t\tCollection<String> templates = getTemplates(templateListUrl);\n \t\tif (templates != null) {\n \t\t\tlogger.debug(\"Loaded template list from '\" + templateListUrl + \"'\");\n \t\treturn templates;\n \t\t}\n \t\t// else: log a warning and try next URL\n \t\tlogger.error2(\"Failed loading template list from '\" + templateListUrl + \"', server not available?\");\n }\n return null; // complete fail\n }",
"TemplateList getAllTemplates(String templateType) throws NotificationClientException;",
"@RequestMapping(\n value = \"/list\",\n method = RequestMethod.GET,\n produces = \"application/json;charset=UTF-8\")\n @ResponseBody\n public List<AWVesselTargetVo> getTargetList(\n @RequestParam(value=\"ttlLive\", required = false) String ttlLive,\n @RequestParam(value=\"ttlSat\", required = false) String ttlSat,\n @RequestParam(value=\"mmsi\", required = false) String[] mmsi,\n @RequestParam(value=\"geo\", required = false) String[] geo\n ) {\n long t0 = System.currentTimeMillis();\n AWTargetFilter filter = new AWTargetFilter();\n\n if (StringUtils.isNotBlank(ttlLive)) {\n filter.setTtlLive(Duration.parse(ttlLive).getSeconds());\n }\n if (StringUtils.isNotBlank(ttlSat)) {\n filter.setTtlSat(Duration.parse(ttlSat).getSeconds());\n }\n if (mmsi != null && mmsi.length > 0) {\n filter.setMmsis(Arrays.asList(mmsi).stream().collect(Collectors.toSet()));\n }\n if (geo != null && geo.length > 0) {\n filter.setGeos(Arrays.asList(geo).stream().map(AWTargetFilter::getGeometry).collect(Collectors.toList()));\n }\n\n List<VesselTarget> result = targetStore.list().stream()\n .filter(filter::test)\n .collect(Collectors.toList());\n\n LOG.info(String.format(\"/list returned %d targets in %d ms\", result.size(), System.currentTimeMillis() - t0));\n return result.stream()\n .map(AWVesselTargetVo::new)\n .collect(Collectors.toList());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
29. Name of the Function: ClearRecord Desc: Clears the currenct record Base Location:O:\EBS QA\WR2OATS\GMS_OATS\12.2\Library\palib Clears the Record | public void ClearRecord()throws Exception{
/*Select Clear Record option from menu*/
forms.window("//forms:window[(@enabled='true')]").selectMenu("Edit|Clear|Record");
} | [
"@ActionTrigger(action=\"KEY-CLRREC\", function=KeyFunction.CLEAR_RECORD)\n\t\tpublic void sovlcur_ClearRecord()\n\t\t{\n\t\t\t\n\t\t\t\tgetSoqolibSovlcurController().sovlcur_ClearRecord();\n\t\t\t}",
"@ActionTrigger(action=\"KEY-DELREC\", function=KeyFunction.DELETE_RECORD)\n\t\tpublic void sovlcur_DeleteRecord()\n\t\t{\n\t\t\t\n\t\t\t\tgetSoqolibSovlcurController().sovlcur_DeleteRecord();\n\t\t\t}",
"public String _clear() throws Exception{\n_changelength((int) (0));\n //BA.debugLineNum = 41;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"public void testClearTestRecord()\n {\n\t String type = new String(\"reading\");\n\t String user_name = new String(\"rof_guest\");\n\t File path_file = new File(\"\");\n\t String root_path = path_file.getAbsolutePath();\n\t FileTestRecords ftr = new FileTestRecords();\n\t ftr.clearTestRecord(type, user_name, root_path);\n\t //dumpLog(ftr.getLog());\n\t FileStorage store = new FileStorage(root_path);\n\t Hashtable user_opts = store.getUserOptions(user_name, root_path);\n\t Vector tests = ftr.getDailyTestRecords(user_name, type, root_path, user_opts);\n\t int expected_size = 0;\n\t int actual_size = tests.size();\n\t assertEquals(expected_size, actual_size);\n }",
"private void clearList(){\n this.recordList.clear();\n }",
"public void deleteRecord()\r\n {\r\n this.active=false;\r\n }",
"private void clearRecord() {\n // Clearing current booking information from sharedPreference\n SharedPreferences.Editor editor = sharedpreferences.edit();\n editor.clear();\n editor.commit();\n shutdown();\n }",
"public void clear() {\r\n\t history = \"0 \";\r\n }",
"public void deleteMedicalOfficer(){\n if(AlertService.optionalPlane(\"Would you like to Delete the Medical officer Record?\", \"Warning!\")==JOptionPane.YES_NO_OPTION){\n FileService.deleteRecord(FileService.getMoFilePath(),getModel().toString2()); \n }\n this.updateView(); \n \n }",
"private void clearChatRecordRsp() {\n if (rspCase_ == 11) {\n rspCase_ = 0;\n rsp_ = null;\n }\n }",
"void emptyRecord(String key);",
"void unsetRecorder();",
"public void clear() {\r\n total = 0;\r\n history = \"0\";\r\n\t}",
"public void clear() {\n\tendString = \"0\";\n\ttotal = 0;\n\t}",
"public void deleteRecord() {\n\t\tif (check.isSomeoneToDisplay()) {\n\n\t\t\tint returnVal = JOptionPane.showOptionDialog(frame, \"Do you want to delete record?\", \"Delete\",\n\t\t\t\t\tJOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE, null, null, null);\n\n\t\t\tif (returnVal == JOptionPane.YES_OPTION) {\n\n\t\t\t\tapplication.openWriteFile(file.getAbsolutePath());\n\n\t\t\t\tapplication.deleteRecords(currentByteStart);\n\t\t\t\tapplication.closeWriteFile();\n\n\t\t\t\tif (check.isSomeoneToDisplay()) {\n\t\t\t\t\trecord.nextRecord();\n\t\t\t\t\tdisplayRecords.displayRecords(currentEmployee);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public String revokeFinanceForwardUpdateRecord(String docType, String inpRecordId)\n throws Exception;",
"public void deleteRecordReturn(RecordReturn recordreturn_1);",
"private void btnClearActionPerformed(java.awt.event.ActionEvent evt) {\n clear();\n }",
"public static void clearPatientData() {\r\n patientName = \"\";\r\n patientNHSNumber = \"\";\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the number of p r registrations where groupId = &63; and datePurchased = &63;. | @Override
public int countByG_DP(long groupId, Date datePurchased)
throws SystemException {
FinderPath finderPath = FINDER_PATH_COUNT_BY_G_DP;
Object[] finderArgs = new Object[] { groupId, datePurchased };
Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs,
this);
if (count == null) {
StringBundler query = new StringBundler(3);
query.append(_SQL_COUNT_PRREGISTRATION_WHERE);
query.append(_FINDER_COLUMN_G_DP_GROUPID_2);
boolean bindDatePurchased = false;
if (datePurchased == null) {
query.append(_FINDER_COLUMN_G_DP_DATEPURCHASED_1);
}
else {
bindDatePurchased = true;
query.append(_FINDER_COLUMN_G_DP_DATEPURCHASED_2);
}
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
qPos.add(groupId);
if (bindDatePurchased) {
qPos.add(CalendarUtil.getTimestamp(datePurchased));
}
count = (Long)q.uniqueResult();
FinderCacheUtil.putResult(finderPath, finderArgs, count);
}
catch (Exception e) {
FinderCacheUtil.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return count.intValue();
} | [
"@Override\n\tpublic int filterCountByG_DP(long groupId, Date datePurchased)\n\t\tthrows SystemException {\n\t\tif (!InlineSQLHelperUtil.isEnabled(groupId)) {\n\t\t\treturn countByG_DP(groupId, datePurchased);\n\t\t}\n\n\t\tStringBundler query = new StringBundler(3);\n\n\t\tquery.append(_FILTER_SQL_COUNT_PRREGISTRATION_WHERE);\n\n\t\tquery.append(_FINDER_COLUMN_G_DP_GROUPID_2);\n\n\t\tboolean bindDatePurchased = false;\n\n\t\tif (datePurchased == null) {\n\t\t\tquery.append(_FINDER_COLUMN_G_DP_DATEPURCHASED_1);\n\t\t}\n\t\telse {\n\t\t\tbindDatePurchased = true;\n\n\t\t\tquery.append(_FINDER_COLUMN_G_DP_DATEPURCHASED_2);\n\t\t}\n\n\t\tString sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(),\n\t\t\t\tPRRegistration.class.getName(),\n\t\t\t\t_FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);\n\n\t\tSession session = null;\n\n\t\ttry {\n\t\t\tsession = openSession();\n\n\t\t\tSQLQuery q = session.createSQLQuery(sql);\n\n\t\t\tq.addScalar(COUNT_COLUMN_NAME,\n\t\t\t\tcom.liferay.portal.kernel.dao.orm.Type.LONG);\n\n\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\tqPos.add(groupId);\n\n\t\t\tif (bindDatePurchased) {\n\t\t\t\tqPos.add(CalendarUtil.getTimestamp(datePurchased));\n\t\t\t}\n\n\t\t\tLong count = (Long)q.uniqueResult();\n\n\t\t\treturn count.intValue();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow processException(e);\n\t\t}\n\t\tfinally {\n\t\t\tcloseSession(session);\n\t\t}\n\t}",
"public int countByG_DP(long groupId, java.util.Date datePurchased)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public java.util.List<com.inkwell.internet.productregistration.model.PRRegistration> findByG_DP(\n\t\tlong groupId, java.util.Date datePurchased)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"@Override\n\tpublic List<PRRegistration> filterFindByG_DP(long groupId,\n\t\tDate datePurchased) throws SystemException {\n\t\treturn filterFindByG_DP(groupId, datePurchased, QueryUtil.ALL_POS,\n\t\t\tQueryUtil.ALL_POS, null);\n\t}",
"public int countByG_R(long groupId, long rutaId);",
"@Override\n\tpublic int countByG_RU(long groupId, long prUserId)\n\t\tthrows SystemException {\n\t\tFinderPath finderPath = FINDER_PATH_COUNT_BY_G_RU;\n\n\t\tObject[] finderArgs = new Object[] { groupId, prUserId };\n\n\t\tLong count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs,\n\t\t\t\tthis);\n\n\t\tif (count == null) {\n\t\t\tStringBundler query = new StringBundler(3);\n\n\t\t\tquery.append(_SQL_COUNT_PRREGISTRATION_WHERE);\n\n\t\t\tquery.append(_FINDER_COLUMN_G_RU_GROUPID_2);\n\n\t\t\tquery.append(_FINDER_COLUMN_G_RU_PRUSERID_2);\n\n\t\t\tString sql = query.toString();\n\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(sql);\n\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\t\tqPos.add(groupId);\n\n\t\t\t\tqPos.add(prUserId);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tFinderCacheUtil.putResult(finderPath, finderArgs, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tFinderCacheUtil.removeResult(finderPath, finderArgs);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}",
"@Override\n\tpublic List<PRRegistration> findByG_DP(long groupId, Date datePurchased)\n\t\tthrows SystemException {\n\t\treturn findByG_DP(groupId, datePurchased, QueryUtil.ALL_POS,\n\t\t\tQueryUtil.ALL_POS, null);\n\t}",
"public com.inkwell.internet.productregistration.model.PRRegistration findByG_DP_Last(\n\t\tlong groupId, java.util.Date datePurchased,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.inkwell.internet.productregistration.NoSuchRegistrationException,\n\t\t\tcom.liferay.portal.kernel.exception.SystemException;",
"@Override\n\tpublic int filterCountByG_RU(long groupId, long prUserId)\n\t\tthrows SystemException {\n\t\tif (!InlineSQLHelperUtil.isEnabled(groupId)) {\n\t\t\treturn countByG_RU(groupId, prUserId);\n\t\t}\n\n\t\tStringBundler query = new StringBundler(3);\n\n\t\tquery.append(_FILTER_SQL_COUNT_PRREGISTRATION_WHERE);\n\n\t\tquery.append(_FINDER_COLUMN_G_RU_GROUPID_2);\n\n\t\tquery.append(_FINDER_COLUMN_G_RU_PRUSERID_2);\n\n\t\tString sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(),\n\t\t\t\tPRRegistration.class.getName(),\n\t\t\t\t_FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId);\n\n\t\tSession session = null;\n\n\t\ttry {\n\t\t\tsession = openSession();\n\n\t\t\tSQLQuery q = session.createSQLQuery(sql);\n\n\t\t\tq.addScalar(COUNT_COLUMN_NAME,\n\t\t\t\tcom.liferay.portal.kernel.dao.orm.Type.LONG);\n\n\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\tqPos.add(groupId);\n\n\t\t\tqPos.add(prUserId);\n\n\t\t\tLong count = (Long)q.uniqueResult();\n\n\t\t\treturn count.intValue();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow processException(e);\n\t\t}\n\t\tfinally {\n\t\t\tcloseSession(session);\n\t\t}\n\t}",
"public com.inkwell.internet.productregistration.model.PRRegistration fetchByG_DP_Last(\n\t\tlong groupId, java.util.Date datePurchased,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public int countByUUID_G(String uuid, long groupId);",
"public int countByUUID_G(java.lang.String uuid, long groupId);",
"public com.inkwell.internet.productregistration.model.PRRegistration findByG_DP_First(\n\t\tlong groupId, java.util.Date datePurchased,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.inkwell.internet.productregistration.NoSuchRegistrationException,\n\t\t\tcom.liferay.portal.kernel.exception.SystemException;",
"int getRenewalCount();",
"public com.inkwell.internet.productregistration.model.PRRegistration fetchByG_DP_First(\n\t\tlong groupId, java.util.Date datePurchased,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"@Override\n\tpublic int countByUUID_G(String uuid, long groupId) {\n\t\tFinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G;\n\n\t\tObject[] finderArgs = new Object[] { uuid, groupId };\n\n\t\tLong count = (Long)finderCache.getResult(finderPath, finderArgs, this);\n\n\t\tif (count == null) {\n\t\t\tStringBundler query = new StringBundler(3);\n\n\t\t\tquery.append(_SQL_COUNT_REGISTRATIONDETAILS_WHERE);\n\n\t\t\tboolean bindUuid = false;\n\n\t\t\tif (uuid == null) {\n\t\t\t\tquery.append(_FINDER_COLUMN_UUID_G_UUID_1);\n\t\t\t}\n\t\t\telse if (uuid.equals(StringPool.BLANK)) {\n\t\t\t\tquery.append(_FINDER_COLUMN_UUID_G_UUID_3);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbindUuid = true;\n\n\t\t\t\tquery.append(_FINDER_COLUMN_UUID_G_UUID_2);\n\t\t\t}\n\n\t\t\tquery.append(_FINDER_COLUMN_UUID_G_GROUPID_2);\n\n\t\t\tString sql = query.toString();\n\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(sql);\n\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\t\tif (bindUuid) {\n\t\t\t\t\tqPos.add(uuid);\n\t\t\t\t}\n\n\t\t\t\tqPos.add(groupId);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(finderPath, finderArgs, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(finderPath, finderArgs);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}",
"public com.inkwell.internet.productregistration.model.PRRegistration[] findByG_DP_PrevAndNext(\n\t\tlong registrationId, long groupId, java.util.Date datePurchased,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.inkwell.internet.productregistration.NoSuchRegistrationException,\n\t\t\tcom.liferay.portal.kernel.exception.SystemException;",
"@Override\n\tpublic void removeByG_DP(long groupId, Date datePurchased)\n\t\tthrows SystemException {\n\t\tfor (PRRegistration prRegistration : findByG_DP(groupId, datePurchased,\n\t\t\t\tQueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {\n\t\t\tremove(prRegistration);\n\t\t}\n\t}",
"public int countByG_RU(long groupId, long prUserId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Invokes minesButtonClicked method for the registered listeners. | private void fireMinesButtonClicked(MinesButtonEvent mbe) {
for (Enumeration en =listeners.elements(); en.hasMoreElements();) {
MinesButtonListener l = (MinesButtonListener) en.nextElement();
l.minesButtonClicked(mbe);
}
} | [
"public void buttonClicked() {\n mSanitizorGame.buttonClicked();\n }",
"private void addSeaInvadersButtonListener() {\n Button seaInvadersButton = findViewById(R.id.sea_invaders_button);\n seaInvadersButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n switchToSeaInvaders();\n }\n });\n }",
"public void addMinesButtonListener(MinesButtonListener l) {\r\n\t\tif (!listeners.contains(l))\r\n\t\t\tlisteners.add(l);\r\n\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}",
"@Override\r\n\tpublic void startClicked() {\r\n\t\t\r\n\t\tthis.layersExecutor = Executors.newFixedThreadPool(Constants.NUMBER_OF_LAYERS);\r\n\t\tthis.sweepersExecutor = Executors.newFixedThreadPool(Constants.NUMBER_OF_SWEEPERS);\r\n\t\r\n\t\ttry{\r\n\t\t\t\r\n\t\t\tfor(int i=0;i<Constants.NUMBER_OF_LAYERS;i++){\r\n\t\t\t\tmineLayers[i] = new MineLayer(i, board);\r\n\t\t\t\tlayersExecutor.execute(mineLayers[i]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor(int i=0;i<Constants.NUMBER_OF_SWEEPERS;i++){\r\n\t\t\t\tmineSweepers[i] = new MineSweeper(i, board);\r\n\t\t\t\tsweepersExecutor.execute(mineSweepers[i]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tlayersExecutor.shutdown();\r\n\t\t\tsweepersExecutor.shutdown();\r\n\t\t}\t\t\r\n\t}",
"public void clickCheckUpdatesButton() {\n\t\tbtnCheckUpdates.notifyListeners(SWT.Selection, new Event());\n\t}",
"@Override\n public void onClicked(int index, BoomButton boomButton) {\n super.onClicked(index, boomButton);\n\n\n boomButtonsPressed(index);\n\n }",
"public void startClicked() throws Exception {\n\t\tlayersExSvc = Executors.newFixedThreadPool(Constants.NUMBER_OF_LAYERS);\n\t\tmineLayers = new MineLayer[Constants.NUMBER_OF_LAYERS];\n\t\tfor (int i = 0; i < Constants.NUMBER_OF_LAYERS; i++) {\n\t\t\tmineLayers[i] = new MineLayer(i + 1, board);\n\t\t\tlayersExSvc.execute(mineLayers[i]);\n\t\t}\n\n\t\t// setup mine sweepers\n\t\t// start each mine sweeper in a separate thread\n\t\tsweepersExSvc = Executors\n\t\t\t\t.newFixedThreadPool(Constants.NUMBER_OF_SWEEPERS);\n\t\tmineSweepers = new MineSweeper[Constants.NUMBER_OF_SWEEPERS];\n\t\tfor (int i = 0; i < Constants.NUMBER_OF_SWEEPERS; i++) {\n\t\t\tmineSweepers[i] = new MineSweeper(i + 1, board);\n\t\t\tsweepersExSvc.execute(mineSweepers[i]);\n\t\t}\n\t}",
"private void startBtnListener() {\n playerLoading.setBtnStartListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if (playerLoading.playerSelected().isEmpty()) {\n JOptionPane.showMessageDialog(mainFrame, \"Must select a player to load.\",\n \"No Player Selected\", JOptionPane.ERROR_MESSAGE);\n } else {\n // Launch the main game with the selected player.\n Player player = playerListModel.get(playerLoading.playerSelected());\n Player.setPlayerInstance(player);\n ScreenManager.getInstance().getGame().setPlayer(player);\n ScreenManager.getInstance().getGame().setTreasures(treasures);\n ScreenManager.getInstance().getInventory().setPlayer(player);\n ScreenManager.getInstance().getInventory().updateInventoryData();\n mainFrame.setCurrentScreen(ScreenManager.getInstance().getGame());\n JOptionPane.showMessageDialog(mainFrame, GAME_MESSAGE + KEYS_AVAILABLE_MSG);\n mainFrame.requestFocusInWindow();\n }\n }\n });\n }",
"public void onAlienMClick(View view) {\n int playerIndex = arrayIndexOf(m_alienMButtons, view);\n if (playerIndex == -1) {\n return;\n }\n\n addPlayerScore(playerIndex, calcAlienMPoints(playerIndex));\n destroyAlien();\n }",
"public void botones_en_escucha() {\n this.vista.btn_cero.addActionListener(this);\n this.vista.btn_uno.addActionListener(this);\n this.vista.btn_dos.addActionListener(this);\n this.vista.btn_tres.addActionListener(this);\n this.vista.btn_cuatro.addActionListener(this);\n this.vista.btn_cinco.addActionListener(this);\n this.vista.btn_seis.addActionListener(this);\n this.vista.btn_siete.addActionListener(this);\n this.vista.btn_ocho.addActionListener(this);\n this.vista.btn_nueve.addActionListener(this);\n this.vista.btn_dividir.addActionListener(this);\n this.vista.btn_multiplicacion.addActionListener(this);\n this.vista.btn_menos.addActionListener(this);\n this.vista.btn_suma.addActionListener(this);\n this.vista.btn_c.addActionListener(this);\n this.vista.btn_ce.addActionListener(this);\n this.vista.btn_igual.addActionListener(this);\n this.vista.btn_uno_x.addActionListener(this);\n this.vista.btn_mas_menos.addActionListener(this);\n this.vista.btn_punto.addActionListener(this);\n\n }",
"private void setButtonListener() {\n for(CellButton[] buttonsRow : mainFrame.getButtons()) {\n for(CellButton button :buttonsRow) {\n button.addButtonListener(this);\n }\n }\n }",
"void bigButtonClicked(MouseEvent me) {\n\t\tEvent e = new Event();\n\t\te.button = me.button;\n\t\te.data = this;\n\t\te.display = me.display;\n\t\te.stateMask = me.stateMask;\n\t\te.widget = me.widget;\n\t\te.x = me.x;\n\t\te.y = me.y;\n\t\tSelectionEvent se = new SelectionEvent(e);\n\t\t\n\t\tfor (int i = 0; i < mBigButtonListeners.size(); i++) {\n\t\t\tmBigButtonListeners.get(i).widgetSelected(se);\n\t\t}\n\t}",
"public void fireClicked() {\r\n // setHighlighted(false);\r\n\r\n fireClicked(mMessage);\r\n }",
"public void buttonPressed() {\n\t\t\n\t}",
"void addListener() {\r\n for (JButton b : this.buttons) {\r\n if (b.getActionListeners().length == 0) {\r\n b.addActionListener(this.buttonListener);\r\n }\r\n }\r\n }",
"private void minefield ()\r\n {\r\n // a list of all the location of the mines\r\n List < Point > mines = new ArrayList < Point > ();\r\n\r\n // loop through the matrix\r\n for (int row = 0 ; row < rowlen ; row++)\r\n {\r\n for (int col = 0 ; col < collen ; col++)\r\n {\r\n // create a new JButton\r\n // mines, tot no of mines, and a Point as paramater\r\n JButton btn = getField (mines, tot,\r\n // Point being an object with x and y coordinates\r\n new Point (row, col)\r\n {\r\n // redefine the toString and equals methods\r\n @ Override\r\n public String toString (){\r\n return (int) getX () + \", \" + (int) getY ();}\r\n\r\n @ Override\r\n public boolean equals (Object obj){\r\n return ((Point) obj).getX () == getX () && ((Point) obj).getY () == getY ();}\r\n }\r\n );\r\n // add the button to the panel\r\n panel.add (btn);\r\n }\r\n }\r\n // while the bombs are less than specified\r\n while (mines.size () < totmines)\r\n newMinesList (mines, panel.getComponents ());\r\n // loop through the components\r\n for (Component c:panel.getComponents ())\r\n surroundingMines ((Field) c, panel.getComponents ());\r\n\r\n }",
"private void leaderboardBtnListener() {\n leaderboardBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new LeaderboardScreen(game));\n }\n });\n }",
"public void emitClicked() {\n GtkButton.clicked(this);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns report runnable from design file | public static IReportRunnable getRunnableFromDesignFile(
HttpServletRequest request, String designFile, Map options )
throws EngineException
{
IReportRunnable reportRunnable = null;
// check the design file if exist
File file = new File( designFile );
if ( file.exists( ) )
{
reportRunnable = ReportEngineService.getInstance( )
.openReportDesign( designFile, options );
}
else
{
// try to get resource from war package
InputStream is = null;
URL url = null;
try
{
designFile = ParameterAccessor.workingFolder
+ "/" //$NON-NLS-1$
+ ParameterAccessor.getParameter( request,
ParameterAccessor.PARAM_REPORT );
if ( !designFile.startsWith( "/" ) ) //$NON-NLS-1$
designFile = "/" + designFile; //$NON-NLS-1$
url = request.getSession( ).getServletContext( ).getResource(
designFile );
if ( url != null )
is = url.openStream( );
if ( is != null )
reportRunnable = ReportEngineService.getInstance( )
.openReportDesign( url.toString( ), is, options );
}
catch ( Exception e )
{
}
}
return reportRunnable;
} | [
"private IReportRunnable getReportRunnable(String name) throws EngineException {\n \tif (reports.containsKey(name)) {\n \t\treturn reports.get(name);\n \t}\n \tIReportRunnable r = null;\n \tFile reportFile = new File(reportFolder + File.separator + name.replace(\".rptdesign\", \"\") + \".rptdesign\");\n \tif (reportFile.exists()) {\n \t\tr = birtEngine.openReportDesign(reportFile.getAbsolutePath());\n \t\treports.put(name,r ); \n \t} \t\n \treturn r;\n }",
"public abstract ReportDesign buildReportDesign(ReportDefinition reportDefinition);",
"public MasterReport getReportDefinition()\n {\n try\n {\n // Using the classloader, get the URL to the reportDefinition file\n final ClassLoader classloader = this.getClass().getClassLoader();\n final URL reportDefinitionURL = this.getClass().getResource(\"SageReportTemplate.prpt\");\n //final URL reportDefinitionURL = this.getClass().getResource(\"Demo/src/SageReportTemplate.prpt\");\n //final URL reportDefinitionURL = classloader.getResource(\"/src/sample1.prpt\");\n System.out.println(this.getClass().getName());\n System.out.println(reportDefinitionURL);\n //System.out.println(testUrl);\n // Parse the report file\n final ResourceManager resourceManager = new ResourceManager();\n resourceManager.registerDefaults();\n final Resource directly = resourceManager.createDirectly(reportDefinitionURL, MasterReport.class);\n MasterReport report = (MasterReport) directly.getResource();\n report.setQuery(QUERY_NAME);\n report.addPreProcessor(new RelationalAutoGeneratorPreProcessor());\n //return (MasterReport) directly.getResource();\n return report;\n }\n catch (ResourceException e)\n {\n e.printStackTrace();\n }\n return null;\n }",
"Report createReport();",
"public String getReport();",
"public abstract R createReport();",
"@Override\n\tpublic ReportDesign buildReportDesign(ReportDefinition reportDefinition) {\n\t\treturn createExcelTemplateDesign(getExcelDesignUuid(), reportDefinition, \"monthlyDhis2Reporting.xls\");\n\t}",
"public void GenerateReport() {\n \n \n }",
"void showReport(String report);",
"public void runReport(String sReportFile)\n {\n }",
"ReportProvider reportProvider();",
"public String getReportFile() {\n \t\tURL url = null;\n try {\n \tif(size == 96) {\n url = FileLocator.toFileURL( MasterPlateReport.class.getResource( \"masterPlateReport96.rptdesign\" ) );\t\n \t}\n \tif(size == 384) {\n url = FileLocator.toFileURL( MasterPlateReport.class.getResource( \"masterPlateReport384.rptdesign\" ) );\n \t}\n } catch ( IOException e ) {\n throw new RuntimeException(e);\n }\n try {\n \tif(size == 96) {\n \t\t\tchangeFileLocation(\"masterPlateReport96.rptdesign\",\"/home/jonas/runtime-bioclipse.product/tmp\",BioclipseCache.getCacheDir().getAbsolutePath());\t\n \t}\n \tif(size == 384) {\n \t\t\tchangeFileLocation(\"masterPlateReport384.rptdesign\",\"/home/jonas/runtime-bioclipse.product/tmp\",BioclipseCache.getCacheDir().getAbsolutePath());\n \t}\n \t\t} catch (CoreException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\treturn url.getFile();\n \t}",
"private void buildReport() {\n\n\t\tString str;\n\n\t\tif (protectPreBaseline || protectBaselineFromLPTV || protectLPTVFromClassA) {\n\t\t\tstudyReport.append(\"Build options:\\n\");\n\t\t\tif (protectPreBaseline) {\n\t\t\t\tstudyReport.append(\"Protect pre-transition records not on baseline channel\\n\");\n\t\t\t}\n\t\t\tif (protectBaselineFromLPTV) {\n\t\t\t\tstudyReport.append(\"Protect baseline records from LPTV\\n\");\n\t\t\t}\n\t\t\tif (protectLPTVFromClassA) {\n\t\t\t\tstudyReport.append(\"Protect LPTV records from Class A\\n\");\n\t\t\t}\n\t\t\tstudyReport.append('\\n');\n\t\t}\n\n\t\tif (excludeApps || excludePending || (null != filingCutoffDate) || includeForeign || cpExcludesBaseline ||\n\t\t\t\texcludePostTransition || excludeNewLPTV) {\n\t\t\tstudyReport.append(\"Search options:\\n\");\n\t\t\tif (includeForeign) {\n\t\t\t\tstudyReport.append(\"Non-U.S. records included\\n\");\n\t\t\t}\n\t\t\tif (cpExcludesBaseline) {\n\t\t\t\tstudyReport.append(\"Baseline record excluded if station has CP\\n\");\n\t\t\t}\n\t\t\tif (excludeApps) {\n\t\t\t\tstudyReport.append(\"All APP records excluded\\n\");\n\t\t\t}\n\t\t\tif (excludePending) {\n\t\t\t\tstudyReport.append(\"Pending license records excluded\\n\");\n\t\t\t}\n\t\t\tif (excludePostTransition) {\n\t\t\t\tstudyReport.append(\"All post-transition APP, CP, and baseline records excluded\\n\");\n\t\t\t}\n\t\t\tif (excludeNewLPTV) {\n\t\t\t\tstudyReport.append(\"All records for new LPTV stations excluded\\n\");\n\t\t\t}\n\t\t\tif (null != filingCutoffDate) {\n\t\t\t\tif (proposalSource.service.isLPTV()) {\n\t\t\t\t\tstudyReport.append(\"LPTV records on or after \");\n\t\t\t\t} else {\n\t\t\t\t\tstudyReport.append(\"All records on or after \");\n\t\t\t\t}\n\t\t\t\tstudyReport.append(AppCore.formatDate(filingCutoffDate));\n\t\t\t\tstudyReport.append(\" excluded\\n\");\n\t\t\t}\n\t\t\tstudyReport.append('\\n');\n\t\t}\n\n\t\tif (null != includedSources) {\n\t\t\tstudyReport.append(\"User records included:\\n\");\n\t\t\tfor (SourceEditDataTV theSource : includedSources.values()) {\n\t\t\t\tstr = theSource.getRecordID();\n\t\t\t\tstudyReport.append(str);\n\t\t\t\tfor (int i = 0; i < 8 - str.length(); i++) {\n\t\t\t\t\tstudyReport.append(' ');\n\t\t\t\t}\n\t\t\t\tstudyReport.append(theSource.getCallSign());\n\t\t\t\tstudyReport.append(' ');\n\t\t\t\tstudyReport.append(theSource.getChannel());\n\t\t\t\tstudyReport.append(' ');\n\t\t\t\tstudyReport.append(theSource.getServiceCode());\n\t\t\t\tstudyReport.append(' ');\n\t\t\t\tstudyReport.append(theSource.getStatus());\n\t\t\t\tstudyReport.append(' ');\n\t\t\t\tstudyReport.append(theSource.getCity());\n\t\t\t\tstudyReport.append(\", \");\n\t\t\t\tstudyReport.append(theSource.getState());\n\t\t\t\tstudyReport.append(' ');\n\t\t\t\tstudyReport.append(theSource.getFileNumber());\n\t\t\t\tstudyReport.append('\\n');\n\t\t\t}\n\t\t\tstudyReport.append('\\n');\n\t\t}\n\n\t\tif (null != excludedRecords) {\n\t\t\tstudyReport.append(\"Individual records excluded:\\n\");\n\t\t\tfor (ExtDbRecordTV theRecord : excludedRecords.values()) {\n\t\t\t\tstr = theRecord.getARN();\n\t\t\t\tstudyReport.append(str);\n\t\t\t\tfor (int i = 0; i < 14 - str.length(); i++) {\n\t\t\t\t\tstudyReport.append(' ');\n\t\t\t\t}\n\t\t\t\tstudyReport.append(theRecord.getCallSign());\n\t\t\t\tstudyReport.append(' ');\n\t\t\t\tstudyReport.append(theRecord.getChannel());\n\t\t\t\tstudyReport.append(' ');\n\t\t\t\tstudyReport.append(theRecord.getServiceCode());\n\t\t\t\tstudyReport.append(' ');\n\t\t\t\tstudyReport.append(theRecord.getStatus());\n\t\t\t\tstudyReport.append(' ');\n\t\t\t\tstudyReport.append(theRecord.getCity());\n\t\t\t\tstudyReport.append(\", \");\n\t\t\t\tstudyReport.append(theRecord.getState());\n\t\t\t\tstudyReport.append(' ');\n\t\t\t\tstudyReport.append(theRecord.getFileNumber());\n\t\t\t\tstudyReport.append('\\n');\n\t\t\t}\n\t\t\tstudyReport.append('\\n');\n\t\t}\n\n\t\tif (protectedList.isEmpty()) {\n\n\t\t\tstudyReport.append(\"No protected stations found.\\n\");\n\n\t\t} else {\n\n\t\t\tstudyReport.append(\"Stations potentially affected by proposal:\\n\\n\");\n\t\t\tstudyReport.append(\n\t\t\t\t\"IX Call Chan Svc Status City, State File Number Distance\\n\");\n\n\t\t\tboolean first = true;\n\t\t\tdouble kmPerDeg = study.getKilometersPerDegree();\n\n\t\t\tSourceEditDataTV theSource;\n\n\t\t\tfor (Protected theProtected : protectedList) {\n\n\t\t\t\tif (theProtected.receivesIX) {\n\t\t\t\t\tstudyReport.append(\"Yes \");\n\t\t\t\t} else {\n\t\t\t\t\tstudyReport.append(\"No \");\n\t\t\t\t}\n\n\t\t\t\ttheSource = theProtected.source;\n\n\t\t\t\treportSource(theSource, proposalSource.location, kmPerDeg, first, studyReport);\n\t\t\t\tfirst = false;\n\t\t\t}\n\t\t}\n\n\t\tstudyReport.append(\"\\n\");\n\t}",
"void generateDesign();",
"public void generateMainReport(String reportName, HttpServletResponse response, HttpServletRequest request);",
"boolean generateReport();",
"public String CreateHtmlReport(){\n\n\t\ttry{\n\t\t\texecuted = testCases.size();\n\t\t\tString htmlFile = SystemPath+File.separator+\"Results\"+File.separator+\"TestResults_\"+ timeStamp.format(new Date()) + \".html\";\n\t\t\tFile f=new File(htmlFile);\n\t\t\tBufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f)));\n\t\t\tString content =\"<b>Help</b>\";\n\t\t\tString ln = \"\\n\";\n\t\t\tDate d = new Date();\n\t\t\tString headContent = \"<html> \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" <head>\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" <style>\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"\ttd.header {\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" background-color:#3399FF;border-top:0px solid #333333;border-bottom:1px dashed #000000;\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"\t}\"\n\t\t\t\t\t+ \" td.testDetails { \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" background-color:#3399FF;border-top:5px solid #3399FF;border-bottom:1px dashed #000000;\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"\t}\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" span.testDetails {\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" font-size:12px;font-weight:bold;color:#000000;line-height:200%;font-family:verdana;text-decoration:none;\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"}\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"td.execDetails { \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" background-color:#3399FF;border-top:5px solid #3399FF;border-bottom:0px dashed #000000;\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"}\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" span.execDetails {\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" font-size:12px;font-weight:bold;color:#000000;line-height:200%;font-family:verdana;text-decoration:none;\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"}\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"span.pass { \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" font-size: 14px;font-weight:bold;line-height:100%;color:#00FF00;font-family:arial; \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"\t}\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" span.fail { \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" font-size: 14px;font-weight:bold;color:#FF0000;line-height:100%;font-family:arial; \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" } \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" span.skip { \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" font-size: 14px;font-weight:bold;color:#0000FF;line-height:100%;font-family:arial; \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" } \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" span.title { \"\n\t\t\t\t\t+ \" font-size: 14px;font-weight:normal;color:#000000;line-height:100%;font-family:arial; \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" } \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" td.reqDetails { \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" font-size:12px;font-weight:bold;color:#000000;line-height:100%;font-family:verdana;text-decoration:none; \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" } \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" td.reqData { \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" font-size:12px;color:#000000;line-height:100%;font-family:verdana;text-decoration:none; \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" } \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+\"table {\"\n\t\t\t\t\t+\"border-collapse: collapse;\"\n\t\t\t\t\t+\"}\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+\"table, td, th {\"\n\t\t\t\t\t+\" border: 1px solid black;\"\n\t\t\t\t\t+\"}\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" </style> \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" </head> \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"<body leftmargin=\\\"0\\\" marginwidth=\\\"0\\\" topmargin=\\\"0\\\" marginheight=\\\"0\\\" offset=\\\"0\\\" bgcolor='#FFFFFF'>\";\n\n\t\t\tString header = \"<div id=\\\"header\\\"> \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" <table width=\\\"100%\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\">\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" <tr> \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"<td align=\\\"left\\\" valign=\\\"middle\\\" class=\\\"header\\\"> \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"</td>\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"<td align=\\\"middle\\\"\"\n\t\t\t\t\t+ \" valign=\\\"middle\\\" class=\\\"header\\\">\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"<span style=\\\"font-size:14px;font-weight:bold;color:#000000;line-\"\n\t\t\t\t\t+ \"height:200%;font-family:verdana;text-decoration:none;\\\">\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"AUTOMATION TEST RESULTS\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"</span>\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"</td>\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"<td align=\\\"\\\" valign=\\\"middle\\\" style=\\\"background-color:#3399FF;border-top:0px solid #000000;border-bottom:\"\n\t\t\t\t\t+ \"1px dashed #000000;\\\">\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" <span style=\\\"font-size:15px;font-weight:bold;color:#000000;line-height:100%;font-family:verdana;\"\n\t\t\t\t\t+ \"text-decoration:none;\\\">\" + ln + \"</span>\" + ln + \"</td>\"\n\t\t\t\t\t+ ln + \" </tr>\" + ln + \"</table>\" + ln + \"</div>\";\n\n\t\t\tString [] p = appFilePath.split(\"/\");\n\t\t\tint l =p.length;\n\t\t\tString appName = p[l-1];\n\t\t\tString testDetails = \"<div id=\\\"testDetails\\\">\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"<table width=\\\"100%\\\" cellpadding=\\\"3\\\" cellspacing=\\\"0\\\"> \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"<tr> \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" <td align=\\\"left\\\" valign=\\\"middle\\\" class=\\\"testDetails\\\"> \"\n\t\t\t\t\t+ ln + \"<span class=\\\"testDetails\\\">\" + ln + \" Date & Time : \"\n\t\t\t\t\t+ d.toString() + ln + \"</span>\" + ln + \"</td>\" + ln\n\t\t\t\t\t+ \"<td align=\\\"left\\\" \"\n\t\t\t\t\t+ \"valign=\\\"middle\\\" class=\\\"testDetails\\\" colspan=\\\"2\\\"> \" + ln\n\t\t\t\t\t+ \"<span class=\\\"testDetails\\\"> \" + ln\n\t\t\t\t\t+ \"Application : <font color=\\\"#FFFFFF\\\">\" + appName\n\t\t\t\t\t+ \" </font> \" + ln + \" </span>\" + ln + \" </td> \" + ln\n\t\t\t\t\t+ \" </tr>\" + ln + \" </table> \" + ln + \"</div>\";\n\n\t\t\tString execDetails = \"<div id=\\\"execDetails\\\"> \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"<table width=\\\"100%\\\" cellpadding=\\\"3\\\" cellspacing=\\\"0\\\"> \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" <tr> \"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"<td align=\\\"left\\\" valign=\\\"middle\\\" class=\\\"execDetails\\\">\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"<span class=\\\"execDetails\\\">\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"Test Cases: \"\n\t\t\t\t\t+ totalcases\n\t\t\t\t\t+ \"</span>\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"</td>\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \"\t<td align=\\\"left\\\" valign=\\\"middle\\\" class=\\\"execDetails\\\">\"\n\t\t\t\t\t+ ln + \"<span class=\\\"execDetails\\\">\" + ln + \"Passed : \"\n\t\t\t\t\t+ passed + \"</span>\" + ln + \"</td>\" + ln\n\t\t\t\t\t+ \"<td align=\\\"left\\\" valign=\\\"middle\\\" class=\\\"execDetails\\\">\"\n\t\t\t\t\t+ ln + \"<span class=\\\"execDetails\\\">\" + ln + \"Failed :\"\n\t\t\t\t\t+ failed + \"</span>\" + ln + \"</td>\" + ln\n\t\t\t\t\t+ \"<td align=\\\"left\\\" valign=\\\"middle\\\" class=\\\"execDetails\\\">\"\n\t\t\t\t\t+ ln + \"<span class=\\\"execDetails\\\">\" + ln + \"Skipped : \"\n\t\t\t\t\t+ (totalcases-executed) + \"</span>\" + ln + \"</td>\" + ln\n\t\t\t\t\t+ \"<td align=\\\"left\\\" valign=\\\"middle\\\" class=\\\"execDetails\\\">\"\n\t\t\t\t\t+ ln + \"<span class=\\\"execDetails\\\">\" + ln + \"Browser: \"\n\t\t\t\t\t+ browser + \"</span>\" + ln + \"</td>\" + ln + \"</tr>\" + ln\n\t\t\t\t\t+ \"</table>\" + ln + \"</div> <br/>\";\n\n\t\t\tString testCaseDetails = \"<div id=\\\"testcaseDetails\\\" style=\\\"padding-left:15px\\\">\"\n\t\t\t\t\t+ ln\n\t\t\t\t\t+ \" <p> \"\n\t\t\t\t\t+ \"<span style=\\\"font-size: 15px;font-weight:bold;color:#000000;font-family:verdana;\\\">Items Tested:</span> </p>\"\n\t\t\t\t\t+ ln;\n\n\t\t\tString errorlog = \"<div><table b><td><span style=\\\"font-size: 15px;font-weight:bold;color:#000000;font-family:verdana;\\\">Case_No</span></td>\"\n\t\t\t\t\t+ \"<td><span style=\\\"font-size: 15px;font-weight:bold;color:#000000;font-family:verdana;\\\">Case_Name</span></td>\"\n\t\t\t\t\t+ \"<td><span style=\\\"font-size: 15px;font-weight:bold;color:#000000;font-family:verdana;\\\">Status</span></td>\"\n\t\t\t\t\t+ \"<td><span style=\\\"font-size: 15px;font-weight:bold;color:#000000;font-family:verdana;\\\">Comment</span></td></div>\";\n\n\t\t\tSet<Integer> sets =errormap.keySet();\n\t\t\tfor(int x: sets){\n\t\t\t\tErrorLogger log= errormap.get(x);\n\t\t\t\tif( log != null){\n\t\t\t\t\terrorlog += \"<tr >\";\n\t\t\t\t}else{\n\t\t\t\t\terrorlog += \"<tr>\";\n\t\t\t\t}\n\t\t\t\terrorlog += \"<td>\"+x+\"</td>\";\n\t\t\t\terrorlog += \"<td>\"+log.getCaseName()+\"</td>\";\n\t\t\t\tif(log.getStatus() != null){\n\t\t\t\t\tif(log.getStatus().equalsIgnoreCase(\"failed\")){\n\t\t\t\t\t\terrorlog += \"<td style='background-color:red'>Failed</td><td>\"+log.getComment()+\"</td></tr>\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\terrorlog += \"<td style='background-color:green'>Passed</td><td></td></tr>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\terrorlog +=\"</table>\";\n\n\t\t\twriter.write(headContent);\n\t\t\twriter.write(header);\n\t\t\twriter.write(testDetails);\n\t\t\twriter.write(execDetails);\n\t\t\twriter.write(testCaseDetails);\n\t\t\twriter.write(errorlog);\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t\treturn htmlFile;\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"public static void generateReport()\n\t{\n\t\tlong time=System.currentTimeMillis();\n\t\tString reportPath=System.getProperty(\"user.dir\")+\"//automationReport//Report\"+time+\".html\";\n\t\t\n\t\thtmlreporter=new ExtentHtmlReporter(reportPath);\n\t\textent=new ExtentReports();\n\t\textent.attachReporter(htmlreporter);\n\t\t\n\t\tString username=System.getProperty(\"user.name\");\n\t\tString osname=System.getProperty(\"os.name\");\n\t\tString browsername=CommonFunction.readPropertyFile(\"Browser\");\n\t\tString env=CommonFunction.readPropertyFile(\"Enviornment\");\n\t\t\n\t\t\n\t\textent.setSystemInfo(\"User Name\", username);\n\t\textent.setSystemInfo(\"OS Name\", osname);\n\t\textent.setSystemInfo(\"Browser Name\", browsername);\n\t\textent.setSystemInfo(\"Enviornment\", env);\n\t\t\n\t\t\n\t\thtmlreporter.config().setDocumentTitle(\"Automation Report\");\n\t\thtmlreporter.config().setTheme(Theme.STANDARD);\n\t\thtmlreporter.config().setChartVisibilityOnOpen(true);\n \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"String reportsSummarySummaryReport();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets called when a process joins the group. | public void processJoined(Process j); | [
"public void joinGroupMemberService() {\n //attemptingJoin = true;\n boolean result = initiateJoin();\n }",
"public void join() {\n\n // If wanting to join, tell GUIManager\n try {\n System.out.println(\"User joining...\");\n GUIManager.getInstanceGUIManager().cyclistJoin();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void handleJoin(GroupMember member) {\n if (listener != null) {\n context.executor().execute(() -> {\n synchronized (this) {\n if (active) {\n listener.nodeAdded(member.id());\n }\n }\n });\n }\n }",
"public static void join(){\n joined = true;\n }",
"protected void onJoin(String channel, String sender, String login, String hostname) {}",
"abstract protected void onJoin(String channel, String sender, String login, String hostname) ;",
"public void join() {\n\t\tjoinEnteredOrSelected(ClientRole.PLAYER);\n\t}",
"public void joined(Peer peer);",
"public void announceJoinGroup(String playername, String groupname) {\n\t\t\n\t\t GCCommand.chatMessage(playername + \" has joined the group chat!\", \"&lINFO\", MultiChat.groupchats.get(groupname.toLowerCase()));\n\t\t\n\t}",
"public void memberJoined(ClusterEvent e) {}",
"private int handleJoin(int ProcessID, int status){\n\t\tUserProcess child = children.get(ProcessID); //sets the user process to that of the specified child join\n\t\tchild.statLock.acquire(); //acquire lock\n\t\t\n\t\tInteger childStatus = child.eStat; //exit status\n\t\tif (childStatus == null){\n\t\t\tstatLock.acquire();\n\t\t\tchild.statLock.release();\n\t\t\tjCond.sleep();\n\t\t\tstatLock.release();\n\t\t\tchild.statLock.acquire();\n\t\t\tchildStatus = child.eStat; \n\t\t}\n\t\tchild.statLock.release();\n\t\tchildren.remove(ProcessID);\n\t\t\n\t\tbyte[] statusBytes = new byte[4];\n\t\tfor (int j = 0; j < 4; j++) \n\t\t\tstatusBytes[j] = (byte) (waitingStatus >>> j * 8); //byte offset\n\t\twriteVirtualMemory(status, statusBytes); //write to the virtual memory\n\t\treturn 0; //returns 0 as there is no error\n\t}",
"@Override\n\tpublic void playerJoining(String playerID) {\n\t}",
"public void joinGame(){\n\t\tsendJoinMsg(ownPlayer);\t\n\t}",
"public void join() {\n FacesContext fc = FacesContext.getCurrentInstance();\n try {\n UbikeUser current = (UbikeUser) BaseBean.getSessionAttribute(\"user\");\n ExternalContext exctx = fc.getExternalContext();\n HttpServletRequest request = (HttpServletRequest) exctx.getRequest();\n long groupId = Long.parseLong(request.getParameter(\"groupId\"));\n long userId = current.getId();\n MemberShip m = memberShipService.getMemberShip(userId, groupId);\n\n if (m != null) {\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_ERROR,\n \"You are already member of this group\",\n \"You are already member of this group\"));\n return;\n }\n\n UbikeGroup group = groupService.find(groupId);\n m = new MemberShip(current, group, Role.Member);\n memberShipService.create(m);\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_INFO,\n \"You joined the group \" + group.getName() + \" successfully\",\n \"You joined the group \" + group.getName() + \" successfully\"));\n\n List<MemberShip> members = (List<MemberShip>) BaseBean.getSessionAttribute(\"tmp_members\");\n if (members == null) {\n members = new ArrayList<MemberShip>();\n BaseBean.setSessionAttribute(\"tmp_members\", members);\n }\n members.add(m);\n } catch (Exception exp) {\n logger.log(Level.SEVERE, \"An error occurs while joinning group\", exp);\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_ERROR,\n \"An error occurs while processing your request\",\n \"An error occurs while processing your request\"));\n }\n }",
"@Override // todo: add a 5-6 second delay on welcome message\n public void onJoin(JoinEvent event) {\n if (startTime.plusMinutes(2).isAfter(LocalDateTime.now())) return;\n\n Triple<String, String, Boolean> welcomeTriple = BobsDatabaseHelper.getDisplayNameWelcomeMessageAndHasSubbedStatus(event.getUserHostmask().getNick());\n String displayName = welcomeTriple.getLeft();\n String welcomeMessage = welcomeTriple.getMiddle();\n Boolean hasSubscribed = welcomeTriple.getRight();\n\n if (hasSubscribed && !welcomeMessage.equalsIgnoreCase(\"none\")) {\n System.out.println(\"join \" + displayName + \" welcome message: \" +welcomeMessage);\n if (welcomeMessage.startsWith(\"/\") && !welcomeMessage.toLowerCase().startsWith(\"/me \")) return;\n\n if (lastWelcomeMessageTime.containsKey(displayName) && lastWelcomeMessageTime.get(displayName).isAfter(LocalDateTime.now().minus(2, ChronoUnit.HOURS))) {\n //we have recently sent a welcome message to the user\n System.out.println(\"Already sent welcome message for \" + displayName);\n } else {\n new Thread(() -> {\n try { Thread.sleep(4000); } catch (InterruptedException e) { e.printStackTrace(); }\n if (welcomeMessage.toLowerCase().startsWith(\"/me \")) {\n TwitchChat.sendAction(welcomeMessage.substring(4));\n }\n else {\n TwitchChat.sendMessage(welcomeMessage);\n }\n lastWelcomeMessageTime.put(displayName, LocalDateTime.now());\n }).start();\n }\n }\n }",
"public void join(Member member) {\n if (session.state().active()) {\n session.publish(\"join\", member.info());\n }\n }",
"protected void ledGroupOn() {\r\n\t\tnew Thread(new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tif (getRobot() == null) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// get name of group led\r\n\t\t\t\tString ledGroupName = spLedGroups.getSelectedItem().toString();\r\n\t\t\t\tboolean result = false;\r\n\t\t\t\tshowProgress(\"turning LED group on...\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// turn on group led\r\n\t\t\t\t\tresult = RobotLeds.ledOn(getRobot(), ledGroupName);\r\n\t\t\t\t} catch (final RobotException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\tcancelProgress();\r\n\t\t\t\t\tmakeToast(\"turn on led group failed! \" + e.getMessage());\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tcancelProgress();\r\n\t\t\t\tif (result) {\r\n\t\t\t\t\tmakeToast(\"turn on led group successfully!\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmakeToast(\"turn on led group failed!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}).start();\r\n\t}",
"public ParticipantJoinEvent() {\n\t\tthis.knownAlphaCards = new LinkedList<ChangePayloadEvent>();\n\t}",
"private RequestFuture<ByteBuffer> onJoinFollower() {\n SyncGroupRequest.Builder requestBuilder =\n new SyncGroupRequest.Builder(\n new SyncGroupRequestData()\n .setGroupId(rebalanceConfig.groupId)\n .setMemberId(generation.memberId)\n .setProtocolType(protocolType())\n .setProtocolName(generation.protocolName)\n .setGroupInstanceId(this.rebalanceConfig.groupInstanceId.orElse(null))\n .setGenerationId(generation.generationId)\n .setAssignments(Collections.emptyList())\n );\n log.debug(\"Sending follower SyncGroup to coordinator {}: {}\", this.coordinator, requestBuilder);\n return sendSyncGroupRequest(requestBuilder);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a m n matrix grid which is sorted in nonincreasing order both rowwise and columnwise. Return the number of negative numbers in grid. Example 1: Input: grid = [[4,3,2,1],[3,2,1,1],[1,1,1,2],[1,1,2,3]] Output: 8 Explanation: There are 8 negatives number in the matrix. Example 2: Input: grid = [[3,2],[1,0]] Output: 0 | public static int countNegatives(int[][] grid) {
int negative = 0;
for (int i = 0 ; i < grid.length ; i++){
for (int j = 0; j < grid.length ; j++){
if (grid[i][j] < 0){
negative++;
}
}
}
return negative;
} | [
"public static int countNeighboringMines(Cell[][] grid, int givenRow, int givenCol)\n {\n // TODO\n return 0;\n }",
"@Override\n public int getNumNeighboringMines(int row, int col) {\n int count = 0, rowStart = Math.max(row - 1, 0), rowFinish = Math.min(row + 1, grid.length - 1), colStart = Math.max(col - 1, 0), colFinish = Math.min(col + 1, grid[0].length - 1);\n\n for (int curRow = rowStart; curRow <= rowFinish; curRow++) {\n for (int curCol = colStart; curCol <= colFinish; curCol++) {\n if (grid[curRow][curCol].getType() == Tile.MINE) count++;\n }\n }\n return count;\n }",
"public static int surfaceArea(int[][] grid) {\n int m = grid.length;\n int n = grid[0].length;\n int result = 0;\n int[][] direction = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};\n \n for (int i = 0; i < m; i++) {\n \tfor (int j = 0; j < n; j++) {\n \t\tif (grid[i][j] > 0) {\n \t\t\tresult += 2;\n \t\t\tfor (int[] dir: direction) {\n \t\t\tint nextI = i + dir[0];\n \t\t\tint nextJ = j + dir[1];\n \t\t\tif (nextI < 0 || nextI >= m || nextJ < 0 || nextJ >= n) {\n \t\t\t\tresult += grid[i][j];\n \t\t\t} else if (grid[nextI][nextJ] < grid[i][j]) {\n \t\t\t\tresult += grid[i][j] - grid[nextI][nextJ];\n \t\t\t} \t\t\t\t\n \t\t\t}\n \t\t}\n \t}\n }\n \n return result;\n \n }",
"public int numIslands(char[][] grid) {\n int m = grid.length;\n if (m == 0) {\n return 0;\n }\n int n = grid[0].length;\n char[][] map = new char[m][n];\n int[][] visit = new int[m][n];\n for (int i = 0; i < m; i++)\n for (int j = 0; j < n; j++)\n map[i][j] = grid[i][j];\n\n int count = 0;\n\n for (int i = 0; i < m; i++)\n for (int j = 0; j < n; j++) {\n if (grid[i][j] == '1' && visit[i][j] == 0) {\n count++;\n findIsland(map, visit, i, j);\n }\n }\n\n return count;\n }",
"public int countSquares(int[][] matrix) {\n\n int count = 0;\n for (int i = 0; i < matrix.length; ++i) {\n\n for (int j = 0; j < matrix[0].length; ++j) {\n\n if (matrix[i][j] > 0 && i > 0 && j > 0) {\n\n matrix[i][j] = Math.min(matrix[i - 1][j - 1], Math.min(matrix[i - 1][j], matrix[i][j - 1])) + 1;\n }\n\n count += matrix[i][j];\n }\n }\n return count;\n\n}",
"public int maxDistance(int[][] grid) {\n boolean[][] visited = new boolean[grid.length][grid[0].length]; // mark which cells have been already been visited\n Queue<int[]> queue = new LinkedList<>();\n\n //put 1 cells into queue to start with and mark then visited\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[0].length; j++) {\n if (grid[i][j] == 1) {\n queue.add(new int[]{i,j});\n visited[i][j] = true; //mark cell as visited\n }\n }\n }\n\n int distance = -1;\n int[][] directions = {{-1,0}, {0,1}, {1,0}, {0,-1}}; //all possible 4 directions\n while (!queue.isEmpty()) {\n int size = queue.size(); //since this is BFS we need to traverse level by level\n\n while (size > 0) { //iterate only till nodes in current level\n int[] pair = queue.poll();\n\n for (int[] direction : directions) { // check in all possible directions\n int x = pair[0] + direction[0];\n int y = pair[1] + direction[1];\n\n //if target cell is with in bounds and is not visited, add it to queue\n if (x >= 0 && x < grid.length && y >= 0 && y < grid[0].length && !visited[x][y]) {\n queue.add(new int[]{x,y});\n visited[x][y] = true;\n }\n }\n size--;\n }\n distance++; //increment the size only after level traversal is complete\n }\n\n //this is required because distance can be zero. This is possible if grid contains all 1's and all 1's are\n //consider level 1 as we are starting with them. So, need to return -1\n return distance == 0 ? -1 : distance;\n }",
"public int numIslands(char[][] grid) {\n\n int islands = 0;\n for (int i=0; i<grid.length; i++)\n for (int j=0; j<grid[i].length; j++)\n islands += sink(grid, i, j);\n return islands;\n }",
"public int numDistinctIslands(int[][] grid) {\n // normalize them by first point\n // sort array by coordinates of first point\n // count distinct islands\n\n // find all islands\n List<List<int[]>> islands = new ArrayList<>();\n for (int y = 0; y < grid.length; y++)\n for (int x = 0; x < grid[0].length; x++)\n if (grid[y][x] == 1) {\n List<int[]> island = new ArrayList<>();\n floodfill(grid, y, x, island);\n // normalize island by first point\n int dx = island.get(0)[0];\n int dy = island.get(0)[1];\n for (int i = 0; i < island.size(); i++) {\n int[] point = island.get(i);\n point[0] -= dx;\n point[1] -= dy;\n }\n islands.add(island);\n }\n // sort array by coordinates of first point\n islands.sort(this::compareIslands);\n // count distinct islands\n int res = islands.isEmpty() ? 0 : 1;\n for (int i = 0; i < islands.size() - 1; i++) {\n if (compareIslands(islands.get(i), islands.get(i + 1)) != 0)\n res++;\n }\n return res;\n }",
"public static int numTruck(List<List<Integer>> grid) {\n\t // Write your code here\n\t if(grid == null || grid.size() ==0){\n\t return 0;\n\t }\n\t int count =0;\n\t for(int i= 0; i<grid.size();i++){\n\t for(int j=0;j<grid.get(0).size();j++){\n\t if(grid.get(i).get(j) == 1){\n\t \tdfs(grid,i,j);\n\t \tcount+=1;\n\t }\n\t }\n\t }\n\t return count;\n\t }",
"public int countCells(int col, int row) {\n if (col < 0 || col >= grid.getNCols() || row < 0 || row >= grid.getNRows())\n {\n return 0; \n }\n else if (!grid.getColor(col, row).equals(ABNORMAL))\n {\n return 0;\n }\n else\n {\n grid.recolor(col, row, PATH);\n return 1 + countCells(col - 1, row + 1) + countCells(col, row + 1) + countCells(col + 1, row + 1) +\n countCells(col - 1, row) + countCells(col + 1, row) + countCells(col - 1, row - 1) +\n countCells(col, row - 1) + countCells(col + 1, row - 1);\n }\n }",
"protected int countNeighbours(int col, int row){\n int Total = 0;\r\n Total = getCell(col-1,row-1)? ++Total : Total;\r\n Total = getCell(col,row-1)? ++Total : Total;\r\n Total = getCell(col+1,row-1)? ++Total : Total;\r\n Total = getCell(col-1,row)? ++Total : Total;\r\n Total = getCell(col+1,row)? ++Total : Total;\r\n Total = getCell(col-1,row+1)? ++Total : Total;\r\n Total = getCell(col,row+1)? ++Total : Total;\r\n Total = getCell(col+1,row+1)? ++Total : Total;\r\n return Total;\r\n }",
"public int updateNumFlagged() {\n int flaggedCell = 0;\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[row].length; col++) {\n if (grid[row][col] != null) {\n if (grid[row][col].isFlagged()) {\n flaggedCell++;\n }\n }\n }\n }\n return flaggedCell;\n }",
"int countNeighbors(int row, int col){\n\n int count = 0;\n\n for (int i = row-1; i <= row+1; i++) {\n int tempi = i;\n\n //wrap around\n if(tempi == -1) {\n tempi = getRows()-1;\n }\n else if(tempi == getRows()){\n tempi = 0;\n }\n\n for (int j = col-1; j <= col+1; j++) {\n\n int tempj = j;\n\n //wrap around\n if(tempj == -1) {\n tempj = getCols()-1;\n }\n else if(tempj == getCols()){\n tempj = 0;\n }\n\n if(board[tempi][tempj].getState() == Cell.State.ALIVE || board[tempi][tempj].getState() == Cell.State.BIRTHED)\n count++;\n }\n }\n System.out.println();\n\n if (board[row][col].getState() == Cell.State.ALIVE || board[row][col].getState() == Cell.State.BIRTHED)\n count--;\n\n return count;\n }",
"public int numIslands1(char[][] grid) {\n int count =0;\n \n // loop through the given grid to find out the unvisited land\n for(int i=0; i<grid.length; i++){\n for(int j=0; j<grid[0].length; j++){\n \n // when the grid value signifies land means it is not visited by any previous dfs traversal\n // start a dfs traversal mark this cell and all its neighbours as visited increease the count i.e. // keep count of initiation of dfs traversal and return count when all non-zero cells are visited.\n if(grid[i][j] == '1'){\n find(grid,i,j);\n count++;\n }\n }\n }\n return count;\n }",
"public int[] countColumnZeroes()\n\t{\n\t\tint[] zeros = new int[n];\n\t\tfor(int j=0;j<n;j++)\n\t\t{\n\t\t\tzeros[j]=0;\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tif(cost[i][j]==0)\n\t\t\t\t{\n\t\t\t\t\tzeros[j]++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn zeros;\n\t}",
"private int getNumTilesOnBoard() {\n int numTiles = 0;\n for (List<Boolean> column : testGame1.getBoard()) {\n for (boolean cellOccupied : column) {\n if (cellOccupied) {\n numTiles++;\n }\n }\n }\n return numTiles;\n }",
"private int countAdjacentMines(int row, int column) {\n int count = 0;\n for (int rowOffset = -1; rowOffset <= 1; rowOffset++) {\n int actRow = row + rowOffset;\n if (actRow >= 0 && actRow < rowCount) {\n for (int columnOffset = -1; columnOffset <= 1; columnOffset++) {\n int actColumn = column + columnOffset;\n if (actColumn >= 0 && actColumn < columnCount) {\n if (tiles[actRow][actColumn] instanceof Mine) {\n count++;\n }\n }\n }\n }\n }\n\n return count;\n }",
"private int countMines(int row, int col){\n\n return ((row!=0)? boolToInt(mineModel.hasMineAt(row-1, col)):0) +\n ((row != (mineModel.getMaxRow()-1))?boolToInt(mineModel.hasMineAt(row+1, col)):0)+\n ((col!=0)? boolToInt(mineModel.hasMineAt(row, col-1)):0)+\n ((col != (mineModel.getMaxCol()-1))?boolToInt(mineModel.hasMineAt(row, col+1)):0)+\n ((row!=0 && col!=0)?boolToInt(mineModel.hasMineAt(row-1, col-1)):0)+\n ((row!=(mineModel.getMaxRow()-1)&&col!=(mineModel.getMaxCol()-1))?\n boolToInt(mineModel.hasMineAt(row+1, col+1)):0)+\n ((row!=0 && col!=(mineModel.getMaxCol()-1))?\n boolToInt(mineModel.hasMineAt(row-1, col+1)):0)+\n ((row!=(mineModel.getMaxRow()-1) && col!=0)?boolToInt(mineModel.hasMineAt(row+1, col-1)):0);\n }",
"int getNNZ(){ // Returns the number of non-zero entries in this Matrix\n int nnz = 0;\n for(int i = 1; i < this.size; i++){\n nnz += row[i].length();\n }\n return nnz;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Report booking by dishType. | public Iterable<BookingPerOption> showReportByMeal(MealType meal); | [
"public Iterable<BookingPerOption> showReportByDish(String dish);",
"public Iterable<BookingPerOption> showReportByDay(Calendar date);",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<Booking> viewBookings(Date sDate, Date eDate, String roomType) {\n\t\tList<Booking> bookingsList = new ArrayList<>();\n\t\t\n\t\tEntityManagerFactory emf = javax.persistence.Persistence.createEntityManagerFactory(\"simple-jpaPU\");\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\ttry {\n\t\t\tString query = \"select b from Booking b\";\n\t\t\tbookingsList = em.createQuery(query).getResultList();\n\t\t\t\n\t\t\tList<Booking> updatedBookingsList = new ArrayList<>();\n\t\t\t\n\t\t\tfor(Booking b : bookingsList) {\n\t\t\t\t\n\t\t\t\tif(roomType.equals(\"All\")) {\n\t\t\t\t\treturn bookingsList;\n\t\t\t\t} else if(b.getCheckInDate().equals(sDate) && b.getCheckOutDate().equals(eDate) && b.getRoomType().equals(roomType)) {\n\t\t\t\t\tupdatedBookingsList.add(b);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn updatedBookingsList;\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tem.close();\n\t\t}\n\t\treturn bookingsList;\n\t}",
"public List<Dish> getDishesByType(int dishtype) {\n\t\tList<Dish> dishes = new ArrayList<>();\n\t\t\n\t\ttry (Connection connection = getConnection();\n\t \t\t// Query\n\t \t\tPreparedStatement preparedStatement = connection.prepareStatement(GET_DISHES_BY_TYPE);) {\n\t \t\tpreparedStatement.setInt(1, dishtype);\n\t\t\t\tSystem.out.println(preparedStatement);\n\t \t\t//Execute the query\n\t \t\tResultSet rs = preparedStatement.executeQuery();\n\t \t\t// Process Result\n\t \t\twhile(rs.next()) {\n\t \t\t\tint dishId = Integer.parseInt(rs.getString(\"dish_id\"));\n\t \t\t\tString dishName = rs.getString(\"dish_name\");\n\t \t\t\tString dishImage = rs.getString(\"dish_image\");\n\t \t\t\tint dishType = Integer.parseInt(rs.getString(\"dish_type\"));\n\t \t\t\tfloat dishPrice = Float.parseFloat(rs.getString(\"dish_price\"));\n\t \t\t\tdishes.add(new Dish(dishId,dishName,dishImage,dishType,dishPrice));\n\t \t\t}\n\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 \treturn dishes;\n\t}",
"private void displayDayBookings(Calendar cal) {\t\t\t\t \t\r\n\t\r\n\t\tfor (int hrCtr = 8; hrCtr < 24; hrCtr++) {\r\n\t\t\tcal.set(Calendar.HOUR_OF_DAY, hrCtr);\r\n\t\t\t\r\n\t\t\tCalendar oneHourLater = Calendar.getInstance();\r\n\t \toneHourLater.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY)+1);\r\n\t\t\t\r\n\t\t\tTimeBlock findTB = new TimeBlock(cal,oneHourLater);\t\t\t\r\n\t\t\r\n\t\t\tRoomBooking rb = new RoomBooking();\r\n\t \trb.setTimeBlock(findTB);\r\n\t \t\r\n\t \tSortRoomBookingByCalendar sortRB = new SortRoomBookingByCalendar();\r\n\t \tint index = Collections.binarySearch(getRoomBookings(), rb, sortRB);\r\n\t \t\r\n\t \tif (index>=0){\r\n\t \t\trb = getRoomBookings().get(index);\r\n\t \t}\r\n\t \telse{\r\n\t \t\trb = null;\r\n\t \t}\r\n\t \tint hr = cal.get(Calendar.HOUR_OF_DAY);\r\n\t\t\tSystem.out.print((rb!=null) ?\r\n\t\t\t \"---------------\\n\"+ rb.toString()+\"---------------\\n\": \r\n\t \t \"No booking scheduled between \"+ hr + \":00 and \" + (hr + 1) + \":00\\n\");\r\n\t\tif (rb !=null) hrCtr = rb.getTimeBlock().getEndTime().get(Calendar.HOUR_OF_DAY) - 1;\r\n\t\t}\t\t\r\n\t}",
"public static void generateEndOfDayReport() {\n\t Hashtable<String,Integer> in = inventory.getInventory();\n\t // Format the date time string\n\t DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"dd-MM-yyyy HH:mm:ss\");\n\t String datetime = LocalDateTime.now().format(formatter);\n\t String[] datetimeSplit = datetime.split(\" \");\n\t \n\t // Initialise end of day report string \n\t String output = String.format(\"%-20s \\n\\n\", \"End of the day report\") + \n\t\t\t\t\t String.format(\"%-10s %-10s\\n\", \"Date:\", datetimeSplit[0]) +\n\t\t\t\t\t String.format(\"%-10s %-10s\\n\", \"Time:\",datetimeSplit[1]) +\n\t\t\t\t\t line;\n\t \n\t // Strings to hold category informations\n\t String drink = \"\"; String food = \"\" ; String pastry = \"\"; \n\t // Goes trough inventory\n\t for (Map.Entry m: in.entrySet()) { \n\t\t String category = CoffeeShop.menu.get(m.getKey()).getCategory();\n\t\t if (category.equals(\"Drink\")) {\n\t\t\t drink += String.format(\"%-5s %-25s %-10s \\n\", \" \",m.getKey(), \n\t\t\t\t\t\tString.valueOf(m.getValue() + \"x\"));\n\t }if (category.equals(\"Food\")) {\n\t \t food += String.format(\"%-5s %-25s %-10s \\n\", \" \",m.getKey(), \n\t\t\t\t\t\tString.valueOf(m.getValue() + \"x\"));\n\t\t }if (category.equals(\"Pastry\")) {\n\t\t\t pastry += String.format(\"%-5s %-25s %-10s \\n\", \" \",m.getKey(), \n\t\t\t\t\t\tString.valueOf(m.getValue() + \"x\"));\n\t\t }\n }\n\t \n\t // creates final report by concatenating strings \n\t output += String.format(\"%-20s \\n\\n\", \"FOOD\") + food + line +\n\t\t\t String.format(\"%-20s \\n\\n\", \"DRINKS\") + drink + line +\n\t\t\t String.format(\"%-20s \\n\\n\", \"PASTRIES\") + pastry + line + \"\\n\" ;\n\t \n\t \n\t output += String.format(\"%-30s %-10s\\n\", \"Number of customers: \", books.getAllValues().get(7)) + \n\t String.format(\"%-40s %-10s\\n\", \"Sub total of day : \", df2.format(books.getAllValues().get(0)) + \"£\") + \n\t String.format(\"%-40s %-10s\\n\", \"Taxes : \", df2.format(books.getAllValues().get(1)) + \"£\")+ \n\t String.format(\"%-40s %-10s\\n\", \"Discount : \", df2.format(books.getAllValues().get(2)) + \"£\")+ \n\t String.format(\"%-50s %-10s\\n\", \"Type D1 : \", df2.format(books.getAllValues().get(4)) ) + \n\t String.format(\"%-50s %-10s\\n\", \"Type D2 : \", df2.format(books.getAllValues().get(5)) ) + \n\t String.format(\"%-50s %-10s\\n\", \"Type D3 : \", df2.format(books.getAllValues().get(6)) ) + \n\t String.format(\"%-40s %-10s\\n\", \"Total of the day : \", df2.format(books.getAllValues().get(3)) + \"£\");\n\t \n\t report = output;\n }",
"public Set<Dish> getDishesOfType(int type) {\n\t\tSet<Dish> result = new HashSet<Dish>();\n\t\tfor (Dish d : dishes) {\n\t\t\tif (d.getType() == type) {\n\t\t\t\tresult.add(d);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public List<OutwardDTO> getOutwardReport(String type,String month,String year);",
"public void searchAvailabilityType(Connection connection, String hotel_name, int branchID, String type, LocalDate from, LocalDate to) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT num_avail, price FROM Information WHERE hotel_name = ? AND branch_ID = ? AND type >= ? AND date_from <= to_date(?, 'YYYY-MM-DD') AND date_to = to_date(?, 'YYYY-MM-DD')\";\n\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n setType(type);\n pStmt.setString(3, getType());\n pStmt.setString(4, from.toString());\n pStmt.setString(5, to.toString());\n\n try {\n\n System.out.printf(\" Availabilities for %S type at %S, branch ID (%d): \\n\", getType(), getHotelName(), getBranchID());\n System.out.printf(\" Date Listing: \" + String.valueOf(from) + \" TO \" + String.valueOf(to) + \"\\n\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while(rs.next()) {\n System.out.println(rs.getInt(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }",
"public String getBookingType() {\r\n\t\treturn bookingType;\r\n\t}",
"public List<Dish> getDishesByNameAndType(String dishname, int dishtype) {\n\t\tList<Dish> dishes = new ArrayList<>();\n\t\t\n\t\ttry (Connection connection = getConnection();\n\t \t\t// Query\n\t \t\tPreparedStatement preparedStatement = connection.prepareStatement(GET_DISHES_BY_NAME_AND_TYPE);) {\n\t \t\tpreparedStatement.setString(1, '%' + dishname + '%');\n\t \t\tpreparedStatement.setInt(2, dishtype);\n\t\t\t\tSystem.out.println(preparedStatement);\n\t \t\t//Execute the query\n\t \t\tResultSet rs = preparedStatement.executeQuery();\n\t \t\t// Process Result\n\t \t\twhile(rs.next()) {\n\t \t\t\tint dishId = Integer.parseInt(rs.getString(\"dish_id\"));\n\t \t\t\tString dishName = rs.getString(\"dish_name\");\n\t \t\t\tString dishImage = rs.getString(\"dish_image\");\n\t \t\t\tint dishType = Integer.parseInt(rs.getString(\"dish_type\"));\n\t \t\t\tfloat dishPrice = Float.parseFloat(rs.getString(\"dish_price\"));\n\t \t\t\tdishes.add(new Dish(dishId,dishName,dishImage,dishType,dishPrice));\n\t \t\t}\n\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 \treturn dishes;\n\t}",
"private void appointmentReport() {\n Set<String> types = new HashSet<>();\n Set<Month> months = new HashSet<>();\n HashMap<String, Integer> numberByType = new HashMap<>();\n HashMap<Month, Integer> numberByMonth = new HashMap<>();\n\n for (Appointment appointment: Data.getAppointments()) {\n months.add(appointment.getStart().toLocalDateTime().getMonth());\n types.add(appointment.getType());\n }\n\n for (String type: types) {\n int count = 0;\n for (Appointment appointment: Data.getAppointments()) {\n\n if (type.equals(appointment.getType())) {\n count++;\n }\n numberByType.put(type, count);\n }\n }\n for (Month month: months) {\n int count = 0;\n for (Appointment appointment: Data.getAppointments()) {\n if (month.equals(appointment.getStart().toLocalDateTime().getMonth())) {\n count++;\n }\n numberByMonth.put(month, count);\n }\n }\n\n reportText.appendText(\"Report of the number of appointments by type:\\n\\n\");\n reportText.appendText(\"Count \\t\\tType\\n\");\n numberByType.forEach((k,v) -> reportText.appendText(v + \"\\t\\t\" + k + \"\\n\"));\n reportText.appendText(\"\\n\\n\\nReport of the number of appointments by Month:\\n\\n\");\n reportText.appendText(\"Count \\t\\tMonth\\n\");\n numberByMonth.forEach((k,v) -> reportText.appendText(v + \"\\t\\t\" + k + \"\\n\"));\n\n }",
"private void showCourtBookings()\n {\n ArrayList<Court> courtList = new ArrayList<Court>();\n ArrayList<Booking> bookingList = new ArrayList<Booking>();\n for(Sport sObj : sportsClub.sportList)\n {\n System.out.println(\"Displaying Courts for : \" + sObj.getSportName());\n courtList = sObj.getCourtList();\n for(Court cObj : courtList)\n { \n if(cObj.getCourtBookings().size()==0)\n System.out.println(\"Booking are not yet started for sport :\" + sObj.getSportName() + \" on Court : \" + cObj.getCourtId());\n else\n { \n\n Collections.sort(cObj.getCourtBookings());\n System.out.println(cObj.getCourtBookings().toString());\n\n } \n }\n } \n }",
"public String displayAllBookings(String serviceType, String sortType) {\n\t\tif (itemCount == 0) {\n\t\t\treturn \"No cars of this type have been added to the system.\";\n\t\t}\n\t\tif (serviceType.equalsIgnoreCase(\"SD\")) {\n\t\t\tif (sortType.equalsIgnoreCase(\"A\")) {\n\t\t\t\tString[] regNo = this.createArrayOfRegNo();\n\t\t\t\treturn this.sortSdSmallest(regNo);\n\t\t\t}\n\t\t\tif (sortType.equalsIgnoreCase(\"D\")) {\n\t\t\t\tString[] regNo = this.createArrayOfRegNo();\n\t\t\t\treturn this.sortSdBiggest(regNo);\n\t\t\t}\n\t\t}\n\n\t\tif (serviceType.equalsIgnoreCase(\"SS\")) {\n\t\t\tif (sortType.equalsIgnoreCase(\"A\")) {\n\t\t\t\tString[] regNo = this.createArrayOfRegNo();\n\t\t\t\treturn this.sortSsSmallest(regNo);\n\t\t\t}\n\t\t\tif (sortType.equalsIgnoreCase(\"D\")) {\n\t\t\t\tString[] regNo = this.createArrayOfRegNo();\n\t\t\t\treturn this.sortSsBiggest(regNo);\n\t\t\t}\n\t\t}\n\t\treturn \"Error\";\n\t}",
"private ReportType getReportTypeForBudgetSalarySummary(\n BudgetDecimal vacationRate, BudgetDecimal empBenefitRate,\n BudgetDecimal fringe, BudgetDecimal fringeCostSharing,\n ReportTypeVO reportTypeVO) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT_MMDDYY);\n ReportType reportType = ReportType.Factory.newInstance();\n reportType.setStartDate(dateFormat.format(reportTypeVO.getStartDate()));\n reportType.setEndDate(dateFormat.format(reportTypeVO.getEndDate()));\n reportType.setBudgetCategoryDescription(reportTypeVO.getBudgetCategoryDesc());\n reportType.setPersonName(reportTypeVO.getPersonName());\n reportType.setPercentEffort(reportTypeVO.getPercentEffort() != null ? reportTypeVO.getPercentEffort().doubleValue() : 0.00);\n reportType.setPercentCharged(reportTypeVO.getPercentCharged() != null ? reportTypeVO.getPercentCharged().doubleValue() : 0.00);\n reportType.setVacationRate(vacationRate.toString().concat(PERCENTAGE));\n reportType.setEmployeeBenefitRate(empBenefitRate.toString().concat(PERCENTAGE));\n reportType.setCostSharingAmount(reportTypeVO.getCostSharingAmount().doubleValue());\n reportType.setCalculatedCost(fringeCostSharing.doubleValue());\n reportType.setFringe(fringe.doubleValue());\n reportType.setCostElementDescription(reportTypeVO.getCostElementDesc());\n reportType.setInvestigatorFlag(reportTypeVO.getInvestigatorFlag());\n if (reportTypeVO.getBudgetCategoryCode() != null) {\n reportType.setBudgetCategoryCode(Integer.parseInt(reportTypeVO.getBudgetCategoryCode()));\n }\n reportType.setSalaryRequested(reportTypeVO.getSalaryRequested().doubleValue());\n return reportType;\n }",
"@Override\n public List<KidneyDonor> getDonorsWithBloodType( int type )\n {\n\n List<KidneyDonor> results = new LinkedList<KidneyDonor>(); \n if(donorByBloodT.containsKey(type)){\n results = donorByBloodT.get(type);\n }\n\n return results; \n }",
"public List<Report> getReportsByType(ReportType type);",
"public static void outputRecord(Order o, char type, int numShares) {\n System.out.println( o.getVenue() + \",\" + o.getTicker() + \",\" + type + \",\"\n + o.getBook() + \",\" + numShares + \",\"\n + o.getPrice() + \",\" + o.getOref());\n }",
"private static AppointmentResult findAvailableTimeAndDoctor(LocalDate date, SpecializationType specialtyType, IPerson patient) throws Exception {\n // Assuming normal day is between 09:00 and 17:00\n LocalTime open = LocalTime.parse(\"09:00:00\");\n LocalTime closed = LocalTime.parse(\"17:00:00\");\n int appointmentMinutes = 15;\n LocalDate currentDate = LocalDate.now();\n\n // Check if date is before current time or patient already has appointment\n if (date.isBefore(currentDate)) {\n throw new Exception(\"The date you tried entering, is invalid.\");\n }\n if (getAllOpenAppointments(patient).stream().anyMatch(appointment -> appointment.getAppointmentDate().toLocalDate().equals(date))) {\n throw new Exception(\"You already have an appointment set for your specified date.\");\n }\n\n // Grab all doctors available at date with specified type\n ArrayList<Doctor> doctors = getDoctorsAvailableAtDateWithType(date, specialtyType);\n\n if (doctors.size() == 0)\n throw new Exception(\"There aren't any doctors with this specialization available for your specified date.\");\n\n // Grab all appointments on given date\n ArrayList<Appointment> appointments = getAllAppointmentsOnDate(date);\n\n // Check for each available doctor if they have time on day\n ArrayList<AppointmentResult> availableDoctors = new ArrayList<>();\n\n // Need to check if a doctor is available at time, check if there's another doctor available before that.\n // If there is, just assign that doctor to the appointment.\n for (Doctor doc : doctors) {\n ArrayList<Appointment> appointmentsDoc = getAppointmentsDoctorInAppointment(appointments, doc);\n\n // Doctor has no appointments on day\n if (appointmentsDoc.size() == 0) {\n availableDoctors.add(new AppointmentResult(doc, LocalDateTime.of(date, open)));\n break;\n }\n\n // Actually just need to check the last appointment\n LocalDateTime currentAppointmentTime = appointmentsDoc.get(appointmentsDoc.size() - 1).getAppointmentDate().plusMinutes(appointmentMinutes + 1);\n\n // Found a doctor available\n if (currentAppointmentTime.toLocalTime().isBefore(closed.minusMinutes(appointmentMinutes))) {\n availableDoctors.add(new AppointmentResult(doc, currentAppointmentTime));\n }\n }\n\n availableDoctors.sort(Comparator.comparing(AppointmentResult::getAppointmentTime));\n\n if (availableDoctors.isEmpty())\n throw new Exception(\"There aren't any doctors available on your specified date.\");\n\n // Return the first in the array since that doctor is available at the earliest time\n return availableDoctors.get(0);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
\u2190 The taken state of the Energy. If an Energy is taken, it will be hidden until shown() is run / When initialized, Energy will take in the hexColor and the player number of the player it belongs to Positions are set to a ranfom value with a 50px padding from the edges of the screen Since it is just created, the Energy will not have been taken Size is set to 20, arbitrarily | public Energy(int hexColor) {
super();
this.hexColor = hexColor;
plusOne = new PlusOne(hexColor);
plusOne.hide();
positionX = random(50, width - 50);
positionY = random(50, height - 50);
taken = false;
size = 20;
} | [
"public void updateColor(Entity e) {\n if (!colm.has(e))\n return;\n\n ColorComponent color = colm.get(e);\n if (color.color != color.oldColor) {\n if (color.color == 'x') {\n im.get(e).texRegion = ImageComponent.atlas.findRegion(\"PlayerShip\");\n shm.get(e).attackDelay = 0.2f;\n }\n else if (color.color == 'r') {\n im.get(e).texRegion = ImageComponent.atlas.findRegion(\"PlayerShipRed\");\n shm.get(e).attackDelay = 0.85f;\n }\n else if (color.color == 'g') {\n im.get(e).texRegion = ImageComponent.atlas.findRegion(\"PlayerShipGreen\");\n shm.get(e).attackDelay = 1f;\n }\n else if (color.color == 'p') {\n im.get(e).texRegion = ImageComponent.atlas.findRegion(\"PlayerShipPink\");\n shm.get(e).attackDelay = 0.15f;\n }\n else if (color.color == 'v') {\n im.get(e).texRegion = ImageComponent.atlas.findRegion(\"PlayerShipPurple\");\n shm.get(e).attackDelay = 0.4f;\n }\n else if (color.color == 'b') {\n im.get(e).texRegion = ImageComponent.atlas.findRegion(\"PlayerShipBlue\");\n shm.get(e).attackDelay = 0.4f;\n }\n else if (color.color == 'y') {\n im.get(e).texRegion = ImageComponent.atlas.findRegion(\"PlayerShipYellow\");\n shm.get(e).attackDelay = 0.09f;\n }\n else if (color.color == 'o') {\n im.get(e).texRegion = ImageComponent.atlas.findRegion(\"PlayerShipOrange\");\n shm.get(e).attackDelay = 2f;\n }\n else if (color.color == 'w') {\n im.get(e).texRegion = ImageComponent.atlas.findRegion(\"PlayerShipWhite\");\n shm.get(e).attackDelay = 0.45f;\n }\n }\n color.oldColor = color.color;\n }",
"public PlayerView(String name, PlayerColor color) {\n this.name = name;\n this.color = color;\n this.state = PlayerState.IDLE;\n numLoadedWeapons = 0;\n unloadedWeapons = new ArrayList<>();\n numPowerUps = 0;\n squarePosition = null;\n wallet = new Cash(0,0,0);\n skulls = 0;\n damageList = new ArrayList<>();\n markMap = new HashMap<>();\n isFrenzy = false;\n }",
"public void setupField() {\r\n //resets the game status to 0 \r\n //game is in play\r\n gameStatus=0;\r\n //gae is not yet complete\r\n complete=false;\r\n //initialize moved array\r\n for(int i=0;i<10;i++)\r\n {\r\n for(int j=0;j<10;j++)\r\n {\r\n moved[i][j]=false;\r\n }\r\n }\r\n\r\n // populates the state character array to initial state\r\n //initially the field will be drawn\r\n for (int a=0; a<10; a++){\r\n for (int b=0; b<10;b++){\r\n currentState[a][b]='a';\r\n }\r\n }\r\n\r\n // place the user in the bottom right\r\n currentState[9][9]='b';\r\n userA=9;\r\n userB=9;\r\n\r\n //randomly place good and evil\r\n int Min=0,Max=8;\r\n randomEvilA= Min + (int)(Math.random() * ((Max - Min) + 1));\r\n randomEvilB= Min + (int)(Math.random() * ((Max - Min) + 1));\r\n randomGoodA= Min + (int)(Math.random() * ((Max - Min) + 1));\r\n randomGoodB= Min + (int)(Math.random() * ((Max - Min) + 1));\r\n\r\n // make sure they will not be the same number\r\n while(randomEvilA==randomGoodA && randomEvilB==randomGoodB)\r\n {\r\n\r\n randomEvilA= Min + (int)(Math.random() * ((Max - Min) + 1));\r\n randomEvilB= Min + (int)(Math.random() * ((Max - Min) + 1));\r\n randomGoodA= Min + (int)(Math.random() * ((Max - Min) + 1));\r\n randomGoodB= Min + (int)(Math.random() * ((Max - Min) + 1));\r\n }\r\n\r\n // call repaint\r\n repaint();\r\n }",
"public PlayerIndicator (Color color)\n {\n this.color = color;\n setBackground(BACKGROUND_COLOR);\n setPreferredSize(new Dimension(30, 30));\n }",
"public void generateScreen(){\n\t\tnifty.addScreen(\"hud\", new ScreenBuilder(\"hud\") {{\n\t\t\tcontroller(screenController);\n\n\t\t\t//Set up the background base panel\n\t\t\tlayer(new LayerBuilder(\"Bae panel\") {{\n\t\t\t\tchildLayoutHorizontal();\n\t\t\t\tpanel(new PanelBuilder(\"stop-left\") {{\n\t\t\t\t\tvalignBottom();\n\t\t\t\t\twidth(\"100%\");\n\t\t\t\t\theight(\"20%\");\n\t\t\t\t\tchildLayoutVertical();\n\t\t\t\t\timage(new ImageBuilder() {{\n\t\t\t\t\t\tvalignBottom();\n\t\t\t\t\t\twidth(\"100%\");\n\t\t\t\t\t\theight(\"101%\");\n\t\t\t\t\t\tfilename(\"Interface/Base.v8.png\");\n\t\t\t\t\t\tchildLayoutAbsolute();\n\t\t\t\t\t}});\n\t\t\t\t}});\n\t\t\t}});\n\t\t\t\n\t\t\t//Sets up the layer containing the health and \n\t\t\t//energy orbs, along with the droppable slots for items\n\t\t\tlayer(new LayerBuilder(\"backgroundElements\") {{\n\t\t\t\tchildLayoutAbsolute();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\timage(new ImageBuilder(\"chatButton\"){{\n\t\t\t\t\tx(\"\"+(int)(screenWidth*0.250));\n\t\t\t\t\ty(\"\"+(int)(screenHeight*0.93));\n\t\t\t\t\twidth(\"\"+(int)(screenWidth*0.030));\n\t\t\t\t\theight(\"\"+ (int)(screenHeight*0.055));\n\t\t\t\t\tvisibleToMouse(true);\n\t\t\t\t\tfilename(\"Interface/\"+ \"chatbutton.png\");\n\t\t\t\t}});\n\t\t\t\t\n\t\t\t\t//sets up the 'health' orb and associated effects\n\t\t\t\timage (new ImageBuilder(\"HealthOrb\"){{\n\t\t\t\t\tx(\"\"+(int)(screenWidth*0.028));\n\t\t\t\t\ty(\"\"+(int)(screenHeight*0.81));\n\t\t\t\t\twidth(\"\"+(int)(screenWidth*0.097));\n\t\t\t\t\theight(\"\"+(int)(screenHeight*0.154));\n\t\t\t\t\tonCustomEffect(new EffectBuilder(\"orbChanger\"){{\n\t\t\t\t\t\teffectParameter(\"start\",\"#ff\");\n \teffectParameter(\"end\", \"#00\");\n \tlength(2000);\n\t\t\t\t\t}});\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t}});\n\n\t\t\t\t//separate image for for the fade effect \n\t\t\t\t//that takes place when the player takes damage\n\t\t\t\timage (new ImageBuilder(\"HealthOrbFade\"){{\n\t\t\t\t\tx(\"\"+(int)(screenWidth*0.028));\n\t\t\t\t\ty(\"\"+(int)(screenHeight*0.81));\n\t\t\t\t\twidth(\"\"+(int)(screenWidth*0.097));\n\t\t\t\t\theight(\"\"+(int)(screenHeight*0.154));\n\t\t\t\t\tonCustomEffect(new EffectBuilder(\"orbFadeChange\"){{\n\t\t\t\t\t\tcustomKey(\"OrbFade\");\n\t\t\t\t\t\teffectParameter(\"start\",\"#ff\");\n \teffectParameter(\"end\", \"#00\");\n \tlength(2000);\n\t\t\t\t\t}});\n\t\t\t\t\tonCustomEffect(new EffectBuilder(\"orbChanger\"){{\n\t\t\t\t\t\tcustomKey(\"OrbChange\");\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\t//sets up the 'Energy' orb and associated effects\n\t\t\t\timage (new ImageBuilder(\"EnergyOrb\"){{\n\t\t\t\t\tx(\"\"+(int)(screenWidth*0.868));\n\t\t\t\t\ty(\"\"+(int)(screenHeight*0.821));\n\t\t\t\t\twidth(\"\"+(int)(screenWidth*0.0968));\n\t\t\t\t\theight(\"\"+(int)(screenHeight*0.147));\n\t\t\t\t\tonCustomEffect(new EffectBuilder(\"orbChanger\"){{\n\t\t\t\t\t\teffectParameter(\"start\",\"#ff\");\n \teffectParameter(\"end\", \"#00\");\n \tlength(2000);\n\t\t\t\t\t}});\n\t\t\t\t}});\n\n\t\t\t\t//separate image for for the fade effect \n\t\t\t\t//that takes place when the player takes damage\n\t\t\t\timage (new ImageBuilder(\"EnergyOrbFade\"){{\n\t\t\t\t\tx(\"\"+(int)(screenWidth*0.868));\n\t\t\t\t\ty(\"\"+(int)(screenHeight*0.821));\n\t\t\t\t\twidth(\"\"+(int)(screenWidth*0.0968));\n\t\t\t\t\theight(\"\"+(int)(screenHeight*0.147));\n\t\t\t\t\tonCustomEffect(new EffectBuilder(\"orbFadeChange\"){{\n\t\t\t\t\t\tcustomKey(\"OrbFade\");\n\t\t\t\t\t\teffectParameter(\"start\",\"#ff\");\n \teffectParameter(\"end\", \"#00\");\n \tlength(2000);\n\t\t\t\t\t}});\n\t\t\t\t\tonCustomEffect(new EffectBuilder(\"orbChanger\"){{\n\t\t\t\t\t\tcustomKey(\"OrbChange\");\n\t\t\t\t\t}});\n\t\t\t\t}});\n\n\t\t\t\t//sets up the droppable slots on the base panel. As\n\t\t\t\t//these items are not at fixed intervals and heights, their relative positions \n\t\t\t\t//are hard coded here.\n\t\t\t\tint itemCount = 1;\n\t\t\t\tcontrol(createDropSlot(\"InventBase\"+itemCount++, (int)(screenWidth*0.145),(int)(screenHeight*0.91),\n\t\t\t\t\t\t(int)(screenWidth*0.031+2), (int)(screenHeight*0.07)));\n\t\t\t\tcontrol(createDropSlot(\"InventBase\"+itemCount++, (int)(screenWidth*0.3066),(int)(screenHeight*0.91),\n\t\t\t\t\t\t(int)(screenWidth*0.031+2), (int)(screenHeight*0.07)));\n\t\t\t\tcontrol(createDropSlot(\"InventBase\"+itemCount++, (int)(screenWidth*0.367),(int)(screenHeight*0.91),\n\t\t\t\t\t\t(int)(screenWidth*0.031+2), (int)(screenHeight*0.07)));\n\t\t\t\tcontrol(createDropSlot(\"InventBase\"+itemCount++, (int)(screenWidth*0.428),(int)(screenHeight*0.91),\n\t\t\t\t\t\t(int)(screenWidth*0.031+2), (int)(screenHeight*0.07)));\n\t\t\t\tcontrol(createDropSlot(\"InventBase\"+itemCount++, (int)(screenWidth*0.489),(int)(screenHeight*0.91),\n\t\t\t\t\t\t(int)(screenWidth*0.031+2), (int)(screenHeight*0.07)));\n\t\t\t\tcontrol(createDropSlot(\"InventBase\"+itemCount++, (int)(screenWidth*0.548),(int)(screenHeight*0.91),\n\t\t\t\t\t\t(int)(screenWidth*0.031+2), (int)(screenHeight*0.07)));\n\t\t\t\tcontrol(createDropSlot(\"InventBase\"+itemCount++, (int)(screenWidth*0.608),(int)(screenHeight*0.91),\n\t\t\t\t\t\t(int)(screenWidth*0.031+2), (int)(screenHeight*0.07)));\n\t\t\t\tcontrol(createDropSlot(\"InventBase\"+itemCount++, (int)(screenWidth*0.658),(int)(screenHeight*0.91),\n\t\t\t\t\t\t(int)(screenWidth*0.031+2), (int)(screenHeight*0.07)));\n\t\t\t\t\n\t\t\t\t\n\t\n\t\t\t\t//Sets up the drop area for items \n\t\t\t\tpanel(new PanelBuilder(\"AreasForDrop\"){{\n\t\t\t\t\tchildLayoutHorizontal();\n\t\t\t\t\twidth(\"100%\");\n\t\t\t\t\theight(\"100%\");\n\t\t\t\t\t//equip drop area is the area beneath the char equip panel.\n\t\t\t\t\t//if a player accidentally misses a drop slot they will\n\t\t\t\t\t//not drop their item\n\t\t\t\t\tcontrol(new DroppableBuilder(\"EqDropArea\"){{ \n\t\t\t\t\t\theight(\"80%\");\n\t\t\t\t\t\twidth(\"40%\");\n\t\t\t\t\t}});\n\t\t\t\t\t//the chief drop area (main screen)\n\t\t\t\t\tcontrol(new DroppableBuilder(\"DropArea\"){{ \n\t\t\t\t\t\theight(\"80%\");\n\t\t\t\t\t\twidth(\"60%\");\n\t\t\t\t\t}});\n\t\t\t\t\t\n\t\t\t\t}});\n\t\t\t\tdropSlots.add(\"EqDropArea\"); //drop slots added to establish DroppableDropFilter\n\t\t\t\tdropSlots.add(\"DropArea\");\t\n\t\t\t\t\n\t\t\t\t//adds the \"\n\t\t\t\tpanel(new PanelBuilder(\"CharBut\") {{\n\t\t\t\t\tx(\"\"+(int)(screenWidth*0.705));\n\t\t\t\t\ty(\"\"+(int)(screenHeight*0.906));\n\t\t\t\t\tchildLayoutVertical();\n\t\t\t\t\tvisibleToMouse(true);\n\t\t\t\t\timage(new ImageBuilder() {{\n\t\t\t\t\t\twidth(\"\"+((int)(screenWidth*0.062+4)));\n\t\t\t\t\t\theight(\"\"+((int)(screenHeight*0.090)));\n\t\t\t\t\t\tchildLayoutVertical();\n\t\t\t\t\t\tfilename(\"Interface/CharButton.png\");\n\t\n\t\t\t\t\t}});\n\t\t\t\t}});\n\t\t\t\t\n\t\t\t\t//The Inventory Button\n\t\t\t\tpanel(new PanelBuilder(\"InventoryBut\") {{\n\t\t\t\t\tx(\"\"+(int)(screenWidth*0.78));\n\t\t\t\t\ty(\"\"+(int)(screenHeight*0.9));\n\t\t\t\t\tchildLayoutVertical();\n\t\t\t\t\tvisibleToMouse(true);\n\t\t\t\t\timage(new ImageBuilder() {{\n\t\t\t\t\t\twidth(\"\"+((int)(screenWidth*0.062+4)));\n\t\t\t\t\t\theight(\"\"+((int)(screenHeight*0.095)));\n\t\t\t\t\t\tchildLayoutVertical();\n\t\t\t\t\t\tfilename(\"Interface/Inventory.png\");\n\t\t\t\t\t}});\n\t\t\t\t}});\n\t\t\t\t\n\n\t\t\t\t//Panel for the chat\n\t\t\t\tpanel(new PanelBuilder(\"chatPanel\"){{\n\t\t\t\t\tx(\"\"+(int)(screenWidth*0.25));\n\t\t\t\t\ty(\"\"+(int)(screenHeight*0.65));\n\t\t\t\t\tchildLayoutVertical();\n\t\t\t\t\tvisible(false);\n\t\t\t\t\tonCustomEffect(new EffectBuilder(\"move\"){{\n\t\t\t\t\t\tlength(200);\n\t\t\t\t\t\tinherit();\n\t\t\t\t\t\teffectParameter(\"mode\", \"in\");\n\t\t\t\t\t\teffectParameter(\"direction\", \"bottom\");\n\t\t\t\t\t}});\n\t\t\t\t\t//list box containing chat Strings\n\t\t\t\t\tcontrol(new ListBoxBuilder(\"listBoxChat\") {{\n\t\t\t\t\t\tstyle(\"Interface/Styles/newListBox.xml\");\n\t\t\t\t\t\tdisplayItems(5);\n\t\t\t\t\t\twidth(\"\"+(int)(screenWidth*0.45));\n\t\t\t\t\t\theight(\"\"+(int)(screenHeight*0.2));\n\t\t\t\t\t\tselectionModeDisabled();\n\t\t\t\t\t\thideHorizontalScrollbar();\n\t\t\t\t\t\tbackgroundColor(\"#145a\"); \n\t\t\t\t\t}});\n\t\t\t\t\t\n\t\t\t\t\t//input for chat\n\t\t\t\t\tcontrol(new TextFieldBuilder(\"chatText\",\"\"){{\n\t\t\t\t\t\twidth(\"\"+(int)(screenWidth*0.45));\n\t\t\t\t\t\theight(\"\"+(int)(screenHeight*0.04));\n\t\t\t\t\t\tbackgroundColor(\"#145a\"); \n\t\t\t\t\t}});\n\t\t\t\t}});\n\t\t\t\t\n\t\t\t\t//Generate the key inventory and equipment panels\n\t\t\t\tpanel(cequip.makePanel());\n\t\t\t\tpanel(worldChest.makeWorldChest());\n\t\t\t\tpanel(container.makeContainer());\n\t\t\t\tpanel(inPanel.makeInventory());\n\t\t\t\t\n\t\t\t\t//set up the 'MobDisplay' panel for targetting mobs\n\t\t\t\tpanel(new PanelBuilder(\"MobDisplay\") {{\n\t\t\t\t\tchildLayoutAbsolute();\n\t\t\t\t\t//create the outer cover image\n\t\t\t\t\timage (new ImageBuilder(\"MobTabCover\"){{\n\t\t\t\t\t\tx(\"\"+(int)(screenWidth*0.05));\n\t\t\t\t\t\ty(\"\"+(int)(screenHeight*0.04));\n\t\t\t\t\t\twidth(\"\"+((int)(screenWidth*0.22)));\n\t\t\t\t\t\theight(\"\"+((int)(screenHeight*0.12)));\n\t\t\t\t\t\tfilename(\"Interface/MobTabCover.png\");\n\t\t\t\t\t}});\n\t\t\t\t\t//the image of the actual mob (generated dynamically)\n\t\t\t\t\timage(new ImageBuilder(\"MobTab\") {{\n\t\t\t\t\t\tx(\"\"+(int)(screenWidth*0.06));\n\t\t\t\t\t\ty(\"\"+(int)(screenHeight*0.06));\n\t\t\t\t\t\twidth(\"\"+((int)(screenWidth*0.15)));\n\t\t\t\t\t\theight(\"\"+((int)(screenHeight*0.064)));\n\t\t\t\t\t\tchildLayoutVertical();\n\t\t\t\t\t\tfilename(\"Interface/TestMob.png\");//placeholder\n\t\t\t\t\t\tonCustomEffect(new EffectBuilder(\"mobDisplay\"){{\n\t\t\t\t\t\t\tlength(1);\n\t\t\t\t\t\t\tneverStopRendering(true);\n\t\t\t\t\t\t}});\n\t\t\t\t\t}});\n\t\t\t\t\t//text for the mob's name (generated dynamically)\n\t\t\t\t\ttext(new TextBuilder(\"MobText\") {{\n\t\t\t\t\t\tx(\"\"+(int)(screenWidth*0.095));\n\t\t\t\t\t\ty(\"\"+(int)(screenHeight*0.136));\n\t\t\t\t\t\tfont(\"Interface/Fonts/MobText.fnt\");\n\t\t\t\t\t}});\n\t\t\t\t\tvisible(false);\n\t\t\t\t}});\n\t\t\t}});\n\t\t\t\n\t\t\t//Sets up foreground panel \n\t\t\tlayer(new LayerBuilder(\"foreground\") {{\n\t\t\t\tchildLayoutHorizontal();\n\t\t\t\t//Cross hairs for the first person view.\n\t\t\n\n\t\t\t\tpanel(new PanelBuilder(\"CrossHairPanel\") {{\n\t\t\t\t\tchildLayoutAbsolute();\n\t\t\t\t\theight(\"100%\");\n\t\t\t\t\twidth(\"100%\");\n\t\t\t\t\timage (new ImageBuilder(\"CrossHairs\"){{\n\t\t\t\t\t\tx(\"\"+(int)(screenWidth*0.475));\n\t\t\t\t\t\ty(\"\"+(int)(screenHeight*0.475));\n\t\t\t\t\t\twidth(\"\"+((int)(screenWidth*0.05)));\n\t\t\t\t\t\theight(\"\"+((int)(screenWidth*0.05)));\n\t\t\t\t\t\tfilename(\"Interface/CrossHairs.png\");\n\t\t\t\t\t\tvisible(false);\n\t\t\t\t\t}});\n\t\t\t\t}});\n\t\t\t}});\n\t\t\t\n\t\t\t\n\t\t\tlayer(new LayerBuilder(\"messaging\") {{\n\t\t\t\t// panel for displaying messages on the hud screen\n\t\t\t\tchildLayoutHorizontal();\n\t\t\t\tpanel(new PanelBuilder(\"message_panel\") {{\n\t\t\t\t\tchildLayoutAbsolute();\n\t\t\t\t\theight(\"100%\");\n\t\t\t\t\twidth(\"50%\");\n\t\t\t\t\ttext(new TextBuilder(\"MessagePanel\"){{\n\t\t\t\t\t\tx(\"\"+(int)(screenWidth*0.5));\n\t\t\t\t\t\ty(\"\"+(int)(screenHeight*0.7));\n\t\t\t\t\t\tvalignCenter();\n\t\t\t\t\t\tfont(\"Interface/Fonts/CharEquip.fnt\");\n\t\t\t\t\t\ttext(\"\");\n\t\t\t\t\t\ttextHAlignCenter();\n\t\t\t\t\t\t//fade erase effect on the hud screen message text\n\t\t\t\t\t\tonCustomEffect(new EffectBuilder(\"fadeErase\"){{\n \teffectParameter(\"start\",\"#ff\");\n \teffectParameter(\"end\", \"#00\");\n \tlength(2000);\n }});\n\t\t\t\t\t}});\n\t\t\t\t\twidth(\"80%\");\n\t\t\t\t}});\n\t\t\t}});\n\t\t}}.build(nifty));\n\n\t\tconfigureDroppables();\n\t\tscreenController.initialisePositions(dropSlots);\n\t\t\n\t}",
"private void setLEValues() {\n initData = getInitData();\n //Width Init\n width = Integer.parseInt(getInitData().get(\"width\"));\n lblWidth.setText(initData.get(\"width\"));\n sliWidth.setValue(width);\n\n //Height Init\n height = Integer.parseInt(getInitData().get(\"height\"));\n lblHeight.setText(initData.get(\"height\"));\n sliHeight.setValue(height);\n\n\n strAuthor = initData.get(\"author\");\n //Setting the author as a menu item\n menAuthor.setText(\"Author: \" + strAuthor);\n strName = initData.get(\"name\");\n menName.setText(\"Currently Editing: \" + strName);\n\n //Setting the red-highlighted backgrounds to be invisible on first start\n imgPlayerSel1.setVisible(false);\n imgPlayerSel2.setVisible(false);\n imgPlayerSel3.setVisible(false);\n imgPlayerSel4.setVisible(false);\n\n //Setting the String names of the player cars to what the defaults were before we added colour changing\n player1Color = \"playerPINK\";\n player2Color = \"playerYELLOW\";\n player3Color = \"playerTURQUOISE\";\n player4Color = \"playerORANGE\";\n\n upgrades = new ArrayList<>();\n boardRender = new LECanvas(mainCanvas, lblStatus);\n\n\n lblStatus.setText(\"Main View Loading...\");\n //How'd that get in there?\n if (initData.get(\"pizza\").equals(\"true\")) {\n /*Brief rundown of what's actually happening here\n Triggered by holding backspace when creating a new level\n I tried to use the LECanvas class here to draw the secret image but I don't think that works, that's why onMouseCanvas also has a way to do this\n Everything else is just setting the text as well as setting the global boolean to know that the secret is active for later use\n */\n strName = \"pizza\";\n Main.mediaPlayer.stop();\n Image pizza = new Image(\"pizza.png\");\n GraphicsContext gc = mainCanvas.getGraphicsContext2D();\n gc.drawImage(pizza, 50, 50);\n Media pizzaSound = new Media(new File(\"Assets\\\\Music\\\\pizzaTime.mp3\").toURI().toString());\n Media sound = new Media(new File(\"Assets\\\\Music\\\\pizza.mp3\").toURI().toString());\n pizzaTime = new MediaPlayer(pizzaSound);\n pizzaMusic = new MediaPlayer(sound);\n pizzaTime.play();\n pizzaMusic.play();\n //Some issues with the Jukebox interacting with the secret so I just disabled it\n btnJukebox.setDisable(true);\n menFile.setText(\"Pizza Time\");\n menHelp.setText(\"\");\n menHistory.setText(\"\");\n menName.setText(\"\");\n boolPizza = true;\n imgPlayer1.setImage(new Image(\"pizzaMan.png\"));\n imgPlayer2.setImage(new Image(\"pizzaMan.png\"));\n imgPlayer3.setImage(new Image(\"pizzaMan.png\"));\n imgPlayer4.setImage(new Image(\"pizzaMan.png\"));\n\n imgCorner.setImage(new Image(\"squarePizza.png\"));\n imgStraight.setImage(new Image(\"squarePizza.png\"));\n imgT.setImage(new Image(\"squarePizza.png\"));\n imgEmpty.setImage(new Image(\"squarePizza.png\"));\n imgGoal.setImage(new Image(\"squarePizza.png\"));\n\n btnEnableAction.setText(\"Enable Pizza\");\n btnDisableAction.setText(\"Disable Pizza\");\n\n imgFire.setImage(new Image(\"firePizza.png\"));\n imgIce.setImage(new Image(\"frozenPizza.jpg\"));\n imgDouble.setImage(new Image(\"doublePizza.jpg\"));\n imgBacktrack.setImage(new Image(\"backPizza.jpg\"));\n\n }\n }",
"protected void CreateDefault() {\r\n\t\t \r\n\t\tColourInfo Default = new ColourInfo();\r\n\t\t\r\n\t\tDefault.ColourID = \"Default\";\r\n\t\tDefault.Mutable = false;\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(218);\r\n\t\tDefault.Greens.add(218);\r\n\t\tDefault.Blues.add(218);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(80);\r\n\t\tDefault.Greens.add(80);\r\n\t\tDefault.Blues.add(80);\r\n\t\tDefault.Reds.add(235);\r\n\t\tDefault.Greens.add(235);\r\n\t\tDefault.Blues.add(235);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(180);\r\n\t\tDefault.Greens.add(238);\r\n\t\tDefault.Blues.add(180);\r\n\t\tDefault.Reds.add(155);\r\n\t\tDefault.Greens.add(205);\r\n\t\tDefault.Blues.add(155);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(200);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(200);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(200);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(200);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(200);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(200);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(80);\r\n\t\tDefault.Greens.add(80);\r\n\t\tDefault.Blues.add(80);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(174);\r\n\t\tDefault.Blues.add(185);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(187);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(135);\r\n\t\tDefault.Greens.add(206);\r\n\t\tDefault.Blues.add(255);\r\n\t\tDefault.Reds.add(0);\r\n\t\tDefault.Greens.add(255);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(240);\r\n\t\tDefault.Greens.add(240);\r\n\t\tDefault.Blues.add(0);\r\n\t\tDefault.Reds.add(255);\r\n\t\tDefault.Greens.add(0);\r\n\t\tDefault.Blues.add(0);\r\n\t\t\r\n\t\tColours.put(\"Default\", Default);\r\n\t}",
"public void manageWildColour(){\n playingScreen.setEnabled(true);\n this.dispose();\n if(Game.currentPlayer.hand.hand.size() == 1){\n JOptionPane.showMessageDialog(null, \"It's the last card!\\n------**UNO**-----\",\"LAST CARD\",JOptionPane.INFORMATION_MESSAGE);\n }\n wildCard.implementCard();\n Turns.showToast(wildCard.type);\n \n }",
"Building() {\n\t\tcurrentRegenTime = regenMax;\n\t\txsize = 150;\n\t\tysize = 100;\n\t\tyloc = ShoreBoard.getScreenheight() - ysize - (3 * ShoreBoard.getHealthbarthicc());\n\t}",
"public void DisplayWithShield() {\n\t\tplayers = new ArrayList<Player>();\n\t\tplayer1 = new Player(\"Nick\");\n\t\tplayer2 = new Player(\"Ausitn\");\n\t\tplayers.add(player1);\n\t\tplayers.add(player2);\n\t\tgame = new GameState();\n\t\tgame.initializeServer(players);\n\t\tRulesEngine.setColour(game, String.valueOf(Type.PURPLE));\n\t\t\n\t\tgame.setTurn(0);\n\t\t\n\t\t\n\t\t//create cards to be added to player's hand and target's display\n\t\tCard purpleCard = new Card(Type.PURPLE, 3);\n\t\tCard greenCard = new Card(Type.GREEN, 1);\n\t\tCard yellowCard = new Card(Type.YELLOW, 3);\n\t\tCard blueCard = new Card(Type.BLUE, 3);\n\t\tCard redCard = new Card(Type.RED, 4);\n\t\tCard squire = new Card(Type.WHITE, 2);\n\t\tCard maiden = new Card (Type.WHITE, 6);\n\t\tCard shield = new Card(Type.ACTION, Card.SHIELD);\n\t\t\n\t\t//Give one of the players a dodge card to play\n\t\tCard dodge = new Card(Type.ACTION, Card.DODGE);\n\t\tgame.getAllPlayers().get(0).getHand().add(dodge);\n\t\t\n\t\t//Give target player a custom display\n\t\tgame.getDisplay(1).add(redCard);\n\t\tgame.getDisplay(1).add(purpleCard);\n\t\tgame.getDisplay(1).add(blueCard);\n\t\tgame.getDisplay(1).add(greenCard);\n\t\tgame.getDisplay(1).add(squire);\n\t\tgame.getDisplay(1).add(yellowCard);\n\t\tgame.getDisplay(1).add(maiden);\n\t\tgame.getShield(1).add(shield); //give player a shield\n\t}",
"public final void initialPosition() {\n\t\tfor( int i = 0; i < 4; i++) {\n\t\t setPiece( new PieceImpl( Color.RED, Type.PAWN), new PositionImpl( 38 + 8*i));\n\t\t}\n\t\tfor( int i = 0; i < 4; i++) {\n\t\t setPiece( new PieceImpl( Color.BLACK, Type.PAWN), new PositionImpl( 12 + i));\n\t\t}\n\t\tfor( int i = 0; i < 4; i++) {\n\t\t setPiece( new PieceImpl( Color.YELLOW, Type.PAWN), new PositionImpl( 1 + 8*i));\n\t\t}\n\t\tfor( int i = 0; i < 4; i++) {\n\t\t setPiece( new PieceImpl( Color.GREEN, Type.PAWN), new PositionImpl( 48 + i));\n\t\t}\n\t\t\n\t\tsetPiece( new PieceImpl( Color.RED, Type.BOAT), new PositionImpl( 63 ));\n\t\tsetPiece( new PieceImpl( Color.RED, Type.KNIGHT), new PositionImpl( 55 ));\n\t\tsetPiece( new PieceImpl( Color.RED, Type.ELEPHANT), new PositionImpl( 47 ));\n\t\tsetPiece( new PieceImpl( Color.RED, Type.KING), new PositionImpl( 39 ));\n\t\t\n\t\tsetPiece( new PieceImpl( Color.BLACK, Type.BOAT), new PositionImpl( 7 ));\n\t\tsetPiece( new PieceImpl( Color.BLACK, Type.KNIGHT), new PositionImpl( 6 ));\n\t\tsetPiece( new PieceImpl( Color.BLACK, Type.ELEPHANT), new PositionImpl( 5 ));\n\t\tsetPiece( new PieceImpl( Color.BLACK, Type.KING), new PositionImpl( 4 ));\n\n\t\tsetPiece( new PieceImpl( Color.YELLOW, Type.BOAT), new PositionImpl( 0 ));\n\t\tsetPiece( new PieceImpl( Color.YELLOW, Type.KNIGHT), new PositionImpl( 8 ));\n\t\tsetPiece( new PieceImpl( Color.YELLOW, Type.ELEPHANT), new PositionImpl( 16 ));\n\t\tsetPiece( new PieceImpl( Color.YELLOW, Type.KING), new PositionImpl( 24 ));\n\n\t\tsetPiece( new PieceImpl( Color.GREEN, Type.BOAT), new PositionImpl( 56 ));\n\t\tsetPiece( new PieceImpl( Color.GREEN, Type.KNIGHT), new PositionImpl( 57 ));\n\t\tsetPiece( new PieceImpl( Color.GREEN, Type.ELEPHANT), new PositionImpl( 58 ));\n\t\tsetPiece( new PieceImpl( Color.GREEN, Type.KING), new PositionImpl( 59 ));\n\t\t\n }",
"private void updateESTPanel() {\n \t\r\n \tLizardMan enemyMaybe = enemyMap.get(coordToHKey(ArenaFight.player.xpos,ArenaFight.player.ypos));\r\n \t\r\n \tif (enemyMaybe!=null) { // Enemy Found\r\n \t\tLEname.setText(enemyMaybe.name);\r\n \t\tLElevelclss.setText(\"Level \"+enemyMaybe.level+\" \"+enemyMaybe.clss+\" \");\r\n \t\tLEhealth.setText(\"Health: \" + enemyMaybe.health);\r\n LEstrength.setText(\"Strength: \" + enemyMaybe.strength+ \" \");\r\n LEdefense.setText(\"Defense: \" + enemyMaybe.defense);\r\n LEagility.setText(\"Agility: \" + enemyMaybe.agility+\" \");\r\n \t}\r\n \telse { //No enemy\r\n \t\tLEname.setText(\"Name\");\r\n \t\tLElevelclss.setText(\"Level -1 Class \");\r\n \t\tLEhealth.setText(\"Health: -1\");\r\n LEstrength.setText(\"Strength: -1 \");\r\n LEdefense.setText(\"Defense: -1\");\r\n LEagility.setText(\"Agility: -1 \");\r\n \t}\r\n \t\r\n \tenemyPanel.repaint();\r\n }",
"public void drawPlayerStuff() {\n textAlign(CENTER, CENTER);\n for (Player p : players) {\n if (p.getLives() > 0) {\n fill(p.getHexColor(), 255);\n textSize(20);\n for (int i = 0; i < p.getLives (); i++) {\n ellipse((lifeSize + 20)*((float)i/p.getLives()) + (p.getPositionX() - p.getSize()*0.5f), p.getPositionY() - p.getSize()*2, lifeSize, lifeSize);\n }\n text(\"(\" + p.getEnergy() + \")\", p.getPositionX(), p.getPositionY() + p.getSize()*2);\n }\n }\n }",
"private void addLifeDisplay() {\r\n\t\tGImage lifeDisplay = new GImage(\"PlayerEast.png\");\r\n\t\tlifeDisplay.scale(.3);\r\n\t\tadd(lifeDisplay, 0, 0);\r\n\t\tlifeBar = new GRect(lifeDisplay.getWidth(), LIFE_BAR_OFFSET, LIFE_BAR_WIDTH, LIFE_BAR_HEIGHT);\r\n\t\tlifeBar.setFilled(true);\r\n\t\tlifeBar.setColor(Color.GREEN);\r\n\t\tadd(lifeBar);\r\n\t}",
"private void Management_Player(){\n\t\t\n\t\t// render the Player\n\t\tswitch(ThisGameRound){\n\t\tcase EndRound:\n\t\t\treturn;\t\t\t\n\t\tcase GameOver:\n\t\t\t// do nothing\n\t\t\tbreak;\n\t\tcase Running:\n\t\t\tif (PauseGame==false){\n\t\t\t\tplayerUser.PlayerMovement();\t\t\t\t\t\t\n\t\t\t}\n\t\t\telse if (PauseGame==true){\n\t\t\t\t// do not update gravity\n\t\t\t}\n\t\t\tbreak;\t\t\n\t\t}\n\t\n\t\tbatch.draw(playerUser.getframe(PauseGame), playerUser.getPosition().x , playerUser.getPosition().y,\n\t \t\tplayerUser.getBounds().width, playerUser.getBounds().height);\n\t\t\n\t\t\n\t\t\n\t\tswitch (playerUser.EquipedToolCycle)\n\t\t{\t\n\t\tcase 0:\n\t\t\tstartTimeTool = System.currentTimeMillis(); \n\t\t\tbreak;\n\t\t\t\n\t\tcase 1: \n\t\t\t\n\t\t\tif (PauseGame==true){\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// tool is grabbed\n\t\t\testimatedTimeEffect = System.currentTimeMillis() - startTimeTool;\t\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\tplayerUser.pe_grab.setPosition(playerUser.getPosition().x + playerUser.getBounds().width/2,\n\t\t\t\t\tplayerUser.getPosition().y + playerUser.getBounds().height/2);\t\n \t\t\n\t\t\t\tplayerUser.pe_grab.update(Gdx.graphics.getDeltaTime());\n\t\t\t\tplayerUser.pe_grab.draw(batch,Gdx.graphics.getDeltaTime()); \t\t\t\t\t\t\t\n\t\t\t\n\t\t\tif (estimatedTimeEffect >= Conf.SYSTIME_MS){\n\t\t\t\testimatedTimeEffect = 0;\n\t\t\t\tplayerUser.ToolEquiped();\n\t\t\t\tstartTimeTool = System.currentTimeMillis(); \n\t\t\t\tplayerUser.EquipedToolCycle++;\n\t\t\t}else{\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\t\t\n\t\tcase 2:\n\t\t\t\n\t\t\tif (PauseGame==true){\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\testimatedTimeEffect = (System.currentTimeMillis() - startTimeTool) / 1000;\t\t\t\t\n\t\t\tplayerUser.pe_equip.setPosition(playerUser.getPosition().x + playerUser.getBounds().width/2,\n\t\t\tplayerUser.getPosition().y + playerUser.getBounds().height/2);\t\n\t\t\tplayerUser.pe_equip.update(Gdx.graphics.getDeltaTime());\n\t\t\tplayerUser.pe_equip.draw(batch,Gdx.graphics.getDeltaTime()); \t\t\t\t\n\t\t\tif (estimatedTimeEffect>=Conf.TOOL_TIME_USAGE_LIMIT){\n\t\t\t\tplayerUser.EquipedToolCycle=0;\t\t\n\t\t\t\tplayerUser.color = Color.NONE;\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (estimatedTimeEffect>=Conf.TOOL_TIME_USAGE_MUSIC_LIMIT){\n\t\t\t\tPhoneDevice.Settings.setMusicValue(true);\n\t\t\t}\n\t\t}\t\t\t\t\n\t}",
"public void DisplayWithShield() {\n\t\tplayers = new ArrayList<Player>();\n\t\tplayer1 = new Player(\"Nick\");\n\t\tplayer2 = new Player(\"Ausitn\");\n\t\tplayers.add(player1);\n\t\tplayers.add(player2);\n\t\tgame = new GameState();\n\t\tgame.initializeServer(players);\n\t\tRulesEngine.setColour(game, String.valueOf(Type.BLUE));\n\t\t\n\t\tgame.setTurn(0);\n\t\t\n\t\t\n\t\t//create cards to be added to player's hand and target's display\n\t\tCard purpleCard = new Card(Type.PURPLE, 3);\n\t\tCard greenCard = new Card(Type.GREEN, 1);\n\t\tCard yellowCard = new Card(Type.YELLOW, 2);\n\t\tCard blueCard = new Card(Type.BLUE, 3);\n\t\tCard redCard = new Card(Type.RED, 4);\n\t\tCard squire = new Card(Type.WHITE, 2);\n\t\tCard maiden = new Card (Type.WHITE, 6);\n\t\tCard shield = new Card(Type.ACTION, Card.SHIELD);\n\t\t\n\t\t//Give one of the players a riposte card to play\n\t\tCard riposte = new Card(Type.ACTION, Card.RIPOSTE);\n\t\tgame.getAllPlayers().get(0).getHand().add(riposte);\n\t\t\n\t\t//Give target player a custom display\n\t\tgame.getDisplay(1).add(redCard);\n\t\tgame.getDisplay(1).add(purpleCard);\n\t\tgame.getDisplay(1).add(blueCard);\n\t\tgame.getDisplay(1).add(greenCard);\n\t\tgame.getDisplay(1).add(squire);\n\t\tgame.getDisplay(1).add(yellowCard);\n\t\tgame.getDisplay(1).add(maiden);\n\t\tgame.getShield(1).add(shield); //give player a shield\n\t}",
"public void updateState() {\n\t\tfloat uptime = .05f;\t\t\t// Amount of Time the up animation is performed\n\t\tfloat downtime = .35f;\t\t\t// Amount of Time the down animation is performed\n\t\tColor colorUp = Color.YELLOW;\t// Color for when a value is increased\n\t\tColor colorDown = Color.RED;\t// Color for when a value is decreased\n\t\tColor color2 = Color.WHITE;\t\t// Color to return to (Default Color. Its White btw)\n\t\t\n\t\t// Check to see if the Time has changed and we are not initializing the label\n\t\tif(!time.getText().toString().equals(Integer.toString(screen.getState().getHour()) + \":00\") && !level.getText().toString().equals(\"\")) {\n\t\t\t// Set the time label and add the animation\n\t\t\ttime.setText(Integer.toString(screen.getState().getHour()) + \":00\");\n\t\t\ttime.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t} else if(time.getText().toString().equals(\"\")) {\n\t\t\t// First time setting the label, dont add the animation\n\t\t\ttime.setText(Integer.toString(screen.getState().getHour()) + \":00\");\n\t\t}\n\t\t\n\t\t// Check to see if the Level has changed and we are not initializing the label\n\t\tif(!level.getText().toString().equals(screen.getState().getTitle()) && !level.getText().toString().equals(\"\")) {\n\t\t\tlevel.setText(\"Level: \" + screen.getState().getTitle());\n\t\t\tlevel.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t} else if(level.getText().toString().equals(\"\")) {\n\t\t\t// Initialize the level label\n\t\t\tlevel.setText(\"Level: \" + screen.getState().getTitle());\n\t\t}\n\t\t\n\t\t// Check to see if the XP has changed and we are not initializing the label\n\t\tif(!xp.getText().toString().equals(\"XP: \" + Integer.toString(screen.getState().getXp())) && !xp.getText().toString().equals(\"\")) {\n\t\t\txp.setText(\"XP: \" + Integer.toString(screen.getState().getXp()));\n\t\t\txp.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t} else if(xp.getText().toString().equals(\"\")) {\n\t\t\t// Initialize the XP label\n\t\t\txp.setText(\"XP: \" + Integer.toString(screen.getState().getXp()));\n\t\t}\n\t\t\n\t\t// Check to see if the Money has changed and we are not initializing the label\n\t\tif(!money.getText().toString().equals(\"$\" + Double.toString(screen.getState().getMoney()) + \"0\") && !money.getText().toString().equals(\"\")) {\n\t\t\t\n\t\t\t// Check to see if the player's money went up. This is a mess but it works\n\t\t\t// Makes the change animation Yellow or Green depending on the change in money\n\t\t\tif(Double.parseDouble(money.getText().substring(1).toString()) <= screen.getState().getMoney())\n\t\t\t\tmoney.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t\telse\n\t\t\t\tmoney.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorDown)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t\t\n\t\t\t// Set the label to the new money\n\t\t\tmoney.setText(\"$\" + Double.toString(screen.getState().getMoney()) + \"0\");\n\t\t\t\n\t\t} else if(money.getText().toString().equals(\"\")) {\n\t\t\t// Initialize the Money Label\n\t\t\tmoney.setText(\"$\" + Double.toString(screen.getState().getMoney()) + \"0\");\n\t\t}\n\t\t\n\t\t// Check to see if the Energy has changed and we are not initializing the label\n\t\tif(!energy.getText().toString().equals(\"E: \" + Integer.toString(screen.getState().getEnergy()) + \"/100\") && !energy.getText().toString().equals(\"\")) {\n\t\t\t\n\t\t\t// Changes the animation to Yellow or Red depending on the change in the energy value\n\t\t\tif(Integer.parseInt(energy.getText().substring(3).split(\"/\")[0].toString()) < screen.getState().getEnergy())\n\t\t\t\tenergy.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t\telse\n\t\t\t\tenergy.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorDown)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t\t\n\t\t\t// Set the energy label\n\t\t\tenergy.setText(\"E: \" + Integer.toString(screen.getState().getEnergy()) + \"/100\");\n\t\t} else if(energy.getText().toString().equals(\"\")) {\n\t\t\t// Initialize the energy label if it isnt set\n\t\t\tenergy.setText(\"E: \" + Integer.toString(screen.getState().getEnergy()) + \"/100\");\n\t\t}\n\t\t\n\t\t// Get the current date.\n\t\tint[] curDate = screen.getState().getDate();\n\t\t\t\n\t\t// Check to see if the Date has changed and we are not initializing the label\n\t\tif(!date.getText().toString().equals(\"\" + curDate[2] + \"/\" + curDate[1] + \"/\" + curDate[0]) && !date.getText().toString().equals(\"\")) {\n\t\t\t// Set the date label and add the change animation\n\t\t\tdate.setText(\"\" + curDate[2] + \"/\" + curDate[1] + \"/\" + curDate[0]);\n\t\t\tdate.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t} else if(date.getText().toString().equals(\"\")) {\n\t\t\t// Initialize the date label\n\t\t\tdate.setText(\"\" + curDate[2] + \"/\" + curDate[1] + \"/\" + curDate[0]);\n\t\t}\n\t\t\n\t\t// Set the log text\n\t\tlogLabel.setText(screen.getState().getLog());\n\t\t\n\t\t// Update the stats\n\t\tState state = screen.getState();\n\t\tstatsLabel.setText(\"XP: \" + state.getXp() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Level: \" + state.getLevel() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Title: \" + state.getTitle() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Popularity: \" + state.getPopularity() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Year \" + state.getDate()[0] + \" Month \" + state.getDate()[1] + \" Day \" + state.getDate()[2] + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Hour: \" + state.getHour() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Energy: \" + state.getEnergy() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Current Funds: \" + state.getMoney() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Money Earned: \" + state.getEarned_money() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Money Spent: \" + state.getSpent_money());\n\t}",
"public void drawStatus() {\n //draw health bar\n if (level.player != null) {\n //query life values from the player\n int life = level.player.getLife();\n int maxLife = level.player.getMaxLife();\n\n //calculate color based on percent life\n double red = 1.0 - (double) life / maxLife;\n double green = (double) life / maxLife;\n double width = (double) life / maxLife * 100;\n\n //draw the health bar\n GL11.glColor3d(red, green, 0f);\n GL11.glBegin(GL11.GL_QUADS);\n GL11.glVertex2d(game.WIDTH - 150, game.getHeight() - 40);\n GL11.glVertex2d(game.WIDTH - 150 + width, game.getHeight() - 40);\n GL11.glVertex2d(game.WIDTH - 150 + width, game.getHeight() - 40 + 10);\n GL11.glVertex2d(game.WIDTH - 150, game.getHeight() - 40 + 10);\n GL11.glEnd();\n GL11.glColor3d(1, 1, 1);\n GL11.glBegin(GL11.GL_LINE_LOOP);\n GL11.glVertex2d(game.WIDTH - 150, game.getHeight() - 40);\n GL11.glVertex2d(game.WIDTH - 50, game.getHeight() - 40);\n GL11.glVertex2d(game.WIDTH - 50, game.getHeight() - 40 + 10);\n GL11.glVertex2d(game.WIDTH - 150, game.getHeight() - 40 + 10);\n GL11.glEnd();\n }\n }",
"public void paintActivePup(){\n\t\tif((buffTimer - gameTimer)/100 < 5 ){ bg.setColor(glowingColor(activePup.powerColor)); }\n\t\telse{ bg.setColor(activePup.powerColor); }\n\t\tbg.fill(activePup.pupRect);\n\t\t\n\t\tif((buffTimer - gameTimer)/100 < 5 ){ bg.setColor(glowingColor(Color.black)); }\n\t\telse{ bg.setColor(Color.black);} //Active Powerup Initials\n\t\tbg.setFont(new Font(\"Courier\", Font.BOLD, 30));\n\t\tbg.drawString(activePup.initials, (int)(activePup.x - activePup.width/2 + 2), (int)(activePup.y + activePup.height*.2));\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Testing the setting of the properties filename when current state is set to disabled | @Test
public void setRuntimePropertiesFileNameWithDisabledStateTest() {
try {
runtimeConfigDAOPropertiesFile.setState(new State(State.DISABLED));
} catch (CannotSetStateException e) {
Assert.fail("Cannot set state for some reason...");
}
try {
runtimeConfigDAOPropertiesFile.setRuntimePropertiesFilename(runtimeConfigDAOPropertiesFile.getRuntimePropertiesFilename());
} catch (RuntimeConfigInitialisationException e) {
Assert.fail("The file should have been created OK.");
}
try {
Assert.assertEquals(true, runtimeConfigDAOPropertiesFile.getState().isDisabled());
} catch (StateNotFoundException e) {
Assert.fail("Cannot find state for some reason...");
}
} | [
"@Test\r\n public void setStateWhenFileNotExistTest() {\r\n try {\r\n deleteFile(runtimeConfigDAOPropertiesFile.getRuntimePropertiesFilename());\r\n\r\n // Perform the operation\r\n runtimeConfigDAOPropertiesFile.setState(new State(State.DISABLED));\r\n Assert.assertTrue(runtimeConfigDAOPropertiesFile.currentState.isDisabled());\r\n } catch (Throwable e) {\r\n Assert.fail(\"The properties file should have been created.\");\r\n }\r\n }",
"@Test\r\n public void setStateWhenFileCannotExistTest() {\r\n try {\r\n deleteFile(runtimeConfigDAOPropertiesFile.getRuntimePropertiesFilename());\r\n // make a directory by the same name as the properties file. This will result in a FNFException when trying to open it as a file\r\n (new File(runtimeConfigDAOPropertiesFile.getRuntimePropertiesFilename())).mkdirs();\r\n\r\n // Perform the operation\r\n runtimeConfigDAOPropertiesFile.setState(new State(State.DISABLED));\r\n Assert.fail(\"The properties file should already exist as a directory and so an exceptions should have been thrown.\");\r\n } catch (CannotSetStateException e) {\r\n // Passed the test\r\n }\r\n (new File(runtimeConfigDAOPropertiesFile.getRuntimePropertiesFilename())).delete();\r\n }",
"@Override\n public Properties loadProperties(String filename) {\n return testProperties;\n }",
"@Test\r\n public void setRuntimePropertiesFileNameTest() {\r\n try {\r\n runtimeConfigDAOPropertiesFile.setRuntimePropertiesFilename(runtimeConfigDAOPropertiesFile.getRuntimePropertiesFilename());\r\n } catch (RuntimeConfigInitialisationException e) {\r\n Assert.fail(\"The file should have been created OK.\");\r\n }\r\n }",
"@Test\n public void testSetSystemPropertiesFromPropertiesFile() throws ConfigurationException, IOException {\n final File file = newFile(\"sys.properties\", tempFolder);\n final PropertiesConfiguration pconfig = new PropertiesConfiguration();\n final FileHandler handler = new FileHandler(pconfig);\n pconfig.addProperty(\"fromFile\", Boolean.TRUE);\n handler.setFile(file);\n handler.save();\n SystemConfiguration.setSystemProperties(handler.getBasePath(), handler.getFileName());\n final SystemConfiguration sconf = new SystemConfiguration();\n assertTrue(sconf.getBoolean(\"fromFile\"));\n }",
"@Test(expected = PropertyException.class)\n\tpublic void testPropertyException() throws PropertyException {\n\t\tnew Properties(mNotExistingFilePath).load();\n\t}",
"@Ignore //Refactor this test to Integration Test project\n @Test\n public void testWritePropertyFile() throws Exception\n {\n System.out.println(\"writePropertyFile\");\n String sPropertyFile = \"testprops\";\n Properties oProps = new Properties();\n oProps.setProperty(\"CacheRefreshDuration\", \"0\");\n oProps.setProperty(\"Prop1\", \"Value1\");\n oProps.setProperty(\"Prop2\", \"Value2\");\n PropertyFileManager.writePropertyFile(sPropertyFile, oProps);\n \n String sValue = PropertyAccessor.getProperty(sPropertyFile, \"CacheRefreshDuration\");\n assertEquals(\"0\", sValue);\n \n sValue = PropertyAccessor.getProperty(sPropertyFile, \"Prop1\");\n assertEquals(\"Value1\", sValue);\n \n sValue = PropertyAccessor.getProperty(sPropertyFile, \"Prop2\");\n assertEquals(\"Value2\", sValue);\n \n oProps.setProperty(\"Prop3\", \"Value3\");\n PropertyFileManager.writePropertyFile(sPropertyFile, oProps);\n \n sValue = PropertyAccessor.getProperty(sPropertyFile, \"CacheRefreshDuration\");\n assertEquals(\"0\", sValue);\n \n sValue = PropertyAccessor.getProperty(sPropertyFile, \"Prop1\");\n assertEquals(\"Value1\", sValue);\n \n sValue = PropertyAccessor.getProperty(sPropertyFile, \"Prop2\");\n assertEquals(\"Value2\", sValue);\n\n sValue = PropertyAccessor.getProperty(sPropertyFile, \"Prop3\");\n assertEquals(\"Value3\", sValue);\n \n PropertyFileManager.deletePropertyFile(sPropertyFile);\n \n }",
"@Test\n public void testSetEnvPropFile() {\n Assert.assertNull(this.c.getSetupFile());\n final String propFile = \"s3://netflix.propFile\";\n this.c.setSetupFile(propFile);\n Assert.assertEquals(propFile, this.c.getSetupFile());\n }",
"public boolean isSetFilename() {\n return this.filename != null;\n }",
"public boolean isSetFilename()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(FILENAME$0) != null;\n }\n }",
"public boolean is_set_file() {\n return this.file != null;\n }",
"public String getPropertyFileName()\r\n\t{\r\n\t\treturn propertyFileName;\r\n\t}",
"private boolean checkTestFilePreferences( SharedPreferences sharedPrefs )\n {\n // These cannot be null, if prefs.xml is valid\n Preference testFilePreference = findPreference( getString( R.string.test_file_key ) );\n CheckBoxPreference testModePreference =\n (CheckBoxPreference)findPreference( getString( R.string.test_mode_key ) );\n\n String testName =\n sharedPrefs.getString(getString(R.string.test_file_key), \"\");\n\n if (testName.isEmpty())\n {\n // TEST FILE IS EMPTY\n testFilePreference.setSummary(getString(R.string.test_file_summary_empty));\n Scribe.debug(Debug.PREF, \"PREFERENCES: test file is empty\");\n }\n else\n {\n // SUPPOSE, THAT TEST FILE IS INVALID\n testFilePreference.setSummary(getString(R.string.test_file_summary_invalid));\n\n // Working directory is checked\n // It can change later, so parsing will check it again\n File directoryFile = checkDirectoryPreference(sharedPrefs);\n if (directoryFile != null)\n {\n // Directory is valid, test file is checked\n // It can change later, so parsing will check it again\n\n // test file can be empty, but in test mode it cannot be deleted\n File testFile = new File(directoryFile, testName);\n\n if (testFile.exists() && testFile.isFile())\n {\n // TEST FILE IS OK - TEST MODE IS ENABLED\n testFilePreference.setSummary(getString(R.string.test_file_summary) + \" \" +\n testFile.getAbsolutePath());\n testModePreference.setEnabled(true);\n return true;\n }\n else\n {\n Scribe.error(\"PREFERENCES: test file is missing: \" +\n testFile.getAbsolutePath());\n }\n }\n }\n\n // TEST FILE IS EMPTY OR INVALID\n\n testModePreference.setChecked( false );\n testModePreference.setEnabled( false );\n\n return false;\n }",
"public boolean isSetFileName() {\n return this.fileName != null;\n }",
"public void setPropertyFileName(String propertyfileName)\r\n\t{\r\n\t\t// propertyfileName = propertyFileName;\r\n\t\tpropertyFileName = propertyfileName;\r\n\t}",
"public boolean isSetFileName() {\n return this.FileName != null;\n }",
"public FXMLPropertiesDisabler() {\n this(OS.get());\n }",
"public static String getPropertyFilename() {\n return propfilename;\n }",
"public void testConfigFileOverriding() throws Exception {\n\t\tConfig config = Config.load(new ConfigRef(\"com/tabulaw/config/config.properties\"), new ConfigRef(\"com/tabulaw/config/config2.properties\"));\n\t\tString pv = config.getString(\"props.simple.propB\");\n\t\tassert \"val2-overridden\".equals(pv);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get the extension that is currently selected returns null if the extension is not known | public final String getCurrentExt() {
FileFilter filter = this.getFileFilter();
if (filter instanceof ExtensionFileFilter) {
return ((ExtensionFileFilter)filter).getExt();
}
return null;
} | [
"Extension getExtension();",
"public String getExtension() {\r\n return (String) get(\"extension\");\r\n }",
"@CheckForNull\n String getPreferredExtension();",
"public String getExtension() {\n\t\tString name = getName();\n\t\tint i = name.lastIndexOf('.');\n\t\tif (i == -1)\n\t\t\treturn null;\n\t\treturn name.substring(i + 1);\n\t}",
"public String getExtension() {\n\t\tString name = getName();\n\t\tint i = name.lastIndexOf('.');\n\t\tif(i==-1)\n\t\t\treturn null;\n\t\treturn name.substring(i+1);\n\t}",
"public String getExtension();",
"String getExtension();",
"default ExtensionType getExtension(Task masterTask) {\n return null;\n }",
"public String getExtension(String mimeType) {\n ScriptEngine se = scriptEngineManager.getEngineByMimeType(mimeType);\n if (se != null) {\n List<?> extensions = se.getFactory().getExtensions();\n if (extensions != null && extensions.size() > 0) {\n return String.valueOf(extensions.get(0));\n }\n }\n\n return null;\n }",
"public String getFirstExtension() {\n List<String> ext = this.getExtensions();\n \n if (ext == null || ext.isEmpty()) {\n return null;\n }\n \n return ext.get(0);\n }",
"public String getExtension(String mimeType) {\n ScriptEngine se = getScriptEngineManager().getEngineByMimeType(mimeType);\n if (se != null) {\n List<?> extensions = se.getFactory().getExtensions();\n if (extensions != null && extensions.size() > 0) {\n return String.valueOf(extensions.get(0));\n }\n }\n\n return null;\n }",
"java.lang.String getExtensionText();",
"public String getExtension() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.get(this.lenght - 1).contains(\".\"))\n\t\t{\n\t\t\tString temp = this.get(this.lenght - 1);\n\t\t\t\n\t\t\tString[] parts = temp.split(\"\\\\.\");\n\t\t\t\n\t\t\tresult = parts[parts.length - 1];\n\t\t}\n\t\telse\n\t\t\tresult = \"\";\n\t\t\n\n\t\treturn result;\n\t}",
"String getExtensionName();",
"public PgExtension getExtension(final String name) {\n for(final PgExtension ext : extensions) {\n if(ext.getName().equals(name)) {\n return ext;\n }\n }\n\n return null;\n }",
"protected IRI getExtensionGraphName() {\n final String ext = getRequest().getExt();\n if (ext != null) {\n return extensions.get(ext);\n }\n return null;\n }",
"public org.openxmlformats.schemas.presentationml.x2006.main.CTExtensionList getExtLst()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.presentationml.x2006.main.CTExtensionList target = null;\n target = (org.openxmlformats.schemas.presentationml.x2006.main.CTExtensionList)get_store().find_element_user(EXTLST$14, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public org.openxmlformats.schemas.presentationml.x2006.main.CTExtensionList getExtLst()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.presentationml.x2006.main.CTExtensionList target = null;\n target = (org.openxmlformats.schemas.presentationml.x2006.main.CTExtensionList)get_store().find_element_user(EXTLST$16, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public org.openxmlformats.schemas.presentationml.x2006.main.CTExtensionList getExtLst()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.presentationml.x2006.main.CTExtensionList target = null;\n target = (org.openxmlformats.schemas.presentationml.x2006.main.CTExtensionList)get_store().find_element_user(EXTLST$10, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
performs a physical task. | private void performPhysicalTask() {
long millis = (long) ((100 - getAveragePhysicalScore()) * 100.0);
try {
Main.Log("Team " + getName() + " performing physical task for " + millis + " millis");
sleep(millis);
} catch (InterruptedException e) {
e.printStackTrace();
}
} | [
"public abstract void task();",
"void performTask(ClientTaskId taskId, Task<?> task);",
"void execute()\n throws TaskException;",
"protected abstract Version executeTaskLocal(Version theTask);",
"public interface UserTaskExecutor {\n\t\n\t/**\n\t * \n\t * \n\t * @param execTask task to execute \n\t * @param variables variables to set on task complete event\n\t * @return simulation time increased by UserTask execution\n\t */\n\tlong simulateTaskExecution( TaskEntity execTask, Map<String, Object> variables);\n}",
"RunId submitTask(Task task);",
"public interface Task {\n\t\n\tpublic void compute();\n\n}",
"public void runTask () { if (task != null) task.run(); }",
"RunId submitTask(RunId runId, Task task);",
"public void execute(){\n if (pipeline != null){\n pipeline.addTask(this);\n } else {\n run();\n }\n }",
"protected abstract void runSubtask(int subtask);",
"public abstract void handleTask(Task t);",
"public interface Task\n{\n /**\n * Specify the context in which the task operates in.\n * The Task will use the TaskContext to receive information\n * about it's environment.\n */\n void contextualize( TaskContext context )\n throws TaskException;\n\n /**\n * Execute task.\n * This method is called to perform actual work associated with task.\n * It is called after Task has been Configured.\n *\n * @exception TaskException if task fails to execute\n */\n void execute()\n throws TaskException;\n}",
"public void submit(Task task) {\n\t\tthis.engine.pushTask(task);\n\t}",
"@Override\r\n protected ServiceResponse<Task> perform(ServiceRequest<TaskOperationsParams> request) throws Exception {\r\n Long taskId = request.getData().getTaskId();\r\n Long assigneeId = request.getData().getAssigneeId();\r\n Long explanationId = request.getData().getExplanationId();\r\n String noteText = request.getData().getNoteText();\r\n String taskDescription = request.getData().getTaskDescription();\r\n \r\n try {\r\n TaskModel nextTaskModel = taskStore.performIncludingFollowingSystemActivities(taskId, assigneeId, explanationId, noteText, taskDescription);\r\n Task nextTask = factory.convertTo(Task.class, nextTaskModel);\r\n return nextTask == null ?\r\n new ServiceResponse<Task>(\"Task performed successfully.\", true) :\r\n new ServiceResponse<Task>(nextTask, \"Task performed successfully.\", true);\r\n } catch (TaskNotActiveException e) {\r\n return new ServiceResponse<Task>(\"Task is not active. Cannot perform.\", false);\r\n } catch (UserNotInActorSetException e) {\r\n return new ServiceResponse<Task>(\"Current user or selected next assignee is not in the actor list.\", false);\r\n }\r\n }",
"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}",
"protected void executeRemoteTask(final Version theTask) {\n \tif (psl.survivor.ProcessorMain.debug) System.out.println(\"PSL! entered executeRemoteTask: theTask.data(): \" + theTask.data().getClass().getName());\n \tif (psl.survivor.ProcessorMain.debug) System.out.println(\"PSL! entered executeRemoteTask: theTask.data2(): \" + theTask.data2().getClass().getName());\n\tTaskDefinition td = (TaskDefinition) theTask.data();\n\n\t// First we need to find a processor that can handle the task \n\tArrayList al = _poolData.getValidProcessors(td);\n\tlog(\"number of valid processors:\" + al.size());\n\tlog(\"TaskDefinition of what we are looking for:\" + \n\t td);\n\n\t// we now make sure that the processor we decide to use is up \n\t// and running\n\tfor (int i = 0; i < al.size(); i++) {\n\t TaskProcessorHandle tph = (TaskProcessorHandle) al.get(i);\n\t if (psl.survivor.ProcessorMain.debug) System.out.print(\"IS VALID?\");\n\t if (tph.valid(this)) {\n\t\tif (psl.survivor.ProcessorMain.debug) System.out.println(\" YES\");\n\t\t// everything is ok, start a seperate thread for \n\t\t// remote execution\n\t\tfinal TaskProcessorHandle tph2 = tph;\n\t\tfinal Processor p = this;\n\t\tThread t = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t log(\"PSL! going to invoke tph2.executeTask(...)\"); // 2-do: remove\n\t\t\t tph2.executeTask(theTask, p);\n\t\t\t}\n\t\t };\n\t\tt.start();\n\t\treturn;\n\t } else {\n\t\tif (psl.survivor.ProcessorMain.debug) System.out.println(\" NO\");\n\t\t// remote processor does not seem to be up\n\t\t// let's remove it from our pool\n\t\t_poolData.testValidity(tph);\n\t }\n\t}\n\n\t// if we get here we could NOT find a processor to execute the task\n\t// as a result, let's just a wait a bit and hope things get better\n\tlog(\"no processor to execute task: \" + theTask);\n\tThread t = new Thread () {\n\t\tpublic void run() {\n\t\t try {\n\t\t\tThread.sleep(_SLEEP_TIME2);\n\t\t } catch (InterruptedException e) {\n\t\t\t;\n\t\t }\n\t\t queueTask(theTask);\n\t\t}\n\t };\n\tt.start();\n }",
"public abstract void moveTask(ModelTask task);",
"public void execute() {\n if (!areSubscriptionsChanged() && !wasAwakened()) {\n if (logger.isDebugEnabled()) {\n logger.debug(\" execute without timer or subscription change !!!!\");\n }\n invoke_ = false;\n return;\n }\n invoke_ = true;\n transCount_ = transCount_ + 1;\n\n // Configures the task processor list when my organization is added\n // to the list.\n configure();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Empty response from origin with ContentEncoding: gzip Request does not support GZIP > filter should not fail in decoding the empty response stream | @Test
public void emptyGzipResponseFromOrigin() throws Exception {
ZuulProperties properties = new ZuulProperties();
properties.setSetContentLength(true);
SendResponseFilter filter = new SendResponseFilter(properties);
byte[] gzipData = new byte[] {};
RequestContext.getCurrentContext().setResponseGZipped(true);
RequestContext.getCurrentContext()
.setResponseDataStream(new ByteArrayInputStream(gzipData));
filter.run();
MockHttpServletResponse response = (MockHttpServletResponse) RequestContext
.getCurrentContext().getResponse();
assertThat(response.getHeader("Content-Length")).isNull();
assertThat(response.getHeader("Content-Encoding")).isNull();
assertThat(response.getContentAsByteArray()).isEqualTo(gzipData);
} | [
"@Test\n public void emptyGzipResponseFromOrigin() throws Exception {\n ZuulProperties properties = new ZuulProperties();\n properties.setSetContentLength(true);\n SendResponseFilter filter = new SendResponseFilter(properties);\n byte[] gzipData = new byte[]{ };\n RequestContext.getCurrentContext().setResponseGZipped(true);\n RequestContext.getCurrentContext().setResponseDataStream(new ByteArrayInputStream(gzipData));\n filter.run();\n MockHttpServletResponse response = ((MockHttpServletResponse) (RequestContext.getCurrentContext().getResponse()));\n assertThat(response.getHeader(\"Content-Length\")).isNull();\n assertThat(response.getHeader(\"Content-Encoding\")).isNull();\n assertThat(response.getContentAsByteArray()).isEqualTo(gzipData);\n }",
"@Test\n public void invalidGzipResponseFromOrigin() throws Exception {\n ZuulProperties properties = new ZuulProperties();\n properties.setSetContentLength(true);\n SendResponseFilter filter = new SendResponseFilter(properties);\n byte[] gzipData = \"hello\".getBytes();\n RequestContext.getCurrentContext().setOriginContentLength(((long) (gzipData.length)));// for\n\n // test\n RequestContext.getCurrentContext().setResponseGZipped(true);// say it is GZipped\n\n // although not\n // the case\n RequestContext.getCurrentContext().setResponseDataStream(new ByteArrayInputStream(gzipData));\n filter.run();\n MockHttpServletResponse response = ((MockHttpServletResponse) (RequestContext.getCurrentContext().getResponse()));\n assertThat(response.getHeader(\"Content-Length\")).isNull();\n assertThat(response.getHeader(\"Content-Encoding\")).isNull();\n assertThat(response.getContentAsString()).as(\"wrong content\").isEqualTo(\"hello\");// response\n\n // sent\n // \"asis\"\n }",
"@Test\n public void runWithOriginContentLength_gzipNotRequested_gzipResponse() throws Exception {\n ZuulProperties properties = new ZuulProperties();\n properties.setSetContentLength(true);\n SendResponseFilter filter = new SendResponseFilter(properties);\n byte[] gzipData = gzipData(\"hello\");\n RequestContext.getCurrentContext().setOriginContentLength(((long) (gzipData.length)));// for\n\n // test\n RequestContext.getCurrentContext().setResponseGZipped(true);\n RequestContext.getCurrentContext().setResponseDataStream(new ByteArrayInputStream(gzipData));\n filter.run();\n MockHttpServletResponse response = ((MockHttpServletResponse) (RequestContext.getCurrentContext().getResponse()));\n assertThat(response.getHeader(\"Content-Length\")).isNull();\n assertThat(response.getHeader(\"Content-Encoding\")).isNull();\n assertThat(response.getContentAsString()).as(\"wrong content\").isEqualTo(\"hello\");\n }",
"@Test\n public void runWithOriginContentLength_gzipRequested_gzipResponse() throws Exception {\n ZuulProperties properties = new ZuulProperties();\n properties.setSetContentLength(true);\n SendResponseFilter filter = new SendResponseFilter(properties);\n byte[] gzipData = gzipData(\"hello\");\n RequestContext.getCurrentContext().setOriginContentLength(((long) (gzipData.length)));// for\n\n // test\n RequestContext.getCurrentContext().setResponseGZipped(true);\n RequestContext.getCurrentContext().setResponseDataStream(new ByteArrayInputStream(gzipData));\n ((MockHttpServletRequest) (RequestContext.getCurrentContext().getRequest())).addHeader(ACCEPT_ENCODING, \"gzip\");\n filter.run();\n MockHttpServletResponse response = ((MockHttpServletResponse) (RequestContext.getCurrentContext().getResponse()));\n assertThat(response.getHeader(\"Content-Length\")).isEqualTo(Integer.toString(gzipData.length));\n assertThat(response.getHeader(\"Content-Encoding\")).isEqualTo(\"gzip\");\n assertThat(response.getContentAsByteArray()).isEqualTo(gzipData);\n BufferedReader reader = new BufferedReader(new InputStreamReader(new GZIPInputStream(new ByteArrayInputStream(response.getContentAsByteArray()))));\n assertThat(reader.readLine()).isEqualTo(\"hello\");\n }",
"private boolean shouldGzipResponse() {\n return status != HttpServletResponse.SC_NOT_MODIFIED && status != HttpServletResponse.SC_NO_CONTENT;\n }",
"@Test\n\tpublic void runWithOriginContentLength_gzipRequested_gzipResponse() throws Exception {\n\t\tZuulProperties properties = new ZuulProperties();\n\t\tproperties.setSetContentLength(true);\n\n\t\tSendResponseFilter filter = new SendResponseFilter(properties);\n\n\t\tbyte[] gzipData = gzipData(\"hello\");\n\n\t\tRequestContext.getCurrentContext().setOriginContentLength((long) gzipData.length); // for\n\t\t// test\n\t\tRequestContext.getCurrentContext().setResponseGZipped(true);\n\t\tRequestContext.getCurrentContext()\n\t\t\t\t.setResponseDataStream(new ByteArrayInputStream(gzipData));\n\t\t((MockHttpServletRequest) RequestContext.getCurrentContext().getRequest())\n\t\t\t\t.addHeader(ZuulHeaders.ACCEPT_ENCODING, \"gzip\");\n\n\t\tfilter.run();\n\n\t\tMockHttpServletResponse response = (MockHttpServletResponse) RequestContext\n\t\t\t\t.getCurrentContext().getResponse();\n\t\tassertThat(response.getHeader(\"Content-Length\"))\n\t\t\t\t.isEqualTo(Integer.toString(gzipData.length));\n\t\tassertThat(response.getHeader(\"Content-Encoding\")).isEqualTo(\"gzip\");\n\t\tassertThat(response.getContentAsByteArray()).isEqualTo(gzipData);\n\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new GZIPInputStream(\n\t\t\t\t\t\tnew ByteArrayInputStream(response.getContentAsByteArray()))));\n\t\tassertThat(reader.readLine()).isEqualTo(\"hello\");\n\t}",
"boolean compressResponse(HttpServletRequest request) {\n String clientEncodingAbility = request.getHeader(ENCODING_REQUEST_HEADER_KEY);\n return DATA_SOURCE_MANAGER.getServerConfiguration().getGlobalConfiguration().isGzipped()\n && clientEncodingAbility != null\n && clientEncodingAbility.contains(ENCODING_GZIPPED);\n }",
"private boolean shouldGzipFunction(RequestHeader v1, ResponseHeader v2) {\n if (GzipFilterEnabled && (v1.headers().get(HttpHeaders.ACCEPT_ENCODING) != null)) {\n if (v1.headers().get(HttpHeaders.ACCEPT_ENCODING).toString().toLowerCase().contains(GZIP)) {\n return true;\n }\n }\n return false;\n }",
"private void enableGzip() {\n after((request, response) -> {\n response.header(\"content-encoding\", \"gzip\");\n });\n }",
"public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)\n throws ServletException, IOException {\n \n HttpServletRequest req = (HttpServletRequest) request;\n HttpServletResponse res = (HttpServletResponse) response;\n \n if (!this.enabled || !isGzipSupported(req)) {\n // Invoke resource normally.\n chain.doFilter(req, res);\n } else {\n // Tell browser we are sending it gzipped data.\n res.setHeader(\"Content-Encoding\", \"gzip\");\n \n // Invoke resource, accumulating output in the wrapper.\n ByteArrayResponseWrapper responseWrapper =\n new ByteArrayResponseWrapper(response);\n \n chain.doFilter(req, responseWrapper);\n \n ByteArrayOutputStream outputStream = responseWrapper.getByteArrayOutputStream();\n \n // Get character array representing output.\n mLogger.debug(\"Pre-zip size:\" + outputStream.size());\n \n // Make a writer that compresses data and puts\n // it into a byte array.\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n GZIPOutputStream zipOut = new GZIPOutputStream(byteStream);\n \n // Compress original output and put it into byte array.\n zipOut.write(responseWrapper.getByteArrayOutputStream().toByteArray());\n \n // Gzip streams must be explicitly closed.\n zipOut.close();\n \n mLogger.debug(\"Gzip size:\" + byteStream.size());\n \n // Update the Content-Length header.\n res.setContentLength(byteStream.size());\n \n ByteArrayOutputStreamWrapper newOut =\n (ByteArrayOutputStreamWrapper) responseWrapper.getOutputStream();\n newOut.clear();\n newOut.setFinallized();\n \n /* now force close of OutputStream */\n newOut.write(byteStream.toByteArray());\n newOut.close();\n }\n \n }",
"protected boolean setContentEncodingGZip() {\r\n response.addHeader(\"Content-Encoding\", \"gzip\");\r\n response.addHeader(\"Vary\", \"Accept-Encoding\");\r\n return response.containsHeader(\"Content-Encoding\");\r\n }",
"public void process(HttpResponse response, HttpContext context) {\n\t\t\t\tfinal HttpEntity entity = response.getEntity();\r\n\t\t\t\tif (entity != null) {\r\n\t\t\t\t\tfinal Header encoding = entity.getContentEncoding();\r\n\t\t\t\t\tif (encoding != null) {\r\n\t\t\t\t\t\tfor (HeaderElement element : encoding.getElements()) {\r\n\t\t\t\t\t\t\tif (element.getName().equalsIgnoreCase(\r\n\t\t\t\t\t\t\t\t\tENCODING_GZIP)) {\r\n\t\t\t\t\t\t\t\tresponse.setEntity(new InflatingEntity(response\r\n\t\t\t\t\t\t\t\t\t\t.getEntity()));\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}",
"public void testContentEncoding() throws Exception {\n String resp = sendRequestWithHeader(\"Content-Encoding\", \"gzip\");\n assertEquals(\"Content-Encoding request header should be forwarded\", \"content-encoding: gzip\",\n resp.toLowerCase());\n }",
"public static InputStream getResponseBodyStream(HttpResponse response) throws IOException {\n if (response == null || response.getEntity() == null) {\n return null;\n }\n InputStream inStream = response.getEntity().getContent();\n Header contentEncoding = response.getFirstHeader(\"Content-Encoding\");\n\n if (contentEncoding != null\n && contentEncoding.getValue().equalsIgnoreCase(\"gzip\")) {\n inStream = new GZIPInputStream(inStream);\n }\n\n return inStream;\n }",
"private boolean isGZIPSupported(HttpServletRequest req) {\n\n String browserEncodings = req.getHeader(\"accept-encoding\");\n boolean supported = ((browserEncodings != null) &&\n (browserEncodings.indexOf(\"gzip\") != -1));\n\n String userAgent = req.getHeader(\"user-agent\");\n\n if ((userAgent != null) && userAgent.startsWith(\"httpunit\")) {\n if (log.isDebugEnabled()) {\n log.debug(\"httpunit detected, disabling filter...\");\n }\n\n return false;\n } else {\n return supported;\n }\n }",
"private AbstractSiteMap processGzip(URL url, byte[] response) throws MalformedURLException, IOException,\n\t\t\tUnknownFormatException {\n\n\t\tlogger.debug(\"Processing gzip\");\n\n\t\tAbstractSiteMap smi;\n\n\t\tInputStream is = new ByteArrayInputStream(response);\n\n\t\t// Remove .gz ending\n\t\tString xmlUrl = url.toString().replaceFirst(\"\\\\.gz$\", \"\");\n\n\t\tlogger.debug(\"XML url = \" + xmlUrl);\n\n\t\tBOMInputStream decompressed = new BOMInputStream(new GZIPInputStream(is));\n\t\tInputSource in = new InputSource(decompressed);\n\t\tin.setSystemId(xmlUrl);\n\t\tsmi = processXml(url, in);\n\t\tdecompressed.close();\n\t\treturn smi;\n\t}",
"@Test\n public void testVaryStarIsNotGeneratedByProxy() throws Exception {\n request.setHeader(\"User-Agent\",\"my-agent/1.0\");\n originResponse.setHeader(\"Cache-Control\",\"public, max-age=3600\");\n originResponse.setHeader(\"Vary\",\"User-Agent\");\n originResponse.setHeader(\"ETag\",\"\\\"etag\\\"\");\n\n Mockito.when(mockExecChain.proceed(Mockito.any(), Mockito.any())).thenReturn(originResponse);\n\n final ClassicHttpResponse result = execute(request);\n final Iterator<HeaderElement> it = MessageSupport.iterate(result, HttpHeaders.VARY);\n while (it.hasNext()) {\n final HeaderElement elt = it.next();\n Assertions.assertNotEquals(\"*\", elt.getName());\n }\n }",
"public static InputStream getUngzippedContent(HttpEntity entity)\n\t\t\tthrows IOException {\n\t\tInputStream responseStream = entity.getContent();\n\t\tif (responseStream == null) {\n\t\t\treturn responseStream;\n\t\t}\n\t\tHeader header = entity.getContentEncoding();\n\t\tif (header == null) {\n\t\t\treturn responseStream;\n\t\t}\n\t\tString contentEncoding = header.getValue();\n\t\tif (contentEncoding == null) {\n\t\t\treturn responseStream;\n\t\t}\n\t\tif (contentEncoding.contains(\"gzip\")) {\n\t\t\tif (DEBUG)\n\t\t\t\tLog.d(TAG, \"getUngzippedContent\");\n\t\t\tresponseStream = new GZIPInputStream(responseStream);\n\t\t}\n\t\treturn responseStream;\n\t}",
"@Test\n public void getsCompressedContent() throws Exception {\n final Host host = Mockito.mock(Host.class);\n final String body = \"compressed\";\n Mockito.doAnswer(\n new Answer<Resource>() {\n @Override\n public Resource answer(final InvocationOnMock inv) {\n final Resource answer = Mockito.spy(\n new ResourceMocker()\n .withContent(body)\n .withHeaders(\"gzip\")\n .mock()\n );\n Mockito.doReturn(\"text/plain\")\n .when(answer).contentType();\n return answer;\n }\n }\n ).when(host)\n .fetch(\n Mockito.any(URI.class),\n Mockito.any(Range.class),\n Mockito.any(Version.class)\n );\n final Hosts hosts = Mockito.mock(Hosts.class);\n Mockito.doReturn(host).when(hosts).find(Mockito.anyString());\n final int port = PortMocker.reserve();\n final HttpFacade facade =\n new HttpFacade(hosts, port, PortMocker.reserve());\n try {\n facade.listen();\n final Response resp =\n new JdkRequest(String.format(\"http://localhost:%d/\", port))\n .header(HttpHeaders.ACCEPT, MediaType.TEXT_PLAIN)\n .header(HttpHeaders.ACCEPT_ENCODING, \"gzip\")\n .header(\n HttpHeaders.AUTHORIZATION,\n String.format(\n \"Basic %s\",\n Base64.encodeBase64String(\"a:b\".getBytes())\n )\n ).uri().path(\"/a\").queryParam(\"all-versions\", \"\")\n .back().fetch().as(RestResponse.class)\n .assertStatus(HttpURLConnection.HTTP_OK)\n .assertHeader(HttpHeaders.CONTENT_ENCODING, \"gzip\");\n MatcherAssert.assertThat(\n IOUtils.toString(\n new GZIPInputStream(\n new ByteArrayInputStream(resp.binary())\n ),\n Charsets.UTF_8\n ),\n Matchers.is(body)\n );\n } finally {\n facade.close();\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table umajin.user_master | @Select({
"select",
"user_id, nickname, sex, age, birthday, regist_date, update_date, disable",
"from umajin.user_master",
"where user_id = #{user_id,jdbcType=INTEGER}"
})
@Results({
@Result(column="user_id", property="user_id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="nickname", property="nickname", jdbcType=JdbcType.VARCHAR),
@Result(column="sex", property="sex", jdbcType=JdbcType.INTEGER),
@Result(column="age", property="age", jdbcType=JdbcType.INTEGER),
@Result(column="birthday", property="birthday", jdbcType=JdbcType.DATE),
@Result(column="regist_date", property="regist_date", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_date", property="update_date", jdbcType=JdbcType.TIMESTAMP),
@Result(column="disable", property="disable", jdbcType=JdbcType.INTEGER)
})
UserMaster selectByPrimaryKey(Integer user_id); | [
"@SelectProvider(type=UserMasterSqlProvider.class, method=\"selectByExample\")\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n List<UserMaster> selectByExample(UserMasterDto example);",
"@Override \n\tpublic int getNextUserMasterId() throws ResourceAccessException {\n\t\ttry {\n\t\t\treturn userMasterDaoImpl.getNextUserMasterId(); \t\t\n\t\t}catch(DataAccessException ex){ \n\t\t\tthrow new ResourceAccessException(ParConstants.databaseAccessIssue); }\n\n\t}",
"@Override\n\tpublic List<UserMaster> getAllUserMaster() throws ResourceNotFoundException {\t\t\n\t\tList<UserMaster> userMaster = new ArrayList<UserMaster>(); \t\t\n\t\ttry {\n\t\t\tuserMaster = userMasterDaoImpl.getAllUserMaster();\n\t\t}catch(EmptyResultDataAccessException ex) {\n\t\t\tthrow new ResourceNotFoundException(ParConstants.dataNotFound);\t\n\t\t}catch(DataAccessException ex) { \n\t\t\tthrow new ResourceAccessException(ParConstants.databaseAccessIssue); \n\t\t}\n\n\t\treturn userMaster;\n\t\t\n\t}",
"public void setMasterUid(Long masterUid) {\n this.masterUid = masterUid;\n }",
"public Long getMasterUid() {\n return masterUid;\n }",
"public static ArrayList<SalonUser> selectMasters() {\n Connection connection = null;\n PreparedStatement preparedStatement;\n ResultSet resultSet;\n ArrayList<SalonUser> masters = new ArrayList<>();\n try {\n connection = ConnectionPool.getInstance().getConnection();\n preparedStatement = connection.prepareStatement(QueryToDatabase.SELECT_MASTERS.getQuery());\n preparedStatement.setInt(1, USER_MASTER_ROLE_ID);\n resultSet = preparedStatement.executeQuery();\n while (resultSet.next()) {\n int masterId = resultSet.getInt(COLUMN_LABEL_USER_ID);\n String masterLogin = resultSet.getString(COLUMN_LABEL_LOGIN);\n String masterName = resultSet.getString(COLUMN_LABEL_NAME);\n String masterSurname = resultSet.getString(COLUMN_LABEL_SURNAME);\n SalonUser master = new SalonUser(masterId, masterLogin, masterName, masterSurname);\n masters.add(master);\n }\n } catch (SQLException e) {\n LOGGER.log(Level.WARN, \"Can't check user role. \" + e);\n } finally {\n if (connection != null) {\n ConnectionPool.getInstance().returnConnectionToPool(connection);\n }\n }\n return masters;\n }",
"public String getMasterUsername() {\n return this.masterUsername;\n }",
"long getMasterId();",
"@Override\n\tpublic List<UserMaster> getUserMasterByUserName(String username) throws ResourceNotFoundException {\t\t\n\t\tList<UserMaster> userMaster = new ArrayList<UserMaster>(); \n\t\ttry {\n\t\t\tuserMaster = userMasterDaoImpl.getUserMasterByUserName(username);\n\t\t}catch(EmptyResultDataAccessException ex) {\n\t\t\tthrow new ResourceNotFoundException(String.format(ParConstants.dataNotFound + \"for User Master %S\",username));\t\n\t\t}catch(DataAccessException ex) { \n\t\t\tthrow new ResourceAccessException(ParConstants.databaseAccessIssue); \n\t\t}\n\n\t\treturn userMaster;\n\t\t\n\t}",
"@Override \n\tpublic String createUserMaster(UserMasterTO userMasterTO) throws ResourceNotCreatedException { \n\t\tList<UserMaster> allUserMastersList = new ArrayList<UserMaster>();\n\t\t\n\t\ttry { \n\t\t\tallUserMastersList = userMasterDaoImpl.getAllUserMaster(); \n\t\t\tif(!allUserMastersList.isEmpty()) {\n\t\t\t\tfor(UserMaster data : allUserMastersList) \n\t\t\t\t{ \n\t\t\t\t\tif (data.getUserFirstName().equalsIgnoreCase(userMasterTO.getUserFirstName()) && data.getUserLastName().equalsIgnoreCase(userMasterTO.getUserLastName())) \n\t\t\t\t\t{ \n\t\t\t\t\t\tthrow new ResourceDuplicateException(String.format(ParConstants.duplicateFound + \"for UserMaster: %s\",userMasterTO.getUserFirstName() + \" \"+userMasterTO.getUserLastName() ));\n\t\t\t\t\t} \n\t\t\t\t} \n\t\t\t}\n\t\t\tif(userMasterDaoImpl.createUserMaster(new UserMaster(userMasterTO.getUserId(),userMasterTO.getUserFirstName(),userMasterTO.getUserLastName(),userMasterTO.getUserPhoneNo(),userMasterTO.getUserEmailTxt(),userMasterTO.getUserActive(),userMasterTO.getUserName(),userMasterTO.getPassword(),userMasterTO.getUserRole())))\n\t\t\t{ \n\t\t\t\treturn String.format(ParConstants.createSuccessfull + \"for userMaster : %s\",userMasterTO.getUserFirstName()); \n\t\t\t} \n\t\t\t\t\n\n\t\t}catch(DataAccessException ex) { \n\t\t\tthrow new ResourceNotCreatedException(String.format(ParConstants.createUnSuccessfull + \"for UserMaster : %s \",userMasterTO.getUserFirstName())); \n\t\t} \n\t\treturn String.format(ParConstants.createUnSuccessfull + \"for userMaster : %s\",userMasterTO.getUserFirstName());\n\n\t}",
"@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);",
"public long getMasterId() {\r\n return masterId_;\r\n }",
"public long getMasterId() {\r\n return masterId_;\r\n }",
"public void MyBatisGetUser() \n {\n \tSqlSession session = MysqlSessionFactory.openSession();\n \ttry\n \t{\n \t \n \t\tUser user = (User) session.selectOne(\"com.hnly.mysql.TestMybatis.userMapper.getUser\", 2);\n \n \t //System.out.println(user);\n \t OutMessage(user);\n \t \n \t}\n \tfinally\n \t{\n \t session.close();\n \t}\n \t///*/\n \t//System.out.println( \"MybatisInit:OK!22\" );\n \n }",
"@Select({ \"select\", \"id, sign_user_id, user_name, address, chain_id, group_id, user_status, gmt_create, \", \"gmt_modified, description\", \"from tb_user\", \"where id = #{id,jdbcType=INTEGER}\" })\n @Results({ @Result(column = \"id\", property = \"id\", jdbcType = JdbcType.INTEGER, id = true), @Result(column = \"sign_user_id\", property = \"signUserId\", jdbcType = JdbcType.VARCHAR), @Result(column = \"user_name\", property = \"userName\", jdbcType = JdbcType.VARCHAR), @Result(column = \"address\", property = \"address\", jdbcType = JdbcType.VARCHAR), @Result(column = \"chain_id\", property = \"chainId\", jdbcType = JdbcType.INTEGER), @Result(column = \"group_id\", property = \"groupId\", jdbcType = JdbcType.INTEGER), @Result(column = \"user_status\", property = \"userStatus\", jdbcType = JdbcType.INTEGER), @Result(column = \"gmt_create\", property = \"gmtCreate\", jdbcType = JdbcType.TIMESTAMP), @Result(column = \"gmt_modified\", property = \"gmtModified\", jdbcType = JdbcType.TIMESTAMP), @Result(column = \"description\", property = \"description\", jdbcType = JdbcType.VARCHAR) })\n TbUser selectByPrimaryKey(Integer id);",
"List<UserMasterDTO> findAll();",
"public List<MasterUser> findUsers() {\r\n\t\treturn userDAO.findUsers();\r\n\t}",
"public java.lang.String getMasterAccountName() {\n return masterAccountName;\n }",
"private void loadMasterData()\r\n\t{\r\n\t\tlistOfMasterStud.clear();\r\n\t\tString qu = \"SELECT * FROM MASTERSTUDENT\";\r\n\t\tResultSet resultM = databaseHandler.execQuery(qu);\r\n\t\ttry {\r\n\t\t\t// retrieve student information form database\r\n\t\t\twhile(resultM.next())\r\n\t\t\t{\r\n\t\t\t\tString studIDM = resultM.getString(\"studentNoM\");\r\n\t\t\t\tString studNameM = resultM.getString(\"nameM\");\r\n\t\t\t\tString studSurnameM = resultM.getString(\"surnameM\");\r\n\t\t\t\tString studSupervisorM = resultM.getString(\"supervisorM\");\r\n\t\t\t\tString studEmailM = resultM.getString(\"emailM\");\r\n\t\t\t\tString studCellphoneM = resultM.getString(\"cellphoneNoM\");\r\n\t\t\t\tString studStationM = resultM.getString(\"stationM\");\r\n\t\t\t\tString studCourseM = resultM.getString(\"courseM\");\r\n\r\n\t\t\t\tlistOfMasterStud.add(new StudentProperty(studIDM, studNameM, studSurnameM,\r\n\t\t\t\t\t\tstudSupervisorM, studEmailM, studCellphoneM, studStationM, studCourseM));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tmasterStudTable.setItems(listOfMasterStud);\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the index of a pipe based upon its suffix. | private int getPipeIndex(String pipeArgNameSuffix) {
int pipeIndex;
// If there is no suffix, then it is the default pipe 0.
// Otherwise we must check the suffix.
if (pipeArgNameSuffix.length() <= 0) {
pipeIndex = 0;
} else {
String indexString;
// Validate that the suffix begins with a '.' character.
if (pipeArgNameSuffix.indexOf('.') != 0) {
throw new OsmosisRuntimeException(
"Task " + taskId
+ " contains a pipe definition without '.' between prefix and suffix."
);
}
// The remaining suffix must be a number defining the index.
indexString = pipeArgNameSuffix.substring(1);
// Ensure the index exists.
if (indexString.length() <= 0) {
throw new OsmosisRuntimeException(
"Task " + taskId
+ " contains a pipe definition without an index after the '.'."
);
}
// Parse the suffix string into a number.
try {
pipeIndex = Integer.parseInt(indexString);
} catch (NumberFormatException e) {
throw new OsmosisRuntimeException("Task " + taskId + " has a pipe with an incorrect index suffix.");
}
}
return pipeIndex;
} | [
"public int getIndex() {\n return -1 + Integer.parseInt(this.command.replaceAll(\"[\\\\D]\", \"\"));\n }",
"public static int lookupComponentIndex(ComponentToken token) {\r\n\t\tif (!(token.getCommand() instanceof SubCommandProvider)) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\tSubCommandProvider scp = (SubCommandProvider) token.getCommand();\r\n\t\tfor (int i = 0; i < scp.getChildren().size(); i++) {\r\n\t\t\tCommandWrapper cmdWr = scp.getChildren().get(i);\r\n\t\t\tif (cmdWr.getCommand().equals(token.getComponent())) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn 0;\r\n\t}",
"int getPortletIndex( Portlet portlet );",
"int getSplitIndex();",
"int _panelIndexOf( String volume_alias) {\n \t\n \tfor( int i= 0; i < panels.size(); ++i) {\n \t PanelStruct ps= (PanelStruct)panels.elementAt( i);\n \t if( null == ps || null == ps.alias0)\n \t\tcontinue;\n \t if( null == ps.alias1 && ps.alias0.equals( volume_alias))\n \t\treturn i;\n \t}\n \treturn -1;\n }",
"private static int getArgIndex(String[] args, String argument) {\n for (int i = 0; i < args.length; i++) {\n if (argument.equalsIgnoreCase(args[i])) {\n return i;\n }\n }\n return -1;\n }",
"public int getIndexOf(Component comp) {\r\n return components.indexOf(comp);\r\n\t}",
"int indexOfComponent(Component component);",
"long getFileIndex();",
"String getIndexLabel(String prefix);",
"public long getFileIndex(){\n \tString fileName=file.getName();\n// \tSystem.out.println(\"fileName:\"+fileName);\n \tfinal long start = Long.parseLong(fileName.substring(0,\n\t\t\t\tfileName.length() - FILE_SUFFIX.length()));\n// \tSystem.out.println(\"start:\"+start);\n \treturn start;\n }",
"private int getIndexByName(String task) \n\t{\n\t\tfor (int i = 0; i < names.length; i++) \n\t\t{\n\t\t\tif(task.equals(names[i]))\n\t\t\t\treturn i;\n\t\t}\n\t\treturn -1;\n\t}",
"public int index(int i) {\n if (i < 0 || i >= length()) {\n throw new IllegalArgumentException();\n }\n return suffixes[i];\n }",
"private int findComp(Component cmpnt) {\n\n for (int i = 0; i < compList.length; i++) {\n if (compList[i].equals(cmpnt)) {\n return i;\n }\n }\n\n return 0;\n }",
"private int getCmdNameEndIndex(String command) {\n Matcher cmdNameMatcher = commandNamePattern.matcher(command);\n\n if (cmdNameMatcher.find()) {\n return cmdNameMatcher.end(GROUP_NAME);\n } else {\n return 0;\n }\n }",
"public int getSplitIndex(Split s)\n\t{\n\t\tfor(int counter = 0; counter < splits.size(); counter ++)\n\t\t{\n\t\t\tif(splits.get(counter).equals(s))\n\t\t\t{\n\t\t\t\treturn counter;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn -1;\n\t}",
"public static int findAbbreviation(String abbreviation) {\n\t\tint saveCount = lastSaveSelector.getItemCount();\n\t\tfor (int i = 0; i < saveCount; i++) {\n\t\t\tString save = lastSaveSelector.getItemAt(i);\n\t\t\tif (save.startsWith(abbreviation, save.indexOf('-') + 1))\n\t\t\t\treturn i;\n\t\t}\n\t\treturn -1;\n\t}",
"private int getPegIndex(int peg) {\n\t\tif (peg >= 1 && peg <= 3) {\n\t\t\t// return the peg number minus one to get the index of the peg.\n\t\t\treturn (--peg);\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(\"peg number must be 1, 2, or 3\");\n\t\t}\n\t}",
"public static int ioArgIndex(final OpInfo info) {\n\t\tList<Member<?>> inputs = info.inputs();\n\t\tOptional<Member<?>>\n\t\t\t\tioArg = inputs.stream().filter(m -> m.isInput() && m.isOutput()).findFirst();\n\t\tif(ioArg.isEmpty()) return -1;\n\t\tMember<?> ioMember = ioArg.get();\n\t\treturn inputs.indexOf(ioMember);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a decoy of the malevolent mob at the given location | public LivingEntity createDecoy(Location location)
{
// Spawn the mob to turn into a clone
MMobListener.setSpawnDenyFlag(true);
LivingEntity livingEntity = (LivingEntity) Common.spawnEntity(location, Common.getEntityType(entity));
MMobListener.setSpawnDenyFlag(false);
// Create the malevolent version of this mob and copy over attributes
MalevolentMob mob = MobHandler.makeMobMalevolent(livingEntity);
if (mob != null)
{
mob.setRole(getRole());
mob.setLevel(getLevel());
mob.role.isDecoy = true;
}
else
Log.log("Attempted to spawn a decoy, but failed to make it Malevolent!", Level.WARNING);
livingEntity.setMaxHealth(entity.getMaxHealth());
livingEntity.setHealth(entity.getHealth());
return livingEntity;
} | [
"public DELocation (Location loc) {\n this.worldname = loc.getWorld().getName();\n this.x = loc.getBlockX();\n this.y = loc.getBlockY();\n this.z = loc.getBlockZ();\n }",
"public Deer(boolean randomAge, Field field, Location location)\n {\n super(field, location);\n age = 0;\n if(randomAge) {\n age = rand.nextInt(MAX_AGE);\n foodLevel = rand.nextInt(PLANT_FOOD_VALUE);\n }\n else {\n foodLevel = PLANT_FOOD_VALUE;\n }\n }",
"public static Denomination createDenomination(String denomination){\n return new Denomination(denomination);\n }",
"public Animal(Field field, Location location)\n {\n super(field, location);\n isFemale = true;\n setInfectionProbability(INFECTION_PROBABILITY);\n setSpreadingProbability(SPREADING_PROBABILITY);\n setCureProbability(CURE_PROBABILITY);\n setCorpseProbability(CORPSE_PROBABILITY);\n }",
"public Plant(Field field, Location location)\n {\n alive = true;\n this.field = field;\n setLocation(location);\n }",
"public static MalevolentMob makeMobMalevolent(LivingEntity entity)\n\t{\n\t\tif (entity == null)\n\t\t\tthrow new IllegalArgumentException(\"A null entity can't be made into a malevolent mob!\");\n\t\tif (isMobMalevolent(entity))\n\t\t\treturn getMalevolentMob(entity);\n\n\t\t// Figure out the type of the entity\n\t\tString type = Common.getEntityType(entity);\n\n\t\t// Spawn the mob and assign a random role to it\n\t\tMalevolentMob mob = new MalevolentMob(entity);\n\t\tmob.setRandomRole(MMobPlugin.getSettings().getStringList(\"Spawns.\" + type + \".roles\"));\n\n\t\t// Store the mob\n\t\tmobsToAdd.add(mob);\n\t\treturn mob;\n\t}",
"public HumanFemale(boolean randomAge, Field field, Location location)\n {\n super(randomAge, field, location); \n }",
"public void disembark(Unit unit, Tribe tribe, int x, int y) {\n City city = (City) gameActors.get(unit.getCityId());\n removeUnitFromBoard(unit);\n removeUnitFromCity(unit, city, tribe);\n Types.UNIT baseLandUnit = getBaseLandUnit(unit);\n\n if(baseLandUnit==null)\n {\n Thread.dumpStack();\n baseLandUnit=Types.UNIT.WARRIOR;//ERRORSaving\n }\n\n //We're actually creating a new unit\n Vector2d newPos = new Vector2d(x, y);\n\n Unit newUnit = Types.UNIT.createUnit(newPos, unit.getKills(), unit.isVeteran(), unit.getCityId(), unit.getTribeId(), baseLandUnit);\n\n newUnit.setCurrentHP(unit.getCurrentHP());\n newUnit.setMaxHP(unit.getMaxHP());\n addUnit(city, newUnit);\n }",
"private static Enemy newEnemy(String location) {\n Enemy result;\n switch (location) {\n case \"badlands\":\n result = new Enemy(\"mountain goat\", 12, 21, 21, 1, 12, 12, 10, \"horn\"); break;\n case \"evil forest lair\":\n result = new Enemy(\"goblin\", 50, 30, 25, 40, 0, 10, 30, \"rusty knife\"); break;\n case \"cave\":\n result = new Enemy(\"troll\", 60, 45, 20, 15, 0, 35, 40, \"ruby\"); break;\n case \"base\":\n result = new Enemy(\"fire drake\", 11, 12, 21, 2, 21, 12, 10, \"something else\"); break;\n case \"fang hill\":\n result = new Enemy(\"wolf\", 30, 60, 20, 40, 20, 10, 30, \"wolf claw\"); break;\n case \"inner evil forest\":\n result = new Enemy(\"andre the giant\", 100, 35, 20, 35, 0, 100, 150, \"Rope\"); break;\n case \"dungeon\":\n result = new Enemy(\"haku\", 30, 100, 30, 150, 60, 100, 150, \"scale\"); break;\n case \"throne room\":\n result = new Enemy(\"gandolf the black\", 100, 100, 40, 100, 1, 10000, 1000, \"gem of light\"); break;\n default:\n result = new Enemy(\"unknown enemy\", 999, 999, 999, 999, 999, 999, 99999, \"unknown\"); break;\n }\n return result;\n }",
"public NPC spawnHumanNPC(Location location, NPCProfile profile);",
"Paranormal(String name, String origin, int dangerrating, String foodType, int foodAmt){\n super(name, origin, dangerrating);\n foodType = \"meat\";\n foodAmt = 5;\n }",
"private Persons createFather(Persons child, String spouse)\n {\n Persons dad = new Persons();\n dad.setPersonFirstName(nameGenerator.generateMaleName());\n dad.setPersonGender(\"m\");\n dad.setPersonSpouseID(spouse);\n dad.setDescendantID(userName);\n\n if (child.getPersonGender().equals(\"m\")) {\n dad.setPersonLastName(child.getPersonLastName());\n }\n else {\n dad.setPersonLastName(nameGenerator.generateLastName());\n }\n\n return dad;\n }",
"public static Damier gen_Damier(final int x, final int y, final Joueur joueur) {\n\t\treturn Generator.gen_Damier(x, y, joueur, null);\n\t}",
"@Override\n\tpublic MetEntity createMetDessert(MetEntity meto) {\n\n\t\tMetEntity d = new Dessert(meto.getNom(), meto.getPrix());\n\n\t\treturn metrepodess.save(d);\n\n\t}",
"public static MotionLessEntity createDugWall() {\r\n\t\treturn dugwall;\r\n\t}",
"private final Phenomenon createPhenomenon( String name, String id, Unit unit ){\n String tag = name;\n String parsedTag = IoosSosUtil.getNameFromUri(id);\n if (!parsedTag.equals(id)) {\n tag = parsedTag;\n }\n \n Phenomenon phenomenon = new PhenomenonImp( name, id, tag, unit );\n allPhenomena.add( phenomenon );\n return phenomenon;\n }",
"@Override\r\n\tpublic void onDeath()\r\n\t{\r\n\t\tsuper.onDeath();\r\n\t\tif(matrix != null)\r\n\t\t{\r\n\t\t\tfor(int i = 1; i < 5; i++)\r\n\t\t\t{\r\n\t\t\t\tDebrisSprite debris = new DebrisSprite(\"Juggernaut Debris \" + \r\n\t\t\t\t\t\t(random().nextInt(3) + 1));\r\n\t\t\t\tdebris.scalar().setScale(1.5f + random().nextFloat());\r\n\t\t\t\tdebris.rotation().rotate(90 * i);\r\n\t\t\t\tdebris.location().set(pointAt(i));\r\n\t\t\t\tdebris.applyDrift(velocity.x(), velocity.y(), \r\n\t\t\t\t\t\t(random().nextFloat() - 0.5f) * 0.1f);\r\n\t\t\t\tdebris.velocity().addPolar(\trandom().nextFloat() * 0.0085f, \r\n\t\t\t\t\t\t\t\t\t\t\trandom().nextFloat() * 6.283f);\r\n\t\t\t\tmatrix.add(\"Debris\", debris);\r\n\t\t\t}\r\n\t\t\tDebrisSprite debris = new DebrisSprite(\"Juggernaut Gun Debris\");\r\n\t\t\tdebris.scalar().setScale(2f);\r\n\t\t\tdebris.location().set(location);\r\n\t\t\tdebris.rotation().set(location.angleTowards(target.location()));\r\n\t\t\tdebris.applyDrift(velocity.x(), velocity.y(), \r\n\t\t\t\t\t(random().nextFloat() - 0.5f) * 0.1f);\r\n\t\t\tdebris.velocity().addPolar(\trandom().nextFloat() * 0.0085f, \r\n\t\t\t\t\t\t\t\t\t\trandom().nextFloat() * 6.283f);\r\n\t\t\tmatrix.add(\"Debris\", debris);\r\n\t\t}\r\n\t}",
"public Monster(Point location) {\n super(location);\n }",
"@Override\n\tpublic void setDirectionToward(Point2D location) {\n\t\tPoint2D.Double unitVector = normalize(location, this.getCenter());\n\t\tthis.setDirection(unitVector);\n\t\t//this.setXDirection(target.getXCenter() - this.getXCenter());\n\t\t//this.setYDirection(target.getYCenter() + this.getYCenter());\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
parse gameboard from server to game. | public static synchronized void parseBoard(Play play,Game game) {
synchronized (game) {
//clear
game.clear();
//build
ArrayList<String> board_data = play.getBoard();
for(int i=0;i<board_data.size();i++) {
String record = board_data.get(i);
StringTokenizer fields = new StringTokenizer(record, ",");
char type = fields.nextToken().charAt(0);
int id = Integer.parseInt( fields.nextToken() );
double lat = Double.parseDouble( fields.nextToken() );
double lon = Double.parseDouble( fields.nextToken() );
double alt = Double.parseDouble( fields.nextToken() );
Point3D location = new Point3D(lat,lon,alt);
double speed_weight_lat = Double.parseDouble( fields.nextToken() );
double radius_lon = 0;
if(fields.hasMoreTokens())//fruit case
radius_lon = Double.parseDouble( fields.nextToken() );
switch (type) {
case 'M':
Me me = new Me(id, location, (int)speed_weight_lat, (int)radius_lon);
game.setMe(me);
break;
case 'F':
Fruit fruit = new Fruit(id, location, (int)speed_weight_lat);
game.addFruit(fruit);
break;
case 'G':
Ghost ghost = new Ghost(id, location, (int)speed_weight_lat,(int)radius_lon);
game.addGhost(ghost);
break;
case 'P':
Packman packman = new Packman(id, location, (int)speed_weight_lat, (int)radius_lon);
game.addPackman(packman);
break;
case 'B':
Point3D location2 = new Point3D(speed_weight_lat,radius_lon,0);
Box box = new Box(id, location, location2);
game.addBox(box);
break;
default:
break;
}
}
}
} | [
"List<LeaderboardEntryBean> parseLeaderboard() throws IOException;",
"private void processConnection() throws IOException{\n\n\t\t//Displays own game board\n\t\tProject_Main.Main_Thread.game.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tProject_Main.Main_Thread.game.setSize(600, 425);\n\t\tProject_Main.Main_Thread.game.setVisible(true);\n\t\tSystem.out.println(\"<1>Your board is displayer\");\n\t\tint [] recmessage = new int [4];\n\t\tdo{\n\t\t\ttry{\n\t\t\t\tSystem.out.println(\"<\" + Server + \"> fired a shot on you\");\n\t\t\t\trecmessage = (int []) input.readObject();\n\t\t\t\trecmessage = Project_Main.Main_Thread.game.shotRec(recmessage); //RENAME\n\t\t\t\tsendData(recmessage);//sends outgoing int[] variable to Server\n\t\t\t}catch(ClassNotFoundException classNotFoundException){\n\t\t\t\tSystem.out.println(\"\\nUnknown object type received\\n\"); //exception if object type received is unknown \n\t\t\t}\n\t\t}while (recmessage[3] != 1);//does above while own board is not dead\n\n\t\tProject_Main.thread[3].interrupt();//thread 1 of this player's game is halted because player is dead\n\t\tProject_Main.thread[4].interrupt();//thread 2 of this player's game is halted because player is dead\n\t\tProject_Main.Main_Thread.game.setTitle(\"You Died\");\n\t}",
"public synchronized void readClientMsg() {\r\n\r\n String info = null;\r\n\r\n try {\r\n \r\n \r\n buffer = new byte[in.available()];\r\n \r\n int len = in.read(buffer);\r\n int playerNum, row, col;\r\n if (len > 0) {\r\n info = new String(buffer, 0, len);\r\n //System.out.println(\"Received: \"+ info);\r\n String[] split = info.split(\"_\");\t//String delimiter. \r\n String type = split[0];\r\n\r\n switch (type) { //these switch statements need to be implented for game play\r\n case \"move\":\r\n playerNum = Integer.parseInt(split[1]);\r\n row = Integer.parseInt(split[2]);\r\n col = Integer.parseInt(split[3]);\r\n turn = Boolean.parseBoolean(split[4]);\r\n this.markBoard(playerNum, row, col);\r\n this.drawBoard();\r\n this.setTurn();\r\n break;\r\n \r\n case \"win\":\r\n playerNum = Integer.parseInt(split[1]);\r\n row = Integer.parseInt(split[2]);\r\n col = Integer.parseInt(split[3]);\r\n turn = Boolean.parseBoolean(split[4]);\r\n this.markBoard(playerNum, row, col);\r\n this.drawBoard();\r\n JOptionPane.showMessageDialog(null, \"You have lost!\");\r\n contGame.listen(\"lobby\");\r\n close();\r\n break;\r\n\r\n case \"tie\":\r\n\r\n break;\r\n \r\n case \"quit\":\r\n handleQuit();\r\n break;\r\n \r\n case \"close\":\r\n close();\r\n break;\r\n \r\n case \"chat\":\r\n contGame.updateModelMsg(split[1]);\r\n break;\r\n \r\n case \"size\": \r\n this.SIZE = Integer.parseInt(split[1]);\r\n this.fillBoard();\r\n this.drawBoard();\r\n break;\r\n \r\n case \"start\":\r\n start = true;\r\n turn = Boolean.parseBoolean(split[1]);\r\n this.setTurn();\r\n break;\r\n \r\n case \"turn\":\r\n JOptionPane.showMessageDialog(null,split[1]);\r\n break;\r\n default:\r\n\r\n break;\r\n }\r\n\r\n //Need to validate the info before send the information\r\n // this.sendMsg(info);// we don't need to send information back immediately but rather wait till the player makes their move\r\n }\r\n } // Catch the error excepion then close the connection\r\n catch (IOException e) {\r\n System.out.println(\"Connection is closed! Cannot execute read client message\");\r\n e.printStackTrace();\r\n }\r\n }",
"private void getPlayerScoresFromServer()\r\n\t{\r\n\t\ttry {\r\n\t\t\tObject obj = null;\r\n\t\t\t//keep waiting until the game is not finished and then get the final scores from server\r\n\t\t\tdo\r\n\t\t\t{\r\n\t\t\t\t//Object stream to receive an array of Integer with Player Scores\r\n\t\t\t\tObjectInputStream playerScoresObjectInputFromServer = new ObjectInputStream(socket.getInputStream());\r\n\r\n\t\t\t\tobj = playerScoresObjectInputFromServer.readObject();\r\n\t\t\t}while (obj == null);\r\n\t\t\tscores = (ArrayList<Integer>)obj;\r\n\t\t\tview.refreshScores(snakeIndex, scores);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private char[][] parseBoard(JSONObject jsonObject) {\r\n char[][] board = new char[8][8];\r\n addPieces(board, jsonObject);\r\n return board;\r\n }",
"se.mejsla.camp.mazela.network.common.protos.MazelaProtocol.GameboardUpdate getGameboardUpdate();",
"void run() {\n\n try (final Socket socket = new Socket(hostname, port)) {\n\n in = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n out = new PrintWriter(socket.getOutputStream(), true);\n\n LOGGER.debug(\"Connected to server\");\n\n boolean restart;\n\n do {\n // initialize board with empty fields\n Arrays.fill(board, TocProtocol.EMPTY);\n\n // sets the player for the active game session\n final int player = Util.convertToDigit(in.readLine());\n\n LOGGER.debug(\"Assigned player: {}\", player);\n\n int winner = 0;\n\n while (true) {\n\n renderBoard();\n\n // get the active player\n final int activePlayer = Util.convertToDigit(in.readLine());\n\n // each turn the active player gets to set a symbol the board\n // this has to be communicated with the game server\n processTurn(player, activePlayer);\n\n // a winner or a full board are conditions for exiting the loop\n if ((winner = calculateWinner(activePlayer)) != 0 || boardIsFull()) {\n\n break;\n }\n\n // the active player sends a continue command to the server\n // thus the server knows to continue with the game\n if (player == activePlayer) {\n\n out.println(TocProtocol.CONTINUE);\n }\n }\n\n renderBoard();\n\n final String winText = winner == 0 ? \"Draw\" : \"Player \" + winner + \" won the game\";\n System.out.println(winText);\n\n restart = handlePossibleRestart();\n } while (restart);\n } catch (IOException e) {\n\n LOGGER.error(\"\", e);\n }\n }",
"public void run() {\n Thread NetworkListener = new Thread(new Runnable() {\n public void run() {\n \ttry {\n\t\t\t\t\thandleRequest();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n }\n });\n NetworkListener.start();\n \tif (port != PORTDEFAULT)\n \t\tout.println(\"N\" + board.getName());\n System.out.println(board);\n \tlong oldTime = System.currentTimeMillis();\n \tlong oldTimePhysics = System.currentTimeMillis();\n \tlong newTime = System.currentTimeMillis();\n while (true) {\n \tnewTime = System.currentTimeMillis();\n \tif (newTime - oldTimePhysics >= 2) {\n \t\toldTimePhysics = newTime;\n \t\tboard.step();\n \tif (port != PORTDEFAULT) {\n\t \t\tList<BallMessage> exitBalls = board.extractExitBalls();\n\t \t\tif (exitBalls != null) {\n\t \t\t\tfor (BallMessage eBall: exitBalls) {\n\t \t\t\t\tout.println(\"B \"+eBall);\n\t \t\t\t}\n\t \t\t}\n \t}\n \t}\n \tif (newTime - oldTime > 50) {\n \t\toldTime = newTime;\n \t\tSystem.out.println(board);\n \t}\n }\n }",
"public void refreshBoard()\r\n\t{\r\n\r\n\t\tsetLayout (new GridLayout(1,1));\r\n\t\tthis.setBackground(Color.LIGHT_GRAY);\r\n\t\t//Set updated food cells and snakes for the snake panel object\r\n\t\tsp.setFoodCells(foodCells);\r\n\t\tsp.setSnakes(snakes);\r\n\t\t//Refresh/recreate the board with the updated values of food cells and snakes\r\n\t\tsp.refreshSnakePanel();\r\n\r\n\r\n\t\t// Create an input stream to receive data from the server\r\n\t\ttry {\r\n\t\t\t// Create an output stream to send data to the server\r\n\t\t\toutputToServer = new ObjectOutputStream(socket.getOutputStream());\r\n\r\n\t\t\t//Send updated values of foodcells and Snakes (with updated locations/cells of current snake) to the server\r\n\t\t\tsnakeProtocol.setSnakeIndex(snakeIndex);\r\n\t\t\tsnakeProtocol.setFoodCells(foodCells);\r\n\t\t\tsnakeProtocol.setSnakes(snakes);\r\n\r\n\t\t\toutputToServer.writeObject(snakeProtocol);\r\n\t\t\toutputToServer.flush();\r\n\t\t} catch (IOException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\r\n\t\tsetFocusable(true);\r\n\t\tsetFocusTraversalKeysEnabled(true);\r\n\r\n\t\t//paint the panel to refresh the board\r\n\t\tpaintAll(getGraphics()); \r\n\r\n\t\t//Get the player status from server. i.e. isPlayerAlive and hasPlayerWon\r\n\t\tgetPlayerStatusFromServer();\r\n\r\n\t\ttry {\r\n\t\t\t//Stop the game if player is not alive or has won the game.\r\n\t\t\t// And update the status in the frame\r\n\t\t\tif(!isPlayerAlive)\r\n\t\t\t{\r\n\t\t\t\t//remove(sp);\r\n\t\t\t\tt.stop();\r\n\t\t\t\tview.playerLost();\r\n\t\t\t\t//get the final scores and refresh the scorecard \r\n\t\t\t\tgetPlayerScoresFromServer();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif(hasPlayerWon)\r\n\t\t\t{\r\n\t\t\t\t//remove(sp);\r\n\t\t\t\tt.stop();\r\n\t\t\t\tview.playerWon();\r\n\t\t\t\t//get the final scores and refresh the scorecard \r\n\t\t\t\tgetPlayerScoresFromServer();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t//Else, get latest snakeProtocol data from the server. i.e. \r\n\t\t\t// any updates to the food cells and updated snake cell locations for other snakes\r\n\t\t\tinputFromServer = new ObjectInputStream(socket.getInputStream());\r\n\r\n\t\t\t//TODO\r\n\t\t\t//Loop until the object is received. Sometimes this may take time due to synchronization code on the server.\r\n\t\t\tObject obj = null;\r\n\t\t\t//do\r\n\t\t\t//{\r\n\t\t\tobj = inputFromServer.readObject();\r\n\t\t\t//}while (obj == null);\r\n\r\n\t\t\tsnakeProtocol = (SnakeProtocol)obj;\r\n\t\t\tfoodCells = snakeProtocol.getFoodCells();\r\n\r\n\t\t\tsnakes = null;\r\n\t\t\tsnakes = snakeProtocol.getSnakes();\r\n\t\t\tcurrentDirection = snakes.get(snakeIndex).getSnakeDirection();\r\n\t\t\tcurrentSpeed = snakes.get(snakeIndex).getSnakeSpeed();\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private static PacmanBoard readGameBoard(SmoothReader reader)\n throws IOException, UnpackableException {\n\n String line = reader.readLine();\n\n if (!line.equals(\"[Board]\")) {\n throw new UnpackableException(\"Was expecting [Board] header\");\n }\n\n line = reader.readLine();\n var dimensions = line.split(\",\");\n if (dimensions.length != 2) {\n throw new UnpackableException(\"Invalid board dimensions\");\n }\n\n PacmanBoard board;\n try {\n board = new PacmanBoard(Integer.parseInt(dimensions[0]),\n Integer.parseInt(dimensions[1]));\n } catch (IllegalArgumentException e) {\n throw new UnpackableException(\"Invalid board dimensions\");\n }\n\n // read grid\n line = reader.readLine();\n int y = 0;\n while (line != null && !line.isEmpty()) {\n if (line.length() != board.getWidth()) {\n throw new UnpackableException(\"Incorrect board line length\");\n }\n for (int x = 0; x < line.length(); x++) {\n try {\n board.setEntry(new Position(x, y),\n BoardItem.getItem(line.charAt(x)));\n } catch (IllegalArgumentException e) {\n throw new UnpackableException(\"Invalid item in board\");\n } catch (IndexOutOfBoundsException e) {\n throw new UnpackableException(\"Outside Board Dimensions\");\n }\n }\n line = reader.readLine();\n y++;\n }\n\n // check given height matched board grid given\n if (y != board.getHeight()) {\n throw new UnpackableException(\"Incorrect board height\");\n }\n\n return board;\n }",
"private void receiveInfoFromServer() throws IOException {\n // Receive game status\n int status = fromServer.readInt();\n\n int column, row, player;\n\n /** Switch based on the message contents, calling methods on the Interface appropriately **/\n switch(status) {\n case START:\n ui.gameStart();\n break;\n case WIN:\n int winner = fromServer.readInt();\n ui.receiveWin(winner);\n break;\n case DRAW:\n ui.receiveDraw();\n player = fromServer.readInt();\n column = fromServer.readInt();\n row = fromServer.readInt();\n ui.receiveMove(player, column, row);\n break;\n case MOVE:\n player = fromServer.readInt();\n column = fromServer.readInt();\n row = fromServer.readInt();\n ui.receiveMove(player, column, row);\n break;\n case PROMPT_FOR_MOVE:\n ui.promptForMove();\n break;\n default:\n if(waitingForResult) {\n ui.receiveMoveResult(status);\n waitingForResult = false;\n }\n }\n }",
"private static void parseBingo(String[] tokens, int [][] playerBoard){\n for(int i=1; !tokens[i].equals(\"end\"); i+=2) {\n int x = Integer.parseInt(tokens[i]);\n int y = Integer.parseInt(tokens[i+1]);\n playerBoard[x][y] = 1;\n }\n }",
"private void getStartGameDataFromServer()\r\n\t{\r\n\t\t// Create data input and output streams\r\n\t\ttry {\r\n\r\n\t\t\t//Data stream to receive boolean flag for isFirstPlayer & rows/columns for the board\r\n\t\t\tDataInputStream startgameInputFromServer = new DataInputStream(\r\n\t\t\t\t\tsocket.getInputStream());\r\n\t\t\tisFirstPlayer = startgameInputFromServer.readBoolean();\r\n\t\t\tif(!isFirstPlayer)\r\n\t\t\t{\r\n\t\t\t\tnumOfBoardRows = startgameInputFromServer.read();\r\n\t\t\t\tnumOfBoardCols = startgameInputFromServer.read();\r\n\t\t\t}\r\n\r\n\t\t\t//Object stream to receive an array of StartLocation\r\n\t\t\tObjectInputStream startGameObjectInputFromServer = new ObjectInputStream(socket.getInputStream());\r\n\r\n\t\t\tavailableStartLocs = (ArrayList<StartLocation>) startGameObjectInputFromServer.readObject();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public static BoardLogic deserialiseGame(byte[] readData) {\n\n byte[] gridData = ArrayUtils.subarray(readData, 0, readData.length - 1);\n int guessCount = readData[readData.length - 1];\n\n int height = 0;\n int width = 0;\n for (byte b : gridData) {\n if (b == (byte) 0xff) {\n height++;\n } else if (height == 0) {\n width++;\n }\n }\n\n Square[][] grid = new Square[height][width];\n int mineCount = 0;\n int flagCount = 0;\n int y = 0;\n int x = 0;\n for (byte b : gridData) {\n if (b == (byte) 0xff) {\n y++;\n x = 0;\n } else {\n Square deserialised = Square.deserialise(b, y, x);\n grid[y][x] = deserialised;\n x++;\n if (deserialised.isMine) {\n mineCount++;\n }\n if (deserialised.isFlagged) {\n flagCount++;\n }\n }\n }\n \n BoardLogic output = new BoardLogic(height, width, mineCount, 1L);\n output.setGuessCount(guessCount);\n output.setFlagCount(flagCount);\n output.setRawGrid(grid);\n\n return output;\n\n }",
"private void updateRemoteScoreboard(Turn turn) {\n\n String display_string;\n\n TextView remotePlayerName = (TextView) findViewById(R.id.view_remote_player);\n remotePlayerName.setText(turn.getPlayerId());\n\n TextView[] textViews = {\n ((TextView) findViewById(R.id.view_first_remote_shot)),\n ((TextView) findViewById(R.id.view_second_remote_shot)),\n ((TextView) findViewById(R.id.view_third_remote_shot))\n };\n\n for (int i = 0; i < turn.getShotsPerTurn(); i++) {\n textViews[i].setText(\"[m][s]\");\n }\n\n for (int i = 0; i < turn.getShotsTaken(); i++) {\n display_string = String.valueOf(turn.getValues().get(i)) + \"\\n\" +\n String.valueOf(turn.getMods().get(i));\n textViews[i].setText(display_string);\n }\n doubles.setChecked(false);\n triples.setChecked(false);\n }",
"public void commWithServer() {\n\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tdo { // keep listening when message is empty\n\t\t\t\t\tserverMessage = socketIn.readLine(); // read response form the socket\n\t\t\t\t} while (serverMessage == \"\");\n\n\t\t\t\tif (serverMessage.contains(\"row 0\")) {\n\t\t\t\t\tr0c0.setText(Character.toString(serverMessage.charAt(13)));\n\t\t\t\t\tr0c1.setText(Character.toString(serverMessage.charAt(19)));\n\t\t\t\t\tr0c2.setText(Character.toString(serverMessage.charAt(25)));\n\t\t\t\t} else if (serverMessage.contains(\"row 1\")) {\n\t\t\t\t\tr1c0.setText(Character.toString(serverMessage.charAt(13)));\n\t\t\t\t\tr1c1.setText(Character.toString(serverMessage.charAt(19)));\n\t\t\t\t\tr1c2.setText(Character.toString(serverMessage.charAt(25)));\n\t\t\t\t} else if (serverMessage.contains(\"row 2\")) {\n\t\t\t\t\tr2c0.setText(Character.toString(serverMessage.charAt(13)));\n\t\t\t\t\tr2c1.setText(Character.toString(serverMessage.charAt(19)));\n\t\t\t\t\tr2c2.setText(Character.toString(serverMessage.charAt(25)));\n\t\t\t\t}\n\n\t\t\t\t// cases other than displaying board\n\t\t\t\tif (serverMessage.contains(\"X\")) {\n\t\t\t\t\tplayerMarkDisplay.setText(\"X\");\n\t\t\t\t} else if (serverMessage.contains(\"O\")) {\n\t\t\t\t\tplayerMarkDisplay.setText(\"O\");\n\t\t\t\t}\n\n\t\t\t\tif (serverMessage.contains(\"what row\")) {\n\t\t\t\t\tmessageDisplay.append(nameEntry.getText() + \", please make your move.\");\n\t\t\t\t\tserverMessage = \"\";\n\t\t\t\t} else if (serverMessage.contains(\"what column\")) {\n\t\t\t\t\tserverMessage = \"\";\n\t\t\t\t} else if (!serverMessage.contains(\"-\") && !serverMessage.contains(\"|\")) {\n\t\t\t\t\tmessageDisplay.append(serverMessage + \"\\n\");\n\t\t\t\t}\n\t\t\t\tserverMessage = \"\";\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"Client UI error: Failed to send/receive through socket.\");\n\t\t\t} // reading the input from the user (i.e. the keyboard);\n\n\t\t} while (!serverMessage.contains(\"THE GAME IS OVER\"));\n\t\tcloseSocket();\n\t}",
"@Test\n public void testGetBoardString() throws ParserException\n {\n System.out.println(\"getBoardString\");\n Game instance = new Game();\n String expResult = \"\";\n String[][] result = instance.getStringBoard();\n \n String toParse = \"MOVERESULT \" + StringUtil.getStringBoardString(result) + \" KITstudent\";\n \n String[][] afterParsing = ((MoveResult)Parser.parse(toParse)).getBoard();\n \n assertEquals(result, afterParsing);\n System.out.println(result);\n //assertEquals(expResult, result);\n }",
"void receiveRunningGameMessage(String fromPlayer, String msg) throws RpcException;",
"private static PacmanGame readGame(SmoothReader reader, PacmanBoard board)\n throws UnpackableException, IOException {\n\n var blockName = reader.readLine();\n if (!blockName.equals(\"[Game]\")) {\n throw new UnpackableException(\"Was expecting [Game] header\");\n }\n\n var assignments = readBlock(reader);\n if (!assignments.getKeys().equals(GAME_KEYS)) {\n throw new UnpackableException(\"Missing elements in game block.\");\n }\n\n // create the game\n var game = new PacmanGame(\n assignments.getValue(\"title\"),\n assignments.getValue(\"author\"),\n createHunter(assignments.getValue(\"hunter\"), board),\n board);\n\n for (var key : assignments.getKeys()) {\n switch (key) {\n case \"lives\":\n game.setLives(assignments.getNonNegativeInt(key));\n break;\n case \"level\":\n game.setLevel(assignments.getNonNegativeInt(key));\n break;\n case \"score\":\n game.getScores().increaseScore(\n assignments.getNonNegativeInt(key));\n break;\n case \"blinky\":\n case \"clyde\":\n case \"inky\":\n case \"pinky\":\n setGhost(game, key, assignments.getValue(key));\n break;\n default:\n break; // no need to do anything.\n }\n }\n\n return game;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'linearity' field. | public void setLinearity(java.lang.Integer value) {
this.linearity = value;
} | [
"public org.openrtb.common.api.Video.Builder setLinearity(java.lang.Integer value) {\n validate(fields()[1], value);\n this.linearity = value;\n fieldSetFlags()[1] = true;\n return this; \n }",
"public java.lang.Integer getLinearity() {\n return linearity;\n }",
"public java.lang.Integer getLinearity() {\n return linearity;\n }",
"@Override\n\tpublic void setLinearity(int[] setting)\n\t{\n\t\t// linear = 0\n\t\tthis.linearityX = setting[0];\n\t\tthis.linearityY = setting[1];\n\t\tthis.linearityZ = setting[2];\n\t\thasRan = true;\n\t}",
"private void setLocality(\n String value) {\n value.getClass();\n \n locality_ = value;\n }",
"public boolean hasLinearity() {\n return fieldSetFlags()[1];\n }",
"void setLocality(java.lang.String locality);",
"private synchronized void setLinearScale(double value) {\n\t\t\tlinearScale = value;\n\t\t}",
"@Override\r\n public void setLinear(Linear linear) {\r\n checkConstraint();\r\n AbstractLinearProblem.checkLinear(linear);\r\n\r\n int size = linear != null ? linear.size() : 0;\r\n SWIGTYPE_p_double coefs = GLPK.new_doubleArray(size + 1);\r\n SWIGTYPE_p_int cols = GLPK.new_intArray(size + 1);\r\n\r\n int idx = 0;\r\n if (linear != null) {\r\n for (Term term : linear) {\r\n idx++;\r\n // Sets the coefficient value\r\n GLPK.doubleArray_setitem(coefs, idx, term.getCoefficient().doubleValue());\r\n // Sets the columns index\r\n GLPK.intArray_setitem(cols, idx, ((GLPKVariable) term.getVariable()).col);\r\n }\r\n }\r\n\r\n // Sets the row matrix\r\n GLPK.glp_set_mat_row(this.parent.lp, this.row, size, cols, coefs);\r\n }",
"public void setRssiLinearSolverUsed(final boolean useRssiLinearSolver)\n throws LockedException {\n if (isLocked()) {\n throw new LockedException();\n }\n mUseRssiLinearSolver = useRssiLinearSolver;\n }",
"void setCriticality(org.hl7.fhir.Criticality criticality);",
"public org.openrtb.common.api.Video.Builder clearLinearity() {\n linearity = null;\n fieldSetFlags()[1] = false;\n return this;\n }",
"public void setLinear(Vector2D<?, ?> linear) {\n\t\tassert linear != null : AssertMessages.notNullParameter();\n\t\tthis.linear.set(linear);\n\t}",
"public void setCriticalityLevel(long value) {\n this.criticalityLevel = value;\n }",
"public void setLinear(AgentMotion motionToCopy) {\n\t\tassert motionToCopy != null : AssertMessages.notNullParameter();\n\t\tthis.linear.set(motionToCopy.getLinear());\n\t}",
"public void setLocality(String locality) {\r\n\t\tthis.locality = locality == null ? null : locality.trim();\r\n\t}",
"public void setLinear(double dx, double dy) {\n\t\tthis.linear.set(dx, dy);\n\t}",
"public void setCriticality(Integer criticality) {\n this.criticality = criticality;\n }",
"public void setRangingLinearSolverUsed(final boolean useRangingLinearSolver)\n throws LockedException {\n if (isLocked()) {\n throw new LockedException();\n }\n mUseRangingLinearSolver = useRangingLinearSolver;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Creates a new ranking with 10 entries | public Ranking() {
this.rankingSize = 10;
this.rankingMap = new LinkedHashMap<String, Integer>();
this.minimumScore = 0;
} | [
"private void updateRanking() {\n String rank = \"99\";\n String name = \"John Doe\";\n String co = \"0\";\n String pc = \"0\";\n String pb = \"99\";\n\n for (int row = 0; row < database.getRankingTableSize(); row++) {\n //TODO: extract data\n database.getRowRanking(row);\n\n addRow(rank, name, co, pc, pb);\n }\n }",
"public Ranking(int size) {\n this.rankingSize = size;\n this.rankingMap = new LinkedHashMap<String, Integer>();\n this.minimumScore = 0;\n }",
"void addRank(Object newRank);",
"public static void createPageRanks()\n\t{\n\t\tlist = new ArrayList<pageRank>(30);\n\t\tfor (int i = 0; i < 30; i++)\n\t\t{\n\t\t\tpage = new pageRank();\n\t\t\tlist.add(page);\n\t\t}\n\t}",
"private CSAskRankingList() {}",
"public void insertNewResult(Record rank) {\n listRank.add(rank);\n Collections.sort(listRank, Collections.reverseOrder());\n jlistRank.setListData(listRank.toArray());\n }",
"Rank(int value) {\n this.value = value;\n }",
"public void setRank(int value);",
"public void setRank(int rank) {\n this.rank = rank;\n }",
"Rank(int value) {\r\n this.value = value;\r\n }",
"public void setRank(int value) {\n this.rank = value;\n }",
"public void increaseRank()\n {\n rank++;\n }",
"public void setRank(Integer rank){\r\n\t\tthis.rank = rank;\r\n\t}",
"public void setRank(int newRank) {\t \r\n \t\tthis.rank = newRank;\r\n }",
"private void setRank(int rank) {\r\n\r\n this.rank = rank;\r\n }",
"public void setRanking (LSPRanking ranking) {\r\n this.ranking = ranking;\r\n }",
"private SCAskRankingListRet() {}",
"private void createRankingBehaviour(){\r\n // crea la mappa dei behaviour e setta a zero i punteggi\r\n behaviourRank = new HashMap<>();\r\n behaviourRank.put(\"trojan\",0);\r\n behaviourRank.put(\"worm\",0);\r\n behaviourRank.put(\"backdoor\",0);\r\n behaviourRank.put(\"virus\",0);\r\n behaviourRank.put(\"rootkit\",0);\r\n }",
"public static void initializeRanking(){\n\t\tdouble initialRank = 1;\n\t\tfor(String key :baseSet){\n\t\t\tif(outLinks.containsKey(key))\n\t\t\t{\n\t\t\t\tauthScore.put(key, initialRank);\n\t\t\t\thubScore.put(key, initialRank);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tauthScore.put(key, 0.0);\n\t\t\t\thubScore.put(key, 0.0);\n\t\t\t}\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set the main shell icon to its default | public void resetShellIcon() {
GDE.display.asyncExec(new Runnable() {
public void run() {
GDE.shell.setImage(SWTResourceManager.getImage(GDE.IS_MAC ? "gde/resource/DataExplorer_MAC.png" : "gde/resource/DataExplorer.png")); //$NON-NLS-1$ //$NON-NLS-2$
}
});
} | [
"public void setDefaultIcon (int resource){\r\n\t\tmDefaultIcon = resource;\r\n\t}",
"public void setMainIcon(IconReference ref);",
"WindowShell setIcon(String file);",
"public void setIcon(String defaultIcon)\n {\n myButton.setIcon(getIcon(defaultIcon));\n }",
"public void clearMainIcon();",
"public void setOpenIcon(Icon icon);",
"public void setWindowIcon(final Image icon) {\n if (getIconImage() != icon) {\n setIconImage(icon);\n }\n }",
"private void setupApplicationIcon ()\r\n\t{\r\n\t\tBufferedImage applicationIcon = null;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tapplicationIcon = FileLoadingUtility.loadBufferedImage (APPLICATION_ICON_PATH);\r\n\t\t}\r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace ();\r\n\t\t}\r\n\r\n\t\tsuper.setIconImage (applicationIcon);\r\n\t}",
"public void setNormalIcon(Icon normal) {\n\t\tmouseHoverAwareAction.setNormalIcon(normal);\n\t}",
"private void defaultButtonActivated()\n {\n PreferencesController.getInstance().setToDefaultSettings();\n ThemeHelper.setTheme(PreferencesController.getInstance().getThemeSetting());\n MainWindowController.getInstance().themeHasChanged();\n MainWindowController.getInstance().setKeyToggle();\n CanvasController.getInstance().toggleAntiAliasing();\n PreferencesController.getInstance().setStartupFileNameSetting(DefaultSettings.DEFAULT_FILE_NAME);\n PreferencesController.getInstance().setStartupFilePathSetting(GlobalValue.DEFAULT_BIN_RESOURCE);\n setToCurrentSettings();\n hideWindow();\n }",
"protected void updateSystemIcon() {\r\n\t\tWindow window = this.getWindow();\r\n\t\tif (window == null) {\r\n\t\t\tthis.systemIcon = null;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tjava.util.List<Image> icons = window.getIconImages();\r\n\t\tassert icons != null;\r\n\r\n\t\tif (icons.size() == 0) {\r\n\t\t\tthis.systemIcon = null;\r\n\t\t} else if (icons.size() == 1) {\r\n\t\t\tthis.systemIcon = icons.get(0);\r\n\t\t} else {\r\n\t\t\tthis.systemIcon = SunToolkit.getScaledIconImage(icons, OntimizeTitlePane.IMAGE_WIDTH, OntimizeTitlePane.IMAGE_HEIGHT);\r\n\t\t}\r\n\t}",
"private void loadAndSetIcon()\n\t{\t\t\n\t\ttry\n\t\t{\n\t\t\twindowIcon = ImageIO.read (getClass().getResource (\"calculator.png\"));\n\t\t\tsetIconImage(windowIcon);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\t\t\n\t}",
"public void setClosedIcon(Icon icon);",
"public void setDefaultPath(String defaultCmdPath, String defaultIconPath){\n\t\tthis.setDefaultPath(defaultCmdPath, defaultIconPath, defaultIconPath);\n\t}",
"public void setTabIcon(ImageIcon icon);",
"public void setIcon(String value) {\n icon = value;\n }",
"void setIconDarkModePath(String iconPath);",
"public void setTitleIcon( Icon icon ){\n\t\tstation.setTitleIcon( icon );\n\t}",
"public void setRandomCurrentIcon() {\n setCurrentIcon(Utilities.randomInt(1, CODE_RANGE));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Funcion que carga las ofertas para este panel aniadiendolas al contenedor | public void cargarOfertas() {
coi.clearOfertas();
Controller c = gui.getController();
List<Integer> ofertas = c.ofertanteGetMisOfertas();
for (Integer id : ofertas) {
String estado = c.ofertaGetEstado(id);
if (estado.equals(GuiConstants.ESTADO_ACEPTADA) || estado.equals(GuiConstants.ESTADO_CONTRATADA)
|| estado.equals(GuiConstants.ESTADO_RESERVADA)) {
PanelOferta oferta = new PanelOferta(gui, id);
coi.addActiva(oferta);
} else if (estado.equals(GuiConstants.ESTADO_PENDIENTE) || estado.equals(GuiConstants.ESTADO_PENDIENTE)) {
PanelOferta oferta = new PanelOfertaEditable(gui, id);
coi.addPendiente(oferta);
} else if (estado.equals(GuiConstants.ESTADO_RETIRADA)) {
PanelOferta oferta = new PanelOferta(gui, id);
coi.addRechazada(oferta);
}
}
coi.repaint();
SwingUtilities.invokeLater(new Runnable() {
public void run() {
scrollPane.getHorizontalScrollBar().setValue(0);
scrollPane.getVerticalScrollBar().setValue(0);
}
});
} | [
"public void iniciarComponentes(){\n\n crearPanel();\n colocarBotones();\n \n }",
"public PanelInformesYEstadisticas() {\r\n\t\tinitComponents();\r\n\t\t//Util.personaSinResultados(lbSinResultados, true);\r\n\t}",
"private void cargarTablaDivisas() {\n\n //REINICIALIZAR TODA LA INFORMACIÓN QUE PUEDA ALBERGAR\n tvDivisas.getItems().clear();\n tvDivisas.getColumns().clear();\n\n //GENERO UNA LISTA OBSERVABLE TIPEADA CON \"DIVISA\"\n ObservableList<Divisa> data = FXCollections.observableArrayList(tbldivisaadapter.Select());\n\n //AGREGO LA COLUMNA QUE NECESITO A LA TABLA\n tvDivisas.getColumns().addAll(colNombre);\n tvDivisas.getColumns().addAll(colValor);\n\n //AGREGO LOS ITEMS DE LA LISTA OBSERVABLE\n tvDivisas.setItems(data);\n\n }",
"public boolean agregarAInventario(PanelInventariar panelInventariar) {\r\n try {\r\n IntAdmInventario admInventario = new FacAdmInventario();\r\n List<PanelModelo> listaPanelTest = panelInventariar.getListaPanelTest();\r\n\r\n /**\r\n * Como un PanelInventariar puede contener 1 o mas PanelText, usamos\r\n * un for para obtener la informacion de cada uno de los PanelTest\r\n */\r\n for (int i = 0; i < listaPanelTest.size(); i++) {\r\n PanelModelo panelTest = listaPanelTest.get(i);\r\n Modelo modelo = new Modelo();\r\n Talla talla = new Talla();\r\n \r\n /**\r\n * Esto sirve para verificar que los campos no esten vacios. En\r\n * dado caso de que si esten, no se conectara a la base de datos\r\n * hasta que se encuentre un modelo que si tenga los datos\r\n * completos.\r\n */\r\n if (!panelTest.getModelo().isEmpty() && !String.valueOf(panelTest.getPrecio()).isEmpty()) {\r\n if (panelTest.getPrecio() <= 0) {\r\n JOptionPane.showMessageDialog(null, \"El precio para el modelo: \" + panelTest.getModelo() + \"\\n\"\r\n + \"Es negativo, cheque bien los datos.\");\r\n return false;\r\n }\r\n\r\n modelo.setIdModelo(Integer.toString(admInventario.obtenListaModelos().size()));\r\n modelo.setNombre(panelTest.getModelo());\r\n modelo.setPrecio(panelTest.getPrecio());\r\n modelo.setNoCodigoDeBarras(String.valueOf(obtenModelos().size()));\r\n \r\n List<String> listaCantidades = new ArrayList();\r\n List<String> listaTallas = new ArrayList();\r\n\r\n for(PanelTalla panel : panelTest.getPanelesTalla()){\r\n listaTallas.add(panel.getTalla());\r\n listaCantidades.add(panel.getCantidad());\r\n }\r\n \r\n int idTalla = admInventario.obtenListaTallas().size();\r\n \r\n List<Talla> tallasAgregar = new ArrayList();\r\n /**\r\n * Igual aqui tenemos que checar que las cantidades de talla\r\n * y producto no esten vacios.\r\n */\r\n if (!listaCantidades.isEmpty() && !listaTallas.isEmpty()) {\r\n /**\r\n * Con este for sacamos los datos de las listas y los\r\n * metemos a un objeto de tipo Talla. El cual despues\r\n * pasara a ser agregado a la Base de datos.\r\n */\r\n for (int j = 0; j < listaCantidades.size(); j++) {\r\n if (!String.valueOf(listaCantidades.get(j)).isEmpty()) {\r\n if (Integer.parseInt(listaCantidades.get(j)) > 0) {\r\n talla.setIdModelo(modelo);\r\n talla.setIdTalla(Integer.toString(idTalla));\r\n talla.setTalla(listaTallas.get(j));\r\n talla.setInventarioRegular(new Integer(listaCantidades.get(j)));\r\n talla.setInventarioApartado(0);\r\n \r\n \r\n admInventario.agregarProductoAInventario(talla);\r\n //Aun no sabemos si los datos son validos.\r\n //A lo ultimo agregarmos todas las tallas creadas al inventario.\r\n tallasAgregar.add(talla);\r\n \r\n idTalla++;\r\n } else if (Integer.parseInt(listaCantidades.get(j)) < 0) {\r\n JOptionPane.showMessageDialog(null, \"Una de las cantidades es negativa.\\n\"\r\n + \"Modelo: \" + modelo.getNombre() + \"\\n\");\r\n return false;\r\n }\r\n } else {\r\n JOptionPane.showMessageDialog(null, \"La cantidad no puede estar vacia\");\r\n return false;\r\n }\r\n }\r\n\r\n } else {\r\n JOptionPane.showMessageDialog(null, \"Indique la cantidad de talla y producto\");\r\n return false;\r\n }\r\n } else {\r\n JOptionPane.showMessageDialog(null, \"El nombre y precio del modelo no puede estar vacio.\");\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return false;\r\n }",
"private void setBuscarServicio() {\n String[] datos = ctr_nombramiento.getDatosServicio(fecha);\n if (datos != null) {\n this.btn_buscar.setEnabled(false);\n JPanel pn_turno_linea, pn_horario, pn_nota, pn_puesto_descripcion;\n String[] datos_servicio;\n boolean turno = false;\n\n if (datos[0] != null && datos[1] != null) {\n //mostrar datos turno y linea\n pn_turno_linea = pn_nombramiento.getPnTurnoLinea(false, false);\n pn_nombramiento.setTxtTurno(datos[0]);\n pn_nombramiento.setTxtLinea(datos[1]);\n datos_servicio = ctr_nombramiento.getDatosTurno(fecha, datos[0], datos[1]);\n turno = true;\n super.pn_center.add(pn_turno_linea);\n } else {\n //mostrar datos otro servicio\n pn_puesto_descripcion = pn_nombramiento.getPnPuestoDescripcion(false);\n pn_nombramiento.setTxtPuesto(datos[2]);\n pn_nombramiento.setTxtDescripcion(datos[3]);\n datos_servicio = ctr_nombramiento.getDatosOtroServicio(fecha, datos[2]);\n turno = false;\n super.pn_center.add(pn_puesto_descripcion);\n }\n\n pn_horario = pn_nombramiento.getPnHorario(false, turno);\n if (datos_servicio != null) {\n setDatosHorario(datos_servicio);\n }\n\n pn_nota = pn_nombramiento.getPnNota(false);\n pn_nombramiento.setTxtNota(datos[4]);\n\n //cargar paneles\n btn_crear.setEnabled(false);\n btn_editar.setEnabled(true);\n btn_eliminar.setEnabled(true);\n super.pn_center.add(pn_horario);\n super.pn_center.add(pn_nota);\n calendar.setEnabled(false);\n\n } else {\n super.setMensajeLbl(\"No existe servicio...\");\n }\n super.pn_center.updateUI();\n }",
"private void colocaComponentes() {\r\n\t\tJLabel lblId = new JLabel(\"Id\");\r\n\t\tlblId.setBounds(10, 11, 46, 14);\r\n\t\tadd(lblId);\r\n\t\t\r\n\t\tJLabel lblApellido = new JLabel(\"1er Apellido\");\r\n\t\tlblApellido.setBounds(168, 11, 131, 14);\r\n\t\tadd(lblApellido);\r\n\t\t\r\n\t\ttextId = new JTextField();\r\n\t\ttextId.setBounds(10, 36, 86, 20);\r\n\t\tadd(textId);\r\n\t\ttextId.setColumns(10);\r\n\t\t\r\n\t\ttextApellido = new JTextField();\r\n\t\ttextApellido.setBounds(168, 36, 118, 20);\r\n\t\tadd(textApellido);\r\n\t\ttextApellido.setColumns(10);\r\n\t\t\r\n\t\tbtnComprobar = new JButton(\"Comprobar\");\r\n\t\tbtnComprobar.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tconsultaDatos();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnComprobar.setBounds(10, 83, 362, 23);\r\n\t\tadd(btnComprobar);\r\n\t\t\r\n\t\ttextMensaje = new JTextField();\r\n\t\ttextMensaje.setEditable(false);\r\n\t\ttextMensaje.setBounds(10, 117, 362, 20);\r\n\t\tadd(textMensaje);\r\n\t\ttextMensaje.setColumns(10);\r\n\t\t\r\n\t\tbtnAtras = new JButton(\"Atras\");\r\n\t\tbtnAtras.setBounds(10, 254, 89, 23);\r\n\t\tadd(btnAtras);\r\n\t\tbtnAtras.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tcambiaPanelAnterior();\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"void DatosEstadisticos() { \r\n \r\n /* Datos Estadisticos Lado Izquierdo */\r\n \r\n /* Dato 01 Titulo Primere Estancia en el Hotel */\r\n Label iTDatoInfo01 = new Label();\r\n iTDatoInfo01.setWidth(\"215px\");\r\n iTDatoInfo01.setHeight(\"19px\");\r\n iTDatoInfo01.setStyleName(EstiloCSS + \"LabelTituloDatoInfo\");\r\n iTDatoInfo01.setValue(\"Primere Estancia en el Hotel\");\r\n layout.addComponent(iTDatoInfo01, \"left: 0px; top: 140px;\"); \r\n \r\n /* PrimaraEstancia */\r\n Label iDatoInfo01 = new Label();\r\n iDatoInfo01.setWidth(\"215px\");\r\n iDatoInfo01.setHeight(\"33px\");\r\n iDatoInfo01.setStyleName(EstiloCSS + \"LabelDatoInfo\");\r\n iDatoInfo01.setValue(TblEstadisticasHuesped.getPrimaraEstancia());\r\n layout.addComponent(iDatoInfo01, \"left: 0px; top: 158px;\"); \r\n \r\n /* Boton Dato 01 */\r\n Button iBtoDatoInfo01 = new Button();\r\n iBtoDatoInfo01.setWidth(\"35px\");\r\n iBtoDatoInfo01.setHeight(\"33px\");\r\n iBtoDatoInfo01.setStyleName(EstiloCSS + \"BotonDatoInfo\");\r\n layout.addComponent(iBtoDatoInfo01, \"left: 234px; top: 158px;\");\r\n\r\n \r\n \r\n \r\n /* Dato 02 Titulo Ultima Estancia en el Hotel */\r\n Label iTDatoInfo02 = new Label();\r\n iTDatoInfo02.setWidth(\"215px\");\r\n iTDatoInfo02.setHeight(\"19px\");\r\n iTDatoInfo02.setStyleName(EstiloCSS + \"LabelTituloDatoInfo\");\r\n iTDatoInfo02.setValue(\"Ultima Estancia en el Hotel\");\r\n layout.addComponent(iTDatoInfo02, \"left: 0px; top: 190px;\"); \r\n \r\n /* UltimaEstancia */\r\n Label iDatoInfo02 = new Label();\r\n iDatoInfo02.setWidth(\"215px\");\r\n iDatoInfo02.setHeight(\"33px\");\r\n iDatoInfo02.setStyleName(EstiloCSS + \"LabelDatoInfo\");\r\n iDatoInfo02.setValue(TblEstadisticasHuesped.getUltimaEstancia());\r\n layout.addComponent(iDatoInfo02, \"left: 0px; top: 208px;\"); \r\n \r\n /* Boton Dato 02 */\r\n Button iBtoDatoInfo02 = new Button();\r\n iBtoDatoInfo02.setWidth(\"35px\");\r\n iBtoDatoInfo02.setHeight(\"33px\");\r\n iBtoDatoInfo02.setStyleName(EstiloCSS + \"BotonDatoInfo\");\r\n layout.addComponent(iBtoDatoInfo02, \"left: 234px; top: 208px;\"); \r\n \r\n\r\n \r\n \r\n /* Dato 03 Titulo Tiempo Desde La Ultima Vez */\r\n Label iTDatoInfo03 = new Label();\r\n iTDatoInfo03.setWidth(\"215px\");\r\n iTDatoInfo03.setHeight(\"19px\");\r\n iTDatoInfo03.setStyleName(EstiloCSS + \"LabelTituloDatoInfo\");\r\n iTDatoInfo03.setValue(\"Ultima Estancia en el Hotel\");\r\n layout.addComponent(iTDatoInfo03, \"left: 0px; top: 240px;\"); \r\n \r\n /* PrimaraEstancia */\r\n Label iDatoInfo03 = new Label();\r\n iDatoInfo03.setWidth(\"215px\");\r\n iDatoInfo03.setHeight(\"33px\");\r\n iDatoInfo03.setStyleName(EstiloCSS + \"LabelDatoInfo\");\r\n iDatoInfo03.setValue(TblEstadisticasHuesped.getTiempoUltimaEstancia());\r\n layout.addComponent(iDatoInfo03, \"left: 0px; top: 258px;\"); \r\n \r\n /* Boton Dato */\r\n Button iBtoDatoInfo03 = new Button();\r\n iBtoDatoInfo03.setWidth(\"35px\");\r\n iBtoDatoInfo03.setHeight(\"33px\");\r\n iBtoDatoInfo03.setStyleName(EstiloCSS + \"BotonDatoInfo\");\r\n layout.addComponent(iBtoDatoInfo03, \"left: 234px; top: 258px;\"); \r\n\r\n \r\n \r\n \r\n /* Dato 04 Titulo Cuntas Veces Hospedado */\r\n Label iTDatoInfo04 = new Label();\r\n iTDatoInfo04.setWidth(\"215px\");\r\n iTDatoInfo04.setHeight(\"19px\");\r\n iTDatoInfo04.setStyleName(EstiloCSS + \"LabelTituloDatoInfo\");\r\n iTDatoInfo04.setValue(\"Cuntas Veces Hospedado\");\r\n layout.addComponent(iTDatoInfo04, \"left: 0px; top: 290px;\"); \r\n \r\n /* PrimaraEstancia */\r\n Label iDatoInfo04 = new Label();\r\n iDatoInfo04.setWidth(\"215px\");\r\n iDatoInfo04.setHeight(\"33px\");\r\n iDatoInfo04.setStyleName(EstiloCSS + \"LabelDatoInfo\");\r\n iDatoInfo04.setValue(TblEstadisticasHuesped.getCuantosHospedajes());\r\n layout.addComponent(iDatoInfo04, \"left: 0px; top: 308px;\"); \r\n \r\n /* Boton Dato */\r\n Button iBtoDatoInfo04 = new Button();\r\n iBtoDatoInfo04.setWidth(\"35px\");\r\n iBtoDatoInfo04.setHeight(\"33px\");\r\n iBtoDatoInfo04.setStyleName(EstiloCSS + \"BotonDatoInfo\");\r\n layout.addComponent(iBtoDatoInfo04, \"left: 234px; top: 308px;\"); \r\n \r\n \r\n \r\n \r\n /* Dato 05 Titulo Media de dia x Estancia */\r\n Label iTDatoInfo05 = new Label();\r\n iTDatoInfo05.setWidth(\"215px\");\r\n iTDatoInfo05.setHeight(\"19px\");\r\n iTDatoInfo05.setStyleName(EstiloCSS + \"LabelTituloDatoInfo\");\r\n iTDatoInfo05.setValue(\"Cuntas Veces Hospedado\");\r\n layout.addComponent(iTDatoInfo05, \"left: 0px; top: 340px;\"); \r\n \r\n /* MediaDiaEstancia */\r\n Label iDatoInfo05 = new Label();\r\n iDatoInfo05.setWidth(\"215px\");\r\n iDatoInfo05.setHeight(\"33px\");\r\n iDatoInfo05.setStyleName(EstiloCSS + \"LabelDatoInfo\");\r\n iDatoInfo05.setValue(TblEstadisticasHuesped.getMediaDiaEstancia());\r\n layout.addComponent(iDatoInfo05, \"left: 0px; top: 358px;\"); \r\n \r\n /* Boton Dato */\r\n Button iBtoDatoInfo05 = new Button();\r\n iBtoDatoInfo05.setWidth(\"35px\");\r\n iBtoDatoInfo05.setHeight(\"33px\");\r\n iBtoDatoInfo05.setStyleName(EstiloCSS + \"BotonDatoInfo\");\r\n layout.addComponent(iBtoDatoInfo05, \"left: 234px; top: 358px;\"); \r\n \r\n \r\n \r\n\r\n /* Dato 06 Titulo Reservas u Otras Anladas */\r\n Label iTDatoInfo06 = new Label();\r\n iTDatoInfo06.setWidth(\"215px\");\r\n iTDatoInfo06.setHeight(\"19px\");\r\n iTDatoInfo06.setStyleName(EstiloCSS + \"LabelTituloDatoInfo\");\r\n iTDatoInfo06.setValue(\"Reservas u Otras Anladas\");\r\n layout.addComponent(iTDatoInfo06, \"left: 0px; top: 390px;\"); \r\n \r\n /* ReservasAnuladas */\r\n Label iDatoInfo06 = new Label();\r\n iDatoInfo06.setWidth(\"215px\");\r\n iDatoInfo06.setHeight(\"33px\");\r\n iDatoInfo06.setStyleName(EstiloCSS + \"LabelDatoInfo\");\r\n iDatoInfo06.setValue(TblEstadisticasHuesped.getReservasAnuladas());\r\n layout.addComponent(iDatoInfo06, \"left: 0px; top: 408px;\"); \r\n \r\n /* Boton Dato */\r\n Button iBtoDatoInfo06 = new Button();\r\n iBtoDatoInfo06.setWidth(\"35px\");\r\n iBtoDatoInfo06.setHeight(\"33px\");\r\n iBtoDatoInfo06.setStyleName(EstiloCSS + \"BotonDatoInfo\");\r\n layout.addComponent(iBtoDatoInfo06, \"left: 234px; top: 408px;\"); \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n /* Datos Estadisticos Lado Derecha */\r\n \r\n /* Dato 01 Titulo Fecha de compeaños */\r\n Label dTDatoInfo01 = new Label();\r\n dTDatoInfo01.setWidth(\"215px\");\r\n dTDatoInfo01.setHeight(\"19px\");\r\n dTDatoInfo01.setStyleName(EstiloCSS + \"LabelTituloDatoInfo\");\r\n dTDatoInfo01.setValue(\"Fecha de Su Cumpleaños\");\r\n layout.addComponent(dTDatoInfo01, \"left: 808px; top: 140px;\"); \r\n \r\n /* PrimaraEstancia */\r\n Label dDatoInfo01 = new Label();\r\n dDatoInfo01.setWidth(\"215px\");\r\n dDatoInfo01.setHeight(\"33px\");\r\n dDatoInfo01.setStyleName(EstiloCSS + \"LabelDatoInfo\");\r\n dDatoInfo01.setValue(TblEstadisticasHuesped.getFechaCumpleanos());\r\n layout.addComponent(dDatoInfo01, \"left: 808px; top: 158px;\"); \r\n \r\n /* Boton Dato 01 */\r\n Button dBtoDatoInfo01 = new Button();\r\n dBtoDatoInfo01.setWidth(\"35px\");\r\n dBtoDatoInfo01.setHeight(\"33px\");\r\n dBtoDatoInfo01.setStyleName(EstiloCSS + \"BotonDatoInfo\");\r\n layout.addComponent(dBtoDatoInfo01, \"left: 753px; top: 158px;\");\r\n\r\n \r\n \r\n \r\n /* Dato 02 Titulo Pais de Origen */\r\n Label dTDatoInfo02 = new Label();\r\n dTDatoInfo02.setWidth(\"215px\");\r\n dTDatoInfo02.setHeight(\"19px\");\r\n dTDatoInfo02.setStyleName(EstiloCSS + \"LabelTituloDatoInfo\");\r\n dTDatoInfo02.setValue(\"Pais de Origen\");\r\n layout.addComponent(dTDatoInfo02, \"left: 808px; top: 190px;\"); \r\n \r\n /* UltimaEstancia */\r\n Label dDatoInfo02 = new Label();\r\n dDatoInfo02.setWidth(\"215px\");\r\n dDatoInfo02.setHeight(\"33px\");\r\n dDatoInfo02.setStyleName(EstiloCSS + \"LabelDatoInfo\");\r\n dDatoInfo02.setValue(TblEstadisticasHuesped.getPaisOrigen());\r\n layout.addComponent(dDatoInfo02, \"left: 808px; top: 208px;\"); \r\n \r\n /* Boton Dato 02 */\r\n Button dBtoDatoInfo02 = new Button();\r\n dBtoDatoInfo02.setWidth(\"35px\");\r\n dBtoDatoInfo02.setHeight(\"33px\");\r\n dBtoDatoInfo02.setStyleName(EstiloCSS + \"BotonDatoInfo\");\r\n layout.addComponent(dBtoDatoInfo02, \"left: 753px; top: 208px;\"); \r\n \r\n\r\n \r\n \r\n /* Dato 03 Titulo Ciudad de Residencia */\r\n Label dTDatoInfo03 = new Label();\r\n dTDatoInfo03.setWidth(\"215px\");\r\n dTDatoInfo03.setHeight(\"19px\");\r\n dTDatoInfo03.setStyleName(EstiloCSS + \"LabelTituloDatoInfo\");\r\n dTDatoInfo03.setValue(\"Ciudad de Residencia\");\r\n layout.addComponent(dTDatoInfo03, \"left: 808px; top: 240px;\"); \r\n \r\n /* PrimaraEstancia */\r\n Label dDatoInfo03 = new Label();\r\n dDatoInfo03.setWidth(\"215px\");\r\n dDatoInfo03.setHeight(\"33px\");\r\n dDatoInfo03.setStyleName(EstiloCSS + \"LabelDatoInfo\");\r\n dDatoInfo03.setValue(TblEstadisticasHuesped.getCiudadRecidencia());\r\n layout.addComponent(dDatoInfo03, \"left: 808px; top: 258px;\"); \r\n \r\n /* Boton Dato */\r\n Button dBtoDatoInfo03 = new Button();\r\n dBtoDatoInfo03.setWidth(\"35px\");\r\n dBtoDatoInfo03.setHeight(\"33px\");\r\n dBtoDatoInfo03.setStyleName(EstiloCSS + \"BotonDatoInfo\");\r\n layout.addComponent(dBtoDatoInfo03, \"left: 753px; top: 258px;\"); \r\n\r\n \r\n \r\n \r\n /* Dato 04 Titulo Acompañado por */\r\n Label dTDatoInfo04 = new Label();\r\n dTDatoInfo04.setWidth(\"215px\");\r\n dTDatoInfo04.setHeight(\"19px\");\r\n dTDatoInfo04.setStyleName(EstiloCSS + \"LabelTituloDatoInfo\");\r\n dTDatoInfo04.setValue(\"Acompañado Por ?\");\r\n layout.addComponent(dTDatoInfo04, \"left: 808px; top: 290px;\"); \r\n \r\n /* PrimaraEstancia */\r\n Label dDatoInfo04 = new Label();\r\n dDatoInfo04.setWidth(\"215px\");\r\n dDatoInfo04.setHeight(\"33px\");\r\n dDatoInfo04.setStyleName(EstiloCSS + \"LabelDatoInfo\");\r\n dDatoInfo04.setValue(TblEstadisticasHuesped.getAcompanante());\r\n layout.addComponent(dDatoInfo04, \"left: 808px; top: 308px;\"); \r\n \r\n /* Boton Dato */\r\n Button dBtoDatoInfo04 = new Button();\r\n dBtoDatoInfo04.setWidth(\"35px\");\r\n dBtoDatoInfo04.setHeight(\"33px\");\r\n dBtoDatoInfo04.setStyleName(EstiloCSS + \"BotonDatoInfo\");\r\n layout.addComponent(dBtoDatoInfo04, \"left: 753px; top: 308px;\"); \r\n \r\n \r\n \r\n \r\n /* Dato 05 Titulo Tenemos su Whatsapp */\r\n Label dTDatoInfo05 = new Label();\r\n dTDatoInfo05.setWidth(\"215px\");\r\n dTDatoInfo05.setHeight(\"19px\");\r\n dTDatoInfo05.setStyleName(EstiloCSS + \"LabelTituloDatoInfo\");\r\n dTDatoInfo05.setValue(\"Tenemos Su Whatsapp\");\r\n layout.addComponent(dTDatoInfo05, \"left: 808px; top: 340px;\"); \r\n \r\n /* MediaDiaEstancia */\r\n Label dDatoInfo05 = new Label();\r\n dDatoInfo05.setWidth(\"215px\");\r\n dDatoInfo05.setHeight(\"33px\");\r\n dDatoInfo05.setStyleName(EstiloCSS + \"LabelDatoInfo\");\r\n dDatoInfo05.setValue(TblEstadisticasHuesped.getWhatsapp());\r\n layout.addComponent(dDatoInfo05, \"left: 808px; top: 358px;\"); \r\n \r\n /* Boton Dato */\r\n Button dBtoDatoInfo05 = new Button();\r\n dBtoDatoInfo05.setWidth(\"35px\");\r\n dBtoDatoInfo05.setHeight(\"33px\");\r\n dBtoDatoInfo05.setStyleName(EstiloCSS + \"BotonDatoInfo\");\r\n layout.addComponent(dBtoDatoInfo05, \"left: 753px; top: 358px;\"); \r\n \r\n \r\n \r\n\r\n /* Dato 06 Titulo Tenemos su Gmail */\r\n Label dTDatoInfo06 = new Label();\r\n dTDatoInfo06.setWidth(\"215px\");\r\n dTDatoInfo06.setHeight(\"19px\");\r\n dTDatoInfo06.setStyleName(EstiloCSS + \"LabelTituloDatoInfo\");\r\n dTDatoInfo06.setValue(\"Tenemos Su Gmail\");\r\n layout.addComponent(dTDatoInfo06, \"left: 808px; top: 390px;\"); \r\n \r\n /* ReservasAnuladas */\r\n Label dDatoInfo06 = new Label();\r\n dDatoInfo06.setWidth(\"215px\");\r\n dDatoInfo06.setHeight(\"33px\");\r\n dDatoInfo06.setStyleName(EstiloCSS + \"LabelDatoInfo\");\r\n dDatoInfo06.setValue(TblEstadisticasHuesped.getGmail());\r\n layout.addComponent(dDatoInfo06, \"left: 808px; top: 408px;\"); \r\n \r\n /* Boton Dato */\r\n Button dBtoDatoInfo06 = new Button();\r\n dBtoDatoInfo06.setWidth(\"35px\");\r\n dBtoDatoInfo06.setHeight(\"33px\");\r\n dBtoDatoInfo06.setStyleName(EstiloCSS + \"BotonDatoInfo\");\r\n layout.addComponent(dBtoDatoInfo06, \"left: 753px; top: 408px;\"); \r\n \r\n \r\n }",
"public void generarOfertas(){\r\n listaOfertas = ofertaBean.obtenerOfertas();\r\n }",
"private void cargarNotasEnfermeria() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"admision_seleccionada\", admision_seleccionada);\r\n\t\tparametros.put(\"rol_medico\", \"S\");\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\"/pages/notas_enfermeria.zul\", \"NOTAS DE ENFERMERIA\",\r\n\t\t\t\tparametros);\r\n\t}",
"private void iniciaComponets() {\n String[] arr = man.getNamesCalendar(Calendar.DAY_OF_WEEK, Calendar.SHORT);\n for (int i = 0; i < arr.length; i++) {\n JCheckBox name = (JCheckBox) jPanelSemanal.getComponent(i);\n name.setText(arr[i]);\n }\n // el panel mensual\n // pongo los numeros de los dias de la semana (primerom, segundo...)\n jComboBoxNumDiaSem.removeAllItems();\n for (NumDiaDeSemana dia : NumDiaDeSemana.values()) {\n jComboBoxNumDiaSem.addItem(dia);\n }\n jComboBoxDiaSem.removeAllItems();\n String[] arr1 = man.getNamesCalendar(Calendar.DAY_OF_WEEK, Calendar.LONG);\n for (String i : arr1) {\n jComboBoxDiaSem.addItem(i);\n }\n //panel anual\n jComboBoxAnualNumDia.removeAllItems();\n for (NumDiaDeSemana dia : NumDiaDeSemana.values()) {\n jComboBoxAnualNumDia.addItem(dia);\n }\n // pongo los dias de la semana en los JCheckBox\n jComboBoxAnualDiaSem.removeAllItems();\n arr1 = man.getNamesCalendar(Calendar.DAY_OF_WEEK, Calendar.LONG);\n for (String i : arr1) {\n jComboBoxAnualDiaSem.addItem(i);\n }\n\n }",
"private void cargarDatosAdicionales()\n {\n if(notaCredito.getDatosAdicionales()!=null)\n notaCredito.getDatosAdicionales().clear();\n \n List<FacturaAdicional> datosAdicional=notaCredito.getFactura().getDatosAdicionales();\n if(datosAdicional!=null)\n {\n List<NotaCreditoAdicional> datosAdicionalNotaCredito=new ArrayList<NotaCreditoAdicional>();\n for (FacturaAdicional facturaDetalle : datosAdicional) {\n NotaCreditoAdicional notaCreditoAdicional=new NotaCreditoAdicional();\n notaCreditoAdicional.setCampo(facturaDetalle.getCampo());\n notaCreditoAdicional.setNotaCredito(notaCredito);\n notaCreditoAdicional.setNumero(facturaDetalle.getNumero());\n notaCreditoAdicional.setTipo(facturaDetalle.getTipo());\n notaCreditoAdicional.setValor(facturaDetalle.getValor());\n datosAdicionalNotaCredito.add(notaCreditoAdicional);\n }\n notaCredito.setDatosAdicionales(datosAdicionalNotaCredito);\n }\n\n }",
"private void setearDatosEnLosCampos(){ \n this.campoTexto_NombreProyecto.setText(this.proyecto.obtenerNombre()); \n this.areaTexto_DescripcionProyecto.setText(this.proyecto.obtenerDescripcion());\n this.campoTexto_CantidadTareas.setText(String.valueOf(this.proyecto.obtenerRedDeTareas().obtenerCantidadDeTareas())); \n this.campoTexto_UnidadDeTiempo.setText(this.proyecto.obtenerUnidadDeTiempo());\n int fila = 0;\n for (Tarea tarea : this.proyecto.obtenerRedDeTareas().obtenerTareas()){\n actualizarTablaDeTareas(fila, Accion.crear, tarea);\n fila += 1;\n }\n }",
"public PanelSemillasCereales() {\n establecimientoController = new CampoJpaController();\n cultivoController = new CultivoJpaController();\n tipoIngreso = TipoGrano.SIN_SELECCION;\n unidadIngreso = UnidadGrano.SIN_SELECCION;\n initComponents();\n UpdatableSubject.addUpdatableListener(this);\n try {\n GUIUtility.refreshComboBox(new ArrayList<VariedadCultivo>(), jComboBoxVariedad);\n refreshUI();\n } catch (PersistenceException e) {\n if (frameNotifier != null) {\n frameNotifier.showErrorMessage(e.getLocalizedMessage());\n }\n GUIUtility.logPersistenceError(PanelSemillasCereales.class, e);\n }\n\n observable = new Observable();\n setAgregarVariedadVisible(false);\n jButtonAgregarVariedad.setEnabled(false);\n }",
"public void buscarPedidosCumplenFiltros()\n {\n //for(int i = 0; i < sector.length ; i++)\n //{\n // //sector[i].cumplenFiltros();\n //}\n\n }",
"public void modificaciones(){\n VentanaDibujo vi= (VentanaDibujo)Escritorio.getSelectedFrame();\n //Veamos si tenemos ventana seleccionada\n if(vi!=null){\n //Vemos que herramienta estamos usando\n if(vi.getLienzo().getTipoActual() == 0)//Punto\n this.jToggleButtonPunto.setSelected(true);\n else if (vi.getLienzo().getTipoActual() == 1)//LINEA\n this.ToggleButtonLinea.setSelected(true);\n else if (vi.getLienzo().getTipoActual() == 2)//Rectangulo\n this.ToggleButtonRectangulo.setSelected(true);\n else if (vi.getLienzo().getTipoActual() == 3)//Elipse\n this.ToggleButtonOvalo.setSelected(true);\n else if (vi.getLienzo().getTipoActual() == 4)//CurvaPuntocontrol\n this.ToggleButtonCPControl.setSelected(true);\n else if (vi.getLienzo().getTipoActual() == 5)//Poligono\n this.ToggleButtonPoligono.setSelected(true); \n \n \n //vemos el tipo de trazo que usamos\n if(vi.getLienzo().getContinua()==true)\n this.ComboBoxTipoTrazo.setSelectedIndex(0);\n else\n this.ComboBoxTipoTrazo.setSelectedIndex(1);\n \n //tipo de Relleno\n if(vi.getLienzo().getTipoRelleno()==0)//Sin relleno\n this.jComboBoxTipoRelleno.setSelectedIndex(0);\n else if(vi.getLienzo().getTipoRelleno()==1)//Relleno liso\n this.jComboBoxTipoRelleno.setSelectedIndex(1);\n else//Degradao\n this.jComboBoxTipoRelleno.setSelectedIndex(2);\n \n //Para el alisado\n if(vi.getLienzo().getAlisar() == false)\n this.ButtonAlisado.setSelected(false);\n else\n this.ButtonAlisado.setSelected(true);\n \n \n this.SpinnerGrosor.setValue(vi.getLienzo().getGrosorTrazo());\n this.ButtonColorTrazo.setBackground(vi.getLienzo().getColorTrazo()); \n this.jButtonColorRelleno.setBackground(vi.getLienzo().getColorRelleno());\n this.jButtonColorGradiente.setBackground(vi.getLienzo().getColorGradiente()); \n \n this.jSliderTransparencia.setValue((int) (10*vi.getLienzo().getTransparencia())); \n \n } \n \n this.repaint();\n }",
"private void cargarDatosAlumno() {\n\n if (alumno != null) {\n\n textNIAAlumno.setText(alumno.getNia());\n textNombreAlumno.setText(alumno.getNombre() + \" \" + alumno.getApellido1());\n textNombreAlumno.setToolTipText(alumno.getNombre() + \" \" + alumno.getApellido1());\n textEmail.setText(alumno.getEmail1());\n textCursoActual.setText(alumno.getCurso().getAbreviatura() + \" - \" + sustituirPadre(alumno.getCurso()).getIdPadre());\n\n textTelefono.setText(alumno.getTelefono1());\n\n cargarHitoriales(alumno);\n\n } else {\n new FramePopup(this, \"El alumno no esta matriculado en este curso escolar\",\n Imagenes.getImagen(\"alert-black.png\"),\n \"Aceptar\").setVisible(true);\n }\n }",
"private void cargarDetalles() {\r\n\t\tsolicProrrogaDetList.setActivo(new Boolean(true));\r\n\t\tsolicProrrogaDetList.setIdSolicCab(idSolicCab);\r\n\t\tsolicProrrogaDetList.listaResultados();\r\n\t}",
"public void inicializarBotones() {\n\t\t\n\t\t// aņadimos listeners a los botones del panel 'login'\n\t\tthis.controladorLogin = new ControladorLogin(vista, modelo);\n\t\tthis.controladorLogin.addListeners();\n\t\t\n\t\t// aņadimos listeners a los botones del panel 'registro'\n\t\tthis.controladorRegistro = new ControladorRegistro(vista, modelo);\n\t\tthis.controladorRegistro.addListeners();\n\t\t\n\t\t// aņadimos listeners a los botones del panel 'bienvenida'\n\t\tthis.controladorBienvenida = new ControladorBienvenida(vista, modelo);\n\t\tthis.controladorBienvenida.addListeners();\n\t\t\n\t\t// aņadimos listeners a los botones del panel 'sel_billete'\n\t\tthis.controladorBillete = new ControladorBillete(vista, modelo);\n\t\tthis.controladorBillete.addListeners();\n\t\t\n\t\t// aņadimos listeners a los botones del panel 'sel_fecha'\n\t\tthis.controladorFecha = new ControladorFecha(vista, modelo);\n\t\tthis.controladorFecha.addListeners();\n\t\t\n\t\t// aņadimos listeners a los botones del panel 'detalles_compra'\n\t\tthis.controladorDetalles = new ControladorDetalles(vista, modelo);\n\t\tthis.controladorDetalles.addListeners();\n\t\t\n\t\t// aņadimos listeners a los botones del panel 'pago'\n\t\tthis.controladorPago = new ControladorPago(vista, modelo);\n\t\tthis.controladorPago.addListeners();\n\t\t\n\t\t// aņadimos listeners a los botones del panel \"fin_pago\"\n\t\tthis.controladorFinPago = new ControladorFinPago(vista, modelo);\n\t\tthis.controladorFinPago.addListeners();\n\t}",
"private void setDatosBasicosOrdenCompra() throws Exception {\n\t\tint currentUser = getSessionManager().getWebSiteUser().getUserID();\n\n\t\tsetRow_id(_dsOrdenesCompra.getOrdenesCompraOrdenCompraId());\n\n\t\t// obtengo las intancias de aprobación correspondientes agrupadas\n\t\t// por usuario para mostrar las observaciones de todos los firmantes\n\t\t_dsAuditoria\n\t\t\t\t.setOrderBy(AuditaEstadosCircuitosModel.AUDITA_ESTADOS_CIRCUITOS_FECHA\n\t\t\t\t\t\t+ \" DESC\");\n\t\t_dsAuditoria\n\t\t\t\t.retrieve(AuditaEstadosCircuitosModel.AUDITA_ESTADOS_CIRCUITOS_OBSERVACIONES\n\t\t\t\t\t\t+ \" IS NOT NULL AND \"\n\t\t\t\t\t\t+ AuditaEstadosCircuitosModel.AUDITA_ESTADOS_CIRCUITOS_NOMBRE_TABLA\n\t\t\t\t\t\t+ \" = 'inventario.ordenes_compra' AND \"\n\t\t\t\t\t\t+ AuditaEstadosCircuitosModel.AUDITA_ESTADOS_CIRCUITOS_REGISTRO_ID\n\t\t\t\t\t\t+ \" = \" + getRow_id());\n\t\tif (_dsAuditoria.getRowCount() == 0)\n\t\t\t_datatable1.setVisible(false);\n\t\telse\n\t\t\t_datatable1.setVisible(true);\n\n\t\t// Nùmero de OC y estado en el tìtulo\n\t\tString titulo = \"Orden de compra Nº\" + getRow_id();\n\t\tif (_dsOrdenesCompra.getEstadoNombre() != null)\n\t\t\ttitulo += \" (\" + _dsOrdenesCompra.getEstadoNombre() + \")\";\n\t\t_detailformdisplaybox1.setHeadingCaption(titulo);\n\n\t\t_dsOrdenesCompra.setCurrentWebsiteUserId(currentUser);\n\n\t\t// Recupera esquema de configuración para la cadena de firmas\n\t\t_dsOrdenesCompra.setEsquemaConfiguracionId(Integer\n\t\t\t\t.parseInt(getPageProperties().getProperty(\n\t\t\t\t\t\t\"EsquemaConfiguracionIdOrdenesCompra\")));\n\n\t\t_monto_total2.setExpression(_dsDetalleSC,\n\t\t\t\tDetalleSCModel.DETALLE_SC_MONTO_TOTAL_PEDIDO);\n\t\t_monto_total2.setDisplayFormatLocaleKey(\"CurrencyFormatConSigno\");\n\n\t\t// Neto\n\t\t_dsOrdenesCompra.setNetoOrdenCompra(_dsOrdenesCompra\n\t\t\t\t.getAtributoNetoOrdenCompra());\n\t\t// Descuento\n\t\t_dsOrdenesCompra.setDescuentoOrdenCompra(_dsOrdenesCompra\n\t\t\t\t.getAtributoDescuentoOrdenCompra());\n\t\t// IVA\n\t\t_dsOrdenesCompra.setIvaOrdenCompra(_dsOrdenesCompra\n\t\t\t\t.getAtributoIvaOrdenCompra());\n\t\t// Total OC\n\t\t_dsOrdenesCompra.setTotalOrdenCompra(_dsOrdenesCompra\n\t\t\t\t.getAtributoTotalOrdenCompra());\n\n\t\t// Muestra observaciones realizadas a la OC para el estado adecuado\n\t\tString estado = _dsOrdenesCompra.getOrdenesCompraEstado();\n\t\tif (\"0008.0002\".equalsIgnoreCase(estado)\n\t\t\t\t|| \"0008.0004\".equalsIgnoreCase(estado)\n\t\t\t\t|| \"0008.0005\".equalsIgnoreCase(estado)\n\t\t\t\t|| \"0008.0006\".equalsIgnoreCase(estado)) {\n\t\t\t// _dsOrdenesCompra.recuperaObservaciones();\n\t\t\t_observacionesTd.setEnabled(true);\n\t\t\t_observacionesTd.setVisible(true);\n\t\t} else {\n\t\t\t_observacionesTd.setEnabled(false);\n\t\t\t_observacionesTd.setVisible(false);\n\t\t}\n\n\t\t// setea comprador\n\t\tint comprador = _dsOrdenesCompra.getOrdenesCompraUserIdComprador();\n\t\tif (comprador == 0)\n\t\t\t_dsOrdenesCompra.setOrdenesCompraUserIdComprador(currentUser);\n\n\t\t// setea la URL del reporte a generar al presionar el botón de impresión\n\t\t_imprimirOrdenCompraBUT2.setHref(armarUrlReporte(BIRT_FRAMESET_PATH, \"PDF\", \"orden_compra\",\n\t\t\t\t\"&orden_compra_id_parameter=\" + getRow_id()));\n\t\t_imprimirOrdenCompraBUT3.setHref(armarUrlReporte(BIRT_FRAMESET_PATH, \"PDF\",\n\t\t\t\t\"orden_compra_full_o\", \"&orden_compra_id_parameter=\" + getRow_id()));\n\t\t_imprimirOrdenCompraBUT4.setHref(armarUrlReporte(BIRT_FRAMESET_PATH, \"PDF\",\n\t\t\t\t\"orden_compra_full_d\", \"&orden_compra_id_parameter=\" + getRow_id()));\n\t\t_imprimirOrdenCompraBUT5.setHref(armarUrlReporte(BIRT_FRAMESET_PATH, \"PDF\",\n\t\t\t\t\"orden_compra_full_t\", \"&orden_compra_id_parameter=\" + getRow_id()));\n\n\t\t// setea la URL de lista de firmantes y transiciones de estado\n\t\t_verFirmantes.setHref(\"ListaFirmantes.jsp?orden_id=\" + getRow_id());\n\n\t\t// setea la URL de lista de solicitantes\n\t\t_verSolicitantes.setHref(\"ListaSolicitantes.jsp?orden_id=\" + getRow_id());\n\n\t\t// setea el boton de seleccion/deseleccion segun corresponda\n\t\tif (_dsDetalleSC.getRowCount() == 0)\n\t\t\tseleccionarTodo = true;\n\n\t\tString seleccion = (seleccionarTodo ? \"text.seleccion\" : \"text.deseleccion\");\n\t\t_desSeleccionaTodoBUT1.setDisplayNameLocaleKey(seleccion);\n\t\t_desSeleccionaTodoBUT1.setOnClick(\"CheckAll(\" + seleccionarTodo + \");\");\n\n\t\t// setea el nro. de oc en tango si la propiedad correspondiente esta\n\t\t// seteada\n\t\tString nroOrdenCompra = AtributosEntidadModel.getValorAtributoObjeto(\n\t\t\t\tN_ORDEN_CO, _dsOrdenesCompra.getOrdenesCompraOrdenCompraId(),\n\t\t\t\t\"TABLA\", \"ordenes_compra\");\n\t\tif (nroOrdenCompra == null)\n\t\t\tnroOrdenCompra = \"-\";\n\n\t\t_nroOcTango2.setText(nroOrdenCompra);\n\n\t\t// oculta o muestra botones \"Agregar\", \"Eliminar\" y \"Cancelar\" en función\n\t\t// del estado de la OC\n\t\tboolean ifModificable = _dsOrdenesCompra.isModificable();\n\t\t_articulosAgregarBUT1.setVisible(ifModificable);\n\t\t_articulosEliminarBUT1.setVisible(ifModificable);\n\t\t_articulosCancelarBUT1.setVisible(ifModificable);\t\t\n\t\t\n\t\t// deshabilita los campos de entrada de datos segun el estado de la OC\n\t\t_nombre_completo_comprador2.setEnabled(ifModificable);\n\t\t_proveedor2.setEnabled(ifModificable);\n\t\t_fecha_estimada_entrega2.setEnabled(ifModificable);\n\t\t_lkpCondicionesCompra.setEnabled(ifModificable);\n\t\t_descuentoGlobal2.setEnabled(ifModificable);\n\t\t_buttonCopiaDescuento.setEnabled(ifModificable);\n\t\t_descuento2.setEnabled(ifModificable);\n\t\t_observaciones2.setEnabled(ifModificable);\n\t\t_cantidad_pedida2.setEnabled(ifModificable);\n\t\t_unidad_medida2.setEnabled(ifModificable);\n\t\t_monto_unitario1.setEnabled(ifModificable);\n\t\t\n\t\t\n\t\t// links para impresion\n\t\tboolean isEmitida = \"0008.0006\".equalsIgnoreCase(_dsOrdenesCompra.getOrdenesCompraEstado());\n\t\t_imprimirOrdenCompraBUT4.setVisible(isEmitida);\n\t\t_imprimirOrdenCompraBUT5.setVisible(isEmitida);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs an EclipseLog which uses the specified Writer to log messages to | public EclipseLog(Writer writer) {
if (writer == null)
// log to System.err by default
this.writer = logForStream(System.err);
else
this.writer = writer;
} | [
"public EclipseLog() {\n \t\tthis((Writer) null);\n \t}",
"public void setWriter(Writer log);",
"void setLogWriter(PrintWriter writer) throws ResourceException;",
"@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = \"RV_RETURN_VALUE_IGNORED_BAD_PRACTICE\",\n justification = \"Return value for file delete is not important here.\")\n private void initLogWriter() throws org.apache.geode.admin.AdminException {\n loggingSession.createSession(this);\n\n final LogConfig logConfig = agentConfig.createLogConfig();\n\n // LOG: create logWriterAppender here\n loggingSession.startSession();\n\n // LOG: look in AgentConfigImpl for existing LogWriter to use\n InternalLogWriter existingLogWriter = agentConfig.getInternalLogWriter();\n if (existingLogWriter != null) {\n logWriter = existingLogWriter;\n } else {\n // LOG: create LogWriterLogger\n logWriter = LogWriterFactory.createLogWriterLogger(logConfig, false);\n // Set this log writer in AgentConfigImpl\n agentConfig.setInternalLogWriter(logWriter);\n }\n\n // LOG: create logWriter here\n logWriter = LogWriterFactory.createLogWriterLogger(logConfig, false);\n\n // Set this log writer in AgentConfig\n agentConfig.setInternalLogWriter(logWriter);\n\n // LOG:CONFIG: changed next three statements from config to info\n logger.info(LogMarker.CONFIG_MARKER,\n String.format(\"Agent config property file name: %s\",\n AgentConfigImpl.retrievePropertyFile()));\n logger.info(LogMarker.CONFIG_MARKER, agentConfig.getPropertyFileDescription());\n logger.info(LogMarker.CONFIG_MARKER, agentConfig.toPropertiesAsString());\n }",
"public interface ILogWriter {\n\n\t/** Log an exception, with the stack trace, exception type and message. */\n\tvoid e(String tag, Exception e);\n\n\t/** Log a throwable, with the stack trace, exception type and message. */\n\tvoid e(String tag, Throwable tr);\n\n\t/** Log an error message. */\n\tvoid e(String tag, String msg);\n\n\t/** Log a debug message. */\n\tvoid d(String tag, String msg);\n\n\t/** Log an informative message. */\n\tvoid i(String tag, String msg);\n\n\t/** Log a warning message. */\n\tvoid w(String tag, String msg);\n}",
"interface LoggableWriter {\n Writer getWriter();\n\n /**\n * Add log mark at current writer's position.\n */\n void markSeparatorForLog();\n }",
"public Writer get_log_stream(){return logOptions.get_log_stream();}",
"public static synchronized LogWriter getLogWriter() {\r\n\t\tif (logWriter == null) {\r\n\t\t\tlogWriter = new LogWriter();\r\n\t\t}\r\n\t\treturn logWriter;\r\n\t}",
"public void setLogWriter(java.io.PrintWriter pwLogWriter) {\n SecurityManager sec = System.getSecurityManager();\n if (sec != null) {\n sec.checkPermission(new SQLPermission(\"setLog\"));\n }\n \n\tif (tracer == null) {\n tracer = new JdbcOdbcTracer();\n }\n\ttracer.setWriter(pwLogWriter);\n }",
"private Logger newLogger(String file_suffix) {\n\t\tString filename=SipStack.log_path+\"//\"+via_addr+\".\"+host_port+file_suffix;\n\t\tint debug_level=SipStack.debug_level;\n\t\tLogLevel logging_level=debug_level>=6? LogLevel.ALL : debug_level==5? LogLevel.TRACE : debug_level==4? LogLevel.DEBUG : debug_level==3? LogLevel.INFO : debug_level==2? LogLevel.WARNING : debug_level==1? LogLevel.SEVERE : LogLevel.OFF;\n\t\treturn new LogRotationWriter(filename,logging_level,SipStack.max_logsize*1024,SipStack.log_rotations,SipStack.rotation_scale,SipStack.rotation_time);\n\t}",
"@Override\n public LogWriter getLogWriter() {\n return logWriter;\n }",
"public static LogWriter getInstance() {\r\n\t\tif (instance == null) {\r\n\t\t\tinstance = new LogWriter();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}",
"private void setupLog4jForAction() throws IOException {\n String loggerName = \"Action_\" + this.id;\n org.apache.log4j.Logger log4jLogger = org.apache.log4j.Logger.getLogger(\"Action_\" + this.id);\n String logRoot = System.getProperty(\"LOG_ROOT\");\n if(logRoot == null) {\n logRoot = \".\";\n }\n String logFilePath = logRoot + \"/charles-rest/ActionsLogs/\" + this.id + \".log\";\n \n File logFile = new File(logFilePath);\n logFile.getParentFile().mkdirs();\n logFile.createNewFile();//you have to create the file yourself since FileAppender acts funny under linux if the file doesn't already exist.\n\n FileAppender fa = new FileAppender(new PatternLayout(\"%d %p - %m%n\"), logFilePath);\n fa.setName(this.id + \"_appender\");\n fa.setThreshold(Level.DEBUG);\n log4jLogger.addAppender(fa);\n log4jLogger.setLevel(Level.DEBUG);\n \n this.logger = LoggerFactory.getLogger(loggerName);\n \n }",
"public Logger() {\n\t\tlogTo = System.out;\n\t}",
"public LogHandler() throws IOException {\n printWriter = new PrintWriter(new FileWriter(FILE_NAME), true);\n }",
"Object createLogger(String name);",
"public Logger() {\r\n \t\ttabifyFlag = true;\r\n \t\tout = System.out;\r\n \t\terr = System.err;\r\n \t\ttimers = new HashMap<String, Timer>();\r\n \t\tnumTabs = 0;\r\n \t}",
"protected Log createLogger()\n {\n return ((log != null) ? log : LogFactory.getLog(getClass()));\n }",
"public Logger (){}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method: testGet() Description: Test of get method, of class NumericArrayList. | @Test
public void testGet()
{
try {
assertEquals(money2, list1.get(1));
assertEquals(money3, list1.get(2));
assertEquals(null, list1.get(15));
} catch (InvalidIndexException ex) {
Logger.getLogger(NumericArrayListTest.class.getName()).log(Level.SEVERE, null, ex);
}
} | [
"@Test\n public void testGet() \n {\n try {\n assertEquals(6.0, list1.get(0), 0.0);\n assertEquals(4.0, list1.get(1), 0.0);\n } catch (InvalidIndexException ex) {\n Logger.getLogger(DoubleArrayListTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Test\n public void testGet() {\n testAdd();\n assertEquals(list1.get(0), 11.25, 0);\n }",
"@Test\r\n public void testGet() {\r\n System.out.println(\"get\");\r\n int index = 1;\r\n Number n3 = nc1.get(index);\r\n assertEquals(n1.getNumber(), n3.getNumber());\r\n \r\n }",
"@Test\r\n\tpublic void testGet() {\r\n\t\tArrayList<String> al = new ArrayList<String>();\r\n\t\tal.add(0, \"hi\");\r\n\t\tassertEquals(\"hi\", al.get(0));\r\n\t\tal.add(1, \"yes\");\r\n\t\tassertEquals(\"yes\", al.get(1));\r\n\t\tal.add(1, \"no\");\r\n\t\tal.get(0);\r\n\t\ttry {\r\n\t\t\tal.get(7);\r\n\t\t\tfail();\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\tassertEquals(3, al.size());\r\n\t\t}\r\n\t}",
"@Test\r\n\tpublic void testGet() {\r\n\t\ttestArray = new ArrayBasedList<String>();\r\n\t\ttestArray.add(\"Hola\");\r\n\t\ttestArray.add(\"Como Estas\");\r\n\t\tassertEquals(\"Hola\", testArray.get(0));\r\n\t\tassertEquals(\"Como Estas\", testArray.get(1));\r\n\t\ttry {\r\n\t\t\ttestArray.get(-1);\r\n\t\t\tfail();\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\tassertEquals(e.getMessage(), null);\r\n\t\t}\r\n\t}",
"private void testGet() {\n System.out.println(\"------ TESTING: get(int index) ------\");\n System.out.println(\"Expected: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 \");\n System.out.print(\"Returned: \");\n try{\n for(int i = 0; i < iSize; i++) {\n if (iTestList.get(i) != i)\n throw new RuntimeException(\"FAILED -> get value is not working correctly\");\n else\n System.out.print(iTestList.get(i) + \" \");\n }\n // test to see if we can get values out of bounds\n iTestList.get(-9);\n iTestList.get(iSize+10);\n }catch (RuntimeException e){\n System.out.print(e.getMessage());\n }\n System.out.print(\"\\n\");\n }",
"@Test\n public void testGet() {\n System.out.println(\"get\");\n int index = 0;\n SinEllasList instance = new SinEllasList();\n int expResult = 0;\n instance.insert(0, index);\n int result = instance.get(index);\n assertEquals(expResult, result);\n }",
"public NumericArrayListTest() {\n }",
"@Test\n\tpublic void testAdd() {\n\t\tIntegerArrayList list = new IntegerArrayList();\n\t\t// Adding three numbers to the list\n\t\tlist.Add(2);\n\t\tlist.Add(15);\n\t\tlist.Add(30);\n\t\t\n\t\t//Tests\n\t\tassertEquals(\"The first number in the list should be 2\", 2, list.Get(0));\n\t\tassertEquals(\"The second number in the list should be 15\", 15, list.Get(1));\n\t\tassertEquals(\"The third number in the list should be 30\", 30, list.Get(2));\n\t}",
"@Test\n\tpublic void testGet() {\n\t\tdouble result = m1.get(2, 1);\n\t\tassertEquals(-0.2, result, 0.000001);\n\t}",
"@Test\n public void testGet() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n Integer expResult = 7;\n Integer result = instance.get(2);\n assertEquals(expResult, result);\n\n }",
"@Test\n\tpublic void testGetList()\n\t{\n\t\tSystem.out.println( \"getList\" );\n\t\tValueObjectForIntervalTable instance = new ValueObjectForIntervalTableImpl();\n\t\tList expResult = instance.getValueObjects();\n\t\tList result = instance.getList();\n\t\tassertTrue( expResult != result );\n\t\tassertEquals( expResult.size(), result.size() );\n\t}",
"@Test\n public void testGetListItems() {\n System.out.println(\"getListItems\");\n DataModel instance = new DataModel();\n List expResult = null;\n List result = instance.getListItems();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test\n public void testGetItems() {\n ArrayList<ToDoItem> ar = model.getItems();\n assertEquals(\"testGetItems length of ArrayList\", 5, ar.size());\n }",
"@Test\n public void testGetAlbumNummers() {\n System.out.println(\"getAlbumNummers\");\n ArrayList<Nummer> expResult = testNummers;\n ArrayList<Nummer> result = instance.getAlbumNummers();\n assertEquals(expResult, result);\n }",
"@Test\r\n public void testGetBoughtsOfSell() {\r\n System.out.println(\"getBoughtsOfSell\");\r\n MyInteger sell = (instance.adjacencyList.get(4)).get(0);\r\n\r\n MyArrayList<MyInteger> expResult = new MyArrayList<>();\r\n\r\n for (int i = 1; i < 4; i++) {\r\n expResult.add((instance.adjacencyList.get(4)).get(i));\r\n }\r\n\r\n MyArrayList<MyInteger> result = instance.getBoughtsOfSell(sell);\r\n assertEquals(expResult, result);\r\n }",
"@Test\n public void testGetList() {\n System.out.println(\"getList\");\n AgeDate instance = new AgeDate();\n ArrayList<Integer> expResult = new ArrayList<Integer>() {{\n add(31);\n add(29);\n add(31);\n add(30);\n add(31);\n add(30);\n add(31);\n add(31);\n add(30);\n add(31);\n add(30);\n add(31);\n }};\n ArrayList result = instance.getList();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetExpertiseCollection() {\n System.out.println(\"getExpertiseCollection\");\n ArrayList<Expertise> result = instance.getExpertiseCollection();\n assertEquals(result.size(), 3);\n }",
"@Test\n public void testAdd() \n {\n try {\n assertEquals(6.0, list1.get(0), 0.0);\n assertEquals(4.0, list1.get(1), 0.0);\n assertEquals(3.0, list1.get(2), 0.0);\n list1.add(1, 9);\n assertEquals(9.0, list1.get(1), 0.0);\n assertEquals(4.0, list1.get(2), 0.0);\n list1.add(4, 60.0);\n list1.add(5, 27.0);\n list1.add(6, 5.0);\n list1.add(7, 2.0);\n list1.add(8, 34.0);\n list1.add(9, 20.0);\n list1.add(10, 23.2);\n list1.add(11, 70.4);\n assertEquals(23.2, list1.get(10), 23.2);\n assertEquals(70.4, list1.get(11), 0.0);\n assertEquals(-0.0, list1.get(17), 0.0);\n } catch (InvalidIndexException ex) {\n Logger.getLogger(DoubleArrayListTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
to set the AccessNetworkChargingIdentifierValue AVP a potential existing AVP will be deleted | public void setAccessNetworkChargingIdentifierValue(AccessNetworkChargingIdentifierValue _accessNetworkChargingIdentifier) {
this.setSingleAVP(_accessNetworkChargingIdentifier);
} | [
"void setChargingMethod(int value);",
"void setAgregate(com.hps.july.persistence.StorageCard anAgregate) throws java.rmi.RemoteException;",
"void secondarySetAgregate(com.hps.july.persistence.StorageCard anAgregate) throws java.rmi.RemoteException;",
"@Test\n public void modifySubscriptionChargingMethod4Success() throws Exception {\n\n final String msisdn = String.valueOf(new Random().nextInt());\n\n final String packageId = \"pAlt__X__package:pAlt_TAX_3_2_999_999_999_*_*\";\n\n final PurchaseAuthorization auth = getPurchaseApi(Locale.UK).purchasePackageMsisdn(\"test\", msisdn, packageId, new PurchaseAttributes());\n assertNotNull(auth);\n assertTrue(auth.isSuccess());\n assertNotNull(auth.getPackageSubscriptionId());\n\n boolean result2 = getSelfcareApi(Locale.UK)\n .modifySubscriptionChargingMethod(\"test\",msisdn, 0, auth.getPackageSubscriptionId(), 2, \"csrId\", \"test-reason\");\n\n assertTrue(result2);\n\n }",
"private static void setAccountSpecificPreference(@NonNull Context context,\n @NonNull String accountName,\n @StringRes int prefixId, int value) {\n final Editor editor = getSharedPreferences(context).edit();\n final String prefKey = makeAccountSpecificPrefKey(context, accountName, prefixId);\n if (value >= 0) {\n editor.putInt(prefKey, value);\n } else {\n editor.remove(prefKey);\n }\n editor.apply();\n }",
"public boolean setVdopPresent(int value) {\n if (!setValue(6, 6, value)) {\n return false;\n }\n updateGattCharacteristic();\n return true;\n }",
"public void setC_Charge_ID (int C_Charge_ID);",
"private void setVendID(int value) {\n \n vendID_ = value;\n }",
"void setDevice(int value);",
"void changeGuestPhone(String SSID, String phoneNr) throws InvalidIDException;",
"public boolean setVdop(int value) {\r\n if (!FormatUtils.uint8RangeCheck(value)) {\r\n return false;\r\n }\r\n mVdop = FormatUtils.intToUint8(value);\r\n updateGattCharacteristic();\r\n return true;\r\n }",
"public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder setInstanceID(java.lang.String value) {\n validate(fields()[2], value);\n this.instanceID = value;\n fieldSetFlags()[2] = true;\n return this; \n }",
"public void setVirtualCard(String value) {\n setAttributeInternal(VIRTUALCARD, value);\n }",
"public void deviceStatus(int value){\n _deviceStatus = value;\n }",
"public boolean setHdop(int value) {\r\n if (!FormatUtils.uint8RangeCheck(value)) {\r\n return false;\r\n }\r\n mHdop = FormatUtils.intToUint8(value);\r\n updateGattCharacteristic();\r\n return true;\r\n }",
"public void setDotaId(Number value) {\n setAttributeInternal(DOTAID, value);\n }",
"public void setMppfcSup(String value) {\n \n String oldValue = getMppfcSup();\n try{\n setAttributeInternal(MPPFCSUP, value);\n getAM().getBlk3Approve4VOFieldEvents().MppfcSup_cc();\n } catch(JboException e){\n setAttributeInternal(MPPFCSUP,oldValue);\n throw(e);\n } \n \n }",
"public abstract void setIdpcTV(java.lang.String newIdpcTV);",
"void setAsicIdentifier(int asicIdentifier);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Encodes a Map as a JSON object | private void encodeJSONObject(Map map, StringBuffer sb) {
Iterator itr = map.keySet().iterator();
sb.append("{");
Object key = null;
while(itr.hasNext()) {
key = itr.next();
write(key, sb);
sb.append(':');
write(map.get(key), sb);
sb.append(',');
}
/* remove the trailing comma if the object has any items*/
if(key != null)
sb.deleteCharAt(sb.length()-1);
sb.append("}");
} | [
"public static String convertMapToJson(Map<String, Object> map) throws IOException {\n ObjectMapper objectMap = new ObjectMapper();\n StringWriter sw = new StringWriter();\n JsonGenerator gen = objectMap.getJsonFactory().createJsonGenerator(sw);\n gen.writeStartObject();\n handleMap(gen, map);\n gen.writeEndObject();\n// sw.append('\\n');\n gen.flush();\n gen.close();\n\n return sw.toString();\n }",
"public static String toJSON(final Map<?, ?> map) {\n return new JSONObject(map).toString();\n }",
"private String mapToJSON(Map<String, Map<String,Integer>> map) {\n\t\tString json = \"{\";\n\t\tfor (String key : map.keySet()) {\n\t\t\tString category = \"\\\"\" + key + \"\\\":[\";\n\t\t\tjson += category;\n\t\t\tMap<String,Integer> names = map.get(key);\n\t\t\tfor (String val : names.keySet()) {\n\t\t\t\tString entry = \"{\\\"count\\\":\" + names.get(val) + \", \\\"name\\\":\\\"\" + val.replace(\"\\\"\",\"\").replace(\",\",\"\") + \"\\\"},\";\n\t\t\t\tjson += entry;\n\t\t\t}\n\t\t\tjson += \"],\";\n\t\t}\n\t\tjson += \"}\";\n\t\tjson = json.replace(\",]\",\"]\").replace(\",}\",\"}\");\n\t\treturn json;\n\t}",
"String parseMapToJson(Map<String, Object> data);",
"public static<K, V> JSONObject createMapJSONObject(final Map<K, V> map) throws JSONException {\n\t\tfinal JSONObject json = new JSONObject();\n\n\t\tfinal Collection<JSONObject> entriesJson = new LinkedList<JSONObject>();\n\t\tif(map!=null){\n\t\t\tfor(final Entry<K, V> entry: map.entrySet()){\n\t\t\t\tfinal JSONObject entryJson = new JSONObject();\n\t\t\t\tentryJson.put(\"key\", Helper.createJSONObject(entry.getKey()));\n\t\t\t\tentryJson.put(\"value\", Helper.createJSONObject(entry.getValue()));\n\t\t\t\tentriesJson.add(entryJson);\n\t\t\t}\n\t\t}\n\n\t\tjson.put(\"map\", entriesJson);\n\n\t\treturn json;\n\t}",
"private static void writeJSONString(Map<?, ?> map, Appendable out) throws IOException {\n @Var boolean first = true;\n\n out.append('{');\n for (Map.Entry<?, ?> entry : map.entrySet()) {\n if (first) {\n first = false;\n } else {\n out.append(',');\n }\n out.append('\\\"');\n escape(String.valueOf(entry.getKey()), out);\n out.append('\\\"');\n out.append(':');\n writeJSONString(entry.getValue(), out);\n }\n out.append('}');\n }",
"public static void writeJSONString(Map<?, ?> map, Writer out) throws IOException {\n if (map == null) {\n out.write(\"null\");\n return;\n }\n\n boolean first = true;\n Iterator<?> iter = map.entrySet().iterator();\n\n out.write('{');\n while (iter.hasNext()) {\n if (first)\n first = false;\n else\n out.write(',');\n @SuppressWarnings(\"rawtypes\")\n Entry entry = (Entry) iter.next();\n out.write('\\\"');\n out.write(escape(String.valueOf(entry.getKey())));\n out.write('\\\"');\n out.write(':');\n JSONValue.writeJSONString(entry.getValue(), out);\n }\n out.write('}');\n }",
"void writeObject(Map<Object, Object> map);",
"public static JSONObject map2json(Map<String, Object> map) throws JSONException {\n List<String> keyList = new ArrayList<String>();\n\n for (String key : map.keySet()) {\n keyList.add(key);\n }\n Collections.sort(keyList);\n\n JSONObject obj = new JSONObject();\n inflateJsonObject(map, keyList, obj);\n\n return obj;\n }",
"public String convertJsonMapToString(Map<String, Object> jsonMapValue) throws IOException {\n\t\treturn SearchUtils.convertJsonMapToString(jsonMapValue);\n\t}",
"private void serializeMap(final Map<?, ?> map, final StringBuffer buffer)\n {\n Iterator<?> iterator;\n Object key;\n\n this.history.add(map);\n buffer.append(\"a:\");\n buffer.append(map.size());\n buffer.append(\":{\");\n iterator = map.keySet().iterator();\n while (iterator.hasNext())\n {\n key = iterator.next();\n serializeObject(key, buffer, false);\n this.history.remove(this.history.size() - 1);\n serializeObject(map.get(key), buffer);\n }\n buffer.append('}');\n }",
"public Map toJsonPath( Map map ) {\n\n if( Validator.isEmpty(map) ) return map;\n\n Map newMap = new NMap();\n\n for( Object key : map.keySet() ) {\n Object val = map.get( key );\n newMap.put( key, convertValue(val) );\n }\n\n return newMap;\n\n }",
"private String serialisePropertyMap(Map<String, String> pPropertyMap){\n StringBuilder lResult = new StringBuilder();\n lResult.append(\"{\");\n \n for(Map.Entry<String, String> lEntry : pPropertyMap.entrySet()){ \n lResult.append(lEntry.getKey());\n lResult.append(\"=\");\n lResult.append(\"\\\"\" + lEntry.getValue() + \"\\\"\");\n lResult.append(\", \");\n }\n \n lResult.replace(lResult.length() - 2, lResult.length(), \"}\");\n return lResult.toString();\n \n }",
"public static JsonObject toJsonObject(Map<String, JsonElement> map) {\n\t\t\n\t\tJsonObject ret = new JsonObject();\n\t\tfor (Entry<String, JsonElement> entry : map.entrySet())\n\t\t\tret.add(entry.getKey(), entry.getValue());\n\t\t\n\t\treturn ret;\n\t\t\n\t}",
"public static String serializeMapToString(Map<String, String> map) {\n if(map == null) return \"\\\\0\";\n Map<String, String> attrNew = new HashMap<String, String>(map);\n Set<String> keys = new HashSet<String>(attrNew.keySet());\n for(String s: keys) {\n attrNew.put(\"<\" + BeansUtils.createEscaping(s) + \">\", \"<\" + BeansUtils.createEscaping(attrNew.get(s)) + \">\");\n attrNew.remove(s);\n }\n return attrNew.toString();\n }",
"@Nullable\n private JSONObject readableMapToJson(ReadableMap readableMap) {\n JSONObject jsonObject = new JSONObject();\n\n if (readableMap == null) {\n return null;\n }\n\n ReadableMapKeySetIterator iterator = readableMap.keySetIterator();\n if (!iterator.hasNextKey()) {\n return null;\n }\n\n while (iterator.hasNextKey()) {\n String key = iterator.nextKey();\n ReadableType readableType = readableMap.getType(key);\n\n try {\n switch (readableType) {\n case Null:\n jsonObject.put(key, null);\n break;\n case Boolean:\n jsonObject.put(key, readableMap.getBoolean(key));\n break;\n case Number:\n // Can be int or double.\n jsonObject.put(key, readableMap.getDouble(key));\n break;\n case String:\n jsonObject.put(key, readableMap.getString(key));\n break;\n case Map:\n jsonObject.put(key, this.readableMapToJson(readableMap.getMap(key)));\n break;\n case Array:\n jsonObject.put(key, readableMap.getArray(key));\n default:\n // Do nothing and fail silently\n }\n } catch (JSONException ex) {\n // Do nothing and fail silently\n }\n }\n\n return jsonObject;\n }",
"void serializeToMap(Object source, Object target, Map<String, Object> map) throws SerializerException;",
"void writeMap(Collection<?> array);",
"private static String claimsAsJson(Map<String, Claim> claims) {\n ObjectMapper objectMapper = new ObjectMapper();\n ObjectNode node = objectMapper.createObjectNode();\n\n claims.forEach((key, value) -> {\n if (value.asMap() != null) {\n node.putPOJO(key, value.asMap());\n } else if (value.asList(String.class) != null) {\n JsonNode jsonNode = objectMapper.valueToTree(value.asList(String.class));\n node.set(key, jsonNode);\n } else if (value.asBoolean() != null) {\n node.put(key, value.asBoolean());\n } else if (value.asInt() != null) {\n node.put(key, value.asInt());\n } else if (value.as(String.class) != null) {\n node.put(key, value.as(String.class));\n } else if (value.isNull()) {\n node.putNull(key);\n }\n });\n\n String json = \"\";\n try {\n json = objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(node);\n } catch (JsonProcessingException jpe) {\n LOG.error(\"Error processing json from profile\", jpe);\n }\n\n return json;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Counts the number of items in the catalog whose descriptions contain a given substring. | int countItems(String d) {
int c = 0;
for (Item i : catalog) {
if (i.description.contains(d))
c++;
}
return c;
} | [
"int getCatalogueStrCount();",
"public int countBydescricao(String descricao);",
"public static int substringCount(String s, String substring) {\n \tint num = 0;\n \twhile(s.contains(substring)) {\n \t\ts = s.substring(s.indexOf(substring) + substring.length());\n \t\tnum++;\n \t}\n return num;\n }",
"public static int substringCount(String s, String substring) {\n \tint nums = 0;\n int index = s.indexOf(substring);\n while( index != -1 ) {\n nums++;\n index = s.indexOf(substring, index + substring.length());\n }\n return nums;\n }",
"@Override\n public int count(String str){\n // Count all matching nodes\n StringNode node = listHeader; int count = 0;\n while((node = node.next) != null){\n if (StringHandler.areEqual(node.value, str)) count++;\n }\n return count;\n }",
"public static long countSubstr(final String value,final String subStr){\n\t\treturn countSubstr(value, subStr,false,false);\n\t}",
"@Test\n public void testSubstr_count_String_String() {\n logger.info(\"substr_count\");\n String string = \"test tester\";\n String substring = \"test\";\n int expResult = 2;\n int result = PHPMethods.substr_count(string, substring);\n assertEquals(expResult, result);\n }",
"public static int substringCount(String s, String substring) {\n\t\tArrayList <Integer> occurences=new ArrayList <Integer>();\n\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\tif(i+substring.length()-1<s.length() && s.substring(i, i+substring.length()).equals(substring)) {\n\t\t\t\toccurences.add(i);\n\t\t\t}\n\t\t}\n\t\treturn occurences.size();\n\t}",
"public static int howMany(String substring, String str) {\n\n\t// if either parameter substring or str is null, return -1\n\tif (substring == null || str == null) {\n\t return -1;\n\t} else if (substring.equals(\"\") || str.equals(\"\")) {\n\t return str.length();\n\t} // As long as the parameters are not null, check to see if the substring\n\t// is contained within the string:\n\telse if (str.contains(substring)) {\n\t int firstSubstring = 0;\n\n\t // look through the string and find the substring. Add one to\n\t // count. Replace the string with only what is remaining after\n\t // what has already been counted.\n\t int count;\n\t for (count = 0; firstSubstring != -1; count++) {\n\t\tfirstSubstring = str.indexOf(substring);\n\t\tif (firstSubstring == -1) {\n\t\t return count;\n\t\t} else {\n\t\t str = str.substring(firstSubstring + substring.length());\n\t\t}\n\t }\n\t return count;\n\t} else {\n\t return -1;\n\t}\n }",
"public static int getSubstringCount(String source, String subString) {\n int count = 0;\n int pos = 0;\n\n while ((pos = source.indexOf(subString, pos)) >= 0) {\n pos += subString.length();\n count++;\n }\n\n return count;\n }",
"int countByTitle(String title);",
"public int countByTodoRichText(String todoRichText);",
"public int countByTitle(String title);",
"public static int countOccurrences(String text, String substring) {\n\t\tint result = 0;\n\t\tint pos = text.indexOf(substring);\n\t\twhile (pos > -1 && pos < text.length()) {\n\t\t\tresult += 1;\n\t\t\tpos = text.indexOf(substring, pos+1);\n\t\t}\n\t\treturn result;\n\t}",
"public int countByTodoText(String todoText);",
"private static int countMatches(String str, String sub) {\n if (isEmpty(str) || isEmpty(sub)) {\n return 0;\n }\n int count = 0;\n int idx = 0;\n for (;;) {\n idx = str.indexOf(sub, idx);\n if (idx == -1) {\n break;\n }\n idx += sub.length();\n count++;\n }\n return count;\n }",
"public static int wordsEndsWithSubstring(String s, String substring) {\n \tint num = 0;\n \tString[] arr = s.split(\" \");\n \tfor(int i = 0; i < arr.length; i++) {\n \t\tif(arr[i].length() >= substring.length()) {\n \t\t\tString temp = arr[i].substring(arr[i].length() - substring.length());\n \t\t\tif(temp.equals(substring)) num++;\n \t\t}\n \t}\n return num;\n }",
"int countByZipcodeDesc(String zipcodeCodePattern, String zipcodeDescPattern);",
"int getCountOfBookWithTitle(String title);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Manually enables the selected coursefeed. This routine is called from /coursefeeds/jsp/cp/editActions.jsp. | @Deprecated
public void enableCourseFeed(ActionRequest request, ActionResponse response)
throws Exception {
Long feedId = ParamUtil.getLong(request, "feedRefId");
FeedReference feedRef = FeedReferenceLocalServiceUtil.getFeedReference(feedId);
feedRef.setRemoved(false);
feedRef.setRemovedDate(null);
feedRef.setRemovedReason(null);
// updateFeedReference also updates the enabled/disabled state of courses
FeedReferenceLocalServiceUtil.updateFeedReference(feedRef, true);
// subscribe to any hubs
if (!feedRef.getPshb().equals("")) {
String hubs[] = feedRef.getPshb().split(",");
for (String hub : hubs) {
mPushSubscriber.subscribe(hub, feedRef.getHref());
}
}
response.setRenderParameter("feedCur", request.getParameter("feedCur"));
response.setRenderParameter("feedDelta", request.getParameter("feedDelta"));
response.setRenderParameter("feedRedirect", request.getParameter("feedRedirect"));
response.setRenderParameter("feedRefId", feedId.toString());
response.setRenderParameter("feedTabs", request.getParameter("feedTabs"));
} | [
"public JavascriptGenerator updateCourseOfferings()\n {\n log.debug(\"updateCourseOfferings()\");\n super.updateCourseOfferings();\n return updateAssignments().refresh(idFor.get(\"coursePane\"));\n }",
"public void \n doEdited() \n {\n pConfirmButton.setEnabled(true);\n pApplyButton.setEnabled(true);\n }",
"@Override\n protected void updateEnabled() {\n // Try to enable actions subject to setters' logic.\n setCreateEnabled(true);\n setEditEnabled(true);\n setCopyEnabled(true);\n setCompareEnabled(true);\n setExportRejectedEnabled(true);\n setDeleteEnabled(true);\n setUnlockEnabled(true);\n setLockEnabled(true);\n setMarkUplinkedEnabled(true);\n }",
"public abstract void updateActionEnablement();",
"@Action(enabledProperty = EDIT + ENABLED)\n public void edit() {\n log.info(resourceMap.getString(EDIT, selectedTargetListSets.get(0)));\n try {\n if (reloadingData()) {\n handleError(null, EDIT + RELOADING_DATA,\n selectedTargetListSets.get(0));\n return;\n }\n TargetListSetEditor.edit(selectedTargetListSets.get(0),\n targetListSetModel.getTargetListSets());\n } catch (UiException e) {\n handleError(e, EDIT, selectedTargetListSets.get(0));\n }\n }",
"private void viewEditTblArticle() {\n\t\tAdminComposite.display(\"\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\tTableItem[] items = tblArticle.getSelection();\n\t\tint len = items.length;\n\t\tif (len == 1) {\n\n\t\t\ttxtArticleName.setText(items[0].getText(0));\n\t\t\ttxtCW.setText(items[0].getText(1));\n\t\t\tcbCCC.setText(items[0].getText(2));\n\t\t\t/*if (items[0].getText(2).equalsIgnoreCase(\"open\") || items[0].getText(2).equalsIgnoreCase(\"Dont Charge\")) {\n\t\t\t\ttxtCCCValue.setEnabled(false);\n\t\t\t} else {\n\t\t\t\ttxtCCCValue.setEnabled(true);\n\t\t\t}*/\n\t\t\ttxtCCCValue.setText(items[0].getText(3));\n\t\t\thandleCCCTypeChange();\n\t\t\t\n\t\t\tcbDCC.setText(items[0].getText(4));\n\t\t\t/*if (items[0].getText(4).equalsIgnoreCase(\"open\") || items[0].getText(4).equalsIgnoreCase(\"Dont Charge\")) {\n\t\t\t\ttxtDCCValue.setEnabled(false);\n\t\t\t} else {\n\t\t\t\ttxtDCCValue.setEnabled(true);\n\t\t\t}*/\n\t\t\ttxtDCCValue.setText(items[0].getText(5));\n\t\t\thandleDCCTypeChange();\n\t\t\t\n\t\t\tcbIEC.setText(items[0].getText(6));\n\t\t\t/*if (items[0].getText(6).equalsIgnoreCase(\"Dont Charge\")) {\n\t\t\t\ttxtIEC_article.setEnabled(false);\n\t\t\t} else {\n\t\t\t\ttxtIEC_article.setEnabled(true);\n\t\t\t}*/\n\t\t\ttxtIEC_article.setText(items[0].getText(7));\n\t\t\thandleIECTypeChange();\n\t\t\t\n\t\t\tcbLoadingCharge.setText(items[0].getText(8));\n\t\t\t/*if (items[0].getText(8).equalsIgnoreCase(\"Dont Charge\")) {\n\t\t\t\ttxtLC_article.setEnabled(false);\n\t\t\t} else {\n\t\t\t\ttxtLC_article.setEnabled(true);\n\t\t\t}*/\n\t\t\ttxtLC_article.setText((items[0].getText(9)));\n\t\t\thandleLCTypeChange();\n\t\t\t\n\t\t\tcbDDC.setText(items[0].getText(10));\n\t\t\tif (items[0].getText(10).equalsIgnoreCase(\"extra\")) {\n\t\t\t\ttxtDDC_minPerLR.setEnabled(false);\n\t\t\t\ttxtDDC_chargeArticle.setEnabled(false);\n\t\t\t} else if ((items[0].getText(10).equalsIgnoreCase(\"free\"))) {\n\t\t\t\ttxtDDC_chargeArticle.setEnabled(true);\n\t\t\t\ttxtDDC_minPerLR.setEnabled(false);\n\t\t\t} else {\n\t\t\t\ttxtDDC_chargeArticle.setEnabled(true);\n\t\t\t\ttxtDDC_minPerLR.setEnabled(true);\n\t\t\t}\n\t\t\ttxtDDC_minPerLR.setText(((items[0].getText(11))));\n\t\t\ttxtDDC_chargeArticle.setText(((items[0].getText(12))));\n\n\t\t\t// }\n\t\t}\n\t\thandleMixedArticleDropdown();\n\t}",
"public void enableEditUserClasses(boolean state) {\r\n \t\teditUserClasses.setEnabled(state);\r\n \t}",
"protected void enableActionSetFilterMode()\n {\n Action action = new Action(\"SetFilterMode\"); List<String> allowedValues = new LinkedList<String>();\n action.addInputParameter(new ParameterString(\"FilterMode\", allowedValues));\n iDelegateSetFilterMode = new DoSetFilterMode();\n enableAction(action, iDelegateSetFilterMode);\n }",
"@Deprecated\r\n public void disableCourseFeed(ActionRequest request, ActionResponse response)\r\n throws Exception {\r\n\r\n Long feedId = ParamUtil.getLong(request, \"feedRefId\");\r\n FeedReference feedRef = FeedReferenceLocalServiceUtil.getFeedReference(feedId);\r\n\r\n feedRef.setRemoved(true);\r\n feedRef.setRemovedDate(new Date());\r\n feedRef.setRemovedReason(FeedRemovalReasonType.REMOVED.getCode());\r\n\r\n // updateFeedReference also updates the enabled/disabled state of courses\r\n FeedReferenceLocalServiceUtil.updateFeedReference(feedRef, true);\r\n\r\n // unsubscribe from any hubs\r\n if (feedRef.getPshbSubscribed()) {\r\n String hubs[] = feedRef.getPshb().split(\",\");\r\n for (String hub : hubs) {\r\n mPushSubscriber.unsubscribe(hub, feedRef.getHref());\r\n }\r\n }\r\n\r\n response.setRenderParameter(\"feedCur\", request.getParameter(\"feedCur\"));\r\n response.setRenderParameter(\"feedDelta\", request.getParameter(\"feedDelta\"));\r\n response.setRenderParameter(\"feedRedirect\", request.getParameter(\"feedRedirect\"));\r\n response.setRenderParameter(\"feedRefId\", feedId.toString());\r\n response.setRenderParameter(\"feedTabs\", request.getParameter(\"feedTabs\"));\r\n }",
"public void setCategoryEditEnabled(final boolean categoryEditEnabled) {\n this.categoryEditEnabled = categoryEditEnabled;\n }",
"public static void courseEditOption(){\n System.out.println(\"Choose 0 to repeat the option List\");\n System.out.println(\"Choose 1 to add new Course to the List\");\n System.out.println(\"Choose 2 to edit the exisiting List\");\n System.out.println(\"Choose 3 to quit editing\");\n }",
"private void setEditScheduleButtonsEnabledState()\r\n {\r\n \tint i = scheduleTable.getSelectionIndex(); \r\n \tboolean enableWidgets = ( i != -1 );\r\n \t\r\n\t\teditScheduleButton.setEnabled( enableWidgets );\r\n\t\tdeleteScheduleButton.setEnabled( enableWidgets );\r\n\t\tenableScheduleButton.setEnabled( enableWidgets );\r\n\t\t\r\n\t\teditItem.setEnabled( enableWidgets );\r\n\t\tdeleteItem.setEnabled( enableWidgets );\r\n\t\tenableItem.setEnabled( enableWidgets );\r\n\t\t\r\n\t\tif( i >= 0 && i < schedules.size() ) {\r\n\t\t\tSchedule s = (Schedule) schedules.get( i );\r\n\t\t\tif( s.isEnabled() ) {\r\n\t\t\t\tenableItem.setText( \"Disable Schedule\" );\r\n\t\t\t\tenableScheduleButton.setText( \"Disable Schedule\" );\r\n\t\t\t} else {\r\n\t\t\t\tenableItem.setText( \"Enable Schedule\" );\r\n\t\t\t\tenableScheduleButton.setText( \"Enable Schedule\" );\r\n\t\t\t}\r\n\t\t}\r\n }",
"public void editMode(Movie selectedMovie) {\r\n\r\n if (selectedMovie == null) {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setTitle(\"Edit movie error\");\r\n alert.setHeaderText(\"Oh no!\\nYou did not select a movie to edit.\");\r\n alert.showAndWait();\r\n Stage.getWindows().clear();\r\n\r\n } else {\r\n edit = true;\r\n movieToEdit = selectedMovie;\r\n\r\n // Set existing title.\r\n txtField_title.setText(movieToEdit.getTitle());\r\n\r\n // Set existing category list.\r\n oldCategoryList = movieToEdit.getCategoryList();\r\n catObsList.clear();\r\n catObsList.addAll(oldCategoryList);\r\n\r\n lv_categories.setItems(catObsList);\r\n\r\n // myRating\r\n comboBox_rating.setValue(movieToEdit.getMyRating());\r\n\r\n // IMDbRating\r\n String imdbRatingToEdit = String.valueOf(movieToEdit.getImdbRating());\r\n txtField_imdbRating.setText(imdbRatingToEdit);\r\n\r\n // duration\r\n txtField_duration.setText(movieToEdit.getStringDuration());\r\n\r\n // fileLink\r\n txtField_filePath.setText(movieToEdit.getFileLink());\r\n }\r\n }",
"void setEditButtonEnabled(boolean isEnabled);",
"public void editBtnOnclick()\r\n\t{\r\n\t\tif(cardSet.getCards().size() != 0)\r\n\t\t\tMainRunner.getSceneSelector().switchToCardEditor();\r\n\t}",
"private void selectCourses() {\n\t\tIntent intent = new Intent(this, ActivitySelectCourses.class);\n\t\tstartActivity(intent);\n\t}",
"private void editSubjectList() {\n\t\tIntent myIntent = new Intent(this, SubjectEditActivity.class);\n\n\t\tthis.startActivity(myIntent);\n\t}",
"private void enableScheduleEvent()\r\n {\r\n \tLog.println( \"SpeedSchedulerView.enableScheduleEvent()\", Log.DEBUG );\r\n int i = scheduleTable.getSelectionIndex();\r\n if( i < 0 || i >= schedules.size() )\r\n return;\r\n Schedule s = (Schedule) schedules.get( i );\r\n s.toggleEnabledState();\r\n try {\r\n schedulePersistencyManager.saveSchedules( schedules, defaultMaxUploadRate, defaultMaxDownloadRate );\r\n } catch( IOException e ) {\r\n // TODO Graphical user notification\r\n Log.println( \"Error saving schedule: \" + e.getMessage(), Log.ERROR );\r\n }\r\n refeshScheduleTable( );\r\n scheduleTable.setSelection( i );\r\n }",
"@Test\n public void testSetEnabled() {\n System.out.println(\"setEnabled\");\n boolean newValue = false;\n AbstractJssComboAction instance = new AbstractJssComboActionImpl();\n instance.setEnabled(newValue);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Modifie le texte de la zone de texte | public void modifierZoneTexte(String texte) {
champTexte.setText(texte);
zoneIcar.setMotif(texte);
} | [
"public void modifierZoneAffichage(String texte) {\r\n\t\tzoneAffichage.setText(texte);\r\n\t}",
"@Override\n\t\t\t\t\t\t\tpublic void modifyText(ModifyEvent event1) {\n\t\t\t\t\t\t\t\titem.setText(col, text.getText());\n\n\t\t\t\t\t\t\t}",
"public void setTexte(Text texte) {\n this.texte = texte;\n }",
"void updateText( String text );",
"void setText(String address, String text);",
"public void ajouterTexteAide(String texte) {\r\n\t\tif (bulleAide != null)\r\n\t\t\tbulleAide.setText(\"<HTML><BODY>\" + texte + \"</HTML></BODY>\");\r\n\t}",
"void updateText(String text);",
"private void setText() {\n int wordStartIndex = -1;\n int wordCharLength = 0;\n for (int wordIndex = firstIndex; wordIndex <= lastIndex; wordIndex++) {\n areaInfo = getAreaInfo(wordIndex);\n if (areaInfo.isSpace) {\n addSpaces();\n } else {\n // areaInfo stores information about a word fragment\n if (wordStartIndex == -1) {\n // here starts a new word\n wordStartIndex = wordIndex;\n wordCharLength = 0;\n }\n wordCharLength += areaInfo.getCharLength();\n if (isWordEnd(wordIndex)) {\n addWord(wordStartIndex, wordIndex, wordCharLength);\n wordStartIndex = -1;\n }\n }\n }\n }",
"void agregarMensaje(String msj) {\n Date date = new Date();\n ventana_txt.append(sdf.format(date) +\": \"+ msj +\"\\n\");\n ventana_txt.setCaretPosition(ventana_txt.getText().length() - 1);\n }",
"private void setText(Text text) {\n \t\tthis.text = text;\n \t}",
"public void addTextInWriteArea(String text){\n JEditorPane editorPane = this.writeMessagePanel.getEditorPane();\n \n editorPane.setText(editorPane.getText() + text);\n }",
"ConstructorStandings setPositionText(String positionText);",
"void setContactText();",
"public void writeText() {\n updateTypeface();\n }",
"public static void updateText(String newTxt){\n\t\tif (MainActivity.MY_TEXT!=null) {\n\t\t\tMainActivity.MY_TEXT.setText(newTxt);\n\t\t}\n\t}",
"public void edit(String newText) {\n messageText = newText;\n }",
"private void text() {\n elements.add(SHARED_TEXT_ELEMENT);\n }",
"public void setText(String txt) {\r\n try {\r\n PrintWriter pw = new PrintWriter(new FileWriter(this));\r\n pw.write(txt);\r\n pw.close();\r\n }\r\n catch (Exception ex) {\r\n Log.error(ex);\r\n }\r\n }",
"void setTimeText(String txt);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the Card of Color c and Rank r. | public static Card of(Card.Color c, Card.Rank r) {
return new Card(PackedCard.pack(c, r));
} | [
"public static int pack(Card.Color c, Card.Rank r) {\r\n // Packs the card's rank's ordinal on 4 bits and its color's ordinal on\r\n // 2 bits\r\n return Bits32.pack(r.ordinal(), RANK_SIZE, c.ordinal(), COLOR_SIZE);\r\n }",
"public Card(int s, int r){\n suit = s;\n rank = r;\n }",
"Card(int suit, int rank)\r\n {\r\n this.rank = rank;\r\n this.suit = suit;\r\n }",
"@Override\n public String toString(){\n return \"Card R\" + rank + \" S\" + suit;\n }",
"public String getCardColor(){\n\t\treturn this.color;\n\t}",
"public Color color(){\n return PackedCard.color(this.nbCard);\n }",
"public LinkedList<GoFishCard> getCard(int rank) {\n\t\treturn hand.getCards(rank);\n\t}",
"public CardColor getColor() {\n return this.color;\n }",
"public Rank getRank() {\n return cardRank;\n }",
"public LinkedList<GoFishCard> getCards(int rank) {\n\t\treturn this.hand.findRank(rank);\t\n\t}",
"public Card getCard(Card aCard) {\n\t\tif (aCard != null) {\n\t\t\tfor (Card card: this.cards) \n\t\t\t{\n\t\t\t\tif(card.getRank().equals(aCard.getRank()) && card.getSuit() == aCard.getSuit()) \n\t\t\t\t{\n\t\t\t\t\treturn card;\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public Rank rank(){\n return PackedCard.rank(this.nbCard);\n }",
"private CurrencyColor getSpawnpointColor(int r, int c) {\n if (r == 0){\n return CurrencyColor.RED;\n } else if (c == 0){\n return CurrencyColor.BLUE;\n } else return CurrencyColor.YELLOW;\n }",
"public Card (int aRank , int aSuit)\n {\n this.ranks = aRank;\n this.suits = aSuit;\n }",
"public ColorDevCard getColor() {\n return cardColor;\n }",
"public static Card of(Color color) {\n if (color == null){\n return LOCOMOTIVE;\n } else{\n switch (color) {\n case BLACK: return BLACK;\n case VIOLET: return VIOLET;\n case BLUE: return BLUE;\n case GREEN: return GREEN;\n case YELLOW: return YELLOW;\n case ORANGE: return ORANGE;\n case RED: return RED;\n case WHITE: return WHITE;\n default: throw new Error();\n }\n }\n }",
"public Card get( int c )\n {\n return hand.get( c );\n }",
"Card(int rank, Suit suit)\n {\n this.rank=rank;\n //If less than 11, val=rank, else if rank=14, val=11, else val=10\n val=(rank<11)?rank:((rank==14)?11:10);\n this.suit=suit;\n }",
"public Integer getRedCards() {\n return this.redCards;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'field280' field | public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField280() {
field280 = null;
fieldSetFlags()[280] = false;
return this;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField232() {\n field232 = null;\n fieldSetFlags()[232] = false;\n return this;\n }",
"private void clearFields() {\r\n\t\tmCardNoValue1.setText(\"\");\r\n\t\tmCardNoValue1.setHint(\"-\");\r\n\t\tmCardNoValue2.setText(\"\");\r\n\t\tmCardNoValue2.setHint(\"-\");\r\n\t\tmCardNoValue3.setText(\"\");\r\n\t\tmCardNoValue3.setHint(\"-\");\r\n\t\tmCardNoValue4.setText(\"\");\r\n\t\tmCardNoValue4.setHint(\"-\");\r\n\t\tmZipCodeValue.setText(\"\");\r\n\t\tmZipCodeValue.setHint(\"Zipcode\");\r\n\t\tmCVVNoValue.setText(\"\");\r\n\t\tmCVVNoValue.setHint(\"CVV\");\r\n\t}",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField260() {\n field260 = null;\n fieldSetFlags()[260] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField123() {\n field123 = null;\n fieldSetFlags()[123] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField282() {\n field282 = null;\n fieldSetFlags()[282] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField293() {\n field293 = null;\n fieldSetFlags()[293] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField291() {\n field291 = null;\n fieldSetFlags()[291] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField920() {\n field920 = null;\n fieldSetFlags()[920] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField158() {\n field158 = null;\n fieldSetFlags()[158] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField1010() {\n field1010 = null;\n fieldSetFlags()[1010] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField210() {\n field210 = null;\n fieldSetFlags()[210] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField283() {\n field283 = null;\n fieldSetFlags()[283] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField121() {\n field121 = null;\n fieldSetFlags()[121] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField110() {\n field110 = null;\n fieldSetFlags()[110] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField230() {\n field230 = null;\n fieldSetFlags()[230] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField483() {\n field483 = null;\n fieldSetFlags()[483] = false;\n return this;\n }",
"public void unsetFieldValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FIELDVALUE$2, 0);\n }\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField141() {\n field141 = null;\n fieldSetFlags()[141] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField591() {\n field591 = null;\n fieldSetFlags()[591] = false;\n return this;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
READSITES reads all sites, sort, and compute xmin, xmax, ymin, ymax. | public void readsites() {
int i;
nsites = 0;
sites = new Site[4000];
while (in.hasNextLine()) {
String line = in.nextLine();
StringTokenizer token = new StringTokenizer(line);
sites[nsites] = new Site();
sites[nsites].coord.x = Float.valueOf(token.nextToken());
sites[nsites].coord.y = Float.valueOf(token.nextToken());
sites[nsites].sitenbr = nsites;
sites[nsites].refcnt = 0;
nsites += 1;
if (nsites % 4000 == 0) {
Site[] tempSites = new Site[sites.length];
System.arraycopy(sites, 0, tempSites, 0, sites.length);
sites = new Site[nsites + 4000];
System.arraycopy(tempSites, 0, sites, 0, sites.length);
}
}
// Trimm trailing empty slots.
Site[] temp = new Site[nsites];
System.arraycopy(sites, 0, temp, 0, nsites);
sites = null;
sites = new Site[nsites];
System.err.println("sites length = " + sites.length);
System.arraycopy(temp, 0, sites, 0, sites.length);
Site t = new Site();
QuickSort qsort = new QuickSort(t);
qsort.sort(sites);
xmin = sites[0].coord.x;
xmax = sites[0].coord.x;
for (i = 1; i < nsites; i += 1) {
if (sites[i].coord.x < xmin)
xmin = sites[i].coord.x;
if (sites[i].coord.x > xmax)
xmax = sites[i].coord.x;
}
ymin = sites[0].coord.y;
ymax = sites[nsites - 1].coord.y;
} | [
"private double[] analyzeRange() {\n double ymin = DEFAULT_VALUE;\n double ymax = -1 * DEFAULT_VALUE;\n double xmin = DEFAULT_VALUE;\n double xmax = -1 * DEFAULT_VALUE;\n final double[] rangePixels = new double[NUMBER_VALUES_RANGE];\n for (int i = Graph.LAT_MIN; i <= Graph.LAT_MAX; i++) {\n for (int j = Graph.LONG_MIN; j <= Graph.LONG_MAX; j++) {\n final Point2D.Double point2D = new Point2D.Double();\n try {\n this.getProjection().project(MapMath.degToRad(j), MapMath.degToRad(i), point2D);\n } catch (ProjectionException ex) {\n LOG.log(Level.SEVERE, ex.getMessage());\n }\n\n if (point2D.getY() < ymin) {\n ymin = point2D.getY();\n } else if (point2D.getY() > ymax) {\n ymax = point2D.getY();\n }\n if (point2D.getX() < xmin) {\n xmin = point2D.getX();\n } else if (point2D.getX() > xmax) {\n xmax = point2D.getX();\n }\n }\n }\n rangePixels[X_MIN] = xmin;\n rangePixels[X_MAX] = xmax;\n rangePixels[Y_MIN] = ymin;\n rangePixels[Y_MAX] = ymax;\n return rangePixels;\n }",
"private void prepareSitesInput(double minLon, double maxLon, double minLat,\n double maxLat, double gridSpacing) {\n\n locations = new ArrayList<Location>();\n //GriddedRegion region = new GriddedRegion(minLat,maxLat,minLon,maxLon,gridSpacing);\n GriddedRegion region = new GriddedRegion(\n \t\tnew Location(minLat, minLon),\n \t\tnew Location(maxLat, maxLon),\n \t\tgridSpacing, new Location(0,0));\n\n Iterator<Location> it = region.getNodeList().iterator();\n while(it.hasNext())\n locations.add(it.next());\n }",
"@Override\n\tpublic List<Site> getAllSites() {\n\t\tList<Site> sites = new ArrayList<>();\n\n\t\tString sql = \"SELECT site_id, campground_id, site_number, max_occupancy, accessible, max_rv_length, utilities \"\n\t\t\t\t+ \"FROM site\";\n\n\t\tSqlRowSet results = jdbcTemplate.queryForRowSet(sql);\n\n\t\twhile (results.next()) {\n\t\t\tsites.add(mapRowToSite(results));\n\t\t}\n\t\t// \n\n\t\treturn sites;\n\t}",
"public Region getSiteRegionBounds() {\n int numSources = eqkRupForecast.getNumSources();\n\n double minLat = Double.POSITIVE_INFINITY;\n double maxLat = Double.NEGATIVE_INFINITY;\n double minLon = Double.POSITIVE_INFINITY;\n double maxLon = Double.NEGATIVE_INFINITY;\n\n\n //Going over each and every source in the forecast\n for (int sourceIndex = 0; sourceIndex < numSources; ++sourceIndex) {\n // get the ith source\n ProbEqkSource source = eqkRupForecast.getSource(sourceIndex);\n int numRuptures = source.getNumRuptures();\n\n //going over all the ruptures in the source\n for (int rupIndex = 0; rupIndex < numRuptures; ++rupIndex) {\n ProbEqkRupture rupture = source.getRupture(rupIndex);\n\n RuptureSurface rupSurface = rupture.getRuptureSurface();\n\n //getting the iterator for all points on the rupture\n ListIterator it = rupSurface.getLocationsIterator();\n boolean rupInside = false;\n //looping over all the rupture pt locations and if any of those lies\n //within the provided distance range then include the rupture in the list.\n while (it.hasNext()) {\n Location ptLoc = (Location) it.next();\n if (region.contains(ptLoc)) {\n rupInside = true;\n break;\n }\n }\n it = rupSurface.getLocationsIterator();\n while (it.hasNext() && rupInside) {\n Location ptLoc = (Location) it.next();\n double lat = ptLoc.getLatitude();\n double lon = ptLoc.getLongitude();\n double depth = ptLoc.getDepth();\n if (lat < minLat)\n minLat = lat;\n if (lat > maxLat)\n maxLat = lat;\n if (lon < minLon)\n minLon = lon;\n if (lon > maxLon)\n maxLon = lon;\n if (depth > maxDepth)\n maxDepth = depth;\n }\n }\n }\n return new Region(\n \t\tnew Location(minLat, minLon),\n \t\tnew Location(maxLat, maxLon));\n }",
"List<Site> getSites();",
"@GET(CoreConstant.CORE_PUBLIC_API_V1 + \"/sites\")\n Call<ResultPaging<SiteRepresentation>> listSitesCall();",
"public abstract void getRegions(List<Region> regions, int ax, int ay);",
"public List<IPSAnalyticsQueryResult> getVisitsViewsBySite(\n String sitename, PSDateRange range) throws PSAnalyticsProviderException, IPSGenericDao.LoadException, PSValidationException;",
"public List<String> deserializeSites() {\n Context ctx = getContext();\n //File dir = context.getFilesDir();\n ObjectInputStream in;\n fileSites = new File(ctx.getFilesDir() + File.separator + \"RssUrls.txt\");\n List<String> list = null;\n\n if (fileSites != null && fileSites.exists()) {\n FileInputStream fIn = null;\n ObjectInputStream oIn = null;\n try {\n fIn = new FileInputStream((fileSites));\n oIn = new ObjectInputStream(fIn);\n list = (List<String>) oIn.readObject();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } finally {\n try {\n oIn.close();\n fIn.close();\n } catch (IOException e) {\n progressDialog.setMessage(ctx.getString(R.string.erreurChargement));\n progressDialog.show();\n e.printStackTrace();\n }\n }\n } else {\n list = initializeDefaultSite();\n }\n\n return list;\n }",
"private void initTopAndBottomSites() {\n for (int i = 1; i <= n; i++) {\n uf.union(topSiteIndex, site(1, i));\n uf.union(bottomSiteIndex, site(n, i));\n }\n }",
"public void analyseSet() {\n\t\t\n\t\ttry{\n\n\t\tdouble[] antrub = new double[this.Dim];\n\t\txmin = new double[this.Dim];\n\t\txmax = new double[this.Dim];\n\n\t\tif (Points == null) {\n\t\t\tSystem.out.println(\"DataHolder not filled\");\n\t\t\tSystem.exit(1);\n\n\t\t}\n\n\t\tDataPoint first = Points.get(0);\n\n\t\tfor (int j = 0; j < Dim; j++) {\n\t\t\tantrub[j] = first.getAttribute(j);\n\t\t\txmin[j] = antrub[j];\n\t\t\txmax[j] = antrub[j];\n\t\t}\n\n\t\tfor (int i = 1; i < Points.size(); i++) {\n\t\t\tDataPoint dp = Points.get(i);\n\n\t\t\tfor (int j = 0; j < Dim; j++) {\n\t\t\t\tantrub[j] = dp.getAttribute(j);\n\t\t\t\tif (antrub[j] < xmin[j])\n\t\t\t\t\txmin[j] = antrub[j];\n\t\t\t\tif (antrub[j] > xmax[j])\n\t\t\t\t\txmax[j] = antrub[j];\n\n\t\t\t}\n\t\t}\n\n\t\t// System.out.println(\"Min and Max:\");\n\t\tMin = new DataPoint(xmin, Dim);\n\t\tMax = new DataPoint(xmax, Dim);\n\t\t// Min.showAttributes();\n\t\t// Max.showAttributes();\n\t\t\n\t\t}catch(Exception e){\n\t\t\t\n\t\t}\n\n\t}",
"private float[][] getLatLonRanges(GriddedSet domainSet)\n throws VisADException {\n CoordinateSystem cs = domainSet.getCoordinateSystem();\n float[] his = domainSet.getHi();\n float[] los = domainSet.getLow();\n int dimIndex = averageDim;\n float[][] ranges = null;\n if (cs != null) {\n float[][] latlons = cs.toReference(domainSet.getSamples());\n ranges = Misc.getRanges(latlons);\n } else {\n ranges = Misc.getRanges(domainSet.getSamples(false));\n }\n return ranges;\n }",
"public static void getSortedWebsites()\n\t{\n\t\tsortedURL = new ArrayList<Website>();\n\t\tfor (int i = 0; i < 30; i++)\n\t\t{\n\t\t\tfor (int j = 0; j < websiteList.size(); j++)\n\t\t\t{\n\t\t\t\tif (pageRankList[i] == websiteList.get(j).getScore())\n\t\t\t\t{\n\t\t\t\t\tsortedURL.add(new Website(websiteList.get(j).getWebsite(), websiteList.get(j).getPageRank()));\n\t\t\t\t\twebsiteList.remove(j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < 30; i++)\n\t\t{\n\t\t\tSystem.out.println((i + 1) + \". \" + sortedURL.get(i).getWebsite() + \", PageRank Score: \" + sortedURL.get(i).getScore());\n\t\t}\n\t}",
"private void loadTimeZoneBoundaries() throws IOException\n {\n final CounterWithStatistic counter = new CounterWithStatistic(logger);\n counter.setLogPrintFrequency(LOG_PRINT_FREQUENCY);\n final URL url = TimeZoneMap.class.getResource(\"tz_world.shp\");\n final FileDataStore store = FileDataStoreFinder.getDataStore(url);\n final TimeZoneBoundaryConverter converter = new TimeZoneBoundaryConverter();\n final FeatureIterator<SimpleFeature> iterator = store.getFeatureSource().getFeatures()\n .features();\n try\n {\n while (iterator.hasNext())\n {\n final Feature feature = iterator.next();\n final BoundingBox boundingBox = feature.getBounds();\n final Rectangle featureBound = Rectangle.forLocations(\n new Location(Latitude.degrees(boundingBox.getMinY()),\n Longitude.degrees(boundingBox.getMinX())),\n new Location(Latitude.degrees(boundingBox.getMaxY()),\n Longitude.degrees(boundingBox.getMaxX())));\n // only load overlapped boundaries\n if (this.bound.overlaps(featureBound))\n {\n final TimeZoneBoundary boundary = converter.convert(feature);\n this.index.add(boundary.bounds(), boundary);\n counter.increment();\n }\n }\n }\n finally\n {\n iterator.close();\n store.dispose();\n }\n\n counter.summary();\n logger.info(\"index size is {}\", this.index.size());\n }",
"public ArrayList<NameValuePair> getRangeForXY(String varpath) throws JDOMException {\n ArrayList<NameValuePair> region = new ArrayList<NameValuePair>();\n /*\n * We know this is a variable XPath. If it's \"old style\" fix it.\n */\n if (!varpath.contains(\"@ID\")) {\n String[] parts = varpath.split(\"/\");\n // Throw away index 0 since the string has a leading \"/\".\n varpath = \"/\"+parts[1]+\"/\"+parts[2]+\"/dataset[@ID='\"+parts[3]+\"']/\"+parts[4]+\"/variable[@ID='\"+parts[5]+\"']\";\n }\n Element variable = getElementByXPath(varpath);\n if (variable == null) {\n return region;\n }\n String gridID = variable.getChild(\"grid\").getAttributeValue(\"IDREF\");\n Element grid = getElementByXPath(\"/lasdata/grids/grid[@ID='\"+gridID+\"']\");\n if (grid == null) {\n return region;\n }\n List axes = grid.getChildren(\"axis\");\n for (Iterator axIt = axes.iterator(); axIt.hasNext();) {\n Element axis = (Element) axIt.next();\n String axisID = axis.getAttributeValue(\"IDREF\");\n axis = getElementByXPath(\"/lasdata/axes/axis[@ID='\"+axisID+\"']\");\n String type = axis.getAttributeValue(\"type\");\n if ( type.equals(\"x\") || type.equals(\"y\") ) {\n NameValuePair lo=null;\n NameValuePair hi=null;\n if ( type.equals(\"x\") ) {\n lo = new NameValuePair(\"x_lo\", \"\");\n hi = new NameValuePair(\"x_hi\", \"\");\n } else if ( type.equals(\"y\") ) {\n lo = new NameValuePair(\"y_lo\", \"\");\n hi = new NameValuePair(\"y_hi\", \"\");\n }\n Element arange = axis.getChild(\"arange\");\n if (lo != null && hi != null && arange == null) {\n List v = axis.getChildren(\"v\");\n Element v0 = (Element) v.get(0);\n Element vN = (Element) v.get(v.size()-1);\n lo.setValue(v0.getTextTrim());\n hi.setValue(vN.getTextTrim());\n } else {\n \tif ( lo != null && hi != null ) {\n \t\tString st = arange.getAttributeValue(\"start\");\n \t\tlo.setValue(st);\n \t\tdouble start = Double.valueOf(st).doubleValue();\n \t\tlong step = Long.valueOf(arange.getAttributeValue(\"step\")).longValue();\n \t\tdouble size = Double.valueOf(arange.getAttributeValue(\"size\")).doubleValue();\n \t\tdouble end = start+(size-1)*step;\n \t\thi.setValue(String.valueOf(end));\n \t}\n }\n region.add(lo);\n region.add(hi);\n }\n }\n return region;\n }",
"Set<Location> extractLocations() {\n try {\n Set<Location> extracted = CharStreams.readLines(\n gazetteer,\n new ExtractLocations(populationThreshold)\n );\n\n // Raw population stats doesn't work great in the internet as-is. Calibrate for online activity\n calibrateWeight(extracted);\n\n return extracted;\n\n } catch (IOException e) {\n throw Throwables.propagate(e);\n }\n }",
"public void readBounds() {\n \t\t\tbounds.removeAllElements();\n \t\t\tint i = 0;\n \t\t\ttry {\n \t\t\t\twhile (i < MAX_BOUND_BOXES) {\n \t\t\t\t\tgetFloat(\"region.\" + (i + 1) + \".lat.min\");\n \t\t\t\t\ti++;\n \t\t\t\t}\n \t\t\t} catch (RuntimeException e) {\n \t\t\t\t;\n \t\t\t}\n \n \t\t\tif (i > 0) {\n \t\t\t\tSystem.out.println(\"Found \" + i + \" bound(s)\");\n \t\t\t\tfor (int l = 0; l < i; l++) {\n \t\t\t\t\tBounds bound = new Bounds();\n \t\t\t\t\tbound.extend(getFloat(\"region.\" + (l + 1) + \".lat.min\"),\n \t\t\t\t\t\t\tgetFloat(\"region.\" + (l + 1) + \".lon.min\"));\n \t\t\t\t\tbound.extend(getFloat(\"region.\" + (l + 1) + \".lat.max\"),\n \t\t\t\t\t\t\tgetFloat(\"region.\" + (l + 1) + \".lon.max\"));\n \t\t\t\t\tbounds.add(bound);\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tSystem.out.println(\"NOTE: No bounds were given. This will create a GpsMid\");\n \t\t\t\tSystem.out.println(\" for the whole region contained in \" + planet);\n \t\t\t}\n \t\t}",
"public void getCoords(){\n\t\ttry{\n\t\t\tScanner inn = new Scanner(new File(\"Input_data/coordinates.txt\"));\n\t\t\tint coordsIndex = 0;\n\t\t\twhile(inn.hasNext()){\n\t\t\t\tString[] lest = inn.nextLine().split(\"\\t\");\n\t\t\t\tdouble lat = Double.parseDouble(lest[0]);\n\t\t\t\tdouble lon = Double.parseDouble(lest[1]);\n\t\t\t\tlat = lat / 1000000;\n\t\t\t\tlon = lon / 1000000;\n\t\t\t\tcoords[coordsIndex++] = lat;\n\t\t\t\tcoords[coordsIndex++] = lon;\n\t\t\t}\n\t\t}catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"Kan ikke lese filen coords.txt.\");\n\t\t}\n\t}",
"private static void readSiteConfig() {\n\n\t\ttry(BufferedReader br = new BufferedReader(new FileReader(\"SiteConfiguration.txt\"))) {\n\t\t\twhile (br.ready()) {\n\t\t\t\tString line = br.readLine().strip().toUpperCase();\n\t\t\t\tSite readSite = new Site(line);\n\n\t\t\t\tsites.putIfAbsent(readSite.getSiteName(), readSite);\n\t\t\t}\n\t\t}catch (IOException ioe) {\n\t\t\tlogger.log(Level.WARNING, \"Could not read SiteConfig file properly! \" + ioe);\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads the segment content from the element and fixes any missing sub locType attributes and sub id values. | private String getSegmentValue(Element p_root)
{
StringBuffer result = new StringBuffer();
Element seg = p_root.element("seg");
// TODO for all formats: strip the TMX 1.4 <hi> element.
seg = removeHiElements(seg);
if (m_tmxLevel == ImportUtil.TMX_LEVEL_1)
{
// Level 1: discard any embedded TMX tags.
result.append(EditUtil.encodeXmlEntities(seg.getText()));
}
else if (m_tmxLevel == ImportUtil.TMX_LEVEL_TRADOS_RTF ||
m_tmxLevel == ImportUtil.TMX_LEVEL_TRADOS_HTML)
{
// Trados TMX: converted to native GXML in analysis phase,
// this is a no-op.
result.append(EditUtil.encodeXmlEntities(seg.getText()));
}
else
{
// Level 2 and native: preserve embedded TMX tags.
try
{
// First, ensure we have all G-TMX attributes (i, x, type)
seg = validateSegment(p_root, seg);
// Thu May 15 18:15:26 2003 CvdL
// For now, strip out all sub segments.
seg = removeSubElements(seg);
result.append(ImportUtil.getInnerXml(seg));
}
catch (Throwable ex)
{
// On error, import as level 1.
result.append(EditUtil.encodeXmlEntities(seg.getText()));
}
}
return result.toString();
} | [
"void parseContent()\n\t{\n\t\tFile[] segmentFolders = new File(readDataFolder + \"segments/\").listFiles();\n\t\tfor(File folder: segmentFolders)\n\t\t\tparseSegment(folder.getName());\n\t}",
"private void segment() throws Exception {\r\n char first = data[off];\r\n\r\n if(first == '/') {\r\n throw new PathException(\"Invalid path expression '%s' in %s\", path, type);\r\n }\r\n if(first == '@') {\r\n attribute();\r\n } else {\r\n element();\r\n }\r\n align();\r\n }",
"public ReportSection extractOBXSegment(String obxLine, TextContent textContent)throws Exception\r\n \t{\r\n \t\tReportSection section = new ReportSection();\r\n \t\tString newObxLine = obxLine.replace('|', '~');\r\n \t\tnewObxLine = newObxLine.replaceAll(\"~\", \"|~~\");\r\n \t\tStringTokenizer st = new StringTokenizer(newObxLine, \"|\");\r\n \t\tboolean isFINText = false;\r\n \r\n \t\tfor (int x = 0; st.hasMoreTokens(); x++)\r\n \t\t{\r\n \r\n \t\t\tString field = st.nextToken();\r\n \t\t\tif (field.equals(\"~~\"))\r\n \t\t\t{\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\t\r\n \t\t\t\tfield = field.replaceAll(\"~~\", \"\");\r\n \t\t\t}\t\r\n \t\t\t// token for text section\r\n \t\t\tif ((x == 2) && !(field.equals(Parser.TEXT_SECTION)))\r\n \t\t\t{\r\n \t\t\t\tbreak;\r\n \t\t\t}\r\n \t\t\t// token for name of the section\r\n \t\t\tif (x == Parser.NAME_SECTION_INDEX)\r\n \t\t\t{\r\n \t\t\t\tsection.setName(field);\r\n \t\t\t\tif (field.equals(Parser.FINAL_SECTION))\r\n \t\t\t\t{\r\n \t\t\t\t\tisFINText = true;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\t// token for document fragment\r\n \t\t\tif (x == Parser.DOCUMENT_FRAGMENT_INDEX)\r\n \t\t\t{\r\n \t\t\t\tString text = field;\r\n \t\t\t\ttext = text.replace('\\\\', '~');\r\n \t\t\t\ttext = text.replaceAll(\"~.br~\", \"\\n\");\r\n \t\t\t\tsection.setDocumentFragment(text);\r\n \t\t\t\tif (isFINText)\r\n \t\t\t\t{\t\r\n \t\t\t\t\ttextContent.setData(text);\r\n \t\t\t\t}\t\r\n \t\t\t}\r\n \r\n \t\t}\r\n \t\treturn section;\r\n \t}",
"protected SingleSegmentBase parseSegmentBase(\n XmlPullParser xpp, @Nullable SingleSegmentBase parent)\n throws XmlPullParserException, IOException {\n\n long timescale = parseLong(xpp, \"timescale\", parent != null ? parent.timescale : 1);\n long presentationTimeOffset =\n parseLong(\n xpp, \"presentationTimeOffset\", parent != null ? parent.presentationTimeOffset : 0);\n\n long indexStart = parent != null ? parent.indexStart : 0;\n long indexLength = parent != null ? parent.indexLength : 0;\n String indexRangeText = xpp.getAttributeValue(null, \"indexRange\");\n if (indexRangeText != null) {\n String[] indexRange = indexRangeText.split(\"-\");\n indexStart = Long.parseLong(indexRange[0]);\n indexLength = Long.parseLong(indexRange[1]) - indexStart + 1;\n }\n\n @Nullable RangedUri initialization = parent != null ? parent.initialization : null;\n do {\n xpp.next();\n if (XmlPullParserUtil.isStartTag(xpp, \"Initialization\")) {\n initialization = parseInitialization(xpp);\n } else {\n maybeSkipTag(xpp);\n }\n } while (!XmlPullParserUtil.isEndTag(xpp, \"SegmentBase\"));\n\n return buildSingleSegmentBase(\n initialization, timescale, presentationTimeOffset, indexStart, indexLength);\n }",
"protected void decodeSection0() throws DecoderException {\n boolean isValid = false;\n\n String element = reportParser.getElement();\n isValid = reportPrefix.equals(element);\n if (isValid) {\n reportParser.next();\n setReportIdentifier(reportParser.getElement());\n reportParser.next();\n element = reportParser.getElement();\n if (matchElement(element, ISynoptic.YYGGI_SUB_W)) {\n try {\n Integer month = getHeader().getMonth();\n if (month != -1) {\n setObsMonth(month);\n }\n\n Integer year = getHeader().getYear();\n if (year != -1) {\n setObsYear(year);\n }\n Integer val = getInt(element, 0, 2);\n setObsDay(val);\n\n val = getInt(element, 2, 4);\n setObsHour(val);\n\n val = getInt(element, 4, 5);\n setISubw(val);\n } catch (NumberFormatException nfe) {\n\n }\n isValid = true;\n } else {\n logger.error(\"BAD:YYGGI_SUB_W : \" + reportParser.getReport());\n clearSectionDecoders();\n return;\n }\n logger.info(\"<-------\" + getReportIdentifier()\n + \"---------------->\");\n decodeLatitude();\n decodeLongitude();\n if ((mobileLatitude == null) || (mobileLongitude == null)) {\n clearSectionDecoders();\n return;\n }\n\n adjustLatLon();\n getMarsdenSquareInfo();\n getElevationInfo();\n }\n }",
"public final EObject ruleSegmentStructure() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n EObject lv_elements_1_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:2390:2: ( (otherlv_0= 'SegmentStructure' ( (lv_elements_1_0= ruleSegmentStructureContent ) ) ) )\n // InternalMyDsl.g:2391:2: (otherlv_0= 'SegmentStructure' ( (lv_elements_1_0= ruleSegmentStructureContent ) ) )\n {\n // InternalMyDsl.g:2391:2: (otherlv_0= 'SegmentStructure' ( (lv_elements_1_0= ruleSegmentStructureContent ) ) )\n // InternalMyDsl.g:2392:3: otherlv_0= 'SegmentStructure' ( (lv_elements_1_0= ruleSegmentStructureContent ) )\n {\n otherlv_0=(Token)match(input,57,FOLLOW_59); \n\n \t\t\tnewLeafNode(otherlv_0, grammarAccess.getSegmentStructureAccess().getSegmentStructureKeyword_0());\n \t\t\n // InternalMyDsl.g:2396:3: ( (lv_elements_1_0= ruleSegmentStructureContent ) )\n // InternalMyDsl.g:2397:4: (lv_elements_1_0= ruleSegmentStructureContent )\n {\n // InternalMyDsl.g:2397:4: (lv_elements_1_0= ruleSegmentStructureContent )\n // InternalMyDsl.g:2398:5: lv_elements_1_0= ruleSegmentStructureContent\n {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getSegmentStructureAccess().getElementsSegmentStructureContentParserRuleCall_1_0());\n \t\t\t\t\n pushFollow(FOLLOW_2);\n lv_elements_1_0=ruleSegmentStructureContent();\n\n state._fsp--;\n\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getSegmentStructureRule());\n \t\t\t\t\t}\n \t\t\t\t\tadd(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"elements\",\n \t\t\t\t\t\tlv_elements_1_0,\n \t\t\t\t\t\t\"org.xtext.example.mydsl.MyDsl.SegmentStructureContent\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"private int processDirectSubPartData (byte[] buf, int offset, int len) throws IOException\n {\n if (!_directSubPart)\n throw new StreamCorruptedException(\"Not direct sub-part data mode to process for ID=\" + getCurrentPartId());\n\n // if have the parent's MIME boundary, then use it to hunt for the end\n if (_mmDelimiter.isBoundarySet())\n return processMIMEBoundaryData(buf, offset, len);\n\n _streamOffset += len;\n return len;\n }",
"private void element() throws Exception { \r\n int mark = off;\r\n int size = 0;\r\n \r\n while(off < count) { \r\n char value = data[off++];\r\n \r\n if(!isValid(value)) {\r\n if(value == '@') {\r\n off--;\r\n break;\r\n } else if(value == '[') {\r\n index(); \r\n break;\r\n } else if(value != '/') { \r\n throw new PathException(\"Illegal character '%s' in element for '%s' in %s\", value, path, type);\r\n } \r\n break;\r\n }\r\n size++; \r\n }\r\n element(mark, size);\r\n }",
"private void parseSplitPoint(final Attributes attributes) {\n if (attributes.getValue(\"id\") != null) {\n String curSplitPoint = attributes.getValue(\"id\");\n if (attributes.getValue(\"location\") != null) {\n String curSplitPointLocation = attributes.getValue(\"location\");\n\n curSplitPointLocation = curSplitPointLocation.replaceAll(\"\\\\(L.*\",\n \"\");\n\n globalInformation.addFragmentDescriptor(\n Integer.parseInt(curSplitPoint), curSplitPointLocation);\n }\n }\n }",
"private void importLocation(IXMLElement xml) throws XMLFormatException{\n\t\tif (!xml.getName().equals(\"view\"))\n\t\t\tthrow new XMLFormatException(\"Root element must be <view>\");\n\t\tEnumeration children = xml.enumerateChildren();\n\t\twhile (children.hasMoreElements()){\n\t\t\tIXMLElement child = (IXMLElement)children.nextElement();\n\t\t\tif (child.getName().equals(\"location\")){\n\t\t\t\tlocation.importXML(child);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"private void Fix()\n\t{\n\t\tfor (int i = 0; i < annotationPaths.size(); i++)\n\t\t{\n\t\t\tString xmlPath = annotationPaths.get(i).toString();\n\t\t\t//if (!xmlPath.endsWith(\"PMC3173667_kcj-41-464-g006_data.xml\")) continue;\n\t\t\t\n\t\t\tFile annotationFile = new File(xmlPath);\n\t\t\t//Load annotation\n\t\t\ttry {\n\t\t\t\tfixPanelSegGt(annotationFile);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"protected void parseCDSect(boolean hadCharData)\n throws XmlPullParserException, IOException {\n char ch = more();\n if (ch != 'C') throw new XmlPullParserException(\n \"expected <[CDATA[ for comment start\", this, null);\n ch = more();\n if (ch != 'D') throw new XmlPullParserException(\n \"expected <[CDATA[ for comment start\", this, null);\n ch = more();\n if (ch != 'A') throw new XmlPullParserException(\n \"expected <[CDATA[ for comment start\", this, null);\n ch = more();\n if (ch != 'T') throw new XmlPullParserException(\n \"expected <[CDATA[ for comment start\", this, null);\n ch = more();\n if (ch != 'A') throw new XmlPullParserException(\n \"expected <[CDATA[ for comment start\", this, null);\n ch = more();\n if (ch != '[') throw new XmlPullParserException(\n \"expected <![CDATA[ for comment start\", this, null);\n\n //if(tokenize) {\n final int cdStart = pos + bufAbsoluteStart;\n final int curLine = lineNumber;\n final int curColumn = columnNumber;\n final boolean normalizeInput = tokenize == false || roundtripSupported == false;\n try {\n if (normalizeInput) {\n if (hadCharData) {\n if (!usePC) {\n // posEnd is correct already!!!\n if (posEnd > posStart) {\n joinPC();\n } else {\n usePC = true;\n pcStart = pcEnd = 0;\n }\n }\n }\n }\n boolean seenBracket = false;\n boolean seenBracketBracket = false;\n boolean normalizedCR = false;\n while (true) {\n // scan until it hits \"]]>\"\n ch = more();\n if (ch == ']') {\n if (!seenBracket) {\n seenBracket = true;\n } else {\n seenBracketBracket = true;\n //seenBracket = false;\n }\n } else if (ch == '>') {\n if (seenBracket && seenBracketBracket) {\n break; // found end sequence!!!!\n } else {\n seenBracketBracket = false;\n }\n seenBracket = false;\n } else {\n if (seenBracket) {\n seenBracket = false;\n }\n }\n if (normalizeInput) {\n // deal with normalization issues ...\n if (ch == '\\r') {\n normalizedCR = true;\n posStart = cdStart - bufAbsoluteStart;\n posEnd = pos - 1; // posEnd is alreadys set\n if (!usePC) {\n if (posEnd > posStart) {\n joinPC();\n } else {\n usePC = true;\n pcStart = pcEnd = 0;\n }\n }\n //assert usePC == true;\n if (pcEnd >= pc.length) ensurePC(pcEnd);\n pc[pcEnd++] = '\\n';\n } else if (ch == '\\n') {\n if (!normalizedCR && usePC) {\n if (pcEnd >= pc.length) ensurePC(pcEnd);\n pc[pcEnd++] = '\\n';\n }\n normalizedCR = false;\n } else {\n if (usePC) {\n if (pcEnd >= pc.length) ensurePC(pcEnd);\n pc[pcEnd++] = ch;\n }\n normalizedCR = false;\n }\n }\n }\n } catch (EOFException ex) {\n // detect EOF and create meaningful error ...\n throw new XmlPullParserException(\n \"CDATA section started on line \" + curLine + \" and column \" + curColumn + \" was not closed\",\n this, ex);\n }\n if (normalizeInput) {\n if (usePC) {\n pcEnd = pcEnd - 2;\n }\n }\n posStart = cdStart - bufAbsoluteStart;\n posEnd = pos - 3;\n }",
"private List<String[]> parse(XmlPullParser xmlData) throws XmlPullParserException, IOException {\n List<String[]> segments = new ArrayList<>();\n int resType = Constants.Resolutions.NONE;\n\n int eventType = xmlData.getEventType();\n while (eventType != XmlResourceParser.END_DOCUMENT) {\n String tagName = xmlData.getName();\n Log.i(\"Log134\", \"type: \" + eventType + \"; name: \" + (tagName == null? \"null\" : tagName));\n\n switch (eventType) {\n case XmlResourceParser.START_TAG:\n // Start of a record, so pull values encoded as attributes.\n if (tagName!= null && tagName.equals(Constants.XMLNames.Tags.REPRESENTATION)) {\n int width = Integer.parseInt(xmlData.getAttributeValue(null, \"width\"));\n switch (width){\n case Constants.Resolutions.Dimensions.LOW:\n resType = Constants.Resolutions.LOW;\n break;\n case Constants.Resolutions.Dimensions.MID:\n resType = Constants.Resolutions.MID;\n break;\n case Constants.Resolutions.Dimensions.HIGH:\n resType = Constants.Resolutions.HIGH;\n break;\n }\n\n } else if(tagName!= null && tagName.equals(Constants.XMLNames.Tags.SEGMENT_URL)) {\n String fileName = xmlData.getAttributeValue(null, Constants.XMLNames.Attributes.MEDIA);\n int seg_no = Integer.parseInt(fileName.split(\"_\")[0]);\n if(segments.size() <= seg_no) {\n // We may need to create the String Array\n for(int i = segments.size(); i <= seg_no; i++) {\n segments.add(new String[3]);\n }\n }\n String[] segmentResolutions = segments.get(seg_no);\n segmentResolutions[resType] = vidId + \"/\" + fileName;\n }\n break;\n }\n eventType = xmlData.next();\n }\n\n return segments;\n }",
"@Override\n public void unpackMarkup(Document doc) throws DocumentFormatException {\n unpackMarkup(doc, (RepositioningInfo)null, (RepositioningInfo)null);\n }",
"protected void handleParseValue(FieldsSet inheritFrom, int field,\n String substr) {\n parseValueDefault(inheritFrom, field, substr);\n }",
"public void handleInheritance() {\n if (resource instanceof InformationResource) {\n InformationResource ir = (InformationResource) resource;\n\n if (ir.isInheritingInvestigationInformation()) {\n setInvestigationTypeIds(null);\n }\n if (ir.isInheritingSiteInformation()) {\n setSiteNameKeywords(null);\n setApprovedSiteTypeKeywordIds(null);\n setUncontrolledSiteTypeKeywords(null);\n }\n if (ir.isInheritingMaterialInformation()) {\n setApprovedMaterialKeywordIds(null);\n setUncontrolledMaterialKeywords(null);\n }\n if (ir.isInheritingCulturalInformation()) {\n setApprovedCultureKeywordIds(null);\n setUncontrolledCultureKeywords(null);\n }\n if (ir.isInheritingSpatialInformation()) {\n setLatitudeLongitudeBoxes(null);\n setGeographicKeywords(null);\n }\n if (ir.isInheritingTemporalInformation()) {\n setTemporalKeywords(null);\n setCoverageDates(null);\n }\n if (ir.isInheritingOtherInformation()) {\n setOtherKeywords(null);\n }\n\n if (ir.isInheritingIndividualAndInstitutionalCredit()) {\n if (CollectionUtils.isNotEmpty(getCreditProxies())) {\n getCreditProxies().clear();\n }\n }\n\n if (ir.isInheritingCollectionInformation()) {\n if (CollectionUtils.isNotEmpty(getRelatedComparativeCollections())) {\n getRelatedComparativeCollections().clear();\n }\n if (CollectionUtils.isNotEmpty(getSourceCollections())) {\n getSourceCollections().clear();\n }\n }\n\n if (ir.isInheritingNoteInformation()) {\n if (CollectionUtils.isNotEmpty(getResourceNotes())) {\n getResourceNotes().clear();\n }\n }\n\n if (ir.isInheritingIdentifierInformation()) {\n if (CollectionUtils.isNotEmpty(getIncomingAnnotations())) {\n getIncomingAnnotations().clear();\n }\n }\n }\n }",
"private Element removeSubElements(Element p_seg)\n {\n ArrayList elems = new ArrayList();\n\n findSubElements(elems, p_seg);\n\n for (int i = 0; i < elems.size(); i++)\n {\n Element sub = (Element)elems.get(i);\n\n removeSubElement(sub);\n }\n\n return p_seg;\n }",
"public void parse(){\n\n Integer childStart = this.findNewElement(0, this.document.length - 1);\n if(childStart == null){\n return;\n }\n\n this.root.removeData();\n this.copyTextToDocumentTree(this.root, 0, childStart - 1);\n\n DocumentSectionType childType = this.getType(childStart);\n\n do {\n Integer end = this.findNextSameLevelElement(childStart + 1, childType);\n //now we have boundaries of our new element, so let's grab it's index\n //we need appropriate matcher\n\n Matcher childMatcher = childType.getPattern().matcher(this.document[childStart]);\n childMatcher.find();\n DocumentTree child = new DocumentTree(childType, childMatcher.group(1), null);\n\n //now clear first line\n try{\n String group2 = childMatcher.group(2);\n this.document[childStart] = group2 != null ? group2 + \" \" : \"\";\n }catch(IndexOutOfBoundsException e){\n this.document[childStart] = \"\";\n }\n try {\n this.document[childStart] += childMatcher.group(3);\n }catch(IndexOutOfBoundsException e){\n this.document[childStart] += \"\";\n }\n //and copy it's text\n this.copyTextToDocumentTree(child, childStart, end - 1);\n root.addChild(child);\n //finally, parse it\n DocumentParser childParser = new DocumentParser(child, joinChapterWithChapterNames);\n childParser.parse();\n\n childStart = end;\n }while(childStart != this.document.length);\n\n if(this.root.getType() == DocumentSectionType.CHAPTER && this.joinChapterWithChapterNames){\n DocumentTree nameNode = (DocumentTree)this.root.getChildren().get(0);\n this.root.removeData();\n this.root.appendData(nameNode.getIndex());\n this.root.replaceChild(nameNode, nameNode.getChildren());\n }\n\n }",
"void visitElement_subcomponent(org.w3c.dom.Element element) { // <subcomponent>\n // element.getValue();\n org.w3c.dom.NamedNodeMap attrs = element.getAttributes();\n for (int i = 0; i < attrs.getLength(); i++) {\n org.w3c.dom.Attr attr = (org.w3c.dom.Attr)attrs.item(i);\n if (attr.getName().equals(\"name\")) { // <subcomponent name=\"???\">\n component.subcomponents.add(attr.getValue());\n }\n }\n org.w3c.dom.NodeList nodes = element.getChildNodes();\n for (int i = 0; i < nodes.getLength(); i++) {\n org.w3c.dom.Node node = nodes.item(i);\n switch (node.getNodeType()) {\n case org.w3c.dom.Node.CDATA_SECTION_NODE:\n // ((org.w3c.dom.CDATASection)node).getData();\n break;\n case org.w3c.dom.Node.ELEMENT_NODE:\n org.w3c.dom.Element nodeElement = (org.w3c.dom.Element)node;\n break;\n case org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE:\n // ((org.w3c.dom.ProcessingInstruction)node).getTarget();\n // ((org.w3c.dom.ProcessingInstruction)node).getData();\n break;\n }\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is the constructor of the QuizScreen class which sets up the dimensions, background colour, initial buttons, the pane, where it starts off (location) in the screen, and also adds a window listener. | public QuizScreen() {
super("Quiz Screen");
pane.setPreferredSize(new Dimension(850,400));
pane.setBackground(new Color(114,222,149));
layoutz = new SpringLayout();
pane.setLayout(layoutz);
add(pane);
pack();
setLocationRelativeTo(null);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent windowEvent) {
done = true;
}
});
initLabels();
loadQuizScreen();
setVisible(true);
} | [
"public QuizUi() {\n super(FXML);\n this.logic = GlobalState.getInstance().getLogic();\n this.responsePopUp = GlobalState.getInstance().getResponsePopUp();\n\n flashcardSetListPanel = new FlashcardSetListPanel();\n flashcardSetListPanelPlaceholder.getChildren().add(flashcardSetListPanel.getRoot());\n\n resultDisplay = new QuizCard();\n quizCard.getChildren().add(resultDisplay.getRoot());\n\n quizScoreDisplay = new QuizScoreCard(); // initiate quiz score display first\n\n CommandBox commandBox = new CommandBox(this::executeCommand);\n commandBoxPlaceholder.getChildren().add(commandBox.getRoot());\n GlobalState globalState = GlobalState.getInstance();\n globalState.setQuizCommandBox(commandBox);\n\n // set up listeners\n uiStateListener = new UiStateListener();\n commandResultStateListener = new CommandResultStateListener();\n uiStateListener.onChange(actionOnUiStateChange);\n commandResultStateListener.onChange(actionOnCommandResultChange);\n }",
"public QuizGUI() {\n initComponents();\n \n }",
"public MyScreen() {\n\t\t// this is current instance, setters are mutator methods which change properties\n\t\tthis.setSize(1200,1000);\n\t\tthis.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\tthis.setVisible(true);\n\t}",
"public QuestionnaireScreen() {\n initComponents();\n }",
"public Aquarium() {\n\t\t// Here we ask GFX to make our window of size WIDTH and HEIGHT.\n\t\t// Don't change this here, edit the variables instead.\n\t\tsuper(WIDTH, HEIGHT);\n\t\t\n\t}",
"public void initUI() {\n\t\tadd(board);\r\n\t\t//Set if frame is resizable by user\r\n\t\tsetResizable(false);\r\n\t\t//call pack method to fit the \r\n\t\t//preferred size and layout of subcomponents\r\n\t\t//***important head might not work correctly with collision of bottom and right borders\r\n\t\tpack();\r\n\t\t//set title for frame\r\n\t\tsetTitle(\"Snake\");\r\n\t\t//set location on screen(null centers it)\r\n\t\tsetLocationRelativeTo(null);\r\n\t\t//set default for close button of frame\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}",
"private void setupWindow() {\n\n // Set frame's properties\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setTitle(Application.Settings.getString(ConfigKeys.MainView.TITLE));\n setSize(Application.Settings.getDimension(ConfigKeys.MainView.SIZE));\n\n // Set the initial state for the actions...\n toggleNoItemSelectedActions();\n\n }",
"public void setupGUIWindow()\n { \n// _frame.setExtendedState(Frame.MAXIMIZED_BOTH);\n// exitOnClose(); \n// createButtonGrid(); \n// addButtonPanel(); \n \n\t //setSize(new Dimension(Toolkit.getDefaultToolkit().getScreenSize())); \n \n\t _frame.setExtendedState(Frame.MAXIMIZED_BOTH);\n\t _frame.addComponentListener(new WindowListener());\n\t exitOnClose(); \n\t createShipPlacementButton();\n\t createButtonGrid(_displayPanel, _buttonGrid2, null); // player\n\t createButtonGrid(_buttonPanel, _buttonGrid, new GridListener(_buttonGrid)); // enemy\n\t addButtonPanel(); \n }",
"public TutorialScreen() {\n initComponents();\n }",
"public MainScreen() {\n initComponents();\n }",
"public CustomizationScreen(int width, int height) {\n this.width = width;\n this.height = height;\n\n hasSelectionIssue = false;\n\n setupTitleScreenItem();\n setupPlayerImageSprite();\n setupNameFieldScreenItem();\n setupDifficultyScreenItem();\n setupWeaponSelectionScreenItem();\n setupFinishedButtonScreenItem();\n setupAlertScreenItem();\n setupTwoButtonHBox();\n\n setupCustomizationVBox();\n setupImageCustomizeBox();\n setupScreenBox();\n }",
"private void setupGUI() \n { \t\n this.setLayout(null);\n \n //Initializes this CheckerFrame into memory.---------------------------\n this.setIconImage(new ImageIcon(getClass().getResource(\"/images/icon.jpg\")).getImage()); \n \n this.setResizable(false);\n this.setTitle(\"Play Checkers\");\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setSize(508,520);\n this.setLocation(\n \t\t\t(int)getToolkit().getScreenSize().getWidth()/2-254,\n \t\t\t(int)getToolkit().getScreenSize().getHeight()/2-310\n \t\t\t\t); \n this.setVisible(true);\n \n gamePanel.setBounds(0,0,508,520);//400,401\n \n //Initializes the start button into memory.----------------------------\n startButton.setHorizontalAlignment(SwingConstants.LEADING); \n startButton.setIcon(new ImageIcon(getClass().getResource(\"/images/checkersIcon.jpg\")));\n startButton.setBackground(Color.LIGHT_GRAY);\n startButton.setCursor(new Cursor(Cursor.HAND_CURSOR)); \n startButton.setBounds(154, 415, 236, 60);\n startButton.setFont(new Font(\"Times new roman\",Font.BOLD,20));\n startButton.addActionListener(this);\n startButton.setFocusPainted(false);\n \n gamePanel.add(startButton);\n \n this.add(gamePanel);\n }",
"public SetQuestionsFrame() {\n initComponents();\n this.setLocationRelativeTo(null);\n hellotxt.setText(\"Hello \"+UserProfile.getUsername());\n qStore = new QuestionStore();\n options = new HashMap<>();\n options.put(\"Option 1\", \"Answer 1\");\n options.put(\"Option 2\", \"Answer 2\");\n options.put(\"Option 3\", \"Answer 3\");\n options.put(\"Option 4\", \"Answer 4\");\n qno = 1;\n lblQuesNo.setText(lblQuesNo.getText()+qno);\n btnDone.setEnabled(false);\n }",
"public QuanLyJFrame() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public ProblemScreen(){\n initComponents();\n setLocationRelativeTo(null);\n }",
"public void initScreen(){\r\n\t\tStdDraw.setCanvasSize(800, 600);\r\n\t\tStdDraw.setXscale(0, 10.0);\r\n\t\tStdDraw.setYscale(0, 10.0);\r\n\t\trefreshScreen();\r\n\t}",
"public SimulationWindow() {\n initComponents();\n makeFrameFullSize();\n createSimulationTab();\n }",
"public ApplicationWindow() {\n initComponents();\n setResizable(false);\n addExitListener();\n }",
"public StartScreen() {\n initComponents();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets user cnt halfyear. | public String getUserCntHalfyear( ) {
return this.userCntHalfyear;
} | [
"public void setUserCntHalfyear(String userCntHalfyear) {\n\t\tthis.userCntHalfyear = userCntHalfyear;\n\t}",
"public int getUpperYear()\r\n {\r\n return getInt(UpperYear_, 0);\r\n }",
"int getYears();",
"Integer getTHunYear();",
"public int getFullYearsCount() {\r\n int ifreq = m_freq.intValue();\r\n int start = m_beg;\r\n int pos = start % ifreq;\r\n if (pos > 0) {\r\n start += ifreq - pos;\r\n }\r\n int end = m_beg + m_c;\r\n end -= end % ifreq;\r\n return (end - start) / ifreq;\r\n }",
"Integer getTenYear();",
"public int getSecondsintoyear() {\n return secondsintoyear_;\n }",
"public static int getYearOfBirth() {\n return yob;\n }",
"public int getYearsAtCollege(){\n return Period.between(hireDate, LocalDate.now()).getYears();\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getYearInClaimsMade();",
"int getYearOfCentury();",
"@Override\n\tpublic int getYear() {\n\t\treturn _esfShooterAffiliationChrono.getYear();\n\t}",
"static int countingCentury(int year) {\n\t\n\treturn year/100 + 1;\n\t}",
"public int getNumberOfYears() {\n return numberOfYears;\n }",
"public int getYearBorn(){\n return birthday.getYear();\n }",
"int getSecondsintoyear();",
"public int getYear();",
"int getYearEnrolled() {\r\n return this.dateOfEnrol.getYear(); \r\n }",
"public int getYears() { return years; }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
True if has "agenthost" attribute | public boolean isSetAgenthost()
{
synchronized (monitor())
{
check_orphaned();
return get_store().find_attribute_user(AGENTHOST$6) != null;
}
} | [
"public boolean isSetAgentName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(AGENTNAME$20) != null;\n }\n }",
"public boolean isSetHost() {\r\n return this.host != null;\r\n }",
"public boolean isSetAgentId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(AGENTID$8) != null;\n }\n }",
"public boolean isSetHost() {\n return this.host != null;\n }",
"public boolean is_set_host() {\n return this.host != null;\n }",
"public boolean is_set_hostname() {\n return this.hostname != null;\n }",
"public boolean isSetServerHost() {\r\n return this.serverHost != null;\r\n }",
"public boolean hasHost()\n {\n String host = this.smtpProps.getString(KEY_SERVER_HOST,null);\n return !StringTools.isBlank(host)? true : false;\n }",
"public boolean hasMonitoringHost() {\n return fieldSetFlags()[5];\n }",
"public abstract boolean knowsAgentLocally ( long agentId );",
"public boolean hasHostIdentifiers() {\n return fieldSetFlags()[2];\n }",
"public boolean hasHostname() {\n return fieldSetFlags()[2];\n }",
"public boolean isSetAgentgroup()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(AGENTGROUP$8) != null;\r\n }\r\n }",
"boolean hasSalesforceLiveAgentConfig();",
"public String getAgentHost() {\n return (String)getAttributeInternal(AGENTHOST);\n }",
"public static boolean isJavaAgentAttached() {\n return SubprocessUtil.getVMCommandLine().stream().anyMatch(args -> args.startsWith(\"-javaagent\"));\n }",
"public boolean hasAgentcall()\n {\n return this._has_agentcall;\n }",
"public boolean isSetHostname() {\n return this.hostname != null;\n }",
"public IDiogenAgent getHostAgent() {\n return this.hostAgent;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sets the int employee ID | public void setEmployeeID(int employeeID) {
this.employeeID = employeeID;
} | [
"private void setEmployeeID() {\n try {\n employeeID = userModel.getEmployeeID(Main.getCurrentUser());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"public void setEmployeeId(Number value) {\r\n setAttributeInternal(EMPLOYEEID, value);\r\n }",
"public void setEmployeeId(Number value) {\n setAttributeInternal(EMPLOYEEID, value);\n }",
"public void setIdEmployees(int idEmployees) {\n this.idEmployees = idEmployees;\n }",
"private int setEmployeeID() {\n\t\tint employeeId = (int) (Math.random() * Math.pow(10, 4));\n\t\treturn employeeId;\n\t}",
"public void setIdEmpClie(int value) {\n this.idEmpClie = value;\n }",
"public void setEmployee(int idNum)\n {\n try\n {\n this.selectedEmployee = this.selectedEmployee.getEmployee(idNum);\n }\n catch (Exception anExcept)\n {\n System.out.print(\"setSelectedEployee Error: \" + anExcept);\n }\n }",
"public void setEmployeeId(long employeeId) {\n this.employeeId = employeeId;\n }",
"public void setEmployeeId(Long value) {\n setAttributeInternal(EMPLOYEEID, value);\n }",
"public void setEmpId(int empId) {\n this.empId = empId;\n }",
"@Override\n\tpublic void setEmpId(long empId) {\n\t\t_employee.setEmpId(empId);\n\t}",
"public void setEmpId(Integer empId) {\n this.empId = empId;\n }",
"@Override\n\tpublic void setEmployeeId(long employeeId) {\n\t\t_userSync.setEmployeeId(employeeId);\n\t}",
"public int getEmployeeId() {\r\n\t\r\n\t\treturn employeeId;\r\n\t}",
"public void setEmployeeIDNum(String employeeIDNum) {\n this.employeeIDNum = employeeIDNum;\n }",
"@Override\n public void setEmployeeId(long employeeId) {\n _employeeInterviewSchedule.setEmployeeId(employeeId);\n }",
"public void setEmployees(int _employees){\n employees = _employees;\n }",
"public void setEmployeePersonId(Number value) {\n setAttributeInternal(EMPLOYEEPERSONID, value);\n }",
"private void setEmpNumber() {\n int tmp = checkToInteger(empNumberTextField.getText());\n if(tmp != -1) {\n this.empNumber = tmp;\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__SitProp__OSituationNameAssignment_1_2" $ANTLR start "rule__SitProp__IntervalsAssignment_1_4" InternalSymboleoide.g:10452:1: rule__SitProp__IntervalsAssignment_1_4 : ( ruleInterval ) ; | public final void rule__SitProp__IntervalsAssignment_1_4() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalSymboleoide.g:10456:1: ( ( ruleInterval ) )
// InternalSymboleoide.g:10457:2: ( ruleInterval )
{
// InternalSymboleoide.g:10457:2: ( ruleInterval )
// InternalSymboleoide.g:10458:3: ruleInterval
{
before(grammarAccess.getSitPropAccess().getIntervalsIntervalParserRuleCall_1_4_0());
pushFollow(FOLLOW_2);
ruleInterval();
state._fsp--;
after(grammarAccess.getSitPropAccess().getIntervalsIntervalParserRuleCall_1_4_0());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__SitProp__IntervalsAssignment_2_4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:10486:1: ( ( ruleInterval ) )\n // InternalSymboleoide.g:10487:2: ( ruleInterval )\n {\n // InternalSymboleoide.g:10487:2: ( ruleInterval )\n // InternalSymboleoide.g:10488:3: ruleInterval\n {\n before(grammarAccess.getSitPropAccess().getIntervalsIntervalParserRuleCall_2_4_0()); \n pushFollow(FOLLOW_2);\n ruleInterval();\n\n state._fsp--;\n\n after(grammarAccess.getSitPropAccess().getIntervalsIntervalParserRuleCall_2_4_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__SitProp__IntervalsAssignment_0_4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:10426:1: ( ( ruleInterval ) )\n // InternalSymboleoide.g:10427:2: ( ruleInterval )\n {\n // InternalSymboleoide.g:10427:2: ( ruleInterval )\n // InternalSymboleoide.g:10428:3: ruleInterval\n {\n before(grammarAccess.getSitPropAccess().getIntervalsIntervalParserRuleCall_0_4_0()); \n pushFollow(FOLLOW_2);\n ruleInterval();\n\n state._fsp--;\n\n after(grammarAccess.getSitPropAccess().getIntervalsIntervalParserRuleCall_0_4_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__SitProp__IntervalsAssignment_3_4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:10516:1: ( ( ruleInterval ) )\n // InternalSymboleoide.g:10517:2: ( ruleInterval )\n {\n // InternalSymboleoide.g:10517:2: ( ruleInterval )\n // InternalSymboleoide.g:10518:3: ruleInterval\n {\n before(grammarAccess.getSitPropAccess().getIntervalsIntervalParserRuleCall_3_4_0()); \n pushFollow(FOLLOW_2);\n ruleInterval();\n\n state._fsp--;\n\n after(grammarAccess.getSitPropAccess().getIntervalsIntervalParserRuleCall_3_4_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Atom__IntervalsAssignment_3_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:10287:1: ( ( ruleInterval ) )\n // InternalSymboleoide.g:10288:2: ( ruleInterval )\n {\n // InternalSymboleoide.g:10288:2: ( ruleInterval )\n // InternalSymboleoide.g:10289:3: ruleInterval\n {\n before(grammarAccess.getAtomAccess().getIntervalsIntervalParserRuleCall_3_2_0()); \n pushFollow(FOLLOW_2);\n ruleInterval();\n\n state._fsp--;\n\n after(grammarAccess.getAtomAccess().getIntervalsIntervalParserRuleCall_3_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Atom__IntervalsAssignment_2_5_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:10257:1: ( ( ruleInterval ) )\n // InternalSymboleoide.g:10258:2: ( ruleInterval )\n {\n // InternalSymboleoide.g:10258:2: ( ruleInterval )\n // InternalSymboleoide.g:10259:3: ruleInterval\n {\n before(grammarAccess.getAtomAccess().getIntervalsIntervalParserRuleCall_2_5_1_0()); \n pushFollow(FOLLOW_2);\n ruleInterval();\n\n state._fsp--;\n\n after(grammarAccess.getAtomAccess().getIntervalsIntervalParserRuleCall_2_5_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Interval__Alternatives() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:1445:1: ( ( ( rule__Interval__SituationNameAssignment_0 ) ) | ( ( rule__Interval__Group_1__0 ) ) | ( ( rule__Interval__Group_2__0 ) ) | ( ( rule__Interval__Group_3__0 ) ) | ( ( rule__Interval__Group_4__0 ) ) )\n int alt9=5;\n alt9 = dfa9.predict(input);\n switch (alt9) {\n case 1 :\n // InternalSymboleoide.g:1446:2: ( ( rule__Interval__SituationNameAssignment_0 ) )\n {\n // InternalSymboleoide.g:1446:2: ( ( rule__Interval__SituationNameAssignment_0 ) )\n // InternalSymboleoide.g:1447:3: ( rule__Interval__SituationNameAssignment_0 )\n {\n before(grammarAccess.getIntervalAccess().getSituationNameAssignment_0()); \n // InternalSymboleoide.g:1448:3: ( rule__Interval__SituationNameAssignment_0 )\n // InternalSymboleoide.g:1448:4: rule__Interval__SituationNameAssignment_0\n {\n pushFollow(FOLLOW_2);\n rule__Interval__SituationNameAssignment_0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getIntervalAccess().getSituationNameAssignment_0()); \n\n }\n\n\n }\n break;\n case 2 :\n // InternalSymboleoide.g:1452:2: ( ( rule__Interval__Group_1__0 ) )\n {\n // InternalSymboleoide.g:1452:2: ( ( rule__Interval__Group_1__0 ) )\n // InternalSymboleoide.g:1453:3: ( rule__Interval__Group_1__0 )\n {\n before(grammarAccess.getIntervalAccess().getGroup_1()); \n // InternalSymboleoide.g:1454:3: ( rule__Interval__Group_1__0 )\n // InternalSymboleoide.g:1454:4: rule__Interval__Group_1__0\n {\n pushFollow(FOLLOW_2);\n rule__Interval__Group_1__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getIntervalAccess().getGroup_1()); \n\n }\n\n\n }\n break;\n case 3 :\n // InternalSymboleoide.g:1458:2: ( ( rule__Interval__Group_2__0 ) )\n {\n // InternalSymboleoide.g:1458:2: ( ( rule__Interval__Group_2__0 ) )\n // InternalSymboleoide.g:1459:3: ( rule__Interval__Group_2__0 )\n {\n before(grammarAccess.getIntervalAccess().getGroup_2()); \n // InternalSymboleoide.g:1460:3: ( rule__Interval__Group_2__0 )\n // InternalSymboleoide.g:1460:4: rule__Interval__Group_2__0\n {\n pushFollow(FOLLOW_2);\n rule__Interval__Group_2__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getIntervalAccess().getGroup_2()); \n\n }\n\n\n }\n break;\n case 4 :\n // InternalSymboleoide.g:1464:2: ( ( rule__Interval__Group_3__0 ) )\n {\n // InternalSymboleoide.g:1464:2: ( ( rule__Interval__Group_3__0 ) )\n // InternalSymboleoide.g:1465:3: ( rule__Interval__Group_3__0 )\n {\n before(grammarAccess.getIntervalAccess().getGroup_3()); \n // InternalSymboleoide.g:1466:3: ( rule__Interval__Group_3__0 )\n // InternalSymboleoide.g:1466:4: rule__Interval__Group_3__0\n {\n pushFollow(FOLLOW_2);\n rule__Interval__Group_3__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getIntervalAccess().getGroup_3()); \n\n }\n\n\n }\n break;\n case 5 :\n // InternalSymboleoide.g:1470:2: ( ( rule__Interval__Group_4__0 ) )\n {\n // InternalSymboleoide.g:1470:2: ( ( rule__Interval__Group_4__0 ) )\n // InternalSymboleoide.g:1471:3: ( rule__Interval__Group_4__0 )\n {\n before(grammarAccess.getIntervalAccess().getGroup_4()); \n // InternalSymboleoide.g:1472:3: ( rule__Interval__Group_4__0 )\n // InternalSymboleoide.g:1472:4: rule__Interval__Group_4__0\n {\n pushFollow(FOLLOW_2);\n rule__Interval__Group_4__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getIntervalAccess().getGroup_4()); \n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__SitProp__Group_1__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:6545:1: ( ( ( rule__SitProp__IntervalsAssignment_1_4 ) ) )\n // InternalSymboleoide.g:6546:1: ( ( rule__SitProp__IntervalsAssignment_1_4 ) )\n {\n // InternalSymboleoide.g:6546:1: ( ( rule__SitProp__IntervalsAssignment_1_4 ) )\n // InternalSymboleoide.g:6547:2: ( rule__SitProp__IntervalsAssignment_1_4 )\n {\n before(grammarAccess.getSitPropAccess().getIntervalsAssignment_1_4()); \n // InternalSymboleoide.g:6548:2: ( rule__SitProp__IntervalsAssignment_1_4 )\n // InternalSymboleoide.g:6548:3: rule__SitProp__IntervalsAssignment_1_4\n {\n pushFollow(FOLLOW_2);\n rule__SitProp__IntervalsAssignment_1_4();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getSitPropAccess().getIntervalsAssignment_1_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Interval__SituationNamesAssignment_4_3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:10805:1: ( ( ruleSitName ) )\n // InternalSymboleoide.g:10806:2: ( ruleSitName )\n {\n // InternalSymboleoide.g:10806:2: ( ruleSitName )\n // InternalSymboleoide.g:10807:3: ruleSitName\n {\n before(grammarAccess.getIntervalAccess().getSituationNamesSitNameParserRuleCall_4_3_0()); \n pushFollow(FOLLOW_2);\n ruleSitName();\n\n state._fsp--;\n\n after(grammarAccess.getIntervalAccess().getSituationNamesSitNameParserRuleCall_4_3_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__SitProp__Group_0__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:6383:1: ( ( ( rule__SitProp__IntervalsAssignment_0_4 ) ) )\n // InternalSymboleoide.g:6384:1: ( ( rule__SitProp__IntervalsAssignment_0_4 ) )\n {\n // InternalSymboleoide.g:6384:1: ( ( rule__SitProp__IntervalsAssignment_0_4 ) )\n // InternalSymboleoide.g:6385:2: ( rule__SitProp__IntervalsAssignment_0_4 )\n {\n before(grammarAccess.getSitPropAccess().getIntervalsAssignment_0_4()); \n // InternalSymboleoide.g:6386:2: ( rule__SitProp__IntervalsAssignment_0_4 )\n // InternalSymboleoide.g:6386:3: rule__SitProp__IntervalsAssignment_0_4\n {\n pushFollow(FOLLOW_2);\n rule__SitProp__IntervalsAssignment_0_4();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getSitPropAccess().getIntervalsAssignment_0_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__SitProp__Group_2__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:6707:1: ( ( ( rule__SitProp__IntervalsAssignment_2_4 ) ) )\n // InternalSymboleoide.g:6708:1: ( ( rule__SitProp__IntervalsAssignment_2_4 ) )\n {\n // InternalSymboleoide.g:6708:1: ( ( rule__SitProp__IntervalsAssignment_2_4 ) )\n // InternalSymboleoide.g:6709:2: ( rule__SitProp__IntervalsAssignment_2_4 )\n {\n before(grammarAccess.getSitPropAccess().getIntervalsAssignment_2_4()); \n // InternalSymboleoide.g:6710:2: ( rule__SitProp__IntervalsAssignment_2_4 )\n // InternalSymboleoide.g:6710:3: rule__SitProp__IntervalsAssignment_2_4\n {\n pushFollow(FOLLOW_2);\n rule__SitProp__IntervalsAssignment_2_4();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getSitPropAccess().getIntervalsAssignment_2_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Interval__SituationNameAssignment_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:10655:1: ( ( ruleSitName ) )\n // InternalSymboleoide.g:10656:2: ( ruleSitName )\n {\n // InternalSymboleoide.g:10656:2: ( ruleSitName )\n // InternalSymboleoide.g:10657:3: ruleSitName\n {\n before(grammarAccess.getIntervalAccess().getSituationNameSitNameParserRuleCall_0_0()); \n pushFollow(FOLLOW_2);\n ruleSitName();\n\n state._fsp--;\n\n after(grammarAccess.getIntervalAccess().getSituationNameSitNameParserRuleCall_0_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Interval__SituationNamesAssignment_3_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:10700:1: ( ( ruleSitName ) )\n // InternalSymboleoide.g:10701:2: ( ruleSitName )\n {\n // InternalSymboleoide.g:10701:2: ( ruleSitName )\n // InternalSymboleoide.g:10702:3: ruleSitName\n {\n before(grammarAccess.getIntervalAccess().getSituationNamesSitNameParserRuleCall_3_0_0()); \n pushFollow(FOLLOW_2);\n ruleSitName();\n\n state._fsp--;\n\n after(grammarAccess.getIntervalAccess().getSituationNamesSitNameParserRuleCall_3_0_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Interval__UnitsAssignment_4_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:10775:1: ( ( ruleUnit ) )\n // InternalSymboleoide.g:10776:2: ( ruleUnit )\n {\n // InternalSymboleoide.g:10776:2: ( ruleUnit )\n // InternalSymboleoide.g:10777:3: ruleUnit\n {\n before(grammarAccess.getIntervalAccess().getUnitsUnitParserRuleCall_4_1_0()); \n pushFollow(FOLLOW_2);\n ruleUnit();\n\n state._fsp--;\n\n after(grammarAccess.getIntervalAccess().getUnitsUnitParserRuleCall_4_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__SitProp__Group_3__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:6869:1: ( ( ( rule__SitProp__IntervalsAssignment_3_4 ) ) )\n // InternalSymboleoide.g:6870:1: ( ( rule__SitProp__IntervalsAssignment_3_4 ) )\n {\n // InternalSymboleoide.g:6870:1: ( ( rule__SitProp__IntervalsAssignment_3_4 ) )\n // InternalSymboleoide.g:6871:2: ( rule__SitProp__IntervalsAssignment_3_4 )\n {\n before(grammarAccess.getSitPropAccess().getIntervalsAssignment_3_4()); \n // InternalSymboleoide.g:6872:2: ( rule__SitProp__IntervalsAssignment_3_4 )\n // InternalSymboleoide.g:6872:3: rule__SitProp__IntervalsAssignment_3_4\n {\n pushFollow(FOLLOW_2);\n rule__SitProp__IntervalsAssignment_3_4();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getSitPropAccess().getIntervalsAssignment_3_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void ruleInterval() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:641:2: ( ( ( rule__Interval__Alternatives ) ) )\n // InternalSymboleoide.g:642:2: ( ( rule__Interval__Alternatives ) )\n {\n // InternalSymboleoide.g:642:2: ( ( rule__Interval__Alternatives ) )\n // InternalSymboleoide.g:643:3: ( rule__Interval__Alternatives )\n {\n before(grammarAccess.getIntervalAccess().getAlternatives()); \n // InternalSymboleoide.g:644:3: ( rule__Interval__Alternatives )\n // InternalSymboleoide.g:644:4: rule__Interval__Alternatives\n {\n pushFollow(FOLLOW_2);\n rule__Interval__Alternatives();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getIntervalAccess().getAlternatives()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Interval__Group_4__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:7948:1: ( ( ( rule__Interval__SituationNamesAssignment_4_3 ) ) )\n // InternalSymboleoide.g:7949:1: ( ( rule__Interval__SituationNamesAssignment_4_3 ) )\n {\n // InternalSymboleoide.g:7949:1: ( ( rule__Interval__SituationNamesAssignment_4_3 ) )\n // InternalSymboleoide.g:7950:2: ( rule__Interval__SituationNamesAssignment_4_3 )\n {\n before(grammarAccess.getIntervalAccess().getSituationNamesAssignment_4_3()); \n // InternalSymboleoide.g:7951:2: ( rule__Interval__SituationNamesAssignment_4_3 )\n // InternalSymboleoide.g:7951:3: rule__Interval__SituationNamesAssignment_4_3\n {\n pushFollow(FOLLOW_2);\n rule__Interval__SituationNamesAssignment_4_3();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getIntervalAccess().getSituationNamesAssignment_4_3()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Interval__Group_4__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:7895:1: ( ( ( rule__Interval__UnitsAssignment_4_1 ) ) )\n // InternalSymboleoide.g:7896:1: ( ( rule__Interval__UnitsAssignment_4_1 ) )\n {\n // InternalSymboleoide.g:7896:1: ( ( rule__Interval__UnitsAssignment_4_1 ) )\n // InternalSymboleoide.g:7897:2: ( rule__Interval__UnitsAssignment_4_1 )\n {\n before(grammarAccess.getIntervalAccess().getUnitsAssignment_4_1()); \n // InternalSymboleoide.g:7898:2: ( rule__Interval__UnitsAssignment_4_1 )\n // InternalSymboleoide.g:7898:3: rule__Interval__UnitsAssignment_4_1\n {\n pushFollow(FOLLOW_2);\n rule__Interval__UnitsAssignment_4_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getIntervalAccess().getUnitsAssignment_4_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__SitProp__Group_1__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:6491:1: ( ( ( rule__SitProp__OSituationNameAssignment_1_2 ) ) )\n // InternalSymboleoide.g:6492:1: ( ( rule__SitProp__OSituationNameAssignment_1_2 ) )\n {\n // InternalSymboleoide.g:6492:1: ( ( rule__SitProp__OSituationNameAssignment_1_2 ) )\n // InternalSymboleoide.g:6493:2: ( rule__SitProp__OSituationNameAssignment_1_2 )\n {\n before(grammarAccess.getSitPropAccess().getOSituationNameAssignment_1_2()); \n // InternalSymboleoide.g:6494:2: ( rule__SitProp__OSituationNameAssignment_1_2 )\n // InternalSymboleoide.g:6494:3: rule__SitProp__OSituationNameAssignment_1_2\n {\n pushFollow(FOLLOW_2);\n rule__SitProp__OSituationNameAssignment_1_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getSitPropAccess().getOSituationNameAssignment_1_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Interval__Group_3__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:7760:1: ( ( ( rule__Interval__SituationNamesAssignment_3_0 ) ) )\n // InternalSymboleoide.g:7761:1: ( ( rule__Interval__SituationNamesAssignment_3_0 ) )\n {\n // InternalSymboleoide.g:7761:1: ( ( rule__Interval__SituationNamesAssignment_3_0 ) )\n // InternalSymboleoide.g:7762:2: ( rule__Interval__SituationNamesAssignment_3_0 )\n {\n before(grammarAccess.getIntervalAccess().getSituationNamesAssignment_3_0()); \n // InternalSymboleoide.g:7763:2: ( rule__Interval__SituationNamesAssignment_3_0 )\n // InternalSymboleoide.g:7763:3: rule__Interval__SituationNamesAssignment_3_0\n {\n pushFollow(FOLLOW_2);\n rule__Interval__SituationNamesAssignment_3_0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getIntervalAccess().getSituationNamesAssignment_3_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for the EditorBarajasGUI_botGuardar_mouseAdapter object | EditorBarajasGUI_botGuardar_mouseAdapter(EditorBarajasGUI adaptee) {
this.adaptee = adaptee;
} | [
"EditorBarajasGUI_botGuardarComo_mouseAdapter(EditorBarajasGUI adaptee) {\n\t\tthis.adaptee = adaptee;\n\t}",
"EditorBarajasGUI_botAyuda_mouseAdapter(EditorBarajasGUI adaptee) {\n\t\tthis.adaptee = adaptee;\n\t}",
"EditorBarajasGUI_botCargar_mouseAdapter(EditorBarajasGUI adaptee) {\n\t\tthis.adaptee = adaptee;\n\t}",
"EditorBarajasGUI_botNuevaBaraja_mouseAdapter(EditorBarajasGUI adaptee) {\n\t\tthis.adaptee = adaptee;\n\t}",
"EditorBarajasGUI_botSalir_mouseAdapter(EditorBarajasGUI adaptee) {\n\t\tthis.adaptee = adaptee;\n\t}",
"EditorBarajasGUI_botNuevaBaraja_mouseMotionAdapter(EditorBarajasGUI adaptee) {\n\t\tthis.adaptee = adaptee;\n\t}",
"botonDemo_mouseAdapter(FrameIntroGUI adaptee) {\n\t\tthis.adaptee = adaptee;\n\t}",
"botonEnviar_mouseAdapter(FrameIntroGUI adaptee) {\n\t\tthis.adaptee = adaptee;\n\t}",
"botonAyuda_mouseAdapter(FrameIntroGUI adaptee) {\n\t\tthis.adaptee = adaptee;\n\t}",
"EditorBarajasGUI_listSeleccionadas_mouseAdapter(EditorBarajasGUI adaptee) {\n this.adaptee = adaptee;\n }",
"botonSalir_mouseAdapter(FrameIntroGUI adaptee) {\n\t\tthis.adaptee = adaptee;\n\t}",
"boton1Jugador_mouseAdapter(FrameIntroGUI adaptee) {\n\t\tthis.adaptee = adaptee;\n\t}",
"botonDescargaSobre_mouseAdapter(FrameIntroGUI adaptee) {\n\t\tthis.adaptee = adaptee;\n\t}",
"botonEditar_mouseAdapter(FrameIntroGUI adaptee) {\n\t\tthis.adaptee = adaptee;\n\t}",
"EditorBarajasGUI_listDisponibles_mouseAdapter(EditorBarajasGUI adaptee) {\n this.adaptee = adaptee;\n }",
"public EditorBarajasGUI() {\n\t\t//dibujamos el cursor\n\t\tImageIcon cursor = new ImageIcon(\"../imagenes/cursores/puntero.gif\");\n\t\tImage image = cursor.getImage();\n\t\tCursor puntero = Toolkit.getDefaultToolkit().createCustomCursor(image, new Point(0, 0), \"img\");\n\t\tthis.setCursor(puntero);\n\n\t\ttry {\n\t\t\tjbInit();\n\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public MouseHandler()\n {\n // initialise instance variables:\n //INSTANTIATE listeners list:\n _listeners = new ArrayList<IMouseListener>();\n \n }",
"public MouseManager() {\n }",
"public Mouse()\n {\n // To do:\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parcours l'ensemble des pinguins vivants pour determiner si ils sont finalement seuls Met la variable estSeul a True des pinguins dans ce cas | public Boolean setPinguinsSeuls(Partie partie) {
//System.out.print("setPinguinsSeuls");
for (Pinguin p : super.getPinguinNonIsole()) {
if (Plateau.getNbJoueurIceberg(Plateau.getCasesIceberg(p.getPosition())) == 1) {
p.setEstSeul(true);
} else {
boolean estSeul = true;
CaseCritique cc = JoueurIA.estIlot(p.getPosition(), partie.getPlateau());
if (cc != null) {
//System.out.println(cc);
p.getPosition().setCoulee(true);
ArrayList<Case> iceberg = partie.getPlateau().getCasesIcebergLimiteCassure(cc.getIlot1().get(0));
int nbJoueur = Plateau.getNbJoueurIceberg(iceberg);
int poidsIlot1 = Plateau.getPoidsIceberg(iceberg);
if (nbJoueur != 0) {
poidsIlot1 = poidsIlot1 / nbJoueur;
}
iceberg = partie.getPlateau().getCasesIcebergLimiteCassure(cc.getIlot2().get(0));
nbJoueur = Plateau.getNbJoueurIceberg(iceberg);
int poidsIlot2 = Plateau.getPoidsIceberg(iceberg);
if (nbJoueur != 0) {
poidsIlot2 = poidsIlot2 / nbJoueur;
}
ArrayList<Joueur> joueursIlot1 = Plateau.getJoueursIceberg(partie.getPlateau().getCasesIcebergLimiteCassure(cc.getIlot1().get(0)));
ArrayList<Joueur> joueursIlot2 = Plateau.getJoueursIceberg(partie.getPlateau().getCasesIcebergLimiteCassure(cc.getIlot2().get(0)));
//Si l'ilot est interressant
if (poidsIlot1 > poidsIlot2) {
//Si l'ilot1 a deja une presence du joueur, personne n'ira sur cet ilot
if (joueursIlot1.size() == 1 && joueursIlot1.get(0) == p.getGeneral()) {
p.setCasesInterdites(partie.getPlateau().getCasesIcebergLimiteCassure(cc.getIlot1().get(0)));
//Si il n'y a personne sur cet ilot
} else if (joueursIlot1.isEmpty()) {
p.setEstSeul(true);
}
} else if (poidsIlot2 > poidsIlot1) {
//Si l'ilot2 a deja une presence du joueur, personne n'ira sur cet ilot
if (joueursIlot2.size() == 1 && joueursIlot2.get(0) == p.getGeneral()) {
p.setCasesInterdites(partie.getPlateau().getCasesIcebergLimiteCassure(cc.getIlot2().get(0)));
//Si il n'y a personne sur cet ilot
} else if (joueursIlot2.isEmpty()) {
p.setEstSeul(true);
}
} else {
if (joueursIlot1.isEmpty() || joueursIlot1.size() == 1 && joueursIlot1.get(0) == p.getGeneral() && joueursIlot2.size() > 0) {
for (Case c : cc.getIlot2()) {
if (c.getPinguin() == null && (joueursIlot2.size() > 1 || joueursIlot2.size() == 1 && !joueursIlot2.contains(this))) {
estSeul = false;
}
}
} else if (joueursIlot2.isEmpty() && joueursIlot2.size() == 1 && joueursIlot2.get(0) == p.getGeneral() && joueursIlot1.size() > 0) {
for (Case c : cc.getIlot1()) {
if (c.getPinguin() == null && (joueursIlot1.size() > 1 || joueursIlot1.size() == 1 && !joueursIlot1.contains(this))) {
estSeul = false;
}
}
}
p.setEstSeul(estSeul);
}
p.getPosition().setCoulee(false);
}
}
}
//System.out.println(" - OK");
return this.pinguinsSontSeuls();
} | [
"public Boolean pinguinsSontSeuls() {\r\n boolean sontSeuls = true;\r\n for (Pinguin p : super.getPinguinsVivants()) {\r\n sontSeuls = sontSeuls && p.estSeul();\r\n }\r\n return sontSeuls;\r\n }",
"@Override\n public boolean estVide()\n {\n return this.taille == 0;\n }",
"public boolean precisaAbastecer(){\n return (getCombustivel()/getTamanhoDeposito()<=0.1); \n }",
"boolean isEstConditionne();",
"public boolean isVampire(int i, int a1000, int a100, int a10, int a1) {\n boolean[] vars = new boolean[12];\n vars[0] = (a1000 * 10 + a100) * (a10 * 10 + a1) == i;\n vars[1] = (a1000 * 10 + a100) * (a10 + a1 * 10) == i;\n vars[2] = (a1000 + a100 * 10) * (a10 * 10 + a1) == i;\n vars[3] = (a1000 + a100 * 10) * (a10 + a1 * 10) == i;\n vars[4] = (a1000 * 10 + a10) * (a100 * 10 + a1) == i;\n vars[5] = (a1000 * 10 + a10) * (a100 + a1 * 10) == i;\n vars[6] = (a1000 + a10 * 10) * (a100 * 10 + a1) == i;\n vars[7] = (a1000 + a10 * 10) * (a100 + a1 * 10) == i;\n vars[8] = (a1000 * 10 + a1) * (a100 * 10 + a10) == i;\n vars[9] = (a1000 + a1 * 10) * (a100 * 10 + a10) == i;\n vars[10] = (a1000 * 10 + a1) * (a100 + a10 * 10) == i;\n vars[11] = (a1000 + a1 * 10) * (a100 + a10 * 10) == i;\n for (int j = 0; j < vars.length; j++) {\n if (vars[j] == true) {\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testValiderLaCouvertureDuSoin() {\n \n assertTrue(soin1.validerLaCouvertureDuSoin());\n soin3.setPourcentage(2.0);\n assertFalse(soin3.validerLaCouvertureDuSoin());\n soin3.setPourcentage(-1.1);\n assertFalse(soin3.validerLaCouvertureDuSoin());\n assertTrue(soin2.validerLaCouvertureDuSoin());\n }",
"boolean isSetMultipleBetMinimum();",
"private boolean validerHeuresTotales(){\n int somme = ht.heures();\n for( Activite a : activitesValides )\n somme += a.heures();\n if( somme >= rao.hTotales() ){\n return true;\n }else{\n Erreur.erreurHeuresTotales( somme, rao.hTotales() );\n return false;\n }\n }",
"boolean isNilMultipleBetMinimum();",
"public boolean estacionSuperada(){\n\t\tboolean superada=true;\n\t\tfor (int i = alturaActual; i <= baseActual; i++) {\n\t\t\tfor (int j = 0; j < ventanas[0].length; j++) {\n\t\t\t\tif(!ventanas[i][j].estaReparada())\n\t\t\t\t\tsuperada=false;\n\t\t\t}\n\t\t}\n\t\treturn superada;\n\t}",
"boolean isSetSingleBetMinimum();",
"boolean isNilSingleBetMinimum();",
"@Test\n public void testValiderLaLimiteDuSoin() {\n \n assertTrue(soin1.validerLaLimiteDuSoin());\n soin3.setLimite(-2.0);\n assertFalse(soin3.validerLaLimiteDuSoin());\n assertTrue(soin2.validerLaLimiteDuSoin());\n }",
"public boolean estPlein() {\n return this.tapis.size() == capacite;\n }",
"public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }",
"public void testEstPlein() {\n System.out.println(\"estPlein\");\n boolean expResult1 = true;\n boolean result1 = p4.estPlein();\n assertEquals(expResult1, result1);\n boolean expResult2 = false;\n boolean result2 = p1.estPlein();\n assertEquals(expResult2, result2);\n }",
"public abstract boolean hasVarAndCstSons();",
"public void testEstVide() {\n System.out.println(\"estVide\");\n boolean expResult1 = true;\n boolean result1 = p1.estVide();\n assertEquals(expResult1, result1);\n boolean expResult2 = false;\n boolean result2 = p4.estVide();\n assertEquals(expResult2, result2);\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}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Update Auction data / params.put("auction_id", bundleAuctionId); params.put("vehicle_ids", stringVehicleIds); params.put("status", SaveActivate); params.put("ShowHide", ShowHide); params.put("NoVehicle", stringNoofVehicle); | public void UpdateAuction(int auction_id, String auctionTitleUpdate, String startDateUpdate, String startTimeUpdate,
String endDateUpdate, String endTimeUpdate, String specialClausesIDUpdate, String vehicle_ids,
String status, String ShowHide, String NoVehicle) {
//JSON to Gson conversion
Gson gson = new GsonBuilder()
.setLenient()
.create();
try {
if (mConnectionDetector.isConnectedToInternet()) {
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(mContext.getString(R.string.base_url))
.addConverterFactory(GsonConverterFactory.create(gson))
.client(initLog().build())
.build();
ServiceApi serviceApi = retrofit.create(ServiceApi.class);
Call<String> mUpdateAuction = serviceApi._autokattaUpdateAuctionCreation(auction_id, auctionTitleUpdate, startDateUpdate,
startTimeUpdate, endDateUpdate, endTimeUpdate, specialClausesIDUpdate, vehicle_ids, status,
ShowHide, NoVehicle);
mUpdateAuction.enqueue(new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {
mNotifier.notifyString(response.body());
}
@Override
public void onFailure(Call<String> call, Throwable t) {
mNotifier.notifyError(t);
}
});
} else
CustomToast.customToast(mContext, mContext.getString(R.string.no_internet));
} catch (Exception e) {
e.printStackTrace();
}
} | [
"public void updateBusinessData(Map<String,Object> params) throws Exception;",
"@Test\n public void testUpdate_AUCTION() throws Bid4WinException\n {\n // Création de la situation de départ\n AUCTION auction = this.add(this.createAuction());\n\n AUCTION result = this.getById(auction.getId());\n assertTrue(\"Wrong auction\", auction.identical(result));\n assertEquals(\"Wrong version\", 0, result.getVersion());\n\n auction = this.update(auction.validate(this.createCancelPolicy(),\n this.getGenerator().createExchangeRates()));\n result = this.getById(auction.getId());\n assertTrue(\"Wrong auction\", auction.identical(result));\n assertEquals(\"Wrong version\", 1, result.getVersion());\n }",
"public void updateRebill(HashMap<String, String> params) {\n\t\tTRANSACTION_TYPE = \"SET\";\n\t\tREBILL_ID = params.get(\"rebillID\");\n\t\tTEMPLATE_ID = params.get(\"templateID\");\n\t\tNEXT_DATE = params.get(\"nextDate\");\n\t\tREB_EXPR = params.get(\"expr\");\n\t\tREB_CYCLES = params.get(\"cycles\");\n\t\tREB_AMOUNT = params.get(\"rebillAmount\");\n\t\tNEXT_AMOUNT = params.get(\"nextAmount\");\n\t\tAPI = \"bp20rebadmin\";\n\t}",
"void updateParamMap (List<BindParameter> bindParams);",
"public void updateBiddingDetails(BidUpdate bup) {\n\t\t\n\t\tString updateQuery = \"UPDATE user_product_bid set amount = ? where userid = ? and productid = ?\";\n\t\ttemplate.update(updateQuery, bup.getAmount(), bup.getUser(), bup.getPid());\n\t\t\n\t\t/*final String SQL = \"select * from products where productid = ?\";\n\t\tfinal String SQL1 = \"select * from user_product_bid where productid = ?\";\n\t\tList<ProductDetails> pdetails = new ArrayList<>();\n\t\tList<UserProductBidId> pdetailsbid = new ArrayList<>();\n\t\t\n\t\tList<Map<String, Object>> rows = template.queryForList(\"select * from products where productid = ?\", bup.getPid());\n\t\tList<Map<String, Object>> rows1 = template.queryForList(\"select * from user_product_bid where productid = ?\", bup.getPid());\n\t\t\n\t\t\n\t\t Object[] params = { name, id};\n\t\t int[] types = {Types.VARCHAR, Types.BIGINT};\n\t\t int rows = template.update(updateSql, params, types);\n\t\t\n\t\t \n\n\t\treturn pdetails.get(0);*/\n\n\t}",
"public void updateRequestParams(List<Map<String, String>> params) {\n jcoRequestTable.clear();\n for(Map<String, String> param : params) {\n addRequestParam(param);\n }\n }",
"public void ApproveVehicle(int mAuctionId, String keyword1, int vehicleid, String bidderContact,\n String bidPrice) {\n\n try {\n if (mConnectionDetector.isConnectedToInternet()) {\n\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(mContext.getString(R.string.base_url))\n .addConverterFactory(GsonConverterFactory.create())\n .client(initLog().build())\n .build();\n\n ServiceApi serviceApi = retrofit.create(ServiceApi.class);\n Call<ApprovedVehicleResponse> addRemoveBlacklist = serviceApi._autokattaApproveAnVehiclewithBid(mAuctionId, keyword1, vehicleid,\n bidderContact, bidPrice);\n addRemoveBlacklist.enqueue(new Callback<ApprovedVehicleResponse>() {\n @Override\n public void onResponse(Call<ApprovedVehicleResponse> call, Response<ApprovedVehicleResponse> response) {\n mNotifier.notifySuccess(response);\n }\n\n @Override\n public void onFailure(Call<ApprovedVehicleResponse> call, Throwable t) {\n mNotifier.notifyError(t);\n }\n });\n } else\n CustomToast.customToast(mContext, mContext.getString(R.string.no_internet));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@PUT(\"api/bid/{id}/updateongoingbid\")\n Call<Void> updateOngoingBid(@Header(\"x-access-token\") String token,@Path(\"id\") int id,@Body Bids bids);",
"public void updateBid(Bid b) {\r\n this.edit(b);\r\n }",
"public void updateVehicle(Vehicle vehicle);",
"@Headers({\n \"Content-Type:application/json\"\n })\n @POST(\"api/1/vehicles/{vehicle_id}/command/set_bioweapon_mode\")\n Call<CommandResponse> bioweaponDefense(\n @retrofit2.http.Body SetBioweaponModeRequest body, @retrofit2.http.Path(\"vehicle_id\") String vehicleId\n );",
"public void modifyCustomList(String[] params){\n // get id for modified item\n int id = Integer.parseInt(params[0]);\n for(int i = 0; i < custom_values.size(); i++){\n String[] tmp = custom_values.get(i);\n if(Integer.parseInt(tmp[0]) == id){\n\n // update data in activity list\n custom_values.set(i, params);\n\n // update data in database\n try{\n database.open();\n }catch (SQLException e){\n e.printStackTrace();\n }\n database.updateCustom(params);\n database.close();\n\n // broadcast the data change message to CustomService (If exists)\n Intent broadcastIntent = new Intent();\n broadcastIntent.setAction(\"com.example.administrator.powermanagement.Custom.data\");\n broadcastIntent.putExtra(\"type\", \"modify\");\n broadcastIntent.putExtra(\"pos\",i);\n broadcastIntent.putExtra(\"content\", custom_values.get(i));\n sendBroadcast(broadcastIntent);\n\n break;\n }\n }\n }",
"public void updatePassengerRequestSend() {\n\n updatePassengerResponse = given().\n header(\"Content-Type\", \"application/json\").\n body(updatePassengerBody.toString()).\n when().\n put(BaseEnvironmet + PromoPara1 + cartId + UpdatePassengerPara);\n\n logger.info(\"Update Passenger Request URL is: \" + BaseEnvironmet + PromoPara1 + cartId + UpdatePassengerPara);\n// updatePassengerResponse.prettyPrint().toString();\n\n }",
"public static void updateAccommodation (int AccommodationID, int LocationID, String AccommodationName, String Description, String Cost, String Address, String Website)\n {\n try\n {\n PreparedStatement ps = db.prepareStatement(\"UPDATE Accommodation SET AccommodationID = ?, LocationID = ?, AccommodationName = ?, Description = ?, Cost = ?, Address = ?, Website = ?\");\n\n //contain the values to be changed through the SQL statement in place of the ?s\n ps.setInt(1, AccommodationID);\n ps.setInt(2, LocationID);\n ps.setString(3, AccommodationName);\n ps.setString(4, Description);\n ps.setString(5, Cost);\n ps.setString(6, Address);\n ps.setString(7, Website);\n\n ps.executeUpdate(); //executes the SQL statement in the PreparedStatement\n\n }\n catch (Exception exception)//if an error occurs returns an error message\n {\n System.out.println(\"Database error: \" + exception.getMessage());\n }\n }",
"public String update() {\r\n\r\n\t\ttry {\r\n\t\t\tlogger.info(\"update function\");\r\n\t\t\tString[] assetCode = request.getParameterValues(\"assetCode\");\r\n\t\t\tlogger.info(\"assetCode length - \" + assetCode.length);\r\n\t\t\tString[] subType = request\r\n\t\t\t\t\t.getParameterValues(\"subTypeCodeIterator\");\r\n\t\t\tlogger.info(\"subType length - \" + subType.length);\r\n\t\t\tString[] assetRequired = request\r\n\t\t\t\t\t.getParameterValues(\"assetRequiredIterator\");\r\n\t\t\tlogger.info(\"assetRequired length - \" + assetRequired.length);\r\n\t\t\tAssetEmployeeModel model = new AssetEmployeeModel();\r\n\t\t\tmodel.initiate(context, session);\r\n\t\t\tboolean result = model.updateAssetDetails(assetEmployee, assetCode,\r\n\t\t\t\t\tsubType, assetRequired);\r\n\t\t\tif (result)\r\n\t\t\t\taddActionMessage(\"Record updated Successfully\");\r\n\t\t\telse\r\n\t\t\t\taddActionMessage(\"Record can't update\");\r\n\t\t\tgetNavigationPanel(8);\r\n\t\t\tshowItem1();\r\n\t\t\tmodel.getApproverComment(assetEmployee);\r\n\t\t\tmodel.terminate();\r\n\t\t\treturn SUCCESS;\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"Exeption Update function --- \" + e);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"Booking updateBooking(Booking booking);",
"public BiddingStatusDTO bidderPut(BiddingDTO dto) {;\r\n\t\t \r\n\t\t BidderRequest bidreq=new BidderRequest();\r\n\t\t \r\n\t\t SetBid setbid=(SetBid)dao.fetchByCropId(dto.getCropId()) ;\r\n\t\t \r\n\t\t BidderInfo infoo=dao.fetchByBidderId(dto.getBidderId());\r\n\t\t \r\n\t\t bidreq.setAmount(dto.getMoney());\r\n\t\t bidreq.setDate(new Date());\r\n\t\t bidreq.setBidd(setbid);\r\n\t\t bidreq.setInfo(infoo);\r\n\t\t \r\n\t\t int biddid=dao.addBiddingDetail(bidreq);\r\n\t\t \r\n\t\t BiddingStatusDTO stat = new BiddingStatusDTO();\r\n\t\t\tstat.setId(biddid);\r\n\t\t\tstat.setMessage(\"Bidding Registered Successfully\");\r\n\t\t\treturn stat;\t\t\r\n\t \r\n}",
"@Override\n public SetupIntent update(Map<String, Object> params) throws StripeException {\n return update(params, (RequestOptions) null);\n }",
"int updateGoods(Goods goods);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the bytesize of the give bitmap | @TargetApi(Build.VERSION_CODES.KITKAT)
public static int byteSizeOf(Bitmap bitmap) {
int size = 0;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
size = bitmap.getAllocationByteCount();
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1) {
size = bitmap.getByteCount();
} else {
size = bitmap.getRowBytes() * bitmap.getHeight();
}
return size;
} | [
"public static int getBitmapSize(Bitmap bitmap) {\n\t\t// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1) {\n\t\t// return bitmap.getByteCount();\n\t\t// }\n\t\t// Pre HC-MR1\n\t\treturn bitmap.getRowBytes() * bitmap.getHeight();\n\t}",
"@TargetApi(12)\n public static int getBitmapSize(Bitmap bitmap) {\n if (ConfigUtil.hasV12()) {\n return bitmap.getByteCount();\n }\n // Pre HC-MR1\n return bitmap.getRowBytes() * bitmap.getHeight();\n }",
"@TargetApi(VERSION_CODES.KITKAT)\n public static int getBitmapSize(BitmapDrawable value) {\n Bitmap bitmap = value.getBitmap();\n\n // From KitKat onward use getAllocationByteCount() as allocated bytes can potentially be\n // larger than bitmap byte count.\n if (Utils.hasKitKat()) {\n return bitmap.getAllocationByteCount();\n }\n\n if (Utils.hasHoneycombMR1()) {\n return bitmap.getByteCount();\n }\n\n // Pre HC-MR1\n return bitmap.getRowBytes() * bitmap.getHeight();\n }",
"@TargetApi(12)\n @Override\n protected int sizeOf(String key, Bitmap value) {\n return value.getByteCount()/1024;\n }",
"public int getSizeKB();",
"public long uncompressedSize() { int o = __offset(12); return o != 0 ? bb.getLong(o + bb_pos) : 0L; }",
"public final int getByteCount() {\n\n //\tCalculate the offset of the byte count\n int pos = PARAMWORDS + (2 * getParameterCount());\n return (int) DataPacker.getIntelShort(m_smbbuf, pos);\n }",
"int getSizeInBits() {\n\t\tif (isSimple())\n\t\t\treturn V.getSizeInBits();\n\t\treturn getExtendedSizeInBits();\n\t}",
"public int getNumberOfBytes() {\n return Double.valueOf(Math.ceil(numberOfBits / (double) Byte.SIZE )).intValue();\n }",
"long sizeInBytes();",
"public int getHeight() {\r\n return bitmapHeight;\r\n }",
"public int getWidth() {\r\n return bitmapWidth;\r\n }",
"public static int totalSizeBits_data() {\n return 480;\n }",
"public int getBinSize();",
"public int sizeInBytes() {\n\t\tint Ibits = this.id.encode(null).getSizeBits();\n\t\tint Ebits = this.event.encode(null).getSizeBits();\n\t\treturn (int) ((Ibits + Ebits + 4) / 8);\n\t}",
"private long getBufferSize() {\n long size = scanlineStride * (height-1) + width;\n return size;\n }",
"public int getLengthInBytes()\n \t{\n \t\treturn FormatableBitSet.numBytesFromBits(lengthAsBits);\n \t}",
"Metadata.Image.Size getSize();",
"public int getFrameByteCount() {\n return mMetaData[0] * mMetaData[1] * 4;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a list of all the gadgets in the game | public static List<Gadget> getAllGadgets() {
List<Gadget> gadgets = new ArrayList<Gadget>();
gadgets.add(new AutoRepairSystem());
gadgets.add(new FiveExtraCargo());
gadgets.add(new NavigatingSystem());
gadgets.add(new TargetingSystem());
gadgets.add(new CloakingDevice());
return gadgets;
} | [
"public List<Gadget> getGadgetList() {\n List<Gadget> gadgets = new ArrayList<>();\n orders.entrySet().stream().forEach((s) -> s.getValue().forEach((s1) -> gadgets.add(s1)));\n return gadgets;\n }",
"public List<Gadget> getGadgets(){\n\t \t\t\t\r\n\t \t\t\tList<Gadget> gadgets = new ArrayList<>();\r\n\t \t\t\tGadget g = new Gadget();\r\n\t \t\t\t\t\t\t\t\t\t\r\n\t \t\t\tString sql = \"Select * from gadgets\";\r\n\t \t\t\ttry{\r\n\t \t\t\t\tStatement st = (Statement) con.createStatement(); //prepare the statement 4\r\n\t \t\t\t\tResultSet rs = st.executeQuery(sql); \r\n\t \t\t\t\twhile(rs.next())\r\n\t \t\t\t\t{\r\n\t \t\t\t\t\tg = new Gadget();\r\n\t \t\t\t\tg.setgId(rs.getInt(1));\r\n\t \t\t\t\tg.setGname(rs.getString(2));\r\n\t \t\t\t\tg.setPrice(rs.getInt(3));\r\n\t \t\t\t\t\r\n\t \t\t\t\tgadgets.add(g);\r\n\t \t\t\r\n\t \t\t\t\t}\r\n \r\n\t \t\t\t}\r\n\t \t\t\tcatch(Exception e){\r\n\t \t\t\t\tSystem.out.println(e);\r\n\t \t\t\t}\r\n\t \t\t\t\t\r\n\t \t\t\treturn gadgets;\r\n\t \t\t}",
"public Set<GadgetInstance> getGadgets() {\r\n return Collections.unmodifiableSet(gadgets);\r\n }",
"public List<BuildingType> listBuildings() {\r\n\t\treturn listBuildings(player, \r\n\t\t\t\tplayer.currentPlanet);\r\n\t}",
"public List<Gadget> getGadgetsToTrigger() {\n return gadgetsToTrigger;\n }",
"public List getAllGenes();",
"@Test(groups = {\"wso2.gs\"}, dependsOnMethods = {\"testAddGadgetToRepo\"}, description = \"Check the existence of added gadget and Get the path of it\")\n public void testGetGadgetFromGadgetList() throws Exception {\n Gadget[] gadgets = gadgetRepoServiceStub.getGadgetData();\n Gadget addedGadget = null;\n if (gadgets != null) {\n for (Gadget gadget : gadgets) {\n if (gadget != null) {\n if (gadgetName.equals(gadget.getGadgetName())) {\n log.debug(\"Added Gadget path is :\" + gadget.getGadgetPath());\n log.debug(\"Added Gadget Url is :\" + gadget.getGadgetUrl());\n log.info(\"Successfully executed getGadgetFromGadgetList test\");\n addedGadget = gadget;\n break;\n }\n }\n }\n }\n\n assertTrue((addedGadget != null), \"Failed to get gadget Data\");\n gadgetPath = addedGadget.getGadgetPath();\n gadgetUrl = addedGadget.getGadgetUrl();\n\n\n }",
"public List<Building> getBoardBuildings() {\n return mPersonalBoardCards.getBoardBuildings();\n }",
"public List<String> getListGalaxies() throws SQLException {\r\n connection();\r\n String query = \"select distinct galaxy from spaceport\";\r\n Statement st = conexion.createStatement();\r\n ResultSet rs = st.executeQuery(query);\r\n List<String> galaxies = new ArrayList<>();\r\n while (rs.next()) {\r\n galaxies.add(rs.getString(\"galaxy\"));\r\n }\r\n rs.close();\r\n st.close();\r\n disconnect();\r\n return galaxies;\r\n }",
"public List<Ghost> getGhosts() {\n return new ArrayList<>(ghosts);\n }",
"public int getGadgetsSlots() {\n return base.getGadgetSlots();\n \n }",
"List<Blueprint> getBlueprints();",
"@Override\n public List<Building> allBuildings() {\n return dao.all(Building.class);\n }",
"private HashSet<String> getAllDrugs() {\n logger.info(\"* Get All PharmGKB Drugs... \");\n HashSet<String> drugList = new HashSet<String>();\n int nbAdded;\n try {\n GetPgkbDrugList myClientLauncher = new GetPgkbDrugList();\n drugList = myClientLauncher.getList();\n } catch (Exception e) {\n logger.error(\"** PROBLEM ** Problem with PharmGKB web service specialSearch.pl 6\", e);\n }\n nbAdded = drugList.size();\n logger.info((nbAdded) + \" drugs found.\");\n return drugList;\n }",
"public List<Card> getGraveyard() {\n\t\tList<Card> graveyard = new LinkedList<Card>();\n\t\tgraveyard.addAll(this.graveyard);\n\t\t\n\t\treturn graveyard;\n\t}",
"public final ArrayList<Ghost> getGhostsList()\n {\n return this.ghosts;\n }",
"public Cursor getAllBldgs() {\n\t\treturn myDataBase.rawQuery(\"SELECT name_full, name_abbr FROM buildings\", null);\n\t}",
"public List<Game> getGames() {\n return gameRepo.findAll();\n }",
"public void getGameList() {\n try {\n write(\"get gamelist\");\n } catch (IOException e) {\n System.out.println(\"No connecting with server:getGameList\");\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of RegBean | public RegBean() {
Conversation c;
c.
} | [
"public RegistrationBean() {\n }",
"public RegistroBean() {\r\n }",
"public RegistrarBean() {\n \n }",
"Register createRegister();",
"private FactoryBean() {\n this.brand = \"Factory\";\n this.name = \"Bean from factory\";\n this.birthdate = 201501071;\n }",
"public EntryReeferMuatBean() {\n registration = new Registration();\n registration.setMasterCustomer(new MasterCustomer());\n registration.setPlanningVessel(new PlanningVessel());\n registration.getPlanningVessel().setPreserviceVessel(new PreserviceVessel());\n registration.getPlanningVessel().getPreserviceVessel().setMasterVessel(new MasterVessel());\n }",
"public salesRegisterBean() {\n }",
"public ActBean createActBean()\n {\n return new ActBean();\n }",
"void register(String name, Object bean);",
"public ReservaBean() {\r\n nrohabitacion=1;\r\n createLista(nrohabitacion);\r\n editable=true;\r\n sino=\"\";\r\n \r\n reserva = new TReserva();\r\n }",
"public TheBean() {\n }",
"public PersonaBean() {\n domicilio = new Domicilio();\n telefono = new Telefono();\n correoElectronico = new CorreoElectronico();\n persona = new Persona();\n this.tipoOperacion = \"Alta\";\n\n }",
"public RegistryCreator(){\n\n\t\tthis.accounting = new Accounting();\n\t\tthis.inventory = new Inventory();\n\n\t}",
"public UCCLI001RegistrarOrdenClienteBean() {\n reservacion = new Reservacion();\n reservacion.setDmarca(\"\");\n reservacion.setDmodelo(\"\");\n reservacion.setDubigeo(\"140101\");\n ubigeo_departamento = \"14\";\n ubigeo_provincia = \"1401\";\n }",
"RegistrationModule createRegistrationModule();",
"Regulator createRegulator();",
"public FlPersonGroupBean createBean()\n {\n return new FlPersonGroupBean();\n }",
"public TrechoBean() {\n }",
"public TrlibBean createTrlibBean()\n {\n return new TrlibBean();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Process a Jar path. | void processJar(String path) {
try {
int fileCount = new JarProcessor(new EntityFileProcessor(""), CLASS_EXT).process(path);
log.info("Loaded " + fileCount + " Entities from " + path);
} catch (IOException e) {
log.error("Error while searching classpath for entities", e);
}
} | [
"Path mainJar();",
"private static String getJarPath() {\r\n\t\tSystem.out.println(\"Please enter jar path\");\r\n\t\tString jar = scanner.next();\r\n\t\tlogger.info(\"JAR:\" + jar);\r\n\t\treturn jar;\r\n\t}",
"private void processJar(JarFile jf) throws Exception {\n\t\tfor (Enumeration<JarEntry> e = jf.entries(); e.hasMoreElements();) {\n\t\t\tJarEntry entry = e.nextElement();\n\t\t\tString s = entry.getName();\n\t\t\tif (s.endsWith(\".class\")) {\n\t\t\t\tfor (String pref : prefixes) {\n\t\t\t\t\tif (s.startsWith(pref)) {\n\t\t\t\t\t\ts = s.replaceAll(\".class\", \"\").replaceAll(\"/\", \".\");\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tp.process(s);\n\t\t\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t\t\tSystem.out.println(\"ERROR processing class \" + s\n\t\t\t\t\t\t\t\t\t+ \" in \" + jf.getName());\n\t\t\t\t\t\t\tSystem.out.println(entry);\n\t\t\t\t\t\t\tthrow ex;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}",
"public void testJarMapping() throws Exception {\n clearWorkDir();\n File workdir = getWorkDir();\n File jar = new File(workdir, \"test.jar\");\n String textPath = \"x.txt\";\n OutputStream os = new FileOutputStream(jar);\n try {\n JarOutputStream jos = new JarOutputStream(os);\n jos.setMethod(ZipEntry.STORED);\n JarEntry entry = new JarEntry(textPath);\n entry.setSize(0L);\n entry.setTime(System.currentTimeMillis());\n entry.setCrc(new CRC32().getValue());\n jos.putNextEntry(entry);\n jos.flush();\n jos.close();\n } finally {\n os.close();\n }\n assertTrue(\"JAR was created\", jar.isFile());\n assertTrue(\"JAR is not empty\", jar.length() > 0L);\n JarFileSystem jfs = new JarFileSystem();\n jfs.setJarFile(jar);\n Repository.getDefault().addFileSystem(jfs);\n FileObject rootFO = jfs.getRoot();\n FileObject textFO = jfs.findResource(textPath);\n assertNotNull(\"JAR contains a/b.txt\", textFO);\n String rootS = \"jar:\" + BaseUtilities.toURI(jar) + \"!/\";\n URL rootU = new URL(rootS);\n URL textU = new URL(rootS + textPath);\n assertEquals(\"correct FO -> URL for root\", rootU, URLMapper.findURL(rootFO, URLMapper.EXTERNAL));\n assertEquals(\"correct FO -> URL for \" + textPath, textU, URLMapper.findURL(textFO, URLMapper.EXTERNAL));\n assertTrue(\"correct URL -> FO for root\", Arrays.asList(URLMapper.findFileObjects(rootU)).contains(rootFO));\n assertTrue(\"correct URL -> FO for \" + textPath, Arrays.asList(URLMapper.findFileObjects(textU)).contains(textFO));\n }",
"private void loadClasses(final Map infoMap, final URL path) throws DiffException {\n try {\n File jarFile = null;\n if(!\"file\".equals(path.getProtocol()) || path.getHost() != null) {\n // If it's not a local file, store it as a temporary jar file.\n // java.util.jar.JarFile requires a local file handle.\n jarFile = File.createTempFile(\"jardiff\",\"jar\");\n // Mark it to be deleted on exit.\n jarFile.deleteOnExit();\n final InputStream in = path.openStream();\n final OutputStream out = new FileOutputStream(jarFile);\n final byte[] buffer = new byte[4096];\n int i;\n while( (i = in.read(buffer,0,buffer.length)) != -1) {\n out.write(buffer, 0, i);\n }\n in.close();\n out.close();\n } else {\n // Else it's a local file, nothing special to do.\n jarFile = new File(path.getPath());\n }\n loadClasses(infoMap, jarFile);\n } catch (final IOException ioe) {\n throw new DiffException(ioe);\n }\n }",
"java.lang.String getJarPath();",
"private static void processJar(Path destinationPath) throws IOException {\n\n if (destinationPath == null) {\n throw new IOException(\"Cobigen folder path not found!\");\n }\n\n File cobigenTemplatesPath = CobiGenPaths.getTemplatesFolderPath().toFile();\n\n Path sourcesJarPath = TemplatesJarUtil.getJarFile(true, cobigenTemplatesPath).toPath();\n Path classesJarPath = TemplatesJarUtil.getJarFile(false, cobigenTemplatesPath).toPath();\n\n LOG.debug(\"Processing jar file @ {}\", sourcesJarPath);\n\n // extract sources jar to target directory\n extractArchive(sourcesJarPath, destinationPath);\n\n // create src/main/java directory\n Files.createDirectory(destinationPath.resolve(\"src/main/java\"));\n\n // move com folder to src/main/java/com\n Files.move(destinationPath.resolve(\"com\"), destinationPath.resolve(\"src/main/java/com\"),\n StandardCopyOption.REPLACE_EXISTING);\n\n // create src/main/resources directory\n Files.createDirectory(destinationPath.resolve(\"src/main/resources\"));\n\n // move META-INF folder to src/main/resources\n Files.move(destinationPath.resolve(\"META-INF\"), destinationPath.resolve(\"src/main/resources/META-INF\"),\n StandardCopyOption.REPLACE_EXISTING);\n\n // delete MANIFEST.MF\n Files.deleteIfExists(destinationPath.resolve(\"src/main/resources/META-INF/MANIFEST.MF\"));\n\n URI zipFile = URI.create(\"jar:file:\" + classesJarPath.toUri().getPath());\n\n // extract classes jar pom.xml\n try (FileSystem fs = FileSystemUtil.getOrCreateFileSystem(zipFile)) {\n Files.copy(fs.getPath(\"pom.xml\"), destinationPath.resolve(\"pom.xml\"), StandardCopyOption.REPLACE_EXISTING);\n }\n\n }",
"private static void makeJar(String jarPath, String classPath) throws IOException {\n File jarFile = new File(jarPath);\n File parent = jarFile.getParentFile();\n if (parent != null) {\n parent.mkdirs();\n }\n jarFile.createNewFile();\n String newClassPath = classPath.substring(classPath.indexOf(\"tmp/\") + 4);\n FileOutputStream fout = new FileOutputStream(jarFile);\n Manifest manifest = new Manifest();\n manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, \"1.0\");\n JarOutputStream jarOut = new JarOutputStream(fout, manifest);\n jarOut.putNextEntry(new ZipEntry(newClassPath));\n FileInputStream fit = new FileInputStream(classPath);\n BufferedInputStream bis = new BufferedInputStream(fit);\n byte[] buff = new byte[10000];\n int bytesRead;\n while ((bytesRead = bis.read(buff)) != -1) {\n jarOut.write(buff, 0, bytesRead);\n }\n jarOut.closeEntry();\n jarOut.close();\n fout.close();\n }",
"private static void processJarEntry(JarFile jarFile, JarEntry jarEntry, File outputDir) throws IOException {\n File outputFile = new File(outputDir, jarEntry.getName());\n Action action = getAction(jarEntry.getName());\n if (action == Action.COPY) {\n if (!outputFile.getParentFile().exists() &&\n !outputFile.getParentFile().mkdirs()) {\n throw new RuntimeException(\"Cannot create directory \" + outputFile.getParent());\n }\n if (!outputFile.exists() || outputFile.lastModified()\n < jarEntry.getTime()) {\n InputStream inputStream = null;\n OutputStream outputStream = null;\n try {\n inputStream = jarFile.getInputStream(jarEntry);\n if (inputStream != null) {\n outputStream = new BufferedOutputStream(\n new FileOutputStream(outputFile));\n ByteStreams.copy(inputStream, outputStream);\n outputStream.flush();\n } else {\n throw new RuntimeException(\"Cannot copy \" + jarEntry.getName());\n }\n } finally {\n try {\n if (outputStream != null) {\n outputStream.close();\n }\n } finally {\n if (inputStream != null) {\n inputStream.close();\n }\n }\n }\n }\n }\n }",
"public static void main(String[] args) {\n LoadingJarFiles lj = new LoadingJarFiles();\n\n try {\n lj.loadJars(\"Place here the folder path which contains .jar files\"); //separated by \"\\\\\"\n //lj.loadJars(\"D:\\\\Usuários\\\\adriano\\\\Google Drive\\\\NetBeansProjects\\\\AddJARtoClasspath\\\\JAR Files\");\n } catch (IOException ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage());\n } catch (NullPointerException ex) {\n JOptionPane.showMessageDialog(null, \"Invalid path or access denied!\");\n }\n\n //Show the files currently loaded to classpath\n URLClassLoader ucl = (URLClassLoader)ClassLoader.getSystemClassLoader();\n URL[] urls = ucl.getURLs();\n for (URL url : urls) {\n System.out.println(url.getFile());\n }\n }",
"void implementJar(Class<?> token, Path jarFile) throws ImplerException;",
"public void addJar(File jar) throws CustJARException {\n if (!jar.exists()) {\n\n throw new CustJARException(\"File/Directory '\" + jar.getPath() + \"' not found on harddisk!\");\n\n } else if (jar.isDirectory()) {\n\n FileFilter filter = new FileFilter() {\n\n public boolean accept(File pathname) {\n\n String extension = pathname.getName();\n\n int dotpos = extension.lastIndexOf(\".\");\n\n if (dotpos != -1) {\n extension = extension.substring(dotpos + 1);\n if (\"jar\".equals(extension.toLowerCase())) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }\n };\n\n\n File[] arFile = jar.listFiles(filter);\n\n for (int i = 0; i < arFile.length; i++) {\n\n// System.out.println(\"++ adding jar from directory: \" + arFile[i].getPath());\n\n setJars2Include.add(arFile[i]);\n\n }\n\n } else {\n// try {\n// System.out.println(\"++ adding jar from file: \" + jar.getCanonicalPath());\n// } catch (IOException ex) {\n// System.out.println(\"++ adding jar from file: \" + jar.getAbsolutePath());\n// }\n setJars2Include.add(jar);\n\n }\n\n }",
"private static boolean isJar(){\n\t\tString str = IOHandler.class.getResource(\"IOHandler.class\").toString();\n\t\treturn str.toLowerCase().startsWith(\"jar\") && JAROVERRIDE;\n\t}",
"public String jar( String jarFile, Paths paths )\r\n {\r\n return innerJar( \"JAR\", jarFile, paths );\r\n }",
"@SuppressWarnings(\"resource\")\n private String collectJar(BufferedReader buffr, ZipFile zFile)\n {\n\tString sc = new String();\n\ttry\n\t{\n\t // Schleife, die alle Einträge in paths durchgeht\n\t for (int i = 0; i < paths2.size(); i++)\n\t {\n\t\tif (paths2.get(i).endsWith(\".jar\"))\n\t\t{\n\t\t // Jar-Datei wird eingelesen\n\t\t zFile = new ZipFile(paths2.get(i));\n\t\t if (zFile != null)\n\t\t {\n\t\t\t// die Dateien in der Jar-Datei werden hier aufgelistet und gespeichert\n\t\t\tEnumeration<? extends ZipEntry> entries = zFile.entries();\n\t\t\t// Hilfsvariable zum Prüfen, ob Java-Dateien in Jar vorhanden sind\n\t\t\tint m = 0;\n\n\t\t\twhile (entries.hasMoreElements())\n\t\t\t{\n\t\t\t ZipEntry entry = entries.nextElement();\n\t\t\t // wenn es sich um eine Java-Datei handelt, wird diese eingelesen\n\t\t\t if (!entry.isDirectory() && entry.getName().endsWith(\".java\"))\n\t\t\t {\n\t\t\t\tm++;\n\t\t\t\tbuffr = new BufferedReader(new InputStreamReader(zFile.getInputStream(entry)));\n\t\t\t\tString currLine;\n\n\t\t\t\twhile ((currLine = buffr.readLine()) != null)\n\t\t\t\t{\n\t\t\t\t sc += currLine;\n\t\t\t\t sc += \"\\n\";\n\t\t\t\t}\n\t\t\t } else\n\t\t\t {\n\t\t\t\tcontinue;\n\t\t\t }\n\t\t\t}\n\t\t\t// Exception wird geworfen, wenn in der Jar-Datei keine Java-Dateien vorhanden\n\t\t\t// sind\n\t\t\tif (m == 0)\n\t\t\t{\n\t\t\t throw new FileNotFoundException();\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\n\t} catch (IOException e)\n\t{\n\t\tPUMLgenerator.logger.getLog().warning(\"@CodeCollector/collectJar: \" + e.toString());\n\t} finally\n\t{\n\t try\n\t {\n\t\tif (buffr != null)\n\t\t{\n\t\t buffr.close();\n\t\t}\n\t\tif (zFile != null)\n\t\t{\n\t\t zFile.close();\n\t\t}\n\t } catch (IOException ex)\n\t {\n\t \tPUMLgenerator.logger.getLog().warning(\"@CodeCollector/collectJar: \" + ex.toString());\n\t }\n\t}\n\treturn sc;\n }",
"protected String getJarURL(String path) throws Exception\n {\n URL url = getResource(path);\n url = JarUtils.createJarURL(url);\n return url.toString();\n }",
"com.google.devtools.kythe.proto.Java.JarDetails.Jar getJar(int index);",
"public Builder setJarPath(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000010;\n jarPath_ = value;\n onChanged();\n return this;\n }",
"private static void decompressJarFile(String destDirectory, String jarFilePath) throws IOException {\n File destDir = new File(destDirectory);\n if (!destDir.exists()) {\n destDir.mkdir();\n }\n JarInputStream jarIn = new JarInputStream(new FileInputStream(jarFilePath));\n JarEntry entry = jarIn.getNextJarEntry();\n // iterates over all the entries in the jar file\n while (entry != null) {\n String filePath = destDirectory + \"/\" + entry.getName();\n if (!entry.isDirectory()) {\n new File(filePath).getParentFile().mkdirs();\n // if the entry is a file, extracts it\n extractFile(jarIn, filePath);\n }/* else {\n System.out.println(\"New dir: \" + filePath);\n // if the entry is a directory, make the directory\n File dir = new File(filePath);\n dir.mkdir();\n System.out.println(dir.canWrite());\n }*/\n jarIn.closeEntry();\n entry = jarIn.getNextJarEntry();\n }\n jarIn.close();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method sets the Part object's name. | public void setPartName(String partName) {
this.partName = new SimpleStringProperty(partName);
} | [
"public final void setPartName(java.lang.String partname)\r\n\t{\r\n\t\tsetPartName(getContext(), partname);\r\n\t}",
"public final void setPartName(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String partname)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.PartName.toString(), partname);\r\n\t}",
"public void setPart(java.lang.String part)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PART$2, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PART$2);\n }\n target.setStringValue(part);\n }\n }",
"public void setPartitionName(String partName){\n\t\tsetProperty(PARTITION_NAME, partName);\n\t}",
"void setPart(java.lang.String part);",
"public void setName( String name ) {\n objectName = name;\n }",
"public void setWorkbenchPartName(String name);",
"public void xsetPart(org.apache.xmlbeans.XmlNCName part)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlNCName target = null;\n target = (org.apache.xmlbeans.XmlNCName)get_store().find_element_user(PART$2, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlNCName)get_store().add_element_user(PART$2);\n }\n target.set(part);\n }\n }",
"public void setNameFirstpart(String nameFirstpart) {\n String oldValue = this.nameFirstpart;\n this.nameFirstpart = nameFirstpart;\n propertySupport.firePropertyChange(NAME_FIRST_PART_PROPERTY, oldValue, nameFirstpart);\n }",
"public void setName(String name) {\r\n _name = name;\r\n }",
"public void setName( String name ) {\n doCommand( new UpdateSegmentObject( getUser().getUsername(), getFlow(), \"name\", name ) );\n }",
"public void setName(String name) {\n NAME = name;\n }",
"public void setName(String name){\n courseName = name;\n }",
"public void setName(String name) {\n this.name = name;\n this.box.getElement().setAttribute(\"name\", name);\n }",
"public void setName(String name) {\n\t\tmVH.tvResourceName.setText(name);\n\t}",
"public void setModelName(String name){\n\t\tnameLabel.setText(name);\n\t\tnameLabel.repaint(ViewerPanel.REPAINT_DELAY);\n\t}",
"public void setPartDesc(String partDesc){\n\t\t // store into the instance variable partDesc (i.e. this.partDesc) the value of the parameter partDesc\n\t\tthis.partDesc = partDesc;\n\t}",
"public void setObjectName(String text) {\n\t\tif (selectedObjects.size() > 0)\n\t\t\tselectedObjects.get(0).changeName(text);\n\n\t}",
"@Override\n public void setName(java.lang.String name) {\n _person.setName(name);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get flag whether Baritus should try to populate the form bean. Setting this flag to false, and thus letting Baritus skip population and validation can be usefull when you link commands within the same request and want to reuse the allready populated form bean without doing population and validation as well. BEWARE that this is also skips population of request attributes etc. that were set by the controllers earlier in the command stack. ALSO note that if this flag is false, Baritus will consider population to be succesfull, even though the population of the prior control might not have been. | public boolean isPopulateAndValidate()
{
return populateAndValidate;
} | [
"protected void processPopulate(HttpServletRequest request,\n HttpServletResponse response,\n ActionForm form,\n ActionMapping mapping)\n throws ServletException\n {\n if(form != null)\n {\n if(mapping instanceof GTActionMapping)\n { //20030124AH\n if( ((GTActionMapping)mapping).isPopulate() == false )\n {\n return; //Do not pass go. Do not collect $200.\n }\n }\n super.processPopulate(request,response,form,mapping);\n }\n else\n {\n return; //No form to populate\n }\n }",
"public boolean isSetBatchForm() {\n return this.batchForm != null;\n }",
"public boolean isSetProfileForm() {\n return this.profileForm != null;\n }",
"Boolean getFormValid();",
"public void setForm(boolean form);",
"public MethodMetadata getCurrentPopulateFormMethod() {\n return this.populateFormMethod;\n }",
"protected void processPopulate(HttpServletRequest request,\r\n\t\t\t\t\t\t\t\t HttpServletResponse response,\r\n\t\t\t\t\t\t\t\t ActionForm form,\r\n\t\t\t\t\t\t\t\t ActionMapping mapping)\r\n\t\tthrows ServletException {\r\n\r\n\t\tif (form == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Populate the bean properties of this ActionForm instance\r\n\t\tif (log.isDebugEnabled()) {\r\n\t\t\tlog.debug(\" Populating bean properties from this request\");\r\n\t\t}\r\n \r\n\t\tform.setServlet(this.servlet);\r\n\t\tform.reset(mapping, request);\r\n \r\n\t\tif (mapping.getMultipartClass() != null) {\r\n\t\t\trequest.setAttribute(Globals.MULTIPART_KEY,\r\n\t\t\t\t\t\t\t\t mapping.getMultipartClass());\r\n\t\t}\r\n \r\n\t\tRequestUtils.populate(form, mapping.getPrefix(), mapping.getSuffix(),\r\n\t\t\t\t\t\t\t request);\r\n\r\n\t\t// Set the cancellation request attribute if appropriate\r\n\t\tif ((request.getParameter(Constants.CANCEL_PROPERTY) != null) ||\r\n\t\t\t(request.getParameter(Constants.CANCEL_PROPERTY_X) != null)) {\r\n \r\n\t\t\trequest.setAttribute(Globals.CANCEL_KEY, Boolean.TRUE);\r\n\t\t}\r\n\r\n\t}",
"public void setReuseFormBeanContext(boolean b)\n\t{\n\t\treuseFormBeanContext = b;\n\t}",
"public void loadForm() {\n if (!selectedTipo.equals(\"accion\")) {\n this.renderPaginaForm = true;\n } else {\n this.renderPaginaForm = false;\n }\n if (selectedTipo.equals(null) || selectedTipo.equals(\"menu\")) {\n this.renderGrupoForm = false;\n } else {\n this.renderGrupoForm = true;\n }\n populateListaObjetos();\n }",
"@Test\n\tpublic void testBindNoConfig() throws Exception {\n\t\tMockHttpServletRequest request = new MockHttpServletRequest(\"POST\", null);\n\t\trequest.setSession(new MockHttpSession());\n\n\t\tfinal String value = \"value\";\n\t\trequest.setParameter(\"field\", value);\n\n\t\tAbstractSecurityWizardFormControllerTester controller = new AbstractSecurityWizardFormControllerTester();\n\t\tcontroller.setCommandClass(TargetObject.class);\n\t\tcontroller.setPages(new String[] { \"page\" });\n\n\t\t// call twice: once to populate session, once for actual call\n\t\tcontroller.handleRequest(request, new MockHttpServletResponse());\n\t\tModelAndView view = controller.handleRequest(request, new MockHttpServletResponse());\n\t\tObject command = view.getModel().get(controller.getCommandName());\n\n\t\tassertNull(\"Value should not be set due to no configuration\", ((TargetObject) command).field);\n\t}",
"public void setPopulateAndValidate(boolean populateAndValidate)\n\t{\n\t\tthis.populateAndValidate = populateAndValidate;\n\t}",
"public boolean isFormField() {\n return isFormField;\n }",
"public boolean isIsRequired() {\n return isRequired;\n }",
"public boolean isSetPageOption() {\n return this.pageOption != null;\n }",
"public boolean isRequired(){\n return true;\n }",
"@Override\n\tpublic boolean isFormField()\n\t{\n\t\treturn isFormField;\n\t}",
"public Boolean getForceValidation () {\r\n\t\treturn (Boolean) getStateHelper().eval(PropertyKeys.forceValidation);\r\n\t}",
"public boolean isSetFormKey() {\n return this.formKey != null;\n }",
"public boolean isRemoveFormAttributes() {\n return removeFormAttributes;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by Apache iBATIS ibator. This method returns the value of the database column V_RP_DY_ROUTE.DEVICES | public Integer getDevices() {
return devices;
} | [
"java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Device> \n getDevicesList();",
"java.util.List<yandex.cloud.api.iot.devices.v1.DeviceOuterClass.Device> \n getDevicesList();",
"public java.util.List<com.google.ads.googleads.v14.enums.DeviceEnum.Device> getDevicesList() {\n return new com.google.protobuf.Internal.ListAdapter<\n java.lang.Integer, com.google.ads.googleads.v14.enums.DeviceEnum.Device>(devices_, devices_converter_);\n }",
"@java.lang.Override\n public java.util.List<com.google.ads.googleads.v14.enums.DeviceEnum.Device> getDevicesList() {\n return new com.google.protobuf.Internal.ListAdapter<\n java.lang.Integer, com.google.ads.googleads.v14.enums.DeviceEnum.Device>(devices_, devices_converter_);\n }",
"@Nullable\r\n public List<DoorSensorJSON> requestDevices() {\r\n ObjectMapper objectMapper = new ObjectMapper();\r\n HttpEntity<String> entity = getHTTPEntity();\r\n String url = UriComponentsBuilder\r\n .fromHttpUrl(baseURL)\r\n .path(\"/v2/device/{networkID}\")\r\n .buildAndExpand(networkID)\r\n .toUriString();\r\n\r\n ResponseEntity<String> response = null;\r\n\r\n try {\r\n response = restTemplate.exchange(url, GET, entity, String.class);\r\n } catch (RestClientException e) {\r\n e.printStackTrace();\r\n return null;\r\n }\r\n try {\r\n return objectMapper.readValue(response.getBody(), new TypeReference<List<DoorSensorJSON>>() {\r\n });\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }",
"java.lang.String getDevice();",
"@java.lang.Override\n public java.util.List<yandex.cloud.api.iot.devices.v1.DeviceOuterClass.Device> getDevicesList() {\n return devices_;\n }",
"public static Device[] getAllDevices(){\n\t\tConnection con = dbConn();\n\t\tString query = \"SELECT Id FROM Device\";\n\t\ttry {\n\t\t\tPreparedStatement ps = con.prepareStatement(query);\n\t\t\tResultSet result = ps.executeQuery();\n\t\t\tList<String> devices = new ArrayList<String>();\n\t\t\twhile(result.next()){\n\t\t\t\tdevices.add(result.getString(1));\n\t\t\t}\n\t\t\tint n = devices.size();\n\t\t\tDevice[] devArr = new Device[n];\n\t\t\t\n\t\t\tfor (int i = 0; i < n; i++){\n\t\t\t\tString id = devices.get(i);\n\t\t\t\tdevArr[i] = new Device(id);\n\t\t\t}\n\t\t\t\n\t\t\treturn devArr;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"@Path(\"device\")\n DeviceAPI devices();",
"public native String[] getDeviceSerials();",
"private List<PortNumber> getLinePorts() {\n DeviceService deviceService = this.handler().get(DeviceService.class);\n return deviceService.getPorts(did())\n .stream()\n .filter(\n p -> p.annotations().value(\"openroadm-logical-connection-point\").contains(\"DEG\"))\n .map(p -> p.number())\n .collect(Collectors.toList());\n }",
"@GetMapping\n\tpublic List<Device> getAllDevices() {\n\t\tLOG.info(\"start DeviceController getAllDevices\");\n\t\tlong nanoTime = System.nanoTime();\n\t\tList<Device> allDevices = deviceService.getAllDevices();\n\t\tLOG.info(\"finished DeviceController getAllDevices with latency={}\", System.nanoTime() - nanoTime);\n\t\treturn allDevices;\n\t}",
"public final String getDevicePort(){\n return peripheralPort;\n }",
"public void getDeviceList(){\n if(applicationDb.getDevice() == null){\n RetrieveDeviceListAsync retrieveDeviceListAsync = new RetrieveDeviceListAsync(raspberryId);\n retrieveDeviceListAsync.execute();\n }\n else{\n DeviceStatusRefreshAsync deviceStatusRefreshAsync = new DeviceStatusRefreshAsync();\n deviceStatusRefreshAsync.execute();\n }\n\n }",
"public List<String> getAvailableDevices() {\n if (getEcologyDataSync().getData(\"devices\") != null) {\n return new ArrayList<>((Collection<? extends String>) ((Map<?, ?>) getEcologyDataSync().\n getData(\"devices\")).keySet());\n } else {\n return Collections.emptyList();\n }\n }",
"java.lang.String getDeviceId();",
"public String getDevice() {\r\n return device;\r\n }",
"public List<Device> getRunningDevices();",
"public String getDeviceNo() {\n return deviceNo;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
deal with response data and do last | private void dealUnionResponse(int lastCmd, int status, byte[] data) {
switch (lastCmd) {
case BTC_AUTH:
CLog.i(TAG, "has BTC_AUTH");
mHandler.removeMessages(SEND_BUFFER_ORDER);
mHandler.sendEmptyMessage(SEND_BUFFER_ORDER);
try {
for (int i = 0; i < mISyncDataCallbacks.size(); i++) {
mISyncDataCallbacks.get(i)
.onDeviceBind(device.getAddress());
}
Log.i(TAG,
"mISyncDataCallback size:"
+ mISyncDataCallbacks.size());
} catch (Exception e) {
e.printStackTrace();
}
break;
case BTC_CONNECT:
CLog.i(TAG, "receive BTC_CONNECT, BIGAN TO ATR");
if (null != data && data.length == 2) {
curSsc = ((data[0] & 0xff) << 8) + (data[1] & 0xff);
curSsc = UnionPayResponseHelper.dealSsc(curSsc);
writeUnionPayCmdToDevice(BTC_ATR, null);
} else {
Log.e(TAG, "err get ssc");
responseUnionCallback(BTC_SSC_ERROR, null);
}
break;
case BTC_ATR:
isSEATR = true;
CLog.i(TAG, "receive BTC_ATR res");
updateSESyncTime();
stop();
responseUnionCallback(BTC_IO_OK, data);
break;
case BTC_APDU:
CLog.i(TAG, "receive BTC_APDU res");
// writeUnionPayCmdToDevice(BTC_DISCONNECT, null);
stop();
updateSESyncTime();
responseUnionCallback(status, data);
break;
case BTC_DISCONNECT:
CLog.i(TAG, "has BTC_DISCONNECT");
setSEATR(false);
stop();
responseUnionCallback(status, data);
break;
case BTC_UNBIND:
Log.i(TAG, "has BTC_UNBIND");
stop();
try {
for (int i = 0; i < mISyncDataCallbacks.size(); i++) {
mISyncDataCallbacks.get(i).onDeviceUnBind(
device.getAddress());
}
} catch (Exception e) {
e.printStackTrace();
}
case BTC_INFO:
stop();
responseUnionCallback(BTC_IO_OK, data);
if (null != data && data.length > 12) {
int offset = 2;
String mainVersion = CommonUtils.getHexString(data[offset]);
String secondVersion = CommonUtils
.getHexString(data[offset + 1]);
String version = mainVersion + "." + secondVersion;
offset += 2;
String manuCode = CommonUtils.getHexString(data[offset]);
offset += 1;
String product_num = CommonUtils.getHexString(data[offset])
+ CommonUtils.getHexString(data[offset + 1])
+ CommonUtils.getHexString(data[offset + 2]);
offset += 3;
String liushui_num = CommonUtils.getHexString(data[offset])
+ CommonUtils.getHexString(data[offset + 1])
+ CommonUtils.getHexString(data[offset + 2])
+ CommonUtils.getHexString(data[offset + 3]);
String id = manuCode + "-" + product_num + "-" + liushui_num;
try {
for (int i = 0; i < mISyncDataCallbacks.size(); i++) {
mISyncDataCallbacks.get(i).onGetVersionAndId(version,
id);
}
} catch (Exception e) {
e.printStackTrace();
}
}
break;
case BTC_IDLE:
CLog.d(TAG, "BTC_IDLE OK");
stop();
break;
}
} | [
"public abstract HTTPResponse finish();",
"public void endResponse() throws IOException {\n out.println();\n //out.println(\"--End\");\n out.flush();\n endedLastResponse = true;\n }",
"public void setLastResponse(String tmp) {\n this.lastResponse = tmp;\n }",
"void doRespond(Call call) throws IOException {\n\t\t\t// LOG.debug(\"Methode : responder - doRespond()\");\n\t\t\tsynchronized (call.connection.responseQueue) {\n\t\t\t\tcall.connection.responseQueue.addLast(call);\n\t\t\t\tif (call.connection.responseQueue.size() == 1) {\n\t\t\t\t\tprocessResponse(call.connection.responseQueue, true);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public void getResult() {\r\n try {\r\n statusCode=connection.getResponseCode()+\" \"+connection.getResponseMessage(); //get the status response code and message\r\n } catch (IOException e) {\r\n statusCode=\"\";\r\n return;\r\n }\r\n responseBody=\"\";\r\n responseHeaders=new HashMap<>();\r\n for (String key:connection.getHeaderFields().keySet()){\r\n //headers fields\r\n if(key==null || key.equals(\"null\")){\r\n continue;\r\n }\r\n StringBuilder value= new StringBuilder(); //an String builder\r\n for(String v:connection.getHeaderFields().get(key)){\r\n value.append(v); //append the value\r\n }\r\n responseHeaders.put(key, value.toString());\r\n }\r\n\r\n\r\n BufferedReader bufferedReader = null; //a buffer reader\r\n try {\r\n if (connection.getResponseCode()/100==2 || connection.getResponseCode()/100==3) {\r\n //successful connection\r\n bufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream()));\r\n }\r\n else{\r\n //unsuccessful connection\r\n bufferedReader=new BufferedReader(new InputStreamReader(connection.getErrorStream()));\r\n }\r\n } catch (IOException e) {\r\n System.err.println(e.getMessage());//an error message\r\n return;\r\n }\r\n\r\n String currentLine;\r\n while (true) {\r\n try {\r\n currentLine = bufferedReader.readLine(); //read a line\r\n if(currentLine==null){\r\n //finished\r\n break;\r\n }\r\n responseBody+=currentLine; //add it to the responseBody\r\n responseBody+=\"\\n\"; //a new Line\r\n\r\n } catch (IOException e) {\r\n System.err.println(e.getMessage());//an error message\r\n }\r\n }\r\n\r\n\r\n if(fileForSaving!=null){\r\n //their is a file for saving the response in it\r\n saveToFile();\r\n }\r\n Instant end=Instant.now(); //end time\r\n Duration time= null; //the duration time\r\n if (start != null) {\r\n time = Duration.between(start,end);\r\n }\r\n if (time != null) {\r\n if(time.toMillis()<1000){\r\n durationTime=time.toMillis()+\"ms\"; //time to milli seconds\r\n }\r\n else{\r\n durationTime=time.toSeconds()+\"s\"; //time to seconds\r\n }\r\n }\r\n int size; //\r\n if(connection.getHeaderField(\"Content-Length\")!=null){\r\n size= Integer.parseInt(connection.getHeaderField(\"Content-Length\")); //the size of the response\r\n }\r\n else{\r\n size=responseBody.getBytes().length; //the size of the response\r\n }\r\n if(size/1000>=1){\r\n this.size=(float)size/1000+\"KB\"; //the size in Kilo Byte\r\n }\r\n else{\r\n this.size=size+\"B\"; //the size in Byte\r\n }\r\n }",
"static void processResponse(CTPResponse response)\n {\n \tfor(int i=0;i<response.GetNumResponses();i++)\n \t{\n \t\tint type = response.getReponseType(i);\n \t\tswitch (type) {\n\t \t\tcase CTPResponse.ERROR_RSP:{\n\t \t\t\tif(response.getStatus(i)== -1)\n\t \t\t\tSystem.out.println(\"ERROR_RSP Invalid client request\");\t\n\t \t\t\telse\n\t \t\t\tSystem.out.println(\"ERROR_RSP \"+response.getErrorText(i));\t\n\t \t\t\tbreak;\n\t \t\t}\n\t \t\tcase CTPResponse.ACKCONNECT_RSP:{\n\t \t\t\tSystem.out.println(\"ACKCONNECT_RSP received\");\t\n\t \t\t\tbreak;\n\t \t\t}\n\t\t\t\tcase CTPResponse.ACKOPEN_RSP:{\n\t\t\t\t\tSystem.out.println(\"ACKOPEN_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.ACKLOCK_RSP:{\n\t\t\t\t\tSystem.out.println(\"ACKLOCK_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.ACKEDIT_RSP:{\n\t\t\t\t\tSystem.out.println(\"ACKEDIT_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.SERVRELEASE_RSP:{\n\t\t\t\t\tSystem.out.println(\"SERVRELEASE_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.CONTENTS_RSP:{\n\t\t\t\t\tSystem.out.println(\"CONTENTS_RSP received\");\t\n\t\t\t\t\tSystem.out.println(\"Position in file = \"+response.getPosInfile(i));\n\t\t\t\t\tSystem.out.println(\"file data = \"+response.getFilData(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.MOVE_RSP:{\n\t\t\t\t\tSystem.out.println(\"MOVE_RSP received\");\t\n\t\t\t\t\tSystem.out.println(\"Cursor position in file= \"+response.getPosInfile(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.STATUS_RSP:{\n\t\t\t\t\tSystem.out.println(\"STATUS_RSP received\");\t\n\t\t\t\t\tSystem.out.println(\"Checksum = \"+response.getChecksum(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.EDIT_RSP:{\n\t\t\t\t\tSystem.out.println(\"EDIT_RSP received\");\t\n\t\t\t\t\tSystem.out.println(\"action = \"+response.getEditAction(i));\n\t\t\t\t\tSystem.out.println(\"Position in file = \"+response.getPosInfile(i));\n\t\t\t\t\tSystem.out.println(\"file data = \"+response.getFilData(i));\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.CLOSE_RSP:{\n\t\t\t\t\tSystem.out.println(\"CLOSE_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: \n\t\t\t\t\tSystem.out.println(\"Invalid Response type received\");\t\n \t\t}//end switch\n \t}//end for loop\n }",
"abstract protected void completeRequest();",
"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 }",
"private void uploadResponseData() {\n dataSyncViewModel.getAllResponsesToUpload();\n int size = dataSyncViewModel.allResponses.size();\n\n int counter = 0;\n while (counter + 20 < size) {\n JSONArray responseJsonArray = dataSyncViewModel.getResponseJSONArray(counter, counter + 20);\n uploadBatchOfResponseData(responseJsonArray);\n counter += 20;\n }\n // upload the rest responses (will be less than 20)\n JSONArray responseJsonArray = dataSyncViewModel.getResponseJSONArray(counter, size);\n uploadBatchOfResponseData(responseJsonArray);\n }",
"@Override\n protected void decode(ChannelHandlerContext ctx, HttpObject msg, List<Object> out) throws Exception {\n if (continueResponse && msg instanceof LastHttpContent) {\n // Release the last empty content associated with the 100-Continue response\n release(msg);\n return;\n }\n\n if (msg instanceof HttpResponse && CONTINUE.equals(((HttpResponse) msg).status())) {\n continueResponse = true;\n ctx.fireChannelRead(msg);\n return;\n }\n\n continueResponse = false;\n super.decode(ctx, msg, out);\n }",
"@Override\n public void resendLastResponseAsBytes() throws IOException {\n\n if(lastResponse != null) {\n if (logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) {\n logger.logDebug(\"resend last response \" + lastResponse);\n }\n sendMessage(lastResponse);\n } else if (lastResponseAsBytes != null) {\n // Send the message to the client\n// if(!checkStateTimers(lastResponseStatusCode)) {\n// return;\n// }\n if (logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) {\n logger.logDebug(\"resend last response \" + new String(lastResponseAsBytes));\n }\n\n if(isReliable()) {\n if (logger.isLoggingEnabled(ServerLogger.TRACE_MESSAGES)) {\n // Issue 343 : we have to log the retransmission\n try {\n SIPResponse lastReparsedResponse = (SIPResponse) sipStack.getMessageParserFactory().createMessageParser(sipStack).parseSIPMessage(lastResponseAsBytes, true, false, null);\n\n lastReparsedResponse.setRemoteAddress(\n this.getPeerInetAddress());\n lastReparsedResponse.setRemotePort(this.getPeerPort());\n lastReparsedResponse.setLocalPort(\n getMessageChannel().getPort());\n lastReparsedResponse.setLocalAddress(\n getMessageChannel()\n .getMessageProcessor().getIpAddress());\n\n getMessageChannel().logMessage(lastReparsedResponse, this.getPeerInetAddress(), this.getPeerPort(), System.currentTimeMillis());\n } catch (ParseException e) {\n if (logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) {\n logger.logDebug(\"couldn't reparse last response \" + new String(lastResponseAsBytes));\n }\n }\n }\n getMessageChannel().sendMessage(lastResponseAsBytes, this.getPeerInetAddress(), this.getPeerPort(), false);\n } else {\n Hop hop = sipStack.addressResolver.resolveAddress(new HopImpl(lastResponseHost, lastResponsePort,\n lastResponseTransport));\n\n MessageChannel messageChannel = ((SIPTransactionStack) getSIPStack())\n .createRawMessageChannel(this.getSipProvider().getListeningPoint(\n hop.getTransport()).getIPAddress(), this.getPort(), hop);\n if (messageChannel != null) {\n if (logger.isLoggingEnabled(ServerLogger.TRACE_MESSAGES)) {\n // Issue 343 : we have to log the retransmission\n try {\n SIPResponse lastReparsedResponse = (SIPResponse) sipStack.getMessageParserFactory().createMessageParser(sipStack).parseSIPMessage(lastResponseAsBytes, true, false, null);\n\n lastReparsedResponse.setRemoteAddress(messageChannel.getPeerInetAddress());\n lastReparsedResponse.setRemotePort(messageChannel.getPeerPort());\n lastReparsedResponse.setLocalPort(messageChannel.getPort());\n lastReparsedResponse.setLocalAddress(messageChannel.getMessageProcessor().getIpAddress());\n\n messageChannel.logMessage(lastReparsedResponse, messageChannel.getPeerInetAddress(), messageChannel.getPeerPort(), System.currentTimeMillis());\n } catch (ParseException e) {\n if (logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) {\n logger.logDebug(\"couldn't reparse last response \" + new String(lastResponseAsBytes));\n }\n }\n }\n messageChannel.sendMessage(lastResponseAsBytes, InetAddress.getByName(hop.getHost()), hop.getPort(), false);\n } else {\n throw new IOException(\"Could not create a message channel for \" + hop + \" with source IP:Port \"+\n this.getSipProvider().getListeningPoint(\n hop.getTransport()).getIPAddress() + \":\" + this.getPort());\n }\n }\n }\n }",
"private void proxyFulfilment() {\n int eventStatus = asyncSubrequests.get(0).async_statusCode;\r\n switch(eventStatus ) {\r\n default: case 202:\r\n response.setStatus(eventStatus);\r\n response.setContentLength(-1);\r\n log(\"= EVENT ACCEPTED WITH \" + eventStatus);\r\n break;\r\n case 301: case 302: case 303: case 304: case 305: case 307:\r\n response.setHeader(\"Location\", request.getRequestURI());\r\n response.setStatus(eventStatus);\r\n response.setContentLength(-1);\r\n log(\"= EVENT ACCEPTED WITH REDIRECT \"+eventStatus); \r\n break;\r\n }\r\n }",
"public synchronized void handleResponse ( final Result response )\n {\n this.lastUpdate = System.currentTimeMillis ();\n \n if ( this.statistics != null )\n {\n this.statistics.receivedUpdate ( this.lastUpdate );\n }\n \n if ( response.isError () )\n {\n if ( this.variables != null )\n {\n for ( final Variable reg : this.variables )\n {\n reg.handleError ( response.getError () );\n }\n }\n }\n else\n {\n final IoBuffer data = response.getData ();\n \n if ( this.variables != null )\n {\n for ( final Variable reg : this.variables )\n {\n try\n {\n reg.handleData ( data );\n }\n catch ( final Exception e )\n {\n logger.warn ( \"Failed in block {}\", this.id );\n logger.warn ( \"Failed to handle register\", e );\n reg.handleFailure ( e );\n }\n }\n }\n }\n \n }",
"protected void onEndRequest()\n\t{\n\t}",
"private void getResponse() {\n ApiManager.getApiManager().getExchange(501, 0, 2, 0,\n mEndTime,\n new ApiManager.RequestCallBack<ExchangeBean>() {\n @Override\n public void onSuccess(ExchangeBean data) {\n }\n\n @Override\n public void onSuccess(List<ExchangeBean> data) {\n\n LogUtils.e(\"数据\", data.size() + \"\");\n items.addAll(data);\n mAdapter.notifyDataSetChanged();\n if (data.size()==0){\n Message message = Message.obtain();\n message.what = NORECORD;\n mHandler.sendMessage(message);\n }else {\n Message message = Message.obtain();\n message.what = NETSUCCESS;\n mHandler.sendMessage(message);\n }\n\n }\n\n @Override\n public void onFailure(String error) {\n LogUtils.e(\"失败\", error);\n Message message = Message.obtain();\n message.what = NETFAILED;\n mHandler.sendMessage(message);\n }\n });\n\n }",
"protected void finishData ()\n {\n if (con.getChunking () && !emptyChunkSent)\n {\n emptyChunkSent = true;\n final BlockSentListener bsl = new Finisher ();\n final ChunkEnder ce = new ChunkEnder ();\n ce.sendChunkEnding (con.getChannel (), con.getNioHandler (), tlh.getClient (), bsl);\n }\n else\n {\n finish (true);\n }\n }",
"private void _handleUpdateResponse(HttpContext _context)\r\n throws APIException, IOException {\r\n HttpResponse _response = _context.getResponse();\r\n\r\n //invoke the callback after response if its not null\r\n if (getHttpCallBack() != null) {\r\n getHttpCallBack().OnAfterResponse(_context);\r\n }\r\n\r\n //handle errors defined at the API level\r\n validateResponse(_response, _context);\r\n\r\n\r\n }",
"protected void afterClose() throws IOException {\n\t\t\tsuper.afterClose();\n\t\t\tfinal HTTPResponse response = connection.readResponse(request); //read the response\n\t\t\tconnection.readResponseBody(request, response); //ignore the response body\n\t\t\tresponse.checkStatus(); //check the status of the response, throwing an exception if this is an error\n\t\t}",
"SdkHttpRequest getLastRequest();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interface which defines method signature for validation purpose | public interface Validator {
/**
* Method signature for the yak validation purpose
*/
void validateYak(Yak yak) throws YakShopException;
/**
* Method signature for validating the days
*/
void validateDays(int days) throws YakShopException;
} | [
"public interface Validator<T> {\r\n \r\n /**\r\n * Valide l'objet en paramètre.\r\n * Appel à effectuer à chaque début de traitement \"critique\".\r\n * @param object \r\n */\r\n void validate(T object) throws IllegalArgumentException;\r\n}",
"public interface GeometryValidator {\n\n /**\n * Validates the geometry and throws IllegalArgumentException if the geometry is not valid\n */\n void validate(Geometry geometry);\n\n}",
"protected void validateMethods(java.lang.String[] param){\r\n \r\n }",
"private void validateInputParameters(){\n\n }",
"public interface CheckShapeParameters<Model> {\n\n\t/**\n\t * Checks to see if the following parameters are valid\n\t *\n\t * @param param Model parameters for a shape\n\t * @return true if valid or false if not\n\t */\n\tpublic boolean valid(Model param);\n}",
"public interface Validation {\n\n\tboolean isValidTrade(TradeDetail tradeDetail) throws TradeStoreException;\n\n}",
"public interface TradeValidator {\n\n /**\n * @param trade trade for validation\n * @return validation result of given trade\n */\n TradeValidationResult check(Trade trade);\n\n}",
"public interface Validator {\n \n}",
"protected void validateTypes(String[] param){\n \n }",
"public interface Validator {\n\n /**\n * Validates a pattern against formatting rules. The rules must match the {@link Formatter} this validator will be\n * used with.\n *\n * @param pattern formatting pattern\n * @param types list of parameter types\n * @throws InvalidPatternException if the format is incorrect or the parameter types do not match the pattern\n */\n void validate(String pattern, Type... types) throws InvalidPatternException;\n}",
"protected void validateOperation(TOperation[] param){\n \n }",
"public interface ValidatorInterface {\r\n\r\n public abstract void validate(String designPatternDef,\r\n\t NodeList dynFactsList,\r\n\t LinkedList<CandidateInstance> candInstancesList, boolean debug,\r\n\t boolean printDatastructure);\r\n\r\n /**\r\n * Validate all candidate instances the method calls\r\n * are coming from the right objects. Check if the method\r\n * calls are on the right objects as well.\r\n * \r\n * @param candidateInstancesList list with candidate instances\r\n * @param designPatternDefinitionList dynamic design pattern definition list\r\n */\r\n public abstract LinkedList<CandidateInstance> validateObjects(\r\n\t LinkedList<CandidateInstance> candidateInstancesList,\r\n\t NodeList designPatternDefinitionList);\r\n\r\n /**\r\n * Returns the candidate instance list\r\n * \r\n * @return candInstancesList\r\n */\r\n public abstract LinkedList<CandidateInstance> getCandidateInstancesList();\r\n\r\n /**\r\n * Returns the dynamic definition list\r\n * \r\n * @return NodeList dynamic definition list\r\n */\r\n public abstract NodeList getDynamicDefinitionList();\r\n\r\n}",
"private interface Validator {\n /**\n * Validate the authentication type specific key meets the requirements for the relative user\n * authentication type.\n *\n * @param userEntity the user\n * @param key the key (or metadata)\n * @throws AmbariException\n */\n void validate(UserEntity userEntity, String key) throws AmbariException;\n }",
"protected void validateNotification(NotificationType[] param){\n \n }",
"protected void validateAnyType(java.lang.Object[] param){\n \n }",
"public abstract ValidationResults validArguments(String[] arguments);",
"abstract void telephoneValidity();",
"@Override\n \tpublic void validate() {\n \t}",
"public void validate(Object candidate);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implements the constructor: Annotation() Direct superclasses: metadslx.languages.soal.NamedElement All superclasses: metadslx.languages.soal.NamedElement | public void Annotation(Annotation _this) {
this.NamedElement(_this);
} | [
"protected AnnotationBasedFactory(String elementName) {\n this.annotationType = Reflection.reflect().genericType(\"A\").in(this);\n this.elementName = elementName;\n }",
"public AnnotationBasedFactory(Class<A> annotationType, String elementName) {\n this.annotationType = annotationType;\n this.elementName = elementName;\n }",
"AnnotationElement createAnnotationElement();",
"private Annotation() {\n tokens = new Token[] {};\n }",
"Annotation createAnnotation();",
"public AnnotationInfoImpl()\n {\n }",
"public metadslx.languages.soal.Annotation AnnotatedElement_addAnnotation(metadslx.languages.soal.AnnotatedElement _this, String name) {\n throw new UnsupportedOperationException();\n }",
"public AnnotationComponentFactory(String name) {\n super(name);\n }",
"@MyFirstAnnotation(name=\"tom\",description=\"write by tom\")\n\tpublic UsingMyFirstAnnotation(){\n\t\t\n\t}",
"public AttributeNS() {\n }",
"public ElementTypeEX() {\n\t\tsuper();\n\t}",
"public JavaClassAnnotationInstanceModel(ElementType et, Annotation a, Object o) {\n super(et,o);\n annotation_=a;\n if (a==null) {\n throw new NullPointerException();\n }\n }",
"RDFProperty createAnnotationProperty(String name);",
"public StoryElement(){\n\t\tthis(\"STElement\");\n\t}",
"public AnnotationSearchResultItem() {\n }",
"public NamedEntity() { this(\"\", \"\"); }",
"public Element(String name) {\n\t\tsetName(name);\n\t}",
"final public void Annotation() throws ParseException {\n if (jj_2_44(2147483647)) {\n NormalAnnotation();\n } else if (jj_2_45(2147483647)) {\n SingleMemberAnnotation();\n } else {\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n // case 85:\n case AT:\n MarkerAnnotation();\n break;\n default:\n //jj_la1[154] = jj_gen;\n //jj_consume_token(-1);\n //jj_reverse_token();\n \t// System.out.println(\" e\");\n //throw new ParseException();\n }\n }\n }",
"public Framework_annotation<T> build_annotation();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
generate a mapping axiom from a table of a database | public List<OBDAMappingAxiom> getMapping(DatabaseRelationDefinition table, String baseUri) {
OBDADataFactory dfac = OBDADataFactoryImpl.getInstance();
DirectMappingAxiomProducer dmap = new DirectMappingAxiomProducer(baseUri, dfac);
List<OBDAMappingAxiom> axioms = new ArrayList<>();
axioms.add(dfac.getRDBMSMappingAxiom("MAPPING-ID"+ currentMappingIndex, dfac.getSQLQuery(dmap.getSQL(table)), dmap.getCQ(table)));
currentMappingIndex++;
Map<String, List<Function>> refAxioms = dmap.getRefAxioms(table);
for (Map.Entry<String, List<Function>> e : refAxioms.entrySet()) {
OBDASQLQuery sqlQuery = dfac.getSQLQuery(e.getKey());
List<Function> targetQuery = e.getValue();
axioms.add(dfac.getRDBMSMappingAxiom("MAPPING-ID"+ currentMappingIndex, sqlQuery, targetQuery));
currentMappingIndex++;
}
return axioms;
} | [
"private void createAttributeMappingTable() {\n\t\tString table;\n\t\tString sql;\n\t\t\n\t\tConnectionManager.initParametersFromFile();\n\t\t\n\t\tfor (Feature feature : featureInstanceVectorListMap.keySet()) {\n\t\t\t\n\t\t\ttable \t= \"SIGNATURE_DISCOVERY_\" + feature.toString() + \"_MAPPING\";\n\t\t\t\n\t /*\n\t * Drop table first\n\t */\n\t \tsql = \"DROP TABLE \" + table;\n\t \tSystem.out.println(sql);\n\t try {\n\t ConnectionManager.executeStatement(sql);\n\t } catch (Exception e) {\n\t// \te.printStackTrace();\n\t// \tConnectionManager.close();\n\t// \treturn;\n\t }\t\t\n\t\t\t\n\t\t\t/*\n\t\t\t * Create table\n\t\t\t */\n\t sql \t= \"CREATE TABLE \" + table + \" \";\n\t sql \t+= \"(\";\n\t sql \t+= \"Code VARCHAR,\";\n\t sql \t+= \"Activity VARCHAR\";\n\t sql \t+= \")\";\n\t \n\t System.out.println(sql);\n\t \n\t try {\n\t ConnectionManager.executeStatement(sql);\n\t } catch (Exception e) {\n\t \te.printStackTrace();\n\t \tConnectionManager.close();\n\t \treturn;\n\t }\n\t \n\t /*\n\t * Insert data into table\n\t */\n\t System.out.println(\"INSERT INTO \" + table);\n\t \n\t for (String activityName : activityCharMap.keySet()) {\n\t \t// only take activity name, not traceID\n\t \tif (activityName.contains(\"-\")) {\n\t\t sql = \"INSERT INTO \" + table + \" VALUES('\" + activityCharMap.get(activityName).trim() + \"','\" + activityName.trim();\n\t\t sql += \"')\";\n\t//\t System.out.println(sql);\n\t\t try {\n\t\t ConnectionManager.executeStatement(sql);\n\t\t } catch (Exception e) {\n\t\t \te.printStackTrace();\n\t\t }\t \n\t \t} \n\t }\n\t\t}\n \n ConnectionManager.close();\n\t}",
"org.lindbergframework.schema.LinpMappingDocument.LinpMapping.SqlMapping getSqlMapping();",
"public void generateUserDefinedMapping() {// This method is used to\n\t\t// generate the user defined\n\t\t// mapping for OJB\n\t\tprintWriter\n\t\t\t\t.write(\"<!--********************\"\n\t\t\t\t\t\t+ \"*********OJB USER DEFINED MAPPING BEGINS HERE *********************************-->\");\n\t\tSolutionsAdapter sAdapter = saReader.getSA();\n\t\tDataObjectType dataObject = sAdapter.getDataObject();\n\t\tList listGroup = dataObject.getGroup();\n\t\tfor (Iterator groupIter = listGroup.iterator(); groupIter.hasNext();) {\n\t\t\tGroupList groupList = (GroupList) groupIter.next();\n\t\t\tList classList = groupList.getClasses();\n\t\t\tfor (int j = 0; j < classList.size(); j++) {\n\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\tprintWriter\n\t\t\t\t\t\t.write(\"<!--**************************** \"\n\t\t\t\t\t\t\t\t+ (j + 1)\n\t\t\t\t\t\t\t\t+ \" Object-Table Mapping *******************************************-->\");\n\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\tClassList classesList = (ClassList) classList.get(j);\n\t\t\t\tString className = classesList.getClassName();\n\t\t\t\tprintWriter.write(\"\\t\\t<class-descriptor \");\n\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\tprintWriter.write(\"\\t\\t\\tclass=\" + \"\\\"\" + className + \"\\\"\");// java\n\t\t\t\t// class\n\t\t\t\t// name\n\t\t\t\t// for\n\t\t\t\t// mapping\n\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t// Specifies the table name for the class\n\t\t\t\tString onlyTableName = getTableName(className);\n\t\t\t\t// String onlyTableName =\n\t\t\t\t// className.substring(className.lastIndexOf(\".\")+1,className.length());\n\t\t\t\tprintWriter.write(\"\\t\\t\\ttable=\" + \"\\\"\" + onlyTableName + \"\\\"\");// table\n\t\t\t\t// name\n\t\t\t\t// for\n\t\t\t\t// mapping\n\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\tprintWriter.write(\"\\t\\t>\");// closing > of class descriptor\n\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\tList fieldList = classesList.getFields();\n\t\t\t\tfor (int k = 0; k < fieldList.size(); k++) {\n\t\t\t\t\tprintWriter.write(\"\\t\\t <field-descriptor\");\n\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\tFieldNameList listField = (FieldNameList) fieldList.get(k);\n\t\t\t\t\tprintWriter.write(\"\\t\\t\\tname=\" + \"\\\"\"\n\t\t\t\t\t\t\t+ listField.getFieldName() + \"\\\"\");\n\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\tList dodsMapList = listField.getDODSMap();\n\t\t\t\t\tfor (int l = 0; l < dodsMapList.size(); l++) {\n\t\t\t\t\t\tDSMapList dsType = (DSMapList) dodsMapList.get(l);\n\t\t\t\t\t\tprintWriter.write(\"\\t\\t\\tcolumn=\" + \"\\\"\"\n\t\t\t\t\t\t\t\t+ dsType.getFieldName() + \"\\\"\");\n\t\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\t\tString jdbcType = getJDBCType(listField.getFieldType());\n\t\t\t\t\t\tprintWriter.write(\"\\t\\t\\tjdbc-type=\" + \"\\\"\" + jdbcType\n\t\t\t\t\t\t\t\t+ \"\\\"\");// jdbc type\n\t\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\t\tif (dsType.getPrimaryKey().equals(\"true\")) {\n\t\t\t\t\t\t\tprintWriter\n\t\t\t\t\t\t\t\t\t.write(\"\\t\\t\\tprimarykey=\" + \"\\\"true\\\" \");\n\t\t\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\t\t\tprintWriter.write(\"\\t\\t\\tautoincrement=\"\n\t\t\t\t\t\t\t\t\t+ \"\\\"false\\\" \");\n\t\t\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// do nothing\n\t\t\t\t\t\t}\n\t\t\t\t\t\tprintWriter.write(\"\\t\\t/>\");// end tag for field\n\t\t\t\t\t\t// descriptor\n\t\t\t\t\t\tprintWriter.write(\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tprintWriter.write(\"\\t\\t</class-descriptor>\");// end tag for\n\t\t\t\t// class\n\t\t\t\t// descriptor\n\t\t\t}\n\t\t}\n\t}",
"Map<String, String> getTableAliasMap();",
"public void generateMapping() {//This method is used to generate the OJB mapping file\n\t\tsetDataSourceDetails();//for testing now\n\t\tgenerateHeader();//Method to generate the header of the repository.xml file\n\t\tgenerateDbConfigMapping();//method to generate OJB specific database mapping\n\t\tgenerateInternalMapping();//method to generate the OJB internal mapping\n\t\tgenerateUserDefinedMapping();\n\t\tgenerateFooter();\n\t}",
"List<ColumnMapping> getColumnMapping();",
"MappedDatatype createMappedDatatype();",
"public void generateInternalMapping() {// This method is used to generate\n\t\t// OJB Internal mapping\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter\n\t\t\t\t.write(\"<!-- *******************\"\n\t\t\t\t\t\t+ \"******* OJB INTERNAL MAPPING BEGINS HERE ****************** -->\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t<class-descriptor\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\tclass=\"\n\t\t\t\t+ \"\\\"org.apache.ojb.broker.util.sequence.HighLowSequence\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\ttable=\" + \"\\\"OJB_HL_SEQ\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t>\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t<object-cache class=\"\n\t\t\t\t+ \"\\\"org.apache.ojb.broker.cache.ObjectCacheEmptyImpl\\\"\" + \">\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t</object-cache>\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t<field-descriptor\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tname=\" + \"\\\"name\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tcolumn=\" + \"\\\"tablename\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tjdbc-type=\" + \"\\\"VARCHAR\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tprimarykey=\" + \"\\\"true\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t/>\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t<field-descriptor\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tname=\" + \"\\\"maxKey\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tcolumn=\" + \"\\\"MAX_KEY\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tjdbc-type=\" + \"\\\"BIGINT\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t/>\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t<field-descriptor\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tname=\" + \"\\\"grabSize\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tcolumn=\" + \"\\\"GRAB_SIZE\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tjdbc-type=\" + \"\\\"INTEGER\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t/>\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t<field-descriptor\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\t\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tname=\" + \"\\\"version\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tcolumn=\" + \"\\\"VERSION\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tjdbc-type=\" + \"\\\"INTEGER\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\tlocking=\" + \"\\\"true\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t/>\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t</class-descriptor>\");\n\t\tprintWriter.write(\"\\n\");\n\t}",
"@Override\n\tpublic void addMappingTable(ch.ehi.sqlgen.repository.DbSchema schema)\n\t{\n\t\tch.ehi.sqlgen.repository.DbTable tab=new ch.ehi.sqlgen.repository.DbTable();\n\t\ttab.setName(new DbTableName(schema.getName(),SQL_T_KEY_OBJECT));\n\t\tch.ehi.sqlgen.repository.DbColVarchar t_key=new ch.ehi.sqlgen.repository.DbColVarchar();\n\t\tt_key.setName(SQL_T_KEY);\n\t\tt_key.setNotNull(true);\n\t\tt_key.setPrimaryKey(true);\n\t\tt_key.setSize(30);\n\t\ttab.addColumn(t_key);\n\t\tch.ehi.sqlgen.repository.DbColNumber t_lastuniqueid=new ch.ehi.sqlgen.repository.DbColNumber();\n\t\tt_lastuniqueid.setName(SQL_T_LASTUNIQUEID);\n\t\tt_lastuniqueid.setNotNull(true);\n\t\ttab.addColumn(t_lastuniqueid);\n\t\tch.ehi.ili2db.converter.AbstractRecordConverter.addStdCol(tab);\n\t\tschema.addTable(tab);\n\t}",
"org.lindbergframework.schema.LinpMappingDocument.LinpMapping.SqlMapping addNewSqlMapping();",
"private RelationalTable convertTable(org.hibernate.mapping.Table mappedTable) {\n RelationalTable table = new RelationalTable(m_catalogSchema, getTableName(mappedTable));\n\n List<Column> columns = new ArrayList<>();\n List<RelationalIndex> indices = new ArrayList<>();\n\n @SuppressWarnings(\"unchecked\")\n Iterator<org.hibernate.mapping.Column> mappedColumns = mappedTable.getColumnIterator();\n int idx = 1;\n while (mappedColumns.hasNext()) {\n org.hibernate.mapping.Column mappedColumn = mappedColumns.next();\n Column column = convertColumn(mappedColumn, mappedTable, idx++);\n columns.add(column);\n if (mappedColumn.isUnique()) {\n indices.add(getUniqueIndex(table, column));\n }\n }\n\n table.setColumns(columns);\n\n Set<ForeignKey> fkeys = new HashSet<>();\n @SuppressWarnings(\"unchecked\")\n Iterator<org.hibernate.mapping.ForeignKey> mappedKeys = mappedTable.getForeignKeyIterator();\n while (mappedKeys.hasNext()) {\n convertForeignKey(mappedKeys.next(), fkeys);\n }\n\n table.setFks(fkeys);\n\n @SuppressWarnings(\"unchecked\")\n Iterator<Index> mappedIndices = mappedTable.getIndexIterator();\n\n while (mappedIndices.hasNext()) {\n indices.add(convertIndex(mappedIndices.next(), table));\n }\n\n @SuppressWarnings(\"unchecked\")\n Iterator<UniqueKey> mappedUniqueKeys = mappedTable.getUniqueKeyIterator();\n while (mappedUniqueKeys.hasNext()) {\n indices.add(convertIndex(mappedUniqueKeys.next(), table));\n }\n\n if (mappedTable.getPrimaryKey() != null) {\n indices.add(convertIndex(mappedTable.getPrimaryKey(), table));\n List<String> pkColumnNames = new ArrayList<>();\n @SuppressWarnings(\"unchecked\")\n Iterator<org.hibernate.mapping.Column> pkColumns = mappedTable.getPrimaryKey().getColumnIterator();\n while (pkColumns.hasNext()) {\n pkColumnNames.add(getColumnName(pkColumns.next()));\n }\n table.setPkColumns(pkColumnNames);\n }\n\n table.setIndices(indices);\n\n return table;\n }",
"public void generateDbConfigMapping() {// This method is used to generate\n\t\t// the Database configuration for\n\t\t// the mapping file\n\t\tprintWriter.write(\"<descriptor-repository version=\" + \"\\\"1.0\\\" \");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\t\\t\\t\\t isolation-level=\"\n\t\t\t\t+ \"\\\"read-uncommitted\\\"\");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\t\\t\\t\\t\\t\\t proxy-prefetching-limit=\" + \"\\\"50\\\"> \");\n\t\tprintWriter.write(\"\\n\");\n\t\tprintWriter.write(\"\\n\");\n\t\tgenerateJdbcConDescriptor(printWriter);// Method to generate the JDBC\n\t\t// connection descriptor\n\t}",
"@Test\n\tpublic void testByMap(){\n\t\tString hql=\"select new map(id as id,name as name )from User\";\n\t\tQuery query=session.createQuery(hql);\n\t\tList<Map<String,Object>> list=query.list();\n\t\tfor(Map<String,Object> map:list){\n\t\t\tSystem.out.println(map);\n\t\t}\n\t}",
"FromTable createFromTable();",
"public Table<Integer, Integer, String> getAnonymizedData();",
"private void GeneratePutativeOntology(String sOntologyName,\n\t\t\tString sOutputFile, RDB2OntMatcher mat) {\n\t\t\t\n\t\tString basePrefix = baseUri + sOntologyName + \".owl#\";\t\n \t\n\t\tSystem.out.println(\"1: Creating putative ontology: \"+basePrefix);\n\n\t\tontPutative = new OntologyTools();\n\t\tontPutative.createOntology(basePrefix, basePrefix);\n\n\t\tDatabaseStructure db = mat.getDatabaseStructure();\n\t\t\n\t\tfor(TableStructure table : db.getTables())\n\t\t{\n\t\t\tClassMatch match = new ClassMatch(table.getNormalizedName(), table.name, table.getOnePrimaryKey());\n\t\t\t\t\t\n\t\t\tontPutative.addClass(table.getNormalizedName(), table.name);\n\n\t\t\tfor(ColumnStructure column : table.getColumns())\n\t\t\t{\n\t\t\t\t// Each column is a datatype\n\t\t\t\tontPutative.addDatatype(\t\n\t\t\t\t\t\t\t\ttable.getNormalizedName(), \n\t\t\t\t\t\t\t\tcolumn.getNormalizedName(), \n\t\t\t\t\t\t\t\tcolumn.type);\n\t\t\t\t\n\t\t\t\tmatch.addDataPropertyMatch(new DataPropertyMatch(column.getNormalizedName(), table.name, column.name, column.type));\n\n\t\t\t\t// Each foreign key is an object property\n\t\t\t\tif(column.isForeignkey) {\n\t\t\t\t\tontPutative.addObjectproperty(\t\n\t\t\t\t\t\t\t\t\"has\"+column.getNormalizedName(), \n\t\t\t\t\t\t\t\ttable.getNormalizedName(),\n\t\t\t\t\t\t\t\tcolumn.getNormalizedForeigntable());\n\t\t\t\t\t\n\t\t\t\t\t// Checking if the columns of the foreign table are a subset of the columns of the table\n\t\t\t\t\tif(db.CheckAttributeSubset(table.name, column.foreigntable)) {\n\t\t\t\t\t\tontPutative.addClass(\n\t\t\t\t\t\t\t\ttable.getNormalizedName(), \n\t\t\t\t\t\t\t\tcolumn.getNormalizedForeigntable(), \n\t\t\t\t\t\t\t\ttable.name);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//If attributes as classes is enabled, each column is a class\n\t\t\t\tif(mbAttributesAsClasses){\n\t\t\t\t\tontPutative.addClass(\n\t\t\t\t\t\t\t column.getNormalizedName(), \n\t\t\t\t\t\t\t \"From_\"+table.name+\"-\"+column.getNormalizedName());\n\t\t\t\t\tontPutative.addObjectproperty(\n\t\t\t\t\t\t\t \"has\"+column.getNormalizedName(), \n\t\t\t\t\t\t\t table.getNormalizedName(), \n\t\t\t\t\t\t\t column.getNormalizedName());\n\t\t\t\t\tontPutative.addDatatype(\n\t\t\t\t\t\t\t column.getNormalizedName(), \n\t\t\t\t\t\t\t column.getNormalizedName(), \n\t\t\t\t\t\t\t column.type);\n\t\t\t\t\t\n\t\t\t\t\tClassMatch matchAttr = new ClassMatch(column.getNormalizedName(), table.name, column.name);\n\n\t\t\t\t\tmatchAttr.isAttributesAsClasses = true;\n\t\t\t\t\t\n\t\t\t\t\tmatchAttr.addDataPropertyMatch(new DataPropertyMatch(column.getNormalizedName(), table.name, column.name, column.type));\n\t\t\t\t\t// We add the match to the matcher's lists\n\t\t\t\t\tmat.addMatch(matchAttr);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// We add the match to the matcher's lists\n\t\t\tmat.addMatch(match);\n\t\t}\n\t\t\n\t\tontPutative.saveOntology(sOutputFile + \"_automap4obda.owl\");\n\t\t\n\t\tSystem.out.println(\" # class: \"+ontPutative.getClasses().size());\n\t\tSystem.out.println(\"\");\n\t}",
"protected Map<String, Column> mapping() {\r\n return dbColumnMap;\r\n }",
"JavaTypeMapping getMapping(Table table, AbstractMemberMetaData mmd, ClassLoaderResolver clr, FieldRole fieldRole);",
"public String getMapping();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ShiftExpression__Group__1" $ANTLR start "rule__ShiftExpression__Group__1__Impl" InternalReflex.g:8344:1: rule__ShiftExpression__Group__1__Impl : ( ( rule__ShiftExpression__Group_1__0 ) ) ; | public final void rule__ShiftExpression__Group__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalReflex.g:8348:1: ( ( ( rule__ShiftExpression__Group_1__0 )* ) )
// InternalReflex.g:8349:1: ( ( rule__ShiftExpression__Group_1__0 )* )
{
// InternalReflex.g:8349:1: ( ( rule__ShiftExpression__Group_1__0 )* )
// InternalReflex.g:8350:2: ( rule__ShiftExpression__Group_1__0 )*
{
if ( state.backtracking==0 ) {
before(grammarAccess.getShiftExpressionAccess().getGroup_1());
}
// InternalReflex.g:8351:2: ( rule__ShiftExpression__Group_1__0 )*
loop54:
do {
int alt54=2;
int LA54_0 = input.LA(1);
if ( (LA54_0==67) ) {
int LA54_2 = input.LA(2);
if ( (synpred101_InternalReflex()) ) {
alt54=1;
}
}
else if ( (LA54_0==68) ) {
int LA54_3 = input.LA(2);
if ( (synpred101_InternalReflex()) ) {
alt54=1;
}
}
switch (alt54) {
case 1 :
// InternalReflex.g:8351:3: rule__ShiftExpression__Group_1__0
{
pushFollow(FOLLOW_68);
rule__ShiftExpression__Group_1__0();
state._fsp--;
if (state.failed) return ;
}
break;
default :
break loop54;
}
} while (true);
if ( state.backtracking==0 ) {
after(grammarAccess.getShiftExpressionAccess().getGroup_1());
}
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__ShiftExpression__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:8337:1: ( rule__ShiftExpression__Group__1__Impl )\n // InternalReflex.g:8338:2: rule__ShiftExpression__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__ShiftExpression__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ShiftExpression__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:7277:1: ( rule__ShiftExpression__Group__1__Impl )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:7278:2: rule__ShiftExpression__Group__1__Impl\r\n {\r\n pushFollow(FollowSets000.FOLLOW_rule__ShiftExpression__Group__1__Impl_in_rule__ShiftExpression__Group__114897);\r\n rule__ShiftExpression__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__ShiftExpression__Group_1__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:7338:1: ( rule__ShiftExpression__Group_1__1__Impl )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:7339:2: rule__ShiftExpression__Group_1__1__Impl\r\n {\r\n pushFollow(FollowSets000.FOLLOW_rule__ShiftExpression__Group_1__1__Impl_in_rule__ShiftExpression__Group_1__115019);\r\n rule__ShiftExpression__Group_1__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__AstExpressionShift__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17984:1: ( rule__AstExpressionShift__Group__1__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17985:2: rule__AstExpressionShift__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__AstExpressionShift__Group__1__Impl_in_rule__AstExpressionShift__Group__136167);\n rule__AstExpressionShift__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ShiftExpression__Group_1__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:8418:1: ( rule__ShiftExpression__Group_1__2__Impl )\n // InternalReflex.g:8419:2: rule__ShiftExpression__Group_1__2__Impl\n {\n pushFollow(FOLLOW_2);\n rule__ShiftExpression__Group_1__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__AstExpressionShift__Group_1__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18076:1: ( rule__AstExpressionShift__Group_1__2__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18077:2: rule__AstExpressionShift__Group_1__2__Impl\n {\n pushFollow(FOLLOW_rule__AstExpressionShift__Group_1__2__Impl_in_rule__AstExpressionShift__Group_1__236350);\n rule__AstExpressionShift__Group_1__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ShiftExpression__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:8364:1: ( rule__ShiftExpression__Group_1__0__Impl rule__ShiftExpression__Group_1__1 )\n // InternalReflex.g:8365:2: rule__ShiftExpression__Group_1__0__Impl rule__ShiftExpression__Group_1__1\n {\n pushFollow(FOLLOW_67);\n rule__ShiftExpression__Group_1__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__ShiftExpression__Group_1__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ShiftExpression__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:8310:1: ( rule__ShiftExpression__Group__0__Impl rule__ShiftExpression__Group__1 )\n // InternalReflex.g:8311:2: rule__ShiftExpression__Group__0__Impl rule__ShiftExpression__Group__1\n {\n pushFollow(FOLLOW_67);\n rule__ShiftExpression__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__ShiftExpression__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__PlusOrMinus__Group_1_0_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:30678:1: ( rule__PlusOrMinus__Group_1_0_0__1__Impl )\n // InternalDsl.g:30679:2: rule__PlusOrMinus__Group_1_0_0__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__PlusOrMinus__Group_1_0_0__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Expressions__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5660:1: ( rule__Expressions__Group_1__1__Impl )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5661:2: rule__Expressions__Group_1__1__Impl\n {\n pushFollow(FOLLOW_rule__Expressions__Group_1__1__Impl_in_rule__Expressions__Group_1__111103);\n rule__Expressions__Group_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ShiftExpression__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:7248:1: ( rule__ShiftExpression__Group__0__Impl rule__ShiftExpression__Group__1 )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:7249:2: rule__ShiftExpression__Group__0__Impl rule__ShiftExpression__Group__1\r\n {\r\n pushFollow(FollowSets000.FOLLOW_rule__ShiftExpression__Group__0__Impl_in_rule__ShiftExpression__Group__014837);\r\n rule__ShiftExpression__Group__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FollowSets000.FOLLOW_rule__ShiftExpression__Group__1_in_rule__ShiftExpression__Group__014840);\r\n rule__ShiftExpression__Group__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__AstExpressionShift__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17995:1: ( ( ( rule__AstExpressionShift__Group_1__0 )* ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17996:1: ( ( rule__AstExpressionShift__Group_1__0 )* )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17996:1: ( ( rule__AstExpressionShift__Group_1__0 )* )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17997:1: ( rule__AstExpressionShift__Group_1__0 )*\n {\n before(grammarAccess.getAstExpressionShiftAccess().getGroup_1()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17998:1: ( rule__AstExpressionShift__Group_1__0 )*\n loop149:\n do {\n int alt149=2;\n int LA149_0 = input.LA(1);\n\n if ( ((LA149_0>=25 && LA149_0<=27)) ) {\n alt149=1;\n }\n\n\n switch (alt149) {\n \tcase 1 :\n \t // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:17998:2: rule__AstExpressionShift__Group_1__0\n \t {\n \t pushFollow(FOLLOW_rule__AstExpressionShift__Group_1__0_in_rule__AstExpressionShift__Group__1__Impl36194);\n \t rule__AstExpressionShift__Group_1__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop149;\n }\n } while (true);\n\n after(grammarAccess.getAstExpressionShiftAccess().getGroup_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__PlusOrMinus__Group_1_0_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:30732:1: ( rule__PlusOrMinus__Group_1_0_1__1__Impl )\n // InternalDsl.g:30733:2: rule__PlusOrMinus__Group_1_0_1__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__PlusOrMinus__Group_1_0_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ShiftExpression__Group_1__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:7309:1: ( rule__ShiftExpression__Group_1__0__Impl rule__ShiftExpression__Group_1__1 )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:7310:2: rule__ShiftExpression__Group_1__0__Impl rule__ShiftExpression__Group_1__1\r\n {\r\n pushFollow(FollowSets000.FOLLOW_rule__ShiftExpression__Group_1__0__Impl_in_rule__ShiftExpression__Group_1__014959);\r\n rule__ShiftExpression__Group_1__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FollowSets000.FOLLOW_rule__ShiftExpression__Group_1__1_in_rule__ShiftExpression__Group_1__014962);\r\n rule__ShiftExpression__Group_1__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__AstExpressionShift__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18016:1: ( rule__AstExpressionShift__Group_1__0__Impl rule__AstExpressionShift__Group_1__1 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18017:2: rule__AstExpressionShift__Group_1__0__Impl rule__AstExpressionShift__Group_1__1\n {\n pushFollow(FOLLOW_rule__AstExpressionShift__Group_1__0__Impl_in_rule__AstExpressionShift__Group_1__036229);\n rule__AstExpressionShift__Group_1__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstExpressionShift__Group_1__1_in_rule__AstExpressionShift__Group_1__036232);\n rule__AstExpressionShift__Group_1__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ShiftExpression__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:7288:1: ( ( ( rule__ShiftExpression__Group_1__0 )? ) )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:7289:1: ( ( rule__ShiftExpression__Group_1__0 )? )\r\n {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:7289:1: ( ( rule__ShiftExpression__Group_1__0 )? )\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:7290:1: ( rule__ShiftExpression__Group_1__0 )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getShiftExpressionAccess().getGroup_1()); \r\n }\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:7291:1: ( rule__ShiftExpression__Group_1__0 )?\r\n int alt61=2;\r\n int LA61_0 = input.LA(1);\r\n\r\n if ( (LA61_0==RULE_SHIFTOPERATION) ) {\r\n alt61=1;\r\n }\r\n switch (alt61) {\r\n case 1 :\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:7291:2: rule__ShiftExpression__Group_1__0\r\n {\r\n pushFollow(FollowSets000.FOLLOW_rule__ShiftExpression__Group_1__0_in_rule__ShiftExpression__Group__1__Impl14924);\r\n rule__ShiftExpression__Group_1__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getShiftExpressionAccess().getGroup_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Operand__Group_0__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:13181:1: ( rule__Operand__Group_0__1__Impl )\r\n // InternalGo.g:13182:2: rule__Operand__Group_0__1__Impl\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__Operand__Group_0__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Exprs__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWhdsl.g:2154:1: ( rule__Exprs__Group_1__1__Impl )\n // InternalWhdsl.g:2155:2: rule__Exprs__Group_1__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Exprs__Group_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Implementation__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:5025:1: ( rule__Implementation__Group__0__Impl rule__Implementation__Group__1 )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:5026:2: rule__Implementation__Group__0__Impl rule__Implementation__Group__1\r\n {\r\n pushFollow(FOLLOW_rule__Implementation__Group__0__Impl_in_rule__Implementation__Group__010610);\r\n rule__Implementation__Group__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__Implementation__Group__1_in_rule__Implementation__Group__010613);\r\n rule__Implementation__Group__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an ImageProcessor for the specified slice, were 1<=n<=nslices. Returns null if the stack is empty. | @Override
public ImageProcessor getProcessor(int n) {
if (n < 1 || n > layers.size()) return null;
// Create a flat image on the fly with everything on it, and return its processor.
final Layer layer = layers.get(n-1);
final Loader loader = layer.getProject().getLoader();
Long cid;
synchronized (id_cache) {
cid = id_cache.get(layer.getId());
if (null == cid) {
cid = loader.getNextTempId();
id_cache.put(layer.getId(), cid);
}
}
ImageProcessor ip;
synchronized (cid) {
ImagePlus imp = loader.getCachedImagePlus(cid);
if (null == imp || null == imp.getProcessor() || null == imp.getProcessor().getPixels()) {
ip = loader.getFlatImage(layer, this.roi, this.scale, this.c_alphas, this.type, this.clazz, null).getProcessor();
if (invert) ip.invert();
loader.cacheImagePlus(cid, new ImagePlus("", ip));
} else ip = imp.getProcessor();
}
return ip;
} | [
"public synchronized ImageProcessor getProcessor(int n) {\n if (frameInfos==null || frameInfos.size()==0 || raFilePath==null)\n return null;\n if (n<1 || n>frameInfos.size())\n throw new IllegalArgumentException(\"Argument out of range: \"+n);\n Object pixels = null;\n RandomAccessFile rFile = null;\n String exceptionMessage = null;\n try {\n rFile = new RandomAccessFile(new File(raFilePath), \"r\");\n long[] frameInfo = (long[])(frameInfos.get(n-1));\n pixels = readFrame(rFile, frameInfo[0], (int)frameInfo[1]);\n } catch (Exception e) {\n exceptionMessage = exceptionMessage(e);\n } finally {\n try {\n rFile.close();\n } catch (Exception e) {}\n }\n if (exceptionMessage != null) {\n error(exceptionMessage);\n return null;\n }\n if (pixels == null) return null; //failed\n if (pixels instanceof byte[])\n return new ByteProcessor(dwWidth, biHeight, (byte[])pixels, cm);\n else if (pixels instanceof short[])\n return new ShortProcessor(dwWidth, biHeight, (short[])pixels, cm);\n else\n return new ColorProcessor(dwWidth, biHeight, (int[])pixels);\n }",
"@Override\n \tpublic Object getPixels(final int n) {\n \t\tif (n < 1 || n > layers.size()) return null;\n \t\treturn getProcessor(n).getPixels();\n \t}",
"public abstract Image getSlice(int i);",
"private static BufferedImage slice(BufferedImage img, int slice) {\n\t\tif (slice >= img.getWidth()) return null;\n\t\treturn img.getSubimage(slice, 0, 1, img.getHeight());\n\t}",
"public static ImageProcessor createIfSupported()\n \t{\n \t\tif (isSupported())\n \t\t{\n \t\t\treturn new ImageProcessor();\n \t\t}\n \t\treturn null;\n \t}",
"public static int[][] rasterCPU(Slice slice, int numSlice) {\n\n\t\t\tBufferedImage image = new BufferedImage(Main.WIDTH, Main.HEIGHT, BufferedImage.TYPE_INT_RGB);\n\t\t\tGraphics2D ctx = image.createGraphics();\n\t\t\tctx.clearRect(0, 0, Main.WIDTH, Main.HEIGHT);\n\n\t\t\t// Printing section-------------------------- \n\t\t\tslice.fill(ctx);\n\t\t\tslice.printEdge(ctx);\t\t\t\n\t\t\t\t\n\t\t\treturn Main.getData(image);\n\t\t}",
"public String getSliceLabel(int n) {\n if (frameInfos==null || n<1 || n>frameInfos.size())\n throw new IllegalArgumentException(\"No Virtual Stack or argument out of range: \"+n);\n return frameLabel(((long[])(frameInfos.get(n-1)))[2]);\n }",
"public ImageProcessor getImageProcessor(String name) {\n\t\t\n\t\tImageProcessor ip = (ImageProcessor)imageCache.get(name);\n\t\t\n\t\tif (ip==null) {\n\t\t\t// need to create ImagePlus object\n\t\t\taddImageProcessor(name);\n\t\t\tip = (ImageProcessor)imageCache.get(name);\n\t\t}\n\t\t\n\t\treturn ip;\n\t}",
"SliceParameters getSliceParameters(int n);",
"public static ImageProcessor createBlankProcessor(Image image) {\n int width = image.getWidth();\n int height = image.getHeight();\n int bytesPerPixel = image.getBytesPerPixel();\n int numComponents = image.getNumComponents();\n\n if (bytesPerPixel == 4 && numComponents == 3) {\n return new ColorProcessor(width, height);\n } else if (bytesPerPixel == 1 && numComponents == 1) {\n return new ByteProcessor(width, height);\n } else if (bytesPerPixel == 2 && numComponents == 1) {\n return new ShortProcessor(width, height);\n } else if (bytesPerPixel == 4 && numComponents == 1) {\n return new FloatProcessor(width, height);\n }\n return null;\n }",
"public Peg getPeg(int n) { return pegs[n]; }",
"com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice getSlice();",
"public BufferedImage getSlice();",
"public Stack getStack(int slot);",
"private static ImageStack getStack (final MMAcquisition acq, final int ch, final int pos) {\r\n final ImageStack stack = new ImageStack (acq.getWidth(), acq.getHeight());\r\n final int lastFrame = acq.getLastAcquiredFrame();\r\n for (int z=0; z < acq.getSlices(); z++) {\r\n TaggedImage tImg = acq.getImageCache().getImage(ch, z, lastFrame, pos);\r\n ImageProcessor processor = ImageUtils.makeProcessor(tImg);\r\n stack.addSlice(processor);\r\n }\r\n return stack;\r\n }",
"public static ComponentInstance getPartition(ComponentInstance componentInstance) {\n\t\tCollection<ComponentInstance> vprocessors = InstanceModelUtil.getBoundVirtualProcessors(componentInstance);\n\t\tfor (ComponentInstance vproc : vprocessors) {\n\t\t\tCollection<ComponentInstance> procs = InstanceModelUtil.getBoundPhysicalProcessors(vproc);\n\t\t\tfor (ComponentInstance proc : procs) {\n\t\t\t\tif (GetProperties.hasAssignedPropertyValue(proc, \"ARINC653::Module_Major_Frame\")) {\n\t\t\t\t\treturn vproc;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (GetProperties.hasAssignedPropertyValue(vproc, \"Period\")) {\n\t\t\t\treturn vproc;\n\t\t\t}\n\t\t\tif (GetProperties.hasAssignedPropertyValue(vproc, \"ARINC653::Module_Major_Frame\")) {\n\t\t\t\treturn vproc;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public Work getWork(int n) {\r\n\t\tif(work.size()>n && n>=0)\r\n\t\t\treturn work.get(n);\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}",
"public BufferedImage get(int index) {\n\t\tif (index < 0 || index >= stackSize) {\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\treturn imageArray[index];\n\t}",
"public static StackTraceElement get(int n) {\n for (StackTraceElement element : Thread.currentThread().getStackTrace()) {\n if (!element.getClassName().startsWith(\"com.dkarv.jdcallgraph\")) {\n n--;\n if (n < 0) {\n return element;\n }\n }\n }\n throw new IllegalArgumentException(\"Could not find \" + n + \"th element on the stack trace: \" + Arrays.toString(Thread.currentThread().getStackTrace()));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the college capacity map. | private Map<String, Integer> getCollegeCapacityMap() {
Map<String, Integer> capacityMap = new HashMap<String, Integer>();
List<College> collegeList = CollegeInMemoryDao.getInstance()
.getCollegesList();
for (College college : collegeList) {
capacityMap.put(college.getId(), college.getSeatsAvailable());
}
return capacityMap;
} | [
"com.cantor.drop.aggregator.model.CFTrade.Capacity getCapacity();",
"public int getCapacity() {\n\t\treturn mCapcity;\n\t}",
"public java.util.List<LicenseCapacity> getCapacities() {\n if (capacities == null) {\n capacities = new com.amazonaws.internal.ListWithAutoConstructFlag<LicenseCapacity>();\n capacities.setAutoConstruct(true);\n }\n return capacities;\n }",
"public Collection<Capacity> getCapacities()\n {\n final Collection<Capacity> capacities = new ArrayList<Capacity>();\n for (final Capacity capacity : this.factory.getCapacities())\n {\n capacities.add(new Capacity(capacity.getWare(), capacity\n .getQuantity()\n * (this.disabled ? 0 : getQuantity())));\n }\n return capacities;\n }",
"@GET\n @Path(\"/managed-capacity\")\n @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n @Produces({ MediaType.APPLICATION_JSON })\n public ManagedResourcesCapacity getManagedCapacity() {\n\n ManagedResourcesCapacity resources = null;\n try {\n resources = getCapacityDataResource();\n } catch (Exception ex) {\n // failed to find capacity in the database, try to compute directly\n try {\n resources = ManagedCapacityImpl.getManagedCapacity(_dbClient);\n } catch (InterruptedException ignore) {\n // impossible\n }\n }\n return resources;\n }",
"public int getCourseCapacity() {\n return courseCapacity;\n }",
"public Long capacityReservationLevel() {\n return this.capacityReservationLevel;\n }",
"public int getCargoCapacity() { // get the cargo capacity\n\t\treturn cargoCapacity;\n\t}",
"public int getRoomCapacity()\r\n {\r\n //return capacity of the object.\r\n return this.capacity;\r\n }",
"public Integer getCapacityId() {\n return capacityId;\n }",
"public ResourceLocation getCapacityKey() {\n return KEY_OVERSLIME_CAP;\n }",
"public int getCapacityUnits() {\n return capacityUnits;\n }",
"public int getCapacity() {\n\n\t\treturn this.capacity;\n\t}",
"Map<String, DhcpAllocationInfo> getAllocationInfo();",
"public HashMap<String, Long> loadCapacity() {\n HashMap<String, Long> items = null;\n Gson gson = new Gson();\n try {\n BufferedReader reader = new BufferedReader(new FileReader(CAPACITY_PATH));\n Type type = new TypeToken<HashMap<String, Long>>() {\n }.getType();\n items = gson.fromJson(reader, type);\n } catch (FileNotFoundException fnfe) {\n System.out.println(fnfe);\n }\n return items;\n }",
"public java.lang.Integer getCapacity() {\r\n return capacity;\r\n }",
"public Getter reqGetTankCapacity() {\n\t\t\taddProperty(EPC_TANK_CAPACITY);\n\t\t\treturn this;\n\t\t}",
"public double getCapacity() {\n\t\treturn capacity;\n\t}",
"public ScGridColumn<AcUspsInternationalSkeletonRouteOffer> newCapacityColumn()\n {\n return newCapacityColumn(\"Capacity\");\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Devuelve la posicion del jugador en la cancha. | public PosicionJugador getPosicion() {
return posicion;
} | [
"public void setPosicion(PosicionJugador posicion) {\n\t\tthis.posicion = posicion;\n\t}",
"public int getPositionJ(){\r\n\t\t\r\n\t\treturn j;\r\n\t\t\r\n\t}",
"public int getPosicao() {\n return posicao;\n }",
"private void enviarPosicion() {\n juego.getUbicacionPersonaje().setPosX(x);\n juego.getUbicacionPersonaje().setPosY(y);\n juego.getUbicacionPersonaje().setDireccion(getDireccion());\n juego.getUbicacionPersonaje().setFrame(getFrame());\n try {\n juego.getCliente().getSalida().writeObject(gson.toJson(\n juego.getUbicacionPersonaje(), PaqueteMovimiento.class));\n } catch (IOException e) {\n JOptionPane.showMessageDialog(null,\n \"Fallo la conexión con el servidor\");\n }\n }",
"public int getMostrarPosicao() {\n return mostrarPosicao;\n }",
"public void setMostrarPosicao(int mostrarPosicao) {\n this.mostrarPosicao = mostrarPosicao;\n }",
"int positionInCodon() { return position_in_cdna%3;}",
"private void definirPosicionesImagenes() {\n\t\tif (imagenes.size() == 0)\n\t\t\treturn;\n\n\t\tint puntero = ancho - 10; // comienzo en el extremo derecho del panel con un pequenio espacio para que no\n\t\t\t\t\t\t\t\t\t// quede pegado al costado\n\t\tfor (int i = 0; i < imagenes.size(); i++) {\n\t\t\tint decremento = imagenes.get(i).img.getWidth(); // el decremento es el ancho que la imagen ocupará\n\t\t\timagenes.get(i).x = puntero - decremento; // asigno la coordenada en x desde donde se quedó el puntero menos\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// el decremento\n\t\t\tpuntero -= (decremento + 7); // actualizo el puntero que se va acercando más hacia la izquierda\n\t\t}\n\t}",
"private void encuentraJugador(){\r\n for(int i = 0; i < controlador.object.size(); i++){\r\n if(controlador.object.get(i).getID() == ID.Jugador)\r\n jugador = controlador.object.get(i);\r\n }\r\n }",
"public static void ganador (){\n int puntuacionMax = 0;\r\n Jugador ganador = null;\r\n\r\n // Puntuacion de cada ronda\r\n for (int i = 0; i < NUM_RONDAS; i++) {\r\n //Jugador jugadore = jugadores[i];\r\n System.out.println(\"\\nRonda \" + (i + 1));\r\n // Jugadores\r\n for (int j = 0; j < numJugadores; j++) {\r\n System.out.println(\"Puntuacion de \" + jugadores[j].getNombreJugador() + \": \" + jugadores[j].getPuntos(i));\r\n } \r\n }\r\n\r\n // Puntuacion final\r\n for (int i = 0; i < numJugadores; i++) {\r\n int aux = 0;\r\n for (int j = 0; j < NUM_RONDAS; j++) {\r\n aux += jugadores[i].getPuntos(j);\r\n }\r\n if (aux > puntuacionMax) {\r\n puntuacionMax = aux;\r\n ganador = jugadores[i];\r\n }\r\n System.out.println(\"La puntuacion final de \" + jugadores[i].getNombreJugador() + \" es \" + aux);\r\n }\r\n \r\n // Quien o quienes ganan la partida \r\n System.out.print(\"\\nEl ganador del juego es \" + ganador.getNombreJugador());\r\n\r\n //En caso de haber mas de 1 ganador \r\n for (int g = 0; g < numJugadores; g++) {\r\n \r\n int aux = 0;\r\n \r\n for (int i = 0; i < NUM_RONDAS; i++) {\r\n aux += jugadores[g].getPuntos(i);\r\n }\r\n \r\n if(aux == puntuacionMax && jugadores[g].getNombreJugador() != ganador.getNombreJugador()){\r\n System.out.println(\" y \" + jugadores[g].getNombreJugador() + \" \\n\");\r\n }\r\n }\r\n System.out.println(\"\\nENHORABUENA \"); \r\n }",
"int getPos();",
"Position getPos();",
"public void setPosizione(int posizione) {\r\n\t\tthis.posizione = posizione;\r\n\t}",
"public int getIdJugador() {\n\t\treturn this.idJugador;\n\t}",
"private static int[] ubicarPosicionCero(int[][] estado) {\n\t\tfor(int i = 0 ; i < estado.length ; i++) {\n\t\t\tfor(int j = 0 ; j < estado.length ; j++) {\n\t\t\t\tif(estado[i][j]==0) {\n\t\t\t\t\tSystem.out.println(\"La posicion del espacio cero es: \"+ i +\",\"+j);\n\t\t\t\t\treturn new int[] {i,j};\n\t\t\t\t}\n\t\t\t\t//System.out.println(\"La posicion del espacio cero es: \"+ i +\",\"+j);\n\t\t\t\t//posicion[0]= i;\n\t\t\t\t//posicion[1]=j;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public int getOrdenarPosicao() {\n return ordenarPosicao;\n }",
"public void setCoordenada(Coordenada coordenada){\n\t\tthis.posicion = coordenada;\n\t}",
"public void showPosicoes() {\n this.print(\"\\n\");\n for (int i = 0; i < listaJogadores.size(); i++) {\n // System.out.print(posicoes[i] + \"\\t\");\n }\n }",
"public Jugador jugador() {\r\n\treturn jugador;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'field951' field. | public void setField951(java.lang.CharSequence value) {
this.field951 = value;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField951(java.lang.CharSequence value) {\n validate(fields()[951], value);\n this.field951 = value;\n fieldSetFlags()[951] = true;\n return this; \n }",
"public void setField961(java.lang.CharSequence value) {\n this.field961 = value;\n }",
"public void setField952(java.lang.CharSequence value) {\n this.field952 = value;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField961(java.lang.CharSequence value) {\n validate(fields()[961], value);\n this.field961 = value;\n fieldSetFlags()[961] = true;\n return this; \n }",
"public void setField953(java.lang.CharSequence value) {\n this.field953 = value;\n }",
"public void setField980(java.lang.CharSequence value) {\n this.field980 = value;\n }",
"public void setField945(java.lang.CharSequence value) {\n this.field945 = value;\n }",
"public void setField990(java.lang.CharSequence value) {\n this.field990 = value;\n }",
"public void setField971(java.lang.CharSequence value) {\n this.field971 = value;\n }",
"public void setField549(java.lang.CharSequence value) {\n this.field549 = value;\n }",
"public void setField950(java.lang.CharSequence value) {\n this.field950 = value;\n }",
"public void setField970(java.lang.CharSequence value) {\n this.field970 = value;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField953(java.lang.CharSequence value) {\n validate(fields()[953], value);\n this.field953 = value;\n fieldSetFlags()[953] = true;\n return this; \n }",
"public void setField981(java.lang.CharSequence value) {\n this.field981 = value;\n }",
"public void setField532(java.lang.CharSequence value) {\n this.field532 = value;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField952(java.lang.CharSequence value) {\n validate(fields()[952], value);\n this.field952 = value;\n fieldSetFlags()[952] = true;\n return this; \n }",
"public void setField491(java.lang.CharSequence value) {\n this.field491 = value;\n }",
"public void setField941(java.lang.CharSequence value) {\n this.field941 = value;\n }",
"public void setField871(java.lang.CharSequence value) {\n this.field871 = value;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required bool field0 = 1; | boolean getField0(); | [
"void boolField(String name, boolean isDefined, boolean value);",
"boolean hasField0();",
"boolean getRequiredField();",
"public void setRequired(boolean tmp) {\n this.required = tmp;\n }",
"private boolean validateFieldOfStudy(){\r\n return true;\r\n }",
"public boolean hasField1() {\n return fieldSetFlags()[1];\n }",
"io.dstore.values.BooleanValue getRequired();",
"public boolean hasField0() {\n return fieldSetFlags()[0];\n }",
"public Field() { \n initial = false;\n }",
"public boolean isField() {\n if (isField > 0) {\n return true;\n }\n if (isField == 0) {\n return false;\n }\n isField = 0;\n return false;\n }",
"public boolean fieldVerification()\r\n {\r\n\t\treturn false;\r\n\t}",
"boolean hasCheckField();",
"io.dstore.values.BooleanValueOrBuilder getRequiredOrBuilder();",
"public void setRequired(boolean value) {\r\n this.required = value;\r\n }",
"public void setMandatory(java.lang.Boolean value);",
"public void setFieldInstrumentationReq(boolean fieldInstrumentationReq);",
"public boolean hasVar1() {\n return fieldSetFlags()[2];\n }",
"public boolean isRequired();",
"public void setRequired(boolean value) {\n this.required = value;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleReponse" $ANTLR start "entryRuleEBoolean" InternalQcm.g:415:1: entryRuleEBoolean returns [String current=null] : iv_ruleEBoolean= ruleEBoolean EOF ; | public final String entryRuleEBoolean() throws RecognitionException {
String current = null;
AntlrDatatypeRuleToken iv_ruleEBoolean = null;
try {
// InternalQcm.g:415:48: (iv_ruleEBoolean= ruleEBoolean EOF )
// InternalQcm.g:416:2: iv_ruleEBoolean= ruleEBoolean EOF
{
newCompositeNode(grammarAccess.getEBooleanRule());
pushFollow(FOLLOW_1);
iv_ruleEBoolean=ruleEBoolean();
state._fsp--;
current =iv_ruleEBoolean.getText();
match(input,EOF,FOLLOW_2);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
} | [
"public final EObject entryRuleBooleanExp() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleBooleanExp = null;\n\n\n try {\n // InternalDOcl.g:3244:51: (iv_ruleBooleanExp= ruleBooleanExp EOF )\n // InternalDOcl.g:3245:2: iv_ruleBooleanExp= ruleBooleanExp EOF\n {\n newCompositeNode(grammarAccess.getBooleanExpRule()); \n pushFollow(FOLLOW_1);\n iv_ruleBooleanExp=ruleBooleanExp();\n\n state._fsp--;\n\n current =iv_ruleBooleanExp; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final EObject entryRuleBool() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleBool = null;\n\n\n try {\n // ../org.xtext.hipie/src-gen/org/xtext/hipie/parser/antlr/internal/InternalHIPIE.g:1228:2: (iv_ruleBool= ruleBool EOF )\n // ../org.xtext.hipie/src-gen/org/xtext/hipie/parser/antlr/internal/InternalHIPIE.g:1229:2: iv_ruleBool= ruleBool EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getBoolRule()); \n }\n pushFollow(FOLLOW_ruleBool_in_entryRuleBool2538);\n iv_ruleBool=ruleBool();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleBool; \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleBool2548); if (state.failed) return current;\n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public final EObject entryRuleBooleanLiteral() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleBooleanLiteral = null;\n\n\n try {\n // ../org.osate.xtext.aadl2.properties/src-gen/org/osate/xtext/aadl2/properties/parser/antlr/internal/InternalPropertiesParser.g:667:2: (iv_ruleBooleanLiteral= ruleBooleanLiteral EOF )\n // ../org.osate.xtext.aadl2.properties/src-gen/org/osate/xtext/aadl2/properties/parser/antlr/internal/InternalPropertiesParser.g:668:2: iv_ruleBooleanLiteral= ruleBooleanLiteral EOF\n {\n newCompositeNode(grammarAccess.getBooleanLiteralRule()); \n pushFollow(FollowSets000.FOLLOW_ruleBooleanLiteral_in_entryRuleBooleanLiteral1439);\n iv_ruleBooleanLiteral=ruleBooleanLiteral();\n\n state._fsp--;\n\n current =iv_ruleBooleanLiteral; \n match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleBooleanLiteral1449); \n\n }\n\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n }\n return current;\n }",
"public final EObject entryRuleEBOOLEAN() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleEBOOLEAN = null;\n\n\n try {\n // InternalRMParser.g:8807:49: (iv_ruleEBOOLEAN= ruleEBOOLEAN EOF )\n // InternalRMParser.g:8808:2: iv_ruleEBOOLEAN= ruleEBOOLEAN EOF\n {\n newCompositeNode(grammarAccess.getEBOOLEANRule()); \n pushFollow(FOLLOW_1);\n iv_ruleEBOOLEAN=ruleEBOOLEAN();\n\n state._fsp--;\n\n current =iv_ruleEBOOLEAN; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final EObject entryRuleBooleanLiteral() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleBooleanLiteral = null;\n\n\n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4646:2: (iv_ruleBooleanLiteral= ruleBooleanLiteral EOF )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4647:2: iv_ruleBooleanLiteral= ruleBooleanLiteral EOF\n {\n currentNode = createCompositeNode(grammarAccess.getBooleanLiteralRule(), currentNode); \n pushFollow(FOLLOW_ruleBooleanLiteral_in_entryRuleBooleanLiteral8086);\n iv_ruleBooleanLiteral=ruleBooleanLiteral();\n _fsp--;\n\n current =iv_ruleBooleanLiteral; \n match(input,EOF,FOLLOW_EOF_in_entryRuleBooleanLiteral8096); \n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public final EObject entryRuleBooleanLiteral() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleBooleanLiteral = null;\n\n\n try {\n // ../com.rockwellcollins.atc.agree/src-gen/com/rockwellcollins/atc/agree/parser/antlr/internal/InternalAgree.g:4422:2: (iv_ruleBooleanLiteral= ruleBooleanLiteral EOF )\n // ../com.rockwellcollins.atc.agree/src-gen/com/rockwellcollins/atc/agree/parser/antlr/internal/InternalAgree.g:4423:2: iv_ruleBooleanLiteral= ruleBooleanLiteral EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getBooleanLiteralRule()); \n }\n pushFollow(FOLLOW_ruleBooleanLiteral_in_entryRuleBooleanLiteral9953);\n iv_ruleBooleanLiteral=ruleBooleanLiteral();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleBooleanLiteral; \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleBooleanLiteral9963); if (state.failed) return current;\n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public final EObject entryRuleBooleanLiteral() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleBooleanLiteral = null;\n\n\n try {\n // InternalAgreeParser.g:8885:2: (iv_ruleBooleanLiteral= ruleBooleanLiteral EOF )\n // InternalAgreeParser.g:8886:2: iv_ruleBooleanLiteral= ruleBooleanLiteral EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getBooleanLiteralRule()); \n }\n pushFollow(FollowSets000.FOLLOW_1);\n iv_ruleBooleanLiteral=ruleBooleanLiteral();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleBooleanLiteral; \n }\n match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n }\n return current;\n }",
"public final EObject entryRuleBooleanLiteral() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleBooleanLiteral = null;\n\n\n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1907:2: (iv_ruleBooleanLiteral= ruleBooleanLiteral EOF )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1908:2: iv_ruleBooleanLiteral= ruleBooleanLiteral EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getBooleanLiteralRule()); \n }\n pushFollow(FOLLOW_ruleBooleanLiteral_in_entryRuleBooleanLiteral4507);\n iv_ruleBooleanLiteral=ruleBooleanLiteral();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleBooleanLiteral; \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleBooleanLiteral4517); if (state.failed) return current;\n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public final EObject entryRuleBooleanLiteral() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleBooleanLiteral = null;\n\n\n try {\n // InternalJsonParser.g:1267:55: (iv_ruleBooleanLiteral= ruleBooleanLiteral EOF )\n // InternalJsonParser.g:1268:2: iv_ruleBooleanLiteral= ruleBooleanLiteral EOF\n {\n newCompositeNode(grammarAccess.getBooleanLiteralRule()); \n pushFollow(FollowSets000.FOLLOW_1);\n iv_ruleBooleanLiteral=ruleBooleanLiteral();\n\n state._fsp--;\n\n current =iv_ruleBooleanLiteral; \n match(input,EOF,FollowSets000.FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final EObject entryRuleBooleanLiteral() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleBooleanLiteral = null;\r\n\r\n\r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4193:2: (iv_ruleBooleanLiteral= ruleBooleanLiteral EOF )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4194:2: iv_ruleBooleanLiteral= ruleBooleanLiteral EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n newCompositeNode(grammarAccess.getBooleanLiteralRule()); \r\n }\r\n pushFollow(FOLLOW_ruleBooleanLiteral_in_entryRuleBooleanLiteral9006);\r\n iv_ruleBooleanLiteral=ruleBooleanLiteral();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n current =iv_ruleBooleanLiteral; \r\n }\r\n match(input,EOF,FOLLOW_EOF_in_entryRuleBooleanLiteral9016); if (state.failed) return current;\r\n\r\n }\r\n\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }",
"public final EObject entryRuleBooleanLiteral() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleBooleanLiteral = null;\n\n\n try {\n // InternalSafetyParser.g:10495:55: (iv_ruleBooleanLiteral= ruleBooleanLiteral EOF )\n // InternalSafetyParser.g:10496:2: iv_ruleBooleanLiteral= ruleBooleanLiteral EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getBooleanLiteralRule()); \n }\n pushFollow(FollowSets000.FOLLOW_1);\n iv_ruleBooleanLiteral=ruleBooleanLiteral();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleBooleanLiteral; \n }\n match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final EObject entryRuleBoolValue() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleBoolValue = null;\n\n\n try {\n // InternalDsl.g:4804:50: (iv_ruleBoolValue= ruleBoolValue EOF )\n // InternalDsl.g:4805:2: iv_ruleBoolValue= ruleBoolValue EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getBoolValueRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleBoolValue=ruleBoolValue();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleBoolValue; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final EObject entryRuleBooleanCondition() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleBooleanCondition = null;\n\n\n try {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1011:2: (iv_ruleBooleanCondition= ruleBooleanCondition EOF )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1012:2: iv_ruleBooleanCondition= ruleBooleanCondition EOF\n {\n newCompositeNode(grammarAccess.getBooleanConditionRule()); \n pushFollow(FOLLOW_ruleBooleanCondition_in_entryRuleBooleanCondition1970);\n iv_ruleBooleanCondition=ruleBooleanCondition();\n\n state._fsp--;\n\n current =iv_ruleBooleanCondition; \n match(input,EOF,FOLLOW_EOF_in_entryRuleBooleanCondition1980); \n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public final EObject entryRuleBooleanType() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleBooleanType = null;\n\n\n try {\n // ../org.xtext.example.lmrc.entity/src-gen/org/xtext/example/lmrc/entity/parser/antlr/internal/InternalEntityDsl.g:329:2: (iv_ruleBooleanType= ruleBooleanType EOF )\n // ../org.xtext.example.lmrc.entity/src-gen/org/xtext/example/lmrc/entity/parser/antlr/internal/InternalEntityDsl.g:330:2: iv_ruleBooleanType= ruleBooleanType EOF\n {\n newCompositeNode(grammarAccess.getBooleanTypeRule()); \n pushFollow(FOLLOW_ruleBooleanType_in_entryRuleBooleanType678);\n iv_ruleBooleanType=ruleBooleanType();\n\n state._fsp--;\n\n current =iv_ruleBooleanType; \n match(input,EOF,FOLLOW_EOF_in_entryRuleBooleanType688); \n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public final EObject entryRuleXBooleanLiteral() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleXBooleanLiteral = null;\n\n\n try {\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:4405:2: (iv_ruleXBooleanLiteral= ruleXBooleanLiteral EOF )\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:4406:2: iv_ruleXBooleanLiteral= ruleXBooleanLiteral EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getXBooleanLiteralRule()); \n }\n pushFollow(FOLLOW_ruleXBooleanLiteral_in_entryRuleXBooleanLiteral10356);\n iv_ruleXBooleanLiteral=ruleXBooleanLiteral();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleXBooleanLiteral; \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleXBooleanLiteral10366); if (state.failed) return current;\n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public final EObject entryRuleXBooleanLiteral() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleXBooleanLiteral = null;\n\n\n \n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\n try {\n // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:5587:2: (iv_ruleXBooleanLiteral= ruleXBooleanLiteral EOF )\n // ../com.euclideanspace.pbase/src-gen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:5588:2: iv_ruleXBooleanLiteral= ruleXBooleanLiteral EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getXBooleanLiteralRule()); \n }\n pushFollow(FOLLOW_ruleXBooleanLiteral_in_entryRuleXBooleanLiteral12230);\n iv_ruleXBooleanLiteral=ruleXBooleanLiteral();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleXBooleanLiteral; \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleXBooleanLiteral12240); if (state.failed) return current;\n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n\n \tmyHiddenTokenState.restore();\n\n }\n return current;\n }",
"public final void entryRuleAstExpressionBoolean() throws RecognitionException {\n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1967:1: ( ruleAstExpressionBoolean EOF )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1968:1: ruleAstExpressionBoolean EOF\n {\n before(grammarAccess.getAstExpressionBooleanRule()); \n pushFollow(FOLLOW_ruleAstExpressionBoolean_in_entryRuleAstExpressionBoolean4143);\n ruleAstExpressionBoolean();\n\n state._fsp--;\n\n after(grammarAccess.getAstExpressionBooleanRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleAstExpressionBoolean4150); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"public final EObject entryRuleBooleanType() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleBooleanType = null;\n\n\n try {\n // InternalDOcl.g:4458:52: (iv_ruleBooleanType= ruleBooleanType EOF )\n // InternalDOcl.g:4459:2: iv_ruleBooleanType= ruleBooleanType EOF\n {\n newCompositeNode(grammarAccess.getBooleanTypeRule()); \n pushFollow(FOLLOW_1);\n iv_ruleBooleanType=ruleBooleanType();\n\n state._fsp--;\n\n current =iv_ruleBooleanType; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final EObject entryRuleJsonAnnexBoolean() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleJsonAnnexBoolean = null;\n\n\n try {\n // InternalJsonParser.g:652:57: (iv_ruleJsonAnnexBoolean= ruleJsonAnnexBoolean EOF )\n // InternalJsonParser.g:653:2: iv_ruleJsonAnnexBoolean= ruleJsonAnnexBoolean EOF\n {\n newCompositeNode(grammarAccess.getJsonAnnexBooleanRule()); \n pushFollow(FollowSets000.FOLLOW_1);\n iv_ruleJsonAnnexBoolean=ruleJsonAnnexBoolean();\n\n state._fsp--;\n\n current =iv_ruleJsonAnnexBoolean; \n match(input,EOF,FollowSets000.FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Changes Hero's state to armed and symbol to A. | public void armed()
{
this.armed=true;
this.symbol='A';
} | [
"public Hero() {\n\t\tsuper();\n\t\tthis.symbol = 'H';\n\t}",
"public void makeHero()\r\n { \r\n maxHealth = 100;\r\n health = maxHealth;\r\n }",
"public void setHero(String name){\n if (currentHero != null) {\n currentHero.disableListeners();\n }\n for(AbstractHero hero : heros){\n if(hero.getName().equals(name)){\n currentHero = hero;\n currentHero.enableListeners();\n return;\n }\n }\n throw new UnexpectedIncorrectGameState(\"Could not switch to the hero you requested, did not exist!\");\n }",
"private void setUpHero() {\n RectangularRPGBoard b = getBoard();\n\n // get hero. Displayed idx is 1-based\n List<Hero> list = Infos.getAllHeros();\n for (int i = 0; i < ConstantVariables.DEFAULT_HERO_COUNT; i++) {\n Hero.printHeroList(list);\n OutputTools.printYellowString(InputTools.CHOOSE_HERO_MESSAGE);\n\n int idx = InputTools.getAnInteger();\n while (idx - 1 < 0 || idx - 1 >= list.size()) {\n System.out.println(InputTools.ILLEGAL_VALUE_ERROR);\n OutputTools.printYellowString(InputTools.CHOOSE_HERO_MESSAGE);\n idx = InputTools.getAnInteger();\n }\n\n // get that hero\n Hero h = list.remove(idx - 1);\n heros.add(h);\n \n // set alias according to the order of choosing them\n h.setAlias(\"H\" + (i+1)); \n\n // set position for this hero\n Coordinate c = new Coordinate(ConstantVariables.HERO_NEXUS_ROW_IDX, i * 3);\n h.enter(c, b.getEntry(c));\n }\n OutputTools.printYellowString(\"These are your heros, Input any key to continue\");\n Hero.printHeroList(heros);\n InputTools.getLine();\n }",
"void updateDroneArmingState(boolean isArmed);",
"public void setHeroHurt(Animation<TextureRegion> heroHurt) {\n this.heroHurt = heroHurt;\n }",
"private void halfElfChanges() {\n size = \"Medium\";\n speed = 30;\n raceFeatures.add(\"Darkvision\");\n raceFeatures.add(\"Fey Ancestry\");\n }",
"private void humanChanges() {\n size = \"Medium\";\n speed = 30;\n if (race.equals(\"Human (Variant)\"))\n raceFeatures.add(\"Choose 1 Feat\");\n }",
"public void update(Hero theHero);",
"private void shootEnemyState()\n\t{\n\t\t_playfield.forceDisableTraps();\n\t\t_enemy1 = EnemyFactory.createEnemyOfType(EnemyFactory.EnemyType.MediumBandit);\n\t\t_enemy1.getTransformComponent().setPosition(Engine.getWidth() / 2, Engine.getHeight() + 100);\n\t\t\n\t\t//Tween Enemy to specific position.\n\t\t_enemy1.getTransformComponent().doPosition(Engine.getWidth() / 2, 600, _tutorialSpeed, TweenStartType.GameTime).setCallbackMethod(\n\t\t\tnew IEngineTweenMethod()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void onMethod(int tweenEventType, EngineTween tween) \n\t\t\t\t{\n\t\t\t\t\t_enemy1.setEnemyState(Enemy.EnemyState.IdleState, true);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t\t\n\t\tgetTransformComponent().setPosition(-100, -100);\n\t\tgetComponent(RenderComponent.class).setActiveState(true);\n\t\tbowDrawingMotion(Engine.getWidth() / 2, 900, _tutorialSpeed / 2, 2f, new IEngineTweenMethod()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void onMethod(int tweenEventType, EngineTween tween) \n\t\t\t{\n\t\t\t\t//Activate Player Bow Input\n\t\t\t\t_player.getComponent(PlayerWeaponControlComponent.class).setActiveState(true);\n\t\t\t}\t\n\t\t});\n\t\t\n\t\t_enemy1.getComponent(HealthComponent.class).addEventListener(HealthComponent.EVENT_HEALTH_DIED, this);\n\t}",
"public void setHeroDying(Animation<TextureRegion> heroDying) {\n this.heroDying = heroDying;\n }",
"public void makeAcid() {\n\n image = acidBall;\n }",
"public void toggleArms(){\n \tif(isArmOpen){\n \t\tarmController.set(Value.kReverse);\n \t}\n \telse{\n \t\tarmController.set(Value.kForward);\n \t}\n }",
"void setHandState(HandState state);",
"public void setHero(int i) {\n if (currentHero != null) {\n currentHero.disableListeners();\n }\n heroIndex = i;\n currentHero = heros.get(i);\n currentHero.enableListeners();\n }",
"public void changeActiveMonster(){\n //todo\n }",
"private void elfChanges() {\n size = \"Medium\";\n speed = 30;\n raceFeatures.add(\"Darkvision\");\n raceFeatures.add(\"Fey Ancestry\");\n raceFeatures.add(\"Trance\");\n raceFeatures.add(\"Keen Senses\");\n if (race.equals(\"High Elf\")) {\n raceFeatures.add(\"Elf Weapon Training (prof w/ longsword,shortsword,shortbow,longbow)\");\n raceFeatures.add(\"1 Wizard Cantrip\");\n raceFeatures.add(\"Extra Language\");\n } else if (race.equals(\"Wood Elf\")) {\n raceFeatures.add(\"Elf Weapon Training (prof w/ longsword,shortsword,shortbow,longbow)\");\n raceFeatures.add(\"Fleet of Foot\");\n speed = 35;\n raceFeatures.add(\"Mask of the Wild\");\n } else {\n raceFeatures.add(\"Superior Darkvision\");\n raceFeatures.add(\"Sunlight Sensitivity\");\n raceFeatures.add(\"Drow Magic\");\n raceFeatures.add(\"Drow Weapon Training (prof w/ rapiers,shortswords,hand crossbows)\");\n }\n }",
"public BaseHero() {\n this.allPowers = new ArrayList<>();\n this.personType = \"Hero\";\n this.hitpoints = 100;\n this.isResting = false;\n }",
"private void pickHeroInPhase() {\n if (PICK_PHASE_COUNTER == FIRST_HERO) {\n world.pickHero(HeroName.GUARDIAN);\n } else if (PICK_PHASE_COUNTER == SECOND_HERO) {\n world.pickHero(HeroName.BLASTER);\n } else if (PICK_PHASE_COUNTER == FORTH_HERO) {\n world.pickHero(HeroName.BLASTER);\n } else if (PICK_PHASE_COUNTER == THERD_HERO) {\n world.pickHero(HeroName.BLASTER);\n }\n\n PICK_PHASE_COUNTER++;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper function to update the Event record fluctuating boolean with a comparison of the defined threshold and the absolute value of the difference between current temp and the Event recorded temp | public void calculateFluctuating(DecimalFormat df, Double threshold, Double thisTemp) {
if (threshold != null && threshold.compareTo(Math.abs(Double.valueOf(df.format(thisTemp - this.temperature)))) < 0) {
this.fluctuating = false;
}
} | [
"private void threshold_is_reached() {\n threshold = 1.0;\n\n //Given there are 2 inputs\n multiplicity = 2;\n setup(multiplicity);\n\n //Given inputs are 0.5 and 0.5\n ins.get(0).setSignal(Signal.of(0.5));\n ins.get(1).setSignal(Signal.of(0.500000000000001));\n\n //Given both weigths are 1.0\n weigths.set(0, 1.0);\n weigths.set(1, 1.0);\n }",
"@Override\n public Event testEvent() throws PhidgetException {\n if((sensorController.getVal(sensorName) > threshold)){\n return new Event(name_gt,description_gt, hideFromFeed);\n } else {\n return new Event(name_lt,description_lt, hideFromFeed);\n }\n }",
"void incrementToThreshold() {\r\n this.value = threshold;\r\n\r\n }",
"private float applyThreshold(float input) {\n return abs(input) > THRESHOLD_MOTION ? input : 0;\n }",
"public boolean handleTempChange(int temp)\r\n\t{\r\n\t\tif (temp > 100) {\r\n\t\t\tSystem.out.print(\"Subsection \" + getName() + \" turning heater OFF due to hight temparture: \" + temp + \"\\n\");\r\n\t\t}\r\n\t\telse if (temp < 60) {\r\n\t\t\tSystem.out.print(\"Subsection \" + getName() + \" turning heater ON due to low temparture: \" + temp + \"\\n\");\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public ThresholdEventRule(String name, String name_lt, String name_gt, String d_lt, String d_gt, String sensorName, int val, boolean hideFromFeed, int timeout){\n super(name, hideFromFeed, timeout);\n this.name_lt = name_lt;\n this.name_gt = name_gt;\n this.description_lt = d_lt;\n this.description_gt = d_gt;\n this.sensorName = sensorName;\n this.threshold = val;\n this.currentState = getInitialState();\n }",
"private void updateThresholdFlags() {\n verbose = debug = event = usage = warning = error = false;\n switch (myThreshold) {\n /* The order of the cases is significant, fallthrus intentional */\n case Trace.VERBOSE: verbose = true;\n case Trace.DEBUG: debug = true;\n case Trace.EVENT: event = true;\n case Trace.USAGE: usage = true;\n case Trace.WORLD: world = true;\n case Trace.WARNING: warning = true;\n case Trace.ERROR: error = true;\n break;\n default:\n assert false: \"bad case in updateThresholdFlags: \" +\n myThreshold;\n }\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n long curTime = DateTime.getDateTime();\n if ((double)(curTime - lastSaved) > filterDataMinTime) {\n lastSaved = curTime;\n double[] samples = new double[3];\n samples[DataFormat.Accelerometer.X] = event.values[0] / GRAVITY;\n samples[DataFormat.Accelerometer.Y] = event.values[1] / GRAVITY;\n samples[DataFormat.Accelerometer.Z] = event.values[2] / GRAVITY;\n DataTypeDoubleArray dataTypeDoubleArray = new DataTypeDoubleArray(curTime, samples);\n try {\n dataKitAPI.insertHighFrequency(dataSourceClient, dataTypeDoubleArray);\n callBack.onReceivedData(dataTypeDoubleArray);\n } catch (DataKitException e) {\n LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(ServicePhoneSensor.INTENT_STOP));\n }\n }\n }",
"public void updateFocusState() {\n float FFT_freq_Hz, FFT_value_uV;\n int alpha_count = 0, beta_count = 0;\n\n for (int Ichan=0; Ichan < 2; Ichan++) { // only consider first two channels\n for (int Ibin=0; Ibin < fftBuff[Ichan].specSize(); Ibin++) {\n FFT_freq_Hz = fftBuff[Ichan].indexToFreq(Ibin);\n FFT_value_uV = fftBuff[Ichan].getBand(Ibin);\n\n if (FFT_freq_Hz >= 7.5f && FFT_freq_Hz <= 12.5f) { //FFT bins in alpha range\n alpha_avg += FFT_value_uV;\n alpha_count ++;\n }\n else if (FFT_freq_Hz > 12.5f && FFT_freq_Hz <= 30) { //FFT bins in beta range\n beta_avg += FFT_value_uV;\n beta_count ++;\n }\n }\n }\n\n alpha_avg = alpha_avg / alpha_count; // average uV per bin\n beta_avg = beta_avg / beta_count; // average uV per bin\n\n // version 1\n if (alpha_avg > alpha_thresh && alpha_avg < alpha_upper && beta_avg < beta_thresh) {\n isFocused = true;\n } else {\n isFocused = false;\n }\n }",
"public void adjust_FineFuelMoisture(){\r\n\t// If FFM is one or less we set it to one\t\t\r\n\tif ((FFM-1)<=0){\r\n\t\tFFM=1;\r\n\t}else{\r\n\t\t//add 5 percent FFM for each Herb stage greater than one\r\n\t\tFFM=FFM+(iherb-1)*5;\r\n\t}\r\n}",
"public void checkPosture(long timeSinceFall){\n //wait for 15 seconds (setting the time randomly) to see if user stands up during this time\n Log.d(\"checkPosture:\", \"time since fall in ms: \"+timeSinceFall);\n long currentTime = System.currentTimeMillis();\n\n Log.d(\"checkPosture: \",\"time passed from fall: \"+(currentTime-timeSinceFall));\n\n if(!getAccelerationBalanced()){\n Log.d(\"checkPosture\",\"in acceleration balanced if statement\");\n // we check for the last measurement to see if it's between the following limits\n accelerationBalanced = (samples[SAMPLES_BUFFER_SIZE-1] >= 9.6 && samples[SAMPLES_BUFFER_SIZE-1] <= 10.0);\n Log.d(\"checkPosture\",\"accelerationBalanced: \" + accelerationBalanced);\n }else{\n //acceleration has balanced between (9.5,10) so now we assume user is lying down\n Log.d(\"checkPosture\",\"stoodup: \"+stoodUp);\n if(!getStoodUp() && (currentTime - timeSinceFall < Preferences.getTimeForTriggering(this )* MILLISECONDS_PER_SECOND)){\n //check to see if he stood up\n stoodUp = (samples[SAMPLES_BUFFER_SIZE-1] <= 0.65 * GRAVITY_ACCELERATION);\n Log.d(\"CheckPosture\", \"Not stood up yet.\");\n }else if(!getStoodUp() && (currentTime - timeSinceFall >= Preferences.getTimeForTriggering(this)* MILLISECONDS_PER_SECOND)){\n //user didn't stand up since fall and there's been 15 seconds => trigger action\n Log.d(\"checkPosture\",\"not stood up and gonna trigger emergency\");\n initValues();\n new Emergency(this, db, mToast).triggerEmergency();\n }else if(getStoodUp() && (currentTime - timeSinceFall <= Preferences.getTimeForTriggering(this) * MILLISECONDS_PER_SECOND)){\n\n warningCard.setVisibility(View.VISIBLE);\n }\n }\n }",
"@Override\n public void timerTicked(FreezerTimerTickedEvent event) {\n if (freezerSettings.getCurrentTemp() >= (freezerSettings.getDesiredRefrigeratorTemp()\n + freezerSettings.getCompressorStartDiff())) {\n freezerContext.changeCurrentState(FreezerCoolingState.instance());\n } else {\n display.freezerTemp(freezerSettings.getCurrentTemp());\n }\n }",
"private float getThresh(){\n\t\tfloat val = thresh_;\n\t\treturn val;\n\t}",
"public boolean fallDetected(){\n //1. compare acceleration amplitude with lower threshold\n //2. if acceleration is less than low_threshold compare if next_acceleration_amplitude > high_threshold\n //3. if true fall detected!\n\n if(samples[SAMPLES_BUFFER_SIZE-1] - samples[0] >= 2.5 * GRAVITY_ACCELERATION){\n// Log.d(\"Fall Detection\",\"Fall Detected!\");\n showAToast(getString(R.string.toast_potential_fall));\n\n return true;\n }\n return false;\n }",
"private boolean accelerometerOver(double threshold) {\n\n\t\t// this is horizontal, maybe accommodate for noise?\n\t\tdouble x = Math.abs(accel.getX());\n\n\t\t// this is horizontal, maybe accommodate for noise?\n\t\tdouble y = Math.abs(accel.getY());\n\n\t\t// this is down, so accommodate for 1 g of force\n\t\t// (remember, RIO is upside down)\n\t\tdouble z = Math.abs(accel.getZ()) - 1;\n\n\t\t// combine the three into one vector.\n\t\t// If you EVER get over 'gs', cut the hopper\n\t\tdouble totalMagnitude = Math.sqrt(x * x + y * y + z * z);\n\t\tSmartDashboard.putNumber(\"Accelerometer Magnitude \", totalMagnitude);\n\t\tif (totalMagnitude > threshold)\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"public void pressureToFire() {\n fire1.set(true);\n fire2.set(FFM);\n }",
"private void calculateLightsOn() {\n\t\tboolean newLightsOn = this.fluorescentLighting >= this.switchLevel;\n\t\tif (this.fluorescentLightingOn != null && newLightsOn != this.fluorescentLightingOn) {\n\t\t\tnotifyListeners(SpaceStatusChangeListener.EVENT_LIGHTS_ON_OFF, newLightsOn);\n\t\t}\n\t\tthis.fluorescentLightingOn = newLightsOn;\n\t}",
"int getTreshold();",
"public boolean checkMeasurementsBeforeParticleLoop() {\n //Pipe\n boolean changed = false;\n if (control.getScenario() != null && control.getScenario().getMeasurementsPipe() != null) {\n MeasurementContainer mp = control.getScenario().getMeasurementsPipe();\n if (MeasurementContainer.timecontinuousMeasures) {\n writeindex = mp.getIndexForTime(barrier.stepEndTime);\n //Sample all the time\n if (!mp.measurementsActive) {\n mp.measurementsActive = true;\n changed = true;\n }\n } else {\n //SAmple only at timespots\n int actual = mp.getIndexForTime(barrier.stepStartTime);\n int next = mp.getIndexForTime(barrier.stepEndTime);\n// System.out.println(\"prepareSamples in step \"+control.getThreadController().getSteps()+\": indexnow: \"+actual+\" :-> \"+next);\n if (writeindex > next || writeindex < 0) {\n //After reset of a simulation, we need to reset the writeindex\n writeindex = next;\n mp.measurementsActive = true;\n changed = true;\n } else if (actual != next) {\n writeindex = next;\n mp.measurementsActive = true;\n changed = true;\n } else {\n if (mp.measurementsActive) {\n mp.measurementsActive = false;\n changed = true;\n }\n }\n\n }\n }\n\n //Surface\n if (control.getSurface() != null) {\n SurfaceMeasurementRaster smr = control.getSurface().getMeasurementRaster();\n\n if (smr != null) {\n if (smr.continousMeasurements) {\n if (!smr.measurementsActive) {\n changed = true;\n smr.measurementsActive = true;\n }\n writeindexSurface = smr.getIndexContainer().getTimeIndex(barrier.getStepEndTime());\n smr.setWriteIndex(writeindexSurface);\n } else {\n int actual = smr.getIndexContainer().getTimeIndex(barrier.getStepStartTime());\n int next = smr.getIndexContainer().getTimeIndex(barrier.getStepEndTime());\n if (actual != next) {\n //Enable the sampling, because we want to collect the information at the end of this timestep\n smr.measurementsActive = true;\n\n writeindexSurface = next;\n smr.setWriteIndex(writeindexSurface);\n changed = true;\n } else if (writeindexSurface > actual || writeindexSurface < 0) {\n //We had a reset and need put this back to 0\n smr.measurementsActive = true;\n writeindexSurface = actual;\n smr.setWriteIndex(writeindexSurface);\n changed = true;\n } else {\n if (smr.measurementsActive) {\n smr.measurementsActive = false;\n changed = true;\n }\n }\n smr.getIndexContainer().setActualTime(barrier.getStepEndTime());\n }\n }\n }\n return changed;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the first newsletter in the ordered set where issueNumber = &63;. | public Newsletter findByIssueNumber_First(
long issueNumber, OrderByComparator<Newsletter> orderByComparator)
throws NoSuchNewsletterException; | [
"public Newsletter fetchByIssueNumber_First(\n\t\tlong issueNumber, OrderByComparator<Newsletter> orderByComparator);",
"public java.util.List<Newsletter> findByIssueNumber(\n\t\tlong issueNumber, int start, int end);",
"public java.util.List<Newsletter> findByIssueNumber(\n\t\tlong issueNumber, int start, int end,\n\t\tOrderByComparator<Newsletter> orderByComparator);",
"public Newsletter fetchByIssueNumber_Last(\n\t\tlong issueNumber, OrderByComparator<Newsletter> orderByComparator);",
"public static EmailMessage selectOne(long emailMessageNum) throws Exception {\n String command = \"SELECT * FROM emailmessage \" + \"WHERE EmailMessageNum = \" + POut.Long(emailMessageNum);\n List<EmailMessage> list = TableToList(Db.GetTable(command));\n if (list.Count == 0)\n {\n return null;\n }\n \n return list[0];\n }",
"static String getFirstTicket()\n {\n return arrayListQueue.get(0).toString();\n }",
"public int getSingle_issue_id() {\n return single_issue_id;\n }",
"public Note getFirstNote()\r\n\t{\r\n\t\tif (getNotes() != null && !getNotes().isEmpty())\r\n\t\t{\r\n\t\t\treturn getNotes().get(FIRST);\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}",
"@Override\n public Note getLowestNote() {\n List<Note> currentNotes = this.getNotes();\n int size = currentNotes.size();\n Note lowestNote = null;\n\n for (int i = 0; i < size; i++) {\n Note currentNote = currentNotes.get(i);\n\n if (currentNote.isLower(lowestNote)) {\n lowestNote = currentNote;\n }\n }\n if (lowestNote == null) {\n throw new IllegalArgumentException(\"No Notes To Compare\");\n }\n return lowestNote;\n }",
"public String getISSUE_NBR() {\r\n return ISSUE_NBR;\r\n }",
"public java.lang.String getIssueNumber() {\r\n return issueNumber;\r\n }",
"public Ticket search(String serialNumber) {\r\n for (Iterator iterator = tickets.iterator(); iterator.hasNext(); ) {\r\n Ticket ticket = (Ticket) iterator.next();\r\n if (ticket.getSerialNumber().equalsIgnoreCase(serialNumber)) {\r\n return ticket;\r\n }\r\n }\r\n return null;\r\n }",
"public Newsletter findByIssueNumber_Last(\n\t\t\tlong issueNumber, OrderByComparator<Newsletter> orderByComparator)\n\t\tthrows NoSuchNewsletterException;",
"public ArrayList<CachedDemographicNote> findFirstInstanceOfIssueByIssueCodeAndDate(NoteIssue noteIssue, GregorianCalendar startDate, GregorianCalendar endDate)\n\t{\n\t\t// this maybe more complicated than it originally sounds.\n\t\t// first of all we need to match all issues with notes\n\t\t// then we need to filter by issues by the ones we want\n\t\t// then we calculate the first instance of each issue\n\t\t// then we filter on the date range.\n\n\t\t// a reversal of the algorithm should be more efficient and accomplish\n\t\t// something similar, first filter issues by issues we want\n\t\t// then calculate matching notes to issues\n\t\t// then calculate first instance of issue.\n\t\t// then filter issues by date range we want.\n\n\t\t// you can not search by notes with in the date range as it will not gurantee \n\t\t// the first instance of the issue is in that date range.\n\n\t\tString sqlCommand = \"select CachedDemographicNote.* from CachedDemographicNote,CachedDemographicNoteIssues where CachedDemographicNote.integratorFacilityId=CachedDemographicNoteIssues.integratorFacilityId and CachedDemographicNote.uuid=CachedDemographicNoteIssues.uuid and CachedDemographicNoteIssues.noteIssue=?1\";\n\n\t\tQuery query = entityManager.createNativeQuery(sqlCommand, modelClass);\n\t\tquery.setParameter(1, noteIssue.toString());\n\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<CachedDemographicNote> allNotesWithThisIssue = query.getResultList();\n\n\t\t// only deal with earliest notes\n\t\t// hash map of (facility+clientId) -> earliest note\n\t\tHashMap<FacilityIdIntegerCompositePk, CachedDemographicNote> firstNoteForClient = new HashMap<FacilityIdIntegerCompositePk, CachedDemographicNote>();\n\t\tfor (CachedDemographicNote currentNote : allNotesWithThisIssue)\n\t\t{\n\t\t\tFacilityIdIntegerCompositePk clientPk = new FacilityIdIntegerCompositePk();\n\t\t\tclientPk.setIntegratorFacilityId(currentNote.getCachedDemographicNoteCompositePk().getIntegratorFacilityId());\n\t\t\tclientPk.setCaisiItemId(currentNote.getCaisiDemographicId());\n\n\t\t\tCachedDemographicNote existingNote = firstNoteForClient.get(clientPk);\n\t\t\tif (existingNote == null || currentNote.getObservationDate().before(existingNote.getObservationDate()))\n\t\t\t{\n\t\t\t\tfirstNoteForClient.put(clientPk, currentNote);\n\t\t\t}\n\t\t}\n\n\t\t// only get notes within the time frame\n\t\tArrayList<CachedDemographicNote> results = new ArrayList<CachedDemographicNote>();\n\t\tfor (CachedDemographicNote note : firstNoteForClient.values())\n\t\t{\n\t\t\tDate observationDateTemp = note.getObservationDate();\n\t\t\tGregorianCalendar observationDate = new GregorianCalendar();\n\t\t\tobservationDate.setTime(observationDateTemp);\n\t\t\t// materialise date;\n\t\t\tobservationDate.getTime();\n\n\t\t\tif (observationDate.after(startDate) && observationDate.before(endDate))\n\t\t\t{\n\t\t\t\tresults.add(note);\n\t\t\t}\n\t\t}\n\n\t\t// sort by date\n\t\tCollections.sort(results, CachedDemographicNote.OBSERVATION_DATE_COMPARATOR);\n\n\t\treturn(results);\n\t}",
"public Newsletter fetchByPrimaryKey(long newsletterId);",
"String getFirstAlertMailBody( );",
"public String getEmail(int n) {\r\n\t\tif(email.size()>n && n>=0)\r\n\t\t\treturn email.get(n);\r\n\t\telse\r\n\t\t\treturn null;\t\t\r\n\t}",
"public short getIssueNumber() {\n return issueNumber;\n }",
"public void getOrderNews(){\n\t\tif(this.snsuser == null){\n\t\t\tsnsuser = new SnsUser(this);\t\t\t\n\t\t}\n\t\tsnsuser.get_user_order_line_number(u_id);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creates user from result set db | private User createUser(ResultSet rs) throws SQLException {
User user = null;
if(rs.getInt("IS_ADMIN") == 1) {
user = new Administrator(
rs.getString("FIRST_NAME"),
rs.getString("LAST_NAME"),
rs.getString("ADDRESS"),
rs.getString("ZIP_CODE"),
rs.getString("STATE"),
rs.getString("USERNAME"),
rs.getString("PASSWORD"),
rs.getString("EMAIL"),
rs.getString("SSN")
);
} else {
user = new Customer(
rs.getString("FIRST_NAME"),
rs.getString("LAST_NAME"),
rs.getString("ADDRESS"),
rs.getString("ZIP_CODE"),
rs.getString("STATE"),
rs.getString("USERNAME"),
rs.getString("PASSWORD"),
rs.getString("EMAIL"),
rs.getString("SSN")
);
}
return user;
} | [
"private MiniUser createUserFromResultSet(ResultSet rs) {\n MiniUser creator = null;\n try {\n while (rs.next()) {\n int id = rs.getInt(\"ID\");\n String firstName = rs.getString(\"first_name\");\n String lastName = rs.getString(\"last_name\");\n String imgUrl = rs.getString(\"profile_picture_url\");\n creator = new MiniUser(id, firstName, lastName, imgUrl);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return creator;\n }",
"@Override\n protected User buildEntity(ResultSet resultSet) throws DAOException {\n try {\n User user = new User();\n\n int id = resultSet.getInt(ID_COLUMN_LABEL);\n user.setId(id);\n\n String userName = resultSet.getString(USER_NAME_COLUMN_LABEL);\n user.setUserName(userName);\n\n String password = resultSet.getString(PASSWORD_COLUMN_LABEL);\n user.setPassword(password);\n\n return user;\n } catch (SQLException exception) {\n throw new DAOException(exception);\n }\n\n }",
"public void initUser()\n\t{\n\t\tResultSet account=userDAO.edit(username);\n\t\ttry {\n\t\t\tif(!account.next()){\n\t\t\t\tSystem.out.println(\"Bad resultset in login\"); \n\t\t\t}\n\t\t\tcurrent_user=new UserDTO(account.getString(1),account.getString(2),\n\t\t\t\t\t\t\t\t\t account.getString(8),account.getString(3),\n\t\t\t\t\t\t\t\t\t account.getString(4),account.getString(5),\n\t\t\t\t\t\t\t\t\t account.getString(6),account.getString(7),\n\t\t\t\t\t\t\t\t\t account.getString(9),account.getBoolean(10));\n\t\taccount.close();\n\t\t}catch(SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private User convert(ResultSet rs) throws SQLException, NoSuchAlgorithmException {\n User user = new User(\n rs.getLong(1),\n rs.getString(2),\n new HashedString(rs.getString(3), true),\n new Email(rs.getString(4)));\n return user;\n }",
"public void createUser() {\r\n /*\r\n need to add to the loader list.\r\n */\r\n User u = new User();\r\n UserAccManager accM = new UserAccManager(u.getId());\r\n u.setAccManager(accM);\r\n PasswordManager passM = new PasswordManager(u.getId());\r\n passM.setPassword(\"1234\");\r\n u.setPassManager(passM);\r\n System.out.println(\"New user created! user ID: \" + u.getId()\r\n + \" initial Password: \" + \"1234\");\r\n InfoManager.getInfoManager().add(u);\r\n passM.addObserver(InfoManager.getInfoManager());\r\n createNewChequingAccount(u.getId());\r\n\r\n\r\n }",
"User parseUser(ResultSet rs) throws SQLException;",
"private static void map( ResultSet resultSet,User user ) throws SQLException {\n\t\t\n\t\tuser.setId(resultSet.getLong(\"id\"));\n\t\tuser.setEmail(resultSet.getString(\"email\"));\n\t\tuser.setPassword(resultSet.getString(\"password\"));\n\t\t\n\t}",
"private User getFullUserData(final ResultSet resultSet)\n throws SQLException {\n User user = new User();\n int counter = 1;\n\n user.setId(resultSet.getLong(counter++));\n user.setLogin(resultSet.getString(counter++));\n user.setEmail(resultSet.getString(counter++));\n user.setPassword(resultSet.getString(counter++));\n user.setSalt(resultSet.getString(counter++));\n user.setRole(Role.values()[(resultSet.getInt(counter++))]);\n user.setStatus(Status.values()[(resultSet.getInt(counter++))]);\n user.setRegistrationDate((resultSet.getDate(counter++).toLocalDate()));\n user.setSurname(resultSet.getString(counter++));\n user.setName(resultSet.getString(counter++));\n user.setPatronymic(resultSet.getString(counter++));\n user.setPhoneNumber(resultSet.getString(counter++));\n user.setAddress(resultSet.getString(counter++));\n user.setMusic(resultSet.getInt(counter++));\n user.setCommunication(resultSet.getInt(counter++));\n user.setDriverLicenseNumber(resultSet.getString(counter++));\n user.setCarModel(resultSet.getString(counter++));\n user.setCarColor(resultSet.getString(counter));\n\n return user;\n }",
"private List<User> extractUsersFromResult(ResultSet resultSet) throws Exception {\n\t\tList<User> result = new ArrayList<User>();\n\t\torganizationService.init();\n\t\tlookupService.init();\n\t\n\t\t// process the extractions - there will only be one user\n\t\t//\n\t\twhile (resultSet.next()) {\n\t\t\tUser user = new User();\n\t\t\tPasswordCredentials credentials = new PasswordCredentials();\n\t\t\tUserContact contact = new UserContact();\n\t\t\tOrganization organization = new Organization(); \n\t\t\tGroup group = new Group();\n\t\t\tGroupType groupType = new GroupType();\n\t\t\tList<DocumentType> allowedDocTypes = new ArrayList<DocumentType>();\n\t\t\tList<Role> roles = new ArrayList<Role>();\n\t\t\t\n\t\t\t\n\t\t\t// extract the data\n\t\t\t//\n\t\t\t\n\t\t\t// extract main ids\n\t\t\tlong userId = resultSet.getLong(\"id\");\n\t\t\tlong organizationId = resultSet.getLong(\"organization_id\");\n\t\t\tlong groupTypeId = resultSet.getLong(\"group_type_id\");\n\t\t\tlong groupId = resultSet.getLong(\"group_id\");\n\t\t\t\t\t\n\t\t\t// extract all the other data\n String username = resultSet.getString(\"name\");\n String email = resultSet.getString(\"email_address\");\n String cellNumber = resultSet.getString(\"cell_number\");\n String firstName = resultSet.getString(\"first_name\");\n String lastName = resultSet.getString(\"last_name\");\n String nickName = resultSet.getString(\"nick_name\");\n String lineId = resultSet.getString(\"line_id\");\n String organizationName = resultSet.getString(\"organization_name\");\n String organizationDescription = resultSet.getString(\"organization_description\");\n String groupName = resultSet.getString(\"group_name\");\n String groupTypeName = resultSet.getString(\"group_type\");\n String groupTypeColorHexCode = resultSet.getString(\"group_type_color\");\n int groupTypeOrderIndex = resultSet.getInt(\"order_index\");\n String allowedDocTypeIds = resultSet.getString(\"allowed_doc_types\");\n \n // extract roles\n String roleName = resultSet.getString(\"role\");\n long roleId = resultSet.getLong(\"role_id\");\n \n \n //create the data elements\n //\n \n // Prep the user and other data with null fields\n user.setId(userId);\n \tuser.setCredentials(credentials);\n \tuser.setContactInfo(contact);\n \t\n \t// populate the User entity\n credentials.setUsername(username);\n contact.setEmailAddress(email);\n contact.setCellNumber(cellNumber);\n contact.setFirstName(firstName);\n contact.setLastName(lastName);\n contact.setNickName(nickName);\n contact.setLineId(lineId);\n\n user.setId(userId);\n user.setName(username);\n user.setCredentials(credentials);\n user.setContactInfo(contact);\n \n // role\n Role role = new Role();\n role.setName(roleName);\n role.setValue(roleName);\n role.setId(roleId);\n roles.add(role);\n user.setRoles(roles);\n \n // Populate group type\n groupType.setId(groupTypeId);\n groupType.setHexColorCode(groupTypeColorHexCode);\n groupType.setName(groupTypeName);\n groupType.setOrderIndex(groupTypeOrderIndex);\n \n // populate the allowed doc types for this user\n //\n if(allowedDocTypeIds != null && !allowedDocTypeIds.isEmpty()){\n \tString[] ids = allowedDocTypeIds.split(\",\");\n \tList<DocumentType> allDocTypes = lookupService.getAllDocumentTypes();\n \tfor(int i=0; i< ids.length; i++){\n \t\tlong docTypeId = Long.parseLong(ids[i]);\n \t\tfor(int j=0; j< allDocTypes.size(); j++){\n\t \t\tif(allDocTypes.get(j).getId() == docTypeId){\n\t \t\t\tallowedDocTypes.add(allDocTypes.get(j));\n\t \t\t}\n \t\t}\n \t}\n }\n \n //\n \n // populate the group\n group.setId(groupId);\n group.setName(groupName);\n group.setOrganizationId(organizationId);\n group.setGroupType(groupType);\n group.setAllowedDocTypes(allowedDocTypes);\n \n \n // populate the organization\n organization.setId(organizationId);\n organization.setDescription(organizationDescription);\n organization.setName(organizationName);\n \n //\n // Check the user entry if it already exists\n if(result.contains(user)){\n \t// the user exists\n \tint userIndex = result.indexOf(user);\n \tuser = result.get(userIndex);\n }else{\n \t// add the user to the list\n result.add(user);\n }\n //\n \t// check if the organization has already been set\n \tif(user.getUserOrganizations().contains(organization)){\n \t\t//\n \t\t// check if it contains the group\n \t\tint organizationIndex = user.getUserOrganizations().indexOf(organization);\n \t\torganization = user.getUserOrganizations().get(organizationIndex);\n \t}else{\n \t\t// add the organization\n \t\tuser.getUserOrganizations().add(organization);\n \t\t// add the flat setting for the groups in this organization\n \t\torganization.setSubGroups(organizationService.getAllGroupsByOrgId(organization.getId()));\n \t\t\n \t}\n \t\n \t\t// \n \t\t// check if it contains the group\n \t\tif(user.getUserGroups().contains(group)){\n \t\t\t// do nothing it is already contained\n \t\t}else{\n \t\t\t// add the group\n \t\t\tuser.getUserGroups().add(group);\n \t\t}\n }\n\t\t\n\t\treturn result;\n\t}",
"private User createUserFromData( Map<String, Object> element ) {\r\n\t\tint user_id = ((BigDecimal) element.get(\"USER_ID\")).intValue();\r\n\t\tString username = (String) element.get(\"USERNAME\");\r\n\t\tString password = (String) element.get(\"PASSWORD\");\r\n\t\tString role = (String) element.get(\"ROLE\");\r\n\t\tUser u = new User(user_id,username, password, role);\r\n\t\treturn u;\r\n\t}",
"public User createUser() {\n printer.println(\"Welcome! Enter you name and surname:\");\n printer.println(\"Name:\");\n String name = input.nextString();\n printer.println(\"Surname:\");\n String surname = input.nextString();\n return new User(name, surname);\n }",
"Human_User createHuman_User();",
"private User getCompactUserData(final ResultSet resultSet)\n throws SQLException {\n User user = new User();\n int counter = 1;\n\n user.setId(resultSet.getLong(counter++));\n user.setLogin(resultSet.getString(counter++));\n user.setEmail(resultSet.getString(counter++));\n user.setPassword(resultSet.getString(counter++));\n user.setSalt(resultSet.getString(counter++));\n user.setRole(Role.values()[(resultSet.getInt(counter++))]);\n user.setStatus(Status.values()[(resultSet.getInt(counter))]);\n\n return user;\n }",
"private Appuser newUser() {\n //TODO: get logged user from security context\n String createdBy = \"REST\";\n Appuser au = new Appuser();\n Userdetails ud = new Userdetails();\n boolean idOK = false;\n Long id = 0L;\n while (!idOK) {\n id = EntityIdGenerator.random();\n idOK = !userRepository.exists(id);\n }\n //notNull\n ud.setNotes(\"none\");\n au.setPasswdHash(\"*\");\n au.setCreatedBy(createdBy);\n au.setUserId(id);\n ud.setUserId(id);\n au.setUserdetails(ud);\n return au;\n }",
"public void createUser() {\n try {\n conn = dao.getConnection();\n\n ps = conn.prepareStatement(\"INSERT INTO Users(username, password) VALUES(?, ?)\");\n ps.setString(1, this.username);\n ps.setString(2, this.password);\n\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"public void createUser() {\n // Asks the user for a user name\n displayText(\"Player \" + (cluedoGame.getTempUserNum() + 1) + \", what is your preferred name?\");\n }",
"public void processCreate(User user){\r\n try{\r\n userDao.create(user);\r\n }catch(SQLException e){\r\n e.printStackTrace();\r\n }\r\n }",
"protected ExternalObject createObject(ResultSet rs) throws RetrievalException {\r\n try {\r\n long id = rs.getLong(\"user_id\");\r\n return new MockExternalObject(id);\r\n } catch (Exception e) {\r\n throw new RetrievalException(\"An exception occured.\", e);\r\n }\r\n\r\n }",
"private static ResourceUserList createGridUser(GridletList list)\n {\n ResourceUserList userList = new ResourceUserList();\n \n userList.add(0); // user ID starts from 0\n userList.add(1);\n userList.add(2);\n\n int userSize = userList.size();\n int gridletSize = list.size();\n int id = 0;\n \n // assign user ID to particular Gridlets\n for (int i = 0; i < gridletSize; i++)\n {\n if (i != 0 && i % userSize == 0)\n id++;\n\n ( (Gridlet) list.get(i) ).setUserID(id);\n }\n \n return userList;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Matches given tokens ans returns the corresponding score. | double getScore(IToken tk1, IToken tk2); | [
"public List<StringScore> scoreTokens(List<String> tokens) {\n final String[] postags = posAnalyzer.tagSentence(tokens.toArray(new String[0]));\n final List<StringScore> newScores = new ArrayList<>();\n for (int i = 0; i < tokens.size(); i++) {\n String token = tokens.get(i);\n String pos = postags[i];\n double score = getScoreForPos(pos);\n newScores.add(new StringScore(token, score));\n }\n\n return newScores;\n }",
"abstract double matchingScore(IStrategoTerm t1, IStrategoTerm t2);",
"abstract protected double doScore(MultiStringWrapper ms, MultiStringWrapper mt);",
"public abstract float getProbability(String[] tokens);",
"@Override\n\tpublic int countScore(String word) {\n\t\t\n\t\tif(inWordTable(word)) {\n\t\t\tint result = 0;\n\t\t\t\n\t\t\t// split the string\n\t\t\tString[] StringTokens = word.toLowerCase().split(\"\");\n\t\t\t\n\t\t\t// get the length of the word\n\t\t\tint wordLength = StringTokens.length;\n\t\t\t\n\t\t\t// convert an array into an arrayList\n\t\t\tArrayList<String> tokens = new ArrayList<String>(Arrays.asList(StringTokens));\n\t\t\t\n\t\t\tfor(int i = 0; i < tokens.size() ; i++) {\n\t\t\t\tif ((i != tokens.size() - 1) && tokens.get(i).equals(\"q\") && tokens.get(i+1).equals(\"u\")) {\n\t\t\t\t\t\n\t\t\t\t\t// combine q with u\n\t\t\t\t\tString newToken = tokens.get(i) + tokens.get(i+1);\n\t\t\t\t\t\n\t\t\t\t\t// change q to qu\n\t\t\t\t\ttokens.set(i, newToken);\n\t\t\t\t\t\n\t\t\t\t\t// remove u from the arraylist\n\t\t\t\t\ttokens.remove(i+1);\n\t\t\t\t\t\n\t\t\t\t\twordLength--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (wordLength <= 1) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse if(wordLength == 2) {\n\t\t\t\treturn letterScore(tokens.get(0)) + letterScore(tokens.get(1));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfor (String s : tokens) {\n\t\t\t\t\t\n\t\t\t\t\t// count score for each token\n\t\t\t\t\tresult += letterScore(s);\n\t\t\t\t}\n\t\t\t\tresult = result * (wordLength - 2);\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}else return 0;\n\t}",
"double computeWordMatchScore(List<List<String>> aWords, List<List<String>> bWords) {\r\n \r\n Set<String> aWordsRemaining = new LinkedHashSet<>(flatten(aWords));\r\n Set<String> bWordsRemaining = new LinkedHashSet<>(flatten(bWords));\r\n \r\n PriorityQueue<WordPair> orderedPairs = new PriorityQueue<>();\r\n double aDepth = 0;\r\n for (List<String> aWordList : aWords) {\r\n ++aDepth;\r\n for (String aWord : aWordList) {\r\n double bDepth = 0;\r\n for (List<String> bWordList: bWords) {\r\n for (String bWord : bWordList) {\r\n ++bDepth;\r\n orderedPairs.add(new WordPair(aWord, bWord, (aDepth/aWords.size()), (bDepth/bWords.size()), matchingWeights));\r\n }\r\n } \r\n }\r\n }\r\n \r\n double score = 0.0d;\r\n for (WordPair w: orderedPairs) {\r\n if (aWordsRemaining.contains(w.aWord) && bWordsRemaining.contains(w.bWord)) {\r\n score += w.score;\r\n aWordsRemaining.remove(w.aWord);\r\n bWordsRemaining.remove(w.bWord);\r\n } \r\n }\r\n \r\n double remains = (aWordsRemaining.size() + bWordsRemaining.size()) / 2.0;\r\n double initial = (aWords.size() + bWords.size()) / 2.0; \r\n double unmatchedWordsCount = (remains - initial) * (matchingWeights.unmatchedWords());\r\n \r\n return score + unmatchedWordsCount;\r\n }",
"private static double rankToken(NewToken term,\n ArrayList<NewToken> attributesList) {\n double score = 0.0;\n for(NewToken token : attributesList){\n if(term.word.compareToIgnoreCase(token.word)==0){\n score=1.0;\n }\n }//System.out.println(score);\n return score;\n\n }",
"private int scoreAuthorMatch(int tag1, int tag2)\n {\n // If they're exactly equal, great.\n if (tag1 == tag2)\n return 100;\n \n // Don't do prefix scanning on short titles.\n String str1 = data.tags.getString(tag1);\n String str2 = data.tags.getString(tag2);\n if (str1.length() < 5 || str2.length() < 5)\n return 0;\n \n // If either is a prefix of the other, we have a match.\n if (str1.startsWith(str2) || str2.startsWith(str1))\n return 100;\n \n // All other cases: fail for now at least.\n return 0;\n }",
"private int compareTokens(String token1,String token2){\n int l1 = token1.length(); //length of the first token\n int l2 = token2.length(); //length of the second token\n //in case of same length check for equals first\n if(l1 == l2 && token1.equals(token2)){ \n return l1;\n }\n int ml = l1>l2?l2:l1; //minimum length of a token\n if(ml == 0){\n return ml;\n }\n int f = 0; //forward match count + 1\n int b = 0; //backward match count + 1\n boolean match = true; //still matches\n while(match && f < ml){\n match = token1.charAt(f) == token2.charAt(f);\n f++;\n }\n if(!match){\n f--;\n }\n if(f < ml){\n match = true;\n while(match && b < ml){\n b++;\n match = token1.charAt(l1-b) == token2.charAt(l2-b);\n }\n if(!match){\n b--;\n }\n }\n return f > b ? f : b;\n }",
"int overallMatch_Words(Document question)\n\t{\n\t\tint overallMatch = 0;\n\t\tKnuthMorrisPratt kmp = new KnuthMorrisPratt();\n\t\tString [] nonStopWords = question.nonStopString.split(\"[,\\\\n,\\\\?,\\\\t, ,]\");\n\t\tporterStemmer stemmer = new porterStemmer();\n\n\n\t\tfor(int k=0;k<nonStopWords.length;k++) {\n\n\t\t\tstemmer.setCurrent(nonStopWords[k]);\n\t\t\tstemmer.stem();\n\t\t\tnonStopWords[k] = stemmer.getCurrent();\n\t\t}\n\t\tfor(String word : nonStopWords)\n\t\t{\n\t\t\tif(this.tf.containsKey(word)==true)\n\t\t\t\toverallMatch = overallMatch + 1;\n\t\t}\n\t\t\n\t\treturn overallMatch;\n\t}",
"public int rate(String... words) {\n int result = 0;\n for (String word : words) {\n for (Tag tag : tags) {\n if (tag.matches(word) > 0) {\n result++;\n break;\n }\n }\n }\n return result;\n }",
"private void calculateCombinedScore(CombineToken token) {\n\tfeatureScoreCombiner.combineScore(token);\n }",
"public static double getMatchScore(String obj1, String obj2) {\n\tint distance = getLevenshteinDistance(obj1, obj2);\n\tSystem.out.println(\"distance = \" + distance);\n\tdouble match = 1.0 - ((double)distance / (double)(Math.max(obj1.length(), obj2.length())));\n\t\n\tSystem.out.println(\"match is \" + match);\n\treturn match;\n }",
"public void calculateScore() {\n for (Sequence seq: currentSeq) {\n double wordWeight = Retriever.getWeight(seq);\n String token = seq.getToken();\n int size = seq.getRight() - seq.getLeft() + 1;\n int titleCount = getCount(token.toLowerCase(), title.toLowerCase());\n if (titleCount != 0) {\n setMatch(size);\n setTitleContains(true);\n }\n int lowerCount = getCount(token.toLowerCase(), lowerContent);\n if (lowerCount == 0) {\n// scoreInfo += \"Token: \" + token + \" Original=0 Lower=0 WordWeight=\" + wordWeight + \" wordTotal=0\\n\";\n continue;\n }\n int originalCount = getCount(token, content);\n lowerCount = lowerCount - originalCount;\n if (lowerCount != 0 || originalCount != 0) {\n setMatch(size);\n }\n double originalScore = formula(wordWeight, originalCount);\n double lowerScore = formula(wordWeight, lowerCount);\n final double weight = 1.5;\n double addedScore = weight * originalScore + lowerScore;\n// scoreInfo += \"Token: \" + token + \" Original=\" + originalScore + \" Lower=\" + lowerScore +\n// \" WordWeight=\" + wordWeight + \" wordTotal=\" + addedScore + \"\\n\";\n dependencyScore += addedScore;\n }\n currentSeq.clear();\n }",
"private int scoreTitleMatch(int tag1, int tag2)\n {\n // If they're exactly equal, great.\n if (tag1 == tag2)\n return 100;\n \n // Don't do prefix scanning on short titles.\n String str1 = data.tags.getString(tag1);\n String str2 = data.tags.getString(tag2);\n if (str1.length() < 5 || str2.length() < 5)\n return 0;\n \n // If either is a prefix of the other, we have a match.\n if (str1.startsWith(str2) || str2.startsWith(str1))\n return 100;\n \n // All other cases: fail for now at least.\n return 0;\n }",
"private double similarityScore(int numberOfSimilarTokens, int sentenceLength1, int sentenceLength2) {\n\t\treturn (numberOfSimilarTokens)/((Math.log(sentenceLength1) + Math.log(sentenceLength2)));\n\t}",
"public void rankMatches();",
"int getLexMatchVariation();",
"public void bonus (){ //start of method \r\n \r\n //*****************************************************\r\n // number of numeric tokens\r\n // only counting the numbers within the words\r\n //*****************************************************\r\n int numberOfNumericTokens = 0;\r\n for (int i = 0; i < words.length; i++) {\r\n for (int j = 0; j < words[i].length(); j++) {\r\n if (words[i].charAt(j) >= '0' && words[i].charAt(j) <= '9') { \r\n numberOfNumericTokens++; \r\n break;\r\n } // end of if statement \r\n } // end of inner for loop\r\n } // end of nested for loop\r\n \r\n //*******************************************************\r\n //number of alphabetic tokens\r\n // only counting the words with uppercase letters\r\n // or lowercase letters\r\n //*******************************************************\r\n int numberOfAlphabeticTokens = 0;\r\n for (int i = 0; i < words.length; i++) {\r\n for (int j = 0; j < words[i].length(); j++) {\r\n if (words[i].charAt(j) >= 'A' && words[i].charAt(j) <= 'Z') { \r\n numberOfAlphabeticTokens++; \r\n break;\r\n }// end of if statement with a break if it's true \r\n else if (words[i].charAt(j) >= 'a' && words[i].charAt(j) <= 'z') { \r\n numberOfAlphabeticTokens++; \r\n break;\r\n } // end of else if statement with a break if it's true \r\n } // end of inner for loop\r\n } // end of nested for loop\r\n \r\n //*********************************************************************************\r\n // Printed the number of numeric tokens and number of alphabetic tokens using\r\n // print f statements \r\n //*********************************************************************************\r\n System.out.printf (\"\\n%-30s%-30d\\n\", \"Number of numeric tokens:\", numberOfNumericTokens);\r\n System.out.printf (\"%-30s%-30d\\n\", \"Number of alphabetic tokens:\", numberOfAlphabeticTokens); \r\n \r\n \r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implements the operation to stop a virtual machine. Stop virtual machine. | void stop(String resourceGroupName, String virtualMachineName); | [
"void stop(String resourceGroupName, String virtualMachineName, StopVirtualMachineOptions body);",
"void stop(String resourceGroupName, String virtualMachineName, StopVirtualMachineOptions body, Context context);",
"void stop(TestContext testContext, VirtualResource virtualResource,\n VirtualResourceInstance instance)\n throws Exception;",
"public void powerOffVM(OccpVM vm) throws OccpException;",
"public void stop() {\n \t\tlog.debug(\"Stopping VBoxWebSrv...\");\n \t\tif (vboxServiceProcess != null) {\n \t\t\tvboxServiceProcess.destroy();\n \t\t\tvboxServiceProcess = null;\n \t\t}\n \t}",
"public void stop () {\n\t\t\n\t\tbyte[] request = RPCUtils.marshallVoid(RPCCommon.RPIDSTOP);\n\t\t\n\t\tbyte[] response = null;\n\t\ttry {\n\t\t\tresponse = rmiclient.call(request);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tRPCUtils.unmarshallVoid(response);\n\t\n\t}",
"@ServiceMethod(returns = ReturnType.SINGLE)\n void stop(String resourceGroupName, String workspaceName, String computeName, Context context);",
"void stopManagementMachines()\n\t\t\tthrows TimeoutException, CloudProvisioningException;",
"public void powerOffVirtualMachine(VirtualMachine vm)\r\n\r\n\t {\r\n \r\n\t\ttry {\r\n\r\n\t\t\t Task task=vm.powerOffVM_Task();\r\n \r\n\t\t\tif(task.waitForTask() == Task.SUCCESS)\r\n\r\n\t\t\t {\r\n \r\n\t\t\t\tSystem.out.println(\"Virtual machine is powered OFF\");\r\n\r\n \t\t\t}\r\n\r\n\t\t }catch (Exception e) {\r\n\r\n \t\t\te.printStackTrace();\r\n\r\n\t\t }\r\n\r\n \t}",
"@ServiceMethod(returns = ReturnType.SINGLE)\n void stop(String resourceGroupName, String workspaceName, String computeName);",
"public void stop() {\n runStateMachine = false;\n try { stateMachineThread.join(); } catch (Exception e) {}\n stateMachineThread = null;\n latch();\n motorOff();\n stepNumber = 0;\n }",
"protected abstract void doStop() throws ManagedLifecycleException ;",
"public void powerOff() \n {\n try \n {\n // your code here\n \tSystem.out.println(\"Powering off virtual machine '\"+vm.getName() +\"'. Please wait...\"); \n \tTask t=vm.powerOffVM_Task();\n \tif(t.waitForTask()== Task.SUCCESS)\n \t{\n\t \tSystem.out.println(\"Virtual machine powered off.\");\n\t \tSystem.out.println(\"====================================\");\n \t}\n \telse\n \t\tSystem.out.println(\"Power off failed / VM already powered on...\");\n \t\n } catch ( Exception e ) \n { \n \tSystem.out.println( e.toString() ) ; \n }\n }",
"public boolean stopMachine(final String machineIp, final long duration, final TimeUnit unit)\n\t\t\tthrows InterruptedException,\n\t\t\tTimeoutException, CloudProvisioningException {\n\t\tunsupported();\n\t\treturn false;\n\t}",
"protected void notAllowedToWork_stopMachine_EM() {\n stopMachine();\n }",
"@Override\n\tpublic void stopVehicle() {\n\n\t\t\n\t}",
"public void powerOffVm(String vmName){\r\n\t\tVirtualMachine virtualMachine;\r\n\t\tString status;\r\n\t\tTask powerOffVmTask = null;\r\n\t\ttry {\r\n\t\t\tvirtualMachine = searchVirtualMachine(vmName);\r\n\t\t} catch (Exception e) {\r\n\t\t\tprintInvalidVmMessage(vmName);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tSystem.out.println(\"Name = \"+vmName);\r\n\t\ttry {\r\n\t\t\tpowerOffVmTask = virtualMachine.powerOffVM_Task();\r\n\t\t\tstatus = powerOffVmTask.waitForTask();\r\n\t\t\tSystem.out.print(\"Power off VM: status = \");\r\n\t\t\tif(status.equals(\"error\")){\r\n\t\t\t\tstatus = powerOffVmTask.getTaskInfo().getError().getLocalizedMessage();\r\n\t\t\t}\r\n\t\t\tSystem.out.println(status+\", completion time = \"+formatCompletionTime(powerOffVmTask.getTaskInfo().getCompleteTime().getTimeInMillis()));\r\n\t\t} catch (RemoteException e) {\r\n\t\t\ttry {\r\n\t\t\t\tSystem.out.println(e.getLocalizedMessage()\r\n\t\t\t\t\t\t+\",completion time : \"+formatCompletionTime(powerOffVmTask.getTaskInfo().getCompleteTime().getTimeInMillis()));\r\n\t\t\t} catch (RemoteException e1) {\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\r\n\t}",
"public void tvVideoStop() {\n\t\tBroadcastService brdSrv = (BroadcastService) tvMngr\n\t\t\t\t.getService(BroadcastService.BrdcstServiceName);\n\t\ttry {\n\t\t\tif(brdSrv != null)\n\t\t\t\tbrdSrv.syncStopVideoStream();\n\t\t} catch (TVMException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void shutDownVm(String vmName){\r\n\t\tVirtualMachine virtualMachine;\r\n\t\tboolean isShutdownComplete = false;\r\n\t\tlong startTime;\r\n\t\tlong completionTime = 0;\r\n\t\ttry {\r\n\t\t\tvirtualMachine = searchVirtualMachine(vmName);\r\n\t\t} catch (Exception e) {\r\n\t\t\tprintInvalidVmMessage(vmName);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tSystem.out.println(\"Name = \"+vmName);\r\n\t\ttry {\r\n\t\t\tvirtualMachine.shutdownGuest();\r\n\t\t\tstartTime = System.currentTimeMillis();\r\n\r\n\t\t\t/**\r\n\t\t\t * Extra credit part\r\n\t\t\t */\r\n\t\t\t//Poll the machine status in each loop to get the status.\r\n\t\t\twhile(!isTimeUp(startTime)){\r\n\t\t\t\t//Check the machine status.\r\n\t\t\t\tif(VirtualMachinePowerState.poweredOff.equals(virtualMachine.getRuntime().getPowerState())){\r\n\t\t\t\t\tisShutdownComplete = true;\r\n\t\t\t\t\tcompletionTime = System.currentTimeMillis();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!isShutdownComplete){\r\n\t\t\t\tthrow new RemoteException();\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(\"Shutdown guest: completed, completion time = \"+formatCompletionTime(completionTime));\r\n\t\t\t}\r\n\t\t} catch (RemoteException e) {\r\n\t\t\t//Shutdown operation is not complete. Force shutdown.\r\n\t\t\tSystem.out.print(\"Graceful shutdown failed. Now try a hard power off.\\nPower off VM: status: \");\r\n\t\t\tTask forcePowerOffTask;\r\n\t\t\ttry {\r\n\t\t\t\tforcePowerOffTask = virtualMachine.powerOffVM_Task();\r\n\t\t\t\tString forceShutdownStatus = forcePowerOffTask.waitForTask();\r\n\t\t\t\tSystem.out.println(forceShutdownStatus+\" completion time = \"+formatCompletionTime(completionTime));\r\n\t\t\t} catch (RemoteException e1) {\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t} catch (InterruptedException e1) {\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the box the current square belongs to | public Box getBox() {
//we compute the coordinates of the top left square
//of the box by integer division
return new Box((rowIndex/3)*3, (colIndex/3)*3);
} | [
"public Box getBox(Position position)\n {\n return boxes[position.getX()][position.getY()];\n }",
"Square getCurrentPosition();",
"private Box findBox(int x) {\n\t\tArrayList<BoxLogic> local = CurrentState.getCurrentListOfBoxLogic();\n\t\treturn local.get(x - 1).getBox();\n\t}",
"@Override\n public Box getBox() {\n return box;\n }",
"public int getBox(){\n\t\treturn box;\n\t}",
"public int findSquare() {\n int width = xRight - xLeft;\n return width * height;\n }",
"public Box getBox(int x, int y)\n {\n Position temp = new Position(x, y);\n return getBox(temp);\n }",
"public int getCellBox(int cell) {\n\t\tint box = (boxHeight * (getCellRow(cell) / boxHeight) + (getCellColumn(cell) / boxWidth));\n\t\treturn box;\n\t}",
"public Box getSpace(int space){\r\n\t\treturn board[space];\r\n\t}",
"public Square startingSquare()\n {\n return squares[GO_SQUARE];\n }",
"public House getBox(int n) {\n\t\treturn this.boxes[n];\n\t}",
"public Square getSquareBelow(Square square) {\n int x = square.getCoordinateX();\n int y = square.getCoordinateY();\n Square squareNotVisible;\n final int nine = 9;\n if (!board.inRange(x, y, board) || y == nine) {\n squareNotVisible = new Square(-1, -1, board);\n return squareNotVisible;\n } else {\n if (square.board.isOpponent()) {\n return Board.squaresInGridOpponent.get(10 * (y + 1) + x);\n } else {\n return Board.squaresInGrid.get(10 * (y + 1) + x);\n }\n }\n }",
"public Box getBox(int id) {\n return boxes.get(id);\n }",
"public boolean isBox() {\n return box;\n }",
"private void setBox(){\n\t\tif((this.row >= 0 && this.row <= 2) && \n\t\t (this.column >= 0 && this.column <= 2)){\n\t\t\t\t\tthis.box = 1;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 0 && this.row <= 2) && \n\t\t (this.column >= 3 && this.column <= 5)){\n\t\t\t\t\tthis.box = 2;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 0 && this.row <= 2) && \n\t\t (this.column >= 6 && this.column <= 8)){\n\t\t\t\t\tthis.box = 3;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 3 && this.row <= 5) && \n\t\t (this.column >= 0 && this.column <= 2)){\n\t\t\t\t\tthis.box = 4;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 3 && this.row <= 5) && \n\t\t (this.column >= 3 && this.column <= 5)){\n\t\t\t\t\tthis.box = 5;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 3 && this.row <= 5) && \n\t\t (this.column >= 6 && this.column <= 8)){\n\t\t\t\t\tthis.box = 6;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 6 && this.row <= 8) && \n\t\t (this.column >= 0 && this.column <= 2)){\n\t\t\t\t\tthis.box = 7;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 6 && this.row <= 8) && \n\t\t (this.column >= 3 && this.column <= 5)){\n\t\t\t\t\tthis.box = 8;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 6 && this.row <= 8) && \n\t\t (this.column >= 6 && this.column <= 8)){\n\t\t\t\t\tthis.box = 9;\n\t\t\t\t\treturn;\n\t\t}\n\t}",
"public default SqlBox box() {\n\t\treturn SqlBoxContext.getDefaultBox(this);\n\t}",
"public Square getBlackKingPosition()\n\t{\n return squareMap.get(\"BK\");\n }",
"public boolean isBox() {\n return SIMPLE_SHAPE_BOX.equals(this);\n }",
"@Override\r\n\t@Basic\r\n\tpublic Point getPositionOfSquare(Square square) {\r\n\t\tfor (Map.Entry<Point, Square> e : squares.entrySet()) {\r\n\t\t\tif (e.getValue() == square)\r\n\t\t\t\treturn e.getKey();\r\n\t\t}\r\n\t\treturn null;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the gdi attribute. | public void setGdi(boolean value); | [
"public void setG(int gValue){\n\t\tthis.g=gValue;\n\t}",
"public void setGi(java.math.BigInteger gi)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(GI$22, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(GI$22);\r\n }\r\n target.setBigIntegerValue(gi);\r\n }\r\n }",
"public void setGraphicInfo(GraphicInfo grInfo);",
"public void setGraphics(final Graphics2D g) {\n\t\t_g = g;\n\t}",
"public void xsetGi(org.apache.xmlbeans.XmlInteger gi)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlInteger target = null;\r\n target = (org.apache.xmlbeans.XmlInteger)get_store().find_element_user(GI$22, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlInteger)get_store().add_element_user(GI$22);\r\n }\r\n target.set(gi);\r\n }\r\n }",
"public abstract void setGlyph(Glyph g);",
"public boolean getGdi();",
"public void setGRAPHICS(java.lang.CharSequence value) {\n this.GRAPHICS = value;\n }",
"public org.LNDCDC_NCS_TCS.SHOWS.apache.nifi.LNDCDC_NCS_TCS_SHOWS.Builder setGRAPHICS(java.lang.CharSequence value) {\n validate(fields()[21], value);\n this.GRAPHICS = value;\n fieldSetFlags()[21] = true;\n return this;\n }",
"public void setGlyph(Glyph g){\n\tglyph=(VShape)g;\n }",
"public void setGFlag(boolean b) {\r\n gFlag = b;\r\n }",
"public abstract void setGraphicOptions(GraphicOptions opt);",
"public void setGlyph(Glyph g){\n\tglyph=(VRectangle)g;\n }",
"public void setGi( int value) {\n\n\t\tthis.gi = value;\n\t}",
"public void setLWUITGraphics(Graphics g) {\n lwuitGraphics = g;\n }",
"public void setG(float g) {\n\t\tthis.g = g;\n\t}",
"public abstract void setGapGruppo(int gap);",
"private void setG(Number g) {\n this.g = Math.max(Math.min(g.intValue(), 255), 0);\n }",
"public void setGlyph(Glyph g){\n\tglyph=(VRoundRect)g;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Specifies that the keys may not appear more than once. All variants of this method operate on keys postpercent decoding. | public QueryClassifierBuilder mayNotRepeatKeys(String... keys) {
return mayNotRepeatKeys(Arrays.asList(keys));
} | [
"@Test\n\tpublic void setOfKeysIsRejectedIfAnyEntryIsMissing() {\n\t\tfor (String keyToRemove : serializedMap.keySet()) {\n\t\t\tSet<String> keysWithHole = new HashSet<String>(serializedMap.keySet());\n\t\t\tkeysWithHole.remove(keyToRemove);\n\n\t\t\tassertFalse(\"A keyset without \" + keyToRemove + \" must be refused.\",\n\t\t\t\t\tserializer.isValidKeyset(keysWithHole));\n\t\t}\n\t}",
"public void addContainsKeyMiss(){\n\t\tcontainsKeyCalls.increase();\n\t}",
"private void skipStaleEntries()\n {\n while (this.index < keys.size() && !HashBijectiveMap.this.containsKey(keys.get(this.index)))\n this.index++;\n }",
"public void clearManyKey()\n {\n _manyKey.clear();\n }",
"protected void binaryValueUnused( BinaryKey key ) {\n }",
"public void cleanPlayFairKey()\n {\n LinkedHashSet<Character> set\n = new LinkedHashSet<Character>();\n \n String newKey = \"\";\n \n for (int i = 0; i < key.length(); i++)\n set.add(key.charAt(i));\n \n Iterator<Character> it = set.iterator();\n \n while (it.hasNext())\n newKey += (Character)it.next();\n \n key = newKey;\n }",
"public void removeKey() {\n \tthis.key =null;\n \tdungeon.keyLeft().set(\"Key possession: No\\n\");\n }",
"public com.appanddata.alsme.model.avro.KeyValue.Builder clearKey() {\n key = null;\n fieldSetFlags()[0] = false;\n return this;\n }",
"private void checkForDuplicates()\n {\n boolean keyAlreadyDefined = duplicateCheck(selection);\n \n if(keyAlreadyDefined)\n {\n duplicateWarning = true;\n }\n else\n {\n duplicateWarning = false;\n keyCodeIndex ++;\n ChoiceHandler.setChoice(0);\n selectDown();\n }\n }",
"private void markIncomplete(String clientKeySpace)\r\n\t\t{\r\n\t\t\tBigInteger firstKey = new BigInteger(clientKeySpace.split(\",\")[0]);\r\n\t\t\trunningKeySpaces.remove(runningKeySpaces.indexOf(firstKey));\r\n\t\t\tincompleteKeySpaces.add(firstKey);\r\n\t\t}",
"public void clear() {\n AtomicIntegerArray tmp = keys; // could change out from under us...\n for (int i = 0; i < tmp.length(); i++) {\n tmp.set(i, unusedKey);\n }\n }",
"@Test\n public void testKeyGeneration() {\n final int NUM_KEYS = 10;\n Set<byte[]> generatedKeys = new HashSet<>(NUM_KEYS);\n\n for (int i = 0; i < NUM_KEYS; ++i) {\n byte[] newKey = KeyGenerator.instance().generateKey();\n\n assertFalse(\"Duplicate key generated #\" + i, generatedKeys.contains(newKey));\n generatedKeys.add(newKey);\n }\n }",
"private void checkIfUnique() {\r\n if (!citationKeyField.getText().equals(\"\")\r\n && MainFrame.manager.dataStoreContainsCitationKey(\r\n citationKeyField.getText())\r\n && !editedReference.getCitationKey().equals(citationKeyField.getText())) {\r\n citationKeyError.setVisible(true);\r\n } else {\r\n citationKeyError.setVisible(false);\r\n }\r\n }",
"public boolean isSwallowKeys() {\n return swallowKeys;\n }",
"public boolean excludeKeys() {\n return this.excludeKeys;\n }",
"public void containsNoDuplicates() {\n List<Entry<T>> duplicates = Lists.newArrayList();\n for (Multiset.Entry<T> entry : LinkedHashMultiset.create(getSubject()).entrySet()) {\n if (entry.getCount() > 1) {\n duplicates.add(entry);\n }\n }\n if (!duplicates.isEmpty()) {\n failWithRawMessage(\"%s has the following duplicates: <%s>\", getDisplaySubject(), duplicates);\n }\n }",
"public void removeAllInitialKey() {\r\n\t\tBase.removeAll(this.model, this.getResource(), INITIALKEY);\r\n\t}",
"@Test\n public void testKeySet() {\n MultiMap<String, String> mm = new MultiMap<String,String>();\n \n Assert.assertTrue(mm.keySet().isEmpty());\n \n mm.add(KEY1, VALUE1_1);\n mm.add(KEY1, VALUE1_2);\n \n mm.add(KEY2, VALUE2_1);\n mm.add(KEY2, VALUE2_2);\n \n Set<String> keySet = mm.keySet();\n Assert.assertEquals(2, keySet.size());\n \n Assert.assertTrue(keySet.contains(KEY1));\n Assert.assertTrue(keySet.contains(KEY2));\n \n Assert.assertNotNull(mm.remove(KEY1));\n \n keySet = mm.keySet();\n \n Assert.assertEquals(1, keySet.size());\n \n Assert.assertTrue(keySet.contains(KEY2));\n }",
"private OperationStatus dupsPutNoDupData(final DatabaseEntry key,\n final DatabaseEntry data) {\n final DatabaseEntry twoPartKey = DupKeyData.combine(key, data);\n return putNoDups(twoPartKey, EMPTY_DUP_DATA, PutMode.NO_OVERWRITE);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new JTextField with a specified columns count. | public static JTextField createTextField(int columns) {
final JTextField textField = new JTextField(columns);
initFormWidget(textField);
initTextField(textField);
return textField;
} | [
"public JTextField(int columns) {\n this(null, null, columns);\n }",
"public static JTextField createTextField() {\n return createTextField(20);\n }",
"public void createTextFields ()\n\t{\n\t\t// textField - Instance of JTextField \n\t\ttextField = new JTextField (); \n\t\ttextField.setBounds ( 82, 137, 342, 20);\n\t\tcontentPane.add ( textField );\n\t\ttextField.setColumns ( 10 );\n\t}",
"public JTextField(String text, int columns) {\n this(null, text, columns);\n }",
"private void createTextField()\r\n {\r\n final int FIELD_WIDTH = 10;\r\n \r\n enterColourField = new JTextField(FIELD_WIDTH);\r\n \r\n \r\n \r\n }",
"public Component createTextField(int width) {\r\n\t\tJTextField field = new JTextField(width);\r\n\t\tfield.setPreferredSize(new Dimension(width,30));\r\n\t\tfield.requestFocus();\r\n\t\ttextFieldList.add(field);\r\n\t\treturn field;\r\n\t}",
"public void setColumns(int columns) {\r\n if (getTextField() != null) {\r\n getTextField().setColumns(columns);\r\n }\r\n }",
"protected JTextField createTextField() {\r\n JTextField textField = new OverlayTextField();\r\n SelectAllUtils.install(textField);\r\n JideSwingUtilities.setComponentTransparent(textField);\r\n textField.setColumns(20);\r\n return textField;\r\n }",
"public JHelpEditText(final int columns)\n {\n this(JHelpEditText.DEFAULT_FONT, columns);\n }",
"private void createDialogTextFields() {\n txtNaam = new JTextField();\n txtAdres = new JTextField();\n txtPostcode = new JTextField();\n txtWoonplaats = new JTextField();\n txtTelefoon = new JTextField();\n txtMail = new JTextField();\n txtGeboorteDatum = new JTextField();\n txtGeslacht = new JTextField();\n JTextField[] textFields = {txtNaam, txtAdres, txtPostcode, txtWoonplaats,\n txtTelefoon, txtMail, txtGeboorteDatum, txtGeslacht};\n\n for (JTextField textField : textFields) {\n textField.setColumns(30);\n textField.setPreferredSize(new Dimension(50,30));\n textField.setFont(new Font(\"Font Text\", Font.BOLD, 20));\n }\n }",
"private TextField initGridTextField(GridPane container, int size, String initText, boolean editable, int col, int row, int colSpan, int rowSpan) {\r\n TextField tf = new TextField();\r\n tf.setPrefColumnCount(size);\r\n tf.setText(initText);\r\n tf.setEditable(editable);\r\n container.add(tf, col, row, colSpan, rowSpan);\r\n return tf;\r\n }",
"private JTextField generateTextEntryPanel(String label, int textColumns, \r\n\t\t\tJPanel containingPanel) {\r\n\t\tJPanel entryPanel = new JPanel();\r\n\t\tentryPanel.add(new JLabel(label));\r\n\t\tJTextField textEntry = new JTextField(10);\r\n\t\ttextEntry.addKeyListener(new TextFieldEditListener());\r\n\t\tentryPanel.add(textEntry);\r\n\t\tcontainingPanel.add(entryPanel);\r\n\t\treturn textEntry;\r\n\t}",
"private TextField initHBoxTextField(GridPane container, int size, String initText, boolean editable, int col, int row, int colSpan, int rowSpan) {\n TextField tf = new TextField();\n tf.setPrefColumnCount(size);\n tf.setText(initText);\n tf.setEditable(editable);\n container.add(tf, col, row, colSpan, rowSpan);\n return tf;\n }",
"private JTextField makeTextField(int width)\n {\n JTextField theField = new JTextField(width);\n theField.setEditable(false);\n theField.setBackground(Color.WHITE);\n theField.setOpaque(true);\n theField.setMaximumSize(theField.getPreferredSize());\n theField.setHorizontalAlignment(JTextField.RIGHT);\n return theField;\n }",
"public LwTextField(String s, int maxCol) {\n this (new SingleLineTxt(s, maxCol));\n }",
"public void setColumnsCount(int count) {\n\t\tTableColumn[] columns = tableViewer.getTable().getColumns();\n\t\tint oldCount = getColumnCount();\n\t\tif (count == oldCount)\n\t\t\treturn;\n\t\tif (count < oldCount) {\n\t\t\tfor (int i = count; i < oldCount; i++) {\n\t\t\t\tcolumns[i].dispose();\n\t\t\t}\n\t\t\tfor (List<String> row : input) {\n\t\t\t\tfor (int i = oldCount - 1; i > count - 1; i--) {\n\t\t\t\t\trow.remove(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// if count > old count\n\t\tfor (List<String> row : input) {\n\t\t\tfor (int i = 0; i < count - oldCount; i++) {\n\t\t\t\trow.add(\"\");\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = oldCount; i < count; i++) {\n\t\t\tfinal TableViewerColumn viewerColumn = new TableViewerColumn(\n\t\t\t\t\ttableViewer, SWT.NONE);\n\t\t\tviewerColumn.getColumn().setMoveable(false);\n\t\t\tviewerColumn.getColumn().setWidth(DEFAULT_COLUMN_WIDTH);\n\t\t\tTextEditingSupport textEditingSupport = new TextEditingSupport(tableViewer);\n\t\t\tviewerColumn.setEditingSupport(textEditingSupport);\n\t\t\tviewerColumn.getColumn().setData(TEXT_EDITING_SUPPORT_KEY, textEditingSupport);\n\t\t}\n\t\ttableViewer.setLabelProvider(new TextTableLableProvider());\n\t\tfireTableModified();\n\n\t}",
"private void createColumns(){\r\n\t\tfor(int i = 0; i < NDECADES; i++){\r\n\t\t\t//this will be the x location of the column\r\n\t\t\t//it will increase at every loop\r\n\t\t\tint x_location = (APPLICATION_WIDTH / NDECADES) * i;\r\n\t\t\tGLine col = new GLine(x_location, 0,\r\n\t\t\tx_location, APPLICATION_HEIGHT);\r\n\t\t\tadd(col);\r\n\t\t}\r\n\t}",
"protected MustTextField createTextField(int length) {\n MustTextField temp = new MustTextField(length);\n currentAttributeList.append(temp);\n addFocusListenerForDefaultButton(temp);\n return(temp);\n }",
"public JTextField(Document doc, String text, int columns) {\n if (columns < 0) {\n throw new IllegalArgumentException(\"columns less than zero.\");\n }\n visibility = new DefaultBoundedRangeModel();\n visibility.addChangeListener(new ScrollRepainter());\n this.columns = columns;\n if (doc == null) {\n doc = createDefaultModel();\n }\n setDocument(doc);\n if (text != null) {\n setText(text);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an ITypes object with the sum between an ITypes object's parameter and an Int object's parameter. As default returns a NullType object; | @Override
public ITypes addingAnInt(Int i) {
return FlyweightNull.getFNull().createNull();
} | [
"@Override\n public ITypes sum(ITypes n) {\n return FlyweightNull.getFNull().createNull();\n }",
"@Override\n public IntType addToInt(IntType IntType) {\n int int1 = IntType.getValue();\n int int2 = this.asInt().getValue();\n return TypeFactory.getIntType(int1 + int2);\n }",
"public IntType asInt() { return null; }",
"public IntType asInt(){\n return TypeFactory.getIntType(this.toInt(this.getValue()));\n }",
"@Override\n public ITypes subtractingAnInt(Int i) {\n return FlyweightNull.getFNull().createNull();\n }",
"public T caseIntType(IntType object)\n {\n return null;\n }",
"IntegerValueType getIntegerValue();",
"@Override\n public ITypes multiplyingAnInt(Int i) {\n return FlyweightNull.getFNull().createNull();\n }",
"public Integer getTypeAmount() {\n return (Integer) get(10);\n }",
"@Override\n public ITypes dividingAnInt(Int i) {\n return FlyweightNull.getFNull().createNull();\n }",
"public abstract AnyInt asAnyInt();",
"private int additionOfIntegers() {\n return 10 + + 11 - - 12;\n }",
"com.proto.calculator.Sum getSum();",
"IntegerType createIntegerType();",
"public ExtendedValueType getRoundIntegerType(CompilationContext Context) {\n\t\t\n\t\tif(!(isInteger() && !isVector())){\n\t\t\tLOG.error(INVALID_VECTOR_TYPE);\n\t\t\treturn null;\n\t\t}\n\t\tint BitWidth = getSizeInBits();\n\t\tif (BitWidth <= 8)\n\t\t\treturn new ExtendedValueType(new MachineValueType(SimpleValueType.i8));\n\t\treturn getIntegerVT(Context, 1 << (int) (Math.log(BitWidth)/Math.log(2)));\n\t}",
"public int intValue()\n {\n return type;\n }",
"IntValue createIntValue();",
"Sum createSum();",
"IntegerValue createIntegerValue();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value to productTypeId field. | public void setProductTypeId(long productTypeId) {
this.productTypeId = productTypeId;
} | [
"public void setProductTypeId(final Integer productTypeId) {\n this.productTypeId = productTypeId;\n }",
"public void setProductTypeId(Integer productTypeId) {\r\n this.productTypeId = productTypeId;\r\n }",
"public void setProductTypeId(long productTypeId) {\n _app.setProductTypeId(productTypeId);\n }",
"public Integer getProductTypeId() {\r\n return productTypeId;\r\n }",
"public long getProductTypeId() {\r\n return productTypeId;\r\n }",
"@Column(name = \"product_type_id\", nullable = false)\n public Integer getProductTypeId() {\n return this.productTypeId;\n }",
"private void setTypeId(int value) {\n \n typeId_ = value;\n }",
"void setProductType(java.lang.String productType);",
"public void setTypeId(Number value) {\n setAttributeInternal(TYPEID, value);\n }",
"public String productTypeId() {\n return this.innerProperties() == null ? null : this.innerProperties().productTypeId();\n }",
"public void setProductType(String productType) {\r\n this.productType = productType;\r\n }",
"private void setProductType(String productType) {\r\n int maxLength = 15;\r\n if (productType.length() > maxLength) {\r\n productType = productType.substring(0, maxLength);\r\n }\r\n this.productType = productType;\r\n }",
"public long getProductTypeId() {\n return _app.getProductTypeId();\n }",
"public void setProductType(String productType) {\n\n this.productType = productType;\n }",
"public void setTypeId(BigDecimal typeId) {\n this.typeId = typeId;\n }",
"public void setProductType(String productType) {\n\t\tthis.productType = productType;\n\t}",
"public void setType(String type) {\r\n\t\tthis.productType = type;\r\n\t}",
"public void setProductType(String newProductType){\n productRelation.setProductTypeSpecification(newProductType);\n }",
"public void setTipoProducto(int value) {\n this.tipoProducto = value;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set language suggestion list | void setLanguagesSuggestion(ArrayList<String> languages) {
MultiWordSuggestOracle oracle = (MultiWordSuggestOracle) languagesBox.getSuggestOracle();
for(int i = 0; i < languages.size(); i++){
oracle.add(languages.get(i));
}
} | [
"void setCountrySuggestion(ArrayList<String> countries){\n\t\tMultiWordSuggestOracle oracle = (MultiWordSuggestOracle) countriesBox.getSuggestOracle();\n\t\t\n\t\tfor(int i = 0; i < countries.size(); i++){\n\t\t\toracle.add(countries.get(i));\n\t\t}\n\t}",
"private void setLanguages(){\n Set<String>langs= model.getLanguages();\n language.getItems().removeAll(language.getItems());\n Iterator<String> iterator=langs.iterator();\n if(iterator.hasNext()) {\n String languageString = iterator.next();\n while (iterator.hasNext()) {\n if (!Character.isDigit(languageString.charAt(0)) || languageString.charAt(0) != ' ')\n language.getItems().add(languageString);\n languageString = iterator.next();\n\n }\n language.getSelectionModel().selectFirst();\n }\n else{\n language.getItems().add(\"No languges :(\");\n language.getSelectionModel().selectFirst();\n\n }\n }",
"void initTranslationTargetList() {\n\t\t// Set the preference for the target language code, in case we've just\n\t\t// switched from Google\n\t\t// to Bing, or Bing to Google.\n\t\tString currentLanguageCode = sharedPreferences.getString(\n\t\t\t\tKEY_TARGET_LANGUAGE_PREFERENCE,\n\t\t\t\tCaptureActivity.DEFAULT_TARGET_LANGUAGE_CODE);\n\n\t\t// Get the name of our language\n\t\tString currentLanguage = LanguageCodeHelper.getTranslationLanguageName(\n\t\t\t\tgetBaseContext(), currentLanguageCode);\n\t\tString newLanguageCode = \"\";\n\t\t// Update the list of available languages for the currently-chosen\n\t\t// translation API.\n\t\tlistPreferenceTargetLanguage\n\t\t\t\t.setEntries(R.array.translationtargetlanguagenames_microsoft);\n\t\tlistPreferenceTargetLanguage\n\t\t\t\t.setEntryValues(R.array.translationtargetiso6391_microsoft);\n\n\t\t// Get the corresponding code for our language name\n\t\tnewLanguageCode = TranslateBingAsyncTask.toLanguage(currentLanguage);\n\n\t\t// Store the code as the target language preference\n\t\tString newLanguageName = LanguageCodeHelper.getTranslationLanguageName(\n\t\t\t\tgetBaseContext(), newLanguageCode);\n\t\tlistPreferenceTargetLanguage.setValue(newLanguageName); // Set the radio\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// button in the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// list\n\t\tsharedPreferences\n\t\t\t\t.edit()\n\t\t\t\t.putString(PreferencesActivity.KEY_TARGET_LANGUAGE_PREFERENCE,\n\t\t\t\t\t\tnewLanguageCode).commit();\n\t\tlistPreferenceTargetLanguage.setSummary(newLanguageName);\n\t}",
"public void setSuggestions(List<String> suggestions) {\n this.suggestions = suggestions;\n }",
"public void testLocalisesLanguageListItems()\n {\n administration.restoreData(\"TestUserProfileI18n.xml\");\n tester.gotoPage(\"secure/admin/jira/EditApplicationProperties!default.jspa\");\n\n tester.setWorkingForm(\"jiraform\");\n final String[] languageOptions = tester.getDialog().getOptionsFor(\"defaultLocale\");\n final String[] expectedOptions = new String[] {\n \"English (Australia)\",\n \"Deutsch (Deutschland)\",\n \"\\u65e5\\u672c\\u8a9e (\\u65e5\\u672c)\"\n };\n\n // Just checking for equality won't work as the JVM's default language\n // is marked as the \"default\" and that could change between systems.\n for (String expectedOption : expectedOptions)\n {\n boolean found = false;\n for (String languageOption : languageOptions)\n {\n if (languageOption.indexOf(expectedOption) == 0)\n {\n found = true;\n break;\n }\n }\n\n if (!found)\n {\n fail();\n }\n }\n }",
"String getSpellSuggestions();",
"public void setLanguageList(Language[] languageList) {\n this.languageList = languageList;\n }",
"public SelectLanguage() { }",
"public void initLanguageSelection(){\n vh.language.setText(Locale.getDefault().getDisplayLanguage());\n vh.languageSetting.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setTitle(context.getResources().getString(R.string.select_language));\n builder.setItems(Utils.getSupportedLanguagesAsArray(), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n selectLanguage(which);\n }\n });\n AlertDialog dialog = builder.create();\n dialog.setCancelable(false);\n dialog.show();\n }\n });\n }",
"private void setSuggestedCategory() {\n if (selectedCategoryKey != null) {\n return;\n }\n if (suggestedCategories != null && suggestedCategories.length != 0) {\n selectedCategoryKey = suggestedCategories[0].getKey();\n selectCategory.setText(suggestedCategories[0].getName());\n }\n }",
"public List<String> getLtrLanguages();",
"void putLanguage(Set<Language> languages);",
"void setGenresSuggestion(ArrayList<String> genres) {\n\t\tMultiWordSuggestOracle oracle = (MultiWordSuggestOracle) genresBox.getSuggestOracle();\n\t\t\n\t\tfor(int i = 0; i < genres.size(); i++){\n\t\t\toracle.add(genres.get(i));\n\t\t}\n\t}",
"Builder addInLanguage(Text value);",
"protected void addLanguageParameter() throws Exception\n {\n Connection c = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n\n try\n {\n ArrayList termbaseLangs = new ArrayList();\n termbaseLangs.add(ALL);\n c = ConnectionPool.getConnection();\n ps = c.prepareStatement(TERM_LANG_QUERY);\n rs = ps.executeQuery();\n while (rs.next())\n {\n termbaseLangs.add(rs.getString(1));\n }\n\n // We should use .addList() and use a multi-select list instead\n // to let the user select multiple languages...BUT\n // this widget just does not work in the current inetsoft version\n // with the DHTML viewer (ok for java viewer)\n // So, we're stuck with giving the user one value to choose.\n theParameters.addChoice(\"selectedLang\", ALL,\n termbaseLangs.toArray());\n theParameters.setAlias(\"selectedLang\", \"Language\");\n }\n finally\n {\n ConnectionPool.silentClose(rs);\n ConnectionPool.silentClose(ps);\n ConnectionPool.silentReturnConnection(c);\n }\n }",
"static private void setLanguage(String strL) {\r\n\r\n\t\tstrLanguage = strL;\r\n\r\n\t\t// need to reload it again!\r\n\t\tloadBundle();\r\n\t}",
"public Builder setLanguageList(in.trujobs.proto.PreScreenLanguageObject value) {\n if (languageListBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n languageList_ = value;\n onChanged();\n } else {\n languageListBuilder_.setMessage(value);\n }\n\n return this;\n }",
"void onSuggestionsChanged(String autocompleteText);",
"Builder addInLanguage(String value);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a Terrain from a node in a map's ini file | public Terrain(Preferences node) {
background = new Sprite("terrains/"+node.get("background", "grass.png"));
encounterRate = Integer.valueOf(node.get("rate", "10")).intValue();
formations = new ArrayList<Formation>();
try {
for (String s : node.keys())
if (s.startsWith("formation"))
{
Formation f = new Formation();
for (String e : node.get(s, s).split(","))
f.add(e);
if (f.size() > 0)
formations.add(f);
}
} catch (BackingStoreException e) {
e.printStackTrace();
}
} | [
"public static Terrain load(File mapFile) throws FileNotFoundException {\n\n Reader in = new FileReader(mapFile);\n JSONTokener jtk = new JSONTokener(in);\n JSONObject jsonTerrain = new JSONObject(jtk);\n\n int width = jsonTerrain.getInt(\"width\");\n int depth = jsonTerrain.getInt(\"depth\");\n Terrain terrain = new Terrain(width, depth);\n\n JSONArray jsonSun = jsonTerrain.getJSONArray(\"sunlight\");\n float dx = (float)jsonSun.getDouble(0);\n float dy = (float)jsonSun.getDouble(1);\n float dz = (float)jsonSun.getDouble(2);\n terrain.setSunlightDir(dx, dy, dz);\n \n JSONArray jsonAltitude = jsonTerrain.getJSONArray(\"altitude\");\n for (int i = 0; i < jsonAltitude.length(); i++) {\n int x = i % width;\n int z = i / width;\n\n double h = jsonAltitude.getDouble(i);\n terrain.setGridAltitude(x, z, h);\n }\n\n if (jsonTerrain.has(\"trees\")) {\n JSONArray jsonTrees = jsonTerrain.getJSONArray(\"trees\");\n for (int i = 0; i < jsonTrees.length(); i++) {\n JSONObject jsonTree = jsonTrees.getJSONObject(i);\n double x = jsonTree.getDouble(\"x\");\n double z = jsonTree.getDouble(\"z\");\n terrain.addTree(x, z);\n }\n }\n \n if (jsonTerrain.has(\"roads\")) {\n JSONArray jsonRoads = jsonTerrain.getJSONArray(\"roads\");\n for (int i = 0; i < jsonRoads.length(); i++) {\n JSONObject jsonRoad = jsonRoads.getJSONObject(i);\n double w = jsonRoad.getDouble(\"width\");\n \n JSONArray jsonSpine = jsonRoad.getJSONArray(\"spine\");\n double[] spine = new double[jsonSpine.length()];\n \n for (int j = 0; j < jsonSpine.length(); j++) {\n spine[j] = jsonSpine.getDouble(j);\n }\n terrain.addRoad(w, spine);\n }\n }\n \n if(jsonTerrain.has(\"other\")){\n \tJSONArray jsonOthers = jsonTerrain.getJSONArray(\"other\");\n for (int i = 0; i < jsonOthers.length(); i++) {\n JSONObject jsonOther = jsonOthers.getJSONObject(i);\n double x1 = jsonOther.getDouble(\"x1\");\n double z1 = jsonOther.getDouble(\"z1\");\n double x2 = jsonOther.getDouble(\"x2\");\n double z2 = jsonOther.getDouble(\"z2\");\n int action = jsonOther.getInt(\"action\");\n terrain.addOther(x1, z1, x2, z2, action);\n }\n }\n \n if(jsonTerrain.has(\"pond\")){\n \tJSONArray jsonPonds = jsonTerrain.getJSONArray(\"pond\");\n for (int i = 0; i < jsonPonds.length(); i++) {\n JSONObject pond = jsonPonds.getJSONObject(i);\n double x = pond.getDouble(\"x\");\n double z = pond.getDouble(\"z\");\n double size = pond.getDouble(\"size\");\n terrain.addPond(x, z, size);\n }\n }\n \n return terrain;\n }",
"public void loadTerrainNode() throws IOException {\r\n String userHome = System.getProperty(\"user.home\");\r\n \r\n //File file = new File(userHome+\"/Models/\"+\"MyTerrain.cube\");\r\n File file = new File(\"MyTerrain.cube\");\r\n InputStream in = new FileInputStream(file);\r\n \r\n // Get the file length, workaraound for determining how many elements should be\r\n //within the serialized byte array. In future, an integer reference preceding the\r\n //data can allow voxel data to exist next to other data in the same file\r\n long length = file.length();\r\n \r\n // Check to ensure that we haven't exceded interger limitations\r\n if(length > Integer.MAX_VALUE) {\r\n throw new IOException(\"File too long\");\r\n }\r\n \r\n // Empty byte array to serialize imported voxel map\r\n byte[] bytes = new byte[(int)length];\r\n int offset = 0;\r\n int numRead = 0;\r\n \r\n // Begin reading data byte per byte and increment offset\r\n while(offset < bytes.length && (numRead = in.read(bytes, offset, bytes.length-offset)) >= 0) {\r\n offset += numRead;\r\n }\r\n \r\n if( offset < bytes.length) {\r\n throw new IOException(\"Can't confirm file\");\r\n }\r\n \r\n // Close the stream and set the blockTerrain\r\n in.close();\r\n terrainNode.removeControl(blockTerrain);\r\n rootNode.detachChild(terrainNode);\r\n // Importing map data\r\n System.out.println(\"Importing map data via CubesSerializer\");\r\n CubesSerializer.readFromBytes(blockTerrain, bytes);\r\n terrainNode.addControl(blockTerrain);\r\n rootNode.attachChild(terrainNode);\r\n }",
"public void createTerrain() {\n }",
"public Terrain(String type) { \r\n\t\t\r\n\t\tthis.name = type;\r\n\t\tPatternIO load = new PatternIO();\r\n\t\tint[][] pattern = load.loadPattern(type);\r\n\t\ttileSet = new Tile[pattern[0].length];\r\n\r\n\t\tfor (int i = 0; i < (tileSet.length - 1); i++) {\r\n\r\n\t\t\ttileSet[i] = new Tile(false, false, true, false, pattern[0][i], pattern[1][i]);\r\n\r\n\t\t}\r\n\t\t\r\n\t}",
"public Terrain(String terrType) {\n this.terrainType = terrType;\n setTerrainValues();\n }",
"@Override\n public void createTerrain( ) {\n\n ElevationGridGenerator gridGenerator = new ElevationGridGenerator(\n getTerrainWidth(),\n getTerrainDepth(),\n getTerrainHeights()[0].length,\n getTerrainHeights().length,\n getTranslation(),\n isTerrainCentered() );\n\n // set the terrain into the elevation grid handler\n gridGenerator.setTerrainDetail( getTerrainHeights(), 0 );\n\n GeometryData data = new GeometryData();\n data.geometryType = getGeometryType();\n data.geometryComponents = GeometryData.NORMAL_DATA;\n if ( getTexture() != null ){\n data.geometryComponents |= GeometryData.TEXTURE_2D_DATA;\n }\n try {\n gridGenerator.generate( data );\n } catch ( UnsupportedTypeException ute ) {\n System.out.println( \"Geometry type is not supported\" );\n }\n int format = GeometryArray.COORDINATES | GeometryArray.NORMALS;\n if ( getTexture() != null )\n format |= GeometryArray.TEXTURE_COORDINATE_2;\n GeometryArray geom = createGeometryArray( data, format );\n\n geom.setCoordinates( 0, data.coordinates );\n \n// try {\n// File tmpFile = File.createTempFile( \"stripedata\", \".txt\" );\n// tmpFile.deleteOnExit();\n// PrintStream ps = new PrintStream( new BufferedOutputStream( new FileOutputStream( tmpFile ) ) );\n// System.out.println( ps + \": outputting coords.\");\n// for( int i = 0; i+2< data.coordinates.length ; i += 3 ){\n// ps.println ( data.coordinates[i] + \" \" + data.coordinates[i+1] + \" \" + data.coordinates[i+2] );\n// }\n// } catch ( IOException e ) {\n// // TODO Auto-generated catch block\n// e.printStackTrace();\n// }\n geom.setNormals( 0, data.normals );\n if ( getTexture() != null ){\n// File f = File.createTempFile(\"texcoords\", \".txt\");\n// f.deleteOnExit();\n// PrintStream ps = new PrintStream( new BufferedOutputStream( new FileOutputStream( f ) ) );\n// System.out.println( ps + \": outputting texcoord.\");\n// for( int i = 0; i< data.textureCoordinates.length ; ++i ){\n// ps.println( data.textureCoordinates[i] );\n// }\n geom.setTextureCoordinates( 0, 0, data.textureCoordinates );\n }\n \n setGeometry( geom );\n// addTexture();\n\n }",
"private static void loadMapFile(String filename) { \n \t\tScanner textReader = null;\n \t\t\n \t\t//Read the file from the filesystem\n \t\ttry {\n \t\t\ttextReader = new Scanner(new File(filename));\n \t\t} catch (FileNotFoundException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\t\n \t\twidth = textReader.nextInt();\n \t\theight = textReader.nextInt();\n \t\t\n \t\t//The next two ints are only required by the map editor\n \t\tquadrant_count_width = textReader.nextInt();\n \t\ttextReader.nextInt();\n \t\t\t\t\n \t\ttileSize = textReader.nextInt();\n \t\t\n \t\tmap = new int[width][height];\n \t\tentityMap = new Entity[width][height];\n \t\t\n \t\tfor (int x = 0; x < width; ++x) {\n \t\t\tfor (int y = 0; y < height; ++y) {\n \t\t\t\tint typeID = textReader.nextInt();\n \t\t\t\tswitch(typeID) {\n \t\t\t\t\tdefault:\n \t\t\t\t\tcase 0: //Grass\n \t\t\t\t\t\taddEntity(new Grass(x, y));\n \t\t\t\t\t\tbreak;\n \t\t\t\t\tcase 1: //Door\n \t\t\t\t\t\taddEntity(new Floor(x, y));\n \t\t\t\t\t\tbreak;\n \t\t\t\t\tcase 2: //Wall\n \t\t\t\t\t\taddEntity(new Wall(x, y));\n \t\t\t\t\t\tbreak;\n \t\t\t\t\tcase 3: //Door\n \t\t\t\t\t\taddEntity(new Door(1, x, y));\n \t\t\t\t\t\tbreak;\n \t\t\t\t\tcase 4: //Enemy\n \t\t\t\t\t\taddEntity(new Enemy(4, 20, x, y));\n \t\t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\ttextReader.close();\n \t}",
"public TerrainGenerator()\n {\n try\n {\n init();\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }",
"private void generateWorld() {\r\n\r\n for (int i = 0; i < WORLD_WIDTH; i = i + 32) {\r\n for (int j = 0; j < WORLD_HEIGHT; j = j + 32) {\r\n grassList.add(new MapItem(i, j));\r\n }\r\n }\r\n\r\n File treeFile = new File(\"res/tree.txt\");\r\n try {\r\n Scanner treeScanner = new Scanner(treeFile);\r\n while (treeScanner.hasNextLine()) {\r\n String readText = treeScanner.nextLine();\r\n int x1 = Integer.parseInt(readText);\r\n readText = treeScanner.nextLine();\r\n int x2 = Integer.parseInt(readText);\r\n readText = treeScanner.nextLine();\r\n int y1 = Integer.parseInt(readText);\r\n readText = treeScanner.nextLine();\r\n int y2 = Integer.parseInt(readText);\r\n\r\n for (int x = x1; x < x2; x++) {\r\n for (int y = y1; y < y2; y++) {\r\n treeList.add(new MapItem(55 * x + 6, 50 * y));\r\n\r\n }\r\n }\r\n }\r\n } catch (FileNotFoundException ex) {\r\n Logger.getLogger(Simulation.class\r\n .getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n }",
"public TerrainModel(FlatField terrain)\r\n {\r\n this.domain = null;\r\n this.terrain = terrain;\r\n this.terrainProvider = ShadedTerrainProviderFactory.getInstance();\r\n }",
"TiledMap loadMap(String path);",
"public void createNewMap()\n {\n //if map is not null, stop all previous seeds\n if( map != null)\n {\n map.stopAllSeeds();\n map.stopAllTrees();\n }\n try\n {\n map = new Map(fileManager.readMapData());\n }\n catch(FileNotFoundException e)\n {\n\n }\n }",
"public Terrain(TerrainTypes type) {\r\n\r\n\t\tthis.name = type.getName();\r\n\t\tPatternIO load = new PatternIO();\r\n\t\tint[][] pattern = load.loadPattern(type.getName());\r\n\t\ttileSet = new Tile[pattern[0].length];\r\n\r\n\t\tfor (int i = 0; i < (tileSet.length - 1); i++) {\r\n\r\n\t\t\ttileSet[i] = new Tile(false, false, true, false, pattern[0][i], pattern[1][i]);\r\n\r\n\t\t}\r\n\r\n\t}",
"private void initTerrain() {\n\t\tHillHeightMap myHillHeightMap = new HillHeightMap(300, 2000, 5.0f, 20.0f, (byte) 2, 12345);\n\t\tmyHillHeightMap.setHeightScale(0.1f);\n\t\thillTerrain = createTerBlock(myHillHeightMap);\n\t\t// create texture and texture state to color the terrain\n\t\tTextureState grassState;\n\t\tTexture grassTexture = TextureManager.loadTexture2D(\"./images/grass.jpg\");\n\t\tgrassTexture.setWrapMode(Texture.WrapMode.Repeat);\n\t\tgrassTexture.setApplyMode(sage.texture.Texture.ApplyMode.Replace);\n\t\tgrassState = (TextureState) display.getRenderer().createRenderState(RenderStateType.Texture);\n\t\tgrassState.setTexture(grassTexture, 0);\n\t\tgrassState.setEnabled(true);\n\t\t// apply the texture to the terrain\n\t\thillTerrain.setRenderState(grassState);\n\t\taddGameWorldObject(hillTerrain);\n\n\t\thillTerrain.updateGeometricState(1.0f, true);\n\n\t\t//Add Terrain Physics\n\t\tfloat up[] = { 0, 1, 0 };\n\t\tterrainP = physicsEngine.addStaticPlaneObject(physicsEngine.nextUID(),\n\t\t\t\thillTerrain.getWorldTransform().getValues(), up, 0.0f);\n\t\tterrainP.setBounciness(0.0f);\n\t\t//remove this line for ODE4J.\n\t\thillTerrain.setPhysicsObject(terrainP);\n\n\t\t//TODO: should also set damping, friction, etc.\n\t}",
"private void initBlockTerrain(){\r\n CubesTestAssets.registerBlocks();\r\n CubesSettings blockSettings = CubesTestAssets.getSettings(this);\r\n blockSettings.setBlockSize(5);\r\n blockTerrain = new BlockTerrainControl(blockSettings, new Vector3Int(2, 1, 2));\r\n blockTerrain.setBlockArea(new Vector3Int(0, 0, 0), new Vector3Int(32, 1, 32), CubesTestAssets.BLOCK_STONE);\r\n blockTerrain.setBlocksFromNoise(new Vector3Int(0, 1, 0), new Vector3Int(32, 5, 32), 0.5f, CubesTestAssets.BLOCK_GRASS);\r\n terrainNode = new Node();\r\n terrainNode.addControl(blockTerrain);\r\n rootNode.attachChild(terrainNode);\r\n }",
"public TerrainTile senseTerrainTile(MapLocation loc);",
"public TerrainGenerator(MapGeneratorOptions mapGeneratorOptions) {\n this.mapGeneratorOptions = mapGeneratorOptions;\n }",
"public TerrainMesh generateTerrain() {\n float[] vertices = new float[(zVertexCount * xSize) * 9];\n float[] colors = new float[(zVertexCount * xSize) * 8];\n float[] normals = new float[(zVertexCount * xSize) * 8];\n int[] indices = new int[(zVertexCount * xSize) * 3];\n\n for(int x = 0; x < xSize; x++) {\n for(int z = 0; z < zSize; z++) {\n TerrainSquare square = new TerrainSquare(this, new Vector2f(x, z),\n new Vector3f(x == 0 ? 0 : size * x,\n 0 + getHeight(x, z),\n z == 0 ? 0 : size * z),\n null);\n\n square.setColor(biomeGenerator.getColors()[square.getSquareId()]);\n\n storeSquareVertices(vertices, square);\n storeSquareColors(colors, square);\n storeSquareNormals(normals, square);\n storeSquareIndices(indices, square);\n\n terrainSquareMap.put(square.getSquareIndex(), square);\n }\n }\n\n return new TerrainMesh(vertices, colors, normals, indices);\n }",
"private Terrain(int id) {\n\t\tthis.id = id;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Configures current session settings for batch update mode. | @Override
public void setBatchUpdateMode(boolean batchMode)
{
SessionFactory sessionFactory = persistencyResources.getSessionFactory();
Session currentSession = sessionFactory.getCurrentSession();
HibernateUtils.setBatchUpdateMode(currentSession, batchMode);
} | [
"public void setBatch(Boolean batch) {\n\t\tthis.batch = batch;\n\t\tthis.handleConfig(\"batch\", batch);\n\t}",
"public void \n setBatchMode()\n {\n pIsBatchMode = true; \n }",
"protected void resetSessionOptions() {\n putSessionCustomOpts(KbartCustomOptions.getDefaultOptions());\n }",
"private void updateCaptureSessionConfig() {\n ValidatingBuilder validatingBuilder;\n synchronized (mAttachedUseCaseLock) {\n validatingBuilder = mUseCaseAttachState.getActiveAndOnlineBuilder();\n }\n\n if (validatingBuilder.isValid()) {\n // Apply CameraControlInternal's SessionConfig to let CameraControlInternal be able\n // to control Repeating Request and process results.\n validatingBuilder.add(mCameraControlSessionConfig);\n\n SessionConfig sessionConfig = validatingBuilder.build();\n mCaptureSession.setSessionConfig(sessionConfig);\n }\n }",
"@Bean\n @Scope(value = \"session\", proxyMode=ScopedProxyMode.TARGET_CLASS)\n public SessionSettings sessionSettings() {\n \t\treturn new SessionSettings();\n }",
"private void crawlerSessionUpdate()\n {\n final DropSession dropSession = crawlerConfig.getDropSession();\n if (dropSession != null)\n {\n dropSession.update();\n }\n }",
"private void setSessionAttributes() {\n\n\t}",
"public void setBatchSize(Integer batchSize)\n {\n _batchSize = batchSize;\n }",
"void setSession(mode m);",
"void setSessionTrackingModes(Set<SessionTrackingMode> sessionTrackingModes);",
"public void setBatchSize(int batchSize) {\n this.batchSize = batchSize;\n }",
"public void setWindowsSize(int batchSize_) {\n this.SVBEngine.setWindowsSize(batchSize_);\n }",
"public void setBatchSize(int batchSize) {\n m_batchSize = batchSize;\n }",
"public void setBatch(Integer batch) {\n this.batch = batch;\n }",
"private void updateConfigOptions()\n {\n // Pushes configuration options from the Options Manager to the cache in the Config Manager to prepare for file writing.\n config.setRuleList(ruleList);\n\n config.setRepoM(repoSelect.getSelectionModel().getSelectedIndex());\n config.setTagM(tagInput.getText());\n config.setPushM(pushUpdates.isSelected());\n\n config.setOpmode(modeSelect.getSelectionModel().getSelectedIndex());\n config.setOutputDir(outputDir);\n config.setDoMD5(optionsManager.getDoMD5());\n config.setDoFileLog(optionsManager.getDoFileLogging());\n config.setDoLogTrim(optionsManager.getDoLogTrimming());\n config.setDoMT(optionsManager.getDoMultiThreading());\n config.setDoSkipDLPrompt(optionsManager.getDoSkipDLPrompt());\n config.setLogFile(logFile);\n config.setDoPreview(optionsManager.getDoPreview());\n }",
"public SessionOpts() {\n traffic = TRAFFIC_MESSAGES;\n isMultipoint = false;\n proximity = PROXIMITY_ANY;\n transports = TRANSPORT_ANY;\n }",
"private void initParameters() {\n jobParameters.setSessionSource(getSession(\"source\"));\n jobParameters.setSessionTarget(getSession(\"target\"));\n jobParameters.setAccessDetailsSource(getAccessDetails(\"source\"));\n jobParameters.setAccessDetailsTarget(getAccessDetails(\"target\"));\n jobParameters.setPageSize(Integer.parseInt(MigrationProperties.get(MigrationProperties.PROP_SOURCE_PAGE_SIZE)));\n jobParameters.setQuery(MigrationProperties.get(MigrationProperties.PROP_SOURCE_QUERY));\n jobParameters.setItemList(getFolderStructureItemList());\n jobParameters.setPropertyFilter(getPropertyFilter());\n jobParameters.setReplaceStringInDestinationPath(getReplaceStringArray());\n jobParameters.setNamespacePrefixMap(getNamespacePrefixList());\n jobParameters.setBatchId(getBatchId());\n jobParameters.getStopWatchTotal().start();\n jobParameters.setSuccessAction(MigrationProperties.get(MigrationProperties.PROP_SOURCE_SUCCESS_ACTION));\n jobParameters.setErrorAction(MigrationProperties.get(MigrationProperties.PROP_SOURCE_ERROR_ACTION));\n jobParameters.setSuccessFolder(MigrationProperties.get(MigrationProperties.PROP_SOURCE_SUCCESS_FOLDER) + \"/\" + jobParameters.getBatchId());\n jobParameters.setErrorFolder(MigrationProperties.get(MigrationProperties.PROP_SOURCE_ERROR_FOLDER) + \"/\" + jobParameters.getBatchId());\n jobParameters.setCurrentFolder(getRootFolder());\n jobParameters.setSkipDocuments(Boolean.valueOf(MigrationProperties.get(MigrationProperties.PROP_MIGRATION_COPY_FOLDERS_ONLY)));\n \n }",
"public void setUseBatchMode(boolean useBatchMode)\n {\n _useBatchMode = useBatchMode;\n }",
"private void setToCurrentSettings()\n {\n antiAliasingToggle.setSelectedStatus(\n PreferencesController.getInstance().getAntiAliasingSetting());\n canvasRealTimeInformationToggle.setSelectedStatus(\n PreferencesController.getInstance()\n .getShowNearestRoadNameSetting());\n keyboardKeysToggle.setSelectedStatus(\n PreferencesController.getInstance().getKeyBindingsSetting());\n useFastestRouteToggle.setSelectedStatus(\n PreferencesController.getInstance().getUseFastestRouteSetting());\n themeSettings.setSelectedTheme(\n PreferencesController.getInstance().getThemeSetting());\n fileLoadSetting.setTextField(PreferencesController.getInstance().getStartupFileNameSetting());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the amount of time the renderer waits for loading an external image before giving up and examining the other images in the Graphic object | public static long getImageLoadingTimeout() {
return ImageLoader.getTimeout();
} | [
"private static void waitOnImage(Image image)\n {\n ImageIcon icon = new ImageIcon(image);\n while (icon.getImageLoadStatus() == MediaTracker.LOADING)\n {\n Thread.yield();\n }\n if (icon.getImageLoadStatus() != MediaTracker.COMPLETE)\n {\n LOGGER.log(Level.SEVERE,\n \"Image loading failed (\" + icon.getImageLoadStatus() + \")\");\n }\n }",
"String loadingCount();",
"public long getTotalLoadTimeMs();",
"public static void logImageManagerStatus()\n {\n final float t = 0.001f * (System.currentTimeMillis() - start);\n\n Log.d(TAG, \"Uptime: \" + t + \"[s]\");\n\n // count loaded images\n final int imgn = loaded.size();\n Log.d(TAG, \"Loaded images: \" + imgn);\n if (imgn > 0)\n {\n int totalSize = 0;\n for (final LoadedBitmap limg : loaded.values())\n {\n final Bitmap bmp = limg.getBitmap();\n\n // no bitmap\n if (bmp == null)\n {\n continue;\n }\n\n // get bits per pixel\n int bpp = 0;\n if (bmp.getConfig() != null)\n {\n switch (bmp.getConfig())\n {\n case ALPHA_8:\n bpp = 1;\n break;\n case RGB_565:\n case ARGB_4444:\n bpp = 2;\n break;\n case ARGB_8888:\n default:\n bpp = 4;\n break;\n }\n }\n\n // count total size\n totalSize += bmp.getWidth() * bmp.getHeight() * bpp;\n }\n\n Log.d(TAG, \"Estimated loaded images size: \" + totalSize / 1024 + \"[kB]\");\n }\n\n // count queued images\n Log.d(TAG, \"Queued images: \" + loadQueue.size());\n }",
"public long getTotalLoadTime();",
"public int getLoaded(){\n\t\treturn getStartPoint().getAmount();\n\t}",
"long getTargetsLoaded();",
"public void checkLoad() throws Exception\n {\n // Wait for load\n while (true)\n {\n try\n {\n mt.waitForAll();\n }\n catch (InterruptedException ie)\n {\n continue;\n }\n break;\n }\n if (mt.isErrorAny()) throw new Exception(\"Error loading images\");\n }",
"public static String getLoadingDotsSize(){\n DriverManager.waitForElement(Constans.LOADING_DOTS_LOCATOR);\n return DriverManager.driver.findElement(Constans.LOADING_DOTS_LOCATOR).getSize().toString();\n }",
"int getFadeImageThresholdMs();",
"long getTemporaryEvolutionFinishMs();",
"public void verifyLoadingSpinnerImage() throws InterruptedException {\r\n\r\n Thread.sleep(500);\r\n if (isElemenetDisplayed(By.cssSelector(\".loading-spinner-img\"))) {\r\n System.out.println(\"Verfied loading spinner image displayed.\");\r\n ATUReports.add(time + \" Verfied loading spinner image displayed.\", \"True.\", \"True.\", LogAs.PASSED, null);\r\n } else {\r\n System.out.println(\"The spinner image wasn't displayed.\");\r\n ATUReports.add(time + \" The spinner image wasn't displayed.\", \"True.\", \"True.\", LogAs.PASSED, null);\r\n }\r\n }",
"public long getDrawingTime() { throw new RuntimeException(\"Stub!\"); }",
"void onImageLoadStart(int pos);",
"int renderThreadCount();",
"public long getLoadExceptionCount();",
"long detectionTimeMs();",
"int getTimesHit();",
"void onImageLoadDone(int pos, boolean isSuccess);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If you are the Owner, deletes the space. | public void deleteSpace(){
//TODO: need to pop-up a confirmation dialogue
/*try {
this.muc.destroy(null, null);
} catch (XMPPException e) {
Log.d(TAG, "Unable to destroy Space!");
}*/
Collection<User> users = this.space.getAllParticipants().values();
for (User u : users) {
try {
if(!u.getUsername().equals(MainApplication.user_primary.getUsername()))
this.space.getKickoutController().kickoutUser(u, Network.DEFAULT_KICKOUT);
} catch (XMPPException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
this.space.getMUC().leave();
//end experiment
if(space.equals(Space.getMainSpace())){
Space.setMainSpace(null);
}
} | [
"protected void removeFromSpace() {\r\n // assert spaceId == null: \"This geom is already not in any Space\";\r\n\r\n Ode.dSpaceRemove( spaceId, geomId );\r\n spaceId = Ode.getPARENTSPACEID_ZERO();\r\n this.space = null;\r\n\r\n }",
"@Override\n public void delete(Owner owner) {\n this.ownerRepository.delete(owner);\n }",
"public void unsetOwner()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(OWNER$28);\r\n }\r\n }",
"void deleteOwner(@Nonnull final User owner, @Nonnull final Telegraf telegraf);",
"public void deleteMetaSpace(String metaSpaceId) throws ManagementException;",
"void deleteOwner(@Nonnull final String ownerID, @Nonnull final String telegrafID);",
"public void clearOwner() {\n owner = Optional.empty();\n checkRep();\n }",
"private void removeOwnership(Player player) {\r\n\t\tfor (int i=1; i<=22; i++){\r\n\t\t\tif(gameboard.getLogicField()[i] instanceof AbstractOwnables){\r\n\t\t\t\tif (gameboard.getLogicField()[i].getOwner() == player){\r\n\t\t\t\t\tgameboard.getLogicField()[i].removeOwner();\r\n\t\t\t\t\tGUI.removeOwner(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}",
"public static void deleteCurrentUser(){\n currentUser = null;\n Paper.book().delete(SavedUsers.FIRSTNAME);\n Paper.book().delete(SavedUsers.LASTNAME);\n Paper.book().delete(SavedUsers.USERNAME);\n Paper.book().delete(SavedUsers.EMAIL);\n }",
"@FXML\n public void removeItemOwner() {\n if (selectedItem == null) return;\n selectedItem.setOwner(null);\n selectedGuest.getItems().remove(selectedItem);\n itemOwner.clear();\n }",
"public void endSpaceMembership(int spaceId, int userId) {\n getResourceFactory().getApiResource(\n \"/space/\" + spaceId + \"/member/\" + userId).delete();\n }",
"public void delete() {\n\n\t\t\n\t\t// Log:\n\t\tSaga.info(\"Deleting \" + getId() + \"(\" + getName() + \") faction.\");\n\t\t\n\t\t// Remove all members:\n\t\tArrayList<String> playerNames = getMembers();\n\t\tfor (int i = 0; i < playerNames.size(); i++) {\n\t\t\tremoveMember(playerNames.get(i));\n\t\t}\n\t\t\n\t\t// Update faction manager:\n\t\tFactionManager.getFactionManager().removeFaction(this);\n\t\t\n\t\t// Save last time:\n\t\tsave();\n\t\t\n\t\t// Remove from disc:\n\t\tWriterReader.deleteFaction(getId().toString());\n\t\t\n\t\t\n\t}",
"public void resetOwner() {\r\n\t\towner = null;\r\n\t}",
"private void delete() {\n\t\tresControl.deleteReservation(resnr);\n\t}",
"@Override\n public void dismissOwner(character p){\n if(p == this.owner)\n this.owner = null;\n }",
"void deleteEntries(String ownerId);",
"public void delete()\n\t{\n\t\tgetPiece().delete(this);\n\t}",
"public void removeByowner(long ownerId) throws SystemException {\n\t\tfor (FlatOwner flatOwner : findByowner(ownerId)) {\n\t\t\tremove(flatOwner);\n\t\t}\n\t}",
"private void deleteContact() {\n System.out.format(\"\\033[31m%s\\033[0m%n\", \"Delete Contact\");\n System.out.format(\"\\033[31m%s\\033[0m%n\", \"=========================\");\n\n InputHelper inputHelper = new InputHelper();\n int ans = inputHelper.readInt(\"Type the position\");\n this.repository.deleteAtPos(ans);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes the existing available IP address. | K8sIpam removeAvailableIp(String ipamId); | [
"public void unsetIPAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(IPADDRESS$8, 0);\n }\n }",
"public void deregisterIPAddress(Inet4Address address) {\n\t\tusedAddresses.remove(address);\n\t}",
"public void deleteIP(String ip) throws IOException {\n for(String ipAdd : ipAddresses){\n if(ipAdd.equals(ip))\n ipAddresses.remove(ip);\n }\n storeIP();\n }",
"void removeAddress() throws Exception;",
"K8sIpam removeAllocatedIp(String ipamId);",
"public void markIpAddressDelete() throws JNCException {\n markLeafDelete(\"ipAddress\");\n }",
"public com.sudoku.comm.generated.User.Builder clearIpAddress() {\n ipAddress = null;\n fieldSetFlags()[6] = false;\n return this;\n }",
"void unsetAddress();",
"public void unsetGnDataIpaddressValue() throws JNCException {\n delete(\"gn-data-ipaddress\");\n }",
"void releaseIp(IpPrefix cidr, IpAddress ip);",
"public void unsetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FROMADDRESS$6, 0);\n }\n }",
"void removePhysicalAddress(int i);",
"public void unsetIpAddress1Value() throws JNCException {\n delete(\"ip-address1\");\n }",
"public void unsetAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(ADDRESS$20, 0);\n }\n }",
"public void unsetAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(ADDRESS$6, 0);\n }\n }",
"public void markIpAddress1Delete() throws JNCException {\n markLeafDelete(\"ipAddress1\");\n }",
"@Test\n public void testRemoveIp() {\n Set<IpAddress> ips = new HashSet<>();\n ips.add(IP1);\n ips.add(IP2);\n\n HostDescription description = createHostDesc(HOSTID, ips);\n ecXHostStore.createOrUpdateHost(PID, HOSTID, description, false);\n ecXHostStore.removeIp(HOSTID, IP1);\n Host host = ecXHostStore.getHost(HOSTID);\n\n assertFalse(host.ipAddresses().contains(IP1));\n assertTrue(host.ipAddresses().contains(IP2));\n }",
"public boolean unban(InetAddress address);",
"public void markIpAddress2Delete() throws JNCException {\n markLeafDelete(\"ipAddress2\");\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'field718' field | public java.lang.CharSequence getField718() {
return field718;
} | [
"public java.lang.CharSequence getField718() {\n return field718;\n }",
"java.lang.String getField1371();",
"java.lang.String getField1700();",
"java.lang.String getField1978();",
"public java.lang.CharSequence getField7() {\n return field7;\n }",
"java.lang.String getField1571();",
"java.lang.String getField1171();",
"public java.lang.CharSequence getField7() {\n return field7;\n }",
"public void setField718(java.lang.CharSequence value) {\n this.field718 = value;\n }",
"public java.lang.CharSequence getField702() {\n return field702;\n }",
"java.lang.String getField1466();",
"java.lang.String getField1871();",
"java.lang.String getField1164();",
"public java.lang.CharSequence getField759() {\n return field759;\n }",
"java.lang.String getField1671();",
"java.lang.String getField1406();",
"java.lang.String getField1460();",
"java.lang.String getField1366();",
"java.lang.String getField1974();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
merchant resource for the store | @ApiModelProperty(required = true, value = "merchant resource for the store")
@JsonProperty("merchant")
public EntityInfo getMerchant() {
return merchant;
} | [
"public String getMerchant() {\n return merchant;\n }",
"public Long getMerchantStoreId() {\n return merchantStoreId;\n }",
"public String getMerchantReference() {\n return this.merchantReference;\n }",
"public String getMerchantNo();",
"@Valid\n @JsonProperty(\"store\")\n public StoreResourceIdentifier getStore();",
"public String getMerchantReference() {\n return merchantReference;\n }",
"public String getMerchantAccount() {\n return merchantAccount;\n }",
"public Long getMerchantId()\n {\n return merchantId;\n }",
"ProductStore getProductStore();",
"@NotNull\n @Valid\n @JsonProperty(\"store\")\n public StoreResourceIdentifier getStore();",
"public String getMerchantAccount() {\n return merchantAccount;\n }",
"public String getMerchantName() {\n return merchantName;\n }",
"public String getMerchantId() {\r\n return merchantId;\r\n }",
"public String getStoreId();",
"public int getStoreID() { return storeID; }",
"public ObjectNode addMerchantService(int uniqueID){\n OntClass merchant = ontReasoned.getOntClass(NS + \"Merchant\");\n Individual merchant1 = ontReasoned.createIndividual(NS + uniqueID, merchant);\n ObjectMapper mapper = new ObjectMapper();\n ObjectNode objectNode1 = mapper.createObjectNode();\n objectNode1.put(\"status:\", \"success\");\n return objectNode1;\n }",
"public String getMerchantId() {\n return merchantId;\n }",
"public String getMerchantIdentifier() {\n return merchantIdentifier;\n }",
"public Long getMerchantId() {\n return merchantId;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests wether the given file only contains ASCII characters if interpreted by reading bytes (16 bit). This does not mean that the file is really an ASCII text file. It just might be viewed with an editor showing only valid ASCII characters. | public static boolean isAllASCII(final File f) throws IOException {
return FileUtil.isAllASCII(new FileInputStream(f));
} | [
"public static boolean isAllASCII(final InputStream in) throws IOException {\n boolean ret = true;\n int read = -1;\n do {\n read = in.read();\n if (read > 0x7F) {\n ret = false;\n break;\n }\n\n } while (read != -1);\n return ret;\n }",
"public static boolean isAllAscii(String text) {\n for (int i = 0; i < text.length(); i++) {\n if (text.charAt(i) > 0x7f) { // non-ascii\n return false; }\n }\n return true;\n }",
"private boolean containsOnlyASCII(String input) {\r\n\t\tfor (int i = 0; i < input.length(); i++) {\r\n\t\t\tif (input.charAt(i) > 127) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public void testAscii() throws Exception {\n String str = \"AbCdEfGhIjKlMnOpQrStUvWxYzX\";\n ByteArrayInputStream aa = new ByteArrayInputStream(str.getBytes(\"ISO8859_1\"));\n InputStreamReader a = new InputStreamReader(aa, \"ISO8859_1\");\n\n try {\n int x = a.read();\n assertEquals('A', x);\n char[] c = new char[26];\n x = a.read(c, 0, 26);\n assertEquals(\"ISO-8859-1\", a.getEncoding());\n assertEquals(26, x);\n assertEquals(\"bCdEfGhIjKlMnOpQrStUvWxYzX\", String.valueOf(c));\n } finally {\n a.close();\n }\n }",
"public static boolean isAscii (final char c)\r\n {\r\n return (c <= ASCII_MAX_VALUE);\r\n }",
"public static boolean isTextFile(String filePath) throws Exception {\n final int bufferSize = 1024;\n File f = new File(filePath);\n\n if (f.exists() && f.isFile()) {\n FileInputStream fis = new FileInputStream(f);\n byte[] data = new byte[bufferSize];\n int byteCount = fis.read(data, 0, bufferSize);\n fis.close();\n\n int non_text = 0;\n\n for (int i = 0; i < byteCount; i++) {\n byte a = data[i];\n\n if ((a < 8) || ((a > 13) && (a < 32)) || (a > 126)) {\n non_text++;\n }\n }\n\n // Check pourcent\n // System.out.println(non_text + \" / \" + byteCount + \" -> \" +\n // ((non_text * 100) / byteCount));\n return (((non_text * 100) / byteCount) <= 20);\n }\n\n throw new Exception(\"Error: it's not a file\");\n }",
"private static boolean isAllASCII(String input) {\n if (StringUtils.isBlank(input)) {\n return false;\n }\n boolean isASCII = true;\n for (int i = 0; i < input.length(); i++) {\n int c = input.charAt(i);\n if (c > MAX_ASCII_CODE) {\n isASCII = false;\n break;\n }\n }\n return isASCII;\n }",
"public static boolean isBinary(File file) throws IOException {\n\t\tInputStream in = null;\n\t\ttry {\n\t\t\tin = getInputStreamFromFile(file);\n\t\t\tbyte[] cc = new byte[IOUtils.DEFAULT_BUFFER]; // do a peek\n\t\t\tin.read(cc, 0, IOUtils.DEFAULT_BUFFER);\n\t\t\tfor (int i = 0; i < cc.length; i++) {\n\t\t\t\tint j = (int) cc[i];\n\t\t\t\tif (j < 32 || j > 127) {\n\t\t\t\t\tSystem.out.println((char) j);\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\t// all good\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tif (in != null)\n\t\t\t\tin.close();\n\t\t}\n\t\treturn true;\n\t}",
"private static boolean isPureAscii(String v) {\r\n System.out.println(\"AttributeCleaner.isPureAscii(\" + v + \")\");\r\n return asciiEncoder.canEncode(v);\r\n }",
"public static boolean verifyFilenameInput(String filename){\r\n \r\n if(filename.equals(Constants.EMPTY_STRING)) return false;\r\n \r\n for(char ch : filename.toCharArray()){\r\n for(char illegalChar : Constants.ILLEGAL_CHARACTERS){\r\n if(ch == illegalChar){\r\n return false;\r\n }\r\n }\r\n }\r\n return true; \r\n }",
"public static boolean isValidFileCharacter(char c) {\n return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z')\n || (c >= 'a' && c <= 'z') || c == ' '\n || c == '-' || c == '.';\n }",
"public static boolean isIntelHexFormat(File fp)\n {\n BufferedReader in;\n String stringline;\n byte[] byteline;\n\n try\n {\n in = new BufferedReader(new FileReader(fp));\n }\n catch (FileNotFoundException e)\n {\n return false;\n }\n\n for (;;)\n {\n try\n {\n stringline = in.readLine();\n }\n catch (IOException e)\n {\n return false;\n }\n\n // EOF reached\n if ( stringline == null )\n return false;\n // start code exists?\n if ( stringline.length() == 0 || stringline.charAt(0) != ':' )\n continue;\n // convert hex-string w/o start code to byte array\n byteline = new BigInteger(stringline.substring(1),16\n ).toByteArray();\n\n try\n {\n // checksum is correct?\n checkSum(byteline);\n }\n catch (Exception e)\n {\n return false;\n }\n\n if ( stringline.substring(7,9).equals(\"01\") )\n break;\n\n }\n\n return true;\n }",
"@Test\n\tpublic void testUTF16BE() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF16BE_FILE), \"UTF-16be\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\t}",
"private boolean isNonCharacter(int c) {\n return (c & 0xFFFE) == 0xFFFE;\n }",
"@Test\n public void testWrongCharset_Utf8AsAscii() throws SQLException {\n checkBulkLoadWithWrongCharset(BULKLOAD_UTF8_CSV_FILE, \"UTF-8\", \"ascii\");\n }",
"public void testConvert_ascii_errors() throws Exception {\n assertInputConversion_viaCharsetDecoder(\"ASCII\", true);\r\n assertOutputConversion_viaCharsetName(\"ASCII\", true);\r\n // uh, the charset encoding cannot be configured properly\r\n // assertOutputConversion_viaCharsetEncoder(\"ASCII\", true);\r\n }",
"@Test\n public void printableControlCharactersAreConsideredPrintable() {\n assertTrue(StringUtil.isAsciiPrintable(new byte[]{0x07})); // bell\n assertTrue(StringUtil.isAsciiPrintable(new byte[]{'\\f'})); // form feed\n assertTrue(StringUtil.isAsciiPrintable(new byte[]{'\\n'}));\n assertTrue(StringUtil.isAsciiPrintable(new byte[]{'\\t'}));\n assertTrue(StringUtil.isAsciiPrintable(new byte[]{0x0b})); // vertical tab\n }",
"boolean hasFileByte();",
"@Test\n public void testWrongCharset_Win1251AsAscii() throws SQLException {\n checkBulkLoadWithWrongCharset(BULKLOAD_CP1251_CSV_FILE, \"windows-1251\", \"ascii\");\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Save the given template to to S3. | SourceBundle saveTempalteToS3(String stackName, String tempalte) {
try {
String bucket = configuration.getConfigurationBucket();
String key = "templates/" + stackName + "-" + UUID.randomUUID() + ".json";
byte[] bytes = tempalte.getBytes("UTF-8");
ByteArrayInputStream input = new ByteArrayInputStream(bytes);
ObjectMetadata metadata = new ObjectMetadata();
metadata.setContentLength(bytes.length);
s3Client.putObject(new PutObjectRequest(bucket, key, input, metadata));
return new SourceBundle(bucket, key);
} catch (IOException e) {
throw new RuntimeException(e);
}
} | [
"public FXProjectTemplateSaver(FXProjectTemplates template){\n this.toSave = template;\n }",
"public PSTemplate save(PSTemplate template, String siteId) throws PSDataServiceException;",
"public PSTemplate save(PSTemplate template, String siteId, String pageId) throws PSDataServiceException;",
"public void savePublicationTemplate(PublicationTemplate template) throws\n PublicationTemplateException, CryptoException {\n SilverTrace.info(\"form\", \"PublicationTemplateManager.savePublicationTemplate\",\n \"root.MSG_GEN_ENTER_METHOD\", \"template = \" + template.getFileName());\n \n String xmlFileName = template.getFileName();\n \n PublicationTemplate previousTemplate = loadPublicationTemplate(xmlFileName);\n boolean encryptionChanged =\n previousTemplate != null &&\n template.isDataEncrypted() != previousTemplate.isDataEncrypted();\n \n if (encryptionChanged) {\n if (template.isDataEncrypted()) {\n getGenericRecordSetManager().encryptData(xmlFileName);\n } else {\n getGenericRecordSetManager().decryptData(xmlFileName);\n }\n }\n \n // save template into XML file\n try {\n // Format this URL\n String xmlFilePath = makePath(templateDir, xmlFileName);\n \n Marshaller marshaller = JAXB_CONTEXT.createMarshaller();\n marshaller.setProperty(Marshaller.JAXB_ENCODING, \"UTF-8\");\n marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n marshaller.marshal(template, new File(xmlFilePath));\n \n } catch (JAXBException e) {\n throw new PublicationTemplateException(\"PublicationTemplateManager.loadPublicationTemplate\",\n \"form.EX_ERR_CASTOR_UNMARSHALL_PUBLICATION_TEMPLATE\", \"Publication Template FileName : \"\n + xmlFileName, e);\n }\n }",
"public static String putObjectToS3(String key, String text) {\n String bucketName = System.getenv(\"BUCKET_NAME\");\n PutObjectRequest putObjectRequest = PutObjectRequest.builder()\n .bucket(bucketName)\n .key(key)\n .build();\n RequestBody body = RequestBody.fromString(text);\n client.putObject(putObjectRequest, body);\n\n return String.format(\"https://%s.s3.amazonaws.com/%s\",\n bucketName, URLEncoder.encode(key, StandardCharsets.UTF_8));\n }",
"@Test\n public void testCreateS3Object() {\n String bucket_name = \"my-bucket\";\n String file_path = \"D:\\\\!Java_corse\\\\the ticket master ex\\\\dynamo-db\\\\src\\\\main\\\\resources\\\\data.json\";\n //String region = \"us-west-2\";\n String key_name = \"data.json\";\n System.out.format(\"Uploading %s to S3 bucket %s...\\n\", file_path, bucket_name);\n AmazonS3ClientBuilder builder = AmazonS3ClientBuilder.standard();\n builder.withEndpointConfiguration(\n new AwsClientBuilder.EndpointConfiguration(\"http://localhost:4566\", \"us-west-2\"))\n .setPathStyleAccessEnabled(true);\n\n builder.withPathStyleAccessEnabled(true);\n AmazonS3 s3 = builder.build();\n try {\n s3.putObject(bucket_name, key_name, new File(file_path));\n } catch (AmazonServiceException e) {\n System.err.println(e.getErrorMessage());\n System.exit(1);\n }\n\n }",
"public void onSave(View view){\n saveTemplate(filename);\n Toast.makeText(this, \"Saved\", Toast.LENGTH_LONG).show();\n }",
"public void saveToIndex(Template template) throws CustomResponseException, IOException {\n indexer.setMethod(HTTPMethods.PUT);\n indexer.performSingleRequest(template, templateType);\n }",
"public void saveTemplate( Template template )\n {\n if( null != template )\n {\n String templateLocation = TEMPLATE_LOCATION;\n\n File configFolder = new File( PathManager.getConfigPath() );\n File templateFolder = new File( configFolder, templateLocation );\n\n File tpl = new File( templateFolder, template.getName() + TEMPLATE_DEFINITION_EXTENSION );\n FileOutputStream fileOutputStream = null;\n try\n {\n fileOutputStream = new FileOutputStream( tpl );\n fileOutputStream.write( template.getText().getBytes() );\n fileOutputStream.flush();\n }\n catch( Exception e )\n {\n e.printStackTrace();\n }\n finally\n {\n if( null != fileOutputStream )\n {\n try\n {\n fileOutputStream.close();\n }\n catch( IOException e )\n {\n }\n }\n }\n }\n }",
"private Future<Void> putObjectS3(final String aPath) {\n final Promise<Void> promise = Promise.promise();\n\n try {\n myAmazonS3.putObject(s3Bucket, IMAGE_JPX, new File(aPath));\n promise.complete();\n } catch (final AmazonServiceException details) {\n LOGGER.error(details.getErrorMessage());\n promise.fail(details.getErrorMessage());\n }\n\n return promise.future();\n }",
"public void writeOut() {\n System.out.println(\"writeOut: file \" + getName() + \".\");\n\n final File file = getFile();\n if (null != file) {\n s3.putObject(new PutObjectRequest(bucketName, getName(), file));\n file.delete();\n } else {\n System.out.println(\"writeOut: Uploadable persistent object without a file.\");\n }\n objectData.reset();\n\n }",
"public void createTextFile(String bucketName, String fileName, String text) {\n try {\n final File temp = File.createTempFile(fileName, \"\");\n temp.deleteOnExit();\n final BufferedWriter bw = new BufferedWriter(new FileWriter(temp));\n bw.write(text);\n bw.close();\n s3client.putObject(b -> b.bucket(bucketName).key(fileName), RequestBody.fromFile(temp));\n } catch (IOException ex) {\n log.error(\"Error with tmp file: \" + ex);\n }\n }",
"public void saveToDatabase(Template template) throws DAOException {\n templateDAO.save(template);\n }",
"@Test\n public void writesContentToAwsObject() throws Exception {\n final AmazonS3 aws = Mockito.mock(AmazonS3.class);\n Mockito.doReturn(new PutObjectResult()).when(aws).putObject(\n Mockito.any(PutObjectRequest.class)\n );\n final Region region = Mockito.mock(Region.class);\n Mockito.doReturn(aws).when(region).aws();\n final Bucket bucket = Mockito.mock(Bucket.class);\n Mockito.doReturn(region).when(bucket).region();\n final Ocket ocket = new AwsOcket(bucket, \"test-3.txt\");\n final String content = \"text \\u20ac\\n\\t\\rtest\";\n ocket.write(\n new ByteArrayInputStream(content.getBytes(StandardCharsets.UTF_8)),\n new ObjectMetadata()\n );\n Mockito.verify(aws).putObject(Mockito.any(PutObjectRequest.class));\n }",
"private void uploadFileTos3bucket(String fileName, File file) {\n PutObjectRequest putObjectRequest = PutObjectRequest.builder()\n .bucket(this.bucketName)\n .key(fileName)\n //Allow public read from file url\n .acl(CannedAccessControlList.PUBLIC_READ.toString())\n .build();\n\n s3Client.putObject(putObjectRequest, RequestBody.fromFile(file));\n }",
"private void uploadFileTos3bucket(String fileName, File file) {\n\t\tlog.info(\"File is being prepared. Upload to S3 in-progress\");\n\t\tclient.getClient()\n\t\t\t\t.putObject(new PutObjectRequest(client.getBucketName(),\n\t\t\t\t\t\tnew StringBuilder(\"new/\").append(fileName).toString(), file)\n\t\t\t\t\t\t\t\t.withCannedAcl(CannedAccessControlList.PublicRead));\n\n\t\tlog.info(\"Successfully uploaded the file '{}' to S3 Bucket\", fileName);\n\t}",
"public void writeToFile(String bucketName, String key) throws IOException {\n\t\tString fileName = Constants.PART_OUTPUT + key;\n\t\tFile file = new File(bucketName + Constants.SUFFIX + key);\n\t\tif (file.exists()) {\n\t\t\tfile.delete();\n\t\t\tcreateFolder(bucketName, key);\n\t\t}\n\t\tFileWriter fw = new FileWriter(bucketName + Constants.SUFFIX + key);\n\t\tBufferedWriter out = new BufferedWriter(fw);\n\t\tIterator<Entry<String, String>> it = mapOfKeyValue.entrySet().iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tout.write(it.next().getKey() + Constants.SEPARATOR + it.next().getValue());\n\t\t\tout.newLine();\n\t\t}\n\t\tout.close();\n\n\t\ts3 = new AmazonS3Client(new ProfileCredentialsProvider());\n\t\ttry {\n\t\t\tSystem.out.println(\"Uploading a new object to S3 from a file\\n\");\n\t\t\ts3.putObject(new PutObjectRequest(bucketName, fileName, file));\n\t\t} catch (AmazonServiceException ase) {\n\t\t\tSystem.out.println(\"Caught an AmazonServiceException, which \" + \"means your request made it \"\n\t\t\t\t\t+ \"to Amazon S3, but was rejected with an error response\" + \" for some reason.\");\n\t\t}\n\t}",
"private static boolean createContactPageInS3(JSONObject contactInfo) {\n\t\tString first = \"\",\n\t\t\t\tlast = \"\";\n\t\t\n\t\ttry {\n\t\t\tString url = (String) contactInfo.get(URL_KEY);\n\t\t\tif (url == null) {\n\t\t\t\tSystem.out.println(\"Invalid input. URL must be specified to correlate across the system\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\tfirst = (String) contactInfo.get(FIRST_KEY);\n\t\t\tlast = (String) contactInfo.get(LAST_KEY);\n\t\t\tString htmlTemplateBeginning = \"<!DOCTYPE html><html><body><table>\";\n\t\t\tString htmlTemplateEnding = \"</body></html>\";\n\t\t\tString htmlHeaderRow = \"<tr>\";\n\t\t\tString htmlDetailRow = \"<tr>\";\n\t\n\t\t\t//build the document\n\t\t\t//add a table cell for the first name\n\t\t\tif (first != null && first.length() > 0) {\n\t\t\t\thtmlHeaderRow = htmlHeaderRow + \"<th>\" + FIRST_KEY + \"</th>\";\n\t\t\t\thtmlDetailRow = htmlDetailRow + \"<td>\" + first + \"</td>\";\n\t\t\t} \n\t\t\t\n\t\t\t//add a table cell for the last name if it was entered\n\t\t\tif (last != null && last.length() > 0) {\n\t\t\t\thtmlHeaderRow = htmlHeaderRow + \"<th>\" + LAST_KEY + \"</th>\";\n\t\t\t\thtmlDetailRow = htmlDetailRow + \"<td>\" + last + \"</td>\";\n\t\t\t}\n\t\t\t\n\t\t\t//terminate the rows\n\t\t\thtmlHeaderRow = htmlHeaderRow + \"</tr>\";\n\t\t\thtmlDetailRow = htmlDetailRow + \"</tr>\";\n\t\t\t\n\t\t\tString newDocument = htmlTemplateBeginning + htmlHeaderRow + htmlDetailRow + htmlTemplateEnding;\n\t\t\t\n\t\t\tString s3bucketName = \"cspp51083.samuelh.simplecontacts\";\n\t\t\t//create the new HTML file\n\t\t\tFile contactDocument = new File (url.substring(58));\n\t\t\tFileWriter fw;\n\t\t\tfw = new FileWriter(contactDocument);\n\t\t\tfw.write(newDocument);\n\t\t\tfw.close();\n\t\t\t//get the S3 client\n\t\t\ts3Client = getS3Client();\n\t\t\t\n\t\t\t//store the HTML file in S3\n\t\t\ts3Client.putObject(new PutObjectRequest(s3bucketName, url.substring(58), contactDocument).withCannedAcl(CannedAccessControlList.PublicRead));\n\t\t\t\n\t\t\t//delete the local file after storing in S3 so it is not retained\n\t\t\tcontactDocument.delete();\n\n\t\t\treturn true;\n\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\tSystem.out.println(ex.toString());\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t\tSystem.out.println(\"There was a problem creating a contact page in S3 for contact \" + first + \" \" + last);\n\t\t\treturn false;\n\t\t}\n\t}",
"protected void sync()\n throws IOException\n {\n try (InputStream stream = new BufferedInputStream(Files.newInputStream(tempFile)))\n {\n final PutObjectRequest.Builder builder = PutObjectRequest.builder();\n final long length = Files.size(tempFile);\n builder.bucket(path.getFileStore().name())\n .key(path.getKey())\n .contentLength(length)\n .contentType(new Tika().detect(stream, path.getFileName().toString()));\n\n final S3Client client = path.getFileSystem().getClient();\n client.putObject(builder.build(), RequestBody.fromInputStream(stream, length));\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set accessor for persistent attribute: id_rango | public void setId_rango(java.lang.Integer newId_rango); | [
"public java.lang.Integer getId_rango();",
"public void setId(int idNuevo)\n { \n this.id = idNuevo;\n }",
"public void setId() {\n this.id = id;\r\n }",
"public void setId(int newId) { \n id = newId; \n }",
"String getIdAttribute();",
"private void setId()\n {\n\tthis.id = ultimoID() + 1;\n }",
"public void setId(Long id) ;",
"public abstract void setId_trasoba(java.lang.Long newId_trasoba);",
"public abstract Long getId();",
"public static void providePOJOsIdGetterSetter(final FileWriterWrapper writer)\n throws IOException {\n writer.write(\" private Integer id = null;\\n\\n\");\n\n writer.write(\" public Integer getId() {\\n\");\n writer.write(\" return id;\\n\");\n writer.write(\" }\\n\\n\");\n\n writer.write(\" public void setId(Integer newId) {\\n\");\n writer.write(\" id = newId;\\n\");\n writer.write(\" }\\n\\n\");\n }",
"public void setId_richiesta(long id_richiesta);",
"public void setId(String id) {\n this.id = id + \"_\";\n }",
"public void setIdComentario(int id) {\n this.id = id;\n }",
"protected abstract String getIdRelatorio();",
"public void setId_oggetto(long id_oggetto);",
"private void setAId(int value) {\n \n aId_ = value;\n }",
"String getRecepieId();",
"@Test\r\n public void testSetId_Maestro() {\r\n System.out.println(\"setId_Maestro\");\r\n int Id_Maestro = 0;\r\n DMaestros instance = new DMaestros();\r\n instance.setId_Maestro(Id_Maestro);\r\n }",
"private void setId() {\n id = count++;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the biDirectional value for this TextStyle. | public com.cognos.developer.schemas.raas.Returns__by__Order__Method___x002d__Prompted__Chart.TextStyleBiDirectional getBiDirectional() {
return biDirectional;
} | [
"public TextStyle2D getTextStyle() {\r\n return textStyle;\r\n }",
"JavaValue getBidiDir();",
"TextDirection textDirection();",
"public void setBiDirectional(com.cognos.developer.schemas.raas.Returns__by__Order__Method___x002d__Prompted__Chart.TextStyleBiDirectional biDirectional) {\r\n this.biDirectional = biDirectional;\r\n }",
"public String getStyle() {\n return textStyle;\n }",
"public String getLabelStyle() {\n\t\treturn (String) getStateHelper().eval(PropertyKeys.labelStyle);\n\t}",
"public TextStyle getStyle(\n )\n {return style;}",
"public String getFontVariant();",
"public mxStyleSheet getTextStyle()\n\t{\n\t\treturn textStyle;\n\t}",
"public int getValue() \n {\n return fontEnum;\n }",
"public String getTextAlign() {\n return getStyle(\"text-align\");\n }",
"public String getUnicodeBidi();",
"public Float getTextHaloBlur() {\n return textHaloBlur;\n }",
"public TextDirection getDir() {\n return dir;\n }",
"public String getFontWeight();",
"public FontProperties getLabelFont(){\n return this.attr.getLabelFont();\n }",
"public FontStyle getFontStyle();",
"FontWeight weight() {\r\n return this.weight;\r\n }",
"public String getTextHaloColor() {\n return textHaloColor;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the attachment type. | public AttachmentType getAttachmentType() {
return attachmentType;
} | [
"public String getAttachmentType() {\n return attachmentType;\n }",
"public @Nullable String getAttachmentType() {\n return attachmentType;\n }",
"@Schema(description = \"Attachment type such as video, picture\")\r\n\r\n\tpublic String getAttachmentType() {\r\n\t\treturn attachmentType;\r\n\t}",
"public String getMimeType ()\n {\n final String METHOD_NAME = \"getMimeType\";\n this.logDebug(METHOD_NAME + \"1/2: Started\");\n\n String mimeType = null;\n try\n {\n\tint contentType = this.document.getContentType();\n\tif ( contentType >= 0 ) mimeType = MediaType.nameFor[contentType];\n }\n catch (Exception exception)\n {\n\tthis.logWarn(METHOD_NAME + \"Failed to retrieve mime type\", exception);\n }\n\n this.logDebug(METHOD_NAME + \" 2/2: Done. mimeType = \" + mimeType);\n return mimeType;\n }",
"@Schema(description = \"Attachment mime type such as extension file for video, picture and document\")\r\n\r\n\tpublic String getMimeType() {\r\n\t\treturn mimeType;\r\n\t}",
"public String getMime_type()\r\n {\r\n return getSemanticObject().getProperty(data_mime_type);\r\n }",
"public String getContentType() {\n return this.fileItem.getContentType();\n }",
"public String getContentType() {\r\n return mFile.getContentType();\r\n }",
"public String getType()\n\t\t{\n\t\t\tElement typeElement = XMLUtils.findChild(mediaElement, TYPE_ELEMENT_NAME);\n\t\t\treturn typeElement == null ? null : typeElement.getTextContent();\n\t\t}",
"public Type getType() {\n \n if (m_file != null) {\n final String name = m_file.getName();\n final int lastDot = name.lastIndexOf('.');\n \n if (lastDot >= 0) {\n final String extension = name.substring(lastDot + 1);\n final TypeImplementation type =\n (TypeImplementation)s_extensionMap.get(extension);\n \n if (type != null) {\n return type;\n }\n }\n }\n \n return UNKNOWN_BUFFER;\n }",
"FileType getType();",
"public String getMimeType() {\n return this._constructionElement.getAttributeNS(null, Constants._ATT_MIMETYPE);\n }",
"String getMime_type();",
"String getMimeType();",
"public String getMIMETypeString() {\r\n Set types = this.getDdfNodeMIMETypes();\r\n if (!types.isEmpty()) {\r\n DDFNodeMIMEType type = (DDFNodeMIMEType) types.iterator().next();\r\n return type.getID().getMimeType();\r\n }\r\n return null;\r\n }",
"public String getMimeType();",
"public String getType() {\n\t\tif(isDirectory())\n\t\t\treturn \"File Folder\";\n\t\t\n\t\telse if(extractExtension().compareTo(\"\") == 0)\n\t\t\treturn \"File\";\n\t\t\n\t\telse {\n\t\t\ttry {\n\t\t\t\t@SuppressWarnings(\"static-access\")\n\t\t\t\tFile file = File.createTempFile(this.FILE_NAME, \".\"+extractExtension());\n\t\t\t\t\n\t\t\t\tString type = FileSystemView.getFileSystemView().getSystemTypeDescription(file);\n\t\t\t\t\n\t\t\t\tfile.delete();\n\t\t\t\n\t\t\t\treturn type;\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn \"File\";\n\t\t\t}\n\t\t}\n\t}",
"public String getMimeType() {\n return getLinkValue().getMimeType();\n }",
"public MimeType mimetype() {\r\n return getContent().mimetype();\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets array of all "organisationUnitLevel" element | void setOrganisationUnitLevelArray(org.dhis2.ns.schema.dxf2.OrganisationUnitLevelDocument.OrganisationUnitLevel[] organisationUnitLevelArray); | [
"void setOrganisationUnitLevelArray(int i, org.dhis2.ns.schema.dxf2.OrganisationUnitLevelDocument.OrganisationUnitLevel organisationUnitLevel);",
"void setOrganisationUnitLevels(org.dhis2.ns.schema.dxf2.OrganisationUnitLevelsDocument.OrganisationUnitLevels organisationUnitLevels);",
"org.dhis2.ns.schema.dxf2.OrganisationUnitLevelDocument.OrganisationUnitLevel getOrganisationUnitLevelArray(int i);",
"org.dhis2.ns.schema.dxf2.OrganisationUnitLevelDocument.OrganisationUnitLevel[] getOrganisationUnitLevelArray();",
"org.dhis2.ns.schema.dxf2.OrganisationUnitLevelsDocument.OrganisationUnitLevels addNewOrganisationUnitLevels();",
"int sizeOfOrganisationUnitLevelArray();",
"org.dhis2.ns.schema.dxf2.OrganisationUnitLevelsDocument.OrganisationUnitLevels getOrganisationUnitLevels();",
"org.dhis2.ns.schema.dxf2.OrganisationUnitLevelDocument.OrganisationUnitLevel addNewOrganisationUnitLevel();",
"void removeOrganisationUnitLevel(int i);",
"org.dhis2.ns.schema.dxf2.OrganisationUnitLevelDocument.OrganisationUnitLevel insertNewOrganisationUnitLevel(int i);",
"public void setOrganisationUnitRelationshipArray(org.dhis2.ns.schema.dxf2.OrganisationUnitRelationshipDocument.OrganisationUnitRelationship[] organisationUnitRelationshipArray)\n {\n synchronized (monitor())\n {\n check_orphaned();\n arraySetterHelper(organisationUnitRelationshipArray, ORGANISATIONUNITRELATIONSHIP$0);\n }\n }",
"public void setOrgLevel(Integer orgLevel) {\n this.orgLevel = orgLevel;\n }",
"public void setNilArrayOfValuationAggregate1()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.msbinfo.expresslync.rct.ArrayOfValuationAggregate1 target = null;\r\n target = (com.msbinfo.expresslync.rct.ArrayOfValuationAggregate1)get_store().find_element_user(ARRAYOFVALUATIONAGGREGATE1$0, 0);\r\n if (target == null)\r\n {\r\n target = (com.msbinfo.expresslync.rct.ArrayOfValuationAggregate1)get_store().add_element_user(ARRAYOFVALUATIONAGGREGATE1$0);\r\n }\r\n target.setNil();\r\n }\r\n }",
"public final void setOrganisation(String value) {\n organisation = value;\n }",
"public void setLevelSet(double[][] ls) {\r\n\t\t_levelSet = ls;\r\n\t}",
"public boolean isOrganisationUnitGroupBased()\n {\n return organisationUnitGroups != null && organisationUnitGroups.size() > 0;\n }",
"@Test\n public void canSetOwnedOnVertecBy() {\n Long salesTeamOwnedOrgId = 709814L;\n Long nonZUKOrg = 1359817L; //actually exists\n Long subTeamOrg = 15158065L; //actually exists\n List<Long> orgids = new ArrayList<>();\n\n orgids.add(salesTeamOwnedOrgId);\n orgids.add(subTeamOrg);\n orgids.add(TESTVertecOrganisation2);\n orgids.add(nonZUKOrg);\n\n String idsAsString = \"\";\n for (int i = 0; i < orgids.size(); i++) {\n if (i < orgids.size() - 1) {\n idsAsString += orgids.get(i) + \",\";\n } else {\n idsAsString += orgids.get(i);\n }\n }\n\n String uri = baseURI + \"/organisations/\" + idsAsString;\n\n OrganisationList organisationList = getFromVertec(uri, OrganisationList.class).getBody();\n List<Organisation> orgs = organisationList.getOrganisations();\n\n System.out.println(orgs.get(0).getOwnedOnVertecBy());\n System.out.println(orgs.get(1).getOwnedOnVertecBy());\n System.out.println(orgs.get(2).getOwnedOnVertecBy());\n System.out.println(orgs.get(3).getOwnedOnVertecBy());\n assertTrue(orgs.get(0).getOwnedOnVertecBy().equals(\"Sales Team\"));\n assertTrue(orgs.get(1).getOwnedOnVertecBy().equals(\"Not ZUK\"));\n assertTrue(orgs.get(2).getOwnedOnVertecBy().equals(\"ZUK Sub Team\"));\n assertTrue(orgs.get(3).getOwnedOnVertecBy().equals(\"No Owner\"));\n }",
"public void setArrayOfValuationAggregate1(com.msbinfo.expresslync.rct.ArrayOfValuationAggregate1 arrayOfValuationAggregate1)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.msbinfo.expresslync.rct.ArrayOfValuationAggregate1 target = null;\r\n target = (com.msbinfo.expresslync.rct.ArrayOfValuationAggregate1)get_store().find_element_user(ARRAYOFVALUATIONAGGREGATE1$0, 0);\r\n if (target == null)\r\n {\r\n target = (com.msbinfo.expresslync.rct.ArrayOfValuationAggregate1)get_store().add_element_user(ARRAYOFVALUATIONAGGREGATE1$0);\r\n }\r\n target.set(arrayOfValuationAggregate1);\r\n }\r\n }",
"public void addUnits(Unit[] u)\r\n\t{\r\n\t\tfor(int i = 0; i < u.length; i++)\r\n\t\t{\r\n\t\t\tthis.addUnit(u[i]);\r\n\t\t}\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves the Dead Peer Detection(DPD) delay in seconds Use "second" because smaller unit does not make sense to a DPD delay. | @SuppressLint("MethodNameUnits")
@IntRange(from = IKE_DPD_DELAY_SEC_MIN, to = IKE_DPD_DELAY_SEC_MAX)
public int getDpdDelaySeconds() {
return mDpdDelaySec;
} | [
"public String getdDelay() {\n return dDelay;\n }",
"public int getDelayTime()\n\t{\n\t\treturn delayTime;\n\t}",
"public int getDelay() \r\n\t{\r\n\t\treturn delay;\r\n\t}",
"public float getDelay() {\n\t\treturn delay;\n\t}",
"public Stopwatch getDelay() {\n\t\treturn delay;\n\t}",
"public int getDelay() {\n \t\treturn delay;\n \t}",
"public long getDelay(TimeUnit timeUnit) {\n return future.getDelay(timeUnit);\n }",
"public int getDelayMillis()\r\n\t{\r\n\t\treturn m_fraction.getDelayMillis();\r\n\t}",
"Duration getDelay();",
"public int getDelay() {\n return delay;\n }",
"public long getMessageDelay() {\r\n \t\treturn messageDelay;\r\n \t}",
"Duration getLiveDelay();",
"Integer dpdTimeoutSeconds();",
"public String getDelay();",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.PaymentDelay getPaymentDelay();",
"public int getDepartureDelay(Job next) {\n int[] nextDurations = next._durations;\n final int length = nextDurations.length;\n int delay = _durations[0]; //need to wait at start\n\n int prevLeaveTime = 0;\n int nextComeTime = 0;\n final int end = length - 1;\n for (int i = 0; i < end; i++) {\n prevLeaveTime += _durations[i + 1];\n nextComeTime += nextDurations[i];\n\n if (nextComeTime < prevLeaveTime) {\n int diff = prevLeaveTime - nextComeTime;\n delay += diff;\n nextComeTime += diff;\n }\n }\n\n return delay;\n }",
"long getDelay();",
"public double getDelayBetweenPoints() {\n delayBetweenPoints = delayBetweenPointsPrefAdapter.getDouble();\n return delayBetweenPoints;\n }",
"public int getDroneDelay()\r\n {\r\n return droneDelay;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find xpath elements with 'textarea', 'input' | public WebElement getXpathElements(String XPlocator, String XPtype) {
XPtype = XPtype.toLowerCase();
if (XPtype.equals("textarea")) {
System.out.println("Element found with textarea: " + XPlocator);
return this.driver.findElement(By.xpath(XPlocator));
}
else if (XPtype.equals("input")) {
System.out.println("Element found with input: " + XPlocator);
return this.driver.findElement(By.xpath(XPlocator));
}
// add more locator types here
else
System.out.println("Locator type not supported");
return null;
} | [
"public SelenideElement searchByUser() {\n return formPageRoot().$(By.xpath(\"//input[@type='text']\"));\n }",
"public void enterTextInToInput(String xpath, String text) {\r\n WebElement input = webDriver.findElement(By.xpath(xpath));\r\n try {\r\n input.clear();\r\n input.sendKeys(text);\r\n logger.info(text + \" was inputed to input \");\r\n } catch (Exception e) {\r\n logger.error(\"Cannot work with input\");\r\n Assert.fail(\"Cannot work with input\");\r\n }\r\n\r\n\r\n }",
"@Test\n public void findElements() throws IOException\n {\n granny.setGenericPageChecks();\n Scope page = granny.openUrl(URL);\n\n assertThat(page.findHeader(\"Example.*\").getText()).isEqualTo(\"Example page\");\n\n page.findElement(\"Enter some text .*\", With.tagName(\"INPUT\")).doType(\"hello!\");\n assertThat(page.findElement(\"FINDME.*\").getText()).isEqualTo(\"FINDME#1\");\n assertThat(page.in(\"A special container.*\").findElement(\"FINDME.*\").getText()).isEqualTo(\"FINDME#3\");\n\n // should revert search preference to last matching:\n // assertThat(page.before(\"A special container\").findElement(\"FINDME.*\").getText()).isEqualTo(\"FINDME#2\");\n }",
"List<Node> selectNodes(String xpath) throws XPathException;",
"@Test\n public void findElementByXpath4(){\n driver.navigate().to(\"https://the-internet.herokuapp.com/login\");\n WebElement input = driver.findElement(By.xpath(\"//div[@class='large-6 small-12 columns']//input[@id='username']\"));\n Assertions.assertTrue(input.isDisplayed() , \"Element with this name NOT FOUND\");\n }",
"private WebElement getLocator_course_or_thesis_input(){\n\n\t\treturn this.getBy(By.xpath(\"//*[@id=\\\"ANSWER_TTQ_MENSYS_8__chosen\\\"]/ul/li/input\"));\n\t}",
"public List<WebElement> locateElements(String type, String value);",
"String getXPath();",
"private WebElement getLocator_program_input(){\n\n\t\treturn this.getBy(By.xpath(\"//*[@id=\\\"ANSWER_TTQ_MENSYS_7__chosen\\\"]/ul/li/input\"));\n\t}",
"static WebElementSelector selectByXPath(String xpath)\n {\n return selectBy(String.format(\"{%s}\", xpath), By.xpath(xpath));\n }",
"public abstract List<Node> findNodes(Document root, String xpath);",
"void setXpath(java.lang.String xpath);",
"protected List<WebElement> findChildren(String xpath) {\n return getElement().findElements(By.xpath(xpath));\n }",
"protected void deriveMatchingElementXPath()\n\t{\n\t\tString pcXPath = getParentContainerXPath();\n\t\tString base = pcXPath.substring(0, pcXPath.indexOf(\"[\"));\n\t\t\n\t\tStringBuffer sb = new StringBuffer();\n\t\tsb.append(base);\n\t\tsb.append(\"[\");\n\t\t\n\t\tif (getAttributeMatchExpression().equals(TaskExprType.STARTS_WITH))\n\t\t{\n\t\t\tsb.append(\"starts-with(\");\n\t\t}\n\t\telse if (getAttributeMatchExpression().equals(TaskExprType.CONTAINS))\n\t\t{\n\t\t\tsb.append(\"contains(\");\n\t\t}\n\n\t\tsb.append(getMatchingAttributeName());\n\t\tsb.append(\",'\");\n\t\tsb.append(getMatchingAttributeValue());\n\t\tsb.append(\"')]\");\n\t\t\n\t\t/*\n\t\t * Should look like this:\n\t\t * setMatchingElementXPath(\"//body/div/div[starts-with(@class,'Heading1')]\");\n\t\t */\n\t\tsetMatchingElementXPath(sb.toString());\n\t}",
"public void verifyTextContainsByXpath(String xpath, String text) {\r\n\t\ttry {\r\n\t\t\tString rwdriver = driver.findElementByXPath(xpath).getText();\r\n\t\t\tif (rwdriver.contains(text)) {\r\n\t\t\t\tSystem.out.println(\"verifyTextContainsByXpath - Your text \" + text + \" Is Available\");\r\n\t\t\t} else\r\n\t\t\t\tSystem.out.println(\"verifyTextContainsByXpath - Your text \" + text + \" Is Not Available\");\r\n\t\t} catch (NoSuchElementException e) {\r\n\t\t\tSystem.err.println(\"verifyTextContainsByXpath Method- No Such Element Exception\");\r\n\t\t} catch (NotFoundException e) {\r\n\t\t\tSystem.err.println(\"verifyTextContainsByXpath Method- Not found Exception\");\r\n\t\t} catch (WebDriverException e) {\r\n\t\t\tSystem.err.println(\"verifyTextContainsByXpath Method- WebDriver Exception\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.err.println(\"verifyTextContainsByXpath Method- Exception Unknown..Check Below Stacktrace\");\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttakeSnap();\r\n\t\t}\r\n\t}",
"Node selectNode(String xpath) throws XPathException;",
"public String getText()\n { \n return this.getBrowser().getText(\"//input[@id='\" + this.getLocator() + \"']/..\"); \n }",
"IWebDriverWrapper inputSmartly(String value, Locator... locators);",
"List<String> findRowAndCopyValues(String xpath);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test creating record with wrong distance | @Test(expectedExceptions = DataAccessException.class)
public void testCreateWrongDistance() {
ActivityRecord record = new ActivityRecord();
record.setActivity(sportActivity);
record.setDistance(-5);
record.setTime(Long.MIN_VALUE);
record.setUser(user);
recordDao.create(record);
} | [
"@Test(expectedExceptions = DataAccessException.class)\r\n public void testUpdateWrongDistance() {\r\n ActivityRecord record = setActivityRecord();\r\n recordDao.create(record);\r\n assertNotNull(recordDao.findActivityRecord(record.getId()));\r\n\r\n record.setDistance(-5);\r\n recordDao.update(record);\r\n }",
"@Test\r\n public void testCreateWithNullDistance() {\r\n ActivityRecord record = setActivityRecord();\r\n record.setDistance(null);\r\n recordDao.create(record);\r\n assertNotNull(record.getId());\r\n }",
"Distance createDistance();",
"public void testCreateTripWithWrongAttributes() {\n // fail with null\n try {\n tripDAOImpl.createTrip(null);\n fail();\n } catch (IllegalArgumentException ex) {\n // OK\n }\n \n // fail with set ID\n Trip trip = prepareTrip();\n trip.setId(Long.MIN_VALUE);\n try {\n tripDAOImpl.createTrip(trip);\n fail();\n } catch (IllegalArgumentException ex) {\n // OK\n }\n \n // fail with null dateFrom\n trip = prepareTrip();\n trip.setDateFrom(null);\n try {\n tripDAOImpl.createTrip(trip);\n fail();\n } catch (IllegalArgumentException ex) {\n // OK\n }\n \n // fail with null dateTo\n trip = prepareTrip();\n trip.setDateTo(null);\n try {\n tripDAOImpl.createTrip(trip);\n fail();\n } catch (IllegalArgumentException ex) {\n // OK\n }\n \n // fail with null destination\n trip = prepareTrip();\n trip.setDestination(null);\n try {\n tripDAOImpl.createTrip(trip);\n fail();\n } catch (IllegalArgumentException ex) {\n // OK\n }\n }",
"@Test\n\tpublic void testDistance() {\n\t\tCoordinate newBasic = new Coordinate(4,4);\n\t\tassertTrue(\"Correct distance\", newBasic.distance(basic2) == 5);\n\t}",
"@Test\n public void validateDistanceQueryExists() throws Exception {\n logger.info(\"GeoIT.validateDistanceQueryExists\");\n //Get the EntityManager instance\n EntityManager em = app.getEntityManager();\n assertNotNull(em);\n\n //1. Create an entity with location\n Map<String, Object> properties = new LinkedHashMap<String, Object>() {{\n put(\"username\", \"edanuff\");\n put(\"email\", \"ed@anuff.com\");\n put(\"location\", new LinkedHashMap<String, Object>() {{\n put(\"latitude\", 37.776753);\n put(\"longitude\", -122.407846);\n }});\n }};\n Entity user = em.create(\"user\", properties);\n assertNotNull(user);\n app.waitForQueueDrainAndRefreshIndex();\n\n final double lat = 37.776753;\n final double lon = -122.407846;\n\n //2. Query from a point near the entity's location\n Query query = Query.fromQL(\"select * where location within 100 of \"\n + lat + \",\" + lon);\n Results listResults = em.searchCollection(em.getApplicationRef(), \"users\", query);\n assertEquals(1, listResults.size());\n Entity entity = listResults.getEntity();\n assertTrue(entity.getMetadata(\"distance\")!=null);\n assertTrue(Double.parseDouble( entity.getMetadata(\"distance\").toString())>0);\n\n em.delete(user);\n }",
"@Test\n public void testGPSpingInvalid() {\n assertEquals(0.0, err1.getLat(), PRECISION);\n assertEquals(0.0, err1.getLon(), PRECISION);\n assertEquals(0.0, err2.getLon(), PRECISION);\n assertEquals(0,err1.getTime());\n assertEquals(0,err2.getTime());\n }",
"@Test\r\n\tpublic void distanceTest() {\r\n\t\tPosition startPosition = new Position(0, 0);\r\n\t\tPosition EndPosition = new Position(4, 4);\r\n\t\tgrid.calculateDistance(startPosition, EndPosition);\r\n\t\tint actualDistance = (int) grid.getDistance();\r\n\r\n\t\tdouble expdouble = Math.round((Math.sqrt(32)));\r\n\t\tint expectedDistance = (int) expdouble;\r\n\r\n\t\tassertEquals(expectedDistance, actualDistance);\r\n\t}",
"@Test\n public void insert_shouldReturnMinusOneWhenInsertFails() {\n assertEquals(-1, sut.insert(new AstroPick(null, null, null, AstroPick.MediaType.IMAGE, DATE_24_10_15)));\n }",
"@Test\n public void shouldCreateAnValidRoomAndPersistIt() throws Exception {\n\n\tfinal CreateRoomCommand command = new CreateRoomCommand(\n\t\tArrays.asList(validRoomOfferValues));\n\n\tfinal UrlyBirdRoomOfferService roomOfferService = new UrlyBirdRoomOfferService(\n\t\tdao, builder, isOccupancyIn48Hours, isRoomBookable);\n\n\twhen(isOccupancyIn48Hours.isSatisfiedBy((Date) any())).thenReturn(true);\n\twhen(dao.create(Arrays.asList(validRoomOfferValues))).thenReturn(\n\t\tvalidRoomOffer);\n\n\tfinal UrlyBirdRoomOffer createdRoomOffer = roomOfferService\n\t\t.createRoomOffer(command);\n\n\tverify(dao).create(Arrays.asList(validRoomOfferValues));\n\tassertThat(createdRoomOffer, is(equalTo(validRoomOffer)));\n }",
"@Test\n public void testInsertLand() {\n System.out.println(\"insertLand\");\n int userID = 0;\n int locationID = 0;\n float populationDensity = 0.0F;\n float greenPercentage = 0.0F;\n float building = 0.0F;\n DataBaseHandler instance = new DataBaseHandler();\n boolean expResult = false;\n boolean result = instance.insertLand(userID, locationID, populationDensity, greenPercentage, building);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"public void testPlaceCreation() {\r\n String name, article, description;\r\n Boolean winCondition;\r\n name = \"Hall\";\r\n article = \"the\";\r\n description = \"You are standing in a large hall\";\r\n winCondition = false;\r\n final Place l1 = f_world.createPlace(name, article, description, winCondition, null);\r\n assertEquals(f_world, l1.getWorld());\r\n assertEquals(l1, f_world.getPlace(\"HALL\"));\r\n assertEquals(l1, f_world.getPlace(\"hAll\"));\r\n assertEquals(l1, f_world.getPlace(\"hall\"));\r\n assertNull(f_world.getPlace(\"exists\"));\r\n\r\n name = \"Room\";\r\n article = \"the\";\r\n description = \"You are standing in a room\";\r\n winCondition = false;\r\n final Place l2 = f_world.createPlace(name, article, description, winCondition, null);\r\n assertEquals(f_world, l2.getWorld());\r\n assertEquals(l2, f_world.getPlace(\"ROOM\"));\r\n assertEquals(l2, f_world.getPlace(\"room\"));\r\n assertEquals(l2, f_world.getPlace(\"room\"));\r\n\r\n assertTrue(f_world.isNameUsed(\"ROOM\"));\r\n assertTrue(f_world.isNameUsed(\"HALL\"));\r\n assertFalse(f_world.isNameUsed(\"UNKNOWN\"));\r\n\r\n final Set<Place> places = f_world.getPlaces();\r\n assertEquals(3, places.size());\r\n assertTrue(places.contains(l1));\r\n assertTrue(places.contains(l2));\r\n places.remove(l1);\r\n assertFalse(places.equals(f_world.getPlaces()));\r\n\r\n try {\r\n f_world.createPlace(\"room\", article, description, winCondition, null);\r\n fail();\r\n } catch (final IllegalStateException e) {\r\n // ignore, the creation of a duplicate location should fail\r\n }\r\n }",
"@Test\n void CorrectGuessEditDistanceDeletion() {\n Question testQuestion = new Question(Round.JEOPARDY, \"Test Category\", new GregorianCalendar(2018, 7, 7), \"test question\", \"testtesting\", 0);\n String guess = \"Testesing\";\n assertTrue(testQuestion.acceptAnswer(guess));\n }",
"@Test\n void CorrectGuessEditDistanceInsertion() {\n Question testQuestion = new Question(Round.JEOPARDY, \"Test Category\", new GregorianCalendar(2018, 7, 7), \"test question\", \"testtesting\", 0);\n String guess = \"Testzteszting\";\n assertTrue(testQuestion.acceptAnswer(guess));\n }",
"public void testGetTrip() {\n assertNull(tripDAOImpl.getTrip(Long.MIN_VALUE));\n em.getTransaction().begin();\n Trip trip = prepareTrip();\n tripDAOImpl.createTrip(trip);\n Long tripId = trip.getId();\n Trip result = tripDAOImpl.getTrip(tripId);\n em.getTransaction().commit();\n assertEquals(trip, result);\n assertTripDeepEquals(trip, result);\n }",
"public void testCreateTrip() {\n Trip trip = prepareTrip();\n em.getTransaction().begin();\n tripDAOImpl.createTrip(trip);\n Trip result = tripDAOImpl.getTrip(trip.getId());\n em.getTransaction().commit();\n assertEquals(trip, result);\n assertTripDeepEquals(trip, result);\n }",
"public void testCreateTimeEntry() throws Exception {\r\n TimeEntry timeEntry = AccuracyTestHelper.createTimeEntry(null);\r\n delegate.createTimeEntry(timeEntry, true);\r\n\r\n assertEquals(\"Failed to insert the time entry.\", timeEntry, delegate.getTimeEntry(timeEntry.getId()));\r\n }",
"@Test\n\tpublic void test03_03_updateNeededForSameLatLongUserID() {\n\t\tString errorString = \"\";\n\t\tboolean errorExists = false;\n\t\t\n\t\tLocation loc01 = new Location();\n\t\t\n\t\tboolean exceptionThrown = false;\n\t\tdouble long_in = 10.0;\n\t\tdouble lat_in = 10.0;\n\t\tint userID_in = 10;\n\t\t/* add a Timestamp variable to update to time of update, for comparison */\n\t\tTimestamp time_in = new Timestamp(0);\n\t\tlong current_date;\n\t\tDatabaseConnectionSingleton conn;\n\t\tStatement stmt = null;\n\t\tString selectEntry = \"SELECT * FROM Location WHERE UserID = \" + userID_in + \" ;\";\n\t\t\n\t\ttry {\n\t\t //initialize connection\n\t\t\tconn = DatabaseConnectionSingleton.getInstance();\n\t\t\tconn.openConnection();\n\t\t\t\n\t\t\t//USE MOCKITO INSTEAD OF CONNECTING TO ACTUAL DATABASE (INSTEAD OF PRIOR 2 LINES)\n\t\t\t\n\t\t\tloc01.saveNewLocation(long_in, lat_in, userID_in);\n\t\t\t\n\t\t\t/*set Timestamp var (time_in) to current time */\n\t\t\tcurrent_date = new Date().getTime();\n\t\t\ttime_in.setTime(current_date);\n\t\t\t\n\t\t\t//make sure entry was created\n\t\t\tstmt = conn.getConnection().createStatement();\n\t\t\tResultSet rs01 = stmt.executeQuery(selectEntry);\n\t\t\t\n\t\t\tif (!rs01.next())\n\t {\n\t \t//there is no existing entry\n\t \t//ERROR\n\t\t\t\terrorString = \"the entry was not added to the database\\n\";\n\t \terrorExists = true;\n\t }\n \t\n\t // else, there is an entry\n\t else\n\t {\n\t //set the entry's info to loc01 attributes\n\t \tloc01.setLocationID(rs01.getInt(\"LocationID\"));\n\t \tloc01.setTime(rs01.getTimestamp(\"Time\"));\n\t loc01.setLat(rs01.getDouble(\"Latitude\"));\n\t loc01.setLong(rs01.getDouble(\"Longitude\"));\n\t loc01.setUserID(rs01.getInt(\"UserID\")); \n\t }\n\t\t\t\n\t\t\tconn.closeConnection();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\texceptionThrown = true;\n\t\t\te.printStackTrace();\n\t\t\t//if (conn != null) {\n\t\t\t// conn.closeConnection();\n\t\t\t//}\n\t\t}\n\t\t\n\t\t//make sure no exception was thrown\n\t\tassertFalse(\"test03_updateNeededForSameLatLongUserID error: exception thrown\\n\", exceptionThrown);\n\t\t//make sure entry was save to the database\n\t\tassertFalse(\"test03_updateNeededForSameLatLongUserID error: \" + errorString, errorExists);\n\t\t//make sure entry's info matches input\n\t\tassertNotNull(\"test03_updateNeededForSameLatLongUserID error: LocationID is null\\n\", loc01.getLocationID());\n\t\tassertNotNull(\"test03_updateNeededForSameLatLongUserID error: LocationID is null\\n\", loc01.getTime());\n\t\tassertEquals(\"test03_updateNeededForSameLatLongUserID error: Lat result \" + loc01.getLat() +\n\t\t\t\t\" ! = \" + lat_in + \"\\n\", loc01.getLat(), lat_in, 0.0);\n\t\tassertEquals(\"test03_updateNeededForSameLatLongUserID error: Long result \" + loc01.getLong() +\n\t\t\t\t\" ! = \" + long_in + \"\\n\", loc01.getLong(), long_in, 0.0);\n\t\tassertEquals(\"test03_updateNeededForSameLatLongUserID error: UserID result \" + loc01.getUserID() +\n\t\t\t\t\" ! = \" + userID_in + \"\\n\", loc01.getUserID(), userID_in);\n\t\tassertTrue(\"test03_updateNeededForSameLatLongUserID error: Time result \" + loc01.getTime().toString() + \n\t\t\t\t\" not 15 sec difference \" + time_in.toString() + \"\\n\", (time_in.getTime() - loc01.getTime().getTime()) <= 15000);\n\t}",
"@Test\n public void longD0Test() {\n GeographicLocationDto location1 = new GeographicLocationDto();\n location1.setLatitude(\"0.01\");\n location1.setLongitude(\"0.035\");\n GeographicLocationDto location2 = new GeographicLocationDto();\n location2.setLatitude(\"0.068\");\n location2.setLongitude(\"0.035\");\n assertEquals(6.413292, pythagorasDistanceEvaluator.determineDistance(location1, location2));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.