query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
TODO Autogenerated method stub
@Override public void finishEvent() { if(!mEventStarted) return; mEventStarted = false; xmlStreamTracerService.postObsel(mURL, mTraceID, mCookie, mRoot.toString(), new AsyncCallback<String>() { public void onFailure(Throwable caught) { // Show the RPC error message to the user System.out.println("XMLStreamTracer: Failed to post the event."); } public void onSuccess(String result) { System.out.println("XMLStreamTracer: Event posted."); } }); mDocument.removeChild(mRoot); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Show the RPC error message to the user
public void onFailure(Throwable caught) { System.out.println("XMLStreamTracer: Failed to post the event."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showError(String error);", "void showError(String message);", "void showError(String message);", "@Override\n public void showError() {\n }", "public void showError(String errorMessage);", "void showError(String errorMessage);", "void errorResponse( String error );", "void showErrorMsg(String string);", "public void error();", "public String error();", "@Override\r\n\t\tpublic void error(ResponseError error) {\n\t\t\tTools.toastShow(error.getMessage());\r\n\t\t}", "@Override\r\n\t\tpublic void error(ResponseError error) {\n\t\t\tTools.toastShow(error.getMessage());\r\n\t\t}", "void showResultMoError(String e);", "@Override\n\tpublic void showError(String message) {\n\t\t\n\t}", "public void error(String message);", "java.lang.String getError();", "java.lang.String getError();", "java.lang.String getError();", "public abstract void showErrorBox(Throwable error);", "@Override\r\n\t\t\t\t\tpublic void error(ResponseError error) {\n\t\t\t\t\t\tTools.toastShow(error.getMessage());\r\n\t\t\t\t\t}", "@Override\r\n\tpublic final void showCommandError(String command, String message) {\n\t}", "void showSyncFailMessage();", "public void sendError()\n {\n \tString resultText = Integer.toString(stdID);\n \tresultText += \": \";\n\t\tfor(int i = 0; i<registeredCourses.size();i++)\n\t\t{\n\t\t\tresultText += registeredCourses.get(i);\n\t\t\tresultText += \" \";\n\t\t}\n\t\tresultText += \"--\";\n\t\tresultText += \" \";\n\t\tresultText += Integer.toString(semesterNum);\n\t\tresultText += \" \";\n\t\tresultText += Integer.toString(0); \n\t\tresultText += \" \";\n\t\tprintResults.writeResult(resultText);\n \tSystem.exit(1);\n }", "String errorMessage();", "void errorBox(String title, String message);", "@Override\r\n\tpublic void showErrReq() {\n\t\tdialog.cancel();\r\n\t\tshowNetView(true);\r\n\t}", "@Override\r\n\tpublic void displayError(EntityPropertyCode code, String message) {\n\t}", "public void show(Object errorMessage){\n\t\tSystem.out.println(\"Woops, something bad happened\");\n\t\tSystem.out.println(errorMessage);\n\t}", "void err( Object msg );", "public void Error(String error) throws RemoteException;", "@Override\n\tpublic void onRequestError(String reqID, Exception error) {\n\t\temptyView.showException((ZcdhException)error, this);\n\t}", "void printError(String errorMsg, boolean displayHelp);", "void displayErrorMessage(String message);", "private void showConnectionError() {\n String couldNotConnect = Localization.lang(\"Could not connect to the update server.\");\n String tryLater = Localization.lang(\"Please try again later and/or check your network connection.\");\n if (manualExecution) {\n JOptionPane.showMessageDialog(this.mainFrame, couldNotConnect + \"\\n\" + tryLater,\n couldNotConnect, JOptionPane.ERROR_MESSAGE);\n }\n this.mainFrame.output(couldNotConnect + \" \" + tryLater);\n }", "private void showErrorMessage(String msgRes)\r\n {\r\n applicationContext.getGUISynchronizer().asyncInvoke(\r\n createErrorRunnable(msgRes));\r\n }", "java.lang.String getErr();", "@Override\n\tprotected String showErrorMessage() {\n\t\treturn \"There has been an error. Payment cannot process at this time. Please check with your credit card compay.\";\n\t}", "public void showNetErrorMessage() {\n showMessage(R.string.ic_net_error_tipinfo);\n }", "protodef.b_error.info getError();", "protodef.b_error.info getError();", "private void showErrorDialog(int errorCode) {\n\t\t\n }", "void error (String msg) throws RootException;", "@Override\n\tpublic void getError() {\n System.err.println(\"8877挂掉了\");\n\t}", "protected abstract void error(String err);", "protected abstract void showConnectError();", "@Override\n\tpublic void error(Object message) {\n\n\t}", "private void displayErrorToast()\n {\n Toast.makeText(\n getApplicationContext(),\n \"Connection to the server failed, please try again!\",\n Toast.LENGTH_LONG ).show();\n }", "public static void showErrorPanel(String title, String msg) {\n final DialogBox dialogBox = new DialogBox();\r\n dialogBox.setText(\"Remote Procedure Call\");\r\n dialogBox.setAnimationEnabled(true);\r\n final Button closeButton = new Button(\"Close\");\r\n // We can set the id of a widget by accessing its Element\r\n closeButton.getElement().setId(\"closeButton\");\r\n final HTML serverResponseLabel = new HTML();\r\n VerticalPanel dialogVPanel = new VerticalPanel();\r\n dialogVPanel.addStyleName(\"dialogVPanel\");\r\n dialogVPanel.add(new HTML(\"<br><b>Server replies:</b>\"));\r\n dialogVPanel.add(serverResponseLabel);\r\n dialogVPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);\r\n dialogVPanel.add(closeButton);\r\n dialogBox.setWidget(dialogVPanel);\r\n\r\n // Add a handler to close the DialogBox\r\n closeButton.addClickHandler(new ClickHandler() {\r\n\r\n @Override\r\n public void onClick(ClickEvent event) {\r\n dialogBox.hide();\r\n }\r\n });\r\n\r\n // Show the error message to the user\r\n dialogBox.setText(title);\r\n serverResponseLabel.addStyleName(\"serverResponseLabelError\");\r\n serverResponseLabel.setHTML(msg);\r\n dialogBox.center();\r\n closeButton.setFocus(true);\r\n }", "java.lang.String getErrmsg();", "abstract void error(String error);", "private void err(Messenger replyTo, int encoderId, Bundle info) {\n\n // obtain new message\n Message message = obtainMessage(Geotracer.MESSAGE_TYPE_ERROR, encoderId, 0);\n message.setData(info);\n\n // send response\n send(replyTo, message);\n }", "private void showReplCommError(Throwable e) {\n FeedbackReporter.showErrorMessage(REPL_COMM_ERROR_MSG\n + \"<p>Detailed error: \" + e.getMessage() + \"</p>\",\n \"Trouble connecting to device\");\n if (DEBUG) {\n System.out.println (\"Communication with REPL failed: \" + e);\n }\n }", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "public static void exposeError(String errorMessage) {\r\n CmdUx.printHBars(errorMessage);\r\n }", "void drawError(String message);", "public String getMessage() {\n return super.getMessage()+\"\\n error code=\"+error_code+\" error value=\"+error_value; //$NON-NLS-1$ //$NON-NLS-2$\n }", "public void error(String message) {\n ui.say(\"ERROR: \" + message);\n }", "String getErrorMessage();", "String getErrorMessage();", "public void displayError(String e){\n\t\tJOptionPane.showMessageDialog(null, e, \"Error\", JOptionPane.ERROR_MESSAGE);\n\t}", "@Override\n\tpublic void error(Message msg) {\n\n\t}", "@Override\n\tpublic void error(String message, Object p0, Object p1, Object p2, Object p3) {\n\n\t}", "@Override\n public void errorLogin(String msg) {\n JOptionPane.showMessageDialog(this, msg);\n }", "@Override\n\tpublic void error(String message, Object p0, Object p1, Object p2, Object p3, Object p4,\n\t\t\tObject p5, Object p6, Object p7, Object p8, Object p9) {\n\n\t}", "public String formInternalError() \r\n {\r\n return formError(\"500 Internal server error\",\"Server broke\");\r\n }", "public abstract void showErrorBox(String errorMessage, Runnable callback);", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "public void onFailure(Throwable caught) {\n\t\t\t\trpcResult = \"Remote Procedure Call - Failure\\n\" \n\t\t\t\t\t\t\t+ \"Error al obtener lista de items.\";\n\t\t\t\tmessagesLabel.setStyleName(\"messageErrorLabel\");\n\t\t\t\tmessagesLabel.setText(rpcResult);\n\t\t\t\tWindow.alert(rpcResult);\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\tallPanel.unmask();\t\t\t\t\t\t\r\n\t\t\t\t\t\tabv30Panel.unmask();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tInfo.display(\"Error\", \"RPC Error\");\r\n\t\t\t\t\t}", "@Override\n\tpublic void error(Marker marker, Message msg) {\n\n\t}", "public void errorFromKernel (String error) {\n clientCommunicationManager.sendErrorToAll(\"NETWORK\", \"[ERROR JUPYTER] \" + error);\n }", "private String getGUIErrorMsg(long errorcode) {\n\t\tif (errorcode == 0) {\n\t\t\treturn \"This popup shouldn't have launched!\";\n\t\t} else if (errorcode == 9) {\n\t\t\treturn \"Latitude input format incorrect!\\nValid Latitude values are -90 to 90 with negative values being south Latitude.\";\n\t\t} else if (errorcode == 10) {\n\t\t\treturn \"Longitude input format incorrect!\\nValid Longitude values are -180 to 180 with negative values being west latitude.\";\n\t\t} else if (errorcode == 11) {\n\t\t\treturn \"Date input format incorrect!\\nValid dates go <year>-<month>-<day>\\nValid month values are 1- 12 and valid day values are 1 - 31.\";\n\t\t} else if (errorcode == 12) {\n\t\t\treturn \"Time input format incorrect!\\nValid times go <hour>-<minute>-<second>\\nValid hour values are 0 - 23 and valid minute and second values are 0 - 59\";\n\t\t} else if (errorcode == 1) {\n\t\t\treturn \"Invalid latitude!\\nValid Latitude values are -90 to 90 with negative values being south Latitude.\";\n\t\t} else if (errorcode == 2) {\n\t\t\treturn \"Invalid Longitude!\\nValid Longitude values are -180 to 180 with negative values being west latitude.\";\n\t\t} else if (errorcode == 3) {\n\t\t\treturn \"Invalid Year!\\nValid year values are \" + Integer.MIN_VALUE + \" - \" + Integer.MAX_VALUE + \".\";\n\t\t} else if (errorcode == 4) {\n\t\t\treturn \"Invalid Month!\\nValid month values are 1 - 12\";\n\t\t} else if (errorcode == 5) {\n\t\t\treturn \"Invalid Day!\\nValid day values are 1 - 31\";\n\t\t} else if (errorcode == 6) {\n\t\t\treturn \"Invalid Hour!\\nValid hour values are 0 - 23\";\n\t\t} else if (errorcode == 7) {\n\t\t\treturn \"Invalid Minute!\\nValid minute values are 0 - 59\";\n\t\t} else if (errorcode == 8) {\n\t\t\treturn \"Invalid Second!\\nValid second values are 0 - 59\";\n\t\t} \n\t\treturn \"Undefined Error Message!\";\n\t}", "@Override\n\tpublic String getMessage()\n\t{\n\t\treturn errMessage;\n\t}", "public void ErrorMessage(String error) {\n \tJOptionPane.showMessageDialog(parent, error);\n }", "@Override\n public final String toString() {\n return ErrorMessages.invalidOperation(getMessage());\n }", "public static String operationFailed() {\n return holder.format(\"operationFailed\");\n }", "@Override\n\tpublic void error(Marker marker, String message, Object p0) {\n\n\t}", "private void showError(String message){\n\t\tsetupErrorState();\n\t\tsynapseAlert.showError(message);\n\t}", "void notSupported(String errorcode);", "public boolean getSendErrorToClient();", "@Override\n\tpublic void error(Marker marker, Object message) {\n\n\t}", "@Override\n\tpublic void error(String message, Object p0) {\n\n\t}", "@Override\n\tpublic void error(Marker marker, String message, Object... params) {\n\n\t}", "@Override\n\tpublic void error(Marker marker, String message) {\n\n\t}", "public void getMessage() {\r\n // use JOptionPane to have a pop up box informing user of the invalid token\r\n JOptionPane.showMessageDialog(null, \"Invalid Token \" + invalidToken);\r\n }", "public void onFailure(Throwable caught) {\n\t\t\t\trpcResult = \"Remote Procedure Call - Failure\\n\" \n\t\t\t\t\t\t\t+ \"Error al guardar item.\";\n\t\t\t\tmessagesLabel.setStyleName(\"messageErrorLabel\");\n\t\t\t\tmessagesLabel.setText(rpcResult);\n\t\t\t\tWindow.alert(rpcResult);\n\t\t\t}", "@Override\n\tpublic void error(String message, Object p0, Object p1, Object p2, Object p3, Object p4) {\n\n\t}" ]
[ "0.729417", "0.7190209", "0.7190209", "0.7032782", "0.702754", "0.70209455", "0.69728166", "0.69641274", "0.69545954", "0.69153816", "0.68666023", "0.68666023", "0.68092376", "0.67919785", "0.676801", "0.6760941", "0.6760941", "0.6760941", "0.6736302", "0.67330396", "0.6650877", "0.6638223", "0.6593806", "0.6578334", "0.65633065", "0.6528328", "0.65279835", "0.65159136", "0.6505639", "0.6503342", "0.6458074", "0.6457165", "0.6456335", "0.6429341", "0.64238036", "0.6415954", "0.6413929", "0.64118266", "0.64062345", "0.64062345", "0.6395962", "0.6392278", "0.639168", "0.63915765", "0.63852614", "0.6366391", "0.6360243", "0.6357829", "0.63415277", "0.6334225", "0.6327633", "0.63237345", "0.63193023", "0.63193023", "0.63193023", "0.63193023", "0.63193023", "0.63193023", "0.63193023", "0.63193023", "0.63193023", "0.63193023", "0.63193023", "0.63193023", "0.63143665", "0.6310177", "0.6297659", "0.6297607", "0.6292632", "0.6292632", "0.62864345", "0.6282722", "0.6277236", "0.6277179", "0.6275477", "0.62737644", "0.6269834", "0.6266291", "0.6266291", "0.6266291", "0.6266291", "0.62515146", "0.6250522", "0.62443244", "0.6238212", "0.62379664", "0.62323374", "0.6220744", "0.6218755", "0.6210545", "0.6188153", "0.61841446", "0.6181787", "0.61791545", "0.6168921", "0.61414325", "0.6139264", "0.61330086", "0.6132534", "0.61320096", "0.61302215" ]
0.0
-1
Add a new element to the current event
@Override public Element addEventElement(String name) { return this.addEventElementImpl(name, "", true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void pushNewEvent(Event e) {\n\t\tec.pushNewElement(e);\n\t}", "com.walgreens.rxit.ch.cda.EIVLEvent addNewEvent();", "public void addEvent(Event e) {\n\t\t\n\t}", "public void addEvent(Event e) {\n\t\t\n\t}", "public void addEvent(Event event) {\n\t\t\n\t}", "public void add(E element) {\n\t\t// your code here\n\t}", "public void newElement() {\r\n }", "void addElement(FormElement elt);", "Form addElement(Element element);", "@Test\n\tpublic void testElementAddedEvent() {\n\t\tfinal DiagramElement newElement = new DiagramElement(diagram, 1, dummyBoh,\n\t\t\t\tnew RelativeBusinessObjectReference(\"1\"));\n\t\tdiagram.modify(\"Add Element\", m -> m.addElement(newElement));\n\n\t\tassertThat(ml.elementAddedEventsReceived, is(equalTo(1)));\n\t\tassertThat(ml.modificationsCompletedEventsReceived, is(equalTo(1)));\n\t\tassertThat(ml.getTotalEventsReceived(), is(equalTo(2)));\n\t}", "private void addEvent() {\n String name = selectString(\"What is the name of this event?\");\n ReferenceFrame frame = selectFrame(\"Which frame would you like to define the event in?\");\n double time = selectDouble(\"When does the event occur (in seconds)?\");\n double x = selectDouble(\"Where does the event occur (in light-seconds)?\");\n world.addEvent(new Event(name, time, x, frame));\n System.out.println(\"Event added!\");\n }", "public void addEvPEC(Event ev);", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tadd();\n\t\t\t}", "public void add(GameEvent e);", "public void add(IEvent event){\r\n\t\tqueue.add(event);\r\n\t}", "private void addNewMember(Event x) {\r\n \r\n \r\n \r\n }", "public void addExisting(SelectableGraphElement element)\n {\n elements.add(element);\n }", "public void addElement(final FeatureElement newElement)\n\t{\n\t\tfeatureElements.add(newElement);\n\t}", "public @Override boolean add(E element) {\n \tappend(element);\n \treturn true;\n }", "public void add(GuiElementBase element)\n\t\t{ insert(children.size(), element); }", "void add(Object element);", "void append(E element);", "public void addEvent(Event e){\r\n\t\tallEvents.add(e);\r\n\t}", "public void addSelectedElement(ReportElement el, boolean fireEvent) {\r\n if (selectedElements.contains(el)) return;\r\n\r\n if (isDefaultCellMode() != (el.getCell().getType() == CrosstabCell.NODATA_CELL)) return;\r\n //label1.setText(\"ADDED\");\r\n // Faccio una corona non selected attorno al nuovo elemento...\r\n Rectangle rect = new Rectangle(el.position.x-5,el.position.y-5,el.width+10, el.height+10);\r\n selectedElements.addElement(el);\r\n\r\n this.repaint();\r\n if (fireEvent) {\r\n fireSelectionChangedEvent();\r\n }\r\n\r\n getMainFrame().setCutCopyEnabled(true);\r\n }", "void add(SpaceInstanceAddedEventListener eventListener, boolean includeExisting);", "@Override\n public void add(Widget widget) {\n add(widget, getElement());\n }", "public void add(DrawEvent currentEvent) {\n DrawShape shape = currentEvent.getShape();\n if (size() > 0) {\n if (shape.getX() < bounds.x) {\n bounds.x = shape.getX();\n bounds.width += bounds.x - shape.getX();\n }\n if (shape.getY() < bounds.y) {\n bounds.y = shape.getY();\n bounds.height += bounds.y - shape.getY();\n }\n } else {\n bounds.x = shape.getX();\n bounds.y = shape.getY();\n bounds.width = shape.getWidth();\n bounds.height = shape.getHeight();\n }\n super.addElement(currentEvent);\n }", "public void addEvent(eNode newEvent)\r\n {\r\n eNode newNode = new eNode(newEvent);\r\n if(this.head == null)\r\n this.head = newNode;\r\n else\r\n recursiveInsert(this.head, newNode);\r\n }", "public void addElement(Object obj);", "public void add(int index, E element);", "public void addElement() {\n\t\tXmlNode newNode = new XmlNode(rootNode, this);// make a new default-type field\n\t\taddElement(newNode);\n\t}", "public void addElement(ThingNode element)\n\t{\n\t\tsuper.addElement(element);\n\t\telements.add(element);\n\t}", "public void addCust(Event temp){\n eventLine.add(temp);\n }", "public void addEvent(Event newEvent)\r\n {\r\n eNode newNode = new eNode(newEvent);\r\n if(this.head == null)\r\n head = newNode;\r\n else\r\n recursiveInsert(this.head, newNode);\r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\taddNewItem();\n\t\t\t}", "@Override\n public void newActiveElement(String elementName, Point2D.Double location){\n Element newElement = getLevel().getLevelElements().get(elementName).createElementCopy(location);\n getActiveElements().put(newElement.getId(),newElement);\n addToFrontEndCommands(new CreateCommand(newElement.getId(),newElement.getImage(),newElement.getElementType(),newElement.getLocation(),newElement.getHeading(), 1, newElement.getRadius()));\n }", "public void onAdd(TimelineAddEvent e) {\n\t\tevent = new TimelineEvent(new Booking(), e.getStartDate(), e.getEndDate(), true, e.getGroup());\n\n\t\t// add the new event to the model in case if user will close or cancel the \"Add dialog\"\n\t\t// without to update details of the new event. Note: the event is already added in UI.\n\t\tmodel.add(event);\n\t}", "public abstract void add(T element);", "public abstract void add(T element);", "@Override\r\n\tpublic void insertObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "public boolean add(Object element);", "public void push (E element);", "public void handleAdd(ActionEvent actionEvent) {\n }", "public void addElemento(Elemento elemento) {\n\t\tJuegoListener.elementos.add(elemento);\n\t}", "@Override\n\tpublic void add(T e) {\n\t\t\n\t}", "public abstract void add(E e);", "public void push(T element) {\n\t\t//add the new element\n\t\telements.add(element);\n\n\t}", "void addEvent(IShape shape, IEvent event, int eventBegin, int eventEnd);", "public void add(SelectableGraphElement element)\n {\n if (!element.isSelected()) {\n element.setSelected(true);\n elements.add(element);\n }\n }", "void addButton_actionPerformed(ActionEvent e) {\n addButton();\n }", "public android.renderscript.Element.Builder add(android.renderscript.Element element, java.lang.String name) { throw new RuntimeException(\"Stub!\"); }", "public void SimAdded(AddSimEvento event);", "public void push(E element);", "public abstract void add(int index, E e);", "void add( E e );", "public void add(Object e)\n {\n if(numElements == maxElements)\n doubleCapacity();\n \n // Add element\n if(!contains(e))\n elements[numElements++] = e;\n }", "public void addElement(Expression element){\n\t\telements.add(element);\n\t}", "public void elementAdded(Object element) {\n\t\tinitTransients();\r\n\t\tfor (int i = 0; i < listeners.size(); i++ )\r\t\t\ttry {\r\n\t\t\t((VectorListener) listeners.elementAt(i)).\r\n\t\t\t\t\t\t\tupdateVector(new VectorChangeEvent\r\n\t\t\t\t\t\t\t (changeable, VectorChangeEvent.AddComponentEvent,\r\n\t\t\t\t\t\t\t\t changeableCopy.size(),null, element, changeableCopy.size() + 1));\r\t\t } catch (Exception e) {\r\t\t \t e.printStackTrace();\r\t\t }\r\n\t\tfor (int i = 0; i < transientListeners.size(); i++ )\r\t\t\ttry {\r\n\t\t\t((VectorListener) transientListeners.elementAt(i)).\r\n\t\t\t\t\t\t\tupdateVector(new VectorChangeEvent\r\n\t\t\t\t\t\t\t (changeable, VectorChangeEvent.AddComponentEvent,\r\n\t\t\t\t\t\t\t\t changeableCopy.size(),null, element, changeableCopy.size() + 1));\r\t\t\t} catch (Exception e) {\r\t\t \t e.printStackTrace();\r\t\t }\r\n\t\tchangeableCopy.addElement(element);\r\n\t\tnotifyElementAdded(element);\r\n\t\t\r\n\t}", "public static synchronized void insert(JeyEvent e) {\n queue.addLast(e);\r\n EventQueue.class.notifyAll();\r\n }", "public void addEvent(Event event) {\n events.add(event);\n }", "void addAfter(T target, T element);", "public void push(E element) {\r\n items.add(0, element);\r\n }", "public void gxlElementInserted(GXLTreeModificationEvent e) {\n\t}", "public void addEvent()\n throws StringIndexOutOfBoundsException, ArrayIndexOutOfBoundsException {\n System.out.println(LINEBAR);\n try {\n String taskDescription = userIn.split(EVENT_IDENTIFIER)[DESCRIPTION].substring(EVENT_HEADER);\n String timing = userIn.split(EVENT_IDENTIFIER)[TIMING];\n Event event = new Event(taskDescription, timing);\n tasks.add(event);\n storage.writeToFile(event);\n ui.echoUserInput(event, tasks.taskIndex);\n } catch (StringIndexOutOfBoundsException e) {\n ui.printStringIndexOOB();\n } catch (ArrayIndexOutOfBoundsException e) {\n ui.printArrayIndexOOB();\n }\n System.out.println(LINEBAR);\n }", "public synchronized void addElement(WModelObject object)\n\t{\n\t\tm_elements.addElement(object);\n\t}", "@Override\r\n\tprotected void processAddChildElementObject(ElementObjectI ceo) {\r\n\t\tif (ceo instanceof ListI) {// actions\r\n\t\t\tthis.actionsDiv.append(ceo.getElement());\r\n\t\t} else {\r\n\t\t\tsuper.processAddChildElementObject(ceo);\r\n\t\t}\r\n\t}", "@Override\n \t\tpublic void addPoi(POIObject poi) {\n \t\t\tCreateEventFragment.this.poi = poi;\n \t\t\tCreateEventFragment.this.eventObject.assignPoi(poi);\n \t\t}", "void addButton_actionPerformed(ActionEvent e) {\n doAdd();\n }", "public abstract boolean addDataTo(Element element);", "protected void onAdd( E entity, int index )\r\n\t{\r\n\t\t\r\n\t}", "void addBefore(T target, T element);", "public void append(T element);", "public void append(T element);", "public void addAfter(T existing, T element) throws ElementNotFoundException;", "public void addElement(Integer e){\n list.add(e);\n }", "public void addElement(SvgElement element) {\n Objects.requireNonNull(element);\n if (!children.contains(element)) {\n children.add(element);\n updateChildrenAttribute();\n }\n }", "public void addElement(XmlNode newNode) {\n\t\t\n\t\t// get selected Fields and add xmlElement after last seleted one\n\n\t\tXmlNode lastDataField = null;\n\t\t\n\t\tif (highlightedFields.size() > 0) {\n\t\t\tlastDataField = highlightedFields.get(highlightedFields.size()-1);\n\t\t} else {\n\t\t\t// add after last child of protocol (if there are any!)\n\t\t\tint numChildren = getRootNode().getChildren().size();\n\t\t\tif (numChildren > 0) \n\t\t\t\tlastDataField = rootNode.getChild(numChildren - 1);\n\t\t\t// otherwise, lastDataField is null, and new xmlElement will be 1st child of protocol\n\t\t}\n\t\t\n\t\t// if no xmlElement selected (none exist!), add at top (1st child of protocol)\n\t\tif (lastDataField == null) {\n\t\t\tnewNode.setParent(rootNode);\n\t\t\trootNode.addChild(newNode);\n\t\t\tnodeSelected(newNode, true);\n\t\t}\n\t\telse {\n\t\t// otherwise, add after the xmlElement.\n\t\t\tXmlNode parentNode = lastDataField.getParentNode();\n\t\t\tint indexToInsert = lastDataField.getMyIndexWithinSiblings() + 1;\n\n\t\t\tnewNode.setParent(parentNode);\n\t\t\tparentNode.addChild(indexToInsert, newNode);\n\t\t\t\n\t\t\tnodeSelected(newNode, true);\n\t\t}\n\t}", "@Override\r\n\t\t\t\t\tpublic void addItemEventOccurred(AddItemEvent event) {\n\r\n\t\t\t\t\t}", "public void push(T newEntry) {\n\t\tcheckInitialization();\n\t\tvector.addElement(newEntry);\n\t}", "ViewElementEvent createViewElementEvent();", "public void add (T element);", "public void newClubEvent() {\n \n // Capture current category selection, if any\n String selectedTags = \"\";\n TagsNode tags = (TagsNode)tagsTree.getLastSelectedPathComponent();\n if (tags != null) {\n selectedTags = tags.getTagsAsString();\n } \n \n boolean modOK = modIfChanged();\n \n if (modOK) {\n position = new ClubEventPositioned();\n position.setIndex (clubEventList.size());\n localPath = \"\";\n display();\n clubEventPanel1.getStatusTextSelector().setText (selectedTags);\n }\n }", "public void addNormal(E element) {\n\t\tsuper.add(element);\r\n\t}", "boolean offer(E newElement);", "public void add(T element);", "public void add(T element);", "@FXML\n\tpublic void add(ActionEvent event) {\n\t\tBrand brand = new Brand();\n\t\tbrand.setLabel(nameTF.getText());\n\t\t\n\n\t\t\n\t\tBrandDelegate.addBrand(brand);\n\t\tJOptionPane.showMessageDialog(null, \"Ajout effectué avec succés\");\n\t}", "public synchronized void elementsAdded(Object source,\n\t\t\tCollection<? extends ElementType> element, int newSize) {\n\n\t}", "void add(int index, Object element);", "void onNewEvent(Event event);", "private void add() {\n\n\t}", "@Override\r\n\t\t\tpublic void componentAdded(ContainerEvent arg0){}", "public org.hl7.fhir.CodeableConcept addNewEvent()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.CodeableConcept target = null;\n target = (org.hl7.fhir.CodeableConcept)get_store().add_element_user(EVENT$0);\n return target;\n }\n }", "@Override\n\tpublic void add() {\n\t\t\n\t}", "void addModelElement(EObject modelElement);", "public void addEvent(TimelineEvent event) {\n events.add(event);\n }", "public void insert(E element) {\n // TODO: YOUR CODE HERE\n if (contains(element)) {\n throw new IllegalArgumentException();\n } else {\n setElement(size() + 1, element);\n size += 1;\n bubbleUp(size());\n }\n }", "protected static void addElec(Electronics toAdd) {\n ProductGUI.Display(\"addElec function\\n\");\n if (toAdd == null) {\n ProductGUI.Display(\"Elec not added\\n\");\n } else {\n try {\n if (!(toAdd.isAvailable(toAdd.getID(), productList))) {\n ProductGUI.Display(\"Sorry. this product already exists\\n\");\n return;\n } else {\n ProductGUI.Display(\"new electronic Product\\n\");\n }\n\n myProduct = new Electronics(toAdd.getID(), toAdd.getName(), toAdd.getYear(), toAdd.getPrice(), toAdd.getMaker());\n productList.add(myProduct);\n\n //itemName = itemName.toLowerCase();\n //System.out.println(itemName);\n addToMap(toAdd.getName()); // adding the product name to the hashmap\n System.out.println(\"elec added to all\");\n ProductGUI.fieldReset();\n } catch (Exception e) {\n ProductGUI.Display(e.getMessage());\n }\n }\n }", "public AddEvent() {\n initComponents();\n }", "public void push(Object anElement);" ]
[ "0.7184809", "0.6978908", "0.67897123", "0.67897123", "0.66353726", "0.66014004", "0.6547707", "0.6544589", "0.64785075", "0.64298064", "0.63888735", "0.6377585", "0.62263376", "0.62126225", "0.6177127", "0.61612475", "0.6151638", "0.61495554", "0.6146115", "0.6142278", "0.6088622", "0.6085815", "0.6075866", "0.6005482", "0.6002589", "0.5966898", "0.59243083", "0.59225106", "0.5919264", "0.5909697", "0.5876965", "0.58745855", "0.5870366", "0.5836905", "0.58110976", "0.5810205", "0.58049303", "0.5792081", "0.5792081", "0.5778593", "0.57778275", "0.575893", "0.5749175", "0.5747451", "0.57429886", "0.57277673", "0.5725024", "0.57237136", "0.5723665", "0.5704954", "0.5704309", "0.5703495", "0.5681479", "0.56720847", "0.5669142", "0.5666044", "0.5662676", "0.56503755", "0.5646686", "0.5644135", "0.5640471", "0.5634926", "0.56289285", "0.5626637", "0.5625533", "0.5625392", "0.5614459", "0.5604497", "0.5598062", "0.5596066", "0.5590844", "0.5583611", "0.5583611", "0.55782884", "0.5569967", "0.5568529", "0.5566956", "0.55656075", "0.5559781", "0.5553551", "0.5552808", "0.55484545", "0.5547612", "0.55474746", "0.5547056", "0.5547056", "0.55468094", "0.5536986", "0.5525621", "0.552419", "0.5522982", "0.5520144", "0.55198175", "0.5514447", "0.550748", "0.55057186", "0.55057037", "0.5504361", "0.5500217", "0.5492982" ]
0.6858645
2
/ construct fieldsets using reflection
public static <F> F fieldSetFromByteStream(Supplier<F> supplier, Map<String,Field<?>> fieldByPrefixedName, InputStream is) throws IOException{ int databeanLength = VarInt.fromInputStream(is).getValue(); return fieldSetFromByteStreamKnownLength(supplier, fieldByPrefixedName, is, databeanLength); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private FieldSetMapper<Card> createCardFieldSetMapper() {\r\n\t\tBeanWrapperFieldSetMapper<Card> fieldSetMapper = new BeanWrapperFieldSetMapper<>();\r\n\t\tfieldSetMapper.setTargetType(Card.class);\r\n\t\treturn fieldSetMapper;\r\n\t}", "void setFields(Set<F> fields);", "private void prepare( ) {\n super.prepare( schema.getCount( ) );\n serializer = new FieldSerializer[ fieldCount ];\n for ( int i = 0; i < fieldCount; i++ ) {\n FieldSchema field = schema.getField( i );\n serializer[i] = serializerByType[ field.getType().ordinal() ];\n }\n }", "public void buildMetaFields() {\n for (AtreusMetaEntity metaEntity : environment.getMetaManager().getEntities()) {\n Class<?> entityType = metaEntity.getEntityType();\n\n // Build the fields\n for (Field field : entityType.getDeclaredFields()) {\n\n // Execute the meta property builder rule bindValue\n for (BaseEntityMetaComponentBuilder propertyBuilder : fieldPropertyBuilders) {\n if (!propertyBuilder.acceptsField((MetaEntityImpl) metaEntity, field)) {\n continue;\n }\n propertyBuilder.validateField((MetaEntityImpl) metaEntity, field);\n if (propertyBuilder.handleField((MetaEntityImpl) metaEntity, field)) {\n break;\n }\n }\n\n }\n }\n }", "private void findFields() {\n for(Class<?> clazz=getObject().getClass();clazz != null; clazz=clazz.getSuperclass()) {\r\n\r\n Field[] fields=clazz.getDeclaredFields();\r\n for(Field field:fields) {\r\n ManagedAttribute attr=field.getAnnotation(ManagedAttribute.class);\r\n Property prop=field.getAnnotation(Property.class);\r\n boolean expose_prop=prop != null && prop.exposeAsManagedAttribute();\r\n boolean expose=attr != null || expose_prop;\r\n\r\n if(expose) {\r\n String fieldName = Util.attributeNameToMethodName(field.getName());\r\n String descr=attr != null? attr.description() : prop.description();\r\n boolean writable=attr != null? attr.writable() : prop.writable();\r\n\r\n MBeanAttributeInfo info=new MBeanAttributeInfo(fieldName,\r\n field.getType().getCanonicalName(),\r\n descr,\r\n true,\r\n !Modifier.isFinal(field.getModifiers()) && writable,\r\n false);\r\n\r\n atts.put(fieldName, new FieldAttributeEntry(info, field));\r\n }\r\n }\r\n }\r\n }", "private void readFields() throws IOException, ClassFormatException {\n final int fields_count = dataInputStream.readUnsignedShort();\n fields = new Field[fields_count];\n for (int i = 0; i < fields_count; i++) {\n fields[i] = new Field(dataInputStream, constant_pool);\n }\n }", "private PropertySetFactory() {}", "private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDescription.put(\"type\", \"Text\");\n\n FieldWrapper name = new FieldWrapper();\n name.fieldDescription = new HashMap<String, Object>();\n name.fieldDescription.put(\"fullName\", \"Name\");\n\n FieldWrapper createdBy = new FieldWrapper();\n createdBy.fieldDescription = new HashMap<String, Object>();\n createdBy.fieldDescription.put(\"fullName\", \"CreatedBy\");\n createdBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper lastModifiedBy = new FieldWrapper();\n lastModifiedBy.fieldDescription = new HashMap<String, Object>();\n lastModifiedBy.fieldDescription.put(\"fullName\", \"LastModifiedBy\");\n lastModifiedBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper owner = new FieldWrapper();\n owner.fieldDescription = new HashMap<String, Object>();\n owner.fieldDescription.put(\"fullName\", \"Owner\");\n owner.fieldDescription.put(\"type\", \"Lookup\");\n\n fieldDescribe = new HashMap<String, FieldWrapper>();\n\n fieldDescribe.put((String) id.fieldDescription.get(\"fullName\"), id);\n fieldDescribe.put((String) name.fieldDescription.get(\"fullName\"), name);\n fieldDescribe.put((String) createdBy.fieldDescription.get(\"fullName\"), createdBy);\n fieldDescribe.put((String) lastModifiedBy.fieldDescription.get(\"fullName\"), lastModifiedBy);\n fieldDescribe.put((String) owner.fieldDescription.get(\"fullName\"), owner);\n }", "@Test\n public void test_getAndSet_ByFieldName_TypedMethods() throws Exception {\n\n FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1 descNum1_FieldSet = new FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1(\n executeInfo, null);\n\n\n\n descNum1_FieldSet.schemaInfo_Positioned = mock_schemaInfoFieldSet_descNum1;\n\n // Test the Get & Set methods: primitive types ______________________________________________________________\n\n\n FieldSet_TestUtilities.test_SetAndGet_useFieldName(executeInfo, descNum1_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1.class,\n \"setField_String\", String.class, \"setField__Special\", \"getField_String\", \"field1Str\", symbolControl,\n \"stuff\", null, null, \"hi\"); /* last 4 params: expected value, null expected value, unused expected value, default expected value */\n\n FieldSet_TestUtilities.test_SetAndGet_useFieldName(executeInfo, descNum1_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1.class,\n \"setField_short\", Short.TYPE, \"setField__Special\", \"getField_short\", \"field2Short\", symbolControl,\n (short)123, (short)-1, (short)-1, (short)-1001); /* last 4 params: expected value, getField_short expected value, unused expected value, default expected value */\n\n // Continuation Field - can not call the generic setField(fieldName) and getField(fieldName) on a cont field.\n // this should throw an exception (which is returned by the test method).\n Exception exception = FieldSet_TestUtilities.test_SetAndGet_useFieldName(executeInfo, descNum1_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1.class,\n \"setField_int\", Integer.TYPE, \"setField__Special\", \"getField_int\", \"field3ContInt\", symbolControl,\n 456, -1, -1, -1000, true); // last 5 params: expected value, null expected value, unused expected value, default expected value, returnExceptions\n\n assertTrue(exception != null);\n\n\n // Test Object Types ________________________________________________________________________________________\n FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED formRequired_FieldSet = new FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED(executeInfo, null);\n\n formRequired_FieldSet.schemaInfo_Positioned = schemaInfoFieldSet_formRequired;\n\n\n FieldSet_TestUtilities.test_SetAndGet_useFieldName(executeInfo, formRequired_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED.class,\n \"setField_Symbol\", Symbol.class, \"setField__Special\", \"getField_Symbol\", \"IsRequired\", symbolControl,\n notRequired, null, null, notRequired); // last 4 params: expected value, null expected value, unused expected value, default expected value \n\n FieldSet_TestUtilities.test_SetAndGet_useFieldName(executeInfo, formRequired_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED.class,\n \"setField_String\", String.class, \"setField__Special\", \"getField_String\", \"RequiredImagePath\", symbolControl,\n \"\\test\\required.gif\", null, null, \"/images/required.gif\"); // last 4 params: expected value, null expected value, unused expected value, default expected value \n\n\n }", "private List<JCTree> makeAttributeFields(DiagnosticPosition diagPos, List<? extends AttributeInfo> attrInfos) {\n ListBuffer<JCTree> fields = ListBuffer.lb();\n for (AttributeInfo ai : attrInfos) {\n if (ai.needsCloning()) {\n JCVariableDecl var = make.at(diagPos).VarDef(\n make.Modifiers(Flags.PUBLIC | Flags.FINAL | (ai.getFlags() & Flags.STATIC)),\n ai.getName(),\n toJava.makeTypeTree(ai.getMorphedType(), diagPos),\n typeMorpher.makeLocationAttributeVariable(ai.getVMI(), diagPos));\n fields.append(var);\n }\n }\n return fields.toList();\n }", "FieldsType createFieldsType();", "@Test\n public void test_getAndSet_ByFieldName_GenericMethods() throws Exception {\n\n FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1 descNum1_FieldSet = new FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1(\n executeInfo, null);\n\n\n\n descNum1_FieldSet.schemaInfo_Positioned = mock_schemaInfoFieldSet_descNum1;\n\n\n // Test primitive types _______________________________________\n\n FieldSet_TestUtilities.test_SetAndGet_useFieldName(executeInfo, descNum1_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1.class,\n \"setField\", Object.class, \"setField__Special\", \"getField\", \"field1Str\", symbolControl,\n \"hello\", null, null, \"hi\"); // last 4 params: expected value, null expected value, unused expected value, default expected value \n\n\n FieldSet_TestUtilities.test_SetAndGet_useFieldName(executeInfo, descNum1_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1.class,\n \"setField\", Object.class, \"setField__Special\", \"getField\", \"field2Short\", symbolControl,\n (short)10, null, null, (short)-1001); // last 4 params: expected value, null expected value, unused expected value, default expected value \n\n\n // Continuation Field - can not call the generic setField(fieldName) and getField(fieldName) on a cont field.\n // this should throw an exception (which is returned by the test method.\n Exception exception = FieldSet_TestUtilities.test_SetAndGet_useFieldName(executeInfo, descNum1_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1.class,\n \"setField\", Object.class, \"setField__Special\", \"getField\", \"field3ContInt\", symbolControl,\n 11, null, null, -1000, true); // last 5 params: expected value, null expected value, unused expected value, default expected value, returnExceptions \n \n assertTrue(exception != null);\n \n\n\n // Test Object Types ________________________________________________________________________________________\n FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED formRequired_FieldSet = new FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED(executeInfo, null);\n\n formRequired_FieldSet.schemaInfo_Positioned = schemaInfoFieldSet_formRequired;\n\n\n FieldSet_TestUtilities.test_SetAndGet_useFieldName(executeInfo, formRequired_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED.class,\n \"setField\", Object.class, \"setField__Special\", \"getField\", \"IsRequired\", symbolControl,\n notRequired, null, null, notRequired); // last 4 params: expected value, null expected value, unused expected value, default expected value \n\n FieldSet_TestUtilities.test_SetAndGet_useFieldName(executeInfo, formRequired_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED.class,\n \"setField\", Object.class, \"setField__Special\", \"getField\", \"RequiredImagePath\", symbolControl,\n \"\\test\\required.gif\", null, null, \"/images/required.gif\"); // last 4 params: expected value, null expected value, unused expected value, default expected value \n\n }", "@Test\n public void test_getAndSetFieldName_Methods() throws Exception {\n System.out.println(\"test_getAndSet_FieldName_Methods\");\n // FieldSet test values\n\n\n FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED formRequired_FieldSet = new FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED(executeInfo, null);\n\n formRequired_FieldSet.schemaInfo_Positioned = schemaInfoFieldSet_formRequired;\n\n\n\n\n // Test the Special Field-Value Get & Set methods______________________________________________________________\n\n\n\n FieldSet_TestUtilities.test_SetAndGetFieldName(executeInfo, formRequired_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED.class ,\n \"set_IsRequired\", Symbol.class, \"set_IsRequired__Special\", \"get_IsRequired\",\n notRequired, null, null, notRequired); // last 4 params: expected value, null expected value, unused expected value, default expected value \n\n\n FieldSet_TestUtilities.test_SetAndGetFieldName(executeInfo, formRequired_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED.class ,\n \"set_RequiredImagePath\", String.class, \"set_RequiredImagePath__Special\", \"get_RequiredImagePath\",\n \"\\test\\required.gif\", null, null, \"/images/required.gif\"); // last 4 params: expected value, null expected value, unused expected value, default expected value \n\n FieldSet_TestUtilities.test_SetAndGetFieldName(executeInfo, formRequired_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED.class ,\n \"set_ImageHeight\", Integer.TYPE, \"set_ImageHeight__Special\", \"get_ImageHeight\",\n 11, -1, -1, 6); // last 4 params: expected value, null expected value, unused expected value, default expected value \n\n FieldSet_TestUtilities.test_SetAndGetFieldName(executeInfo, formRequired_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED.class ,\n \"set_ImageWidth\", Integer.TYPE, \"set_ImageWidth__Special\", \"get_ImageWidth\",\n 12, -1, -1, 7); // last 4 params: expected value, null expected value, unused expected value, default expected value \n\n\n\n }", "private Constructor<?> getConstructorMatchingAnnotatedFields(Class<?> clazz, List<Class> annotatedFields) {\n Constructor<?>[] constructors = clazz.getDeclaredConstructors();\n List<Class<?>> constrFields = null;\n Constructor<?> constr = null;\n for (Constructor<?> constructor : constructors) {\n constr = getConstructorMatchingAnnotatedFieldsList(annotatedFields, constr, constructor);\n }\n return constr;\n }", "private void parse() {\n if (getFields() == null) {\n List<? extends StructField> fieldRefs =\n ((StructObjectInspector)getInspector()).getAllStructFieldRefs();\n setFields(new LazyObject[fieldRefs.size()]);\n for (int i = 0; i < getFields().length; i++) {\n String hbaseColumnFamily = hbaseColumnFamilies.get(i);\n String hbaseColumnQualifier = hbaseColumnQualifiers.get(i);\n\n ObjectInspector fieldObjectInspector = fieldRefs.get(i).getFieldObjectInspector();\n if (hbaseColumnQualifier == null && !HBaseSerDe.isSpecialColumn(hbaseColumnFamily)) {\n // a column family\n getFields()[i] = new LazyHBaseCellMap(\n (LazyMapObjectInspector) fieldObjectInspector);\n continue;\n }\n if(fieldObjectInspector instanceof LazyListObjectInspector) {\n \tgetFields()[i] = new LazyJsonArray((LazyListObjectInspector)fieldObjectInspector);\n \tcontinue;\n }\n\n getFields()[i] = LazyFactory.createLazyObject(fieldRefs.get(i).getFieldObjectInspector());\n }\n setFieldInited(new boolean[getFields().length]);\n }\n Arrays.fill(getFieldInited(), false);\n setParsed(true);\n }", "private void fillFieldsList(List<String> lines, int numberOfFields) throws Exception {\n for (int index = 1; index < numberOfFields; index++) {\n String[] fieldTypes = lines.get(index).split(\" \");\n switch (fieldTypes[0]) {\n case \"property\":\n fields.add(new PropertyField());\n break;\n case \"service\":\n fields.add(new ServiceField(Integer.parseInt(fieldTypes[1])));\n break;\n case \"lucky\":\n fields.add(new LuckyField(Integer.parseInt(fieldTypes[1])));\n break;\n default:\n throw new Exception(\"No field defined for this board \");\n }\n }\n\n }", "private void initialize()\n {\n aggregatedFields = new Fields(fieldToAggregator.keySet());\n }", "@Override\n\tprotected void initializeFields() {\n\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprivate Set<Field> getPersistenceFields(Class<?> clz) {\n\t\tSet fields = new HashSet();\n\t\tfor (Field f : clz.getDeclaredFields()) {\n\t\t\tif (f.isAnnotationPresent(Persistence.class)) {\n\t\t\t\tf.setAccessible(true);\n\t\t\t\tfields.add(f);\n\t\t\t}\n\t\t}\n\t\treturn fields;\n\t}", "private static void initializeDatafields(Class<AbstractNode> type) throws Exception {\r\n if (staticDatafieldMap == null) {\r\n staticDatafieldMap = new HashMap<Class<AbstractNode>, Set<String>>();\r\n }\r\n\r\n if (staticDatafieldMap.get(type) == null) {\r\n staticDatafieldMap.put(type, Information.getDatafieldsOfNode(type));\r\n }\r\n }", "public void setFieldsByName(List<String> fields)\n\t{\n\t\tList<Field> localFields = new ArrayList<Field>();\n\t\tIterator<String> it = fields.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tField field = new Field((String) it.next(), null);\n\t\t\tlocalFields.add(field);\n\t\t}\n\n\t\tsetFields(localFields);\n\t}", "@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER})\n SelectorBuilderInterface<SelectorT> fields(String... fields);", "@Override\r\n protected void setFieldValues (Object ... fields)\r\n {\n \r\n }", "protected void createFields()\n {\n createEffectiveLocalDtField();\n createDiscontinueLocalDtField();\n createScanTypeField();\n createContractNumberField();\n createContractTypeField();\n createProductTypeField();\n createStatusIndicatorField();\n createCivilMilitaryIndicatorField();\n createEntryUserIdField();\n createLastUpdateUserIdField();\n createLastUpdateTsField();\n }", "Fields fields();", "Map<ParameterInstance, SetType> getInstanceSetTypes();", "default <T> T setAllFields(T object) {\n Field[] fields = object.getClass().getDeclaredFields();\n\n for (Field field : fields) {\n field.setAccessible(true);\n\n if (Modifier.isStatic(field.getModifiers()) || Modifier.isTransient(field.getModifiers())) continue;\n\n try {\n set(field.getName(), field.get(object));\n } catch (IllegalAccessException e) {\n //hopefully we will be fine\n e.printStackTrace();\n }\n }\n\n return object;\n }", "public ArrayFieldMap(Collection<Field<T>> fields, int lastFieldNumber)\r\n/* 19: */ {\r\n/* 20:32 */ this.fieldsByName = new HashMap();\r\n/* 21:33 */ this.fieldsByNumber = ((Field[])new Field[lastFieldNumber + 1]);\r\n/* 22:34 */ for (Iterator localIterator = fields.iterator(); localIterator.hasNext();)\r\n/* 23: */ {\r\n/* 24:34 */ f = (Field)localIterator.next();\r\n/* 25: */ \r\n/* 26:36 */ last = (Field)this.fieldsByName.put(f.name, f);\r\n/* 27:37 */ if (last != null) {\r\n/* 28:39 */ throw new IllegalStateException(last + \" and \" + f + \" cannot have the same name.\");\r\n/* 29: */ }\r\n/* 30:42 */ if (this.fieldsByNumber[f.number] != null) {\r\n/* 31:44 */ throw new IllegalStateException(this.fieldsByNumber[f.number] + \" and \" + f + \" cannot have the same number.\");\r\n/* 32: */ }\r\n/* 33:48 */ this.fieldsByNumber[f.number] = f;\r\n/* 34: */ }\r\n/* 35:51 */ Object fieldList = new ArrayList(fields.size());\r\n/* 36:52 */ Field<T> f = this.fieldsByNumber;Field<T> last = f.length;\r\n/* 37:52 */ for (Field<T> localField1 = 0; localField1 < last; localField1++)\r\n/* 38: */ {\r\n/* 39:52 */ Field<T> field = f[localField1];\r\n/* 40:54 */ if (field != null) {\r\n/* 41:55 */ ((List)fieldList).add(field);\r\n/* 42: */ }\r\n/* 43: */ }\r\n/* 44:57 */ this.fields = Collections.unmodifiableList((List)fieldList);\r\n/* 45: */ }", "public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException, NoSuchFieldException {\n Class clazz = Test.class;\n Class clazz3 = Class.forName(\"Reflection.Test\");\n\n Test test = (Test) clazz.newInstance();\n\n // вызвать метод по имени у заданного объекта\n Method method = clazz.getMethod(\"foo\");\n System.out.println(method.toString());\n method.invoke(test);\n\n // установить поле по имени у заданного объекта\n Field field = clazz.getDeclaredField(\"num\");\n field.setAccessible(true);\n field.set(test, 100);\n System.out.println(test);\n\n // выводим название пакета\n Package pack = clazz.getPackage();\n System.out.println(\"package \" + pack.getName() + \";\");\n\n // начинаем декларацию класса с модификаторов\n int modifiers = clazz.getModifiers();\n System.out.print(getModifiers(modifiers));\n // выводим название класса\n System.out.print(\"class \" + clazz.getSimpleName() + \" \");\n\n // выводим название родительского класса\n System.out.print(\"extends \" + clazz.getSuperclass().getSimpleName() + \" \");\n\n // выводим интерфейсы, которые реализует класс\n Class[] interfaces = clazz.getInterfaces();\n for (int i = 0, size = interfaces.length; i < size; i++) {\n System.out.print(i == 0 ? \"implements \" : \", \");\n System.out.print(interfaces[i].getSimpleName());\n }\n System.out.println(\" {\");\n\n // выводим поля класса\n Field[] fields = clazz.getDeclaredFields();\n for (Field f : fields) {\n System.out.println(\"\\t\" + getModifiers(f.getModifiers()) +\n getType(f.getType()) + \" \" + f.getName() + \";\");\n }\n\n // выводим методы класса\n Method[] methods = clazz.getDeclaredMethods();\n for (Method m : methods) {\n // получаем аннотации\n Annotation[] annotations = m.getAnnotations();\n System.out.print(\"\\t\");\n for (Annotation a : annotations) {\n System.out.print(\"@\" + a.annotationType().getSimpleName() + \" \");\n }\n System.out.println();\n\n System.out.print(\"\\t\" + getModifiers(m.getModifiers()) +\n getType(m.getReturnType()) + \" \" + m.getName() + \"(\");\n System.out.print(getParameters(m.getParameterTypes()));\n System.out.println(\") { }\");\n }\n\n System.out.println(\"}\");\n }", "@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER, AdsUtility.SELECTOR_FIELD})\n SelectorBuilderInterface<SelectorT> fields(EntityField... fields);", "public void init() {\n entityPropertyBuilders.add(new DefaultEntityComponentBuilder(environment));\n entityPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n entityPropertyBuilders.add(new MakeAccessibleComponentBuilder(environment));\n entityPropertyBuilders.add(new PrimaryKeyComponentBuilder(environment));\n\n // Field meta property builders\n fieldPropertyBuilders.add(new FilterPrimaryKeyComponentBuilder(environment));\n fieldPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new MakeAccessibleComponentBuilder(environment));\n fieldPropertyBuilders.add(new TtlFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new CompositeParentComponentBuilder(environment));\n fieldPropertyBuilders.add(new CollectionFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new MapFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new SimpleFieldComponentBuilder(environment));\n }", "public static Map<String, Field> makeFieldMap(Collection fields)\n {\n Map<String, Field> fieldMap = new HashMap<String, Field>();\n Field field;\n for (Iterator itr = fields.iterator(); itr.hasNext(); )\n {\n field = (Field) itr.next();\n fieldMap.put(field.name(), field);\n }\n return fieldMap;\n }", "public void setFields(Map<String,String> fields)\n\t{\n\t\tList<Field> localFields = new ArrayList<Field>();\n\t\tIterator<Map.Entry<String,String>> it = fields.entrySet().iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tMap.Entry<String,String> pairs = it.next();\n\t\t\tlocalFields.add(new Field(pairs.getKey(), pairs.getValue()));\n\t\t}\n\n\t\tsetFields(localFields);\n\t}", "private FieldInfo() {\r\n\t}", "public static CodeBlock generateToModelForSet(Field field, GenerationPackageModel generationInfo) throws DefinitionException, InnerClassGenerationException {\n if (field.getGenericType().getTypeName().equals(CLASS_SET) || field.getGenericType().getTypeName().matches(PATTERN_FOR_GENERIC_INNER_TYPES))\n throw new DefinitionException(format(UNABLE_TO_DEFINE_GENERIC_TYPE,\n field.getGenericType().getTypeName(),\n field.getName(),\n field.getDeclaringClass().getSimpleName(),\n TO_MODEL + field.getDeclaringClass().getSimpleName()));\n if (field.getGenericType().getTypeName().contains(CLASS_STRING))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_STRING_SET, field.getName(), field.getName())).build();\n if (field.getGenericType().getTypeName().contains(CLASS_INTEGER))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_INT_SET, field.getName(), field.getName())).build();\n if (field.getGenericType().getTypeName().contains(CLASS_DOUBLE))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_DOUBLE_SET, field.getName(), field.getName())).build();\n if (field.getGenericType().getTypeName().contains(CLASS_LONG))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_LONG_SET, field.getName(), field.getName())).build();\n if (field.getGenericType().getTypeName().contains(CLASS_BYTE))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_BYTE_SET, field.getName(), field.getName())).build();\n if (field.getGenericType().getTypeName().contains(CLASS_BOOLEAN))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_BOOL_SET, field.getName(), field.getName())).build();\n if (field.getGenericType().getTypeName().contains(CLASS_FLOAT))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_FLOAT_SET, field.getName(), field.getName())).build();\n\n ClassName newClassMapper = createMapperForInnerClassIfNeeded(getClassFromField(field), generationInfo);\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_ENTITY_SET,\n field.getName(),\n field.getName(),\n newClassMapper,\n TO_MODEL + newClassMapper.simpleName().replace(MAPPER, EMPTY_STRING))).build();\n }", "private static List<FieldSpec> allVisitorBuilderFields(\n Map<FieldDefinition, TypeName> memberTypeMap, TypeVariableName visitResultType, Options options) {\n return sortedStageNameTypePairs(memberTypeMap)\n .map(field -> FieldSpec.builder(\n visitorObjectTypeName(field, visitResultType, options),\n visitorFieldName(field.memberName),\n Modifier.PRIVATE)\n .build())\n .collect(Collectors.toList());\n }", "private void addFeatureFieldGetSet(FeatureImpl fi) {\n this.fi = fi;\n featureFieldName = getFeatureFieldName(fi);\n rangeJavaDescriptor = fi.getRangeAsJavaDescriptor();\n \n addFeatureField(); // add declares for fields\n addFeatureGetSet();\n TypeImpl range = (TypeImpl) fi.getRange();\n if (range.isArray()) {\n rangeArrayElementJavaDescriptor = fi.getRangeArrayElementAsJavaDescriptor();\n addArrayFeatureGetSet();\n }\n }", "private FieldSetMapper<IdentityCard2> createIdentityCard2FieldSetMapper() {\r\n\t\tBeanWrapperFieldSetMapper<IdentityCard2> fieldSetMapper = new BeanWrapperFieldSetMapper<>();\r\n\t\tfieldSetMapper.setTargetType(IdentityCard2.class);\r\n\t\treturn fieldSetMapper;\r\n\t}", "private void buildFields() {\r\n buildField(txtPizzaName, GUIResource.getLabel(DIALOG, NAME_PIZZA), 0);\r\n buildField(txtCustomerName, GUIResource.getLabel(DIALOG, NAME_CUSTOMER), 1);\r\n buildField(txtPhone, GUIResource.getLabel(DIALOG, PHONE), 2);\r\n buildField(txtEmail, GUIResource.getLabel(DIALOG, EMAIL), 3);\r\n }", "public void setupFields()\n {\n FieldInfo field = null;\n field = new FieldInfo(this, \"ID\", Constants.DEFAULT_FIELD_LENGTH, null, null);\n field.setDataClass(Integer.class);\n field.setHidden(true);\n field = new FieldInfo(this, \"LastChanged\", Constants.DEFAULT_FIELD_LENGTH, null, null);\n field.setDataClass(Date.class);\n field.setHidden(true);\n field = new FieldInfo(this, \"Deleted\", 10, null, new Boolean(false));\n field.setDataClass(Boolean.class);\n field.setHidden(true);\n field = new FieldInfo(this, \"Description\", 25, null, null);\n field = new FieldInfo(this, \"CurrencyCode\", 3, null, null);\n field = new FieldInfo(this, \"LastRate\", 10, null, null);\n field.setDataClass(Double.class);\n field.setScale(-1);\n field = new FieldInfo(this, \"RateChangedDate\", 12, null, null);\n field.setDataClass(Date.class);\n field.setScale(Constants.DATE_ONLY);\n field = new FieldInfo(this, \"RateChangedBy\", 16, null, null);\n field.setDataClass(Integer.class);\n field = new FieldInfo(this, \"CostingRate\", 10, null, null);\n field.setDataClass(Double.class);\n field.setScale(-1);\n field = new FieldInfo(this, \"CostingChangedDate\", 12, null, null);\n field.setDataClass(Date.class);\n field.setScale(Constants.DATE_ONLY);\n field = new FieldInfo(this, \"CostingChangedBy\", 16, null, null);\n field.setDataClass(Integer.class);\n field = new FieldInfo(this, \"RoundAt\", 1, null, null);\n field.setDataClass(Short.class);\n field = new FieldInfo(this, \"IntegerDesc\", 20, null, \"Dollar\");\n field = new FieldInfo(this, \"FractionDesc\", 20, null, null);\n field = new FieldInfo(this, \"FractionAmount\", 10, null, new Integer(100));\n field.setDataClass(Integer.class);\n field = new FieldInfo(this, \"Sign\", 3, null, \"$\");\n field = new FieldInfo(this, \"LanguageID\", Constants.DEFAULT_FIELD_LENGTH, null, null);\n field.setDataClass(Integer.class);\n field = new FieldInfo(this, \"NaturalInteger\", 20, null, null);\n field = new FieldInfo(this, \"NaturalFraction\", 20, null, null);\n }", "@Test\n public void test01()\n {\n MetaClass.forClass(Class, reflectorFactory)\n }", "public static void setFields(DBFField[] fields) throws UnsupportedEncodingException {\r\n int i = 0;\r\n\r\n fields[i] = new DBFField();\r\n fields[i].setName(\"TIPREG\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(1);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"DOCFEC\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_D);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"DOCSER\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(10);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"DOCNUM\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(6);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"CODTIP\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"CODMOD\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"CODTER\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(5);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"CTACON\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(12);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"BASEBAS\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(10);\r\n// fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"IMPTBAS\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(10);\r\n// fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"PORNOR\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(6);\r\n fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"RECBAS\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(10);\r\n fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"PORREC\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(6);\r\n fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"PORTES\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(11);\r\n fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"PORFIN\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(6);\r\n fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"RFDPP\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(11);\r\n fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"DESHOR\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(11);\r\n fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"DESKM\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(11);\r\n fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"TOTFAC\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(14);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"FECVTO1\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_D);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"IMPVTO1\");\r\n //fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n // Es numerico pero para insertar valor \"XXX,YY\" \r\n //hay que meterlo como string y despues cambiarlo en dbfmanager -> Structura\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(10);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"FECVTO2\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_D);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"IMPVTO2\");\r\n // Misma razon que IMPVTO1\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(10);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"FECVTO3\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_D);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"IMPVTO3\");\r\n // Misma razon que IMPVTO1\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(10);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"FECVTO4\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_D);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"IMPVTO4\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(10);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"FECVTO5\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_D);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"IMPVTO5\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(10);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"FECVTO6\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_D);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"IMPVTO6\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(10);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"DIETENT\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(10);\r\n fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"CODFORPAG\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(3);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"TIPFORPAG\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(1);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n \r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"BASEIMPCC\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(10);\r\n// logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"CC\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(10);\r\n fields[i].setDecimalCount(0);\r\n// logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n //logger.log(Level.INFO, \"Total columnas en fichero .dbf = {0}\", i);\r\n }", "public static <T> RuntimeSchema<T> createFrom(Class<T> typeClass, \r\n Map<String,String> declaredFields)\r\n {\r\n if(typeClass.isInterface() || Modifier.isAbstract(typeClass.getModifiers()))\r\n {\r\n throw new RuntimeException(\"The root object can neither be an abstract \" +\r\n \t\t\"class nor interface: \\\"\" + typeClass.getName());\r\n }\r\n \r\n ArrayList<Field<T>> fields = new ArrayList<Field<T>>(declaredFields.size());\r\n int i = 0;\r\n for(Map.Entry<String, String> entry : declaredFields.entrySet())\r\n {\r\n java.lang.reflect.Field f;\r\n try\r\n {\r\n f = typeClass.getDeclaredField(entry.getKey());\r\n }\r\n catch (Exception e)\r\n {\r\n throw new IllegalArgumentException(\"Exception on field: \" + entry.getKey(), e);\r\n }\r\n \r\n int mod = f.getModifiers();\r\n if(!Modifier.isStatic(mod) && !Modifier.isTransient(mod))\r\n {\r\n RuntimeFieldFactory<?> rff = RuntimeFieldFactory.getFieldFactory(f.getType());\r\n if(rff!=null)\r\n {\r\n Field<T> field = rff.create(i+1, entry.getValue(), f);\r\n if(field!=null)\r\n {\r\n i++;\r\n fields.add(field);\r\n }\r\n }\r\n }\r\n }\r\n if(fields.isEmpty())\r\n {\r\n throw new RuntimeException(\"Not able to map any fields from \" + \r\n typeClass + \". All fields are either transient/static. \" +\r\n \"Two dimensional array fields are excluded. \" +\r\n \"Collection/Map fields whose generic type is another \" +\r\n \"Collection/Map or another generic type, are excluded.\");\r\n }\r\n return new RuntimeSchema<T>(typeClass, fields, i);\r\n }", "private Map getSetters(Object object) {\n Map result = new HashMap();\n\n Method[] metodos = object.getClass().getMethods();\n String nombre = null;\n String propiedad = null;\n\n for (int i = 0; i < metodos.length; i++) {\n nombre = metodos[i].getName();\n\n //Sólo nos interesan los \"setters\", siguiendo la especificacion JavaBean\n if (nombre.startsWith(\"set\") && (nombre.length() > 3)) {\n //Quitamos el prefijo \"set\"\n propiedad = nombre.substring(3, nombre.length());\n\n //ponemos la primera letra en minuscula\n propiedad = Character.toLowerCase(propiedad.charAt(0)) +\n propiedad.substring(1, propiedad.length());\n\n //Añadimos el setter con el nombre de la propiedad como key\n result.put(propiedad, metodos[i]);\n }\n }\n\n return result;\n }", "private Builder(org.ga4gh.models.CallSet other) {\n super(org.ga4gh.models.CallSet.SCHEMA$);\n if (isValidValue(fields()[0], other.id)) {\n this.id = data().deepCopy(fields()[0].schema(), other.id);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.name)) {\n this.name = data().deepCopy(fields()[1].schema(), other.name);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.sampleId)) {\n this.sampleId = data().deepCopy(fields()[2].schema(), other.sampleId);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.variantSetIds)) {\n this.variantSetIds = data().deepCopy(fields()[3].schema(), other.variantSetIds);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.created)) {\n this.created = data().deepCopy(fields()[4].schema(), other.created);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.updated)) {\n this.updated = data().deepCopy(fields()[5].schema(), other.updated);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.info)) {\n this.info = data().deepCopy(fields()[6].schema(), other.info);\n fieldSetFlags()[6] = true;\n }\n }", "com.sagas.meta.model.MetaFieldData getFields(int index);", "static Field[] createFields(int integer, String text, int index, double decimal) {\n\t\tField[] fields = new Field[4];\n\t\tfields[0] = new IntegerFieldWrapper(integer);\n\t\tfields[1] = new StringFieldWrapper(text);\n\t\tfields[2] = new EnumFieldWrapper(index, createEnumDomain());\n\t\tfields[3] = new FloatFieldWrapper(decimal);\n\t\treturn fields;\n\t}", "public Set<Field> getFields() {\r\n \t\t// We will only consider private fields in the declared class\r\n \t\tif (forceAccess)\r\n \t\t\treturn setUnion(source.getDeclaredFields(), source.getFields());\r\n \t\telse\r\n \t\t\treturn setUnion(source.getFields());\r\n \t}", "private List<T> createObjects(ResultSet resultSet) {\n\t\tList<T> list = new ArrayList<T>();\n\t\ttry {\n\t\t\twhile (resultSet.next()) {\n\t\t\t\t@SuppressWarnings(\"deprecation\")\n\t\t\t\tT instance = type.newInstance();\n\t\t\t\tfor (Field field : type.getDeclaredFields()) {\n\t\t\t\t\tObject value = resultSet.getObject(field.getName());\n\t\t\t\t\tPropertyDescriptor propertyDescriptor = new PropertyDescriptor(field.getName(), type);\n\t\t\t\t\tMethod method = propertyDescriptor.getWriteMethod();\n\t\t\t\t\tmethod.invoke(instance, value);\n\t\t\t\t}\n\t\t\t\tlist.add(instance);\n\t\t\t}\n\t\t} catch (InstantiationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SecurityException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvocationTargetException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IntrospectionException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "public static <T> RuntimeSchema<T> createFrom(Class<T> typeClass, \r\n Set<String> exclusions)\r\n {\r\n if(typeClass.isInterface() || Modifier.isAbstract(typeClass.getModifiers()))\r\n {\r\n throw new RuntimeException(\"The root object can neither be an abstract \" +\r\n \"class nor interface: \\\"\" + typeClass.getName());\r\n }\r\n \r\n Map<String,java.lang.reflect.Field> fieldMap = findInstanceFields(typeClass);\r\n ArrayList<Field<T>> fields = new ArrayList<Field<T>>(fieldMap.size());\r\n int i = 0;\r\n for(java.lang.reflect.Field f : fieldMap.values())\r\n {\r\n if(!exclusions.contains(f.getName()))\r\n {\r\n if(f.getAnnotation(Deprecated.class) != null)\r\n {\r\n // this field is deprecated and should be skipped.\r\n // preserve its field number for backward-forward compat\r\n i++;\r\n continue;\r\n }\r\n \r\n RuntimeFieldFactory<?> rff = RuntimeFieldFactory.getFieldFactory(f.getType());\r\n if(rff!=null)\r\n {\r\n Field<T> field = rff.create(i+1, f.getName(), f);\r\n if(field!=null)\r\n {\r\n i++;\r\n fields.add(field);\r\n }\r\n }\r\n }\r\n }\r\n if(fields.isEmpty())\r\n {\r\n throw new RuntimeException(\"Not able to map any fields from \" + \r\n typeClass + \". All fields are either transient/static. \" +\r\n \"Two dimensional array fields are excluded. \" +\r\n \"Collection/Map fields whose generic type is another \" +\r\n \t \"Collection/Map or another generic type, are excluded.\");\r\n }\r\n \r\n return new RuntimeSchema<T>(typeClass, fields, i);\r\n }", "public static void getFields (Class<?> clazz, List<Field> addTo)\n {\n // first get the fields of the superclass\n Class<?> pclazz = clazz.getSuperclass();\n if (pclazz != null && !pclazz.equals(Object.class)) {\n getFields(pclazz, addTo);\n }\n \n // then reflect on this class's declared fields\n Field[] fields;\n try {\n fields = clazz.getDeclaredFields();\n } catch (SecurityException se) {\n System.err.println(\"Unable to get declared fields of \" + clazz.getName() + \": \" + se);\n fields = new Field[0];\n }\n \n // override the default accessibility check for the fields\n try {\n AccessibleObject.setAccessible(fields, true);\n } catch (SecurityException se) {\n // ah well, only publics for us\n }\n \n for (Field field : fields) {\n int mods = field.getModifiers();\n if (Modifier.isStatic(mods) || Modifier.isTransient(mods)) {\n continue; // skip static and transient fields\n }\n addTo.add(field);\n }\n }", "public interface Reflection {\n\t/**\n\t * Creates the template which specifies which constructor to \n\t * call upon. The specifies the classes of the arguments which\n\t * need to be given to the constructor.\n\t */\n\t@SuppressWarnings(\"unchecked\")\n\tpublic Class[] getTemplate();\n\t\n\t/**\n\t * Create the object array which serves as the parameters \n\t * to construct another object of this type.\n\t */\n\tpublic Object[] getConstructorArgs ();\n}", "public BaseField setupField(int iFieldSeq)\n {\n BaseField field = null;\n if (iFieldSeq == 0)\n field = new HotelField(this, PRODUCT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 1)\n // field = new DateField(this, START_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 2)\n // field = new DateField(this, END_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 3)\n // field = new StringField(this, DESCRIPTION, 10, null, null);\n //if (iFieldSeq == 4)\n // field = new CityField(this, CITY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 5)\n // field = new CityField(this, TO_CITY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 6)\n // field = new ContinentField(this, CONTINENT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 7)\n // field = new RegionField(this, REGION_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 8)\n // field = new CountryField(this, COUNTRY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 9)\n // field = new StateField(this, STATE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 10)\n // field = new VendorField(this, VENDOR_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 11)\n field = new HotelRateField(this, RATE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 12)\n field = new HotelClassField(this, CLASS_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 13)\n // field = new DateField(this, DETAIL_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 14)\n // field = new ShortField(this, PAX, Constants.DEFAULT_FIELD_LENGTH, null, new Short((short)2));\n //if (iFieldSeq == 15)\n // field = new HotelScreenRecord_LastChanged(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 16)\n // field = new BooleanField(this, REMOTE_QUERY_ENABLED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 17)\n // field = new ShortField(this, BLOCKED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 18)\n // field = new ShortField(this, OVERSELL, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 19)\n // field = new BooleanField(this, CLOSED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 20)\n // field = new BooleanField(this, DELETE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 21)\n // field = new BooleanField(this, READ_ONLY, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 22)\n // field = new ProductSearchTypeField(this, PRODUCT_SEARCH_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 23)\n // field = new ProductTypeField(this, PRODUCT_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 24)\n field = new PaxCategorySelect(this, PAX_CATEGORY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (field == null)\n field = super.setupField(iFieldSeq);\n return field;\n }", "public FieldScrapper() \r\n {\r\n }", "protected DefaultFieldsImpl getFields(String name, MetaType type)\n {\n DefaultFieldsImpl fields = new DefaultFieldsImpl();\n fields.setMetaType(type);\n fields.setName(name);\n fields.setField(Fields.MAPPED_NAME, name);\n fields.setMandatory(false);\n\n return fields;\n }", "private <T> T createObject(ResultSet resultSet, Class<T> destinationClass, Map<String, Field> fields) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n logger.trace(\"Constructing new {} instance\", destinationClass);\n final T dto = destinationClass.getConstructor().newInstance();\n\n for (Map.Entry<String, Field> entry : fields.entrySet()) {\n final String key = entry.getKey();\n final Field field = entry.getValue();\n\n try {\n logger.trace(\"Retrieving '{}' from the ResultSet\", key);\n final Object value = resultSet.getObject(key);\n logger.debug(\"Retrieval of '{}' has resulted to: {}\", key, value);\n\n logger.trace(\"Setting the value '{}' to the field: {}\", value, field.getName());\n field.set(dto, tryConvertValue(field, value));\n logger.trace(\"Value set successfully.\");\n } catch (SQLException ex) {\n final boolean fieldWarningsNotSuppressed = !(hasClassLevelWarningSuppression || field.isAnnotationPresent(SuppressWarnings.class));\n\n if (fieldWarningsNotSuppressed) {\n logger.warn(ex.getMessage());\n }\n }\n }\n\n return dto;\n }", "@Test\n public void test_getAndSet_ByIndex_TypedMethods() throws Exception {\n\n FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1 descNum1_FieldSet = new FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1(\n executeInfo, null);\n\n\n\n descNum1_FieldSet.schemaInfo_Positioned = mock_schemaInfoFieldSet_descNum1;\n\n // Test the Get & Set methods _________________________________________________________________________________\n\n\n FieldSet_TestUtilities.test_SetAndGet_useIndex(executeInfo, descNum1_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1.class,\n \"setField_String\", String.class, \"setField__Special\", \"getField_String\", 0,\n \"stuff\", null, null, \"hi\"); /* last 4 params: expected value, null expected value, unused expected value, default expected value */\n\n FieldSet_TestUtilities.test_SetAndGet_useIndex(executeInfo, descNum1_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1.class,\n \"setField_short\", Short.TYPE, \"setField__Special\", \"getField_short\", 1,\n (short)123, (short)-1, (short)-1, (short)-1001); /* last 4 params: expected value, getField_short expected value, unused expected value, default expected value */\n\n // continuation primiative field\n FieldSet_TestUtilities.test_SetAndGet_useIndex(executeInfo, descNum1_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1.class,\n \"setField_int\", Integer.TYPE, \"setField__Special\", \"getField_int\", 2,\n 456, -1, -1, -1000); /* last 4 params: expected value, getField_short expected value, unused expected value, default expected value */\n\n FieldSet_TestUtilities.test_SetAndGet_useIndex(executeInfo, descNum1_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1.class,\n \"setField_int\", Integer.TYPE, \"setField__Special\", \"getField_int\", 3,\n 789, -1, -1, -1000); /* last 4 params: expected value, getField_short expected value, unused expected value, default expected value */\n\n\n\n\n\n\n // Object Continuation\n FieldSetTuple__net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA$_S_$DESCRIPTOR$_S_$FIELD$__$TYPES fieldTypes_FieldSet = new FieldSetTuple__net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA$_S_$DESCRIPTOR$_S_$FIELD$__$TYPES(\n executeInfo, null);\n\n fieldTypes_FieldSet.schemaInfo_Positioned = mock_schemaInfoFieldSet_fieldTypes;\n\n\n // Test the Get & Set methods _________________________________________________________________________________\n FieldSet_TestUtilities.test_SetAndGet_useIndex(executeInfo, fieldTypes_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA$_S_$DESCRIPTOR$_S_$FIELD$__$TYPES.class,\n \"setField_Symbol\", Symbol.class, \"setField__Special\", \"getField_Symbol\", 0,\n MPSymbols.char$_sym_$, null, null, MPSymbols.boolean$_sym_$); /* last 4 params: expected value, getField_short expected value, unused expected value, default expected value */\n\n FieldSet_TestUtilities.test_SetAndGet_useIndex(executeInfo, fieldTypes_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA$_S_$DESCRIPTOR$_S_$FIELD$__$TYPES.class,\n \"setField_Symbol\", Symbol.class, \"setField__Special\", \"getField_Symbol\", 1,\n MPSymbols.byte$_sym_$, null, null, MPSymbols.boolean$_sym_$); /* last 4 params: expected value, getField_short expected value, unused expected value, default expected value */\n\n\n\n }", "public abstract Set<ResolvedFieldDeclaration> getDeclaredFields();", "private String[] getDefinedFields(ObjectSet<?> pObjectSet) {\r\n\t\tString[] returnedValue = null;\r\n\t\tList<String> fieldsList = new ArrayList<String>();\r\n\t\t\r\n\t\tif (pObjectSet != null) {\r\n\t\t\tif (pObjectSet.getDataMappings().size() > 0) {\r\n\t\t\t\tfor(DataMapping mapping : pObjectSet.getDataMappings()) {\r\n\t\t\t\t\tif (!mapping.virtual && !mapping.IsCollection) {\r\n\t\t\t\t\t\tif (mapping.DataBaseDataType != Entity.DATATYPE_ENTITY) {\r\n\t\t\t\t\t\t\tfieldsList.add(mapping.DataBaseFieldName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (fieldsList.size() > 0) {\r\n\t\t\treturnedValue = fieldsList.toArray(new String[fieldsList.size()]);\r\n\t\t}\r\n\t\t\r\n\t\treturn returnedValue;\r\n\t}", "private void mappingMethodSet() throws SecurityException, NoSuchMethodException{\n\t\tString aux = upFirstLetter();\n\t\tString methodSet = \"set\" + aux;\n\t\tthis.methodSet = this.classFather.getMethod(methodSet, this.classType);\n\t}", "private static Map<Object, Object> getFields(Device d1) {\n\t Class<? extends Device> deviceClass = d1.getClass();\n\t Field[] fields = deviceClass.getDeclaredFields();\n\t \n\t //Map to get property details to provided class\n\t \tMap<Object,Object> mapFields = new HashMap<>();\t \n\n\t Arrays.stream(fields)\n\t .forEach(\n\t field -> {\n\t field.setAccessible(true);\n\t try {\n\t \tmapFields.put(field.getName(), field.get(d1));\n\t } catch (final IllegalAccessException e) {\n\t \t\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tmapFields.put(field.getName(), field.get(d1));\n\t\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t }\n\t });\n\n\t return mapFields;\n\t}", "private JCVariableDecl makeAttributeListField(DiagnosticPosition diagPos, List<AttributeInfo> attrInfos) {\n ListBuffer<JCExpression> attrs = ListBuffer.lb();\n \n for (AttributeInfo ai : attrInfos) {\n if (ai.needsCloning()) {\n attrs.append(make.at(diagPos).Ident(ai.getName()));\n }\n }\n \n return make.at(diagPos).VarDef(make.Modifiers(Flags.PRIVATE), \n defs.attributesFieldName, \n make.TypeArray( toJava.makeTypeTree(abstractVariableType, diagPos) ), \n make.NewArray(toJava.makeTypeTree(abstractVariableType, diagPos), \n List.<JCExpression>nil(), attrs.toList()));\n }", "public Generador(Generic generic) {\r\n this.generic = generic;\r\n this.Num_Atributes = this.generic.getClass().getDeclaredFields().length;\r\n this.SuperDeclaredFields = this.generic.getClass().getSuperclass().getDeclaredFields();\r\n this.DeclaredFields = this.generic.getClass().getDeclaredFields();\r\n }", "private void fillEmbeddedTypes() {\n List<String> otherClassesNames = new ArrayList<>(PRIMITIVE_TYPES);\n otherClassesNames.add(\"[]\");\n otherClassesNames.add(\"...\");\n\n List<TypeConstructor> otherClasses = new ArrayList<>();\n for (String type : otherClassesNames) {\n Classifier classifier = new Classifier(type, Language.JAVA, \"\", null, new ArrayList<MemberEntity>(), \"\");\n otherClasses.add(classifier);\n QualifiedName name = new QualifiedName(OTHER_PACKAGE, type);\n classes.put(name, classifier);\n parameters.put(name, new ParametersDescription());\n superTypes.put(name, new ArrayList<JavaType>());\n createClassMaps(name);\n }\n\n PackageEntity otherPackage = new PackageEntity(OTHER_PACKAGE, Language.JAVA, otherClasses,\n new ArrayList<MemberEntity>(), new ArrayList<PackageEntity>(), \"\", null);\n packages.put(OTHER_PACKAGE, otherPackage);\n\n for (TypeConstructor otherClass : otherClasses) {\n otherClass.setContainingPackage(otherPackage);\n }\n }", "private void setNewFields(String[] fields) {\n for (String fieldName : fields) {\n setNewField(fieldName);\n }\n }", "public void setMembers( List<String> list )\r\n {\r\n specifiedMembers = new ArrayList<Dependency>();\r\n for ( String str: list )\r\n {\r\n Member member = null;\r\n int index = str.lastIndexOf( '.' );\r\n String className = str.substring( 0, index );\r\n String memberName = str.substring( index + 1 );\r\n Class<?> clazz = createClass( className );\r\n if ( memberName.endsWith( \"()\" ) )\r\n {\r\n memberName = memberName.substring( 0, memberName.lastIndexOf( \"()\" ) );\r\n member = findSimpleSetterMethod( clazz, memberName );\r\n }\r\n else\r\n {\r\n member = findField( clazz, memberName );\r\n }\r\n specifiedMembers.add( createDependency( member, \"\" ) );\r\n }\r\n }", "private void fillConstructorFields() {\n constructorId.setText(\"\"+ constructorMutator.getConstructor().getConstructorId());\n constructorUrl.setText(\"\"+ constructorMutator.getConstructor().getConstructorUrl());\n constructorName.setText(\"\"+ constructorMutator.getConstructor().getConstructorName());\n constructorNationality.setText(\"\"+ constructorMutator.getConstructor().getNationality());\n teamLogo.setImage(constructorMutator.getConstructor().getTeamLogo().getImage());\n // Display Drivers that were from the JSON File\n constructorMutator.getConstructor().setBuffer(new StringBuffer());\n // Java 8 Streaming\n constructorMutator.getConstructorsList().stream().forEach(constructorList -> constructorMutator.getConstructor().toString(constructorList));\n }", "FieldType createFieldType();", "private static HashSet<Field> getAllFields(Class<?> cls) {\n // First, let's get all the super classes.\n HashSet<Class<?>> ancestors = getInstrumentedAncestors(cls);\n\n // Then, let's get all the fields of these classes.\n HashSet<Field> allFields = new HashSet<>();\n for (Class<?> ancestor : ancestors) {\n Collections.addAll(allFields, ancestor.getDeclaredFields());\n }\n return allFields;\n }", "private void addConstructors() {\n\t\tthis.rootBindingClass.getConstructor().body.line(\"super({}.class);\\n\", this.name.getTypeWithoutGenerics());\n\t\tGMethod constructor = this.rootBindingClass.getConstructor(this.name.get() + \" value\");\n\t\tconstructor.body.line(\"super({}.class);\", this.name.getTypeWithoutGenerics());\n\t\tconstructor.body.line(\"this.set(value);\");\n\t}", "public static Set typedSet(Set set, Class type) {\n/* 205 */ return TypedSet.decorate(set, type);\n/* */ }", "@Test\n public void testSetValue() throws Exception {\n\n Map<String, IMetaData<SampleMark>> name2MetaData;\n name2MetaData = factory.class2MetaDataByFullPath(Person.class);\n\n for (Person p : persons) {\n\n float weight = SampleDataGenerator.getSampleWeight(random, p.weight);\n int age = p.getAge();\n String lastName = p.getLastname();\n\n IMetaData<SampleMark> metaData =\n name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Person|weight\");\n metaData.setValue(p, weight);\n Person.assertPerson(p, lastName, weight, age);\n }\n\n for (Person p : persons) {\n\n float weight = p.weight;\n int age = p.getAge();\n String lastName =\n SampleDataGenerator.getSampleLastName(random, p.getLastname());\n IMetaData<SampleMark> metaData =\n name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Person|lastname\");\n metaData.setValue(p, lastName);\n Person.assertPerson(p, lastName, weight, age);\n }\n\n name2MetaData = factory.class2MetaDataByFullPath(Car.class);\n for (Car c : cars) {\n\n Driver driver = c.getDriver();\n String lastName = driver.getLastname();\n float weight = SampleDataGenerator.getSampleWeight(random, driver.weight);\n int age = driver.getAge();\n boolean hasDrivingLicense = driver.hasDrivingLicense;\n\n Engine engine = c.getEngine();\n String productName =\n SampleDataGenerator.getSampleProductName(random, engine.productName);\n\n Oil oil = engine.oil;\n String producentName = oil.producentName;\n String vendorName = oil.vendorName;\n\n IMetaData<SampleMark> metaData =\n name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|driver|weight\");\n\n metaData.setValue(c, weight);\n\n metaData =\n name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|engine|productName\");\n\n metaData.setValue(c, productName);\n\n Driver.assertDriver(driver, lastName, weight, age,\n hasDrivingLicense);\n\n Engine.assertEngine(engine, productName);\n\n Oil.assertOil(oil, vendorName, producentName);\n\n }\n\n }", "public void setFields(Map fields_p) throws Exception\r\n {\r\n m_fields = fields_p;\r\n\r\n m_clonedfields = createCloneFromFields(fields_p);\r\n }", "private HashMap getTableFieldsAttribs(String s){\n HashMap<String, String> map = new HashMap<String, String>();\n String name = \"(.*)(?<=name)(=\\\\\\\")(\\\\w+)(.*)\"; // 3rd group\n String type = \"(.*)(?<=type)(=\\\\\\\")(\\\\w+:)(\\\\w+)(.*)\"; // 4th group\n String maxO = \"(.*)(?<=maxOccurs)(=\\\\\\\")(\\\\w+)(.*)\"; //3rd group\n String minO = \"(.*)(?<=minOccurs)(=\\\\\\\")(\\\\w+)(.*)\"; //3rd group\n String fraction = \"(.*)(?<=fraction)(=\\\\\\\")(\\\\w+)(.*)\"; //3rd group\n String date = \"(.*)(?<=date)(=\\\\\\\")(.*)(\\\\\\\")(.*)\"; //3rd group\n Matcher m = Pattern.compile(name).matcher(s);\n Matcher m1 = Pattern.compile(type).matcher(s);\n Matcher m2 = Pattern.compile(maxO).matcher(s);\n Matcher m3 = Pattern.compile(minO).matcher(s);\n Matcher m4 = Pattern.compile(fraction).matcher(s);\n Matcher m5 = Pattern.compile(date).matcher(s);\n if(m.find()){\n map.put(\"name\",m.group(3));\n }\n if(m1.find()){\n map.put(\"type\",m1.group(4));\n }\n if(m2.find()){\n map.put(\"maxOccurs\",m2.group(3));\n }\n if(m3.find()){\n map.put(\"minOccurs\",m3.group(3));\n }\n if(m4.find()){\n map.put(\"fraction\",m4.group(3));\n }\n if(m5.find()){\n map.put(\"date\",m5.group(3));\n }\n return map;\n }", "private OneOfEach() {\n initFields();\n }", "public interface FieldPopulator\n{\n List<String> getCoreFields();\n\n List<String> getSupportedFields();\n\n String getUriTemplate();\n}", "public static ReflectionResponse<Field> getDeclaredFieldByType(Class<?> clazz, Class<?> type, int index, boolean setAccessible) {\n return getDeclaredFieldByPredicate(clazz, new FieldPredicate().withType(type), setAccessible, index);\n }", "private List<Field> getFields(List<Field> fields, Class<?> type) {\n logger.trace(\"Adding all declared fields from class {}\", type);\n fields.addAll(Arrays.asList(type.getDeclaredFields()));\n\n if (type.getSuperclass() != null) {\n logger.trace(\"Retrieving declared fields from class {}\", type);\n getFields(fields, type.getSuperclass());\n }\n\n return fields;\n }", "protected FieldList generateFieldsMap(String delimiter,List<String> lines) throws RemoteException {\n\n\t\tlogger.debug(\"generateFieldsMap --\");\n\t\t\n\t\tFieldList fl = new OrderedFieldList();\n\t\ttry {\n\t\t\t\n\t\t\tMap<String,Set<String>> valueMap = new LinkedHashMap<String,Set<String>>();\n\t\t\tMap<String,Integer> nbValueMap = new LinkedHashMap<String,Integer>();\n\t\t\t\n\t\t\tMap<String, FieldType> schemaTypeMap = new LinkedHashMap<String, FieldType>();\n\t\t\t\n\t\t\tif (lines != null) {\n\t\t\t\tlogger.trace(\"key_delimiter: \" + Pattern.quote(delimiter));\n\t\t\t\tfor (String line : lines) {\n\t\t\t\t\tboolean full = true;\n\t\t\t\t\tif (!line.trim().isEmpty()) {\n\t\t\t\t\t\tint cont = 0;\n\t\t\t\t\t\tfor (String s : line.split(Pattern\n\t\t\t\t\t\t\t\t.quote(delimiter))) {\n\n\t\t\t\t\t\t\tString nameColumn = generateColumnName(cont++);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!valueMap.containsKey(nameColumn)){\n\t\t\t\t\t\t\t\tvalueMap.put(nameColumn, new LinkedHashSet<String>());\n\t\t\t\t\t\t\t\tnbValueMap.put(nameColumn, 0);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif(valueMap.get(nameColumn).size() < 101){\n\t\t\t\t\t\t\t\tfull = false;\n\t\t\t\t\t\t\t\tvalueMap.get(nameColumn).add(s.trim());\n\t\t\t\t\t\t\t\tnbValueMap.put(nameColumn,nbValueMap.get(nameColumn)+1);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(full){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIterator<String> valueIt = valueMap.keySet().iterator();\n\t\t\t\twhile(valueIt.hasNext()){\n\t\t\t\t\tString cat = valueIt.next();\n\t\t\t\t\tfl.addField(cat,getType(valueMap.get(cat),nbValueMap.get(cat), schemaTypeMap.get(cat)));\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch (RemoteException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\treturn fl;\n\n\t}", "public static LinkedHashMap<String, DataField> createFields(DatabaseMetadata metadata, String tableName,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString bodyStr)\n\t{\n\t\tString[] declarations = getDeclarationsStrs(bodyStr);\n\t\tVector<String> attrStrs = getAttributesStrs(declarations);\n\t\tVector<String> consStrs = getConstraintStrs(declarations);\n\n\t\tLinkedHashMap<String, DataField> fieldsMap = createTableFields(tableName, attrStrs);\n\t\tsetFieldsConstraints(metadata, fieldsMap, consStrs);\n\t\treturn fieldsMap;\n\t}", "private ArrayList<T> createObjects(ResultSet resultSet) {\n\t\tArrayList<T> list = new ArrayList<T>();\n\t\ttry {\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tT instance = null;\n\t\t\t\ttry {\n\t\t\t\t\tinstance = type.getDeclaredConstructor().newInstance();\n\t\t\t\t} catch (NoSuchMethodException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tfor (Field field : type.getDeclaredFields()) {\n\t\t\t\t\tObject value = resultSet.getObject(field.getName());\n\t\t\t\t\tPropertyDescriptor propertyDescriptor = new PropertyDescriptor(field.getName(), type);\n\t\t\t\t\tMethod method = propertyDescriptor.getWriteMethod();\n\t\t\t\t\tmethod.invoke(instance, value);\n\t\t\t\t}\n\t\t\t\tlist.add(instance);\n\t\t\t}\n\t\t} catch (InstantiationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SecurityException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvocationTargetException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IntrospectionException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "public BaseField setupField(int iFieldSeq)\n {\n BaseField field = null;\n //if (iFieldSeq == 0)\n // field = new TicketScreenRecord_ReportDate(this, REPORT_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 1)\n // field = new TicketScreenRecord_ReportTime(this, REPORT_TIME, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 2)\n // field = new TicketScreenRecord_ReportUserID(this, REPORT_USER_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 3)\n // field = new ShortField(this, REPORT_PAGE, Constants.DEFAULT_FIELD_LENGTH, null, new Short((short)1));\n //if (iFieldSeq == 4)\n // field = new IntegerField(this, REPORT_COUNT, Constants.DEFAULT_FIELD_LENGTH, null, new Integer(0));\n //if (iFieldSeq == 5)\n // field = new CurrencyField(this, REPORT_TOTAL, Constants.DEFAULT_FIELD_LENGTH, null, new Double(0));\n //if (iFieldSeq == 6)\n // field = new IntegerField(this, REPORT_KEY_AREA, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 7)\n field = new ShortField(this, COUNT, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 8)\n field = new CurrencyField(this, TOTAL, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 9)\n field = new TicketReportOrderField(this, REPORT_ORDER, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 10)\n field = new DateField(this, START_DEPARTURE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 11)\n field = new DateField(this, END_DEPARTURE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 12)\n field = new DateField(this, START_ISSUE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 13)\n field = new DateField(this, END_ISSUE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 14)\n field = new BooleanField(this, INCLUDE_VOID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 15)\n field = new AirlineField(this, AIRLINE_1ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 16)\n field = new AirlineField(this, AIRLINE_2ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 17)\n field = new AirlineField(this, AIRLINE_3ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 18)\n field = new AirlineField(this, AIRLINE_4ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 19)\n field = new StringField(this, START_TICKET, 20, null, null);\n if (iFieldSeq == 20)\n field = new StringField(this, END_TICKET, 20, null, null);\n if (field == null)\n field = super.setupField(iFieldSeq);\n return field;\n }", "protected void setProjectFields(final ArrayList<Field> fields) {\n\t\tthis._projectFields = fields;\n\t\t\n\t\t\n\t\t// Assign all special fields to their corresponding variables\n\t\tfor (Field field : fields) {\n\t\t\tif (field.getName().equals(\"Function Requirements\")) {\n\t\t\t\t_functionReq = field;\n\t\t\t}\n\t\t\telse if (field.getName().equals(\"Data Requirements\")) {\n\t\t\t\t_dataReq = field;\n\t\t\t\t\n\t\t\t}\n\t\t\telse if (field.getName().equals(\"Performance Requirements\")) {\n\t\t\t\t_performanceReq = field;\n\t\t\t}\n\t\t\telse if (field.getName().equals(\"Glossary\")) {\n\t\t\t\t_glossary = field;\n\t\t\t}\n\t\t\telse if (field.getName().equals(\"FP Parameters\")) {\n\t\t\t\t_fpParameters = field;\n\t\t\t}\n\t\t\telse if (field.getName().equals(\"FP Influences\")){\n\t\t\t\t_fpInfluences = field;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t// Calculation\n\t\t_calcMethodEnum = CalculationEnum.notSet;\n\t\t_calcMethodInstance = null;\n\t\t\n\t}", "@Test\n public void testGetValue() throws Exception {\n\n Map<String, IMetaData<SampleMark>> name2MetaData;\n name2MetaData = factory.class2MetaDataByFullPath(Person.class);\n\n assertEquals(3, name2MetaData.size());\n\n for (Person p : persons) {\n\n Person.assertPerson(p,\n (String) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Person|lastname\").getValue(p),\n (Float) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Person|weight\").getValue(p),\n (Integer) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Person|age\").getValue(p));\n }\n\n name2MetaData = factory.class2MetaDataByFullPath(Driver.class);\n\n assertEquals(4, name2MetaData.size());\n\n for (Driver d : drivers) {\n\n Driver.assertDriver(d,\n (String) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Driver|lastname\").getValue(d),\n (Float) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Driver|weight\").getValue(d),\n (Integer) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Driver|age\").getValue(d),\n (Boolean) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Driver|hasDrivingLicense\").getValue(d));\n\n }\n\n name2MetaData = factory.class2MetaDataByFullPath(Car.class);\n\n assertEquals(10, name2MetaData.size());\n\n for (Car c : cars) {\n Driver.assertDriver(c.getDriver(),\n (String) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|driver|lastname\").getValue(c),\n (Float) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|driver|weight\").getValue(c),\n (Integer) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|driver|age\").getValue(c),\n (Boolean) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|driver|hasDrivingLicense\").getValue(c));\n Driver.assertDriver((Driver) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|driver\").getValue(c),\n (String) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|driver|lastname\").getValue(c),\n (Float) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|driver|weight\").getValue(c),\n (Integer) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|driver|age\").getValue(c),\n (Boolean) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|driver|hasDrivingLicense\").getValue(c));\n Engine.assertEngine(c.getEngine(),\n (String) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|engine|productName\").getValue(c));\n Engine.assertEngine((Engine) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|engine\").getValue(c),\n (String) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|engine|productName\").getValue(c));\n\n Oil.assertOil(c.getEngine().oil,\n (String) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|engine|oil|vendorName\").getValue(c),\n (String) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|engine|oil|producentName\").getValue(c));\n Oil.assertOil((Oil) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|engine|oil\").getValue(c),\n (String) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|engine|oil|vendorName\").getValue(c),\n (String) name2MetaData.get(\"pl.softech.reflection.SampleDataGenerator$Car|engine|oil|producentName\").getValue(c));\n }\n\n }", "public PropertySet createPropertySet(String propertySetName, Map<String,Object> args) throws PropertySetException {\n \n PropertySet ps = createPropertySet(propertySetName, args, PropertySetFactory.class.getClassLoader());\n\n if (ps == null) \n ps = createPropertySet(propertySetName, args, Thread.currentThread().getContextClassLoader());\n\n return ps;\n }", "abstract CharArraySet build();", "private void initFPFields(){\n\t\t\n\t\tField input = new Field(\"Input\", Type.String, false, this, \"Input\");\n\t\tinput.addChild(new Field(\"Type\", Type.String, false, this, \"Input\"));\n\t\tinitComplexity(input);\n\t\t\n\t\tField query = new Field(\"Query\", Type.String, false, this, \"Query\");\n\t\tquery.addChild(new Field(\"Query\", Type.String, false, this, \"Query\"));\n\t\tinitComplexity(query);\n\t\t\n\t\tField output = new Field(\"Output\", Type.String, false, this, \"Output\");\n\t\toutput.addChild(new Field(\"Output\", Type.String, false, this, \"Output\"));\n\t\tinitComplexity(output);\n\t\t\n\t\tField data = new Field(\"Internal Data\", Type.String, false, this, \"Internal Data\");\n\t\tdata.addChild(new Field(\"Internal Data\", Type.String, false, this, \"Internal Data\"));\n\t\tinitComplexity(data);\n\t\t\n\t\tField reference = new Field(\"External Data\", Type.String, false, this, \"External Data\");\n\t\treference.addChild(new Field(\"External Data\", Type.String, false, this, \"External Data\"));\n\t\tinitComplexity(reference);\n\t\t\n\t\t\t\n\t\t_fpParameters.addChild(input);\n\t\t_fpParameters.addChild(query);\n\t\t_fpParameters.addChild(output);\n\t\t_fpParameters.addChild(data);\n\t\t_fpParameters.addChild(reference);\n\t\t\n\t\t_projectFields.add(_fpParameters);\n\t\t\n\n\t\tinitInfluence(\"Verflechtung\");\n\t\tinitInfluence(\"Dezentrale Daten\");\n\t\tinitInfluence(\"Transaktionsrate\");\n\t\tinitInfluence(\"Rechenoperationen\");\n\t\tinitInfluence(\"Kontrollverfahren\");\n\t\tinitInfluence(\"Ausnahmeregelungen\");\n\t\tinitInfluence(\"Logik\");\n\t\tinitInfluence(\"Wiederverwendbarkeit\");\n\t\tinitInfluence(\"Datenbestandskonvertierung\");\n\t\tinitInfluence(\"Anpassbarkeit\");\n\t\t\n\t\t_projectFields.add(_fpInfluences);\n\t}", "ObjectField createObjectField();", "@Test\n public void test_getAndSet_ByIndex_GenericMethods() throws Exception {\n\n FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1 descNum1_FieldSet = new FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1(\n executeInfo, null);\n\n\n\n descNum1_FieldSet.schemaInfo_Positioned = mock_schemaInfoFieldSet_descNum1;\n\n\n // Test the Get & Set methods & the Special Field-Value Get & Set methods - Object Type (string) _______________________________________\n FieldSet_TestUtilities.test_SetAndGet_useIndex(executeInfo, descNum1_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1.class,\n \"setField\", Object.class, \"setField__Special\", \"getField\", 0,\n \"hello\", null, null, \"hi\"); /* last 4 params: expected value, null expected value, unused expected value, default expected value */\n\n\n FieldSet_TestUtilities.test_SetAndGet_useIndex(executeInfo, descNum1_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1.class,\n \"setField\", Object.class, \"setField__Special\", \"getField\", 1,\n (short)10, null, null, (short)-1001); /* last 4 params: expected value, null expected value, unused expected value, default expected value */\n\n\n // Continuation Field\n FieldSet_TestUtilities.test_SetAndGet_useIndex(executeInfo, descNum1_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1.class,\n \"setField\", Object.class, \"setField__Special\", \"getField\", 2,\n 11, null, null, -1000); /* last 4 params: expected value, null expected value, unused expected value, default expected value */\n FieldSet_TestUtilities.test_SetAndGet_useIndex(executeInfo, descNum1_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$TEST$__$SCHEMA$_S_$MY$95$DESC$__$NUM1.class,\n \"setField\", Object.class, \"setField__Special\", \"getField\", 3,\n 12, null, null, -1000); /* last 4 params: expected value, null expected value, unused expected value, default expected value */\n\n\n // Object Continuation ________________________________________________________________________________________\n FieldSetTuple__net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA$_S_$DESCRIPTOR$_S_$FIELD$__$TYPES fieldTypes_FieldSet = new FieldSetTuple__net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA$_S_$DESCRIPTOR$_S_$FIELD$__$TYPES(\n executeInfo, null);\n\n fieldTypes_FieldSet.schemaInfo_Positioned = mock_schemaInfoFieldSet_fieldTypes;\n\n FieldSet_TestUtilities.test_SetAndGet_useIndex(executeInfo, fieldTypes_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA$_S_$DESCRIPTOR$_S_$FIELD$__$TYPES.class,\n \"setField\", Object.class, \"setField__Special\", \"getField\", 0,\n MPSymbols.char$_sym_$, null, null, MPSymbols.boolean$_sym_$); /* last 4 params: expected value, null expected value, unused expected value, default expected value */\n\n FieldSet_TestUtilities.test_SetAndGet_useIndex(executeInfo, fieldTypes_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$_CC_$SCHEMA$95$FOR$95$SCHEMA$_S_$DESCRIPTOR$_S_$FIELD$__$TYPES.class,\n \"setField\", Object.class, \"setField__Special\", \"getField\", 1,\n MPSymbols.int$_sym_$, null, null, MPSymbols.boolean$_sym_$); /* last 4 params: expected value, null expected value, unused expected value, default expected value */\n\n }", "public Set<FieldInfo> getFieldInfos() {\n return new LinkedHashSet<FieldInfo>(_atts);\n }", "public void setFields(Aset aset) {\n txtKode.setText(aset.getKode());\n txtTanggal.setText(ValueFormatter.getLocalDateShort(aset.getTanggal().toLocalDate()));\n txtNama.setText(aset.getNama());\n\n KategoriAset ka = aset.getKategoriAset();\n if (ka == null) {\n txtNamaKategori.setText(\"\");\n } else {\n txtNamaKategori.setText(ka.getNama_kategori());\n }\n\n StatusAset sa = aset.getStatusAset();\n if (sa == null) {\n txtStatus.setText(\"\");\n } else {\n txtStatus.setText(sa.getStatus());\n }\n\n LokasiAset la = aset.getLokasiAset();\n if (la == null) {\n txtLokasi.setText(\"\");\n } else {\n txtLokasi.setText(la.getNama_rak());\n }\n\n Kepemilikan p = aset.getKepemilikan();\n if (p == null) {\n txtKepemilikan.setText(\"\");\n } else {\n txtKepemilikan.setText(p.getNama());\n }\n\n txtQty.setText(aset.getQty().toString());\n txtSatuan.setText(aset.getSatuan());\n Users u = aset.getUsers();\n if (u == null) {\n txtUser.setText(\"\");\n } else {\n txtUser.setText(u.getNama());\n }\n }", "public interface IndexedFieldSetMapper<T> {\n T mapFieldSet(ExecutionContext executionContext, FieldSet fieldSet, int index) throws BindException;\n}", "private List<T> createObjects(ResultSet rs){\n\t\tList<T> list = new ArrayList<T>();\n\t\t\n\t\ttry {\n\t\t\twhile(rs.next()) {\n\t\t\t\tT instance = type.newInstance();\n\t\t\t\tfor(Field field : type.getDeclaredFields()) {\n\t\t\t\t\tObject value = rs.getObject(field.getName());\n\t\t\t\t\tPropertyDescriptor pd = new PropertyDescriptor(field.getName(), type);\n\t\t\t\t\tMethod method = pd.getWriteMethod();\n\t\t\t\t\tmethod.invoke(instance, value);\n\t\t\t\t}\n\t\t\t\tlist.add(instance);\n\t\t\t}\n\t\t}catch(InstantiationException e) {\n\t\t\te.getStackTrace();\n\t\t} catch (java.beans.IntrospectionException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvocationTargetException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "void copyPropertiesToMetas( Object sourceAndTarget );", "public interface FieldGenerator extends Serializable {\n\n\t/**\n\t * Generate {@link Field} based on bean type and {@link JNIPropertyConstraint}\n\t * @param type\n\t * @param restriction\n\t * @return {@link Field}\n\t */\n\tpublic Field<?> createField(Class<?> type, JNIPropertyConstraint restriction);\n\t\n\t/**\n\t * Generate {@link Field} based on bean type and {@link JNIProperty}\n\t * @param type\n\t * @param property\n\t * @return {@link Field}\n\t */\n\tpublic Field<?> createField(Class<?> type, JNIProperty property);\n}", "public OrderSetCustomTypeActionBuilder fields(\n Function<com.commercetools.api.models.type.FieldContainerBuilder, com.commercetools.api.models.type.FieldContainerBuilder> builder) {\n this.fields = builder.apply(com.commercetools.api.models.type.FieldContainerBuilder.of()).build();\n return this;\n }", "FieldDefinition createFieldDefinition();", "private void addFields(StringBuilder xml) {\n\t\tfor(FieldRequest field : fields) {\n\t\t\tstartElementWithAttributes(xml, \"Delta\");\n\t\t\taddStringAttribute(xml, \"id\", field.getId());\n\t\t\taddBooleanAttribute(xml, \"masked\", field.getMasked());\n\t\t\tcloseSimpleElementWithAttributes(xml);\n\t\t}\n\t}", "default <T> T getAllFields(T object) {\n Field[] fields = object.getClass().getDeclaredFields();\n\n for (Field field : fields) {\n field.setAccessible(true);\n\n if (Modifier.isStatic(field.getModifiers())) continue;\n if (Modifier.isTransient(field.getModifiers())) continue;\n\n if (!contains(field.getName())) continue;\n\n try {\n if (field.getType().equals(double.class)) {\n if (!isNumber(field.getName())) continue;\n field.setDouble(object, getDouble(field.getName()));\n } else if (field.getType().equals(float.class)) {\n if (!isNumber(field.getName())) continue;\n field.setFloat(object, (float) getDouble(field.getName()));\n } else if (field.getType().equals(int.class)) {\n if (!isNumber(field.getName())) continue;\n field.setInt(object, getInt(field.getName()));\n } else if (field.getType().equals(boolean.class)) {\n if (!isBoolean(field.getName())) continue;\n field.setBoolean(object, getBoolean(field.getName()));\n } else if (field.getType().equals(long.class)) {\n if (!isNumber(field.getName())) continue;\n field.setLong(object, getLong(field.getName()));\n } else if (field.getType().equals(short.class)) {\n if (!isNumber(field.getName())) continue;\n field.setShort(object, (short) getInt(field.getName()));\n } else if (field.getType().equals(byte.class)) {\n if (!isNumber(field.getName())) continue;\n field.setByte(object, (byte) getInt(field.getName()));\n } else {\n Object newValue = getType(field.getName(), field.getType());\n if (newValue == null) continue;\n\n field.set(object, newValue);\n }\n\n } catch (IllegalAccessException e) {\n //This should not happen hopefully.\n e.printStackTrace();\n }\n }\n\n return object;\n }", "public void testFields() {\n assertTrue( tInteger.name().isEqualTo(Ocl.getFor(\"Integer\")).isTrue() );\n assertTrue( tOclString.name().isEqualTo(Ocl.getFor(\"String\")).isTrue() );\n assertTrue( tPersonFQ.name().isEqualTo(Ocl.getFor(\"Person\")).isTrue() );\n Ocl.JAVA_CLASS_NAMES=true;\n assertTrue( tPerson1.name().isEqualTo(Ocl.getFor(\"tudresden.ocl.lib.test.Person\")).isTrue() );\n Ocl.JAVA_CLASS_NAMES=false;\n assertTrue( tPersonFQ.attributes().includes(Ocl.getFor(\"isUnemployed\")).isTrue() );\n assertTrue( tPerson1.attributes().includes(Ocl.getFor(\"employer\")).isTrue() );\n assertTrue( tPersonFQ.associationEnds().includes(Ocl.getFor(\"managedCompanies\")).isTrue() );\n assertTrue( tPersonFQ.associationEnds().includes(Ocl.getFor(\"isMarried\")).isTrue() );\n assertTrue( tPersonFQ.operations().includes(Ocl.getFor(\"managedCompanies\")).not().isTrue() );\n assertTrue( tPersonFQ.operations().includes(Ocl.getFor(\"firstName\")).not().isTrue() );\n assertTrue( tPersonFQ.operations().includes(Ocl.getFor(\"getFive\")).isTrue() );\n assertTrue( tInteger.operations().includes(Ocl.getFor(\"add\")).isTrue() );\n }" ]
[ "0.5915529", "0.59088945", "0.58960533", "0.57333654", "0.5717282", "0.56060326", "0.5594834", "0.5557366", "0.54145086", "0.5412879", "0.5405063", "0.5397475", "0.53465956", "0.5324821", "0.53101975", "0.5289607", "0.5270406", "0.5265314", "0.52576417", "0.5251607", "0.5231991", "0.523099", "0.52262425", "0.5221445", "0.5213891", "0.51718426", "0.5171702", "0.5152173", "0.51372004", "0.51018316", "0.5099783", "0.5087449", "0.50747025", "0.50686985", "0.5066896", "0.5062552", "0.5062152", "0.50619256", "0.5049925", "0.5049191", "0.50472146", "0.5020373", "0.50028616", "0.49796942", "0.49768084", "0.49726626", "0.49449575", "0.49276462", "0.49169344", "0.49018663", "0.49003863", "0.48901397", "0.4867985", "0.48660168", "0.48605198", "0.4848523", "0.48464242", "0.48397374", "0.4837466", "0.4830292", "0.4824048", "0.48106292", "0.48077783", "0.4805374", "0.48043424", "0.48010874", "0.47945186", "0.47937354", "0.47923845", "0.47922823", "0.47873732", "0.47825634", "0.4780608", "0.47745135", "0.47430912", "0.47414872", "0.4740296", "0.47374263", "0.4727858", "0.4722583", "0.4708643", "0.47040948", "0.46985492", "0.46967047", "0.46938658", "0.46933964", "0.4687842", "0.468772", "0.46825525", "0.4681239", "0.46795794", "0.467743", "0.46676296", "0.46675006", "0.46672186", "0.46638533", "0.4662568", "0.46617246", "0.46587154", "0.4656697" ]
0.48703924
52
do nothing. for EventBus, if it would be registered
public void onEventMainThread(BaseEvent unused) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected boolean isBindEventBusHere() {\n\t\treturn false;\n\t}", "void onBusEvent(Event event);", "protected void registerListener() {\r\n\t\t// do nothing\r\n\t}", "@Override\n public boolean usesEvents()\n {\n return false;\n }", "@Override\r\n\t\tpublic void busStopRequested(BusEvent event) {\n\t\t\t\r\n\t\t}", "void registerEventbusHandlers();", "private void tryToConsumeEvent() {\n if (subscriber == null || storedEvent == null) {\n return;\n }\n sendMessageToJs(storedEvent, subscriber);\n\n }", "@Test(expected = ObjectNotRegisteredException.class)\n public void unregisterObjectThatIsNotRegistered() {\n BaseEventBus eventBus = new SynchronousEventBus(LOG);\n\n Object object1 = new Object() {\n @Subscriber\n public void onIntEvent(Integer event) {\n LOG.debug(\"handled event: {}\", event);\n }\n };\n\n eventBus.unregister(object1);\n }", "@ForOverride\n public void onNotInUse(InternalSubchannel internalSubchannel) {\n }", "public void onServiceRegistered() {\r\n \t// Nothing to do here\r\n }", "public interface EventBus {\n\n public String name();\n\n /**\n * Posts an event to all registered subscribers. This method will return successfully after the\n * event has been posted to all subscribers, and regardless of any exceptions thrown by\n * subscribers.\n *\n * @param event event to post.\n */\n public void post(Object event);\n\n}", "public void register() {\n unregister();\n Log.d(TAG, \"[register in eventbus]\");\n EventBus.getDefault().register(this);\n }", "Event () {\n // Nothing to do here.\n }", "EventBus getEventBus();", "void noResponderFor(Object eventSelector)\n {\n }", "@Override\n protected void onUnregistered() throws RemoteException {\n\n }", "public void handleNotInUse() {\n InternalSubchannel.this.callback.onNotInUse(InternalSubchannel.this);\n }", "public EventBus getEventBus(boolean force);", "public interface NoEventType {\n\n}", "@Override\n\tpublic EventMessage initPlugEventMessage() {\n\t\treturn null;\n\t}", "@Override\n protected void initializeEventList()\n {\n }", "@Override\r\n\tprotected void processIsNotDefinedEvent(InNotDefinedEvent arg0) {\n\t\t\r\n\t}", "@Override\n\tpublic void noAdAvailableListener() {\n\t\t\n\t}", "@Override\n\tpublic BaseMsg handle(BaseEvent event) {\n\t\treturn null;\n\t}", "boolean unregisterEventBusForEvent( EventBus eventBus, Consumer<List<? extends EventMessage<?>>> messageProcessor );", "@Test\n public void unregister() {\n BaseEventBus eventBus = new SynchronousEventBus(LOG);\n\n Object object1 = new Object() {\n @Subscriber\n public void onIntEvent(Integer event) {\n LOG.debug(\"handled event: {}\", event);\n }\n };\n\n Object object2 = new Object() {\n @Subscriber\n public void onStringEvent(String event) {\n LOG.debug(\"handled event: {}\", event);\n }\n };\n\n eventBus.register(object1);\n eventBus.register(object2);\n assertThat(eventBus.objectSubscriberMethods.size(), is(2));\n assertThat(eventBus.eventTypeToSubscriberMethods.size(), is(2));\n assertThat(eventBus.eventTypeToSubscriberMethods.get(String.class).size(), is(1));\n assertThat(eventBus.eventTypeToSubscriberMethods.get(Integer.class).size(), is(1));\n\n eventBus.unregister(object2);\n assertThat(eventBus.objectSubscriberMethods.size(), is(1));\n assertThat(eventBus.eventTypeToSubscriberMethods.size(), is(1));\n assertThat(eventBus.eventTypeToSubscriberMethods.containsKey(String.class), is(false));\n assertThat(eventBus.eventTypeToSubscriberMethods.get(Integer.class).size(), is(1));\n\n eventBus.unregister(object1);\n assertThat(eventBus.objectSubscriberMethods.size(), is(0));\n assertThat(eventBus.eventTypeToSubscriberMethods.size(), is(0));\n }", "@Override\n protected void onDestroy() {\n super.onDestroy();\n EventBus.getDefault().unregister(this);\n }", "private void init() {\n mEventBus = new AsyncEventBus(new HandlerExecutor());\n mEventBus.register(this);\n }", "@ForOverride\n public void onInUse(InternalSubchannel internalSubchannel) {\n }", "@Override\r\n\tpublic void onEvent(Event arg0) {\n\r\n\t}", "private void onUnavailable() {\n // TODO: broadcast\n }", "public abstract void unregister();", "@Override\n public void onObjectMessage(ReceivedObjectMessage message) {\n //ignore the message\n }", "@Override\n protected void onDestroy() {\n EventBus.getDefault().unregister(this);\n\n super.onDestroy();\n }", "@Override\r\n\tprotected void initEvents() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void clearEventHandlers() {\n\t\t\r\n\t}", "public void testCustomEventListener() throws Exception\n {\n checkEventTypeRegistration(CUSTOM_EVENT_BUILDER, \"\");\n }", "public MessageBus()\r\n\t{\r\n\t\tthis(null);\r\n\t}", "public EventLoop method_4094() {\n return null;\n }", "public void consulterEvent() {\n\t\t\n\t}", "@PostConstruct\n public void init() {\n eventBus.register(this);\n }", "@Override\n\tpublic <T> Future<T> sendEvent(Event<T> e) {\n\t\tif(!registrationHashMap.containsKey(e)) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\t// retrieving list of microservices subscribed to this type of event\n\t\t\tArrayList<MicroService> a = registrationHashMap.get(e);\n\t\t\t// first microservice in \"queue will receive the message\n\t\t\tMicroService m = a.get(0);\n\t\t\tint index = registeredMicroservice.indexOf(m);\n\t\t\tmicroserviceMessageQueue.get(index).add(e);\n\t\t\t//round robin implementation - after microservice receives a message it is removed and added\n\t\t\t// in order to keep a linear order in which subscribed microservices receive event\n\t\t\tregistrationHashMap.get(e).remove(m);\n\t\t\tregistrationHashMap.get(e).add(m);\n\t\t\t//Future<Event> result = new Future();\n\t\t\treturn null; //WHAT TO RETURNNNN\n\t\t}\n\t}", "@Override\r\n\tpublic boolean handleEvent(IEvent event) {\n\t\treturn false;\r\n\t}", "protected void onQueued() {}", "@Override\r\n\tpublic void onEvent(Object e) {\n\t}", "public EventHandlerRegistry() {\n }", "protected void clearOutEvents() {\n\t}", "protected void clearOutEvents() {\n\t}", "@Override\n public List<XulEventHandler> getEventHandlers() {\n return null;\n }", "@Override\n\tprotected boolean needUser(String eventName)\n\t{\n\t\treturn false;\n\t}", "@Override\n\tpublic void firePluginEvent(PluginEvent event) {\n\t\t//do nothing\n\t}", "final void rescanService(EventBus eventBus) {\n eventBus.send(config.getAnnounceAddress(), new JsonObject().put(\"status\", Status.UNKNOWN));\n }", "@Test\n public void dispatchToSingleObjectAndSubscriberMethods() {\n BaseEventBus eventBus = new SynchronousEventBus(LOG);\n\n final List<String> object1Received = new ArrayList<>();\n Object object1 = new Object() {\n @Subscriber\n public void onStringEvent(String event) {\n object1Received.add(event);\n }\n };\n\n final List<Integer> object2Received = new ArrayList<>();\n Object object2 = new Object() {\n @Subscriber\n public void onIntEvent(Integer event) {\n object2Received.add(event);\n }\n };\n\n eventBus.register(object1);\n eventBus.register(object2);\n\n eventBus.post(\"event 1\");\n eventBus.post(\"event 2\");\n\n // only object1 should receive all items\n assertThat(object1Received, is(asList(\"event 1\", \"event 2\")));\n assertThat(object2Received, is(emptyList()));\n\n eventBus.post(1);\n\n assertThat(object1Received, is(asList(\"event 1\", \"event 2\")));\n assertThat(object2Received, is(asList(1)));\n\n }", "void registerEventBusForEvent( EventBus eventBus, Consumer<List<? extends EventMessage<?>>> messageProcessor );", "@Override\n public String getEventType()\n {\n\t return null;\n }", "private EventsCollector() {\n\t\tsuper();\n\t}", "public final void onDeregistration()\n {\n onObjectDeregistration();\n this.container = null;\n }", "@Override\n\tpublic void messageBusErrorCallback() {\n\t}", "private void initializeEvents() {\r\n\t}", "@Override\n public void register(Object subscriber) {\n }", "protected void beforeConsume() {\n // Do nothing\n }", "@Override\n\tpublic void brokenSubscription() {\n\t\t\n\t}", "protected abstract void regEvent(boolean regEvent);", "public EventDispatcher(){\r\n\t\tlisteners = new ArrayList<IEventListener>();\r\n\t\tisBlocked=false;\r\n\t}", "@Override\n\tpublic void onNetNoStart(String id) {\n\t\t\n\t}", "boolean shouldAutoSubscribe();", "protected void onStarted() throws ExoPlaybackException {\n // Do nothing.\n }", "@Override\n public void onDestroy() {\n EventBusWraper.getInstance().unregister(mContext);\n super.onDestroy();\n // unRegister();\n }", "@Override\n public void unregister(Object subscriber) {\n }", "@Override\n public void head()\n {\n pushListener(new VoidListener());\n }", "@Override\r\n\tpublic void startEvent() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void startEvent() {\n\t\t\r\n\t}", "@Override\n\tprotected boolean isRegisterGameMessage()\n\t{\n\t\treturn false;\n\t}", "void clearSubscriber() {\n if (!(subscriber instanceof AbortingSubscriber)) {\n subscriber = NeverInvokedSubscriber.get();\n }\n }", "@Override\r\n public void onDestroy() {\n\tEventBus.getDefault().unregister(this);\r\n\tsuper.onDestroy();\r\n }", "@CallSuper\n protected void clear() {\n EventListener eventListener = mUseCaseConfig.getUseCaseEventListener(null);\n if (eventListener != null) {\n eventListener.onUnbind();\n }\n\n mListeners.clear();\n }", "@Override\n\t\t\tpublic IAMQPPublishAction noChannelHandler(INoChannelHandler handler) {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n\t\t\tpublic IAMQPPublishAction noChannelHandler(INoChannelHandler handler) {\n\t\t\t\treturn null;\n\t\t\t}", "private void createEvents() {\n\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}", "public MainEvent() {\n super.register(new HelloWorld());\n }", "@Test\n public void testGetInstance() {\n assertNotNull(eventDispatcher);\n }", "@Override\n\tpublic void handleEvent(Event arg0) {\n\t\t\n\t}", "@Override\r\n public void processEvent(IAEvent e) {\n\r\n }", "@Test\n public void testIAEForAddListener() {\n try {\n final Registrar<Object> testSubject = onCreateTestSubject();\n testSubject.addListener(null);\n fail(\"IAE was not thrown\");\n } catch (IllegalArgumentException e) {\n // okay\n }\n }", "@Override\r\n\tpublic boolean handleMessage(Message msg) {\n\t\treturn false;\r\n\t}", "@Override\n public void onDiscoveryComplete() {\n BusProvider.getInstance().post(new DiscoveryCompleteEvent());\n }", "@Override\n\tprotected void onEventComming(EventCenter eventCenter) {\n\t}", "public void onUnsubscribe() {\n\n }", "protected ICEvent() {}", "public void onMessage(javax.jms.Message message) {\n try {\n Serializable objectMessage = ((ObjectMessage)message).getObject();\n if (Register.class.isInstance(objectMessage)) {\n Register registerMsg = (Register) objectMessage;\n\n String sender = registerMsg.getSender();\n if (spineInstanceList == null) {\n spineInstanceList = new HashSet<String>();\n // Add LOCAL id to the list to ensure no other Spine tries to use it.\n log.trace(\"Adding first registered Spine with id: {}\", clientId);\n if (!sender.startsWith(SpineStatus.TEST_MASTER_STATUS)) {\n spineInstanceList.add(clientId);\n }\n }\n log.trace(\"Client '{}' Received Registration request from '{}'\", clientId, sender);\n TransactionUID uid = registerMsg.getUid();\n boolean permission = true;\n try {\n if (spineInstanceList.contains(sender)) {\n log.info(\"Spine Client id: '{}' has already been used, declining registration.\", sender);\n spine.sendSystemMessage(new RegisterConfirmation(clientId, uid, !permission));\n }\n else {\n spine.sendSystemMessage(new RegisterConfirmation(clientId, uid, permission));\n log.trace(\"Adding client '{}' to the authorized Spine List\", sender);\n if (!sender.startsWith(SpineStatus.TEST_MASTER_STATUS)) {\n spineInstanceList.add(sender);\n }\n }\n } catch (SpineException e) {\n log.warn(\"Exception while sending RegisterConfirmation Message\", e);\n }\n }\n else {\n log.warn(\"Attempt to subscribe to Unsupported Durable Message: '{}'\", message);\n }\n } catch (JMSException e) {\n log.warn(\"Exception while handling Durable Message\", e);\n }\n }", "public void onServiceUnregistered() {\r\n \t// Update the list of sessions\r\n\t\tupdateList();\r\n }", "@Override\r\n\tpublic void handleEvent(Event event) {\n\r\n\t}", "@Override\r\n\tpublic String getEventClass() {\n\t\treturn null;\r\n\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}", "@Override\n public void shutdown() {\n // Do nothing.\n }", "@Override\r\n public boolean callAtLeastOnce() {\r\n this.initEsbPublisherBase();\r\n return this.esbPublisherBase.callAtLeastOnce();\r\n }" ]
[ "0.7239291", "0.6319163", "0.6273078", "0.62366134", "0.6191752", "0.61608994", "0.61597914", "0.6159754", "0.6111316", "0.61081696", "0.60918736", "0.6018543", "0.5991395", "0.59781057", "0.5974673", "0.5964399", "0.59218824", "0.590627", "0.5899773", "0.58526194", "0.57567394", "0.5719422", "0.5680526", "0.5680174", "0.5662911", "0.56498224", "0.5647442", "0.5644557", "0.56403", "0.56397814", "0.5634626", "0.562841", "0.5616342", "0.5612167", "0.5559127", "0.55586946", "0.554975", "0.5544241", "0.5543686", "0.5532772", "0.5532243", "0.5530476", "0.5525459", "0.55224997", "0.55189174", "0.55140185", "0.5513907", "0.5513907", "0.5511381", "0.5506931", "0.5506099", "0.5498779", "0.5496772", "0.54802483", "0.54742706", "0.54614097", "0.5461266", "0.54581034", "0.5456149", "0.54500884", "0.5445103", "0.5438328", "0.5433945", "0.5431517", "0.543041", "0.5429994", "0.5427843", "0.54225767", "0.5415016", "0.5412724", "0.5407491", "0.5407491", "0.5404893", "0.5403109", "0.54006064", "0.54004323", "0.5368559", "0.5368559", "0.5364008", "0.5357771", "0.5357771", "0.5352452", "0.5346306", "0.5338075", "0.533396", "0.53307754", "0.5328555", "0.53245586", "0.5323054", "0.5322539", "0.5319958", "0.5308362", "0.53021127", "0.5301851", "0.52981573", "0.52978116", "0.52978116", "0.52978116", "0.5296266", "0.52853835" ]
0.53841877
76
Accepts fullypopulated Invite and returns the Integer ID; the token should already have been populated. Integer ID is the DB unique identifier; the token is a hashed value serving as a public ID.
Integer addNew(InviteEntity builder) throws IOException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Array({16}) \n\t@Field(2) \n\tpublic Pointer<Byte > InvestorID() {\n\t\treturn this.io.getPointerField(this, 2);\n\t}", "public Integer getInviteUserId() {\n return inviteUserId;\n }", "String getInvitationId();", "InviteEntity getInvitationById(Integer inviteId);", "InviteEntity accept(Integer inviteId);", "int getEnterId();", "int getEnterId();", "int getEnterId();", "int getEnterId();", "public Integer getInvitedUserId() {\n return invitedUserId;\n }", "public cn.zyj.dbexporter.jooq.db_mall.tables.pojos.TCustomerMemberInvite fetchOneById(Long value) {\n return fetchOne(TCustomerMemberInvite.T_CUSTOMER_MEMBER_INVITE.ID, value);\n }", "public String getId() {\n\t\treturn this.token.get(\"id\").toString();\n\t}", "@Override\n public void onInvitationReceived(Invitation invitation) {\n String mIncomingInvitationId = invitation.getInvitationId();\n }", "public void obtenerID();", "public Integer getInvestId() {\r\n\t\treturn investId;\r\n\t}", "public JWT getIDToken() {\n return idToken;\n }", "public Object getMyId(Object obj) {\n\t\tMemberVO requestMemberVO = (MemberVO)obj;\r\n\t\tString name = requestMemberVO.getName();\r\n\t\tString phoneNumber = requestMemberVO.getPhoneNumber();\r\n\r\n\t\tMemberVO memberVO = new MemberVO();\r\n\r\n\t\ttry {\r\n\t\t\tbr = new BufferedReader(new FileReader(\"member.txt\"));\r\n\t\t\tString[] tempStringArray; \r\n\t\t\tString[] temp2StringArray; \r\n\t\t\tArrayList<String> favoriteList = new ArrayList<String>();\r\n\r\n\t\t\tString line = \"\";\r\n\t\t\twhile((line = br.readLine()) != null) {\r\n\t\t\t\ttempStringArray = line.split(\"§§\");\r\n\t\t\t\tmemberVO.setUserNumber(Integer.parseInt(tempStringArray[0]));\r\n\t\t\t\tmemberVO.setId(tempStringArray[1]);\r\n\t\t\t\tmemberVO.setBirth(tempStringArray[2]);\r\n\t\t\t\tmemberVO.setPhoneNumber(tempStringArray[3]);\r\n\t\t\t\tmemberVO.setEmail(tempStringArray[4]);\r\n\t\t\t\tmemberVO.setPassword(tempStringArray[5]);\r\n\t\t\t\tmemberVO.setName(tempStringArray[6]);\r\n\t\t\t\tmemberVO.setGender(tempStringArray[7]);\r\n\t\t\t\tmemberVO.setAddress(tempStringArray[8]);\r\n\t\t\t\tmemberVO.setPoint(Integer.parseInt(tempStringArray[9]));\r\n\t\t\t\ttemp2StringArray = tempStringArray[10].split(\",\");\r\n\t\t\t\tfor(String favorite : temp2StringArray) {\r\n\t\t\t\t\tfavoriteList.add(favorite);\r\n\t\t\t\t}\r\n\t\t\t\tmemberVO.setFavorite(favoriteList);\r\n\t\t\t\tmemberVO.setProfilePhotoPath(tempStringArray[11]);\r\n\r\n\t\t\t\tif(name.equals(memberVO.getName()) && phoneNumber.equals(memberVO.getPhoneNumber())) {\r\n\t\t\t\t\tSystem.out.println(\"아이디 찾기 완료 : \" + memberVO.toString());\r\n\t\t\t\t\treturn memberVO.getId();\r\n\t\t\t\t}\r\n\t\t\t\tfavoriteList.clear();\r\n\t\t\t}\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif(br != null) {\r\n\t\t\t\t\tbr.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"아이디 찾기 실패\");\r\n\t\treturn \"\";\r\n\t}", "@Override\r\n public int getTokenId()\r\n {\r\n return this.tokenId;\r\n }", "private long getOwnID(){\n return authenticationController.getMember() == null ? -1 :authenticationController.getMember().getID();\n }", "long getSteamID();", "@Nullable\n public String getIdToken() {\n return idToken;\n }", "public String getID() {\n return tokenString_ID != null ? tokenString_ID : \"\";\n }", "Invitation getInvitationById(int invitationId);", "public Long getUserIdFromToken(String token) {\n\t\t//Extract claims\n\t\tClaims claims= Jwts.parser().setSigningKey(SecurityConstants.SECRET).parseClaimsJws(token).getBody();\n\t\t//return ID\n\t\treturn Long.parseLong((String)claims.get(\"id\"));\t\t\n\t}", "public String getIdToken() throws IOException {\n return (String)userInfo.get(\"id_token\");\n }", "int getLoginId();", "int getLoginId();", "int getLoginId();", "int getLoginId();", "int getLoginId();", "Integer getID();", "Integer getID();", "public Integer getMemberId() {\n return (Integer) get(2);\n }", "@ApiModelProperty(value = \"Unique identifier of token\")\n public Long getId() {\n return id;\n }", "private long getInitId() {\n if (self.getQuorumVerifier().getVotingMembers().containsKey(self.getMyId())) {\n return self.getMyId();\n } else {\n return Long.MIN_VALUE;\n }\n }", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "public long getIdToChat(String inviteLink){\n return getLongValue(inviteLink);\n }", "@Override\n\tpublic Object getLocalIdentity(AuthUserIdentity identity) {\n\t\tUser u = User.findByAuthUserIdentity(identity);\n\t\tif (u != null) {\n\t\t\treturn u.id;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public String getIdentityId() {\n\n // Load the identityId from the cache\n// identityId = cachedIdentityId;\n\n if (identityId == null) {\n // Call to your backend\n identityId = mFirebaseRef.getAuth().getUid();\n }\n return identityId;\n }", "String getIdentityId();", "public int getguestID(){\n return givedata.returnGuestID();\n }", "String getExistingId();", "@Override\n public ID getID() {\n // If it is incomplete, there's no meaningful ID that we can return.\n if (gid == null || pid == null) {\n return null;\n }\n\n try {\n String hashValue = getAdvertisementType() + gid.getUniqueValue().toString() + pid.getUniqueValue().toString();\n byte[] seed = hashValue.getBytes(\"UTF-8\");\n\n return IDFactory.newContentID(gid, seed, new ByteArrayInputStream(seed));\n } catch (Exception failed) {\n return null;\n }\n }", "public int getID(OrderItem oi){\n int id;\n id=findID(oi);\n return id;\n }", "java.lang.String getFriendId();", "java.lang.String getFriendId();", "long getLoginId();", "long getLoginId();", "long getLoginId();", "private void receiveId() throws Exception {\n\t\tint id = in.readInt();\n\t\t//intByteBuffer.clear();\n\t\t\n\t //if(numOfBytes < 0)\n\t // throw new Exception(\"Connection to server lost\");\n\t \n\t //if(numOfBytes < 4) {\n\t // System.err.println(\"Received only \" + numOfBytes + \" bytes in receiveId\");\n\t // return;\n\t //}\n\t \n\t GameActivity.getInstance().model().player().setId(id);\n\t \n\t System.out.println(\"id: \" + GameActivity.getInstance().model().player().id());\n\t}", "public int getUser1X_ID();", "public int getId(){\r\n return localId;\r\n }", "public int getEnterId() {\n return enterId_;\n }", "public int getEnterId() {\n return enterId_;\n }", "public int getEnterId() {\n return enterId_;\n }", "public int getEnterId() {\n return enterId_;\n }", "public int getIdentifiant() {\r\n return identifiant;\r\n }", "@Override\n\tpublic String getTokenId() {\n\t\treturn null;\n\t}", "public Long getTokenId() {\n\t\treturn tokenId;\n\t}", "public Integer getMemberId() {\n return memberId;\n }", "public Integer getMemberId() {\n return memberId;\n }", "private Integer extractId(Request request) throws InvalidInputException {\n\t\tString intString = (String)request.getAttributes().get(RequestParamConstants.PARAM_META_ID);\n\t\tInteger id = null;\n\t\ttry {\n\t\t\tid = new Integer(intString);\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new InvalidInputException(\"Bad integer format in id: \"+intString, e);\n\t\t}\n\t\treturn id;\n\t}", "public String getInoId();", "String getUserID();", "public String getInviteCode() {\n return inviteCode;\n }", "public String getTokenId() {\n return tokenId;\n }", "public int getMemberId() {\n\t\treturn memberIDCounter++;\n\t}", "Integer getId();", "Integer getId();", "Integer getId();", "public Integer getMemberInfoId() {\n return memberInfoId;\n }", "int getItemID();", "Long getInvoiceId();", "String getLoginId();", "java.lang.String getUserID();", "java.lang.String getUserID();", "java.lang.String getUserID();", "public int getId() {\n return oid ;\n }", "int getMyId();", "private @Nullable IdentifierToken eatId() {\n if (peekId()) {\n return eatIdOrKeywordAsId();\n } else {\n reportExpectedError(peekToken(), TokenType.IDENTIFIER);\n if (peekIdOrKeyword()) {\n return eatIdOrKeywordAsId();\n } else {\n return null;\n }\n }\n }", "Long getRemoteID() throws RemoteException;", "long getPlayerId();", "public String getUserId() {\n if (this.isTokenValide()) {\n JWT jwt = new JWT(getToken());\n Claim claim = jwt.getClaim(\"user_id\");\n return claim.asString();\n } else {\n return \"\";\n }\n }", "String getTheirPartyId();" ]
[ "0.6137889", "0.6090536", "0.5937732", "0.564966", "0.56043863", "0.55775094", "0.55775094", "0.55775094", "0.55775094", "0.55758137", "0.5518231", "0.5477271", "0.54637307", "0.5390294", "0.5383535", "0.5317124", "0.5308653", "0.53043294", "0.525857", "0.52544236", "0.5246884", "0.5204653", "0.51836306", "0.51649004", "0.5146333", "0.51428735", "0.51428735", "0.51428735", "0.51428735", "0.51428735", "0.5122738", "0.5122738", "0.5113619", "0.5073465", "0.5058219", "0.50467736", "0.50467736", "0.50467736", "0.50467736", "0.50467736", "0.50467736", "0.50467736", "0.50467736", "0.50467736", "0.50467736", "0.50467736", "0.50467736", "0.50467736", "0.50467736", "0.50467736", "0.50467736", "0.50467736", "0.50405186", "0.50366116", "0.5020912", "0.5010511", "0.49621573", "0.4957467", "0.4948498", "0.49458194", "0.49328777", "0.49328777", "0.49271268", "0.49271268", "0.49271268", "0.49172854", "0.49110138", "0.49075925", "0.48927522", "0.48927522", "0.48927522", "0.48927522", "0.48864734", "0.4883483", "0.48798126", "0.4873551", "0.4873551", "0.48695385", "0.48665145", "0.48651785", "0.48582765", "0.48547634", "0.48395592", "0.48395112", "0.48395112", "0.48395112", "0.4827738", "0.48244718", "0.4818377", "0.48144275", "0.4813792", "0.4813792", "0.4813792", "0.48112643", "0.48102137", "0.4809083", "0.48050052", "0.48014402", "0.4799105", "0.4792882" ]
0.4924164
65
Returns a list of fullypopulated Invitations for the given Outing.
List<InviteEntity> getInvitationsByOuting(Integer outingId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<InviteEntity> getUpcomingInvitationsByMemberId(Integer memberId);", "@Transactional(readOnly = true)\n public Page<Invitation> findAll(Pageable pageable) {\n log.debug(\"Request to get all Invitations\");\n return invitationRepository.findAll(pageable);\n }", "public Page<Invitation> getInvitations(Pageable pageable, long id) {\n\t\tPage<Invitation> invis = invitationRepository.searchByInvitado(pageable, id);\n\t\treturn invis;\n\t}", "public List<User> getInvitedUsers(Long idEvent){\n List<Invitation> invitations =\n im.findByIdEvent(idEvent);\n List<User> users = new ArrayList<>();\n \n for (Invitation i : invitations){\n users.add(i.getUser());\n }\n \n return users;\n }", "@Override\n public List<InquiryDTO> getAllPendingInquiries() {\n final List<Inquiry> inquiryList = inquiryRepository.getAllPendingInquiries();\n List<InquiryDTO> theInquiryReturn = new ArrayList<>();\n\n for (Inquiry eachInquiry : inquiryList) {\n theInquiryReturn.add(getTheReturnConstructed(eachInquiry));\n }\n return theInquiryReturn;\n }", "@ThinkParityAuthenticate(AuthenticationType.USER)\n public List<OutgoingEMailInvitation> readOutgoingEMailInvitations(\n final JabberId userId, final EMail email);", "public void sendInvitations(){\r\n for(int i = 0; i< emails.size(); i++){\r\n System.out.println(\"Inviting: \" + emails.get(i));\r\n }\r\n\r\n }", "public List<OutgoingEMailInvitation> readProxyOutgoingEMailInvitations(\n final JabberId proxyId);", "public @RequestMapping(\n\t\t\tvalue = \"/list\",\n\t\t\tmethod = GET,\n\t\t\tproduces = JSON\n\t) OfferInfo[] getMeetingList(Authentication authentication,\n\t\t\t\t\t\t\t\t @RequestParam(\"id\") Long partyId) {\n\n\t\tfinal Long id = longID(authentication);\n\t\tfinal List<Long> users = service.party.getPartyInfo(partyId, id).getUsers();\n\n\t\tif (users.stream().noneMatch(id::equals)) return null;\n\t\treturn service.meetingOffer.getOfferList(partyId);\n\t}", "public List<Meeting> getMeetings() {\n\t\treturn null;\n\t}", "public List<Meeting> getMeetings(int projectId);", "public List getFiAvailableInvoices(FiAvailableInvoice fiAvailableInvoice);", "public ArrayList<String> getAttendees() {\n return new ArrayList<>(this.usernames);\n }", "public List<Object> retrieveIncrementalMemberships() {\n List<Object> result = new ArrayList<Object>();\n for (ProvisioningMembershipWrapper provisioningMembershipWrapper : this.provisioningMembershipWrappers) {\n \n if (provisioningMembershipWrapper.getGrouperTargetMembership() != null) {\n result.add(provisioningMembershipWrapper.getGrouperTargetMembership());\n } else if (provisioningMembershipWrapper.getGrouperProvisioningMembership() != null) {\n result.add(provisioningMembershipWrapper.getGrouperProvisioningMembership());\n } else if (provisioningMembershipWrapper.getGcGrouperSyncMembership() != null) {\n result.add(provisioningMembershipWrapper.getGcGrouperSyncMembership());\n } else if (provisioningMembershipWrapper.getProvisioningStateMembership() != null) {\n result.add(provisioningMembershipWrapper.getProvisioningStateMembership());\n }\n }\n return result;\n }", "@Override\r\n\tpublic List<User> getAllInvitateCode() {\n\t\treturn userMapper.getAllInvitateCode();\r\n\t}", "public java.util.List<pl.stormit.protobuf.UserProtos.User.Interest> getInterestsList() {\n if (interestsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(interests_);\n } else {\n return interestsBuilder_.getMessageList();\n }\n }", "List<Friend> getPendingRequests(String email);", "Invitation getInvitationById(int invitationId);", "public ArrayList<String> getAttendees(){\r\n return attendees;\r\n }", "@Override\n public String toString() {\n return \"Invitation{\" +\n \"personId=\" + personId +\n \", party=\" + party +\n \", status='\" + status + '\\'' +\n '}';\n }", "public List<Individual> getListOfInactiveIndividuals(){\n\t \tList<Individual> individualList = new ArrayList<>();\n\t\tList<Individual> inactiveIndividualList = new ArrayList<>();\n\t\tindividualList = (new TeamsJsonReader()).getListOfIndividuals();\n\t\tIndividual individual = null;\n\t\tint size, counter;\n\t\tfor (size = 0; size < individualList.size(); size++) {\n\t\t\tcounter = 0;\n\n\t\t\tindividual = individualList.get(size);\n\n\t\t\tif (!individual.isActive()) {\n\t\t\t\tcounter = 1;\n\n\t\t\t\tinactiveIndividualList.add(individual);\n\n\t\t\t}\n\t\t}\n\n\t\treturn inactiveIndividualList;\n }", "public List<InventoryEntry> getInventoryEntries();", "public final List<Meeting> listAllMeeting() {\n\t\tList<Meeting> results;\n\t\tfinal TypedQuery<Meeting> query;\n\t\tquery = em.createQuery(\"SELECT e FROM Meeting e \"\n\t\t\t\t+ \"ORDER BY e.startDate DESC \", Meeting.class);\n\t\tresults = query.getResultList();\n\t\treturn results;\n\t}", "@Override\n\tpublic List<Inmate> getInmate(long startDate, long endDate) {\n\t\treturn null;\n\t}", "public List getInwDepartCompetences(InwDepartCompetence inwDepartCompetence);", "public ArrayList<String> getAllEmails() {\n return allEmails;\n }", "@Override\r\n\tpublic List<Invoice> findAll() {\n\t\treturn null;\r\n\t}", "public JSONResponse getCheckedInParticipants() {\n\t\tcheckProvided();\n\t\treturn checkedInParticipants;\n\t}", "public com.google.protobuf.ProtocolStringList\n getInviteeIdsList() {\n return inviteeIds_;\n }", "private Collection<ConnectionEntry> getMyInvites(Map<String, String> parameters)throws ProfileServiceException{\n \t\tif (logger.isLoggable(Level.FINEST)) {\n \t\t\tlogger.entering(sourceClass, \"getMyInvites\", parameters);\n \t\t}\n \n \t\tDocument data = null;\n \t\tCollection<ConnectionEntry> invites = null;\n \t\tString url = resolveProfileUrl(ProfileEntity.NONADMIN.getProfileEntityType(),\n \t\t\t\tProfileType.CONNECTIONS.getProfileType());\n \t\tdata = executeGet(url, parameters, ClientService.FORMAT_XML);\n \t\tif(parameters.containsKey(\"outputType\")){\n \t\t\tif(parameters.get(\"outputType\").equalsIgnoreCase(\"profile\")){\n \t\t\t\tinvites = Converter.returnConnectionEntries(data, \"profile\");\n \t\t\t}\n \t\t\telse \n \t\t\t\tinvites = Converter.returnConnectionEntries(data, \"connection\");\n \t\t}\n \t\telse{\n \t\t\tinvites = Converter.returnConnectionEntries(data, \"connection\");\n \t\t}\n \t\tif (logger.isLoggable(Level.FINEST)) {\n \t\t\tlogger.exiting(sourceClass, \"getMyInvites\");\n \t\t}\n \t\treturn invites;\n \t}", "public java.util.List<de.fraunhofer.fokus.movepla.model.Entitlement> findAll()\n throws com.liferay.portal.kernel.exception.SystemException;", "@Override\n public List<Invitation> findAllForNotificationByEventSortedByName(final Event event) {\n List<Invitation> list = findAllByEventSortedByName(event);\n \n // filter out those that do not want to receive email notifications\n Iterable<Invitation> filtered = Iterables.filter(list, new Predicate<Invitation>() {\n private List<Player> players;\n {\n players = playerManager.findAllByTeam(event.getTeam());\n }\n @Override\n public boolean apply(@Nullable final Invitation invitation) {\n if (!invitation.hasEmail()) {\n return false;\n } else {\n // check if player has opted out of email notifications\n for (Player player : players) {\n if (player.getUser().equals(invitation.getUser())) {\n return player.isNotification();\n }\n }\n // this happens for invitees who are not team-members (invitees that were later added).\n return true;\n }\n }\n });\n return ImmutableList.copyOf(filtered);\n }", "Map<Long, Integer> getUsersWithPendingMeeting();", "public ArrayList<Bookings> getMyBookings() {\n return myBookings;\n }", "public SimpleList<Bidding> getBiddingsList() throws IOException{\r\n\t\treturn biddingPersistence.getAllBiddings();\r\n\t}", "public com.google.protobuf.ProtocolStringList\n getInviteeIdsList() {\n return inviteeIds_.getUnmodifiableView();\n }", "java.util.List<pl.stormit.protobuf.UserProtos.User.Interest> \n getInterestsList();", "public CachetIncidentList getIncidents() {\n throw new RuntimeException(\"Method not implemented.\");\n }", "@Override\n\tpublic List<Meeting> getAllMettingList() {\n\t\treturn (List<Meeting>) meetingRepository.findAll();\n\t}", "public List<ProvisioningMembership> getProvisioningMemberships() {\n return provisioningMemberships;\n }", "List<Enrolment> getAll();", "protected List<Membership> getMemberships() {\n return new ArrayList<Membership>(memberships.values());\n }", "List<SimpleInventory> getInventories();", "public Object[] getEmails() {\r\n String encodedEmails = insertMode ? null : stringValue(CONTACTS_EMAIL_ADDRESSES);\r\n return decodeEmails(encodedEmails);\r\n }", "@Override\n\tpublic List<Inventory> getAllInventories() {\n\t\tArrayList<Inventory> inventories = new ArrayList<Inventory>();\n\t\tinventoryDao.findAll().forEach(inventories::add);\n\t\treturn inventories;\n\t}", "@Override\n\tpublic String[] getOutsideOwners() {\n\t\treturn new String[0];\n\t}", "ObservableList<Booking> getUpcomingBookingList();", "List<IdentificationDTO> getIdentificationList();", "List<InventoryItem> getInventory();", "public nl.webservices.www.soap.InsolvencyPublications getEvents() {\n return events;\n }", "public ArrayList<BreakoutIf> getBreakoutIf() {\n return breakoutIfs;\n }", "@Override \r\n\tpublic Set<String> emailList() {\n\t\treturn new HashSet<String>(jdbcTemplate.query(\"select * from s_member\",\r\n\t\t\t\t(rs,idx)->{return rs.getString(\"email\");}));\r\n\t}", "List<PingableUser> getPingableUsers(int roomId) throws IOException;", "public ArrayList<Listing> getListings() {\n\n return this.listings;\n }", "public ArrayList<String> getEmails(){\r\n return emails; //emails.toString();\r\n }", "private void getApprovalPendingNotices() {\n noOfRows = appParametersDAO.getIntParameter(MR_APPROVAL_ROWS_PER_PAGE);\n filterAndLoadMarriageNotices();\n }", "public java.util.List<? extends pl.stormit.protobuf.UserProtos.User.InterestOrBuilder> \n getInterestsOrBuilderList() {\n if (interestsBuilder_ != null) {\n return interestsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(interests_);\n }\n }", "public abstract List<AbstractRelationshipTemplate> getIngoingRelations();", "@Override\n\tpublic List<Parking> vIPOutParking() {\n\t\treturn parkingRepository.vIPOutParking();\n\t}", "public java.util.List<pl.stormit.protobuf.UserProtos.User.Interest> getInterestsList() {\n return interests_;\n }", "public synchronized Membership.MembershipList getMembershipList() {\n Membership.MembershipList.Builder builder = Membership.MembershipList.newBuilder().addMember(localMemberHealth.toMember());\n for (MemberHealth memberHealth : memberHealths) {\n if (!memberHealth.hasLeft() && !memberHealth.hasFailed()) {\n builder.addMember(memberHealth.toMember());\n }\n }\n return builder.build();\n }", "public Set<Integer> listBookings(){\r\n\t\treturn bookings.keySet();\r\n\t}", "public ArrayList<String> getListingIds() {\n\t \n\t return this.listingIds;\n }", "@Override\n public List<EmailNotification> list() {\n DetachedCriteria criteria = DetachedCriteria.forClass(EmailNotification.class);\n List<EmailNotification> notifications = hibernateTemplate.findByCriteria(criteria);\n return notifications;\n }", "public List<InmuebleEntity> getInmuebleEntityList() {\n return inmuebleEntityList;\n }", "@Override\n\tpublic List<Inmate> getInmates() {\n\t\treturn null;\n\t}", "List<ScPartyMember> selectAll();", "@Override\n\tpublic List<item> findAll() {\n\t\treturn donkyClientFeign.lista().stream().map(p -> new item(p,1)).collect(Collectors.toList());\n\t}", "ImmutableList<SchemaOrgType> getOffersList();", "@Override\r\n\tpublic List<Cita> getAppointmentList() {\r\n\r\n\t\t// find all users\r\n\t\tList<User> users = (List<User>) userService.findAll();\r\n\t\t// create a new arrayList of appointments\r\n\t\tList<Cita> appointments = new ArrayList<>();\r\n\r\n\t\t// iterate over the list of all the users\r\n\t\tfor (Iterator<User> user = users.iterator(); user.hasNext();) {\r\n\t\t\t// get the user from the forEach\r\n\t\t\tUser getUser = user.next();\r\n\r\n\t\t\t// iterate over the AppointmentList\r\n\t\t\tfor (Cita item : getUser.getCitas()) {\r\n\r\n\t\t\t\t// check if the class is not empty\r\n\t\t\t\tif (item != null) {\r\n\t\t\t\t\tappointments.add(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn appointments;\r\n\t}", "public List<Inhabitant> getInhabitants() {\n\t\treturn inhabitants;\n\t}", "public Invitation(){}", "public static List get_all(Session session){\n\t\tQuery query = session.createSQLQuery(\"select * from impu\")\n\t\t.addEntity(IMPU.class);\n\t\treturn query.list();\n\t}", "public java.util.List<pl.stormit.protobuf.UserProtos.User.Interest.Builder> \n getInterestsBuilderList() {\n return getInterestsFieldBuilder().getBuilderList();\n }", "public List<Inventory> getInventory();", "public Set<E> getIn() {\n return in;\n }", "void setInvitationId(String invitationId);", "@Override\n\tpublic ArrayList<InBillsPO> getInBill(int start, int end) {\n\t\treturn null;\n\t}", "public Set<Entitlement> getEntitlements() {\n return entitlements;\n }", "public Invitation getInvitation(long id, long userId) {\n\t\treturn invitationRepository.serarchByIds(id, userId);\n\t}", "@Override\r\n\tpublic List<BookedMeeting> getAllBookedMeetingfromDB() {\n\t\t\r\n\t\tSession session = factory.openSession();\r\n\t\t//session.beginTransaction();\r\n\t\t\r\n\t\tArrayList<BookedMeeting> bookedMeeting=(ArrayList<BookedMeeting>) session.createQuery(\"from BookedMeeting\").list();\r\n\t\t\r\n\t\tsession.close();\r\n\t\treturn bookedMeeting;\r\n\t}", "public List<InvoiceViewModel> getAllInvoices(){\n\n try{\n return invoiceService.getAllInvoices();\n }catch (RuntimeException e){\n throw new InvoiceNotFoundException(\"The database is empty!!! No Invoice(s) found in the Database\");\n }\n }", "public static List<Invoice> getAllInvoices() {\n\t\tList<Invoice> invoiceList = new ArrayList<Invoice>();\n\t\tConnection conn = ConnectionFactory.getConnection();\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\t\n\t\tString query = \"SELECT invoiceKey, invoiceUuid, customerKey, personKey FROM Invoice\";\n\t\t\n\t\t//This try/catch executes the query from above to retrieve all invoices in the DB\n\t\ttry {\n\t\t\tps = conn.prepareStatement(query);\n\t\t\trs = ps.executeQuery();\n\t\t\t//while there are still invoices in the database continue\n\t\t\twhile (rs.next()) {\n\t\t\t\tint invoiceKey = rs.getInt(\"invoiceKey\"); \n\t\t\t\tString invoiceUuid = rs.getString(\"invoiceUuid\");\n\t\t\t\tint customerKey = rs.getInt(\"customerKey\");\n\t\t\t\tint personKey = rs.getInt(\"personKey\");\n\t\t\t\t\n\t\t\t\t//Get the corresponding customer, salesperson, and productList from the database\n\t\t\t\tCustomer customer = Customer.getCustomerByKey(customerKey);\n\t\t\t\tPerson salesPerson = Person.getPersonByKey(personKey);\n\t\t\t\tList<Product> productList = DatabaseReader.getProductList(invoiceKey);\n\t\t\t\t\n\t\t\t\tInvoice invoices = new Invoice(invoiceUuid, customer, salesPerson, productList);\n\t\t\t\tinvoiceList.add(invoices);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"SQLException: \");\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(e);\n\t\t} finally {\n\t\t\t//Close the connections that were opened in this method.\n\t\t\tConnectionFactory.closeConnection(conn, ps, rs);\n\t\t}\n\t\treturn invoiceList;\n\t}", "public List<resPackageMembership> getPackageMembershipAll(){\n List<resPackageMembership> PackageMembershipList = new ArrayList<>();\n repoPackageMembership.findAll().forEach(PackageMembershipList::add);\n return PackageMembershipList;\n }", "public List<Attending> getAttending(){\r\n \tList<Attending> aList = new ArrayList<Attending>();\r\n \ttry {\r\n \t\tString attendingPath = \"C:\\\\Users\\\\Tam Uduc\\\\Documents\\\\tempJavaData\\\\attending.csv\";\r\n \t\tFile attendingFile = new File(attendingPath);\r\n \t\tScanner sc = new Scanner(attendingFile);\r\n \t\t\r\n \t\twhile (sc.hasNextLine()) {\r\n \t\t\tString[] line = sc.nextLine().split(\",\");\r\n \t\taList.add(new Attending(line[0],line[1]));\r\n \t\t}\r\n \t\t\r\n \t} catch (Exception e){\r\n \t\tSystem.out.println(\"Something went wrong\");\r\n \t}\r\n \treturn aList; \r\n }", "public Enumeration getNotations() {\r\n return notations.elements();\r\n }", "public ArrayList<OrderBillPO> getUnmarkingBills() {\n\t\tArrayList<OrderBillPO> result;\n\t\ttry {\n\t\t\tresult=si.getUnjudged();\n\t\t\treturn result;\n\t\t} catch (RemoteException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}", "public List<IPermissionOwner> getAllPermissionOwners();", "java.util.List<WorldUps.UGoDeliver> \n getDeliveriesList();", "ImmutableList<SchemaOrgType> getCitationList();", "public List<FirewallOutbounds> selectFirewallOutbounds() {\n\n\t\tList<FirewallOutbounds> customers = new ArrayList<FirewallOutbounds>();\n\t\tConnection connection = null;\n\t\tPreparedStatement preparedStatement = null;\n\t\tResultSet resultSet = null;\n\n\t\ttry {\n\n\t\t\tconnection = (Connection) DBConnection.getConnection();\n\t\t\tString sql = \"select * from firewall_outbounds\";\n\t\t\tpreparedStatement = (PreparedStatement) connection.prepareStatement(sql);\n\t\t\tresultSet = preparedStatement.executeQuery();\n\n\t\t\tFirewallOutbounds customer = null;\n\t\t\twhile (resultSet.next()) {\n\n\t\t\t\tcustomer = new FirewallOutbounds();\n\n\t\t\t\tcustomer.setOut_type(resultSet.getString(1));\n\t\t\t\tcustomer.setOut_protocol(resultSet.getString(2));\n\t\t\t\tcustomer.setOut_portrange(resultSet.getString(3));\n\t\t\t\tcustomer.setOut_source(resultSet.getString(4));\n\t\t\t\tcustomer.setOut_ip(resultSet.getString(5));\n\t\t\t\tcustomer.setOut_name(resultSet.getString(6));\n\n\t\t\t\tcustomers.add(customer);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.error(e.getMessage());\n\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tresultSet.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\tLOGGER.error(e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\treturn customers;\n\t}", "@Override\n\tpublic List<Appointment> getUpcomingAppointments() {\n\t\treturn mobileDao.getUpcomingAppointments();\n\t}", "private List<EnrichmentEntity> enrichmentEntities (BirthCaseEnrichment birthCaseEnrichment) {\n ArrayList<EnrichmentEntity> entities = new ArrayList<>();\n\n// for(OrganisationsToInformResponse otir : birthCaseEnrichment.getOrganisationsToInform()) {\n for(OrganisationsToInformResponse otir : birthCaseEnrichment.getOrganisationsToInformResponse()) {\n entities.add(\n createEnrichmentEntity(birthCaseEnrichment.getCouncil(), otir.getOrganisation(), otir.isResponse() ) );\n }\n\n return entities;\n }", "public List<FirewallInbounds> selectFirewallInbounds() {\n\n\t\tList<FirewallInbounds> customers = new ArrayList<FirewallInbounds>();\n\t\tConnection connection = null;\n\t\tPreparedStatement preparedStatement = null;\n\t\tResultSet resultSet = null;\n\n\t\ttry {\n\n\t\t\tconnection = (Connection) DBConnection.getConnection();\n\t\t\tString sql = \"select * from firewall_inbounds\";\n\t\t\tpreparedStatement = (PreparedStatement) connection.prepareStatement(sql);\n\t\t\tresultSet = preparedStatement.executeQuery();\n\n\t\t\tFirewallInbounds customer = null;\n\t\t\twhile (resultSet.next()) {\n\n\t\t\t\tcustomer = new FirewallInbounds();\n\n\t\t\t\tcustomer.setIn_type(resultSet.getString(1));\n\t\t\t\tcustomer.setIn_protocol(resultSet.getString(2));\n\t\t\t\tcustomer.setIn_portrange(resultSet.getString(3));\n\t\t\t\tcustomer.setIn_source(resultSet.getString(4));\n\t\t\t\tcustomer.setIn_ip(resultSet.getString(5));\n\t\t\t\tcustomer.setIn_ip(resultSet.getString(6));\n\n\t\t\t\tcustomers.add(customer);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.error(e.getMessage());\n\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tresultSet.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\tLOGGER.error(e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\treturn customers;\n\t}", "public Iterable<Boat> boatsOwnedByMember(){ return this.boats; }", "public java.lang.String getInviteeIds(int index) {\n return inviteeIds_.get(index);\n }", "public Iterator getLobbies() {\n rrwl_lobbylist.readLock().lock();\n try {\n return lobbyList.iterator();\n } finally {\n rrwl_lobbylist.readLock().unlock();\n }\n }", "public ArrayList<String> getSignedUpForEvents(String organizerId){\n return idToPerson.get(organizerId).getEventList();\n }", "public LiveData<List<DatabaseObject<Event>>> getAttendingEvents() {\n return mCachedEventsLiveData;\n }", "Collection<User> getInstructors() throws DataAccessException;" ]
[ "0.6033148", "0.58183205", "0.56924134", "0.5571515", "0.55566436", "0.5301625", "0.52669674", "0.52305144", "0.5153856", "0.51377636", "0.5095766", "0.50833416", "0.5069788", "0.50682306", "0.50559765", "0.504749", "0.50384134", "0.49973854", "0.49770004", "0.49232575", "0.49169907", "0.48739374", "0.48335654", "0.48273855", "0.4825866", "0.482266", "0.47954097", "0.4784509", "0.4778449", "0.476696", "0.47650835", "0.476098", "0.47534618", "0.47451636", "0.47411463", "0.4688776", "0.46717942", "0.46705663", "0.46461064", "0.46427503", "0.46345797", "0.46318328", "0.4620751", "0.46150082", "0.4596887", "0.45934698", "0.45934317", "0.45892587", "0.45800832", "0.45767722", "0.45736635", "0.45678693", "0.45650032", "0.45594797", "0.45518613", "0.45462108", "0.45454034", "0.4537816", "0.45350456", "0.45336664", "0.45253006", "0.45215952", "0.45211223", "0.45181677", "0.45179307", "0.4504934", "0.45040405", "0.4495428", "0.4494534", "0.44915634", "0.4483204", "0.44789746", "0.44785455", "0.44769058", "0.44725266", "0.44688705", "0.44681948", "0.4466745", "0.4462151", "0.4458711", "0.4450794", "0.4443926", "0.44404063", "0.44329432", "0.44280985", "0.44269168", "0.4425562", "0.44210565", "0.44182366", "0.441428", "0.44123846", "0.44109264", "0.44074947", "0.44025993", "0.43939567", "0.43930238", "0.43906415", "0.4384392", "0.4383978", "0.43836626" ]
0.7814468
0
Given a memberId, retrieve the list of Active Invitations in order of soonest to latest.
List<InviteEntity> getUpcomingInvitationsByMemberId(Integer memberId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Expense> getExpensesPaidByMember(int memberid){\n\t\tList<Expense> expenses = new ArrayList<Expense>();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(\"SELECT expense.id, senderid, amount, expensedate, description FROM expense INNER JOIN expense_receiver ON expense.id = expense_receiver.expenseid WHERE senderid ='\" + memberid+ \"' AND receiverid ='\" + settings.getCurrentMember().getId() +\"'\");\n\t\t\tResultSet set = statement.executeQuery();\n\n\t\t\tfor(@SuppressWarnings(\"unused\")int i = 0; set.next(); i++) {\n\t\t\t\texpenses.add(new Expense(set.getInt(1), set.getInt(2),set.getDouble(3), set.getString(4), set.getString(5)));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttry{\n\t\t\t\tstatement.close();\n\t\t\t}catch(SQLException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn expenses;\n\t}", "public List<Expense> getExpensesPaidToMember(int memberid){\n\t\tList<Expense> expenses = new ArrayList<Expense>();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(\"SELECT expense.id, senderid, amount, expensedate, description FROM expense INNER JOIN expense_receiver ON expense.id = expense_receiver.expenseid WHERE senderid ='\" + settings.getCurrentMember().getId()+ \"' AND receiverid ='\" + memberid +\"'\");\n\t\t\tResultSet set = statement.executeQuery();\n\n\t\t\tfor(@SuppressWarnings(\"unused\")int i = 0; set.next(); i++) {\n\t\t\t\texpenses.add(new Expense(set.getInt(1), set.getInt(2),set.getDouble(3), set.getString(4), set.getString(5)));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttry{\n\t\t\t\tstatement.close();\n\t\t\t}catch(SQLException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn expenses;\n\t}", "public List<User> getInvitedUsers(Long idEvent){\n List<Invitation> invitations =\n im.findByIdEvent(idEvent);\n List<User> users = new ArrayList<>();\n \n for (Invitation i : invitations){\n users.add(i.getUser());\n }\n \n return users;\n }", "public Page<Invitation> getInvitations(Pageable pageable, long id) {\n\t\tPage<Invitation> invis = invitationRepository.searchByInvitado(pageable, id);\n\t\treturn invis;\n\t}", "List<InviteEntity> getInvitationsByOuting(Integer outingId);", "@Override\n\tpublic List<OrderVO> orderListForMember(String MEMBER_ID) throws Exception {\n\t\treturn session.selectList(\"orderMapper.orderListForMember\",MEMBER_ID);\n\t}", "@Override\r\n\tpublic List<ExecuteTask> getByMember(int memberId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_member_id = ?\";\r\n\t\treturn getForList(sql,memberId);\r\n\t}", "public void moveMemberToObsoleteList(String memberId) {\n if (memberId == null) {\n return;\n }\n\n // check active member list\n Iterator<MemberContext> activeMemberIterator = activeMembers.listIterator();\n MemberContext removedMember = this.removeMemberFrom(activeMemberIterator, memberId);\n if (removedMember != null) {\n this.addObsoleteMember(removedMember);\n removedMember.setObsoleteInitTime(System.currentTimeMillis());\n if (log.isDebugEnabled()) {\n log.debug(String.format(\"Active member is removed and added to the \" +\n \"obsolete member list. [Member Id] %s\", memberId));\n }\n\n return;\n }\n\n // check pending member list\n Iterator<MemberContext> pendingMemberIterator = pendingMembers.listIterator();\n removedMember = this.removeMemberFrom(pendingMemberIterator, memberId);\n if (removedMember != null) {\n this.addObsoleteMember(removedMember);\n removedMember.setObsoleteInitTime(System.currentTimeMillis());\n if (log.isDebugEnabled()) {\n log.debug(String.format(\"Pending member is removed and added to the \" +\n \"obsolete member list. [Member Id] %s\", memberId));\n }\n\n return;\n }\n\n // check termination pending member list\n Iterator<MemberContext> terminationPendingMembersIterator = terminationPendingMembers.listIterator();\n removedMember = this.removeMemberFrom(terminationPendingMembersIterator, memberId);\n if (removedMember != null) {\n this.addObsoleteMember(removedMember);\n removedMember.setObsoleteInitTime(System.currentTimeMillis());\n if (log.isDebugEnabled()) {\n log.debug(String.format(\"Termination Pending member is removed and added to the \" +\n \"obsolete member list. [Member Id] %s\", memberId));\n }\n }\n }", "@GetMapping(path = \"api/activity/attendees/{id}\")\n public ArrayList<UserDTO> getAttendees(@PathVariable long id) {\n return userService.getAttendees(id);\n }", "@GetMapping(path=\"/{id}/getTasks\")\n public @ResponseBody List<Task> getTasksForMember(@PathVariable long id){\n return taskRepository.findByTeammember(teamMemberRepository.getOne(id));\n }", "public List<Individual> getListOfActiveIndividuals(){\n List<Individual> individualList = new ArrayList<>();\n\t\tList<Individual> activeIndividualList = new ArrayList<>();\n\t\tindividualList = (new TeamsJsonReader()).getListOfIndividuals();\n\t\tIndividual individual = null;\n\t\tint size, counter;\n\t\tfor (size = 0; size < individualList.size(); size++) {\n\t\t\tcounter = 0;\n\n\t\t\tindividual = individualList.get(size);\n\n\t\t\tif (individual.isActive()) {\n\t\t\t\tcounter = 1;\n\n\t\t\t\tactiveIndividualList.add(individual);\n\n\t\t\t}\n\t\t}\n\n\t\treturn activeIndividualList;\n\n }", "@Override\r\n\tpublic List<ExecuteTask> getByMemberByOrg(int memberId, int organizationId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_member_id = ? AND et_member_id IN(SELECT mem_id FROM member WHERE mem_organization_id IN\"\r\n\t\t\t\t+ \"(SELECT org_id FROM organization WHERE org_id = ? OR org_parent_organization_id = ?))\";\r\n\t\treturn getForList(sql,memberId,organizationId,organizationId);\r\n\t}", "public ArrayList<Member> getMembers()\n {\n ArrayList<Member> members = new ArrayList<>();\n String sql = \"SELECT [mem_id]\\n\" +\n \" ,[mem_name]\\n \" +\n \" ,[mem_address]\\n\" +\n \" ,[mem_mobile]\\n\" +\n \" ,[mem_registered_date]\\n\" +\n \" ,[mem_active]\\n\" +\n \" FROM [lib_member_master]\";\n try {\n PreparedStatement statement = connection.prepareStatement(sql);\n ResultSet rs = statement.executeQuery();\n //cursor\n while(rs.next()) \n { \n int mem_id = rs.getInt(\"mem_id\");\n String mem_name = rs.getString(\"mem_name\");\n String mem_address = rs.getString(\"mem_address\");\n String mem_mobile = rs.getString(\"mem_mobile\");\n Date mem_registered_date = rs.getDate(\"mem_registered_date\");\n boolean mem_active = rs.getBoolean(\"mem_active\"); \n \n Member s = new Member(mem_id,mem_name, mem_address, mem_mobile, mem_registered_date,mem_active);\n members.add(s);\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(DBContext.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return members;\n }", "@Override\r\n\tpublic void onChannelMemberListGet(String channelId, List<AirContact> members)\r\n\t{\n\t\tif (channelListener != null)\r\n\t\t{\r\n\t\t\tchannelListener.onChannelMemberListGet(channelId, members);\r\n\t\t}\r\n\t}", "public Member searchMemberByMemberId(List<Member> members,Long memberId) throws WorkShopException {\n try {\n for (Member member : members) {\n if (member.getMemberId().equals(memberId)) {\n return member;\n }\n }\n } catch (Exception e) {\n throw new WorkShopException(e);\n }\n return null;\n }", "public List<OutgoingEMailInvitation> readProxyOutgoingEMailInvitations(\n final JabberId proxyId);", "void setInvitationId(String invitationId);", "@Override\n public List<IntraUserInformation> getIntraUsersWaitingTheirAcceptance(String identityPublicKey, int max, int offset) throws CantGetIntraUsersListException {\n try {\n List<IntraUserInformation> intraUserList = new ArrayList<IntraUserInformation>();\n\n List<IntraWalletUserActor> actorsList = this.intraWalletUserManager.getWaitingTheirAcceptanceIntraWalletUsers(identityPublicKey, max, offset);\n\n for (IntraWalletUserActor intraUserActor : actorsList) {\n intraUserList.add(new IntraUserModuleInformation(intraUserActor.getName(),\"\",intraUserActor.getPublicKey(),intraUserActor.getProfileImage(),intraUserActor.getContactState(),\"\"));\n }\n return intraUserList;\n } catch (CantGetIntraWalletUsersException e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET INTRA USER WAITING THEIR ACCEPTANCE\", e, \"\", \"Error on IntraUserActor Manager\");\n } catch (Exception e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET INTRA USER WAITING THEIR ACCEPTANCE\", FermatException.wrapException(e), \"\", \"unknown exception\");\n }\n }", "public boolean activateMember(int id) {\n boolean done = false;\n String sql = \"UPDATE member SET active=?\"\n + \" WHERE member_id = ?\";\n String sql2 = \"INSERT INTO payment(description,total,member_id) VALUES(?,?,?)\";\n String sql3 = \"INSERT INTO notify(member_id,notification_id) VALUES(?,?)\";\n try ( Connection con = connect(); PreparedStatement pstmt = con.prepareStatement(sql); PreparedStatement pstmt2 = con.prepareStatement(sql2);PreparedStatement pstmt3 = con.prepareStatement(sql3);) {\n\n pstmt.setInt(1, 1);\n pstmt.setInt(2, id);\n pstmt.executeUpdate();\n\n pstmt2.setString(1, \"Annual fee\");\n pstmt2.setInt(2, -30);\n pstmt2.setInt(3, id);\n pstmt2.executeUpdate();\n \n pstmt3.setInt(1, id);\n pstmt3.setInt(2, 4);\n pstmt3.executeUpdate();\n\n return true;\n\n } catch (SQLException e) {\n System.out.println(\"fail activating a member\");\n System.out.println(e.getMessage());\n\n }\n return done;\n }", "public List<EventMember> getTimeKeepingEventMemberListByEventId( long eventId);", "@Override\n public List<IntraUserInformation> getIntraUsersWaitingYourAcceptance(String identityPublicKey, int max, int offset) throws CantGetIntraUsersListException {\n List<IntraUserInformation> intraUserList = new ArrayList<IntraUserInformation>();\n try {\n\n\n List<IntraWalletUserActor> actorsList = this.intraWalletUserManager.getWaitingYourAcceptanceIntraWalletUsers(identityPublicKey, max, offset);\n\n for (IntraWalletUserActor intraUserActor : actorsList) {\n intraUserList.add(new IntraUserModuleInformation(intraUserActor.getName(),\"\",intraUserActor.getPublicKey(),intraUserActor.getProfileImage(),intraUserActor.getContactState(),\"\"));\n }\n\n return intraUserList;\n } catch (CantGetIntraWalletUsersException e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET INTRA USER WAITING YOUR ACCEPTANCE\", e, \"\", \"\");\n } catch (Exception e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET INTRA USER WAITING YOUR ACCEPTANCE\", FermatException.wrapException(e), \"\", \"unknown exception\");\n }\n }", "public ArrayList<Integer> getMemberIDs() {\n return memberIDs;\n }", "Invitation getInvitationById(int invitationId);", "public void setMemberId(Integer memberId) {\n\t\tthis.memberId = memberId;\n\t}", "public void setMemberId(Integer memberId) {\n this.memberId = memberId;\n }", "public void setMemberId(Integer memberId) {\n this.memberId = memberId;\n }", "public List<Individual> getListOfInactiveIndividuals(){\n\t \tList<Individual> individualList = new ArrayList<>();\n\t\tList<Individual> inactiveIndividualList = new ArrayList<>();\n\t\tindividualList = (new TeamsJsonReader()).getListOfIndividuals();\n\t\tIndividual individual = null;\n\t\tint size, counter;\n\t\tfor (size = 0; size < individualList.size(); size++) {\n\t\t\tcounter = 0;\n\n\t\t\tindividual = individualList.get(size);\n\n\t\t\tif (!individual.isActive()) {\n\t\t\t\tcounter = 1;\n\n\t\t\t\tinactiveIndividualList.add(individual);\n\n\t\t\t}\n\t\t}\n\n\t\treturn inactiveIndividualList;\n }", "public CampaignMembersResultMethod getCampaignMembers(String campaignId){\r\n CampaignMembersMethod campaignMembersMethod = new CampaignMembersMethod();\r\n campaignMembersMethod.apikey = this.apiKey;\r\n campaignMembersMethod.cid = campaignId;\r\n CampaignMembersResultMethod campaignMembersResultMethod = new CampaignMembersResultMethod();\r\n\r\n try{\r\n campaignMembersResultMethod = mailChimpClient.execute(campaignMembersMethod);\r\n }catch(MailChimpException me){\r\n logger.info(me.message);\r\n }catch (java.io.IOException ioException){\r\n logger.info(\"IO Exception\");\r\n }\r\n\r\n return campaignMembersResultMethod;\r\n }", "public List<ExoSocialActivity> getActivitiesOfIdentity(Identity ownerIdentity, long offset, long limit);", "public static ArrayList<Member> findById(String id){\n setConnection();\n \n ArrayList<Member> members = new ArrayList<>();\n \n try{\n Statement statement = con.createStatement();\n \n //Query statement\n String query = \"SELECT * FROM member WHERE id LIKE ?\";\n\n //Create mysql prepared statement\n PreparedStatement preparedStatement = con.prepareStatement(query);\n preparedStatement.setString(1, \"%\"+id+\"%\");\n \n //Execute the prepared statement\n ResultSet result = preparedStatement.executeQuery();\n \n while(result.next()){\n int memberId = result.getInt(1);\n String name = result.getString(2);\n String email = result.getString(3);\n String phone = result.getString(4);\n String address = result.getString(5);\n String dob = result.getString(6);\n \n members.add(new Member(memberId, name, email, phone, address, dob));\n }\n\n con.close();\n } catch (SQLException e){\n System.out.println(e.getMessage());\n }\n \n return members;\n }", "@WebMethod(operationName = \"approveMember\")\n public boolean approveMember(@WebParam(name = \"id\") String id) {\n return update(id, \"APPROVED\");\n }", "@GetMapping( value = \"/getMembersByAvailability\")\n\tpublic List<Employee> getAllMembers()\n\t{\n\t\treturn this.integrationClient.getAllMembers();\n\t}", "Map<Long, Integer> getUsersWithPendingMeeting();", "@Override\r\n\tpublic List<Member> getAllMember() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tList<Member> list = session.createCriteria(Member.class).list();\r\n\t\treturn list;\r\n\t}", "public ArrayList<Member> getAllMembers() {\n return memberDAO.getAllMembers();\n }", "List<Friend> getPendingRequests(String email);", "@Override\n public Collection<ExecutionEntity> findInactiveExecutionsByActivityIdAndProcessInstanceId(String activityId, String processInstanceId) {\n log.debug(\"findInactiveExecutionsByActivityIdAndProcessInstanceId[processInstanceId={}, activityId={}]\", processInstanceId, activityId);\n HashMap<String, Object> params = new HashMap<>(3);\n params.put(\"activityId\", activityId);\n params.put(\"processInstanceId\", processInstanceId);\n params.put(\"isActive\", false);\n return findMany(findInactiveExecutionsInActivityAndProcessInstance, params, inactiveExecutionsInActivityAndProcInstMatcher);\n }", "public final ArrayList<Account> getMemberList()\n\t{\n\t\treturn members;\n\t}", "public void setMember_id(String member_id) {\r\n this.member_id = member_id;\r\n }", "public void setMember_id(String member_id) {\r\n this.member_id = member_id;\r\n }", "public void showMemberBookings()\n {\n try\n {\n System.out.println(\"Please enter the memeber ID\");\n int memberId =sc.nextInt();\n Member mem = sportsClub.searchMember(memberId); \n \n if(mem==null || mem.getBookings()==null)\n {\n System.out.println(\"Sorry! Member is not found.\");\n }\n else\n {\n for(Booking bookingObj : mem.getBookings())\n {\n System.out.println(\"Booking made by \"+mem.getMemberName() +\" for \" + bookingObj.getBookingDate() + \" at \" + bookingObj.getBookingTime() + \" for \" + bookingObj.getBookingEndTime() + \" minutes on Court number \" + bookingObj.getCourt().getCourtId());\n\n }\n if(mem.getBookings().size()==0)\n System.out.println(\"Sorry! Currebtly no bookings done by the member \");\n }\n }\n catch(Exception e)\n {\n System.out.println(\"Error\"+e);\n }\n\n }", "List<ActivityRequest> getByUserId(Integer id);", "List<Member> list(long now);", "List<User> getMembers(String companyId, String name);", "public void importApprovedMembers() {\r\n\t\tList<MemberImport> newMembers = applicationDao.importMissingMembers();\r\n\t\tint existingCounter = 0;\r\n\t\tint newMembersCounter = 0;\r\n\r\n\t\tfor (MemberImport memberImport : newMembers) {\r\n\t\t\t// Is there a user with the above email address -\r\n\t\t\tUser user = null;\r\n\t\t\tif (!memberImport.getEmail().isEmpty()) {\r\n\t\t\t\tList<User> users = userDao.findByUserActivationEmailExclusive(memberImport.getEmail());\r\n\t\t\t\tif (users.size() == 1) {\r\n\t\t\t\t\tuser = users.get(0);\r\n\t\t\t\t} else if (users.size() == 2) {\r\n\t\t\t\t\tSystem.err.println(\"Found 2 records for user with email::\" + memberImport.getEmail());\r\n\t\t\t\t\t// Deactivate the Associate Account\r\n\t\t\t\t\tfor (User u : users) {\r\n\t\t\t\t\t\tif (u.getMemberNo() != null) {\r\n\t\t\t\t\t\t\tif (u.getMemberNo().contains(\"Assoc/\")) {\r\n\t\t\t\t\t\t\t\tu.getMember().setMemberShipStatus(MembershipStatus.INACTIVE);\r\n\t\t\t\t\t\t\t\tu.setIsActive(0);\r\n\t\t\t\t\t\t\t\tuserDao.save(u);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tuser = u;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcreateNewMember(memberImport);\r\n\t\t\t\tnewMembersCounter = newMembersCounter + 1;\r\n\t\t\t}\r\n\r\n\t\t\tif (user != null) {\r\n\t\t\t\tSystem.err.println(\"User Found>>>\" + memberImport.getEmail());\r\n\t\t\t\tuser.setMemberNo(memberImport.getMemberNo());\r\n\t\t\t\tuser.setFullName(memberImport.getName());\r\n\t\t\t\tuser.setEmail(memberImport.getEmail());\r\n\t\t\t\tif (memberImport.getGender() == 0) {\r\n\t\t\t\t\tuser.getUserData().setGender(Gender.MALE);\r\n\t\t\t\t} else if (memberImport.getStatus() == 1) {\r\n\t\t\t\t\tuser.getUserData().setGender(Gender.FEMALE);\r\n\t\t\t\t}\r\n\t\t\t\tRole role = roleDao.getByName(\"MEMBER\");\r\n\t\t\t\tuser.addRole(role);\r\n\r\n\t\t\t\tMember m = memberDao.findByUserId(user.getId());\r\n\t\t\t\t// Check if this member has been imported before...\r\n\t\t\t\tif (m == null) {\r\n\t\t\t\t\tm = new Member();\r\n\t\t\t\t}\r\n\t\t\t\tm.setMemberNo(memberImport.getMemberNo());\r\n\t\t\t\tm.setRegistrationDate(memberImport.getDateRegistered());\r\n\t\t\t\tm.setUserRefId(user.getRefId());\r\n\t\t\t\tif (memberImport.getStatus() == 0) {\r\n\t\t\t\t\tm.setMemberShipStatus(MembershipStatus.ACTIVE);\r\n\t\t\t\t} else if (memberImport.getStatus() == 1) {\r\n\t\t\t\t\tm.setMemberShipStatus(MembershipStatus.ACTIVE);\r\n\t\t\t\t}\r\n\t\t\t\tuser.setMember(m);\r\n\t\t\t\tuserDao.save(m);\r\n\t\t\t\tuserDao.save(user);\r\n\t\t\t\texistingCounter = existingCounter + 1;\r\n\t\t\t} else {\r\n\t\t\t\tSystem.err.println(\"User Not found>>>\" + memberImport.getEmail());\r\n\t\t\t\tcreateNewMember(memberImport);\r\n\t\t\t\tnewMembersCounter = newMembersCounter + 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.err.println(\"Successfully Imported ::\" + existingCounter + \" Members who existed.\");\r\n\t\tSystem.err.println(\"Successfully Imported ::\" + newMembersCounter + \" Members who did not exist.\");\r\n\t\tSystem.err.println(\"Total ::\" + (existingCounter + newMembersCounter));\r\n\t}", "public Invitation(int personId, Party party, String status) {\n this.personId = personId;\n this.party = party;\n this.status = status;\n }", "@Get\n public String getMembers(){\n ArrayList<String> members = new ArrayList<>();\n try {\n members.addAll(controller.getMembers(getQueryValue(\"id\")));\n }catch(MenuException e){\n System.out.println(e.getMessage());\n }\n return new YaGson().toJson(members, ArrayList.class);\n }", "List<Integer> getIdUsersWithExpiredLifeTimeList( Timestamp currentTimestamp );", "public Member getMember(int memberId) {\r\n\t\tfor(Member m : members) {\r\n\t\t\tif(m.getMemberNumber() == memberId) {\r\n\t\t\t\treturn m;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public @RequestMapping(\n\t\t\tvalue = \"/list\",\n\t\t\tmethod = GET,\n\t\t\tproduces = JSON\n\t) OfferInfo[] getMeetingList(Authentication authentication,\n\t\t\t\t\t\t\t\t @RequestParam(\"id\") Long partyId) {\n\n\t\tfinal Long id = longID(authentication);\n\t\tfinal List<Long> users = service.party.getPartyInfo(partyId, id).getUsers();\n\n\t\tif (users.stream().noneMatch(id::equals)) return null;\n\t\treturn service.meetingOffer.getOfferList(partyId);\n\t}", "public Expence getExpenceIds(Integer id)\r\n/* 174: */ {\r\n/* 175:178 */ return this.expenceDao.getExpenceIds(id);\r\n/* 176: */ }", "public List<String> getActivityIdsFeed(Identity ownerIdentity, int offset, int limit);", "@Override\n\tpublic List<Member> getAllMember() {\n\t\tSession session =sessionFactory.getCurrentSession();\n\t\tString hql = \"from Member\";\n\t\tList<Member> listMember = session.createQuery(hql).list();\n\t\t\n\t\tif(listMember.isEmpty()) {\n\t\t\t\treturn new ArrayList<>();\n\t\t}\n\t\t\n\t\treturn listMember;\n\t}", "public List<ExoSocialActivity> getOlderOnUserActivities(\n Identity ownerIdentity, ExoSocialActivity baseActivity, int limit);", "public Member getMember(int id){\n super.open();\n\n // 2. build query\n Cursor cursor =\n db.query(TABLE_MEMBER, // a. table\n COLUMNS, // b. column names\n \" id = ?\", // c. selections\n new String[] { String.valueOf(id) }, // d. selections args\n null, // e. group by\n null, // f. having\n null, // g. order by\n null); // h. limit\n\n // 3. if we got results get the first one\n if (cursor != null)\n cursor.moveToFirst();\n\n // 4. build Member object\n Member member = new Member();\n member.id = Integer.parseInt(cursor.getString(0));\n member.nickName = cursor.getString(1);\n member.type = cursor.getInt(2);\n member.joinDate = cursor.getString(3);\n\n\n Log.d(\"getNotice(\" + id + \")\", member.toString());\n\n // 5. return member\n return member;\n }", "public List<ExoSocialActivity> getActivitiesByPoster(Identity posterIdentity, int offset, int limit);", "protected Runnable listMembers() {\n return () -> {\n while (enableHa) {\n try {\n if (Thread.currentThread().isInterrupted()) {\n break;\n }\n NotificationServiceOuterClass.ListMembersRequest request =\n NotificationServiceOuterClass.ListMembersRequest.newBuilder()\n .setTimeoutSeconds(listMemberIntervalMs / 1000)\n .build();\n NotificationServiceOuterClass.ListMembersResponse response = notificationServiceStub.listMembers(request);\n if (response.getReturnCode() == NotificationServiceOuterClass.ReturnStatus.SUCCESS) {\n livingMembers = new HashSet<>(response.getMembersList());\n } else {\n logger.warn(response.getReturnMsg());\n selectValidServer();\n }\n } catch (Exception e) {\n e.printStackTrace();\n logger.warn(\"Error while listening notification\");\n selectValidServer();\n }\n }\n };\n }", "public Entitlement getEntitlementForId(UUID id, boolean includeDeletedEvents, TenantContext context) throws EntitlementApiException;", "public Invitation getInvitation(long id, long userId) {\n\t\treturn invitationRepository.serarchByIds(id, userId);\n\t}", "public ArrayList<Member> getMemberList(int i) {\n\t\treturn dao.selectMemberList(i);\r\n\t}", "public ListIterator<ServiceRecord> StartAtMember(int memberNum)\r\n {\r\n return this.GetServiceList(this.recordsByMemberNum, memberNum).Start();\r\n }", "public List<ExoSocialActivity> getNewerUserActivities(Identity owner, Long sinceTime, int limit);", "public void setMemberid(String memberid) {\n\t\tthis.memberid = memberid;\n\t}", "public void sendInvitations(){\r\n for(int i = 0; i< emails.size(); i++){\r\n System.out.println(\"Inviting: \" + emails.get(i));\r\n }\r\n\r\n }", "public List<User> getMembers() {\n return members;\n }", "@Override\r\n\tpublic List<ExecuteTask> getByMemberByTime(int memberId, String time1, String time2) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_member_id = ? AND et_task_id IN(SELECT task_id FROM task WHERE task_start_time >= ? AND task_start_time <= ?)\";\r\n\t\treturn getForList(sql,memberId,time1,time2);\r\n\t}", "@Override\r\n\tpublic List<ExecuteTask> getByMemberByType(int memberId, String taskType) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_member_id = ? AND et_task_id IN(SELECT task_id FROM task WHERE task_type = ?)\";\r\n\t\treturn getForList(sql,memberId,taskType);\r\n\t}", "public List<User> getParticipants(Long idEvent){\n List<Participation> participations =\n pm.findByIdEvent(idEvent);\n List<User> users = new ArrayList<>();\n \n for (Participation p : participations){\n users.add(p.getUser());\n }\n \n return users;\n }", "List<IRoleDto> getRoles(Integer memberId);", "List<User> getActivatedUserList();", "@Transactional(readOnly = true)\n public Page<Invitation> findAll(Pageable pageable) {\n log.debug(\"Request to get all Invitations\");\n return invitationRepository.findAll(pageable);\n }", "public List<User> getActiveUsers(boolean active);", "@Override\n\tpublic List<MemberDTO> getListMember() {\n\t\treturn mdao.getListMember();\n\t}", "List<S> memberOf(String memberUuid);", "public ArrayList<Entry> getMembers(){\n return members;\n }", "public MemberPo findMember(final String id);", "InviteEntity getInvitationById(Integer inviteId);", "public List<MemberData> findPastPlayers(Long playerId) {\r\n\t\tPlayer master = lookupPlayer(playerId);\r\n\t\tSet<Member> memberSet = new HashSet<Member>();\r\n\t\tfor (Player thisPlayer : playerDao.findByMember(master.getMember())) {\r\n\t\t\tfor (Player otherPlayer : thisPlayer.getGame().getPlayers()) {\r\n\t\t\t\tmemberSet.add(otherPlayer.getMember());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// remove all players currently invited\r\n\t\tfor (Invite i : master.getGame().getInvites()) {\r\n\t\t\tmemberSet.remove(i.getMember());\r\n\t\t}\r\n\t\t// remove self!\r\n\t\tmemberSet.remove(master.getMember());\r\n\t\t\r\n\t\t// sort by first name\r\n\t\tList<Member> sortedMembers = new ArrayList<Member>(memberSet);\r\n\t\tCollections.sort(sortedMembers, new Comparator<Member>() {\r\n\t\t public int compare(Member o1, Member o2) {\r\n\t\t return o1.getName().compareTo(o2.getName());\r\n\t\t }});\r\n\t\t\r\n\t\tArrayList<MemberData> membersData = new ArrayList<MemberData>();\r\n\t\tfor (Member m : sortedMembers) {\r\n\t\t\tmembersData.add(new MemberData(m));\r\n\t\t}\r\n\t\treturn membersData;\r\n\t}", "public ArrayList<User> getPending(User main){\n SQLiteDatabase db = getWritableDatabase();\n db.beginTransaction();\n\n ArrayList<User> userList = new ArrayList<>();\n\n try {\n String getQuery = String.format(\n \"SELECT * FROM User u \" +\n \"WHERE u.userID != '%s' AND u.userID IN \" +\n \" (SELECT userID FROM User_has_Friends uhf WHERE uhf.frienduserID == '%s' AND uhf.pending == 1)\"\n , main.getId(), main.getId());\n\n Cursor cursor = db.rawQuery(getQuery, null);\n\n if (cursor.moveToFirst()) {\n while (!cursor.isAfterLast()) {\n User user = new User(cursor.getInt(0), cursor.getString(4), cursor.getString(3), cursor.getString(5));\n user.lastname = cursor.getString(2);\n user.firstname = cursor.getString(1);\n user.address = cursor.getString(6);\n user.color = cursor.getString(7);\n user.shoeSize = cursor.getInt(8);\n user.trouserSize = cursor.getString(9);\n user.tshirtSize = cursor.getString(10);\n user.privacy = cursor.getInt(11);\n\n userList.add(user);\n cursor.moveToNext();\n }\n }\n db.setTransactionSuccessful();\n return userList;\n } catch (Exception e) {\n Log.d(\"SQL\", e.getMessage());\n return null;\n } finally {\n db.endTransaction();\n }\n }", "public static ArrayList<Member> findAll(){\n setConnection();\n \n ArrayList<Member> members = new ArrayList<>();\n \n try{\n //Preparing for DB query\n Statement statement = con.createStatement();\n \n ResultSet result = statement.executeQuery(\"SELECT * FROM member\");\n\n while(result.next()){\n int memberId = result.getInt(1);\n String name = result.getString(2);\n String email = result.getString(3);\n String phone = result.getString(4);\n String address = result.getString(5);\n String dob = result.getString(6);\n \n Member member = new Member(memberId, name, email, phone, address, dob);\n \n members.add(member);\n }\n \n con.close();\n } catch (SQLException e){\n System.out.println(e.getMessage());\n }\n \n return members;\n }", "public ImmutableList<Member> getMembers() {\n return ImmutableList.copyOf(members);\n }", "@GetMapping(\"/{memberId}\")\n public ResponseEntity<Member> findMember(@PathVariable Long memberId) {\n Member foundMember = memberService.findMemberById(memberId);\n return ResponseEntity.ok(foundMember);\n }", "public List<String> getUserIdsActivities(Identity owner, long offset, long limit) throws ActivityStorageException;", "@Override\r\n\tpublic Member getMember(String memberId) throws Exception {\n\t\treturn memberDao.getMember(memberId);\r\n\t}", "public List<Meeting> getMeetings(int projectId);", "@Override\r\n\tpublic List<User> getAllInvitateCode() {\n\t\treturn userMapper.getAllInvitateCode();\r\n\t}", "public List<ExoSocialActivity> getOlderUserActivities(Identity owner, Long sinceTime, int limit);", "@Query(\"select a from Appointment a where a.patient.id = ?1 and a.endMoment <= CURRENT_TIMESTAMP order by a.startMoment desc\")\n\tCollection<Appointment> findAllNotActiveByPatient(int patientId);", "public static java.util.List<com.gleo.plugins.hexiagon.model.Announcement> getAnnouncementsByCurrencyId(\n long currencyId)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getService().getAnnouncementsByCurrencyId(currencyId);\n }", "public List<Activo> _queryResponsable_ActivoList(Long responsable_id) {\n synchronized (this) {\n if (responsable_ActivoListQuery == null) {\n QueryBuilder<Activo> queryBuilder = queryBuilder();\n queryBuilder.where(Properties.Responsable_id.eq(null));\n responsable_ActivoListQuery = queryBuilder.build();\n }\n }\n Query<Activo> query = responsable_ActivoListQuery.forCurrentThread();\n query.setParameter(0, responsable_id);\n return query.list();\n }", "public List<ExoSocialActivity> getNewerOnUserActivities(\n Identity ownerIdentity, ExoSocialActivity baseActivity, int limit);", "public String memberList() {\n\treturn roomMembers.stream().map(id -> {\n\t try {\n\t\treturn api.getUserById(id).get().getNicknameMentionTag();\n\t } catch (InterruptedException | ExecutionException e) {\n\t\te.printStackTrace();\n\t }\n\t return \"\";\n\t}).collect(Collectors.joining(\"\\n\"));\n }", "@Override\n public List<IntraUserInformation> getAllIntraUsers(String identityPublicKey, int max, int offset) throws CantGetIntraUsersListException {\n try {\n List<IntraUserInformation> intraUserList = new ArrayList<IntraUserInformation>();\n\n\n List<IntraWalletUserActor> actorsList = this.intraWalletUserManager.getAllIntraWalletUsers(identityPublicKey, max, offset);\n\n for (IntraWalletUserActor intraUserActor : actorsList) {\n intraUserList.add(new IntraUserModuleInformation(intraUserActor.getName(),intraUserActor.getPhrase(),intraUserActor.getPublicKey(),intraUserActor.getProfileImage(),intraUserActor.getContactState(),\"\"));\n }\n return intraUserList;\n } catch (CantGetIntraWalletUsersException e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET ALL INTRA USERS FROM LOGGED USER\", e, \"\", \"\");\n } catch (Exception e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET ALL INTRA USERS FROM LOGGED USER\", FermatException.wrapException(e), \"\", \"unknown exception\");\n }\n }", "@Override\n\tpublic int getCount(int id, int memberId) {\n\t\treturn mapper.getCount(id, memberId);\n\t}", "@Override\n\tpublic List<VloanPersonOrg> findByPersonId(Long borrowerId) {\n\t\treturn getSqlSession().selectList(getIbatisMapperNameSpace() + \".findByPersonId\", borrowerId);\t\n\t}", "public ArrayList<Meeting> getMeetingsbyCalendarId(String calendarId) throws Exception;", "public List<String> getUserSpacesActivityIds(Identity ownerIdentity, int offset, int limit);", "List<Long> getAuthorisedList( Long id) ;", "public RoomMember getMember(Collection<RoomMember> members, String userID) {\n if (isAlive()) {\n for (RoomMember member : members) {\n if (TextUtils.equals(userID, member.getUserId())) {\n return member;\n }\n }\n } else {\n Log.e(LOG_TAG, \"getMember : the session is not anymore active\");\n }\n return null;\n }", "public void setMemberIDs(ArrayList<Integer> memberIDs) {\n this.memberIDs = memberIDs;\n }" ]
[ "0.57666665", "0.5673399", "0.5543349", "0.549338", "0.54445016", "0.5131637", "0.5009189", "0.49751046", "0.4973905", "0.48799214", "0.4870192", "0.48555762", "0.48071343", "0.4768273", "0.475873", "0.47498107", "0.4713457", "0.47100395", "0.47073424", "0.46986824", "0.46971345", "0.46967283", "0.4664368", "0.46291134", "0.46220955", "0.46220955", "0.4616214", "0.46147525", "0.456449", "0.45622566", "0.4552524", "0.45504656", "0.45452598", "0.45442173", "0.45388642", "0.45332256", "0.45272288", "0.45150638", "0.45128208", "0.45128208", "0.45117152", "0.45084476", "0.4507626", "0.44964772", "0.44931728", "0.44866195", "0.4485941", "0.44752985", "0.44718334", "0.4455834", "0.44437534", "0.44281211", "0.442703", "0.44181138", "0.44128782", "0.4408583", "0.44039065", "0.43952218", "0.4386601", "0.43794", "0.43738657", "0.4373443", "0.4372065", "0.43692648", "0.4357684", "0.43570083", "0.43302163", "0.4329786", "0.4326708", "0.4326203", "0.43249863", "0.43224365", "0.43061697", "0.43034723", "0.42979616", "0.4295084", "0.42941657", "0.42925435", "0.42858493", "0.4284887", "0.42836177", "0.42810532", "0.4274832", "0.4271668", "0.42706957", "0.42692018", "0.4254476", "0.42492938", "0.42491367", "0.42423707", "0.4241309", "0.42380962", "0.42309454", "0.42222404", "0.42103413", "0.42075056", "0.419595", "0.41909134", "0.41861957", "0.41837636" ]
0.782507
0
Given an invitation ID, retrieve the matching instance.
InviteEntity getInvitationById(Integer inviteId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Invitation getInvitationById(int invitationId);", "@Transactional(readOnly = true)\n public Optional<Invitation> findOne(Long id) {\n log.debug(\"Request to get Invitation : {}\", id);\n return invitationRepository.findById(id);\n }", "public ApplyInvite findById(Object id);", "public Invitation getInvitation(long id, long userId) {\n\t\treturn invitationRepository.serarchByIds(id, userId);\n\t}", "String getInvitationId();", "void setInvitationId(String invitationId);", "private SiteReservation findById(Integer id){\n SiteReservation reservation;\n try {\n reservation = repo.findById(id).get();\n } catch (NoSuchElementException e){\n throw new ReservationNotFoundException(id);\n }\n return reservation;\n }", "Instance getInstance(String id);", "@Transactional(readOnly = true)\n public Optional<ItemInstance> findOne(Long id) {\n log.debug(\"Request to get ItemInstance : {}\", id);\n return itemInstanceRepository.findById(id);\n }", "@Override\r\n\tpublic Invigilate getOne(Integer no) {\n\t\treturn invigilateMapper.selectByPrimaryKey(no);\r\n\t}", "public cn.zyj.dbexporter.jooq.db_mall.tables.pojos.TCustomerMemberInvite fetchOneById(Long value) {\n return fetchOne(TCustomerMemberInvite.T_CUSTOMER_MEMBER_INVITE.ID, value);\n }", "public Guest getGuest(int guest_ID) {\n for (Guest guest : guestList) {\n if (guest.getGuest_ID() == guest_ID)\n return guest;\n }\n return null;\n }", "Member findById(Long id);", "public MemberPo findMember(final String id);", "public Meeting getMeeting(String id) throws Exception;", "public static Member findById(int id){\n setConnection();\n \n Member member = null;\n \n try{\n Statement statement = con.createStatement();\n \n //Query statement\n String query = \"SELECT * FROM member WHERE id = ?\";\n\n //Create mysql prepared statement\n PreparedStatement preparedStatement = con.prepareStatement(query);\n preparedStatement.setInt(1, id);\n \n //Execute the prepared statement\n if(preparedStatement.execute()){\n ResultSet result = preparedStatement.getResultSet();\n \n result.next();\n \n int memberId = result.getInt(1);\n String name = result.getString(2);\n String email = result.getString(3);\n String phone = result.getString(4);\n String address = result.getString(5);\n String dob = result.getString(6);\n \n member = new Member(memberId, name, email, phone, address, dob);\n }\n \n con.close();\n } catch (SQLException e){\n System.out.println(e.getMessage());\n }\n \n return member;\n }", "@Override\n\tpublic Member searchByID(String memberID) {\n\t\tConnection conn = null;\n\t\tMember member = new Member();\n\t\ttry {\n\t\t\tconn = DbcpConnectionPool.getConnection();\n\t\t\tCallableStatement cstmt = conn.prepareCall(\"{call Member_searchByID(?)}\");\n\t\t\tcstmt.setString(1, memberID);\n\t\t\tResultSet rs = cstmt.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tmember.setMemberID(rs.getString(\"MemberID\"));\n\t\t\t\tmember.setMemberCard(rs.getString(\"MemberCard\"));\n\t\t\t\tmember.setTotalCost(rs.getDouble(\"TotalCost\"));\n\t\t\t\tString time = rs.getString(\"RegDate\");\n\t\t\t\ttry {\n\t\t\t\t\tmember.setRegDate((Date)(new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").parseObject(time)));\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\trs.close();\n\t\t\tcstmt.close();\n\t\t\tconn.close();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (member.getMemberID()!= null){\n\t\t\treturn member;\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t}", "public InviteDetail selectById(Integer id) {\n\t\treturn mapper.selectByInviteId(id);\r\n\t}", "public Guest getGuestByIdenNo(String identityID) {\n for (Guest guest : guestList) {\n if (guest.getIdentity_no().toUpperCase().equals(identityID)){\n return guest;\n }\n }\n return null;\n }", "public Responder getResponder(long responder_id) {\n SQLiteDatabase db = this.getReadableDatabase();\n\n String selectQuery = \"SELECT * FROM \" + RESPONDERS_TABLE_NAME + \" WHERE \"\n + KEY_ID + \" = \" + responder_id;\n\n Log.e(LOG, selectQuery);\n\n Cursor c = db.rawQuery(selectQuery, null);\n\n if (c != null)\n c.moveToFirst();\n\n Responder responder = new Responder();\n responder.setId(c.getInt(c.getColumnIndex(KEY_ID)));\n responder.setName((c.getString(c.getColumnIndex(RESPONDERS_NAME))));\n responder.setPhone(c.getString(c.getColumnIndex(RESPONDERS_PHONE)));\n\n return responder;\n }", "@Override\r\n\tpublic Member getMemberById(int id) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tMember member = session.get(Member.class, id);\r\n\t\treturn member;\r\n\t}", "public Individual getIndividual(int id){\n for(Individual individual : individuals){\n if(individual.getId() == id){\n return individual;\n }\n }\n return null;\n }", "@Override\n\tpublic Actor findOne(long id) {\n\t\treturn actorRepository.findOne(id);\n\t}", "@Override\n\tpublic Invoice findByInvId(Integer invId) {\n\t\treturn invoiceDao.findByInvId(invId);\n\t}", "@Override\n public void onInvitationReceived(Invitation invitation) {\n String mIncomingInvitationId = invitation.getInvitationId();\n }", "E getExistingById(IApplicationUser user, ID id);", "public static ProcessInstance findProcessInstance(ActionContext ctx, long processInstanceId) throws Exception {\n\t\tUser user = (User) ctx.session().getAttribute(com.epm.acmi.struts.Constants.loggedUser);\n\n\t\tEPMHelper epmHelper = null;\n\t\tWFSession wfSession = null;\n\t\tProcessInstance pi = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tepmHelper = new EPMHelper();\n\t\t\twfSession = epmHelper.connectAsUser(user.getUserId(), user.getPassword());\n\t\t\t\n\t\t\tif (processInstanceId != -1)\n\t\t\t\tpi = WFObjectFactory.getProcessInstance(processInstanceId, wfSession);\t\n\t\t} finally\n\t\t{\n\t\t\tif (epmHelper != null)\n\t\t\t\tepmHelper.disconnect(wfSession);\n\t\t}\n\t\t\n\t\treturn pi;\n\t}", "@Override\n\tpublic Resident findOne(int residentId) {\n\t\ttry {\n\t\t\treturn repository.findById(residentId);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn null;\n\t}", "public Event getEventFromID(String eventID) {\r\n // Gets the events collection and creates a query string for the event id\r\n MongoCollection<Document> events = mongoDB.getCollection(\"Events\");\r\n Document query = new Document(\"_id\", new ObjectId(eventID));\r\n\r\n // Loops over events found matching the id, returning the first one\r\n for (Event event : events.find(query, Event.class)) {\r\n return event;\r\n }\r\n\r\n // Returns null if none are found\r\n return null;\r\n }", "RequesterVO get(int id);", "private static Person findPersonById(int id) {\n Person personReturn = null;\n\n for (Person person : persons) {\n if (id == person.getId()) {\n personReturn = person;\n }\n }\n\n return personReturn;\n }", "public Member getMemberById(int id) {\n\t\tfor (Iterator<Member> it = db.iterator(); it.hasNext(); ) {\n\t\t\tMember m = it.next();\n\t\t\tif (m.getId() == id) {\n\t\t\t\treturn m;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Person get( Integer id ) {\n\t\t// Retrieve existing person\n\t\tPerson person = (Person) entityManager.createQuery(\"FROM Person p where p.id = :id\")\n \t.setParameter(\"id\", id).getSingleResult();\n\t\treturn person;\n\t}", "public Optional<GroupMember> findOne(String id) {\n log.debug(\"Request to get GroupMember : {}\", id);\n return groupMemberRepository.findById(id);\n }", "public static Patient find(int id) {\n\tPatient patient = null;\n\tfor (Patient a : patients) {\n\t if (a.getId() == id) {\n\t\tpatient = a;\n\t\tbreak;\n\t }\n\t}\t\n\t\n\treturn patient;\n }", "private Item findItemById(String curId, Inventory invent){\n\t\tif (invent == null) return null;\n\t\tfor (Item item : invent){\n\t\t\tif (item.getId().equals(curId)){\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Person getOne(Integer id) {\n\t\tPerson person = personRepository.getOne(id);\n\t\treturn person;\n\t}", "public static User findUserById(int id) {\n\n User user = null;\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findUserById = \"SELECT * FROM public.member \"\n + \"WHERE id = '\" + id + \"'\";\n\n PreparedStatement stmt = DBConnection.prepare(findUserById);\n\n try {\n ResultSet rs = stmt.executeQuery();\n while(rs.next()) {\n user = load(rs);\n }\n DBConnection.close(stmt);\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n if(user != null) {\n targetUser = userIdentityMap.get(user.getId());\n if(targetUser == null) {\n userIdentityMap.put(user.getId(), user);\n return user;\n }\n else\n return targetUser;\n }\n return user;\n }", "Codebadge findOne(Long id);", "@Override\n\tpublic Appointment getAppointmentById(Integer id) {\n\t\t\t\tAppointment foundAppointment = ar.getOne(id);\n\t\t\t\tif(foundAppointment != null) {\n\t\t\t\t\tSystem.out.println(\"Appointment with id: \" + id + \" found\");\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.println(\"Appointment with id: \" + id + \" not found\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn foundAppointment;\n\t}", "InviteEntity accept(Integer inviteId);", "public Event getEventById(int id) {\n Optional<Event> optionalEvent = eventRepository.findById(id);\n if (optionalEvent.isPresent()) {\n LOGGER.info(\"Returning event with id {}\", id);\n return optionalEvent.get();\n }\n else {\n LOGGER.error(\"event with id {} has not been found\", id);\n throw new ResourceNotFoundException(\"Event not found\");\n }\n }", "Invoice getById(int invoiceId);", "public Ingredient getById(Long id) {\n return ingredientRepository.getOne(id);\n }", "public Singer find(int singerId);", "@Override\n\tpublic Member getMemberById(int id) {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tString hql = \"from Member m where m.id = :id\";\n\t\tQuery query = session.createQuery(hql);\n\t\tquery.setParameter(\"id\", id);\n\t\tList<Member> listMember = query.list();\n\t\t\n\t\tif(listMember.isEmpty()) {\n\t\t\treturn new Member();\n\t\t}\n\t\t\n\t\treturn listMember.get(0);\n\t}", "Contract findById(int id);", "Agent findById(String id);", "@Override\n\tpublic Gift getGift(Long id) {\n\t\treturn mGiftDatabase.get(id);\n\t}", "Item findById(String id);", "@Override\r\n\tpublic Member SearchMemberByID(String id) {\n\t\tMember m = new Member();\r\n\r\n\t\ttry {\r\n\t\t\tconn = DriverManager.getConnection(URL, USER, PASS);\r\n\t\t\tString sql = \"select * from member where id=?\";\r\n\t\t\tps = conn.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\tSystem.out.println(id);\r\n\t\t\twhile (rs.next()) {\r\n\r\n\t\t\t\tm.setID(rs.getString(\"id\"));\r\n\t\t\t\tm.setPW(rs.getString(\"pw\"));\r\n\t\t\t\tm.setNickName(rs.getString(\"nickname\"));\r\n\t\t\t\tm.setQuiz(rs.getString(\"quiz\"));\r\n\t\t\t\tm.setAnswer(rs.getString(\"answer\"));\r\n\t\t\t\tm.setScore(rs.getInt(\"score\"));\r\n\t\t\t\t\r\n\t\t\t\treturn m;\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tps.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\treturn m;\r\n\t}", "@Override\r\n\tpublic Person findbyid(int id) {\n\t\tQuery query=em.createQuery(\"Select p from Person p where p.id= \"+id);\r\n\t\tPerson p=(Person) query.getSingleResult();\r\n\t\treturn p;\r\n\t\r\n\t}", "public Member getMember(int id){\n super.open();\n\n // 2. build query\n Cursor cursor =\n db.query(TABLE_MEMBER, // a. table\n COLUMNS, // b. column names\n \" id = ?\", // c. selections\n new String[] { String.valueOf(id) }, // d. selections args\n null, // e. group by\n null, // f. having\n null, // g. order by\n null); // h. limit\n\n // 3. if we got results get the first one\n if (cursor != null)\n cursor.moveToFirst();\n\n // 4. build Member object\n Member member = new Member();\n member.id = Integer.parseInt(cursor.getString(0));\n member.nickName = cursor.getString(1);\n member.type = cursor.getInt(2);\n member.joinDate = cursor.getString(3);\n\n\n Log.d(\"getNotice(\" + id + \")\", member.toString());\n\n // 5. return member\n return member;\n }", "@Override\n public Person findByID(Long id) {\n Session session = getSessionFactory().openSession();\n Person p = session.load(Person.class, id);\n session.close();\n return p;\n }", "public Invoice findById(long id);", "public Page<Invitation> getInvitations(Pageable pageable, long id) {\n\t\tPage<Invitation> invis = invitationRepository.searchByInvitado(pageable, id);\n\t\treturn invis;\n\t}", "Member selectByPrimaryKey(Long id);", "@Override\n public Workload get(@NotNull UUID id) throws InstanceNotFoundException {\n return workloadRepository.findById(id)\n .orElseThrow(new PersistentExceptionSupplier(new InstanceNotFoundException(id)));\n }", "@Override\r\n\tpublic Member getMember(Long id) throws NotFoundException, ExistException,\r\n\t\t\tMissingParameter, InvalidParameter {\n\t\treturn null;\r\n\t}", "Optional<InterviewEventDTO> findOne(Long id);", "@Override\n\tpublic Notification findById(Long id) {\n\t\treturn notificationRepository.findOne(id);\n\t}", "public Event getEvent(String id) {\n for (Event e : eventMap.keySet()) {\n if (e.getEventId().equals(id)) {\n return e;\n }\n }\n return null;\n }", "E find(final ID identifier) throws ResourceNotFoundException;", "public User getUser(Integer id)\n\t{\n\t\t// Create an user -1 for when it isn't in the list\n\t\tUser searchUser = new User();\n\t\t// Index: User's position in the list\n\t\tint index = this.getUserById(id.intValue());\n\t\t// If the user is in the list execute the action\n\t\tif(index != -1)\n\t\t{\n\t\t\tsearchUser = this.usersList.get(index);\n\t\t}\n\t\t\n\t\treturn searchUser;\n\t}", "private User findById(String id) {\n User result = new NullUserOfDB();\n for (User user : this.users) {\n if (user.getId().equals(id)) {\n result = user;\n break;\n }\n }\n return result;\n }", "public Individual getIndividualById(Integer id) throws ObjectNotFoundException{\n \tList<Individual> individualList = new ArrayList<>();\n\t\tindividualList = (new TeamsJsonReader()).getListOfIndividuals();\n\t\tIndividual individual = null;\n\t\tint size, counter = 0;\n\t\tfor (size = 0; size < individualList.size(); size++) {\n\t\t\tcounter = 0;\n\n\t\t\tindividual = individualList.get(size);\n\t\t\tif (individual.getId().compareTo(id) == 0) {\n\t\t\t\tcounter = 1;\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (size == individualList.size() && counter == 0)\n\t\t\tthrow new ObjectNotFoundException(\"individual\", \"id\", id.toString());\n\n\t\treturn individual;\n\n }", "public Voto find(int id ) { \n\t\treturn em.find(Voto.class, id);\n\t}", "InternalSession findSession(String id);", "@Override\n\tpublic ModificationRequest findById(UUID id) {\n\t\ttry {\n\t\t\treturn this.entityManager.createQuery(\"SELECT request from ModificationRequest request where request.modificationRequestId = :id AND request.active = TRUE\", ModificationRequest.class)\n\t\t\t\t\t.setParameter(\"id\", id)\n\t\t\t\t\t.getSingleResult();\n\t\t}\n\t\tcatch(NoResultException e) {\n\t\t\t// returns null if no user if found\n\t\t\treturn null;\n\t\t}\n\t}", "public Member getMember(int memberId) {\r\n\t\tfor(Member m : members) {\r\n\t\t\tif(m.getMemberNumber() == memberId) {\r\n\t\t\t\treturn m;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public static Person findID(ArrayList<Member> testMember, int inputID) {\n\t\tfor(int i = 0; i < testMember.size(); i++) {\n\t\t\tif(inputID == testMember.get(i).getID()) {\n\t\t\t\treturn testMember.get(i);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public E getById(final I id) {\n LOG.info(\"[getById] Start: Id = \" + id);\n LOG.info(\"[getById] End\");\n return entityManager.find(entityClass, id);\n }", "public Booking findOne(int id) {\n String sql = getJoinedQuery() + \" WHERE b.id = ?\";\n List<Booking> bookings = jdbc.query(sql, new Object[] {id}, resultSetExtractor);\n return bookings.get(0);\n }", "Coach findById(long id);", "Optional<GroupMembers> findOne(Long id);", "public ModelGame findGameById () {\n Scanner input = new Scanner(System.in); // Create a Scanner object\n System.out.println(\"Enter the ID of the game you wish to return:\");\n int id = input.nextInt(); // Read user input of id\n for (ModelGame game : this.allGames) {\n if (game.getGameId() == id) {\n return game;\n }\n }\n return null;\n }", "@Override\r\n\tpublic Member getMember(String memberId) throws Exception {\n\t\treturn memberDao.getMember(memberId);\r\n\t}", "public Researcher getResearcherByID(int id);", "ScPartyMember selectByPrimaryKey(Integer id);", "@Override\n\tpublic Reservation getById(Long id) {\n\t\treturn reservationRepository.findById(id).get();\n\t}", "public ReceiverEntity obtenerReceiver(Long id){\r\n ReceiverEntity receiver = persistence.find(id);\r\n if(receiver == null){\r\n throw new IllegalArgumentException(\"No existe en la base de datos\");\r\n }\r\n return receiver;\r\n }", "public AlarmUser getUser(String ID) {\n\t\tListIterator<AlarmUser> userList = users.listIterator();\n\t\t\n\t\tlogger.log(\"Looking for User by ID \" + ID, Level.TRACE);\n\t\t\n\t\twhile(userList.hasNext()) {\n\t\t\tAlarmUser theUser = userList.next();\n\t\t\tif(theUser.getID().equals(ID)) {\n\t\t\t\tlogger.log(\"Found User \" + ID, Level.TRACE);\n\t\t\t\treturn theUser;\n\t\t\t}\n\t\t}\n\t\t\n\t\tlogger.log(\"User \" + ID + \" not found! Adding new user of ID: \" + ID, Level.TRACE);\n\t\treturn addUser(ID);\n\t\t\n\t}", "public FamilyMember fetchFamilyMember(String id) throws FamilyMemberNotFoundException {\n if (isFamilyMemberMapNullOrEmpty(familyMemberMap) || !familyMemberMap.containsKey(id)) {\n LOGGER.error(\"Exception Occurred\");\n throw new FamilyMemberNotFoundException(\"family member does not exist with the given id \" + id);\n }\n return familyMemberMap.get(id);\n\n }", "RiceCooker getById(long id);", "Corretor findOne(Long id);", "public User getById(String id){\n List<User> users = userRepo.findAll();\n for (User user : users){\n if(user.getGoogleId().equals(id)){\n return user;\n }\n }\n throw new UserNotFoundException(\"\");\n }", "Notification getNotificationById(String notificationId) throws NotificationClientException;", "GiftMatPromo findOne(Long id);", "IMemberDto getMember(/*old :String searchMember*/Integer id);", "public Person findOne(Long id) {\n\t\treturn personRepository.findById(id).get();\n\t}", "@Override\n\tpublic Contract get(String id) {\n\t\treturn contractDao.findOne(id);\n\t}", "@Override\n\tpublic Enterprise get(Integer id) {\n\t\treturn enterpriseDAO.get(id);\n\t}", "@Override\n\tpublic PI findById(Long id) throws NotFoundException {\n\t\treturn null;\n\t}", "Booking getBookingById(BookingKey bookingKey);", "public Equipment findEquipmentById(int id){\n Optional<Equipment> equipment = equipmentRepository.findById(id);\n return equipment.orElse(null);\n }", "public Item getByID(Integer id) {\r\n Item item = null;\r\n //Transaction trans = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n\r\n try {\r\n //trans = session.beginTransaction();\r\n\r\n item = (Item) session.get(Item.class, id);\r\n\r\n //trans.commit();\r\n } catch (HibernateException e) {\r\n //if (trans != null) { trans.rollback(); }\r\n e.printStackTrace();\r\n } finally {\r\n session.close();\r\n }\r\n return item;\r\n }", "@Override\n\tpublic Eleve findById(int id) {\n\t\treturn map.get(id);\n\t}", "public Item searchID(String ID) {\n Item foundItem = null;\n for (Item item : this) {\n if (item.getItemId().equals(ID)) {\n foundItem = item;\n break;\n }\n }\n return foundItem;\n }", "@Transactional(readOnly = true)\n public Optional<MsgReceiverGroup> findOne(Long id) {\n log.debug(\"Request to get MsgReceiverGroup : {}\", id);\n return msgReceiverGroupRepository.findOneWithEagerRelationships(id);\n }", "T findOne(I id);" ]
[ "0.7784235", "0.6980363", "0.617229", "0.6085328", "0.5971572", "0.5968928", "0.59023345", "0.583223", "0.5809478", "0.5738756", "0.56739366", "0.56714714", "0.5670489", "0.5668863", "0.5572238", "0.5536288", "0.5514219", "0.551315", "0.5502864", "0.5495862", "0.54941154", "0.549143", "0.54762423", "0.5471634", "0.54659903", "0.54635334", "0.5453231", "0.54478866", "0.53942573", "0.5376107", "0.5371406", "0.53541195", "0.53336877", "0.532885", "0.5328167", "0.5325986", "0.53252673", "0.5321838", "0.5315754", "0.5315371", "0.52964854", "0.5293405", "0.5288202", "0.52881724", "0.5278258", "0.52781045", "0.52575266", "0.52565366", "0.5249512", "0.52382004", "0.52338994", "0.5216646", "0.52154684", "0.51902014", "0.5184543", "0.51716423", "0.5152878", "0.51488894", "0.51386946", "0.51355964", "0.5134671", "0.5132023", "0.5128813", "0.51158285", "0.5115005", "0.510537", "0.5100049", "0.509747", "0.5096385", "0.50923026", "0.50816345", "0.50717586", "0.5067392", "0.50661796", "0.50656897", "0.50582623", "0.5057343", "0.50532854", "0.5051366", "0.5049239", "0.50407165", "0.5040596", "0.50366324", "0.5030559", "0.5025571", "0.50254095", "0.5022082", "0.50147766", "0.5014201", "0.5002707", "0.4999851", "0.49996167", "0.4998239", "0.49981105", "0.49953842", "0.4989195", "0.49860844", "0.49678034", "0.4967508", "0.49662757" ]
0.70551246
1
Given an instance of Invite.Builder, persist (or create a new record).
InviteEntity save(InviteEntity builder);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Integer addNew(InviteEntity builder) throws IOException;", "public boolean save(ApplyInvite model);", "public static Invite createEntity(EntityManager em) {\n Invite invite = new Invite()\n .nom(DEFAULT_NOM)\n .prenom(DEFAULT_PRENOM)\n .mail(DEFAULT_MAIL)\n .mdp(DEFAULT_MDP)\n .login(DEFAULT_LOGIN)\n .points(DEFAULT_POINTS);\n return invite;\n }", "public boolean saveOrUpdate(ApplyInvite model);", "Entity save(Entity entity);", "@Override\n public void persist() {\n }", "void persist() throws PersistenceException;", "public void save(HrJBorrowcontract entity);", "public static Invite createUpdatedEntity(EntityManager em) {\n Invite invite = new Invite()\n .nom(UPDATED_NOM)\n .prenom(UPDATED_PRENOM)\n .mail(UPDATED_MAIL)\n .mdp(UPDATED_MDP)\n .login(UPDATED_LOGIN)\n .points(UPDATED_POINTS);\n return invite;\n }", "E save(E entity);", "void save(E entity);", "@Override\n\tpublic void persist() throws GymMembersException {\n\t\t\n\t}", "public void createInviteNotification(Event e, Users u) {\n Invite invite= new Invite();\n invite.setUser(u);\n invite.setStatus(Invite.InviteStatus.invited);\n invite.setEvent(e);\n em.persist(invite);\n Notification notification = new Notification();\n notification.setType(NotificationType.invite);\n notification.setNotificatedUser(u);\n notification.setRelatedEvent(e);\n notification.setSeen(false);\n notification.setGenerationDate(new Date());\n em.persist(notification);\n mailManager.sendMail(u.getEmail(), \"New Invite\", \"Hi! You have received a new invite\");\n }", "@Override\r\n\tpublic void persist() {\n\t}", "public void save(MemberTradeRecord me) {\n\t\tmemberTradeRecordRepository.save(me);\r\n\t}", "Lancamento persistir(Lancamento lancamento);", "public void persist() throws PersistenceException, ValidationException {\r\n\t\tPortalExtraInfo pei = PortalUtil.loadPortalExtraInfo(null, null, \"photoroster\");\r\n\t\tExtraInfo ei = pei.getExtraInfo();\r\n\t\tei.setValue(\"remoteLocal\", getRemoteLocal());\r\n\t\tei.setValue(\"enableInstructorUpload\", getEnableInstructorUpload());\r\n\r\n\t\tei.setValue(\"filePath\", getFilePath());\r\n\t\tei.setValue(\"fileDirectory\", getFileDirectory());\r\n\t\tei.setValue(\"remoteURLRoot\", getRemoteURLRoot());\r\n\t\tei.setValue(\"localURLRoot\", getLocalURLRoot());\r\n\t\tei.setValue(\"filenameID\", getFilenameID());\r\n\t\tei.setValue(\"scalePhotos\", getScalePhotos());\r\n\t\tei.setValue(\"scaledPhotoExtents\", getScaledPhotoExtents());\r\n\t\tei.setValue(\"photoCheck\", getPhotoCheck());\r\n\t\tei.setValue(\"allowableCourseRoles\", getAllowableCourseRoles());\r\n\t\tei.setValue(\"doneOnce\", \"y\");\r\n\r\n\t\tPortalUtil.savePortalExtraInfo(pei);\r\n\t}", "@Override\n\tpublic void persist(T obj) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void persist(Object entity) {\n\t\t\n\t}", "void save(Object entity);", "LoginHistory save(LoginHistory entity);", "@Override\n public Invitee createInvitee(Invitee invitee) {\n String uniqueId = generateUniqueId();\n invitee.setUniqueId(uniqueId);\n\n String sql = \"INSERT INTO invitee_details (invite_id,unique_id, invitee_user_id, name, email) VALUES (?,?,?,?,?) RETURNING has_voted, is_attending\";\n SqlRowSet results = jdbcTemplate.queryForRowSet(sql, invitee.getInviteId(), invitee.getUniqueId(), invitee.getUserId(),\n invitee.getName(), invitee.getEmail());\n\n while (results.next()) {\n invitee.setHasVoted(results.getBoolean(\"has_voted\"));\n invitee.setIsAttending(results.getString(\"is_attending\"));\n }\n\n return invitee;\n }", "private void pushToHibernate(){\n DATA_API.saveUser(USER);\n }", "public void save(Address entity);", "public void persist(final Employee transientInstance) {\n LOG.debug(\"persisting Employee instance\");\n try {\n entityManager.persist(transientInstance);\n LOG.debug(\"persist successful\");\n } catch (RuntimeException re) {\n LOG.error(\"persist failed\", re);\n throw re;\n }\n }", "@Transactional\n\tpublic T create(T newInstance) {\n\t\tthis.em.persist(newInstance);\n\t\treturn newInstance;\n\t}", "public void persist() {\n getBuildContextHolder().persist();\n }", "@Override\r\n\tpublic void save(PartyType entity) {\n\t\t\r\n\t}", "T persist(T obj) throws PersistException;", "@Override\n\tpublic void saveOrUpdateRecord(Record record) {\n\t\t Session session=HibernateSessionFactory.getSession();\n\t\t\tTransaction tx=session.beginTransaction();\t\t\n\t\t\tRecordDAO recordDAO=new RecordDAO();\n\t\t\t\n\t\t\ttry{\n\t\t\t\trecordDAO.attachDirty(record);\n\t\t\t\ttx.commit();\n\t\t\t}catch(RuntimeException e){\n\t\t\t\te.printStackTrace();\n\t\t\t\ttx.rollback();\n\t\t\t}finally{\n\t\t\t\tsession.close();\n\t\t\t}\n\t\t}", "public void createDelayNotification (Invite inv) {\n Notification notification = new Notification();\n notification.setRelatedEvent(inv.getEvent());\n notification.setNotificatedUser(inv.getUser());\n notification.setSeen(false);\n notification.setType(NotificationType.delayedEvent);\n notification.setGenerationDate(new Date());\n em.persist(notification);\n \n \n }", "public Participacao createParticipacao(Participacao model) {\n return participacaoRepository.save(model);\n}", "Account save(Account account);", "UserOrder save(UserOrder order);", "public void save(Object instance);", "public void save() throws EntityPersistenceException {\n\n }", "Transaction save(Transaction transaction);", "@Override\r\n\tpublic void create(T t) {\n\t\tsuper.getSessionFactory().getCurrentSession().save(t);\r\n\t\tsuper.getSessionFactory().getCurrentSession().flush();\r\n\t}", "public void save() {\r\n\t\tGame.getInstance().getInventory().add(id);\r\n\t}", "@Override\n\tpublic void save(Member member) {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tsession.save(member);\n\t}", "InviteEntity accept(Integer inviteId);", "@Override\n\tpublic void save(ServiceFee entites) {\n\t\tservicefeerepo.save(entites);\n\t}", "public void save(E entity){\n transaction.begin();\n entityManager.persist(entity);\n transaction.commit();\n }", "public void create(Shipping3VO vo) throws Exception {\r\n\t\tthis.checkAndCompleteData(vo, true);\r\n\t\tthis.entityManager.persist(vo);\r\n\t}", "@Override\r\n\tpublic void save(WechatMember member) {\n\t\t\r\n\t}", "void save(T entity);", "public Saver save() {\n return new AugmentedSaver() {\n @Override\n protected void handleSave(Iterable<?> entities) {\n assertInTransaction();\n checkState(\n Streams.stream(entities).allMatch(Objects::nonNull), \"Can't save a null entity.\");\n checkProhibitedAnnotations(entities, NotBackedUp.class, VirtualEntity.class);\n ImmutableMap<Key<?>, ?> keysToEntities = uniqueIndex(entities, Key::create);\n TRANSACTION_INFO.get().putSaves(keysToEntities);\n }\n };\n }", "void save(T entity, boolean editMode) throws PersistenceException;", "User save(User user);", "public UserEntity save(UserEntity userEntity);", "@Override\n\tpublic void persist() {\n\t\tif (this.isNew()) {\n\t\t\tQuxLocalServiceUtil.addQux(this);\n\t\t}\n\t\telse {\n\t\t\tQuxLocalServiceUtil.updateQux(this);\n\t\t}\n\t}", "private void registrarSolicitudBienEntidad(SolicitudBienEntidadDTO SolicitudBienEntidadDTO) {\n SolicitudBienEntidad solicitudBienEntidad = SolicitudBienEntidadHelper.toLevel1Entity(SolicitudBienEntidadDTO,\n null);\n em.persist(solicitudBienEntidad);\n }", "public PersonalRecord save(PersonalRecord entity) {\n\t\treturn personalRecordRepository.save(entity);\n\t}", "public void persist(CallingContext cc ) throws ODKEntityPersistException, ODKOverQuotaException;", "@Override\r\n\tpublic void createFournisseur(Fournisseur fournisseur) {\n\t\tthis.sessionFactory.getCurrentSession().save(fournisseur);\r\n\t}", "@Override\n\tpublic void save(EmpType entity) {\n\t\t\n\t}", "T save(T entity);", "T save(T entity);", "T save(T entity);", "@Override\n public Building save(Building entity) {\n return dao.save(entity);\n }", "public void persistir(Cliente cliente){\n }", "private void createMemberInvitation(User user, Chatroom chatroom) {\n\t\tList<Chatroom> chatrooms = user.getChatroomInvites();\n\t\tList<User> users = chatroom.getMemberInvitees();\n\t\t// create the relation\n\t\tchatrooms.add(chatroom);\n\t\tusers.add(user);\n\t\t// save the chatroom, and its relations\n\t\tchatroomRepository.save(chatroom);\n\t}", "@Override\n public void save(Trade trade) {\n this.tradeRepository.save(trade);\n }", "void createInvitation(OutgoingEMailInvitation invitation, Boolean notify);", "public void guardarProveedor(Proveedor v){\n pr.save(v);\n }", "void save(User user);", "@Override\r\n\tpublic void save(Member member) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tsession.save(member);\r\n\t\tsession.flush();\r\n\t}", "@Override\r\n public void crearCliente(Cliente cliente) throws Exception {\r\n entity.getTransaction().begin();//inicia la creacion\r\n entity.persist(cliente);//se crea el cliente\r\n entity.getTransaction().commit();//finaliza la creacion\r\n }", "void saveStorage(StorageEntity storage);", "public void saveFiAvailableInvoice(FiAvailableInvoice fiAvailableInvoice);", "@Override\r\n\tpublic void save(T instance) {\r\n\t\tif (isManaged(instance)) {\r\n\t\t\tgetEntityManager().merge(instance);\r\n\t\t} else {\r\n\t\t\tgetEntityManager().persist(instance);\r\n\t\t}\r\n\t}", "public static void saveVendedor(Vendedor vendedor) {\n\t\tSessionFactory sf = HibernateUtil.getSessionFactory();\n\t\tSession sesion = sf.openSession();\n\t\tsesion.beginTransaction();\n\n\t\ttry {\n\t\t\tsesion.save(vendedor);\n\t\t\tsesion.getTransaction().commit();\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tsesion.getTransaction().rollback();\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tsesion.close();\n\t\t}\n\t}", "User saveUser(User user);", "public void saveReport(ReportBase report)\r\n \t\tthrows PersistenceException;", "public void SaveVsPersist() {\n\t\tSession session = HibernateUtil.getSession();\n\t\tTransaction tx = null;\n\t\t\n\t\ttry{\n\t\t\ttx = session.beginTransaction();\n//\t\t\tItem item = new Item(\"Premium Water\", 900);\n//\t\t\titem.setShops(((Item)session.get(Item.class, 1)).getShops());\n//\t\t\t\n//\t\t\t\n//\t\t\tSystem.out.println( \"BEFORE SAVE: \" + item.getId());\n//\t\t\tSystem.out.println(\"-----SAVE-----\");\n//\t\t\tSystem.out.println(\"ID IS:\" + session.save(item));\n//\t\t\t//When saving we are returned the id.\n//\t\t\tSystem.out.println(\"AFTER SAVE:\" + item.getId());\n\t\t\t\n\n\t\t\t\n\t\t\tItem item2 = new Item(\"Deluxe Premium Super Awesome Bargain Water\", 12);\n\t\t\tSystem.out.println(\"-----persist-----\");\n\t\t\tSystem.out.println( \"BEFORE Persist: \" + item2.getId());\n\t\t\tsession.persist(item2);\n\t\t\tSystem.out.println(\"AFTER PERSIST:\" + item2.getId());\n\n\t\t\t//We are not guaranteed an ID right away, so we have to return nothing.\n\t\t\t\n\t\t\ttx.commit();\n\t\t\t\n\t\t}catch(HibernateException e){\n\t\t\tif(tx!=null){\n\t\t\t\ttx.rollback();\n\t\t\t}\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\tsession.close(); \n\t\t}\n\t}", "T create() throws PersistException;", "EmployeeDetail save(EmployeeDetail detail) throws DBException;", "@Transactional\n public void create(TaskInstanceEntity taskInstanceEntity) {\n entityManagerProvider.get().persist(taskInstanceEntity);\n }", "@ThinkParityAuthenticate(AuthenticationType.USER)\n public void createInvitation(final JabberId userId,\n final JabberId invitationUserId,\n final IncomingEMailInvitation invitation);", "public void persist(Object object) {\n em.persist(object);\n }", "void saveShipment(Shipment shipment);", "public void save(Object e) throws RNoEntityException{\n\t\tEntity en = ALiteOrmBuilder.getInstance().getEntity(e.getClass());\n\t\tif(en == null)\n\t\t\tthrow new RNoEntityException(\"For : \" + e.getClass().getName());\n\t\ten.save(this, db, new TravelingEntity(e));\n\t}", "public void persist(T entity) {\n getSession().persist(entity);\n }", "public void persist(T entity) {\n getSession().persist(entity);\n }", "public ViajeroEntity create (ViajeroEntity viajeroEntity){\n LOGGER.log(Level.INFO, \"Creando un review nuevo\");\n em.persist(viajeroEntity);\n return viajeroEntity;\n }", "public void persist(T entity) {\n\t\tsessionFactory.getCurrentSession().persist(entity);\n\t}", "public void save(Object obj) throws HibException;", "public VenTransactionFee persistVenTransactionFee(VenTransactionFee venTransactionFee);", "public Invitation(){}", "public void persistVisit(Visit visit) throws SQLException{\n\t\tpersistPlace(visit.getPlace());\n\t\t\n\t\tString readPlacePKQuery = \"SELECT id FROM Place WHERE name = ? AND descriptionFile = ?\";\n\t\tString insertVisitQuery = \"INSERT INTO Visit (visitTime, price, id_place) VALUES (?,?,?)\";\n\n\t\t//Then, get the primary key of the Place\n\t\tPreparedStatement preparedStatement = conn.prepareStatement(readPlacePKQuery);\n\t\t\n\t\tpreparedStatement.setString(1, visit.getPlace().getName());\n\t\tpreparedStatement.setString(2, visit.getPlace().getDescriptionFile());\n\t\t\n\t\tResultSet result = preparedStatement.executeQuery();\n\t\tresult.next();\n\t\t\n\t\tint placePK = result.getInt(\"id\");\n\t\t\n\t\tpreparedStatement.close();\n\n\t\t//Set visit in the database\n\t\tpreparedStatement = conn.prepareStatement(insertVisitQuery);\n\t\t\n\t\tpreparedStatement.setFloat(1, visit.getTime());\n\t\tpreparedStatement.setFloat(2, visit.getPrice());\n\t\tpreparedStatement.setInt(3, placePK);\n\n\t\tpreparedStatement.executeUpdate();\n\n\t\tpreparedStatement.close();\n\t}", "@Override\n\tpublic void save(UserEntity theUser) {\n\t\t\n\t\temploiDao.findById(theUser.getEmploi().getId()).ifPresent(emploi -> theUser.setEmploi(emploi));\n\t\tif(theUser.getEntite() != null){entityDao.findById(theUser.getEntite().getId()).ifPresent(entite -> theUser.setEntite(entite));}\n\t\t\n\t\tuserDao.save(theUser);\n\n\t}", "public void persist(Book entity)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tbookdao.openCurrentSessionwithTransation();\r\n\t\t\tbookdao.persist(entity);\r\n\t\t\tbookdao.closeSessionwithTransaction();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void persist(RutaDTO ruta) {\n \tif(!to.isActive()) {\n\t\t\tto.begin();\n\t\t}\n em.persist(ruta);\n to.commit();\n }", "public void saveUser(IUser user);", "E create(E entity);", "E create(E entity);", "void save(String key, Object data, int expirySeconds) throws BusinessException;", "public void save() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.save(this);\r\n\t}", "protected void persist(T item) {\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = mDbHelper.beginTransaction();\n\t\t\tsession.persist(item);\n\t\t\tmDbHelper.endTransaction(session);\n\t\t} catch (Exception e) {\n\t\t\tmDbHelper.cancelTransaction(session);\n\t\t\tAppLogger.error(e, \"Failed to execute persist\");\n\t\t}\n\t}", "@Override\r\n\tpublic void save(HotelVendorEntity entity) {\n\t\tSystem.out.println(\"invoked save\"+entity);\r\n\t\tSystem.out.println(\"saved in database\");\r\n\t\t\r\n\t\tConfiguration cfg=new Configuration();\r\n\t\tcfg.configure();\r\n\t\tSessionFactory factory=cfg.buildSessionFactory();\r\n\t\tSession session=factory.openSession();\r\n\t\tsession.beginTransaction();\r\n\t\tsession.save(entity);\r\n\t\tsession.getTransaction().commit();\r\n\t\tsession.close();\r\n\t\tfactory.close();\r\n\t\t\r\n\t}" ]
[ "0.6142708", "0.5805411", "0.56620425", "0.5607973", "0.5422733", "0.53246695", "0.5321292", "0.52485996", "0.52416337", "0.52370024", "0.52240604", "0.52164096", "0.5187547", "0.5184009", "0.5170474", "0.5156042", "0.5141899", "0.51142687", "0.5111635", "0.5104466", "0.5097084", "0.50852513", "0.5063693", "0.5048825", "0.5046615", "0.5033345", "0.5012486", "0.5005145", "0.4998646", "0.4997802", "0.49932382", "0.49746335", "0.49609664", "0.49607086", "0.49543253", "0.49515527", "0.49432284", "0.49420223", "0.49327332", "0.493141", "0.49302757", "0.49242944", "0.48977524", "0.48937735", "0.48933303", "0.48919702", "0.488975", "0.48890722", "0.4883399", "0.48791304", "0.4869579", "0.48673135", "0.48506758", "0.4839894", "0.4834627", "0.4826815", "0.48253068", "0.48253068", "0.48253068", "0.48249948", "0.48156857", "0.48147142", "0.4809488", "0.48066518", "0.48065186", "0.4797832", "0.4797736", "0.4791605", "0.4790358", "0.47903132", "0.47857815", "0.47852033", "0.47847483", "0.4782105", "0.47800952", "0.4777895", "0.47754443", "0.4773329", "0.47653618", "0.47561753", "0.475024", "0.47484967", "0.47480434", "0.47480434", "0.47423807", "0.47417617", "0.47326562", "0.47297278", "0.4728648", "0.47277504", "0.47260064", "0.47233576", "0.47207218", "0.47188324", "0.47140622", "0.47140622", "0.47140315", "0.47105092", "0.470683", "0.47006357" ]
0.7778317
0
Accept the invitation identified by the given inviteId.
InviteEntity accept(Integer inviteId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value = \"/accept/team/invitation/{invitationId}\", method = PUT)\n public LobbyTeam acceptTeamInvitation(@AuthenticationPrincipal UserSimpleDetails user,\n @PathVariable(\"invitationId\") String invitationId)\n throws TeamInvitationNotFoundException, TeamFullException, TeamNotFoundException {\n log.info(\"user {} accepts team invitation {}\", user.getIdentity(), invitationId);\n return lobbyService.acceptTeamInvitation(user.getProfileId(), invitationId);\n }", "public void setInviteUserId(Integer inviteUserId) {\n this.inviteUserId = inviteUserId;\n }", "InviteEntity getInvitationById(Integer inviteId);", "private void onInviteClicked() {\n Intent intent = new AppInviteInvitation.IntentBuilder(getString(R.string.invitation_title))\n .setMessage(getString(R.string.invitation_message))\n .setDeepLink(Uri.parse(getString(R.string.invitation_deep_link)))\n .setCustomImage(Uri.parse(getString(R.string.invitation_custom_image)))\n .setCallToActionText(getString(R.string.invitation_cta))\n .build();\n startActivityForResult(intent, REQUEST_INVITE);\n }", "@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\n\t@Override\n\tpublic void acceptRequest(int eventId, int userid) {\n\t\tUser user = userRepository.findOne(userid);\n\t\tEvent event = findOne(eventId);\n\t\tevent.approveJoinRequest(user);\n\t\trepository.save(event);\n\t}", "void setInvitationId(String invitationId);", "public void setInvitedUserId(Integer invitedUserId) {\n this.invitedUserId = invitedUserId;\n }", "public void acceptInvitation(Player player) {\n if (invitations.containsKey(player)) {\n Player p = invitations.remove(player);\n List<Player> team = teams.get(p);\n team.add(player);\n teamMessage(p, ChatColor.BLUE + player.getName() + \" has joined the team!\");\n } else {\n player.sendMessage(ChatColor.RED + \"You were not invited to any teams! Forever alone..\");\n }\n }", "private void clickInvite(){\n WebDriverHelper.clickElement(inviteButton);\n }", "@WebMethod(operationName = \"approveMember\")\n public boolean approveMember(@WebParam(name = \"id\") String id) {\n return update(id, \"APPROVED\");\n }", "public ApplyInvite findById(Object id);", "@RequestMapping(\"/agent/enrollment/approve\")\n public String approve(@RequestParam(\"id\") long id, ApprovalDTO dto) {\n String signature = \"EnrollmentController#approve(long id, ApprovalDTO dto)\";\n LogUtil.traceEntry(getLog(), signature, new String[] { \"id\", \"dto\" }, new Object[] { id, dto });\n StatusDTO statusDTO = new StatusDTO();\n\n try {\n completeReview(id, dto, false, \"\");\n statusDTO.setSuccess(true);\n ControllerHelper.flashInfo(\"Approval request has been sent, you will be notified once it is processed.\");\n } catch (PortalServiceException ex) {\n LogUtil.traceError(getLog(), signature, ex);\n ControllerHelper.flashError(USER_ERROR_MSG);\n }\n return \"redirect:/ops/viewDashboard\";\n }", "public com.vidyo.portal.ucclients.InviteToConferenceResponse inviteToConference(\n\t\t\tcom.vidyo.portal.ucclients.InviteToConferenceRequest inviteToConferenceRequest)\n\t\t\tthrows NotLicensedFaultException, InvalidArgumentFaultException,\n\t\t\tGeneralFaultException, SeatLicenseExpiredFaultException {\n\t\tInviteToConferenceResponse resp = new InviteToConferenceResponse();\n\t\tUser user = this.user.getLoginUser();\n\n\t\tMember fromMember = this.member.getMember(user.getMemberID());\n\n\t\tInvite invite = new Invite();\n\t\tinvite.setFromMemberID(fromMember.getMemberID());\n\t\tinvite.setFromRoomID(fromMember.getRoomID());\n\n\t\tString toUserName = inviteToConferenceRequest.getUsername();\n\t\tString toTenant = inviteToConferenceRequest.getTenant();\n\n\t\tMember toMember = this.member.getMemberByName(toUserName, toTenant);\n\n\t\tinvite.setToMemberID(toMember.getMemberID());\n\n\t\tint toEndpointID = this.conference.getEndpointIDForMemberID(toMember\n\t\t\t\t.getMemberID());\n\t\tinvite.setToEndpointID(toEndpointID);\n\n\t\t// check if status of Endpoint is Online\n\t\tint status = this.conference.getEndpointStatus(toEndpointID);\n\t\tif (status != 1) {\n\t\t\tthrow new InvalidArgumentFaultException(\n\t\t\t\t\t\"Status of invited member is not Online.\");\n\t\t}\n\n\t\ttry {\n\t\t\tthis.conference.inviteToConference(invite);\n\t\t} catch (Exception e) {\n\t\t\tthrow new GeneralFaultException(e.getMessage());\n\t\t}\n\n\t\tresp.setStatus(Status_type1.OK);\n\t\treturn resp;\n\t}", "@ThinkParityAuthenticate(AuthenticationType.USER)\n public void createInvitation(final JabberId userId,\n final JabberId invitationUserId,\n final IncomingEMailInvitation invitation);", "public void accept(long ticketId, LocalDateTime readyBy) {\n\t\tTicket ticket = ticketRepository.findById(ticketId).orElseThrow(() -> new TicketNotFoundException(ticketId));\n\t\tList<TicketDomainEvent> events = ticket.accept(readyBy);\n\t\tdomainEventPublisher.publish(ticket, events);\n\t}", "public Integer getInviteUserId() {\n return inviteUserId;\n }", "void acceptOrd(final int vId) {\r\n Orders emp = OrdersFactory.getvalidateOrders();\r\n if (emp != null) {\r\n showPlacedOrders(vId);\r\n System.out.println(\"Enter the Order ID to Accept :\");\r\n int ordid = option.nextInt();\r\n int val = OrdersFactory.acceptOrders(ordid);\r\n System.out.println(\"Succes value is :\" + val);\r\n if (val == 1) {\r\n System.out.println(\"Accepted the Order\");\r\n return;\r\n }\r\n } else {\r\n System.out.println(\"---------No Placed Orders---------\");\r\n return;\r\n }\r\n }", "public void topicInviteReceived(TopicInvite inviteMsg) {\r\n\t\t// check if the client ID is publisher and/or subscriber\r\n\t\tString topicName = inviteMsg.getTopicName().toString();\r\n\t\tif (inviteMsg.getPublishAllowed()) {\r\n\t\t\tthis.topicInvitesPublisher.put(topicName, inviteMsg);\r\n\t\t\tcreateProducer(topicName);\r\n\t\t}\r\n\t\tif (inviteMsg.getSubscribeAllowed()) {\r\n\t\t\tthis.topicInvitesConsumers.put(topicName, inviteMsg);\r\n\t\t\tList<IAdaptorCallback> callbacks = this.callbackMap.get(topicName);\r\n\t\t\tif (callbacks != null && consumerMap.get(topicName) != null) {\r\n\t\t\t\tAdapterCallbackConsumer callbackConsumer = new AdapterCallbackConsumer(topicName, callbacks);\r\n\t\t\t\taddAvroReceiver(topicName, callbackConsumer);\r\n\t\t\t\tconsumerMap.put(topicName, callbackConsumer);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean onInviteReceived(MMXChannel.MMXInvite invite) {\n //default implementation is a no-op\n return false;\n }", "public boolean acceptInvite(String connectionId, String title, String content)throws ProfileServiceException{\n \t\tif (logger.isLoggable(Level.FINEST)) {\n \t\t\tlogger.entering(sourceClass, \"acceptInvite\", connectionId);\n \t\t}\n \t\t\n \t\tMap<String, String> parameters = new HashMap<String, String>();\n \t\tparameters.put(ProfileRequestParams.CONNECTIONID, connectionId);\n \t\tString url = resolveProfileUrl(ProfileEntity.NONADMIN.getProfileEntityType(),\n \t\t\t\tProfileType.CONNECTION.getProfileType());\n \t\t\n \t\tXMLProfilesPayloadBuilder builder = XMLProfilesPayloadBuilder.INSTANCE;\n \t\tObject payload = builder.generateAcceptInvitePayload(connectionId, title, content);\n \t\tboolean\tresult = executePut(url, parameters, null, payload, null);\n \t\tif (logger.isLoggable(Level.FINEST)) {\n \t\t\tlogger.exiting(sourceClass, \"acceptInvite\");\n \t\t}\n \t\treturn result;\n \t}", "@Override\n\tpublic void acceptSession(int id, String agent) {\n\t\t\n\t}", "@Override\n public void postProcess(int index, ApplicationInvite invite) {\n InviteOrganisation inviteOrganisation = invite.getInviteOrganisation();\n if (inviteOrganisation != null && !simpleMap(inviteOrganisation.getInvites(), ApplicationInvite::getId).contains(invite.getId())) {\n inviteOrganisation.getInvites().add(invite);\n }\n }", "Invitation getInvitationById(int invitationId);", "public boolean invitePlayer(QKPlayer player) {\n try {\n java.sql.PreparedStatement s = QuartzKingdoms.DBKing.prepareStatement(\"INSERT INTO invitations (player_id, kingdom_id) VALUES (?, ?);\");\n s.setInt(1, player.getID());\n s.setInt(2, this.id);\n if (s.executeUpdate() == 1) {\n player.getQPlayer().alert(new AlertBuilder()\n .setType(\"kingdom_invite\")\n .setMessage(\"You have been invited to the kingdom \" + this.name)\n .setArgs(new AlertArgs().setInt(\"kingdom_id\", this.id))\n .setReceiver(player.getQPlayer()));\n return true;\n } else {\n return false;\n }\n } catch (SQLException e) {\n e.printStackTrace();\n return false;\n }\n }", "void updateInvitationForReceivingUser(Invitation invitation);", "InviteEntity decline(Integer inviteId);", "boolean deleteInvitation(int invitationId);", "public ApplyInvite findByProjectID(Long projectID);", "Task<?> addInvitationForReceivingUser(Invitation invitation);", "public static void sendInvitationAcceptedNotifications(PlatformMessageBus bus, Invitation invite, String population) {\n\t\tsendEmailNotification(bus, invite.getInvitorId(), invite.getPlaceId(), population, \n\t\t\t\tNotifications.PersonAcceptedToJoinNotifyInviter.KEY,\n\t\t\t\tImmutableMap.<String, String> of(Notifications.PersonAcceptedToJoinNotifyInviter.PARAM_INVITEE_FIRSTNAME, invite.getInviteeFirstName()\n\t\t\t\t\t\t, Notifications.PersonAcceptedToJoinNotifyInviter.PARAM_INVITEE_LASTNAME, invite.getInviteeLastName()));\n\t\t//Send notification to account owner if inviter is not the owner\n\t\tif(!Objects.equals(invite.getInvitorId(), invite.getPlaceOwnerId())) {\n\t\t\tsendEmailNotification(bus, invite.getPlaceOwnerId(), invite.getPlaceId(), population, \n\t\t\t\t\tNotifications.PersonAcceptedToJoinNotifyOwner.KEY,\n\t\t\t\t\tImmutableMap.<String, String> of(Notifications.PersonAcceptedToJoinNotifyOwner.PARAM_INVITEE_FIRSTNAME, invite.getInviteeFirstName()\n\t\t\t\t\t\t\t, Notifications.PersonAcceptedToJoinNotifyOwner.PARAM_INVITEE_LASTNAME, invite.getInviteeLastName()));\n\t\t}\n }", "public void clickSendInvitationButton() throws Exception {\n\t\twdriver.findElement(By.xpath(locators.clickSendInvitationButton)).click();\n\t}", "private void autoAcceptGroupChat(Context context,\n Intent invitation) {\n Logger.v(TAG, \"autoAcceptGroupChat entry\");\n ArrayList<ChatMessage> messages = new ArrayList<ChatMessage>();\n ChatMessage msg = invitation\n .getParcelableExtra(FIRST_MESSAGE);\n if (msg != null) {\n messages.add(msg);\n }\n invitation.putParcelableArrayListExtra(MESSAGES, messages);\n ModelImpl.getInstance().handleNewGroupInvitation(invitation,\n false);\n Logger.v(TAG, \"autoAcceptGroupChat exit\");\n }", "boolean editInvitation(Invitation invitation);", "Task<?> addInvitationForSendingUser(Invitation invitation);", "public void processAppointmentRequest(int appointmentId)\n {\n AppointmentListSingleton appointments = AppointmentListSingleton.getInstance();\n appointments.approveRequest(appointmentId);\n }", "public boolean onInviteResponseReceived(MMXChannel.MMXInviteResponse inviteResponse) {\n //default implementation is a no-op\n return false;\n }", "void updateInvitationForSendingUser(Invitation invitation);", "@GetMapping(value = { \"/{contractId}/accept\" })\n\tpublic String acceptContract(@PathVariable(\"contractId\") int contractId, ModelMap modelMap, RedirectAttributes redirectAttributes) throws DataAccessException {\n\t\t\n\t\ttry {\n\t\t\tcontractService.answerContract(contractId, ContractStatus.ACCEPTED);\n\t\t} catch (ExclusivityContractConflict e) {\n\t\tredirectAttributes.addFlashAttribute(\"message\", e.getMessage());\n\t\tredirectAttributes.addFlashAttribute(\"messageType\", \"danger\");\n\t\treturn \"redirect:/contracts/list\";\n\t\t}\n\t\tredirectAttributes.addFlashAttribute(\"message\", String.format(\"The Contract \"\n\t\t\t\t+ \"contractId=%d has been accepted\", contractId));\n\t\tredirectAttributes.addFlashAttribute(\"messageType\", \"success\");\n\t\treturn \"redirect:/contracts/list\";\n\t}", "@Override\n public void acceptIntraUser(String identityPublicKey, String intraUserToAddName, String intraUserToAddPublicKey, byte[] profileImage) throws CantAcceptRequestException {\n try {\n /**\n *Call Actor Intra User to accept request connection\n */\n this.intraWalletUserManager.acceptIntraWalletUser(identityPublicKey, intraUserToAddPublicKey);\n\n /**\n *Call Network Service Intra User to accept request connection\n */\n this.intraUserNertwokServiceManager.acceptIntraUser(identityPublicKey, intraUserToAddPublicKey);\n\n } catch (CantAcceptIntraWalletUserException e) {\n throw new CantAcceptRequestException(\"CAN'T ACCEPT INTRA USER CONNECTION - KEY \" + intraUserToAddPublicKey, e, \"\", \"\");\n } catch (Exception e) {\n throw new CantAcceptRequestException(\"CAN'T ACCEPT INTRA USER CONNECTION - KEY \" + intraUserToAddPublicKey, FermatException.wrapException(e), \"\", \"unknown exception\");\n }\n }", "public Call invite(String url);", "public com.google.common.util.concurrent.ListenableFuture<injective.ocr.v1beta1.Tx.MsgAcceptPayeeshipResponse> acceptPayeeship(\n injective.ocr.v1beta1.Tx.MsgAcceptPayeeship request) {\n return futureUnaryCall(\n getChannel().newCall(getAcceptPayeeshipMethod(), getCallOptions()), request);\n }", "public InviteDetail selectById(Integer id) {\n\t\treturn mapper.selectByInviteId(id);\r\n\t}", "@Override\n public void onInvitationReceived(Invitation invitation) {\n String mIncomingInvitationId = invitation.getInvitationId();\n }", "public CallSpec<String, HttpError> acceptContactRequest(String recipientId, String senderId) {\n return Resource.<String, HttpError>newPutSpec(api, \"/v1/users/{user_id}/contact_requests/{id}/accept\", false)\n .pathParam(\"user_id\", recipientId)\n .pathParam(\"id\", senderId)\n .responseAs(String.class)\n .build();\n }", "void acceptChallenge(int challengeId);", "public void activation(String activationId) throws Exception {\n\t\tcollection = mongoTemplate.getCollection(ACCOUNT);\n\t\tBasicDBObject activateAccount = new BasicDBObject();\n\t\tactivateAccount.append(\"$set\",\n\t\t\t\tnew BasicDBObject().append(\"status\", true));\n\t\tBasicDBObject searchQuery = new BasicDBObject().append(\"activationId\",\n\t\t\t\tactivationId);\n\t\tcollection.update(searchQuery, activateAccount);\n\t}", "public boolean isIncomingInvitePending();", "@RequestMapping(\"/inv\")\n public String decision(@RequestParam (value = \"dec\") String dec,\n \t\t@RequestParam (value = \"id\") String id) throws SQLException\n {\n \t\n\t\tjava.util.Properties props = new java.util.Properties();\n\t\ttry {\n\t\t\tClass.forName(\"org.apache.derby.jdbc.ClientDriver\").newInstance();\n\t\t\tconn = DriverManager.getConnection(serverURL, props);\n\t\t\tSystem.out.println(\"Controller managed to open a connection to server database. \");\n\t\t} catch (SQLException | InstantiationException | IllegalAccessException | ClassNotFoundException e1) {\n\t\t\tSystem.out.println(\"Controller did not manage to open a connection to server database. \");\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tString decision = String.format(dec);\n\t\tString inviteId = String.format(id);\n\t\t\n\t\tjava.sql.PreparedStatement updateInvite;\n\t\tif (decision.equals(\"Accept\")) {\n\t\t\ttry {\n\t\t\t\tupdateInvite = conn.prepareStatement(\"update FolderInvites set HasAccepted = 1 where ConnectionId = ?\");\n\t\t\t\tupdateInvite.setString(1,inviteId);\n\t\t\t\tupdateInvite.execute();\t\t\n\t\t\t\treturn \"Invite accepted!\";\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\ttry {\n\t\t\t\tupdateInvite = conn.prepareStatement(\"update FolderInvites set HasAccepted = 2 where ConnectionId = ?\");\n\t\t\t\tupdateInvite.setString(1,inviteId);\n\t\t\t\tupdateInvite.execute();\t\n\t\t\t\treturn \"Invite declined!\";\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tconn.close();\n\t\t\n\t\treturn \"Error!\";\n }", "@Override\n public void onClick(View v) {\n getActivity().startActivity(new Intent(getContext(), InviteRewardsActivity.class));\n }", "public void acceptAlert() {\n WebDriverWait wait = new WebDriverWait(getDriver(), timeOut);\n wait.until(ExpectedConditions.alertIsPresent());\n getDriver().switchTo().alert().accept();\n }", "@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tinviteContactList(v);\r\n\t\t\t\t}", "public Group inviteMember(GroupId groupId, GroupMember groupMember) {\n String path = template.urlFor( UrlTemplate.GROUPS_INVITE_PATH ).build().replace( \"{groupId}\", groupId.getId() );\n com.silanis.esl.api.model.GroupMember apiGroupMember = new GroupMemberConverter(groupMember).toAPIGroupMember();\n try {\n String stringResponse = client.post( path, Serialization.toJson( apiGroupMember ) );\n com.silanis.esl.api.model.Group apiResponse = Serialization.fromJson( stringResponse, com.silanis.esl.api.model.Group.class );\n Group resultGroup = new GroupConverter(apiResponse).toSDKGroup();\n return resultGroup;\n } catch ( RequestException e ) {\n throw new EslServerException( \"Unable to invite member to group.\", e );\n } catch ( Exception e ) {\n throw new EslException( \"Unable to invite member to group.\", e );\n }\n }", "@GetMapping(\"/confirmAcceptingRequest\")\r\n\tpublic String confirmAcceptingRequest(@RequestParam(\"rideRequestId\") int rideRequestId) {\n\t\tAuthentication loggedInUser = SecurityContextHolder.getContext().getAuthentication();\r\n\t\tString username = loggedInUser.getName();\r\n\t\tUser user = userService.findUserByUsername(username);\r\n\t\t\r\n\t\tDriver theDriver = user.getDriver();\r\n\t\tRideRequest theRideRequest = userService.findTheRideRequest(rideRequestId);\r\n\t\ttheRideRequest.setRequestStatus(RequestStatus.COMFIRMED);\r\n\t\ttheRideRequest.setTheDriverThatAcceptThisRequest(theDriver);\r\n\t\t\r\n\t\t// save the driver to the DB\r\n\t\tuserService.update(theRideRequest);\r\n\t\torderService.sendOrderConfirmation(theRideRequest);\r\n\t\treturn \"redirect:/employees\";\r\n\t}", "public Integer getInvitedUserId() {\n return invitedUserId;\n }", "public static void AlertAccept() {\n\t\tAlert alt = Browser.Driver.switchTo().alert();\n\t\talt.accept();\n\t}", "public static void acceptRequest(String userId, String userEmail, String userName,\n String friendId, String friendEmail, String friendName) {\n // add user data to a map\n Map<String, Object> thisMap = new HashMap<>();\n thisMap.put(Const.FRIEND_ID_KEY, userId);\n thisMap.put(Const.USER_EMAIL_KEY, userEmail);\n thisMap.put(Const.USER_NAME_KEY, userName);\n\n // add friend data to a map\n Map<String, Object> otherMap = new HashMap<>();\n otherMap.put(Const.FRIEND_ID_KEY, friendId);\n otherMap.put(Const.USER_EMAIL_KEY, friendEmail);\n otherMap.put(Const.USER_NAME_KEY, friendName);\n\n // get a reference to the db\n FirebaseFirestore store = FirebaseFirestore.getInstance();\n\n Log.d(Const.TAG, \"acceptFriendRequest: access db \" + Thread.currentThread().getId());\n\n // delete the friend request\n store.collection(Const.USERS_COLLECTION)\n .document(userId)\n .collection(Const.USER_F_REQUESTS_COLLECTION)\n .document(friendId)\n .delete();\n\n // add each user to the friends sub-collection of the other user\n store.collection(Const.USERS_COLLECTION)\n .document(friendId)\n .collection(Const.USER_FRIENDS_COLLECTION)\n .document(userId)\n .set(thisMap);\n store.collection(Const.USERS_COLLECTION)\n .document(userId)\n .collection(Const.USER_FRIENDS_COLLECTION)\n .document(friendId)\n .set(otherMap);\n }", "@Ignore\n\t@Test\n\tpublic void testAgentAccepts() {\n\t\tparty.connect(connection);\n\t\tparty.notifyChange(settings);\n\n\t\tBid bid = makeBid(\"1\", \"1\");// best pssible\n\t\tparty.notifyChange(new ActionDone(new Offer(otherparty, bid)));\n\t\tparty.notifyChange(new YourTurn());\n\t\tassertEquals(1, connection.getActions().size());\n\t\tassertTrue(connection.getActions().get(0) instanceof Accept);\n\n\t}", "public void accept(IDN idn);", "public static void alertbox_Accept() throws CheetahException {\n\t\ttry {\n\t\t\tSystem.out.println(\"Step into alert box\");\n\t\t\tAlert simpleAlert = CheetahEngine.getDriverInstance().switchTo().alert();\n\t\t\tsimpleAlert.accept();\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\t\t}\n\t}", "public Call inviteAddress(Address addr);", "@RequestMapping(value = \"/approve\", method = RequestMethod.POST)\n\tpublic ResponseEntity<User> approveRegistration(@RequestBody String id) {\n\t\tboolean b = this.userService.setStatus(id.substring(0, id.length()-1), \"ACTIVATED\");\n\t\tif (b) return new ResponseEntity<>(HttpStatus.OK);\n\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t}", "private static void handleVideoSharingInvitation(Context context,\n Intent invitation) {\n }", "@Override\r\n\tpublic void ShowInvite(Context _in_context, String _in_data) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void ShowInvite(Context _in_context, String _in_data) {\n\t\t\r\n\t}", "public void delete(Long id) {\n log.debug(\"Request to delete Invitation : {}\", id);\n invitationRepository.deleteById(id);\n }", "void createInvitation(OutgoingEMailInvitation invitation, Boolean notify);", "@Override\n public Consumer<InventoryClickEvent> getAcceptAction() {\n return event -> {\n event.setCancelled(true);\n\n this.grantHandler.register(new Grant(\n this.target.getUniqueId(),\n this.rank.getUniqueId(),\n UUID.randomUUID(),\n this.getPlayer().getUniqueId(),\n this.reason,\n this.duration\n ));\n\n this.getPlayer().closeInventory();\n };\n }", "public void acceptAlert() {\n\t\tAlert popUp = null;\n\t\ttry {\n\t\t\tpopUp = getDriver().switchTo().alert();\n\t\t\tpopUp.accept();\n\t\t} catch (NoAlertPresentException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@RequestMapping(value = \"/{id}/approve\", method = RequestMethod.POST)\n \tpublic String approve(@PathVariable(\"id\") Long id,\n \t @RequestParam(value = \"approve\", defaultValue = \"true\", required = false) boolean approve,\n \t @RequestParam(value = \"region\", required = false) final String region, ModelMap model) {\n \t\tagentManagerService.approve(id, approve);\n \t\tmodel.addAttribute(\"region\", region);\n \t\tmodel.addAttribute(\"regions\", regionService.getAll().keySet());\n \t\treturn \"agent/list\";\n \t}", "public de.fraunhofer.fokus.movepla.model.Entitlement create(\n long entitlementId);", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(AlarmListSetMemberActivity.this,\n\t\t\t\t\t\tAlarmInviteActivity.class);\n\t\t\t\ti.putExtra(\"talk_alarm_code\", talkAlarmCode);\n\t\t\t\tstartActivity(i);\n\t\t\t\toverridePendingTransition(0, 0);\n\n\t\t\t}", "public String getInviteCode() {\n return inviteCode;\n }", "public injective.ocr.v1beta1.Tx.MsgAcceptPayeeshipResponse acceptPayeeship(injective.ocr.v1beta1.Tx.MsgAcceptPayeeship request) {\n return blockingUnaryCall(\n getChannel(), getAcceptPayeeshipMethod(), getCallOptions(), request);\n }", "public Intent getIntent() {\n return mInviteIntent;\n }", "Integer addNew(InviteEntity builder) throws IOException;", "@Transactional(readOnly = true)\n public Optional<Invitation> findOne(Long id) {\n log.debug(\"Request to get Invitation : {}\", id);\n return invitationRepository.findById(id);\n }", "public void setIncidentId(String incidentId) {\n this.incidentId = incidentId;\n }", "@Override\r\n\tpublic void onAddUser(BmobInvitation message) {\n\t\trefreshInvite(message);\r\n\t}", "public Invitation getInvitation(long id, long userId) {\n\t\treturn invitationRepository.serarchByIds(id, userId);\n\t}", "public void acceptPayeeship(injective.ocr.v1beta1.Tx.MsgAcceptPayeeship request,\n io.grpc.stub.StreamObserver<injective.ocr.v1beta1.Tx.MsgAcceptPayeeshipResponse> responseObserver) {\n asyncUnaryCall(\n getChannel().newCall(getAcceptPayeeshipMethod(), getCallOptions()), request, responseObserver);\n }", "public void setVenuesId(Integer venuesId) {\n this.venuesId = venuesId;\n }", "private void handleGroupChatInvitation(Context context,\n Intent invitation, boolean autoAccept) {\n Logger.v(TAG,\n \"handleGroupChatInvitation() entry, autoAccept: \"\n + autoAccept);\n if (autoAccept) {\n handlePluginGroupChatInvitation(context, invitation, true);\n autoAcceptGroupChat(context, invitation);\n } else {\n if (Logger.getIsIntegrationMode()) {\n Logger.d(TAG,\n \"handleGroupChatInvitation integration mode\");\n handlePluginGroupChatInvitation(context, invitation,\n false);\n } else {\n Logger.d(TAG,\n \"handleGroupChatInvitation chat app mode\");\n }\n nonAutoAcceptGroupChat(context, invitation);\n }\n Logger.v(TAG, \"handleGroupChatInvitation() exit\");\n }", "public static synchronized void handleInvitation(Context context,\n Intent intent) {\n Logger.d(TAG,\n \"handleInvitation() entry with intend action is \"\n + intent.getAction());\n String action = intent.getAction();\n if (action == null) {\n return;\n }\n String contact = formatCallerId(intent);\n intent.putExtra(DISPLAY_NAME, contact);\n if (ChatIntent.ACTION_NEW_CHAT.equalsIgnoreCase(action)) {\n Chat chatSession = RcsNotification.getInstance()\n .getChatSession(intent);\n if (chatSession == null) {\n Logger.d(TAG, \"The chat session is null\");\n return;\n }\n try {\n handleChatInvitation(context, intent);\n } catch (Exception e) {\n Logger.d(TAG, \"Chat operation error\");\n e.printStackTrace();\n }\n } else if (FileTransferIntent.ACTION_NEW_INVITATION\n .equalsIgnoreCase(action)) {\n getInstance().handleFileTransferInvitation(context,\n intent);\n } else if (GroupChatIntent.ACTION_NEW_INVITATION\n .equalsIgnoreCase(action)) {\n Logger.d(TAG, \"Group Chat invitation arrived\");\n try {\n if (!(intent.getBooleanExtra(\"isGroupChatExist\",\n false))) {\n boolean autoAccept = intent.getBooleanExtra(\n AUTO_ACCEPT, false);\n RcsNotification.getInstance()\n .handleGroupChatInvitation(context,\n intent, autoAccept);\n }\n } catch (Exception e) {\n Logger.d(TAG, \"Group Chat operation error\");\n e.printStackTrace();\n }\n } else if (ImageSharingIntent.ACTION_NEW_INVITATION\n .equalsIgnoreCase(action)) {\n handleImageSharingInvitation(context, intent);\n } else if (VideoSharingIntent.ACTION_NEW_INVITATION\n .equalsIgnoreCase(action)) {\n handleVideoSharingInvitation(context, intent);\n } /*\n * else if (ChatIntent.CHAT_SESSION_REPLACED.equalsIgnoreCase(action))\n * { handleChatInvitation(context, intent); }\n */\n Logger.v(TAG, \"handleInvitation() exit\");\n }", "private void handlePluginGroupChatInvitation(Context context,\n Intent invitation, boolean autoAccept) {\n Logger.d(TAG, \"handlePluginGroupChatInvitation entry\");\n GroupChat chatSession = getGroupChatSession(invitation);\n UUID uuid = UUID.randomUUID();\n ParcelUuid parcelUuid = new ParcelUuid(uuid);\n if (chatSession == null) {\n Logger.d(TAG, \"by simple The chatSession is null\");\n return;\n }\n String sessionId = invitation.getStringExtra(SESSION_ID);\n String groupSubject = invitation\n .getStringExtra(GroupChatIntent.EXTRA_SUBJECT);\n Logger.v(TAG, \"handlePluginGroupChatInvitation() subject: \"\n + groupSubject);\n String chatId = invitation\n .getStringExtra(GroupChatIntent.EXTRA_CHAT_ID);\n GroupInvitationInfo info = buildNotificationInfo(context,\n invitation);\n if (info == null) {\n Logger.d(TAG, \"notification info is null\");\n return;\n }\n // Add mms db\n String contact = PluginGroupChatWindow\n .generateGroupChatInvitationContact(chatId);\n if (autoAccept) {\n contact = PluginGroupChatWindow.GROUP_CONTACT_STRING_BEGINNER\n + parcelUuid.toString();\n Logger.d(TAG, \"auto accept is true\");\n }\n invitation.putExtra(PluginGroupChatWindow.GROUP_CHAT_CONTACT,\n contact);\n int messageTag = PluginGroupChatWindow.GROUP_CHAT_INVITATION_IPMSG_ID;\n Logger.d(TAG, \"notify info is\" + info.notifyInfo + \"contact=\"\n + contact);\n // broadcast intent to mms plugin to insert into mms db\n Intent intent = new Intent();\n if (info != null) {\n intent.putExtra(\"notify\", info.notifyInfo);\n }\n intent.putExtra(\"contact\", contact);\n intent.putExtra(\"messageTag\", messageTag);\n intent.putExtra(\"subject\", groupSubject);\n intent.setAction(IpMessageConsts.JoynGroupInvite.ACTION_GROUP_IP_INVITATION);\n intent.putExtra(\"groupinvite\", 1);\n MediatekFactory.getApplicationContext().sendBroadcast(intent);\n /*\n * Long messageIdInMms = PluginUtils.insertDatabase(info.notifyInfo,\n * contact, messageTag, PluginUtils.INBOX_MESSAGE); if\n * (ThreadTranslater.tagExistInCache(contact)) { Logger.d(TAG,\n * \"plugingroupchatinvitation() Tag exists\" + contact); Long thread =\n * ThreadTranslater.translateTag(contact); insertThreadIDInDB(thread,\n * groupSubject); }\n */\n if (contact\n .startsWith(PluginGroupChatWindow.GROUP_CONTACT_STRING_BEGINNER)) {\n contact = contact.substring(4);\n }\n invitation.putExtra(ChatScreenActivity.KEY_CHAT_TAG,\n parcelUuid);\n invitation.putExtra(PluginGroupChatWindow.GROUP_CHAT_CONTACT,\n contact);\n Logger.d(TAG,\n \"handlePluginGroupChatInvitation parcelUuid is \"\n + parcelUuid.toString() + \"contact is\"\n + contact);\n }", "@Override\n public void onInvite(final int type, final boolean isOpen) {\n runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n postInvite(type, isOpen);\n }\n });\n }", "public StartEngagementRequest withIncidentId(String incidentId) {\n setIncidentId(incidentId);\n return this;\n }", "PrefixRegistrationSessionEventAccept acceptRequest(PrefixRegistrationSession prefixRegistrationSession,\n String acceptanceReason,\n String actor,\n String additionalInformation) throws PrefixRegistrationRequestManagementServiceException;", "public InviteStatus invitePlayer(long gameId, String email) {\r\n\t\tGame game = gameService.lookupGame(gameId);\r\n\t\tlogger.debug(\"invite player: \" + email + \" to game \" + game.getName()) ;\r\n\t\tif (game.getStatus() != Game.STATUS.REGISTERING && \r\n\t\t\t\tgame.getStatus() != Game.STATUS.INVITING &&\r\n\t\t\t\tgame.getStatus() != Game.STATUS.CREATING) {\r\n\t\t\t\t\tlogger.warn(\"Cannot add player. bad state. gameid=\"+gameId+\" state=\"+game.getStatus());\r\n\t\t\t\treturn InviteStatus.BAD_STATE;\r\n\t\t}\t\t\r\n\t\t\r\n\t\tif (email.matches(\".*@.*\\\\..*\"))\r\n\t\t{\r\n\t\t\tMember member = memberDao.findByEmail(email);\r\n\t\t\tInvite invite = new Invite();\r\n\t\t\tif (member == null)\r\n\t\t\t{\r\n\t\t\t\tfor (Invite i : game.getInvites()) {\r\n\t\t\t\t\tif (i.getEmail() != null && i.getEmail() == email ) \r\n\t\t\t\t\t\treturn InviteStatus.ALREADY_MEMBER;\r\n\t\t\t\t}\r\n\t\t\t\tinvite.setEmail(email);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (checkIfInvited(game, member)) {\r\n\t\t\t\t\treturn InviteStatus.ALREADY_MEMBER;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tinvite.setEmail(member.getEmail());\r\n\t\t\t\tinvite.setMember(member);\r\n\t\t\t\tinvite.setFacebookId(member.getFacebookId());\r\n\t\t\t\tinvite.setName(member.getName());\r\n\t\t\t}\r\n\t\t\tinvite.setGame(game);\r\n\t\t\tinviteDao.create(invite);\r\n\t\t} \r\n\t\telse {\r\n\t\t\tlogger.warn(\"Invited bad email '\"+email+\"'\");\r\n\t\t}\r\n\t\treturn InviteStatus.SUCCESS;\r\n\t}", "public void setAcceptDate(Date acceptDate) {\r\n\t\tthis.acceptDate = acceptDate;\r\n\r\n\t}", "public Builder setStatus(com.lvl6.proto.EventQuestProto.QuestAcceptResponseProto.QuestAcceptStatus value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n status_ = value;\n onChanged();\n return this;\n }", "@Test\r\n\tpublic void testAcceptInterview() throws Exception {\r\n\t\twhen(interviewerService.acceptInterview(anyLong())).thenReturn(getInterview());\r\n\t\tmockMvc.perform(MockMvcRequestBuilders.get(\"/acceptinterview/\" + INTERVIEW_ID + \"\"))\r\n\t\t\t\t.andExpect(MockMvcResultMatchers.status().isCreated());\r\n\t}", "public InitialConfiguration invitedBy(String invitedBy) {\n this.invitedBy = invitedBy;\n return this;\n }", "public void clickbtnApprove() {\n\t\twaitForElementClickable(10,btnApprove);\n\t\tclickByJavaScript(btnApprove);\n\t\tsleep(1);\n\t}", "public Page<Invitation> getInvitations(Pageable pageable, long id) {\n\t\tPage<Invitation> invis = invitationRepository.searchByInvitado(pageable, id);\n\t\treturn invis;\n\t}", "public boolean save(ApplyInvite model);", "public void setInvestId(Integer investId) {\r\n\t\tthis.investId = investId;\r\n\t}", "public void enterEmail(String emailId) {\r\n\t\tdriver.findElement(this.email).sendKeys(emailId);\r\n\t}", "public void acceptPayeeship(injective.ocr.v1beta1.Tx.MsgAcceptPayeeship request,\n io.grpc.stub.StreamObserver<injective.ocr.v1beta1.Tx.MsgAcceptPayeeshipResponse> responseObserver) {\n asyncUnimplementedUnaryCall(getAcceptPayeeshipMethod(), responseObserver);\n }", "public void acceptJob(View v) {\n SittingJob job = currentJob;\n try {\n Controller.model.deleteJob(currentJob);\n Controller.model.openJobs.remove(currentJob);\n job.jobInfo.put(\"sitterIDKey\", \"\"+Controller.currentUser.accountInfo.get(\"ownerIDKey\"));\n Controller.model.createJob(job, false);\n Log.w(\"MA\", \"Success accepting job\");\n }\n catch(JSONException je) {\n Log.w(\"MA\", \"JSONException accepting a job\");\n }\n setContentView(R.layout.activity_sitter_page);\n setjobList();\n allJobsList();\n }", "public boolean isAllowInviteByIdentifier() {\r\n return GrouperUiConfig.retrieveConfig().propertyValueBoolean(\"inviteExternalMembers.allowInviteByIdentifier\", false);\r\n }" ]
[ "0.6054145", "0.5969835", "0.58207464", "0.5753418", "0.5680882", "0.5654518", "0.5388221", "0.53579426", "0.5272621", "0.526629", "0.5223802", "0.51083714", "0.5073427", "0.5026759", "0.50019443", "0.4961415", "0.49298316", "0.49268427", "0.4926097", "0.4907249", "0.48986515", "0.48907658", "0.48859048", "0.48760155", "0.48263842", "0.48182282", "0.47941652", "0.47892296", "0.47739282", "0.47636685", "0.47584495", "0.47543758", "0.47471282", "0.47322148", "0.47321296", "0.4723902", "0.47078368", "0.46899578", "0.46799922", "0.46708584", "0.46458325", "0.46458054", "0.46450675", "0.4639377", "0.4619814", "0.46161956", "0.46139947", "0.46066633", "0.46048722", "0.4575356", "0.4568633", "0.45433375", "0.4538097", "0.4516668", "0.44954577", "0.44795182", "0.44728133", "0.44664305", "0.44645664", "0.44583735", "0.44555807", "0.4455157", "0.44432807", "0.44432807", "0.44223544", "0.4414823", "0.441433", "0.4414219", "0.44085732", "0.43907678", "0.43730146", "0.4372654", "0.43594593", "0.43514013", "0.43513513", "0.4338272", "0.43313217", "0.4317226", "0.43130633", "0.4310348", "0.43067282", "0.4303475", "0.43030098", "0.43007427", "0.4284248", "0.42818552", "0.4266992", "0.4264237", "0.42618725", "0.42500287", "0.42450204", "0.42393172", "0.42262304", "0.4222407", "0.42220712", "0.42043832", "0.4198053", "0.41927359", "0.4187319", "0.4186042" ]
0.7889237
0
Decline the invitation identified by the given inviteId.
InviteEntity decline(Integer inviteId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "InviteEntity accept(Integer inviteId);", "@Override\n\tpublic void ruleReject(String campaignActivityId) throws ASException {\n\t\tCampaignActivity ca = caDao.get(campaignActivityId);\n\t\t\n\t\tif( ca.getRedeemStatus().equals(CampaignActivity.REDEEM_STATUS_DELIVERED)) { \n\t\t\t\n\t\t\tca.setRedeemStatus(CampaignActivity.REDEEM_STATUS_RULE_REJECTED);\n\t\t\tca.setStatusChangeDateTime(new Date());\n\t\t\t\n\t\t\tcaDao.update(ca);\n\n\t\t} else {\n\t\t\tthrow ASExceptionHelper.forbiddenException();\n\t\t}\n\t}", "boolean deleteInvitation(int invitationId);", "void setInvitationId(String invitationId);", "public void declineInvite(String player) {\r\n connection.declineInvite(player);\r\n }", "InviteEntity getInvitationById(Integer inviteId);", "public void autoDenyRelatedOffersNotAcceptedYet(int shipmentId){\n\n\t\t// First, we reject every shipmentOffer pendind.\n\t\tCollection<ShipmentOffer> remainingSO = findAllPendingByShipmentId(shipmentId);\n\t\t\n\t\tfor(ShipmentOffer so:remainingSO){\n\t\t\tif(!so.getAcceptedBySender()){\n//\t\t\t\tdeny(so.getId());\n\t\t\t\tthis.internalDeny(so);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Finally we reject every routeOffer pending related with the shipment.\n\t\t\n\t\tCollection<RouteOffer> remainingRO = routeOfferService.findAllPendingByShipmentId(shipmentId);\n\n\t\tfor(RouteOffer ro: remainingRO){\n\t\t\trouteOfferService.internalDeny(ro);\n\t\t}\n\t\t\n\t\t\n\t}", "void declineChallenge(int challengeId);", "public void setInviteUserId(Integer inviteUserId) {\n this.inviteUserId = inviteUserId;\n }", "public void delete(Long id) {\n log.debug(\"Request to delete Invitation : {}\", id);\n invitationRepository.deleteById(id);\n }", "@GetMapping(path = \"api/activity/decline/{activityid}/{token}\")\n public Response declineActivity(@PathVariable long activityid, @PathVariable String token){\n return activityService.declineActivity(activityid, userService.getUserIDFromJWT(token));\n }", "public void setInvitedUserId(Integer invitedUserId) {\n this.invitedUserId = invitedUserId;\n }", "protected OfferApproval breakWithEmployeeByResponsibleFor(RetailscmUserContext userContext, String offerApprovalId, String responsibleForId, String [] tokensExpr)\n\t\t throws Exception{\n\t\t\t\n\t\t\t//TODO add check code here\n\t\t\t\n\t\t\tOfferApproval offerApproval = loadOfferApproval(userContext, offerApprovalId, allTokens());\n\n\t\t\tsynchronized(offerApproval){ \n\t\t\t\t//Will be good when the thread loaded from this JVM process cache.\n\t\t\t\t//Also good when there is a RAM based DAO implementation\n\t\t\t\t\n\t\t\t\tuserContext.getDAOGroup().getOfferApprovalDAO().planToRemoveEmployeeListWithResponsibleFor(offerApproval, responsibleForId, this.emptyOptions());\n\n\t\t\t\tofferApproval = saveOfferApproval(userContext, offerApproval, tokens().withEmployeeList().done());\n\t\t\t\treturn offerApproval;\n\t\t\t}\n\t}", "public de.fraunhofer.fokus.movepla.model.Entitlement remove(\n long entitlementId)\n throws com.liferay.portal.kernel.exception.SystemException,\n de.fraunhofer.fokus.movepla.NoSuchEntitlementException;", "void rejectOrd(final int vId) {\r\n Orders emp1 = OrdersFactory.getvalidateOrders();\r\n if (emp1 != null) {\r\n showPlacedOrders(vId);\r\n System.out.println(\"Enter the Order ID to Reject :\");\r\n int ordid = option.nextInt();\r\n int val = OrdersFactory.rejectOrders(ordid);\r\n System.out.println(\"Succes value is :\" + val);\r\n if (val == 1) {\r\n System.out.println(\"Rejected the Order\");\r\n return;\r\n }\r\n } else {\r\n System.out.println(\"---------No Placed Orders---------\");\r\n return;\r\n }\r\n }", "boolean approveDeny(String choice, int id, int resolverId);", "void rejectRequest(@NonNull final Long id) throws ReviewReportNotFoundException;", "@Transactional(readOnly = false)\n\tpublic void rejectChatroomInvitation(User user, Chatroom chatroom) throws BadRequestException {\n\t\t// if there is no invite\n\t\tif (!this.memberInvitationSent(user, chatroom)) {\n\t\t\tthrow new BadRequestException(\"There is no invite to decline\");\n\t\t}\n\t\t// delete the relation\n\t\tthis.deleteMemberInvitation(user, chatroom);\n\t\t// delete the admin invite if it is there\n\t\tthis.deleteAdminInvitation(user, chatroom);\n\t}", "Invitation getInvitationById(int invitationId);", "@RequestMapping(\"/agent/enrollment/reject\")\n @ResponseBody\n public StatusDTO reject(@RequestParam(\"id\") long id, @RequestParam(\"reason\") String reason) {\n String signature = \"EnrollmentController#reject(long id, String reason)\";\n LogUtil.traceEntry(getLog(), signature, new String[] { \"id\", \"reason\" }, new Object[] { id, reason });\n\n if (reason == null || reason.trim().length() == 0) {\n throw new IllegalArgumentException(\"A reason must be provided.\");\n }\n\n StatusDTO statusDTO = new StatusDTO();\n try {\n completeReview(id, null, true, reason);\n statusDTO.setMessage(\"Request has been sent, you will be notified once it is processed.\");\n } catch (PortalServiceException ex) {\n LogUtil.traceError(getLog(), signature, ex);\n statusDTO.setMessage(USER_ERROR_MSG);\n }\n\n return LogUtil.traceExit(getLog(), signature, statusDTO);\n }", "void rejectOrder(String orderId);", "void rejectOrder(int id, String reason) throws ServiceException;", "private void requestDeleteExpenseLineItem() throws ERTRestApiException {\n final Cursor cursor = getContext().getContentResolver().query(\n ExpenseEntry.CONTENT_URI,\n null,\n ExpenseEntry.COLUMN_IS_DELETED + \"='true'\",\n null, null\n );\n\n if(cursor.getCount() != 0) {\n cursor.moveToFirst();\n\n do {\n\n final int expenseLineItemId = cursor.getInt(cursor\n .getColumnIndex(ExpenseEntry.COLUMN_EXPENSE_ID));\n\n final long expenseLineItemBaseId = cursor.getLong(cursor\n .getColumnIndex(ExpenseEntry._ID));\n\n ERTRestApi.apiDeleteExpenseLineItem(\n expenseLineItemId,\n new ERTRestApi.ERTRestApiListener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n getContext().getContentResolver().delete(\n ExpenseEntry.buildExpenseUri(expenseLineItemBaseId),\n null, null\n );\n }\n },\n new ERTRestApi.ERTRestApiErrorListener() {\n @Override\n public void onErrorResponse(ERTRestApi.ERTRestApiError error) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(ExpenseEntry.COLUMN_IS_DELETED, \"false\");\n getContext().getContentResolver().update(\n ExpenseEntry.buildExpenseUri(expenseLineItemBaseId),\n contentValues, null, null\n );\n }\n }\n );\n\n } while (cursor.moveToNext());\n cursor.close();\n }\n }", "@DeleteMapping(path = \"api/activity/decline/{activityid}/{token}\")\n public Response declineAttendedActivity(@PathVariable long activityid, @PathVariable String token) {\n return activityService.declineAttendedActivity(activityid, userService.getUserIDFromJWT(token));\n }", "@Override public void clientDeclineIncomingGame(Rental rental)\r\n throws RemoteException, SQLException {\r\n gameListClientModel.clientDeclineIncomingGame(rental);\r\n }", "public void cancelInvitionUser() {\n\n }", "@Test\n\tpublic void testRejectCall() throws Exception {\n\t\tlog.info(\"-------------------- Test Invite with Reject --------------------\");\n\n\t\tEndPointEvent endPointEvent;\n\t\tCallEvent callEvent;\n\n\t\t// C:---INVITE---------->:S\n\t\tlog.info(clientName + \" dial to \" + serverName + \"...\");\n\t\tSipCallController clientCallController = new SipCallController(\n\t\t\t\tclientName);\n\t\tclientEndPoint.dial(serverUri, clientCallController);\n\t\tlog.info(\"OK\");\n\n\t\tlog.info(serverName + \" expects incoming call from \" + clientName\n\t\t\t\t+ \"...\");\n\t\tendPointEvent = serverEndPointController\n\t\t\t\t.pollSipEndPointEvent(TestConfig.WAIT_TIME);\n\t\tassertTrue(\"No message received in server UA\", endPointEvent != null);\n\t\tassertTrue(\n\t\t\t\t\"Bad message received in server UA: \"\n\t\t\t\t\t\t+ endPointEvent.getEventType(),\n\t\t\t\tEndPointEvent.INCOMING_CALL.equals(endPointEvent.getEventType()));\n\n\t\tCall serverCall = endPointEvent.getCallSource();\n\t\tlog.info(\"OK\");\n\n\t\tlog.info(clientName + \" expects call ringing \" + serverName + \"...\");\n\t\tcallEvent = clientCallController\n\t\t\t\t.pollSipEndPointEvent(TestConfig.WAIT_TIME);\n\t\tassertTrue(\"No message received in client UA\", callEvent != null);\n\t\tassertTrue(\"Bad message received in client UA\",\n\t\t\t\tCallEvent.CALL_RINGING.equals(callEvent.getEventType()));\n\t\tlog.info(\"OK\");\n\n\t\t// C:<------REJECT-------:S\n\t\tlog.info(serverName + \" rejects call...\");\n\t\tSipCallController serverCallController = new SipCallController(\n\t\t\t\tserverName);\n\t\tserverCall.addListener(serverCallController);\n\t\tserverCall.terminate();\n\t\tlog.info(\"OK\");\n\n\t\tlog.info(clientName + \" expects call rejected from \" + serverName\n\t\t\t\t+ \"...\");\n\t\tcallEvent = clientCallController\n\t\t\t\t.pollSipEndPointEvent(TestConfig.WAIT_TIME);\n\t\tassertTrue(\"No message received in client UA\", callEvent != null);\n\t\tassertTrue(\"Bad message received in client UA\",\n\t\t\t\tCallEvent.CALL_REJECT.equals(callEvent.getEventType()));\n\t\tlog.info(\"OK\");\n\n\t\tlog.info(\"-------------------- Test Invite with Reject finished OK --------------------\");\n\n\t}", "public Notification deleteExpense(String expenseId) {\n Notification notification = new Notification();\n ExpenseDAO expenseDAO = new ExpenseDAO();\n\n try {\n Expense expense = expenseDAO.getById(expenseId);\n expenseDAO.delete(expense);\n notification.setNotificationType(NotificationType.SUCCESS);\n notification.setMessage(\"Deleted expense successfully\");\n } catch (Exception e) {\n notification.setNotificationType(NotificationType.DANGER);\n notification.setMessage(\"Deleted expense failed. Please try again.\");\n }\n\n return notification;\n }", "private void cancelGroupInviteNotification() {\n int size = mGroupInvitationInfos.size();\n Logger.d(TAG, \"cancelGroupInviteNotification() entry, size: \"\n + size);\n if (size == 0) {\n Context context = ApiManager.getInstance().getContext();\n Logger.e(TAG, \"cancelGroupInviteNotification() context: \"\n + context);\n if (context != null) {\n NotificationManager groupInviteNotification = (NotificationManager) context\n .getSystemService(Context.NOTIFICATION_SERVICE);\n groupInviteNotification.cancel(GROUP_INVITATION_TAG,\n NOTIFICATION_ID_CHAT);\n }\n }\n Logger.d(TAG, \"cancelGroupInviteNotification exit\");\n }", "public boolean onInviteReceived(MMXChannel.MMXInvite invite) {\n //default implementation is a no-op\n return false;\n }", "boolean editInvitation(Invitation invitation);", "public void cancelCurrentPurchase() throws VerificationFailedException {\n\t}", "public void cancelCurrentPurchase() throws VerificationFailedException {\n\t}", "@Override\n\tpublic void disinvite(Party party) throws CTPException {\n\t\t\n\t}", "void updateInvitationForReceivingUser(Invitation invitation);", "public CalendarActionResults decline(boolean sendResponse)\n\tthrows Exception {\n\t\tDeclineMeetingInvitationMessage decline = this.createDeclineMessage();\n\n\t\tif (sendResponse) {\n\t\t\treturn decline.calendarSendAndSaveCopy();\n\t\t} else {\n\t\t\treturn decline.calendarSave();\n\t\t}\n\t}", "public void attemptDelete(final int reminderId){\n\t\t\t\t\n\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n\t\t builder.setTitle(\"Delete reminder\");\n\t\t builder.setMessage(\"Are you sure you want to delete this reminder in your account?\");\n\t\t builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t \t \t dataBase.deleteEntry(reminderId);\n\t\t \t\t Toast.makeText(getApplicationContext(), \"Reminder deleted successfully.\", Toast.LENGTH_LONG).show();\n\t\t \t\t Intent i = getIntent();\n\t\t \t\t finish();\n\t\t \t\t startActivity(i);\n\t\t }\n\t\t });\n\t\t builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t }\n\t\t });\n\t\t \n\t\t AlertDialog dialog = builder.create();\n\t\t dialog.show();\n\t\t \n\t\t\t}", "public DeclineMeetingInvitationMessage createDeclineMessage() {\n\t\ttry {\n\t\t\treturn new DeclineMeetingInvitationMessage(this);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "protected OfferApproval breakWithEmployeeByOccupation(RetailscmUserContext userContext, String offerApprovalId, String occupationId, String [] tokensExpr)\n\t\t throws Exception{\n\t\t\t\n\t\t\t//TODO add check code here\n\t\t\t\n\t\t\tOfferApproval offerApproval = loadOfferApproval(userContext, offerApprovalId, allTokens());\n\n\t\t\tsynchronized(offerApproval){ \n\t\t\t\t//Will be good when the thread loaded from this JVM process cache.\n\t\t\t\t//Also good when there is a RAM based DAO implementation\n\t\t\t\t\n\t\t\t\tuserContext.getDAOGroup().getOfferApprovalDAO().planToRemoveEmployeeListWithOccupation(offerApproval, occupationId, this.emptyOptions());\n\n\t\t\t\tofferApproval = saveOfferApproval(userContext, offerApproval, tokens().withEmployeeList().done());\n\t\t\t\treturn offerApproval;\n\t\t\t}\n\t}", "public void revoke(String contextId) {\n\t\t\tIterator<Permit> i = permits.iterator();\n\n\t\t\twhile (i.hasNext()) {\n\t\t\t\tPermit permit = i.next();\n\t\t\t\t\n\t\t\t\tif (permit.id().equals(contextId)) {\n\t\t\t\t\tpermit.revoke();\n\t\t\t\t\ti.remove();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void setInvestId(Integer investId) {\r\n\t\tthis.investId = investId;\r\n\t}", "@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\n\t@Override\n\tpublic void acceptRequest(int eventId, int userid) {\n\t\tUser user = userRepository.findOne(userid);\n\t\tEvent event = findOne(eventId);\n\t\tevent.approveJoinRequest(user);\n\t\trepository.save(event);\n\t}", "public void setInvincible(boolean invincible) {\r\n \t\tthis.isInvincible = invincible;\r\n \t}", "public void reject() {\n rejectBus.add(applicantQueue.dequeue());\n }", "public void revokeOffer(OfferMgmtVO offerMgmtVO) throws MISPException {\n\n\t\tlogger.entering(\"revokeOffer\", offerMgmtVO);\n\n\t\ttry {\n\n\t\t\tthis.customerSubsManager.revokeOffer(offerMgmtVO);\n\n\t\t} catch (DBException exception) {\n\t\t\tlogger.error(\"An exception occured while revoking Offer.\",\n\t\t\t\t\texception);\n\t\t\tthrow new MISPException(exception);\n\n\t\t}\n\n\t\tlogger.exiting(\"revokeOffer\");\n\n\t}", "public ApplyInvite findById(Object id);", "public void removePendingRequest(final String id);", "void cancelReservation(String reservationId) throws ObjectNotFoundException;", "public void removeAppointmentRequest(int appointmentId)\n {\n AppointmentListSingleton appointments = AppointmentListSingleton.getInstance();\n appointments.removeRequest(appointmentId);\n }", "public void setInviteCode(String inviteCode) {\n this.inviteCode = inviteCode == null ? null : inviteCode.trim();\n }", "public boolean onInviteResponseReceived(MMXChannel.MMXInviteResponse inviteResponse) {\n //default implementation is a no-op\n return false;\n }", "public void removeFiAvailableInvoice(final String id);", "protected OfferApproval breakWithEmployeeByCurrentSalaryGrade(RetailscmUserContext userContext, String offerApprovalId, String currentSalaryGradeId, String [] tokensExpr)\n\t\t throws Exception{\n\t\t\t\n\t\t\t//TODO add check code here\n\t\t\t\n\t\t\tOfferApproval offerApproval = loadOfferApproval(userContext, offerApprovalId, allTokens());\n\n\t\t\tsynchronized(offerApproval){ \n\t\t\t\t//Will be good when the thread loaded from this JVM process cache.\n\t\t\t\t//Also good when there is a RAM based DAO implementation\n\t\t\t\t\n\t\t\t\tuserContext.getDAOGroup().getOfferApprovalDAO().planToRemoveEmployeeListWithCurrentSalaryGrade(offerApproval, currentSalaryGradeId, this.emptyOptions());\n\n\t\t\t\tofferApproval = saveOfferApproval(userContext, offerApproval, tokens().withEmployeeList().done());\n\t\t\t\treturn offerApproval;\n\t\t\t}\n\t}", "private void cancelReservation(int id) throws SQLException {\n\t\tupdateReservationCancelStatement.clearParameters();\n\t\tupdateReservationCancelStatement.setInt(1, id);\n\t\tupdateReservationCancelStatement.executeUpdate();\n\t\tgetReservationStatement.clearParameters();\n\t\tgetReservationStatement.setString(1, this.username);\n\t\tgetReservationStatement.setInt(2, id);\n\t\tResultSet result = getReservationStatement.executeQuery();\n\t\tresult.next();\n\t\tFlight f1 = getFlight(result.getInt(3));\n\t\tdeleteTravel(f1.month, f1.dayOfMonth);\n\t\tif (result.getInt(4) > 0){\n\t\t\tFlight f2 = getFlight(result.getInt(4));\n\t\t\tdeleteTravel(f2.month, f2.dayOfMonth);\n\t\t}\n\t}", "protected void handleRejectProposal(ACLMessage cfp, ACLMessage propose, ACLMessage reject) {\r\n\t\t}", "@Override\n public void onClick(View v) {\n getActivity().startActivity(new Intent(getContext(), InviteRewardsActivity.class));\n }", "public void processAppointmentRequest(int appointmentId)\n {\n AppointmentListSingleton appointments = AppointmentListSingleton.getInstance();\n appointments.approveRequest(appointmentId);\n }", "@RequestMapping(value = \"/accept/team/invitation/{invitationId}\", method = PUT)\n public LobbyTeam acceptTeamInvitation(@AuthenticationPrincipal UserSimpleDetails user,\n @PathVariable(\"invitationId\") String invitationId)\n throws TeamInvitationNotFoundException, TeamFullException, TeamNotFoundException {\n log.info(\"user {} accepts team invitation {}\", user.getIdentity(), invitationId);\n return lobbyService.acceptTeamInvitation(user.getProfileId(), invitationId);\n }", "Task<?> addInvitationForReceivingUser(Invitation invitation);", "protected void handleRejectProposal(ACLMessage cfp, ACLMessage propose, ACLMessage reject) {\n\t}", "public void rejectInvite(UserBean possibleOpponent)\n\t{\n\t\tSocket controlSocket;\n\t\ttry {\n\t\t\tcontrolSocket = new Socket(possibleOpponent.getIpAddress(), Model.controlDataSocketNumber);\n\t\t\tObjectOutputStream toPeer = new ObjectOutputStream(controlSocket.getOutputStream());\n\t\t\tClientMessage c = new ClientMessage();\n\t\t\tc.setCommand(\"REJECT\");\n\t\t\tc.setUser(new UserBean(this.hostName, this.userName, this.ipAddress));\n\t\t\tSystem.out.println(\"Rejecting invite\");\n\t\t\t\n\t\t\ttoPeer.writeObject(c);\n\t\t\n\t\t\tcontrolSocket.close();\n\t\t\t\n\t\t} catch (IOException e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "@Override\n public void onInvitationReceived(Invitation invitation) {\n String mIncomingInvitationId = invitation.getInvitationId();\n }", "public boolean isIncomingInvitePending();", "@Test\n public void rejectRevoked() {\n /*\n * Given\n */\n var uid = UID.apply();\n var user = UserAuthorization.random();\n var granted = Instant.now();\n var privilege = DatasetPrivilege.CONSUMER;\n var executor = UserId.random();\n\n var grant = DatasetGrant.createApproved(\n uid, user, privilege,\n executor, granted, Markdown.lorem());\n\n var revoked = grant.revoke(UserId.random(), Instant.now(), Markdown.lorem());\n\n /*\n * When\n */\n var rejected = revoked.reject(UserId.random(), Instant.now(), Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(rejected)\n .as(\"The reject should not be successful\")\n .satisfies(a -> {\n assertThat(a.isFailure()).isTrue();\n });\n }", "private void completeReview(long ticketId, ApprovalDTO dto, boolean reject, String reason)\n throws PortalServiceException {\n CMSUser user = ControllerHelper.getCurrentUser();\n Enrollment ticketDetails = enrollmentService.getTicketDetails(user, ticketId);\n \n long processInstanceId = ticketDetails.getProcessInstanceId();\n if (processInstanceId <= 0) {\n throw new PortalServiceException(\"Requested profile is not available for approval.\");\n }\n try {\n List<TaskSummary> availableTasks = businessProcessService.getAvailableTasks(user.getUsername(),\n Arrays.asList(user.getRole().getDescription()));\n boolean found = false;\n for (TaskSummary taskSummary : availableTasks) {\n if (taskSummary.getName().equals(APPROVAL_TASK_NAME)\n && taskSummary.getProcessInstanceId() == processInstanceId) {\n found = true;\n long taskId = taskSummary.getId();\n\n if (!reject) {\n // apply approver changes\n ProviderInformationType provider = applyChanges(dto, taskId);\n businessProcessService.completeReview(taskId, user.getUsername(),\n Arrays.asList(user.getRole().getDescription()), provider, false, reason);\n } else {\n businessProcessService.completeReview(taskId, user.getUsername(),\n Arrays.asList(user.getRole().getDescription()), null, true, reason);\n }\n }\n }\n if (!found) {\n throw new PortalServiceException(\"You do not have access to the requested operation.\");\n }\n } catch (Exception ex) {\n throw new PortalServiceException(\"Error while invoking process server.\", ex);\n }\n }", "public void cancelarPresupuesto(Long idPresupuesto) {\n // DAR AVISO POR PANTALLA QUE SI SE CANCELA, SE BORRAN LOS MOVIMIENTOS\n Presupuesto presupuesto = buscarPresupuesto(idPresupuesto);\n // primero me fijo si el presupuesto esta aceptado\n // si no lo esta, devuelvo el estado en el que se encuentra\n EstadoPresupuesto estadoAceptado = estadoPresupuestoRepository\n .findByNombreEstado(globales.NOMBRE_ESTADO_PRESUPUESTO_ACEPTADO);\n\n if (presupuesto.getEstadoPresupuesto().equals(estadoAceptado)) {\n // presupuesto aceptado, comienzo el CU\n\n } else {\n\n // aviso que el presupuesto no se encuentra aceptado\n // no se puede cancelar y paso el nombre del estado\n }\n\n }", "@Override\n public void releaseElevator(final int elevatorId) {\n log.debug(\"releasing {}\", elevatorId);\n\n Elevator elevator = elevatorRepository.getElevator(elevatorId);\n elevator.setCurrentFloor(elevator.getAddressedFloor());\n elevator.setBusy(false);\n elevator.setDirection(Elevator.Direction.NONE);\n\n elevatorRepository.updateElevator(elevator);\n }", "public void resetReplayAttackCheckInTimeline(String timelineId) {\n if ((null != timelineId) && (null != mCrypto) && (null != mCrypto.getOlmDevice())) {\n mCrypto.resetReplayAttackCheckInTimeline(timelineId);\n }\n }", "public void testBidDeclineNotification(){\n User owner = new User();\n Thing thing1 = new Thing(owner);\n\n User borrower = new User();\n\n Bid bid = null;\n try {\n bid = new Bid(thing1, borrower, 800);\n }catch(Exception e){\n fail();\n }\n try {\n thing1.placeBid(bid);\n } catch (ThingUnavailableException e) {\n fail();\n }\n\n // owner.declineBid(thing1, bid);\n //assertTrue(borrower.notifiedOfDeclinedBid(bid));\n\n assertTrue(false);\n }", "void notifyReject(final TradeInstruction instruction);", "@POST\n @Path(\"/{leaveId}/approvedeny\")\n @Produces(MediaType.APPLICATION_JSON)\n @Consumes(MediaType.APPLICATION_JSON)\n public final String approveDeny(@PathParam(\"leaveId\") final int leaveId, final ManagerResponse m) {\n LeaveDetails leaveDetails = LeaveDetails.listById(leaveId);\n String s1 = leaveDetails.approveDeny(leaveId, m.getLeaveStatus(), m.getLeaveMgrComment());\n return \"Manager Response:\" + s1 + \" \";\n }", "@Test\n public void revokeApproved() {\n var uid = UID.apply();\n var user = UserAuthorization.random();\n var granted = Instant.now();\n var privilege = DatasetPrivilege.CONSUMER;\n var executor = UserId.random();\n\n var grant = DatasetGrant.createApproved(\n uid, user, privilege,\n executor, granted, Markdown.lorem());\n\n /*\n * When\n */\n DatasetGrant revoked = grant.revoke(UserId.random(), Instant.now(), Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(revoked)\n .as(\"The request is closed and not active after it is revoked\")\n .satisfies(g -> {\n assertThat(g.asDatasetMember()).isNotPresent();\n assertThat(g.isOpen()).isFalse();\n assertThat(g.isActive()).isFalse();\n assertThat(g.isClosed()).isTrue();\n });\n }", "@Override\n\tpublic void setResumeId(long resumeId) {\n\t\t_candidate.setResumeId(resumeId);\n\t}", "void stopDiscountById(Long id) throws ServiceException;", "@WebMethod(operationName = \"suspendMember\")\n public boolean suspendMember(@WebParam(name = \"id\") String id) {\n return update(id, \"SUSPENDED\");\n }", "void updateInvitationForSendingUser(Invitation invitation);", "public String transaction_cancel(int reservationId)\n\t{\n\t\tif (this.username == null) {\n\t\t\treturn \"Cannot cancel reservations, not logged in\\n\";\n\t\t}\n\t\ttry {\n\t\t\tbeginTransaction();\n\t\t\tif (checkNotCanceledReservation(reservationId)){\n\t\t\t\t//canceling Reservation, set cancel = 1\n\t\t\t\tcancelReservation(reservationId);\n\t\t\t\t//refund for canceled Reservation\n\t\t\t\tgetReservationStatement.clearParameters();\n\t\t\t\tgetReservationStatement.setString(1, this.username);\n\t\t\t\tgetReservationStatement.setInt(2, reservationId);\n\t\t\t\tResultSet result = getReservationStatement.executeQuery();\n\t\t\t\tresult.next();\n\t\t\t\tupdateBalance(getBalance() + result.getInt(7));\n\t\t\t\tresult.close();\n\t\t\t\tcommitTransaction();\n\t\t\t\treturn \"Canceled reservation \" + reservationId + \"\\n\";\n\t\t\t} \n\t\t\trollbackTransaction();\n\t\t\treturn \"Failed to cancel reservation \" + reservationId + \"\\n\" + (DEBUG ? \"1\\n\" : \"\");\n\t\t} catch (Exception e) {\n\t\t\tif (DEBUG) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\trollbackTransaction();\n\t\t\treturn \"Failed to cancel reservation \" + reservationId + \"\\n\" + (DEBUG ? \"2\\n\" : \"\");\n\t\t}\n\t}", "protected OfferApproval breakWithEmployeeByCompany(RetailscmUserContext userContext, String offerApprovalId, String companyId, String [] tokensExpr)\n\t\t throws Exception{\n\t\t\t\n\t\t\t//TODO add check code here\n\t\t\t\n\t\t\tOfferApproval offerApproval = loadOfferApproval(userContext, offerApprovalId, allTokens());\n\n\t\t\tsynchronized(offerApproval){ \n\t\t\t\t//Will be good when the thread loaded from this JVM process cache.\n\t\t\t\t//Also good when there is a RAM based DAO implementation\n\t\t\t\t\n\t\t\t\tuserContext.getDAOGroup().getOfferApprovalDAO().planToRemoveEmployeeListWithCompany(offerApproval, companyId, this.emptyOptions());\n\n\t\t\t\tofferApproval = saveOfferApproval(userContext, offerApproval, tokens().withEmployeeList().done());\n\t\t\t\treturn offerApproval;\n\t\t\t}\n\t}", "public de.fraunhofer.fokus.movepla.model.Entitlement fetchByPrimaryKey(\n long entitlementId)\n throws com.liferay.portal.kernel.exception.SystemException;", "@Override\n\tpublic boolean rejectPartner(Partner partner) {\n\t\treturn false;\n\t}", "public String doCancel(Integer id, User user)\r\n/* 130: */ {\r\n/* 131:130 */ String result = \"\";String returnStat = \"0\";\r\n/* 132: */ \r\n/* 133:132 */ Expence expence = (Expence)this.expenceDao.get(Integer.valueOf(id.intValue()));\r\n/* 134:133 */ if ((\"0\".equals(expence.getStat())) || (expence.getStat() == \"0\") || (\"1\".equals(expence.getStat())) || (expence.getStat() == \"1\")) {\r\n/* 135:134 */ return result = \"[id=\" + expence.getId() + \"]该项数据已经回退!\";\r\n/* 136: */ }\r\n/* 137:138 */ ExpenceFlow expenceFlow = new ExpenceFlow();\r\n/* 138:139 */ expenceFlow.setGxsj(new Date());\r\n/* 139:140 */ expenceFlow.setExpence(expence);\r\n/* 140:141 */ expenceFlow.setUser(user);\r\n/* 141:142 */ expenceFlow.setOptContent(\"回退\");\r\n/* 142:143 */ expenceFlow.setYwlc(Integer.valueOf(0));\r\n/* 143:144 */ this.expenceFlowDao.save(expenceFlow);\r\n/* 144:146 */ if ((expence.getStat() == \"3\") || (\"3\".equals(expence.getStat())))\r\n/* 145: */ {\r\n/* 146:147 */ if (expence.getBankRunningId() == null) {\r\n/* 147:148 */ return result = \"[flow_id=\" + id + \"]bankRunningId为空!\";\r\n/* 148: */ }\r\n/* 149:151 */ BankRunning bankRunning = (BankRunning)this.bankRunningService.get(Integer.valueOf(expence.getBankRunningId().intValue()));\r\n/* 150:152 */ if (bankRunning == null) {\r\n/* 151:153 */ return \"银行流水id:\" + expence.getBankRunningId();\r\n/* 152: */ }\r\n/* 153:157 */ if ((bankRunning.getBank() != null) && (!\"\".equals(bankRunning.getBank().getId())))\r\n/* 154: */ {\r\n/* 155:158 */ Bank b = (Bank)this.bankService.get(bankRunning.getBank().getId());\r\n/* 156:159 */ double cush = new Double(b.getCush() - bankRunning.getLrje()).doubleValue();\r\n/* 157:160 */ this.bankService.updateBankCush(cush, Integer.valueOf(bankRunning.getBank().getId().intValue()));\r\n/* 158:161 */ this.bankRunningService.delete(expence.getBankRunningId());\r\n/* 159: */ }\r\n/* 160: */ }\r\n/* 161:166 */ expence.setGxsj(new Date());\r\n/* 162:167 */ expence.setStat(returnStat);\r\n/* 163:168 */ this.expenceDao.update(expence);\r\n/* 164: */ \r\n/* 165:170 */ return result;\r\n/* 166: */ }", "public void expireVaccine(String vaccineName) {\r\n if(vaccines.remove(vaccineName)) {\r\n System.out.print(vaccineName + \" expired!\");\r\n }\r\n else {\r\n throw new RuntimeException( getClass().getSimpleName() + \"is not vaccinated by \" + vaccineName + \"!\");\r\n }\r\n }", "public boolean cancelEvent(String id){\n Event e = getEvent(id);\n return this.removeEvent(e);\n }", "public String transaction_cancel(int reservationId) {\r\n // only implement this if you are interested in earning extra credit for the HW!\r\n\t\ttry {\r\n\t\t\tif (username == null){\r\n\t\t\t\treturn \"Cannot pay, not logged in\\n\";\r\n\t\t\t}\r\n\t\t\tbeginTransaction();\r\n\r\n\t\t\tsearchFirstFidStatement.clearParameters();\r\n\t\t\tsearchFirstFidStatement.setString(1, username);\r\n\t\t\tsearchFirstFidStatement.setInt(2, reservationId);\r\n\t\t\tResultSet cancel = searchFirstFidStatement.executeQuery();\r\n\t\t\t\r\n\t\t\tsearchSecondFidStatement.clearParameters();\r\n\t\t\tsearchSecondFidStatement.setString(1, username);\r\n\t\t\tsearchSecondFidStatement.setInt(2, reservationId);\r\n\t\t\tResultSet cancel2 = searchSecondFidStatement.executeQuery();\r\n\t\t\t\r\n\t\t\tif (cancel.isBeforeFirst()){\r\n\t\t\t\tcancel.next();\r\n\t\t\t\tcancelReservationStatement.setString(1, username);\r\n\t\t\t\tcancelReservationStatement.setInt(2, reservationId);\r\n\t\t\t\tcancelReservationStatement.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\tint firstFID = cancel.getInt(\"fid1\");\r\n\t\t\t\tcheckBookingStatement.clearParameters();\r\n\t\t\t\tcheckBookingStatement.setInt(1, firstFID);\r\n\t\t\t\tResultSet f1 = checkBookingStatement.executeQuery();\r\n\t\t\t\tint current1 = f1.getInt(\"count\");\r\n\t\t\t\tupdateBookingStatement.clearParameters();\r\n\t\t\t\tupdateBookingStatement.setInt(1, current1-1);\r\n\t\t\t\tupdateBookingStatement.setInt(2, firstFID);\r\n\t\t\t\tupdateBookingStatement.executeQuery();\r\n\t\t\t} else {\r\n\t\t\t\trollbackTransaction();\r\n\t\t\t}\r\n\t\t\tif (cancel2.next()){\r\n\t\t\t\tint secondFID = cancel2.getInt(\"fid2\");\r\n\t\t\t\tcheckBookingStatement.clearParameters();\r\n\t\t\t\tcheckBookingStatement.setInt(1, secondFID);\r\n\t\t\t\tResultSet f2 = checkBookingStatement.executeQuery();\r\n\t\t\t\tint current2 = f2.getInt(\"count\");\r\n\t\t\t\tupdateBookingStatement.clearParameters();\r\n\t\t\t\tupdateBookingStatement.setInt(1, current2-1);\r\n\t\t\t\tupdateBookingStatement.setInt(2, secondFID);\r\n\t\t\t\tupdateBookingStatement.executeQuery();\r\n\t\t\t}\r\n\t\t\tcommitTransaction();\r\n\t\t\treturn \"Canceled reservation \" + reservationId + \"\\n\";\r\n\r\n\t\t} catch (SQLException e){\r\n\t\t\t//rollbackTransaction();\r\n\t\t\treturn \"Failed to cancel reservation \" + reservationId;\r\n\t\t}\r\n }", "@Override\n public void remove(int id) {\n Venda v;\n\n v = em.find(Venda.class, id);\n em.remove(v);\n// transaction.commit();\n }", "public Integer getInviteUserId() {\n return inviteUserId;\n }", "@Override\n\tpublic boolean approvePartner(Partner partner) {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic void removeExperience(int id) {\n\t\t\r\n\t}", "public boolean removeInvite(int pid) {\n try {\n java.sql.PreparedStatement s = QuartzKingdoms.DBKing.prepareStatement(\"DELETE FROM invitations WHERE player_id=? AND kingdom_id=?;\");\n s.setInt(1, pid);\n s.setInt(2, this.id);\n if(s.executeUpdate() == 1) {\n return true;\n } else {\n return false;\n }\n } catch (SQLException e) {\n e.printStackTrace();\n return false;\n }\n }", "public de.fraunhofer.fokus.movepla.model.Entitlement create(\n long entitlementId);", "public boolean claim(String id);", "public void cancelTradeOffer()\n\t{\n\t\tm_trade.cancelOffer(this);\n\t}", "protected OfferApproval breakWithEmployeeByDepartment(RetailscmUserContext userContext, String offerApprovalId, String departmentId, String [] tokensExpr)\n\t\t throws Exception{\n\t\t\t\n\t\t\t//TODO add check code here\n\t\t\t\n\t\t\tOfferApproval offerApproval = loadOfferApproval(userContext, offerApprovalId, allTokens());\n\n\t\t\tsynchronized(offerApproval){ \n\t\t\t\t//Will be good when the thread loaded from this JVM process cache.\n\t\t\t\t//Also good when there is a RAM based DAO implementation\n\t\t\t\t\n\t\t\t\tuserContext.getDAOGroup().getOfferApprovalDAO().planToRemoveEmployeeListWithDepartment(offerApproval, departmentId, this.emptyOptions());\n\n\t\t\t\tofferApproval = saveOfferApproval(userContext, offerApproval, tokens().withEmployeeList().done());\n\t\t\t\treturn offerApproval;\n\t\t\t}\n\t}", "void removeInvitedTrans(ITransaction transaction, String userId);", "public vn.com.ecopharma.hrm.rc.model.InterviewSchedule removeByVacancyCandidateAndInterview(\n\t\tlong vacancyCandidateId, long interviewId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\tvn.com.ecopharma.hrm.rc.NoSuchInterviewScheduleException;", "@Override\n public void postProcess(int index, ApplicationInvite invite) {\n InviteOrganisation inviteOrganisation = invite.getInviteOrganisation();\n if (inviteOrganisation != null && !simpleMap(inviteOrganisation.getInvites(), ApplicationInvite::getId).contains(invite.getId())) {\n inviteOrganisation.getInvites().add(invite);\n }\n }", "@Override\n public void denyAddressExchangeRequest(UUID requestId) throws CantDenyAddressExchangeRequestException, PendingRequestNotFoundException {\n try {\n\n ProtocolState protocolState = ProtocolState.PROCESSING_SEND;\n cryptoAddressesNetworkServiceDao.denyAddressExchangeRequest(requestId, protocolState);\n\n final CryptoAddressRequest cryptoAddressRequest = cryptoAddressesNetworkServiceDao.getPendingRequest(requestId);\n\n executorService.submit(new Runnable() {\n @Override\n public void run() {\n try {\n sendNewMessage(\n getProfileDestinationToRequestConnection(\n cryptoAddressRequest.getIdentityPublicKeyResponding(),\n NetworkServiceType.UNDEFINED,\n platformComponentTypeSelectorByActorType(cryptoAddressRequest.getIdentityTypeResponding())\n ),\n getProfileSenderToRequestConnection(\n cryptoAddressRequest.getIdentityPublicKeyRequesting(),\n NetworkServiceType.UNDEFINED,\n platformComponentTypeSelectorByActorType(cryptoAddressRequest.getIdentityTypeRequesting())\n ),\n buildJsonDenyMessage(cryptoAddressRequest));\n } catch (CantSendMessageException | InvalidParameterException e) {\n reportUnexpectedException(e);\n }\n }\n });\n\n\n\n } catch(PendingRequestNotFoundException |\n CantDenyAddressExchangeRequestException e){\n errorManager.reportUnexpectedPluginException(this.getPluginVersionReference(), UnexpectedPluginExceptionSeverity.DISABLES_SOME_FUNCTIONALITY_WITHIN_THIS_PLUGIN, e);\n throw e;\n } catch (Exception e){\n\n errorManager.reportUnexpectedPluginException(this.getPluginVersionReference(), UnexpectedPluginExceptionSeverity.DISABLES_SOME_FUNCTIONALITY_WITHIN_THIS_PLUGIN, e);\n throw new CantDenyAddressExchangeRequestException(FermatException.wrapException(e), null, \"Unhandled Exception.\");\n }\n }", "public synchronized void removeGroupInvite(String chatId) {\n Logger.d(TAG, \"removeGroupInvite() entry, mListener: \"\n + mListener);\n if (mListener != null) {\n mListener.onRemovedGroupInvite(chatId);\n }\n updateTempGroupInvitationInfos(chatId);\n mGroupInvitationInfos.remove(chatId);\n updateGroupInvitationNotification();\n Logger.d(TAG, \"removeGroupInvite() exit\");\n }", "@Override\n\tpublic void cancelRequest(int id) {\n\t\tSession session = factory.getCurrentSession();\n\t\tQuery query = session\n\t\t\t\t.createQuery(\"update Booking b set b.bookingStatus='' where b.bookingId=\"+id );\n\t\tint i = query.executeUpdate();\n\t\t\n\t\t\n\t}", "protected void handleRejectProposal(ACLMessage cfp, ACLMessage propose, ACLMessage reject) {\r\n\t\twindow.println(\"Agent \"+reject.getSender().getLocalName()+\" a rejete la proposition pour \" + reject.getContent());\r\n\t}" ]
[ "0.6166887", "0.60251576", "0.58446336", "0.56084234", "0.55355763", "0.5525713", "0.5521726", "0.5518805", "0.5410991", "0.5242338", "0.5214292", "0.5202623", "0.5201776", "0.5188338", "0.5165805", "0.5162487", "0.5134622", "0.51195896", "0.50702256", "0.50155985", "0.5009068", "0.49535412", "0.4935363", "0.488846", "0.4882033", "0.4879675", "0.48768952", "0.48609248", "0.485899", "0.48416588", "0.48296377", "0.48176783", "0.48176783", "0.4814832", "0.48089442", "0.47875676", "0.47102925", "0.46896496", "0.4688196", "0.4664316", "0.46590558", "0.4637528", "0.46258554", "0.4622212", "0.4617292", "0.46124166", "0.460779", "0.46042067", "0.45969918", "0.4590674", "0.4585776", "0.45783782", "0.45607212", "0.45500082", "0.4548439", "0.45342875", "0.45262402", "0.44779646", "0.44647673", "0.44594178", "0.4450805", "0.44457573", "0.44450992", "0.44427863", "0.4438459", "0.443126", "0.44201398", "0.44131538", "0.4411914", "0.4410595", "0.44058013", "0.44055486", "0.4404529", "0.43978414", "0.43968913", "0.43958986", "0.43930417", "0.4361087", "0.4358452", "0.4355751", "0.43532854", "0.4349024", "0.43468243", "0.43433923", "0.4342245", "0.43318903", "0.43306088", "0.43285874", "0.4323928", "0.43194115", "0.43188554", "0.43033534", "0.4293564", "0.4292168", "0.42907256", "0.4282091", "0.427758", "0.42651466", "0.42572725", "0.4252032" ]
0.7341522
0
TODO Autogenerated method stub
@Override public Collection<AccessFunction> getALLFunctionOfGroup(Users user ) throws RemoteException { String sql = " Groupname = '"+user.getUser_groups()+"'"; return AccessSQL.selectAccessFunction(sql, dsSQL.getConn()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public Collection<AccessFunction> getALLFunctionOfGroup(String groupName ) throws RemoteException { String sql = " Groupname = '"+groupName+"'"; return AccessSQL.selectAccessFunction(sql, dsSQL.getConn()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Created by dllo on 17/9/21.
public interface BookDao { //查询所有 List findAll(); // 分类查询 List findOne(String cid); // 查询书的详细信息 Book findOnlyOne(String cid); // 加载图书 Book load(String bid); // 添加图书 void add(Book book); // 删除图书 void del(String bid); // 编辑图书 void edit(Book book); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private void m50366E() {\n }", "private void poetries() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void kk12() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "public void mo38117a() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public void init() {\n }", "public void method_4270() {}", "private void init() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n void init() {\n }", "@Override\n public void init() {}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n protected void init() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private void strin() {\n\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void init() {\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public abstract void mo70713b();", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "public void m23075a() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n protected void initialize() \n {\n \n }", "private void m50367F() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "public void mo21877s() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override public int describeContents() { return 0; }", "public void mo12628c() {\n }", "@Override\n public void initialize() { \n }", "private void init() {\n\n\n\n }", "public abstract void mo56925d();", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}" ]
[ "0.5922455", "0.5819311", "0.5801189", "0.5757101", "0.57385427", "0.5690491", "0.5680914", "0.5665104", "0.5632398", "0.5632398", "0.56311905", "0.56195015", "0.5616426", "0.55878925", "0.55878925", "0.55878925", "0.55878925", "0.55878925", "0.5548928", "0.5547571", "0.55474466", "0.55453444", "0.5525548", "0.5524427", "0.55134815", "0.55121404", "0.5502627", "0.5493026", "0.5485288", "0.5480371", "0.54752946", "0.5470363", "0.5464591", "0.54628384", "0.5449653", "0.5449653", "0.5448542", "0.54415166", "0.5435472", "0.5434233", "0.5431417", "0.54206246", "0.5416484", "0.5416484", "0.5416484", "0.5413071", "0.5413071", "0.5413071", "0.54126513", "0.5410185", "0.5409146", "0.540265", "0.5400179", "0.53927916", "0.53927916", "0.53927916", "0.538505", "0.53814", "0.53814", "0.53803515", "0.5378766", "0.53685516", "0.5362761", "0.5359102", "0.5356583", "0.5356583", "0.5356583", "0.5356583", "0.5356583", "0.5356583", "0.53518546", "0.5330904", "0.53298193", "0.53253585", "0.53213376", "0.53135234", "0.5312765", "0.5311706", "0.5298399", "0.5298399", "0.5298399", "0.5298399", "0.5298399", "0.5298399", "0.5298399", "0.52973264", "0.52782756", "0.52751964", "0.52746046", "0.52739406", "0.52713704", "0.52680427", "0.5257701", "0.52573335", "0.5250503", "0.5241281", "0.5234703", "0.5234079", "0.5232265", "0.52293146", "0.52293146" ]
0.0
-1
Initializes a new character using a player and a characterid
public Character(Player player, int characterID) { gameOver = false; this.name = player.name; this.characterID = characterID; direction = 2; speed = 1; invincible = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Character(int id, int loyalty)\r\n \t{\r\n \t\tif(id < CharacterProfile.values().length && id >= 0)\r\n \t\t{\r\n \t\t\tCharacterProfile profile = CharacterProfile.values()[id];\r\n \t\t\t\r\n \t\t\tthis.selected = false;\r\n \t\t\tthis.id = id;\r\n \t\t\tthis.loyalty = loyalty;\r\n \t\t\tthis.lastSleep = 0;\r\n \t\t\tthis.targetedRoom = null;\r\n \t\t\tthis.name = profile.name;\r\n \t\t\tthis.currentRoom = null; // None\r\n \t\t\tthis.x = 0;\r\n \t\t\tthis.y = 0;\r\n \r\n \t\t\ttry {\r\n \t\t\t\tthis.img = new Image(Game.ASSETS_DIR + profile.spriteName);\r\n \t\t\t} catch (SlickException e) {\r\n \t\t\t\te.printStackTrace();\r\n \t\t\t}\r\n \t\t}\r\n \t\telse\r\n \t\t\tSystem.out.println(\"Error: wrong ID!\");\r\n \t}", "private void createCharacters()\n {\n Person player = new Person(PLAYER,getRoom(STARTROOM));\n characters.add(player);\n }", "public Player(byte id, short xPos, short yPos, byte hp, String name, ArrayList<Pair<Byte, Short>> weapons, ArrayList<Bullet> bullets, LinkedList<Byte> trakedWeapons, boolean jumpState, boolean fallState, short initial_y, byte currentWeapon,short currWeaponammo, short shootingDirection, boolean sprint, int score, byte roundsWon, boolean ready,int stateOfMovement,byte charId){\n this.id =id;\n this.score = score;\n this.ready = ready;\n this.xPos = xPos;\n this.yPos = yPos;\n this.hp = hp;\n this.weapons = weapons;\n this.name = name;\n character_id = 1;\n this.weaponEntryTracker = trakedWeapons;\n this.isJumping=jumpState;\n this.isFalling=fallState;\n this.bulletsFired = bullets;\n this.currentWeapon = new Pair<>(currentWeapon,currWeaponammo);\n this.initial_y = initial_y;\n this.shootingDirection = shootingDirection;\n this.sprint = sprint;\n this.roundsWon = roundsWon;\n this.stateOfMovement = stateOfMovement;\n this.character_id = charId;\n audioHandler = new AudioHandler();\n }", "public static Character createCharacter () {\n\n System.out.println(\"Enter the name of your character : \");\n Scanner sc = new Scanner(System.in);\n String nameCharacter = sc.next();\n\n System.out.println(\"Enter the healpoint of your character : \");\n Scanner scan = new Scanner(System.in);\n String healPointCharacter = scan.next();\n int hpCharacter = Integer.parseInt(healPointCharacter);\n\n System.out.println(\"Enter the power of your character : \");\n Scanner sca = new Scanner(System.in);\n String powerCharacter = sca.next();\n int pcCharacter = Integer.parseInt(powerCharacter);\n\n System.out.println(\"Enter the initiative of your character : \");\n Scanner scann = new Scanner(System.in);\n String initiativeCharacter = scann.next();\n int iniCharacter = Integer.parseInt(initiativeCharacter);\n\n Character characterPlayer = new Character(nameCharacter, pcCharacter, hpCharacter, iniCharacter);\n System.out.println(\"Your character has been created with success!\");\n System.out.println(characterPlayer);\n\n return characterPlayer;\n }", "public Character()\n\t{\n\t\tlevel = 0;\n\t\thealth = 0;\n\t}", "public CharacterBuilder characterId(long characterId) {\n this.characterId = characterId;\n return this;\n }", "public void set_charId(byte id){\n character_id = id;\n }", "public void init(@NonNull CharacterObject character) {\n if (character.getWorld() != null) {\n this.eventSystem = character.getWorld().getObjectManager().getEventSystem();\n this.experience += this.experiencePerFloor * character.getWorld().getFloor();\n }\n this.character = character;\n\n }", "public Character(Gui aGui)\n\t{\n\t\tthis(450,810);\n\t\tgui = aGui;\n\t}", "public Character()\n\t{\n\t\tthis(450,810);\n\t}", "public Character() {\n }", "public Character() {\n this(null, null, null);\n }", "public Character(int l, int h)\n\t{\n\t\tlevel = l;\n\t\thealth = h;\n\t}", "public Node(Character charId) {\n this.charId = charId;\n }", "public Player(int i){\r\n playerID=i;\r\n }", "public void createStartingPlayers(CFrame frame) {\r\n\t\tSet<String> passableActions = new HashSet<String>();\r\n\t\tint playerNumber = Integer.parseInt(frame.getSidePanel().getButtons().getButton(\"start\", null));\r\n\t\tString name =\"\", charr;\r\n\t\tMap<String, String> pc = new HashMap<String, String>();\r\n\t\t\r\n\t\tframe.getSidePanel().getText().setText(\"Please select a character\\nand enter your name\\n\");\r\n\t\tfor(int i =0;i<playerNumber;i++){\r\n\t\t\tString test = frame.getSidePanel().getButtons().getButton(\"characterSelect\", passableActions);\r\n\r\n\t\t\tString Playercharacter[] = test.split(\",\");\r\n\t\t\tname= Playercharacter[0];\r\n\t\t\tcharr= Playercharacter[1];\r\n\t\t\tpassableActions.add(charr);\r\n\t\t\t\r\n\t\t\tpc.put(charr, name);\r\n\r\n\t\t\tSystem.out.println(\"Output: \" + name+\" : \"+charr);\r\n\t\t}\r\n\t\t\r\n\t\tfor(BoardObject object: boardObjects){\r\n\t\t\tSystem.out.println(object.getName() +\" \"+passableActions);\r\n\t\t\tif(object instanceof Character && passableActions.contains(object.getName())){\r\n\t\t\t\tSystem.out.println(object.getName());\r\n\t\t\t\t((Character) object).setAsPlayer(true);\r\n\t\t\t\t((Character) object).setPlayerName(pc.get(object.getName()));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tdeck.deal(players(), players().size());\r\n\r\n\t\t//Testing allocation\r\n\t\tfor(Character c: players())\r\n\t\t\tSystem.out.println(c.getName() + \": \" + c.playerName());\r\n\t}", "public Character(int startingHealth, int damageValue)\n {\n currentHealth = startingHealth;\n attackDamage = damageValue;\n }", "Character(long id, String name, String desc, String tn, JSONObject obj) {\n\t\tthis.id = id;\n\t\tthis.name = name; \n\t\tthis.description = desc; \n\t\tthis.thumbnail = tn;\n\t\tthis.response = obj; \n\t}", "public Player(String playerId) {\n\t\tthis.playerid = playerId;\n\t\tthis.pieceType = null;\n\t}", "private HumanGamePlayerOnKeyboard initializePlayer() {\n\t\tHumanGamePlayerOnKeyboard player = new HumanGamePlayerOnKeyboard();\n\t\tplayer.setPlayerName(HUMAN_PLAYER_NAME);\n\t\treturn player;\n\t}", "public static PlayableCharacter createPlayableCharacter(String name){\n\t\treturn new PlayableCharacter(name);\n\t}", "public Character(int x,int y)\n\t{\n\t\tthis(x,y,R_WITHOUT_MONEY);\n\t}", "private void initializePlayerController (Player player) {\n if (player1 instanceof InteractivePlayer)\n new PlayerController(\n (InteractivePlayer)player,game,in);\n }", "public Player(String name, double chip){\r\n\t\tthis.name = name;\r\n\t\tthis.chip = chip; \r\n\t\tbet = 0;\r\n\t\tplayerHand = new PlayerHand();\r\n\t\ttable = null;\r\n\t}", "public Character() {\n\t\tgetLifeForce();\n\t}", "Player(int id, String name){\n\t\tthis();\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t}", "CharacterType createCharacterType(CharacterType t, long gameId);", "private void initPlayers() {\n this.playerOne = new Player(1, 5, 6);\n this.playerTwo = new Player(2, 0, 1);\n this.currentPlayer = playerOne;\n\n }", "public Command(int Player) {\r\n\t\tmyPlayer = Player;\r\n\t}", "public Character(int x, int y, String s)\n\t{\n\t\txCoord = x;\n\t\tyCoord = y;\n\t\tappearance = s;\n\t}", "public Player(String name, int id) {\r\n this.name = name;\r\n this.id = id; //to account for array being 0\r\n emptyHand();\r\n \r\n wins =0;\r\n losses = 0;\r\n }", "public ClientPlayer(Client client, String username, Integer id, InputHandler input, Level level) {\r\n\t\tthis(0, 0, client, username, id, input, level);\r\n\t}", "public Character(String name, int armor, int attack, int stamina, int speed, int luck, \r\n\t File imagePath) {\r\n\t\t\tthis.name.set(name);\r\n\t\t\tthis.armor.set(armor);\r\n\t\t\tthis.attack.set(attack);\t\r\n\t\t\tthis.stamina.set(stamina);\r\n\t\t\tthis.speed.set(speed);\r\n\t\t\tthis.luck.set(luck);\r\n\t\t\tportrait = imagePath;\r\n\t\t\tthis.level.set((armor + attack + stamina + speed + luck) / 100);\r\n\t}", "public Player(int id) throws IOException {\n findAndConstructPlayerFromDatabase(id);\n }", "Player attackingPlayer(int age, int overall, int potential) {\r\n Player newPlayer = new Player(this.nameGenerator.generateName(), age, overall, potential, 'C' , 'F');\r\n\r\n\r\n\r\n\r\n }", "public Player()\r\n\t{\r\n\t\tpCards = new String[DECK_SIZE];\r\n\t\thandCount = 0;\r\n\t\tstand = false;\r\n\t}", "public ClientPlayer(String username, Integer id, Level level) {\r\n\t\tsuper(username, id, level);\r\n\t}", "public Characters() {\n setWeapon(weapon);\n }", "public CharacterEntry(byte[] bytes, String name, String PID_name, byte[] weaponRanks) throws WrongSizeException {\r\n\r\n if(bytes.length != 0x54){\r\n throw new WrongSizeException(\"A character entry was made out of an array of the wrong size.\");\r\n }\r\n\r\n this.entryName = name;\r\n this.PID_name = PID_name;\r\n\r\n this.PID_pointer = new byte[]{bytes[0], bytes[1], bytes[2], bytes[3]};\r\n this.MPID_pointer = new byte[]{bytes[4], bytes[5], bytes[6], bytes[7]};\r\n Null_pointer = new byte[]{bytes[8], bytes[9], bytes[10], bytes[11]};\r\n Portrait_pointer = new byte[]{bytes[12], bytes[13], bytes[14], bytes[15]};\r\n Class_pointer = new byte[]{bytes[16], bytes[17], bytes[18], bytes[19]};\r\n Affiliation_pointer = new byte[]{bytes[20], bytes[21], bytes[22], bytes[23]};\r\n Weaponlevel_pointer = new byte[]{bytes[24], bytes[25], bytes[26], bytes[27]};\r\n Skill1_pointer = new byte[]{bytes[28], bytes[29], bytes[30], bytes[31]};\r\n Skill2_pointer = new byte[]{bytes[32], bytes[33], bytes[34], bytes[35]};\r\n Skill3_pointer = new byte[]{bytes[36], bytes[37], bytes[38], bytes[39]};\r\n Animation1_pointer = new byte[]{bytes[40], bytes[41], bytes[42], bytes[43]};\r\n Animation2_pointer = new byte[]{bytes[44], bytes[45], bytes[46], bytes[47]};\r\n this.unknownbyte1 = bytes[48];\r\n this.unknownbyte2 = bytes[49];\r\n this.unknownbyte3 = bytes[50];\r\n this.unknownbyte4 = bytes[51];\r\n this.unknownbyte5 = bytes[52];\r\n this.unknownbyte6 = bytes[53];\r\n this.level = bytes[54];\r\n this.build = bytes[55];\r\n this.weight = bytes[56];\r\n this.bases = new byte[]{bytes[57], bytes[58], bytes[59], bytes[60], bytes[61], bytes[62], bytes[63], bytes[64]};\r\n this.growths = new byte[]{bytes[65], bytes[66], bytes[67], bytes[68], bytes[69], bytes[70], bytes[71], bytes[72]};\r\n this.supportgrowth = new byte[]{bytes[73], bytes[74], bytes[75], bytes[76], bytes[77], bytes[78], bytes[79], bytes[80]};\r\n this.unknownbyte9 = bytes[81];\r\n this.unknownbyte10 = bytes[82];\r\n this.unknownbyte11 = bytes[83];\r\n\r\n this.weaponRanks = weaponRanks;\r\n }", "public static void addCharacter(String username, AStarCharacter character, String roomID)\r\n\t{\t\r\n\t\t// check to see if the character has an active walkable A* path that needs to be checked\r\n\t\tif(character.getPath().size() > 0)\r\n\t\t{\r\n\t\t\t// set the character's current tile as the very last tile of the path\r\n\t\t\tcharacter.setCurrentTile(character.getPath().get(character.getPath().size() - 1));\r\n\t\t\t\r\n\t\t\t// snap the character to the correct position on the current tile\r\n\t\t\tcharacter.snapToCurrentTile();\r\n\t\t\t\r\n\t\t\t// clear the path so the character doesn't start walking face-fucking-first into a tree\r\n\t\t\tcharacter.clearPath();\r\n\t\t}\r\n\t\t\r\n\t\t// put the character into the HashMap\r\n\t\tcharacters.put(username, character);\r\n\t\t\r\n\t\t// check to make sure the room actually currently exists\r\n\t\tif(rooms.get(roomID) != null)\r\n\t\t{\r\n\t\t\t// put the character back into the room\r\n\t\t\trooms.get(roomID).addCharacterName(username);\r\n\t\t}\r\n\t}", "public void initPlayer();", "public Character(String name, int armor, int attack, int stamina, int speed, int luck) {\r\n\t\tthis.name.set(name);\r\n\t\tthis.armor.set(armor);\r\n\t\tthis.attack.set(attack);\r\n\t\tthis.stamina.set(stamina);\r\n\t\tthis.speed.set(speed);\r\n\t\tthis.luck.set(luck);\r\n\t\tthis.level.set((armor + attack + stamina + speed + luck) / 100);\r\n\t}", "public Player(){\r\n\t\tname = \"\";\r\n\t\tchip = 0;\r\n\t\tbet = 0;\r\n\t\tplayerHand = new PlayerHand();\r\n\t\ttable = null;\r\n\t}", "void init(char c);", "public void addNewCharacterAndSelect() {\n\t\tPathfinderCharacter newChar = new PathfinderCharacter(\"New Adventurer\");\n\t\tlong id = addCharacterToDB(newChar);\n\t\tif (id != -1) {\n\t\t\tsetSelectedCharacter(id);\n\t\t} else {\n\t\t\tToast.makeText(getContext(), \"Error creating new character. Please contact developers for support if issue persists.\", Toast.LENGTH_LONG).show();\n\t\t}\n\t\tperformUpdateReset();\n\t}", "public int getCharacterId() {\n return characterId;\n }", "public Character(String name, Gender gen, Species spec) {\n this.name = name;\n this.gender = gen;\n this.species = spec;\n this.lifePoints = BASE_LIFE_POINTS;\n this.energy = BASE_ENERGY;\n this.level = 1;\n this.exp = 0;\n }", "MyChar() {\n\t\tmyChar = '0';\n\t}", "public Player(){\n default_init();\n }", "Player()\n\t{\n\t\tiHP = 30;\n\t\tstrEquippedWeapon = \"None\";\n\t\tiLocation = 1;\n\t\tblnPlayerState = true;\n\t\tblnPlayerVictory = false;\n\t\tblnSearchedDirt = false;\n\t\tblnSearchedBarrels = false;\n\t\t\n\t}", "Player(String name, int startingX, int startingY, Texture image) {\n super(startingX, startingY, image);\n\n initPlayer(name);\n }", "public Player(String name)\n {\n // initialise instance variables\n this.name = name;\n // start out with $100 in your wallet\n wallet = new Wallet(100);\n inventory = new HashMap<String, Item>();\n currentRoom = null;\n olcc = new OLCC();\n\n }", "public Character(String name, int health, int armor, int attack, int stamina, int speed, int luck, File imagePath) {\r\n\t\tthis.name.set(name);\r\n\t\tthis.health.set(health);\r\n\t\tthis.armor.set(armor);\r\n\t\tthis.attack.set(attack);\r\n\t\tthis.stamina.set(stamina);\r\n\t\tthis.speed.set(speed);\r\n\t\tthis.luck.set(luck);\r\n\t\tportrait = imagePath;\r\n\t\tthis.level.set((armor + attack + stamina + speed + luck) / 100);\r\n\t}", "public Player(){\n\t\tthis.cell = 0;\n\t}", "public SinglePlayerGameController() {\n player1 = new Player(\"Player 1\");\n computer = new Player(\"Computer\");\n game = new Game(new Dice(), player1, computer);\n player1.setColor(\"blue\");\n computer.setColor(\"red\");\n diceImage = new DiceImage();\n }", "public void init() {\n if (!getLocation().isTileMap()) {\n //Debug.signal( Debug.NOTICE, null, \"PlayerImpl::init\");\n this.animation = new Animation(this.wotCharacter.getImage(), ClientDirector.getDataManager().getImageLibrary());\n this.sprite = (Sprite) this.wotCharacter.getDrawable(this);\n this.brightnessFilter = new BrightnessFilter();\n this.sprite.setDynamicImageFilter(this.brightnessFilter);\n }\n this.movementComposer.init(this);\n }", "public Weapon (Player player) {\n\t\tthis.player = player;\n\t}", "private void default_init(){\n id = 0;\n xPos = 0;\n yPos = 0;\n hp = 100;\n name=\"\";\n character_id = 1;\n weapons = new ArrayList<>();\n weaponEntryTracker = new LinkedList<>();\n isJumping = false;\n isFalling = false;\n initial_y= -1;\n stateOfMovement = 0;\n for(int i = 0; i < 3; i++){\n this.weapons.add(new Pair<>(NO_WEAPON_ID, (short) 0));\n }\n this.weapons.set(0,new Pair<>(PISTOL_ID,DEFAULT_PISTOL_AMMO));\n currentWeapon = this.weapons.get(0);\n bulletsFired = new ArrayList<>();\n shootingDirection = 1;\n energy = 0;\n sprint = false;\n score = 0;\n roundsWon = 0;\n ready = false;\n audioHandler = new AudioHandler();\n }", "public Tile(char letter) {\n\t\tthis.letter = letter;\n\t\tactive = false;\n\t}", "public Player() {\n this(\"\", \"\", \"\");\n }", "public Player(String name) {\n setName(name);\n setId(++idCounter);\n setHealthPoints(100);\n setYourTurn(false);\n }", "public CombatController(Player player, Monster monster) {\n this.player = player;\n this.monster = monster;\n\n\n\n }", "public Player(int r, int c) { // contructor that makes the player object and declares the varaibles\r\n\t\t_row = r;\r\n\t\t_col = c;\r\n\t\t_isAlive = true;\r\n\t}", "public Player(int x, int y, int X, int Y){\n\t\tx1 = x;\n\t\ty1 = y;\n\t\tx2 = X;\n\t\ty2 = Y;\n\t\titemsInInventory = 0;\n\t\tfor (int i = 0; i < 10; i++){\n\t\t\tinventorySpaces[i] = false;\n\t\t}\n\t\tint k = 0;\n\t\tfor (int i = 0; i < 3; i++){\n\t\t\tfor (int j = 1; j < 4; j++){\n\t\t\t\tcharAnimation[k] = new TextureRegion(charTexture, i * TILE_SIZE, j * TILE_SIZE, TILE_SIZE, TILE_SIZE);\n\t\t\t\tk++;\n\t\t\t}\n\t\t}\n\t\tcharacter = new Sprite (charAnimation[0]);\n\t\tcharacter.setPosition(x1,y1); \n\t}", "public Player (Deck mainDeck) {\n this.mainDeck = mainDeck;\n }", "boolean addCharacterToGuild(long characterId, long guildId);", "Builder addCharacter(Person value);", "public Player (char u, char l, char d, char r)\n {\n // For the arrow keys it's possible to pass in an ampersand and itll read as a direction, but not sure how to fix that bug\n\n UPKEY = (int) u;\n DOWNKEY = (int) d;\n LEFTKEY = (int) l;\n RIGHTKEY = (int) r;\n this.name = \"\";\n this.hasName = false;\n\n this.col = color(0, 0, 0);\n playerLocations = new ArrayList<Location>();\n }", "public void newGame() {\n // this.dungeonGenerator = new TowerDungeonGenerator();\n this.dungeonGenerator = cfg.getGenerator();\n\n Dungeon d = dungeonGenerator.generateDungeon(cfg.getDepth());\n Room[] rooms = d.getRooms();\n\n String playername = JOptionPane.showInputDialog(null, \"What's your name ?\");\n if (playername == null) playername = \"anon\";\n System.out.println(playername);\n\n this.player = new Player(playername, rooms[0], 0, 0);\n player.getCurrentCell().setVisible(true);\n rooms[0].getCell(0, 0).setEntity(player);\n\n frame.showGame();\n frame.refresh(player.getCurrentRoom().toString());\n frame.setHUD(player.getGold(), player.getStrength(), player.getCurrentRoom().getLevel());\n }", "PlayableCharacter(int health, int attack, int intelligence, int defence, int speed, String type, String name, String description, Move[] moveset, String ability, StatItem heldItem, StatItem hatItem, StatItem shirtItem, StatItem pantsItem, StatItem shoesItem, BufferedImage[] sprites) {\n super(health, attack, intelligence, defence, speed, type, name, moveset, ability, heldItem, sprites);\n this.description = description;\n this.status = null;\n this.fainted = false;\n this.experience = 0;\n this.level = 1;\n this.hatItem = hatItem;\n this.shirtItem = shirtItem;\n this.pantsItem = pantsItem;\n this.shoesItem = shoesItem;\n }", "Player(String playerName) {\n this.playerName = playerName;\n }", "public ComputerPlayer1(char marker) {\n this.marker = marker;\n }", "public Character(String name, int hp, int energy) {\n\t\tthis.name = name;\n\t\tthis.hp = hp;\n\t\tthis.energy = energy;\n\t\tthis.maxHp = hp;\n\t\tthis.maxEnergy = energy;\n\t}", "public Player() {\t\n\t}", "@Override\n\tpublic void init(Board board) {\n\t\tthis.board = board;\n\t\tthis.currentPlayer = board.currentPlayer.charAt(0);\n\t}", "protected Human(String name, char displayChar, int hitPoints) {\n\t\tsuper(name, displayChar, hitPoints, ZombieCapability.ALIVE);\n\t}", "public Player(String name) {\r\n this.name = name;\r\n// Maxnum = 0;\r\n special = 0;\r\n index = 0;\r\n }", "public abstract void use(PlayerCharacter character);", "public static String addCharacterToGameRoom(String gameID, AStarCharacter character)\r\n\t{\r\n\t\tString gameRoomID = gameID + \"_0000\"; // initialize with a dummy value\r\n\t\t\r\n\t\tif(gameID.equals(\"fireworks\")) // Fireworks game\r\n\t\t{\r\n\t\t\t// check to find a room that currently has less than the maximum number of players available\r\n\t\t\tfor(int i = 0; i < MAX_FIREWORKS_ROOMS; i++)\r\n\t\t\t{\r\n\t\t\t\t// check the number of players in this room\r\n\t\t\t\tVMKGameRoom gameRoom = (VMKGameRoom)rooms.get(gameID + \"_\" + i);\r\n\t\t\t\tif(gameRoom.countCharacters() < MAX_PLAYERS_PER_FIREWORKS_ROOM && !gameRoom.isStarted())\r\n\t\t\t\t{\r\n\t\t\t\t\t// this will be the room that we put this user into\r\n\t\t\t\t\tgameRoomID = gameRoom.getRoomID();\r\n\t\t\t\t\taddCharacter(character.getUsername(), character, gameRoomID);\r\n\t\t\t\t\treturn gameRoomID;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// no suitable room found, so create one and add the player to it\r\n\t\t\tgameRoomID = \"fireworks_\" + MAX_FIREWORKS_ROOMS;\r\n\t\t\taddRoom(gameRoomID, new VMKRoom(gameRoomID, \"Fireworks Game \" + MAX_FIREWORKS_ROOMS,\"\"));\r\n\t\t\taddCharacter(character.getUsername(), character, gameRoomID);\r\n\t\t\t\r\n\t\t\t// increment the number of Fireworks rooms available\r\n\t\t\tMAX_FIREWORKS_ROOMS++;\r\n\t\t}\r\n\t\telse if(gameID.equals(\"pirates\")) // Pirates game\r\n\t\t{\r\n\t\t\t// check to find a room that currently has less than the maximum number of players available\r\n\t\t\tfor(int i = 0; i < MAX_PIRATES_ROOMS; i++)\r\n\t\t\t{\r\n\t\t\t\t// check the number of players in this room\r\n\t\t\t\tVMKGameRoom gameRoom = (VMKGameRoom)rooms.get(gameID + \"_\" + i);\r\n\t\t\t\tif(gameRoom.countCharacters() < MAX_PLAYERS_PER_PIRATES_ROOM && !gameRoom.isStarted())\r\n\t\t\t\t{\r\n\t\t\t\t\t// this will be the room that we put this user into\r\n\t\t\t\t\tgameRoomID = gameRoom.getRoomID();\r\n\t\t\t\t\taddCharacter(character.getUsername(), character, gameRoomID);\r\n\t\t\t\t\treturn gameRoomID;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// no suitable room found, so create one and add the player to it\r\n\t\t\tgameRoomID = \"pirates_\" + MAX_PIRATES_ROOMS;\r\n\t\t\taddRoom(gameRoomID, new VMKRoom(gameRoomID, \"Pirates Game \" + MAX_PIRATES_ROOMS,\"\"));\r\n\t\t\taddCharacter(character.getUsername(), character, gameRoomID);\r\n\t\t\t\r\n\t\t\t// increment the number of Pirates rooms available\r\n\t\t\tMAX_PIRATES_ROOMS++;\r\n\t\t}\r\n\t\t\r\n\t\treturn gameRoomID; // return a the generated gameRoomID\r\n\t}", "public Player(int id, String name, int userID) {\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t\tthis.colorID = getNextColor();\t\t\t\t\t\t\t\t\t\t\t\t\t//set the colorID to the next free color\n\t\tthis.userID = userID;\n\t}", "public Characters(Tree story){//Will eventually automate the creation of Character objects when given a story. So really, the bulk of the work in terms of Character analysis will be done here in this class/in Character.\n\t\tWordTrainingSet.importWordSet(false);\n\t\tcharacters = new TreeMap<String, Character>(); //Character's name (String) , all of its qualities are stored in the Character object which is the value.\n\t\tinitializeAllCharacters(story);\n\t}", "public GameCharacter(int x,int y,int targetI,int targetJ) {\r\n\t\tthis.x=x;this.y=y;\r\n\t\tthis.targetI=targetI;this.targetJ=targetJ;\r\n\t}", "public void InitGame(){\n System.out.format(\"New game initiated ...\");\n Game game = new Game(client_List);\n SetGame(game);\n }", "public void AddNewCharacter();", "public Tile(Character c) {\n\t\tc=Character.toUpperCase(c);\n\t\tset_character(c);\n\t}", "public void init() {\n\t\t// Image init\n\t\tcharacter_static = MainClass.getImage(\"\\\\data\\\\character.png\");\n\t\tcharacter_static2 = MainClass.getImage(\"\\\\data\\\\character2.png\");\n\t\tcharacter_static3 = MainClass.getImage(\"\\\\data\\\\character3.png\");\n\t\t\n\t\tcharacterCover = MainClass.getImage(\"\\\\data\\\\cover.png\");\n\t\tcharacterJumped = MainClass.getImage(\"\\\\data\\\\jumped.png\");\n\t\t\n\t\t// Animated when static.\n\t\tthis.addFrame(character_static, 2000);\n\t\tthis.addFrame(character_static2, 50);\n\t\tthis.addFrame(character_static3, 100);\n\t\tthis.addFrame(character_static2, 50);\n\t\t\n\t\tthis.currentImage = super.getCurrentImage();\n\t}", "public RandomNPC(int id) {\n\t\tsuper(id);\n\t}", "void initializePlayer();", "private Player(final int objectId) {\n this(objectId, null);\n\n _ai = new PlayerAI(this);\n\n if (!ServerConfig.EVERYBODY_HAS_ADMIN_RIGHTS) {\n setPlayerAccess(GmAccessConfig.gmlist.get(objectId));\n } else {\n setPlayerAccess(GmAccessConfig.gmlist.get(0));\n }\n if (AcpConfig.allowAcp) {\n acpComponent = new AcpComponent(this);\n }\n }", "public Player(String s) //only constructor\n {\n \tsuper(s,1,false);\n \tposition=-1;\n \tship=false;\n \tSetHealth();\n \tSetWealth();\n }", "@Override\n protected void initGame() {\n getGameWorld().setEntityFactory(new PlatformerFactory());\n getGameWorld().setLevelFromMap(\"Platformergame1.json\");\n\n // Sets spawnloction of the player\n player = getGameWorld().spawn(\"player\", 50, 50);\n }", "public void createCharacters()\n {\n Item item_chambermaid = new Item(\"Broom\",\"The brush that she uses\");\n Item item_bob_taylor = new Item(\"Toys\",\"Bob Taylor toys\");\n Item item_mr_Cunningham = new Item(\"Black hat\",\"The nice hat of Mr Cunningham\");\n Item item_ms_Wellington = new Item(\"Ring\", \"This is the wedding ring\");\n \n // Neutral characters creation //\n mr_Taylor = new Neutral(\"Mr Taylor\",\" \", poolroom, \"..\\\\pictures\\\\Characters\\\\MrTaylor2.png\");\n ms_Taylor = new Neutral(\"Ms Taylor\",\"Oh no ! My poor husband is dead ! What am I going to do now ?!\", poolroom, \"..\\\\pictures\\\\Characters\\\\MsTaylor2.png\");\n ms_Cunningham = new Neutral(\"Ms Cunningham\",\"My husband was the best old friend of Mr Taylor\", poolroom, \"..\\\\pictures\\\\Characters\\\\MsCunningham2.png\");\n \n // Ally characters creation //\n chambermaid = new Ally(\"Chambermaid\",\"I was in the dancing room to serve the guests.I was not with the master\", poolroom, item_chambermaid, \"..\\\\pictures\\\\Characters\\\\Chambermaid.png\");\n bob_Taylor = new Ally(\"Bob Taylor\",\"What happened to my father ? \", poolroom, item_bob_taylor, \"..\\\\pictures\\\\Characters\\\\BobTaylor2.png\");\n mr_Cunningham = new Ally(\"Mr Cunningham\", \"I was in my bedroom when I heard someone screaming. So I went down stairs quickly\", poolroom, item_mr_Cunningham, \"..\\\\pictures\\\\Characters\\\\MrCunningham2.png\");\n ms_Wellington = new Ally(\"Ms Wellington\", \"I was in the dancing room with my husband. The chambermaid served us.\", poolroom, item_ms_Wellington, \"..\\\\pictures\\\\Characters\\\\MsWellington2.png\");\n \n // Enemy characters ceration //\n valet = new Enemy(\"Valet\",\"I was in the kitchen. I checked the wine delivery\", poolroom,4,80,12,\"..\\\\pictures\\\\Characters\\\\Valet2.png\"); // damage =4 accuraccy = 80, HP=12\n caretaker = new Enemy(\"Caretaker\",\"I was in my hut to repair the fork\",poolroom, 2,20,5, \"..\\\\pictures\\\\Characters\\\\Caretaker2.png\"); // damage =2 accuraccy = 20, HP=5\n mr_Wellington = new Enemy(\"Mr Wellington\",\"I was in the dancing room with my wife\", poolroom, 1,10,7, \"..\\\\pictures\\\\Characters\\\\MrWellington2.png\"); // damage =1 accuraccy = 10, HP=7\n nina_Taylor = new Enemy(\"Nina Taylor\", \"I was in the library and I read a good book\", poolroom, 2, 30, 8,\"..\\\\pictures\\\\Characters\\\\NinaTaylor2.png\"); // damage =2 accuraccy = 30, HP=8\n skeleton = new Enemy(\"Oscar the skeleton\",\"A human skeleton\", laboratory, 2, 80, 5,\"..\\\\pictures\\\\Characters\\\\skeleton.png\");\n ghost = new Enemy(\"Casper the Ghost\", \"A little green ghost\", livingroom, 1, 50, 4, \"..\\\\pictures\\\\Characters\\\\ghost.png\");\n \n listOfPNG = new ArrayList();\n listOfPNG.add(ms_Taylor);\n listOfPNG.add(ms_Cunningham);\n listOfPNG.add(chambermaid);\n listOfPNG.add(bob_Taylor);\n listOfPNG.add(mr_Cunningham);\n listOfPNG.add(ms_Wellington);\n //listOfPNG.add(valet);\n //listOfPNG.add(caretaker);\n listOfPNG.add(mr_Wellington);\n listOfPNG.add(nina_Taylor);\n \n \n }", "public Player()\r\n\t{\r\n\t\tscore = 0;\r\n\t\tsetPlayerName();\r\n\t}", "public Player(Integer nameKey){\n\t\thand = new HashSet<Card>();\n\t\tswitch(nameKey){\n\t\tcase 0:\n\t\t\tname = \"Kasandra Scarlet\"; break;\n\t\tcase 1:\n\t\t\tname = \"Jack Mustard\"; break;\n\t\tcase 2:\n\t\t\tname = \"Diane White\"; break;\n\t\tcase 3:\n\t\t\tname = \"Jacob Green\"; break;\n\t\tcase 4:\n\t\t\tname = \"Eleanor Peacock\"; break;\n\t\tcase 5:\n\t\t\tname = \"Victor Plum\"; break;\n\t\t}\n\t}", "public ClientPlayer(float x, float z, Client client, String username, Integer id, InputHandler input, Level level) {\r\n\t\tsuper(username, id, level);\r\n\t\tthis.client = client;\r\n\t\tthis.input = input;\r\n\t}", "public static CharNode createCharNode(char character){\n \t\tif(character < charNodeConstants.length){\n \t\t\tCharNode charNode = charNodeConstants[character];\n \t\t\tif(charNode != null) return charNode;\n \t\t\t\n \t\t\treturn (charNodeConstants[character] = new CharNode(character));\n \t\t}\n \t\t\n \t\treturn new CharNode(character);\n \t}", "@Override\n\tpublic void initializeForNewDay(DndCharacter dndCharacter) {\n\n\t}", "public Player(Othello othello, char player) {\n\t\tthis.othello=othello;\n\t\tthis.player=player;\n\t\tthis.type = null;\n\t}", "public Player(String username)\n\t{\n\t\tm_username = username;\n\t\tm_requests = new HashMap<String, RequestType>();\n\t}", "public Player()\n\t{\n\t\tmyName = DEFAULT_NAME;\n\t\tmyHand = new PokerHand(5);\n\t\tmyNumberWins = 0;\n\t\tmyAmAI = false;\n\t}" ]
[ "0.65572023", "0.62478316", "0.623935", "0.6236827", "0.6184361", "0.6181978", "0.6158178", "0.61377925", "0.6074549", "0.59999245", "0.5973496", "0.57684636", "0.5761618", "0.576138", "0.57553947", "0.5754936", "0.5749227", "0.57453763", "0.5701568", "0.5685965", "0.56669325", "0.5648185", "0.5614626", "0.5612499", "0.56083477", "0.5556815", "0.554709", "0.55387044", "0.5535892", "0.5535256", "0.5529682", "0.552107", "0.5517356", "0.5507611", "0.55072063", "0.5493843", "0.5489339", "0.54832166", "0.54767084", "0.5475627", "0.5473106", "0.54708934", "0.54501903", "0.5447174", "0.5442256", "0.54410917", "0.5439436", "0.54334396", "0.54069597", "0.5383277", "0.53745884", "0.53678477", "0.53675514", "0.5367411", "0.5362883", "0.5359294", "0.5359061", "0.53492314", "0.53475654", "0.5343888", "0.5341893", "0.5340631", "0.5337442", "0.5331746", "0.5331561", "0.5295522", "0.52908957", "0.529057", "0.5287926", "0.52870053", "0.5269162", "0.52687955", "0.52552134", "0.5251636", "0.5248963", "0.52426004", "0.5230987", "0.52300096", "0.52281255", "0.5227907", "0.52192515", "0.52187955", "0.52180976", "0.52150655", "0.5197489", "0.51924187", "0.5191866", "0.5190446", "0.5186141", "0.5178713", "0.5176922", "0.5174529", "0.51629", "0.51615274", "0.51597357", "0.5155231", "0.5144993", "0.514472", "0.5140686", "0.5140236" ]
0.7938791
0
Gives back the direction
public float getDirection() { return direction; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void changeDirectionBackwards() {\n\n if(--direction == -1)\n direction = 3;\n }", "void reverseDirection();", "public void reverseDirection() {\n\t\tdirection *= -1;\n\t\ty += 10;\n\t}", "public void backDown(){\n backSolenoid.set(DoubleSolenoid.Value.kReverse);\n }", "public void reverseDirection(Position ep) throws InvalidPositionException;", "public void backward()\n\t{\n\t\tupdateState( MotorPort.BACKWARD);\n\t}", "public void back() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null)\n\t return;\n\n\tif (!crossLocation.isEmpty()) {\n\t\t\n\t crossLocation.pop();\n\n\t //back\n\t ArrayList<Location> lastNode = crossLocation.peek();\n\t next = lastNode.get(0);\n\t}\n\n\tLocation loc = getLocation();\n\t\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\t\n\tint counter = dirCounter.get(getDirection());\n\tdirCounter.put(getDirection(), --counter);\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n }", "public int getBackward() {\n return this.backward;\n }", "private int backwardPosition() {\n\t\tif(getPosition() > 0) {\n\t\t\treturn getPosition() - 1;\n\t\t} else {\n\t\t\treturn getMaxPosition();\n\t\t}\n\t}", "public Direction reverse()\n {\n return new Direction(dirInDegrees + (FULL_CIRCLE / 2));\n }", "public double bearingReverse() {\r\n return this.bearingReverse;\r\n }", "int getDirection();", "void moveBack()\n\t{\n\t\tif (length != 0) \n\t\t{\n\t\t\tcursor = back; \n\t\t\tindex = length - 1; //cursor will be at the back\n\t\t\t\n\t\t}\n\t}", "@Override\n public void backward() {\n }", "public void stepBackward() {\n\t\tposition = backwardPosition();\n\t}", "public int getDirection();", "public void back() {\n\t\tif (path.isEmpty()) {\n\t\t\tpath = crossLocation.pop();\n\t\t\tLocation loc = path.get(path.size() - 1);\n\t\t\tint dir = getLocation().getDirectionToward(loc);\n\t\t\tif (dir == Location.HALF_CIRCLE) {\n\t\t\t\tdirsCount[0]--;\n\t\t\t} else if (dir == Location.AHEAD) {\n\t\t\t\tdirsCount[1]--;\n\t\t\t} else if (dir == Location.RIGHT) {\n\t\t\t\tdirsCount[2]--;\n\t\t\t} else {\n\t\t\t\tdirsCount[3]--;\n\t\t\t}\n\t\t}\n\t\tnext = path.remove(path.size() - 1);\n\t\tmove();\n\t}", "@Override\n public int convertToAbsoluteDirection(int flags, int layoutDirection) {\n\n if (mSwipeBack) {\n\n mSwipeBack = mButtonShowedState != ButtonsState.GONE;\n\n return 0;\n }\n\n return super.convertToAbsoluteDirection(flags, layoutDirection);\n }", "private void moveBack(){\r\n\t\tturnAround();\r\n\t\tmove();\r\n\t}", "@Override\r\n\tpublic String moveBack() {\n\t\tif((0<=x && x<=50) && (0<=y && y<=10) && (0<=z && z<50))\r\n\t\t{\r\n\t\t\tz++;\r\n\t\t}\r\n\t\telse if((0<=x && x<=50) && (40<=y && y<=50) && (0<=z && z<50))\r\n\t\t{\r\n\t\t\tz++;\r\n\t\t}\r\n\t\telse if((0<=x && x<=50) && (0<=y && y<=50) && (0<=z && z<10))\r\n\t\t{\r\n\t\t\tz++;\r\n\t\t}\r\n\t\telse if((0<=x && x<=10) && (0<=y && y<=50) && (0<=z && z<50))\r\n\t\t{\r\n\t\t\tz++;\r\n\t\t}\r\n\t\telse if((0<=x && x<=50) && (0<=y && y<=50) && (40<=z && z<50))\r\n\t\t{\r\n\t\t\tz++;\r\n\t\t}\r\n\t\telse if((40<=x && x<=50) && (0<=y && y<=50) && (0<=z && z<50))\r\n\t\t{\r\n\t\t\tz++;\r\n\t\t}\r\n\t\treturn getFormatedCoordinates();\r\n\t}", "public float getDirection();", "private void faceBackwards(){\n\t\tturnLeft();\n\t\tturnLeft();\n\t}", "String getDirection();", "private float reverseDirection(float dir) {\n if (dir < Math.PI) return (float) (dir+Math.PI);\n else return (float) (dir-Math.PI);\n }", "public void reverseY()\r\n {\r\n\t if(moveY < 0)\r\n\t\t moveY = moveY * (-1);\r\n\t else if(moveY > 0)\r\n\t\t moveY = moveY * (-1);\r\n }", "public void reverseDirectionY()\n\t{\n\t\t\n\t\tvy = -vy;\n\t}", "public Direction opposite() {\n return opposite;\n }", "@Override public int convertToAbsoluteDirection(int flags, int layoutDirection) {\n if (swipeBack) {\n swipeBack = buttonState != ButtonState.GONE;\n return 0;\n }\n return super.convertToAbsoluteDirection(flags, layoutDirection);\n }", "public void reverseLastTranslation() {\r\n this.translate(-lastDx,-lastDy);\r\n }", "private void flip()\r\n\t{\r\n\t\tif(heading == Direction.WEST)\r\n\t\t{\r\n\t\t\tsetDirection(Direction.EAST);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsetDirection(Direction.WEST);\r\n\t\t}\r\n\t}", "public double getDirectionMove();", "public void frontDown(){\n frontSolenoid.set(DoubleSolenoid.Value.kReverse);\n }", "public String findBackward() {\n\t\t\tString result=\"\";\n\t\t\treturn result ;\n\t\t}", "public String backwards()\n\t{\n\t\tString answer = \"\";\n\t\tDLLNode cursor = tail;\n\t\twhile (cursor != null)\n\t\t{\n\t\t\tanswer = \"<--\" + cursor.data + answer;\n\t\t\tcursor = cursor.prev;\n\t\t}\n\n\t\tanswer = \"(null)\" + answer;\n\t\treturn answer;\n\t}", "public int getDirection()\r\n\t{\r\n\t\treturn direction;\r\n\t}", "public void setReverseDirection(boolean reverseDirection)\n {\n mDirection = reverseDirection ? -1 : 1;\n }", "public String getDirection(){\n\t\tif(this.toRight)\n\t\t\treturn \"RIGHT\";\n\t\telse\n\t\t\treturn \"LEFT\";\n\t}", "public Direction getOppositeDirection() {\n\t\treturn opposite;\n\t}", "Direction invert() {\n switch (this) {\n case NORTH: return SOUTH;\n case SOUTH: return NORTH;\n case EAST: return WEST;\n case WEST: return EAST;\n case NORTH_EAST: return SOUTH_WEST;\n case NORTH_WEST: return SOUTH_EAST;\n case SOUTH_EAST: return NORTH_WEST;\n case SOUTH_WEST: return NORTH_EAST;\n default: return NULL;\n }\n }", "public void grip(){\n\t\tthis.motor.backward();\n\t}", "void reverseTurnOrder() {\n turnOrder *= -1;\n }", "@Override\r\n\tpublic String moveDown() {\n\t\tif((0<=x && x<=50) && (0<y && y<=10) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\ty--;\r\n\t\t}\r\n\t\telse if((0<=x && x<=50) && (40<y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\ty--;\r\n\t\t}\r\n\t\telse if((0<=x && x<=50) && (0<y && y<=50) && (0<=z && z<=10))\r\n\t\t{\r\n\t\t\ty--;\r\n\t\t}\r\n\t\telse if((0<=x && x<=10) && (0<y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\ty--;\r\n\t\t}\r\n\t\telse if((0<=x && x<=50) && (0<y && y<=50) && (40<=z && z<=50))\r\n\t\t{\r\n\t\t\ty--;\r\n\t\t}\r\n\t\telse if((40<=x && x<=50) && (0<y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\ty--;\r\n\t\t}\r\n\t\treturn getFormatedCoordinates();\r\n\t}", "public boolean isBackward()\n {\n return (state == AnimationState.BACKWARD);\n }", "public void backward(int step) {\r\n\t\tString s;\r\n\t\tthis.x = checkValidX(this.x + Constant.SENSORDIRECTION[(this.getDirection()+2)%4][0]); // Move back without turning\r\n\t\tthis.y = checkValidX(this.y + Constant.SENSORDIRECTION[(this.getDirection()+2)%4][1]);\r\n\t\tswitch (this.getDirection()) {\r\n\t\t\tcase Constant.NORTH:\r\n\t\t\t\ts = \"Up\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase Constant.EAST:\r\n\t\t\t\ts = \"Right\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase Constant.SOUTH:\r\n\t\t\t\ts = \"Down\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase Constant.WEST:\r\n\t\t\t\ts = \"Left\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\ts = \"Error\";\r\n\t\t}\r\n\t\ttoggleValid();\r\n\t\tfor (int i = 0; i < step * Constant.GRIDWIDTH; i++) {\r\n\t\t\tt.schedule(new MoveImageTask(robotImage, s, 1), delay * (i + 1));\r\n\t\t}\r\n\t}", "public int getCurrentDirection() {\r\n return currentDirection;\r\n }", "@Override\n\tpublic String getDirection(List<String> path) {\n\n\t\tString nextMove = path.get(path.size() - 1);\n\t\tif (nextMove.equals(\"TOP\")) {\n\t\t\treturn \"DOWN\";\n\t\t} else if (nextMove.equals(\"DOWN\")) {\n\t\t\treturn \"TOP\";\n\t\t} else if (nextMove.equals(\"LEFT\")) {\n\t\t\treturn \"RIGHT\";\n\t\t} else if (nextMove.equals(\"RIGHT\")) {\n\t\t\treturn \"LEFT\";\n\t\t}\n\t\treturn \"\";\n\t}", "public Bearing reverse() {\n return Bearing.get( (this.bearing + 4) % 8);\n }", "public Direction getDirection() {\n return currentDirection;\n }", "public void go_to_reverse_position() {\n stop_hold_arm();\n Pneumatics.get_instance().set_solenoids(false);\n Dispatcher.get_instance().add_job(new JMoveArm(RobotMap.Arm.pot_value_reverse, 0.9, 0.7, 0.7, 0.2, 0.8, false, false));\n hold_arm();\n }", "public abstract int getDirection();", "public int getDirection() {\n return direction;\n }", "public int getDirection() {\n return direction;\n }", "public void down() {\n\t\tswitch (facing){\n\t\tcase \"RIGHT\" :\n\t\t\tvely = 0;\n\t\t\tvelx = -1.5;\n\t\t\tbreak;\n\t\tcase \"LEFT\" :\n\t\t\tvely = 0;\n\t\t\tvelx = 1.5;\n\t\t\tbreak;\n\t\tcase \"UP\" :\n\t\t\tvely = 1.5;\n\t\t\tvelx = 0;\n\t\t\tbreak;\n\t\tcase \"DOWN\" :\n\t\t\tvely = -1.5;\n\t\t\tvelx = 0;\n\t\t\tbreak;\n\t\t}\n\t}", "public double getDirectionFace();", "public int getDirection() {\n return direction;\n }", "public Vertex moveDown() {\n for (Edge e : current.outEdges) {\n move(e.to.y == current.y + 1, e);\n }\n return current;\n }", "public int[] getBackward() { return _backwardDiag; }", "public double getDirectionView();", "public int getDirection() {\r\n\t\treturn direction;\r\n\t}", "public void flip() {\r\n\t\tObject[] bak = path.toArray(new Direction[path.size()]);\r\n\t\tpath.clear();\r\n\t\tfor (int i = bak.length-1; i >= 0; i--) {\r\n\t\t\tpath.push((Direction) bak[i]);\r\n\t\t}\r\n\t}", "default Vector3 getDirection() {\r\n return Vector3.fromXYZ(getDirX(), getDirY(), getDirZ());\r\n }", "private void backward() {\n index--;\n if(column == 0) {\n line--;\n linecount = column = content.getColumnCount(line);\n }else{\n column--;\n }\n }", "public void reverseDirectionX()\n\t{\n\t\t\n\t\tvx = -vx;\n\t\t\n\t}", "private void checkFlipDirection()\n\t{\n\t\tif (currentFloor == 0) //Are we at the bottom?\n\t\t\tcurrentDirection = Direction.UP; //Then we must go up\n\t\tif (currentFloor == (ElevatorSystem.getNumberOfFloors() - 1)) //Are we at the top?\n\t\t\tcurrentDirection = Direction.DOWN; //Then we must go down\n\t}", "public Direction getOpposite() {\n if (equals(Direction.NORTH)) return Direction.SOUTH;\n else if (equals(Direction.EAST)) return Direction.WEST;\n else if (equals(Direction.SOUTH)) return Direction.NORTH;\n else if (equals(Direction.WEST)) return Direction.EAST;\n else return null;\n }", "public void down(){\n\t\tmoveX=0;\n\t\tmoveY=1;\n\t}", "public static Direction getOppositeDirection ( Direction direction ) \r\n\t{\r\n\t\tswitch ( direction )\r\n\t\t{\r\n\t\t\tcase UP: return Direction.DOWN; \r\n\t\t\tcase DOWN: return Direction.UP; \r\n\t\t\tcase LEFT: return Direction.RIGHT; \r\n\t\t\tcase RIGHT: return Direction.LEFT; \r\n\t\t}\r\n\t\treturn Direction.NONE;\r\n\t}", "public double direction(){\n return Math.atan2(this.y, this.x);\n }", "public String getDirection() {\r\n return direction;\r\n }", "public void backUp(){\n backSolenoid.set(DoubleSolenoid.Value.kForward);\n }", "protected void down() {\n move(positionX, positionY + 1);\n orientation = BattleGrid.RIGHT_ANGLE;\n }", "public Vector getDirection(){\n\t\treturn new Vector(_direction);\n\t}", "Activity getTransformBackwardActivity();", "public String getDirection() {\n return this.direction;\n }", "public String getDirection() {\n return direction;\n }", "public Direction invertTurns(){\n switch(this){\n case SPIN_BACK:\n return SPIN_BACK;\n case SPIN_LEFT:\n return SPIN_RIGHT; \n case SPIN_RIGHT:\n return SPIN_LEFT;\n case ARC_LEFT:\n return ARC_RIGHT;\n case ARC_RIGHT:\n return ARC_LEFT; \n default:\n return this; \n }\n }", "public int getDirection() {\n return direction_;\n }", "public Location down() {\n return new Location(row + 1, column);\n }", "public synchronized void back ()\n\t// one move up\n\t{\n\t\tState = 1;\n\t\tgetinformation();\n\t\tgoback();\n\t\tshowinformation();\n\t\tcopy();\n\t}", "public Direction right() {\r\n\t\tint newDir = this.index + 1;\r\n\r\n\t\tnewDir = (this.index + 1 == 5) ? 1 : newDir;\r\n\t\treturn getEnum(newDir);\r\n\t}", "public void past(int back);", "public void startReverse() {\n startHelper(f_startDirection.getOppositeDirection(), \"startReverse()\");\n }", "protected void reversePath() {\n\t\t\n\t\tif(_reverse) {\n\t\t\t\n\t\t\tif(_nextMove + 1 > movingPattern.size() - 1)\n\t\t\t\t_nextMove = 0;\n\t\t\telse\n\t\t\t\t_nextMove++;\n\t\t\t\n\t\t\t_reverse = false;\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\tif(_nextMove - 1 < 0)\n\t\t\t\t_nextMove = movingPattern.size() - 1;\n\t\t\telse\n\t\t\t\t_nextMove--;\n\t\t\t\n\t\t\t_reverse = true;\n\t\t}\n\t}", "private int getDirection(boolean isFrontCamera) {\n\t\tif (mAccListener != null) {\n\t\t\tint dir = mAccListener.dir;\n\t\t\t// 当且仅当为前置摄像头且画面是上下方向(portrait、portrait-inverse)的颠倒\n\t\t\tif (isFrontCamera && ((dir & 1) == 1)) {\n\t\t\t\tdir = (dir ^ 2);\n\t\t\t}\n\t\t\treturn dir;\n\t\t}\n\t\treturn -1; // default value is -1\n\t}", "public boolean getReverse() {\r\n return Reverse;\r\n }", "public boolean getReverse() {\r\n return Reverse;\r\n }", "public String getDirection() {\n\t\treturn this.direction;\n\t}", "public Node getBack(){\n return this.back;\n }", "public GImage getBack(){\r\n \t\t return back;\r\n\t }", "public void reverseX()\r\n {\r\n\t if(moveX < 0)\r\n\t\t moveX = moveX * (-1);\r\n\t else if(moveX > 0)\r\n\t\t moveX = moveX * (-1);\r\n }", "protected final Direction getDirection() {\n\t\treturn tile.getDirection();\n\t}", "public boolean getMoveRemainingStartsBack()\r\n {\r\n return (m_moveRemainingStartsBack);\r\n }", "public void backtrack(double distance){\r\n\t\tbackwards((odometer.getX()+Math.sin(Math.toRadians(odometer.getAng())) * distance),(odometer.getY()+ Math.cos(Math.toRadians(odometer.getAng())) * distance));\r\n\t\t}", "public Location getDown()\n\t{\n\t\tif(checkDown())\n\t\t{\n\t\t\treturn new Location(row+1,col);\n\t\t}\n\t\treturn this;\n\t}", "public static Direction opposite(Direction other) {\r\n\t\t\tif (other == Direction.UP) return Direction.DOWN;\r\n\t\t\telse if (other == Direction.DOWN) return Direction.UP;\r\n\t\t\telse if (other == Direction.LEFT) return Direction.RIGHT;\r\n\t\t\telse return Direction.LEFT;\t// RIGHT\r\n\t\t}", "public Direction getDirection()\n {\n return dir;\n }", "public Vector3d getDirection() { return mDirection; }", "public byte getDirection() {\n return this.direction;\n }", "public byte getDirection() {\n return this.direction;\n }", "private void updateDirection()\n {\n if (Math.abs(InputSystem.LT_Button_Control_Stick) > 0.1)\n {\n // if lt button is pressed, reverse direction of elevator\n setReverseDirection(true);\n }\n else\n {\n setReverseDirection(false);\n }\n }" ]
[ "0.79849905", "0.79115725", "0.7755294", "0.7410199", "0.71816397", "0.7131977", "0.71256334", "0.7103083", "0.7017779", "0.6944658", "0.6883986", "0.6874283", "0.68370265", "0.6835006", "0.6809309", "0.6754314", "0.6753062", "0.6751103", "0.67496", "0.6741189", "0.6738619", "0.6700495", "0.66926694", "0.66614074", "0.66352254", "0.6620215", "0.6617333", "0.660973", "0.66057754", "0.65907246", "0.6583823", "0.65742004", "0.6525609", "0.6502952", "0.64964", "0.6479469", "0.6471978", "0.64595777", "0.64578974", "0.643805", "0.6412055", "0.64051783", "0.6398473", "0.6395258", "0.63838166", "0.63773763", "0.63773406", "0.63748705", "0.63736576", "0.6365755", "0.63650036", "0.63650036", "0.6361467", "0.63220245", "0.63217026", "0.6319317", "0.6316944", "0.63144374", "0.63055164", "0.63015735", "0.6297988", "0.62962914", "0.6293536", "0.6293196", "0.6292723", "0.6291876", "0.6288261", "0.62875754", "0.6271031", "0.6268108", "0.6259924", "0.6248314", "0.62449574", "0.62388116", "0.6230038", "0.6228152", "0.6197308", "0.61918354", "0.61831975", "0.61763275", "0.617569", "0.61649895", "0.6164768", "0.61585057", "0.6151666", "0.6151666", "0.6150095", "0.61419296", "0.6140841", "0.6131952", "0.61271995", "0.61257416", "0.61241764", "0.6116841", "0.61049104", "0.6096571", "0.6094333", "0.6092771", "0.6092771", "0.6087327" ]
0.66073954
28
returns the current X
public double X() { return curX; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getCurrentX() {\n return currentX;\n }", "public float getCurrentX(){\n return curX;\n }", "public double GetX(){\n return this._X;\n }", "public double getX(){\n return this.x;\n }", "public double getX() { return x; }", "public double getX() {\r\n return this.x;\r\n }", "public double getX() {\n return x;\r\n }", "public Object getCurrentCellX() {\n\t\treturn x;\n\t}", "public double getX()\n {\n return x;\n }", "public double getX() {\n return this.x;\n }", "public double getX() {\n return this.x;\n }", "public double getX() {\n return this.x;\n }", "public double getX() {\n return this.x;\n }", "public double getX(){\n\t\treturn x;\n\t}", "public double getX() {\n return x;\n }", "public double getX() {\r\n return x;\r\n }", "public double getX() {\n return x;\n }", "public double getX() {\n return x;\n }", "public double getX() {\n return x;\n }", "public double getX() {\n return x;\n }", "public double getX() {\n return x;\n }", "public double getX() {\n return x;\n }", "public double getX() {\n return x;\n }", "public double getX(){\n return x;\n }", "public double getX(){\r\n return x;\r\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX()\n\t{\n\t\treturn x;\n\t}", "public int getX()\r\n\t{\r\n\t\treturn this.X;\r\n\t}", "public double getX() {\n\t\treturn x;\n\t}", "public double getX() {\n\t\treturn x;\n\t}", "public double getX() {\n\t\treturn x;\n\t}", "public double getX() {\n\t\treturn x;\n\t}", "public double getX() {\n\t\treturn x;\n\t}", "public double getX() {\n\t\treturn x;\n\t}", "public double getX() {\n\t\treturn x;\n\t}", "public double getX() {\n\t\t//throw new UnsupportedOperationException(\"TODO - implement\");\n\t\treturn pX;\n\t}", "public double getX() {\r\n\t\t//throw new UnsupportedOperationException(\"TODO - implement\");\r\n\t\treturn pX;\r\n\t}", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public int getX() {\r\n return this.x;\r\n }", "public int getX()\n {\n return this.x;\n }", "public double getX() {\n\t\t\treturn x;\n\t\t}", "public double getX() {\n\t\t\t\treturn x;\n\t\t\t}", "public int getX() {\n return this.x;\n }", "public int getX() {\n return this.x;\n }", "public int getX() { \n\t\treturn x;\n\t}", "public int getX() {\n\t\treturn X;\n\t}", "public int getX(){\n return this.x;\n }", "public int getX(){\n return this.x;\n }", "public int getX(){\n return this.x;\n }", "public int getX() {\r\n\t\treturn this.x;\r\n\t}", "public double x() {\r\n return this.x;\r\n }", "public float getX() {\n return this.x;\n }", "public final double getX() {\n return x;\n }", "public double X_r() {\r\n \t\treturn getX();\r\n \t}", "public int getX() {\n return x;\r\n }", "public double x() {\n\t\treturn x;\n\t}", "public int getX()\r\n\t{\r\n\t\treturn x;\r\n\t}", "public int getX()\n\t{\n\t\treturn this.x;\n\t}", "public int getX()\n\t{\n\t\treturn this.x;\n\t}", "public int getXPoint() {\r\n return this.x;\r\n }", "public int getX() {\n\t\treturn this.x;\n\t}", "public int getX() {\n\t\treturn this.x;\n\t}", "@Override\n\tpublic float getX() {\n\t\treturn this.x;\n\t}", "public final double getX() {\n return x;\n }", "public int getX() {\r\n\t\treturn x;\r\n\t}", "public int getX() {\r\n\t\treturn x;\r\n\t}", "public int getX() {\r\n\t\treturn x;\r\n\t}", "public int getX() {\r\n\t\treturn x;\r\n\t}", "public int getX() {\r\n\t\treturn x;\r\n\t}", "public int getX() {\r\n\t\treturn x;\r\n\t}", "public int getX() {\r\n\t\treturn x;\r\n\t}", "public int getX()\n\t{\n\t\treturn x;\n\t}", "public int getX()\n\t{\n\t\treturn x;\n\t}", "public int getX()\n\t{\n\t\treturn x;\n\t}", "public int getX()\n\t{\n\t\treturn x;\n\t}", "public int getX()\n\t{\n\t\treturn x;\n\t}", "double getX(){\r\n\t\treturn x;\r\n\t}", "@Basic\n\tpublic double getX() {\n\t\treturn this.x;\n\t}", "public int getX() {\n return x;\n }", "public int getX() {\n return x;\n }", "public int getX() {\n return x;\n }", "public int getX() {\n return x;\n }", "public int getX() {\n return x;\n }", "public int getX() {\n return x;\n }", "public int getX() {\n return x;\n }", "public int getX() {\n return x;\n }" ]
[ "0.8390931", "0.83532697", "0.82104945", "0.7976651", "0.79442585", "0.79005086", "0.7887839", "0.7887105", "0.78722566", "0.7861136", "0.7861136", "0.7861136", "0.7861136", "0.7845974", "0.7837916", "0.78353214", "0.7828149", "0.7828149", "0.7828149", "0.7828149", "0.7828149", "0.7828149", "0.7828149", "0.78124714", "0.7810173", "0.7800948", "0.7800948", "0.7800948", "0.7800948", "0.7800948", "0.7800948", "0.7800948", "0.7800948", "0.7794623", "0.7790297", "0.7755699", "0.7755699", "0.7755699", "0.7755699", "0.7755699", "0.7755699", "0.7755699", "0.77486897", "0.77257085", "0.7724723", "0.7723636", "0.7723636", "0.7723636", "0.7723636", "0.7723636", "0.7723636", "0.7723636", "0.77108544", "0.7697783", "0.76974905", "0.7694888", "0.7693347", "0.76885307", "0.7681329", "0.7665643", "0.76420265", "0.76420265", "0.76420265", "0.7640849", "0.76353234", "0.7634573", "0.76304525", "0.76248723", "0.761708", "0.76162183", "0.76137245", "0.76097", "0.76097", "0.7595838", "0.75944656", "0.75944656", "0.75914013", "0.7590755", "0.7590078", "0.7590078", "0.7590078", "0.7590078", "0.7590078", "0.7590078", "0.7590078", "0.7584755", "0.7584755", "0.7584755", "0.7584755", "0.7584755", "0.75764793", "0.75758225", "0.75750244", "0.75750244", "0.75750244", "0.75750244", "0.75750244", "0.75750244", "0.75750244", "0.75750244" ]
0.85783607
0
returns the current Y
public double Y() { return curY; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getCurrentY() {\n return currentY;\n }", "public double GetY(){\n return this._Y;\n }", "public double getY() {\n return mY;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y;\r\n }", "public double getY()\n\t{\n\t\treturn y;\n\t}", "public static double getOrigY() {\n return 0.3987833857536316;\n }", "public final double getY() {\n return y;\n }", "public double getY()\n {\n return y;\n }", "public double getY() {\r\n return this.y;\r\n }", "public static double getOrigY() {\n return 0.0;\n }", "public static double getOrigY() {\n return 0.0;\n }", "public static double getOrigY() {\n return 0.0;\n }", "public static double getOrigY() {\n return 0.0;\n }", "public static double getOrigY() {\n return 0.0;\n }", "public double getY() {\n return this.y;\n }", "public double getY() {\n return this.y;\n }", "public double getY() {\n return this.y;\n }", "public final double getY() {\n return y;\n }", "public double getY() {\r\n return y;\r\n }", "public double getY() {\n\t\treturn y;\n\t}", "public double getY() {\n\t\treturn y;\n\t}", "public double getY() {\n\t\treturn y;\n\t}", "public double getY() {\n\t\treturn y;\n\t}", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "public double Y_r() {\r\n \t\treturn getY();\r\n \t}", "public double getY() {\n\t\treturn bassY;\n\t}", "public int y() {\n\t\treturn this.y;\n\t}", "@Override\n\tpublic float getY() {\n\t\treturn currnet().getY();\n\t}", "public double getY() {\n return origin.getY();\n }", "public double getY() { return y; }", "long getY();", "public double getY() {\n return y;\n }", "public Object getCurrentCellY() {\n\t\treturn y;\n\t}", "public double getY(){\n\t\treturn y;\n\t}", "public double y() {\r\n return this.y;\r\n }", "public int getY()\r\n\t{\r\n\t\treturn this.Y;\r\n\t}", "public int getY() {\n\t\treturn Y;\n\t}", "@java.lang.Override\n public long getY() {\n return instance.getY();\n }", "public double getY()\n\t{\t\n\t\treturn y;\t\t\t\t\t\t\t\t\t\t\t\t// Return point's y-coordinate\n\t}", "public double getyOffset() {\n\n return currentYOffset + yOffset;\n }", "public int get_Y_Coordinate()\n {\n return currentBallY;\n }", "public double getY() {\n\t\t//throw new UnsupportedOperationException(\"TODO - implement\");\n\t\treturn pY;\n\t}", "public double getY(){\n return this.y;\n }", "public double getY() {\r\n\t\t//throw new UnsupportedOperationException(\"TODO - implement\");\r\n\t\treturn pY;\r\n\t}", "double getY(){\r\n\t\treturn y;\r\n\t}", "public double getY(){\r\n return y;\r\n }", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "public int getLocationY() {\r\n\t\treturn y;\r\n\t}", "@Override\n\tpublic double getY() {\n\t\treturn y;\n\t}", "public double getY();", "public int getY()\n\t{\n\t\treturn mY;\n\t}", "public double getY() {\r\n\t\t return this.yCoord;\r\n\t }", "@Override\n\tpublic double getYLoc() {\n\t\treturn y;\n\t}", "double getEndY();", "public double y() {\n return _y;\n }", "public double y() {\n return _y;\n }", "public int y() {\n\t\treturn _y;\n\t}", "protected Number getY() {\n return this.yCoordinate;\n }", "@Basic\n\tpublic double getY() {\n\t\treturn this.y;\n\t}", "public int getY() {\n return y_;\n }", "public int getY() {\n return y_;\n }", "public int getY() {\n return y_;\n }", "public int getY() {\n return y_;\n }", "public int getY() {\n return y_;\n }", "public double getY(){\n return y;\n }", "public int y() {\r\n\t\treturn yCoord;\r\n\t}", "public double getY()\n\t\t{\n\t\t\treturn this.y[0];\n\t\t}", "public Double getY() {\n\t\treturn y;\n\t}", "public int getY() {\n return y_;\n }", "public int getY() {\n return y_;\n }", "public int getY() {\n return y_;\n }" ]
[ "0.89489347", "0.83448607", "0.8063911", "0.80162865", "0.80162865", "0.80162865", "0.8015589", "0.8015589", "0.8015589", "0.8015589", "0.8015589", "0.80121386", "0.80119765", "0.80119765", "0.80119765", "0.80119765", "0.80119765", "0.80119765", "0.80119765", "0.79998827", "0.79975146", "0.7989029", "0.79882145", "0.79806566", "0.7969507", "0.7968558", "0.7968558", "0.7968558", "0.7968558", "0.7968558", "0.79677695", "0.79677695", "0.79677695", "0.79609424", "0.7960328", "0.79586864", "0.79586864", "0.79586864", "0.79586864", "0.7957556", "0.7957556", "0.7957556", "0.7957556", "0.7957556", "0.7957556", "0.795499", "0.79506075", "0.7942519", "0.79295194", "0.7926433", "0.7921855", "0.7920586", "0.79188114", "0.7918371", "0.7912635", "0.7903086", "0.7881213", "0.78787977", "0.7878432", "0.786283", "0.78618", "0.78611624", "0.7858628", "0.7855449", "0.78546274", "0.78313583", "0.78309643", "0.7825577", "0.7825577", "0.7825577", "0.7825577", "0.7825577", "0.7825577", "0.7825577", "0.7825577", "0.7825577", "0.7814406", "0.78143674", "0.78101176", "0.78094095", "0.78091735", "0.7803423", "0.78009963", "0.7798967", "0.7798967", "0.77909935", "0.7782277", "0.77764916", "0.7774004", "0.7774004", "0.7774004", "0.7774004", "0.7774004", "0.77716833", "0.77711576", "0.7770651", "0.77615833", "0.77614737", "0.77614737", "0.77614737" ]
0.8713128
1
returns the current speed
public double speed() { return speed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getCurrentSpeed();", "public double getCurrentSpeed(){\r\n return speed;\r\n }", "double getSpeed();", "public double getSpeed();", "public double getCurrentSpeed(){\n return currentSpeed;\n }", "public double getCurrentSpeed(){\n return currentSpeed;\n }", "public static String getCurrentSpeed() {\r\n\t\treturn currentSpeed;\r\n\t}", "public double getSpeed() {\r\n\t\treturn speed;\r\n\t}", "public float getSpeed()\n\t{\n\t\treturn speed;\n\t}", "public float getSpeed()\n\t{\n\t\treturn this.speed;\n\t}", "public float getSpeed()\n\t{\n\t\treturn this.speed;\n\t}", "int getSpeed();", "int getSpeed();", "int getSpeed();", "int getSpeed();", "int getSpeed();", "int getSpeed();", "public int getSpeed()\n\t{\n\t\treturn speed;\n\t}", "public float getSpeed() {\n\t\treturn speed;\n\t}", "public double getSpeed() {\n return speed;\n }", "public double getSpeed() {\n return speed;\n }", "public double getSpeed() {\n return speed;\n }", "public double getSpeed() {\n return speed;\n }", "public double getSpeed() {\n return speed;\n }", "public float getSpeed() {\n return speed;\n }", "public float getSpeed() {\n return speed;\n }", "@Override\r\n\tpublic double getSpeed() {\n\t\treturn this.speed;\r\n\t}", "public int getSpeed() {\r\n return speed;\r\n }", "public int getSpeed(){\r\n\t\treturn speed;\r\n\t}", "public int getSpeed() {\n return speed_;\n }", "public int getSpeed() {\n return speed_;\n }", "public int getSpeed() {\n return speed_;\n }", "public int getSpeed() {\n return speed_;\n }", "public int getSpeed() {\n return speed_;\n }", "public int getSpeed() {\n return speed_;\n }", "public float getSpeed() {\n return this.speedValue;\n }", "public int getSpeed() {\n\t\treturn speed;\n\t}", "public int getSpeed() {\n\t\treturn speed;\n\t}", "public int getSpeed() {\n\t\treturn speed;\n\t}", "public int getSpeed() {\n return speed;\n }", "public int getSpeed() {\n return speed;\n }", "public int getSpeed() {\n return speed;\n }", "public int getSpeed() {\n return speed;\n }", "public int getSpeed() {\n return speed;\n }", "private int speed() {\n final int slowfactor = 3;\n return speed * (cd.isSlow(curpos) ? slowfactor : 1);\n }", "public int getSpeed() {\n return speed_;\n }", "public int getSpeed() {\n return speed_;\n }", "public int getSpeed() {\n return speed_;\n }", "public int getSpeed() {\n return speed_;\n }", "public int getSpeed() {\n return speed_;\n }", "public int getSpeed() {\n return speed_;\n }", "public float getSpeed (){\n return speed;\n }", "public int getSpeed() {\n return mSpeed;\n }", "public Speed getSpeed() {\n\t\treturn speed;\n\t}", "public int getSpeed()\n {\n return (int) (getMovement().getLength() * 10);\n }", "protected float getMovementSpeed() {\r\n\t\tfloat speed = getSpeed();\r\n\t\treturn speed / 17f + (float) Math.pow(Math.sqrt(speed), 1.225f) * 0.985f;\r\n\t}", "public float getSpeed() {\n\t\tfloat result = (float) Math.sqrt(velocity.x * velocity.x + velocity.y * velocity.y);\n\t\treturn result;\n\t}", "public int getSpeed()\r\n\t{\n\t\treturn 90;\r\n\t}", "public abstract double getSpeed();", "public int getSpeed() {\n\t\tint speed = (this.speed < 4) ? 4 : this.speed;\n\t\treturn speed;\n\t}", "public double getSpeed(){\r\n double Speed;\r\n Speed = (double)(Distance * TimeConversion)/(getMinutes() * SecondsConversion + getSeconds()); \r\n if ((getMinutes()==0) || (getSeconds() == 0)) {\r\n Speed =0;\r\n } //Closing bracket if statement\r\n return Speed;\r\n }", "public Vector2 getSpeed() { return speed; }", "public float getSpeed() {\n return this.movementComposer.getSpeed();\n }", "public TransmissionAndSpeed getSpeed()\n {\n\treturn this.speed;\n }", "public int getSpeed() {\n\t\t\treturn 0;\n\t\t}", "public double getSpeed() {\n return m_master.getEncoder().getVelocity() / MotorConstants.kNeoRPM;\n }", "public double getVelocity() {\n \treturn this.currentSpeed;\n }", "public abstract int getSpeed();", "public abstract int getSpeed();", "public Speed getSpeed() {\n\t\treturn Speed.FAST;\n\t}", "@Override\n public double speed() {\n \tif(Robot.drive.getDistance() > 120) {\n \t\treturn 0.2;\n \t}\n \treturn speed;\n }", "@Override\n\tpublic int getMotorSpeed() {\n\t\tupdateIR();\n\t\treturn direction*360;\n\t}", "public double getMovementSpeed() {\n return movementSpeed;\n }", "public Calculation getSpeedFunction() {\n return speedFunction;\n }", "public double getSpeedPerFrame(){\r\n\t\treturn speed;\r\n\t}", "public synchronized double get() {\n return m_liftSpeed;\n }", "public double getSpeed() {\r\n\t\tif (this.base.equals(\"zombie\")) {\r\n\t\t\treturn speed;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "double getPlaybackSpeed();", "public int speed()\n \n {\n \t\n\t\treturn (((7 - speedClass) * 5 ) + 7);\n }", "public int getSpeed(){return this.speed;}", "public int getBaseMovementSpeed()\r\n {\r\n return mBaseMovementSpeed;\r\n }", "int getSimspeed();", "public double speed() {\n /* dx = sin(angle) * speed\n dy = cos(angle-180) * speed = -cos(angle)\n sqrt((dx)^2 + (-dy)^2 = sin(angle)^2*speed^2 + cos(angle)^2*speed^2)=\n sqrt(speed^2 *(cos(angle)^2+sin(angle)^2) = sqrt(speed^2*1)=speed\n */\n //distance math functions\n //to calculate the square root of the sum of squares of numbers passed to it as arguments.\n return Math.hypot(this.dx, this.dy);\n }", "public double getSpeed() {\n\t\tdouble speed = 0;\n\t\tfor (Motor motor : this) {\n\t\t\tspeed += motor.get();\n\t\t}\n\t\treturn speed / this.size();\n\t}", "@Override\n\t\tpublic int getSpeed() {\n\t\t\treturn i+30;\n\t\t}", "public int getInitialSpeed() {\n return initialSpeed;\n }", "public org.auvua.utils.protobuffer.AUVprotocol.AUVCommand.Movement getSpeed() {\n return speed_;\n }", "public org.auvua.utils.protobuffer.AUVprotocol.AUVCommand.Movement getSpeed() {\n if (speedBuilder_ == null) {\n return speed_;\n } else {\n return speedBuilder_.getMessage();\n }\n }", "@Override\n\t\tpublic int getSpeed() {\n\t\t\treturn i+20;\n\t\t}", "public float getWalkSpeed ( ) {\n\t\treturn extract ( handle -> handle.getWalkSpeed ( ) );\n\t}", "public int getSpeed() {\r\n\t\t\tlong elapsedTime = System.currentTimeMillis() - tStartTime;\r\n\t\t\t\r\n\t\t\t// Refresh cache every 5 secs & prevent fake speed when resume\r\n\t\t\tif (elapsedTime > 5000) {\r\n\t\t\t\tspeedRefresh();\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn Math.round(1000f * tDownloaded / elapsedTime);\r\n\t\t}", "public int getSpeed() {return ship.getSpeed();}", "public double getMovespeed()\r\n\t{\r\n\t\treturn movespeed;\r\n\t}", "@Override\n\tpublic double getSpeed() {\n\t\treturn 0;\n\t}", "public int getISpeed() {\n return iSpeed;\n }", "protected long travel() {\n\n return Math.round(((1 / Factory.VERTEX_PER_METER_RATIO) / (this.speed / 3.6)) * 1000);\n }", "public void currentSpeed()\n\t{\n\t\tif(speed == 0)\n\t\t{\n\t\t\tSystem.out.println(\"The bike is in rest\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"The bike is in motion\");\n\t\t\t\n\t\t}\n\t}", "public int getProcessorSpeed()\n\t{\n\t\treturn speed;\n\t}", "public int getMovespeed(){\n\t\treturn movespeed;\n\t}", "org.auvua.utils.protobuffer.AUVprotocol.AUVCommand.Movement getSpeed();" ]
[ "0.9069366", "0.8695266", "0.8554878", "0.85251343", "0.8505482", "0.8505482", "0.84105724", "0.8386289", "0.8384552", "0.8324382", "0.8324382", "0.8311323", "0.8311323", "0.8311323", "0.8311323", "0.8311323", "0.8311323", "0.83019835", "0.82864445", "0.8277093", "0.8277093", "0.8277093", "0.8277093", "0.82675666", "0.8259202", "0.8259202", "0.82569486", "0.8248366", "0.8242379", "0.82202864", "0.82202864", "0.82202864", "0.82202864", "0.82202864", "0.82202864", "0.8208506", "0.81991535", "0.81991535", "0.81991535", "0.8192015", "0.8192015", "0.8192015", "0.8192015", "0.8192015", "0.8190439", "0.81695306", "0.81695306", "0.81695306", "0.81695306", "0.81695306", "0.81695306", "0.81247306", "0.8105622", "0.8100303", "0.80315906", "0.80310005", "0.8022514", "0.80106777", "0.79976594", "0.79548323", "0.79544896", "0.7943861", "0.7943058", "0.7934652", "0.78582203", "0.7822893", "0.7816646", "0.7738827", "0.7738827", "0.7734176", "0.7718941", "0.77142495", "0.76825565", "0.7666429", "0.7653391", "0.7635429", "0.7597514", "0.75969934", "0.7587336", "0.75779825", "0.75570345", "0.75268203", "0.752273", "0.75086296", "0.7504445", "0.7471501", "0.7459822", "0.7458407", "0.744503", "0.74431336", "0.7410673", "0.7405812", "0.73875695", "0.7350018", "0.7316751", "0.7307973", "0.7293204", "0.7293186", "0.7263011", "0.7257387" ]
0.85062295
4
Sets the speed for the character
public void setSpeed(double speed) { this.speed = speed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSpeed(int s){\r\n\t\tspeed = s;\r\n\t}", "public void setSpeed(double speed) {\n \tthis.speed = speed;\n }", "public void setSpeed(float val) {speed = val;}", "public void setSpeed( Vector2 sp ) { speed = sp; }", "private void setSpeed() {\n double cVel = cAccel*0.1;\n speed += round(mpsToMph(cVel), 2);\n speedOutput.setText(String.valueOf(speed));\n }", "public void setSpeed(int speed) {\n this.speed = speed;\n }", "public void setSpeed(double speed) {\n this.speed = speed;\n }", "public void setSpeed(double speed) {\n this.speed = speed;\n }", "public void setSpeed(float speed) {\n this.speed = (int) speed * 13;\n }", "public void setSpeed(int newSpeed)\n {\n speed = newSpeed;\n }", "@Override\n\tpublic void setSpeed(double speed) {\n\n\t}", "@Override\n\tpublic void setSpeed(float speed) {\n\t\t\n\t}", "public void setSpeed(float speed) {\n this.speed = speed;\n }", "public void setSpeed(float speed) {\n this.speed = speed;\n }", "public void setSpeed(int value) {\n this.speed = value;\n }", "public void setSpeed(int speed) {\n thread.setSpeed(speed);\n }", "public void setCurrentSpeed (double speed);", "public void SetSpeedRaw(double speed)\n {\n Motors.Set(speed);\n }", "void changeSpeed(int speed) {\n\n this.speed = speed;\n }", "public void setSpeed(int speed) {\n this.movementSpeed = speed;\n }", "public abstract void setSpeed(int sp);", "public void setSpeed(final int speed) {\n mSpeed = speed;\n }", "public void setSpeed(int wpm);", "public void setSpeed(double multiplier);", "public void setSpeed(float speed_)\n\t{\n\t\tthis.speed=speed_;\n\t}", "public void setSpeed(int speed) {\n\t\tthis.speed = speed;\n\t}", "public void setSpeed(int speed) {\n\t\tthis.speed = speed;\n\t}", "public void setSpeed(int speed) {\n\t\tthis.speed = speed;\n\t}", "public void changeSpeed(int speed);", "void setSpeed(RobotSpeedValue newSpeed);", "public void setSpeed() {\n //assigns the speed based on the shuffleboard with a default value of zero\n double tempSpeed = setpoint.getDouble(0.0);\n\n //runs the proportional control system based on the aquired speed\n controlRotator.proportionalSpeedSetter(tempSpeed);\n }", "public void setSpeed(double speed) {\r\n this.speed = Math.min(1.0, Math.max(speed, 0));\r\n }", "public void setSpeed(int newSpeed)\n\t{\n\t\tspeed = newSpeed;\n\t}", "@Override\n @Deprecated // Deprecated so developer does not accidentally use\n public void setSpeed(int speed) {\n }", "public void setSpeed(long speed) {\n\t\tmSpeed = speed;\n\t}", "public void setSpeed() {\n\t\tthis.ySpd = this.MINSPEED + randGen.nextFloat() * (this.MAXSPEED - this.MINSPEED);\n\t\tthis.xSpd = this.MINSPEED + randGen.nextFloat() * (this.MAXSPEED - this.MINSPEED);\n\t}", "public Builder setSpeed(int value) {\n bitField0_ |= 0x00000800;\n speed_ = value;\n onChanged();\n return this;\n }", "public ConstantSpeedMessageGenerator setSpeed(final double speed) {\n this.speed = speed;\n\n if (speed > 0) { // -1 = unlimited speed\n buffer = new long[(int) Math.round(Math.ceil(speed))];\n pointer = 0;\n\n for (int i = 0; i < (int) Math.round(Math.ceil(speed)); i++) {\n buffer[i] = 0;\n }\n\n breakDuration = (int) Math.round(1000 / speed); // will be 0 for speed > 1000\n }\n\n return this;\n }", "public void setSpeed() {\r\n\t\tint delay = 0;\r\n\t\tint value = h.getS(\"speed\").getValue();\r\n\t\t\r\n\t\tif(value == 0) {\r\n\t\t\ttimer.stop();\r\n\t\t} else if(value >= 1 && value < 50) {\r\n\t\t\tif(!timer.isRunning()) {\r\n\t\t\t\ttimer.start();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//exponential function. value (1) == delay (5000). value (50) == delay (25)\r\n\t\t\tdelay = (int)(a1 * (Math.pow(25/5000.0000, value / 49.0000)));\r\n\t\t} else if(value >= 50 && value <= 100) {\r\n\t\t\tif(!timer.isRunning()) {\r\n\t\t\t\ttimer.start();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//exponential function. value (50) == delay(25). value (100) == delay (1)\r\n\t\t\tdelay = (int)(a2 * (Math.pow(1/25.0000, value/50.0000)));\r\n\t\t}\r\n\t\ttimer.setDelay(delay);\r\n\t}", "public Builder setSpeed(int value) {\n bitField0_ |= 0x00000080;\n speed_ = value;\n onChanged();\n return this;\n }", "public void setSpeed() {\r\n\t\tthis.currSpeed = this.maxSpeed * this.myStrategy.setEffort(this.distRun);\r\n\t}", "public void setSpeed(int value) {\n speed = value;\n if (speed < 40) {\n speedIter = speed == 0 ? 0 : speed / 4 + 1;\n speedWait = (44 - speed) * 3;\n fieldDispRate = 20;\n listDispRate = 20;\n } else if (speed < 100) {\n speedIter = speed * 2 - 70;\n fieldDispRate = (speed - 40) * speed / 50;\n speedWait = 1;\n listDispRate = 1000;\n } else {\n speedIter = 10000;\n fieldDispRate = 2000;\n speedWait = 1;\n listDispRate = 4000;\n }\n }", "public void setSpeed(final double speed) {\n m_X.set(ControlMode.PercentOutput, speed); \n }", "public Builder setSpeed(int value) {\n bitField0_ |= 0x00001000;\n speed_ = value;\n onChanged();\n return this;\n }", "public Builder setSpeed(int value) {\n bitField0_ |= 0x00001000;\n speed_ = value;\n onChanged();\n return this;\n }", "public Builder setSpeed(int value) {\n bitField0_ |= 0x00001000;\n speed_ = value;\n onChanged();\n return this;\n }", "public static void setMotorSpeed(double speed){\n setLeftMotorSpeed(speed);\n setRightMotorSpeed(speed);\n }", "public void setSpeed(double speed) {\r\n\t\tthis.speed = speed;\r\n\t\tthis.period = (int) (1000 / speed);\r\n\t}", "void setPlaybackSpeed(float speed);", "void changeUpdateSpeed();", "public void setSpeed(float speed) {\n this.movementComposer.setSpeed(speed);\n }", "public void setYSpeed(int speed){\n ySpeed = speed;\n }", "public void setSpeed(float speed) {\n\t\tif (speed > 1) {\n\t\t\tthrow new IllegalArgumentException(\"speed should be less than 1\");\n\t\t}\n\t\tthis.speed = speed;\n\t}", "public Builder setSpeed(int value) {\n \n speed_ = value;\n onChanged();\n return this;\n }", "public void accelerationSet(double speed){\n\t\tdouble currentDelta = Math.abs(currentSpeed - speed);\r\n\t\tif(currentDelta > maxDelta){\r\n\t\t\tif(speed > currentSpeed){\r\n\t\t\t\tspeed = currentSpeed + maxDelta;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tspeed = currentSpeed - maxDelta;\r\n\t\t\t}\r\n\t\t}\r\n\t//\tSystem.out.println(\"Speed:\" + speed);\r\n\t\tcurrentSpeed = speed;\r\n\t\tsuper.set(speed * motorDirection);\r\n\t}", "public <T extends Number> void setSpeedPerFrame(T speed){\r\n\t\tif(speed.doubleValue() <= 0){\r\n\t\t\tthis.speed = 1;\r\n\t\t\tSystem.err.println(\"Negative Speed, resulting to a speed of 1!\");\r\n\t\t}else{\r\n\t\t\tthis.speed = speed.doubleValue();\r\n\t\t}\r\n\t}", "public void set(double speed) {\n\t\tcurrentSpeed = speed;\n\t\tmotor.set(speed);\n\t}", "public int setSpeed(int i) {\n\t\tspeed = i;\n\t\t//Returning the speed\n\t\treturn speed;\t\t\n\t}", "public void setSpeed(int newSpeed){\n\t\tmyVaisseau=Isep.getListeVaisseau();\n\t\tspeed=newSpeed;\t\t\n\t}", "public void set(double speed) {\n if ((getRawAngle() < Constants.Hood.MIN_RAW_ANGLE && speed > 0)\n || (getRawAngle() > Constants.Hood.MAX_RAW_ANGLE && speed < 0)) {\n stop();\n } else {\n m_servo.setSpeed(speed);\n }\n }", "void setFastSpeed () {\n if (stepDelay == fastSpeed)\n return;\n stepDelay = fastSpeed;\n step();\n resetLoop();\n }", "public void changeSpeed() {\n Random gen = new Random();\n speedX += gen.nextInt(3);\n speedY += gen.nextInt(3);\n }", "public void setXSpeed(int speed){\n xSpeed = speed;\n }", "public synchronized void set (double speed){\n m_liftSpeed = speed;\n if (m_liftSpeed < 0 && isLowerLimit() == false) {\n m_liftMotor.set(m_liftSpeed);\n } else if (m_liftSpeed > 0 && isUpperLimit() == false){\n m_liftMotor.set(m_liftSpeed);\n } else {\n m_liftSpeed = 0;\n m_liftMotor.set(0); \n }\n }", "public void set(double speed) {\n climb_spark_max.set(speed);\n }", "public static void setSpeed(int speed) {\n leftMotor.setSpeed(speed);\n rightMotor.setSpeed(speed);\n }", "@Override\n\tpublic void set(double speed) {\n\t\tsuper.changeControlMode(TalonControlMode.PercentVbus);\n\t\tsuper.set(speed);\n\t\tsuper.enableControl();\n\t}", "public static void setSpeed(LivingEntity entity, double speed) {\n\t\tEntityLiving nmsEntity = CommonNMS.getNative(entity);\n\t\tnmsEntity.getAttributeInstance(GenericAttributes.d).setValue(speed);\n\t}", "public void set(double speed, CANTalon talon) {\n\t\ttalon.set(speed);\n\t}", "private void changeSpeed() {\n\t\tint t = ((JSlider)components.get(\"speedSlider\")).getValue();\n\t\tsim.setRunSpeed(t);\n\t}", "public void setSpeed(float n)\n\t{\n\t\tthis.speed = n;\n\t}", "public void setEditSpeedPressed() {\n String value = JOptionPane.showInputDialog(this, this.applicationDelayText, this.setApplicationDelayText, 3);\n if (value != null) {\n int newSpeed = Integer.parseInt(value.toString());\n this.setSpeed(newSpeed);\n }\n }", "public void setSpeed() {\n if (this.equals(null)) {\n this.speedValue=-5;\n }\n }", "public void setWalkSpeed(int n)\n{\n walkSpeed = n;\n}", "public void setSpeed(int speed) {\n if (speed < 0) {\n this.speed = 0;\n lblVelocidade.setText(this.applicationDelayText + \": 0\");\n return;\n }\n this.speed = speed;\n sliderSpeed.setValue(speed / 10);\n lblVelocidade.setText(this.applicationDelayText + \": \" + speed);\n }", "public void currentSpeed(double currentSpeed)\n\t{\n\t\tspeed = currentSpeed;\n\t\t\n\t}", "public void setValue(double speed) {\n\t\tpid.setSetpoint(speed);\n\t}", "@Override\r\n\tpublic void speed() {\n\t}", "public SetTiltSpeed(double speed) {\n requires(Robot.tilt);\n this.speed = speed;\n }", "public static void changeSpeed(int speed) {\n AtlantisConfig.GAME_SPEED = speed;\n getBwapi().setGameSpeed(AtlantisConfig.GAME_SPEED);\n }", "public void accelerate(){\n speed += 5;\n }", "public void drive(double speed){\n \t\tsetRight(speed);\n \t\tsetLeft(speed);\n \t}", "public void setElevatorSpeed(double spd)\n {\n mSpeed = spd;\n }", "public Builder setSpeed(org.auvua.utils.protobuffer.AUVprotocol.AUVCommand.Movement value) {\n if (speedBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n speed_ = value;\n onChanged();\n } else {\n speedBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "public void setSpeedStrumMotor(int speed) {\r\n\t\tif (speed == 0)\r\n\t\t\tstrumMotor.stop();\r\n\t\telse\r\n\t\t\tstrumMotor.rotate(speed);\r\n\t}", "public void setSpeed(double power) {\n\t\tthis.shootLeft.set(power);\n\t\tthis.shootRight.set(-power);\n\t}", "public static void setLastSpeed(float speed) {\n\t\tfloat fakeSpeed = speed;\n\t\tLog.i(TAG, \"SafeSpeed.setLastSpeed()\");\n\t\t\n\t\tif (fakeSpeed < 0)\n\t\t{\n\t\t\tspeedText.setText(\"-.-\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnCurrentSpeed = (float)(fakeSpeed * 2.2369);\n\t\t\tString s = String.format(locale, \"%.1f\", nCurrentSpeed);\n\t\t\tspeedText.setText(s);\n\t\t}\n\t}", "public void setSpeed(float speedX, float speedY) {\n this.speedX = speedX * getScale(speedX, speedY);\n this.speedY = speedY * getScale(speedX, speedY);\n }", "@Override\n public void setSpeed(double speed, int rpm, int measurementsType) {\n speedText.setText(String.format(\"%.1f\", speed));\n if (measurementsType == ThunderBoardPreferences.UNIT_METRIC) {\n speedUnitsText.setText(getString(R.string.motion_meters_per_second));\n } else {\n speedUnitsText.setText(getString(R.string.motion_feet_per_second));\n }\n rpmText.setText(String.valueOf(rpm));\n }", "public void increaseSpeed() {\r\n\tupdateTimer.setDelay((int)Math.floor(updateTimer.getDelay()*0.95));\r\n\t\t}", "public void setSpeedVector(Vector2D vector)\n {\n mSpeedVector = vector;\n }", "public void addSpeed(int speed) {\n this.speed += speed;\n }", "public void setVehicleSpeed(float value) {\n this.vehicleSpeed = value;\n }", "public void doubleSpeed()\r\n {\r\n \tthis.speed= speed-125;\r\n \tgrafico.setVelocidad(speed);\r\n }", "public void setWalkSpeed ( float value ) throws IllegalArgumentException {\n\t\texecute ( handle -> handle.setWalkSpeed ( value ) );\n\t}", "public void setMaxSpeed(double speed){\n\t\tthis.speed = speed;\n\t}", "NetTankSpeed(float speed)\n\t{\n\t\tthis.speed = speed;\n\t}", "public void setSpeed(double left, double right){\n leftMasterVictor.setSpeed(left);\n rightMasterVictor.setSpeed(-right);\n }", "@Generated\n @Selector(\"setAnimationSpeed:\")\n public native void setAnimationSpeed(@NFloat double value);", "public void setMaxSpeed(double value) {\n super.setMaxSpeed(value);\n }" ]
[ "0.7985164", "0.79072785", "0.7856173", "0.7806587", "0.7722234", "0.77110827", "0.77102363", "0.77102363", "0.76770693", "0.76706135", "0.76563805", "0.76340866", "0.76294565", "0.76294565", "0.7613809", "0.76028633", "0.75966156", "0.75822586", "0.7569178", "0.75475407", "0.753659", "0.7533055", "0.75166696", "0.75056434", "0.74830824", "0.74770844", "0.74770844", "0.74770844", "0.7432503", "0.74215007", "0.7419076", "0.73687685", "0.73651713", "0.73640543", "0.73625463", "0.7250369", "0.7233341", "0.7229716", "0.72138137", "0.7182884", "0.7129758", "0.7125056", "0.71145946", "0.71070564", "0.7106481", "0.7106481", "0.7088013", "0.7067419", "0.70526826", "0.70450854", "0.70429784", "0.70375264", "0.7024001", "0.7014236", "0.69971293", "0.6994822", "0.69733804", "0.697084", "0.69477946", "0.6918386", "0.6915414", "0.6910181", "0.6905589", "0.69015384", "0.69005984", "0.68829155", "0.6854297", "0.68453074", "0.68326485", "0.6825715", "0.67919695", "0.6780745", "0.67637455", "0.6762991", "0.67356133", "0.67251575", "0.671062", "0.67088276", "0.670257", "0.6687713", "0.6671901", "0.66515833", "0.66219413", "0.6606471", "0.66025877", "0.6574691", "0.6565119", "0.65544146", "0.6554233", "0.654304", "0.65383047", "0.6538011", "0.65345746", "0.65296274", "0.65045923", "0.65045756", "0.649731", "0.6494747", "0.64641917", "0.64599234" ]
0.7890177
2
Sets the direction for the character
public void setDirection(float direction) { this.direction = direction; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void setDirection(int dir);", "public void setDirection(int dir)\r\n\t{\r\n\t\tdirection = dir;\r\n\t}", "public Player setDirection(String direction) { //<>// //<>//\n switch (direction) {\n case (\"UP\"):\n this.direction = UPKEY;\n break;\n case (\"DOWN\"):\n this.direction = DOWNKEY;\n break;\n case (\"LEFT\"):\n this.direction = LEFTKEY;\n break;\n case (\"RIGHT\"): //<>//\n this.direction = RIGHTKEY; //<>//\n break;\n }\n //<>//\n return this;\n }", "public void setDirection(char dir) throws IllegalArgumentException {\n\t\tif (dir == 'N' || dir == 'n'){\n\t\t\tthis.direction = 'n';\n\t\t} else if (dir == 'E' || dir == 'e'){\n\t\t\tthis.direction = 'e';\n\t\t} else if (dir == 'S' || dir == 's'){\n\t\t\tthis.direction = 's';\n\t\t} else if (dir == 'W' || dir == 'w'){\n\t\t\tthis.direction = 'w';\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t}", "public static void setDirection(String direction) {\n if (direction.equals(\"up\")) {\n pacManDirection = up;\n } else if (direction.equals(\"down\")) {\n pacManDirection = down;\n } else if (direction.equals(\"left\")) {\n pacManDirection = left;\n } else {\n pacManDirection = right;\n }\n }", "@Override\n public void setDirection(Direction direction) {\n\n }", "public void setDirection(Vector direction){\n\t\t_direction = direction;\n\t}", "public void setDirectionMove(double direction);", "public void setDoorDirection(char charAt) {\n\t\tif(charAt == '^') {\n\t\t\tdoorDirection = DoorDirection.UP;\t\t\t\t\t\t\t\t\t// set the door direction that corresponds with the direction of the given arrow character\n\t\t} else if(charAt == '>') {\n\t\t\tdoorDirection = DoorDirection.RIGHT;\t\t\t\t\t\t\t\t// set the door direction that corresponds with the direction of the given arrow character\n\t\t} else if(charAt == '<') {\n\t\t\tdoorDirection = DoorDirection.LEFT;\t\t\t\t\t\t\t\t\t// set the door direction that corresponds with the direction of the given arrow character\n\t\t} else {\n\t\t\tdoorDirection = DoorDirection.DOWN;\t\t\t\t\t\t\t\t\t// set the door direction that corresponds with the direction of the given arrow character\n\t\t}\n\t}", "void changeDirection();", "public void setDirection(byte value) \n\t{\n\t\tdirection = value;\n\t}", "public void setDirection(float directionDegree);", "public char getDirection(){\n\t\treturn direction;\n\t}", "public void setDirection(int value) {\n this.direction = value;\n }", "public void setDirection(int direction) {\r\n\t\tthis.direction = direction;\r\n\t}", "public void setDirection(double direction) {\n\t\tif (direction <= MAX_DIRECTION && direction >= MIN_DIRECTION) {\n\t\t\tthis.direction = direction;\n\t\t} else if (direction > MAX_DIRECTION) { \n\t\t\t//this.direction = MIN_DIRECTION + (MAX_DIRECTION - direction);\n\t\t\tthis.direction %= MIN_DIRECTION ;\n\t\t\tif (Double.isNaN(this.direction)) {\n\t\t\t\tthis.direction = MIN_DIRECTION;\n\t\t\t}\n\t\t} else if (direction < MIN_DIRECTION) {\n\t\t\t//this.direction = MAX_DIRECTION - (MIN_DIRECTION + direction);\n\t\t\tthis.direction %= MAX_DIRECTION;\n\t\t\tif (Double.isNaN(this.direction)) {\n\t\t\t\tthis.direction = MAX_DIRECTION;\n\t\t\t}\n\t\t} //else if (direction)\n\t\t\n\t}", "public void setDirection() {\n\t\tdouble randomDirection = randGen.nextDouble();\n\t\tif (randomDirection < .25) {\n\t\t\tthis.xDirection = 1;\n\t\t\tthis.yDirection = -1;\n\t\t} else if (randomDirection < .5) {\n\t\t\tthis.xDirection = -1;\n\t\t\tthis.yDirection = -1;\n\t\t} else if (randomDirection < .75) {\n\t\t\tthis.xDirection = -1;\n\t\t\tthis.yDirection = 1;\n\t\t} else {\n\t\t\tthis.xDirection = 1;\n\t\t\tthis.yDirection = 1;\n\t\t}\n\t}", "abstract void setDirection(double x, double y, double z);", "public void setDirection(Direction direction) {\n this.direction = direction;\n update();\n }", "public void setDirection() {\n frontLeft.setDirection(DcMotorSimple.Direction.REVERSE);\n backLeft.setDirection(DcMotorSimple.Direction.REVERSE);\n frontRight.setDirection(DcMotorSimple.Direction.FORWARD);\n backRight.setDirection(DcMotorSimple.Direction.FORWARD);\n }", "public void setDirection(int value) {\n this.direction = value;\n }", "public void setDirection(Vector3f direction) {\r\n\t\tmDirection.set(direction);\r\n\t}", "public void setDirection(int dir) {\n if((dir % 10) == 0 && dir <=350 && dir >=0) {\n this.directionDegree = dir; \n } else {\n throw new IllegalArgumentException(\"Direction \" + dir +\" is not valid. Directions must be between 0/350 in multiples of 10\"); \n }\n }", "public void direction(int dirX, int dirY) {\r\n if (dirX == 1 && dirY == 0) {\r\n this.direction = \"HORI\";\r\n }\r\n else if (dirX == 1 && dirY == -1) {\r\n this.direction = \"RISE\";\r\n }\r\n else if (dirX == 0 && dirY == 1) {\r\n this.direction = \"VERTI\";\r\n }\r\n else {\r\n this.direction = \"FALL\";\r\n }\r\n }", "public static void setDirection(float x, float y) {\n PlayerDirectionSystem.directionX = x;\r\n PlayerDirectionSystem.directionY = y;\r\n }", "public void setDirection(){\n\n if (gameStatus != demoPlay)\n client_sb.i_Button = direct;\n\n TankMoveDelay++;\n StarGun_GSR loc=(StarGun_GSR)client_sb.getGameStateRecord();\n\n if (TankMoveDelay >= 1 &&\n loc.getPlayerX() < StarGun_SB.PLAYER_RIGHT_BORDER &&\n\t loc.getPlayerX() > 0) {\n TankMoveDelay = 0;\n switch (direct) {\n\tcase StarGun_SB.DIRECT_LEFT:\n\t if (TankPos==0)TankPos=iTankAmount-1;\n\t else TankPos--;\n\t\t\t\t break;\n case StarGun_SB.DIRECT_RIGHT:\n\t if (TankPos==iTankAmount-1)TankPos=0;\n\t else TankPos++;\n\t\t\t\t break;\n }\n }\n }", "public void changerDirection(int d)\n {\n directionInput = d;\n }", "private void assignDirection(char d) throws InputMismatchException{\n\t\tif(d == NL) {\n\t\t\tdir = NL;\n\t\t}else if(d == NR) {\n\t\t\tdir = NR;\n\t\t}else if(d == SL) {\n\t\t\tdir = SL;\n\t\t}else if(d == SR){\n\t\t\tdir = SR;\n\t\t}else {\n\t\t\tthrow new InputMismatchException(\"There is no such filling direction.\");\n\t\t}\n\t}", "public void setDirection(String direction) {\r\n this.direction = direction;\r\n }", "public void setDirection(Direction direction) {\n this.direction = direction;\n }", "public void setDirection(Direction direction) {\n this.direction = direction;\n }", "public void setDirection(Direction direction) {\n this.direction = direction;\n }", "public void setDirection(Directions direction) {\n\t\tlogic.setDirection(direction);\n\t}", "protected void changeDirection(Direction newDir)\n {\n // Change direction.\n myDir = newDir;\n }", "void setDirections(Directions dir){\n this.dir = dir;\n }", "public void changeDirection (int dir) {\n if ((dir == UPKEY || dir == DOWNKEY || dir == RIGHTKEY || dir == LEFTKEY) && validMove(dir))\n {\n direction = dir;\n }\n }", "public Builder setDirection(int value) {\n bitField0_ |= 0x00000020;\n direction_ = value;\n onChanged();\n return this;\n }", "public void changeDirection()\n {\n if(goLeft){\n goLeft = false;\n }else{\n goLeft = true;\n }\n }", "public void setDirection(String direction) {\n this.direction = direction;\n }", "public void setDirection(double direction) {\n\t\tgyroPid.setSetpoint(direction);\n\t}", "private void setDirection() {\n directionX = corePos.getX() - projectile.getX();\n directionY = corePos.getY() - projectile.getY();\n\n double length = Math.sqrt(directionX*directionX + directionY*directionY);\n\n if (length != 0) {\n directionX = directionX/length;\n directionY = directionY/length;\n }\n }", "public void changeDirection() {\n\t\t// Define the direction we want to change from as our current direction.\n\t\tfinal float oldDirection = this.requiredSwipeDirection;\n\t\t// While our swipe direction is the direction we want to change from,\n\t\twhile (this.requiredSwipeDirection == oldDirection)\n\t\t\t// Set our SwipeTile's direction to a random direction.\n\t\t\tsetDirection(SwipeTile.randomDirection());\n\t}", "public void setDirection(int direction) {\r\n\t\tsuper.setDirection(direction);\r\n\t\trobotImage.setImage(Constant.ROBOTIMAGEPATHS[direction]);\r\n\t}", "private void setDirection() {\r\n\t\tif (destinationFloor > initialFloor){\r\n\t\t\tdirection = 1;\r\n\t\t} else {\r\n\t\t\tdirection = -1;\r\n\t\t}\r\n\t}", "private void turnToDesiredDirection() {\n\n\t\tdouble dir = sens.getDirection();\n\n\t\tif (dir < desiredDirection) {\n\t\t\tif (Math.abs(dir - desiredDirection) < 180) {\n\t\t\t\tdir += TURNSPEED;\n\t\t\t} else {\n\t\t\t\tdir -= TURNSPEED;\n\t\t\t}\n\t\t} else {\n\t\t\tif (Math.abs(dir - desiredDirection) < 180) {\n\t\t\t\tdir -= TURNSPEED;\n\t\t\t} else {\n\t\t\t\tdir += TURNSPEED;\n\t\t\t}\n\t\t}\n\t\t\n\t\tsens.setDirection(dir);\n\t\t\n\t}", "public void setWalkDirection(Vector3f vec) {\n walkDirection.set(vec);\n setWalkDirection(characterId, vec);\n }", "@JsonSetter(\"direction\")\n public void setDirection (String value) { \n this.direction = value;\n }", "@Test\r\n\tpublic void testSetDirection()\r\n\t{\r\n\t\tIDirectionController directionController = new RadianDirectionControlAdapter(new RadianDirectionControl());\r\n\t\tdirectionController.setCurrentDirection(90.0);\r\n\t\tassertEquals(90.0, directionController.getCurrentDirection(), 0.0);\r\n\t\tdirectionController.setCurrentDirection(390.0);\r\n\t\tassertEquals(30.0, directionController.getCurrentDirection(), 0.0);\r\n\t\tdirectionController.setCurrentDirection(-90.0);\r\n\t\tassertEquals(270.0, directionController.getCurrentDirection(), 0.0);\r\n\t}", "public void direction()\n {\n if(!goLeft){\n horzVelocity = 1;\n }else{\n horzVelocity = -1;\n }\n }", "public void move(String direction) {\n \n }", "@JsonSetter(\"direction\")\r\n public void setDirection(String direction) {\r\n this.direction = direction;\r\n }", "public void changeDir(Platforms platform)\r\n\t{\r\n\t\tif (changeDirection==0)\r\n\t\t{\r\n\t\t\t//TextBasedPart\r\n\t\t\tplatform.setXCord(platform.getXCord()+1);\r\n\t\t}\r\n\t\tif(changeDirection==1)\r\n\t\t{\r\n\t\t\tplatform.setXCord(platform.getXCord()-1);\r\n\t\t}\r\n\t}", "private UCharacterDirection()\n {\n }", "public void setDirection(String nDirection) {\r\n\t\tthis.direction = nDirection;\r\n\t}", "default void setDirection(Vector3 v) {\r\n setDirection(v.getX(), v.getY(), v.getZ());\r\n }", "public boolean setDirection(Direction dir)\n {\n this.dir = dir;\n return true;\n }", "public void getUserInput(int direction) { this.direction = direction; }", "void move(String direction) {\n \tif (direction.equals(\"A\")) { \n \t\tsetXCoord(getXCoord()-getHSpeed());\n \t} else if (direction.equals(\"D\")) {\n \t\tsetXCoord(getXCoord()+getHSpeed());\n \t}\n }", "@Generated\n @Selector(\"setDirection:\")\n public native void setDirection(@ByValue CGVector value);", "public void setDir(Vector2 dirVec) {\n this.dirVec = dirVec;\n // Travelling horizontally\n if (dirVec.x == 0) {\n setAngle(Math.PI);\n }\n else {\n setAngle(Math.PI/2);\n }\n }", "private void setMovingDir(Direction dir)\n {\n if(moving != dir)\n {\n \txSpeed = 0;\n \t\n \tSystem.out.println(\"xSpeed = 0\");\n \t\n resetAccelX();\n }\n moving = dir;\n setFacing(dir);\n //System.out.println(\"setMovingDir: \" + dir);\n }", "private void setDirection(int row, int col, String imageName,\n\t\t\t\t\t\t\t\t\t\t\t\t\tint direction) {\n\t\tDirectionalPanel[] room = rooms[row][col];\n\t\tint index = -1;\n\t\tfor (int i = 0; index == -1 && i < room.length; i++) {\n\t\t\tString roomImageName = room[i].getImageName();\n\t\t\tif (roomImageName != null && roomImageName.equals(imageName)) {\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\n\t\tif (index != -1) {\n\t\t\troom[index].setDirection(direction);\n\t\t\troom[index].invalidate();\n\t\t\troom[index].repaint();\n\t\t}\n\t}", "public void changeDirection(){\n\t\tthis.toRight ^= true;\n\t\t\n\t\tif(this.toRight)\n\t\t\tthis.nextElem = (this.currElem + 1) % players.size();\n\t\telse\n\t\t\tthis.nextElem = (this.currElem - 1 + players.size()) % players.size();\n\t}", "public void setDirection(int dice){\n\t}", "public void switchDirection(String monster) {\n isFacingRight = !isFacingRight;\n if (isFacingRight) {\n spriteBase.setImage(monster + \"Right.png\");\n } else {\n spriteBase.setImage(monster + \"Left.png\");\n }\n }", "public abstract void move( char direction );", "public void setDirection(Direction direction) {\n\t\t// Set the arrow textures to the new direction's corresponding arrow textures.\n\t\tthis.arrowGreen = SwipeTile.getArrow(game, direction, true);\n\t\tthis.arrowGray = SwipeTile.getArrow(game, direction, false);\n\t\t// Set the required swipe direction to the new direction.\n\t\tsetSwipeRequirement(SwipeTile.createSwipe(direction, requiredSwipeMagnitude));\n\t\t// Refresh the arrow so it uses the new Textures.\n\t\trefreshArrow();\n\t}", "public void setDirection(boolean positive) {\n setRange(mRangeStart, mRange, positive);\n }", "public String getDirection() {\r\n return direction;\r\n }", "public void setCurrentDirection(int currentDirection) {\r\n this.currentDirection = currentDirection;\r\n }", "private void setMainTankDir() {\n Dir dir = myTank.getDir();\n\n if(!bL&&!bU&&!bR&&!bD){\n myTank.setMoving(false);\n Client.INSTANCE.send(new TankStopMsg(getMyTank()));\n }else {\n if (bL) myTank.setDir(Dir.LEFT);\n if (bU) myTank.setDir(Dir.UP);\n if (bR) myTank.setDir(Dir.RIGHT);\n if (bD) myTank.setDir(Dir.DOWN);\n if (bL && bU) myTank.setDir(Dir.LEFT_UP);\n if (bL && bD) myTank.setDir(Dir.LEFT_DOWN);\n if (bR && bU) myTank.setDir(Dir.RIGHT_UP);\n if (bR && bD) myTank.setDir(Dir.RIGHT_DOWN);\n if(!myTank.isMoving())\n Client.INSTANCE.send(new TankStartMovingMsg(getMyTank()));\n myTank.setMoving(true);\n\n if(dir != myTank.getDir()) {\n Client.INSTANCE.send(new TankDirChangedMsg(myTank));\n }\n }\n }", "public void setDirection(com.cognos.developer.schemas.raas.Returns__by__Order__Method___x002d__Prompted__Chart.TextDirectionEnum direction) {\r\n this.direction = direction;\r\n }", "public void updateDirection(float dir)\n {\n firstDraw = false;\n direction = dir;\n invalidate();\n }", "private void setDocumentDirection() {\n if (document != null) {\n document.putProperty(TextAttribute.RUN_DIRECTION, new Boolean(\n componentOrientation));\n }\n }", "public String getDirection() {\n return direction;\n }", "public void move(String direction);", "public static void setDirectionJoystick(float x, float y) {\n setDirection(x, y);\r\n isTouched = x != 0 || y != 0;\r\n }", "public String getDirection() {\n return this.direction;\n }", "public Dragon() {\n\t\tthis.setLetter('D');\n\t}", "public TextDirection getDir() {\n return dir;\n }", "public Direction()\n {\n dirInDegrees = 0; // default to North\n }", "public void turnRight() {\r\n setDirection( modulo( myDirection+1, 4 ) );\r\n }", "public boolean setDirection(Direction dir) {\n //If a new direction was set but the update wasn't made yet,\n // you cannot change the direction.\n if (!moveMade) {\n return false;\n }\n if (!direction.isValid(dir)) {\n return false;\n }\n prevDir = direction;\n direction = dir;\n moveMade = false;\n return true;\n }", "public void reverseDirection() {\n\t\tdirection *= -1;\n\t\ty += 10;\n\t}", "public void setTravelDirection(int travelDirection) {\n\t\t//TODO: Should not be any number except 0 - 5\n\t\t/*\n\n\t\t */\n\t\t\n\t\t/*\n\t\t * The user should not be able to set their direction to 180 degrees opposite\n\t\t * If they try to, ignore it, but add it to the logs\n\t\t * Example; Travel Direction = north, user can not set direction to south\n\t\t * Example; Travel Direction = west, user can not set direction to east\n\t\t */\n\t\tthis.travelDirection = travelDirection;\n\t\tlogger.debug(\"TravelDirection set to \" + travelDirection);\n\t}", "public void changeDirection(Direction direction) {\n\t\tstate.updateDirection(direction);\n\t}", "public void faceDirection(Vector direction) {\n \tVector originalFaceDirection = new Vector(0,0,-1);\n \t\n \tfloat angle;\n \t\n \tif (direction.size() == 0)\n \t\tangle = 0;\n \telse\n \t\tangle = (float)Math.toDegrees( direction.angleBetween(originalFaceDirection) );\n \t\n \tVector orientation = player.getOrientation();\n \tplayer.setOrientation( angle , orientation.y(), orientation.z());\n }", "public void moveUporDown(int direction)\n\t{\n\t\tif (this.direction == direction || this.direction == -direction)\n\t\t\treturn ;\n\t\tthis.direction = direction;\n\t\tdirx = 0;\n\t\tdiry = 0;\n\t\tif (direction == 1 || direction == -1)\n\t\t\tdirx = direction;\n\t\telse\n\t\t\tdiry = direction / 2;\n\t}", "public void setDirectionTo(Position ep, Position vp) throws InvalidPositionException;", "public void switchDirection(String body) {\r\n pcs.firePropertyChange(Constants.PACMAN, null, new SwitchDirectionCmd(body));\r\n }", "private void updateDirection()\n {\n if (Math.abs(InputSystem.LT_Button_Control_Stick) > 0.1)\n {\n // if lt button is pressed, reverse direction of elevator\n setReverseDirection(true);\n }\n else\n {\n setReverseDirection(false);\n }\n }", "public PositionController setDirection(double angle, double power) {\n this.angle = angle;\n this.power = power;\n return this;\n }", "public void setLocation(Direction direction){\n switch (direction) {\n case NORTH:\n location.y = -offset;\n location.x = Constants.GAMEWIDTH / 2;\n break;\n case SOUTH:\n location.y = Constants.GAMEHEIGHT + offset;\n location.x = Constants.GAMEWIDTH / 2;\n break;\n case EAST:\n location.y = Constants.GAMEHEIGHT / 2;\n location.x = Constants.GAMEWIDTH + offset;\n break;\n case WEST:\n location.y = Constants.GAMEHEIGHT / 2;\n location.x = -offset;\n break;\n default:\n\n break;\n }\n }", "public void changeMovement(int directionX, int directionY) {\r\n movementX = directionX;\r\n movementY = directionY;\r\n }", "@Override\n public void setFacing(Direction dir)\n {\n facing = dir;\n if(!userHoldingLeftXOrRight)\n {\n setStandingAnim();\n }\n }", "public String getDirection() {\n\t\treturn this.direction;\n\t}", "public byte getDirection() {\n\t\treturn direction;\n\t}", "public String getDirection(){\n\t\tif(this.toRight)\n\t\t\treturn \"RIGHT\";\n\t\telse\n\t\t\treturn \"LEFT\";\n\t}", "public void setDirectionFrom(Position ep, Position vp) throws InvalidPositionException;", "public void setDirectionOfTravel(typekey.DirectionOfTravelPEL value);" ]
[ "0.7826337", "0.74206775", "0.7383228", "0.73346317", "0.7277654", "0.7273112", "0.71710664", "0.71377647", "0.71127397", "0.70164394", "0.6980937", "0.69489914", "0.69488853", "0.69480217", "0.6920041", "0.6916709", "0.69091904", "0.69016755", "0.68944204", "0.6846125", "0.6835793", "0.6827519", "0.6759723", "0.6743968", "0.67177", "0.669738", "0.6697072", "0.6683221", "0.6673122", "0.66405416", "0.66405416", "0.66405416", "0.6635639", "0.6625629", "0.6612933", "0.6597899", "0.65924996", "0.6581808", "0.65793115", "0.65430593", "0.65351427", "0.65279025", "0.6504037", "0.6496467", "0.6436619", "0.6388806", "0.63824236", "0.63613266", "0.6352602", "0.6347298", "0.6328724", "0.6320673", "0.6306864", "0.6294955", "0.62730426", "0.62719536", "0.62508756", "0.6211277", "0.61968184", "0.6194982", "0.61734957", "0.616811", "0.611843", "0.61046845", "0.6103364", "0.6077933", "0.60603726", "0.6058974", "0.6058813", "0.6052173", "0.6046197", "0.60357183", "0.6015262", "0.5995429", "0.59883034", "0.5981105", "0.59642714", "0.5935151", "0.59349954", "0.59091735", "0.5905205", "0.58952504", "0.5888061", "0.5886048", "0.58804715", "0.5878674", "0.5875148", "0.5830205", "0.5827032", "0.58176255", "0.5794407", "0.5792774", "0.57831854", "0.5778303", "0.5771241", "0.57582253", "0.57579964", "0.57555723", "0.5753224", "0.5739929" ]
0.7047715
9
Sets the X position of the character
public void setX(double X) { curX = X; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void setXDPosition(final String xpos) {_xdpos = xpos;}", "@Override\n\tpublic void setX(int x) {\n\t\txPos = x;\n\t}", "void setX(int x) {\n position = position.setX(x);\n }", "void setX(int newX) {\n this.xPos = newX;\n }", "public void setX(int xpos) {\r\n this.xpos = xpos;\r\n }", "public void setX(int x){ xPosition = x; }", "public void setX(int xPos){\t\t\n\t\tx = new Integer(xPos);\n\t}", "private void setCharacterPosition(Point position) {\n\t\tthis.characterPosition = position;\n\t}", "public void setxPos(int xPos) {\r\n \tthis.xPos = xPos;\r\n }", "public void setXLoc(int xLoc){\n myRectangle.setX(xLoc);\n }", "public void setX(int x) {\n\tbaseXCoord = x;\n}", "public void setX(int newX)\r\n {\r\n xCoord = newX;\r\n }", "public void setX( int x ) {\n\t\t//not checking if x is valid because that depends on the coordinate system\n\t\tthis.x = x;\n\t}", "public void setXCoordinate(int newValue)\n {\n x = newValue;\n }", "public void setXPosition(double x)\n\t{\n\t\tthis.xPosition = x;\n\t}", "public void setPosX(int posX) {\n this.posX = posX;\n }", "public void setX(int position) {\r\n\t\tif(position<5 && position>=0) {\r\n\t\t\tthis.xcoord = position;\r\n\t\t}\r\n\t\telse {\r\n\t\t\trandomX();\r\n\t\t}\r\n\t}", "public void setX(float x) {\r\n\t\tleft = x - width / 2;\r\n\t}", "public void setPosX(double posX) {\n\t\tthis.PosX = posX;\r\n\t}", "public void setX(int x)\n\t{\n\t\tgetWorldPosition().setX(x);\n\t}", "public void setxPos(int xPos) \n\t{\n\t\tthis.xPos = xPos;\n\t}", "public void setxPos(int xPos) {\n\t\tthis.xPos = xPos;\n\t}", "public void setStartX(double x)\n {\n startxcoord=x; \n }", "public void setxPosition(int xPosition) {\n\t\tthis.xPosition = xPosition;\n\t}", "public void setX(float x){\n hitBox.offsetTo(x,hitBox.top);\n //this.x=x;\n }", "public void setXPos(int x) {\n // from MoveEventHandler\n // convert to real x coord\n // x = xP * (xmaxr - xminR) / (xmaxP - xminP)\n double tmp = config.getMaximumRealX() + (x - config.getMaximumPixelX())*(config.getMaximumRealX() - config.getMinimumRealX())/(config.getMaximumPixelX() - config.getMinimumPixelX());\n xpos.setText(formatter.format(tmp));\n }", "@Override\n\tpublic void setX(int x) {\n\t\t\n\t}", "public Builder setPositionX(double value) {\n bitField0_ |= 0x00000008;\n positionX_ = value;\n onChanged();\n return this;\n }", "public void setXPos(int xPos) {\r\n\t\tthis.xPos = xPos;\r\n\t}", "public void setExtendedX(float x) {\n mLeft = (int) x;\n }", "public void setXPos(int xPos) {\n\t\tthis.xPos=xPos;\n\t}", "public void setPosX(int posX) {\n\t\tthis.posX = posX;\n\t}", "public void setPosX(float posX) {\n this.posX = posX;\n }", "public Builder setPositionX(double value) {\n bitField0_ |= 0x00000004;\n positionX_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic void setX(int x) {\n\n\t}", "public Builder setPositionX(double value) {\n bitField0_ |= 0x00000040;\n positionX_ = value;\n onChanged();\n return this;\n }", "public void setX(double val) {\r\n\t\t this.xCoord = val;\r\n\t }", "public void setX(int x) {\n synchronized (this.xLock) {\n this.movementComposer.setXPosition(x);\n }\n }", "public int getPositionX() {\r\n\t\treturn positionX;\r\n\t}", "public void setXPosition( int xCoordinate ) {\n xPosition = xCoordinate;\n }", "public void setPosicaoX(int posicaoX) {\r\n\t\tthis.posicaoX = posicaoX;\r\n\t}", "public void setX(int x)\n\t{\n\t\tthis.x = x;\t\t\t\t\t\t\t\t\t\t\t\t\t// Update point's x-coordinate\n\t}", "public void setX(String s)\n\t{\n\t\tx.setText(s);\n\t}", "public int getPositionX(){\n\t\treturn positionx;\n\t}", "public int getxPosition() {\n\t\treturn xPosition;\n\t}", "public void setX(int x){\r\n\t\tthis.x = x;\r\n\t}", "public void setX(int x) {\r\n\t\tthis.x = x;\r\n\t}", "public void setX(int x) {\r\n\t\tthis.x = x;\r\n\t}", "public void setX(int x) {\r\n\t\tthis.x = x;\r\n\t}", "public void setX(int x) {\r\n\t\tthis.x = x;\r\n\t}", "public void setX (int index, int x) { coords[index][0] = x; }", "public void setX(int x) {\n\t\tthis.X = x;\n\t}", "public void setX(int x) {\n this.x = x;\r\n }", "public void setX(int xcoord) {\n\t\tx = xcoord;\n\t}", "public int getPositionX() {\n return positionX;\n }", "public int getxPos() {\n\t\treturn xPos;\n\t}", "public final void setCursorX(final int cursorX) {\n this.cursorX = cursorX;\n }", "public void setPosX(final int posX) {\n\t\tthis.posX = posX;\n\t}", "public int getPos_x(){\n\t\treturn pos_x;\n\t}", "public void setX(int newX)\n\t{\n\t\tx += newX;\n\t\tboundingBox = new Rectangle(x,y,width,height);\n\t}", "public void setX(int x) {\n\t\tthis.x = x;\n\t}", "public void setX(int x) {\n\t\tthis.x = x;\n\t}", "public void setX(int x) {\n\t\tthis.x = x;\n\t}", "public void setX(int x) {\n\t\tthis.x = x;\n\t}", "public void setX(int x) {\n\t\tthis.x = x;\n\t}", "@Test\r\n\tpublic void testSetPositionX(){\n\t\tWinnerTitle title = new WinnerTitle(1, 0, 0);\r\n\t\ttitle.setPositionX(10);\r\n\t\t\r\n\t\tassertEquals(10, title.getPositionX());\r\n\t}", "@Override\r\n\tpublic void setX(float x) {\n\t\t\r\n\t}", "public final int getPositionX() {\r\n return (int) position.x();\r\n }", "public void setXCoordinates(double newX) { this.xCoordinates = newX; }", "public void setX(int x) {\n this.x = x;\n }", "public void setX(int x) {\n this.x = x;\n }", "public void setX(float x)\n {\n getBounds().offsetTo(x - positionAnchor.x, getBounds().top);\n notifyParentOfPositionChange();\n conditionallyRelayout();\n }", "public int getxPos() \n\t{\n\t\treturn xPos;\n\t}", "protected void setX(final Number x) {\n this.xCoordinate = x;\n }", "public Position(String pos) {\n pos = pos.toLowerCase();\n x = (int) pos.charAt(0) - 97;\n y = (int) pos.charAt(1) - 49;\n }", "public double getPositionX() {\n return positionX_;\n }", "public double getPositionX() {\n return positionX_;\n }", "public double getPositionX() {\n return positionX_;\n }", "public int getXPosition(){\n\t\treturn xPosition;\n\t}", "private void drawStringX(String s, int x, int y, Graphics g)\r\n {\r\n int strW = fm.stringWidth( s );\r\n int strH = 10; //right?\r\n g.drawString( s, x - strW/2, y + strH);\r\n }", "public void setPositionX(int positionX) {\r\n\t\tthis.positionX = positionX;\r\n\t}", "public float getPositionX() {return this.position.getX();}", "public PlotPosition setX( double x )\n {\n return setX( x, 1 );\n }", "public double getPositionX() {\n return positionX_;\n }", "public double getPositionX() {\n return positionX_;\n }", "public double getPositionX() {\n return positionX_;\n }", "@Override\r\n\tpublic void setPositionX(int x) {\n\t\tif (!(x >= 0))\r\n\t\t\tthrow new PreConditionError(\"Error PreCondition: x >= 0\");\r\n\r\n\t\tcheckInvariant();\r\n\r\n\t\tsuper.setPositionX(x);\r\n\r\n\t\tcheckInvariant();\r\n\r\n\t\t// post: getPositionX() == x\r\n\t\tif (!(getPositionX() == x))\r\n\t\t\tthrow new PostConditionError(\"Error PostCondition: getPositionX() == x\");\r\n\t}", "public void setX(int newX) {\n\t\tthis.x = newX;\n\t}", "public void setPosition ( TextPosition position ) throws OutOfBoundsException { _cursorPosition = position; }", "@Override\n\tpublic void setX(float x) {\n\n\t}", "public void setToken(char c)\n\t\t{\n\t\t\ttoken = c;\n\t\n\t\t\tif (token == 'X')\n\t\t\t{\n\t\t\t\tLine line1 = new Line(10, 10, this.getWidth() - 10, this.getHeight() - 10);\n\t\t\t\tline1.endXProperty().bind(this.widthProperty().subtract(10));\n\t\t\t\tline1.endYProperty().bind(this.heightProperty().subtract(10));\n\t\t\t\tLine line2 = new Line(10, this.getHeight() - 10, this.getWidth() - 10, 10);\n\t\t\t\tline2.startYProperty().bind(this.heightProperty().subtract(10));\n\t\t\t\tline2.endXProperty().bind(this.widthProperty().subtract(10));\n\t\n\t\t\t\t// Add the lines to the pane\n\t\t\t\tthis.getChildren().addAll(line1, line2);\n\t\t\t}\n\t\t\telse if (token == 'O') {\n\t\t\t\tEllipse ellipse = new Ellipse(this.getWidth() / 2,\n\t\t\t\t\t\tthis.getHeight() / 2, this.getWidth() / 2 - 10,\n\t\t\t\t\t\tthis.getHeight() / 2 - 10);\n\t\t\t\tellipse.centerXProperty().bind(this.widthProperty().divide(2));\n\t\t\t\tellipse.centerYProperty().bind(this.heightProperty().divide(2));\n\t\t\t\tellipse.radiusXProperty().bind(this.widthProperty().divide(2).subtract(10));\n\t\t\t\tellipse.radiusYProperty().bind(this.heightProperty().divide(2).subtract(10));\n\t\t\t\tellipse.setStroke(Color.BLACK);\n\t\t\t\tellipse.setFill(Color.WHITE);\n\t\t\t\tgetChildren().add(ellipse); // Add the ellipse to the pane\n\t\t\t}\n\t\n\t\t}", "public void setPositionX(float x) {\n\t\tthis.position.set(x, this.position.y, 0);\n\t}", "public int getxPos() {\n return xPos;\n }", "public int getXPosition() {\n return xPosition;\n }", "public void setX(int x)\r\n {\r\n this.x = x;\r\n }", "public void setX(double value) {\n origin.setX(value);\n }", "public void setX(int x){\n this.x = x;\n }", "public void setX(int x){\n this.x = x;\n }", "public void setX(int x){\n this.x = x;\n }", "public void setX(int x){\n this.x = x;\n }" ]
[ "0.755557", "0.7460192", "0.7383131", "0.72605866", "0.72550255", "0.7198575", "0.7112843", "0.6999702", "0.6987542", "0.6977042", "0.6851223", "0.6844669", "0.67408776", "0.67011493", "0.66882104", "0.66296214", "0.6627771", "0.6619019", "0.6602589", "0.65967655", "0.6583368", "0.6514123", "0.6492471", "0.6483124", "0.64701736", "0.6466377", "0.64558065", "0.6454646", "0.6453162", "0.64521927", "0.6451811", "0.64421", "0.6417851", "0.6414334", "0.64038825", "0.6401716", "0.6394526", "0.63943166", "0.6393118", "0.63904387", "0.6387279", "0.63847524", "0.63578606", "0.6352295", "0.63464576", "0.6345646", "0.6321755", "0.6321755", "0.6321755", "0.6321755", "0.6267328", "0.62564456", "0.6254706", "0.62421155", "0.62412006", "0.6227696", "0.62274367", "0.62255925", "0.6224562", "0.6218297", "0.62170714", "0.62170714", "0.62170714", "0.62170714", "0.62170714", "0.6215967", "0.6212358", "0.6209911", "0.61837304", "0.61829334", "0.61829334", "0.6181028", "0.6171986", "0.6162463", "0.6161533", "0.6134204", "0.61333895", "0.61333895", "0.61288416", "0.611936", "0.6110783", "0.6109648", "0.6105389", "0.6097562", "0.6097562", "0.6096677", "0.60964316", "0.6095667", "0.60901546", "0.60870415", "0.60752094", "0.6072089", "0.6069242", "0.60682976", "0.6057987", "0.605053", "0.60446787", "0.60446787", "0.60446787", "0.60446787" ]
0.60467213
96
Sets the Y position of the character
public void setY( double Y) { curY = Y; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setY(int y){ yPosition = y; }", "@Override\n\tpublic void setY(int y) {\n\t\tyPos = y;\n\t}", "void setY(int newY) {\n this.yPos = newY;\n }", "public void setY(int yPos){\t\t\n\t\ty = new Integer(yPos);\n\t}", "void setY(int y) {\n position = position.setY(y);\n }", "public void setYPosition(double y)\n\t{\n\t\tthis.yPosition = y;\n\t}", "public void setYPosition(int newY) {\n this.yPosition = newY;\n }", "public void setyPos(int yPos) {\r\n this.yPos = yPos;\r\n }", "public void setyPos(int yPos) \n\t{\n\t\tthis.yPos = yPos;\n\t}", "public void setyPos(int yPos) {\n\t\tthis.yPos = yPos;\n\t}", "public void setY(int y){\n\t\tthis.y_location = y;\n\t}", "@Override\n\tpublic void setY(int y) {\n\t\t\n\t}", "public void setyPosition(int yPosition) {\n\t\tthis.yPosition = yPosition;\n\t}", "public void setY(int y) {\n\tbaseYCoord = y;\n}", "@Override\n\tpublic void setY(int y) {\n\n\t}", "public void setY(int newY)\r\n {\r\n yCoord = newY;\r\n }", "public void setYPos(int yPos) {\r\n\t\tthis.yPos = yPos;\r\n\t}", "public void setY(int value) {\n this.y = value;\n }", "public void setYPos(int yPos) {\n\t\tthis.yPos=yPos;\n\t}", "public void setYPos(int y) {\n // from MoveEventHandler\n // convert to real y coord\n // y = yP * (ymaxR - yminr) / (ymaxP - yminP)\n double tmp = config.getMaximumRealY() + (y - config.getMaximumPixelY())*(config.getMaximumRealY() - config.getMinimumRealY())/(config.getMaximumPixelY() - config.getMinimumPixelY());\n ypos.setText(formatter.format(tmp));\n }", "public void setY(int y){\r\n\t\tthis.y = y;\r\n\t}", "public void setY(int value)\n\t{\n\t\tgetWorldPosition().setY(value);\n\t}", "public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}", "public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}", "public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}", "public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}", "public void setY( int y ) {\n\t\t//not checking if y is valid because that depends on the coordinate system\n\t\tthis.y = y;\n\t}", "public void setY(int ypos) {\r\n this.ypos = ypos;\r\n }", "public void setY(int y) {\n this.y = y;\r\n }", "public void setPosY(double posY) {\n\t\tthis.PosY = posY;\r\n\t}", "public void setY(int y) {\n this.y = y;\n }", "public void setY(int y) {\n this.y = y;\n }", "public void setY(int y) {\n this.y = y;\n }", "public void setY(int theY)\r\n {\r\n y = theY;\r\n }", "public void setYPosition( int yCoordinate ) {\n yPosition = yCoordinate;\n }", "public void setY(int y)\n\t{\n\t\tthis.y = y;\t\t\t\t\t\t\t\t\t\t\t\t\t// Update point's y-coordinate \n\t}", "public void setY(int y) {\n\t\tthis.y = y;\n\t}", "public void setY(int y) {\n\t\tthis.y = y;\n\t}", "public void setY(int y) {\n\t\tthis.y = y;\n\t}", "public void setY(int y) {\n\t\tthis.y = y;\n\t}", "public void setY(int y)\n {\n this.y = y;\n }", "public void setY(int y) {\n\t\tthis.Y = y;\n\t}", "public void setY(int position) {\r\n\t\tif(position<5 && position>=0) {\r\n\t\t\tthis.ycoord = position;\r\n\t\t}\r\n\t\telse {\r\n\t\t\trandomY();\r\n\t\t}\r\n\t}", "public void setY(int y){\n this.y = y;\n }", "public void setY(int y){\n this.y = y;\n }", "public void setY(int y){\n this.y = y;\n }", "@Override\n public void setY(int y) {\n this.y=y;\n }", "public void setPosY(int posY){\n\t\tthis.posY=posY;\n\t}", "public void setYCoordinate(int newValue)\n {\n y = newValue;\n }", "void setY(int y) {\n this.y = y;\n }", "public void setY(int y) { loc.y = y; }", "public void setPositionY(float y) {\n\t\tthis.position.set(this.position.x, y, 0);\n\t}", "public void setYCoordinates(double newY) { this.yCoordinates = newY; }", "public void setY(double val) {\r\n\t\t this.yCoord = val;\r\n\t }", "public void setPosY(int posY) {\n\t\tthis.posY = posY;\n\t}", "public void setPosY(int posY) {\n this.posY = posY;\n }", "public void setY(int y) { this.y=y; }", "@Test\r\n\tpublic void testSetPositionY(){\n\t\tWinnerTitle title = new WinnerTitle(1, 0, 0);\r\n\t\ttitle.setPositionY(25);\r\n\t\t\r\n\t\tassertEquals(25, title.getPositionY());\r\n\t}", "public void setY(String s)\n\t{\n\t\ty.setText(s);\n\t}", "public void setY(int ycoord) {\n\t\ty = ycoord;\n\t}", "public void moveY() {\n\t\tsetY( getY() + getVy() );\n\t}", "public void setY(final int y) {\n\n this.y = y;\n }", "public void setY(double value) {\n this.y = value;\n }", "public Builder setPositionY(double value) {\n bitField0_ |= 0x00000080;\n positionY_ = value;\n onChanged();\n return this;\n }", "public void setY(int y ){\n if(y>0){\n this.y=y;\n }\n \n }", "public void setPositionY(int positionY) {\r\n\t\tthis.positionY = positionY;\r\n\t}", "public Builder setPositionY(double value) {\n bitField0_ |= 0x00000008;\n positionY_ = value;\n onChanged();\n return this;\n }", "public Builder setPositionY(double value) {\n bitField0_ |= 0x00000010;\n positionY_ = value;\n onChanged();\n return this;\n }", "public void setY(float y){\n hitBox.offsetTo(hitBox.left,y);\n //this.y=y;\n }", "public void setEndY(double y)\n {\n endycoord=y; \n }", "@Override\r\n\tpublic void setY(float y) {\n\t\t\r\n\t}", "@Override\n\tpublic void setY(float y) {\n\n\t}", "public void setY(int y) {\r\n this.y = y;\r\n\r\n this.slot = Slot.fromXY(getX(), y);\r\n }", "public void setY(double value) {\n origin.setY(value);\n }", "public void setPosY(float posY) {\n this.posY = posY;\n }", "public void setY(int yCoord) {\n this.yCoord = yCoord;\n }", "public void setPosY(final int posY) {\n\t\tthis.posY = posY;\n\t}", "public PlotPosition setY( double y )\n {\n return setY( y, 1 );\n }", "public void setY(int newY)\n\t{\n\t\ty+=newY;\n\t\tboundingBox = new Rectangle(x,y,width,height);\n\t}", "public void setCurrentYPosition(int y) {\n\t\tthis.currentYPosition = y;\n\t\tthis.currentXPosition = this.floats.leftIntersectionPoint(this.box.getAbsoluteX()\n\t\t\t\t+ this.box.marginLeft + this.box.paddingLeft, this.box.getAbsoluteY() + y\n\t\t\t\t+ this.box.marginTop + this.box.paddingTop, this.currentRowMaxWidth, this.box);\n\t}", "public void setY(long y){\n this.y = y;\n }", "public void setFrameY(double aY) { double y = _y + aY - getFrameY(); setY(y); }", "public void initY(int pos, int val){\n\t\ty[pos] = val;\n\t}", "public void setY(double y) {\n this.y = y;\r\n }", "public void setY(double y){\n this.y = y;\n }", "public void setY(double y){\n this.y = y;\n }", "public void setY(double y)\r\n\t{\t\r\n\t\tvirtualDxfPoint.setTransformationY(y);\r\n\t\tAnchor.setY(y);\r\n\t}", "public void setY(double y) {\n this.y = y;\n }", "public void setY(double y) {\n this.y = y;\n }", "public void setY(double y) {\n this.y = y;\n }", "public void setY(double y)\n {\n this.y = y;\n }", "public void setY(double point) {\n this.y = point;\n }", "public void setPosicaoY(int posicaoY) {\r\n\t\tthis.posicaoY = posicaoY;\r\n\t}", "public void setY(double y) {\n\t\tthis.y = y;\n\t}", "@Override\n\tpublic void setY(float y) \n\t{\n\t\t_y = y;\n\t}", "public void setY(double y)\n\t{\n\t\tthis.y = y;\n\t}", "public void setY(float y){\n this.y = y;\n }", "public void setY(float y)\n {\n getBounds().offsetTo(getBounds().left, y - positionAnchor.y);\n notifyParentOfPositionChange();\n conditionallyRelayout();\n }", "public void setY(float y) {\r\n\t\tthis.y = y;\r\n\t}", "void setY(final Number y) {\n this.yCoordinate = y;\n }" ]
[ "0.7962799", "0.7817216", "0.7785349", "0.77226126", "0.7612662", "0.7595675", "0.75573224", "0.75436604", "0.7395353", "0.7345884", "0.733015", "0.7316698", "0.73085135", "0.72988254", "0.7298595", "0.7272869", "0.7260312", "0.72585666", "0.72579163", "0.72296405", "0.72247887", "0.7177445", "0.7170448", "0.7170448", "0.7170448", "0.7170448", "0.71631926", "0.7162586", "0.71309745", "0.71269894", "0.71214545", "0.71214545", "0.71214545", "0.71183217", "0.71110237", "0.71050787", "0.7094398", "0.7094398", "0.7094398", "0.7094398", "0.7076212", "0.7068047", "0.7054349", "0.7052765", "0.7052765", "0.7052765", "0.70478326", "0.7039039", "0.70136046", "0.70078707", "0.6995887", "0.699162", "0.6979476", "0.6978377", "0.69638693", "0.6961764", "0.69613004", "0.6948004", "0.69458526", "0.69149625", "0.6878815", "0.6876284", "0.6871643", "0.68570864", "0.6838858", "0.6837494", "0.68296283", "0.68181574", "0.68137145", "0.6802188", "0.6801818", "0.680172", "0.6797713", "0.6796006", "0.6782235", "0.67782086", "0.6757471", "0.67366874", "0.67053264", "0.6682185", "0.6682108", "0.6681394", "0.66745365", "0.6657933", "0.66504794", "0.66504794", "0.664993", "0.6644256", "0.6644256", "0.6644256", "0.6644121", "0.663616", "0.6633547", "0.662998", "0.6626058", "0.66232467", "0.66132885", "0.66034985", "0.66034615", "0.6592926" ]
0.6666634
83
build the rangeKey string that is used to identify blogen posts
public static String buildPostRangeKey( Instant created, String postId ) { return Blogen.RANGE_POST + Blogen.ATT_SEP + created.toString() + Blogen.ATT_SEP + postId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public StringBuffer rangeToString(Key low, Key high)\n {\n \t\n \tStringBuffer str=new StringBuffer();\n \t\n \tint l=(int) low;\n \tint h=(int) high;\n \tfor(int ch=l;ch<=h;ch++)\n \tstr.append(ch);\n \treturn str;\n \t \t\n }", "private String generateRangeURL(Integer instanceID, Integer startRange, Integer endRange) {\n\t\treturn \"http://\" + databaseInstances[instanceID] + \"/range?start_range=\"\n\t\t\t\t+ Integer.toString(startRange) + \"&end_range=\" + Integer.toString(endRange);\n\t}", "private String getHashKey(Restriction restriction)\n\t\t{\n\t\t\treturn LabelUtils.getRestrictionString(restriction);\n\t\t}", "private void generateID(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (String t : terms.keySet())\n\t\t\tsb.append(t.replaceAll(\"\\\\W\", \"\")\n\t\t\t\t\t.substring(0, Math.min(4, t.replaceAll(\"\\\\W\", \"\").length())) + \"-\");\n\t\tfor (String s : sources)\n\t\t\tsb.append(s.replaceAll(\"\\\\W\", \"\")\n\t\t\t\t\t.substring(0, Math.min(4, s.replaceAll(\"\\\\W\", \"\").length())) + \"-\");\n\t\tsb.deleteCharAt(sb.length()-1);\n\t\tif (yearFrom > -1) sb.append(\"_\" + yearFrom);\n\t\tif (yearTo > -1) sb.append(\"_\" + yearTo);\n\t\tif (useCompounds) sb.append(\"_COMP\");\n\t\tif (useStopwords) sb.append(\"_STOP\");\n\t\tsb.append(\"_CNT\" + contextSize);\n\t\tsb.append(\"_\" + System.currentTimeMillis());\n\t\tthis.id = sb.toString();\n\t}", "private String getKey(int houseNo, int colorNo) {\n return houseNo + \"_\" + colorNo;\n }", "private int genKey()\n {\n return (nameValue.getData() + scopeDefined.getTag()).hashCode();\n }", "String getKeyFormat();", "private String tagKey() {\n return tags.values().toString();\n }", "public static String createKey(String fromCity, String toCity) {\r\n if (fromCity.compareTo(toCity) >= 0) {\r\n String tmp = toCity;\r\n toCity = fromCity;\r\n fromCity = tmp;\r\n }\r\n return new StringBuilder().append(fromCity).append(KEY_DIVIDER).append(toCity).toString();\r\n }", "public String makeKey ()\n {\n String stop = \"*\"; // default\n\n if (stopFormat.length() > 0)\n stop = String.valueOf(stopFormat.charAt(0));\n\n key = \"<BR>\";\n\n if (code.equals(\"Standard\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><B><FONT COLOR=red>M</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n }\n\n else if (code.equals(\"Drosophila Mitochondrial\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>I M</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n }\n\n else if (code.equals(\"Vertebrate Mitochondrial\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>I M</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n }\n\n else if (code.equals(\"Yeast Mitochondrial\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>M</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n }\n\n else if (code.equals(\"Mold Protozoan Coelenterate Mycoplasma Mitochondrial\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>I L M V</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n }\n\n else if (code.equals(\"Invertebrate Mitochondrial\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>I L M V</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n }\n\n else if (code.equals(\"Ciliate Dasycladacean Hexamita Nuclear\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>M</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n }\n\n else if (code.equals(\"Echinoderm Mitochondrial\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>M</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n }\n\n else if (code.equals(\"Euplotid Nuclear\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>M</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n }\n\n else if (code.equals(\"Bacterial\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>I L M V</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n\n }\n\n else if (code.equals(\"Alternative Yeast Nuclear\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>M S</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n\n }\n\n else if (code.equals(\"Ascidian Mitochondrial\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>M</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n\n }\n\n else if (code.equals(\"Flatworm Mitochondrial\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>M</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n\n }\n\n else\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>M</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n\n }\n\n if (unknownStatus == 1)\n key += (\"<BR>Unknown codon: <TT><FONT COLOR=#ff6633><B>u</B></FONT><BR></TT>\");\n\n\n return (key + \"<HR>\");\n\n}", "private String createTypeKey(int type, String key) {\r\n\t\treturn type + \"-\" + key;\r\n\t}", "public String getBuildKey() {\n StringWriter sw = new StringWriter();\n sw.append(\"facetrequest(\").append(\"query(\").append(stringQuery);\n sw.append(\"), \");\n writeGroupKey(sw);\n sw.append(\")\");\n return sw.toString();\n }", "public StrColumn getRange1BegAuthSeqId() {\n return delegate.getColumn(\"range_1_beg_auth_seq_id\", DelegatingStrColumn::new);\n }", "public StrColumn getRange1BegAuthAtomId() {\n return delegate.getColumn(\"range_1_beg_auth_atom_id\", DelegatingStrColumn::new);\n }", "private String calcIndexName(NamePool pool, \n String fingerName,\n List definitions,\n Configuration config) \n {\n StringBuffer sbuf = new StringBuffer();\n sbuf.append(\"key|\" + fingerName);\n for (int k = 0; k < definitions.size(); k++) \n {\n KeyDefinition def = (KeyDefinition)definitions.get(k);\n \n // Capture the match pattern.\n String matchStr = def.getMatch().toString();\n sbuf.append(\"|\" + Long.toString(Hash64.hash(matchStr), 16));\n \n // Capture the 'use' expression\n if (def.getUse() instanceof Expression) \n {\n // Saxon likes to dump debug stuff to a PrintStream, and we need to\n // capture to a buffer.\n //\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n PrintStream ps = new PrintStream(bytes);\n \n ((Expression)def.getUse()).display(10, ps, config);\n ps.flush();\n String useStr = bytes.toString();\n sbuf.append(\"|\" + Long.toString(Hash64.hash(useStr), 16));\n }\n else\n sbuf.append(\"|non-exp\");\n } // for k\n \n return sbuf.toString();\n }", "public StrColumn getRange2BegAuthSeqId() {\n return delegate.getColumn(\"range_2_beg_auth_seq_id\", DelegatingStrColumn::new);\n }", "@Override\n public String tagKey(String key) {\n String conventionKey = NamingConvention.snakeCase.tagKey(key);\n\n String sanitized = tagKeyChars.matcher(conventionKey).replaceAll(SEPARATOR);\n if (!Character.isLetter(sanitized.charAt(0))) {\n sanitized = \"m_\" + sanitized;\n }\n return sanitized;\n }", "private String getStringKey(long rawKey) {\n int cardinality = _cardinalities[0];\n StringBuilder groupKeyBuilder = new StringBuilder(_dictionaries[0].getStringValue((int) (rawKey % cardinality)));\n rawKey /= cardinality;\n for (int i = 1; i < _numGroupByExpressions; i++) {\n groupKeyBuilder.append(GroupKeyGenerator.DELIMITER);\n cardinality = _cardinalities[i];\n groupKeyBuilder.append(_dictionaries[i].getStringValue((int) (rawKey % cardinality)));\n rawKey /= cardinality;\n }\n return groupKeyBuilder.toString();\n }", "public static String generateEntityKey(String projectID,String entityCategoryID,String entityID)\n {\n if(StringUtils.isEmpty(projectID) || StringUtils.isEmpty(entityCategoryID) || \n StringUtils.isEmpty(entityID)) return null;\n \n StringBuilder sb=new StringBuilder();\n sb.append(\"[\")\n .append(projectID.trim()).append(\"|\")\n .append(entityCategoryID.trim()).append(\"|\")\n .append(entityID.trim()).append(\"]\");\n \n return sb.toString(); \n }", "public StrColumn getRange2BegAuthAtomId() {\n return delegate.getColumn(\"range_2_beg_auth_atom_id\", DelegatingStrColumn::new);\n }", "KeyGroupRange getKeyGroupRange();", "private String range(double and_load_factor) {\n\t\tStringBuilder s = new StringBuilder();\n\n\t\t// begin query construction (range query is always an OR)\n\t\ts.append(\"[r,|,\");\n\n\t\t// choose number of attributes to involve in the query (use zipf(num_attribute))\n\t\tint attr_id = this.zipf_rng_att.next();\n\n\t\t//a range query from [bin_0, ..., bin_high]\n\t\tint first_bin = -1;\n\t\tint second_bin = -1;\n\t\twhile (first_bin == second_bin) {\n\t\t\tfirst_bin = this.rank_bin_map[attr_id][zipf_rng_bin.next()];\n\t\t\tsecond_bin = this.rank_bin_map[attr_id][zipf_rng_bin.next()];;\n\t\t}\n\t\tfirst_bin += (attr_id) * this.cardinality;\n\t\tsecond_bin += (attr_id) * this.cardinality;\n\n\t\tif (first_bin > second_bin) {\n\t\t\ts.append(second_bin + \",\" + first_bin + \"]\");\n\t\t}\n\t\telse {\n\t\t\ts.append(first_bin + \",\" + second_bin + \"]\");\n\t\t}\n\n\n\n\t\t//update stats\n\t\tthis.num_bins += (second_bin - first_bin + 1);\n\t\tthis.num_or_ops += (second_bin - first_bin);\n\n\t\t//update stats\n\t\tthis.num_range_queries++;\n\t\tthis.num_attributes++;\n\t\treturn s.toString();\n\t}", "public String buildKey(String dashes, String target, char c){\n\t\tStringBuilder key = new StringBuilder();\n\t\tfor(int i = 0; i<dashes.length(); i++){\n\t\t\tif(target.charAt(i)==c){\n\t\t\t\tkey.append(c);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tkey.append(dashes.charAt(i));\n\t\t\t}\n\t\t}\n\t\treturn key.toString();\n\t}", "public String getKey() {\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tif (getLineNo() != null) {\r\n\t\t\tbuilder.append(getLineNo());\r\n\t\t} else if (this.getEntityId() != null) {\r\n\t\t\tbuilder.append(getEntityId());\r\n\t\t}\r\n\t\treturn builder.toString();\r\n\t}", "@Override\n\tpublic String getKey() {\n\t\treturn id+\"\";\n\t}", "private static String buildParamsId(List<String> params){\n return String.join(\"#\", params);\n }", "private final static String getKey( Integer id ) {\n\t\treturn \"\" + id ;\n\t}", "String getLongNameKey();", "private String getDocumentoKey(PreDocumentoEntrata preDoc) {\n\t\t\n\t\treturn (preDoc.getStrutturaAmministrativoContabile()!=null?preDoc.getStrutturaAmministrativoContabile().getUid() :\"null\") + \" \" \n\t\t\t\t+ (preDoc.getCausaleEntrata()!=null?preDoc.getCausaleEntrata().getUid():\"null\") + \" \" \n\t\t\t\t//+ (preDoc.getContoTesoreria()!=null?preDoc.getContoTesoreria().getUid():\"null\") + \" \" \n\t\t\t\t+ (preDoc.getPeriodoCompetenza()!=null?preDoc.getPeriodoCompetenza():\"null\") + \" \"\n\t\t\t\t+ (preDoc.getSoggetto()!=null?preDoc.getSoggetto().getUid():\"null\");\n\t}", "String getBeginRange();", "static String makeKey(String id,\n String for_,\n String attrname,\n String attrtype) {\n return format(KEY_FMT, id, for_, attrname, attrtype);\n }", "private String getHashKey(ApiRequestMessage requestMessage) {\n try {\n URL url = new URL(requestMessage.getUrlTemplate());\n //use the domain as the key\n return url.getHost();\n } catch (MalformedURLException e) {\n //ignore url parse error\n }\n return \"unknown\";\n }", "private String getKey(int[] arr) {\n StringBuilder sb = new StringBuilder();\n for(int a : arr) {\n sb.append(String.valueOf(a));\n }\n\n return sb.toString();\n }", "protected String createUniquePKIndexString(DbEntity entity) {\n List pk = entity.getPrimaryKey();\n\n if (pk == null || pk.size() == 0) {\n throw new CayenneRuntimeException(\n \"Entity '\" + entity.getName() + \"' has no PK defined.\");\n }\n\n StringBuffer buffer = new StringBuffer();\n\n // compound PK doesn't work well with UNIQUE index...\n // create a regular one in this case\n buffer\n .append(pk.size() == 1 ? \"CREATE UNIQUE INDEX \" : \"CREATE INDEX \")\n .append(entity.getName())\n .append(\" (\");\n\n Iterator it = pk.iterator();\n\n // at this point we know that there is at least on PK column\n DbAttribute firstColumn = (DbAttribute) it.next();\n buffer.append(firstColumn.getName());\n\n while (it.hasNext()) {\n DbAttribute column = (DbAttribute) it.next();\n buffer.append(\", \").append(column.getName());\n }\n buffer.append(\")\");\n return buffer.toString();\n }", "@Override\n\tpublic String getMapKey()\n\t{\n\t\tsbTemp.delete(0, sbTemp.length());\n\t\tsbTemp.append(areaCell.iCityID);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iAreatype);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iAreaID);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iECI);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iTime);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iInterface);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.kpiSet);\n\t\treturn sbTemp.toString();\n\t}", "private String getSubDocumentoKey(PreDocumentoEntrata preDoc) {\n\t\t\n\t\treturn (preDoc.getCapitoloEntrataGestione()!=null?preDoc.getCapitoloEntrataGestione().getUid() :\"null\") + \" \" \n\t\t\t\t+ (preDoc.getAccertamento()!=null?preDoc.getAccertamento().getUid():\"null\") + \" \" \n\t\t\t\t+ (preDoc.getSubAccertamento()!=null?preDoc.getSubAccertamento().getUid():\"null\") + \" \"\n\t\t\t\t+ (preDoc.getProvvisorioDiCassa() !=null?preDoc.getProvvisorioDiCassa().getUid() :\"null\") + \" \";\n\t}", "public StrColumn getRange2BegLabelAtomId() {\n return delegate.getColumn(\"range_2_beg_label_atom_id\", DelegatingStrColumn::new);\n }", "public StrColumn getRangeId1() {\n return delegate.getColumn(\"range_id_1\", DelegatingStrColumn::new);\n }", "public StrColumn getRange1EndAuthSeqId() {\n return delegate.getColumn(\"range_1_end_auth_seq_id\", DelegatingStrColumn::new);\n }", "private static String getCacheKey(String url, int maxWidth, int maxHeight,\n\t\t\tint options) {\n\t\treturn new StringBuilder(url.length() + 12).append(\"#W\")\n\t\t\t\t.append(maxWidth).append(\"#H\").append(maxHeight).append(\"#O\")\n\t\t\t\t.append(options).append(url).toString();\n\t}", "public static String buildCacheKey(String... keyParts) {\n // Ignore blank keyPart\n String joinedKeyStr =\n Stream.of(keyParts)\n .filter(s -> !StringUtils.isBlank(s))\n .collect(Collectors.joining(\",\"));\n\n return Base64.getEncoder().encodeToString(joinedKeyStr.getBytes());\n }", "private String getKey() {\r\n if (key == null) {\r\n key = getURI();\r\n }\r\n return key;\r\n }", "private String formTransactionKey(String transaction){\n\t\tString transKey = \"\";\n\t\tString[] transKeyValues = transaction.split(\" \");\n\t\tfor(String parts : transKeyValues){\n\t\t\tif(parts.matches(\".*\\\\d+.*\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttransKey += parts;\n\t\t\t\tString existingKey = isKeyAlreadyFormed(transKey);\n\t\t\t\tif(!existingKey.equals(\"\"))\n\t\t\t\t\treturn existingKey;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn transKey;\n\t}", "private String createKey(OwObject object_p, OwPluginEntry pluginEntry_p) throws Exception\r\n {\r\n String objectId = object_p.getDMSID();\r\n String key = objectId + \"_\" + pluginEntry_p.getIndex();\r\n return key;\r\n }", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "private void addRangeIntegers() {\r\n ent_2_i.put(\"< 0\", -1); ent_2_i.put(\"== 0\", 0); ent_2_i.put(\"== 1\", 1); ent_2_i.put(\"< 10\", 10);\r\n ent_2_i.put(\"< 100\", 100); ent_2_i.put(\"< 1K\", 1000); ent_2_i.put(\"< 10K\", 10000); ent_2_i.put(\"< 100K\", 100000);\r\n ent_2_i.put(\"> 100K\", 1000000);\r\n }", "public java.lang.String getRange() {\n\t\treturn _range;\n\t}", "private void buildBoundary(Set<String> dict) {\n for (String s : dict) {\n int len = s.length();\n min = Math.min(min, len);\n max = Math.max(max, len);\n }\n }", "public String toString() {\n/* 387 */ if (this.toString == null) {\n/* 388 */ StrBuilder buf = new StrBuilder(32);\n/* 389 */ buf.append(\"Range[\");\n/* 390 */ buf.append(this.min);\n/* 391 */ buf.append(',');\n/* 392 */ buf.append(this.max);\n/* 393 */ buf.append(']');\n/* 394 */ this.toString = buf.toString();\n/* */ } \n/* 396 */ return this.toString;\n/* */ }", "private String getStringKey(IntArray rawKey) {\n StringBuilder groupKeyBuilder = new StringBuilder(_dictionaries[0].getStringValue(rawKey._elements[0]));\n for (int i = 1; i < _numGroupByExpressions; i++) {\n groupKeyBuilder.append(GroupKeyGenerator.DELIMITER);\n groupKeyBuilder.append(_dictionaries[i].getStringValue(rawKey._elements[i]));\n }\n return groupKeyBuilder.toString();\n }", "String getShortNameKey();", "public StrColumn getRangeId2() {\n return delegate.getColumn(\"range_id_2\", DelegatingStrColumn::new);\n }", "public String createCacheKey() {\n return \"organization.\" + userEmail;\n }", "public String getRange() {\n return this.range;\n }", "public StrColumn getRange1EndAuthAtomId() {\n return delegate.getColumn(\"range_1_end_auth_atom_id\", DelegatingStrColumn::new);\n }", "private String getKey (String keyBase, Object field)\n\t{\n\t\treturn ((field == null) ? keyBase : (keyBase + \"_related\"));\t//NOI18N\n\t}", "public KeyRange(String start,\n boolean startInclusive,\n String end,\n boolean endInclusive) {\n if (start == null && end == null) {\n throw new IllegalArgumentException\n (\"start or end must be non-null\");\n }\n\n if (start != null &&\n end != null &&\n ((start.compareTo(end) > 0) ||\n ((start.compareTo(end) == 0) &&\n !(startInclusive && endInclusive)))) {\n throw new IllegalArgumentException\n (\"start key must be less than the end key. (\" + start + \",\" +\n end + \")\");\n }\n\n this.start = start;\n this.startInclusive = startInclusive;\n this.end = end;\n this.endInclusive = endInclusive;\n }", "private String calulateHash() {\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(creator) +\r\n\t\t\t\t\tname+description+begin+end+end_subscription+\r\n\t\t\t\t\tmin_capacity+max_capacity+ date_creation_transaction.getTime()\r\n\t\t\t\t\t);\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(subscriber) + id_event);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "private String generateRefKey(int n) {\n String AlphaNumericString = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n + \"0123456789\"\n + \"abcdefghijklmnopqrstuvxyz\";\n\n // create StringBuffer size of AlphaNumericString\n StringBuilder sb = new StringBuilder(n);\n\n for (int i = 0; i < n; i++) {\n\n // generate a random number between\n // 0 to AlphaNumericString variable length\n int index\n = (int)(AlphaNumericString.length()\n * Math.random());\n\n // add Character one by one in end of sb\n sb.append(AlphaNumericString\n .charAt(index));\n }\n\n return sb.toString();\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn key + \"\";\r\n\t}", "private void rebuildKey() {\r\n\r\n final StringBuffer sb = new StringBuffer();\r\n\r\n sb.append(getClassField().getCanonicalName());\r\n for (final Object k : this.keyPartList) {\r\n sb.append(k.toString()).append('|');\r\n }\r\n this.key = sb.toString();\r\n }", "String key();", "@Override\n public int hashCode() {\n return Objects.hash(rangeIndex);\n }", "private String genFeedURL(String startDate, String endDate) {\n\t\treturn String.format(\"%sfeed?start_date=%s&end_date=%s&detailed=false&api_key=%s\", \n\t\t\t\tconfig.getApiBaseURL(), startDate, endDate, config.getAPIKey());\n\t}", "public String getMinKey();", "protected String getLocaleSpecificKey(String localeKey) {\n return CONTENT_KEY.concat(\"-\").concat(localeKey);\n }", "@Override\n public String toString() {\n return String.valueOf(key);\n }", "public String formatPrimaryKey()\n {\n StringBuilder sb = new StringBuilder();\n AcFormatter f = new AcFormatter();\n sb.append(f.formatAny(getHashKey()));\n return sb.toString();\n }", "java.lang.String getDestRange();", "private String webId(String web) {\n return \" and \"+\r\n \" p.email_key = \"+getEMailKeyStr(web)+\" and \"+\r\n \" pt.email_key = \"+getEMailKeyStr(web)+\" and \"+\r\n \" ct.email_key = \"+getEMailKeyStr(web)+\" \"\r\n ;\r\n }", "private String getCombinedKey(final ProductAssociation productAssociation) {\n\t\t\n\t\treturn new StringBuilder()\n\t\t\t.append(productAssociation.getSourceProduct().getCode())\n\t\t\t.append(productAssociation.getTargetProduct().getCode())\n\t\t\t.append(productAssociation.getAssociationType())\n\t\t\t.append(productAssociation.getCatalog().getCode())\n\t\t\t.toString();\n\t}", "protected String generateReviewID() {\n Random r = new Random();\n String restID;\n do {\n int randomIDnum = r.nextInt(999999999) + 1;\n restID = String.valueOf(randomIDnum);\n } while (this.reviewMap.containsKey(restID));\n return restID;\n }", "public String createKey(String type) {\n int i = 0;\n for(i=0; i<EnumFactory.numberOfTypes; i++) {\n if (type.equals(EnumFactory.typeStrings[i])) {\n break;\n }\n }\n countKeys[i]++;\n String key = String.format(\"%s$%d\", EnumFactory.typeStrings[i],countKeys[i]);\n return key;\n }", "public String getKey() {\n\t\tString t = doc.get(\"key\");\n\n\t\tif (t == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\treturn t;\n\t\t}\n\t}", "private static String generateStringFromEntry(Entry<String, Long> entry) {\n\n\t\treturn entry.getKey() + WORD_FREQUENCY_DELIMITER + entry.getValue();\n\t}", "private String generateKey(String subject, String courseNumber) {\r\n return getCourseHelper().joinStringsByDelimiter('=', subject, courseNumber);\r\n }", "protected String getKey(String baseKey){\n \treturn getKey(baseKey, id);\n }", "@Override\n\tprotected String getSurroundingKeys(char key) {\n\t\tif((key >= 'a' && key <= 'z') || (key >= 'A' && key <= 'Z')) {\n\t\t\tif(Character.isLowerCase(key))\n\t\t\t\treturn surroundingKeys[key - 'a'];\n\t\t\telse\n\t\t\t\treturn surroundingKeys[Character.toLowerCase(key) - 'a'];\n\t\t}\n\n\t\treturn \"\" + key;\n\t}", "@Override\n public String toString(){\n return key;\n }", "private String getStringKey(int rawKey) {\n // Specialize single group-by column case\n if (_numGroupByExpressions == 1) {\n return _dictionaries[0].getStringValue(rawKey);\n } else {\n int cardinality = _cardinalities[0];\n StringBuilder groupKeyBuilder = new StringBuilder(_dictionaries[0].getStringValue(rawKey % cardinality));\n rawKey /= cardinality;\n for (int i = 1; i < _numGroupByExpressions; i++) {\n groupKeyBuilder.append(GroupKeyGenerator.DELIMITER);\n cardinality = _cardinalities[i];\n groupKeyBuilder.append(_dictionaries[i].getStringValue(rawKey % cardinality));\n rawKey /= cardinality;\n }\n return groupKeyBuilder.toString();\n }\n }", "protected abstract SingleKeyVersionDataExtractor<DATA> generateDataKeyAsString () ;", "@Override\n public String getString(String key) {\n return getStringFromBundle(key, BASE_STRING) + \" \" + random.nextInt(RANDOM_INT_BOUND);\n }" ]
[ "0.5885076", "0.5590412", "0.5459066", "0.531882", "0.51139086", "0.5074854", "0.5072928", "0.5064908", "0.50582206", "0.50474125", "0.50435007", "0.50288457", "0.5011109", "0.4952841", "0.49462563", "0.49275404", "0.49162227", "0.49009356", "0.4892764", "0.4891331", "0.48899433", "0.4883854", "0.48717564", "0.48705772", "0.4863474", "0.484597", "0.4835013", "0.4821285", "0.48074514", "0.4800114", "0.47934297", "0.47906253", "0.4778326", "0.4755271", "0.47537714", "0.4749008", "0.4738503", "0.47362635", "0.47352642", "0.4730102", "0.47298792", "0.47289333", "0.47221145", "0.4705243", "0.46947992", "0.46947992", "0.46947992", "0.46947992", "0.46947992", "0.46947992", "0.46945778", "0.46911386", "0.4666218", "0.46621937", "0.46565858", "0.46562108", "0.46534824", "0.46501324", "0.4648033", "0.46444884", "0.46396926", "0.46351328", "0.4627938", "0.46275517", "0.46275517", "0.46275517", "0.46275517", "0.46275517", "0.46275517", "0.46275517", "0.46275517", "0.46275517", "0.46275517", "0.46275517", "0.46275517", "0.46275517", "0.46192", "0.46133816", "0.46091753", "0.46019068", "0.45999724", "0.45992765", "0.45977947", "0.45968017", "0.459541", "0.45924398", "0.4592362", "0.45856225", "0.45807627", "0.45639417", "0.45638946", "0.4561951", "0.4558142", "0.45566604", "0.45467174", "0.45432302", "0.45423758", "0.4535579", "0.45329562", "0.4530487" ]
0.7756368
0
Creates a new instance.
public DefaultJobSelectionStrategy() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Instance createInstance();", "public void create(){}", "public Instance() {\n }", "private Instantiation(){}", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "void create(T instance) throws IOException;", "public void create() {\n\t\t\n\t}", "Reproducible newInstance();", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public T newInstance();", "public void makeInstance() {\n\t\t// Create the attributes, class and text\n\t\tFastVector fvNominalVal = new FastVector(2);\n\t\tfvNominalVal.addElement(\"ad1\");\n\t\tfvNominalVal.addElement(\"ad2\");\n\t\tAttribute attribute1 = new Attribute(\"class\", fvNominalVal);\n\t\tAttribute attribute2 = new Attribute(\"text\",(FastVector) null);\n\t\t// Create list of instances with one element\n\t\tFastVector fvWekaAttributes = new FastVector(2);\n\t\tfvWekaAttributes.addElement(attribute1);\n\t\tfvWekaAttributes.addElement(attribute2);\n\t\tinstances = new Instances(\"Test relation\", fvWekaAttributes, 1); \n\t\t// Set class index\n\t\tinstances.setClassIndex(0);\n\t\t// Create and add the instance\n\t\tInstance instance = new Instance(2);\n\t\tinstance.setValue(attribute2, text);\n\t\t// Another way to do it:\n\t\t// instance.setValue((Attribute)fvWekaAttributes.elementAt(1), text);\n\t\tinstances.add(instance);\n \t\tSystem.out.println(\"===== Instance created with reference dataset =====\");\n\t\tSystem.out.println(instances);\n\t}", "@Override\n\tpublic void create() {\n\n\t}", "T create();", "T create();", "@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }", "public CMObject newInstance();", "@Override\n\tpublic void create() {\n\t\t\n\t}", "@Override\n\tpublic void create () {\n\n\t}", "void createNewInstance(String filename)\n {\n iIncomingLobsFactory = new incomingLobsFactory();\n iIncomingLobsFactory.setPackageName(\"com.loadSample\");\n \n // include schemaLocation hint for validation\n iIncomingLobsFactory.setXSDFileName(\"LoadSample.xsd\");\n \n // encoding for output document\n iIncomingLobsFactory.setEncoding(\"UTF8\");\n \n // encoding tag for xml declaration\n iIncomingLobsFactory.setEncodingTag(\"UTF-8\");\n \n // Create the root element in the document using the specified root element name\n iIncomingLobs = (incomingLobs) iIncomingLobsFactory.createRoot(\"incomingLobs\");\n createincomingLobs();\n \n iIncomingLobsFactory.save(filename);\n }", "private synchronized static void createInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tinstance = new Casino();\r\n\t\t}\r\n\t}", "public abstract void create();", "InstanceModel createInstanceOfInstanceModel();", "public static void createInstance()\n {\n if (instance == null) {\n // Create the instance\n instance = new SalesOrderDataSingleton();\n }\n }", "public Instance() {\n super(Routing.NAMESPACE, \"instance\");\n }", "@Override\r\n\tpublic void create() {\n\r\n\t}", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "public Command createInstance() {\n\t\t\n\t\tif(name == \"Direction\")\n\t\t\treturn new Direction();\n\t\t\n\t\tif(name == \"Gear\")\n\t\t\treturn new Gear();\n\t\t\n\t\tif(name == \"Pause\")\n\t\t\treturn new Pause();\n\t\t\n\t\treturn null;\n\t\t\n\t}", "private static void makeInstance(){\n\n if(settingsFile==null){\n settingsFile = new MetadataFile(SETTINGS_FILE_PATH);\n }\n\n if(!settingsFile.exists()){\n settingsFile.create();\n }\n\n if(tagListeners==null){\n tagListeners= new HashMap<>();\n }\n\n }", "public Factory() {\n\t\tsuper();\n\t}", "private synchronized static void createInstance() {\n if (INSTANCE == null) { \n INSTANCE = new DataConnection();\n }\n }", "@SuppressWarnings(\"unchecked\")\n public T newInstance()\n throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n if (constructor_ == null) {\n constructor_ = getRawClass().getConstructor();\n }\n\n return (T)constructor_.newInstance();\n }", "public static void createInstance(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\tBase.createInstance(model, RDFS_CLASS, instanceResource);\r\n\t}", "@Override\r\n\tpublic CMObject newInstance()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn this.getClass().getDeclaredConstructor().newInstance();\r\n\t\t}\r\n\t\tcatch(final Exception e)\r\n\t\t{\r\n\t\t\tLog.errOut(ID(),e);\r\n\t\t}\r\n\t\treturn new StdBehavior();\r\n\t}", "public abstract boolean create(T newInstance);", "private static synchronized void createInstance() {\r\n\t\tif (instance == null)\r\n\t\t\tinstance = new LOCFacade();\r\n\t}", "public static QuinzicalModel createInstance() throws Exception {\n\t\tif (instance == null) {\n\t\t\tinstance = new QuinzicalModel();\n\t\t}\n\t\treturn instance;\n\t}", "@Override\n\tpublic LightTank create() {\n\t\treturn new LightTank(GameContext.getGameContext());\n\t}", "<T> T newInstance(URI description) throws EnvironmentException;", "public Idea create() {\n \t\t\tIdea idea = new Idea();\n \n \t\t\treturn idea;\n \t\t}", "public static void createInstance(Model model, Resource instanceResource) {\r\n\t\tBase.createInstance(model, RDFS_CLASS, instanceResource);\r\n\t}", "public Taginstance() {\n\t\tthis(\"taginstance\", null);\n\t}", "@Override\n\tpublic ModIndexedInstance createNewInstance() {\n\t\tModIndexedInstance newInst = new ModIndexedInstance(); // create the new instance\n\t\tnewInst.setRegComp(this); // set component type of new instance\n\t\taddInstanceOf(newInst); // add instance to list for this comp\n\t\treturn newInst;\n\t}", "public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {}", "public Factory() {\n this(getInternalClient());\n }", "For createFor();", "public ObjectFactory() {\n super(grammarInfo);\n }", "public Game getNewInstance() {\n try {\n return classObj.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(\"Error generating \" + this + \" game\");\n }\n }", "T create() throws PersistException;", "public static Builder create() {\n\t\treturn new Builder();\n\t}", "public static Builder create() {\n\t\treturn new Builder();\n\t}", "public ApplicationCreator() {\n }", "@Override\r\n public void instantiate() {\r\n }", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "public SingleRequest<?> create() {\n return new SingleRequest<>();\n }", "public ObjectFactory() {\n\t}", "public ObjectFactory() {\r\n\t}", "public Open() {\n //creates a new open instance\n }", "protected abstract void construct();", "public static StaticFactoryInsteadOfConstructors newInstance() {\n return new StaticFactoryInsteadOfConstructors();\n }", "@Override\r\n\tpublic ItemInstance createItemInstance() {\n\t\treturn new HpInstance();\r\n\t}", "private static void createInstance() {\n if (mApiInterface == null) {\n synchronized(APIClient.class) {\n if (mApiInterface == null) {\n mApiInterface = buildApiClient();\n }\n }\n }\n }", "Klassenstufe createKlassenstufe();", "Snapshot create();", "public static Book createEntity() {\n Book book = new Book()\n .idBook(DEFAULT_ID_BOOK)\n .isbn(DEFAULT_ISBN)\n .title(DEFAULT_TITLE)\n .author(DEFAULT_AUTHOR)\n .year(DEFAULT_YEAR)\n .publisher(DEFAULT_PUBLISHER)\n .url_s(DEFAULT_URL_S)\n .url_m(DEFAULT_URL_M)\n .url_l(DEFAULT_URL_L);\n return book;\n }", "public static synchronized void constructInstance()\n {\n SmartDashboard.putBoolean( TelemetryNames.Elbow.status, false );\n\n if ( ourInstance != null )\n {\n throw new IllegalStateException( myName + \" Already Constructed\" );\n }\n ourInstance = new ElbowSubsystem();\n\n SmartDashboard.putBoolean( TelemetryNames.Elbow.status, true );\n }", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "public Object createNew(String typename, Object... args) \n\t\tthrows \tIllegalAccessException, \n\t\t\tInstantiationException, \n\t\t\tClassNotFoundException,\n\t\t\tNoSuchMethodException,\n\t\t\tInvocationTargetException \n\t{\n\t\tswitch(args.length) \n\t\t{\n\t\tcase 1 : return Class.forName(typename).getConstructor(args[0].getClass()).newInstance(args[0]);\n\t\tcase 2 : return Class.forName(typename).getConstructor(args[0].getClass(), args[1].getClass()).\n\t\t\tnewInstance(args[0], args[1]);\n\t\t}\n\t\treturn null;\n\t}", "public static IPCGCallDetailCreator instance()\r\n {\r\n if (instance == null)\r\n {\r\n instance = new IPCGCallDetailCreator();\r\n }\r\n return instance;\r\n }", "public Object buildNewInstance() throws DescriptorException {\n if (this.isUsingDefaultConstructor()) {\n return this.buildNewInstanceUsingDefaultConstructor();\n } else {\n return this.buildNewInstanceUsingFactory();\n }\n }", "void create(T t);", "void create( State state );", "public Activator() {\r\n\t}", "OBJECT createOBJECT();", "public Produto() {}", "public T safeNewInstance() {\n try {\n return newInstance();\n } catch (NoSuchMethodException e) {\n throw new IllegalArgumentException(e);\n } catch (IllegalAccessException e) {\n throw new IllegalArgumentException(e);\n } catch (InvocationTargetException e) {\n throw new IllegalArgumentException(e);\n } catch (InstantiationException e) {\n throw new IllegalArgumentException(e);\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic AnalysisGraph createNewInstance() {\n\t\tAnalysisGraph graph = new AnalysisGraph();\n\t\tgraph.currentIndex = currentIndex;\n\t\t\n\t\tgraph.nodes = (HashMap<String, Node>) nodes.clone();\n\t\tgraph.nodeList = (ArrayList<Node>)((ArrayList<Node>) nodeList).clone();\n\t\tgraph.links = (ArrayList<Link>)((ArrayList<Link>) links).clone();\n\t\treturn graph;\n\t}", "DynamicInstance createDynamicInstance();", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }" ]
[ "0.7834167", "0.72893584", "0.70771503", "0.7048765", "0.70209944", "0.6839274", "0.67782235", "0.6770133", "0.67429745", "0.6701039", "0.6690158", "0.6630354", "0.66046286", "0.6600776", "0.6600776", "0.6597608", "0.6592152", "0.6564594", "0.65268713", "0.652679", "0.6475239", "0.6442598", "0.63414943", "0.63365746", "0.63303816", "0.63249475", "0.627689", "0.627521", "0.6227869", "0.620804", "0.6167403", "0.6164787", "0.610737", "0.6102229", "0.60939527", "0.60640883", "0.60597515", "0.60330635", "0.60064733", "0.600185", "0.59933734", "0.59891814", "0.5978862", "0.5975761", "0.59642875", "0.59642875", "0.59642875", "0.595006", "0.5948986", "0.5939949", "0.5935609", "0.59320545", "0.5930863", "0.5930863", "0.5930808", "0.59303784", "0.59288776", "0.59219015", "0.5912657", "0.5900076", "0.58830214", "0.5879637", "0.5878685", "0.58779675", "0.58684635", "0.5859659", "0.5852349", "0.5844357", "0.5844119", "0.58357304", "0.582402", "0.581462", "0.58129567", "0.5803098", "0.58003926", "0.5787434", "0.5786469", "0.57835597", "0.578337", "0.5780014", "0.57761306", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006" ]
0.0
-1
Creates a new instance of BookLoanPK with the specified values.
public BookLoanPK(int customerId, String isbn, int bookLoanId) { this.customerId = customerId; this.isbn = isbn; this.bookLoanId = bookLoanId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Loan(int loanId, Book bOoK, Member mEmBeR, Date dueDate) { ////changed 'BoOk' to 'book' and changed 'MeMbEr' to 'member' and DuE_dAtE to dueDate\r\n\t\tthis.LoAn_Id = loanId; //changed 'LoAn_Id' to 'loanId'\r\n\t\tthis.BoOk = book; //changed 'BoOk' to 'book'\r\n\t\tthis.MeMbEr = member; //changed 'MeMbEr' to 'member'\r\n\t\tthis.DaTe = dueDate; //changed DuE_dAtE to dueDate\r\n\t\tthis.state = loanState.current; //changed 'StAtE' to 'state' and lOaN_sTaTe.CURRENT to loanState.current\r\n\r\n\t}", "public Loan(int loanId, book book, member member, Date dueDate) { // class name should be start with upper case.\r\n\t\tthis.id = loanId; //chage from ID to id,naming convention\r\n\t\tthis.b = book;\t//chage from B to b,naming convention\r\n\t\tthis.m = member; //chage from M to m,naming convention\r\n\t\tthis.d = dueDate; //chage from D to d,naming convention\r\n\t\tthis.state = LoanState.CURRENT;\t//Changes from LOAN_STATE to LoanState, enum naming convention\r\n\t}", "public BookRecord(Integer id, Integer availableqty, Integer pendingqty, String name, Integer medium, Integer grade, String authorname, Integer noofpages, Integer status, BigDecimal price) {\n super(Book.BOOK);\n\n set(0, id);\n set(1, availableqty);\n set(2, pendingqty);\n set(3, name);\n set(4, medium);\n set(5, grade);\n set(6, authorname);\n set(7, noofpages);\n set(8, status);\n set(9, price);\n }", "private ReviewRecord newInstanceWithPrimaryKey(String customerCode, Integer bookId) {\n\t\tReviewRecord review = new ReviewRecord ();\n review.setCustomerCode(customerCode); \n review.setBookId(bookId); \n\t\treturn review;\n\t}", "public CarWashConfigPK() {\n }", "private Approche(String identifiantRunway, ArrayList<LatitudeLongitude> balises) {\n super(\"APPR\", identifiantRunway, balises);\n }", "public BookRecord() {\n super(Book.BOOK);\n }", "public BookingInfo() {\n }", "public PaymentRecordKey() {\n super();\n }", "PK create(T newInstance);", "public SHrsLoan(SDbLoan loan) {\n moLoan = loan;\n maPayrollReceiptEarnings = new ArrayList<>();\n maPayrollReceiptDeductions = new ArrayList<>();\n }", "private Book createBook() {\n Book book = null;\n\n try {\n\n //determine if fiction or non-fiction\n if (radFiction.isSelected()) {\n //fiction book\n book = new Fiction(Integer.parseInt(tfBookID.getText()));\n\n } else if (radNonFiction.isSelected()) {\n //non-fiction book\n book = new NonFiction(Integer.parseInt(tfBookID.getText()));\n\n } else {\n driver.errorMessageNormal(\"Please selecte fiction or non-fiction.\");\n }\n } catch (NumberFormatException nfe) {\n driver.errorMessageNormal(\"Please enter numbers only the Borrower ID and Book ID fields.\");\n }\n return book;\n }", "public Loan(int s) {\r\n\t\tstockId = s;\r\n\t\tloanId = nextLoanId;\r\n\t\tnextLoanId++;\r\n\t\tloanFine = new Fine();\t\t\r\n\t\tloanDate = LocalDate.now();\r\n\t}", "public EnvioPersonaPK() {\r\n }", "public Loan(){\n\t\tthis(\"\", 0, 0, 0, 0);\n\t\tstart_date = null;\n\t}", "public Borrower(String fName, String lName, String lNumber, int numberOfBooks, \r\n String street, String town, String postcode)\r\n {\r\n firstName = fName;\r\n lastName = lName;\r\n libraryNumber = lNumber;\r\n noOfBooks = numberOfBooks; \r\n address = new Address(street, town, postcode);\r\n }", "Book createBook();", "public Bank(long bankleitzahl) {\n if (bankleitzahl < 0) {\n throw new IllegalArgumentException(\"Bankleitzahl kann nicht negativ sein.\");\n }\n this.bankleitzahl = bankleitzahl;\n this.kontoMap = new TreeMap<Long, Konto>();\n this.nextKontoNummer = MIN_KONTONUMMER;\n }", "public CoinsuperPair() {}", "public Book() {}", "public MarketplaceRatingPK(){\n\t}", "public PkBrp(){\n \t\n }", "public Bank(){\n this(\"Seneca@York\", 0);\n }", "@Override\n public void onCreate(SQLiteDatabase db) {\n String SQL_CREATE_BOOKS_TABLE = \"CREATE TABLE \" + TBOOKS\n + \"(\"\n + _IDB + \" INTEGER PRIMARY KEY AUTOINCREMENT, \"\n + LibraryEntry.COL_TITLE + \" TEXT_NOT_NULL, \"\n + LibraryEntry.COL_AUTHOR + \" TEXT, \"\n + LibraryEntry.COL_YEAR_PUBLISHED + \" INTEGER, \"\n + LibraryEntry.COL_STATUS + \" TEXT);\";\n // + LibraryEntry.COL_CHECKED_OUT + \" BOOLEAN;\";\n\n String SQL_CREATE_PYTHONISTAS_TABLE = \"CREATE TABLE \" + TPYTHONISTAS\n + \"(\"\n + _IDP + \" INTEGER PRIMARY KEY AUTOINCREMENT, \"\n + COL_F_NAME + \" TEXT_NOT_NULL, \"\n + LibraryEntry.COL_L_NAME + \" TEXT_NOT_NULL, \"\n + LibraryEntry.COL_PHONE + \" TEXT, \"\n + LibraryEntry.COL_EMAIL + \" TEXT);\";\n\n // Table generates a default loan_date from inside SQLite\n String SQL_CREATE_LOAN_TABLE = \"CREATE TABLE \" + TLOANED\n + \"(\"\n + _IDL + \" INTEGER PRIMARY KEY AUTOINCREMENT, \"\n + COL_TITLE_ID + \" INTEGER NOT NULL, \"\n + COL_NAME_ID + \" IMTEGER NOT NULL, \"\n + COL_LOAN_DATE + \" DATE NOT NULL default current_date, \"\n + COL_RETURN_DATE + \" DATE);\";\n\n\n db.execSQL(SQL_CREATE_BOOKS_TABLE);\n db.execSQL(SQL_CREATE_PYTHONISTAS_TABLE);\n db.execSQL(SQL_CREATE_LOAN_TABLE);\n }", "private BookContract() {}", "public BoletoPaymentRequest() {\n\n }", "public Book() {\n this.bookName = \"Five Point Someone\";\n this.bookAuthorName = \"Chetan Bhagat\";\n this.bookIsbnNumber = \"9788129104595\";\n\n }", "public Loan(double annualInterestRate, int numberOfYears, double loanAmount)\n {\n setAnnualInterestRate(annualInterestRate);\n setNumberOfYears(numberOfYears);\n setLoanAmount(loanAmount);\n loanDate = new Date();\n }", "public Loan() {\n this(2.5, 1, 1000);\n }", "public PIEBankPlatinumKey() {\n\tsuper();\n}", "FromValues createFromValues();", "public PIEBankPlatinumKey(java.lang.String argIdbankplatinum, int argOwner) {\n\tidbankplatinum = argIdbankplatinum;\n\towner = argOwner;\n}", "public VoucherPayment() {\r\n }", "public LoanItems(String title, int libraryID, boolean lent, int date) { // <2>\n this.title = title;\n this.libraryID = libraryID;\n this.lent = lent;\n this.date = date;\n }", "@Override\n public Libro createLibro(long isbn) {\n return libroPersistence.create(isbn);\n }", "public BookRecord(String NameOfTheBook, String NameofWriter, int isbnNumber, double booksCost) \r\n\r\n{ \r\n\r\nthis.NameOfTheBook = NameOfTheBook; \r\n\r\nthis.NameofWriter = NameofWriter; \r\n\r\nthis.isbnNumber = isbnNumber; \r\n\r\nthis.booksCost = booksCost; \r\n\r\n}", "public Loan(double annualInterestRate, int numberOfYears, double loanAmount) {\n this.annualInterestRate = annualInterestRate;\n this.numberOfYears = numberOfYears;\n this.loanAmount = loanAmount;\n loanDate = new java.util.Date();\n }", "public Payroll()\r\n\t{\r\n\t\t\r\n\t}", "public Borrower(String fName, String lName, String lNumber, \r\n String street, String town, String postcode)\r\n {\r\n firstName = fName;\r\n lastName = lName;\r\n libraryNumber = lNumber;\r\n noOfBooks = 1; \r\n address = new Address(street, town, postcode);\r\n }", "public Loyalty() {}", "public Booking(String inUName, String inCarNo, int inLotNo) {\r\n\t\t/**\r\n\t\t*\tGet the number of milliSeconds from the system time and set it to the java.sql.Date\r\n\t\t*\tobject to create a booking number and also to set the start time.\r\n\t\t*/\r\n\t\tlong dateTimeMillis = System.currentTimeMillis();\r\n\t\t/**\r\n\t\t*\tThis date is for generating String bookingNo using the date and time values\r\n\t\t*/\r\n\t\tjava.util.Date date = new java.util.Date(dateTimeMillis);\r\n\t\t/**\r\n\t\t*\tSet a serialized booking Number generated using the present date and time\r\n\t\t*\tThe format of this string is:\r\n\t\t*\tDayMonthYearHourMinuteSecond\r\n\t\t*/\r\n\t\tbookingNo = \"\" + (date.getDay() + 1) + (date.getMonth() + 1) + (date.getYear() + 1900) + date.getHours() + date.getMinutes() + date.getSeconds();\r\n\t\t/**\r\n\t\t*\tSet the values of these fields as passed in the arguments\r\n\t\t*/\r\n\t\tuName = inUName;\r\n\t\tcarNo = inCarNo;\r\n\t\tlotNo = inLotNo;\r\n\t\tcost = 0;\r\n\t\t/**\r\n\t\t*\tPass the current date in sql.Timestamp object.\r\n\t\t*/\r\n\t\tstartTime = new java.sql.Timestamp(date.getTime());\r\n\t\t/**\r\n\t\t*\tLet it be 0 initially and then update it at the time of checkout\r\n\t\t*/\r\n\t\tendTime = new java.sql.Timestamp(0);\r\n\t}", "public BankAccount() {\n this(12346, 5.00, \"Default Name\", \"Default Address\", \"default phone\");\n }", "public Loyalty(int l)\r\n\t{\r\n\t\tvalue = l;\r\n\t}", "private Borrower createBorrower() {\n Borrower bor = null;\n try {\n bor = new Borrower(Integer.parseInt(tfBorrowerID.getText()), driver);\n } catch (NumberFormatException nfe) {\n driver.errorMessageNormal(\"Please enter numbers only the Borrower ID and Book ID fields.\");\n }\n return bor;\n }", "public DomainPK()\n {\n }", "public com.huqiwen.demo.book.model.Books create(long bookId);", "@SuppressWarnings(\"unused\")\n private Booking() {\n }", "public Book() {\n\t\t// Default constructor\n\t}", "public static Book createEntity() {\n Book book = new Book()\n .idBook(DEFAULT_ID_BOOK)\n .isbn(DEFAULT_ISBN)\n .title(DEFAULT_TITLE)\n .author(DEFAULT_AUTHOR)\n .year(DEFAULT_YEAR)\n .publisher(DEFAULT_PUBLISHER)\n .url_s(DEFAULT_URL_S)\n .url_m(DEFAULT_URL_M)\n .url_l(DEFAULT_URL_L);\n return book;\n }", "private BookContract() {\n }", "private BookContract() {\n }", "public Booking() {\r\n\t\t/**\r\n\t\t*\tGet the number of milliSeconds from the system time and set it to the java.sql.Date\r\n\t\t*\tobject to create a booking number and also to set the start time.\r\n\t\t*/\r\n\t\tlong dateTimeMillis = System.currentTimeMillis();\r\n\t\t/**\r\n\t\t*\tThis date is for generating String bookingNo using the date and time values\r\n\t\t*/\r\n\t\tjava.util.Date date = new java.util.Date(dateTimeMillis);\r\n\t\t/**\r\n\t\t*\tPass the current date in sql.Timestamp object.\r\n\t\t*/\r\n\t\tstartTime = new java.sql.Timestamp(date.getTime());\r\n\t\t/**\r\n\t\t*\tLet it be 0 initially and then update it at the time of checkout\r\n\t\t*/\r\n\t\tendTime = new java.sql.Timestamp(0);\r\n\t}", "public BankAccountKey() {\n\tsuper();\n}", "public Book() {\n }", "public BookState() {\n this(\"AVAILABLE\",new GeoPoint(0,0),null);\n }", "public static Payout create(Map<String, Object> params) throws PayabbhiException {\n//\t\tSystem.out.println(toJSONString(params));\n\t\treturn request(Method.POST, urlFor(Payout.class), params, Payout.class);\n\t}", "public CheckpointRecord(List<Long> txNums) {\r\n\t\tthis.txNums = txNums;\r\n\t\t\r\n\t}", "public Book createBookOldway(String title, String description, String language, int numberOfPages) {\n\t\tBook newBook = new Book(title, description, language, numberOfPages);\n\t\treturn this.bRepo.save(newBook);\n\t}", "public Wallet() {\n total_bal = 10;\n }", "void newLoans(List<Loan> loans);", "public BookingBean() {\n }", "public void testNewBid(){\n\n Thing thing = new Thing(new User());\n User borrower = new User();\n\n Bid bid = null;\n try {\n bid = new Bid(thing, borrower, 800);\n }catch(Exception e){\n fail();\n }\n assertEquals(800, bid.getAmount());\n assertEquals(Bid.Per.FLAT, bid.getPer());\n assertEquals(\"8.00\", bid.valueOf());\n assertEquals(\"$8.00\", bid.toString());\n\n }", "private Bookmarks() {}", "public Kanban() {\r\n\t}", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "public @NotNull Bidder newBidder();", "public Book create(String title,double price, Author author)\r\n {\r\n return new Book(title,price,author);\r\n }", "public Bid() {}", "Book(int id, String judul, int tahun) {\n // nah disini mirip kayak override/overload, cuman pake nya keyword this\n // this ini merujuk ke variabel yang diatas(property) sedang yang nggak merujuk\n // ke parameter\n this.id = id;\n this.judul = judul;\n this.tahun = tahun;\n }", "public Ledger(int nB) {\r\n\t\tnumberOfBills = nB;\r\n\t\tcounter = nB;\r\n\t\tinvoiceInfo = new Invoice[numberOfBills];\r\n\t}", "void create(Book book);", "@Test\n public void billCustomConstructor_isCorrect() throws Exception {\n\n int billId = 100;\n String billName = \"test Bill\";\n int userId = 101;\n int accountId = 202;\n double billAmount = 300.25;\n String dueDate = \"02/02/2018\";\n int occurrenceRte = 1;\n\n //Create empty bill\n Bill bill = new Bill(billId,userId,accountId,billName,billAmount,dueDate,occurrenceRte);\n\n // Verify Values\n assertEquals(billId, bill.getBillId());\n assertEquals(billName, bill.getBillName());\n assertEquals(userId, bill.getUserId());\n assertEquals(accountId, bill.getAccountId());\n assertEquals(billAmount, bill.getBillAmount(), 0);\n assertEquals(dueDate, bill.getDueDate());\n assertEquals(occurrenceRte, bill.getOccurrenceRte());\n }", "public void createPaperbackBook(String[] bookInfo) {\n\t\tString isbn = bookInfo[0];\n\t\tString callNumber = bookInfo[1];\n\t\tint available = Integer.parseInt(bookInfo[2]);\n\t\tint total = Integer.parseInt(bookInfo[3]);\n\t\tString title = bookInfo[4];\n\t\tString authors = bookInfo[5];\n\t\tint year = Integer.parseInt(bookInfo[6]);\n\t\tchar genre = bookInfo[7].charAt(0);\n\n\t\tbookList.add(new PaperBack(isbn, callNumber, available, total, title, authors, year, genre));\n\t}", "public ExperiencevoucherofferingsRecord(UInteger id, UInteger guestcount, Double price, UInteger experienceid, Timestamp availablefrom, Timestamp availableto) {\n super(Experiencevoucherofferings.EXPERIENCEVOUCHEROFFERINGS);\n\n set(0, id);\n set(1, guestcount);\n set(2, price);\n set(3, experienceid);\n set(4, availablefrom);\n set(5, availableto);\n }", "public BookList(){\n\n }", "public BankAccountKey(java.lang.String argAccID) {\n\taccID = argAccID;\n}", "public Book(String title, String author, String publisher, int publYear, String ISBN, int numOfBooks, int lent) {\n this.title = title;\n this.author = author;\n this.publisher = publisher;\n this.publYear = publYear;\n this.ISBN = ISBN;\n this.numOfBooks = numOfBooks;\n this.lent = lent;\n }", "private static Key createInternalLobKey() {\n return Key.createKey(Arrays.asList(INTERNAL_KEY_SPACE,\n ILK_PREFIX_COMPONENT,\n UUID.randomUUID().toString()));\n }", "public static AddressBook create(String bookName) {\n return new AddressBook(bookName);\n }", "private BookMasterContract() {\n }", "public Loan (String cId, String date){\n\t\tthis();\n\t\tthis.client_id = cId;\n\t\tthis.start_date = date;\n\t}", "public Loan(String cId, double pA, double iR, int nY, int nPy, String date){\n\t\tclient_id = cId;\n\t\tprincipal_amount = pA;\n\t\tinterest_rate = iR;\n\t\tno_years = nY;\n\t\tno_payments_yearly = nPy;\n\t\tstart_date = date;\n\t}", "public PaymentP2007_03() {\n this(DSL.name(\"payment_p2007_03\"), null);\n }", "public Book(double weightInKg, double manufacturingPriceDollars,\r\n double suggestedRetailPriceDollars, String uniqueID, \r\n Author author, Date datePublished, String title, BookType bookType) {\r\n super(weightInKg, manufacturingPriceDollars, suggestedRetailPriceDollars, uniqueID);\r\n setAuthor(author);\r\n setDatePublished(datePublished);\r\n setTitle(title);\r\n this.genre = bookType;\r\n }", "public BookConverter() {\r\n }", "protected static Book goodBookValues(String bidField, String bnameField, String byearField, String bpriceField, String bauthorField, String bpublisherField) throws Exception{\n Book myBook;\n String [] ID,strPrice;\n String Name;\n int Year;\n double Price;\n \n try{\n ID = bidField.split(\"\\\\s+\"); // split using spaces\n if (ID.length > 1 || ID[0].equals(\"\")) // id should only be one word\n {\n throw new Exception (\"ERROR: The ID must be entered\\n\"); // if the id is empty, it must be conveyed to this user via this exception\n }\n if (ID[0].length() !=6) // id must be 6 digits\n throw new Exception (\"ERROR: ID must be 6 digits\\n\");\n if (!(ID[0].matches(\"[0-9]+\"))) // id must only be numbers\n throw new Exception (\"ERROR: ID must only contain numbers\");\n Name = bnameField;\n if (Name.equals(\"\")) // name must not be blank\n throw new Exception (\"ERROR: Name of product must be entered\\n\");\n if (byearField.equals(\"\") || byearField.length() != 4) // year field cannot be blank\n {\n throw new Exception (\"ERROR: Year of product must be 4 numbers\\n\");\n } else {\n Year = Integer.parseInt(byearField);\n if (Year > 9999 || Year < 1000)\n {\n throw new Exception (\"Error: Year must be between 1000 and 9999 years\");\n }\n }\n \n strPrice = bpriceField.split(\"\\\\s+\");\n if (strPrice.length > 1 || strPrice[0].equals(\"\"))\n Price = 0;\n else\n Price = Double.parseDouble(strPrice[0]);\n \n myBook = new Book(ID[0],Name,Year,Price,bauthorField,bpublisherField);\n ProductGUI.Display(\"Book fields are good\\n\");\n return myBook;\n } catch (Exception e){\n throw new Exception (e.getMessage());\n }\n \n }", "public Pitonyak_09_02() {\r\n }", "private Book createBookForQuery(String filter, String query) {\n switch(filter) {\n case \"Title\":\n return new Book(\n null, query, null, 0, null, 0, null);\n case \"Author\":\n return new Book(query, null, null, 0, null, 0, null);\n case \"Publisher\":\n return new Book(null, null, query, 0, null, 0, null);\n case \"Year\":\n return new Book(null, null, null, Integer.parseInt(query), null, 0, null);\n case \"Genre\":\n return new Book(null, null, null, 0, query, 0, null);\n case \"Pages\":\n return new Book(null, null, null, 0, null, Integer.parseInt(query), null);\n default:\n return new Book(null, query, null, 0, null, 0, null);\n }\n }", "public LeaguePrimaryKey() {\n }", "public LoyaltyCard(String theTitle, String theFirstName, \r\n String theLastName, String street, \r\n String town, String postcode, \r\n String theCardNumber, int thePoints)\r\n {\r\n title = theTitle;\r\n firstName = theFirstName;\r\n lastName = theLastName;\r\n address = new LoyaltyCardAddress(street, town, postcode);\r\n cardNumber = theCardNumber;\r\n points = thePoints; \r\n }", "private static Book createFirstBookTest() {\n var book = new Book();\n book.setOriginalPriceNumber(1760);\n book.setDescription(\"52ヘルツのクジラとは―他の鯨が聞き取れない高い周波数で鳴く\");\n book.setCategory(\"トップページ > 本・コミック > 文芸 > 文芸(日本) > 現代小説 \");\n return book;\n }", "public Book(Integer id) {\n\t\tthis.id = id;\n\t}", "public Tuple(Loyalty... c)\r\n\t\t{\r\n\t\t\tsuper(Arrays.asList(c));\r\n\t\t}", "public void create(String title, String numPages, String quantity, String category, String price, String publicationYear, String[] authorsId, String publisherId) {\n System.out.println(\"creating book \" + title + \" by \"+ authorsId[0] + \" published by \" + publisherId);\n dbmanager.open();\n \n JSONObject item = new JSONObject();\n item.put(\"idBOOK\", dbmanager.getNextId());\n item.put(\"title\", title);\n item.put(\"numPages\", numPages);\n item.put(\"quantity\", quantity);\n item.put(\"category\", category);\n item.put(\"price\", price);\n item.put(\"publicationYear\", publicationYear);\n item.put(\"authors\", authorsId); \n item.put(\"publisher\", publisherId);\n\n dbmanager.createCommit(getNextBookId(),item);\n \n dbmanager.close();\n }", "public Loan(String cId, double pAmount, String date){\n\t\tthis();\n\t\tthis.client_id = cId;\n\t\tthis.principal_amount = pAmount;\n\t\tthis.start_date = date;\n\t}", "public BookResponse() {\n }", "public static AnnualLease create(String number,\n\t\t\t\t\t\t\t\t\t\t\tDate startdate,\n\t\t\t\t\t\t\t\t\t\t\tdouble amountdue,\n\t\t\t\t\t\t\t\t\t\t\tboolean paymonthly)\n\t\t\t\t\t\t\t\tthrows CreateException\t\t\t\t{\n\t\tif (_debug) System.out.println(\"AL:create:\" + number);\n\n\t\tAnnualLeaseModel model = new AnnualLeaseModel(number, amountdue, startdate, null, null, null, 0, paymonthly);\n\t\tAnnualLeaseDAO dao = null;\n\t\ttry\t{\n\t\t\tdao = getDAO();\n\t\t\tdao.dbInsert(model);\n\t\t\t/* Initially this AnnualLease has no boats or leases\t\t\t*/\n\n\t\t} catch (Exception sqlex)\t{\n\t\t\tthrow new CreateException(sqlex.getMessage());\n\t\t}\n\n\t\treturn\tnew AnnualLease(model);\n\t}", "public HLCPaymentDetails() { }", "public Pojo1110110(){\r\n\t}", "public Pair<ResponseCodeEnum, Long> create(\n final BalanceChange change,\n final Timestamp timestamp,\n final Store store,\n final EntityAddressSequencer ids,\n final MirrorEvmContractAliases mirrorEvmContractAliases) {\n if (change.isForToken() && !evmProperties.isLazyCreationEnabled()) {\n return Pair.of(NOT_SUPPORTED, 0L);\n }\n final var alias = change.getNonEmptyAliasIfPresent();\n if (alias == null) {\n throw new IllegalStateException(\"Cannot auto-create an account from unaliased change \" + change);\n }\n\n TransactionBody.Builder syntheticCreation;\n final var isAliasEVMAddress = alias.size() == EVM_ADDRESS_SIZE;\n if (isAliasEVMAddress) {\n syntheticCreation = syntheticTxnFactory.createHollowAccount(alias, 0L);\n } else {\n final var key = asPrimitiveKeyUnchecked(alias);\n syntheticCreation = syntheticTxnFactory.createAccount(alias, key, 0L, 0);\n }\n\n var fee = autoCreationFeeFor(syntheticCreation, store, timestamp, mirrorEvmContractAliases);\n if (isAliasEVMAddress) {\n fee += getLazyCreationFinalizationFee(store, timestamp, mirrorEvmContractAliases);\n }\n\n final var newId = ids.getNewAccountId();\n final var account = new Account(\n alias,\n 0L,\n Id.fromGrpcAccount(newId),\n 0L,\n 0L,\n false,\n 0L,\n 0L,\n null,\n 0,\n Collections.emptySortedMap(),\n Collections.emptySortedMap(),\n Collections.emptySortedSet(),\n 0,\n 0,\n 0,\n 0L,\n false,\n null);\n store.updateAccount(account);\n\n replaceAliasAndSetBalanceOnChange(change, newId);\n trackAlias(alias, account.getAccountAddress(), mirrorEvmContractAliases);\n return Pair.of(OK, fee);\n }" ]
[ "0.5938234", "0.5568672", "0.5523352", "0.5490856", "0.5485333", "0.5386778", "0.53531384", "0.5253025", "0.52318126", "0.5221726", "0.52144504", "0.5206978", "0.52062047", "0.51981914", "0.5185298", "0.51677144", "0.5151883", "0.5123704", "0.5097407", "0.50939", "0.50877655", "0.50789446", "0.5064741", "0.50594586", "0.50260127", "0.5025343", "0.5007061", "0.49988", "0.4994471", "0.4992824", "0.49836448", "0.49789625", "0.4978169", "0.49639985", "0.49580187", "0.49573562", "0.49567866", "0.49398342", "0.49331373", "0.49250254", "0.4921776", "0.49208555", "0.49200815", "0.49092245", "0.48944366", "0.48921558", "0.4882611", "0.48664507", "0.4845143", "0.48340645", "0.48340645", "0.4825552", "0.48243904", "0.4812186", "0.48085126", "0.48040128", "0.47914115", "0.47907522", "0.47724345", "0.4767931", "0.47642627", "0.47505054", "0.47439638", "0.47394225", "0.47382736", "0.47298425", "0.47275096", "0.47180054", "0.47142982", "0.46879616", "0.46869412", "0.46849835", "0.46842128", "0.46837547", "0.46780303", "0.46754277", "0.467268", "0.46570042", "0.46450877", "0.46427476", "0.4638501", "0.4633172", "0.46299314", "0.46251437", "0.4620532", "0.46191624", "0.46134102", "0.45966077", "0.4584857", "0.45762756", "0.45723385", "0.4571214", "0.45641893", "0.45614514", "0.45593113", "0.45461938", "0.45433626", "0.45410943", "0.45397165", "0.45388633" ]
0.6902827
0
sets drew to a value
public void setDrew(int num){ drew = num; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setRed(int x, int y, int value);", "void setBlue(int x, int y, int value);", "void setRed(int red){\n \n this.red = red;\n }", "public void setColor(DyeColor color) {\n/* 53 */ setData(color.getWoolData());\n/* */ }", "public void setColor(double value) {\r\n\t\tif (value < 0) {\r\n\t\t\tpg.fill(140+(int)(100*(-value)), 0, 0);\r\n\t\t} else {\r\n\t\t\tpg.fill(0, 140+(int)(100*(value)), 0);\r\n\t\t}\r\n\t}", "public void setColor(Color c) { color.set(c); }", "void setGreen(int x, int y, int value);", "public void setColor(int value);", "public void setDataColor(Color c)\r\n/* 48: */ {\r\n/* 49: 36 */ this.ballColor = c;repaint();\r\n/* 50: */ }", "void setBlue(int blue){\n \n this.blue = blue;\n }", "public void setColour(Colour colour);", "public void setColor(Color c);", "public void setColor(Color clr){\n color = clr;\n }", "void setValue(R value);", "public void setColor(Color newColor) ;", "public void setColor(String c);", "public void setColor(int color) {\n/* 77 */ this.color = color;\n/* 78 */ this.paint.setColor(this.color);\n/* */ }", "public void set(double d);", "void setColor(){\n this.objectColour = new Color(rValue,gValue,bValue,timeToLive).brighter();\n }", "public void setDefaultAppearance(String daValue) {\n/* 540 */ getCOSObject().setString(COSName.DA, daValue);\n/* */ }", "public void setColor(int color);", "public void setColor(int color);", "@Override\r\n\tpublic void setRedondez(int redondez) {\n\r\n\t}", "public void setRed(final int red) {\n\t\tthis.r = red;\n\t}", "public void setValue(Color value) {\n _color = value;\n _updateField(value);\n }", "public void setValue(double val) {\r\n\t\tthis.worth = val;\r\n\t}", "@Override\n public void excute() {\n drawable.setColor(color);\n }", "public void set(double val);", "public void setColor(String c)\n { \n color = c;\n draw();\n }", "public static void \nsetColorMaterial(SoState state, boolean value)\n{\n// SoLazyElement curElt = SoLazyElement.getInstance(state);\n// if (value != curElt.ivState.colorMaterial)\n// getWInstance(state).setColorMaterialElt(value);\n// else if (state.isCacheOpen())\n// curElt.registerRedundantSet(state, masks.COLOR_MATERIAL_MASK.getValue());\n}", "void setGreen(int green){\n \n this.green = green;\n }", "public void changeColor(){\r\n if(color == 1)\r\n color = 2;\r\n else\r\n color = 1;\r\n }", "public void setColor(RMColor aColor)\n{\n // Set color\n if(aColor==null) setFill(null);\n else if(getFill()==null) setFill(new RMFill(aColor));\n else getFill().setColor(aColor);\n}", "public void setColor(Color color);", "@Override public void setColor(Color c) \n\t{\n\t\tc2 = c1; c1 = c.dup();\n\t}", "public void setRrColor(Color value) {\n rrColor = value;\n }", "public void setColor(Color another)\r\n {\r\n currentColor = another;\r\n }", "Color(Scalar s) {\n setScalar(s);\n }", "public abstract void setColor(Color color);", "public abstract void setColor(Color color);", "void setColor(Vector color);", "private void setPenColor() {\n\t}", "private static void changeColor(Orange apple) {\n\t\tapple.color = \"green\";\n\t\t\n\t}", "void setCor(Color cor);", "void setValue(double value);", "public void setValue(int v){\n\t\tif (colorSliderArrow.getValue() != v){\r\n\t\t\tcolorSliderArrow.setValue(v);\t\t\t\r\n\t\t}\r\n\t}", "public void setCarColor(){\n\t\tthis.carColor = \"white\";\n\t}", "public void setRadColor(Color value) {\n radColor = value;\n }", "public void setR(Double r);", "void setStone(int x, int y, int color);", "public void setColor(int gnum, Color col);", "void setColor(int r, int g, int b);", "public void set_Reflect(double d){\n reflection.setFraction(d);\r\n\t\treflect_value = d;\r\n\t\treflection.setInput(colorAdjust);\r\n\t\trefreshImageView();\r\n\t}", "private void setColor() {\n cell.setStroke(Color.GRAY);\n\n if (alive) {\n cell.setFill(aliveColor);\n } else {\n cell.setFill(deadColor);\n }\n }", "void setDimmer(int channel, int value) {\n\t\tint valueToSet;\n\t\tif (value < 2) {\n\t\t\tvalueToSet = 2;\n\t\t} else {\n\t\t\tvalueToSet = value;\n\t\t}\n\t\tString channelHex = channelAsHex(channel);\n\t\tString valueHex = StringUtils.leftPad(Integer.toHexString(valueToSet),\n\t\t\t\t2, \"0\");\n\t\tsendCommand(\"*C901\" + channelHex + valueHex + \"#\");\n\t}", "public void setValue(double newvalue){\n value = newvalue;\n }", "public void setDiamondValue(int value);", "public void setColor( GraphColor newVal ) {\n color = newVal;\n }", "private void setRedBorder(Shape decoratedShape) {\n\t\tSystem.out.println(\"Border Color: Red\");\r\n\t}", "public void setCarry() {\n\t\tset((byte) (get() | (1 << 4)));\n\t}", "public void setColor()\n {\n if(eyeL != null) // only if it's painted already...\n {\n eyeL.changeColor(\"yellow\");\n eyeR.changeColor(\"yellow\");\n nose.changeColor(\"green\");\n mouthM.changeColor(\"red\");\n mouthL.changeColor(\"red\");\n mouthR.changeColor(\"red\");\n }\n }", "public void\nsetEmissiveElt( SbColor color )\n\n{\n coinstate.emissive.copyFrom(color);\n}", "private void setValue(double value) {\n this.value = value;\n }", "public void setSaturation ( float value ) {\n\t\texecute ( handle -> handle.setSaturation ( value ) );\n\t}", "@Test\n\tpublic void colorCustomization() {\n\n\t\tset.setFill(1);\n\t\tassertTrue(set.hasFill());\n\t\tassertEquals(1, set.getColor());\n\t\tassertEquals(1, set.getFillColor());\n\n\t\tset.setColor(3);\n\t\tset.setFill(2);\n\t\tassertEquals(3, set.getColor());\n\n\t\tset.setGradientFill(new int[] {1, 2}, new float[] {1.f, 2.f});\n\t\tassertTrue(set.hasGradientFill());\n\t}", "public void setColor(int r, int g, int b);", "public Builder color(@Nullable String value) {\n object.setColor(value);\n return this;\n }", "public void setDie (int i, int value)\n\t{\n\t\tdieButton[i].setIcon (dieIcon[value]);\n\t}", "public void setValue(Object value)\r\n {\r\n if (value instanceof ColoredData)\r\n {\r\n ColoredData cvalue = (ColoredData) value;\r\n setText(cvalue.getData().toString());\r\n if (cvalue.getFGColor() != null)\r\n {\r\n setForeground(cvalue.getFGColor());\r\n }\r\n if (cvalue.getBGColor() != null)\r\n {\r\n setBackground(cvalue.getBGColor());\r\n }\r\n }\r\n else if (value instanceof IconData)\r\n {\r\n IconData ivalue = (IconData) value;\r\n setIcon(ivalue.getIcon());\r\n setText(ivalue.getData().toString());\r\n }\r\n else if (value instanceof DataTrendTick)\r\n {\r\n DataTrendTick dValue = (DataTrendTick) value;\r\n ImageIcon icon = new ImageIcon(dValue.getImage());\r\n setIcon(icon);\r\n setHorizontalAlignment(CENTER);\r\n }\r\n else\r\n {\r\n super.setValue(value);\r\n setHorizontalAlignment(CENTER);\r\n }\r\n }", "public Builder setD(int value) {\n bitField0_ |= 0x00000001;\n d_ = value;\n onChanged();\n return this;\n }", "String setValue();", "public void setColor(int c) {\n paint.setColor(c);\n invalidate();\n }", "public ToolCardSetDiceValueAction(int callerID, Value value)\n\t{\n\t\tsuper(callerID);\n\t\tthis.value = value.ordinal()+1;\n\n\t}", "void setValue(Adjustable adj, int v);", "public void setColor(Color color) {\n this.color = color;\n }", "public ToolCardSetDiceValueAction(int callerID, int value)\n\t{\n\t\tsuper(callerID);\n\t\tthis.value = value;\n\n\t}", "void setValue(T value) throws YangException;", "public void changeColor(double d, Color color, Color color2, boolean bl) {\n block2: {\n void difference;\n void dragging;\n if (dragging == false) break block2;\n if (difference == Double.longBitsToDouble(Double.doubleToLongBits(1.2749872908217061E308) ^ 0x7FE6B20E10D32E17L)) {\n void zeroColor;\n this.setting.setValue(new Color(zeroColor.getRed(), zeroColor.getGreen(), zeroColor.getBlue(), this.setting.getValue().getAlpha()));\n } else {\n void color3;\n this.setting.setValue(new Color(color3.getRed(), color3.getGreen(), color3.getBlue(), this.setting.getValue().getAlpha()));\n }\n }\n }", "public void changeTurn(){\n\t\tif (this.turn ==\"blue\")\n\t\t{\n\t\t\tthis.turn = \"red\";\n\t\t\t\n\t\t}else{\n\t\t\tthis.turn =\"blue\";\n\t\t}\n\t}", "public void setValue(double value) {\n this.value = value; \n }", "void setValue(int value);", "public void changeDogColor(Color dogColor) {\n this.color = dogColor;\n }", "public void setColor(Color c) {\n color = c;\n }", "@Override \n\tpublic void setNormalColor(){\n\t\tthis.setColor(Color.PINK);\n\t}", "void setColor(@ColorInt int color);", "public void switchColor(){\r\n System.out.println(color);\r\n if(color==\"W\"){\r\n color=\"B\";\r\n System.out.println(color);\r\n }else{ \r\n color=\"W\";\r\n } \r\n }", "public void setColor(Color that){\r\n \t//set this to that\r\n this.theColor = that;\r\n if(this.theColor.getRed() == 255 && this.theColor.getGreen() == 0 && this.theColor.getBlue() == 0){\r\n this.theColor = Color.red;\r\n }\r\n if(this.theColor.getRed() == 0 && this.theColor.getGreen() == 0 && this.theColor.getBlue() == 255){\r\n this.theColor = Color.black;\r\n }\r\n if(this.theColor.getRed() == 0 && this.theColor.getGreen() == 255 && this.theColor.getBlue() == 0){\r\n this.theColor = Color.green;\r\n }\r\n }", "public abstract double set\r\n ( DataID dID // input\r\n , double value // input\r\n );", "public void\nsetAmbientElt( SbColor color )\n\n{\n this.coinstate.ambient.copyFrom(color);\n}", "public void setColor(String color) {\n if (color.equals(\"blanc\") ||\r\n color.equals(\"blue\")) {\r\n this.color = color;\r\n } else {\r\n System.err.println(\"bad color\");\r\n }\r\n }", "public void set(int value) {\n\t\ttem = value;\n\t\tSystem.out.println(\"\\tAir conditioner is set to \" + tem +\" degrees\");\n\t}", "public void setColor(GrayColor color){\n this.color = color;\n }", "public void setColor(Color color_rey){\r\n this.color_rey=color_rey;\r\n }", "@NoProxy\n @NoWrap\n public void setColor(final String val) {\n color = val;\n }", "public void setBlue(boolean blue) {\r\n this.blue = blue;\r\n }", "public void setFill(RMFill aFill)\n{\n if(RMUtils.equals(getFill(), aFill)) return; // If value already set, just return\n repaint(); // Register repaint\n if(_fill!=null) _fill.removePropertyChangeListener(this);\n firePropertyChange(\"Fill\", _fill, _fill = aFill, -1); // Set value and fire PropertyChange\n if(_fill!=null) _fill.addPropertyChangeListener(this);\n}", "public void setCurrentStrokeValue(float value,int color) {\n currentStrokeValue = value;\n if(strokeWidthView != null) {\n strokeWidthView.setProgress((int) value,color);\n strokeWidthView.invalidate();\n }\n }", "public void set() {\r\n\t\tage = 19;\r\n\t\tname = \"ΎΛ·»\";\r\n\t\theight = 161;\r\n\t\tsetWeight(50);\r\n\t\tSystem.out.println(getWeight());\r\n\t}", "private void set(char c, char r, PieceColor v) {\n assert validSquare(c, r);\n set(index(c, r), v);\n }", "public void setColor(IsColor color) {\n\t\tsetColor(IsColor.checkAndGetValue(color));\n\t}" ]
[ "0.668932", "0.6381691", "0.6280142", "0.61968786", "0.6022838", "0.5969126", "0.59534377", "0.592869", "0.58704597", "0.5814071", "0.5786275", "0.575967", "0.5722618", "0.571111", "0.5697942", "0.56893784", "0.5686866", "0.5678598", "0.56581426", "0.56342226", "0.5608599", "0.5608599", "0.5604212", "0.5600084", "0.55851233", "0.5564599", "0.55405354", "0.5538568", "0.55119354", "0.5511047", "0.55102026", "0.5497638", "0.54935175", "0.54686713", "0.54591566", "0.5457602", "0.54567945", "0.54361296", "0.5435391", "0.5435391", "0.54283386", "0.5426449", "0.5426086", "0.5410515", "0.5399791", "0.5384139", "0.5377842", "0.5374239", "0.535996", "0.53575784", "0.535372", "0.5330822", "0.5320433", "0.5314065", "0.5313515", "0.53065985", "0.5303866", "0.52945435", "0.52930045", "0.529289", "0.5290161", "0.5287416", "0.52864045", "0.5280749", "0.52800184", "0.5279614", "0.52756834", "0.527387", "0.52499926", "0.5240917", "0.52398616", "0.52367413", "0.523449", "0.5234015", "0.52154046", "0.52063507", "0.52052796", "0.52010936", "0.51935023", "0.51827663", "0.5179227", "0.51758015", "0.5173941", "0.5171026", "0.51662976", "0.51622677", "0.5157236", "0.5155784", "0.51553005", "0.5150411", "0.5146613", "0.5144358", "0.5140309", "0.51313937", "0.51248133", "0.51238644", "0.5115245", "0.51135284", "0.5108352", "0.5101761" ]
0.69612885
0
totals the number of pips in player hand
public int make_a_num(){ total = 0; for(int i = 0; i < playerHand.size(); i++){ total += playerHand.get(i).getLeft(); total += playerHand.get(i).getRight(); } return total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getFaintedPokemonCount();", "int getReservePokemonCount();", "public int numAlivePokemon() {\r\n\t\tint count = 0;\r\n\t\tfor (Pokemon p : ownedPokemon) {\r\n\t\t\tif (p.getCurrentHP() > 0) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "@Override\r\n\tpublic int getPegCount() {\r\n\t\tint shipSize = 3;\r\n\t\treturn shipSize;\r\n\t}", "private void scoreSumUp(ArrayList<Player> players){\n for (Player player: players) {\n System.out.println(\"The Player \" + player.getUsername() + \" has total points of \" + player.getScore());\n }\n }", "public int getNumberShips();", "private static void calculateTotalHitsRequired()\n {\n totalHitsRequired = 0;\n \n // add all the ship lengths together to get\n // the total number of hits required\n for (int length : SHIP_LENGTHS)\n {\n totalHitsRequired += length;\n }\n }", "private int totalCount(Piece side) {\n int sum = 0;\n for (int i = 0; i < M; i++) {\n for (int j = 0; j < M; j++) {\n if (boardArr[i][j].abbrev().equals(sideAbbrev)) {\n sum++;\n }\n }\n }\n return sum;\n }", "int calculatePoints(IYatzyHand hand, HandType type);", "private int getNumberOfBoxesOfAllShips() {\r\n int count = 30;\r\n return count;\r\n }", "public void countAllPoints() {\n\t\tfor(ClientThread player: players) {\n\t\t\tplayer.points = PointCounter.countPoint(player.clientCards);\n\t\t\tview.writeLog(player.name+\" : \"+player.points);\n\t\t}\n\t}", "public int getHandTotal()\n\t{\n\t\tint total = 0;\n\t\tfor (Card c : hand)\n\t\t{\n\t\t\ttotal += c.getValue();\n\t\t}\n\t\treturn total;\n\t}", "public int getPlayerHandSize(String pid) {\r\n return getPlayerHand(pid).size();\r\n }", "public int getTotRuptures();", "public int getNbPawns(Player player) {\n Pawn aPawn;\n int Size, nbPawn;\n Size = getSize();\n nbPawn = 0;\n\n for (int numLine = 0; numLine < Size; numLine++) {\n for (int numCol = 0; numCol < Size; numCol++) {\n\n aPawn = field[numLine][numCol];\n if (aPawn != null) {\n if (aPawn.getPlayer() == player) nbPawn++; //if the pawn belong to player\n }\n\n }\n }\n\n return nbPawn;\n }", "public int countHandShakes(){\n\t\tif (this.getNCouples() < 1) {\n\t\t\treturn 0;\n\t\t}else if (this.getNCouples() == 1) {\n\t\t\treturn 1;\n\t\t}else{\n\t\t\tthis.setNCouples(this.getNCouples() - 1);\n\t\t\treturn (this.getNCouples() + 1) * 3 - 2 + countHandShakes();\n\t\t}\n\t}", "public int totalNum(){\n return wp.size();\n }", "@java.lang.Override\n public int getFaintedPokemonCount() {\n return faintedPokemon_.size();\n }", "public int getHandTotal () {\n int handTotal = 0;\n int aceCount = 0;\n for (Card e : hand) {\n if (e.returnRankValue() >= 10) {\n handTotal += 10;\n } else if (e.returnRankValue() == 1) {\n ++aceCount;\n } else { handTotal += e.returnRankValue(); }\n }\n\n /* Calculate the worth of aces after all other cards have been counted */\n for (int i = 0; i < aceCount; ++i) {\n if (handTotal+11 > 21) {\n handTotal += 1;\n } else {\n handTotal += 11;\n }\n }\n\n return handTotal;\n }", "public int getTotalChips() {\n int size1 = stackA.getNumChips();\n int size2 = stackB.getNumChips();\n int size3 = stackC.getNumChips();\n return size1 + size2 + size3 ;\n }", "int getCount(Side player) {\n return player == BLACK ? _countBlack : _countWhite;\n }", "int getPickupsCount();", "public int countPlayers(){\n return players.size();\n }", "public int getShipsAlive() {\n return this.numberOfShips;\n }", "public int calculateSumOfHouse() {\n int sum = 0;\n for (int i = 0; i < pointsHistory.size(); i++) {\n sum += pointsHistory.get(i);\n }\n return sum;\n }", "public int getTotalWins() {\n int sum = 0;\n for (int i = 0; i < 13; i++) {\n sum += i * this.statistics.getDecksByWins().get(i);\n }\n return sum;\n }", "public int playerCount()\r\n\t{\r\n\t\tint count = 0;\r\n\t\tfor(Player player: this.players)\r\n\t\t{\r\n\t\t\tif(player != null)\r\n\t\t\t{\r\n\t\t\t\t++count;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public int getTotal()\r\n\t{\r\n\t\t// the running total of points in the hand\r\n\t\tint sum = 0;\r\n\r\n\t\t// count of the number of aces in the hand, to be processed later\r\n\t\tint aces = 0;\r\n\t\t\r\n\t\t// evaluates each card in the hand\r\n\t\tfor (int i = 0; i < handCount; i++)\r\n\t\t{\r\n\t\t\tint value = 0;\r\n\t\r\n\t\t\t/* while each card stores a value for both its suite and rank, this method is only\r\n\t\t\tconcerned with rank, and thus only examines the first character */\r\n\t\t\tchar thisCard = pCards[i].charAt(0);\r\n\t\t\t\r\n\t\t\tswitch(thisCard)\r\n\t\t\t{\r\n\t\t\t\tcase '2':\tvalue = 2;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase '3':\tvalue = 3;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase '4':\tvalue = 4;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase '5':\tvalue = 5;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase '6':\tvalue = 6;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase '7':\tvalue = 7;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase '8':\tvalue = 8;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase '9':\tvalue = 9;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase '1':\tvalue = 10;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'J':\tvalue = 10;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'Q':\tvalue = 10;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'K':\tvalue = 10;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'A':\taces++;\r\n\t\t\t\t\t\t\t\tvalue = 0;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t} // end switch\r\n\t\r\n\t\t\tsum += value;\r\n\t\t} // end for\r\n\t\t\r\n\t\t// checks if any aces exist\r\n\t\tif (aces > 0)\r\n\t\t{\r\n\t\t\t// The value of all aces in the hand, the first valued at 11 and all subsequent aces valued at 1\r\n\t\t\tint aceTotal = 11 + (aces - 1);\r\n\t\t\r\n\t\t\t/* if this total would cause the player to bust, the aces are all added at value 1.\r\n\t\t\tOtherwise, the first is added at value of 11, and the others at value of 1. */\r\n\t\t\tif ( sum <= (BlackJackGame.BUST_SCORE - aceTotal ) )\r\n\t\t\t{\r\n\t\t\t\tsum = sum + aceTotal;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tsum = sum + aces;\r\n\t\t\t}\r\n\t\t} // end if\r\n\t\r\n\t\treturn sum;\r\n\t}", "public int getHandKarteCount(){\n return getHandKarte().size();\n }", "public int getNumberOfShips() {\r\n\t\treturn numberOfShips;\r\n\t}", "private int calculateScore(){\n int score = 0;\n for(Card card : hand){\n score += card.getScore();\n }\n return score;\n }", "public int playersCount(){\r\n\t\treturn players.size();\r\n\t}", "public void calculatePoints() {\n /*\n for (int i = 0; i < getRacers().size(); i++) {\n String username = getRacers().get(i).getUsername();\n int total = 0;\n for (int j = 0; j < getRounds().size(); j++) {\n Slot slot = getRounds().get(j).findRacerInRound(username);\n if (slot != null) {\n total = total + slot.getPoints();\n }\n }\n getRacers().get(i).setPoints(total);\n }*/\n }", "public int getNumCaught() {\r\n\t\tint count = 0;\r\n\t\tfor (int poke : caughtPokemon.values()) {\r\n\t\t\tcount += poke;\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public int getFaintedPokemonCount() {\n if (faintedPokemonBuilder_ == null) {\n return faintedPokemon_.size();\n } else {\n return faintedPokemonBuilder_.getCount();\n }\n }", "public void getRemainingStones() {\n int CountP1 = 0;\n int CountP2 = 0;\n for (int i = 0; i < P1_STORE_PIT; i++) {\n CountP1 += board.getPit(i).getNumberOfStones();\n board.getPit(P1_STORE_PIT).addStones(CountP1);\n }\n for (int i = P1_STORE_PIT + 1; i < P2_STORE_PIT; i++) {\n CountP2 += board.getPit(i).getNumberOfStones();\n board.getPit(P2_STORE_PIT).addStones(CountP2);\n }\n }", "private int getTotalPlayerCount() {\n String baseUrl = \"https://www.runescape.com/player_count.js?varname=iPlayerCount\";\n String url = baseUrl + \"&callback=jQuery33102792551319766081_1618634108386&_=\" + System.currentTimeMillis();\n try {\n String response = new NetworkRequest(url, false).get().body;\n Matcher matcher = Pattern.compile(\"\\\\(\\\\d+\\\\)\").matcher(response);\n if(!matcher.find()) {\n throw new Exception();\n }\n return Integer.parseInt(response.substring(matcher.start() + 1, matcher.end() - 1));\n }\n catch(Exception e) {\n return 0;\n }\n }", "public int points() {\n\t\treturn cards[0].points() + cards[1].points() + cards[2].points();\n\t}", "int numOfPillars() {\n // there are one more coordinate line than blocks in each direction\n // since each block must be hinged on a coordinate line on each side\n return (ni+1) * (nj+1);\n }", "int getTrucksCount();", "public int numberOfBoxesInPile()\n {\n if (aboveBox != null)\n {\n return 1 + aboveBox.numberOfBoxesInPile();\n }\n else\n {\n return 1;\n }\n }", "public int qureyNumOfInspectors() {\r\n\t\tif (DBConnection.conn == null) {\r\n\t\t\tDBConnection.openConn();\r\n\t\t}\r\n\t\tint sum = 0;\r\n\t\ttry {\r\n\t\t\tString sql = \"select count(*) from InspectionPersonnel\";\r\n\t\t\tps = DBConnection.conn.prepareStatement(sql);\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tsum = rs.getInt(1);\r\n\t\t\t}\r\n\t\t\tDBConnection.closeResultSet(rs);\r\n\t\t\tDBConnection.closeStatement(ps);\r\n\t\t\tDBConnection.closeConn();\r\n\t\t\treturn sum;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "@Override\n public int getTotalHumanPlayers() {\n return totalHumanPlayers;\n }", "protected int getCivilPoints(Player player) {\n\t\tint sum = 0;\n\t\tfor (Card card : player.getBoard().getCivil())\n\t\t\tsum += card.getvPoints();\n\t\treturn sum;\n\t}", "public int getTotalPoints() {\n \tint total = 0;\n \tfor (int i = 0; i < assignments.size(); i++) {\n \t\ttotal += assignments.get(i).getWorth();\n \t}\n \treturn total;\n }", "private int CalcHandSum(Player player, List<Card> hand) {\n int sum = 0;\n int aceCounter = 0;\n\n for (Card card : hand) {\n if (card.cardRank == CardRank.ACE) {\n aceCounter++;\n }\n sum += card.cardValue;\n if (sum > 21 && card.cardRank == CardRank.ACE) {\n sum -= 10;\n aceCounter--;\n }\n }\n return sum;\n }", "public static Total total(Player player) {\r\n Deck hand = player.getHand();\r\n int min, max, value = 0, nbAces = 0;\r\n\r\n // ajout des cartes qui ne sont pas des as et comptage des as\r\n for (int i = 0; i < hand.getSize(); i++) {\r\n if(hand.get(i).isVisible()) {\r\n if(hand.get(i).getHeight() == 1) {\r\n nbAces++;\r\n value += 1;\r\n }\r\n else if(hand.get(i).getHeight() > 9) {\r\n value += 10;\r\n }\r\n else {\r\n value += hand.get(i).getHeight();\r\n }\r\n }\r\n }\r\n\r\n min = value;\r\n\r\n // ajout de dix points si on peut pour avoir le max\r\n if(value <= 11 && nbAces >= 1) {\r\n value += 10;\r\n max = value;\r\n } else {\r\n max = min;\r\n }\r\n\r\n // cas particulier : le joueur a un blackjack\r\n if(hand.getSize() == 2 && max == 21 && min == 11) {\r\n min = max = 32;\r\n }\r\n\r\n return new Total(min, max);\r\n }", "public int getPoints ( Player player );", "public void getBonusPoints(){\n\t\tif((this.player[Dominoes.getPlayerIndex()].hand.size() == 0) && (Dominoes.missedRounds == 0)){\n\t\t\tshort bonusScore = 0;\n\t\t\tfor(byte i = 0; i < this.player.length; i++){\n\t\t\t\tif(i != Dominoes.getPlayerIndex()){\n\t\t\t\t\tbonusScore += (this.player[i].hand.size() * 5);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.player[Dominoes.getPlayerIndex()].score += bonusScore;\n\t\t}\n\t}", "public int getTotalRegularCards() {\n return StatisticsHelper.sumMapValueIntegers(statistics.getCardsByWins());\n }", "@Override\r\n\tpublic int countCart(String userid, int pnum) {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic int getOnlinePlayerSum() {\n\t\treturn PlayerManager.getInstance().getOnlinePlayers().size();\n\t}", "public int GetSizeOfComputerHand(){\n return handComputer.size();\n }", "private Integer[] getNumberOfCards() {\n Integer[] numberOfCards = new Integer[players.length];\n\n for (int i = 0; i < players.length; i++) {\n numberOfCards[i] = players[i].getHand().length;\n }\n\n return numberOfCards;\n }", "public static int deadWoodPoints(ArrayList<int[]> hand) {\n\t\tint deadwood = 0;\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t// Check if each card in player's hand is deadwood and add points\n\t\t\tint[] card = hand.get(i);\n\t\t\tif (Helper.isDeadwood(card, hand)) {\n\t\t\t\t// Add points (10 for face cards, otherwise rank)\n\t\t\t\tdeadwood += Math.min(10, card[0]);\n\t\t\t}\n\t\t}\n\t\treturn deadwood;\n\t}", "private int calculateTotalHeads() { //kept a separate method with a specific purpose instead of writing code in main\n\t\t//no need to static method, althouth static won't hurt in such a small code\n\t\tint headsCount = 0;\n\t\tfor (int currentCoinNo = 1; currentCoinNo <= noCoins; currentCoinNo++) { \n\t\t\tif(isHead(currentCoinNo)) {\n\t\t\t\theadsCount++;\n\t\t\t}\n\t\t}\n\t\treturn headsCount;\n\t}", "public int getTotalExtraPacks() {\n return StatisticsHelper.sumMapValueIntegers(statistics.getExtraPacksByWins());\n }", "public int getGoalTally(Player player){\r\n return player.getGoal();\r\n }", "public int points(Color trump) {\n return PackedCard.points(trump, this.nbCard);\n }", "public int getTotalGoldenCards() {\n return StatisticsHelper.sumMapValueIntegers(statistics.getGoldCardsByWins());\n }", "public int getPopsCount() {\n return pops_.size();\n }", "public int getPoints(){\n\t\t//add the player socres(including monster killing, powerUp points and winning points\n\t\tint points = this.player.getScore() + 200*this.player.getHealth();\n\t\t\n\t\t//since the better the less time used, we use 600 seconds to minus the total seconds being used\n\t\t//and add it to the points\n\t\t//600 seconds is 10 minutes, which is definity long enough\n\t\t//if exceeds 10 minutes, we will subtract total score\n\t\tif(this.player.win()){\t//only if the player wins will we calculate the time\n\t\t\tpoints += (int)(3600 - (this.time / 1000000000));\n\t\t}\n\t\t\n\t\tthis.totalLabel.setText(String.valueOf(points));\t//set the value of the JLabel\n\t\t\n\t\treturn points;\n\t\t\n\t}", "public int getTotPoints(int[] details) throws RemoteException {\n return sd.getGames().get(details[0]).getPlayerTotPoints(details[1]);\n }", "public int getNumFaceUp(){\n int faceUp = 0;\n for(int i = 0; i < pilePlace; i++){\n if(pile[i].getFace() == \"Up\"){\n faceUp++;\n }\n }\n return faceUp;\n }", "public double getTotalPinPokok() {\n return this.totalPinPokok;\n }", "public int checkNoOfRapelPlayerHolds () { return noOfRapels; }", "public int findTotalPapers() throws DAOException;", "public static int countPoint(ArrayList<Card> cards) {\n\t\tint result = 0;\n\t\tfor(Card c: cards) {\n\t\t\tresult = result + c.getPoint();\n\t\t}\n\t\treturn result;\n\t}", "private int countWinnerScore(LinkedList<Integer> cards){\n int size = cards.size();\n return IntStream.range(0, size)\n .map(i -> cards.get(i) * (size - i))\n .sum();\n }", "private int countWinnerScore(LinkedList<Integer> cards){\n int size = cards.size();\n return IntStream.range(0, size)\n .map(i -> cards.get(i) * (size - i))\n .sum();\n }", "int getHungerPoints(ItemStack stack);", "public int getPlayerCount() {\n return 0;\n }", "int getWpaCount();", "public int getHandSize()\n {\n return hand.size();\n }", "public int getTotalPoint() {\n int totalPoint = 0;\n\n for (Card card : personHand) {\n totalPoint += card.getRank().getValue();\n\n if (card.getRank().equals(Rank.ACE) && totalPoint <= 11) {\n totalPoint += 10;\n }\n }\n\n return totalPoint;\n\n // TESTING ALL BLACKJACK\n// return 21;\n // TESTING ALL BUST\n// return 99;\n // TESTING ALL PUSH\n// return 10;\n }", "public void calcTroops() {\r\n\t\t//Based on how many troops the player owns this will add to their spendage with a minimum of 2\r\n\t\ttroopSpendage = (players.get(turnCounter).getCountries().size()) / 3;\r\n\t\tif (troopSpendage < 3) {\r\n\t\t\ttroopSpendage = 3;\r\n\t\t}\r\n\t\t//If a player owns an entire continent, they will get a continent bonus to their spendage\r\n\t\t//these counters record how much of a continent the player owns\r\n\t\tint Kjersia = 0;\r\n\t\tint Estoveria = 0;\r\n\t\tint Moa = 0;\r\n\t\tint Shilov = 0;\r\n\t\tint Tormudd = 0;\r\n\t\tint Eschilles = 0;\r\n\t\t\r\n\t\t//increment the corresponding continent counter based on the continent value stored in the country objects the player owns\r\n\t\tfor (Country c:players.get(turnCounter).getCountries()) {\r\n\t\t\tswitch (c.getContinent()) {\r\n\t\t\tcase \"Kjersia\": Kjersia++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Estoveria\": Estoveria++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Moa\": Moa++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Shilov\": Shilov ++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Tormudd\": Tormudd++;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"Eschilles\": Eschilles++;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//If the player owns all countries in a continent (each continent has different numbers of countries), give them a corresponding troop bonus as decided by the rules of the game\r\n\t\tif (Kjersia == 4) {\r\n\t\t\ttroopSpendage += 2;\r\n\t\t}\r\n\t\tif (Estoveria == 8) {\r\n\t\t\ttroopSpendage += 5;\r\n\t\t}\r\n\t\tif (Moa == 9) {\r\n\t\t\ttroopSpendage += 6;\r\n\t\t}\r\n\t\tif (Shilov == 4) {\r\n\t\t\ttroopSpendage += 3;\r\n\t\t}\r\n\t\tif (Tormudd == 5) {\r\n\t\t\ttroopSpendage += 3;\r\n\t\t}\r\n\t\tif (Eschilles == 12) {\r\n\t\t\ttroopSpendage += 7;\r\n\t\t}\r\n\r\n\t\t//If a player owns the card and owns the coresponding country on that card they get one extra troop\r\n\t\tfor(Card C: players.get(turnCounter).getCards()) \r\n\t\t\tfor(Country co: players.get(turnCounter).getCountries())\r\n\t\t\t\tif (C.getCountry().equals(co.getName()))\r\n\t\t\t\t\ttroopSpendage++;\t\t\r\n\t\t\r\n\t\t//Updates the display of how many troops the player has to deploy\r\n\t\ttroopsToDeploy.setText(\"Troops to Deploy: \" + troopSpendage);\r\n\t}", "public static long countPearls(List<Boolean> oysters) {\n\t\treturn 0;\n\t}", "public Integer countGoals();", "public void sumaPuntos() {\r\n int rojo = 0;\r\n int azul = 0;\r\n for (int i = 1; i < 10; i++) {\r\n\r\n if (tablero[1][i].getTipo().equals(\"Rojo\")) {\r\n rojo += tablero[1][i].getValor();\r\n }\r\n\r\n if (tablero[8][i].getTipo().equals(\"Azul\")) {\r\n azul += tablero[8][i].getValor();\r\n }\r\n\r\n }\r\n if (rojo > azul) {\r\n this.setResultado(\"Rojo\");\r\n this.agregarVictoria(jugadorRojo);\r\n }\r\n if (azul > rojo) {\r\n this.setResultado(\"Azul\");\r\n this.agregarVictoria(jugadorAzul);\r\n }\r\n \r\n this.setReplay(true);\r\n }", "public int getPartyCount()\n\t{\n\t\tint r = 0;\n\t\tfor(int i = 0; i < m_pokemon.length; i++)\n\t\t\tif(m_pokemon[i] != null)\n\t\t\t\tr++;\n\t\treturn r;\n\t}", "int getPointsCount();", "private void analyzePile(ArrayList<Card> pile, CardSuit trump) {\n for (int i = 0; i < pile.size(); i++) {\n CardValue value = pile.get(i).getValue();\n CardSuit suit = pile.get(i).getSuit();\n if (value == CardValue.ACE || value == CardValue.THREE)\n this.loads++;\n if (suit == trump)\n this.trumps++;\n\n }\n }", "public int howManyPieces() {\n int totalPieces = 0;\n // for each item in stock\n for (int i = 0; i < this._noOfItems; i++) {\n // add the quantity of the item to the sum\n totalPieces += this._stock[i].getQuantity();\n }\n // and return the total of quantities\n return totalPieces;\n }", "public int precioTotalRepuestos() {\n int sumaTotal = 0;\n for (Dispositivo dispositivo : dispositivos) {\n sumaTotal += dispositivo.getPrecioRepuesto();\n }\n return sumaTotal;\n }", "public int getPlayerTotal() {\n\t\t\treturn playerTotal;\n\t\t}", "private int getTotalShareValue(Player player){\n return player.getShares().get(0) * game.apple.getSharePrice() + player.getShares().get(1) * game.bp.getSharePrice() +\n player.getShares().get(2) * game.cisco.getSharePrice() + player.getShares().get(3) * game.dell.getSharePrice() +\n player.getShares().get(4) * game.ericsson.getSharePrice();\n }", "public int totalWorth() {\n\t\tint val = 0;\n\t\tfor (Card c : cards) {\n\t\t\tval += c.value();\n\t\t}\n\t\treturn val;\n\t}", "public void countPoints() {\n points = 0;\n checkAnswerOne();\n checkAnswerTwo();\n checkAnswerThree();\n checkAnswerFour();\n checkAnswerFive();\n checkAnswerSix();\n checkAnswerSeven();\n checkAnswerEight();\n checkAnswerNine();\n checkAnswerTen();\n }", "public int findTotalPapersWithVariants() throws DAOException;", "int numberOfPizzas() {\n return pizzas.size();\n }", "public int getHopCount()\r\n/* */ {\r\n/* 168 */ return this.nHops;\r\n/* */ }", "public int getHats() {\n return totalHats;\n }", "int getSnInfoCount();", "int getSnInfoCount();", "int getSnInfoCount();", "public int countAvailablePowers (Power p) {\n return countPowers(p, 1);\n }", "public int getHandSize() {\r\n\t\treturn playerCards.size();\r\n\t}", "public static Integer getNumberOfships() {\n\t\treturn NUMBEROFSHIPS;\n\t}", "public int numPlayers(){\n return this.members.size();\n }", "public int getHandSize(){\n\t\treturn hand.size();\n\t\t\t\t\n\t}" ]
[ "0.7091829", "0.6806847", "0.67463225", "0.64788634", "0.643758", "0.6409641", "0.6400453", "0.63938296", "0.6389732", "0.63837695", "0.63791597", "0.63432235", "0.6313432", "0.6303532", "0.6301145", "0.6289023", "0.62314415", "0.6230608", "0.6230371", "0.62105405", "0.62097085", "0.6204405", "0.6193957", "0.619062", "0.618671", "0.61766183", "0.6173773", "0.61684453", "0.61608434", "0.61453897", "0.61348695", "0.61083907", "0.6098515", "0.60939854", "0.608358", "0.60609215", "0.60603505", "0.6049478", "0.60479563", "0.6037377", "0.60342693", "0.6030736", "0.6029548", "0.6025137", "0.60216564", "0.6021438", "0.601854", "0.6011951", "0.59943986", "0.59934807", "0.5991724", "0.5991357", "0.59825283", "0.5972024", "0.59655875", "0.5963831", "0.59508365", "0.59494984", "0.5933393", "0.59286696", "0.59244704", "0.59216857", "0.5921449", "0.59165734", "0.5904761", "0.5904075", "0.59022564", "0.5897105", "0.58964217", "0.58964217", "0.5893546", "0.5890692", "0.5890543", "0.58854383", "0.5883874", "0.58833987", "0.5878635", "0.58743876", "0.5873509", "0.5872315", "0.5867942", "0.58672726", "0.5862692", "0.58613837", "0.5860025", "0.58577377", "0.58486784", "0.5841894", "0.58386546", "0.58285874", "0.58191484", "0.58135974", "0.58003813", "0.58003813", "0.58003813", "0.5793639", "0.5787147", "0.57734466", "0.5768439", "0.5764953" ]
0.64878476
3
returns if the player passed
public boolean getPassed(){ return passedLastMove; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isPlayerTurn();", "public boolean passPlayer() {\n if (this.state == 2) {\n if (this.playerBet != this.serverBet && this.money_server != 0 && this.money_player !=0) {\n return false;\n }\n // player moves and is dealer\n if (this.dealer == 1) {\n this.betRound += 1;\n if(this.betRound == 1){\n this.state = 3;\n }\n else{\n this.state = 4;\n }\n return true;\n } else {\n this.state = 1;\n return true;\n }\n } else {\n // server moves and is dealer\n if (this.dealer == 0) {\n this.betRound += 1;\n if(this.betRound == 1){\n this.state = 3;\n }\n else{\n this.state = 4;\n }\n return true;\n } else {\n this.state = 2;\n return true;\n }\n }\n }", "public boolean checkPlays(Player player){\n return true;\n }", "@Override\r\n\t\tpublic boolean isPlayer() {\n\t\t\treturn state.isPlayer();\r\n\t\t}", "public abstract boolean isPlayer();", "private boolean isOver() {\r\n return players.size() == 1;\r\n }", "public boolean isPass() {\n return playerMove != null && playerMove.getTypeOfChoice() == TypeOfChoiceEnum.PASS;\n }", "@Override\n\tpublic boolean playerWon() {\n\t\treturn lastPlayerWin;\n\t}", "private boolean passTurn() {\n\n\t\t// Return Boolean\n\t\tboolean ableToPassTurn = false;\n\n\t\tint playerOnTurn;\n\n\t\t// Get the playerID who is on turn\n\t\tplayerOnTurn = pTSM.playerOnTurn(gameID);\n\n\t\t// Check if the ID is equal to the playerID\n\t\ttry {\n\t\t\tif (playerOnTurn == this.userID && modelClass.gameIsWon(pTSM.getUsername(userID), gameID)) {\n\t\t\t\tthis.message = \"Het is niet jou beurt\";\n\t\t\t\tableToPassTurn = true;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tif (playerOnTurn == this.userID) {\n\t\t\t\tableToPassTurn = true;\n\t\t\t}\n\t\t}\n\n\n\t\treturn ableToPassTurn;\n\t}", "boolean isGameComplete();", "public boolean topPlayerWon() {\n return winner == 2;\n }", "public boolean checkToProceed(){\n return getGame().getCurrentPlayer().getRemainingActions() > 0;\n }", "public boolean amIWinning(){\n if (playerScore > oppoScore) {\n return true;\n } else {\n return false;\n }\n }", "public boolean whoIsHere(){\r\n\t\treturn otherPlayer;\r\n\t}", "protected abstract boolean isPlayerActivatable(PlayerSimple player);", "@Override\n public boolean isPlayer() {\n return super.isPlayer();\n }", "public boolean isPlayer() {\n return player != null;\n }", "public boolean GameOver() {\r\n if(Main.player1.SuaVida()==0 || Main.player2.SuaVida()==0)\r\n return true;\r\n return false;\r\n }", "boolean isPlayableInGame();", "public boolean activeFor(String player);", "public void playerWon()\r\n {\r\n \r\n }", "public boolean meWin(){\n return whitePieces.size() > blackPieces.size() && isWhitePlayer;\n }", "public boolean gameWon(){\n return false;\n }", "private boolean didPlayerWin() {\r\n for (int i = 0; i < targets.length; i++) {\r\n if (targets[i].getHitPoints() != 0) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public static void checkResult() {\n\t\tint sum = PlayerBean.PLAYERONE - PlayerBean.PLAYERTWO;\n\n\t\tif (sum == 1 || sum == -2) {\n\t\t\tScoreBean.addWin();\n\t\t\tresult = \"player one wins\";\n\t\t} else {\n\t\t\tScoreBean.addLoss();\n\t\t\tresult = \"player two wins\";\n\t\t}\n\t}", "public boolean isSetPlayer() {\n return this.player != null;\n }", "public abstract boolean isPossible(Player p);", "public boolean playerWonGame(Player player) {\n if (playerWonGameWithDiagonalLine(player) || playerWonGameWithHorizontalLine(player)\n || playerWonGameWithVerticalLine(player)) {\n return true; \n }\n return false; \n \n }", "private void checkPlayerCondition()\n\t{\n\t\tif (playerExists() && PlayerAccess.getPlayer().isInExit())\n\t\t{\n\t\t\twon = true;\n\t\t}\n\t\tif (playerIsDead())\n\t\t{\n\t\t\tMapInstance.getInstance().levelRestart();\n\t\t}\n\t\tif (playerHasLost())\n\t\t{\n\t\t\tlost = true;\n\t\t}\n\t\tif (runOutOfTime())\n\t\t{\n\t\t\tPlayerAccess.getPlayer().die();\n\t\t}\n\t}", "boolean GameOver() {\n\t\treturn player.isDead();\n\t}", "public boolean gameIsOver() {\r\n int cpt = 0;\r\n for (Player p : players) {\r\n if (p.getLife() > 0) {\r\n cpt++;\r\n }\r\n }\r\n return cpt==1;\r\n }", "private boolean isOver() {\n for (Player player : players) {\n if (player.getHand().length == 0) {\n System.out.println(\"Player '\" + player.getName() + \"' won!\");\n winner = player.getID();\n return true;\n }\n }\n\n return false;\n }", "public boolean hasTurn() {\n\t\treturn world.getCurrentPlayer() == this;\n\t}", "public boolean isPlayerWinner(int player)\n {\n return players[player] == 100;\n }", "@Override\n public boolean gameOver() {\n return player1Wins() || player2Wins();\n }", "public boolean isPlayerAlive() {\r\n\t\treturn !(this.getRobotsAlive().isEmpty());\r\n\t}", "public boolean isPlayerTurn() {\n return playerTurn;\n }", "public boolean gameOver() {\r\n return didPlayerLose() || didPlayerWin();\r\n }", "boolean isGameOver();", "boolean isGameOver();", "private boolean playerWin(Board board)\n {\n return check(board, PLAYER);\n }", "public static boolean getIsPlayersTurn()\r\n {\r\n return isPlayersTurn;\r\n }", "boolean isPlayable();", "boolean hasPlayer(String player);", "public boolean gameOver(){\n\t\treturn this.lives < 1;\n\t}", "boolean isGameSpedUp();", "public Boolean waitingUser(){\n\t\tif (currentPlayer == 0){\n\t\t\tSystem.out.println(\"You are the first player, changing waitingUser to true\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isPass(int playerID){\n // if there have been three passes and the user passes then the middle is turn invisible\n if(numPass == 3 && turn == playerID){\n numPass++;\n // make sure turn goes back to 0 if player is 4\n if(turn == 3){\n turn = 0;\n }\n else{\n turn++;\n }\n gameStage++;\n middleVisible = false;\n return true;\n }\n\n // if numPass is not three or 7 then they can pass normally\n else if(numPass < 7 && numPass != 3 && turn == playerID){\n numPass++;\n // case for player four switching to player 1\n if(turn == 3){\n turn = 0;\n }\n else{\n turn++;\n }\n return true;\n }\n\n // if numPass is 7 then the user cannot pass\n else if(numPass == 7 && turn == playerID){\n return false;\n }\n return false;\n }", "public boolean gameWon(){\n\t\treturn Game.gameWon;\n\t}", "@Test\n public final void testPlayer1Win() {\n checkPlayerWin(player1);\n }", "private void checkIfMyTurn(boolean currPlayer) {\n gameService.setMyTurn(currPlayer);\n System.out.println();\n System.out.println(\"My turn now: \" + gameService.isMyTurn());\n\n if (! currPlayer) {\n gameService.setLabelTurnText(\"Wait for your turn.\");\n updateFields(gameService.receiveUpdates());\n } else {\n gameService.setLabelTurnText(\"Your turn!\");\n }\n }", "public boolean userStillInGame() {\n return playersInGame.contains(humanPlayer);\n }", "boolean hasPlayerBag();", "@java.lang.Override\n public boolean hasPlayer() {\n return player_ != null;\n }", "public boolean encountered(){\n boolean encounter = false;\n\n int stepsNeeded = player.getDestination().getStepsNeeded();\n\n float percent = (chance * 1.0f / stepsNeeded * 1.0f) * 100;\n float result = r.nextFloat() * 100;\n\n if(result <= percent && percent >= 20) {\n encounter = true;\n }\n\n return encounter;\n }", "boolean hasGameEndedResponse();", "public boolean isPassed() {\r\n\t\treturn passed;\r\n\t}", "public boolean meTurn(){\n return (isWhite && isWhitePlayer) || (!isWhite && !isWhitePlayer);\n }", "public abstract void isUsedBy(Player player);", "public boolean winner(){\n\t\treturn goals1 > goals2;\n\t}", "public boolean continueGame(){\n for (Player p : super.getPlayers()) {\n // check if p is dead\n if (p.isDead()) {\n return false;\n }\n }\n return true;\n }", "public boolean checkForWin(){\n\t\t\n\t\tPlayer p = Game.getCurrPlayer();\n\t\t// if player made it to win area, player won\n\t\tif(p.won()){\n\t\t\tGame.gameWon = true;\n\t\t\tthis.network.sendWin();\n\t\t\treturn true;\n\t\t}\n\t\t// if player is the last player on the board, player won\n\t\tif(numPlayers == 1 && !p.hasBeenKicked()){\n\t\t\tGame.gameWon = true;\n\t\t\tthis.network.sendWin();\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean needPlayer() {\n\t\treturn false;\n\t}", "public boolean playerWins(){\n return playerFoundTreasure(curPlayerRow, curPlayerCol);\n }", "public void checkWin(){\n boolean result = false;\n if(game.getTurn() > 3){\n Player currentPlayer = game.getPlayerTurn();\n int playernumber = currentPlayer.getPlayericon();\n result = game.winChecker(game.getBored(),playernumber);\n if(result == true) {\n setWinMsgBox(currentPlayer.getPlayerName() + \" Is victorious :)\",\"WIN\");\n }else if(game.getTurn() == 8 && result == false){\n setWinMsgBox(\"Too bad it is a draw, No one out smarted the other -_-\",\"DRAW\");\n }else{}\n }else{\n result = false;\n }\n }", "boolean isMyTurn();", "boolean hasSendPlayerName();", "public boolean isWin_CommanderVimes(){\r\n // player got LordSelachii card\r\n Player playerHoldCard = null;\r\n for (Player player : discWorld.getPlayer_HASH().values()) {\r\n if (player.getPersonalityCardID() == 7) {\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if(playerHoldCard != null){\r\n if(discWorld.getShuffled_PlayerCard().size() == 0){\r\n return true;\r\n }\r\n } \r\n \r\n return false;\r\n }", "Boolean isPlaying() {\n return execute(\"player.playing\");\n }", "public boolean isPlayer1() {\n\t\treturn currentPlayer.equals(player1);\n\t}", "private boolean winGame() {\n if (model.isCompleted()) {\n win.message(\"Winner\");\n return true;\n }\n return false;\n }", "@Override\n\tpublic boolean checkWinner( int player) {\n\t\t\n\t\treturn didWin(player, -1, 0) ||\n\t\t\t\tdidWin(player, 0, -1) ||\n didWin(player, -1, -1) ||\n didWin(player, 1, -1);\n\t}", "public boolean gameOver() {\n return winner() != null;\n }", "private boolean isPlayerTurn(Move move) {\n return this.turn == move.getPlayer().getId();\n }", "public boolean isGameOver();", "public boolean isGameOver();", "public boolean gameContinue() {\n for (Player player : players) {\n if (player.getPoints() > END_GAME_POINTS) {\n return false;\n }\n }\n return true;\n }", "public boolean hasPlayer() {\n return playerBuilder_ != null || player_ != null;\n }", "public boolean isGameOver() {\n if (!isFirstTurn) {\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS||state.score().totalPoints(TeamId.TEAM_2)>=Jass.WINNING_POINTS) {\n return true;\n }\n else {\n return false;\n }\n } \n else {return false;}\n }", "Boolean isPassed();", "private boolean checkGameStatus() {\n int res = model.getWinner();\n if (res == Model.DRAW) {\n draw();\n return false;\n } else if (res == Model.WHITE) {\n whiteScore++;\n view.getPrompt().setText(whiteName + \" win!\");\n prepareRestart();\n return false;\n } else if (res == Model.BLACK) {\n blackScore++;\n view.getPrompt().setText(blackName + \" win!\");\n prepareRestart();\n return false;\n }\n return true;\n }", "public boolean isHasPlayer() {\n\t\treturn HasPlayer;\n\t}", "public boolean hasPassed()\n {\n return status == Status.PASSED || status == Status.SKIPPED;\n }", "boolean playerExists() {\n return this.game.h != null;\n }", "public boolean gameOver()\n {\n boolean over = false;\n if (player1Hand.isEmpty()||player2Hand.isEmpty())\n {\n over = true;\n }\n return over;\n }", "@Test\n public final void testPlayer2Win() {\n checkPlayerWin(player2);\n }", "public boolean gameOver();", "public boolean gameOver();", "boolean hasPass();", "boolean hasPass();", "public boolean isOnPlayerOne() {\r\n\t\treturn onTraderOne;\r\n\t}", "public boolean hasPassed()\n {\n if (y<=450.0f)\n return false;\n else\n return true;\n }", "public boolean verifyEndGame(Player gamer);", "private boolean attempt2GetPlayerFromHomeSucceds(Player player)\n {\n boolean blu = false;\n boolean red = false;\n boolean green = false;\n boolean yellow = false;\n if (player.getSteps_moved() == 0 && getValue_from_die() == 6)\n {\n if (getPerson_to_play() == 1)\n {\n blu = try2GetBluePlayerFromHome(player);\n if (blu)\n {\n BlueEatsPlayer(player);\n }\n }\n else if (getPerson_to_play() == 2)\n {\n red = try2GetRedPlayerFromHome(player);\n if (red)\n {\n RedEatsPlayer(player);\n }\n }\n else if (getPerson_to_play() == 3)\n {\n green = try2GetGreenPlayerFromHome(player);\n if (green)\n {\n GreenEatsPlayer(player);\n }\n }\n else if (getPerson_to_play() == 4)\n {\n yellow = try2GetYellowPlayerFromHome(player);\n if (yellow)\n {\n YellowEatsPlayer(player);\n }\n }\n\n\n if (blu || red || green || yellow)\n {\n value_from_die = 0;\n ludo.setDrawScoreAllowed(false);\n playPlayerHasMovedMusic();\n return true;\n }\n }\n return false;\n }", "public int checkChasingPlayer()\n {\n if(stunCountdown > 0)\n {\n chasingPlayer = false;\n return stunCountdown;\n }\n if(Game.getInstance().getPlayer().getCurrentRoom().isControlRoom())\n {\n chasingPlayer = false;\n return(-1);\n }\n else\n {\n List<Exit> neighbors = getCurrentRoom().getCollectionOfExits();\n for(Exit neighbor : neighbors)\n {\n if(getCurrentRoom().getExit(neighbor).equals(Game.getInstance().getPlayer().getCurrentRoom()) && neighbor.isOperating())\n {\n chasingPlayer = true;\n return(5 + (int) Math.floor(Math.random() * 6));\n }\n }\n chasingPlayer = false;\n return(-1);\n }\n }", "public void isGameOver() { \r\n myGameOver = true;\r\n myGamePaused = true; \r\n }", "public boolean timeUp(){\n return timeAlive == pok.getSpawnTime(); \n }", "public boolean gameOver() \n {\n \treturn status() != GAME_NOT_OVER;\n }", "public boolean stepOn(Player player) {\n //System.out.println(\"Nem léphetsz rá a MapElementre.\");\n return false;\n }", "public boolean taken() {\n return pawn.getLives() != 0;\n }" ]
[ "0.7623023", "0.7443885", "0.73688173", "0.7317376", "0.7304161", "0.7227534", "0.7221371", "0.72136766", "0.7200113", "0.7092009", "0.70431423", "0.6996605", "0.69959575", "0.69378084", "0.69231904", "0.69204265", "0.691376", "0.6904627", "0.6875113", "0.6851041", "0.6846439", "0.68279964", "0.6815879", "0.681431", "0.68090874", "0.6778676", "0.67683333", "0.6755583", "0.67253834", "0.6724648", "0.6724142", "0.67190075", "0.6713726", "0.67038345", "0.6691975", "0.66905284", "0.6669567", "0.6660798", "0.66606504", "0.66606504", "0.66586834", "0.66583717", "0.66561365", "0.66502714", "0.664125", "0.66391975", "0.66289985", "0.6623695", "0.6623261", "0.66165733", "0.6607991", "0.66022545", "0.65974706", "0.65884125", "0.65858436", "0.65818423", "0.65760374", "0.6572415", "0.65663755", "0.65647244", "0.65646964", "0.65595144", "0.65589184", "0.6536994", "0.6519582", "0.6518626", "0.6513038", "0.6511644", "0.65098363", "0.65096116", "0.65036106", "0.64930856", "0.64895463", "0.6488994", "0.64882416", "0.64882416", "0.64815795", "0.647601", "0.6475173", "0.6471843", "0.6471453", "0.64681333", "0.6456753", "0.6456074", "0.64425457", "0.6438185", "0.64380276", "0.64380276", "0.643516", "0.643516", "0.64317256", "0.64295465", "0.64290404", "0.642874", "0.642856", "0.64262927", "0.6425245", "0.64196646", "0.6418543", "0.6403362" ]
0.66543317
43
sets the player passed boolean
public void setPassed(boolean passed){ passedLastMove=passed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}", "public void setSinglePlayer(){\n isSinglePlayer = true;\n }", "boolean setPlayer(String player);", "public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }", "public void setPlayerState(boolean state)\n\t{\n\t\tthis.blnPlayerState = state;\n\t\t\n\t}", "public boolean setPlayer(Player aNewPlayer)\r\n {\r\n boolean wasSet = false;\r\n player = aNewPlayer;\r\n wasSet = true;\r\n return wasSet;\r\n }", "public void setPlay(boolean var)\n\t{\n\t\tcanPlay = var;\n\t}", "public void setIsPlaying(boolean a) {\n\t\tthis.isPlaying = !this.isPlaying;\n\t}", "public void setTurning(java.lang.Boolean value);", "public void setActive(Player p, boolean value) {\n this.getInstance(p).setActive(value);\n }", "public synchronized void setMyGameStatus(boolean status)\n {\n \tgameStatus=status;\n }", "public void switchPlayer() {\n \tisWhitesTurn = !isWhitesTurn;\n }", "public void set(boolean bol);", "void set(boolean on);", "public void setInGame() {\n this.inGame = true;\n }", "public void togglePlay() { }", "public void setYourTurn(Boolean yourTurn) {\n this.yourTurn = yourTurn;\n }", "public void testSetIsPlayable()\n {\n assertEquals(b1.getIsPlayable(), false);\n b1.setIsPlayable(true);\n assertEquals(b1.getIsPlayable(), true);\n\n }", "void set(boolean value);", "public void setPlayState(PlayerState state) { isPaused = !state.playing; }", "public void setInplay(Boolean inplay){\n this.inplay = inplay;\n }", "@Override\n public void setPlayerDoneBrainstorming(Player player, boolean value){\n DatabaseReference currentRef = database.getReference(gameCodeRef).child(\"Players\").child(player.getUsername());\n currentRef.child(\"DoneBrainstorming\").setValue(value);\n if(value){\n updateNrPlayerValues(\"PlayersDoneBrainstorming\");\n }\n }", "public void changeTurn()\r\n {\r\n isPlayersTurn = !isPlayersTurn;\r\n }", "void play(boolean fromUser);", "void togglePlay();", "void setBoolean(boolean value);", "public void setIsTrack(boolean isTrack){\n this.isTrack = isTrack;\n }", "public void set_boolean(boolean param) {\n this.local_boolean = param;\n }", "public void setAlive(boolean alive){\n // make sure the enemy can be alive'nt\n this.alive = alive; \n }", "void setAlive(boolean isAlive);", "public void setPlayerTurn(boolean playerTurn) {\n this.playerTurn = playerTurn;\n }", "public abstract void setInput(boolean value);", "public void setOn(boolean arg) {\n isOn = arg;\n }", "void setMoving(boolean isMoving);", "public void setHasPlayer(boolean hasPlayer) {\n\t\tHasPlayer = hasPlayer;\n\t}", "public void playerMissedBall(){ active = false;}", "public void setWon(){\n won = true;\n }", "public void setPlaying(boolean playing) {\n this.playing=playing;\n }", "default void toggle(boolean fromUser) {\n if (isPlaying()) {\n pause(fromUser);\n } else {\n play(fromUser);\n }\n }", "private void setGameStatus() {\n this.gameStatus = false;\n }", "public void setIsTurn()\n\t{\n\t\tthis.isTurn = true;\n\t}", "public synchronized void setMyTurn(boolean status)\n {\n \tmyTurn[0]=status;\n }", "public void play() \n{\n s = !s; \n if (s == false)\n {\n //pausets = millis()/4;\n controlP5.getController(\"play\").setLabel(\"Play\");\n } else if (s == true)\n {\n //origint = origint + millis()/4 - pausets;\n controlP5.getController(\"play\").setLabel(\"Pause\");\n }\n}", "public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }", "@Override\n\tpublic void setPlayer(Player player) {\n\n\t}", "@Override\r\n\tpublic void set(final Player t) {\n\r\n\t}", "public void setOn(){\n state = true;\n //System.out.println(\"Se detecto un requerimiento!\");\n\n }", "public void setAlive(boolean x){\n \talive = x;\r\n }", "void setSet(boolean set);", "public void setIsModifier(java.lang.Boolean value);", "void mute() {\n execute(\"player.muted = true\");\n }", "public void setGameStarted(boolean gameStarted) {\n this.gameStarted = gameStarted; \n }", "public void turn_on () {\n this.on = true;\n }", "public void acivatePlayer() {\n\t\tthis.setEnabled(true);\n\t}", "void pauseGame() {\n myShouldPause = true;\n }", "void pauseGame() {\n myShouldPause = true;\n }", "public void setTallied(java.lang.Boolean value);", "public void setSoundShot(final boolean sShot) { soundShot = sShot; }", "protected abstract void assignTeam(boolean playerR, boolean playerB);", "public void setPlayer(boolean isWhiteTurn) {\n\t\tif (isWhiteTurn == true) setGraphic(new ImageView(whitePiece));\n\t\tif (isWhiteTurn == false) setGraphic(new ImageView(blackPiece));\n\t\tisActiveImageOn = false;\n\t}", "public void setPlayer(int play)\n {\n this.player=play;\n }", "void pauseGame() {\n myGamePause = true;\n }", "public void setEnabled(boolean arg){\r\n\t\tenabled = arg;\r\n\t\tif(!arg){\r\n\t\t\tstop(0);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tsonido = new Sonido(path,true);\r\n\t\t}\r\n\t}", "public abstract boolean isPlayer();", "public void setPlayer(Player player) {\r\n this.player = player;\r\n }", "public void setFaceUp(){faceUp = true;}", "@Override\n public boolean isPlayer() {\n return super.isPlayer();\n }", "private void setPlayer() {\n player = Player.getInstance();\n }", "public void resetPlayerPassed() {\n d_PlayerPassed = false;\n }", "public void set(boolean a, boolean b) {\n\t\ta = b;\r\n\t}", "synchronized void toggle() {\n try {\n myShouldPause = !myShouldPause;\n if (myShouldPause) {\n if (myPlayer != null) {\n myPlayer.stop();\n }\n } else if (!myGamePause) {\n // if the player is null, we create a new one.\n if (myPlayer == null) {\n start();\n }\n // start the music.\n myPlayer.start();\n }\n } catch (Exception e) {\n // the music isn't necessary, so we ignore exceptions.\n }\n }", "public void setValue(boolean value) {\n this.value = value;\n }", "public void setBool(String parName, boolean parVal) throws HibException;", "public void setTurned(){\n\tIS_TURNED = true;\n\tvimage = turnedVimImage;\n }", "public void setPiston(boolean x){\n armPiston.set(x);\n }", "public Boolean getInplay(){\n return inplay;\n }", "public void setPlaying() {\n\t\tstate = State.INGAME;\n\t}", "private void setPlayer()\t{\n\t\tgrid.setGameObject(spy, Spy.INITIAL_X, Spy.INITIAL_Y);\n\t}", "public void setPlayer(Player player) {\n this.player = player;\n }", "public void setPlayer(Player player) {\n this.player = player;\n }", "public void setScreenOnWhilePlaying(StarObjectClass self,boolean screenOn){ \r\n \t\tStarCLEMediaPlayer mediaplayer = (StarCLEMediaPlayer)WrapAndroidClass.GetAndroidObject(self,\"AndroidObject\");\r\n \t\tif( mediaplayer == null )\r\n \t\t\treturn;\r\n \t\tmediaplayer.setScreenOnWhilePlaying(screenOn);\r\n \t}", "@Override\n\tpublic void setBool(boolean bool) {\n\t\t/*\n\t\t * Handles the translation of boolean to the internal representation (Color, int, whatever we decide)\n\t\t */\n\t\tint BLACK = 0x000000;\n\t\tint WHITE = 0xFFFFFF;\n\t\tcolor = bool ? BLACK : WHITE;\n\n\t}", "@Override\r\n\t\tpublic boolean isPlayer() {\n\t\t\treturn state.isPlayer();\r\n\t\t}", "public void setValue(boolean value) {\n this.value = value;\n }", "private void setUIStatePlaying(){\n play.setEnabled(false);\n pause.setEnabled(true);\n stop.setEnabled(true);\n }", "public void setPlayer(Player player) {\n\t\tthis.player = player;\r\n\t}", "public void setValidated(Player p, boolean value) {\n this.getInstance(p).setValidated(value);\n }", "public void setAchieved(Boolean newValue);", "public boolean setPlayerToMove(Player aNewPlayerToMove)\n {\n boolean wasSet = false;\n if (aNewPlayerToMove != null)\n {\n playerToMove = aNewPlayerToMove;\n wasSet = true;\n }\n return wasSet;\n }", "@Override\n public void setPlayerDoneEliminating(Player player, boolean value) {\n DatabaseReference currentRef = database.getReference(gameCodeRef).child(\"Players\").child(player.getUsername());\n currentRef.child(\"DoneEliminating\").setValue(value);\n if(value){\n updateNrPlayerValues(\"PlayersDoneEliminating\");\n }\n\n }", "public abstract void setCheck(Boolean check);", "public void setIsChosen(boolean isChosen);", "public void setParking(java.lang.Boolean value);", "public void turnOn(boolean truth) {\r\n setEnabled(truth);\r\n }", "public void setPlayer(Player _player) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n player = _player;\n }", "public void setTalking(boolean b)\n\t{\n\t\tm_isTalking = b;\n\t}", "public void setPaused(boolean yes){\n MotionViewer.this.setPaused(yes);\n }", "public boolean isSetPlayer() {\n return this.player != null;\n }", "public boolean setPropertyUnityGain(boolean aValue);", "public void pauseGame(boolean state) {\r\n paused = state;\r\n }", "public boolean switchPlayer() {\n\t\t\n\t\t// If player01 is currently active..\n\t\tif(player01.getIsCurrentlyPlaying()){\n\t\t\t\n\t\t\tplayer01.setIsCurrentlyPlaying(false);\n\t\t\tplayer02.setIsCurrentlyPlaying(true);\n\t\t\treturn true;\n\t\t\t// If player02 is currently active..\n\t\t}else {\n\t\t\t\n\t\t\tplayer01.setIsCurrentlyPlaying(true);\n\t\t\tplayer02.setIsCurrentlyPlaying(false);\n\t\t\treturn false;\n\t\t}\n\t}" ]
[ "0.82125413", "0.7694431", "0.7575787", "0.7502997", "0.73827434", "0.71865064", "0.71295136", "0.712812", "0.7045831", "0.7032936", "0.7000311", "0.6910834", "0.68834716", "0.68825936", "0.68813235", "0.6877444", "0.6848306", "0.6844957", "0.6841099", "0.6821303", "0.6799733", "0.67638755", "0.675222", "0.6743954", "0.6717855", "0.66826063", "0.66724646", "0.6667543", "0.66528857", "0.6651326", "0.66443354", "0.6640126", "0.6619699", "0.6613904", "0.66132206", "0.6603019", "0.65923566", "0.65774715", "0.6575758", "0.6572233", "0.6569414", "0.6562535", "0.6561163", "0.65535", "0.6551401", "0.6526665", "0.64889747", "0.6486344", "0.64838094", "0.6477293", "0.6473627", "0.645709", "0.6435072", "0.6433918", "0.6423413", "0.6423413", "0.64076626", "0.6376953", "0.6369759", "0.6366625", "0.6359972", "0.63558376", "0.6346958", "0.63446057", "0.63388485", "0.6316024", "0.6311468", "0.6306249", "0.6295626", "0.62811166", "0.62793934", "0.6277539", "0.6270534", "0.6264723", "0.62566626", "0.6252244", "0.62488467", "0.624346", "0.6241819", "0.6238548", "0.6234362", "0.62190384", "0.62169075", "0.62137705", "0.62114847", "0.6188749", "0.61798936", "0.61787003", "0.6178258", "0.61656904", "0.61646706", "0.6155757", "0.6153747", "0.61455667", "0.6142729", "0.6132034", "0.61289173", "0.6127584", "0.61233693", "0.6121611", "0.6119977" ]
0.0
-1
checks if a player has tile
public boolean hasTile(Tile a_tile){ for(int i = 0; i < playerHand.size(); i++){ if(playerHand.get(i).getLeft() == a_tile.getLeft() && playerHand.get(i).getRight() == a_tile.getRight()){ return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasTiles()\r\n\t{\r\n\t\treturn _tiles.size() != 0;\r\n\t}", "boolean checkWin(Tile initialTile);", "public boolean hasTile(GroundTile tile) {\n return this.editedTiles.contains(tile);\n }", "private boolean checkTileExists(int x, int y, int zoom) {\n \t int minZoom = 12;\n \t int maxZoom = 16;\n\n \t if ((zoom < minZoom || zoom > maxZoom)) {\n \t return false;\n \t }\n\n \t return true;\n \t }", "public boolean tileOccupied(int x, int y, int pno){\n\t\tfor (int key : playerPosition.keySet()){\n\t\t\tif (key != pno){\n\t\t\t\tint a = playerPosition.get(key)[0];\n\t\t\t\tint b = playerPosition.get(key)[1];\n\t\t\t\tif (a == x && b == y){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean isTileOnMap(int x, int y) {\n\t\treturn getTileAt(x, y) != null;\n\t}", "public boolean canPung(int tile) {\n\t\tint[] numbers = getTileNumbers();\n\t\tint instances = TileAnalyser.in(tile, numbers);\n\t\treturn instances>1;\n\t}", "public boolean hasShip(int tile) {\r\n return (tiles[tile] & 1) != 0;\r\n }", "private static boolean comparePlayerPosition(RSTile tile) {\n RSTile player_position = Player07.getPosition();\n if (tile == null || player_position == null) {\n return false;\n }\n return tile.equals(player_position);\n }", "@Override\n\tpublic boolean isUseableByPlayer(EntityPlayer player){\n\t return worldObj.getTileEntity(xCoord, yCoord, zCoord) != this ? false : player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64.0D;\n\t}", "boolean canMove(Tile t);", "public boolean hasSelectedTile()\r\n\t{\r\n\t\treturn (selectedTile != null);\r\n\t}", "public boolean tileOfHuman (int row, int col){\n return this.gameBoard[row][col] == 'o';\n }", "private void recheckTileCollisions() {\n\t\tint len = regTiles.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tRegTile tile = regTiles.get(i);\n\t\t\t\n\t\t\ttry{\n\t\t\t\tif(OverlapTester.overlapRectangles(player.bounds, tile.bounds)) {\n\t\t\t\t\t//check-x cols and fix\n\t\t\t\t\tif(player.position.x > tile.position.x - tile.bounds.width/2 && player.position.x < tile.position.x + tile.bounds.width/2 && player.position.y < tile.position.y + tile.bounds.height/2 && player.position.y > tile.position.y - tile.bounds.height/2) {\n\t\t\t\t\t\tif(player.position.x < tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x - 1;\n\t\t\t\t\t\t} else if(player.position.x > tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}", "boolean playerExists() {\n return this.game.h != null;\n }", "public boolean checkGameOver(){\n\t\tfor(int x = 0; x < this.tile[3].length; x++){\n\t\t if(this.isFilled(3, x)){\n\t\t \tSystem.out.println(\"game over\");\n\t\t return true;\n\t\t }\n\t\t}\n\t\treturn false;\n\t}", "public boolean tilePlayerPlacable(float xTile, float yTile, int player)\r\n/* 196: */ {\r\n/* 197:220 */ return (tileInBounds(xTile, yTile)) && \r\n/* 198:221 */ (getStartPositionOnTile(player, xTile, yTile));\r\n/* 199: */ }", "public boolean tileGrass(float xTile, float yTile)\r\n/* 212: */ {\r\n/* 213:236 */ return (tileInBounds(xTile, yTile)) && (this.grass[((int)xTile)][((int)yTile)] != 0);\r\n/* 214: */ }", "boolean isGameFinished() {\n if (tiles.takenTilesNumber() < 3)\n return false;\n Symbol winningSymbol = tiles.getTile(1);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) {\n return true;\n }\n }\n if(tiles.getTile(2).equals(winningSymbol)) {\n if(tiles.getTile(3).equals(winningSymbol)) return true;\n }\n if(tiles.getTile(4).equals(winningSymbol)) {\n if(tiles.getTile(7).equals(winningSymbol)) return true;\n }\n }\n winningSymbol = tiles.getTile(2);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(8).equals(winningSymbol)) return true;\n }\n }\n\n winningSymbol = tiles.getTile(3);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(7).equals(winningSymbol)) return true;\n }\n if (tiles.getTile(6).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) return true;\n }\n }\n\n\n winningSymbol = tiles.getTile(4);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(7).equals(winningSymbol)) return true;\n }\n }\n\n winningSymbol = tiles.getTile(7);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(8).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) return true;\n }\n }\n return false;\n }", "public boolean tileExistAndNotMine(int row, int col) {\r\n // Bounds check\r\n if (row >= 0 && row <= (BOARD_MAX_WIDTH - 1)&& col >= 0 && col <= (BOARD_MAX_HEIGHT - 1)) {\r\n // Mine check\r\n return tiles[row][col] != TILE_MINE;\r\n } else {\r\n return false;\r\n }\r\n }", "public boolean hasTileEntity(int metadata)\r\n/* 259: */ {\r\n/* 260:304 */ return true;\r\n/* 261: */ }", "private static boolean isTileAvailable(DisplayTile tile, Direction fromDirection, HashMap<DisplayTile, DisplayTile> chainedTiles) {\n\t\tif (tile == null || chainedTiles.containsKey(tile))\n\t\t\treturn false;\n\t\t\n\t\tif (tile.isRoomTile() && !tile.hasDoor(fromDirection))\n\t\t\treturn false;\n\t\t\t\n\t\tif (tile.hasSuspect() || tile.isRemovedTile())\n\t\t\treturn false;\n\t\t\n\t\tif (tile.isPassage() && tile.getPassageConnection().hasSuspect())\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}", "private boolean playerFoundTreasure(int playerRow, int playerCol){\n return (playerRow == 7 && playerCol == 9);\n }", "public boolean tileRock(float xTile, float yTile)\r\n/* 207: */ {\r\n/* 208:231 */ return (tileInBounds(xTile, yTile)) && (this.rock[((int)xTile)][((int)yTile)] != 0);\r\n/* 209: */ }", "public boolean tileOfComputer (int row, int col){\n return this.gameBoard[row][col] == 'o';\n }", "public boolean isFull ()\n {\n for (int row = 0; row < 3; row++)\n for (int column = 0; column < 3; column++)\n if (getGridElement(row, column).getPlayer() == Player.NONE)\n return false;\n\n return true;\n }", "public boolean isTileOnMap(IntVector2D v) {\n\t\treturn getTileAt(v) != null;\n\t}", "public boolean hasTomb(String player) {\r\n\t\treturn tombs.containsKey(player);\r\n\t}", "@java.lang.Override\n public boolean hasPlayer() {\n return player_ != null;\n }", "boolean canBuildDome(Tile t);", "public boolean tileInBounds(float xTile, float yTile)\r\n/* 111: */ {\r\n/* 112:124 */ return (xTile >= 0.0F) && (xTile < getWidthInTiles()) && (yTile >= 0.0F) && (\r\n/* 113:125 */ yTile < getHeightInTiles());\r\n/* 114: */ }", "boolean haveAnySpawn();", "private boolean isThereLegalTilesNotColored(){\n\n\t\tArrayList<Tile> legalTiles=getAllLegalMoves(Game.getInstance().getCurrentPlayerColor());\n\t\tlegalTiles.removeAll(coloredTilesList);\n\t\tif(legalTiles.isEmpty()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private boolean isOver() {\r\n return players.size() == 1;\r\n }", "boolean isTile(int x, int y, int rotation) {\n return tiles[rotation][dimensions * y + x] == 1;\n }", "public boolean hasPlayerInfo()\n {\n return this.getPlayerInfo() != null;\n }", "public final boolean hasOnePerTileItem(int floorLevel) {\n/* 4849 */ return (this.vitems != null && this.vitems.hasOnePerTileItem(floorLevel));\n/* */ }", "public static boolean isEveryTileFilled() {\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if (tiles.get(new Coordinates(i, j)).getTextFromTile().getText().equals(\"\")) {\n return false;\n }\n }\n }\n return true;\n }", "public boolean isInsideTile(int x, int y){\n\t\treturn (x >= tileX && x <= tileX+tileImage.getWidth() && y >= tileY && y <= tileY+tileImage.getHeight());\n\t}", "private boolean didPlayerWin() {\r\n for (int i = 0; i < targets.length; i++) {\r\n if (targets[i].getHitPoints() != 0) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean isUseableByPlayer(EntityPlayer p_70300_1_) {\n\t\treturn worldObj.getTileEntity(field_145851_c, field_145848_d,\n\t\t\t\tfield_145849_e) != this ? false : p_70300_1_.getDistanceSq(\n\t\t\t\tfield_145851_c + 0.5D, field_145848_d + 0.5D,\n\t\t\t\tfield_145849_e + 0.5D) <= 64.0D;\n\t}", "public boolean isLoaded(P player){\n return playerMap.containsKey(player);\n }", "private void checkRegTileCollisions(float deltaTime) {\n\t\tint len = regTiles.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tRegTile tile = regTiles.get(i);\n\t\t\t\n\t\t\t//overlap between player and tile\n\t\t\t\n\t\t\t//experiment with these values to get close to perfect collisions *************************\n\t\t\ttry {\n\t\t\t\tif(OverlapTester.overlapRectangles(player.bounds, tile.bounds)) {\n\t\t\t\t\t\n\t\t\t\t\t//check y - collisions\n\t\t\t\t\tif(player.position.y > tile.position.y + (tile.bounds.height / 2) && player.position.x - (player.bounds.width / 2) + correctionFactor < tile.position.x + (tile.bounds.width / 2) && player.position.x + (player.bounds.width / 2) - correctionFactor > tile.position.x - (tile.bounds.width / 2)) {\n\t\t\t\t\t\tplayer.velocity.y = 0;\n\t\t\t\t\t\tplayer.position.y = tile.position.y + 1;\n\t\t\t\t\t\tif(player.velocity.x > 3) {\n\t\t\t\t\t\t\tplayer.velocity.x -= 0.2f; //prev. optimal was .3\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(player.position.y < tile.position.y - (tile.bounds.height / 2) && player.position.x - (player.bounds.width / 2) + correctionFactor < tile.position.x + (tile.bounds.width / 2) && player.position.x + (player.bounds.width / 2) - correctionFactor > tile.position.x - (tile.bounds.width / 2)) {\n\t\t\t\t\t\tplayer.velocity.y = 0;\n\t\t\t\t\t\tplayer.position.y = tile.position.y - 1;\n\t\t\t\t\t\tif(player.velocity.x > 3) {\n\t\t\t\t\t\t\tplayer.velocity.x -= 0.2f;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//check x - collision\n\t\t\t\t\tif(player.position.x > tile.position.x + (tile.bounds.width / 2) + correctionFactor && player.position.y - (player.bounds.height / 2) + correctionFactor < tile.position.y + (tile.bounds.height / 2) && player.position.y + (player.bounds.height / 2) - correctionFactor > tile.position.y - (tile.bounds.height / 2)) {\n\t\t\t\t\t\tplayer.velocity.x = 0;\n\t\t\t\t\t\txColliding = true;\n\t\t\t\t\t\tplayer.position.x = tile.position.x + 1; //animate possibly\n\t\t\t\t\t\tif(player.velocity.y > 0) {\n\t\t\t\t\t\t\t//player.velocity.y -= 0.2f;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(player.position.x < tile.position.x - (tile.bounds.width / 2) - correctionFactor && player.position.y - (player.bounds.height / 2) + correctionFactor < tile.position.y + (tile.bounds.height / 2) && player.position.y + (player.bounds.height / 2) - correctionFactor > tile.position.y - (tile.bounds.height / 2)) {\n\t\t\t\t\t\tplayer.velocity.x = 0;\n\t\t\t\t\t\txColliding = true;\n\t\t\t\t\t\tplayer.position.x = tile.position.x - 1; //animate possibly\n\t\t\t\t\t\tif(player.velocity.y > 0) {\n\t\t\t\t\t\t\t//player.velocity.y -= 0.2f;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t} catch (Exception e) {}\n\t\t}\n\t\trecheckTileCollisions(); //fix frame-skipping \n\t}", "public boolean hasTileEntity(IBlockState state) {\n return true;\n }", "public boolean isTileSelected() {\n return selectedTile != null;\n }", "@Test\n public void testGetTile() {\n assertEquals(7, board3by3.getTile(0, 0).getId());\n }", "public boolean isRun() {\n if (!isValid()) {\n return false;\n }\n else {\n if (tiles.get(0).getColour() == tiles.get(1).getColour()) {\n return true;\n } else {\n return false;\n }\n }\n }", "public synchronized boolean isFull() {\r\n\t\treturn (this.players.size() == 6);\r\n\t}", "public boolean canChow(int tile) {\n\t\treturn TileAnalyser.inchow(tile, getTileNumbers())>0;\n\t}", "public boolean playerWins(){\n return playerFoundTreasure(curPlayerRow, curPlayerCol);\n }", "public static boolean canPlayerMove(Player player){\r\n int playerX = 0;\r\n int playerY = 0;\r\n int nX;\r\n int nY;\r\n //finding the player on the board\r\n for(int i = 0; i < board.length; i++) {\r\n for (int j = 0; j < board[i].length; j++) {\r\n if(player.getPosition() == board[i][j]) {\r\n playerX = i;\r\n playerY = j;\r\n }\r\n }\r\n }\r\n //making sure that the player stays on the board\r\n\r\n if(playerY != board[0].length-1) {\r\n nX = playerX;\r\n nY = playerY + 1;\r\n if (board[nX][nY].west && board[playerX][playerY].east && !board[nX][nY].isOnFire) {//if the tile will accept the player\r\n return true;\r\n }\r\n }\r\n\r\n if(playerY != 0) {\r\n nX = playerX;\r\n nY = playerY - 1;\r\n if (board[nX][nY].east && board[playerX][playerY].west && !board[nX][nY].isOnFire) {\r\n return true;\r\n }\r\n }\r\n\r\n if(playerX != 0) {\r\n nX = playerX - 1;\r\n nY = playerY;\r\n if (board[nX][nY].south && board[playerX][playerY].north && !board[nX][nY].isOnFire) {\r\n return true;\r\n }\r\n }\r\n\r\n if(playerX != board.length-1) {\r\n nX = playerX + 1;\r\n nY = playerY;\r\n if (board[nX][nY].north && board[playerX][playerY].south && !board[nX][nY].isOnFire) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }", "public boolean isWalkAbleTile(int x, int y) {\n\t\tfor (Entity e : entities) {\n\t\t\tif (e.getX() >> 4 == x && e.getY() >> 4 == y)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean meWin(){\n return whitePieces.size() > blackPieces.size() && isWhitePlayer;\n }", "boolean hasPlayerBag();", "boolean hasPokemonDisplay();", "boolean canBuildBlock(Tile t);", "private boolean tileIsInbounds(int row, int col){\n\t\treturn row >= 0 && col >= 0\n\t\t\t\t&& row < board.length && col < board[0].length;\n\t}", "public boolean canKong(int tile) {\n\t\treturn TileAnalyser.in(tile, getTileNumbers())>2;\n\t}", "private boolean makeMapTileTakeTurn(int x, int y) {\n MapTile tile_at_x_y = this.getTile(x, y);\n if (tile_at_x_y == null) {\n return false;\n }\n tile_at_x_y.takeTurn();\n return true;\n }", "public static boolean hasWonTheGame(Player player) {\r\n FloorTile pos = null;\r\n for (int i = 0; i < board.length; i++) {\r\n for (int j = 0; j < board[i].length; j++) {\r\n if (player.getPosition() == board[i][j]) {\r\n pos = board[i][j];\r\n }\r\n }\r\n }\r\n if (goalTile == pos) {\r\n for (int i = 0; i < numOfPlayers; i++) {\r\n players[i].getPlayerProfile().incGamesPlayed();\r\n if (player == players[i]) {\r\n players[i].getPlayerProfile().incWins();\r\n } else {\r\n players[i].getPlayerProfile().incLosses();\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean hasNeighbor(Tile tile) {\n if (tile == null) {\n return false;\n }\n\n return (this.tileNorth == tile || this.tileEast == tile || this.tileSouth == tile || this.tileEast == tile);\n }", "public boolean canMine(EntityPlayer player, int X, int Y, int Z);", "public boolean hasPlayer() {\n return playerBuilder_ != null || player_ != null;\n }", "public boolean tileFinish(float xTile, float yTile)\r\n/* 166: */ {\r\n/* 167:189 */ return (tileInBounds(xTile, yTile)) && (this.finish[((int)xTile)][((int)yTile)] != 0);\r\n/* 168: */ }", "public static boolean isTakenCell(int row, int col) {\n return (board[row - 1][col - 1] > 0);\n }", "public static boolean insideBounds(GameTile tile) {\n\n if (tile == null) {\n return false;\n } else {\n\n int x = tile.getXCoord();\n int y = tile.getYCoord();\n\n return !(x < 0 || y < 0) && !(x > TILE_COLS || y > TILE_ROWS);\n\n }\n\n }", "@Test\n public void notOnGroundTest(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{0,0},{0,0}},new byte[][]{{1,0},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,2,2);\n assertFalse(tileMap.isOnGround(cBox));\n }", "public boolean tileWalkable(float xTile, float yTile)\r\n/* 160: */ {\r\n/* 161:183 */ return (!tileInBounds(xTile, yTile)) || \r\n/* 162:184 */ (this.walkable[((int)xTile)][((int)yTile)] != 0);\r\n/* 163: */ }", "private boolean canAddRedTile() {\n\n\t\tif(isAllPiecesEaten(Game.getInstance().getCurrentPlayerColor())) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean isImageTileType();", "private void checkPlayerCondition()\n\t{\n\t\tif (playerExists() && PlayerAccess.getPlayer().isInExit())\n\t\t{\n\t\t\twon = true;\n\t\t}\n\t\tif (playerIsDead())\n\t\t{\n\t\t\tMapInstance.getInstance().levelRestart();\n\t\t}\n\t\tif (playerHasLost())\n\t\t{\n\t\t\tlost = true;\n\t\t}\n\t\tif (runOutOfTime())\n\t\t{\n\t\t\tPlayerAccess.getPlayer().die();\n\t\t}\n\t}", "public boolean playerExists(String username) {\n return getPlayer(username) != null;\n }", "private boolean playerWin(Board board)\n {\n return check(board, PLAYER);\n }", "@Override\r\n public void checkWarGameOver(){\r\n if(this.checkOnePlayerDecksEmpty(0)){\r\n // Set gameOver flag to true\r\n this.isGameOver = true; \r\n \r\n }\r\n \r\n }", "public boolean isUseableByPlayer(EntityPlayer entityPlayer)\n {\n return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) == this &&\n entityPlayer.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D,\n (double) this.zCoord + 0.5D) <= 64.0D;\n }", "boolean hasPokemon();", "public boolean canStandOn(Environment tile)\n {\n if( tile.terrainType == TerrainType.TELETILE )\n return false; // Standing on empty space is pretty hard\n return getMoveCost(tile) < IMPASSABLE;\n }", "public boolean tileBlocked(float xTile, float yTile)\r\n/* 117: */ {\r\n/* 118:131 */ return (!tileInBounds(xTile, yTile)) || (this.blocked[((int)xTile)][((int)yTile)] != 0);\r\n/* 119: */ }", "@Override\n public void checkMousePressOnSprites(MiniGame game, int x, int y)\n {\n // FIGURE OUT THE CELL IN THE GRID\n int col = calculateGridCellColumn(x);\n int row = calculateGridCellRow(y);\n \n // DISABLE THE STATS DIALOG IF IT IS OPEN\n if (game.getGUIDialogs().get(STATS_DIALOG_TYPE).getState().equals(VISIBLE_STATE))\n {\n game.getGUIDialogs().get(STATS_DIALOG_TYPE).setState(INVISIBLE_STATE);\n return;\n }\n \n // CHECK THE TOP OF THE STACK AT col, row\n ArrayList<MahjongSolitaireTile> tileStack = tileGrid[col][row];\n if (tileStack.size() > 0)\n {\n // GET AND TRY TO SELECT THE TOP TILE IN THAT CELL, IF THERE IS ONE\n MahjongSolitaireTile testTile = tileStack.get(tileStack.size()-1);\n if (testTile.containsPoint(x, y))\n selectTile(testTile);\n }\n }", "@SuppressWarnings(\"unused\")\n public static boolean isInParkour(Player player) throws NullPointerException {\n if (player == null) {\n throw new NullPointerException(\"player cannot be null\");\n }\n\n return CacheManager.isParkour(player);\n }", "private static boolean checkWin() {\n\t\tfor (int i = 0; i < nRows; i++)\n\t\t\tfor (int j = 0; j < nColumns; j++) {\n\t\t\t\tCell cell = field.getCellAt(i, j);\n\t\t\t\tif (cell.hasMine() && !cell.hasSign())\t // if the cell has a mine\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// but has no flag\n\t\t\t\t\treturn false;\n\t\t\t\tif (cell.getFlag() >= 0 && !cell.getVisiblity()) // if the cell has no\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// mine in it but\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// it is not visible\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\twin = gameOver = true;\n\t\treturn true;\n\t}", "public boolean validPosition(Player p, double x, double y) {\n\n\t\tTile tile = getTile(p, x + p.BOUNDING_BOX_X, y);\n\t\tif (tile == null || !tile.canEnter(p)) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttile = getTile(p, x, y + p.BOUNDING_BOX_Y);\n\t\tif (tile == null || !tile.canEnter(p)) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttile = getTile(p, x - p.BOUNDING_BOX_X, y);\n\t\tif (tile == null || !tile.canEnter(p)) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttile = getTile(p, x, y - p.BOUNDING_BOX_Y);\n\t\tif (tile == null || !tile.canEnter(p)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean playerShootCheck(int x, int y){\n\t\tif( opponentShips[x][y] != null ){\n\t\t\t\n\t\t\tif(opponentShips[x][y].isDestroyed()){\n\t\t\t\tint shipSize = opponentShips[x][y].getshipSize();\n\t\t\t\topponentShips[x][y] = null;\n\t\t\t\tthis.dmgLastRound = shipSize;\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\topponentShips[x][y] = null;\n\t\t\tthis.dmgLastRound = 0;\n\t\t\treturn true;\n\t\t}\n\t\telse this.dmgLastRound = -1;\n\t\treturn false;\n\t}", "public void verifyTheTileIsPresent(String tileName) {\n\t for(WebElement tile:tileNames) {\n\t\t if(tile.getText().equalsIgnoreCase(tileName)) {\n\t\t\t Assert.assertTrue(true);\n\t\t }\n\t }\n\t \t\tAssert.assertFalse(true);\n }", "public static boolean terrain_has_flag(int terr, terrain_flag_id flag){\r\n\t\t\t //\t BV_ISSET(get_tile_type(terr)->flags, flag)\r\n\t\t\t return false;\r\n}", "private boolean tryAttack(Tile fromTile) {\r\n\t\tint size = getBoard().getTiles().length;\r\n\r\n\t\t// if attacker is on power-up tile\r\n\t\tif (fromTile.getTileType().equals(\"PowerUp\")) {\r\n\t\t\tif (fromTile.getPiece().getLEAGUE() == League.SHARK && fromTile.getTer().territoryName().equals(\"Shark\")) {\r\n\t\t\t\tfromTile.getPiece().setPower(fromTile.getPiece().getPower() + 1);\r\n\t\t\t}\r\n\r\n\t\t\tif (fromTile.getPiece().getLEAGUE() == League.EAGLE && fromTile.getTer().territoryName().equals(\"Eagle\")) {\r\n\t\t\t\tfromTile.getPiece().setPower(fromTile.getPiece().getPower() + 1);\r\n\t\t\t} else if (fromTile.getTer().territoryName().equals(\"Neutral\")) {\r\n\t\t\t\tfromTile.getPiece().setPower(fromTile.getPiece().getPower() + 1);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// if the defender is on power-up tile\r\n\t\tif (tile.getTileType().equals(\"PowerUp\")) {\r\n\t\t\tif (tile.getPiece().getLEAGUE() == League.SHARK && tile.getTer().territoryName().equals(\"Shark\")) {\r\n\t\t\t\ttile.getPiece().setPower(tile.getPiece().getPower() + 1);\r\n\t\t\t}\r\n\r\n\t\t\tif (tile.getPiece().getLEAGUE() == League.EAGLE && tile.getTer().territoryName().equals(\"Eagle\")) {\r\n\t\t\t\ttile.getPiece().setPower(tile.getPiece().getPower() + 1);\r\n\t\t\t} else if (tile.getTer().territoryName().equals(\"Neutral\")) {\r\n\t\t\t\ttile.getPiece().setPower(tile.getPiece().getPower() + 1);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif (fromTile.getPiece().getPower() >= tile.getPiece().getPower()) {\r\n\t\t\tif (tile.getPiece().getTYPE() == PieceType.FLAG) {\r\n\t\t\t\tfromTile.getPiece().setHasEnemyFlag(true);\r\n\t\t\t\tUtilities.infoAlert(\"Enemy Flag Captured!\", \"Get that piece with the flag back to your territory quickly!\");\r\n\t\t\t} else {\r\n\t\t\t\tif (tile.getPiece().getHasEnemyFlag() == true) {\r\n\t\t\t\t\tUtilities.infoAlert(\"Flag Recaptured!\", \"Enemy piece carrying your flag has been killed.\\nYour flag has respawned in your territory.\");\r\n\r\n\t\t\t\t\t// generate the dropped flag at its original position\r\n\t\t\t\t\t// or generate the dropped flag on first available tile on first or last row\r\n\t\t\t\t\t// if the default position has a piece on it\r\n\t\t\t\t\tif (tile.getPiece().getLEAGUE() == League.EAGLE) {\r\n\t\t\t\t\t\tif (getBoard().getTiles()[size - 1][(size / 2) - 1].getPiece() == null) {\r\n\t\t\t\t\t\t\tgetBoard().getTiles()[size - 1][(size / 2) - 1].setPiece(new SharkFlag());\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfor (int sharkCol = 0; sharkCol < getBoard().getTiles().length; sharkCol++) {\r\n\t\t\t\t\t\t\t\tif (getBoard().getTiles()[size - 1][sharkCol].getPiece() == null) {\r\n\t\t\t\t\t\t\t\t\tgetBoard().getTiles()[size - 1][sharkCol].setPiece(new SharkFlag());\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (getBoard().getTiles()[0][size / 2].getPiece() == null) {\r\n\t\t\t\t\t\t\tgetBoard().getTiles()[0][size / 2].setPiece(new EagleFlag());\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfor (int eagleCol = 0; eagleCol < getBoard().getTiles().length; eagleCol++) {\r\n\t\t\t\t\t\t\t\tif (getBoard().getTiles()[0][eagleCol].getPiece() == null) {\r\n\t\t\t\t\t\t\t\t\tgetBoard().getTiles()[0][eagleCol].setPiece(new EagleFlag());\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn movePiece(fromTile);\r\n\t\t} else {\r\n\t\t\tUtilities.infoAlert(\"Invalid action\", \"Enemy power level higher at level \" + tile.getPiece().getPower()\r\n\t\t\t\t\t+ \". \" + \"\\nYour current piece is not able to defeat it and has cowered back in fear.\");\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "boolean hasPlayer(String player);", "protected boolean tileCollision(double xa, double ya) { // returns true if there is a collision\n\t\tboolean solid = false;\n\n\t\tfor (int c = 0; c < 4; c++) { // this checks all 4 corners for collision\n\t\t\tdouble xt = ((x - 6 + xa) - c % 2 * 4) / 16; // i honestly don't know hoW this works. It just does. Episode 65.\n\t\t\tdouble yt = ((y - 4 + ya) - c / 2 * 7) / 16;\n\n\t\t\tint ix = (int) Math.ceil(xt); // returns the smallest integer greater than or equal to a number\n\t\t\tint iy = (int) Math.ceil(yt);\n\n\t\t\tif (level.getTile(ix, iy).solid()) solid = true; // this is the important statement for collision detection. It works by looking at the tile you want to go to and seeing if it is solid.\n\t\t}\n\n\t\treturn solid;\n\t}", "@SideOnly(Side.CLIENT)\n boolean needsRenderUpdate(World world, BlockPos pos, IBlockState state, T tile);", "boolean isGameSpedUp();", "private boolean checkSeesPlayer(int x, int y) {\r\n\t\tint enemy;\r\n\t\tif (creature.getCreature().team == 1) {\r\n\t\t\tenemy = 2;\r\n\t\t} else if (creature.getCreature().team == 2) {\r\n\t\t\tenemy = 1;\r\n\t\t} else {\r\n\t\t\tenemy = 0; //No enemy\r\n\t\t}\r\n\t\tRectangle r = new Rectangle(); // Location Rectangle\r\n\t\tr.width = Tile.TILEWIDTH;\r\n\t\tr.height = Tile.TILEHEIGHT;\r\n\t\tr.x = x * Tile.TILEWIDTH;\r\n\t\tr.y = y * Tile.TILEHEIGHT;\r\n\t\tfor(Creature c : handler.getWorld().getEntityManager().getCreatures()) {\r\n\t\t\tif (c.getCreature().team == enemy) {\r\n\t\t\t\tif(c.getCollisionBounds(0, 0).intersects(r)) {\r\n\t\t\t\t\tseenEnemy = c;\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean checkWin(int x, int y, int player)\n {\n int[][] area = new int[REGION_SIZE][REGION_SIZE];\n // Copy region of board to do win checking\n for (int i = REGION_START; i <= REGION_STOP; i++) {\n for (int j = REGION_START; j <= REGION_STOP; j++) {\n area[i - REGION_START][j - REGION_START] = getTile(x + i, y + j);\n }\n }\n \n //Check Horizontal\n int count = 0;\n for (int i = 0; i < REGION_SIZE; i++) {\n if (area[4][i] == player) {\n count++;\n } else {\n count = 0;\n }\n if (count == 5) {\n return true;\n }\n }\n //Check Vertical\n count = 0;\n for (int i = 0; i < REGION_SIZE; i++) {\n if (area[i][4] == player) {\n count++;\n } else {\n count = 0;\n }\n if (count == 5) {\n return true;\n }\n }\n //Check Diagonal '/'\n count = 0;\n for (int i = 0; i < REGION_SIZE; i++) {\n if (area[REGION_SIZE - 1 - i][i] == player) {\n count++;\n } else {\n count = 0;\n }\n if (count == 5) {\n return true;\n }\n }\n //Check Diagonal '\\'\n count = 0;\n for (int i = 0; i < REGION_SIZE; i++) {\n if (area[i][i] == player) {\n count++;\n } else {\n count = 0;\n }\n if (count == 5) {\n return true;\n }\n }\n return false;\n }", "private static boolean compareGameDestination(RSTile tile) {\n RSTile game_destination = Game.getDestination();\n if (tile == null || game_destination == null) {\n return false;\n }\n return tile.distanceTo(game_destination) < 1.5;\n }", "public boolean isHit(Point p){\n if(super.getLocation().equals(p)){\n nunMissiles = 0;\n return true;\n } else {\n return false;\n }\n }", "public boolean isHasPlayer() {\n\t\treturn HasPlayer;\n\t}", "private boolean probe(Tile tile, Direction previousDirection) {\n int currentX = tile.getPosition().getX();\n int currentY = tile.getPosition().getY();\n\n if (tile.getTerrain().equals(Terrain.EMPTY))\n return false;\n else if (currentX == 0 || currentX == MAP_WIDTH - 1 || currentY == 0 || currentY == MAP_HEIGHT - 1) {\n return true; // Check if tile hits edge wall\n } else {\n for (Direction direction : Direction.cardinals) {\n Tile targetTile = getTileAtCoordinates(Utility.locateDirection(tile.getPosition(), direction));\n if (!direction.equals(previousDirection) && targetTile.getTerrain().equals(Terrain.WALL)) {\n if (probe(targetTile, Utility.opposite(direction))) {\n tile.setTerrain(Terrain.EMPTY);\n return false;\n }\n }\n }\n return false;\n }\n }", "public boolean isUseableByPlayer(EntityPlayer par1EntityPlayer)\n {\n return this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : par1EntityPlayer.getDistanceSq((double)this.xCoord + 0.5D, (double)this.yCoord + 0.5D, (double)this.zCoord + 0.5D) <= 64.0D;\n }", "public boolean win(){\r\n for(int row = 0; row<map.length; row++){\r\n for(int col = 0; col<map[0].length; col++){\r\n if(map[row][col].getSafe() == false && (map[row][col].getVisual().equals(square) || map[row][col].getVisual().equals(bomb))){\r\n return false;\r\n }\r\n if(map[row][col].getSafe() == true && map[row][col].getVisual().equals(flag)){\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }", "default boolean hasPlayer(Player player) {\n return hasPlayer(Objects.requireNonNull(player, \"player\").getName());\n }", "public boolean hasTexture()\r\n\t{\r\n\t\treturn texture != null;\r\n\t}" ]
[ "0.7465883", "0.71173555", "0.71001935", "0.6999672", "0.69334626", "0.69290125", "0.68325484", "0.6823801", "0.67970306", "0.6742728", "0.67179936", "0.66932654", "0.66768646", "0.664313", "0.664062", "0.66293854", "0.655779", "0.6544084", "0.6532344", "0.65315527", "0.6519672", "0.651477", "0.6500188", "0.6494144", "0.6472683", "0.64403176", "0.64359957", "0.64344347", "0.6414374", "0.6375976", "0.6365146", "0.63287294", "0.63176405", "0.6315316", "0.6303991", "0.62925005", "0.62881565", "0.6284079", "0.62722665", "0.6259147", "0.62466776", "0.6243211", "0.6224963", "0.6218975", "0.62154335", "0.6203394", "0.61948615", "0.6176002", "0.6160545", "0.6156118", "0.61535627", "0.6140548", "0.6128105", "0.6123177", "0.61224", "0.6105575", "0.6104988", "0.60971236", "0.6091773", "0.60917675", "0.6076092", "0.6074588", "0.6072847", "0.60597235", "0.6054", "0.60533017", "0.6050123", "0.60418206", "0.6028302", "0.601248", "0.60085016", "0.5989244", "0.5986062", "0.59775734", "0.59749335", "0.5973797", "0.5963774", "0.5960261", "0.5949245", "0.59483474", "0.59362155", "0.59324104", "0.5930592", "0.5926838", "0.5925795", "0.5919997", "0.59096", "0.59053236", "0.59033006", "0.5898763", "0.5894937", "0.5889174", "0.5887454", "0.5880213", "0.58783317", "0.5877519", "0.5868186", "0.5866503", "0.58629686", "0.58565193" ]
0.7828731
0
adds num to score
public void add_to_score(int num){ score+=num; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addToScore(int score)\n {\n this.score += score;\n }", "public void addScore(int score) {\n currentScore += score;\n }", "public void addScore(int n){\n\t\tscore += n;\n\t}", "public void addScore(int score);", "public void addScore()\n {\n score += 1;\n }", "public void addOneToScore() {\r\n score++;\r\n }", "public void incrementScore(int scoreToAdd) {\n this.score += scoreToAdd;\n }", "public void addToScore(int ammount){\n\t\tscore+=ammount;\n\t}", "public void addScore(int s) {\n setScore(getScore() + s);\n }", "public void incrementScore(int val) {\n score += val;\n }", "public static void incrementScore() {\n\t\tscore++;\n\t}", "public void addTestScore(int score){\n test_score.add(test_count,score);\n test_count++;\n }", "public void addScore(int pointsToAdd) {\n\t\tthis.score = this.score + pointsToAdd;\n\t}", "void addPointsToScore(int points) {\n score += points;\n }", "void addScore(double score){\n\t\tsumScore+=score;\n\t\tnumScores++;\n\t\taverage = sumScore/numScores;\n\t}", "public synchronized void setScore(Integer score) {\n this.score += score;\n }", "public final void addScore(int iScore) {\n\t\tscore += iScore;\n\t}", "public static void addScore(int _value){\n scoreCount += _value;\n scoreHUD.setText(String.format(Locale.getDefault(),\"%06d\", scoreCount));\n }", "public void setScore(int score)\n\t{\n\t\tthis.score += score;\n\t}", "public void addToScore(int points) {\n\t\tassert points >= 0 : \"Cannot add negative points\";\n\t\tscore += points;\n\t}", "public void addPoints(int earnedPoints) {score = score + earnedPoints;}", "public void incrementScore(int increment) {\n score = score + increment;\n }", "public void countScore(int score)\n {\n scoreCounter.add(score);\n }", "public void incrementScore(int amount){\n\t\tthis.score += amount;\n\t}", "public void increaseScore(){\n this.inc.seekTo(0);\n this.inc.start();\n this.currentScore++;\n }", "void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }", "public void addToScore(final int theScoreAddition) {\n this.myCurrentScoreInt += theScoreAddition;\n \n if (this.myCurrentScoreInt > this.myHighScoreInt) {\n this.myHighScoreInt = this.myCurrentScoreInt; \n this.persistHighScore();\n } \n }", "public void addScore(String name, int score) {\n loadScoreFile();\n scores.add(new Score(name, score));\n updateScoreFile();\n }", "public void incrementScore(int inc){\n\t\tscoreboard.incrementScore(inc);\n\t}", "synchronized void addScore(String name, int score){\n\t\tif(!users.containsKey(name)){\n\t\t\tVector<Integer> scores = new Vector<Integer>();\n\t\t\tusers.put(name, scores);\n\t\t}\n\t\tusers.get(name).add(score);\n\t}", "public void addScore(){\n\n // ong nuoc 1\n if(birdS.getX() == waterPipeS.getX1() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX1() + 50){\n score++;\n bl = false;\n }\n\n //ong nuoc 2\n if(birdS.getX() == waterPipeS.getX2() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX2() + 50){\n score++;\n bl = false;\n }\n\n // ong nuoc 3\n if(birdS.getX() == waterPipeS.getX3() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX3() + 50){\n score++;\n bl = false;\n }\n\n }", "public synchronized int addScore(@Nonnull Team team, @Min(1L) int s){\r\n\t\t\tint result = s;\r\n\t\t\t\r\n\t\t\tif(this.scores.containsKey(team)){\r\n\t\t\t\tresult = scores.get(team).intValue() + s;\r\n\t\t\t}\r\n\t\t\tscores.put(team, Integer.valueOf(result));\r\n\t\t\t\r\n\t\t\treturn result;\r\n\t\t}", "public void addToScore(TextView scoreTextView, int points) {\n int score = Integer.parseInt(scoreTextView.getText().toString());\n scoreTextView.setText(String.valueOf(score + points));\n }", "public void addToScore(int id, int bonus){\n scores.set(id,scores.get(id) + bonus);\n }", "public void addScore(Pair<String, Integer> score) {\n if (!this.list.isPresent()) {\n this.readScores();\n }\n final List<Pair<String, Integer>> list = this.list.get();\n list.add(score);\n this.sortScores(list);\n this.cutScores(list);\n this.list = Optional.of(list);\n\n this.toSave = true;\n }", "public void setScore(int pointsToAdd) {\n\n\t\t//Add the additional points to the existing score\n\t\tthis.score = this.score + pointsToAdd;\n\t}", "public void addScore(int score, String name){\n for(int i = 0; i < topScores.size(); i++) {\n if(score >= topScores.get(i)){\n topScores.add(i, score);\n topScores.remove(topScores.size()-1);\n if(name.isEmpty()){\n topName.add(i, \"Anonymous\");\n topName.remove(topName.size()-1);\n }else {\n topName.add(i, name);\n topName.remove(topName.size() - 1);\n }\n return;\n }\n }\n }", "public void addReview(double score){\n totalReviews++;\n totalScore += score;\n }", "public void awardPoints(int points)\n {\n score += points ;\n }", "public void increaseScore(final int score) {\n setChanged();\n notifyObservers(new Pair<>(\"increaseScore\", score));\n }", "public void addScore(Double score) {\n this.scoreList.add(score);\n // each time a new score is added, sort it\n Collections.sort(scoreList, Collections.reverseOrder());\n }", "public void addQuiz(int score) {\n\t\tif (score < 0 || score > 100) {\n\t\t\tscore = 0;\n\t\t}\n\t\telse {\n\t\t\ttotalScore = totalScore + score;\n\t\t\tquizCount++;\n\t\t}\n\t\t}", "public void addScoreForTeamA(View v) {\n scoreTeamA += 1;\n updateText(scoreTeamA, v);\n }", "void addScore(LocusScore ls) {\n double weight = 1;\n final float score = ls.getScore();\n weightedSum += weight * score;\n nPts++;\n\n max = score > max ? score : max;\n }", "public void setScore(int score) { this.score = score; }", "public void hitAlienScore() {\r\n //Add 5 to the score\r\n score += 5;\r\n System.out.println(\"Current Score = \"+score);\r\n }", "public void modifyScore(int modAmount)\r\n\t{\r\n\t\tscore += modAmount;\r\n\t}", "private int scoreCounter(int result) {\n result +=1;\n return result;\n }", "public MatcherScores addScore(String intent, Double score)\n {\n scores.computeIfAbsent(score, k -> new TreeSet<>()).add(intent);\n return this;\n }", "void addGameScoreToMainScore(){\n sharedPreferences= PreferenceManager.getDefaultSharedPreferences(this);\n editor=sharedPreferences.edit();\n int score=sharedPreferences.getInt(\"gameScore\",0);\n score=score+userCoins;\n editor.putInt(\"gameScore\",score);\n editor.commit();\n\n }", "public void setScore(int score) {this.score = score;}", "public void addQuiz(double score){\n quizzes.add(score);\n quizTotal += score;\n}", "public void addHighScore(String name, int score){\r\n // TODO: If the provided score is greater than the lowest high score,\r\n // TODO: then replace the lowest score with the new score and then\r\n // TODO: call the sortScores() method.\r\n \t\r\n \t\tscores[Settings.numScores-1]=score;\r\n \t\tnames[Settings.numScores-1]=name;\r\n \t\tsortScores();\r\n \t\t\r\n }", "public void updateScore(){\n scoreChange++;\n if(scoreChange % 2 == 0){\n if(score_val < 999999999)\n score_val += 1;\n if(score_val > 999999999)\n score_val = 999999999;\n score.setText(\"Score:\" + String.format(\"%09d\", score_val));\n if(scoreChange == 10000)\n scoreChange = 0;\n }\n }", "public void add_prev_rounds_score(int prevScore) {\n prev_rounds_score += prevScore;\n }", "public void setScore(java.lang.Integer value);", "@Test\n public void addScoreTest() {\n assertTrue(enemyGameBoard.getScore() == 0); //Check if initial value of points = 0\n\n enemyGameBoard.addScore(false, false); //Did not hit a ship\n assertTrue(enemyGameBoard.getScore() == 0);\n\n enemyGameBoard.addScore(true, false); //Hit a ship, but the ship did not sink\n assertTrue(enemyGameBoard.getScore() == 1); \n\n enemyGameBoard.addScore(false, false); //Did not hit a ship, so points should stay 1\n assertTrue(enemyGameBoard.getScore() == 1); \n\n enemyGameBoard.addScore(true, true); //Hit a ship, and ship has been sunk\n assertTrue(enemyGameBoard.getScore() == 3);\n\n enemyGameBoard.addScore(false, false); //Did not hit a ship, so points should stay 3 after a ship has been sunk\n assertTrue(enemyGameBoard.getScore() == 3);\n\n enemyGameBoard.addScore(false, true); //Did not hit a ship, but did sunk the ship. This should not add any points to the score\n assertTrue(enemyGameBoard.getScore() == 3);\n }", "private void updateScore() {\n\t\tscoreString.updateString(Integer.toString(score));\n\t}", "public void increaseScore(int p) {\n score += p;\n //Minden novelesnel megnezzuk, hogy elertuk-e a gyozelem szukseges pandaszamot.\n if(score >= 25 && game.getSelectedMode() == Game.GameMode.FinitPanda){\n //Ha elertuk, szolunk a jateknak hogy vege.\n game.SaveHighScore(score);\n game.gameOver();\n }\n }", "public Scores(int score) {\r\n this.score = score;\r\n }", "void setScore(long score);", "public void calcScore(int score) {\r\n\t\tif (initFinish)\r\n\t\t\tthis.score += score * this.multy;\r\n\t\t// TODO delete\r\n//\t\tSystem.out.println(\"score: \" + this.score + \"multy: \" + this.multy);\r\n\t}", "public void updateScore(int score){ bot.updateScore(score); }", "public void setBonusScore() {\r\n count = count+50;\r\n }", "private static int addRandomScore() {\n Random ran = new Random();\n return ran.nextInt(201) + 400;\n }", "public void setScore(int score)\n {\n this.score = score;\n }", "private void addPointsToPlayer(Player player, int marbleNum) {\n Long score = player.getScore();\n score += marbleNum;\n\n // add the score for the marble 7 places before\n Long value = (Long) placement.get(getMarbel7());\n score += value;\n\n player.setScore(score);\n }", "public void updateScore(){\r\n if (this.isArtist || winners.contains(this)) {\r\n this.score += pointsGainedLastRound;\r\n }\r\n pointsGainedLastRound = 0;\r\n placeLastRound = 0;\r\n }", "@Override\n public void updateScore(int winner)\n {\n if (winner == 0)\n {\n playerOneScore++;\n }\n else\n {\n playerTwoScore++;\n }\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void addScoreForTeamB(View v) {\n scoreTeamB += 1;\n updateText(scoreTeamB, v);\n }", "void setScoreValue(int scoreValue);", "protected void addScoreToLeaderboard() {\n\n\t\tif (onlineLeaderboard) {\n\t\t jsonFunctions = new JSONFunctions();\n\t\t jsonFunctions.setUploadScore(score);\n\t\t \n\t\t Handler handler = new Handler() {\n\t\t\t @Override\n\t\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\t @SuppressWarnings(\"unchecked\")\n\t\t\t\t ArrayList<Score> s = (ArrayList<Score>) msg.obj;\n\t\t\t\t globalScores = helper.sortScores(s);\n\t\t\t }\n\t\t };\n\t\t \n\t\t jsonFunctions.setHandler(handler);\n\t\t jsonFunctions\n\t\t\t .execute(\"http://brockcoscbrickbreakerleaderboard.web44.net/\");\n\t\t}\n\t\tsaveHighScore();\n }", "void addScore(String name, int score, String order) {\n if (this.topScores.size() < this.numScore) {\n if (this.topScores.containsKey(name)) {\n if ((order.equals(\"Ascending\") && this.topScores.get(name) > score)\n || (order.equals(\"Descending\") && this.topScores.get(name) < score)) {\n this.topScores.put(name, score);\n }\n } else {\n this.topScores.put(name, score);\n }\n } else {\n this.topScores.put(name, score);\n this.topScores = sort(this.topScores);\n Object key = this.topScores.keySet().toArray()[this.topScores.keySet().size() - 1];\n String lastKey = key.toString();\n this.topScores.remove(lastKey);\n }\n this.topScores = sort(this.topScores);\n }", "public void setScore(int newScore){\n\t\tthis.score = newScore;\n\t}", "public void setScore(int score) {\r\n this.score = score;\r\n }", "public void setScore(int score) {\r\n this.score = score;\r\n }", "public void setScore (int newScore)\n {\n this.score = newScore;\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void updateScore(int playerScore){\n\t\tscore += playerScore;\n\t\tscoreTotalLabel.setText(\"\" + score);\n\t}", "public void addHighscore(int i){\n highscores.add(i);\n sortHighscores();\n writeFile();\n }", "public void setScore(int score){\n\t\tthis.score = score;\n\t}", "public void updateScore(double d) {\n\t\tscore+=d;\t\n\t}", "public void storeScore(Integer score) {\n SharedPreferences startscore = this.getSharedPreferences(\"qScore\", Context.MODE_PRIVATE);\n int firstscore = startscore.getInt(\"qScore\", 0);\n\n //Henter antall besvareler\n SharedPreferences answers = this.getSharedPreferences(\"qAnswer\", Context.MODE_PRIVATE);\n int answerAmount = answers.getInt(\"qAnswer\", 0);\n\n //Lagrer tidligere score + nye score samt antall besvarelser som kan hentes på alle activities med riktig key (qScore eller qAnswer)\n SharedPreferences prefs = this.getSharedPreferences(\"qScore\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putInt(\"qScore\", (firstscore + score));\n editor.commit();\n\n SharedPreferences prefsX = this.getSharedPreferences(\"qAnswer\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editorX = prefsX.edit();\n editorX.putInt(\"qAnswer\",(answerAmount + 1));\n editorX.commit();\n }", "private void addNumber(int num, int row, int column) {\n numbersAdded++;\n square[row * dimensions + column] = num;\n }", "public void incrementScore(final int value, Firebase reference){\n reference.child(\"score\").runTransaction(new Transaction.Handler() {\n @Override\n public Transaction.Result doTransaction(MutableData mutableData) {\n if (mutableData.getValue(Integer.class) == null) {\n mutableData.setValue(0);\n } else {\n mutableData.setValue(mutableData.getValue(Integer.class) + value);\n }\n return Transaction.success(mutableData);\n }\n\n @Override\n public void onComplete(FirebaseError firebaseError, boolean b, DataSnapshot dataSnapshot) {\n Log.i(TAG, \"Successfully incremented score for player \" + LaserTagApplication.getUid());\n Team.getInstance().incrementScore(value);\n }\n });\n }", "public void setScore(Integer score) {\r\n this.score = score;\r\n }", "public void setScore(Integer score) {\n this.score = score;\n }", "public void setScore(int score)\n\t{\n\t\tthis.score=score;\n\t}", "public void increase(String nickname) {\n\t\tint oldValue = this.getScore(nickname);\n\t\tscoreboard.replace(nickname, oldValue, oldValue + 1);\n\t}", "public void add(int number) {\n numbers.put(number, numbers.getOrDefault(number, 0)+1);\n }", "public void add(int number) {\n map.put(number, map.getOrDefault(number, 0) + 1);\n }", "public static void sumTotalScore() {\n totalScore += addRandomScore();;\n }", "public void updatescore() {\n scorelabel.setText(\"\" + score + \" points\");\n if (100 - score <= 10) win();\n }", "public void addScore(String addCourseName, int addScore, String addDate, double addCourseRating, int addCourseSlope)\n {\n int z = 0;\n Score temp = new Score(addCourseName, addScore, addDate, addCourseRating, addCourseSlope);\n for(int i = 0; i < scores.length; i++)\n {\n if(scores[i] != null)\n {\n z++;\n }\n }\n Score[] copy = new Score[z + 1];\n for(i = 0; i < z; i++)\n {\n copy[i] = scores[i];\n }\n copy[z] = temp;\n this.scores = copy;\n }", "public void addA(View view) {\n int points = Integer.parseInt(view.getTag().toString());\n scoreA += points;\n TextView sa = (TextView) findViewById(R.id.scoreA);\n sa.setText(String.valueOf(scoreA));\n\n }", "private void increaseScore() {\n this.game.getPlayers().values().forEach(ship -> {\n ship.increaseScore();\n if (ship.getScore() % 5 == 0) {\n this.asteroidsLimit++;\n }\n });\n }" ]
[ "0.8426426", "0.8266896", "0.8261736", "0.82617015", "0.80542755", "0.791823", "0.78802544", "0.7813861", "0.77471006", "0.7722962", "0.7653484", "0.7577604", "0.75481117", "0.7464025", "0.7457425", "0.7453826", "0.74297", "0.7403008", "0.73536265", "0.73432434", "0.7336964", "0.7332804", "0.72913885", "0.7255096", "0.72247833", "0.72221285", "0.72066265", "0.7204448", "0.7180097", "0.69474804", "0.6926515", "0.69143987", "0.6897006", "0.6889936", "0.6872836", "0.68726546", "0.6866244", "0.6833774", "0.672164", "0.6681708", "0.6675977", "0.6670756", "0.66208327", "0.6618051", "0.660617", "0.6596125", "0.6587774", "0.65316296", "0.6504798", "0.64980334", "0.64949775", "0.6490974", "0.64727414", "0.6457058", "0.64560246", "0.6437493", "0.6410883", "0.64083916", "0.63961595", "0.6380248", "0.63731897", "0.6362686", "0.63477457", "0.63394624", "0.63382274", "0.6325549", "0.62901527", "0.62874913", "0.6275447", "0.6272152", "0.6261688", "0.626168", "0.62612265", "0.6250764", "0.6248125", "0.62457585", "0.62457585", "0.62367606", "0.62273806", "0.62273806", "0.62273806", "0.62273806", "0.6219156", "0.6218195", "0.621326", "0.6208807", "0.6196578", "0.61895", "0.6185374", "0.61815727", "0.6178461", "0.6166911", "0.61523044", "0.6140946", "0.6116843", "0.6112842", "0.61071515", "0.61056554", "0.60876685", "0.6077188" ]
0.92597795
0
fills the player hand
public void fillHand(Stack<Tile> tiles){ while(!tiles.empty()){ Tile tile = tiles.get(tiles.size()-1); playerHand.add(0,tile); tiles.pop(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void newHand() {\n if(player.getSecondHand().size() > 0){\n player.emptySecondHand(deck);\n shuffle();\n }\n player.resetBet();\n dealer.resetBet();\n errorFlag = false;\n userMessage = \"Place your Bet\";\n againDisabled = true;\n dealDisabled = false;\n hitDisabled = true;\n splitDisabled = true;\n standDisabled = true;\n doubleDisabled = true;\n bettingDisabled = false;\n emptyHands();\n }", "public void emptyHand();", "private void setUp() {\n players.forEach(player -> player.draw(GameConstants.STARTING_HAND_SIZE.value()));\n }", "public void clearHand() {\n\t\tthis.aHand = new Chips[aHand.length];\n\t}", "public Hand() {\n this.hole1 = new BlankCard();\n this.hole2 = new BlankCard();\n showCards = false;\n }", "public void resetHand()\r\n\t{\r\n\t\thandCount = 0;\r\n\t\tstand = false;\r\n\t}", "public void clearHand() {\n\t\t_hand.clearHand();\n\n\t}", "public void dealInitialPlayerHands() {\n\t\tint temp = 0;\n\t\tSystem.out.println(\"This is the deck size before dealing: \" + this.tileDeck.deckSize());\n\t\tSystem.out.println(\"_______________________________________________\");\n\t\tfor (Player p : this.playerList) {\n\t\t\ttemp++;\n\t\t\tfor (int i = 0; i < 14; i ++) {\n\t\t\t\tp.hand.add(this.tileDeck.dealTile());\n\t\t\t}\n\t\t\tp.sort();\n\t\t\tSystem.out.println(\"Player \" + temp + \"'s hand: \" + p.getHandTiles());\n\t\t\tSystem.out.println(\"_______________________________________________\");\n\t\t}\n\t\t//System.out.println(this.tileDeck.deckSize());\n\t}", "public void clearHand() {\n\t\thand.clear();\n\t}", "private void ResetGame(){\n this.deck = new Deck();\n humanPlayer.getHand().clear();\n humanPlayer.setWager(0);\n dealer.getHand().clear();\n }", "public void draw() {\n\t\t//check letters in deck\n\t\tif(deck.size() == 0) {\n\t\t\treturn;\n\t\t}\n\t\t// remove letter from deck\n\t\tLetter temp = deck.remove();\n\t\t// add letter to hand\n\t\thand.add(temp);\n\t}", "public abstract void setHand(Card[] hand);", "public Player() {\n hand = new Hand();\n }", "void setHand(Hand hand) {\n\t\t_hand = hand;\n\t}", "public void draw() {\n if (!myTurn()) {\n return;\n }\n draw(4 - handPile.size());\n }", "public deal()\n {\n player1Hand = 0;\n player2Hand = 0;\n dealerHand = 0;\n }", "public void resetHandRanks() {\n\t\tPlayer player;\n\n\t\tfor (int i = 0; i < table.getTablePlayers().size(); i++) {\n\t\t\tplayer = table.getTablePlayers().get(i);\n\t\t\tplayer.setPair(false);\n\t\t\tplayer.setTwoPairs(false);\n\t\t\tplayer.setTrips(false);\n\t\t\tplayer.setStraight(false);\n\t\t\tplayer.setFlush(false);\n\t\t\tplayer.setFullHouse(false);\n\t\t\tplayer.setQuads(false);\n\t\t\tplayer.setStrFlush(false);\n\t\t}\n\t}", "@Override\r\n public void fillDealerDeckPlayingCards(int deckPosition){\r\n\r\n for(int i = 0; i < 4; i ++){\r\n for(int j = 0; j < 13; j ++){\r\n this.dealer.addCard(deckPosition, new PlayingCard(i,j)); \r\n }\r\n }\r\n System.out.println(\"Deck Filled\");\r\n }", "private void InitializeComputerHand(){\n for(int i = 0; i < 7; i++){\n //Add to the computer\n handComputer.add(deck.get(i));\n }\n\n for(int i = 6; i >= 0; i--){\n deck.remove(i);\n }\n }", "public void setup() {\r\n\t\thumanCardsPanel.setHumanCards(players.get(0).getCards());\r\n\t\tfor ( Player p : players ) {\r\n\t\t\tp.setBoard(board);\r\n\t\t\tp.setGame(this);\r\n\t\t}\r\n\t\tboard.setGame(this);\r\n\t\tboard.repaint();\r\n\t\tJOptionPane popup = new JOptionPane();\r\n\t\tString message = \"You are Miss Scarlet. Press Next Player to begin.\\n Hint: Use File > Detective Notes to help you win!\";\r\n\t\tpopup.showMessageDialog(this, message, \"Welcome to Clue!\", JOptionPane.INFORMATION_MESSAGE);\r\n\t}", "public Hand() {\r\n\t\t\r\n\t}", "public void updateComputerHand(ArrayList<Carte> hand) {\n computerPaquetView.setCards(hand);\n }", "public void clearHand() {\n cards.clear();\n aceCount = 0;\n setSize(0);\n }", "public void play() {\r\n this.cardDeck = new JavaDeck();\r\n cardDeck.shuffle();\r\n dealerHand = new JavaHand(2);\r\n dealerHand.DiscardHand();\r\n addDealerCard();\r\n }", "public void setAutoHandsForPlayers(){\n\t\tint totSwitch = 0;\n\t\tHands[] allHands = new Hands[this.numberOfPlayers];\n\n\t\tfor(int i = 0 ; i < this.numberOfPlayers; i++){\n\t\t\tallHands[i] = new Hands();\n\t\t}\n\n\t\t// Case for two players\n\t\tswitch (this.numberOfPlayers){\n\t\tcase 2:\n\t\t\ttotSwitch = 1;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\ttotSwitch = 2;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\ttotSwitch = 3;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\ttotSwitch = 4;\n\t\t\tbreak;\n\t\t}\n\n\t\tint twist = 0;\n\t\twhile (twist <= totSwitch){\n\t\t\tfor(int i = 0 ; i < 5; i++){\n\t\t\t\tallHands[twist].hands[i] = this.deckOfCards.cards[(twist*5)+i];\n\t\t\t}\t\n\t\t\ttwist = twist + 1;\n\t\t}\n\n\t\tfor(int i = 0; i < this.numberOfPlayers; i++){\n\t\t\tthis.players[i].playerHand.setHands(allHands[i]);\n\t\t}\n\n\t}", "public void clearHand() {\n for (Component c : cardPane.getComponents()) {\n if (c instanceof Card) {\n cardPane.remove(c); //Removes all Cards from card panel\n }\n }\n busted = false; //Hand not busted\n values.clear(); //Removes all Integers from values\n values.add(0); //Sets initial value to 0\n updateValue(); //Updates value\n repaint(); //Redraws hand\n }", "public void printAllPlayerHands(){\n\t\tfor(int i = 0 ; i < this.players.length; i++){\n\t\t\tplayers[i].printPlayerHand();\t\t \n\t\t}\t\n\t}", "@Override\n public void setOpponentsLastHand(Hand hand)\n {\n }", "public Hand() {\n cards = new int[16];\n numSoft = 0;\n score = 0;\n numCards = 0;\n }", "public void startGame() {\n this.deck = new Deck();\n this.deck.shuffle(); //shuffle the deck\n Card card = this.deck.deal(this.getPlayerHand());\n card = this.deck.deal(this.getPlayerHand());\n card = this.deck.deal(this.getDealerHand());\n }", "public void play() {\n field.draw();\n userTurn();\n if(! field.isFull()) {\n computerTurn();\n }\n }", "public void pickUp(Player player) {\n player.setBox(this);\n }", "public void resetPlayer() {\n\t\tthis.carrotCards = 65;\n\t\tthis.playerSpace = 0;\n\n\t}", "public void resetHand() {\n this.myCards = new Card[MAX_CARDS];\n this.numCards = 0;\n }", "void fillDeck()\n\t{\n\t\t\n\t\tfor ( byte decks = 0 ; decks < howManyDecks ; decks++ )\n\t\t\tfor ( byte suit = 0 ; suit < 4 ; suit++ )\n\t\t\t\tfor ( byte value = 1 ; value < 14 ; value++ ) \n\t\t\t\t\tdeck.add ( new Card (value , suit , true) );\n\t}", "public void play() \n { \n \n createRooms();\n createCharacters();\n createItem();\n printWelcome();\n player = new Player(\"player\");\n Boolean exam;\n exam = false;\n /* player.addItem(necklace_red);\n player.addItem(halberd);\n player.addItem(set_of_forks_and_knives);\n player.addItem(candelar);\n player.addItem(potion6HP);\n player.addItem(bedroomkey);*/\n \n // Step 1 : start in the poolroom //\n Boolean step1Finish;\n Boolean step2Finish;\n Boolean step3Finish;\n Boolean step4Finish;\n Boolean step5Finish;\n Boolean step6Finish;\n Boolean step7Finish;\n Boolean step8Finish;\n Boolean step9Finish;\n Boolean step10Finish;\n Boolean step11Finish;\n step1Finish = false;\n step2Finish = false;\n step3Finish = false;\n step4Finish = false;\n step5Finish = false;\n step6Finish = false;\n step7Finish = false;\n step8Finish = false;\n step9Finish = false;\n step10Finish = false;\n step11Finish = false;\n \n // All the characters are in the poolroom and the exit opens only after speak with all the characters //\n Boolean canSpeak; // player can speak with PNG\n Boolean speak_with_mr_Taylor, speak_with_ms_Taylor, speak_with_ms_Cunningham, speak_with_chambermaid, speak_with_bob_Taylor, speak_with_mr_Cunningham;\n Boolean speak_with_ms_Wellington, speak_with_valet, speak_with_caretaker, speak_with_mr_Wellington, speak_with_nina_Taylor;\n Boolean find_bob_Taylor;\n Boolean toys_not_front_of_door = null;\n Boolean firstEnter;\n firstEnter = true;\n \n canSpeak = false;\n speak_with_mr_Taylor = false;\n speak_with_ms_Taylor = false;\n speak_with_ms_Cunningham = false;\n speak_with_chambermaid = false;\n speak_with_bob_Taylor = false;\n speak_with_mr_Cunningham = false;\n speak_with_ms_Wellington = false;\n speak_with_valet = false;\n speak_with_caretaker = false;\n speak_with_mr_Wellington = false;\n speak_with_nina_Taylor = false;\n\n Boolean can_exam_canvas;\n can_exam_canvas = false;\n Boolean find_bedroom_key;\n find_bedroom_key = false;\n \n int safe_code, essai_code;\n safe_code = 9515;\n \n if (exam)\n {\n System.out.println(\"You are in the poolroom. \\n\"\n + \"Mr Taylor was founded by the Chambermaid this morning when she came to clean the poolroom. Her scream attracted everyone. \\n\"\n + \"You notice that it is missing a pool cue and you find a strange red necklace nearby the pool. \\n\"\n + \"You examine the dead body and you notice a circular wound with the same diameter of a pool cue and some splinters of wood at the bottom of the neck. \\n\"\n + \"Take advantage that everyone is here to question them.\");\n canSpeak = true;\n exam = false;\n System.out.println(\"There are a lot of people in this room. \\n\" \n +\" Nina Taylor the master daughter has long brown hair. Sha has a beautiful blue dress. \\n\"\n +\" Bob Taylor is the little son of Mr Taylor. He seems to be really nice and kind. But he is really sad. \\n\"\n +\" Emma the Chambermaid is an old woman. She has been working for the family for a very long time. She has a black dress and a white pinny.\\n\" \n +\" Mr Cunningham is a grey-haired man with a beige square suit and a lie. \\n\"\n +\" Mr Taylor had dark blond hair and a mustache. He had nice black tuxedo. \\n\"\n +\" Mr Wellinghton is a brown-haired man with a brown square suit and a lie. \\n\"\n +\" Ms Cunnigham is a grey-blond-haired woman with a pink dress. \\n\"\n +\" Ms Taylor seems to be really sad. Sha has dark-brown hair and a long claret dress. \\n\"\n +\" Ms Wellinghton is a redhead-haired woman with a long light green dress. \\n \"\n +\" Alfred the Valet has curly blond hair. He seems to be bother. \\n\"\n +\" Sam the caretaker is a black-haired black man. \");\n }\n if (speak_with_mr_Taylor && speak_with_ms_Taylor && speak_with_ms_Cunningham && speak_with_chambermaid && speak_with_bob_Taylor && speak_with_mr_Cunningham\n && speak_with_ms_Wellington && speak_with_valet && speak_with_caretaker && speak_with_mr_Wellington && speak_with_nina_Taylor && exam)\n {\n canSpeak = false;\n step1Finish = true;\n poolroom.modifyExit(\"east\");\n speak_with_mr_Taylor = false;\n speak_with_ms_Taylor = false;\n speak_with_ms_Cunningham = false;\n speak_with_chambermaid = false;\n speak_with_bob_Taylor = false;\n speak_with_mr_Cunningham = false;\n speak_with_ms_Wellington = false;\n speak_with_valet = false;\n speak_with_caretaker = false;\n speak_with_mr_Wellington = false;\n speak_with_nina_Taylor = false;\n }\n\n // Step 2 : banqueting hall //\n if (step1Finish)\n {\n bob_Taylor.setRoom(cellar);\n nina_Taylor.setRoom(banquetinghall);\n ms_Cunningham.setRoom(dancingroom);\n if (currentRoom == banquetinghall)\n {\n if (firstEnter)\n { \n toys_not_front_of_door = false; //false = toys front of the door // true = toys not front of the door\n find_bob_Taylor = false;\n System.out.println(\" When you opened the poolroom door, you shut on a toy so you lose one HealthPoint\");\n player.setHP(player.getHP() - 1);\n firstEnter = false;\n }\n if (exam)\n {\n System.out.println(\"You cannot open the dancing room door now because there are a lot of toys. \\n\"\n + \"Nina Taylor is next to the toys and you can speak with her. \");\n canSpeak = true;\n exam = false;\n }\n if (speak_with_nina_Taylor)\n {\n nina_Taylor.setText(\"These are my brother toys. Find him to tidy his toys\");\n speak_with_nina_Taylor = false;\n canSpeak = false;\n }\n }\n else if (currentRoom == hall)\n {\n // Step 2 bis : Hall //\n if (exam)\n {\n System.out.println(\" You are in the hall but there is nobody here. \");\n exam = false;\n }\n }\n else if (currentRoom == poolroom)\n {\n if (exam)\n {\n System.out.println(\"You are in the poolroom. Mr Taylor's body was removed. All the peopple are gone. \\n\"\n + \"You do not want to stay in this room. The atmosphere has become bad. You want to leave.\");\n exam = false;\n }\n }\n else if (currentRoom == kitchen)\n {\n if (exam)\n {\n System.out.println(\"This is the kitchen, Bob Taylor is not here. \\n\"\n + \"A set of forks and knives is in one of the cupboards of the kitchen.\");\n exam = false;\n // Recupère arme\n }\n }\n else if (currentRoom == cellar)\n {\n if (exam)\n {\n System.out.println(\"You found Bob Taylor in the back of the cellar\");\n find_bob_Taylor = true;\n exam = false;\n canSpeak = true;\n }\n if (speak_with_bob_Taylor)\n {\n System.out.println(\"You convince Bob to tidy up his toys.\");\n toys_not_front_of_door = true;\n canSpeak = false;\n speak_with_bob_Taylor = false;\n }\n if (toys_not_front_of_door) \n {\n banquetinghall.modifyExit(\"south\");\n step2Finish = true;\n }\n }\n if (step2Finish)\n {\n if (currentRoom == dancingroom)\n {\n if (firstEnter)\n {\n if (exam)\n {\n System.out.println(\"You are in an extraordinary dancing room. You perceive a gramophone on a commode. You see a beautiful candlestick and a gramophone. \\n\"\n + \"Strangely here is no disk on the gramophone. You see Ms Cunningham beside it. She seems to want to talk with you.\");\n exam = false;\n canSpeak = true;\n }\n if (speak_with_ms_Cunningham)\n {\n ms_Cunningham.setText(\"Oh, good morning ! I am happy to see you. Unlike the dark atmosphere of the mansion it is a beautiful weather outside. \\n\"\n + \"I hope your investigation is progressing well. I am scared that the murderer is still at liberty. I cannot sleep properly since the night of the murder. Ah ! I know, you are going to dance with me. It will make me think of something other than this dark situation. \\n\"\n + \"Sorry I will walk on your feet. Do I hurt you not too much ? I can be very clumsy.Oh, good morning ! I am happy to see you. Unlike the dark atmosphere of the mansion it is a beautiful weather outside. \\n\"\n + \"I hope your investigation is progressing well. I am scared that the murderer is still at liberty. I cannot sleep properly since the night of the murder. Ah ! I know, you are going to dance with me. It will make me think of something other than this dark situation. \\n\"\n + \"Sorry I will walk on your feet. Do I hurt you not too much ? I can be very clumsy.\");\n System.out.println(\"You spoke and danced a lot of time with Ms Cunningham. Then you are very tired so you lose one healthpoint\");\n player.setHP(player.getHP() - 1);\n canSpeak = false;\n speak_with_ms_Cunningham = false;\n }\n firstEnter = false;\n } \n if (exam)\n {\n {\n System.out.println(\"You are in an extraordinary dancing room. You perceive a gramophone on a commode. You see a beautiful candlestick and a gramophone. \\n\"\n + \"Strangely here is no disk on the gramophone. You see Ms Cunningham beside it.\");\n exam = false;\n canSpeak = true; \n }\n if (speak_with_ms_Cunningham)\n {\n ms_Cunningham.setText(\"Thank you. I feel better thanks to you.\");\n canSpeak = false;\n speak_with_ms_Cunningham = false;\n }\n }\n }\n else if (currentRoom == livingroom)\n {\n exam = false;\n System.out.println(\"You ride the last step and arrive in the living room. A little green ghost appears in the room. He seems not to be kind. \");\n if (ghost.getHP() <=0) \n {\n livingroom.modifyExit(\"north\");\n livingroom.modifyExit(\"west\");\n exam = true;\n if (exam)\n {\n System.out.println(\"There is no useful object and there is nobody here. \"); \n step3Finish = true;\n }\n }\n }\n \n if (step3Finish)\n {\n if (currentRoom == library)\n {\n if (exam)\n {\n System.out.println(\" A library with a lot of books is behind the door you just pushed. \\n\"\n + \"You see a big painting which depicts the same library where you are. There is just a difference between them. \\n\"\n + \"On the painting, a gramophone is pictured on a sideboard. The gramophone on the painting curiously looks like the gramophone in the dancing room. \\n\"\n + \"When you inspect the sideboard on the real library you see some wear marks as if an object was previously placed on it. \\n\"\n + \"You meet the chambermaid wanting to leave the library. She seems to want to tell you something but do not dare to approach you.\");\n canSpeak = true;\n exam = false;\n }\n if (speak_with_chambermaid)\n {\n chambermaid.setText(\"I saw Nina Taylor go to the gardener hut some nights. I do not know what she is doing there. \");\n canSpeak = false;\n speak_with_chambermaid = false;\n \n }\n }\n \n else if (currentRoom == corridor)\n {\n System.out.println(\"There is a statut with a weapon in this corridor. You can take it weapon if you want. \");\n // recupere arme\n Boolean fight; // this variable will be initialize with the fight\n if (fight)\n {\n if (exam)\n {\n System.out.println(\" You are in a corridor. You see four doors. Only two are opened.\");\n exam = false;\n step4Finish = true;\n }\n }\n }\n if (step4Finish)\n {\n if (currentRoom == bathroom)\n {\n if (exam)\n {\n System.out.println(\" You enter in the bathroom and you see the chambermaid treating the valet's arm. \\n\"\n + \" The wound looks like a rodent bite but it is much bigger than a rat. It is strange because Mr Taylor was allergic to animals. \\n\"\n + \"You notice that there is a potion on the furniture next to the chambermaid. She notices that you are injured. \\n\"\n + \"She signals to you that you can take it. \"); \n //permet de prendre la potion\n exam = false;\n }\n //ajout potion possible pour le joueur\n\n }\n if (currentRoom == guestbedroom)\n {\n if (exam)\n {\n System.out.println(\" You are in the guest bedroom. Today this bedroom is Mr&Ms Cunnigham's bedroom. Mr Cunnigham is in his bedrrom.\");\n mr_Cunningham.setRoom(guestbedroom);\n ms_Cunningham.setText(\"It is strange, last time this canvas was not here.\");\n can_exam_canvas = true;\n if (exam && can_exam_canvas)\n {\n System.out.println(\" You find a key behind the canvas and you take it.\");\n find_bedroom_key = true;\n player.addItem(bedroomkey);\n } \n exam = false;\n }\n }\n \n if (step5Finish)\n {\n if (find_bedroom_key)\n {\n corridor.modifyExit(\"south\");\n }\n if (currentRoom == bedroom)\n {\n if (exam)\n {\n System.out.println(\"You are in the host bedroom. You see a big safe with a four number code. Ms Taylor is in her room.\");\n ms_Taylor.setText(\"Oh no ! I am forgetting the number code ! Please, ask to my daughter, my guests and my employees. I gave to several of them a piece of this code. \");\n \n if (speak_with_ms_Taylor)\n {\n nina_Taylor.setRoom(dancingroom);\n nina_Taylor.setText(\"Bob Taylor has fallen into a 10-meter deep well and is trying to pull it up. \\n \" +\n \"Each day it rises 3 meters and slides 2 meters during the night.\\n\" +\n \"How many days will it take to get to the surface?\");\n ms_Wellington.setRoom(library);\n ms_Wellington.setText(\"In a girl group\\n\" +\n \" 70% wear a blue sweater\\n\" +\n \" 75% wear blue pants\\n\" +\n \" 85% wear a blue hat\\n\" +\n \" 85% wear a blue coat\\n\" +\n \"What is the minimum percentage of girls wearing only blue clothes?\");\n \n bob_Taylor.setRoom(library);\n bob_Taylor.setText(\"I saw my sister and my father arguing before his death.\");\n \n mr_Cunningham.setRoom(poolroom);\n mr_Cunningham.setText(\"David is 10 years old and his younger brother is half his age. \\n\" +\n \"When David will be 10 times older, how old will Franck be?\");\n \n \n }\n }\n }\n if (step6Finish)\n {\n if (currentRoom == bedroom)\n {\n System.out.println(\"Did you find the safe code? \");\n // enter the safe code -- creation int essai_code\n if (essai_code == safe_code)\n {\n System.out.println(\"You find the good number code, the safe door is opened. \\n \" +\n \"The safe contains a disk, a lot of money and a biscuits box.\");\n }\n }\n if (currentRoom == dancingroom\n // && il doit avoir le dique dans son inventaire\n )\n {\n ms_Taylor.setRoom(dancingroom);\n ms_Taylor.setText(\"What does this object do here, it should be in the library\");\n // player has to take the gramophone in his inventory\n }\n if (currentRoom == library \n // && il doit avoir le disque et le gramophone dans son inventaire\n )\n {\n System.out.println(\"You put the gramophone at its place and you insert the disk on it. \\n\"+\n \" You are hearing a loud noise and a door is appearing.\"); \n library.modifyExit(\"north\"); \n }\n if (step7Finish)\n {\n if (currentRoom == laboratory)\n {\n System.out.println(\"When you opened the door, a little green ghost appears and attacked you.\");\n if(fight_win)\n {\n System.out.println(\"The skeleton is dead. You see that one of its bone is strange. This bone seems to be carved as a key\");\n // joueur doit ramasser la clef\n \n if (exam)\n {\n System.out.println(\" You look and the desk and you find some construction plans. It seems that Mr Taylor wanted to dig very deeply at east from the garden. It is the same place than the gardener hut. \");\n }\n corridor.modifyExit(\"up\");\n System.out.println(\"You unblock a new room. A trapdoor appears in the corridor\");\n }\n }\n if (currentRoom == attic)\n {\n if (exam)\n {\n System.out.println(\" You finally discover the attic. It is dark because there is only one window lighting the room. \\n\"\n + \" You decide to look out the window and discover a huge garden hidden by the trees when guests arrive by the entrance. \");\n hall.modifyExit(\"north\");\n }\n }\n if (step8Finish)\n {\n if (currentRoom == garden)\n {\n if (exam)\n {\n System.out.println(\" You see a well at the north but there is a steel grid locked by a padlock.\\n\"\n + \"There is an apple tree next to it with only one apple on the tree. You can maybe pick up the apple and eat it now or later.\\n\"\n + \"\");\n }\n }\n }\n \n \n }\n \n \n \n \n /*player.addItem(necklace_red);\n player.addItem(necklace_red);\n player.addItem(necklace_red);*/\n /* \n \n \n // Enter the main command loop. Here we repeatedly read commands and\n // execute them until the game is over.\n \n boolean finished = false;\n while (! finished) {\n Command command = parser.getCommand();\n finished = processCommand(command);\n }\n System.out.println(\"Thank you for playing. Good bye.\");\n */\n }\n }\n }\n }\n }\n }\n \n }", "public void reset() {\n // White Pieces\n placePiece(new Rook(Player.White), new Position(\"a1\"));\n placePiece(new Knight(Player.White), new Position(\"b1\"));\n placePiece(new Bishop(Player.White), new Position(\"c1\"));\n placePiece(new Queen(Player.White), new Position(\"d1\"));\n placePiece(new King(Player.White), new Position(\"e1\"));\n placePiece(new Bishop(Player.White), new Position(\"f1\"));\n placePiece(new Knight(Player.White), new Position(\"g1\"));\n placePiece(new Rook(Player.White), new Position(\"h1\"));\n placePiece(new Pawn(Player.White), new Position(\"a2\"));\n placePiece(new Pawn(Player.White), new Position(\"b2\"));\n placePiece(new Pawn(Player.White), new Position(\"c2\"));\n placePiece(new Pawn(Player.White), new Position(\"d2\"));\n placePiece(new Pawn(Player.White), new Position(\"e2\"));\n placePiece(new Pawn(Player.White), new Position(\"f2\"));\n placePiece(new Pawn(Player.White), new Position(\"g2\"));\n placePiece(new Pawn(Player.White), new Position(\"h2\"));\n\n // Black Pieces\n placePiece(new Rook(Player.Black), new Position(\"a8\"));\n placePiece(new Knight(Player.Black), new Position(\"b8\"));\n placePiece(new Bishop(Player.Black), new Position(\"c8\"));\n placePiece(new Queen(Player.Black), new Position(\"d8\"));\n placePiece(new King(Player.Black), new Position(\"e8\"));\n placePiece(new Bishop(Player.Black), new Position(\"f8\"));\n placePiece(new Knight(Player.Black), new Position(\"g8\"));\n placePiece(new Rook(Player.Black), new Position(\"h8\"));\n placePiece(new Pawn(Player.Black), new Position(\"a7\"));\n placePiece(new Pawn(Player.Black), new Position(\"b7\"));\n placePiece(new Pawn(Player.Black), new Position(\"c7\"));\n placePiece(new Pawn(Player.Black), new Position(\"d7\"));\n placePiece(new Pawn(Player.Black), new Position(\"e7\"));\n placePiece(new Pawn(Player.Black), new Position(\"f7\"));\n placePiece(new Pawn(Player.Black), new Position(\"g7\"));\n placePiece(new Pawn(Player.Black), new Position(\"h7\"));\n }", "private void init() {\n this.playing = true;\n this.hand.clear();\n this.onTable = 0;\n this.points = 0;\n }", "public Hand(){}", "public void setHand(ArrayList<Card> c){//using this to so that the controller can set the hand to whatever amount the getCard() method give--- this will all happen in the controller\n\t\thand = c;//set the arraylist of cards into the hand we created in this Player class\n\t}", "public void initialGame()\t{\n\t\tinput = new Scanner(System.in);\n\t\ttop = deck1.deal();\n\t\tfor(int j=0;j<numPlayers;j++)\t{\n\t\t\tSystem.out.println(\"Enter player\" + (j+1) + \"'s name:\");\n\t\t\thand[j] = new Hand(input.nextLine());\n\t\t\tfor(int i=0;i<INITIAL_DEAL;i++)\t{\n\t\t\t\thand[j].addCard(deck1.deal());\n\t\t\t}\n\t\t\trecord[j] = \"\";\n\t\t}\n\t\tSystem.out.println(\"\\n------------------\\n\");\t\n\t}", "public void handStarted(int position, GameState gs, Card[] cards) {\r\n }", "public Player() {\n//\t\thand = new Hand();\n\t\tthis.cardsInhand = new ArrayList<Card>();\n\t}", "public void setHand(ArrayList<Card> hand) {\n this.hand = hand;\n }", "public Hand() {\n downStack = new ArrayList<>();\n cardsInPlayStack = new Stack<>();\n }", "public void clearHand(){\n\t\tthis.hand = new ArrayList<Card>();\n\t}", "private void start(){\n character.fillEnergy();\n piles.getDrawPile().shuffle();\n for(int i = 1 ; i <= 5 ; i++ ){\n piles.drawCard();\n }\n effectHandler.startFight();\n\n }", "public void resetHand()\r\n {\r\n myCards = new Card[MAX_CARDS];\r\n numCards = 0;\r\n }", "public void stand(Player player) {\n int playerHandValue = player.getHand().getDeckValue();\n while (dealerHand.getDeckValue() < 17 && dealerHand.getDeckValue() <= playerHandValue) {\n dealerHand.drawCard();\n }\n }", "public void activeHandStand() {\n if (this.state == GameState.ROUNDACTIVE) {\n Hand curHand = this.getSeat(seatPlaying).getPlayer().getHands().get(0);\n curHand.setReady();\n if (isPlayerLeftBehind()) {\n for (int i = this.seatPlaying + 1; i <= this.seats.size(); i++) {\n if (this.getSeat(i).hasPlayer()) {\n Human h = (Human) this.getSeat(i).getPlayer();\n if (h.getBet() > 0) {\n this.seatPlaying = i;\n break;\n }\n }\n }\n repaintAll();\n } else {\n this.seatPlaying = 0;\n this.state = GameState.DEALTODEALER;\n //repaintAll();\n dealToDealer();\n }\n }\n }", "public Hand () //No arg\n\t{\n\t\tthis.cardsInHand = 0;\n\t\tthis.handSize = 5;\n\t}", "public void initShoulder(){\r\n do{\r\n int currentShoulderPosition = motorShoulder.getCurrentPosition();\r\n posShoulder = currentShoulderPosition + DELTA_SHOULDER;\r\n motorShoulder.setTargetPosition(posShoulder);\r\n motorShoulder.setPower(POWER_SHOULDER_SLOW);\r\n\r\n //System.out.println(\"posShoulder = \" + posShoulder);\r\n } while(!sensorShoulder.isPressed());\r\n\r\n motorShoulder.setPower(STOP);\r\n resetShoulderEncoder();\r\n posShoulder = 0;\r\n }", "private void openHand() {\r\n\t\tif (!first) {\r\n\t\t\thand.forward();\r\n\t\t\twhile (Math.abs(hand.getTachoCount() - originalHandPosition + 5) > 5) {\r\n\t\t\t}\r\n\t\t\thand.stop();\r\n\t\t} else {\r\n\t\t\tfirst = false;\r\n\t\t}\r\n\t}", "public void reset()\n {\n playersPiece = -1;\n king = false;\n empty = true;\n setTileColor(-1);\n }", "private void SetUpCard(boolean currentHand)\n\t{\n\t\tVector<JTextField> vectorOfTextFields = individualHand.GetVectorOfTextFields();\n\t\tindividualHand.SetTextFieldHolder(vectorOfTextFields.get(individualHand.GetCounter()));\n\t\tJTextField textField = individualHand.GetTextFieldHolder();\n\t\t\n\t\t// Generate Card Value and card color\n\t\tint currentCardValue = individualHand.GenerateCardValue();\n\t\tindividualHand.RedOrBlack(textField);\n\t\ttextField.setText(individualHand.CardFaceValue(currentCardValue));\n\t\t\n\t\t// set face card values to 10 if they are not Aces\n\t\tif (currentCardValue > 10)\n\t\t{\n\t\t\tcurrentCardValue = 10;\n\t\t}\n\t\t\n\t\tif (currentHand == true)\n\t\t{\n\t\t\tindividualHand.SetUserHandSum(currentCardValue);\n\t\t}\n\t\telse if (currentHand == false)\n\t\t{\n\t\t\tif (individualHand.GetDealerAceFlag())\n\t\t\t{\n\t\t\t\tint temp = (individualHand.GetDealerHandSum()+11);\n\t\t\t\tif ( temp > 17 && temp <= 21)\n\t\t\t\t{\n\t\t\t\t\tindividualHand.SetDealerHandSum(11);\n\t\t\t\t\tindividualHand.SetDealerAceFlag(false);\n\t\t\t\t}\n\t\t\t\telse if (temp > 21)\n\t\t\t\t{\n\t\t\t\t\tindividualHand.SetDealerHandSum(currentCardValue);\n\t\t\t\t\tindividualHand.SetDealerAceFlag(false);\n\t\t\t\t}\n\t\t\t\telse if (temp > 11)\n\t\t\t\t{\n\t\t\t\t\tindividualHand.SetDealerHandSum(currentCardValue);\n\t\t\t\t\tindividualHand.SetDealerAceFlag(false);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tindividualHand.SetDealerHandSum(temp);\n\t\t\t\t\tindividualHand.SetDealerAceFlag(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tindividualHand.SetDealerHandSum(currentCardValue);\n\t\t\t\tindividualHand.SetDealerAceFlag(false);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "Hand()\r\n {\r\n myCards = new Card[MAX_CARDS];\r\n numCards = 0;\r\n }", "protected final void hit() throws InsufficientCardsException {\n hand.add(deck.deal());\n update();\n }", "private void prepareDeal(){\n\t\tdeck.shuffle();\n\t\tplayers.clear(); //Remove any possible rubbish\n\t\tfor(Player p : seatPlayers){\n\t\t\tif(p != null){\n\t\t\t\tList<BlackjackHand> hands = new ArrayList<>();\n\t\t\t\tBlackjackHand hand = new BlackjackHandPlayer();\n\t\t\t\thands.add(hand);\n\t\t\t\thistoricalActions.put(hand, new ArrayList<>());\n\t\t\t\tplayers.put(p, hands);\n\t\t\t}\n\t\t}\n\t\tdealerHand = new BlackjackHandDealer();\n\t}", "public void handFinished(int position, GameState gs) {\r\n }", "public void dealCardsToPile()\n {\n // Set the first initial computer card to display\n computerCard = highCardGame.getCardFromDeck();\n\n // Sets the first initial player card\n playerCard = highCardGame.getCardFromDeck();\n }", "public Hand()\n\t{\n\t\thand = new Card[12];\n\t\tnumCards = 0;\n\t\tscore = 0;\n\t}", "public War()\n {\n //create deck of cards\n deck.shuffle();\n \n //deal cards to two different hands\n while(!deck.isEmpty())\n {\n card=deck.dealCard();\n player1Hand.enqueue(card);\n \n card=deck.dealCard();\n player2Hand.enqueue(card);\n }\n \n }", "public void showHand(){\n System.out.println(this.hand.toString());\n }", "public Player()\r\n\t{\r\n\t\tpCards = new String[DECK_SIZE];\r\n\t\thandCount = 0;\r\n\t\tstand = false;\r\n\t}", "public void newRound()\n\t{\n\t\tif(player1.getDeck().isEmpty())\n\t\t{\n\t\t\treshufflePlayer1();\n\t\t}\n\t\tif(player2.getDeck().isEmpty())\n\t\t{\n\t\t\treshufflePlayer2();\n\t\t}\n\t\t\n\t\tactivePlayerOneCard = player1.draw();\n\t\tactivePlayerTwoCard = player2.draw();\n\t}", "public void tryStand() {\n if(player.getHand().size() > 0){\n firstStand = true;\n dealerTurn(1);\n } else{\n errorFlag = true;\n userMessage = \"You must get your initial hand dealt before you can stand\";\n }\n\n\n }", "public Hand() {\n }", "public TTT_GamePlay() {\r\n\t\tArrays.fill(p1, 0);\r\n\t\tArrays.fill(p2, 0);\r\n\t\tArrays.fill(selectedCells, false);\r\n\t\tthis.board = new int[9];\r\n\t\tthis.player = player1;\r\n\t\twin = false;\r\n\t}", "private void shuffleAndGiveCards() {\n\n List<Card> tmpDeck= new ArrayList<Card>(deck); \n Collections.shuffle(tmpDeck, shuffleRng);\n \n for (int i=0; i<players.size(); ++i) {\n int startIndex= Jass.HAND_SIZE*i; //So for player 0 the startIndex will be 0, for player2 9, etc...\n int endIndex = Jass.HAND_SIZE*(i+1); //So for player 1 the endIndex will be 9, for player2 18, etc...\n\n CardSet hand= CardSet.of(tmpDeck.subList(startIndex, endIndex));\n PlayerId player = PlayerId.ALL.get(i);\n\n players.get(player).updateHand(hand);\n handsOfCards.put(player, hand); \n }\n }", "@Override\n public void beHelpful() {\n this.playPiano();\n this.takeABow();\n }", "public void catchCard(){\r\n changePlace(deck);\r\n changePlace(hand);\r\n }", "public void faceUp(){\r\n changePlace(hand);\r\n //do a magical work\r\n changePlace(graveYard);\r\n }", "@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}", "public void fill(){\n int i = 0;\n for (Suit suit:Suit.values()){\n for (Rank rank:Rank.values()) {\n deck[i] = new Card(rank, suit);\n numCards++;\n i++;\n }\n }\n }", "void refillCards() {\n if (this.gameDeck.isEmpty() && !this.wonDeck.isEmpty()) {\n this.wonDeck.shufffle();\n Deck temp = this.gameDeck;\n this.gameDeck = this.wonDeck;\n this.wonDeck = temp;\n\n }\n\n }", "public void letSmartComputerSetup() {\n //generates a random spot for the flag\n int randomRow = (int)(Math.random() * 2);\n int randomCol = (int)(Math.random() * 10);\n\n //adjusts the flag for the proper team\n if(state.getCurrentTeamsTurn().getTEAMNUMBER() == 0) {\n randomRow += 8;\n }\n\n //adds the flag to the board\n state.setLastTappedPieceButton(Rank.FLAG);\n state.tapOnSquare(randomRow, randomCol);\n state.tapOnSquare(randomRow, randomCol);\n\n //places bombs around the flag if possible\n state.setLastTappedPieceButton(Rank.BOMB);\n if(randomRow != 0) {\n state.tapOnSquare(randomRow - 1, randomCol);\n state.tapOnSquare(randomRow - 1, randomCol);\n }\n if(randomRow != 9) {\n state.tapOnSquare(randomRow + 1, randomCol);\n state.tapOnSquare(randomRow + 1, randomCol);\n }\n if(randomCol != 0) {\n state.tapOnSquare(randomRow, randomCol -1);\n state.tapOnSquare(randomRow, randomCol -1);\n }\n if(randomCol != 9) {\n state.tapOnSquare(randomRow, randomCol + 1);\n state.tapOnSquare(randomRow, randomCol + 1);\n }\n\n //transitions the player to play phase\n state.transitionPhases();\n }", "public myGameFrame() throws IOException {\n initComponents();\n newDeck = new DeckOfCards ();\n carrd = newDeck.carrd;\n userPoint = 0;\n northPoint= 0; \n westPoint = 0; \n eastPoint = 0;\n mytransporthandler = new myTransferHandler (\"icon\"); \n \n }", "public void setPieces(){\r\n Pawn[] arrwPawn = new Pawn[8];\r\n for (int i=0 ; i<8 ; i++){\r\n pos.setPosition(6,i);\r\n arrwPawn[i] = new Pawn (pos , piece.Colour.WHITE);\r\n GameBoard.putPiece(arrwPawn[i]);\r\n }\r\n\r\n Pawn[] arrbPawn = new Pawn[8];\r\n for(int i=0 ; i<8 ; i++){\r\n pos.setPosition(0,i);\r\n arrbPawn[i] = new Pawn(pos , piece.Colour.BLACK);\r\n GameBoard.putPiece(arrbPawn[i]);\r\n }\r\n\r\n\r\n //set black pieces in the board\r\n\r\n pos.setPosition(0,0);\r\n Rook bRook1 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook1);;\r\n\r\n pos.setPosition(0,7);\r\n Rook bRook2 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook2);\r\n\r\n\r\n pos.setPosition(0,1);\r\n Knight bKnight1 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,6);\r\n Knight bKnight2 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,2);\r\n Bishop bBishop1 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop1);\r\n\r\n pos.setPosition(0,5);\r\n Bishop bBishop2 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop2);\r\n\r\n pos.setPosition(0,3);\r\n Queen bQueen = new Queen(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bQueen);\r\n\r\n pos.setPosition(0,4);\r\n King bKing = new King(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKing);\r\n\r\n //set white pieces in the board\r\n\r\n pos.setPosition(7,0);\r\n Rook wRook1 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook1);\r\n\r\n pos.setPosition(7,7);\r\n Rook wRook2 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook2);\r\n\r\n pos.setPosition(7,1);\r\n Knight wKnight1 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,6);\r\n Knight wKnight2 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,2);\r\n Bishop wBishop1 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop1);\r\n\r\n pos.setPosition(7,5);\r\n Bishop wBishop2 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop2);\r\n\r\n pos.setPosition(7,3);\r\n Queen wQueen = new Queen(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wQueen);\r\n\r\n pos.setPosition(7,4);\r\n King wKing = new King(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKing);\r\n\r\n\r\n\r\n Rook arrwRook[] = {wRook1,wRook2};\r\n Rook arrbRook[] = {bRook1,bRook2};\r\n Queen arrwQueen[] = {wQueen};\r\n Queen arrbQueen[] = {bQueen};\r\n Knight arrwKnight[] = {wKnight1,wKnight2};\r\n Knight arrbKnight[] = {bKnight1,bKnight2};\r\n King arrwKing[] = {wKing};\r\n King arrbKing[] = {bKing};\r\n Bishop arrwBishop[] = {wBishop1,wBishop2};\r\n Bishop arrbBishop[] = {bBishop1,bBishop2};\r\n }", "public void play(int[] handSize, Table table){\n\t\t\n\t\tTable copyTable = new Table();\n\t\tcopyTable = table;\n\t\t\n\t\tboolean canPlay = false;\n\t\t//ArrayList<Tile> melds = table.getMelds();\n\t\t\n\t\t//ArrayList<Meld> copyMelds = (ArrayList<Tile>)table.getMelds().clone();\n\t\tArrayList<Tile> copyHand =(ArrayList<Tile>)hand.clone();\n\t\t//ArrayList<Meld> copyTable = (ArrayList<Meld>)melds.clone();\n\t\t\n\t\t//makeMeldsOnlyInHand(copyHand, copyTable);\n\t\t//makeMeldBetweenHandAndTable(copyHand, copyTable);\n\t\t\n\t\t/*System.out.println(\"copyhand\" + copyHand.toString());\n\t\tSystem.out.println(\"copyTable\" + copyTable.toString());\n\t\t*/\n\t\t\n\t\tif(copyHand.isEmpty()){\n\t\t\tcanPlay = canMakeMeldsOnlyInHand(hand, table);\n\t\t\tcanPlay = makeMeldBetweenHandAndTable(hand, table);\n\t\t\tSystem.out.println(hand.toString());\n\t\t}else {\n\t\t\t//if someone has 3 tiles more than p3\n\t\t\tif(!hasALessHand(handSize)) {\n\t\t\t\t//p3 can plays only the tiles of its hand that require using tiles on the table to make melds\n\t\t\t\tcanPlay = makeMeldBetweenHandAndTable(hand, table);\n\t\t\t}else {\n\t\t\t\tcanPlay = canMakeMeldsOnlyInHand(hand, table);\n\t\t\t}\n\t\t}\n\t\tif(canPlay == false) {\n\t\t\tplayer.drawTile(hand,table);\n\t\t}\n\t}", "private void fillDeck() {\n int index = 0;\n for (int suit = 1; suit <= 4; suit++) {\n for (int rank = 1; rank <= 13; rank++) {\n deck[index] = new Card(rank, suit);\n index++;\n\n }\n }\n }", "void initializeGame() {\n // Initialize players\n // Put the pieces on the board\n }", "protected void fillBoard(Color playerColor)\n {\n for(int i = 0; i < 9; i++)\n this.setSquare(i, playerColor);\n }", "public void onStartOfGame () {\n\t\t// Initialize Deck object\n\t\tdeck = new Deck();\n\n\t\t// Initialize field\n\t\tint numInitialFieldCard = 0;\n\t\tint numInitialHandCard = 0;\n\n\t\tif (vServerThread.size() == 2) {\n\t\t\tnumInitialFieldCard = 8;\n\t\t\tnumInitialHandCard = 8;\n\t\t}\n\n\t\tField = new ArrayList (numInitialFieldCard);\n\n\t\tfor (int i = 0; i < numInitialFieldCard; i++) {\n\t\t\tField.add (deck.drawCard());\n\t\t\t// Deck should now be 40\n\t\t}\n\n\t\t// Send correct amount of cards to each client\n\t\tfor(int i = 0; i < vServerThread.size(); i++) { // For each client\n\t\t\tServerThread current = vServerThread.get (i);\n\n\t\t\tfor (int j = 0; j < numInitialHandCard; j++) {\n\t\t\t\t// Signal clients that the next card will be for the hand\n\t\t\t\tsendMessage (\"Signal:SendHand\", current);\n\n\t\t\t\t// Make sure the messages are not sent to clients at the same time as the cards\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep (10);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tsendCard (deck.drawCard(), current);\n\t\t\t}\n\t\t} // Deck should be 24\n\n\t\t// Send field to each client\n\t\tfor (int i = 0; i < vServerThread.size(); i++) { // For each client\n\t\t\tServerThread current = vServerThread.get (i);\n\n\t\t\tfor (int j = 0; j < numInitialFieldCard; j++) {\n\t\t\t\t// Signal clients that the next card will be for the field\n\t\t\t\tsendMessage (\"Signal:SendField\", current);\n\n\t\t\t\t// Make sure the messages are not sent to clients at the same time as the cards\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep (10);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tsendCard (Field.get(j), current);\n\t\t\t}\n\t\t}\n\t\t//DEBUG\n\t\t//System.out.println (\"Amount of cards in deck: \" + deck.numCardsLeft());\n\n\t\t// Notify first player of his/her turn; as default, the host gets the first turn\n\t\tServerThread host = vServerThread.get (0);\n\t\tsendMessage (\"Signal:Turn\", host);\n\t\tcurrentPlayer = host;\n\t}", "public void fillDeck()\n {\n //start with an empty card at the 2 of clubs\n Card c = new Card(); \n int s = c.CLUB;\n int r = c.MIN_RANK;\n\n while (s <= c.SPADE)\n {\n while (r <= c.ACE)\n {\n Card dealing = new Card(s, r); \n dealer.enqueue(dealing); \n r++; \n }\n \n s++; \n r = c.MIN_RANK; \n }\n }", "public void deal(){\n // deal cards when game is started and game stage is 0\n // need to clear everything\n if(turn == 4){\n turn = 0;\n }\n player1Hand.clear();\n player2Hand.clear();\n player3Hand.clear();\n player4Hand.clear();\n kitty.clear();\n currentMiddle.clear();\n\n /**\n * External Citation\n * Date: 19 September 2019\n * Problem: Did not have a good way to shuffle array\n * Resource: Dr. Tribelhorn, https://www.geeksforgeeks.org/collections-shuffle-java-examples/\n * Solution: Tribelhorn informed us of the shuffle function, and\n * we used the code in this post as a resource\n */\n // shuffle deck\n Collections.shuffle(deck.cardDeck);\n\n // deal cards to each player\n // player 1's hand\n for (int i = 0; i < 5; i++) {\n player1Hand.add(i, deck.cardDeck.get(i));\n player2Hand.add(i, deck.cardDeck.get(5 + i));\n player3Hand.add(i, deck.cardDeck.get(10 + i));\n player4Hand.add(i, deck.cardDeck.get(15 + i));\n }\n\n for (int i = 0; i < 4; i++) {\n kitty.add(i, deck.cardDeck.get(20 + i));\n }\n kittyTop = kitty.get(0);\n middleCard = deck.cardDeck.get(20);\n middleCardSuit = middleCard.getSuit();\n\n // make middle card visible\n middleVisible = true;\n\n // change game state to 1\n gameStage++;\n }", "private void fillDeck(){\r\n this.cards = new ArrayList<Card>();\r\n int cardPerSuit = this.deckSize/4;\r\n \r\n for( Suit Su: suits ){\r\n for(int i = 0; i < cardPerSuit; i++){\r\n this.cards.add(i, new Card(i+2, Su.ordinal()));\r\n }\r\n }\r\n \r\n }", "void fill()\n\t{\n\t\tif(!mySeq.isEmpty())\n\t\t{\t\n\t\t\tPair temp = mySeq.removeFirst();\t\t\n\t\t\tthis.nextPos = temp.getSecond();\n\t\t\tthis.myTurn = temp.getFirst();\n\t\t}\n\t}", "public void RefillDeck()\n\t{\n\t\tRefillDeck(false);\n\t}", "private void initialSetup() {\n\t\tplaceNewPiece('a', 1, new Rook(board, Color.WHITE));\n placeNewPiece('b', 1, new Knight(board, Color.WHITE));\n placeNewPiece('c', 1, new Bishop(board, Color.WHITE));\n placeNewPiece('d', 1, new Queen(board, Color.WHITE));\n placeNewPiece('e', 1, new King(board, Color.WHITE, this)); // 'this' refere-se a esta jogada\n placeNewPiece('f', 1, new Bishop(board, Color.WHITE));\n placeNewPiece('g', 1, new Knight(board, Color.WHITE));\n placeNewPiece('h', 1, new Rook(board, Color.WHITE));\n placeNewPiece('a', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('b', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('c', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('d', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('e', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('f', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('g', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('h', 2, new Pawn(board, Color.WHITE, this));\n\n placeNewPiece('a', 8, new Rook(board, Color.BLACK));\n placeNewPiece('b', 8, new Knight(board, Color.BLACK));\n placeNewPiece('c', 8, new Bishop(board, Color.BLACK));\n placeNewPiece('d', 8, new Queen(board, Color.BLACK));\n placeNewPiece('e', 8, new King(board, Color.BLACK, this));\n placeNewPiece('f', 8, new Bishop(board, Color.BLACK));\n placeNewPiece('g', 8, new Knight(board, Color.BLACK));\n placeNewPiece('h', 8, new Rook(board, Color.BLACK));\n placeNewPiece('a', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('b', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('c', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('d', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('e', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('f', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('g', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('h', 7, new Pawn(board, Color.BLACK, this));\n\t}", "public Hand(Shuffleable cards) {\n this.setLayout(new BorderLayout());\n this.cards = cards;\n this.busted = false; //Player not busted by default\n this.value = 0; //Value starts at 0\n values.add(0);\n nameLabel = new JLabel(\"\", SwingConstants.LEFT); //Initializes name label\n valueLabel = new JLabel(\"Value: \" + value, SwingConstants.LEFT); //Initilizes value label\n cardPane = new JPanel(new FlowLayout());\n cardPane.setBackground(Color.GREEN); //Background color green\n this.add(nameLabel, BorderLayout.NORTH);\n this.add(valueLabel, BorderLayout.SOUTH);\n this.add(cardPane, BorderLayout.CENTER);\n }", "public void setHand(EnumPolicy[] hand)\n {\n this.hand.clear();\n EnumRegion region = getRegion();\n for (EnumPolicy policy : hand)\n {\n PolicyCard policyCard = PolicyCard.create(region, policy);\n// System.out.println(policyCard.toString());\n this.hand.add(policyCard);\n }\n }", "public void ResetGame(){\n handComputer.clear();\n handHuman.clear();\n deck.clear();\n\n InitializeDeck();\n InitializeComputerHand();\n InitializeHumanHand();\n\n topCard = deck.get(0);\n }", "protected void end() {\n \tRobot.hand.setWrist(0.0);\n }", "private void firstRound(Player player)\n {\n PowerUpCard option1 = powerUpCardDeck.getFirstCard();\n PowerUpCard option2 = powerUpCardDeck.getFirstCard();\n try\n {\n String chosenId = player.getView().chooseSpawnPoint(option1.getCardData(), option2.getCardData());\n PowerUpCard chosen = option1.getId().equals(chosenId) ? option1 : option2;\n Block spawnPoint = map.findRoomByColor(chosen.getColor()).getSpawnPoint();\n powerUpCardDeck.addCard(chosen);\n player.addPowerUpCard(chosen.equals(option1) ? option2 : option1);\n player.setBlock(spawnPoint);\n player.setFirstRoundPlayed(true);\n sendBroadcastUpdate();\n }\n catch (ConnectionErrorException | TimeOutException e)\n {\n powerUpCardDeck.addCard(option1);\n powerUpCardDeck.addCard(option2);\n throw e;\n }\n\n }", "public void setUpCards() {\n this.setSuspectCardsAndPlayerPieces();\n this.setWeaponCardsAndPieces();\n this.setRoomCards();\n this.setUpDetectiveSlips();\n this.shuffleCards();\n this.setEnvelope();\n this.shuffleCards();\n this.gatherCards();\n this.giveOutCards();\n }", "public void createNewPlayer()\n\t{\n\t\t// Set up all badges.\n\t\tm_badges = new byte[42];\n\t\tfor(int i = 0; i < m_badges.length; i++)\n\t\t\tm_badges[i] = 0;\n\t\tm_isMuted = false;\n\t}", "public void ClearGame(){\n handComputer.clear();\n handHuman.clear();\n deck.clear();\n }", "public void fillChest(Inventory inv);", "public Hand()\n {\n cards = new ArrayList<Card>();\n }", "@Override\r\n\tpublic void playRoadBuildingCard() {\n\t\t\r\n\t}" ]
[ "0.6764219", "0.6617254", "0.6602521", "0.6538017", "0.65013254", "0.6464825", "0.64347935", "0.6371627", "0.6280384", "0.62788695", "0.6266237", "0.62594974", "0.62288314", "0.6210751", "0.61903036", "0.61727846", "0.6170767", "0.61684215", "0.61439", "0.61393154", "0.6133671", "0.6131668", "0.61278015", "0.61177856", "0.6117612", "0.61106354", "0.6091977", "0.6060901", "0.6049127", "0.60295594", "0.6022634", "0.60170627", "0.60154134", "0.60130453", "0.6012213", "0.6004035", "0.5995601", "0.5989913", "0.5983357", "0.5961045", "0.59575677", "0.59545434", "0.5952475", "0.5950643", "0.5946698", "0.5923229", "0.5921034", "0.59184927", "0.5897152", "0.5882838", "0.588157", "0.587936", "0.585112", "0.5840488", "0.5834245", "0.5825839", "0.58255017", "0.5823598", "0.5819667", "0.5815394", "0.58061063", "0.5801005", "0.57838184", "0.577003", "0.5763199", "0.57579184", "0.5745116", "0.573488", "0.5731751", "0.5718617", "0.5710493", "0.5709138", "0.57026035", "0.56958395", "0.5693021", "0.56919384", "0.5691109", "0.5690771", "0.5690599", "0.56843513", "0.56830305", "0.5680152", "0.5680111", "0.56775135", "0.567704", "0.5672829", "0.5670043", "0.5665506", "0.56577986", "0.56566113", "0.5652971", "0.5651664", "0.5648492", "0.56392455", "0.56323195", "0.56204045", "0.56034315", "0.5599831", "0.5591319", "0.55900574" ]
0.68487644
0
removes tile from player hand
public void removeTile(Tile a_tile){ for(int i = 0; i < playerHand.size(); i++){ if(playerHand.get(i).getRight() == a_tile.getRight() && playerHand.get(i).getLeft() == a_tile.getLeft()){ playerHand.remove(i); break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeTile(){\n\t\toccupied = false;\n\t\tcurrentTile = null;\n\t}", "public void removeTile(Tile tile) {\n ownedTiles.remove(tile);\n }", "public void removeTile(Tile tile) {\r\n frame.remove(tile);\r\n }", "public void removeEditedTile(GroundTile tile) {\n this.editedTiles.remove(tile);\n }", "public Tile removeTile() {\n if (tileBag.size() == 0) {\n return null;\n }\n return tileBag.remove(0);\n }", "private void removeALakeTile(Game game) {\n\t\tLakeTile[][] board = game.getPlayArea().getLakeTilesOnBoard();\n\t\tArrayList<Position> positions = new ArrayList<Position>();\n\t\tfor (int y = 0; y < board.length; y++) {\n\t\t\tfor (int x = 0; x < board[y].length; x++) {\n\t\t\t\tLakeTile laketile = board[x][y];\n\t\t\t\tif (laketile != null) {\n\t\t\t\t\tint connect_laketile = 4;\n\t\t\t\t\tif (x + 1 < board.length && board[x + 1][y] == null)\n\t\t\t\t\t\tconnect_laketile -= 1;\n\t\t\t\t\tif (y + 1 < board.length && board[x][y + 1] == null)\n\t\t\t\t\t\tconnect_laketile -= 1;\n\t\t\t\t\tif (x - 1 >= 0 && board[x - 1][y] == null)\n\t\t\t\t\t\tconnect_laketile -= 1;\n\t\t\t\t\tif (y - 1 >= 0 && board[x][y - 1] == null)\n\t\t\t\t\t\tconnect_laketile -= 1;\n\t\t\t\t\tif (connect_laketile == 1) {\n\t\t\t\t\t\tPosition p = new Position(x, y);\n\t\t\t\t\t\tpositions.add(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (countLakeTileOnBoard(board) != 0 && positions.size() == 0) {\n\t\t\tpositions = getAllLakeTilePositionOnBoard(board);\n\t\t}\n\t\tCollections.shuffle(positions);\n\t\tPosition pos = positions.get(0);\n\t\tint x = pos.getX();\n\t\tint y = pos.getY();\n\t\tremoved_laketile.add(board[x][y]);\n\t\tremoved_position.add(pos);\n\t\tboard[x][y] = null;\n\t}", "protected void discard(int tile, int pos) {\n\t\tif(active){\n\t\t\tif(tileadded) {\n\t\t\t\ttileadded = false;\n\t\t\t\tunhighlight(); }\n\t\t\tgui.setHumanDiscard(tile);\n\t\t\tgui.setHumanDiscardPosition(pos);\n\t\t\tactive=false; }\n\t}", "void removeFromGame() {\n\t\t// remove from game\n\t\t//only for multi-player\n\t}", "public void remove() {\n\t\tstopFloating();\t\n\t\tPacketHandler.toggleRedTint(player, false);\n\t\tplayer.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 30, 1));\n\t\tplayer.stopSound(Sound.MUSIC_DISC_CHIRP);\n\t\tcleanTasks();\n\t\tactiveScenarios.remove(player.getUniqueId());\n\t}", "private boolean removePieceFromBoardTile(Piece piece) {\n\n\t\tif(piece == null) return false; \n\t\tLocation pieceLoc = piece.getLocation();\n\n\t\tTile tile=null;\n\t\ttry {\n\t\t\ttile = getTileInLocation(pieceLoc);\n\t\t\ttile.setPiece(null);\n\t\t\tthis.replaceTileInSameTileLocation(tile);\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public void removeSmile(Pane gamePane){\r\n\r\n\t\t\tsmile.remove(gamePane);\r\n\r\n\t}", "public void removeFromGame(){\n this.isInGame = false;\n }", "void retract() {\n assert movesMade() > 0;\n Move move = _moves.remove(_moves.size() - 1);\n Piece replaced = move.replacedPiece();\n int c0 = move.getCol0(), c1 = move.getCol1();\n int r0 = move.getRow0(), r1 = move.getRow1();\n Piece movedPiece = move.movedPiece();\n set(c1, r1, replaced);\n set(c0, r0, movedPiece);\n _turn = _turn.opposite();\n }", "private void discardPlayer(Player p)\n {\n locations.remove(p);\n plugin.getAM().arenaMap.remove(p);\n clearPlayer(p);\n }", "private void cleanUpTile(ArrayList<Move> moves)\n {\n for(Move m1 : moves)\n {\n gb.getTile(m1.getX(),m1.getY()).setStyle(null);\n gb.getTile(m1.getX(),m1.getY()).setOnMouseClicked(null);\n }\n gb.setTurn(gb.getTurn() + 1);\n }", "public void removePowerUp(PowerUp p) {\n for (Location loc : p.getLocations()) {\n Location replacement = new Location(loc.getX(), loc.getY());\n gridCache.add(replacement);\n }\n\n powerUps.remove(p);\n render();\n}", "void delete_missiles() {\n // Player missiles\n for (int i = ship.missiles.size()-1; i >= 0; i --) {\n Missile missile = ship.missiles.get(i);\n if (missile.y_position <= Dimensions.LINE_Y) {\n ImageView ship_missile_image_view = ship_missile_image_views.get(i);\n game_pane.getChildren().remove(ship_missile_image_view);\n ship_missile_image_views.remove(i);\n ship.missiles.remove(missile);\n }\n }\n\n // Enemy missiles\n for (int i = Alien.missiles.size()-1; i >= 0; i --) {\n Missile missile = Alien.missiles.get(i);\n if (missile.y_position > scene_height) {\n ImageView alien_missile_image_view = alien_missile_image_views.get(i);\n game_pane.getChildren().remove(alien_missile_image_view);\n alien_missile_image_views.remove(i);\n Alien.missiles.remove(missile);\n }\n }\n }", "public void remove(){\n Api.worldRemover(getWorld().getWorldFolder());\n }", "public void removeTile(int i)\n {\n int c = 0;\n for(Tile t: tiles)\n {\n if(t != null)\n c += 1;\n }\n c -=1;\n \n \n if(!(c < 2))\n {\n if(i == c)\n {\n tiles[i] = null;\n previews[i] = null;\n previewGradients[i] = null;\n previewHover[i] = false;\n activeTile = i-1;\n createPreviewGradients();\n return;\n }\n else\n {\n int last = 0;\n for(int j = i; j < c; j++)\n {\n tiles[j] = tiles[j+1];\n if(tiles[j] != null)\n tiles[j].setTileLevel(j);\n previews[j] = previews[j+1];\n previewGradients[j] = previewGradients[j+1];\n previewHover[j] = previewHover[j+1];\n last = j;\n }\n last += 1;\n tiles[last] = null;\n previews[last] = null;\n previewGradients[last] = null;\n previewHover[last] = false;\n createPreviewGradients();\n \n return;\n }\n }\n \n }", "@Test\r\n public void testRemoveFromHand() {\r\n Player player = new Player();\r\n boolean expResult = false;\r\n boolean result = player.removeFromHand(0);\r\n assertEquals(expResult, result);\r\n \r\n Stack stack=new Stack(false);\r\n player.setHand(stack.drawTiles(2));\r\n player.removeFromHand(0);\r\n ArrayList <Tile> temp=player.getHand();\r\n Tile tile=new Tile(0,1);\r\n \r\n boolean expResult2=true;\r\n boolean result2=(player.getHand().get(0).getHead()==0 && player.getHand().get(0).getTail()==1);\r\n assertEquals(expResult2, result2);\r\n \r\n \r\n \r\n \r\n }", "void killPlayerByPlayerMove()\n {\n movePlayerToCell(getMonsterCell());\n }", "public void removeTomb(String player) {\r\n\t\ttombs.remove(player);\r\n\t}", "public void deleteLaser() {\n shotVisible = false;\n shot.setVisible(false);\n }", "public void removePanel() \n\t{\n\t\tgame.remove(this);\n\t}", "private void eliminatePlayer(Player loser){\n players.remove(loser);\n }", "@Override\r\n\tpublic void perform() {\n\t\tview.removeMapMonster(toremove);\r\n\t}", "public void removePawn() {\n lives = 0;\n }", "public void dropNewTile() {\n ArrayList<Integer> emptyTilesX= new ArrayList<Integer>();\n ArrayList<Integer> emptyTilesY= new ArrayList<Integer>();\n\n for(int x= 0; x<4; x++) {\n for(int y= 0; y<4; y++) {\n if(board[x][y]==0) {\n emptyTilesX.add(x);\n emptyTilesY.add(y);\n }\n }\n }\n\n int randTile= rand.nextInt(emptyTilesX.size());\n int percent= rand.nextInt(20);\n int newTileNumber= 2;\n if(percent==0 || percent==1 || percent==2) {\n newTileNumber= 4;\n }\n \n int dropX= emptyTilesX.get(randTile);\n int dropY= emptyTilesY.get(randTile);\n board[dropX][dropY]= newTileNumber;\n }", "private void killPiece(Piece piece) {\r\n\t\tif (piece.getPlayer().color == Color.BLACK) {\r\n\t\t\tblack.removeElement(piece);\r\n\t\t}\r\n\t\telse {\r\n\t\t\twhite.removeElement(piece);\r\n\t\t}\r\n\t\t\r\n\t}", "private void removeFigureFromPlayerCollection(Figure figure, Player player) {\n player.removeFigure(figure);\n }", "public Card removeCard(){\n Card temp = pile[0]; //removes top card. putting placement card to avoid null pointer\n for(int i = 0; i < pilePlace; i++){ //shifts cards\n pile[i] = pile[i+1];\n }\n pilePlace--;\n return temp;\n\n }", "private void resetPlayer() {\r\n List<Artefact> inventory = currentPlayer.returnInventory();\r\n Artefact item;\r\n int i = inventory.size();\r\n\r\n while (i > 0) {\r\n item = currentPlayer.removeInventory(inventory.get(i - 1).getName());\r\n currentLocation.addArtefact(item);\r\n i--;\r\n }\r\n currentLocation.removePlayer(currentPlayer.getName());\r\n locationList.get(0).addPlayer(currentPlayer);\r\n currentPlayer.setHealth(3);\r\n }", "public void removeUnit(){\r\n tacUnit = null;\r\n }", "public void removeCardAndAddToHand(int location,ArrayList<Card> hand) {\n// if(cards.get(location).equals()){\n hand.add(cards.get(location));\n cards.remove(location);\n// }\n //add to player\n }", "public void remove(Card card) {\n if (!myTurn()) {\n return;\n }\n if (handPile.contains(card)) {\n //history.add(new CardAction(card, \"Remove: \" + card.getName()));\n handPile.remove(card);\n }\n }", "public void undoLastMove()\n {\n if (inProgress() && stackTiles.size() > 1)\n {\n // TAKE THE TOP 2 TILES\n MahjongSolitaireTile topTile = stackTiles.remove(stackTiles.size()-1);\n MahjongSolitaireTile nextToTopTile = stackTiles.remove(stackTiles.size() - 1);\n \n // SET THEIR DESTINATIONS\n float boundaryLeft = miniGame.getBoundaryLeft();\n float boundaryTop = miniGame.getBoundaryTop();\n \n // FIRST TILE 1\n int col = topTile.getGridColumn();\n int row = topTile.getGridRow();\n int z = tileGrid[col][row].size();\n float targetX = this.calculateTileXInGrid(col, z);\n float targetY = this.calculateTileYInGrid(row, z);\n topTile.setTarget(targetX, targetY);\n movingTiles.add(topTile);\n topTile.startMovingToTarget(MAX_TILE_VELOCITY);\n tileGrid[col][row].add(topTile);\n \n // AND THEN TILE 2\n col = nextToTopTile.getGridColumn();\n row = nextToTopTile.getGridRow();\n z = tileGrid[col][row].size();\n targetX = this.calculateTileXInGrid(col, z);\n targetY = this.calculateTileYInGrid(row, z);\n nextToTopTile.setTarget(targetX, targetY);\n movingTiles.add(nextToTopTile);\n nextToTopTile.startMovingToTarget(MAX_TILE_VELOCITY);\n tileGrid[col][row].add(nextToTopTile);\n \n // PLAY THE AUDIO CUE\n miniGame.getAudio().play(MahjongSolitairePropertyType.UNDO_AUDIO_CUE.toString(), false); \n }\n }", "public void removeScenery(){\n\t\tfor(int i=0;i<grid.length;i++){\n\t\t\tfor(int j=0;j<grid[0].length;j++){\n\t\t\t\tif(grid[i][j].isScenery())\n\t\t\t\t\tgrid[i][j]=null;\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void removePlayer(Player player){\n this.steadyPlayers.remove(player);\n }", "public void kill()\r\n {\n if(isTouching(TopDownPlayer.class))\r\n {\r\n health(1);\r\n\r\n getWorld().removeObject(player);\r\n //getWorld().addObject (new Test(), 20, 20);\r\n\r\n }\r\n // if(healthCount >= 1)\r\n // {\r\n // World world;\r\n // world = getWorld();\r\n // getWorld().removeObject(player);\r\n // \r\n // getWorld().addObject (new Test(), 20, 20);\r\n // }\r\n }", "private void unmarkedTile(int x, int y, boolean solving) {\n\t\tif(!solving) {\n\t\t\tzeroSolver(x,y);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tTile currTile = game.getTile(x, y);\n\t\tButton currBtn = btnArray[x][y];\n\t\trevealTile(currTile, currBtn);\n\t\tif(currTile instanceof BombTile) {\n\t\t\ttimer.cancel();\n\t\t\tgameOver(currBtn);\n\t\t\treturn;\n\t\t}\n\n\t\tif(game.isWon()) {\n\t\t\ttimer.cancel();\n\t\t\tSystem.out.println(\"You won!\");\n\t\t\tgameOver.setText(\"Congratulations - you won! Want to try again?\");\n\t\t\tgameOver.setVisible(true);\n\t\t}\n\t}", "public void discardToDeck() {\n\t\tfor(int i=discardPile.size(); i>0; i--) {\n\t\t deck.add(discardPile.remove(0));\n\t\t}\n\t\tCollections.shuffle(deck);\n\t}", "public void dealCard(Player player){\n TrainCard removedCard = draw();\n player.addTrainCard(removedCard);\n }", "private void removePiece(Piece piece) {\n addPiece(piece, piece.rowPosition, piece.columnPosition);\n }", "public void removePawn(Position position) {\n\t\tboardGrid[position.getRow()][position.getColumn()] = new Empty();\n\t}", "void killPlayerByMonsterMove()\n {\n moveMonsterToCell(getPlayerCell());\n }", "public void removePlayer(int place) {\r\n\t\tplayers.remove(place);\r\n\t}", "public void removePresentCard() {\n storageCards.remove();\n }", "public void removeWizard() {\n\t\tyellowWizard = null;\n\t\tplayer.getHintIconsManager().removeAll();\n\t\tplayer.WizardUsed = true;\n\t}", "public void reset()\n {\n playersPiece = -1;\n king = false;\n empty = true;\n setTileColor(-1);\n }", "public void removePlayer(int index) {\n trickPoints.remove(index);\n gamePoints.remove(index);\n lives.remove(index);\n }", "public boolean removeBoardTile(Tile t) {\n\t\tSet<Entry<Point, Tile>> entrySet = boardTiles.entrySet();\n\t\tfor (Iterator<Entry<Point, Tile>> iterator = entrySet.iterator(); iterator.hasNext();) {\n\t\t\tEntry<Point, Tile> entry = iterator.next();\n\t\t\tif (entry.getValue() != null) {\n\t\t\t\tif (entry.getValue().equals(t)) {\n\t\t\t\t\tentry.setValue(null);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n }", "public void removeLastEntry(){\r\n\t\tboards.remove(boards.size() -1 );\r\n\t}", "void removeTiles(Map<Location, SurfaceEntity> map, int x, int y, int width, int height) {\r\n\t\tfor (int i = x; i < x + width; i++) {\r\n\t\t\tfor (int j = y; j > y - height; j--) {\r\n\t\t\t\tmap.remove(Location.of(x, y));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void remove()\n\t{\n\t\tsuper.remove();\n\t\tgetMyPlayer().getGoldMines().remove(this);\n\t}", "public void clearTiles() {\r\n\r\n for (int i = 0; i < 16; i += 1) {\r\n tiles[i] = 0;\r\n }\r\n boardView.invalidate();\r\n placedShips = 0;\r\n }", "private void removeGuess() {\n\t\tguessList[this.getLastPlayIndex()] = null;\n\t\tif (this.getLastPlayIndex() > 0)\n\t\t\tlastMoveID--;\n\t}", "public void moveTileBack()\n {\n if(!(activeTile-1 < 0) && activeTile > 0)\n {\n Tile tmpTile = tiles[activeTile];\n PImage tmpPreview = previews[activeTile];\n PImage tmpPreviewGradients = previewGradients[activeTile];\n boolean tmpPreviewHover = previewHover[activeTile];\n \n tiles[activeTile-1].setStartColor(tmpTile.getStartColor());\n tiles[activeTile-1].setEndColor(tmpTile.getEndColor());\n tmpTile.setStartColor(tiles[activeTile-1].getStartColor());\n tmpTile.setEndColor(tiles[activeTile-1].getEndColor());\n \n tiles[activeTile-1].setTileLevel(tiles[activeTile-1].getTileLevel()+1);\n tiles[activeTile] = tiles[activeTile-1];\n previews[activeTile] = previews[activeTile-1];\n previewGradients[activeTile] = previewGradients[activeTile-1];\n previewHover[activeTile] = previewHover[activeTile-1];\n \n \n tmpTile.setTileLevel(tmpTile.getTileLevel()-1);\n tiles[activeTile-1] = tmpTile;\n tiles[activeTile-1].setStartColor(tiles[activeTile-1].getStartColor());\n previews[activeTile-1] = tmpPreview;\n previewGradients[activeTile-1] = tmpPreviewGradients;\n previewHover[activeTile-1] = tmpPreviewHover;\n \n activeTile -= 1;\n createPreviewGradients();\n }\n }", "public void reset() {\n\t\ttilePath.clear();\n\t}", "void clean(Player p);", "public void remove(ImageView power){\n power.setImage(null);\n }", "public void removeFromQueue(Player player) {\n }", "private void reshuffleDiscardPile() {\n ICard topCard = discardPile.pop();\n\n drawPile.addAll(discardPile);\n Collections.shuffle(drawPile, rng);\n\n discardPile.clear();\n discardPile.add(topCard);\n }", "public void removePlayer(Player player){\n playerList.remove(player);\n }", "private void subtractPlayerMissile() {\n this.playerMissile -= 1;\n }", "public void killPlayer() {\n \tdungeon.removeentity(getX(), getY(), name);\n \t\tdungeon.deleteentity(getX(),getY(),name);\n \t\t//System.out.println(\"YOU LOSE MAMA\");\n \t\t//System.exit(0);\n \t\t\n }", "private void remove() {\n disableButtons();\n clientgui.getClient().sendDeleteEntity(cen);\n cen = Entity.NONE;\n }", "public void clearItem(final int x, final int y) {\r\n\t\tfor (int i = 2; i < LAYERS; i ++) {\r\n\t\t\tsetTile(x, y, i, Tile.getEmptyTile());\r\n\t\t}\r\n\t}", "public void remove () { this.setAsDown(); n.remove(); }", "public void RmPlayer(int j){\n\t\tint i;\n\t\tfor(i=j;i<player_num-1;i++){\n\t\t\tplayers[i][0] = i;\n\t\t\tplayers[i][1] = players[i+1][1];\n\t\t\tplayers[i][2] = players[i+1][2];\n\t\t\tarrow_num[i] = arrow_num[i+1];\n\t\t}\n\t\tplayer_num --;\n\t\t\n\t}", "public void removePrevCardList(){\n for (int i = 0; i < playerCardList.getPlayerCardListSize(); i++){\n playerCardPuzzle.getChildren().remove(playerCardList.getPlayerCardByNo(i));\n }\n }", "private void removeTerritoriesOfPlayerFromSpecificTime(Player player,RoundHistory roundHistory) {\n List<Integer> mapsToClear = player.getTerritoriesID();\n while(!mapsToClear.isEmpty()){\n Integer territoryID = mapsToClear.get(0);\n getTerritoryFromSpecificTime(roundHistory,territoryID).eliminateThisWeakArmy();\n mapsToClear.remove(0);\n }\n }", "public void removePlayerFromTable(Player player){\n\t\tgamePlayers.remove(player);\n\t}", "public void removeSprites(){\r\n\r\n\t}", "private Piece removePiece(Location loc)\n {\n Square s = getSquare(loc);\n return s.removePiece();\n }", "public RemoveTileChange() {}", "public static void kill() {\n Iterator<Recipe> recipes = tj.getServer().recipeIterator();\r\n Recipe recipe;\r\n\r\n while (recipes.hasNext()) {\r\n recipe = recipes.next();\r\n\r\n if (recipe != null && customItems.containsValue(recipe.getResult()))\r\n recipes.remove();\r\n }\r\n\r\n tj = null;\r\n messages = null;\r\n playerDataFolder = null;\r\n players = null;\r\n customItems = null;\r\n }", "public Card removeTopCard(){\n\t\treturn this.pile.remove(0);\n\t}", "public void delMissile(Missile missile)\r\n {\n \r\n \r\n boolean remove = missiles.remove(missile);\r\n try {\r\n missile.finalize();\r\n } catch (Throwable ex) {\r\n Logger.getLogger(Object_.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n //System.out.println(\"Remove: \" + remove);\r\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(!chesses.isEmpty()) {\r\n\t\t\t\t\tChess to_remove = chesses.getLast();\r\n\t\t\t\t\tPoint to_delete = to_remove.getCor();\r\n\t\t\t\t\tisChess[to_delete.x][to_delete.y] = 0;\r\n\t\t\t\t\tchesses.remove(chesses.size() - 1);\r\n\t\t\t\t\tturn = 1 - turn;\t\r\n\t\t\t\t\trepaint();\r\n\t\t\t\t}\r\n\t\t\t}", "public void removePieceFromPlay(Piece piece) {\n\t\tpiece.removeFromPlay();\n\t\tpieces.get(piece.getColor()).remove(piece);\n\t}", "public void clearTiles() {\n \tfor (int x = 0; x < (mAbsoluteTileCount.getX()); x++) {\n for (int y = 0; y < (mAbsoluteTileCount.getY()); y++) {\n setTile(0, x, y);\n }\n }\n }", "public synchronized void removeTheWarrior(){\n charactersOccupiedTheLocation[0]=null;\n notifyAll();\n }", "private void removePlayerFromLobby() {\n\n //Added Firebase functionality assuming var player is the player who wants to leave the game.\n }", "@Override\r\n public void uncall() {\r\n Player player = MbPets.getInstance().getServer().getPlayer(getOwner());\r\n if (player != null) {\r\n if (getEntity().getInventory().getDecor() != null) {\r\n if (player.getInventory().firstEmpty() >= 0) {\r\n player.getInventory().addItem(getEntity().getInventory().getDecor());\r\n } else {\r\n player.getWorld().dropItemNaturally(player.getLocation(),\r\n getEntity().getInventory().getDecor());\r\n }\r\n }\r\n }\r\n super.uncall();\r\n }", "public void NPSShot()\n\t{\n\t\t//can only occur if a friendly missile and \n\t\t//a NPS are spawned\n\t\tif(gameObj[2].size() > 0 && gameObj[4].size() > 0)\n\t\t{\n\t\t\tint nps = new Random().nextInt(gameObj[2].size());\n\t\t\tint mis = new Random().nextInt(gameObj[4].size());\n\t\t\tgameObj[2].remove(nps);\n\t\t\tgameObj[4].remove(mis);\n\t\t\tscore += 500;\n\t\t\tSystem.out.println(\"A player misile has struck a NPS! +500 points\");\n\t\t}else\n\t\t\tSystem.out.println(\"An NPS and a friendly missile are not spawned\");\n\t}", "public void onTileExit(Tile tile) {}", "public static void clearBoard(){\n for(int i = 0; i < Board.X_UPPER_BOUND * Board.Y_UPPER_BOUND ; i++){\n Board.board[i] = null;\n }\n white_player.setpieceList(null);\n black_player.setpieceList(null);\n }", "public void removePiece() {\n\t\troot.getChildren().clear();\n\t\tthis.piece = null;\n\t\troot.getChildren().add(rectangle);\n\t}", "void removeAllSpawn();", "public void clearHand() {\n\t\thand.clear();\n\t}", "@Override\n public void removed(Entity e) {\n AI ai = AIm.get(e);\n if (ai.active) {\n ai.active = false;\n startMove = startAction = true;\n groupAiDone= false;\n screen.processTurn();\n // Future note: This transition comes quite abruptly.\n // It would be nice to somehow delay it, but because\n // the entity has just been removed, it won't be\n // processed any more. Perhaps give processTurn()\n // a boolean argument which will pause for a second\n // or so before selecting the new entity and moving\n // the camera on.\n\n }\n }", "public void clear() {\n\t\tcopy(problem, player);\n\t}", "private void transferCards(Player player) {\r\n\t\twhile(warPile.size() > 0) {\r\n\t\t\tplayer.addToWinningsPile(warPile.remove(0));\r\n\t\t}\r\n\t}", "public void removeTiles(ArrayList<Tile> tiles) {\r\n for (Tile tile : tiles) {\r\n frame.remove(tile);\r\n }\r\n }", "public void discard(Card card) {\n if (!myTurn()) {\n return;\n }\n // CardAction cardAct = new CardAction(card, \"Discard: \" + card.getName());\n // history.add(cardAct);\n\n if (handPile.contains(card)) {\n tmpDiscardPile.add(card);\n handPile.remove(card);\n } else {\n tmpDiscardPile.add(card);\n }\n }", "public void deleteLastPathTile(){\n\t\tif(temp.isEmpty()){\n\t\t\tif(currentPos!=-1){\n\t\t\t\tcurrentPos=-1;\n\t\t\t\tsetEntryPoint(null);//start has been deleted\n\t\t\t\tgrid[currentPath.getRow()][currentPath.getCol()]= null;\n\t\t\t\tcurrentPath=null;\n\t\t\t}\n\t\t\treturn;//the list is empty\n\t\t}\n\t\telse {//\n\t\t\tif(getCompletePath()){\n\t\t\t\t\tsetCompletePath(false);\n\t\t\t\t\tsetExitPoint(null);\n\t\t\t\t\tremoveScenery();\n\t\t\t\t\t\n\t\t\t}//since the last node was removed\n\t\t\telse//if the path wasn't complete (should it be scenery?)\n\t\t\t\tgrid[currentPath.getRow()][currentPath.getCol()]= null;\n\t\t\t\tcurrentPath=null;\n\t\t\t\n\t\t\tPath removedPath=temp.removeLast();\n\t\t\tcurrentPos=removedPath.getPos();\n\t\t\tcurrentPath=new Path(currentPos);\n\t\t}\n\t}", "public void respawnPlayer() {\n \tboard.swapTile(board.getTile(player.getPos()), board.getTile(new Point(8,0)));\n player.setPlayerPos(new Point(8,0));\n resetAmmo();\n }", "void clear_missiles() {\n // Remove ship missiles\n ship.missiles.clear();\n for (ImageView ship_missile_image_view : ship_missile_image_views) {\n game_pane.getChildren().remove(ship_missile_image_view);\n }\n ship_missile_image_views.clear();\n\n // Remove alien missiles\n Alien.missiles.clear();\n for (ImageView alien_missile_image_view : alien_missile_image_views) {\n game_pane.getChildren().remove(alien_missile_image_view);\n }\n alien_missile_image_views.clear();\n }", "public void clearHand() {\n\t\t_hand.clearHand();\n\n\t}", "private void uncoverTiles(Set<Tile> tiles) {\r\n\t\tfor (Tile tile : tiles) {\r\n\t\t\t// Update status\r\n\t\t\ttile.setStatus(TileStatus.UNCOVERED);\r\n\r\n\t\t\t// Update button\r\n\t\t\tJButton button = boardButtons[tile.getX()][tile.getY()];\r\n\t\t\tbutton.setEnabled(false);\r\n\t\t\tbutton.setText(tile.getRank() == 0 ? \"\" : String.valueOf(tile.getRank()));\r\n\t\t}\r\n\t}" ]
[ "0.79982036", "0.7581779", "0.74409705", "0.69945455", "0.6875455", "0.6706141", "0.6597891", "0.65678096", "0.6486963", "0.64805645", "0.6469142", "0.64683056", "0.6467161", "0.64596987", "0.6429186", "0.64230394", "0.6419279", "0.63908225", "0.6383542", "0.63675016", "0.6361022", "0.62796766", "0.6276974", "0.6264638", "0.62570155", "0.6243752", "0.6231122", "0.62225384", "0.6207153", "0.62027824", "0.6198485", "0.6194612", "0.6173161", "0.61626226", "0.6141998", "0.6141586", "0.6132488", "0.61214256", "0.61155534", "0.61122", "0.60785854", "0.60762036", "0.60654056", "0.6058504", "0.60486245", "0.6045039", "0.6044907", "0.6033454", "0.60293174", "0.60243815", "0.60234046", "0.6019002", "0.6017374", "0.6015039", "0.6013259", "0.60126615", "0.60038525", "0.5994078", "0.59900755", "0.59886396", "0.59851384", "0.59774804", "0.59497297", "0.59461164", "0.5943534", "0.5940722", "0.59396434", "0.59304035", "0.5926571", "0.5910852", "0.5909106", "0.59051996", "0.5905007", "0.5902212", "0.5894837", "0.5882875", "0.5882075", "0.5872331", "0.5862539", "0.5844058", "0.58407974", "0.58369946", "0.58359486", "0.58337224", "0.58304197", "0.5829226", "0.5828811", "0.5828044", "0.5823352", "0.5819522", "0.5818843", "0.58160275", "0.5813185", "0.58129257", "0.58070445", "0.579662", "0.57931095", "0.57899535", "0.5788733", "0.5786284" ]
0.7792747
1
returns the player hand
public ArrayList<Tile> getPlayerHand(){ return playerHand; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Hand getHand() {\n return hand;\n }", "public Hand getHand() {\n return hand;\n }", "public Hand getHand() {\n\t\treturn hand;\n\t}", "Hand getHand() {\n\t\treturn _hand;\n\t}", "public LinkedList<PlayingCard> getHand(){\n\t\treturn hand;\n\t}", "public String getHand(){\r\n return this.handStr;\r\n }", "public UnoHand getHand() {\r\n return hand;\r\n }", "String getHandOwner();", "public HashSet<Card> getHand() {\n\t\treturn hand;\n\t}", "public Hand getRightHand()\n\t{\n\t\treturn hands[1];\n\t}", "public ArrayList<Piece> getHand() {\n return this.piecesInHand;\n }", "public JavaHand getHand() {\r\n return this.dealerHand;\r\n }", "public ArrayList<Card> getHand() {\r\n\t\treturn this.Hand;\r\n\t}", "public String getHand()\n\t{\n\t\tStringBuffer buffer = new StringBuffer(String.format(\"%s:[%d] \", getName(), getHandTotal() ));\n\t\t\n\t\tfor (Card c : hand)\n\t\t{\n\t\t\tbuffer.append(String.format(\"%s: \", c));\n\t\t}\n\n\t\treturn buffer.toString();\n\t}", "public Hand getLeftHand()\n\t{\n\t\treturn hands[0];\n\t}", "public ArrayList<Card> getHand() {\n\t\treturn this.cardsInhand;\n\t}", "public void showHand(){\n System.out.println(this.hand.toString());\n }", "public Hand getHand(int k) {\n if (k < 0 || k >= numPlayers)\n return new Hand();\n\n return hand[k];\n }", "public ArrayList<PlayingCard> getHand();", "public int getHandId() {\n\t\t\treturn handId;\n\t\t}", "public Hand getHand(int k)\n {\n if (k < 0 || k >= numPlayers)\n return new Hand();\n\n return hand[k];\n }", "public Iterator<PolicyCard> getHand()\n {\n return hand.iterator();\n }", "public String getHandOutcome() {\n\t\t\treturn handOutcome;\n\t\t}", "public MainHand getMainHand ( ) {\n\t\treturn extract ( handle -> handle.getMainHand ( ) );\n\t}", "public Pile getHandPile(){\n return piles.getHandPile();\n }", "public int playHand(Hand hand){\r\n\r\n if( this.getRank() > hand.getRank()){\r\n System.out.println();\r\n System.out.println(\"Black: \" + this.getHand() + \" White: \" + hand.getHand());\r\n System.out.println(\"Black wins!\");\r\n return 1;\r\n }\r\n\r\n else if(this.getRank() < hand.getRank()){\r\n System.out.println();\r\n System.out.println(\"Black: \" + this.getHand() + \" White: \" + hand.getHand());\r\n System.out.println(\"White wins!\");\r\n return -1;\r\n }\r\n else{\r\n System.out.println();\r\n System.out.println(\"Black: \" + this.getHand() + \" White: \" + hand.getHand());\r\n\r\n if(this.getHighCard() > hand.getHighCard()){\r\n System.out.println(\"Black Wins!\");\r\n return 1;\r\n }\r\n else if(hand.getHighCard() > this.getHighCard()){\r\n System.out.println(\"white Wins!\");\r\n }\r\n System.out.print(\"Tie!\");\r\n return 0;\r\n }\r\n\r\n }", "public int getHandSize()\n {\n return hand.size();\n }", "public int getHandicap() {\n return handicap;\n }", "public ItemStack getItemInHand ( ) {\n\t\tPlayer handle = handle ( );\n\t\t\n\t\tif ( handle != null ) {\n\t\t\ttry {\n\t\t\t\treturn ( ItemStack ) safeGetMethod (\n\t\t\t\t\t\tPlayerInventory.class , \"getItemInMainHand\" , new Class[ 0 ] ).invoke (\n\t\t\t\t\t\thandle.getInventory ( ) );\n\t\t\t} catch ( Exception e ) {\n\t\t\t\ttry {\n\t\t\t\t\treturn ( ItemStack ) safeGetMethod (\n\t\t\t\t\t\t\tPlayerInventory.class , \"getItemInHand\" , new Class[ 0 ] ).invoke (\n\t\t\t\t\t\t\thandle.getInventory ( ) );\n\t\t\t\t} catch ( IllegalAccessException | InvocationTargetException ex ) {\n\t\t\t\t\tex.printStackTrace ( );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public BolName getRightHand() {\r\n\t\tif (handType == COMBINED) {\r\n\t\t\treturn rightHand;\r\n\t\t} else return null;\r\n\t}", "public String showInitinalHand() {\n\t\tString string = \"\";\n\t\tstring += \"Player's hand: \" + player.showHand() + \"\\n\";\n\t\tstring += \"Dealer's hand: \" + dealer.showDealerHand() + \"\\n\";\n\t\treturn string;\n\t}", "public String showHands() {\n\t\tString string = \"\";\n\t\tstring += \"Player's hand: \" + player.showHand() + \"\\n\";\n\t\tstring += \"Dealer's hand: \" + dealer.showHand();\n\t\treturn string;\n\t}", "public void displayHand(int hand)\n {\n System.out.println(highCardGame.getHand(hand).toString());\n }", "private static int play() {\n\n Hand h = new Hand();\n int handValue = 0;\n\n // Deck deck = new Deck(); // Get a new deck of cards, and\n // store a reference to it in\n // the variable, deck.\n\n for (int i=0;i<3;i++) {\n Card c = new Card(3,Card.VICTORY);\n h.addCard(c);\n }\n for (int i=0;i<7;i++) {\n Card c = new Card();\n h.addCard(c);\n }\n\n for (int i=0;i<h.getCardCount();i++) {\n Card c = h.getCard(i);\n System.out.println(c.toString());\n handValue += c.getValue();\n }\n\n return handValue;\n }", "private static Hand getResults() {\n System.out.println(hands.size());\n Optional<Hand> winner;\n winner = hands.stream()\n .reduce((hand1, hand2)\n -> hand1.compareTo(hand2) == 1 ? hand1 : hand2);\n Hand winningHand = null;\n if (winner.isPresent()) {\n winningHand = winner.get();\n }\n return winningHand;\n\n }", "public int getHandSize(){\n\t\treturn hand.size();\n\t\t\t\t\n\t}", "public Deck getHand(int id)\n\t{\n\t\treturn hands[id];\n\t}", "public ArrayList<Hand> getHandsOnTable(){\n\t\treturn this.handsOnTable;\n\t}", "public BolName getLeftHand() {\r\n\t\tif (handType == COMBINED) {\r\n\t\t\treturn leftHand;\r\n\t\t} else return null;\r\n\t}", "public Player getPlayer() {\n return humanPlayer;\n }", "public String getDealerHandString() {\n\t\tString s = \"Dealer's Hand:\\n\";\n\t\ts += this.hand.getHandString() + \"\\n\";\n\t\ts += this.hand.valueString();\n\t\treturn s;\n\t}", "public Card showTop() {\n\t\treturn hand.get(0);\n\t}", "public Player getWinner();", "public ArrayList<Hand> getHandsOnTable() {\n\t\treturn handsOnTable;\n\t}", "public int getHandValue() {\r\n int handValue = 0;\r\n for (Card card : this) {\r\n handValue += card.getCardValue();\r\n }\r\n return handValue;\r\n }", "public int getHandSize() {\r\n\t\treturn playerCards.size();\r\n\t}", "public int getHandWager() {\n\t\t\treturn handWager;\n\t\t}", "public void testGetHand() throws Exception {\r\n// System.out.println(getClass().getSimpleName() + \": getHand\");\r\n//\r\n// HandRank hr = hand.getHandRank();\r\n// Card[] result = hr.getHand();\r\n// System.out.println(hr.getHandType());\r\n// System.out.println(\"hand:\" + Arrays.toString(result));\r\n// Assert.isTrue(hr.getHandType() == HandType.HIGH);\r\n//\r\n// SimpleHandAggregator sha = new SimpleHandAggregator();\r\n// System.out.println(sha.scoreHand(hand));\r\n }", "public void printHand(){\n\t\tSystem.out.println(name + \"'s hand:\");\n\t\tfor(int i=0; i<hand.size(); i++){\n\t\t\tSystem.out.print(i+1 + \".\\t\");\n\t\t\thand.get(i).printCard();\n\t\t}\n\t}", "public ServerPlayer whoWon() {\r\n\t\tif (winner(CROSS)) {\r\n\t\t\treturn getP1();\r\n\t\t} else if (winner(NOUGHT)) {\r\n\t\t\treturn getP2();\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public Card enemyPlayCard(){ //Is it really worth the effort to give the enemy a full deck/temp hand? Having 2-4 basic abilities that vary should be enough.\n if(!(enemyHand.isEmpty())){\n return enemyHand.get(0);\n } else {\n return null;\n }\n }", "public String handToString() {\n\t\tStringBuilder str = new StringBuilder();\n\t\tstr.append(\"Holding:\");\n\t\tfor (Card c: hand) {\t\t\t\n\t\t\tstr.append(\" \" + c.getName() + \",\");\n\t\t}\n\t\treturn str.toString().substring(0, str.toString().length()-1);\n\t}", "@Override\r\n\tpublic double getPitchRightHand() {\n\t\treturn rechtPitch;\r\n\t}", "public Player getHumanPlayer() {\n return humanPlayer;\n }", "public String showCardInHand(){\n String handCard = \"\";\n int cardNum = 0;\n for(Card cards: playerHand)\n {\n String cardDesc;\n if (cards instanceof Mineral) {\n // Description of the Mineral card\n cardDesc = \"No: \" + cardNum + \" \" +\n \"Name: \" + cards.getCardName() + \" \" +\n \"Hardness: \" + ((Mineral) cards).getCardHardness() + \" \" +\n \"Specific Gravity: \" + ((Mineral) cards).getCardSpecGravity() + \" \" +\n \"Cleavage: \" + ((Mineral) cards).getCardCleavage() + \" \" +\n \"Crystal Abundance: \" + ((Mineral) cards).getCardCrystalAbundance() + \" \" +\n \"Economic Value: \" + ((Mineral) cards).getCardEconomicValue() + \"\\n\";\n }\n else{\n // Description of the Supertrump card\n cardDesc = \"No: \"+ cardNum+ \" \" + \"Name: \" + cards.getCardName()+ \" \" + \"Description: \" +\n ((SuperTrumps) cards).effectDescription()+ \"\\n\";\n }\n cardNum += 1;\n handCard += cardDesc; // Used for adding the description of the card in the hand\n }\n return handCard;\n }", "public abstract Player getWinner();", "public Bid playHand(Bid b)\n {\n return strategy.chooseBid(b, hand, strategy.cheat(b, hand));\n }", "private Location getLeftHandPos() {\r\n\t\treturn GeneralMethods.getLeftSide(this.player.getLocation(), .34).add(0, 1.5, 0);\r\n\t}", "String getPlayer();", "public void printHand() {\n\t\thandIterator = new HandIterator(hand.getCards());\n\t\tSystem.out.println(\"\\n\" + getName() + \"'s hand:\");\n\t\twhile(handIterator.hasNext()) {\n\t\t\tCard card = (Card) handIterator.next();\n\t\t\tSystem.out.println(\"\\t\" + card);\n\t\t}\n\t\tSystem.out.println(\"\\tHand value: \" + hand.checkHandValue());\n\t}", "private Location getRightHandPos() {\r\n\t\treturn GeneralMethods.getRightSide(this.player.getLocation(), .34).add(0, 1.5, 0);\r\n\t}", "public String getPlayer() {\n return p;\n }", "@Override\n public Player getHumanPlayer() {\n return batMan.getHumanPlayer();\n }", "public void printHand() {\r\n System.out.printf(\"%s's cards:\\n\", name);\r\n for (int n = 0; n < numOfCards; n++) {\r\n System.out.printf(\" %s\\n\", hand[n].toString());\r\n }\r\n }", "public String whoWon()\n { \n String win=\"\";\n if (player1Hand.isEmpty())\n {\n win=(\"player 2 wins!\");\n }\n \n if(player2Hand.isEmpty())\n {\n win=(\"player 1 wins\");\n } \n \n return win;\n }", "public char getPlayer() {\n return player;\n }", "public Piece getCurrPlayer() {\n return this.currPlayer;\n }", "public Player() {\n hand = new Hand();\n }", "public int GetSizeOfHumanHand(){\n System.out.println(\"SIZE \" + handHuman.size() );\n return handHuman.size();\n }", "public Card playerPlayCard(Integer choice){\n if(!(playerHand.isEmpty())){\n return playerHand.get(choice);\n } else {\n return null;\n }\n }", "public int getResourceCardHandSize() {\n\t\t return resourceCardHand.getResourceCardHandSize();\n\t }", "public void printCompHand(){\n for(int i = 0; i < GetSizeOfComputerHand(); i++){\n System.out.println(handComputer.get(i));\n }\n }", "public String getPlayer() {\r\n return player;\r\n }", "public String GetHumanCard(int value){\n return handHuman.get(value);\n }", "public void printAllPlayerHands(){\n\t\tfor(int i = 0 ; i < this.players.length; i++){\n\t\t\tplayers[i].printPlayerHand();\t\t \n\t\t}\t\n\t}", "public int score() {\n return hand.handVal(0);\n }", "public static ItemStack getItemInMainHand(Player player) {\n try {\n // 1.9+\n return player.getInventory().getItemInMainHand();\n } catch (Throwable ex) {\n // pre 1.9\n return player.getItemInHand();\n }\n }", "private Long handScore() {\n\t\tif (checkFlush(current5)&&checkStraight(current5)) {\r\n\t\t\treturn Long.decode(\"0x9\"+getHandString(current5));\r\n\t\t} else if(checkFour(current5)) {\r\n\t\t\t//check four of a kind\r\n\t\t\treturn Long.decode(\"0x8\"+getHandString(current5));\r\n\t\t} else if(checkHouse(current5)) {\r\n\t\t\t//check full house\r\n\t\t\tif(current5.get(2).getValue()!=current5.get(1).getValue()) {\r\n\t\t\t\tcurrent5.add(current5.remove(0));\r\n\t\t\t\tcurrent5.add(current5.remove(0));\r\n\t\t\t}\r\n\t\t\treturn Long.decode(\"0x7\"+getHandString(current5));\r\n\t\t} else if (checkFlush(current5)) {\r\n\t\t\treturn Long.decode(\"0x6\"+getHandString(current5));\r\n\t\t} else if (checkStraight(current5)) {\r\n\t\t\treturn Long.decode(\"0x5\"+getHandString(current5));\r\n\t\t}\r\n\t\tlong kind3 = checkKind3(current5);\r\n\t\tif(Long.compare(kind3, 0)!=0) {\r\n\t\t\treturn kind3;\r\n\t\t}\r\n\t\tlong pair2 = checkPair2(current5);\r\n\t\tif(Long.compare(pair2, 0)!=0) {\r\n\t\t\treturn pair2;\r\n\t\t}\r\n\t\tlong pair = checkPair(current5);\r\n\t\tif(Long.compare(pair, 0)!=0) {\r\n\t\t\treturn pair;\r\n\t\t}\r\n\t\t\r\n\t\treturn Long.decode(\"0x1\"+getHandString(current5));\r\n\t}", "public void determineHandType(){\n \r\n if(isStraightFlush()){\r\n handType = HandType.STRAIGHT_FLUSH;\r\n }\r\n else if(isFourOfAKind()){\r\n handType = HandType.FOUR_OF_A_KIND;\r\n }\r\n else if(isFullHouse()){\r\n handType = HandType.FULL_HOUSE;\r\n }\r\n else if(isFlush()){\r\n handType = HandType.FLUSH;\r\n }\r\n else if(isStraight()){\r\n handType = HandType.STRAIGHT;\r\n }\r\n else if(isThreeOfAKind()){\r\n handType = HandType.THREE_OF_A_KIND;\r\n }\r\n else if(isTwoPairs()){\r\n handType = HandType.TWO_PAIRS;\r\n }\r\n else if(isPair()){\r\n handType = HandType.PAIR;\r\n }\r\n else{\r\n //High Card: Hands which do not fit any higher category are ranked by\r\n //the value of their highest card. If the highest cards have the same\r\n //value, the hands are ranked by the next highest, and so on.\r\n handType = HandType.HIGH_CARD;\r\n handValue = cards.get(cards.size()-1).getValue();\r\n }\r\n }", "public Strider getPlayer() {\n return player;\n }", "public HumanPlayer getHuman(){\n\t\treturn ((HumanPlayer)players.get(0));\n\t}", "Piece winner() {\r\n return _winner;\r\n }", "public int getPlayer() {\r\n\t\treturn myPlayer;\r\n\t}", "public short getHandThrowDamage();", "@Override\n public int getWinner()\n {\n return currentPlayer;\n }", "public String suit() {\r\n return suit;\r\n }", "public Player winner() {\n Player result = null;\n boolean humanResult = board.fiveInARow(humanPlayer.getPiece());\n boolean player2Result = board.fiveInARow(aiPlayer.getPiece());\n if(humanResult && player2Result) {\n result = new Player(\"Tie\", 'T');\n } else if (humanResult && !player2Result) {\n result = humanPlayer;\n } else if (!humanResult && player2Result) {\n result = aiPlayer;\n }\n return result;\n }", "public Player getPlayer();", "public Player getPlayer();", "public Player roundWinner() {\n\t\tfor(Player player : gamePlayers){\n\t\t\tEvaluator eval = new Evaluator(player, communityCards);\n\t\t\t\n\t\t\tplayer.setHandRank(eval.evaluate());\n\t\t\tplayersByHandRank.add(player);\n\t\t}\n\t\t\n\t\t//lambdas are magic. Sorts players from lowest to highest rank starting with the lowest at the first\n\t\t//index, and the highest at the last.\n\t\tCollections.sort(playersByHandRank, (p1, p2) -> p1.getHandRank().compareTo(p2.getHandRank()));\n\t\t\n\t\t//TODO: Needs to evaluate high card in case of two or more players have the same high hand rank.\n\t\t//the evaluate method in Evaluator sets high card == to the highest card in a pairSet, flush, or straight,\n\t\t//but needs to be able to add it in the event HIGH_CARD is the highest hand a player has.\n\n\t\treturn playersByHandRank.get(playersByHandRank.size() -1);\n\t}", "public String getSuit()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************** Start getSuit Method *****************/\n\n\t// Return suit of card\n return suit;\n\n }", "public String toString() {\n String handString = \"( \";\n for (int i = 0; i < this.numCards; i++) {\n handString += this.myCards[i].toString();\n if (i != this.numCards - 1)\n handString += \", \";\n }\n handString += \" )\";\n return handString;\n }", "@Override\n public String toString() {\n String hand = \"\";\n for (int i = 0; i < cards.size(); i++) {\n hand += \"(\"+(i+1)+\")\"+cards.get(i).toString() + \", \";\n }\n return hand;\n }", "public ArrayList<Card> getHand(){\n return cards;\n }", "void setHand(Hand hand) {\n\t\t_hand = hand;\n\t}", "public List<ICard> getHand(int playerId) {\n if (playerId < 0 || playerId >= numPlayers) {\n throw new InvalidParameterException(\n String.format(\"player id must be within the range 0 to %d\", numPlayers - 1));\n }\n return Collections.unmodifiableList(hands.get(playerId));\n }", "private static String getMyHand(JSONObject data) {\n\n String rez = null;\n\n JSONArray myCard = (JSONArray)data.get(\"newRightHand\");\n\n JSONArray myFirstCard = (JSONArray)myCard.get(0);\n JSONArray mySecondCard = (JSONArray)myCard.get(1);\n\n if (!\"a\".equalsIgnoreCase(myFirstCard.get(0).toString()) && !\"a\".equalsIgnoreCase(mySecondCard.get(0).toString()))\n rez = mySecondCard.get(2).toString();\n else\n if (\"a\".equalsIgnoreCase(myFirstCard.get(0).toString()))\n rez = \"A\" + filterCard(mySecondCard.get(0).toString());\n else rez = \"A\" + filterCard(myFirstCard.get(0).toString());\n\n return \"A10\".equals(rez) ? \"20\" : rez;\n }", "private Hand getPair(Hand handToCheck){\n\t\tHand hand = new FiveCardHand(handToCheck); //Make copy of the object so original doesn't get modified\n\t\tlog.debug(\"getPair(hand = \"+hand+\")\");\n\t\tif(hand == null){\n\t\t\tlog.debug(\"Hand was null. Returning null\");\n\t\t\treturn null;\n\t\t}\n\t\tArrayList<Card> cards = hand.getCards();\n\t\tif(cards == null){\n\t\t\tlog.debug(\"The ArrayList<Card> inside the Hand Object was NULL. Returning null\");\n\t\t\treturn null;\n\t\t}\n\t\tlog.trace(\"Number of cards in Hand: \"+cards.size());\n\t\tfor (int i =0; i< cards.size(); i++){\n\t\t\tCard c1= cards.remove(0);\n\t\t\ti--; //Update index\n\t\t\tfor (Card c2: cards){\n\t\t\t\tlog.trace(\"Are '\"+c1.getShortName()+\"' and '\"+c2.getShortName()+\"' a pair?\");\n\t\t\t\tif(c1.getNumber().equals(c2.getNumber())){\n\t\t\t\t\tlog.trace(\"\\tYes!\");\n\t\t\t\t\tlog.debug(\"A pairs found!\");\n\t\t\t\t\tArrayList<Card> ca = new ArrayList<Card>();\n\t\t\t\t\tca.add(c1);\n\t\t\t\t\tca.add(c2);\n\t\t\t\t\treturn new FiveCardHand(ca);\n\t\t\t\t}\n\t\t\t\tlog.trace(\"\\tNo.!\");\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tlog.debug(\"returning null\");\n\t\treturn null;\n\t}", "public static Vector handMoves(){\r\n\t\tFrame currentFrame = LEAPCONTROLLER.frame();\r\n\t\tVector movement;\r\n\t\t\r\n\t\tif (currentFrame.interactionBox().isValid()) { // interaction is valid ?\r\n\t\t\tVector normMove = currentFrame.interactionBox().normalizePoint(currentFrame.hands().frontmost().palmPosition()); // get the normalized position of the hand\r\n\t\t\tif(!currentFrame.hands().isEmpty()){\r\n\t\t\t\tmovement = new Vector( (normMove.getX()-0.5f), (-normMove.getY()+0.5f), 0.0f);\r\n\t\t\t\treturn movement;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tmovement = new Vector (0.0f, 0.0f, 0.0f);\r\n\t\treturn movement;\r\n\t}", "@Override\n public String getChosenHorse() {\n return chosenHorse.getName();\n }" ]
[ "0.8066203", "0.8066203", "0.7948987", "0.7902279", "0.7773025", "0.7761814", "0.7748297", "0.7543582", "0.73653233", "0.72751844", "0.7257437", "0.72351027", "0.7220311", "0.7170301", "0.7126829", "0.7117291", "0.70619154", "0.7037291", "0.7027874", "0.70174605", "0.6992043", "0.69495076", "0.690361", "0.68906903", "0.6875342", "0.6626918", "0.66228026", "0.66082186", "0.6606591", "0.6565511", "0.6558931", "0.65105695", "0.65099645", "0.6500905", "0.6457383", "0.6409602", "0.64000994", "0.63709396", "0.6340899", "0.6325818", "0.6316323", "0.6291007", "0.6234337", "0.6223266", "0.61953247", "0.61946815", "0.61905694", "0.61901236", "0.617407", "0.6170229", "0.6162032", "0.6139142", "0.61237264", "0.6078061", "0.60527974", "0.6027545", "0.60204095", "0.6019255", "0.6016559", "0.6005504", "0.60017264", "0.598811", "0.5974733", "0.59708756", "0.59530854", "0.59505415", "0.59455293", "0.5945115", "0.59320116", "0.5925856", "0.59197044", "0.5918638", "0.59139794", "0.59116304", "0.59106827", "0.59002197", "0.5892951", "0.5875492", "0.58681977", "0.58669984", "0.5863795", "0.5863544", "0.58482784", "0.5843639", "0.58398914", "0.5836719", "0.5815884", "0.5815255", "0.5815255", "0.5798809", "0.5788299", "0.5785982", "0.5775788", "0.5771483", "0.57636803", "0.5762308", "0.5761679", "0.5761232", "0.5760665", "0.57599914" ]
0.6721112
25
This is the interface defining matchers. Matchers are used to determine which elements should be included on a list.
public interface Matcher<T> { /** * This method determines if the element must be allowed to be on the list. * * @param element * * @return true if the element is allowed. false otherwise. */ boolean accepts(T element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SafeVarargs\n protected ListMatcher(Matcher<? super T>... matchers) {\n this.matchers = matchers;\n }", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 2;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 2;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 2;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 2;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 2;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 2;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 3;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 3;\r\n\t\t\t}", "public boolean match( ListExp p ) { return false; }", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 1;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 1;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean matches(Object list) {\n\t\t\t\treturn ((List<String>) list).size() == 1;\r\n\t\t\t}", "public List<AbstractMatcher> getMatchers() {\n\t\tList<AbstractMatcher> list = new LinkedList<AbstractMatcher>();\n\t\tlist.addAll(matcherList);\n\t\t\n\t\t// HACK to show matcher\n\t\tAbstractMatcher partitionMatcher = new PartitionMatcher();\n\t\tlist.add(partitionMatcher);\n\t\t\n\t\treturn list;\n\t}", "@Test\r\n void matches_collection() {\n assertMatcherTrue(asList(\"1\", \"2\"), size(2));\r\n }", "public ListsElements( T[] expected, Function<T,Matcher<T>> elementMatcherSupplier)\n {\n Iterable<T> members = expected == null? null : Arrays.asList( expected);\n listsMembers = new ListsMembers<T>( members, elementMatcherSupplier);\n }", "protected List<Matcher<? super T>> getMatchers() {\n return Arrays.asList(this.matchers);\n }", "private static boolean acceptsList(Automaton type, Automaton.Term tState, Automaton automaton, Automaton.List aList,\n\t\t\tSchema schema, BinaryMatrix assumptions) {\n\t\tAutomaton.List list = (Automaton.List) type.get(tState.contents);\n\t\tAutomaton.Collection collection = (Automaton.Collection) type.get(list\n\t\t\t\t.get(1));\n\t\tint unboundedIndex = list.get(0);\n\t\tAutomaton.Term unbounded = (Automaton.Term) type.get(unboundedIndex);\n\t\tboolean isUnbounded = unbounded.kind != Types.K_Void;\n\n\t\t// The minimum expected size of the collection. In the case of a bounded\n\t\t// collection, this is exactly the size of the collection. For an\n\t\t// unbounded collection, it is one less since the last element\n\t\t// represents zero or more elements.\n\t\tint minSize = collection.size();\n\n\t\tif (aList.size() < minSize || (!isUnbounded && minSize != aList.size())) {\n\t\t\t// collection is not big enough.\n\t\t\treturn false;\n\t\t}\n\n\t\t// Now, attempt to match all the requested items. Each match is loaded\n\t\t// into matches in order to prevent double matching of the same item.\n\t\tfor (int i = 0; i != minSize; ++i) {\n\t\t\tint tItem = collection.get(i);\n\t\t\tint aItem = aList.get(i);\n\t\t\tif (!accepts(type, tItem, automaton, aItem, schema, assumptions)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Finally, for an unbounded match we need to match all other items\n\t\t// against the remainder.\n\t\tif (isUnbounded) {\n\t\t\tfor (int j = minSize; j != aList.size(); ++j) {\n\t\t\t\tint aItem = aList.get(j);\n\t\t\t\tif (!accepts(type, unboundedIndex, automaton, aItem, schema, assumptions)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If we get here, we're done.\n\n\t\treturn true;\n\t}", "public boolean islistmatching(List<String> expected,List<String> actual){\r\n if (expected == null && actual == null){\r\n return true;\r\n }\r\n\r\n if((expected == null && actual != null) || expected != null && actual == null || expected.size() != actual.size()){\r\n return false;\r\n }\r\n\r\n expected = new ArrayList<String>(expected);\r\n actual = new ArrayList<String>(actual);\r\n\r\n Collections.sort(expected);\r\n Collections.sort(actual);\r\n\r\n return expected.equals(actual);\r\n }", "@Test\r\n\tpublic void testContains() {\r\n\t\tAssert.assertTrue(list.contains(new Munitions(2, 3, \"iron\")));\r\n\t\tAssert.assertFalse(list.contains(new Munitions(2, 5, \"ferrum\")));\r\n\t}", "@Test\r\n\tvoid testContains() {\r\n\t\tSortedList list = new SortedList(\"List\");\r\n\t\tlist.insert(toDoItem1);\r\n\t\tlist.insert(toDoItem2);\r\n\t\tlist.insert(toDoItem3);\r\n\t\tlist.insert(toDoItem4);\r\n\r\n\t\tif (list.contains(\"Item 1\") != true) {\r\n\t\t\tfail(\"Failed to find \\\"Item 1\\\"\");\r\n\t\t}\r\n\t\tif (list.contains(\"Item 2\") != true) {\r\n\t\t\tfail(\"Failed to find \\\"Item 2\\\"\");\r\n\t\t}\r\n\t\tif (list.contains(\"Item 3\") != true) {\r\n\t\t\tfail(\"Failed to find \\\"Item 3\\\"\");\r\n\t\t}\r\n\t\tif (list.contains(\"Item 4\") != true) {\r\n\t\t\tfail(\"Failed to find \\\"Item 4\\\"\");\r\n\t\t}\r\n\t}", "boolean hasMatchedElements();", "@Test\n public void testFindall() {\n\n System.out.println(\"findall\"); \n PrioridadRest rest = mokPrioridadRest;\n List<Prioridad> result = rest.findall();\n Prioridad prioridad = new Prioridad(1, \"1\");\n assertThat(result, CoreMatchers.hasItems(prioridad));\n }", "public boolean isInList();", "public final boolean matches(List<Type> typeList) {\n return typeList.equals(pattern);\n }", "boolean hasList();", "@Test\r\n void matches_iterable() {\n assertMatcherTrue(Paths.get(\"a\", \"b\"), size(2));\r\n }", "void onMatched(List<Offer> offers);", "boolean matches(@NotNull List<OrderConstraintsType> orderConstraints);", "public TokenMatcherList() {\n matcherList = new ArrayList<>();\n }", "interface Matcher<R extends OWLPropertyRange, F extends R, P extends OWLPropertyExpression<R, P>> {\n boolean isMatch(OWLClassExpression c, P p, R f);\n\n boolean isMatch(OWLClassExpression c, P p, R f, boolean direct);\n\n /** Perform a recursive search, adding nodes that match. If direct is true\n * only add nodes if they have no subs that match\n * \n * @param c\n * class\n * @param p\n * property\n * @param start\n * start\n * @param direct\n * direct\n * @return set of leave nodes */\n NodeSet<F> getLeaves(OWLClassExpression c, P p, R start, boolean direct);\n\n /** Perform a search on the direct subs of start, adding nodes that match. If\n * direct is false then recurse into descendants of start\n * \n * @param c\n * class\n * @param p\n * property\n * @param start\n * start\n * @param direct\n * direct\n * @return set of root nodes */\n NodeSet<F> getRoots(OWLClassExpression c, P p, R start, boolean direct);\n}", "public static boolean containsMatch(List<String> list, String str) {\n boolean strAvailable = false;\n final Pattern pattern = Pattern.compile(str, Pattern.CASE_INSENSITIVE | Pattern.CANON_EQ);\n if (list != null) {\n for (String s : list) {\n final Matcher matcher = pattern.matcher(s);\n if (matcher.find()) {\n strAvailable = true;\n break;\n }\n }\n }\n return strAvailable;\n }", "@Test\n public void ListFilterer()\n {\n IListFilter mock_filter = Mockito.mock(IListFilter.class);\n\n //When the method accept of the class filter is called with -1 it should return true\n Mockito.when(mock_filter.accept(-1)).thenReturn(false);\n Mockito.when(mock_filter.accept(2)).thenReturn(true);\n Mockito.when(mock_filter.accept(-3)).thenReturn(false);\n Mockito.when(mock_filter.accept(4)).thenReturn(true);\n\n List<Integer> expected = new ArrayList<>();\n\n expected.add(2);\n expected.add(4);\n\n //Object of class to be tested\n ListFilterer testing_listFilterer = new ListFilterer(this.list);\n\n //Return list\n List<Integer> return_list = testing_listFilterer.filter(mock_filter);\n\n //Let's compare the two classes\n assertEquals(expected, return_list);\n\n }", "@Test\r\n\tpublic void testContainsAll() {\r\n\t\tDoubleList sample = new DoubleList(new Munitions(2, 3, \"iron\"));\r\n\t\tAssert.assertTrue(list.containsAll(sample));\r\n\t\tsample.add(new Munitions(2, 2, \"iron\"));\r\n\t\tAssert.assertFalse(list.containsAll(sample));\r\n\t}", "public boolean isList();", "public boolean isList();", "public void setMatcherConfigs(List<IntentMatcherConfig> matcherConfigs) {\n this.matcherConfigs = matcherConfigs;\n }", "public static boolean searchItemInList(String text, List<IStringField> list){\n for(IStringField item : list){\n if(item.getStrValue().equals(text)){\n return true;\n }\n }\n return false;\n }", "public void validateRecipients(List<String> expected) {\n List<String> received = Arrays.asList(recipients.getText().split(\",\"));\n assertTrue(\"Received list \" + received.toString() + \" contains the expected \" + expected.toString(), received.containsAll(expected));\n }", "public boolean contains(List l) {\n if (lists.contains(l.obtainTitle())) return true;\n else return false;\n }", "@Override\n public Matcher matches(LexerToken[] lexerTokens, Builder builder){\n return new Matcher(this,lexerTokens,builder);\n }", "public static boolean isMatchingEtag(final List<String> headerList, final String etag) {\n for (String header : headerList) {\n final String[] headerEtags = header.split(\",\");\n for (String s : headerEtags) {\n s = s.trim();\n if (s.equals(etag) || \"*\".equals(s)) {\n return true;\n }\n }\n }\n\n return false;\n }", "@Test\n public void testContainsAll_Contains() {\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(4);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.containsAll(c);\n assertEquals(expResult, result);\n }", "public TokenMatcherList addMatcher(final TokenMatcher tokenMatcher) {\n matcherList.add(tokenMatcher);\n return this;\n }", "@Test\n public void testContains_Contain() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(1);\n instance.add(2);\n instance.add(3);\n\n boolean expResult = true;\n boolean result = instance.contains(1);\n assertEquals(expResult, result);\n }", "public void testListFilters() {\r\n boolean[] types = {true,true,false}; // Types 1 and 2.\r\n List<InfoNode> filteredList = MapUtils.filterValues(exampleList, types);\r\n assertTrue(filteredList.size() == 2);\r\n assertTrue(filteredList.contains(node1));\r\n assertTrue(filteredList.contains(node2));\r\n assertFalse(filteredList.contains(node3));\r\n\r\n types[2] = true; // Types 1, 2 and 3.\r\n filteredList = MapUtils.filterValues(exampleList, types);\r\n assertTrue(filteredList.size() == 3);\r\n assertTrue(filteredList.contains(node1));\r\n assertTrue(filteredList.contains(node2));\r\n assertTrue(filteredList.contains(node3));\r\n\r\n types[0] = false; types[1] = false; types[2] = false;\r\n filteredList = MapUtils.filterValues(exampleList, types);\r\n assertTrue(filteredList.isEmpty());\r\n assertFalse(filteredList.contains(node1));\r\n assertFalse(filteredList.contains(node2));\r\n assertFalse(filteredList.contains(node3));\r\n }", "@Test\n\tpublic void testListOperations() {\n\t\tassertFalse(streetAddresses.contains(s1PlusNine));\n\t\tassertTrue(streetAddresses.stream().anyMatch(s -> comparator.compare(s1PlusNine, s) == 0));\n\t}", "public boolean contains(T instance, M matchCondition);", "@Test\n public void getMatchListTest2()\n {\n RiotApiHandler userTest=RiotApiHandler.getInstance();\n String[] array= {\"EUN1_2775220260\", \"EUN1_2774180103\", \"EUN1_2773714308\", \"EUN1_2773662778\", \"EUN1_2772530238\", \"EUN1_2772505023\",\n \"EUN1_2772491193\", \"EUN1_2772005021\", \"EUN1_2771803452\", \"EUN1_2769206534\", \"EUN1_2767311256\", \"EUN1_2767113653\", \"EUN1_2767101111\",\n \"EUN1_2767036478\", \"EUN1_2766884534\", \"EUN1_2766808664\", \"EUN1_2766432042\", \"EUN1_2766071093\", \"EUN1_2766077729\", \"EUN1_2765668508\"\n };\n ArrayList<String> correct = new ArrayList<>(Arrays.asList(array));\n Assert.assertNotEquals(correct , userTest.getMatchlist(\"Stains of Time\",\"eun1\"));\n }", "public boolean searchList(List<String> list) {\r\n int count = 0;\r\n for (String subject : list) {\r\n if (currentLocation.searchEntities(subject) || currentPlayer.searchInventory(subject)\r\n || subject.equals(\"health\")) {\r\n count++;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n // If all subjects are found: true, if not all found: false\r\n return count == list.size();\r\n }", "interface Spec<T> {\n boolean isSatisfiedBy(T element);\n}", "@Test\n public void contains() {\n Observable.just(2, 30, 22, 5, 60, 1)\n .contains(22)\n .subscribe(mList::add);\n assertEquals(mList, Collections.singletonList(true));\n }", "private <T extends AtlasBaseTypeDef> boolean compareLists(List<T> expected, List<T> actual) {\n if (expected.isEmpty() && actual.isEmpty()) {\n return true;\n }\n\n // initially this list contains all expected EntityDefs; we'll remove the actual EntityDefs;\n // the remaining items will contain the items found in this model but not in the other one\n final List<T> missingEntityDefs = newArrayList();\n missingEntityDefs.addAll(expected);\n\n for (T entityDef : actual) {\n Iterator<T> iter = missingEntityDefs.iterator();\n while (iter.hasNext()) {\n if (iter.next().getName().equals(entityDef.getName())) {\n iter.remove();\n break;\n }\n }\n }\n // not a full comparison since it's possible for this list to be empty but the other\n // model to have extra entities - but for our purposes that's good enough\n return missingEntityDefs.isEmpty();\n }", "public T[] matches(T element);", "@Test\n\tpublic void listTests(){\n\t\tSemanticActions actions = new SemanticActions();\n\t\tList<Integer> l1 = actions.makeList(30);\n\t\tList<Integer> l2 = actions.makeList(200);\n\t\tList<Integer> l3 = actions.merge(l1, l2);\n\t\tList<Integer> test1 = new ArrayList<Integer>();\n\t\ttest1.add(30);\n\t\ttest1.add(200);\n\t\tassertEquals(test1, l3);\n\t\tl2.add(40);\n\t\tl2.add(7);\n\t\tList<Integer> l4 = actions.merge(l1, l2);\n\t\ttest1.add(40);\n\t\ttest1.add(7);\n\t\tassertEquals(test1, l4);\n\t\tl4.add(90);\n\t\tassertFalse(test1.equals(l4));\n\t}", "public void execute_multipleParameterPredicate_test(int expectedNum, String userInput, String parameter,\n boolean isIgnoreCase, boolean isAnd,\n List<Person> expectedList) throws ParseException {\n String expectedMessage = String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, expectedNum);\n ContainsKeywordsPredicate predicate = prepareMultiPredicate(isIgnoreCase, isAnd, userInput, parameter);\n PatientFindCommand command = new PatientFindCommand(predicate);\n expectedModel.updateFilteredPersonList(predicate);\n assertCommandSuccess(command, model, commandHistory, expectedMessage, expectedModel);\n assertEquals(expectedList, model.getFilteredPersonList());\n }", "public boolean containRelationship(ArrayList<Relationship> inputList)\r\n\t{\r\n\t\tfor(Relationship inputRE: inputList)\r\n\t\t{\r\n\t\t\tif (!listRelationship.contains(inputRE)) return false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "protected void setupMatcherExpectations() {\n expectedMatchRecordIds.put(\"x028abMatcher\", 0);\r\n expectedMatchRecords.put (\"x028abMatcher\", 0);\r\n\r\n expectedMatchRecordIds.put(\"x245ahMatcher\", 0);\r\n expectedMatchRecords.put (\"x245ahMatcher\", 0);\r\n\r\n expectedMatchRecordIds.put(\"x240aMatcher\", 0);\r\n expectedMatchRecords.put (\"x240aMatcher\", 0);\r\n\r\n expectedMatchRecordIds.put(\"x260abcMatcher\", 0);\r\n expectedMatchRecords.put (\"x260abcMatcher\", 0);\r\n\r\n expectedMatchRecordIds.put(\"x130aMatcher\", 0);\r\n expectedMatchRecords.put (\"x130aMatcher\", 0);\r\n //TODO end of above TODO\r\n\r\n expectedMatchRecordIds.put(\"ISSNMatcher\", 14); //confirmed\r\n expectedMatchRecords.put (\"ISSNMatcher\", 2); //confirmed\r\n\r\n expectedMatchRecordIds.put(\"ISBNMatcher\", 78); //TODO confirm both of these\r\n expectedMatchRecords.put (\"ISBNMatcher\", 23);\r\n\r\n expectedMatchRecordIds.put(\"x024aMatcher\", 3); //confirmed\r\n expectedMatchRecords.put (\"x024aMatcher\", 3); //confirmed\r\n\r\n expectedMatchRecordIds.put(\"LccnMatcher\", 49); //TODO confirm both of these\r\n expectedMatchRecords.put (\"LccnMatcher\", 8);\r\n\r\n expectedMatchRecordIds.put(\"SystemControlNumberMatcher\", 92); //TODO confirm both of these\r\n expectedMatchRecords.put (\"SystemControlNumberMatcher\", 27);\r\n\r\n\r\n /*\r\n rule 2 matchsets?:\r\n- *** Matchset: {62, 160, 201, }\r\n- *** Matchset: {10, 29, 52, 66, 132, 171, 205, 255, }\r\n- *** Matchset: {33, 71, 113, 137, 175, 207, 262, }\r\n\r\n 035 matchsets?:\r\n- *** Matchset: {1, 25, 48, 94, 107, 167, 197, 234, 251, 316, }\r\n- *** Matchset: {3, 27, 50, 64, 96, 109, 162, 169, 203, 236, 253, 318, }\r\n- *** Matchset: {31, 68, 111, 134, 173, 238, 257, 320, }\r\n- *** Matchset: {12, 73, 98, 115, 177, 209, 264, 324, }\r\n- *** Matchset: {5, 14, 35, 54, 75, 100, 117, 179, 240, 267, 326, }\r\n- *** Matchset: {56, 58, 82, 121, 141, 164, 185, 211, 243, 275, 329, }\r\n- *** Matchset: {22, 60, 89, 104, 125, 154, 191, 222, 248, 308, 312, 333, }\r\n */\r\n\r\n expectedResults.add(getExpectedMatchSet(new long[]{5,14,35,54,75,100,117,179,240,267,326}));\r\n expectedResults.add(getExpectedMatchSet(new long[]{22,60,89,104,125,154,191,222,248,308,312,333}));\r\n expectedResults.add(getExpectedMatchSet(new long[]{56,58,82,121,141,164,185,211,243,275,329}));\r\n expectedResults.add(getExpectedMatchSet(new long[]{12,73,98,115,177,209,264,324}));\r\n expectedResults.add(getExpectedMatchSet(new long[]{31,68,111,134,173,238,257,320}));\r\n expectedResults.add(getExpectedMatchSet(new long[]{3,27,50,64,96,109,162,169,203,236,253,318}));\r\n expectedResults.add(getExpectedMatchSet(new long[]{1,25,48,94,107,167,197,234,251,316}));\r\n\r\n expectedResults.add(getExpectedMatchSet(new long[]{62, 160, 201}));\r\n expectedResults.add(getExpectedMatchSet(new long[]{10, 29, 52, 66, 132, 171, 205, 255}));\r\n expectedResults.add(getExpectedMatchSet(new long[]{33, 71, 113, 137, 175, 207, 262}));\r\n }", "@Test\n\tpublic void retrieveTodosRelatedToSpring_usingWithList() {\n\t\tTodoService todoServiceMock = mock(TodoService.class);\n\t\tList<String> todos = Arrays.asList(\"Learn to dance\",\"Learn Spring\",\"Learn Spring boot\");\n\t\t\n\t\t/* Define the behaviour of mock object here */\n\t\twhen(todoServiceMock.retrieveTodos(\"Dummy\")).thenReturn(todos);\n\t\t\n\t\tTodoBusinessImpl todoBusinessImpl = new TodoBusinessImpl(todoServiceMock);\n\t\tList<String> filteredTodos = todoBusinessImpl.retrieveTodosRelatedToSpring(\"Dummy\");\n\t\tassertEquals(2, filteredTodos.size());\n\t}", "boolean isDependOnThemselves(List<String> l);", "@Test\r\n void not_matches() {\n assertMatcherFalse(asList(\"1\", \"2\"), size(3));\r\n }", "ImmutableList<SchemaOrgType> getIsPartOfList();", "public void testListEnum() {\n \t\tList<RadioBand> enumValueList = Arrays.asList(RadioBand.values());\n\n\t\tList<RadioBand> enumTestList = new ArrayList<RadioBand>();\n\t\tenumTestList.add(RadioBand.AM);\n\t\tenumTestList.add(RadioBand.FM);\n\t\tenumTestList.add(RadioBand.XM);\n\n\t\tassertTrue(\"Enum value list does not match enum class list\", \n\t\t\t\tenumValueList.containsAll(enumTestList) && enumTestList.containsAll(enumValueList));\n\t}", "public ListMatcher empty() {\n\n\t\tnotNull();\n\t\t\n\t\tif (target.isEmpty()) {\n\t\t\treturn this;\n\t\t}\n\n\t\tthrow getException(\"Expected an empty list but it was %s\", target);\n\t}", "public void containsAnyIn(Iterable<?> expected) {\n containsAny(\"contains any element in\", expected);\n }", "public interface IValueMatcher<T> {\n\n /**\n * Should provide matching logic using the passed value.\n *\n * @param value\n * @return\n */\n List<T> findMatches(final String value);\n\n /**\n * Defines the maximum number of values to be presented during autocompletion.\n *\n * @return\n */\n default Integer getPageSize() {\n return 10;\n }\n}", "List<E> list(String field, String contains);", "@Test\n public void getMatchListTest()\n {\n RiotApiHandler userTest=RiotApiHandler.getInstance();\n String[] array= {\"EUN1_2813356879\", \"EUN1_2797819662\", \"EUN1_2797712721\", \"EUN1_2797709856\", \"EUN1_2797693226\", \"EUN1_2797682448\", \"EUN1_2797526002\",\n \"EUN1_2797504038\", \"EUN1_2797540836\", \"EUN1_2794696829\", \"EUN1_2791827193\", \"EUN1_2791781454\", \"EUN1_2791655029\",\n \"EUN1_2791596648\", \"EUN1_2786187593\", \"EUN1_2785993952\", \"EUN1_2727858238\", \"EUN1_2727671015\", \"EUN1_2727312718\", \"EUN1_2727226847\"\n };\n ArrayList<String> correct = new ArrayList<>(Arrays.asList(array));\n //test fails, I play this game everyday so the matchlist changes constantly, it all works real good (source ---> trust me :ok:)\n Assert.assertEquals(correct ,userTest.getMatchlist(\"8f9zu86yj87xgh76\",\"eun1\"));\n }", "private static Matcher<View> encontrarLista() {\n return new TypeSafeMatcher<View>() {\n @Override\n protected boolean matchesSafely(View item) {\n if (item instanceof ListView) {\n ListView lista = (ListView) item;\n a1a5NumIni = lista.getAdapter().getCount();\n return true;\n }\n return false;\n }\n\n @Override\n public void describeTo(Description description) {\n }\n };\n }", "public boolean containsAll(Collection<? extends Type> items);", "@Test\n public void testAddMovieActor() {\n final ArrayList<Actor> expectedList1 = new ArrayList<>();\n final ArrayList<Actor> expectedList2 = new ArrayList<>();\n final ArrayList<Actor> expectedList3 = new ArrayList<>();\n Actor actor1 = new Actor(actorMacchio);\n Actor actor2 = new Actor(actorFreeman);\n\n movie1.addActor(actor1);\n movie1.addActor(actor2);\n movie1.addActor(actor1);\n expectedList1.add(actor1);\n expectedList1.add(actor2);\n movie2.addActor(actor1);\n expectedList2.add(actor1);\n movie3.addActor(actor2);\n expectedList3.add(actor2);\n movie4.addActor(actor1);\n movie4.addActor(actor2);\n\n assertEquals(expectedList1, movie1.getActors());\n assertEquals(expectedList2, movie2.getActors());\n assertEquals(expectedList3, movie3.getActors());\n assertEquals(expectedList1, movie4.getActors());\n }", "@Test\r\n\tpublic final void testGetAllRooms() {\n\t\tList<Room> actualList = roomServices.getAllRooms();\r\n\t\t// get all data in JUnit test\r\n\r\n\t\tList<Room> expectedList = new ArrayList<Room>();\r\n\t\texpectedList.addAll(params());\r\n\t\t\r\n\t\tSystem.out.println(\"expectedList\");\r\n\t\tSystem.out.println(expectedList);\r\n\t\tSystem.out.println(\"actualList\");\r\n\t\tSystem.out.println(actualList);\r\n\t\t\r\n\t\t// see if JUnit test value is in room list\r\n\t\tassertTrue(actualList.contains(expected));\r\n\t}", "public void setSpecimenList(Collection<List<NameValueBean>> specimenList)\r\n\t{\r\n\t\tthis.specimenList = specimenList;\r\n\t}", "public static boolean OrderSpecList(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"OrderSpecList\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, ORDER_SPEC_LIST, \"<order spec list>\");\n r = OrderSpec(b, l + 1);\n r = r && OrderSpecList_1(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }", "protected abstract Matcher<? super ExpressionTree> specializedMatcher();", "@Test\n\tpublic void test_validate_string_list() throws Exception {\n\t\tArrayList<Data> rawList = new ArrayList<Data>();\n\t\trawList.add(new Data(\"subData\", \"integer\", 12, false, false, false));\n\t\tData list = new Data(\"list\", \"description\", rawList, false, false, false);\n\t\t\n\t\tHashMap<String, Data> rawParent = new HashMap<String, Data>();\n\t\trawParent.put(\"list\", list);\n\t\t\n\t\tData parent = new Data(\"parent\", \"parent\", rawParent, false,false,false);\n\t\t\n\t\tChemistryProjectGlobalValidation c = new ChemistryProjectGlobalValidation();\n\t\t\n\t\t//fail becuase list contains an integer element\n\t\tassertNotEquals(null, c.containsStringList(parent, \"list\"));\n\t\t\n\t\t//fail because key doesnt exist\n\t\tassertNotEquals(null, c.containsStringList(parent, \"non existant \"));\n\t\t\n\t\t//fail because key exists but is not list type\n\t\tassertNotEquals(null, c.containsStringList(list, \"subData\"));\n\t}", "public ListsElements( T[] expected)\n {\n this( expected, null);\n }", "public HttpRequestPreconditions setIfMatch(List<String> ifMatch)\n throws IllegalArgumentException {\n this.ifMatch = ifMatch;\n validate();\n return this;\n }", "public static void main(String[] args) {\n\n ArrayList<String> students = new ArrayList<>();\n students.add(\"Sayeem\");\n students.add(\"Wagar\");\n students.add(\"Beslan\");\n students.add(\"Dawut\");\n students.add(\"Ramazan\");\n students.add(\"Mehary\");\n\n // Verify that the names: Ulku, Busra are contained in students list\n\n boolean r = students.containsAll(Arrays.asList(\"Ulku\", \"Busra\") );\n System.out.println(r);\n\n System.out.println(\"=======================================\");\n\n ArrayList<String> group1 = new ArrayList<>();\n\n // add all student names in your group\n group1.addAll( Arrays.asList(\"Muhtar\", \"Nadir\", \"Asiya\", \"Saim\"));\n\n // verify your mentor and one of your closest friend' names are contained in the list\n group1.containsAll( Arrays.asList(\"Mike\"));\n\n\n\n }", "@Test \n\tpublic void testJsonPathWithLists() {\n\t\n\t\tMap<String,Integer> requestParamMaps=new HashMap<>();\n\t\t requestParamMaps.put(\"limit\", 100);\n\t\t\n\t\t\tResponse response = given().accept(ContentType.JSON).and().params(requestParamMaps)\n\t\t\t.when().get(ConfigurationReader.getProperty(\"hrapp.baseurl\")+\"/employees/\");\n\t\t\t\n\t\t\tassertEquals(response.statusCode(), 200);\n\t\t\t\n\t\t\tJsonPath json = response.jsonPath();\n\t\t\t//get all employee ids into arratlist\n\t\t\tList<Integer> empIDs = json.getList(\"items.employee_id\");\n\t\t\tSystem.out.println(empIDs);\n\t\t\t//assert that there are 100 emp ids\n\t\t\tassertEquals(empIDs.size(), 100);\n\t\t\t\n\t\t\t//get all emails and assign in list \n\t\t\tList<String> emails = json.getList(\"items.email\");\n\t\t\t\n\t\t\tassertEquals(emails.size(), 100);\n\t\t\t\n\t\t\t//get all employee ids that are greater than 150\n\t\t\tList<Integer> empIdList = json.getList(\"items.findAll{it.employee_id > 150}.employee_id\");\n\t\t\tSystem.out.println(empIdList);\n\t\t\t\n\t\t\t//get all employee lastnames, whose salary is more than 7000\n\t\t\t\n\t\t\tList<String> lastNames = json.getList(\"items.findAll{it.salary > 7000}.last_name\");\n\t\t\tSystem.out.println(lastNames);\n\t}", "public interface MediaQueryList extends MediaList {\n\n\t/**\n\t * Get the media query at {@code index}.\n\t * \n\t * @param index the index.\n\t * @return the media query at the {@code index}-th position in this list, or\n\t * {@code null} if that is not a valid index or the query list is\n\t * invalid.\n\t */\n\tMediaQuery getMediaQuery(int index);\n\n\t/**\n\t * Get the serialized form of this media query list.\n\t * \n\t * @return the serialized form of this media query list.\n\t */\n\tString getMedia();\n\n\t/**\n\t * Get a minified serialized form of this media query list.\n\t * \n\t * @return the minified serialized form of this media query list.\n\t */\n\tString getMinifiedMedia();\n\n\t/**\n\t * Is this an all-media list?\n\t * \n\t * @return <code>true</code> if this list matches all media, <code>false</code>\n\t * otherwise.\n\t */\n\tboolean isAllMedia();\n\n\t/**\n\t * Determine if this list is composed only of queries that evaluate to\n\t * <code>not all</code>.\n\t * \n\t * @return <code>true</code> if this list matches no media, <code>false</code>\n\t * otherwise.\n\t */\n\tboolean isNotAllMedia();\n\n\t/**\n\t * Does the associated media query list match the state of the rendered Document?\n\t * \n\t * @param medium\n\t * the lowercase name of the medium to test for.\n\t * @param canvas\n\t * the canvas where the document is to be rendered.\n\t * @return <code>true</code> if the associated media query list matches the state\n\t * of the rendered Document and <code>false</code> if it does not.\n\t */\n\tboolean matches(String medium, CSSCanvas canvas);\n\n\t/**\n\t * Does the given media list contain any media present in this list?\n\t * <p>\n\t * If query A matches B, then if a medium matches B it will also match A. The\n\t * opposite may not be true.\n\t * \n\t * @param otherMedia the other media list to test.\n\t * @return <code>true</code> if the other media contains any media which applies\n\t * to this list, <code>false</code> otherwise.\n\t */\n\tboolean matches(MediaQueryList otherMedia);\n\n\t/**\n\t * Did this media query list produce errors when being parsed ?\n\t * \n\t * @return <code>true</code> if this list come from a media string that produced\n\t * errors when parsed, <code>false</code> otherwise.\n\t */\n\tboolean hasErrors();\n\n\t/**\n\t * Get the exceptions found while parsing the query, if any.\n\t * \n\t * @return the exceptions found while parsing the query, or <code>null</code> if\n\t * no errors were found while parsing the media query.\n\t */\n\tList<CSSParseException> getExceptions();\n\n\t/**\n\t * Appends a listener to the list of media query list listeners, unless it is\n\t * already in that list.\n\t * \n\t * @param listener\n\t * the listener to be appended.\n\t */\n\tvoid addListener(MediaQueryListListener listener);\n\n\t/**\n\t * Removes a listener from the list of media query list listeners.\n\t * \n\t * @param listener\n\t * the listener to be removed.\n\t */\n\tvoid removeListener(MediaQueryListListener listener);\n\n}", "@Test\r\n public void testContains() {\r\n System.out.println(\"contains\");\r\n ModeloListaOrganizadores instance = new ModeloListaOrganizadores(e.getListaOrganizadores());\r\n Organizador o =new Organizador(new Utilizador(\"teste\", \"teste@isep.ipp.pt\", \"teste\", \"teste\", true, 5));\r\n instance.addElement(o);\r\n boolean expResult = true;\r\n boolean result = instance.contains(o);\r\n assertEquals(expResult, result);\r\n \r\n }", "@Test\n public void testContainsAll_Not_Contain() {\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(4);\n\n Collection c = Arrays.asList(1, 2, 5);\n\n boolean expResult = false;\n boolean result = instance.containsAll(c);\n assertEquals(expResult, result);\n }", "public static boolean GroupingSpecList(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"GroupingSpecList\")) return false;\n if (!nextTokenIs(b, DOLLAR_SIGN)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = GroupingSpec(b, l + 1);\n r = r && GroupingSpecList_1(b, l + 1);\n exit_section_(b, m, GROUPING_SPEC_LIST, r);\n return r;\n }", "public static final boolean StartsWithOneOf(final String what, final String list, final String divider) {\n\t\t\n\t\tif (what == null) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (final StringTokenizer st = new StringTokenizer(list, divider); st.hasMoreElements();) {\n\t\t\tfinal String S = st.nextToken();\n\t\t\tif (S.length() == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (what.startsWith(S)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "void testCanGetList();", "public interface MockSelector<T> {\n\n /**\n * Selects the mock according to the rules of implementation.\n * <p>\n * @param selection the reference to compare in the implemented rule\n * @param mocks original list of mocks\n * @return selected list of mocks\n */\n List<MockHolder> select(T selection, List<MockHolder> mocks);\n\n /**\n * Selects the mock according to the rules of implementation.\n * <p>\n * @param field with and attribute which will be the reference to compare in\n * the implemented rule\n * @param mocks original list of mocks\n * @return selected list of mocks\n */\n List<MockHolder> selectByField(Field field, List<MockHolder> mocks);\n\n}", "private boolean isListValid()\n {\n boolean isValid = true;\n Collection<RecognizedElement> elementsList = tree.getChildren();\n for (Iterator<RecognizedElement> iterator = elementsList.iterator(); iterator.hasNext();)\n {\n RecognizedElement recognizedElement = (RecognizedElement) iterator.next();\n if (isSpreadsheet)\n {\n if (recognizedElement instanceof Style || recognizedElement instanceof Regex)\n {\n isValid = false;\n break;\n }\n }\n else\n {\n if (recognizedElement instanceof Column)\n {\n isValid = false;\n break;\n }\n }\n }\n return isValid;\n }", "public static List<String> getMatches(String value, Collection<String> list, boolean caseInsensitive) {\n List<String> result = new LinkedList<>();\n\n for (String str : list) {\n if (str.startsWith(value.toLowerCase())\n || (caseInsensitive && str.toLowerCase().startsWith(value.toLowerCase()))) {\n result.add(str);\n }\n }\n\n return result;\n }", "private static boolean compareList(List<Object> l1, List<Object> l2)\n {\n int count=0;\n for (Object o : l1)\n {\n Object temp = o;\n for (Object otemp : l2)\n {\n if (EqualsBuilder.reflectionEquals(temp, otemp))\n {\n count++;\n }\n }\n\n }\n\n if(count == l1.size()) return true;\n return false;\n\n }", "@Test\n\tpublic void testWithQueryParametersAndList() {\n\t\tgiven().accept(ContentType.JSON)\n\t\t.and().params(\"limit\",100)\n\t\t.when().get(ConfigurationReader.getProperty(\"hrapp.baseurl\")+\"/employees\")\n\t\t.then().assertThat().statusCode(200)\n\t\t.and().contentType(ContentType.JSON)\n\t\t.and().assertThat().body(\"items.employee_id\", hasSize(100));\n\t\t\n\t}", "public boolean isInterestedInAllItems();", "@Test\n void generateInviteTokenListSuccess() throws Exception {\n // given\n Map<String, Object> populatedObjects = populateDb.populateDbWithAnonimUserAndCredentialsAndToken();\n TokenEntity tokenEntity = (TokenEntity) populatedObjects.get(\"tokenEntity\");\n User user = (User) populatedObjects.get(\"user\");\n\n // when\n MvcResult mvcResult = mockMvc.perform(get(\"/test/generateTokenList\")\n .header(\"AUTHORIZATION\", ACCESS_TOKEN_PREFIX + \" \" + tokenEntity.getToken()))\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8))\n .andExpect(status().isOk())\n .andReturn();\n\n // then\n List<String> responseBody = mapper.readValue(mvcResult.getResponse().getContentAsString(), List.class);\n User updatedUser = userRepository.findById(user.getId()).get();\n\n assertTrue(updatedUser\n .getUsersForMatchingId()\n .stream()\n .allMatch(userId ->\n responseBody.contains(tokenRepository.findByUserId(userId)\n .get()\n .getToken()) &&\n userRepository.findById(userId)\n .get()\n .getUsersForMatchingId()\n .get(0).equals(updatedUser.getId())));\n }", "public List<IntentMatcherConfig> getMatcherConfigs() {\n return matcherConfigs;\n }", "private void execute_parameterPredicate_test(int expectedNum, String userInput, String parameter,\n boolean isIgnoreCase, boolean isAnd,\n List<Person> expectedList) throws ParseException {\n String expectedMessage = String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, expectedNum);\n ContainsKeywordsPredicate predicate = preparePatientPredicate(userInput, parameter, isIgnoreCase, isAnd);\n PatientFindCommand command = new PatientFindCommand(predicate);\n expectedModel.updateFilteredPersonList(predicate);\n assertCommandSuccess(command, model, commandHistory, expectedMessage, expectedModel);\n assertEquals(expectedList, model.getFilteredPersonList());\n }", "public static void verifyGroupListEquals(ImList<GuideGroup> lst1, ImList<GuideGroup> lst2) {\n assertEquals(lst1.size(), lst2.size());\n for (int i=0; i<lst1.size(); ++i) verifyGroupEquals(lst1.get(i), lst2.get(i));\n }", "@Test\n public void getPersonsListTest() {\n \tHelloWorldImpl hello=new HelloWorldImpl();\n \tPersonList personInputList=new PersonList();\n \tList<PersonRequest> pl=new ArrayList<PersonRequest>();\n \tPersonRequest pr1=new PersonRequest();\n \tpr1.setName(\"Satish\");\n \tpr1.setSurname(\"Namdeo\");\n \tpr1.setLocation(\"Servicesource\");\n \tPersonRequest pr2=new PersonRequest();\n \tpr2.setName(\"Rahul\");\n \tpr2.setSurname(\"Jain\");\n \tpr2.setLocation(\"Bigdata\");\n \tpl.add(pr1);\n \tpl.add(pr2);\n \tpersonInputList.setPersonList(pl);\n \tPersonList actualResult=hello.getPersonsList(personInputList);\n \t//check for result is not empty.\n \tassertNotNull(\"Result is not null\",actualResult);\n \t\n \tPersonRequest pr3=new PersonRequest();\n \tpr1.setName(\"Sakhshi\");\n \tpr1.setSurname(\"Jain\");\n \tpr1.setLocation(\"Servicesource\");\n \tpl.add(pr3);\n \t\n \t//check for equality\n \tPersonRequest[] actualResultArray = actualResult.getPersonList().toArray(new PersonRequest[actualResult.getPersonList().size()]);\n \tPersonRequest[] expectedArray = pl.toArray(new PersonRequest[pl.size()]);\n \tassertArrayEquals(\"list elements are not equal\",expectedArray, actualResultArray);\n \t//System.out.println(\"personsListDisplayTest result : \"+result.getPersonList().size());\n }", "public interface IsChecklist extends ISelector, HasAssert<ChecklistAssert>, HasStartIndex {\n void select(String name);\n void select(String... names);\n <TEnum extends Enum<?>> void select(TEnum value);\n <TEnum extends Enum<?>> void select(TEnum... values);\n void select(int index);\n void select(int... indexes);\n\n void check(String... names);\n <TEnum extends Enum<?>> void check(TEnum value);\n <TEnum extends Enum<?>> void check(TEnum... values);\n void check(int index);\n void check(int... indexes);\n\n void checkAll();\n\n void uncheck(String... names);\n <TEnum extends Enum<?>> void uncheck(TEnum value);\n <TEnum extends Enum<?>> void uncheck(TEnum... values);\n void uncheck(int index);\n void uncheck(int... indexes);\n void uncheckAll();\n\n List<String> checked();\n}", "@Test\r\n public void testSearchShouldReturnTrueWhenValueIsPresent() {\r\n nestedList=new NestedList();\r\n boolean isPresent=nestedList.search(10);\r\n assertEquals(true,isPresent);\r\n }", "public interface ArmorFilter {\n List<Equipment> filter(List<Equipment> equipmentList);\n}" ]
[ "0.6292547", "0.62332475", "0.62332475", "0.62332475", "0.62332475", "0.62332475", "0.62332475", "0.6148472", "0.6148472", "0.6086999", "0.5968415", "0.5968415", "0.5968415", "0.5909059", "0.5907668", "0.57899386", "0.57772267", "0.5636031", "0.5585296", "0.55792654", "0.54576993", "0.53963315", "0.5264712", "0.5188339", "0.51818067", "0.5150192", "0.51420677", "0.51169", "0.5109685", "0.5105514", "0.5085466", "0.5056258", "0.49963695", "0.4995791", "0.49851137", "0.49851137", "0.4977228", "0.497397", "0.49689364", "0.4967106", "0.49486983", "0.4945616", "0.4932785", "0.49243367", "0.4911239", "0.48930985", "0.4891612", "0.4890365", "0.4884503", "0.48572868", "0.48527944", "0.4844829", "0.4839464", "0.48302114", "0.4829849", "0.47936082", "0.4785096", "0.47710776", "0.4765721", "0.47604862", "0.47570664", "0.47521216", "0.4739399", "0.47335982", "0.4694281", "0.46816915", "0.46481675", "0.46251917", "0.4625125", "0.462457", "0.4619076", "0.4592057", "0.4590269", "0.45807678", "0.4580102", "0.45720923", "0.45704436", "0.45678642", "0.45615378", "0.454504", "0.45419663", "0.454009", "0.45346916", "0.4533785", "0.45307484", "0.45272222", "0.45197323", "0.451522", "0.45079687", "0.4507702", "0.4504618", "0.44993925", "0.449731", "0.44930327", "0.4492718", "0.44908187", "0.44865102", "0.44848612", "0.44805756", "0.44708204" ]
0.66061306
0
This method determines if the element must be allowed to be on the list.
boolean accepts(T element);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isListValid()\n {\n boolean isValid = true;\n Collection<RecognizedElement> elementsList = tree.getChildren();\n for (Iterator<RecognizedElement> iterator = elementsList.iterator(); iterator.hasNext();)\n {\n RecognizedElement recognizedElement = (RecognizedElement) iterator.next();\n if (isSpreadsheet)\n {\n if (recognizedElement instanceof Style || recognizedElement instanceof Regex)\n {\n isValid = false;\n break;\n }\n }\n else\n {\n if (recognizedElement instanceof Column)\n {\n isValid = false;\n break;\n }\n }\n }\n return isValid;\n }", "public boolean isSetLegalList() {\n return this.legalList != null;\n }", "public boolean isListable();", "public static boolean checkElement(Element element) \n\t{\n\t\treturn LIST_OF_ELEMENT.containsValue(element);\n\t}", "public boolean isAllowed() {\n \t\treturn isAllowed;\n \t}", "public boolean canAdd() {\r\n int temp = 0;\r\n for (int i = 0; i < elem.length; i++) {\r\n if (elem[i] == null) {\r\n temp++;\r\n }\r\n }\r\n if (temp > 1) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "protected boolean isValid() {\n return COLLECTION.getList().contains(this);\n }", "private boolean mustAddElement(int element, List<Integer> featuresCombination)\n\t{\n\t\treturn featuresCombination.size() < maxRuleSize && featuresCombination.get(featuresCombination.size() - 1) < element;\n\t}", "private boolean isDecoratableList(Field field) {\n\t\tif (!List.class.isAssignableFrom(field.getType())) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Type erasure in Java isn't complete. Attempt to discover the generic\n\t\t// type of the list.\n\t\tType genericType = field.getGenericType();\n\t\tif (!(genericType instanceof ParameterizedType)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tType listType = ((ParameterizedType) genericType)\n\t\t\t\t.getActualTypeArguments()[0];\n\n\t\tif (!WebElement.class.equals(listType)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn (field.getAnnotation(UIMapKeyProvider.class) != null);\n\t}", "public boolean hasList() {\n return msgCase_ == 5;\n }", "public boolean hasList() {\n return msgCase_ == 5;\n }", "public boolean isInList();", "public boolean isLegal() {\n return !this.isBroken() && (this.getId() >= 0 || !this.isExisted());\n }", "public boolean isAllowed() {\n return isAllowed;\n }", "public boolean isList();", "public boolean isList();", "boolean hasList();", "private void checkList() {\n val list = config.getString(\"list\");\n val mode = config.getString(\"mode\");\n\n if (isNullOrEmpty(list)) {\n MovieHandler.Type type = MovieHandler.Type.valueOf(mode);\n\n if (type.equals(MovieHandler.Type.COMBINED) || type.equals(MovieHandler.Type.ADD_TO_WATCHLIST)) {\n throw new IllegalArgumentException(\"list is not set, but required for current mode!\");\n }\n } else {\n checkArgument(list.startsWith(\"ls\") || list.equals(\"watchlist\"), \"list doesn't start with ls prefix!\");\n checkArgument(list.length() >= 3, \"list string length less than 3!\");\n }\n }", "public boolean validate() {\n\n\t\tNoLista p = lista.validate();\n\t\tif(p==null){\n\t\t\treturn true; \n\t\t}else {\n\t\t\twhile(p!=null) {\n\t\t\t\tfor (int i = 0; i < ignore.length; i++) {\n\t\t\t\t\tif(ignore[i].equals(p.getInfo())) {\n\t\t\t\t\t\tretirar(p.getInfo());\n\t\t\t\t\t\taddList(p.getInfo());\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tp=p.getProximo();\n\t\t\t}\n\t\t\t\n\t\t\tif(this.lista.getPrimeiro()==null) {\n\t\t\t\treturn true;\n\t\t\t}else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "private boolean canEnlist() {\n\n return uiStateManager.getState().equals(GameUIState.WAVE_IN_PROGRESS)\n || uiStateManager.getState().equals(GameUIState.STANDBY);\n }", "boolean getIsList();", "boolean getIsList();", "public boolean supportsEmptyInList() {\n \t\treturn true;\n \t}", "@Override\n public boolean isValid() {\n return (27 - Inventory.getAll().length <= Inventory.find(\"Soft clay\").length)\n || (Inventory.find(\"Soft clay\").length < 1 || Inventory\n .find(\"Astral rune\").length < 1)\n && !Banking.isBankScreenOpen()\n && GlassBlower.antiban.canInteractObject();\n }", "public boolean isList() {\n return m_item.getSchemaComponent().type() == SchemaBase.LIST_TYPE;\n }", "abstract boolean allowedToAdd(Card card);", "private boolean canAddSupport() {\n\n return uiStateManager.getState().equals(GameUIState.WAVE_IN_PROGRESS)\n || uiStateManager.getState().equals(GameUIState.STANDBY);\n }", "boolean canRemove();", "public void testIsStylePermittedInElement() throws Exception {\n assertFalse(cfg.isStylePermittedInElement(\"test\"));\n assertFalse(cfg.isStylePermittedInElement(\"d1\"));\n assertFalse(cfg.isStylePermittedInElement(\"ind1\"));\n assertFalse(cfg.isStylePermittedInElement(\"ind2\"));\n\n cfg.associateStylisticAndAntiElements(\"test\", \"anti-test\",\n permittedChildren);\n cfg.addDivisibleElementsThatPermitStyles(new String[] {\"d1\"});\n cfg.addIndivisibleElementsThatPermitStyles(\n new String[] {\"ind1\", \"ind2\"});\n\n assertTrue(cfg.isStylePermittedInElement(\"test\"));\n assertTrue(cfg.isStylePermittedInElement(\"d1\"));\n assertTrue(cfg.isStylePermittedInElement(\"ind1\"));\n assertTrue(cfg.isStylePermittedInElement(\"ind2\"));\n\n assertFalse(cfg.isStylePermittedInElement(\"anti-test\"));\n assertFalse(cfg.isStylePermittedInElement(\"child\"));\n assertFalse(cfg.isStylePermittedInElement(\"TEST\"));\n assertFalse(cfg.isStylePermittedInElement(\"D1\"));\n }", "public boolean isCompliedWith(MModelElement modelElement) {\n\n\t\t//The now possible range is All that's no restriction, so I don't need to check this.\n\n\t\t// check base class\n\t\tif (!BaseClasses.objectMatchsType(modelElement, this.getBaseClass())) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn super.isCompliedWith(modelElement);\n\t}", "public boolean contains(T elem) {\n return list.contains(elem);\n }", "boolean hasConditionList();", "boolean elementSupports(Object elementID, int elementConstant) throws Exception;", "private static boolean canEasyAdd( List<ProductPrice> currentList, ProductPrice iter) {\n\t\treturn currentList.get(0).start.after(iter.end) || currentList.get(currentList.size()-1).end.before(iter.start) ; \r\n\t}", "public boolean isAllowed(EnumFacing side) {\n return allowed.contains(side);\n }", "@Override\n public boolean isValid() {\n return isAdded() && !isDetached();\n }", "@Override\r\n protected boolean canEdit(Object element) {\n return true;\r\n }", "private static boolean checkOrderList() {\n if (size != MainGUI.orderList.size()) {\n size = MainGUI.orderList.size();\n return true;\n }\n\n return false;\n }", "private boolean checkforCreating(Object element) {\n\t\tif (element == null) {\n\t\t\treturn false;\n\t\t}\n\t\tif (element instanceof Entity) {\n\t\t\tEntity entity = (Entity) element;\n\t\t\tObject entitryValue = entity.getValue(\"autocreate\");\n\t\t\tif (entitryValue != null && entitryValue instanceof Boolean) {\n\t\t\t\treturn (Boolean) entitryValue;\n\t\t\t}\n\t\t}\n\t\tif (element instanceof List<?>) {\n\t\t\tList<?> collection = (List<?>) element;\n\t\t\tfor (Object item : collection) {\n\t\t\t\tif (checkforCreating(item)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override\n\t\tpublic boolean isValid() {\n\t\t\treturn false;\n\t\t}", "public boolean isAllowedWithPerson() {\n return allowedState.contains(States.WITH_PERSON);\n }", "private void chk() {\n if (clist != null)\n throw new UnsupportedOperationException();\n }", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean isValid() {\n\t\treturn false;\r\n\t}", "private boolean isActionValid(List<Integer> list,List<Integer> list2) {\n\t\tint sum = listElementSum(sumLists(list,list2));\n\t\tif (sum>ventureManager.getMaxManufacturingFunds()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isValidSubList(Object fieldValue) {\n return fieldValue != null\n && AbstractPersistentCollection.class.isAssignableFrom(fieldValue.getClass());\n }", "private boolean validateList(NodeList list, String error) {\n\t\tif (list == null || list.getLength() == 0) {\n\t\t\tCommonUITool.openErrorBox(error);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@ApiStatus.Internal\n default boolean isListable() {\n \n return false;\n }", "@Override\r\n public boolean canAddElement( int type ) {\n return type == Controller.GLOBAL_STATE;\r\n }", "public void verifyBugerList()\n\t{\n\t\t\n\t}", "private boolean isAllowed(ProcessInstance instance) {\r\n return true; // xoxox\r\n }", "public boolean isGroupPossible()\n\t\t{\n\t\t\treturn this.m_allowedAddGroupRefs != null && ! this.m_allowedAddGroupRefs.isEmpty();\n\n\t\t}", "private boolean hasCertainlyNoScheduleList(DataModelNetworkElement networkElement) {\r\n\t\t\r\n\t\tEomModelType eomModelType = this.getEomModelType(networkElement.getDataModelStorageSettings());\r\n\t\tif (eomModelType==null) {\r\n\t\t\t// --- We don't know here - maybe an old style handling? ----------\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tboolean isNoScheduleList = false;\r\n\r\n\t\tswitch (eomModelType) {\r\n\t\tcase TechnicalSystem:\r\n\t\t\tisNoScheduleList = true;\r\n\t\t\tbreak;\r\n\t\tcase ScheduleList:\r\n\t\t\tisNoScheduleList = false;\r\n\t\t\tbreak;\r\n\t\tcase TechnicalSystemGroup:\r\n\t\t\t// --- An aggregation may contain ScheduleList's also ------------- \r\n\t\t\tisNoScheduleList = false;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn isNoScheduleList;\r\n\t}", "public abstract boolean isRestricted();", "public boolean canAdd(UnitType unitType) {\n return workPlaces > 0\n && unitType.hasSkill()\n && unitType.getSkill() >= minSkill\n && unitType.getSkill() <= maxSkill;\n }", "@Model\n\tprotected boolean noObjectMovementBlocking(List<Object> list) {\n\t\tif (this instanceof Plant) return true;\n\t\t\n\t\tfor(Object element : list) {\n\t\t\tif (!(element instanceof Plant)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean someLegalPos() {\n return !legalPos.isEmpty();\n }", "private boolean isAvailable() {\n\t\tfor (int i = 0; i < lawsuitsAsClaimant.size(); i++) {\n\t\t\tif (lawsuitsAsClaimant.get(i).isActive()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check lawsuits as Defendant\n\t\tfor (int i = 0; i < lawsuitsAsDefendant.size(); i++) {\n\t\t\tif (lawsuitsAsDefendant.get(i).isActive()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isPossibleToadd() {\n if (capacity == storage) {\n return false;\n } else {\n return true;\n }\n }", "boolean isHiddenFromList();", "private static boolean acceptsList(Automaton type, Automaton.Term tState, Automaton automaton, Automaton.List aList,\n\t\t\tSchema schema, BinaryMatrix assumptions) {\n\t\tAutomaton.List list = (Automaton.List) type.get(tState.contents);\n\t\tAutomaton.Collection collection = (Automaton.Collection) type.get(list\n\t\t\t\t.get(1));\n\t\tint unboundedIndex = list.get(0);\n\t\tAutomaton.Term unbounded = (Automaton.Term) type.get(unboundedIndex);\n\t\tboolean isUnbounded = unbounded.kind != Types.K_Void;\n\n\t\t// The minimum expected size of the collection. In the case of a bounded\n\t\t// collection, this is exactly the size of the collection. For an\n\t\t// unbounded collection, it is one less since the last element\n\t\t// represents zero or more elements.\n\t\tint minSize = collection.size();\n\n\t\tif (aList.size() < minSize || (!isUnbounded && minSize != aList.size())) {\n\t\t\t// collection is not big enough.\n\t\t\treturn false;\n\t\t}\n\n\t\t// Now, attempt to match all the requested items. Each match is loaded\n\t\t// into matches in order to prevent double matching of the same item.\n\t\tfor (int i = 0; i != minSize; ++i) {\n\t\t\tint tItem = collection.get(i);\n\t\t\tint aItem = aList.get(i);\n\t\t\tif (!accepts(type, tItem, automaton, aItem, schema, assumptions)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Finally, for an unbounded match we need to match all other items\n\t\t// against the remainder.\n\t\tif (isUnbounded) {\n\t\t\tfor (int j = minSize; j != aList.size(); ++j) {\n\t\t\t\tint aItem = aList.get(j);\n\t\t\t\tif (!accepts(type, unboundedIndex, automaton, aItem, schema, assumptions)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If we get here, we're done.\n\n\t\treturn true;\n\t}", "public abstract boolean isAssignable();", "public boolean canAttackWithItem() {\n/* 253 */ return false;\n/* */ }", "private Boolean checkForEmptyList() {\n Boolean emptyListAvailable = tin_perLitrePrice.getText().toString().trim().isEmpty() ||\n tin_fuelQuantityLitres.getText().toString().trim().isEmpty() ||\n tin_totalFuelPrice.getText().toString().trim().isEmpty() ||\n tin_currentKm.getText().toString().trim().isEmpty() ||\n tin_startingKm.getText().toString().trim().isEmpty() ||\n tin_distanceCovered.getText().toString().trim().isEmpty() ||\n tv_calculatedAverage_addEdit.getText().toString().trim().isEmpty() ||\n tv_coverableDistance_addEdit.getText().toString().trim().isEmpty() ||\n tv_nextFuelFill_addEdit.getText().toString().trim().isEmpty();\n\n if (emptyListAvailable) {\n validationList(); // set error messages\n }\n Log.d(TAG, \"checkForEmptyList: emptyListAvailable = \" + emptyListAvailable);\n\n\n return emptyListAvailable; //\n }", "private static boolean IsAtListItemStart(ITextPointer position)\r\n { \r\n // Check for empty ListItem case\r\n if (typeof(ListItem).IsAssignableFrom(position.ParentType) && \r\n position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && \r\n position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd)\r\n { \r\n return true;\r\n }\r\n\r\n while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) \r\n {\r\n Type parentType = position.ParentType; \r\n if (TextSchema.IsBlock(parentType)) \r\n {\r\n if (TextSchema.IsParagraphOrBlockUIContainer(parentType)) \r\n {\r\n position = position.GetNextContextPosition(LogicalDirection.Backward);\r\n if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&\r\n typeof(ListItem).IsAssignableFrom(position.ParentType)) \r\n {\r\n return true; \r\n } \r\n }\r\n return false; \r\n }\r\n position = position.GetNextContextPosition(LogicalDirection.Backward);\r\n }\r\n return false; \r\n }", "public boolean isValid() {\n\t\tif (!super.isValid()) {\n\t\t\treturn false;\n\t\t}\n\t\tif (mKey == null)\n\t\t\treturn false;\n\t\tif (mItems == null)\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isDropOk () {\n\t\treturn isAllowed ( selectedAttribute ) ;\n\t}", "public boolean isRestricted() {\n return restricted || getFlow().getRestriction() != null;\n }", "ImmutableList<SchemaOrgType> getIsPartOfList();", "public boolean isValidItem() {\n return validItem;\n }", "public boolean isAllowedWeapon(Material mat)\r\n\t{\treturn this.allowedWeapons.contains(mat);\t}", "public boolean canModify(Object element, String property) {\r\n\t // Allow editing of all values\r\n\t return true;\r\n\t }", "public boolean isAllowed(Player owner, Item item) {\r\n if (item.getValue() > 50000) {\r\n owner.getActionSender().sendMessage(\"This item is too valuable to trust to this familiar.\");\r\n return false;\r\n }\r\n if (!item.getDefinition().isTradeable()) {\r\n owner.getActionSender().sendMessage(\"You can't trade this item, not even to your familiar.\");\r\n return false;\r\n }\r\n if (!owner.getFamiliarManager().getFamiliar().getDefinition().getName().toLowerCase().contains(\"abyssal\")) {\r\n if (item.getId() == 1436 || item.getId() == 7936 || !item.getDefinition().getConfiguration(ItemConfiguration.BANKABLE, true)) {\r\n owner.getActionSender().sendMessage(\"You can't store \" + item.getName().toLowerCase() + \" in this familiar.\");\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public boolean isWhitelisted(Range<Integer> range) {\n return this.meta.encloses(range);\n }", "private boolean checkSpaceAvailability(Point targetLocation, ICityFragment element) {\r\n //basic constraint:no other things here\r\n\r\n if (city.isAnythingHere(targetLocation, element.getBoundary().width, element.getBoundary().height, element)) {\r\n return false;\r\n }\r\n\r\n //crossroads:at least one road can connected\r\n if (element instanceof Crossroads) {\r\n var crossroad = (Crossroads) element;\r\n\r\n var accessibleRoad = findAccessibleRoads(crossroad, targetLocation);\r\n\r\n if (accessibleRoad == null || accessibleRoad.size() <= 1) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public boolean isWhitelisted ( ) {\n\t\treturn extract ( handle -> handle.isWhitelisted ( ) );\n\t}", "@Override\n\tpublic boolean isItemValid(ItemStack stack) {\n\t\treturn true;\n\t}", "public boolean canProvideEquipment(List<EquipmentType> equipment) {\n for (EquipmentType e : equipment) {\n if (!canProvideEquipment(e)) return false;\n }\n return true;\n }", "public boolean isAllowedArmor(Material mat)\r\n\t{\treturn this.allowedArmor.contains(mat);\t}", "public boolean match( ListExp p ) { return false; }", "public boolean isList() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: sastore \n // 1: ladd \n // LocalVariableTable:\n // Start Length Slot Name Signature\n // ----- ------ ---- ---- ------------------------------------------\n // 0 2 0 this Lcom/sun/xml/xsom/impl/ListSimpleTypeImpl;\n // \n // The error that occurred was:\n // \n // java.lang.ArrayIndexOutOfBoundsException\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }", "boolean isListRemainingEmpty();", "public boolean action_allowed(){\r\n\t\treturn action_holds.size()==0;\r\n\t}", "protected boolean checkAssignable(ErrorList errlist)\n throws CompilerException\n {\n return true;\n }", "private static boolean m87480a(Object obj) {\n if (!(obj instanceof List)) {\n obj = null;\n }\n List list = (List) obj;\n if (list != null && !C6307b.m19566a((Collection<T>) list) && (list.get(0) instanceof Word)) {\n return true;\n }\n return false;\n }", "private boolean contains(Object annotationType, Set allowed, Set configured) {\n \t\tif (allowed.contains(annotationType))\n \t\t\treturn true;\n \n \t\tboolean covered= isCovered(annotationType, configured);\n \t\tif (covered)\n \t\t\tallowed.add(annotationType);\n \n \t\treturn covered;\n \t}", "public boolean canPlaceEntity() {\n boolean blocked = this.mapCoordinatesForEntityToPlace.stream().anyMatch(c -> c.placeableState == PlaceableState.BLOCKED);\n if (blocked) return false;\n\n return this.mapCoordinatesForEntityToPlace.stream().anyMatch(c -> c.placeableState == PlaceableState.PLACEABLE);\n }", "public boolean isList(String key)\n {\n return getList(key, null) != null;\n }", "boolean isSetRaceList();", "boolean isSetListOfServiceElements();", "public boolean isLegal() {\r\n\r\n return( isLegalRow() && isLegalCol() );\r\n }", "public abstract boolean isUsable();", "public boolean canAttackWithItem() {\n/* 215 */ return false;\n/* */ }", "@Override\r\n\tpublic boolean contains(T element) {\n\t\treturn false;\r\n\t}", "public boolean validate() {\n\t\tboolean rv = true;\n\t\tsynchronized (list) {\n\t\t\tfor (Pooled<T> t : list) {\n\t\t\t\tif (!creator.isValid(t.content)) {\n\t\t\t\t\trv = false;\n\t\t\t\t\tt.toss();\n\t\t\t\t\tlist.remove(t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}", "public boolean isNilLimit()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlNonNegativeInteger target = null;\r\n target = (org.apache.xmlbeans.XmlNonNegativeInteger)get_store().find_element_user(LIMIT$6, 0);\r\n if (target == null) return false;\r\n return target.isNil();\r\n }\r\n }", "public boolean canOfferInsurance() {\n\t\treturn this.hand.getCards().get(0) == Card.ACE;\n\t}", "public boolean isValid()\r\n {\r\n //Override this method in MediaItem object\r\n return getSemanticObject().getBooleanProperty(swb_valid,false);\r\n }" ]
[ "0.67566437", "0.63818616", "0.63728774", "0.627167", "0.61609596", "0.6119033", "0.6116424", "0.6103427", "0.6037868", "0.60309386", "0.60275775", "0.6027553", "0.5922064", "0.5920374", "0.59139097", "0.59139097", "0.58763474", "0.58712447", "0.58693606", "0.585192", "0.5821016", "0.5821016", "0.5816916", "0.5805716", "0.5799558", "0.5746242", "0.57352644", "0.5730111", "0.5708965", "0.569524", "0.5682397", "0.5681234", "0.56717646", "0.5671313", "0.5664918", "0.5662595", "0.56461537", "0.56411254", "0.5631418", "0.562985", "0.56209064", "0.56148213", "0.55858123", "0.55858123", "0.55858123", "0.55714154", "0.556587", "0.55623543", "0.5559869", "0.5528811", "0.5526521", "0.5507971", "0.55047125", "0.5500871", "0.54978037", "0.54958767", "0.549231", "0.5486556", "0.5479755", "0.5475773", "0.5474434", "0.54623747", "0.54608846", "0.5449568", "0.5445294", "0.54429394", "0.5439273", "0.54391944", "0.5429247", "0.54218227", "0.54206216", "0.5417473", "0.5413793", "0.5411866", "0.54045933", "0.54032487", "0.5401976", "0.5401617", "0.53968567", "0.53935343", "0.5391384", "0.5387629", "0.5372795", "0.5371244", "0.53566873", "0.5346", "0.53435975", "0.5336575", "0.5335746", "0.5333957", "0.5333279", "0.53267205", "0.5324741", "0.53204936", "0.53132415", "0.5309071", "0.5307188", "0.5305998", "0.5300029", "0.5299862" ]
0.5391083
81
list of IP during boot up
ManagePool(List DefaultList,List AllocList) { this.DefaultList = DefaultList; this.AllocList = AllocList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String [] getIpList() {\n return this.IpList;\n }", "org.jacorb.imr.HostInfo[] list_hosts();", "public void remplireListeIp(){\r\n bddIp.add(\"id\");\r\n bddIp.add(\"ip\");\r\n bddIp.add(\"nom\");\r\n bddIp.add(\"latence\");\r\n bddIp.add(\"etat\");\r\n bddIp.add(\"popup\");\r\n bddIp.add(\"mac\");\r\n bddIp.add(\"bdext_perte\");\r\n bddIp.add(\"port\");\r\n }", "public void setIpList(String [] IpList) {\n this.IpList = IpList;\n }", "public List<String> getAddresses() {\n return mIPs;\n }", "List<String> getHosts();", "public static String ipstatic() {\n String ips = ROOT_URL;\n return ips;\n }", "public String [] getPublicIpAddresses() {\n return this.PublicIpAddresses;\n }", "public void bootStrapNodes(String nodeList) throws UnknownHostException\n {\n ssProxy.loadAll(nodeList);\n }", "public static List<String> getHardwareAddresses() {\r\n\t\tList<String> result = new Vector<String>();\r\n\t\ttry {\r\n\t\t\tEnumeration<NetworkInterface> nis = NetworkInterface.getNetworkInterfaces();\r\n\t\t\tif (nis != null) {\r\n\t\t\t\twhile (nis.hasMoreElements()) {\r\n\t\t\t\t\tbyte[] mac = nis.nextElement().getHardwareAddress();\r\n\t\t\t\t\tif ((mac != null) && (mac.length == 6)) {\r\n\t\t\t\t\t\tresult.add(getHardwareAddressAsString(mac));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (SocketException e) {\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public List<String> getAddresses() throws RemoteException {\n\t\tList<String> addresses = new ArrayList<String>();\n\t\tif (this.registry != null) {\n\t\t\tfor (IServer server : this.serverList.getServers()) {\n\t\t\t\taddresses.add(server.getFullAddress());\n\t\t\t}\n\t\t}\n\t\treturn addresses;\n\t}", "private static void init() {\n\t\ttry {\n\t\t\tlocalAddr = InetAddress.getLocalHost();\n\t\t\tlogger.info(\"local IP:\" + localAddr.getHostAddress());\n\t\t} catch (UnknownHostException e) {\n\t\t\tlogger.info(\"try again\\n\");\n\t\t}\n\t\tif (localAddr != null) {\n\t\t\treturn;\n\t\t}\n\t\t// other way to get local IP\n\t\tEnumeration<InetAddress> localAddrs;\n\t\ttry {\n\t\t\t// modify your network interface name\n\t\t\tNetworkInterface ni = NetworkInterface.getByName(networkInterface);\n\t\t\tif (ni == null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlocalAddrs = ni.getInetAddresses();\n\t\t\tif (localAddrs == null || !localAddrs.hasMoreElements()) {\n\t\t\t\tlogger.error(\"choose NetworkInterface\\n\" + getNetworkInterface());\n\t\t\t\treturn;\n\t\t\t}\n\t\t\twhile (localAddrs.hasMoreElements()) {\n\t\t\t\tInetAddress tmp = localAddrs.nextElement();\n\t\t\t\tif (!tmp.isLoopbackAddress() && !tmp.isLinkLocalAddress() && !(tmp instanceof Inet6Address)) {\n\t\t\t\t\tlocalAddr = tmp;\n\t\t\t\t\tlogger.info(\"local IP:\" + localAddr.getHostAddress());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Failure when init ProxyUtil\", e);\n\t\t\tlogger.error(\"choose NetworkInterface\\n\" + getNetworkInterface());\n\t\t}\n\t}", "public static void getNetworkIPs() throws ConnectException{\n\t final byte[] ip;\n\t \n\t try {\n\t \t// Stores IP address of this computer in the array\n\t ip = InetAddress.getLocalHost().getAddress();\n\t\t} \n\t\tcatch (Exception e) {\n\t \te.printStackTrace();\n\t return;\n\t }\n\t \n\t // Checks each IP address, replacing fourth set of numbers \n\t // in this computer's IP address with values from 1 - 255\n\t for(int i = 1; i < 255; i++) {\n\t final int j = i;\n\t new Thread(new Runnable() {\n\t public void run() {\n\t try {\n\t \t// Checks if this IP address is reachable\n\t ip[3] = (byte) j;\n\t InetAddress address = InetAddress.getByAddress(ip);\n\t String output = address.toString().substring(1);\n\t \n\t // Prints out IP address only if it is reachable\n\t if (address.isReachable(1717)) {\n\t System.out.println(output + \" is on the network\");\n\t }\n\t\t\t\t\t} \n\t\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t }\n\t }\n\t }).start(); \n\t }\n\t}", "private void init() {\n\t\t/* Add the DNS of your database instances here */\n\t\tdatabaseInstances[0] = \"ec2-52-0-167-69.compute-1.amazonaws.com\";\n\t\tdatabaseInstances[1] = \"ec2-52-0-247-64.compute-1.amazonaws.com\";\n\t}", "public static void main(String[] args) {\n\t\tString input = \"19216811\";\n\t\tList<String> result = restoreIpAddresses(input);\n\t}", "public static String[] portListVul(){\n String [] infoVuln = {\"\"}; \n return infoVuln;\n }", "@Override\n public List<String> ipToIdLookup(List<String> ips)\n {\n log.info(\"Asked IPs -> IDs for: [%s]\", String.join(\",\", ips));\n\n if (ips.isEmpty()) {\n return new ArrayList<>();\n }\n\n // If the first one is not an IP, just assume all the other ones are not as well and just\n // return them as they are. This check is here because Druid does not check if IPs are\n // actually IPs and can send IDs to this function instead\n if (!InetAddresses.isInetAddress(ips.get(0))) {\n log.debug(\"Not IPs, doing nothing\");\n return ips;\n }\n\n final String project = envConfig.getProjectId();\n final String zone = envConfig.getZoneName();\n try {\n Compute computeService = createComputeService();\n Compute.Instances.List request = computeService.instances().list(project, zone);\n // Cannot filter by IP atm, see below\n // request.setFilter(GceUtils.buildFilter(ips, \"networkInterfaces[0].networkIP\"));\n\n List<String> instanceIds = new ArrayList<>();\n InstanceList response;\n do {\n response = request.execute();\n if (response.getItems() == null) {\n continue;\n }\n for (Instance instance : response.getItems()) {\n // This stupid look up is needed because atm it is not possible to filter\n // by IP, see https://issuetracker.google.com/issues/73455339\n for (NetworkInterface ni : instance.getNetworkInterfaces()) {\n if (ips.contains(ni.getNetworkIP())) {\n instanceIds.add(instance.getName());\n }\n }\n }\n request.setPageToken(response.getNextPageToken());\n } while (response.getNextPageToken() != null);\n\n log.debug(\"Converted to [%s]\", String.join(\",\", instanceIds));\n return instanceIds;\n }\n catch (Exception e) {\n log.error(e, \"Unable to convert IPs to IDs.\");\n }\n\n return new ArrayList<>();\n }", "java.util.List<java.lang.String>\n getBootclasspathList();", "private static void getServerIPAddress() {\r\n // Get local IP address\r\n try {\r\n Enumeration<NetworkInterface> enumeratedNetworkInterface = NetworkInterface.getNetworkInterfaces();\r\n\r\n NetworkInterface networkInterface;\r\n Enumeration<InetAddress> enumeratedInetAddress;\r\n InetAddress inetAddress;\r\n\r\n for (; enumeratedNetworkInterface.hasMoreElements(); ) {\r\n networkInterface = enumeratedNetworkInterface.nextElement();\r\n enumeratedInetAddress = networkInterface.getInetAddresses();\r\n\r\n for (; enumeratedInetAddress.hasMoreElements(); ) {\r\n inetAddress = enumeratedInetAddress.nextElement();\r\n String anIPAddress = inetAddress.getHostAddress();\r\n if (log.isDebugEnabled()) {\r\n log.debug(\"Scanning local IP space: \" + anIPAddress);\r\n }\r\n\r\n // exclude loop-back and MAC address\r\n if (!(anIPAddress.equals(\"127.0.0.1\") || anIPAddress.contains(\":\")))\r\n localIPAddress = anIPAddress;\r\n }\r\n }\r\n } catch (Exception e) {\r\n log.error(\"Error in retrieving the local IP address: \" + e.toString());\r\n }\r\n }", "java.util.List<java.lang.String>\n getBootclasspathList();", "@ZAttr(id=562)\n public String[] getVirtualIPAddress() {\n return getMultiAttr(Provisioning.A_zimbraVirtualIPAddress);\n }", "private void setupconfigIpCPoints() {\n for (int i = 1; i <= 3; i++) {\n ConnectPoint connectPoint = new ConnectPoint(\n getDeviceId(i),\n PortNumber.portNumber(1));\n configIpCPoints.add(connectPoint);\n }\n }", "@Override\n\tpublic void BootStrapNode(String ip) throws RemoteException {\n\t\tnodeIp = ip;\n\t\thasNeighbours = true;\n\t}", "public ObservableList<Task> getIpList() {\n return ipList;\n }", "@Test\r\n\tpublic void testGetIPList(){\r\n\t\tList<IP> lst = new ArrayList<IP>();\r\n\t\tlst = ipService.getIPLst();\r\n\t\tSystem.out.println(\"==>ip list:\"+JSON.toJSONString(lst));\r\n\t}", "public void list() {\r\n\t\tfor (String key : nodeMap.keySet()) {\r\n\t\t\tNodeRef node = nodeMap.get(key);\r\n\t\t\tSystem.out.println(node.getIp() + \" : \" + node.getPort());\r\n\t\t}\t\t\r\n\t}", "void init(){\n \tRootServers = new String[15];\r\n RootServers[0] = \"198.41.0.4\";\r\n RootServers[1] = \"199.9.14.201\";\r\n RootServers[2] = \"192.33.4.12\";\r\n RootServers[3] = \"199.7.91.13[\";\r\n RootServers[4] = \"192.203.230.10\";\r\n RootServers[5] = \"192.5.5.241\";\r\n RootServers[6] = \"192.112.36.4\";\r\n RootServers[7] = \"198.97.190.53\";\r\n RootServers[8] = \"192.36.148.17\";\r\n RootServers[9] = \"192.58.128.30\";\r\n RootServers[10] = \"193.0.14.129\";\r\n RootServers[11] = \"199.7.83.42\";\r\n RootServers[12] = \"202.12.27.33\";\r\n }", "@Override\n\tpublic List<VIP> findAllVIP() {\n\t\treturn vb.findAll();\n\t}", "private static void getAllReplicaAddress(String fileName) throws IOException {\n\n\t\tSystem.out.println(\"Working Directory = \" +\n\t System.getProperty(\"user.dir\"));\n\t\tBufferedReader br = new BufferedReader(new FileReader(fileName));\n\t\ttry {\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t while(line!=null && !line.trim().equals(\"\")) {\n\t\t \tallReplicaAddrs.add(line);\n\t\t \tline = br.readLine();\n\t\t }\n\t\t \n\t\t} finally {\n\t\t br.close();\n\t\t}\n\t}", "java.util.List<com.google.cloud.compute.v1.NetworkInterface> getNetworkInterfacesList();", "public Vector<NetworkAddress> getHostAddresses() { return hostAddresses; }", "private void initList() {\n long now = System.nanoTime();\n loadConfig();\n SlogEx.d(TAG, \"load config use:\" + (System.nanoTime() - now));\n }", "public final List<InetAddress> mo8904a(String str) {\n if (str != null) {\n return Arrays.asList(InetAddress.getAllByName(str));\n }\n throw new UnknownHostException(\"hostname == null\");\n }", "public List<Integer> getAddrList() {\n\t\treturn this.addrList;\r\n\t}", "public static int hdhomerun_local_ip_info(hdhomerun_local_ip_info_t ip_info_list[], int max_count)\r\n\t{\r\n\t\tint count = 0;\r\n\t\t\r\n \ttry {\r\n \t\tfor(Enumeration<NetworkInterface> list = NetworkInterface.getNetworkInterfaces(); list.hasMoreElements();)\r\n\t\t\t{\r\n\t\t\t \tNetworkInterface i = list.nextElement();\r\n\t\t\t \tfor(Enumeration<InetAddress> adds = i.getInetAddresses(); adds.hasMoreElements(); ) {\r\n\t\t\t \tInetAddress a = adds.nextElement(); \r\n\t\t\t \t\r\n\t\t\t \tint subnet = ShiftSubnetBitsInt(24);\r\n\t\t\t \tif(a.isLoopbackAddress() || a.getHostAddress().equals(\"255.255.255.255\") || a.getHostAddress().equals(\"0.0.0.0\"))\r\n\t\t\t \t\tcontinue;\r\n\t\t\t \t\r\n\t\t\t \t// only ipv4\r\n\t\t\t \tif(a.getAddress().length > 4)\r\n\t\t\t \t\tcontinue;\r\n\t\t\t \t\r\n\t\t\t \tip_info_list[count] = new hdhomerun_local_ip_info_t();\r\n\t\t\t \tip_info_list[count].ip_addr = IPAddr_BytesToInt(a.getAddress());\r\n\t\t\t \tip_info_list[count++].subnet_mask = subnet;\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t} catch (SocketException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t return count;\r\n\t}", "@Override\n public List<String> idToIpLookup(List<String> nodeIds)\n {\n log.info(\"Asked IDs -> IPs for: [%s]\", String.join(\",\", nodeIds));\n\n if (nodeIds.isEmpty()) {\n return new ArrayList<>();\n }\n\n final String project = envConfig.getProjectId();\n final String zone = envConfig.getZoneName();\n\n try {\n Compute computeService = createComputeService();\n Compute.Instances.List request = computeService.instances().list(project, zone);\n request.setFilter(GceUtils.buildFilter(nodeIds, \"name\"));\n\n List<String> instanceIps = new ArrayList<>();\n InstanceList response;\n do {\n response = request.execute();\n if (response.getItems() == null) {\n continue;\n }\n for (Instance instance : response.getItems()) {\n // Assuming that every server has at least one network interface...\n String ip = instance.getNetworkInterfaces().get(0).getNetworkIP();\n // ...even though some IPs are reported as null on the spot but later they are ok,\n // so we skip the ones that are null. fear not, they are picked up later this just\n // prevents to have a machine called 'null' around which makes the caller wait for\n // it for maxScalingDuration time before doing anything else\n if (ip != null && !\"null\".equals(ip)) {\n instanceIps.add(ip);\n } else {\n // log and skip it\n log.warn(\"Call returned null IP for %s, skipping\", instance.getName());\n }\n }\n request.setPageToken(response.getNextPageToken());\n } while (response.getNextPageToken() != null);\n\n return instanceIps;\n }\n catch (Exception e) {\n log.error(e, \"Unable to convert IDs to IPs.\");\n }\n\n return new ArrayList<>();\n }", "private static String[] getServerAddress(String p_78863_0_) {\n/* */ try {\n/* 87 */ String var1 = \"com.sun.jndi.dns.DnsContextFactory\";\n/* 88 */ Class.forName(\"com.sun.jndi.dns.DnsContextFactory\");\n/* 89 */ Hashtable<Object, Object> var2 = new Hashtable<>();\n/* 90 */ var2.put(\"java.naming.factory.initial\", \"com.sun.jndi.dns.DnsContextFactory\");\n/* 91 */ var2.put(\"java.naming.provider.url\", \"dns:\");\n/* 92 */ var2.put(\"com.sun.jndi.dns.timeout.retries\", \"1\");\n/* 93 */ InitialDirContext var3 = new InitialDirContext(var2);\n/* 94 */ Attributes var4 = var3.getAttributes(\"_minecraft._tcp.\" + p_78863_0_, new String[] { \"SRV\" });\n/* 95 */ String[] var5 = var4.get(\"srv\").get().toString().split(\" \", 4);\n/* 96 */ return new String[] { var5[3], var5[2] };\n/* */ }\n/* 98 */ catch (Throwable var6) {\n/* */ \n/* 100 */ return new String[] { p_78863_0_, Integer.toString(25565) };\n/* */ } \n/* */ }", "public String getUpnpExternalIpaddress();", "public NetworkInstance[] getServers();", "protected abstract void discoverIpInterfaces(Host host, List<IpInterface> oldIpInterfaces);", "public List<String> restoreIpAddresses(String s) {\n List<String> list = new ArrayList<>();\n backtrack(list, \"\", s, 0, 0);\n return list;\n }", "public static String[] getAllPrivateAddress() {\n\t\tArrayList<String> a = new ArrayList<String>();\n\t\ttry {\n\t\t\tEnumeration<NetworkInterface> enums = NetworkInterface.getNetworkInterfaces();\n\t\t\twhile (enums.hasMoreElements()) {\n\t\t\t\tNetworkInterface ni = enums.nextElement();\n\t\t\t\tEnumeration<InetAddress> hosts = ni.getInetAddresses();\n\t\t\t\twhile (hosts.hasMoreElements()) {\n\t\t\t\t\tInetAddress local = hosts.nextElement();\n\t\t\t\t\tString localIP = local.getHostAddress();\n\t\t\t\t\tif (IP4Style.isPrivateIP(localIP)) {\n\t\t\t\t\t\ta.add(localIP);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (SocketException exp) {\n\n\t\t}\n\t\tif(a.isEmpty()) return null;\n\t\tString[] all = new String[a.size()];\n\t\treturn a.toArray(all);\n\t}", "@Override\n public List<Address> getInterfaceAddresses() {\n List<Address> output = new ArrayList<>();\n\n Enumeration<NetworkInterface> ifaces;\n try {\n ifaces = NetworkInterface.getNetworkInterfaces();\n } catch (SocketException e) {\n // If we could not retrieve the network interface list, we\n // probably can't bind to any interface addresses either.\n return Collections.emptyList();\n }\n\n for (NetworkInterface iface : Collections.list(ifaces)) {\n // List the addresses associated with each interface.\n Enumeration<InetAddress> addresses = iface.getInetAddresses();\n for (InetAddress address : Collections.list(addresses)) {\n try {\n // Make an address object from each interface address, and\n // add it to the output list.\n output.add(Address.make(\"zmq://\" + address.getHostAddress() + \":\" + port));\n } catch (MalformedAddressException ignored) {\n // Should not be reachable.\n }\n }\n }\n\n return output;\n }", "@Override\n\tpublic Collection<InetSocketAddress> getAvaliableServers() {\n\t\treturn null;\n\t}", "public List<DnsARdata> getIpAddresses() {\n return ipAddresses;\n }", "@Override\n public List<String> getDnsServerAddresses()\n {\n final List<String> servers = new ArrayList<>();\n final Network network = getActiveNetwork();\n if (network == null) {\n return null;\n }\n\n LinkProperties linkProperties = connectivityManager.getLinkProperties(network);\n if (linkProperties == null) {\n return null;\n }\n\n int vpnOffset = 0;\n final NetworkInfo networkInfo = connectivityManager.getNetworkInfo(network);\n final boolean isVpn = networkInfo != null && networkInfo.getType() == ConnectivityManager.TYPE_VPN;\n final List<String> v4v6Servers = getIPv4First(linkProperties.getDnsServers());\n // Timber.d(\"hasDefaultRoute: %s activeNetwork: %s || isVpn: %s || IP: %s\",\n // hasDefaultRoute(linkProperties), network, isVpn, toListOfStrings(linkProperties.getDnsServers()));\n\n if (isVpn) {\n servers.addAll(0, v4v6Servers);\n // vpnOffset += v4v6Servers.size();\n }\n // Prioritize the DNS servers of links which have a default route\n else if (hasDefaultRoute(linkProperties)) {\n servers.addAll(vpnOffset, v4v6Servers);\n }\n else {\n servers.addAll(v4v6Servers);\n }\n\n // Timber.d(\"dns Server Addresses (linkProperty): %s\", servers);\n return servers;\n }", "public void getServerIP() { \r\n\t\ttry { \r\n\t\t\tserver = new DatagramSocket(PORT); \r\n\t\t\tbyte buf[] = \"Client\".getBytes(); \r\n\t\t\tInetAddress aInetAddress = InetAddress.getByName(BOOTSTRAP); \r\n\r\n\t\t\tSystem.out.println(aInetAddress.toString()); \r\n\t\t\tDatagramPacket packet = new DatagramPacket(buf, buf.length, aInetAddress, BOOTSTRAP_PORT); \r\n\r\n\t\t\tserver.send(packet); \r\n\r\n\t\t\tbuf = new byte[size]; \r\n\t\t\tpacket = new DatagramPacket(buf, buf.length); \r\n\t\t\tserver.receive(packet); \r\n\r\n\t\t\tString[] addr = new String(packet.getData()).split(COLON); \r\n\t\t\tSERVERIP = addr[0].trim(); \r\n\t\t\tSERVER_PORT = Integer.parseInt(addr[1].trim()); \r\n\r\n\t\t\tSystem.out.println(\"Client Received IP of server: \" + SERVERIP + COLON + SERVER_PORT); \r\n\r\n\t\t} catch (Exception ex) { \r\n\t\t\tex.printStackTrace(); \r\n\t\t} finally { \r\n\t\t\tif (server != null) \r\n\t\t\t\tserver.close(); \r\n\t\t} \r\n\t}", "@Override\r\n\tpublic boolean hasIpAddressSupport() {\n\t\treturn false;\r\n\t}", "public static String Ipconfig(){\n StringBuilder sbuf = new StringBuilder();\n InetAddress ip;\n String hostname;\n // Inet6Address ipv6; *add a ipv6 to get the ipv6 address\n try {\n ip = InetAddress.getLocalHost();\n hostname = ip.getHostName();\n\n //NetworkInterface network = NetworkInterface.getByInetAddress(ip);\n NetworkInterface nif = NetworkInterface.getByName(\"localhost\");\n //InetAddress[] inet = InetAddress.getAllByName(ip.getHostName());\n //String address = getAddress(inet).getHostAddress();\n\n sbuf.append(\"Default gateway: \"+ip.getLocalHost());\n //fmt.format(\"MAc address:\" + nif.getHardwareAddress());\n sbuf.append(\"\\nCurrent Name : \" + ip.getHostName());\n sbuf.append(\"\\nCurrent IP address : \" + ip.getHostAddress());\n //System.out.println(\"Current IPv6 address : \"+ getByAddress(hostname,inet,nets));// + ipv6.getHostAddress());\n //System.out.println(\"Current IPv6 Temp address : \");// + ipv6.getHostAddress());\n sbuf.append(\"\\nCurrent IPv6 Local : \");// + ipv6.getHostAddress());\n \n } catch(Throwable se){\n se.printStackTrace();\n }\n return sbuf.toString();\n }", "public Vector<NetworkAddress> getHostAddresses(int type) {return addressesChecker.getAllMyAddresses(type); }", "public static List<InterfaceConfig> getAllAddress() throws SocketException {\n ArrayList<InterfaceConfig> addresses = new ArrayList<>();\n Enumeration<NetworkInterface> ifaces = NetworkInterface.getNetworkInterfaces();\n while (ifaces.hasMoreElements()) {\n NetworkInterface iface = ifaces.nextElement();\n byte[] macaddr = iface.getHardwareAddress();\n if (macaddr == null)\n continue;\n String key = String.format(MACADDR_FORMAT, macaddr[0], macaddr[1], macaddr[2], macaddr[3], macaddr[4], macaddr[5]);\n List<InterfaceAddress> addressList = iface.getInterfaceAddresses();\n InterfaceConfig ic = new InterfaceConfig(key, addressList);\n addresses.add(ic);\n }\n return addresses;\n }", "public JsonArray getFixedIPList() {\r\n\r\n\t\tif (restClient == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\tsb.append(\"/wapi/v2.3/fixedaddress\");\r\n\t\tsb.append(\"?_return_type=json\");\r\n\t\tsb.append(\"&_return_fields=ipv4addr,network,mac,comment,disable,name,match_client\");\r\n\t\t\r\n\t\tString value = restClient.Get(sb.toString());\r\n\t\t\r\n\t\tif (value == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\t// Change unescape-unicode\r\n\t\tvalue = StringUtils.unescapeUnicodeString(value);\r\n\t\t\r\n\t\t// JsonArray Parser\r\n\t\treturn JsonUtils.parseJsonArray(value);\r\n\t}", "public static void main(String[] args) {\n\t\tOSExecute.command(\"ipconfig\");\n\t}", "public List<String> getCPanelServerList() {\n\t\tString cPanelServerList = getProperties().getProperty(\"cpanel.server.list\").trim();\n\t\tString[] cPanelServerArray= cPanelServerList.split(\"#\");\n\t\tList<String> result = new ArrayList<String>(); \n\t\tfor(String cPanelServer: cPanelServerArray){\n\t\t\tString[] params = cPanelServer.split(\",\");\n\t\t\tif(params!= null && params.length>1){\n\t\t\t\tString cpanelIP = params[0];\n\t\t\t\tresult.add(cpanelIP);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public List<String> getPublicDnsNames() {\n return getInstances(Running).stream().map(Instance::getPublicDnsName).collect(Collectors.toList());\n }", "HashMap getRequestingHosts()\n {\n return configfile.requesting_hosts;\n }", "String getIp();", "String getIp();", "public final void loadIPFilter() {\n DBUtil.select(\n \"select ip, false as type from \"\n + ConfigUtil.getAntiFraudDatabaseSchema()\n + \".ip_whitelist union \"\n + \" select ip, true as type from \"\n + ConfigUtil.getAntiFraudDatabaseSchema()\n + \".ip_blacklist\",\n new ResultSetProcessor() {\n @Override\n public void process(ResultSet resultSet) throws SQLException {\n ArrayList<String> whiteList = new ArrayList<String>(10);\n ArrayList<String> blackList = new ArrayList<String>(500);\n while (resultSet.next() ) {\n String ip = resultSet.getString(\"ip\");\n boolean isBlackType = resultSet.getBoolean(\"type\");\n if ( isBlackType ) {\n blackList.add(ip);\n } else {\n whiteList.add(ip);\n }\n }\n _ipFilter.addToWhiteList(whiteList);\n _ipFilter.addToBlackList(blackList);\n }\n });\n }", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "public static byte[] getLocalIpAddressBytes() {\n\t\tInetAddress inetAddress = getLocalInetAddress();\n\t\tif (inetAddress != null) {\n\t\t\treturn inetAddress.getAddress();\n\t\t} else {\n\t\t\treturn new byte[4];\n\t\t}\n\t}", "public static List<String> getAllHardwareAddress() throws SocketException {\n ArrayList<String> addresses = new ArrayList<>();\n Enumeration<NetworkInterface> ifaces = NetworkInterface.getNetworkInterfaces();\n while (ifaces.hasMoreElements()) {\n NetworkInterface iface = ifaces.nextElement();\n byte[] macaddr = iface.getHardwareAddress();\n if (macaddr == null)\n continue;\n String key = String.format(MACADDR_FORMAT, macaddr[0], macaddr[1], macaddr[2], macaddr[3], macaddr[4], macaddr[5]);\n addresses.add(key);\n }\n return addresses;\n }", "public List<ServerHardware> getServers();", "public static String[] getHttpImportIPAddresses() {\n\t\tif (xml == null) return new String[0];\n\t\treturn httpImportIPAddresses;\n\t}", "public static String getLocalIPAddress() {\r\n return (localIPAddress);\r\n }", "public String[] listarInstitutos();", "private static void init() {\n System.setProperty(\"java.net.preferIPv4Stack\", \"true\");\r\n }", "public java.lang.String getIp(){\r\n return localIp;\r\n }", "public java.lang.String getIp(){\r\n return localIp;\r\n }", "public com.google.protobuf.ProtocolStringList\n getBootclasspathList() {\n return bootclasspath_.getUnmodifiableView();\n }", "public String getIp();", "Collection<NetworkInterface> getAllNetworkInterfaces();", "public String startIP() {\n return this.startIP;\n }", "public String getLocalIpAddress()\n {\n \t\n \treturn null;\n }", "private void print_addr() {\n try(final DatagramSocket socket = new DatagramSocket()){\n socket.connect(InetAddress.getByName(\"8.8.8.8\"), 10002);\n System.out.println(socket.getLocalAddress().getHostAddress()+\":\"+port);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "int getIp();", "int getIp();", "int getIp();", "private void storeHostAddresses() {\n savedHostAddresses.clear();\n /* port */\n savedPort = portComboBox.getStringValue();\n /* addresses */\n for (final Host host : getBrowser().getClusterHosts()) {\n final GuiComboBox cb = addressComboBoxHash.get(host);\n final String address = cb.getStringValue();\n if (address == null || \"\".equals(address)) {\n savedHostAddresses.remove(host);\n } else {\n savedHostAddresses.put(host, address);\n }\n host.getBrowser().getDrbdVIPortList().add(savedPort);\n }\n }", "private String getLocalIpAddress() throws Exception {\n return InetAddress.getLocalHost().getHostAddress();\n }", "public void setHostList(List<Host> hostLst){\r\n\t\tthis.hostList = hostLst;\r\n\t}", "public Bootstrap() {\r\n\t\t//Create or load UserList\r\n\t\tuserList = new CopyOnWriteArrayList<User>();\r\n\t\ttry {\r\n\t\t\tuserList = importUserList();\r\n\t\t} catch (FileNotFoundException e){\r\n\t\t\t\r\n\t\t} catch (IOException | ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tthis.ip_adresse = StaticFunctions.loadPeerIp();\t\t\t//Load ip-address\r\n\t\t\r\n\t\t//Create a new Zone\r\n\t\tcreateZone(new Point(0.0, 0.0), new Point(1.0, 1.0));\t//initialize zone\r\n\t}", "public static String[] getDicomExportIPAddresses() {\n\t\tif (xml == null) return new String[0];\n\t\treturn dicomExportIPAddresses;\n\t}", "public String getIp() {\n\t\treturn InfraUtil.getIpMachine();\n\t}", "public IpAddressMatcher(List<String> listIpAddress) {\n listnMaskBits= new ArrayList<Integer>();\n listrequiredAddress =new ArrayList<InetAddress>();\n\n for(String ipAddress : listIpAddress){\n int nMaskBits;\n if (ipAddress.indexOf('/') > 0) {\n String[] addressAndMask = ipAddress.split(\"/\");\n ipAddress = addressAndMask[0];\n nMaskBits = Integer.parseInt(addressAndMask[1]);\n }else {\n nMaskBits = -1;\n }\n listnMaskBits.add(nMaskBits);\n listrequiredAddress.add(parseAddress(ipAddress));\n }\n \n }", "public synchronized String getIP()\r\n\t{\r\n\t\tboolean done = false;\r\n\t\tboolean found = false;\r\n\t\tString ip=null;\r\n\r\n\t\t//debug\r\n\t\t//for(int i = 0; i < AllocList.size();i++)\r\n\t\t//\tSystem.out.println(\"getIP \" + AllocList.get(i));\r\n\t\t\r\n\t\tfor(int i=0; i< DefaultList.size() && !done;i++)\r\n\t\t{\r\n\r\n\t\t\tif(!AllocList.contains(DefaultList.get(i)))\r\n\t\t\t{\r\n\t\t\t\tdone = true;\r\n\t\t\t\tfound = true;\r\n\t\t\t\tSystem.out.println(\"Found a Free IP : \" + DefaultList.get(i));\r\n\t\t\t\tip = (String) DefaultList.get(i);\r\n\t\t\t\tAllocList.add(ip);\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tFile fp = new File(HASHMAPFILE);\r\n\t\t\t\t\tif(fp.exists())\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\tFileWriter fw = new FileWriter(fp.getAbsoluteFile(),true);\r\n\t\t\t\t\t\tfw.write(ip);\r\n\t\t\t\t\t\tfw.flush();\r\n\t\t\t\t\t\tfw.write(\"\\r\\n\");\r\n\t\t\t\t\t\tfw.flush();\r\n\t\t\t\t\t\tfw.close();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tSystem.out.println(\"ERROR !! updating to file \" + HASHMAPFILE);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"ERROR !! Could not open the file \" + HASHMAPFILE + e.getMessage());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t\tif(found)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"getIP returns : \" + ip);\r\n\t\t\treturn ip;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"@@@@ No IP avaialble, increase the IP Pool\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "private void initList() {\n\n\t\tfor (int i = 0; i < lstPool.size(); i++) {\n\t\t\tpoolList.add(createPool(\"nomPool\", lstPool.get(i).getNomPool()));\n\t\t}\n\t}", "private static InetAddress getBootstrapServer(InetAddress hostIP) {\n\t\tSocket socket = null;\n\t\tInputStream in = null;\n\t\tOutputStream out = null;\n\t\ttry {\n\t\t\t//socket = new Socket();\n\t\t\tsocket = new Socket(JoinHOST,OW_PORT);\n\t\t\t//socket.connect(iSock, 3000);\n\t\t\tout = socket.getOutputStream();\n\t\t\tObjectOutputStream oout = new ObjectOutputStream(out);\n\t\t\toout.writeObject(hostIP.getHostName());\n\t\t\t//oout.writeObject(hostIP.getHostAddress());\n\t\t\t//oout.writeObject(\"hakkoudasan.matlab.nitech.ac.jp\");\n\t\t\t\n\t\t\tin = socket.getInputStream();\n\t\t\tObjectInputStream oin = new ObjectInputStream(in);\n\t\t\tString bsIP = (String)oin.readObject();\n\t\t\tif(bsIP.equals(hostIP.getHostName())) {\n//\t\t\t\tif(bsIP.equals(\"10.192.41.113\")) {\n\t\t\t\t//if(bsIP.equals(\"hakkoudasan.matlab.nitech.ac.jp\")) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tInetAddress iNetAddr = InetAddress.getByName(bsIP);\n\t\t\treturn iNetAddr;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (socket != null) {\n\t\t\t\t\tsocket.close();\n\t\t\t\t\tsocket = null;\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\t/* ignore */\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t\t\n\t}", "@Override\n public void startUp(FloodlightModuleContext context)\n throws FloodlightModuleException {\n floodlightProvider = context\n .getServiceImpl(IFloodlightProviderService.class);\n\n floodlightProvider.addOFMessageListener(OFType.PACKET_IN, this);\n\n BufferedReader reader;\n try\n {\n //read in internal ip addresses\n reader = new BufferedReader(new FileReader(new File(this.insideIPsFile)));\n String temp = null;\n while ((temp = reader.readLine()) != null)\n {\n if( !temp.startsWith(\"//\") ){\n inside_ip.add(IPv4Address.of(temp));\n // System.out.println (IPv4Address.of(temp));\n }\n }\n reader.close();\n\n //read in externally visible ip addresses\n reader = new BufferedReader(new FileReader(new File(this.externalIPFile)));\n temp = null;\n while ((temp = reader.readLine()) != null)\n {\n if( !temp.startsWith(\"//\") ){\n external_ip = IPv4Address.of(temp);\n break;\n }\n }\n reader.close();\n\n //read in NAT switch id, inside ports, outside ports\n reader = new BufferedReader(new FileReader(new File(this.natInfoFile)));\n temp = null;\n while ((temp = reader.readLine()) != null)\n {\n if( !temp.startsWith(\"//\") ){\n String[] nat_info = temp.split( \",\" );\n\n nat_swId = DatapathId.of(Long.valueOf( nat_info[0] ));\n\n for( String internal_port: nat_info[1].trim().split(\" \") ){\n nat_internal_ports.add( TransportPort.of( Integer.parseInt(internal_port)) );\n }\n\n for( String external_port: nat_info[2].trim().split(\" \") ){\n nat_external_ports.add( TransportPort.of( Integer.parseInt(external_port)) );\n }\n break;\n }\n }\n reader.close();\n\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n\n\n }", "private void setServerAddressList(){\n\n if (mCallBack != null){\n mCallBack.onGetServerAddressListCompleted(mServerAddressList);\n }\n }", "public NatGatewayAddress [] getPublicIpAddressSet() {\n return this.PublicIpAddressSet;\n }", "public List<String> getHosts() {\n\t\treturn hosts;\n\t}", "public List<ServiceInstance> getAllInstances();", "public StringList lookupAddresses(String name) throws UnknownHostException\n {\n StringList names=new StringList(); \n // cached lookup \n InetAddress[] addres = lookup(name); \n \n for (InetAddress addr:addres)\n {\n // only add unique address\n names.add(addr.getHostAddress(),true); // getHostName()); \n }\n \n return names; \n }" ]
[ "0.64079726", "0.6052346", "0.6037654", "0.59871244", "0.58368015", "0.5834393", "0.58232254", "0.5718764", "0.5692827", "0.5689028", "0.56107056", "0.5579634", "0.55764455", "0.55734843", "0.5573225", "0.5553573", "0.55302507", "0.5507768", "0.5498188", "0.54917157", "0.54782397", "0.5473762", "0.547303", "0.5457327", "0.54512733", "0.54503185", "0.54493046", "0.54485255", "0.5434647", "0.5430025", "0.5414348", "0.54079145", "0.5398956", "0.5383936", "0.5352712", "0.53488904", "0.53465056", "0.5328728", "0.5325886", "0.5319562", "0.53115183", "0.53090507", "0.5297073", "0.5296733", "0.5271388", "0.5242396", "0.5238816", "0.52382755", "0.5236682", "0.52223283", "0.520879", "0.51904446", "0.5187972", "0.5174818", "0.5168466", "0.5167538", "0.5163377", "0.5163377", "0.5133832", "0.51289505", "0.51289505", "0.51289505", "0.51289505", "0.51289505", "0.51289505", "0.51289505", "0.51289505", "0.5118789", "0.5114432", "0.5110291", "0.5105766", "0.5102555", "0.50965726", "0.5096332", "0.50869894", "0.50869894", "0.5082144", "0.5078685", "0.50597626", "0.5059162", "0.5047367", "0.5042293", "0.5037607", "0.5037607", "0.5037607", "0.503592", "0.5033425", "0.5031947", "0.50271016", "0.50232285", "0.50220996", "0.501549", "0.50021166", "0.49965402", "0.49954087", "0.49939105", "0.4992764", "0.49926597", "0.4991245", "0.4991146", "0.49848753" ]
0.0
-1
/ Fetch an IP address from IP pool, this has to be synchronized method
public synchronized String getIP() { boolean done = false; boolean found = false; String ip=null; //debug //for(int i = 0; i < AllocList.size();i++) // System.out.println("getIP " + AllocList.get(i)); for(int i=0; i< DefaultList.size() && !done;i++) { if(!AllocList.contains(DefaultList.get(i))) { done = true; found = true; System.out.println("Found a Free IP : " + DefaultList.get(i)); ip = (String) DefaultList.get(i); AllocList.add(ip); try { File fp = new File(HASHMAPFILE); if(fp.exists()) { FileWriter fw = new FileWriter(fp.getAbsoluteFile(),true); fw.write(ip); fw.flush(); fw.write("\r\n"); fw.flush(); fw.close(); } else System.out.println("ERROR !! updating to file " + HASHMAPFILE); } catch(Exception e) { System.out.println("ERROR !! Could not open the file " + HASHMAPFILE + e.getMessage()); } } } if(found) { System.out.println("getIP returns : " + ip); return ip; } else { System.out.println("@@@@ No IP avaialble, increase the IP Pool"); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getInIp();", "int getInIp();", "int getIp();", "int getIp();", "int getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "public InetAddress getIP();", "public abstract int getFromPool(int x);", "public InetAddress getIPAddress ( ) { return _IPAddress; }", "private Label getIP() { \n\t\tString address = new String(); \n\t\ttry { \n\t\t\tURL IpWebSite = new URL(\"http://bot.whatismyipaddress.com\"); \n\t\t\tBufferedReader sc = new BufferedReader(new InputStreamReader(IpWebSite.openStream())); \n\t\t\t\n\t\t\taddress = sc.readLine(); \n\t\t\t\n\t\t} catch (Exception e) { \n\t address = \"Can't get your IP Address \\n Check your internet connection\"; \n\t } \n\t\t\n\t\tLabel ip = new Label(\"Your IP Address is : \" + address);\n\t\tip.setMaxWidth(Double.MAX_VALUE);\n\t\tip.setAlignment(Pos.CENTER);\n\t\treturn ip;\n\t}", "String getIp();", "String getIp();", "public static String getIP()\n {\n try\n {\n URL whatismyip = new URL(\"http://checkip.amazonaws.com\");\n BufferedReader in = new BufferedReader(new InputStreamReader(\n whatismyip.openStream()));\n\n String ip = in.readLine(); //you get the IP as a String\n return ip;\n }\n catch (Exception exc)\n {\n System.out.println(\"Get internet IP address error:\" + exc.toString());\n return \"\";\n }\n }", "public InetAddress getIP()\r\n\r\n {\r\n InetAddress ip=null;\r\n try{\r\n WifiManager wifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);\r\n DhcpInfo dhcp = wifi.getDhcpInfo();\r\n int dip=dhcp.ipAddress;\r\n byte[] quads = new byte[4];\r\n for (int k = 0; k < 4; k++)\r\n quads[k] = (byte) (dip >> (k * 8));\r\n ip= InetAddress.getByAddress(quads);\r\n } catch (UnknownHostException e) {\r\n e.printStackTrace();\r\n }\r\n return ip;\r\n }", "@Override\n public InetAddress getIp() {\n this.ip =\n maybeHostname\n .map(\n hostname -> {\n try {\n return InetAddress.getByName(hostname);\n } catch (final UnknownHostException e) {\n return ip;\n }\n })\n .orElse(ip);\n return ip;\n }", "private String lookup_ip (String host) throws LookupException\n , NameServerContactException{\n return lookup(host)[0];\n }", "public IPAddress getIPAddress() {\n return iPAddress;\n }", "public String getIp();", "public int getIp() {\n return instance.getIp();\n }", "public int getIp() {\n return instance.getIp();\n }", "ServiceResponse<String> acquireMostBusyServerIp();", "public Inet4Address assignNewIPAddress() {\n\t\tbyte[] rawNewAddr = Arrays.copyOf(subnetAddress.getAddress(), 4);\n\n\t\t//TODO find an available IP address and register it to usedAddresses\n\t\t//TODO hardcoding 256 assuming that mask == 24; all trying ones would be in this subnet\n\t\t// starting from 2 since 0 and 1 are assumed to be used already (for network and gateway)\n\t\tfor (int i = 2; i < 256; i++) {\n\t\t\trawNewAddr[3] = (byte) i;\n\t\t\tInet4Address newAddr;\n\n\t\t\ttry {\n\t\t\t\tnewAddr = (Inet4Address) Inet4Address.getByAddress(rawNewAddr);\n\t\t\t} catch (UnknownHostException e) {\n\t\t\t\t// shouldn't happen\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!isAddressAlreadyRegistered(newAddr)) {\n\t\t\t\t//address not registered yet -> let's register\n\t\t\t\tusedAddresses.add(newAddr);\n\t\t\t\treturn newAddr;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public int getIp() {\n return ip_;\n }", "private String getIPAddress() throws Exception {\n //Don't need the line of code below, TODO: delete it!\n InetAddress getIP = InetAddress.getLocalHost();\n String thisSystemAddress = \"\";\n try{\n URL thisUrl = new URL(\"http://bot.whatismyipaddress.com\");\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(thisUrl.openStream()));\n thisSystemAddress = bufferedReader.readLine().trim();\n } catch (Exception e){\n e.printStackTrace();\n e.getCause();\n }\n\n return thisSystemAddress;\n }", "String getRemoteIpAddress();", "public java.lang.String getIp(){\r\n return localIp;\r\n }", "public java.lang.String getIp(){\r\n return localIp;\r\n }", "private String findIpAddress() throws Exception {\n\n\t\tString ipAddress = null;\n\t\tEnumeration<?> e = NetworkInterface.getNetworkInterfaces();\n\t\tloop: while( e.hasMoreElements()) {\n\t\t\tNetworkInterface n = (NetworkInterface) e.nextElement();\n\t\t\tEnumeration<?> ee = n.getInetAddresses();\n\n\t\t\twhile( ee.hasMoreElements()) {\n\t\t\t\tInetAddress i = (InetAddress) ee.nextElement();\n\t\t\t\tif( i instanceof Inet4Address\n\t\t\t\t\t\t&& ! \"127.0.0.1\".equals( i.getHostAddress())) {\n\t\t\t\t\tipAddress = i.getHostAddress();\n\t\t\t\t\tbreak loop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( ipAddress == null )\n\t\t\tthrow new Exception( \"No IP address was found.\" );\n\n\t\treturn ipAddress;\n\t}", "public int getIp() {\n return ip_;\n }", "public int getIp() {\n return ip_;\n }", "public int getIp() {\n return ip_;\n }", "public String getIp() {\n return getIpString(inetAddress);\n }", "public String getIP() throws UnknownHostException{\n\t\tInetAddress addr = InetAddress.getLocalHost();//Get local IP\n \t String ip = addr.toString().split(\"\\\\/\")[1];//local IP\n \t //ip = ip.indexOf('\\\\');\n \t if(!getIsLocal()){\n\t \ttry{\n\t\t \tURL whatismyip = new URL(\"http://automation.whatismyip.com/n09230945.asp\");\n\t\t \tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t \t whatismyip.openStream()));\n\t\t \tip = in.readLine(); //you get the IP as a String\n\t\t \t//System.out.println(ip);\n\t\t \tin.close();\n\t\t \treturn ip;\n\n\t \t}\n\t \tcatch(IOException e){\n\t \t\te.printStackTrace();\n\t \t}\n\t \treturn null;\n \t }\n\t\treturn ip;\n\t }", "private void findInternalExternalIP() {\n\t\ttry {\n\t\t\texternalIP = InetAddress.getByName(getExternalIP());\n\t\t} catch (UnknownHostException e) {\n\t\t\tDecentLogger.write(\"Unable to to resolve external IP to InetAddress (problem with ip provider?)\");\n\t\t}\n\t\ttry {\n\t\t\tinternalIP = InetAddress.getLocalHost();\n\t\t} catch (UnknownHostException e) {\n\t\t\tDecentLogger.write(\"Unable to to resolve internal IP to InetAddress\");\n\t\t}\n\t}", "public IpAddress getIpAddressValue() throws JNCException {\n return (IpAddress)getValue(\"ip-address\");\n }", "int getAddr();", "public String getIp() {\n return (String) get(24);\n }", "InetAddress getAddress();", "InetAddress getAddress();", "public static String ipAddress() {\r\n String _ipaddress=\"\";\r\n InetAddress _address=null;\r\n \r\n try {\r\n _address=InetAddress.getLocalHost();\r\n _ipaddress=_address.getHostAddress();\r\n }\r\n catch (Exception ex) {\r\n throw new RuntimeException(ex.getMessage());\r\n }\r\n \r\n if (_address!=null) {\r\n _address=null; System.gc();\r\n }\r\n \r\n return _ipaddress;\r\n }", "public LinkedBlockingQueue<ProxyIp> getIp2Queue(boolean needId){\n\t\tString sql = \"select * from ProxyIp where runFlag='0' and delFlag='0' order by id\";\n\t\t\n//\t\tSystem.out.println(sql);\n\t\tList<String> cols = new ArrayList<>();\n\t\tcols.add(\"ip\");\n\t\tcols.add(\"port\");\n\t\tList<Map<String,Object>> result = null;\n\t\ttry {\n\t\t\tresult = Persistence.newPersistence().doQuerySql(sql, cols,needId);\n\t\t} catch (Exception e) { }\n\t\tLinkedBlockingQueue<ProxyIp> queue = new LinkedBlockingQueue<ProxyIp>();\n\t\tif(result!=null)\n\t\t\tresult.forEach(r->{\n\t\t\t\tProxyIp pip = new ProxyIp();\n\t\t\t\tpip.setIp(r.get(\"ip\").toString());\n\t\t\t\tpip.setPort((Integer)r.get(\"port\"));\n\t\t\t\tqueue.add(pip);\n\t\t\t});\n\t\treturn queue;\n\t}", "private static String getExternalIP() {\n\t\ttry {\n\t URL checkURL = new URL(EXTERNAL_IP_PROVIDER);\n\t BufferedReader in = new BufferedReader(new InputStreamReader(checkURL.openStream()));;\n\t String ip = in.readLine();\n\t return ip;\n\t } catch (IOException e) {\n\t \t DecentLogger.write(\"Unable to get external IP Address\");\n\t }\n\t\treturn null;\n\t}", "public int getInIp() {\n return instance.getInIp();\n }", "public int getInIp() {\n return instance.getInIp();\n }", "public String getIP(Integer nodeID) {\n return this.IPmap.get(nodeID);\n }", "public InetAddress getAddress() {\n return ip;\n }", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n ip_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n ip_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n ip_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n ip_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@java.lang.Override\n public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n ip_ = s;\n return s;\n }\n }", "public String getIP() throws Exception {\n this.IPAddress = \"http://192.168.1.15\";\n return this.IPAddress;\n }", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n ip_ = s;\n }\n return s;\n }\n }", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n ip_ = s;\n }\n return s;\n }\n }", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n ip_ = s;\n }\n return s;\n }\n }", "public static String getIP() {\n\t\treturn ip;\r\n\t}", "@Override\r\n public String getIPAddress() {\r\n return address;\r\n }", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n ip_ = s;\n return s;\n }\n }", "String getAddr();", "public void getIP(){\n String requestIP = DomainTextField.getText();\n\n Connection conn = new Connection();\n\n String domain = conn.getIP(requestIP);\n\n output.writeln(requestIP + \" --> \" + domain);\n }", "public String getIP() {\n return this.IP;\n }", "public int getInIp() {\n return inIp_;\n }", "public int getInIp() {\n return inIp_;\n }", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n ip_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getIp() {\n Object ref = ip_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n ip_ = s;\n return s;\n }\n }", "com.google.protobuf.ByteString getIpBytes();", "java.lang.String getAgentIP();", "public String get_ipaddress() throws Exception {\n\t\treturn this.ipaddress;\n\t}", "private static InetAddress getBootstrapServer(InetAddress hostIP) {\n\t\tSocket socket = null;\n\t\tInputStream in = null;\n\t\tOutputStream out = null;\n\t\ttry {\n\t\t\t//socket = new Socket();\n\t\t\tsocket = new Socket(JoinHOST,OW_PORT);\n\t\t\t//socket.connect(iSock, 3000);\n\t\t\tout = socket.getOutputStream();\n\t\t\tObjectOutputStream oout = new ObjectOutputStream(out);\n\t\t\toout.writeObject(hostIP.getHostName());\n\t\t\t//oout.writeObject(hostIP.getHostAddress());\n\t\t\t//oout.writeObject(\"hakkoudasan.matlab.nitech.ac.jp\");\n\t\t\t\n\t\t\tin = socket.getInputStream();\n\t\t\tObjectInputStream oin = new ObjectInputStream(in);\n\t\t\tString bsIP = (String)oin.readObject();\n\t\t\tif(bsIP.equals(hostIP.getHostName())) {\n//\t\t\t\tif(bsIP.equals(\"10.192.41.113\")) {\n\t\t\t\t//if(bsIP.equals(\"hakkoudasan.matlab.nitech.ac.jp\")) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tInetAddress iNetAddr = InetAddress.getByName(bsIP);\n\t\t\treturn iNetAddr;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (socket != null) {\n\t\t\t\t\tsocket.close();\n\t\t\t\t\tsocket = null;\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\t/* ignore */\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t\t\n\t}", "@SuppressLint(\"DefaultLocale\")\n\tprivate String getIpAddr()\n\t{\n\t\tString ipString = null;\n\t\tWifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);\n\t\tif (wifiManager != null)\n\t\t{\n\t\t\tWifiInfo wifiInfo = wifiManager.getConnectionInfo();\n\t\t\tif (wifiInfo != null)\n\t\t\t{\n\t\t\t\tint ip = wifiInfo.getIpAddress();\n\n\t\t\t\tipString = String.format(\"%d.%d.%d.%d\", (ip & 0xff),\n\t\t\t\t\t(ip >> 8 & 0xff), (ip >> 16 & 0xff), (ip >> 24 & 0xff));\n\n\t\t\t}\n\t\t}\n\t\treturn ipString;\n\t}", "public String getIPAddress () {\n\t\treturn _ipTextField.getText();\n\t}", "public String getIp() {\n Object ref = ip_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n ip_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "@Override\n\tpublic String getIp() {\n\t\treturn ip;\n\t}", "private String getIP() {\n\t\treturn getRandomArbitrary(Constants.MIN_IP_VALUE, Constants.MAX_IP_VALUE) + Constants.DOT\n\t\t\t\t+ getRandomArbitrary(Constants.MIN_IP_VALUE, Constants.MAX_IP_VALUE) + Constants.DOT\n\t\t\t\t+ getRandomArbitrary(Constants.MIN_IP_VALUE, Constants.MAX_IP_VALUE) + Constants.DOT\n\t\t\t\t+ getRandomArbitrary(Constants.MIN_IP_VALUE, Constants.MAX_IP_VALUE);\n\n\t}", "public java.lang.String getIp () {\r\n\t\treturn ip;\r\n\t}", "public java.lang.String getIp () {\r\n\t\treturn ip;\r\n\t}", "java.lang.String getSnIp();", "java.lang.String getSnIp();", "private String getLocalIpAddress() throws Exception {\n return InetAddress.getLocalHost().getHostAddress();\n }", "int getPoolNumber();", "String getCsPublicIp() {\n String ip = null;\n try {\n URL url = new URL(\"http://169.254.169.254/latest/meta-data/public-ipv4\");\n URLConnection conn = url.openConnection();\n Scanner s = new Scanner(conn.getInputStream());\n if (s.hasNext()) {\n ip = s.next();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return ip;\n }", "public java.lang.String getIp() {\r\n return ip;\r\n }", "public InetAddress getIpAddress() \n\t{\n\t\treturn ipAddress;\n\t}", "public java.lang.String getIP() {\r\n return IP;\r\n }", "public String getIp() {\r\n return ip;\r\n }", "java.lang.String getDestinationIp();", "public String resolve(byte ip[]) throws UnknownHostException\n {\n // CACHE DNS requests!\n synchronized(this.ipadress2host)\n {\n String ipstr=ip2string(ip); \n \n StringList hostList= this.ipadress2host.get(ipstr); \n if (hostList!=null)\n if (hostList.size()>0)\n return hostList.get(0); \n \n String hostname=null;//dns.getHostByAddr(ip);\n \n if (hostname==null)\n return null; // throw ? \n this.ipadress2host.put(ipstr,new StringList(hostname)); \n return hostname;\n }\n }", "public synchronized boolean returnip(String Ip)\r\n\t{\t\r\n\t\tboolean found = false;\r\n\t\tboolean updatefile = false;\r\n\t\t//debug\r\n\t\t/*\r\n\t\tfor(int i = 0; i < AllocList.size();i++)\r\n\t\t\tSystem.out.println(\"returnip \" + AllocList.get(i));\r\n\t\t*/\r\n\t\tSystem.out.println(\"Releasing IP:\" + Ip);\r\n\t\t\r\n\t\tif(AllocList.contains(Ip))\r\n\t\t{\r\n\t\t\t\r\n\t\t\tfound = true;\r\n\t\t\tSystem.out.println(\"Found IP : \" + Ip + \" Size of IP Allocated pool before removing IP: \" + Ip + \" is \" + AllocList.size());\r\n\t\t\tif(AllocList.remove(Ip))\r\n\t\t\t{\r\n\t\t\t\tupdatefile = true;\r\n\t\t\t\tSystem.out.println(\"Size of IP Allocated pool after removing IP : \"+ Ip + \" is \" + AllocList.size() );\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\"Could nt remove the IP from Allocated Pool\");//Handle when ip is not removed from the allocated list\r\n\t\t}\t\t\t\r\n\t\tif(updatefile)\r\n\t\t{\r\n\t\t\ttry{\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"updating allocated list - removing ip\" );\r\n\r\n\t\t\t\tFile fp = new File(HASHMAPFILE);\r\n\t\t\t\tFileWriter fw = new FileWriter(fp.getAbsoluteFile());\r\n\t\t\t\tfor(int i = 0; i < AllocList.size();i++)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(fp.exists())\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfw.write((String)AllocList.get(i));\r\n\t\t\t\t\t\tfw.flush();\r\n\t\t\t\t\t\tfw.write(\"\\r\\n\");\r\n\t\t\t\t\t\tfw.flush();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tSystem.out.println(\"ERROR !! updating to file \" + HASHMAPFILE);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tfw.close();\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"ERROR !! Could not open the file \" + HASHMAPFILE + e.getMessage());\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(found) \r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"@@@@ IP was not Allocated, Could not release the IP\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Nullable public abstract String ipAddress();", "private static void getServerIPAddress() {\r\n // Get local IP address\r\n try {\r\n Enumeration<NetworkInterface> enumeratedNetworkInterface = NetworkInterface.getNetworkInterfaces();\r\n\r\n NetworkInterface networkInterface;\r\n Enumeration<InetAddress> enumeratedInetAddress;\r\n InetAddress inetAddress;\r\n\r\n for (; enumeratedNetworkInterface.hasMoreElements(); ) {\r\n networkInterface = enumeratedNetworkInterface.nextElement();\r\n enumeratedInetAddress = networkInterface.getInetAddresses();\r\n\r\n for (; enumeratedInetAddress.hasMoreElements(); ) {\r\n inetAddress = enumeratedInetAddress.nextElement();\r\n String anIPAddress = inetAddress.getHostAddress();\r\n if (log.isDebugEnabled()) {\r\n log.debug(\"Scanning local IP space: \" + anIPAddress);\r\n }\r\n\r\n // exclude loop-back and MAC address\r\n if (!(anIPAddress.equals(\"127.0.0.1\") || anIPAddress.contains(\":\")))\r\n localIPAddress = anIPAddress;\r\n }\r\n }\r\n } catch (Exception e) {\r\n log.error(\"Error in retrieving the local IP address: \" + e.toString());\r\n }\r\n }", "public String getIPAddress()\n {\n return fIPAddress;\n }", "public String getIpAddr() {\r\n return ipAddr;\r\n }", "int getS1Ip();" ]
[ "0.6647781", "0.6647781", "0.6608379", "0.6608379", "0.6608379", "0.6599323", "0.6599323", "0.6599323", "0.6599323", "0.6599323", "0.6599323", "0.6599323", "0.6599323", "0.6598061", "0.6560613", "0.6502305", "0.6469246", "0.643077", "0.643077", "0.63290936", "0.62915194", "0.6275898", "0.62597", "0.6244992", "0.6128545", "0.610392", "0.610392", "0.6095687", "0.60886765", "0.60863566", "0.60837996", "0.6065458", "0.6061599", "0.6061599", "0.6052604", "0.5999051", "0.5999051", "0.5999051", "0.594596", "0.5943301", "0.5934839", "0.59329695", "0.5916242", "0.5911524", "0.59067655", "0.59067655", "0.589841", "0.58955234", "0.5890733", "0.5885202", "0.5885202", "0.5878608", "0.58746195", "0.58598363", "0.58598363", "0.5858264", "0.5855882", "0.5844204", "0.5835697", "0.58321583", "0.58321583", "0.58321583", "0.58263797", "0.5825967", "0.58205193", "0.58169746", "0.5814721", "0.58142895", "0.5810751", "0.5810751", "0.58104473", "0.58099693", "0.5805869", "0.5796626", "0.57966", "0.5786705", "0.57786", "0.5760896", "0.5754697", "0.57516557", "0.5746126", "0.5744923", "0.5744923", "0.5701864", "0.5701864", "0.5696382", "0.5692985", "0.5689658", "0.5674682", "0.5669828", "0.56697935", "0.5659908", "0.5653187", "0.5652933", "0.5650044", "0.56498563", "0.56412935", "0.5640833", "0.5625211", "0.562451" ]
0.6955219
0
/ release an IP address to IP pool, this has to be synchronized method
public synchronized boolean returnip(String Ip) { boolean found = false; boolean updatefile = false; //debug /* for(int i = 0; i < AllocList.size();i++) System.out.println("returnip " + AllocList.get(i)); */ System.out.println("Releasing IP:" + Ip); if(AllocList.contains(Ip)) { found = true; System.out.println("Found IP : " + Ip + " Size of IP Allocated pool before removing IP: " + Ip + " is " + AllocList.size()); if(AllocList.remove(Ip)) { updatefile = true; System.out.println("Size of IP Allocated pool after removing IP : "+ Ip + " is " + AllocList.size() ); } else System.out.println("Could nt remove the IP from Allocated Pool");//Handle when ip is not removed from the allocated list } if(updatefile) { try{ System.out.println("updating allocated list - removing ip" ); File fp = new File(HASHMAPFILE); FileWriter fw = new FileWriter(fp.getAbsoluteFile()); for(int i = 0; i < AllocList.size();i++) { if(fp.exists()) { fw.write((String)AllocList.get(i)); fw.flush(); fw.write("\r\n"); fw.flush(); } else System.out.println("ERROR !! updating to file " + HASHMAPFILE); } fw.close(); } catch (Exception e) { System.out.println("ERROR !! Could not open the file " + HASHMAPFILE + e.getMessage()); } } if(found) return true; else { System.out.println("@@@@ IP was not Allocated, Could not release the IP"); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void releasePermit() {\n balancer.release();\n }", "public void deregisterIPAddress(Inet4Address address) {\n\t\tusedAddresses.remove(address);\n\t}", "void unsetPoolNumber();", "public void releasePingLock() {\r\n\t\tbeingPinged.set(false);\r\n\t}", "void closeConnectionsPool();", "public interface Poolable {\n\n /**\n * Releases this instance in the pool\n */\n void releaseInstance();\n}", "public static void closePool(){\n\t\t\n\t\t// TODO signal to kill all pool.\n\t\t\n\t}", "public boolean releaseAddress(EC2ReleaseAddress request) {\n try {\n List<CloudStackIpAddress> cloudIps = getApi().listPublicIpAddresses(null, null, null, null, null, request.getPublicIp(), null, null, null);\n if (cloudIps == null)\n throw new Exception(\"Specified ipAddress doesn't exist\");\n CloudStackIpAddress cloudIp = cloudIps.get(0);\n CloudStackInfoResponse resp = getApi().disassociateIpAddress(cloudIp.getId());\n if (resp != null) {\n return resp.getSuccess();\n }\n } catch (Exception e) {\n logger.error(\"EC2 ReleaseAddress - \", e);\n handleException(e);\n }\n return false;\n }", "void unsetPoolName();", "public void release() { \r\n\t remoteControlClient = null;\r\n\t }", "@Override\n\t// O(1)\n\tpublic void close() {\n\t\tsynchronized (mInetAddressList) {\n\t\t\tmIsClosed = true;\n\t\t\tmCleanupTask.cancel();\n\t\t\tmInetAddressList.clear();\n\n\t\t\t// unblock the blocked threads\n\t\t\t// when they resume, they'll throw an interrupted exception\n\t\t\t// there's only one place where they'll be blocked (in take())\n\t\t\twhile (mInetAddressAvailableSemaphore.hasQueuedThreads()) {\n\t\t\t\tmInetAddressAvailableSemaphore.release();\n\t\t\t}\n\t\t}\n\t}", "public void releaseInstance() {\n\t\tif (isFree() || isBusy()) {\n\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\"instance is already free or is busy\");\n\t\t}\n\n\t\tsetFree(true);\n\t\tsetBusy(false);\n\t}", "public void release(int ind) { \n if (ind >= maxId) {\n return;\n }\n int expandedInd = ind + maxId - 1;\n idPool.clear(expandedInd);\n setBitsInTree(expandedInd);\n }", "public final void release() {\n explicitlyLocked = false;\n byteBase.unlock();\n }", "public void releaseNetwork(final String requestId) {\n synchronized (this) {\n if (mMmsRequestCount > 0) {\n mMmsRequestCount -= 1;\n LogUtil.d(requestId, \"MmsNetworkManager: release, count=\" + mMmsRequestCount);\n if (mMmsRequestCount < 1) {\n /* Add by SPRD for bug 542996 Start */\n mPendingReleaseMmsNetworkManager.set(this);\n mReleaseNwHandler.sendMessageDelayed(\n mReleaseNwHandler.obtainMessage(EVENT_NETWORK_RELEASE_DELAY),\n NETWORK_RELEASE_PROCESS_DELAY);\n /* Add by SPRD for bug 542996 End */\n // Delete by SPRD for bug 542996\n //releaseRequestLocked(mNetworkCallback);\n }\n }\n }\n }", "public void closePool() {\n threadPool.destroy();\n }", "@Override\r\n\tprotected void releaseInstance(String instanceID) {\n\t\t\r\n\t}", "private void clearIp() {\n \n ip_ = 0;\n }", "private void clearIp() {\n \n ip_ = 0;\n }", "public void release()\n\t{\n\t\t// System.out.println(usedBy.getName() + \": Releasing \" + toString());\n\t\tthis.usedBy = null;\n\t}", "public void put( final Poolable poolable )\n {\n if( poolable instanceof Recyclable )\n {\n ( (Recyclable)poolable ).recycle();\n }\n\n if( m_pool.length == ( m_count + 1 ) && null != m_controller )\n {\n final int decrease = m_controller.shrink();\n if( decrease > 0 )\n {\n shrink( decrease );\n }\n }\n\n if( m_pool.length > m_count + 1 )\n {\n m_count++;\n m_pool[ m_count ] = poolable;\n }\n else\n {\n try\n {\n m_factory.decommission( poolable );\n }\n catch( Exception e )\n {\n // To be backwards compatible, we have to support the logger having not been set.\n if( ( getLogger() != null ) && ( getLogger().isDebugEnabled() ) )\n {\n getLogger().debug( \"Error decommissioning object\", e );\n }\n }\n }\n }", "public void release() {\n nRelease(mNativeInstance);\n mNativeInstance = 0;\n }", "public void cerrarPool() {\n if (pool != null) {\n pool.shutdown();\n }\n }", "public void release() {\n HiLog.info(LOG_LABEL, \"release.\", new Object[0]);\n this.mCallMapById.clear();\n this.mRemote = null;\n disconnect();\n destroyHandler();\n this.mContext = null;\n this.mPendingCallAudioState = null;\n this.mCurrentCallAudioState = null;\n this.mPendingCanAddCall = null;\n this.mPreAddedCall = null;\n this.mPendingDisconnectPreAddedCall = null;\n this.mIsConnected = false;\n this.mIsBound = false;\n this.mIsInCallServiceBinded = false;\n this.mIsPreConnected = false;\n Listener listener = this.mListener;\n if (listener != null) {\n listener.onReleased(this);\n this.mListener = null;\n }\n }", "public void freeThread() {\n\t\tif (this.serverConnectorUsed > 0) {\n\t\t\tthis.serverConnectorUsed--;\n\t\t\tLOG.info(\"Freeing thread in pool. Now pool is \"+Integer.toString(MAX_THREADS-this.serverConnectorUsed)+\" / \"+Integer.toString(MAX_THREADS));\n\t\t}\n\t}", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tSocket s = new Socket(ip,6969);\n\t\t\t\t\t\t\t\ts.close();\n\t\t\t\t\t\t\t\tconnection=true;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t catch (UnknownHostException e1) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\tLog.d(null, \"Wrong ip\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\t\tLog.d(null, \"Wrong ip\");\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}", "public void recycle() {\n// synchronized (sPoolSync) {\n// if (sPoolSize < MAX_POOL_SIZE) {\n clearForRecycle();\n// next = sPool;\n// sPool = this;\n// sPoolSize++;\n// }\n// }\n }", "public void release();", "public void release();", "final void internalRelease() {\n if(!explicitlyLocked) {\n byteBase.unlock();\n }\n }", "void returnTaskToFreePool(ImageDownloadTask downloadTask) {\n downloadTask.cleanup();\n imageDownloadTaskWorkQueue.offer(downloadTask);\n }", "public void release() {\n\t\t\n\t}", "public void release() {\n }", "@Override\r\n\tpublic void release()\r\n\t{\n\t}", "private void clearInIp() {\n \n inIp_ = 0;\n }", "private void clearInIp() {\n \n inIp_ = 0;\n }", "@Override\n public void release() {\n }", "public abstract void release();", "public abstract void release();", "public abstract void release();", "public static void shutdownConnPool() {\n\n\t\ttry {\n\t\t\tBoneCP connectionPool = ConnectionManager.getConnectionPool();\n\t\t\tif (connectionPool != null) {\n\t\t\t\tconnectionPool.shutdown(); \n\t\t\t}\n\n\t\t} catch (Exception e) {\n\n\t\t\tthrow new SystemException(\"Shutting Down DB Connection Pool\",e,SystemCode.UNABLE_TO_EXECUTE);\t\n\t\t}\n\t}", "public void release() {\n assertExecuted();\n method.releaseConnection();\n }", "public void releaseResource() {\n if (!isPreConnected() && !isInCallServiceBinded() && this.mCallMapById.isEmpty() && this.mPreAddedCall == null && this.mPendingDisconnectPreAddedCall == null) {\n release();\n }\n }", "public static void disconnect() {\n \t\tconnPool.stop();\n \t}", "public static void release() {\n\t}", "public void release() {\n }", "@Override\n public void release() {\n }", "public void release() {\r\n return;\r\n }", "public void close()\n {\n synchronized (m_lock)\n {\n // We are closed hence, decouple all threads from the pool\n for (int i = 0; i < m_pool.length; i++)\n {\n if (null != m_pool[i])\n {\n m_pool[i].release();\n \n m_pool[i] = null;\n }\n }\n \n m_closed = true;\n }\n }", "void freeaddrinfo(Pointer res);", "@Override\n\tpublic void removeBan(String ip) throws Exception {\n\n\t}", "private native static void free(long instance);", "@Override\n\tpublic void release() {\n\t}", "@Override\n\tpublic void release() {\n\t\t\n\t}", "public void markIpAddressDelete() throws JNCException {\n markLeafDelete(\"ipAddress\");\n }", "@Override\n\tpublic void release() {\n\n\t}", "@Override\n\tpublic void release() {\n\n\t}", "public void release(Connection value) {\n\t\t\n\t}", "public synchronized void release(int id)\r\n\t{\r\n\t\tSystem.out.println(\"Process_\" + id + \" released SR1.\");\r\n\t\tnotify();\r\n\t\t//releases one of the available instances\r\n\t\tavail1++;\r\n\t}", "public void release()\n \t{\n \t\tif( iterator == null )\n \t\t{\n \t\t\tindex = new SpatialIndex();\n \t\t\tedgeAllocator = 0;\n \t\t\tmergeOps = null;\n \t\t\t\n \t\t\tSystem.gc();\n \t\t}\n \t}", "public void release_pid(int pid)\n {\n pid_map[pid-MIN_PID] = false;\n }", "void release(PooledObject<T> t);", "void setPoolNumber(int poolNumber);", "public static void releaseRecycledViewPool() {\n sRecycledViewPool.clear();\n }", "void _release();", "Endpoint<R> tryInvalidateOneIdleEndpoint(String ipAddress);", "void releaseInstance();", "protected void release()\n {\n }", "public void free();", "public void forceClose()\n {\n if (_isClosed)\n return;\n \n _isClosed = true;\n \n if (log.isLoggable(Level.FINE))\n log.fine(\"closing pool \" + getName());\n }", "final void release() {\n mem.release();\n }", "public void releaseObject(Object object) {\n\n log.debug(\"Pool \" + this + \" object released: \" + object);\n\n Object pooled = null;\n try {\n factory.returnObject(object);//do this first\n pooled = factory.translateObject(object);\n } catch (Exception e) {\n return; // We can't release it if the factory can't recognize it\n }\n if (pooled == null) // We can't release it if the factory can't recognize it\n return;\n boolean removed = false;\n synchronized (objects) {\n ObjectRecord rec = (ObjectRecord) objects.get(pooled);\n if (rec == null) // Factory understands it, but we don't\n throw new IllegalArgumentException(\"Object \" + object + \" is not in pool \" + poolName + \"!\");\n if (!rec.isInUse()) return; // Must have been released by GC?\n if (object instanceof PooledObject)\n ((PooledObject) object).removePoolEventListener(this);\n removed = deadObjects.remove(object);\n rec.setInUse(false);\n if (removed) {\n log.debug(\"Object was dead: \" + object);\n objects.remove(pooled);\n rec.close();\n } // end of if ()\n\n }//end of synch on objects\n if (removed) {\n try {\n factory.deleteObject(pooled);\n } catch (Exception e) {\n log.error(\"Pool \" + this + \" factory (\" + factory.getClass().getName() + \" delete error: \", e);\n }\n fillToMin();\n /*FIXME --MINSIZE\n if(objects.size() < minSize)\n createNewObject(null);\n */\n }\n\n if (removed)\n log.debug(\"Pool \" + this + \" destroyed object \" + object + \".\");\n else\n log.debug(\"Pool \" + this + \" returned object \" + object + \" to the pool.\");\n\n permits.release();\n /*\n if(blocking)\n {\n synchronized(this)\n {\n notify();\n }\n }\n */\n }", "@Override\n public void release() {\n \n }", "public void freeInstance()\n {\n }", "public void freeInstance()\n {\n }", "public void release() throws JenaProviderException {\t\t\n\t}", "public abstract void free();", "@Override\r\n\tpublic void release() {\n\r\n\t}", "private void releaseService() {\n unbindService(connection);\n connection = null;\n Log.d(TAG, \"releaseService() unbound.\");\n }", "@Override\n\tpublic void release() {\n\t\tsuper.release();\n\t\t\n\t\tthis.privilegeCode = null;\n\t\tthis.controlId = null;\n\t\tthis.controlType = null;\n\t\tthis.desc = null;\n\t}", "public InetAddress close() {\r\n\t\t//\"disattivo\" la chatroom in attesa che venga eliminata dalla hash \r\n\t\t//map che la contiene\r\n\t\tsynchronized (this) {\r\n\t\t\tactive = false;\r\n\t\t}\r\n\t\t\r\n\t\t//notifico a tutti i suoi iscritti che sta per essere cancellata\r\n\t\tsubscribers.notifyAllClose(this);\r\n\t\t\r\n\t\treturn address;\r\n\t}", "public void changeOwnIP(InetAddress newOwnIP){\n boolean bound = false;\n\n this.ownIP = newOwnIP;\n\n this.packetLock.lock();\n\n this.ds.close();\n\n\n while (!bound) {\n try {\n this.ds = new DatagramSocket(null);\n InetSocketAddress isa = new InetSocketAddress(this.ownIP, this.ownPort);\n this.ds.bind(isa);\n bound = true;\n this.ds.setSendBufferSize(3000000);\n //System.out.println(\"(FASTUNICASTSENDER) BOUND TO \" + this.ownIP + \":\" + this.ownPort);\n //changeHasConnection(true);\n this.packetLock.unlock();\n\n } catch (SocketException e) {\n //System.out.println(\"(FASTUNICASTSENDER) ERROR BINDING TO \" + this.ownIP + \":\" + this.ownPort);\n e.printStackTrace();\n }\n\n if(!bound){\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }\n }", "@Override\n public void run() {\n addresses.remove(address);\n }", "public void drain() {\n\t\tsynchronized (list) {\n\t\t\tfor (int i = 0; i < list.size(); ++i) {\n\t\t\t\tPooled<T> pt = list.remove();\n\t\t\t\tcreator.destroy(pt.content);\n\t\t\t\tpt.logTarget.log(\"Pool drained \", creator.toString());\n\t\t\t}\n\t\t\tcount = spares = 0;\n\t\t}\n\n\t}", "public static void shutdownConnPool() {\n\t\ttry {\n\t\t\tBoneCP connectionPool = SQLDataBaseConnector.getConnectionPool();\n\t\t\tif (connectionPool != null) {\n\t\t\t\tconnectionPool.shutdown(); // this method must be called only\n\t\t\t\t\t\t\t\t\t\t\t// once when the application stops.\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void release(String id);", "void destroy() throws CouldNotDestroyConnectionPoolException, InterruptedException;", "public void deallocateNode(){\n this.processId = NO_PROCESS;\n this.full = false;\n }", "void release();", "void release();", "synchronized void unpin(ExerciseBuffer buff) {\n buff.unpin();\n if (!buff.isPinned() && (unpinnedBufferList.size() < bufferpool.length)){ // unpinnedBufferList length should not exceed the bufferpool length \n numAvailable++;\n unpinnedBufferList.add(buff); // adding to the tail\n \n }\n }", "public synchronized void release() {\n m_available = true;\n notify();\n }", "public void markIpAddress2Delete() throws JNCException {\n markLeafDelete(\"ipAddress2\");\n }", "public void markIpAddress2Delete() throws JNCException {\n markLeafDelete(\"ipAddress2\");\n }", "public final void release() { \n native_release();\n }", "public void free() {\n byteBase.free();\n byteBase = null;\n }", "public synchronized void emptyPool(){\n // Iterate over the entire pool closing the JDBC connections\n for(int x=0; x<pool.size();x++){\n PooledConnection pcon = (PooledConnection)pool.elementAt(x);\n //If the PooledConnection is not in use, close it.\n if(pcon.inUse() == false){\n pcon.close();\n }\n else{\n // If it's still in use, sleep 30 secs and force close\n try{\n java.lang.Thread.sleep(30000);\n pcon.close();\n }catch(InterruptedException ie){\n System.err.println(ie.getMessage() + \" in ConnectionPool.emptyPool()\");\n }\n }\n }\n }", "void unsetPoolRaces();", "public synchronized String getIP()\r\n\t{\r\n\t\tboolean done = false;\r\n\t\tboolean found = false;\r\n\t\tString ip=null;\r\n\r\n\t\t//debug\r\n\t\t//for(int i = 0; i < AllocList.size();i++)\r\n\t\t//\tSystem.out.println(\"getIP \" + AllocList.get(i));\r\n\t\t\r\n\t\tfor(int i=0; i< DefaultList.size() && !done;i++)\r\n\t\t{\r\n\r\n\t\t\tif(!AllocList.contains(DefaultList.get(i)))\r\n\t\t\t{\r\n\t\t\t\tdone = true;\r\n\t\t\t\tfound = true;\r\n\t\t\t\tSystem.out.println(\"Found a Free IP : \" + DefaultList.get(i));\r\n\t\t\t\tip = (String) DefaultList.get(i);\r\n\t\t\t\tAllocList.add(ip);\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tFile fp = new File(HASHMAPFILE);\r\n\t\t\t\t\tif(fp.exists())\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\tFileWriter fw = new FileWriter(fp.getAbsoluteFile(),true);\r\n\t\t\t\t\t\tfw.write(ip);\r\n\t\t\t\t\t\tfw.flush();\r\n\t\t\t\t\t\tfw.write(\"\\r\\n\");\r\n\t\t\t\t\t\tfw.flush();\r\n\t\t\t\t\t\tfw.close();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tSystem.out.println(\"ERROR !! updating to file \" + HASHMAPFILE);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"ERROR !! Could not open the file \" + HASHMAPFILE + e.getMessage());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t\tif(found)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"getIP returns : \" + ip);\r\n\t\t\treturn ip;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"@@@@ No IP avaialble, increase the IP Pool\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public void release() {\r\n pageEL = null;\r\n params = null;\r\n super.release();\r\n }" ]
[ "0.6171328", "0.60617495", "0.60444736", "0.6004843", "0.5841537", "0.5793887", "0.57473105", "0.5731901", "0.5727929", "0.56286687", "0.56227124", "0.56158125", "0.5584017", "0.5535378", "0.5534965", "0.5528022", "0.5490847", "0.54784334", "0.54784334", "0.54754966", "0.5471024", "0.54657245", "0.54656255", "0.5460005", "0.5455983", "0.5451367", "0.544347", "0.5421174", "0.5421174", "0.5396856", "0.53849274", "0.53807014", "0.537025", "0.5357545", "0.5355912", "0.5355912", "0.535186", "0.53464645", "0.53464645", "0.53464645", "0.5345006", "0.5332686", "0.5328217", "0.5326861", "0.53135335", "0.52964264", "0.5286716", "0.5277415", "0.52758783", "0.52637017", "0.5261451", "0.5256728", "0.52548426", "0.525402", "0.52462494", "0.5245642", "0.5245642", "0.52455235", "0.52390456", "0.5226105", "0.5223047", "0.5214185", "0.52115804", "0.5204415", "0.5192245", "0.5188687", "0.5180973", "0.51801443", "0.51786995", "0.5169818", "0.5166627", "0.51620823", "0.5154871", "0.5152597", "0.5152597", "0.51482075", "0.51313317", "0.51283824", "0.5122579", "0.5116349", "0.511447", "0.5109396", "0.5098386", "0.5092372", "0.50905335", "0.50806093", "0.5069127", "0.5067601", "0.50661284", "0.50661284", "0.5057511", "0.50532377", "0.5053097", "0.5053097", "0.5037672", "0.503304", "0.5029848", "0.5026997", "0.5022062", "0.50212896" ]
0.6122781
1
Created by Ojha.Sandeep on 11/28/2017.
public interface IServiceHistoryView extends IBaseView { public void getServiceHistoryData(ServiceHistoryDO serviceHistoryDO); public void showAlert(String message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n public void func_104112_b() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo4359a() {\n }", "private void m50366E() {\n }", "@Override\n public void init() {\n\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "protected boolean func_70814_o() { return true; }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n protected void getExras() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n public void init() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n void init() {\n }", "private void init() {\n\n\t}", "@Override public int describeContents() { return 0; }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "private void kk12() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n protected void init() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public void init() {}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "public void mo6081a() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo12628c() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n public int getSize() {\n return 1;\n }", "public Pitonyak_09_02() {\r\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "private MetallicityUtils() {\n\t\t\n\t}" ]
[ "0.58928263", "0.57083267", "0.57023424", "0.5697384", "0.5569095", "0.5569095", "0.5564329", "0.55628663", "0.5534599", "0.5500088", "0.5464996", "0.54629046", "0.5462397", "0.54484534", "0.54446244", "0.541627", "0.5409088", "0.54025906", "0.5392686", "0.5382115", "0.53697723", "0.53570443", "0.5348325", "0.5340293", "0.5332906", "0.5328043", "0.5323618", "0.53165466", "0.53165466", "0.53165466", "0.53165466", "0.53165466", "0.53165466", "0.53100824", "0.53100824", "0.53100824", "0.53100824", "0.53100824", "0.530886", "0.5308267", "0.5305183", "0.5296017", "0.52904886", "0.52904886", "0.5289527", "0.5285126", "0.52750945", "0.52750945", "0.52750945", "0.52750945", "0.52750945", "0.52750945", "0.52750945", "0.5267331", "0.5265469", "0.52631134", "0.52524364", "0.5249156", "0.5242602", "0.52397245", "0.52333474", "0.5232229", "0.52142346", "0.5211269", "0.5211269", "0.5211269", "0.52008176", "0.51989806", "0.51980823", "0.51976794", "0.5196583", "0.51965326", "0.51965326", "0.51965326", "0.5193576", "0.5188273", "0.5188273", "0.51757765", "0.51756346", "0.51635593", "0.51588285", "0.5154666", "0.51542014", "0.5153327", "0.5153327", "0.51420057", "0.51420057", "0.51420057", "0.51371205", "0.5131358", "0.51294994", "0.5125573", "0.512246", "0.5119186", "0.51180863", "0.5118074", "0.5112781", "0.5111923", "0.5110173", "0.5109244", "0.5108771" ]
0.0
-1
gets mainController and mainModel
void injectMainControllerAndMainModel(MainAnchorPaneController mainAnchorPaneController, ActiveTeamingSystem mainModel) { this.mainAnchorPaneController = mainAnchorPaneController; this.systemModel = mainModel; // for debugging check that the main controller and model was injected successfully! System.out.println("Voting Controller contains Main Controller? " + (this.mainAnchorPaneController!=null)); System.out.println("Voting Controller contains Main Model? " + (this.systemModel!=null)); // also, initialize required fields }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Main ()\n\t{\n\t\tview = new View ();\t\t\n\t\tmodel = new Model(view);\n\t\tcontroller = new Controller(model, view);\n\t}", "public MainController() {\n\t\tcontroller = new Controller(this);\n\t}", "public void setMainController(MainController mainController) {\n this.mainController = mainController;\n }", "public MainController() {\n initializeControllers();\n initializeGui();\n runGameLoop();\n }", "private MainModel() {\n jsonManager = new JsonManager(this);\n }", "public void injectMainController(MainController mainController){this.mainController = mainController;}", "public static synchronized MainModel getInstance() {\n\n if (instance == null)\n instance = new MainModel();\n\n return instance;\n\n }", "public MainScreenController getMainScreenController() {\n return mainScreenController;\n }", "public void setAppMainController(AppMainController ctrl) {\n appMainController = ctrl;\n }", "public MainEntry() {\n\t\tthis.taskController = new Controller();\n\t}", "public void setMainApp(Main main) {\n\t\tthis.main = main;\n\t\tthis.primaryStage = main.getPrimaryStage();\n\t\n\t\tmasterSearchData = FXCollections.observableArrayList();\n\t\tpresentationSearchData = FXCollections.observableArrayList();\n\t\n\t\tmasterInventoryData = FXCollections.observableArrayList();\n\t\tpresentationInventoryData = FXCollections.observableArrayList();\n\t\n\t\tmasterInitialData = FXCollections.observableArrayList();\n\t\tpresentationInitialData = FXCollections.observableArrayList();\n\t\n\t\tpresentationSearchData.addAll(masterSearchData);\n\t\tpresentationInventoryData.addAll(masterInventoryData);\n\t\tpresentationInitialData.addAll(masterInitialData);\n\n\t\ttableView.setItems(presentationSearchData);\n\t}", "private static CompanyController initializeController() {\n\n controller = new CompanyController();\n return controller;\n }", "public mainLayoutController() {\n\t }", "public final void init(final MainController mainController) {\n this.mainController = mainController;\n }", "public MainForm getMainForm(){\n\t\treturn this.mainForm;\n\t}", "public ProjectController(final MainController mainController) {\n\n\t\tthis.mainController = mainController;\n\n\t\tif (mainController == null) {\n\t\t\tthrow new NullPointerException(\"MainController is null!\");\n\t\t}\n\n\t\tnotificationAUI = mainController.getNotificationAUI();\n\t\tprojectAUI = new ArrayList<>();\n\t\tcompanyAUI = new ArrayList<>();\n\t}", "public T getMain() {\n\t\treturn this.main;\n\t}", "public UserPersonalInfoController() {\n\t\tMainAllControllers = controllers.MainAllControllers.getInstance();\n\t}", "public ImportTestsController() {\n App app = App.getInstance();\n Company company = app.getCompany();\n clientStore = company.getClientStore();\n authFacade = company.getAuthFacade();\n testStore = company.getTestStore();\n testTypeStore = company.getTestTypeStore();\n parameterStore = company.getParameterStore();\n clinicalStore = company.getClinicalStore();\n }", "@Override\n public void setMainController(MainController mainController) {\n super.setMainController(mainController);\n quizStateChanger.setMainController(mainController);\n getProgramModel().getQuizMidiHandler().setMidiHandler(getMidiHandler());\n quizStateChanger.setMidiHandler(getProgramModel().getQuizMidiHandler());\n }", "public MainWindowViewController getMainWindowViewController() {\n return mainWindowViewController;\n }", "void createMainContent() {\n appContent = new DashboardMain(this);\n }", "public ProcessController processController() {\r\n\t\treturn modelController;\r\n\t}", "public void setController(MainController controller) {\n this.controller = controller;\n initValues();\n }", "public DomeinController() {\r\n DAOFactory.initFactory();\r\n gebruikerRepository = new GebruikerRepository();\r\n presentatieRepository = new PresentatieRepository();\r\n inschrijvingRepository = new InschrijvingRepository();\r\n campusRepository = new CampusRepository();\r\n lokaalRepository = new LokaalRepository();\r\n gastRepository = new GastRepository();\r\n bpCoordinator = gebruikerRepository.getBpCoordinator();\r\n }", "public MainController(Core core, UIUtils uiUtils, LifeCycle lifeCycle, MainViewImpl mainView) {\r\n super();\r\n\r\n this.core = core;\r\n this.uiUtils = uiUtils;\r\n this.lifeCycle = lifeCycle;\r\n this.mainView = mainView;\r\n }", "public End_User_0_Controller() {\r\n\t\t// primaryStage = Users_Page_Controller.primaryStage;\r\n\t\t// this.Storeinfo = primaryStage.getTitle();\r\n\t}", "public RequisitoController(Livro livro,MainController mainController) {\r\n\t\t name = livro.getName();\r\n\t\t barcode = livro.getBarcode();\r\n\t\t reservado = livro.isReservado();\r\n\t\t this.mainController = mainController;\r\n\t}", "public MainGUI() {\n\t\tString xmlpath = \"classpath:applicationContext.xml\";\n\t\tApplicationContext applicationContext = new ClassPathXmlApplicationContext(xmlpath);\n\t\t\n\t\tcenter = (CenterController)applicationContext.getBean(\"CenterController\");\n\t\t\n\t\tinitialize();\n\t\t\n\t}", "public static void main(String[] args) {\n MainController mainController = new MainController();\n mainController.showView();\n SessionManager.getSessionManager().getSession();\n }", "public abstract void initController();", "public Controller getController();", "public void setMainApp(Main mainApp) {\n this.mainApp = mainApp;\n\n // Add observable list data to the table\n // personTable.setItems(mainApp.getPersonData());\n }", "public GameController() {\r\n\t\tsuper();\r\n\t\tthis.model = Main.getModel();\r\n\t\tthis.player = this.model.getPlayer();\r\n\t\tthis.timeline = this.model.getIndefiniteTimeline();\r\n\t}", "static RatAppModel getInstance() {return model;}", "private void initializeMealsControllers() {\n trNewPetMeal = MealsControllersFactory.createTrNewPetMeal();\n trObtainAllPetMeals = MealsControllersFactory.createTrObtainAllPetMeals();\n trDeleteMeal = MealsControllersFactory.createTrDeleteMeal();\n trUpdateMeal = MealsControllersFactory.createTrUpdateMeal();\n }", "public void injectMainController(Controller controller) {\n\t\tthis.controller = controller;\n\t}", "public static BaseStationController getController()\r\n {\r\n \treturn controller;\r\n }", "public static void main(String[] args) {\n//\n// controller.setSoldierRank(0, \"Turai\");\n// controller.addModel(new Model(2, \"Lera\", \"RavSamal\"));\n// controller.updateViews();\n\n Controller controller = new Controller();\n controller.addModel(new Model(1, \"Gal\", \"Citizen\"));\n controller.addModel(new Model(12121, \"bubu\", \"Smar\"));\n controller.addModel(new Model(624, \"Groot\", \"Tree\"));\n controller.addModel(new Model(-10, \"Deadpool\", \"Awesome\"));\n controller.addModel(new Model(100, \"Nikita\", \"Citizen\"));\n\n controller.presentUI();\n\n controller.updateViews();\n }", "public RunMVC() {\n\n\t\t//cria o Modelo e a Visao\n\t\tModel myModel \t= new Model();\n\t\tView myView \t= new View();\n\t\t//View outraView \t= new View();\n\t\tOutraView outraView \t= new OutraView();\n\n\t\t//avisa o modelo que a visao existe \n\t\tmyModel.addPropertyChangeListener(myView);\n\t\tmyModel.addPropertyChangeListener(outraView);\n\n\t\tController myController = new Controller();\n\t\tmyController.addModel(myModel);\n\t\t//myController.addView(myView);\n\t\t//myController.addView(outraView);\n\t\tmyController.initModel(start_value);\n\n\t\t//tell View about Controller \n\t\tmyView.addController(myController);\n\t\toutraView.addController(myController);\n\t\t\n\n\t}", "@SideOnly(Side.CLIENT)\n public static void initModels() {\n }", "private void initializeExerciseControllers() {\n trAddExercise = ExerciseControllersFactory.createTrAddExercise();\n trDeleteExercise = ExerciseControllersFactory.createTrDeleteExercise();\n trUpdateExercise = ExerciseControllersFactory.createTrUpdateExercise();\n trAddWalk = ExerciseControllersFactory.createTrAddWalk();\n trGetAllWalks = ExerciseControllersFactory.createTrGetAllWalks();\n trGetAllExercises = ExerciseControllersFactory.createTrGetAllExercises();\n }", "public void setMainApp(MainApp mainApp) {\n\t\tthis.mainApp = mainApp;\n\n\t\t// Add observable list data to the table\n\t\t//personTable.setItems(mainApp.getPersonData());\n\t}", "public TipoComponenteController() {\r\n\t\ttipoComponenteVOs = ((TipoComponenteDTO)this.read()).getTipoComponenteVOs();\r\n\t}", "public HotelworkerInfouiController() {\n\t\tuserbl = new UserController();\n\t}", "public Controller() {\n this.model = new ModelFacade();\n this.view = new ViewFacade();\n }", "public void initMainLayout() {\n\t\ttry {\n\t\t\t// Load root layout from fxml file.\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApp.class.getResource(\"view/MainLayout.fxml\"));\n\t\t\trootLayout = (BorderPane) loader.load();\n\n\t\t\t// Show the scene containing the root layout.\n\t\t\tScene scene = new Scene(rootLayout);\n\t\t\tprimaryStage.setScene(scene);\n\t\t\tprimaryStage.show();\n\n\t\t\tMainLayoutController mainLayoutController = loader.getController();\n\t\t\tmainLayoutController.setMainApp(this);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t\n\t\t}\n\t}", "@Override\r\n//\tpublic Application getModel() {\r\n//\n//\t\treturn application;\r\n//\t}\r\n\t\r\n\tpublic Application getModel() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn application;\r\n\t}", "public testDatabaseAppController()\n\t{\n\t\tdataController = new testDatabaseController(this);\n\t\tqueryList = new ArrayList<QueryInfo>();\n\t\tappFrame = new testDatabaseFrame(this);\n\t}", "public MainWindow getMainWindow(){\n\t\treturn mainWindow;\n\t}", "public testDatabaseController getDataController()\n\t{\n\t\treturn dataController;\n\t}", "private void initController() {\n frame.addWindowListener( new WindowAdapter() {\n public void windowClosing(WindowEvent e) {\n model.closeConnection();\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }\n });\n }", "public String getMain() {\n\t\treturn main;\n\t}", "@Override\n public void start(Stage primaryStage) throws Exception{\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/application/views/MainMenu.fxml\")); //open up the menu on start up\n Parent root = loader.load();\n MainMenuController controller = loader.getController();\n NameModelManager model = new NameModelManager(); //construct the list of name models1\n CSSManager cssManager = new CSSManager();\n controller.initialise(model, cssManager);\n primaryStage.setTitle(\"Name Sayer\");\n primaryStage.setScene(new Scene(root, 1200, 700));\n primaryStage.show();\n primaryStage.setResizable(false);\n\n primaryStage.setOnCloseRequest(e ->{ //confirmation box for exiting program\n e.consume();\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Quit?\");\n alert.setHeaderText(\"Are you sure you want to exit?\");\n alert.setContentText(\"Hit OK to quit\");\n Optional<ButtonType> result = alert.showAndWait();\n if (result.get() == ButtonType.OK){\n primaryStage.close();\n System.exit(0);\n }\n });\n }", "@Override\n protected void initModel() {\n bannerModel = new BannerModel();\n// homeSousuoModel = new Home\n\n// bannerModel = new BannerModel();\n// homeSousuoModel = new HomeSousuoModel();\n// izxListModelBack = new\n }", "private void setupController() {\n setupWriter();\n Controller controller1 = new Controller(writer);\n controller = controller1;\n }", "public MainPanel getMainPanel() {\n return mainPanel;\n }", "public Controller()\n\t{\n\t\ttheParser = new Parser();\n\t\tstarList = theParser.getStars();\n\t\tmessierList = theParser.getMessierObjects();\n\t\tmoon = new Moon(\"moon\");\n\t\tsun = new Sun(\"sun\");\n\t\tconstellationList = theParser.getConstellations();\n\t\tplanetList = new ArrayList<Planet>();\n\t\ttheCalculator = new Calculator();\n\t\tepoch2000JD = 2451545.0;\n\t}", "public void setMainApp(MainApp mainApp, ClientManager clientManager) {\n this.mainApp = mainApp;\n this.clientManager = clientManager;\n\n // Add observable list data to the table\n ObservableList<Client> test;\n test = clientManager.getClientData();\n //System.out.println(\"Dans Set main app : test = \"+test);\n informationsClients.setItems(clientManager.getClientData());\n\n }", "public void setMainApp(MainApp mainApp) {\n this.mainApp = mainApp;\n\n // Add observable list data to the table\n personTable.setItems(mainApp.getPersonData());\n }", "private void initializeMedicationControllers() {\n trNewPetMedication = MedicationControllersFactory.createTrNewPetMedication();\n trObtainAllPetMedications = MedicationControllersFactory.createTrObtainAllPetMedications();\n trDeleteMedication = MedicationControllersFactory.createTrDeleteMedication();\n trUpdateMedication = MedicationControllersFactory.createTrUpdateMedication();\n }", "@Override\r\n\tpublic void init() throws ServletException {\n\t\tsuper.init();\r\n\t\r\n\t\tpdmodel = new pedidoModel();\r\n\t\tcmodel = new clienteModel();\r\n\t\tcnmodel = new cancionModel();\r\n\t}", "public void setMainApp(MainApp mainApp) {\n this.mainApp = mainApp;\n\n // Add observable list data to the table\n TaxiTable.setItems(mainApp.getTaxiData());\n }", "public interface AuthoringModelController {\n\n\t/**\n\t * Save the current state of the current level a game being authored.\n\t *\n\t * @param saveName\n\t * the name to assign to the save file\n\t */\n\tvoid saveGameState(File saveName);\n\n\t/**\n\t * Load the detailed state of a game for a particular level, including\n\t * high-level information and elements present.\n\t *\n\t * @param saveName\n\t * the name used to save the game authoring data\n\t * @param level\n\t * the level of the game which should be loaded\n\t * @throws IOException\n\t * if the save name does not refer to existing files\n\t */\n\tvoid loadOriginalGameState(String saveName, int level) throws IOException;\n\n\t/**\n\t * Export a fully authored game, including all levels, into an executable file.\n\t */\n\tvoid exportGame();\n\n\t/**\n\t * Create a new level for the game being authored. Saves the state of the\n\t * current level being authored when the transition occurs.\n\t *\n\t * @param level\n\t * the number associated with the new level\n\t */\n\tvoid createNewLevel(int level);\n\n\t/**\n\t * Delete the previously created level.\n\t *\n\t * @param level\n\t * the level to delete\n\t * @throws IllegalArgumentException\n\t * if level does not exist\n\t */\n\tvoid deleteLevel(int level) throws IllegalArgumentException;\n\n\t/**\n\t * Get the top-level configuration options for a game element definition.\n\t *\n\t * @return a map from the name of the configuration option to set to a list of\n\t * choices for that option\n\t */\n\tMap<String, List<String>> getElementBaseConfigurationOptions();\n\n\t/**\n\t * Get auxiliary configuration elements for a game element, based on top-level\n\t * configuration choices.\n\t *\n\t * @return a map from the name of the configuration option to its class type\n\t */\n\tMap<String, Class> getAuxiliaryElementConfigurationOptions(Map<String, String> baseConfigurationChoices);\n\n\t/**\n\t * Define a new type of element for the game being authored. Elements of this\n\t * type will be created by the model based on its properties, assuming defaults\n\t * where necessary. This method should not be used for updating properties of an\n\t * existing template, the updateElementDefinition method should be used for that\n\t * instead.\n\t *\n\t * @param elementName\n\t * the template name assigned to this element, for future reuse of\n\t * the properties\n\t * @param properties\n\t * a map containing the properties of the element to be created\n\t * @throws IllegalArgumentException\n\t * if the template already exists.\n\t */\n\tvoid defineElement(String elementName, Map<String, String> properties) throws IllegalArgumentException;\n\n\t/**\n\t * Update an existing template by overwriting the specified properties to their\n\t * new specified values. Should not be used to create a new template, the\n\t * defineElement method should be used for that.\n\t * \n\t * @param elementName\n\t * the name of the template to be updated\n\t * @param propertiesToUpdate\n\t * the properties to update\n\t * @param retroactive\n\t * whether previously created elements of this type must have their\n\t * properties updated\n\t * \n\t * @throws IllegalArgumentException\n\t * if the template does not already exist\n\t */\n\tvoid updateElementDefinition(String elementName, Map<String, String> propertiesToUpdate, boolean retroactive)\n\t\t\tthrows IllegalArgumentException;\n\n\t/**\n\t * Delete a previously defined template\n\t * \n\t * @param elementName\n\t * name of the template to delete\n\t * @throws IllegalArgumentException\n\t * if the template does not already exist\n\t */\n\tvoid deleteElementDefinition(String elementName) throws IllegalArgumentException;\n\n\t/**\n\t * Place a game element of previously defined type within the game.\n\t *\n\t * @param elementName\n\t * the template name for the element\n\t * @param startCoordinates\n\t * the coordinates at which the element should be placed\n\t * @return a unique identifier for the sprite abstraction representing the game\n\t * element\n\t */\n\tint placeElement(String elementName, Point2D startCoordinates);\n\n\t/**\n\t * Add element of given name\n\t * \n\t * @param elementName\n\t */\n\tvoid addElementToInventory(String elementName);\n\n\t/*\n\t * Place a game element of previously defined type within the game which follows\n\t * a path defined in the authoring environment as it moves.\n\t *\n\t * @param elementName the template name for the element\n\t * \n\t * @param pathList a list of points the object should target as it moves\n\t * \n\t * @return a unique identifier for the sprite abstraction representing the game\n\t * element\n\t */\n\tint placePathFollowingElement(String elementName, PathList pathList);\n\n\t/**\n\t * Retrieve the inventory for the current level\n\t * \n\t * @return set of element names that can be placed in the current level\n\t */\n\tSet<String> getInventory();\n\n\t/**\n\t * Get the ImageView corresponding to a particular spriteId\n\t * \n\t * @param spriteId\n\t * id of the sprite whose image is to be retrieved, previously\n\t * generated by controller\n\t * @return ImageView representing the GameElement\n\t */\n\tImageView getRepresentationFromSpriteId(int spriteId);\n\n\t/**\n\t * Get the high-level status of a game in-progress, notably points, lives, etc\n\t * \n\t *\n\t * @return a map of relevant details to display or modify about the game\n\t */\n\tMap<String, Double> getStatus();\n\n\t/**\n\t * Retrieve information on the cost of each element in terms of the various\n\t * resources\n\t * \n\t * @return map of element name to its cost in terms of each resource\n\t */\n\tMap<String, Map<String, Double>> getElementCosts();\n\n\t/**\n\t * Move a previously created game element to a new location.\n\t *\n\t * @param elementId\n\t * elementId the unique identifier for the element\n\t * @param xCoordinate\n\t * the new horizontal position of the element within the game\n\t * @param yCoordinate\n\t * the new vertical position of the element within the game\n\t */\n\tvoid moveElement(int elementId, double xCoordinate, double yCoordinate);\n\n\t/**\n\t * Update the properties of a particular game element, without changing the\n\t * definition of its type.\n\t *\n\t * @param elementId\n\t * the unique identifier for the element\n\t * @param propertiesToUpdate\n\t * a map containing the new properties of the element\n\t */\n\tvoid updateElementProperties(int elementId, Map<String, String> propertiesToUpdate);\n\n\t/**\n\t * Delete a previously created game element.\n\t *\n\t * @param elementId\n\t * the unique identifier for the element\n\t */\n\tvoid deleteElement(int elementId);\n\n\t/**\n\t * Fetch all available game names and their corresponding descriptions\n\t * \n\t * @return map where keys are game names and values are game descriptions\n\t */\n\tMap<String, String> getAvailableGames();\n\n\t/**\n\t * Get a map of properties for a particular game element, so as to allow for\n\t * their displaying in a modification area of the display.\n\t *\n\t * @param elementId\n\t * the unique identifier for the game element\n\t * @return a map of properties for the element with this identifier\n\t * @throws IllegalArgumentException\n\t * if the element ID does not refer to a created element\n\t */\n\tMap<String, String> getElementProperties(int elementId) throws IllegalArgumentException;\n\n\t/**\n\t * Get a map of properties for an element template / model, so as to allow for\n\t * their displaying in a modification area of the display\n\t * \n\t * @param elementName\n\t * the template name for the element\n\t * @return a map of properties for the template with this identifier\n\t * @throws IllegalArgumentException\n\t * if the element name does not refer to a defined template\n\t */\n\tMap<String, String> getTemplateProperties(String elementName) throws IllegalArgumentException;\n\n\t/**\n\t * Get map of all defined template names to their properties\n\t * \n\t * @return map of template names to properties of each template\n\t */\n\tMap<String, Map<String, String>> getAllDefinedTemplateProperties();\n\n\tMap<String, Double> getResourceEndowments();\n\n\t/**\n\t * Set the name of the game being authored.\n\t *\n\t * @param gameName\n\t * the name of the game\n\t */\n\tvoid setGameName(String gameName);\n\n\t/**\n\t * Set the description of a game being authored.\n\t *\n\t * @param gameDescription\n\t * the description authored for the game\n\t */\n\tvoid setGameDescription(String gameDescription);\n\n\t/**\n\t * Set the victory condition for the current level of the game being authored\n\t * \n\t * @param conditionIdentifier\n\t * the description of the victory condition, which can be mapped to a\n\t * boolean state function\n\t */\n\tvoid setVictoryCondition(String conditionIdentifier);\n\n\t/**\n\t * Set the defeat condition for the current level of the game being authored\n\t * \n\t * @param conditionIdentifier\n\t * the description of the defeat condition, which can be mapped to a\n\t * boolean state function\n\t */\n\tvoid setDefeatCondition(String conditionIdentifier);\n\n\t/**\n\t * Set a top-level game status property (e.g. lives, starting resources, etc)\n\t *\n\t * @param property\n\t * name of the property to set\n\t * @param value\n\t * string representation of the property's new value\n\t */\n\tvoid setStatusProperty(String property, Double value);\n\n\t/**\n\t * Set the resource endowments for the current level\n\t * \n\t * @param resourceEndowments\n\t * map of resource name to amount of that resource to begin that\n\t * level with\n\t */\n\tvoid setResourceEndowments(Map<String, Double> resourceEndowments);\n\n\t/**\n\t * Set the resource endowment of a specific resource name\n\t * @param resourceName\n\t * @param newResourceEndowment\n\t */\n\tvoid setResourceEndowment(String resourceName, double newResourceEndowment);\n\t\n\t/**\n\t * Set the cost of an element in terms of various resources\n\t * \n\t * @param elementName\n\t * the template name for the element\n\t * @param unitCosts\n\t * map of resource name to cost in terms of that resource for this\n\t * element\n\t */\n\tvoid setUnitCost(String elementName, Map<String, Double> unitCosts);\n\n\t/**\n\t * Set the behavior and parameters of the wave\n\t * \n\t * @param waveProperties\n\t * a map containing the properties of the wave to be created\n\t * @param elementNames\n\t * name of elements to spawn\n\t * @param spawningPoint\n\t * the point at which to spawn the wave\n\t */\n\tvoid setWaveProperties(Map<String, String> waveProperties, Collection<String> elementNamesToSpawn,\n\t\t\tPoint2D spawningPoint);\n\n\t/**\n\t * Retrieve a collection of descriptions of the possible victory conditions\n\t * \n\t * @return a collection of strings describing the possible victory conditions\n\t * that can be assigned for a given level\n\t */\n\tCollection<String> getPossibleVictoryConditions();\n\n\t/**\n\t * Retrieve a collection of descriptions of the possible defeat conditions\n\t * \n\t * @return a collection of strings describing the possible defeat conditions\n\t * that can be assigned for a given level\n\t */\n\tCollection<String> getPossibleDefeatConditions();\n\n}", "private void initBefore() {\n // Crear Modelo\n model = new Model();\n\n // Crear Controlador\n control = new Controller(model, this);\n\n // Cargar Propiedades Vista\n prpView = UtilesApp.cargarPropiedades(FICHERO);\n\n // Restaurar Estado\n control.restaurarEstadoVista(this, prpView);\n\n // Otras inicializaciones\n }", "PersonalDetailsController(){\n hrDB=new HRDatabase();\n }", "public String getMainClass() {\n return mainClass;\n }", "public frmModelMainForm() {\n initComponents();\n }", "public VentaMainView() {\n initComponents();\n controlador = new VentaController();\n this.setLocationRelativeTo(null);\n cargarCategorias();\n cargarArticulos();\n }", "public void setMainApp(MainApp mainApp) {\r\n\t\tthis.mainApp = mainApp;\r\n\r\n\t\timageDownloaderTable.setItems(mainApp.getImageDownloadTasks());\r\n\t}", "public ProjectViewController(){\n InputStream request = appController.httpRequest(\"http://localhost:8080/project/getProject\", \"GET\");\n try {\n String result = IOUtils.toString(request, StandardCharsets.UTF_8);\n Gson gson = new Gson();\n this.projectModel = gson.fromJson(result, ProjectModel.class);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) { //type “psvm + tab” to autocreate this\n // directing the server to immediate files it should access. Just like index\n staticFileLocation(\"/public\");\n\n\n // routes as per their handlebars templates. Make sure to read and understand what they do\n get(\"/\", (req, res) -> {\n Map<String, Object> model = new HashMap<>();\n return new ModelAndView(model, \"index.hbs\");\n }, new HandlebarsTemplateEngine());\n\n get(\"/animalnew\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n return new ModelAndView(model, \"animalForm.hbs\");\n }, new HandlebarsTemplateEngine());\n\n get(\"/endangerednew\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n return modelAndView(model,\"endangeredForm.hbs\");\n }, new HandlebarsTemplateEngine());\n\n get(\"/sightingsnew\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n return modelAndView(model,\"sightingsForm.hbs\");\n }, new HandlebarsTemplateEngine());\n\n get(\"/animals\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n List peter = Endangered.relative_All();\n System.out.println(peter.get(0));\n model.put(\"endangered\", peter);\n return modelAndView(model, \"endangered.hbs\");\n }, new HandlebarsTemplateEngine());\n\n\n get(\"/sightings\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n return modelAndView(model, \"sightings.hbs\");\n }, new HandlebarsTemplateEngine());\n\n get(\"/saved\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n List sightings = Sightings.retrieveFromSightings();\n model.put(\"sightings\", sightings);\n return new ModelAndView(model,\"sight.hbs\");\n }, new HandlebarsTemplateEngine());\n\n\n get(\"/newanimal\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n List animal = Animal.relative_All();\n model.put(\"animals\", animal);\n return new ModelAndView(model, \"wildlife.hbs\");\n }, new HandlebarsTemplateEngine());\n\n get(\"/animals/:id/edit\", (request, response) -> {\n Map<String, Object> model = new HashMap<String, Object>();\n model.put(\"animal\", Animal.find(Integer.parseInt(request.params(\":id\"))));\n return new ModelAndView(model, \"editForm.hbs\");\n }, new HandlebarsTemplateEngine());\n\n\n get(\"/animals/:id/delete\", (request, response) -> {\n Map<String, Object> model = new HashMap<String, Object>();\n Animal.find(Integer.parseInt(request.params(\":id\"))).delete();\n response.redirect(\"/animals\");\n return null;\n }, new HandlebarsTemplateEngine());\n\n\n post(\"/animals/:id/edit\", (request, response) -> {\n Map<String, Object> model = new HashMap<String, Object>();\n int id = Integer.parseInt(request.params(\":id\"));\n String name = request.queryParams(\"name\");\n Animal animal = Animal.find(id);\n animal.setName(name);\n animal.update();\n return new ModelAndView(model, \"ess.hbs\");\n }, new HandlebarsTemplateEngine());\n\n\n post(\"/succ\", (req, res) -> { //new\n Map<String, Object> model = new HashMap<>();\n String animalname = req.queryParams(\"animalname\");\n String rangername = req.queryParams(\"ranger\");\n String location = req.queryParams(\"location\");\n Sightings sightings = new Sightings(animalname,rangername,location);\n sightings.save();\n model.put(\"sightings\", sightings);\n return modelAndView(model, \"succ.hbs\");\n }, new HandlebarsTemplateEngine());\n\n\n\n //post methods\n post(\"/success\", (req, res) -> {\n Map<String, Object> model = new HashMap<>();\n String name = req.queryParams(\"name\");\n String health = req.queryParams(\"health\");\n String age = req.queryParams(\"age\");\n Endangered endangered = new Endangered(name, health, age);\n endangered.save();\n System.out.println(\"Please enter all input fields.\");\n return new ModelAndView(model,\"success.hbs\");\n }, new HandlebarsTemplateEngine());\n\n post(\"/wildlife\", (req, res) -> {\n Map<String, Object> model = new HashMap<>();\n String name = req.queryParams(\"name\");\n Animal animal = new Animal(name);\n animal.save();\n return new ModelAndView(model,\"ess.hbs\");\n }, new HandlebarsTemplateEngine());\n }", "void makeMainListCall() {\n\n mViewModel.getProgressDialog().observe(this, isLoading -> {\n if (isLoading != null) {\n mLoadingView.setVisibility(isLoading ? View.VISIBLE : View.GONE);\n if (isLoading) {\n mErrorTextView.setVisibility(View.GONE);\n mListView.setVisibility(View.GONE);\n }\n }\n });\n mViewModel.getMainListData().observe(this, new Observer<ListData>() {\n @Override\n public void onChanged(@Nullable ListData listData) {\n mSwipeRefresh.setRefreshing(false);\n getActivity().setTitle(listData.getTitle());\n mMainListData = listData;\n mAboutListAdapter.setData(mMainListData.getRows());\n mErrorTextView.setVisibility(View.GONE);\n mListView.setVisibility(View.VISIBLE);\n }\n });\n\n mViewModel.getErrorMsg().observe(this, new Observer<String>() {\n @Override\n public void onChanged(@Nullable String s) {\n mSwipeRefresh.setRefreshing(false);\n mErrorTextView.setVisibility(View.VISIBLE);\n mListView.setVisibility(View.GONE);\n }\n });\n mViewModel.makeMainListCall();\n }", "public static Stage getMainStage(){\r\n return mainStage;\r\n }", "IAnjaroController getController();", "public MainNode getMainList() {\n return mainList;\n }", "public NewClientController() {\n this.clientParser = NewClientView.getClientParser();\n }", "Model getModel();", "Model getModel();", "Model getModel();", "public Controller(){\r\n\t\tthis.fabricaJogos = new JogoFactory();\r\n\t\tthis.loja = new Loja();\r\n\t\tthis.preco = 0;\r\n\t\tthis.desconto = 0;\r\n\t}", "public void setApp(MainFXApplication main) {\n mainApplication = main;\n database = mainApplication.getUsers();\n\n }", "private void initialiseController() \r\n {\r\n defaultVectors();\r\n if(grantsByPIForm == null) \r\n {\r\n grantsByPIForm = new GrantsByPIForm(); //(Component) parent,modal);\r\n }\r\n grantsByPIForm.descriptionLabel.setText(UnitName);\r\n grantsByPIForm.descriptionLabel.setFont(new Font(\"SansSerif\",Font.BOLD,14));\r\n queryEngine = QueryEngine.getInstance();\r\n coeusMessageResources = CoeusMessageResources.getInstance();\r\n registerComponents();\r\n try {\r\n setFormData(null);\r\n }\r\n catch(Exception e) {\r\n e.printStackTrace(System.out);\r\n }\r\n }", "public FetchingAllDataModel() {\n\n context = AppController.getInstance().getApplicationContext();\n }", "public MainController(){\n allShelves = new List[2];\n allShelves[0] = new List<File>(); //Beachtet die unterschiedliche Instanziierung! Was bedeutet das?\n allShelves[1] = new List<>();\n createFiles();\n }", "public MainWindow getMainWindow() {\n\t\treturn mainWindow;\n\t}", "public void setMainApp(MainApp mainApp) {\n this.mainApp = mainApp;\n\n // Add observable list data to the table\n filmTable.setItems(mainApp.getFilteredData());\n }", "private void setUpController(){\n\n SessionController.getInstance().addCommand(new PartyCreateCommand(\"PARTY_CREATE\"));\n SessionController.getInstance().addCommand(new PartyDetailsRetrieveCommand(\"PARTY_DETAILS_RETRIEVE\"));\n SessionController.getInstance().addCommand(new PartyInvitesRetrieveCommand(\"PARTY_INVITES_RETRIEVE\"));\n SessionController.getInstance().addCommand(new PartyLeaveCommand(\"PARTY_LEAVE\"));\n SessionController.getInstance().addCommand(new PartyMemberRemoveCommand(\"PARTY_MEMBER_REMOVE\"));\n SessionController.getInstance().addCommand(new PlayerCreateCommand(\"PLAYER_CREATE\"));\n SessionController.getInstance().addCommand(new PlayerInvitesRetrieveCommand(\"PLAYER_INVITES_RETRIEVE\"));\n SessionController.getInstance().addCommand(new PlayerLogOutCommand(\"PLAYER_LOG_OUT\"));\n }", "public Controller() {\n\t\t//Set the file to null as default\n\t\tprojectFile = null;\n\t\t\n\t\t//Set the action log\n\t\tactionLog = new ActionLog(this);\n\t\t\n\t\t//Set the selected instrument ID\n\t\tselectedInstrumentID = 0;\n\t\t\n\t\t//Set the gson reader/writer\n\t\tgson = new GsonBuilder()\n\t\t\t\t.setPrettyPrinting()\n\t\t\t\t.create();\n\t\t\n\t\t//Set the File Chooser\n\t\tfileChooser = new FileChooser();\n\t\t\n\t\tfileChooser.setTitle(\"Save Project\");\n\t\t\n\t\tfileChooser.getExtensionFilters().add(new ExtensionFilter(\"JSON\", \"*.json\"));\n\t\t\t\t\n\t\t//Set note frequencies\n\t\tnoteFrequencies = new double[]{-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0};\n\t\t\n\t\t//Set selected notes\n\t\tselectedNotes = new Button[] {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null};\n\t}", "public void setMainApp(MainApp mainApp) {\n\t\t// Add observable list data to the table\n\t\tstagiereTable.setItems(mainApp.stagiaireData());\n\t}", "public void loadMainMenuView()\n\t{\n\n\t\ttry {\n\t\t\tprimaryStage.setTitle(\"Onitama\");\n\t\t\tGridPane root = new GridPane();\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/MainMenu.fxml\"));\n\t\t\troot = loader.load();\n\t\t\tMainMenuViewController viewController = (MainMenuViewController) loader.getController();\n\t\t\tviewController.setOnitamaController(onitamaController);\n\t\t\tviewController.init();\n\t\t\t\n\n\t\t\tScene scene = new Scene(root);\n\t\t\t//((Stage) outerPane.getScene().getWindow()).setScene(scene);\n\t\t\t//LoadViewController.primaryStage.setScene(scene);\n\t\t\tPlatform.runLater(() -> { LoadViewController.primaryStage.setScene(scene); });\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static TrainingController getInstance(){\n if( singleInstance == null )\n singleInstance = new TrainingController();\n return singleInstance;\n }", "public MainFrameController() {\n }", "public void setMainApp(MainFXApplication main) {\n mainFXApplication = main;\n initializeTable();\n }", "public void setMainApp(MainApp mainApp);", "public static WorkerController getInstance(){\r\n\t\tWorkerController workerController = new WorkerController();\r\n\t\tworkerController.workerobj = new JSONObject();\r\n\t\treturn workerController;\r\n\t}", "boolean InitController();", "protected BattleMainState mainState(){\n return new BattleMainState(\n this.mFightButton,\n this.mPokemonButton,\n this.mBagButton,\n this.mRunButton,\n this.mActionButton,\n this.mOptionList,\n this.mBattle,\n this.mMessage\n );\n }", "public Controller() {\n model = new Model();\n comboBox = new ChannelComboBox();\n initView();\n new ChannelWorker().execute();\n timer = new Timer();\n }", "private TopComponentContextSubModel getContextSubModel() {\n if (topComponentContextSubModel == null) {\n topComponentContextSubModel = new TopComponentContextSubModel();\n }\n return topComponentContextSubModel;\n }" ]
[ "0.6738932", "0.67170656", "0.6637495", "0.6447511", "0.6421946", "0.64018476", "0.63625777", "0.6347061", "0.60159814", "0.5988453", "0.59148014", "0.59056383", "0.58907056", "0.5878134", "0.5864238", "0.5760315", "0.5716669", "0.5708788", "0.56762755", "0.5626372", "0.56136405", "0.55945635", "0.5526451", "0.55166006", "0.5513262", "0.55083334", "0.54917496", "0.5491541", "0.5485137", "0.5480172", "0.5478798", "0.54718554", "0.54700845", "0.5452411", "0.5451091", "0.5437023", "0.5423777", "0.5422255", "0.5419294", "0.54165155", "0.53964394", "0.53902614", "0.5373509", "0.53697515", "0.5361531", "0.536009", "0.53537494", "0.53517216", "0.53487575", "0.5345011", "0.53414947", "0.5333089", "0.53152883", "0.5299224", "0.52983326", "0.52871954", "0.528266", "0.5277718", "0.5270954", "0.52563095", "0.5251275", "0.5244691", "0.523625", "0.5216051", "0.52152056", "0.521361", "0.52125776", "0.52105993", "0.52022433", "0.51903844", "0.51794595", "0.51768136", "0.5175945", "0.5174032", "0.5159175", "0.5153047", "0.51528746", "0.51499146", "0.51499146", "0.51499146", "0.5139385", "0.5139122", "0.51377046", "0.5136613", "0.51357317", "0.51346785", "0.513252", "0.5131945", "0.5128855", "0.51188654", "0.5113953", "0.5107426", "0.5107135", "0.5104707", "0.5098088", "0.50933284", "0.50855327", "0.50835276", "0.50814605", "0.5079075" ]
0.7053487
0
System.out.println("ID: " + datagram.id); System.out.println("Value: " + datagram.value);
@Override public void onNewDatagram(SimpleAsciiProtocol.Datagram datagram) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String toString() {\treturn id + \" [\" + value + \"]\" ;}", "godot.wire.Wire.ValueOrBuilder getDataOrBuilder();", "DatagramPacket getPacket() {\n return packet;\n }", "godot.wire.Wire.Value getData();", "public java.lang.String getUDP1() {\n return UDP1;\n }", "public byte[] getDatagramFragment() {\n\t\tbyte[] datagram=new byte[icmp_body.length-4];\n\t\tSystem.arraycopy(icmp_body,4,datagram,0,datagram.length);\n\t\treturn datagram;\n\t\t\n\t}", "public String getDeviceid() {\n return deviceid;\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn type+\"(\"+id+\",\"+\"(\"+value+\")\"+\")\";\r\n\t}", "public String toString() {\r\n\treturn data;\r\n }", "Datty getDatty();", "public int getGdp(){\n return gdp;\n }", "public String data() {\n return this.data;\n }", "public java.lang.String getDID() {\r\n return DID;\r\n }", "@Override\n\tpublic String readDatagram() {\n\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tSystem.out.print(\"MAC ADRESS: \");\n\t\tString mac = null;\n\t\ttry {\n\t\t\tmac = br.readLine();\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\tif (mac.equals(\"quit\")){\n\t\t\tclose();\n\t\t\treturn null;\n\t\t}\n\t\tSystem.out.print(\"DATAGRAM: \");\n\t\tString datagram = null;\n\t\ttry {\n\t\t\tdatagram = br.readLine();\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\tif (datagram.equals(\"quit\")){\n\t\t\tclose();\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn mac+\";\"+datagram;\n\t}", "public String toString(){ \n\t return id+\" \"+name+\" \"+address; \n\t }", "@Override\n\tpublic String toString() {\n\t\treturn data.toString();\n\t}", "@Override\n public String toString() {\n return \" \" + this.data;\n }", "com.zzsong.netty.protobuff.two.ProtoData.Dog getDog();", "public String getData() {\n\treturn data;\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn data;\r\n\t}", "@Override\n public Object getData() {\n return devices;\n }", "public String toString() {\n\t\treturn data.toString();\n }", "@Override\n default UserpostPrx ice_datagram()\n {\n return (UserpostPrx)_ice_datagram();\n }", "private byte[] ionBytes(IonValue val)\n {\n IonDatagram dg = system().newDatagram(val);\n return dg.getBytes();\n }", "public String getData() {\n return message;\n }", "public Integer getDevid() {\n return devid;\n }", "@Override\n\tpublic String toString() {\n\t\treturn String.format(\"%s:%s\", type, value);\n\t}", "public int getSipDscp();", "public int getAtt(){ \r\n return att;\r\n }", "@java.lang.Override\n public java.lang.String getD() {\n java.lang.Object ref = d_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n d_ = s;\n return s;\n }\n }", "@Override // com.amap.api.col.stln3.nd\n public final String d() {\n StringBuffer stringBuffer = new StringBuffer();\n stringBuffer.append(\"key=\");\n stringBuffer.append(qy.f(this.i));\n stringBuffer.append(\"&userid=\");\n stringBuffer.append(this.j);\n return stringBuffer.toString();\n }", "public String toString() {\n\t\treturn data.toString();\n\t}", "public String toString() {\n\t\treturn data.toString();\n\t}", "public int getDmaValue();", "public InetSocketAddress getDataAddress()\n {\n return rtpTarget;\n }", "public String getDeviceId() {\n return this.DeviceId;\n }", "public String toString()\r\n\t{\r\n\t\treturn data.toString();\r\n\t}", "java.lang.String getField1168();", "public D getData(){\n\t\treturn data;\n\t}", "public String toString(){\n return data+\" \"; \n }", "public String toString() {\n/* 47 */ String retVal = \"id= \" + this.id + \", name= \" + this.name + \", buff= \" + this.buff;\n/* 48 */ return retVal;\n/* */ }", "public String getData()\n {\n return data;\n }", "java.lang.String getData();", "public LWTRTPdu data(Object chatPdu) throws IncorrectTransitionException;", "public java.lang.String getUDP2() {\n return UDP2;\n }", "@Override\n public String toString() {\n return id.toString();\n }", "java.lang.String getDeviceId();", "String getData();", "@Override\n\tpublic Serializable[] getData() {\n\t Double light = 0.0, temperature = 0.0;\n\t int packetType = 0;\n\t \n\t light = ((int) (Math.random() * 10000)) / 10.0;\n\t temperature = ((int) (Math.random() * 1000)) / 10.0;\n\t packetType = 2;\n\t\treturn new Serializable[] { packetType, temperature, light };\n\t}", "public java.lang.String getPatientID(){\n return localPatientID;\n }", "public java.lang.String getPatientID(){\n return localPatientID;\n }", "@Override\n public String toString() {\n return id;\n }", "public static String get() {\n\t\treturn \"udpports get\" + delimiter + \"udpports get \";\n\t}", "public String toString() {\n return \"\" + data;\n }", "public String getData() {\r\n return this.data;\r\n }", "public String getDNI(){\n return dni;\n }", "public String getData()\n\t{\n\t\treturn data;\n\t}", "static protected void readContent(DatagramPacket dp) throws IOException {\r\n\t\t ByteArrayInputStream biStream = new ByteArrayInputStream(dp.getData(), 0, dp.getLength());\r\n\t\t DataInputStream diStream = new DataInputStream(biStream);\r\n\t\t message = diStream.readUTF();\r\n\t\t System.out.println(\"Messaggio ricevuto: \"+message);\r\n\t\t readMessage();\r\n\t }", "public java.lang.String getD() {\n java.lang.Object ref = d_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n d_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n\tpublic String toString() {\n\t\treturn id;\n\t}", "public String data() {\n\t\tBundle bundle = this.getIntent().getExtras();\n\t\t// ii == 從 schedule_id取得的專案ID\n\t\tii = bundle.getString(\"id\");\n\t\tLog.d(\"data\", ii);\n\t\treturn ii;\n\t}", "private void savePaketdata(DatagramPacket udpPacket)throws IOException{\n // Get IP address and port.\n InetAddress address = udpPacket.getAddress();\n int port = udpPacket.getPort();\n // Get packet length\n int length = udpPacket.getLength();\n // Get the payload and print.\n ObjectInputStream iStream = new ObjectInputStream(new ByteArrayInputStream(udpPacket.getData()));\n try {\n Product product = (Product)iStream.readObject();\n if(product.getValueOfProduct() < MIN_VALUE_OF_PRODUCT){\n makeOrder(new SensorData(product,port,address,length));\n }\n saveSensorData(address,port,product,length);\n String tmp = \"Client buy: \" + \"0 \" + \"no\" + \" and pay \" + \"no\" + \" euro.\";\n sendAnswer(new SensorData(product,port,address,length),tmp);\n iStream.close();\n //printPacketData(address,port,length,product);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }", "public String getDomicilio(){\n return domicilio;\n }", "@Override\n public String toString() {\n return this.data.toString();\n }", "public String getIdentification ()\n {\n return this.toString();\n }", "public java.lang.String getDM() {\r\n return localDM;\r\n }", "@Override\n public String toString() {\n return id.toString();\n }", "public String getId(){ return ID; }", "public String deviceId() {\n return this.deviceId;\n }", "public String toString() {\n return value;\r\n }", "private String getPacketData(){\n\t\tString str = \"\";\n\t\tfor(int i=0;i<lenth_get/5;i++){\n\t\t\tstr = str + originalUPLMN[i];\n\t\t}\n\t\tif(DBUG){\n\t\t\tif(DEBUG) Log.d(LOG_TAG, \"getPacketData---str=\"+str);\n\t\t}\n\t\treturn str;\n\t}", "public synchronized DatagramSocket getDatagramSocket() {\r\n\t\treturn datagramSocket;\r\n\t}", "teledon.network.protobuffprotocol.TeledonProtobufs.Donatie getDonatie();", "teledon.network.protobuffprotocol.TeledonProtobufs.Donatie getDonatie();", "public String getData() {\r\n return Data;\r\n }", "public String getData() {\r\n return Data;\r\n }", "int getReceiverid();", "com.google.protobuf.ByteString getDetailsBytes();", "public String toString() {\n return id;\n }", "public String toString() {\n return this.UID;\n }", "public String toString(){\r\n\t\treturn(ssid+\",\"+mac+\",\"+frequency+\",\"+signal+\",\");\r\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public void get()\n {\n Session session = new Session(\"udp:\"+\"\"+\"/161\", writer);\n\n // creating PDU\n session.getBulk(\"1.3.6.1.2.1.1.1\");\n session.getBulk(\"1.3.6.1.2.1.1.2\");\n\n List<String> oList = new ArrayList<String>();\n oList.add(\"1.3.6.1.2.1.25.3.2.1.3.768\");\n oList.add(\"1.3.6.1.2.1.25.3.2.1.3.770\");\n\n session.get(oList);\n\n\n // creating PDU\n session.walk(\"1.3.6.1.2.1.25.3.2.1.3\");\n\n // wait for all sessions to complete\n while (!session.isComplete())\n {\n session.printStats();\n try {\n Thread.currentThread();\n Thread.sleep(100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }//sleep for 100 ms\n\n }\n session.printStats();\n writer.close();\n }", "java.lang.String getField1750();", "public void run (){ //el metodo run pertenece a extend Thread\n //Recibimos los mensajes por el puerto 5000\n try {\n socket = new DatagramSocket(7000);\n while (true){ //que siempre lo haga\n byte[] buffer = new byte[100];\n //empaquetamos el datagrama\n DatagramPacket packet = new DatagramPacket( buffer, buffer.length);\n socket.receive(packet);\n String mensajeEntrante = new String(packet.getData()).trim(); //trim parte el packet.get data\n \n // Reenvio de mensaje version Cristian:\n // Obtener el ip automaticamente\n //dividimos el string por : y obtenemos e[0] la ip y [1] el puerto\n SocketAddress iport= packet.getSocketAddress();\n String i = iport.toString();\n String red = i.replace(\"/\", \"\");\n String[] portip = red.split(\":\");\n String ip = portip[0];\n String port = portip[1];\n System.out.println(mensajeEntrante);\n observer.recibirMensaje(mensajeEntrante, ip, port);\n \n }\n } catch (SocketException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n}", "@Override\n public String getDeviceId() {\n return this.strDevId;\n }", "public String toString(){\n\t\treturn \"ID : \"+id+\"\\nNom : \"+nom+\"\\nMdp : \"+mdp;\n\t}", "@Override\n public int getDeviceId() {\n return 0;\n }", "@Override\n public String toString(){\n return partnerDeviceNum;\n }", "public String getDevice_id() {\r\n\t\treturn device_id;\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn value;\n\t}", "public String getData() {\r\n\t\treturn data;\r\n\t}", "public String getData() {\n\t\treturn this.data;\n\t}", "@java.lang.Override\n public godot.wire.Wire.ValueOrBuilder getDataOrBuilder() {\n return getData();\n }", "public String getMyDeviceId() {\n return myDeviceId;\n }", "io.dstore.values.StringValue getPersonOutputCharacteristics();", "public int get_eddid() {\n return _eddid;\n }" ]
[ "0.5784945", "0.5767121", "0.57281464", "0.5681505", "0.5656881", "0.5564768", "0.55293405", "0.5516132", "0.54969895", "0.5462105", "0.54618347", "0.5447879", "0.53958", "0.5380329", "0.5370564", "0.5363986", "0.53469527", "0.5328903", "0.53137314", "0.53118753", "0.5307084", "0.5305673", "0.5282608", "0.52811074", "0.52699983", "0.52575403", "0.525234", "0.52441317", "0.5243637", "0.5239892", "0.5228903", "0.52225107", "0.52225107", "0.5220752", "0.52202094", "0.5213041", "0.5209604", "0.5198767", "0.5183633", "0.51826185", "0.5174435", "0.51694757", "0.5154136", "0.5150253", "0.5149158", "0.5149026", "0.51479745", "0.51474947", "0.5147449", "0.51417947", "0.51417947", "0.51331687", "0.5130454", "0.5124866", "0.5116646", "0.51131904", "0.5107976", "0.5104909", "0.5104632", "0.5097011", "0.5092975", "0.50903183", "0.50870353", "0.5081385", "0.50813454", "0.5077653", "0.50766486", "0.50716597", "0.5064192", "0.5061834", "0.5061439", "0.50607306", "0.50592333", "0.50592333", "0.5046005", "0.5046005", "0.5045032", "0.5043839", "0.5043645", "0.50371593", "0.50281763", "0.50278324", "0.50278324", "0.50278324", "0.50278324", "0.50191295", "0.50146496", "0.501456", "0.5014532", "0.5013173", "0.50128645", "0.50118506", "0.501182", "0.5006712", "0.5006232", "0.5001605", "0.50002784", "0.49997637", "0.4997741", "0.49930945" ]
0.55964816
5
Created by mkononen on 03/02/17.
public interface DeviceRegistry { void registerRS232Device(RS232Device device); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "private stendhal() {\n\t}", "private void poetries() {\n\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "public void method_4270() {}", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void init() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n public void init() {}", "@Override\n\tpublic void init() {\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public abstract void mo70713b();", "public void mo21877s() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private void strin() {\n\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo12628c() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void m23075a() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public void skystonePos4() {\n }", "private void m50367F() {\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "public void mo21779D() {\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void mo21825b() {\n }", "public void mo21878t() {\n }", "@Override public int describeContents() { return 0; }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}" ]
[ "0.58271897", "0.57442296", "0.5686869", "0.56865996", "0.5681795", "0.5668807", "0.5630355", "0.5616841", "0.5590238", "0.5589224", "0.55793333", "0.55787104", "0.55669224", "0.5560591", "0.5560591", "0.5558251", "0.55379426", "0.55372256", "0.55350506", "0.5534437", "0.5534437", "0.5534437", "0.5534437", "0.5534437", "0.5508244", "0.55042386", "0.5497725", "0.5497389", "0.54882663", "0.5482236", "0.54773694", "0.5473361", "0.5461375", "0.5460601", "0.5452636", "0.54490936", "0.54471004", "0.54455113", "0.54161674", "0.54161674", "0.5379088", "0.53772825", "0.53729755", "0.53711706", "0.53700215", "0.53700215", "0.53700215", "0.5361033", "0.53571105", "0.5351404", "0.5351404", "0.5351404", "0.53352237", "0.53305894", "0.53289723", "0.53289723", "0.53289723", "0.5325062", "0.5314595", "0.53118294", "0.5311629", "0.5311629", "0.5311629", "0.5311629", "0.5311629", "0.5311629", "0.5311629", "0.5310887", "0.5309398", "0.5308967", "0.5308332", "0.5305201", "0.5305201", "0.5302854", "0.5301086", "0.5300996", "0.5292061", "0.5291414", "0.5288622", "0.5279225", "0.5278491", "0.52667373", "0.5263297", "0.5263297", "0.5263297", "0.5263297", "0.5263297", "0.5263297", "0.5261641", "0.5256143", "0.5255894", "0.52468073", "0.5243002", "0.52418053", "0.52340215", "0.52335066", "0.52226675", "0.52207917", "0.5219375", "0.5219375", "0.52141225" ]
0.0
-1
Created by Zhen Weiyu on 2017/4/19.
public interface PluginInterface { public void attach(Activity proxyActivity); public void onCreate(Bundle saveInstanceState); public void onStart(); public void onResume(); public void onPause(); public void onStop(); public void onDestroy(); public void onSaveInstanceState(Bundle outSate); public boolean onTouchEvent(MotionEvent event); public void onBackPressed(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n protected void initialize() {\n\n \n }", "public final void mo51373a() {\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void init() {\n }", "@Override\n protected void initialize() \n {\n \n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private void poetries() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void init() {}", "public void mo38117a() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void init() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo4359a() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public void initialize() {\n \n }", "@Override\n public int describeContents() { return 0; }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n public void initialize() { \n }", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "Petunia() {\r\n\t\t}", "private void strin() {\n\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }" ]
[ "0.6085585", "0.6018567", "0.575713", "0.5740668", "0.5740668", "0.57214063", "0.56553954", "0.5639528", "0.5635825", "0.56313545", "0.56220794", "0.55950093", "0.5591746", "0.55774504", "0.5566102", "0.5566102", "0.5566102", "0.5566102", "0.5566102", "0.5566102", "0.5559092", "0.5555079", "0.5551712", "0.55320376", "0.55316293", "0.55251384", "0.55215013", "0.5519531", "0.55128145", "0.55072", "0.54927164", "0.54901546", "0.5478465", "0.5473673", "0.5473673", "0.5473673", "0.5473673", "0.5473673", "0.54617083", "0.5461459", "0.5460135", "0.5450173", "0.5445983", "0.5442304", "0.5440852", "0.54281664", "0.54281664", "0.5427492", "0.5427492", "0.54224396", "0.54224396", "0.54224396", "0.54066426", "0.5405355", "0.5400618", "0.5400618", "0.5400618", "0.5400364", "0.5399764", "0.5398224", "0.5398224", "0.538642", "0.53809994", "0.5372116", "0.5355595", "0.5351859", "0.5343997", "0.5343997", "0.5343997", "0.53307337", "0.5327906", "0.5327001", "0.5327001", "0.5327001", "0.5314698", "0.5310643", "0.5310643", "0.5310643", "0.5310643", "0.5310643", "0.5310643", "0.5310643", "0.5304142", "0.53033787", "0.5302201", "0.5282452", "0.5268984", "0.52589816", "0.52588886", "0.52540016", "0.52505213", "0.52486163", "0.52438265", "0.52438265", "0.52438265", "0.52438265", "0.52438265", "0.52438265", "0.52438265", "0.52438265", "0.52438265" ]
0.0
-1
FileOutputStream out = new FileOutputStream(new File(tempdir,filename)); localdir = new File(this.job.config.localdirpath); if(!localdir.exists()) localdir.mkdirs();
void init() throws Exception { this.hdfsdir = new Path(job.config.hdfsdatadirpath); if(this.job.genlocalfile()) { datafile = new File(localdir,taskInfo.filename); if(datafile.exists()) datafile.delete(); datafile.createNewFile(); writer = new PrintWriter(new BufferedWriter(new FileWriter(datafile))); } else { hdfsdatafile = new Path(job.getHdfsdatadirpath(),taskInfo.filename); out=job.getFileSystem().create(hdfsdatafile); writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(out,"UTF-8"))); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void copyHadoopTmpDir() {\n final String tmpDirProperty =\n PluginMiniHBaseClusterSingleton.INSTANCE.getClusterConfiguration().get(\"hadoop.tmp.dir\");\n final File hadoopTmp = new File(tmpDirProperty);\n final File hadoopTmpCopy = new File(new File(_projectBuildDir), \"hadoop-tmp\");\n getLog().info(\"Copying \" + hadoopTmp.toString() + \" to \" + hadoopTmpCopy.toString());\n try {\n FileUtils.copyDirectory(hadoopTmp, hadoopTmpCopy);\n getLog().info(\"Successfully copied hadoop tmp dir.\");\n }\n catch (final IOException e) {\n getLog().warn(\"The Hadoop tmp dir could not be copied to the project's build directory.\", e);\n }\n }", "private Step createHdfsWorkingDir() {\n return stepBuilderFactory.get(STEP_CREATE_HDFS_WORK_DIR)\n .tasklet(createHdfsWorkingDir)\n .listener(new ExecutionContextPromotionListener() {\n\n @Override\n public ExitStatus afterStep(StepExecution stepExecution) {\n ExecutionContext stepContext = stepExecution.getExecutionContext();\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n String stepContextKey = STEP_CREATE_HDFS_WORK_DIR +\n Constants.PARAMETER_NAME_DELIMITER +\n CreateDirectoryTask.EnumOutParameter.NEW_DIRECTORY.getValue();\n String hdfsWorkingDir = (String) stepContext.get(stepContextKey);\n\n // Configure copy HDFS files task\n String jobContextKey = STEP_COPY_REMOTE_FILES +\n Constants.PARAMETER_NAME_DELIMITER +\n CopyFileTask.EnumInParameter.TARGET_PATH.getValue();\n\n if (stepContext.containsKey(stepContextKey)) {\n jobContext.put(jobContextKey, hdfsWorkingDir);\n }\n\n // Configure flink tasks\n jobContextKey = STEP_FLINK +\n Constants.PARAMETER_NAME_DELIMITER +\n EnumFlinkParameter.WORKING_DIRECTORY.getValue();\n jobContext.put(jobContextKey, hdfsWorkingDir);\n\n String meterDataFilename = hdfsWorkingDir + METER_DATA_FILENAME;\n\n jobContextKey = STEP_FLINK +\n Constants.PARAMETER_NAME_DELIMITER +\n \"input.file\";\n jobContext.put(jobContextKey, meterDataFilename);\n\n // Configure output filenames for import task\n String savingsFilename = hdfsWorkingDir + \"SavingsPotential\";\n\n\n jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.INPUT_FILENAME_SAVINGS.getValue();\n\n jobContext.put(jobContextKey, savingsFilename);\n\n String waterIqFilename = hdfsWorkingDir + \"WaterIQ\";\n\n jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.INPUT_FILENAME_WATER_IQ.getValue();\n\n jobContext.put(jobContextKey, waterIqFilename);\n\n // Configure delete HDFS files task\n jobContextKey = STEP_DELETE_HDFS_WORK_DIR +\n Constants.PARAMETER_NAME_DELIMITER +\n DeleteDirectoryTask.EnumInParameter.INPUT_DIRECTORY.getValue();\n jobContext.put(jobContextKey, hdfsWorkingDir);\n\n stepContextKey = STEP_CREATE_HDFS_WORK_DIR +\n Constants.PARAMETER_NAME_DELIMITER +\n CreateDirectoryTask.EnumOutParameter.HDFS_PATH.getValue();\n\n jobContextKey = STEP_DELETE_HDFS_WORK_DIR +\n Constants.PARAMETER_NAME_DELIMITER +\n DeleteDirectoryTask.EnumInParameter.HDFS_PATH.getValue();\n\n if (stepContext.containsKey(stepContextKey)) {\n jobContext.put(jobContextKey, stepContext.get(stepContextKey));\n }\n\n return null;\n }\n\n })\n .build();\n }", "private Step createLocalWorkingDir() {\n return stepBuilderFactory.get(STEP_CREATE_LOCAL_WORK_DIR)\n .tasklet(createLocalWorkingDir)\n .listener(new ExecutionContextPromotionListener() {\n\n @Override\n public ExitStatus afterStep(StepExecution stepExecution) {\n ExecutionContext stepContext = stepExecution.getExecutionContext();\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n // Share local working directory with other tasks\n String stepContextKey = STEP_CREATE_LOCAL_WORK_DIR +\n Constants.PARAMETER_NAME_DELIMITER +\n CreateDirectoryTask.EnumOutParameter.NEW_DIRECTORY.getValue();\n String localWorkingDir = (String) stepContext.get(stepContextKey);\n\n // Configure export meter serial task\n String jobContextKey = STEP_CREATE_SCENARIO_METER_FILE +\n Constants.PARAMETER_NAME_DELIMITER +\n ExportMeterDataToFileTask.EnumInParameter.WORKING_DIRECTORY.getValue();\n jobContext.put(jobContextKey, localWorkingDir);\n\n // Configure export meter data task\n jobContextKey = STEP_EXPORT_METER_DATA +\n Constants.PARAMETER_NAME_DELIMITER +\n ExportMeterDataToFileTask.EnumInParameter.WORKING_DIRECTORY.getValue();\n jobContext.put(jobContextKey, localWorkingDir);\n\n // Configure copy HDFS files task\n jobContextKey = STEP_COPY_REMOTE_FILES +\n Constants.PARAMETER_NAME_DELIMITER +\n CopyFileTask.EnumInParameter.SOURCE_PATH.getValue();\n jobContext.put(jobContextKey, localWorkingDir);\n\n // Configure delete local files task\n jobContextKey = STEP_DELETE_LOCAL_WORK_DIR +\n Constants.PARAMETER_NAME_DELIMITER +\n DeleteDirectoryTask.EnumInParameter.INPUT_DIRECTORY.getValue();\n jobContext.put(jobContextKey, localWorkingDir);\n\n return null;\n }\n\n })\n .build();\n }", "private static File createTempDir() {\n\t\tFile baseDir = new File(\"/opt/tomcat7/temp\");\r\n\t\tString baseName = \"omicseq-TempStorage\" + \"-\";\r\n\r\n\t\tfor (int counter = 0; counter < 10000; counter++) {\r\n\t\t\tFile tempDir = new File(baseDir, baseName + counter);\r\n\t\t\tif (!tempDir.exists()) {\r\n\t\t\t\tif (tempDir.mkdir())\r\n\t\t\t\t\treturn tempDir;\r\n\t\t\t} else\r\n\t\t\t\treturn tempDir;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private void markOutputDirSuccessful(JobContext context) throws IOException {\r\n JobConf conf = context.getJobConf();\r\n // get the o/p path\r\n Path outputPath = FileOutputFormat.getOutputPath(conf);\r\n if (outputPath != null) {\r\n // get the filesys\r\n FileSystem fileSys = outputPath.getFileSystem(conf);\r\n // create a file in the output folder to mark the job completion\r\n Path filePath = new Path(outputPath, SUCCEEDED_FILE_NAME);\r\n fileSys.create(filePath).close();\r\n }\r\n }", "@Before\n public void setUp() {\n context = new ClassPathXmlApplicationContext(new String[]{\"configuration/job-configuration.xml\"});\n // Get the bean to use to invoke the application\n jobLauncherTestUtils = (JobLauncherTestUtils) context.getBean(\"jobLauncherTestUtils\");\n try {\n inDir = new File(inputDirectory);\n FileUtils.copyFile(new File(PATH_FILE_CSV),\n new File(inputDirectory + CSV_FILE_NAME));\n FileUtils.forceMkdir(inDir);\n\n outDir = new File(outputDirectory);\n FileUtils.forceMkdir(outDir);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void commitJob(JobContext context) throws IOException {\n JobConf conf = context.getJobConf();\r\n Path outputPath = FileOutputFormat.getOutputPath(conf);\r\n if (outputPath != null) {\r\n FileSystem outputFileSystem = outputPath.getFileSystem(conf);\r\n Path tmpDir = new Path(outputPath, getJobAttemptBaseDirName(context) +\r\n Path.SEPARATOR + FileOutputCommitter.TEMP_DIR_NAME);\r\n FileSystem fileSys = tmpDir.getFileSystem(context.getConfiguration());\r\n if (fileSys.exists(tmpDir)) {\r\n fileSys.delete(tmpDir, true);\r\n } else {\r\n LOG.warn(\"Task temp dir could not be deleted \" + tmpDir);\r\n }\r\n\r\n //move the job output to final place\r\n Path jobOutputPath = \r\n new Path(outputPath, getJobAttemptBaseDirName(context));\r\n moveJobOutputs(outputFileSystem, \r\n jobOutputPath, outputPath, jobOutputPath);\r\n\r\n // delete the _temporary folder in the output folder\r\n cleanupJob(context);\r\n // check if the output-dir marking is required\r\n if (shouldMarkOutputDir(context.getJobConf())) {\r\n // create a _success file in the output folder\r\n markOutputDirSuccessful(context);\r\n }\r\n }\r\n }", "private void saveLocalFile(ByteArrayOutputStream out) {\n //sava in local files\n FileWriter fw;\n File file = new File(\"/home/shaowen2/testdata/\" + \"vm\" +servers.getServerAddress().substring(15, 17) +\"-ouput.log\");\n\n try {\n if (!file.exists()) {\n file.createNewFile();\n }\n fw = new FileWriter(file);\n BufferedWriter bw = new BufferedWriter(fw);\n bw.write(out.toString());\n //bw.write(\"\\n\" + \"Query Count:\" + count + \"|| Time:\" + new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(new Date()) + \"\\n\");\n bw.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void storageTotemp(Workbook workbook,HttpServletRequest req,String username){\n try{\n if(workbook==null||req==null||username==null||username.equals(\"\"))\n return;\n String path=req.getSession().getServletContext().getRealPath(\"\\\\\")+\"\\\\\"+REPOSITORY+\"\\\\\"+username+\"\\\\\"+TEMP;\n File filePath=new File(path);\n File targetFile=new File(filePath,name);\n if(!filePath.exists()){\n filePath.mkdirs();\n }\n if(targetFile.exists()){\n return;\n }\n FileOutputStream out=new FileOutputStream(targetFile);\n workbook.write(out);\n out.close();\n workbook.close();\n }catch (Exception ex){\n ex.printStackTrace();\n }\n }", "private static File prepareTempFolder() {\n File result;\n try {\n result = java.nio.file.Files.createTempDirectory(\n DCOSService.class.getSimpleName()).toFile();\n System.out.println(result.toString());\n\n return result;\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "@Test\n public void testStorageLocationMkdirs() throws Exception {\n MemoryBackendCheckpointStorageAccess storage =\n new MemoryBackendCheckpointStorageAccess(\n new JobID(), randomTempPath(), null, DEFAULT_MAX_STATE_SIZE);\n\n File baseDir = new File(storage.getCheckpointsDirectory().getPath());\n assertFalse(baseDir.exists());\n\n // mkdirs only be called when initializeLocationForCheckpoint\n storage.initializeLocationForCheckpoint(177L);\n assertTrue(baseDir.exists());\n }", "public static void setWorkOutputDir(TaskAttemptContext context)\n throws IOException\n {\n Configuration conf = context.getConfiguration();\n String outputPath = getOutputDir(conf);\n // we need to do this to get the task path and set it for mapred\n // implementation since it can't be done automatically because of\n // mapreduce->mapred abstraction\n if (outputPath != null) {\n FileOutputCommitter foc =\n new FileOutputCommitter(getOutputPath(conf), context);\n Path path = foc.getWorkPath();\n FileSystem fs = path.getFileSystem(conf);\n fs.mkdirs(path);\n conf.set(\"mapred.work.output.dir\", path.toString());\n LOG.info(\"Setting mapred.work.output.dir to {}\", path.toString());\n }\n }", "private void createresultDir() throws IOException\n\t{\n\t\tString datepattern = \"yyyy-MM-dd\";\n\t\tSimpleDateFormat sdf =new SimpleDateFormat(datepattern);\n\t\t RESULTDIR = Parameters.RESULT_LOCAL_DIR+'/'+sdf.format(new Date());\n\t\t boolean exists = (new File(Parameters.RESULT_LOCAL_DIR)).exists();\n\t\t if (!exists)\n\t\t\t (new File(Parameters.RESULT_LOCAL_DIR)).mkdirs();\n\t\t exists = (new File(RESULTDIR)).exists();\n\t\t if (!exists)\n\t\t\t (new File(RESULTDIR)).mkdirs();\n\t\t boolean append = true;\n\t FileHandler fh = new FileHandler(RESULTDIR+\"/report.log\", append);\n\t fh.setFormatter(new LogFormatter());\n\t logfile.addHandler(fh);\n\t}", "private static Path localTemp(Configuration conf, int taskId, int attemptId) {\n String localDirs = conf.get(\"mapreduce.cluster.local.dir\");\n Random rand = new Random(Objects.hashCode(taskId, attemptId));\n String[] dirs = localDirs.split(\",\");\n String dir = dirs[rand.nextInt(dirs.length)];\n\n try {\n return FileSystem.getLocal(conf).makeQualified(new Path(dir));\n } catch (IOException e) {\n throw new RuntimeException(\"Failed to localize path: \" + dir, e);\n }\n }", "@Override\r\n public File createJobFile(AbstractBuild<?, ?> build, BuildListener listener) throws InterruptedException,\r\n IOException {\n FilePath fp = new FilePath(build.getWorkspace(), expandJobPath(build, listener)); \r\n // TODO not very safe, if e.g. some malicious user provide path to a huge file \r\n String jobContent = fp.readToString(); \r\n FilePath path = createDefaultJobFile(jobContent, build, listener);\r\n return new File(path.getRemote());\r\n }", "public void setSaveHadoopTmpDir(final boolean saveTempDir) {\n _saveHadoopTmpDir = saveTempDir;\n }", "private static Path createDestinationCertificateDirectory() throws IOException {\n final Set<PosixFilePermission> posixPermissions = PosixFilePermissions.fromString(\"rwxr-xr-x\");\n final FileAttribute<?> permissions = PosixFilePermissions.asFileAttribute(posixPermissions);\n final Path certificateDirectory =\n createTempDirectory(MOUNTABLE_PARENT_DIR, TEMP_DIR_PREFIX, permissions);\n FileUtils.forceDeleteOnExit(certificateDirectory.toFile());\n return certificateDirectory;\n }", "protected void createHMetisOutFilePath() {\n\t\tString file = \"\";\n\t\tfile += \"TEMP_GRAPH_FILE.hgr.part.\";\n\t\tfile += this.getPartitioner().getPartition().getNumBlock();\n\t\tthis.setHMetisOutFile(file);\t\n\t}", "private String getTmpPath() {\n return getExternalFilesDir(null).getAbsoluteFile() + \"/tmp/\";\n }", "private File createTempFile(TransferSongMessage message)\n throws IOException {\n File outputDir = MessagingService.this.getCacheDir(); // context being the Activity pointer\n String filePrefix = UUID.randomUUID().toString().replace(\"-\", \"\");\n int inx = message.getSongFileName().lastIndexOf(\".\");\n String extension = message.getSongFileName().substring(inx + 1);\n File outputFile = File.createTempFile(filePrefix, extension, outputDir);\n return outputFile;\n }", "public static Path createSimpleTmpFile( final Configuration conf, boolean deleteOnExit ) throws IOException\r\n\t{\r\n\t\t/** Make a temporary File, delete it, mark the File Object as delete on exit, and create the file with data using hadoop utils. */\r\n\t\tFile localTempFile = File.createTempFile(\"tmp-file\", \"tmp\");\r\n\t\tlocalTempFile.delete();\r\n\t\tPath localTmpPath = new Path( localTempFile.getName());\r\n\t\t\r\n\t\tcreateSimpleFile(conf, localTmpPath, localTmpPath.toString());\r\n\t\tif (deleteOnExit) {\r\n\t\t\tlocalTmpPath.getFileSystem(conf).deleteOnExit(localTmpPath);\r\n\t\t}\r\n\t\treturn localTmpPath;\r\n\t}", "public static File makeTempDir(String prefix){\n try {\n return Files.createTempDirectory(prefix).toFile();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "private Step deleteLocalWorkingDir() {\n return stepBuilderFactory.get(STEP_DELETE_LOCAL_WORK_DIR)\n .tasklet(deleteLocalWorkingDir)\n .build();\n }", "public OutputResponse mkdir(String path){\n String command = \"mkdir \" + path;\n return jobTarget.runCommand( command );\n }", "private FilePath ensureWorkspaceExists(WorkflowJob job) throws Exception {\n FilePath path = remote.getWorkspaceFor(job);\n path.mkdirs();\n return path;\n }", "private void cleanupLocal() throws IOException {\n FileSystem lfs = FileSystem.getLocal(new Configuration());\n lfs.delete(new Path(\"build\"), true);\n System.setProperty(\"hadoop.log.dir\", \"logs\");\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tString filePath = env.getProperty(\"export.file.path\");\n\t\t\t\tFileSystem fileSystem = FileSystems.getDefault();\n\t\t\t\tif (StringUtils.isNotEmpty(empId)) {\n\t\t\t\t\tfilePath += \"/\" + empId;\n\t\t\t\t}\n\t\t\t\tPath path = fileSystem.getPath(filePath);\n\t\t\t\t// path = path.resolve(String.valueOf(empId));\n\t\t\t\tif (!Files.exists(path)) {\n\t\t\t\t\tPath newEmpPath = Paths.get(filePath);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFiles.createDirectory(newEmpPath);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while creating path \" + newEmpPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfilePath += \"/\" + exportFileName;\n\t\t\t\ttry {\n\t\t\t\t\t// initialize FileWriter object\n\t\t\t\t\tlog.debug(\"filePath = \" + filePath + \", isAppend=\" + isAppend);\n\t\t\t\t\tfileWriter = new FileWriter(filePath, isAppend);\n\t\t\t\t\t// initialize CSVPrinter object\n\t\t\t\t\tcsvFilePrinter = new CSVPrinter(fileWriter, csvFileFormat);\n\t\t\t\t\tif (!isAppend) {\n\t\t\t\t\t\t// Create CSV file header\n\t\t\t\t\t\tcsvFilePrinter.printRecord(JOB_DETAIL_REPORT_FILE_HEADER);\n\t\t\t\t\t}\n\t\t\t\t\tfor (JobDTO transaction : content) {\n\t\t\t\t\t\tList record = new ArrayList();\n\t\t\t\t\t\tlog.debug(\"Writing transaction record for site :\" + transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getSiteName());\n\t\t\t\t\t\trecord.add(String.valueOf(transaction.getTitle()));\n\t\t\t\t\t\trecord.add(transaction.getEmployeeName());\n\t\t\t\t\t\trecord.add(transaction.getJobType());\n\t\t\t\t\t\trecord.add(transaction.getPlannedStartTime());\n\t\t\t\t\t\trecord.add(transaction.getActualEndTime());\n\t\t\t\t\t\trecord.add(transaction.getJobStatus() != null ? transaction.getJobStatus().name()\n\t\t\t\t\t\t\t\t: JobStatus.OPEN.name());\n\t\t\t\t\t\tcsvFilePrinter.printRecord(record);\n\t\t\t\t\t}\n\t\t\t\t\tlog.info(exportFileName + \" CSV file was created successfully !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"COMPLETED\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\"Error in CsvFileWriter !!! \" + e);\n\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfileWriter.flush();\n\t\t\t\t\t\tfileWriter.close();\n\t\t\t\t\t\tcsvFilePrinter.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while flushing/closing fileWriter/csvPrinter !!!\");\n\t\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlock.unlock();\n\t\t\t}", "private static File createReserveDiskCacheDir(Context context) {\n\t\tFile cacheDir = StorageUtils.getCacheDirectory(context, false);\n\t\tFile individualDir = new File(cacheDir, \"lazy-cache\");\n\t\tif (individualDir.exists() || individualDir.mkdir()) {\n\t\t\tcacheDir = individualDir;\n\t\t}\n\t\treturn cacheDir;\n\t}", "public static String setup(Task task) {\n\t\tString localTemp = task.getTaskType() + \"_\" + task.getTaskId();\n\t\ttry {\n\t\t\tFileUtils.forceMkdir(new File(localTemp));\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(\"Exception occoured while creating local temporary directory \\n\" + e.getLocalizedMessage());\n\t\t\tstate.setErrCode(state.getTsk() == TaskType.MAP_TASK ? ERR_CODE.EXCEPTION_CREATING_TEMP_DIR_MAP\n\t\t\t : ERR_CODE.EXCEPTION_CREATING_TEMP_DIR_REDUCE);\n\t\t}\n\t\treturn localTemp;\n\t}", "static public void createClusterProfileDir() {\n if (new File(getClusterProfileDir()).exists() == true) {\n return;\n }\n\n String dir = IJ.getDirectory(\"home\") + File.separator + \".MosaicToolSuite\";\n try {\n ShellCommand.exeCmd(\"mkdir \" + dir);\n }\n catch (final IOException e) {\n e.printStackTrace();\n }\n catch (final InterruptedException e) {\n e.printStackTrace();\n }\n\n dir += File.separator + \"clusterProfile\";\n\n try {\n ShellCommand.exeCmd(\"mkdir \" + dir);\n }\n catch (final IOException e) {\n e.printStackTrace();\n }\n catch (final InterruptedException e) {\n e.printStackTrace();\n }\n }", "@Override\n public String getTempDir() {\n return Comm.getAppHost().getTempDirPath();\n }", "public File writeBackFileToDvn(RConnection c, String targetFilename,\n String tmpFilePrefix, String tmpFileExt, int fileSize){\n File tmprsltfl = null;\n \n String resultFilePrefix = tmpFilePrefix + PID + \".\";\n \n String rfsffx = \".\" + tmpFileExt;\n RFileInputStream ris = null;\n OutputStream outbr = null;\n try {\n tmprsltfl = File.createTempFile(resultFilePrefix, rfsffx);\n \n //outbr = new FileOutputStream(tmprsltfl);\n outbr = new BufferedOutputStream(new FileOutputStream(tmprsltfl));\n //File tmp = new File(targetFilename);\n //long tmpsize = tmp.length();\n // open the input stream\n ris = c.openFile(targetFilename);\n \n if (fileSize < 1024*1024*500){\n int bfsize = fileSize +1;\n byte[] obuf = new byte[bfsize];\n ris.read(obuf);\n //while ((obufsize =)) != -1) {\n outbr.write(obuf, 0, bfsize);\n //}\n }\n ris.close();\n outbr.close();\n return tmprsltfl;\n } catch (FileNotFoundException fe){\n fe.printStackTrace();\n dbgLog.fine(\"FileNotFound exception occurred\");\n return tmprsltfl;\n } catch (IOException ie){\n ie.printStackTrace();\n dbgLog.fine(\"IO exception occurred\");\n } finally {\n if (ris != null){\n try {\n ris.close();\n } catch (IOException e){\n \n }\n }\n \n if (outbr != null){\n try {\n outbr.close();\n } catch (IOException e){\n \n }\n }\n \n }\n return tmprsltfl;\n }", "private String getTempFileString() {\n final File path = new File(getFlagStoreDir() + String.valueOf(lJobId) + File.separator);\n // // If this does not exist, we can create it here.\n if (!path.exists()) {\n path.mkdirs();\n }\n //\n return new File(path, Utils.getDeviceUUID(this)+ \".jpeg\")\n .getPath();\n }", "private final void directory() {\n\t\tif (!this.plugin.getDataFolder().isDirectory()) {\n\t\t\tif (!this.plugin.getDataFolder().mkdirs()) {\n\t\t\t\tMain.SEVERE(\"Failed to create directory\");\n\t\t\t} else {\n\t\t\t\tMain.INFO(\"Created directory sucessfully!\");\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testCopyToTempDir() throws IOException {\n File fileA = null;\n\n try {\n fileA = File.createTempFile(\"fileA\", \"fileA\");\n System.out.println(fileA.getAbsolutePath());\n FileOutputStream fos = new FileOutputStream(fileA);\n InputStream sis = new StringInputStream(\"some content\");\n StreamUtil.copy(sis, fos);\n sis.close();\n fos.close();\n\n copyToTempDir(fileA);\n\n File fileACopy = new File(new File(getTempDirPath()), fileA.getName());\n assertTrue(fileACopy.exists());\n assertTrue(fileACopy.isFile());\n } finally {\n boolean deleted = fileA.delete();\n assertTrue(deleted);\n }\n\n File dirB = null;\n\n try {\n dirB = Files.createTempDirectory(\"dirB\").toFile();\n System.out.println(dirB.getAbsolutePath());\n\n copyToTempDir(dirB);\n\n File dirBCopy = new File(new File(getTempDirPath()), dirB.getName());\n assertTrue(dirBCopy.exists());\n assertTrue(dirBCopy.isDirectory());\n } finally {\n boolean deleted = dirB.delete();\n assertTrue(deleted);\n }\n }", "public void createDirectory() {\r\n\t\tpath = env.getProperty(\"resources\") + \"/\" + Year.now().getValue() + \"/\";\r\n\t\tFile file = new File(path);\r\n\t\tif (!file.exists())\r\n\t\t\tfile.mkdirs();\r\n\t}", "public void makeProgressFile() {\n progressData = new File(wnwData, \"progress.dat\");\n try {\n progressData.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n progressData.setWritable(true);\n }", "public OutputResponse mkdirs(String path){\n String command = \"mkdir -p \" + path;\n return jobTarget.runCommand( command);\n }", "@Override\n public void createDirectory(File storageName) throws IOException {\n }", "public File createTempDir(String prefix, String suffix) {\n try {\n // Create a tempfile, and delete it.\n File file = File.createTempFile(prefix, suffix, baseDir);\n\n if (!file.delete()) {\n throw new IOException(\"Unable to create temp file\");\n }\n\n // Create it as a directory.\n File dir = new File(file.getAbsolutePath());\n if (!dir.mkdirs()) {\n throw new UncheckedIOException(\n new IOException(\"Cannot create profile directory at \" + dir.getAbsolutePath()));\n }\n\n // Create the directory and mark it writable.\n FileHandler.createDir(dir);\n\n temporaryFiles.add(dir);\n return dir;\n } catch (IOException e) {\n throw new UncheckedIOException(\n new IOException(\"Unable to create temporary file at \" + baseDir.getAbsolutePath()));\n }\n }", "public File saveInLocalFileSystem(Properties configuration) throws DepositorException {\r\n \r\n LOG.debug(\"saving configuration in local file system\");\r\n DateTimeZone.setDefault(DateTimeZone.UTC);\r\n DateTime currentTime = new DateTime();\r\n DateTimeFormatter fmt = DateTimeFormat.forPattern(PATH_FORMAT);\r\n String configurationDirectoryName = currentTime.toString(fmt);\r\n File configurationDirectory = new File(baseDir, configurationDirectoryName);\r\n configurationDirectory.mkdirs();\r\n File configurationFile = new File(configurationDirectory, Constants.CONFIGURATION_FILE_NAME);\r\n FileOutputStream os = null;\r\n try {\r\n os = new FileOutputStream(configurationFile);\r\n }\r\n catch (FileNotFoundException e) {\r\n LOG.error(e.getMessage());\r\n throw new DepositorException(e.getMessage());\r\n }\r\n try {\r\n configuration.storeToXML(os, null);\r\n os.flush();\r\n os.close();\r\n synchronized (configurationDirPathes) {\r\n configurationDirPathes.put(configuration.getProperty(Configuration.PROPERTY_CONFIGURATION_ID),\r\n configurationDirectoryName);\r\n }\r\n \r\n }\r\n catch (IOException e) {\r\n LOG.error(e.getMessage());\r\n throw new DepositorException(e.getMessage());\r\n }\r\n return configurationFile;\r\n }", "File createFile(String name) throws IOException {\n File storageFile = File.createTempFile(FILE_PREFIX + name + \"_\", null, this.subDirectories[fileCounter.getAndIncrement()&(this.subDirectories.length-1)]); //$NON-NLS-1$\n if (LogManager.isMessageToBeRecorded(org.teiid.logging.LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {\n LogManager.logDetail(org.teiid.logging.LogConstants.CTX_BUFFER_MGR, \"Created temporary storage area file \" + storageFile.getAbsoluteFile()); //$NON-NLS-1$\n }\n return storageFile;\n }", "private Step deleteHdfsWorkingDir() {\n return stepBuilderFactory.get(STEP_DELETE_HDFS_WORK_DIR)\n .tasklet(deleteHdfsWorkingDir)\n .build();\n }", "public static File getTempDirectory() {\r\n\t\treturn new File(System.getProperty(\"java.io.tmpdir\"));\r\n\t}", "private File createTempFile(WorkDirectory workDir, BackupPolicy backupPolicy)\n throws IOException {\n int MAX_TRIES = 100; // absurdly big limit, but a limit nonetheless\n for (int i = 0; i < MAX_TRIES; i++) {\n File tempFile = new File(resultsFile.getPath() + \".\" + i + \".tmp\");\n if (tempFile.createNewFile()) {\n return tempFile;\n }\n }\n throw new IOException(\"could not create temp file for \" + resultsFile + \": too many tries\");\n }", "@Override\n public File compress() throws Exception\n {\n File dest = File.createTempFile(\"TMP\",\".tar.gz\");\n FileOutputStream fos = new FileOutputStream( dest );\n BufferedOutputStream bos = new BufferedOutputStream(fos);\n TarOutputStream out = new TarOutputStream(bos);\n tarFolder( null, folder.getAbsolutePath(), out );\n out.close();\n return dest;\n }", "@NonNull\n private File getDownloadLocation() {\n System.out.println(\"Hello. in download start\");\n File root = android.os.Environment.getExternalStorageDirectory();\n File file = new File(root.getAbsolutePath() + \"/V2A\");\n if (!file.exists()) {\n file.mkdirs();\n }\n System.out.println(file.toString());\n System.out.println(\"Hello. in download end\");\n //Toast.makeText(this, \"Starting Download\", Toast.LENGTH_SHORT).show();\n\n return file;\n\n }", "JobFolder(final FileSystem fileSystem, final Path path) throws IOException {\n this.fileSystem = fileSystem;\n this.path = path;\n this.fileSystem.mkdirs(this.path);\n }", "public void beforeClass() throws Exception\n {\n new File(\"test-logs\").mkdirs(); \n System.setProperty(\"hadoop.log.dir\", \"test-logs\");\n \n _fileSystem = FileSystem.get(new JobConf());\n }", "@TaskAction\n public void create() {\n dir.mkdirs();\n getChmod().chmod(dir, dirMode);\n }", "@Test\n public void testTempDirectory() {\n assertTrue(getTempDirPath().indexOf(File.separator\n\t+ \"TestSpringLockssTestCase\") > -1);\n assertTrue(getTempDirPath().endsWith(\".tmp\"));\n }", "public static String getTempDirectoryPath()\n {\n return System.getProperty( \"java.io.tmpdir\" );\n }", "private void writeTempCert() throws NoSuchProviderException,\n NoSuchAlgorithmException, IOException {\n HDDSKeyGenerator keyGenerator = new HDDSKeyGenerator(securityConfig);\n keyPair = keyGenerator.generateKey();\n LocalDateTime startDate = LocalDateTime.now();\n LocalDateTime endDate = startDate.plusDays(1);\n X509CertificateHolder cert =\n SelfSignedCertificate.newBuilder()\n .setSubject(RandomStringUtils.randomAlphabetic(4))\n .setClusterID(RandomStringUtils.randomAlphabetic(4))\n .setScmID(RandomStringUtils.randomAlphabetic(4))\n .setBeginDate(startDate)\n .setEndDate(endDate)\n .setConfiguration(securityConfig)\n .setKey(keyPair)\n .makeCA()\n .build();\n CertificateCodec codec =\n new CertificateCodec(securityConfig, COMPONENT);\n\n String pemString = codec.getPEMEncodedString(cert);\n basePath = new File(\n String.valueOf(\n securityConfig.getCertificateLocation(\"scm\")));\n\n if (!basePath.exists()) {\n assertTrue(basePath.mkdirs());\n }\n codec.writeCertificate(basePath.toPath(), TMP_CERT_FILE_NAME,\n pemString);\n }", "private String generateSavePath(HttpSession session) {\n try {\n\t\t\tint adminId = ((Admin) session.getAttribute(\"emm.admin\")).getAdminID();\n\t\t\tRandom random = new Random();\n\t\t\tint randomNum = random.nextInt();\n\t\t\tString savePath = AgnUtils.getTempDir() + File.separator +\n\t\t\t \"tmp_csv_file_\" + adminId + \"_\" + randomNum + \".csv\";\n\t\t\treturn savePath;\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Cannot create temp file path for upload file storage\", e);\n\t\t\treturn null;\n\t\t}\n }", "private static void j_lock() {\r\n\t\tdo {\r\n\t\t\tLOCK_FILES_DIR.mkdirs();\r\n\t\t\ttry {\r\n\t\t\t\tRandomAccessFile raf = new RandomAccessFile(GLOBAL_LOCK_FILE,\r\n\t\t\t\t\t\t\"rw\");\r\n\t\t\t\tFileChannel channel = raf.getChannel();\r\n\t\t\t\tFileLock lock = channel.lock();\r\n\t\t\t\tglobalFileChannel = channel;\r\n\t\t\t\tglobalFileLock = lock;\r\n\t\t\t\tbreak;\r\n\t\t\t} catch (Throwable t) {\r\n\t\t\t\t;\r\n\t\t\t}\r\n\t\t} while (true);\r\n\t}", "protected static void createDirectory(MasterProcedureEnv env, NamespaceDescriptor nsDescriptor)\n throws IOException {\n createDirectory(env.getMasterServices().getMasterFileSystem(), nsDescriptor);\n }", "private void createDir(){\n\t\tPath path = Path.of(this.dir);\n\t\ttry {\n\t\t\tFiles.createDirectories(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "abstract protected void createWorkEnv(File outputDir)\n throws TaskRunException;", "static Path createBackupDirectory(Path savegame) {\r\n\t\tPath backupDirectory = Paths.get(savegame.getParent() + \"\\\\Backups\");\r\n\t\tif (!Files.isDirectory(backupDirectory)) {\r\n\t\t\ttry {\r\n\t\t\t\tFiles.createDirectory(backupDirectory);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tSystem.out.println(\"Error: couldn't create Backup directory\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif (Files.isDirectory(backupDirectory)) {\r\n\t\t\tSystem.out.println(\"Created Backup Directory..\");\r\n\t\t}\r\n\t\treturn backupDirectory;\r\n\t}", "private File createWorkingDir( final String path )\n {\n File workDir = new File( path );\n workDir.mkdirs();\n return workDir;\n }", "@Before\n public void setUpBeforeEachTest() throws IOException {\n setUpTempDirectory(\"TestSpringLockssTestCase\");\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tString filePath = env.getProperty(\"export.file.path\");\n\t\t\t\tFileSystem fileSystem = FileSystems.getDefault();\n\t\t\t\tif (StringUtils.isNotEmpty(empId)) {\n\t\t\t\t\tfilePath += \"/\" + empId;\n\t\t\t\t}\n\t\t\t\tPath path = fileSystem.getPath(filePath);\n\t\t\t\t// path = path.resolve(String.valueOf(empId));\n\t\t\t\tif (!Files.exists(path)) {\n\t\t\t\t\tPath newEmpPath = Paths.get(filePath);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFiles.createDirectory(newEmpPath);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while creating path \" + newEmpPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfilePath += \"/\" + exportFileName;\n\t\t\t\ttry {\n\t\t\t\t\t// initialize FileWriter object\n\t\t\t\t\tlog.debug(\"filePath = \" + filePath + \", isAppend=\" + isAppend);\n\t\t\t\t\tfileWriter = new FileWriter(filePath, isAppend);\n\t\t\t\t\tString siteName = null;\n\n\t\t\t\t\t// initialize CSVPrinter object\n\t\t\t\t\tcsvFilePrinter = new CSVPrinter(fileWriter, csvFileFormat);\n\t\t\t\t\tif (!isAppend) {\n\t\t\t\t\t\t// Create CSV file header\n\t\t\t\t\t\tcsvFilePrinter.printRecord(CONSOLIDATED_REPORT_FILE_HEADER);\n\t\t\t\t\t}\n\t\t\t\t\tfor (ReportResult transaction : content) {\n\t\t\t\t\t\tif (StringUtils.isEmpty(siteName) || !siteName.equalsIgnoreCase(transaction.getSiteName())) {\n\t\t\t\t\t\t\tcsvFilePrinter.printRecord(\"\");\n\t\t\t\t\t\t\tcsvFilePrinter\n\t\t\t\t\t\t\t\t\t.printRecord(\"CLIENT - \" + projName + \" SITE - \" + transaction.getSiteName());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tList record = new ArrayList();\n\t\t\t\t\t\tlog.debug(\"Writing transaction record for site :\" + transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getLocatinName());\n\t\t\t\t\t\trecord.add(transaction.getAssignedJobCount());\n\t\t\t\t\t\trecord.add(transaction.getCompletedJobCount());\n\t\t\t\t\t\trecord.add(transaction.getOverdueJobCount());\n\t\t\t\t\t\trecord.add(transaction.getTat());\n\t\t\t\t\t\tcsvFilePrinter.printRecord(record);\n\t\t\t\t\t}\n\t\t\t\t\tlog.info(exportFileName + \" CSV file was created successfully !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"COMPLETED\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\"Error in CsvFileWriter !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfileWriter.flush();\n\t\t\t\t\t\tfileWriter.close();\n\t\t\t\t\t\tcsvFilePrinter.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while flushing/closing fileWriter/csvPrinter !!!\");\n\t\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlock.unlock();\n\t\t\t}", "public static File getTempDirectory() {\r\n\t\tFile tempdir = new File(System.getProperty(\"java.io.tmpdir\"));\r\n\t\treturn tempdir;\r\n\t}", "private String downloadFolder(){\n\t\tFile home = new File(System.getProperty(\"user.home\"));\n\t\tFile folder = new File (home,\"Downloads/PaluDownloads\");\n\t\tif (!folder.exists()){\n\t\t\tfolder.mkdir();\n\t\t}\n\t\treturn folder.getAbsolutePath();\n\t}", "@BeforeClass\n public static void setup() {\n logger.info(\"setup: creating a temporary directory\");\n\n // create a directory for temporary files\n directory = new File(UUID.randomUUID().toString());\n directory.mkdir();\n }", "private static void writeFile(String name, Trajectory t) {\n\t\ttry {\n\t\t\tFile directory = new File(cacheDirectory);\n\t\t\tif (!directory.exists()) {\n\t\t\t\tconsole.log(\"missing dir, making\");\n\t\t\t\tdirectory.mkdir();\n\t\t\t}\n\t\t\t\n\t\t\tFileOutputStream fos = new FileOutputStream(cacheDirectory + name);\n\t\t ObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\t oos.writeObject(t);\n\t\t oos.close();\n\t\t fos.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t}", "private static Path saveTempFile(InputStream input) throws IOException {\n\t\tPath tempFile = Files.createTempFile(null, \".csv\");\n\t\tFiles.copy(input, tempFile, StandardCopyOption.REPLACE_EXISTING);\n\n\t\tinput.close();\n\n\t\t// TODO delete tempFile\n\t\treturn tempFile;\n\t}", "@Before\n\tpublic void setUp() {\n\t\tresultsDir.mkdir();\n\t}", "private final FileOutputStream zabz() {\n Serializable serializable = this.zalj;\n if (serializable == null) {\n serializable = new IllegalStateException(\"setTempDir() must be called before writing this object to a parcel\");\n throw serializable;\n }\n Object object = \"teleporter\";\n String string2 = \".tmp\";\n try {\n serializable = File.createTempFile((String)object, string2, (File)serializable);\n }\n catch (IOException iOException) {\n object = new IllegalStateException(\"Could not create temporary file\", iOException);\n throw object;\n }\n try {\n object = new FileOutputStream((File)serializable);\n int n10 = 0x10000000;\n string2 = ParcelFileDescriptor.open((File)serializable, (int)n10);\n this.zalg = string2;\n ((File)serializable).delete();\n return object;\n }\n catch (FileNotFoundException fileNotFoundException) {\n serializable = new IllegalStateException(\"Temporary file is somehow already deleted\");\n throw serializable;\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tString filePath = env.getProperty(\"export.file.path\");\n\t\t\t\tFileSystem fileSystem = FileSystems.getDefault();\n\t\t\t\t// if(StringUtils.isNotEmpty(empId)) {\n\t\t\t\t// filePath += \"/\" + empId;\n\t\t\t\t// }\n\t\t\t\tPath path = fileSystem.getPath(filePath);\n\t\t\t\t// path = path.resolve(String.valueOf(empId));\n\t\t\t\tif (!Files.exists(path)) {\n\t\t\t\t\tPath newEmpPath = Paths.get(filePath);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFiles.createDirectory(newEmpPath);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while creating path \" + newEmpPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfilePath += \"/\" + exportFileName;\n\t\t\t\ttry {\n\t\t\t\t\t// initialize FileWriter object\n\t\t\t\t\tlog.debug(\"filePath = \" + filePath + \", isAppend=\" + isAppend);\n\t\t\t\t\tfileWriter = new FileWriter(filePath, isAppend);\n\t\t\t\t\t// initialize CSVPrinter object\n\t\t\t\t\tcsvFilePrinter = new CSVPrinter(fileWriter, csvFileFormat);\n\t\t\t\t\tif (!isAppend) {\n\t\t\t\t\t\t// Create CSV file header\n\t\t\t\t\t\tcsvFilePrinter.printRecord(EMPLOYEE_DETAIL_REPORT_FILE_HEADER);\n\t\t\t\t\t}\n\t\t\t\t\t// Write a new student object list to the CSV file\n\t\t\t\t\tfor (EmployeeDTO transaction : content) {\n\t\t\t\t\t\tList record = new ArrayList();\n\t\t\t\t\t\t// log.debug(\"Writing transaction record for Employee id :\"+\n\t\t\t\t\t\t// transaction.getEmployeeEmpId());\n\t\t\t\t\t\trecord.add(transaction.getEmpId());\n\t\t\t\t\t\trecord.add(transaction.getName());\n\t\t\t\t\t\trecord.add(transaction.getDesignation());\n\t\t\t\t\t\trecord.add(transaction.getManagerName());\n\t\t\t\t\t\trecord.add(transaction.getProjectName());\n\t\t\t\t\t\trecord.add(transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getActive());\n\t\t\t\t\t\tcsvFilePrinter.printRecord(record);\n\t\t\t\t\t}\n\t\t\t\t\tlog.info(exportFileName + \" CSV file was created successfully !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"COMPLETED\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\"Error in CsvFileWriter !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfileWriter.flush();\n\t\t\t\t\t\tfileWriter.close();\n\t\t\t\t\t\tcsvFilePrinter.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while flushing/closing fileWriter/csvPrinter !!!\");\n\t\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlock.unlock();\n\t\t\t}", "public static void writeToFile(String context, String outputFileName) throws IOException {\n KubernetesDataHolder dataHolder = KubernetesContext.getInstance().getDataHolder();\n outputFileName = dataHolder.getOutputDir() + File\n .separator + extractBalxName(dataHolder.getBalxFilePath()) + outputFileName;\n DeploymentModel deploymentModel = dataHolder.getDeploymentModel();\n JobModel jobModel = dataHolder.getJobModel();\n // Priority given for job, then deployment.\n if (jobModel != null && jobModel.isSingleYAML()) {\n outputFileName =\n dataHolder.getOutputDir() + File.separator + extractBalxName(dataHolder.getBalxFilePath()) + YAML;\n } else if (jobModel == null && deploymentModel != null && deploymentModel.isSingleYAML()) {\n outputFileName =\n dataHolder.getOutputDir() + File.separator + extractBalxName(dataHolder.getBalxFilePath()) + YAML;\n \n }\n File newFile = new File(outputFileName);\n // append if file exists\n if (newFile.exists()) {\n Files.write(Paths.get(outputFileName), context.getBytes(StandardCharsets.UTF_8), StandardOpenOption.APPEND);\n return;\n }\n //create required directories\n if (newFile.getParentFile().mkdirs()) {\n Files.write(Paths.get(outputFileName), context.getBytes(StandardCharsets.UTF_8));\n return;\n }\n Files.write(Paths.get(outputFileName), context.getBytes(StandardCharsets.UTF_8));\n }", "public void createSubDirCameraTaken() {\n\t\tFile f = new File(getPFCameraTakenPath());\n\t\tf.mkdirs();\n\t}", "private File createDownloadLocalFile(String downloadFileUrl)\n {\n File dir = null;\n File ret = null;\n\n try {\n if (downloadFileUrl != null && !TextUtils.isEmpty(downloadFileUrl)) {\n int lastIndex = downloadFileUrl.lastIndexOf(\"/\");\n if (lastIndex > -1) {\n String downloadFileName = newFilename;\n File downloadDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n String downloadDirectoryPath =\n downloadDirectory.getPath()\n + File.separator\n + Constants.APP_NAME;\n\n dir = new File(downloadDirectoryPath);\n if(!dir.exists()){\n dir.mkdirs();\n }\n\n ret = new File(downloadDirectoryPath + \"/\" + downloadFileName);\n\n if (!ret.exists()) {\n ret.createNewFile();\n }\n }\n }\n }catch(IOException ex)\n {\n //Log.e(\"Download Manager\", ex.getMessage(), ex);\n }finally {\n return ret;\n }\n }", "public void createTestDir() {\n\t\tworkDir = new File(System.getProperty(\"test.dir\", \"target\"));\n\t}", "public static File createTempFile() throws Exception {\n File dir = tempFileDirectory();\n dir.mkdirs();\n File tempFile = File.createTempFile(\"tst\", null, dir);\n dir.deleteOnExit(); // Not fail-safe on android )¬;\n return tempFile;\n }", "private void createFolder(String myFilesystemDirectory) {\n\r\n File file = new File(myFilesystemDirectory);\r\n try {\r\n if (!file.exists()) {\r\n //modified \r\n file.mkdirs();\r\n }\r\n } catch (SecurityException e) {\r\n Utilidades.escribeLog(\"Error al crear carpeta: \" + e.getMessage());\r\n }\r\n }", "public static File getTemporaryDirectory() {\r\n\t\tFile dir = new File(System.getProperty(\"java.io.tmpdir\", //$NON-NLS-1$\r\n\t\t\t\tSystem.getProperty(\"user.dir\", \".\"))); //$NON-NLS-1$ //$NON-NLS-2$\r\n\t\ttry {\r\n\t\t\treturn dir.getCanonicalFile();\r\n\t\t} catch (IOException e) {\r\n\t\t\treturn dir;\r\n\t\t}\r\n\t}", "private void checkIfLocationExists() {\n try {\n File file = new File(saveLocation);\n if(!file.exists()) file.mkdirs();\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n }", "private void createDirectories()\r\n\t{\r\n\t\t// TODO: Do some checks here\r\n\t\tFile toCreate = new File(Lunar.OUT_DIR + Lunar.PIXEL_DIR\r\n\t\t\t\t\t\t\t\t\t+ Lunar.PROCESSED_DIR);\r\n\t\ttoCreate.mkdirs();\r\n\t\ttoCreate = null;\r\n\t\ttoCreate = new File(Lunar.OUT_DIR + Lunar.ROW_DIR + Lunar.PROCESSED_DIR);\r\n\t\ttoCreate.mkdirs();\r\n\t\ttoCreate = null;\r\n\t}", "public static String getWorkingDirectory(Context context) {\n String res;\n if (isSDCardMounted()) {\n String directory = \"For Happy\";\n res = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/\" + directory;\n } else {\n res = context.getFilesDir().getAbsolutePath() + \"/\";\n }\n if (!res.endsWith(\"/\")) {\n res += \"/\";\n }\n File f = new File(res);\n if (!f.exists()) {\n boolean success = f.mkdirs();\n if (!success) {\n LogUtil.e(\"FileUtils create file failed\");\n }\n }\n return res;\n }", "private File createTempFolder(String osBasePath, String prefix, String suffix) {\n File baseTempFolder = getTempFolder(osBasePath);\n if (!baseTempFolder.isDirectory()) {\n if (baseTempFolder.isFile()) {\n deleteFileOrFolder(baseTempFolder);\n }\n if (!baseTempFolder.mkdirs()) {\n return null;\n }\n }\n for (int i = 1; i < 100; i++) {\n File folder = new File(baseTempFolder, String.format(\"%1$s.%2$s%3$02d\", prefix, suffix, i));\n if (!folder.exists()) {\n return folder;\n }\n }\n return null;\n }", "@BeforeClass\n public static void createOutputDir() throws OfficeException {\n\n // Ensure we start with a fresh output directory\n final File outputDir = new File(OUTPUT_DIR);\n FileUtils.deleteQuietly(outputDir);\n outputDir.mkdirs();\n }", "public void writeToDir() {\n\t\ttry{\n\t\t\tString dirPath = Paths.get(\".\").toAbsolutePath().normalize().toString()+\"/\";\n\t\t\tString path = dirPath + filename; //get server dir path\n\t\t\tSystem.out.println(\"output file path is: \" + path);\n\t\t\tFileOutputStream out = new FileOutputStream(path);\n out.write(img);\n out.close();\n PL.fsync();\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public File copyDefault(String mntLocation, String localDockerContext, String tool, String toolId)\n\t{\n\t\tFile file = new File(mntLocation+tool+\"/default\");\n\t\tFile newDir = null;\n\t\tFile originalFile = null;\n\t\ttry \n\t\t{\n\n\t\t\toriginalFile = new File(\n\t\t\t\t\tFiles.readSymbolicLink(Paths.get(file.getAbsolutePath())).toString());\n\t\t\tFile dest = new File(localDockerContext + toolId + \"/\" + tool);\n\t\t\tSystem.out.println(dest.getAbsolutePath());\n\n\t\t\tnewDir = new File(dest, originalFile.getName());\n\t\t\tSystem.out.println(\"CREATED DIR: \"\n\t\t\t\t\t+ newDir.getAbsolutePath());\n\t\t\tnewDir.mkdirs();\n\n\t\t\t//File file1 = new File(file + originalFile);\n\t\t\ttry \n\t\t\t{\n\t\t\t\tFileUtils.copyDirectory(file, newDir);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\t catch (IOException x) {\n\t\t\tSystem.err.println(x);\n\t\t}\n\t\treturn newDir;\n\n\t}", "private boolean shouldMarkOutputDir(JobConf conf) {\r\n return conf.getBoolean(SUCCESSFUL_JOB_OUTPUT_DIR_MARKER, true);\r\n }", "@BeforeEach\n void before() {\n if (Files.notExists(path)) path.toFile().mkdirs();\n }", "@BeforeEach\n public void setUp() {\n assertTrue(Files.isDirectory(this.temporaryDirectory));\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tString filePath = env.getProperty(\"export.file.path\");\n\t\t\t\tFileSystem fileSystem = FileSystems.getDefault();\n\t\t\t\tif (StringUtils.isNotEmpty(empId)) {\n\t\t\t\t\tfilePath += \"/\" + empId;\n\t\t\t\t}\n\t\t\t\tPath path = fileSystem.getPath(filePath);\n\t\t\t\t// path = path.resolve(String.valueOf(empId));\n\t\t\t\tif (!Files.exists(path)) {\n\t\t\t\t\tPath newEmpPath = Paths.get(filePath);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFiles.createDirectory(newEmpPath);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while creating path \" + newEmpPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfilePath += \"/\" + exportFileName;\n\t\t\t\ttry {\n\t\t\t\t\t// initialize FileWriter object\n\t\t\t\t\tlog.debug(\"filePath = \" + filePath + \", isAppend=\" + isAppend);\n\t\t\t\t\tfileWriter = new FileWriter(filePath, isAppend);\n\t\t\t\t\t// initialize CSVPrinter object\n\t\t\t\t\tcsvFilePrinter = new CSVPrinter(fileWriter, csvFileFormat);\n\t\t\t\t\tif (!isAppend) {\n\t\t\t\t\t\t// Create CSV file header\n\t\t\t\t\t\tcsvFilePrinter.printRecord(DETAIL_REPORT_FILE_HEADER);\n\t\t\t\t\t}\n\t\t\t\t\t// Write a new student object list to the CSV file\n\t\t\t\t\tfor (AttendanceDTO transaction : content) {\n\t\t\t\t\t\tList record = new ArrayList();\n\t\t\t\t\t\tlog.debug(\"Writing transaction record for Employee id :\" + transaction.getEmployeeEmpId());\n\t\t\t\t\t\trecord.add(transaction.getSiteName());\n\t\t\t\t\t\trecord.add(transaction.getCreatedDate());\n\t\t\t\t\t\trecord.add(String.valueOf(transaction.getEmployeeEmpId()));\n\t\t\t\t\t\trecord.add(transaction.getEmployeeFullName());\n\t\t\t\t\t\trecord.add(DateUtil.convertUTCToIST(transaction.getCheckInTime()));\n\t\t\t\t\t\trecord.add(DateUtil.convertUTCToIST(transaction.getCheckOutTime()));\n\t\t\t\t\t\tcsvFilePrinter.printRecord(record);\n\t\t\t\t\t}\n\t\t\t\t\tlog.info(exportFileName + \" CSV file was created successfully !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"COMPLETED\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\"Error in CsvFileWriter !!!\");\n\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfileWriter.flush();\n\t\t\t\t\t\tfileWriter.close();\n\t\t\t\t\t\tcsvFilePrinter.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tlog.error(\"Error while flushing/closing fileWriter/csvPrinter !!!\");\n\t\t\t\t\t\tstatusMap.put(exportFileName, \"FAILED\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlock.unlock();\n\t\t\t}", "private String initialFileSetup(String file_path, String user_id) {\n\n String[] path_components = file_path.split(\"/\");\n String desired_filename = path_components[path_components.length - 1];\n String absolute_path = new File(\"\").getAbsolutePath();\n absolute_path = absolute_path.concat(\"/Final\");\n new File(absolute_path).mkdirs();\n absolute_path = absolute_path.concat(\"/Pause\");\n new File(absolute_path).mkdirs();\n\n absolute_path = absolute_path.concat(\"/\".concat(user_id));\n new File(absolute_path).mkdirs();\n\n absolute_path = absolute_path.concat(\"/Pause_\".concat(desired_filename));\n\n return absolute_path;\n }", "public static String createDownloadDirectory() {\n \tvar downloadDirectory = Configuration.toString(\"downloadDirectory\");\n \tif (downloadDirectory == null) {\n \t\tdownloadDirectory = \"../../Downloads\";\n \t}\n return downloadDirectory;\n }", "public synchronized void writeResults(WorkDirectory workDir, BackupPolicy backupPolicy)\n throws IOException {\n if (isMutable()) {\n throw new IllegalStateException(\"This TestResult is still mutable - set the status!\");\n }\n\n // could attempt a reload() I suppose\n if (props == null) {\n props = emptyStringArray;\n }\n\n String wrp = getWorkRelativePath(desc).replace('/', File.separatorChar);\n resultsFile = workDir.getFile(wrp);\n\n File resultsDir = resultsFile.getParentFile();\n resultsDir.mkdirs(); // ensure directory created for .jtr file\n\n File tempFile = createTempFile(workDir, backupPolicy);\n try {\n writeResults(tempFile, backupPolicy);\n } finally {\n if (tempFile.exists()) {\n tempFile.delete();\n }\n }\n }", "public boolean moveToFinalLocation() {\n\n if (tempFile==null)\n return false;\n\n if (RecDir==null || RecSubdir==null) {\n Log.getInstance().write(Log.LOGLEVEL_ERROR, \"RecordingEpisode.moveToFinalLocation: null Dir or SubDir = \" + RecDir + \":\" + RecSubdir);\n\n if (!tempFile.delete()) {\n Log.getInstance().write(Log.LOGLEVEL_WARN, \"RecordingEpisode.moveToFinalLocation: Failed to delete tempFile.\");\n }\n\n return false;\n }\n\n File DestPath = new File(RecDir + File.separator + RecSubdir);\n\n if (DestPath==null) {\n Log.getInstance().write(Log.LOGLEVEL_ERROR, \"RecordingEpisode.moveToFinalLocation: null DestPath = \" + RecDir + \":\" + RecSubdir);\n\n if (!tempFile.delete()) {\n Log.getInstance().write(Log.LOGLEVEL_WARN, \"RecordingEpisode.moveToFinalLocation: Failed to delete tempFile.\");\n }\n\n return false;\n }\n\n if (!DestPath.isDirectory()) {\n if (!DestPath.mkdir()) {\n Log.getInstance().write(Log.LOGLEVEL_ERROR, \"RecordingEpisode.moveToFinalLocation: Could not create directory \" + DestPath);\n\n if (!tempFile.delete()) {\n Log.getInstance().write(Log.LOGLEVEL_ERROR, \"RecordingEpisode.moveToFinalLocation: Failed to delete tempFile.\");\n }\n return false;\n }\n }\n\n NewFile = this.getUniqueFile();\n\n if (NewFile==null) {\n Log.getInstance().write(Log.LOGLEVEL_ERROR, \"RecordingEpisode.moveToFinalLocation: Could not create unique file.\");\n\n if (!tempFile.delete()) {\n Log.getInstance().write(Log.LOGLEVEL_WARN, \"RecordingEpisode.moveToFinalLocation: Failed to delete tempFile.\");\n }\n\n return false;\n }\n\n Log.getInstance().write(Log.LOGLEVEL_TRACE, \"RecordingEpisode.moveToFinalLocation: Moving = \" + tempFile.getAbsolutePath() + \"->\" + NewFile.getAbsolutePath());\n\n if (!tempFile.renameTo(NewFile)) {\n Log.getInstance().write(Log.LOGLEVEL_ERROR, \"RecordingEpisode.moveToFinalLocation: Moving failed.\");\n }\n\n if (!tempFile.delete()) {\n Log.getInstance().write(Log.LOGLEVEL_WARN, \"RecordingEpisode.moveToFinalLocation: Failed to delete tempFile.\");\n }\n\n return true;\n }", "public File newLogFile() {\n File flog = null;\n try {\n this.logFileName = getTimestamp() + \".xml\";\n this.pathToLogFile = logFileFolder + logFileName;\n URL logURL = new URL(this.pathToLogFile);\n flog = new File(logURL.toURI());\n if (!flog.exists()) {\n flog.createNewFile();\n }\n } catch (Exception ex) {\n log.error(\"newLogFile :\"+ ex.getMessage());\n } finally{\n this.fLogFile = flog;\n return flog;\n }\n }", "static File requestNewResourcesFolder(Context context){\n SharedPreferences sharedPreferences = context.getSharedPreferences(Values.PREFERENCES_NAME, Context.MODE_PRIVATE);\n File downloadPath = null;\n File[] folders = context.getExternalFilesDirs(null);\n if(hasWritableSd(context) && checkAvailableSpace(folders[1], 10)){\n downloadPath = folders[1];\n sharedPreferences.edit().putString(Values.DOWNLOAD_LOCATION, Values.LOCATION_EXTERNAL).apply();\n }\n else{\n if(checkAvailableSpace(folders[0], 10)){\n downloadPath = folders[0];\n sharedPreferences.edit().putString(Values.DOWNLOAD_LOCATION, Values.LOCATION_INTERNAL).apply();\n }\n }\n return downloadPath;\n }", "public void createStorageFile() throws IoDukeException {\n PrintWriter writer = null;\n try {\n writer = getStorageFile();\n } catch (IOException e) {\n throw new IoDukeException(\"Error opening task file for reading\");\n } finally {\n if (writer != null) {\n writer.close();\n }\n }\n }", "public static void createTempMapsetName() {\r\n UUID id;\r\n String tmpPrefix;\r\n String tmpSuffix;\r\n String tmpBase;\r\n String tmpFolder;\r\n\r\n id = UUID.randomUUID();\r\n tmpPrefix = new String(GrassUtils.TEMP_PREFIX);\r\n tmpSuffix = new String(\"_\" + id);\r\n tmpBase = new String(System.getProperty(\"java.io.tmpdir\"));\r\n if (tmpBase.endsWith(File.separator)) {\r\n tmpFolder = new String(tmpBase + tmpPrefix + tmpSuffix.replace('-', '_') + File.separator + \"user\");\r\n }\r\n else {\r\n tmpFolder = new String(tmpBase + File.separator + tmpPrefix + tmpSuffix.replace('-', '_') + File.separator + \"user\");\r\n }\r\n m_sGrassTempMapsetFolder = tmpFolder;\r\n\r\n }", "@Override public void cleanupTempCheckpointDirectory() throws IgniteCheckedException {\n try {\n try (DirectoryStream<Path> files = Files.newDirectoryStream(cpDir.toPath(), TMP_FILE_MATCHER::matches)) {\n for (Path path : files)\n Files.delete(path);\n }\n }\n catch (IOException e) {\n throw new IgniteCheckedException(\"Failed to cleanup checkpoint directory from temporary files: \" + cpDir, e);\n }\n }", "private FSDataOutputStream createNewFile() throws Exception {\n\t\tlogger.traceEntry();\n\t\tPath newFile = new Path(rootDirectory, \"dim_\" + System.currentTimeMillis() + \".json\");\n\t\tlogger.debug(\"Creating file \" + newFile.getName());\n\t\tFSDataOutputStream dataOutputStream = null;\n\n\t\tif (!hadoopFileSystem.exists(newFile)) {\n\t\t\tdataOutputStream = hadoopFileSystem.create(newFile);\n\t\t} else {\n\t\t\tdataOutputStream = hadoopFileSystem.append(newFile);\n\t\t}\n\n\t\tdataOutputStreams.clear();\n\t\tdataOutputStreams.add(dataOutputStream);\n\t\tlogger.traceExit();\n\t\treturn dataOutputStream;\n\t}", "private void generateTarFile() throws IOException {\n File folder = new File(backupTempDirPath);\n File[] srcFiles = folder.listFiles();\n if (srcFiles == null) {\n log.debug(\"no backup file found under directory {}\", backupTempDirPath);\n return;\n }\n\n try (FileOutputStream fileOutput = new FileOutputStream(filePath);\n TarArchiveOutputStream tarOutput = new TarArchiveOutputStream(fileOutput)) {\n // truncate file names if too long\n tarOutput.setLongFileMode(TarArchiveOutputStream.LONGFILE_TRUNCATE);\n for (File srcFile : srcFiles) {\n addToTarFile(srcFile, tarOutput);\n }\n } catch (IOException e) {\n log.error(\"failed to generate a backup tar file {}\", filePath);\n throw e;\n }\n\n log.info(\"backup tar file is generated at {}\", filePath);\n }", "private static URL createTempJar(Artifact artifact, Contribution contribution) throws IOException {\n FileOutputStream fileOutputStream = null;\n ZipInputStream zipInputStream = new ZipInputStream(new FileInputStream(new File(URI.create(contribution.getLocation()))));\n try {\n ZipEntry zipEntry = zipInputStream.getNextEntry();\n while (zipEntry != null) {\n if (artifact.getLocation().endsWith(zipEntry.getName())) {\n\n String tempName = (\"tmp.\" + artifact.getURI().substring(0, artifact.getURI().length() - 3)).replace('/', '.');\n File tempFile = File.createTempFile(tempName, \".jar\");\n tempFile.deleteOnExit();\n fileOutputStream = new FileOutputStream(tempFile);\n\n byte[] buf = new byte[2048];\n int n;\n while ((n = zipInputStream.read(buf, 0, buf.length)) > -1) {\n fileOutputStream.write(buf, 0, n);\n }\n\n fileOutputStream.close();\n zipInputStream.closeEntry();\n\n return tempFile.toURI().toURL();\n\n }\n zipEntry = zipInputStream.getNextEntry();\n }\n } finally {\n zipInputStream.close();\n if (fileOutputStream != null) {\n fileOutputStream.close();\n }\n }\n \n throw new IllegalStateException();\n }" ]
[ "0.6574445", "0.6338224", "0.63161516", "0.5946636", "0.5945792", "0.59137887", "0.5879831", "0.58035994", "0.57731616", "0.57358766", "0.57345146", "0.57322925", "0.57060015", "0.5680713", "0.5657527", "0.5559066", "0.5556181", "0.5551337", "0.555119", "0.551561", "0.551162", "0.54998296", "0.5482186", "0.5451191", "0.5439047", "0.5360065", "0.5359387", "0.53498864", "0.53209347", "0.53206664", "0.53206176", "0.5318536", "0.52991915", "0.52831817", "0.52785385", "0.5245331", "0.52382404", "0.5229394", "0.52291375", "0.52260983", "0.5218726", "0.5213699", "0.5213387", "0.5212752", "0.52088076", "0.52030087", "0.5202428", "0.5177196", "0.5168327", "0.51667017", "0.5162198", "0.5159353", "0.51528734", "0.51495117", "0.5146208", "0.51252633", "0.5123966", "0.5119122", "0.5111329", "0.5109339", "0.50958496", "0.5090881", "0.50800365", "0.50778806", "0.5068281", "0.50682", "0.50589985", "0.5056695", "0.50491416", "0.504497", "0.5043742", "0.50403565", "0.5032846", "0.5028372", "0.5027728", "0.5021091", "0.50194746", "0.50082004", "0.5004816", "0.49993578", "0.49956295", "0.49922866", "0.4991828", "0.49894118", "0.49859908", "0.4982691", "0.49768102", "0.4975632", "0.49726343", "0.49548626", "0.49530563", "0.49490312", "0.49431318", "0.49351406", "0.49272746", "0.49087605", "0.49049893", "0.4902404", "0.49011466", "0.48996064" ]
0.60621935
3
/ DP recurrence formula: dp[i][j] records if s[0..i] and p[0..j] matches. 1. if s[i] == p[j] or p[j] == '.': dp[i][j] = dp[i1][j1] 2. if p[j] == '': 2.1 if s[i] == p[j1] or p[j1] == '.': dp[i][j] = dp[i][j2] || dp[i1][j2] || dp[i2][j2] || ... || dp[0][j2] = dp[i][j2] || dp[i1][j] // matches 1 or more preceding elements // eg., "cde" matches "cdeee" or "cde" 2.2 else: dp[i][j] = dp[i][j2] // matches zero preceding elements // eg., "cde" matches "cd" Notice how this problem is different from WildcardMatching_044 Reference:
public boolean isMatch(String s, String p) { if (s == null || p == null) return false; boolean[][] dp = new boolean[s.length() + 1][p.length() + 1]; dp[0][0] = true; for (int j = 1; j <= p.length(); ++j) { if (j - 2 >= 0 && p.charAt(j - 1) == '*') dp[0][j] = dp[0][j - 2]; } for (int i = 1; i <= s.length(); ++i) { for (int j = 1; j <= p.length(); ++j) { if (j - 2 >= 0 && p.charAt(j - 1) == '*') { if (s.charAt(i - 1) == p.charAt(j - 2) || p.charAt(j - 2) == '.') { dp[i][j] = dp[i][j - 2] || dp[i - 1][j]; } else { dp[i][j] = dp[i][j - 2]; } } else if (p.charAt(j - 1) == '.' || p.charAt(j - 1) == s.charAt(i - 1)) { dp[i][j] = dp[i - 1][j - 1]; } } } return dp[s.length()][p.length()]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isMatch(String s, String p) {\n boolean[][] dp = new boolean[s.length()+1][p.length()+1];\n dp[0][0] = true;\n for(int i = 0; i < p.length(); i++) {\n if(p.charAt(i) == '*' && dp[0][i-1]) {\n dp[0][i+1] = true;\n }\n }\n for(int i = 0; i < s.length(); i++) {\n for(int j = 0; j < p.length(); j++) {\n char sc = s.charAt(i);\n char pc = p.charAt(j);\n if(sc == pc) {\n dp[i+1][j+1] = dp[i][j];\n } else if(pc == '.') {\n dp[i+1][j+1] = dp[i][j];\n } else if(pc == '*') {\n if(p.charAt(j-1) != '.' && p.charAt(j-1) != s.charAt(i)) {\n dp[i+1][j+1] = dp[i+1][j-1];\n } else {\n dp[i+1][j+1] = (dp[i+1][j] || dp[i+1][j-1] || dp[i][j+1]);\n }\n } else if(pc == '+') {\n if(p.charAt(j-1) == '.' || p.charAt(j-1) == s.charAt(i)) {\n dp[i+1][j+1] = (dp[i][j+1] || dp[i+1][j]);\n }\n }\n }\n }\n return dp[s.length()][p.length()];\n }", "private boolean isMatch(char[] s, char[] p, int ps, int pp) {\n\t\t// int ps = s.length;\n\t\t// int pp = p.length;\n\t\tif (dp[ps][pp] == 1) {\n\t\t\treturn true;\n\t\t}\n\t\tif (dp[ps][pp] == 2) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (s.length - ps == 0) {\n\t\t\tif (p == null || p.length - pp == 0) {\n\t\t\t\tdp[ps][pp] = 1;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (p[0 + pp] == '*') {\n\t\t\t\tboolean result = isMatch(s, p, ps, pp + 1);\n\t\t\t\tdp[ps][pp] = get(result);\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tdp[ps][pp] = 2;\n\t\t\treturn false;\n\t\t}\n\t\tif (p == null || p.length - pp == 0) {\n\t\t\tdp[ps][pp] = 2;\n\t\t\treturn false;\n\t\t}\n\t\tif (s[ps] == p[pp] || p[pp] == '?') {\n\t\t\tboolean result = isMatch(s, p, ps + 1, pp + 1);\n\t\t\tdp[ps][pp] = get(result);\n\t\t\treturn result;\n\t\t}\n\t\tif (p[pp] == '*') {\n\t\t\t// *=0,1,1+\n\t\t\tboolean result = isMatch(s, p, ps, pp + 1)\n\t\t\t\t\t|| isMatch(s, p, ps + 1, pp + 1)\n\t\t\t\t\t|| isMatch(s, p, ps + 1, pp);\n\t\t\tdp[ps][pp] = get(result);\n\t\t\treturn result;\n\t\t}\n\n\t\tdp[ps][pp] = 2;\n\t\treturn false;\n\t}", "public boolean isMatch(String s, String p) {\n int sLen = s.length();\n int pLen = p.length();\n\n boolean[][] dp = new boolean[pLen + 1][sLen + 1];\n\n dp[0][0] = true;\n\n for (int i = 1; i <= pLen; i++) {\n if (p.charAt(i - 1) == '*') {\n dp[i][0] = dp[i - 2][0];\n ;\n }\n }\n\n for (int i = 1; i <= pLen; i++) {\n for (int j = 1; j <= sLen; j++) {\n\n if (p.charAt(i - 1) == '*') {\n dp[i][j] = dp[i - 2][j];\n\n if (s.charAt(j - 1) == p.charAt(i - 2) || p.charAt(i - 2) == '.') {\n dp[i][j] = dp[i][j] || dp[i][j - 1];\n }\n } else if (p.charAt(i - 1) == '.' || p.charAt(i - 1) == s.charAt(j - 1)) {\n dp[i][j] = dp[i - 1][j - 1];\n } else {\n dp[i][j] = false;\n }\n }\n }\n\n return dp[pLen][sLen];\n }", "public static boolean isMatch(String s, String p) {\n if (s == null || p == null) return false;\n boolean[][] dp = new boolean[s.length() + 1][p.length() + 1];\n dp[0][0] = true;\n for (int j = 1; j < p.length() + 1; j++) {\n if (p.charAt(j - 1) == '*') {\n if (dp[0][j - 1] || (j > 1 && dp[0][j - 2])) {\n dp[0][j] = true;\n }\n }\n }\n for (int i = 1; i <= s.length(); i++) {\n for (int j = 1; j <= p.length(); j++) {\n if (s.charAt(i - 1) == p.charAt(j - 1) || p.charAt(j - 1) == '.') {\n dp[i][j] = dp[i - 1][j - 1];\n }\n if (p.charAt(j - 1) == '*') {\n if (s.charAt(i - 1) != p.charAt(j - 2) && p.charAt(j - 2) != '.') {\n dp[i][j] = dp[i][j - 2];\n } else {\n dp[i][j] = dp[i - 1][j] || dp[i][j - 1] || dp[i][j - 2];\n }\n }\n }\n }\n return dp[s.length()][p.length()];\n }", "private int dp(String s){\n\n int n = s.length();\n boolean[][] dp = new boolean[n][n];\n int[] cuts = new int[n];\n\n for(int i = 0; i < n; i ++){\n int min = i;\n for(int j = 0; j <= i; j ++){\n if(s.charAt(i) == s.charAt(j) && ( i - j < 2 || dp[i - 1][j + 1])){\n // String(j~i) is a palindrom\n //\n dp[i][j] = true;\n min = j == 0? 0 : Math.min(min, cuts[j - 1] + 1);\n }\n }\n cuts[i] = min;\n }\n return cuts[n - 1];\n }", "public boolean isInterleaveDP(String s1, String s2, String s3) {\n\n if(s1.length()+s2.length()!=s3.length()) { return false;}\n\n // standard DP setting\n boolean[][] dp = new boolean[s1.length()+1][s2.length()+1];\n dp[0][0] = true;\n\n for(int i=0;i<=s1.length();i++){\n for(int j=0;j<=s2.length();j++){\n if(i==0&&j==0) {dp[i][j]=true;}\n else if(i==0) {// first row, \"\"+s2\n dp[i][j] = dp[i][j-1] && s3.charAt(i+j-1)==s2.charAt(j-1);\n }\n else if(j==0) { // first column, s1+\"\"\n dp[i][j] = dp[i-1][j] && s3.charAt(i+j-1)==s1.charAt(i-1);\n }\n else{\n dp[i][j] = dp[i-1][j] && s3.charAt(i+j-1)==s1.charAt(i-1) || dp[i][j-1] && s3.charAt(i+j-1)==s2.charAt(j-1);\n }\n }\n }\n return dp[s1.length()][s2.length()];\n }", "public static boolean isMatch2(String s, String p) {\n\t\t\n\t\tint len1 = s.length();\n\t\tint len2 = p.length();\n\t\t\n\t\tboolean[][] check = new boolean[ len1 + 1 ][ len2 + 1 ];\n\t\t\n\t\tcheck[0][0] = true;\n\t\t\n\t\tfor( int i = 1; i< check[0].length; i++ ){\n\t\t\tif( p.charAt( i - 1) == '*' ){\n\t\t\t\tcheck[0][i] = check[0][i - 2];\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor( int i = 1; i<check.length; i++ ){\n\t\t\tfor( int j = 1; j<check[0].length; j++ ){\n\n\t\t\t\tif( p.charAt( j - 1 ) == '.' || p.charAt( j - 1 ) == s.charAt( i - 1 ) ){\n\t\t\t\t\tcheck[i][j] = check[i - 1][j - 1];\n\t\t\t\t}\n\t\t\t\telse if( p.charAt(j - 1) == '*' ){\n\n\t\t\t\t\tcheck[i][j] = check[i][ j - 2 ];\n\n\t\t\t\t\tif( p.charAt( j - 2 ) == '.' || p.charAt( j - 2 ) == s.charAt( i - 1 ) ){\n\t\t\t\t\t\tcheck[i][j] = check[i][j] || check[i - 1][j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcheck[i][j] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn check[ len1 ][ len2 ];\t\n\t}", "public boolean match(String s, String p) {\n if(s==null||p==null) return false;\n if(p.length()==0&&s.length()!=0) return false;\n if(mem[s.length()][p.length()]!=0) return mem[s.length()][p.length()]==1;\n boolean ans=false;\n if(s.length()==0) ans=canBeEmpty(p);\n else if(p.charAt(0)=='?'||p.charAt(0)==s.charAt(0)) ans=match(s.substring(1),p.substring(1));\n else if(p.charAt(0)=='*') ans= match(s.substring(1),p)||match(s.substring(1),p.substring(1));\n mem[s.length()][p.length()]=ans?1:2;\n return ans;\n }", "static int countPairs(String s)\n {\n\n // Create the dp table initially\n boolean dp[][] = new boolean[N][N];\n pre_process(dp, s.toCharArray());\n int n = s.length();\n\n // Declare the left array\n int left[] = new int[n];\n\n // Declare the right array\n int right[] = new int[n];\n\n // Initially left[0] is 1\n left[0] = 1;\n\n // Count the number of palindrome\n // pairs to the left\n for (int i = 1; i < n; i++)\n {\n\n for (int j = 0; j <= i; j++)\n {\n\n if (dp[j][i] == true)\n {\n left[i]++;\n }\n }\n }\n\n // Initially right most as 1\n right[n - 1] = 1;\n\n // Count the number of palindrome\n // pairs to the right\n for (int i = n - 2; i >= 0; i--)\n {\n\n right[i] = right[i + 1];\n\n for (int j = n - 1; j >= i; j--)\n {\n\n if (dp[i][j] == true)\n {\n right[i]++;\n }\n }\n }\n\n int ans = 0;\n\n // Count the number of pairs\n for (int i = 0; i < n - 1; i++)\n {\n ans += left[i] * right[i + 1];\n }\n\n return ans;\n }", "private boolean isMatch1(String s, int si, String p, int pi) {\n\t\t/*\n\t\t * If adding `si < s.length()` to `currentMatch`, rest of match will be done recursively.\n\t\tif (si >= s.length()) {\n\t\t\t// The rest of pattern should be ignorable,\n\t\t\t// which means every element has to be a pair with '*'.\n\t\t\twhile (pi < p.length()) {\n\t\t\t\tif (pi >= p.length() - 1 || p.charAt(pi + 1) != '*') return false;\n\t\t\t\tpi += 2;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t*/\n\t\tif (pi >= p.length()) return si >= s.length();\n\n\t\tboolean currentMatch = si < s.length() && (p.charAt(pi) == '.' || p.charAt(pi) == s.charAt(si));\n\n\t\t// Check next `si` if matched, stay in current `si` otherwise.\n\t\tif (pi < p.length() - 1 && p.charAt(pi + 1) == '*') {\n\t\t\treturn (currentMatch && (isMatch1(s, si + 1, p, pi + 2) || isMatch1(s, si + 1, p, pi)))\n\t\t\t\t\t|| isMatch1(s, si, p, pi + 2);\n\t\t} else {\n\t\t\treturn currentMatch && isMatch1(s, si + 1, p, pi + 1);\n\t\t}\n\t}", "public int minDis(String s1, String s2, int n, int m, int[][]dp){\n \n if(n == 0) \n return m; \n if(m == 0) \n return n;\n \n // To check if given n & m has already been executed\n if(dp[n][m] != -1) \n return dp[n][m];\n \n // If characters are equal, execute recursive function for n-1, m-1\n if(s1.charAt(n-1) == s2.charAt(m-1))\n { \n if(dp[n-1][m-1] == -1)\n { \n return dp[n][m] = minDis(s1, s2, n-1, m-1, dp); \n } \n else\n return dp[n][m] = dp[n-1][m-1]; \n }\n \n //If characters are not equal, we need to\n //Find the minimum cost out of all 3 operations. \n else\n { \n int m1, m2, m3; // temp variables \n if(dp[n-1][m] != -1)\n { \n m1 = dp[n - 1][m]; \n } \n else\n { \n m1 = minDis(s1, s2, n - 1, m, dp); \n } \n \n if(dp[n][m - 1] != -1)\n { \n m2 = dp[n][m - 1]; \n } \n else\n { \n m2 = minDis(s1, s2, n, m - 1, dp); \n } \n \n if(dp[n - 1][m - 1] != -1)\n { \n m3 = dp[n - 1][m - 1]; \n } \n else\n { \n m3 = minDis(s1, s2, n - 1, m - 1, dp); \n } \n return dp[n][m] = 1 + Math.min(m1, Math.min(m2, m3)); \n } \n }", "public int countSubstrings_dp(String s) {\n\t\tint n = s.length();\n\t\tint res = 0;\n\t\tboolean[][] dp = new boolean[n][n];\n\t\tfor (int i = n - 1; i >= 0; i--) {\n\t\t\tfor (int j = i; j < n; j++) {\n\t\t\t\tdp[i][j] = s.charAt(i) == s.charAt(j) \n\t\t\t\t\t\t&& (j - i + 1 < 3 || dp[i + 1][j - 1]);\n\t\t\t\t\n\t\t\t\tif (dp[i][j])\n\t\t\t\t\t++res;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "private boolean isMatch0(String s, int si, String p, int pi) {\n\t\tif (si >= s.length()) return pi <= p.length();\n\t\tif (pi >= p.length()) return false;\n\t\t// if (cache[si][pi] != -1) return cache[si][pi] == 1;\n\n\t\tchar pattern = p.charAt(pi);\n\t\tboolean result;\n\n\t\tif (pattern == '.') {\n\t\t\tresult = isMatch0(s, si + 1, p, pi + 1);\n\t\t} else if (pattern == '*') {\n\t\t\tboolean skip = isMatch0(s, si + 1, p, pi + 1);\n\t\t\tboolean skipZero = isMatch0(s, si + 1, p, pi);\n\t\t\tresult = skip || skipZero;\n\t\t} else {\n\t\t\tresult = pattern == s.charAt(si)\n\t\t\t\t\t? isMatch0(s, si + 1, p, pi + 1)\n\t\t\t\t\t: isMatch0(s, si, p, pi + 1);\n\t\t}\n\n\t\t// cache[si][pi] = result ? 1 : 0;\n\t\treturn result;\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString str = \"abccbc\";\n\t\t\n\t\tlong[][] dp = new long[str.length()][str.length()];\t\n\t\t\n\t\tfor (int g=0 ; g<str.length() ; g++) {\n\t\t\t\n\t\t\tfor (int i=0 , j=g ; j<str.length() ; i++ , j++) {\n\t\t\t\tif (g == 0) dp[i][j] = 1;\n\t\t\t\t\n\t\t\t\telse if (g == 1) dp[i][j] = (str.charAt(i) == str.charAt(j)) ? 3 : 2;\n\t\t\t\t\n\t\t\t\telse dp[i][j] = (str.charAt(i) == str.charAt(j)) ? (dp[i][j-1] + dp[i+1][j] + 1) : (dp[i][j-1] + dp[i+1][j] - dp[i+1][j-1]);\n\t\t\t\t\n\t\t\t\t//if (dp[i][j] && str.substring(i, j+1).length() > result.length()) result = str.substring(i, j+1);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(dp[0][str.length()-1]);\n\t}", "public int minInsertions(String s) {\n int n = s.length();\n //Initialising dp array. It will represent the longest common subsequence between first i characters of first string and first j characters of second string\n int[][] dp = new int[n+1][n+1];\n \n //Looping through start and end of the string. Thus dp will consider the string from start and string from end and then store the ans\n for (int i = 0; i < n; ++i){\n for (int j = 0; j < n; ++j){\n \n //If both the characters are equal, then we increment the previous dp value otherwise we take max of the next character considered for both strings\n dp[i + 1][j + 1] = s.charAt(i) == s.charAt(n - 1 - j) ? dp[i][j] + 1 : Math.max(dp[i][j + 1], dp[i + 1][j]);\n } \n }\n //Returning ans\n return n - dp[n][n];\n }", "public boolean search(String s, String p) {\n int i,j,start=0;\n for(i=0,j=0;i<s.length()&&j<p.length();i++) {\n if(p.charAt(j)=='*') {\n start = ++j;\n i--;\n } else if(match(p.charAt(j),s.charAt(i))) {\n j++;\n } else {\n i-=j-start;\n j=start;\n }\n }\n while(j<p.length() && p.charAt(j)=='*') {\n j++;\n }\n return j>=p.length();\n }", "public static boolean dp(String s, List<String> wordDict) {\n Set<String> dic = new HashSet(wordDict);\n\n // BUG: firstly try i inclusive, but it's harder.\n //start from 0, end at i(exclusive), is that available\n boolean [] board = new boolean [s.length() + 1];\n Arrays.fill(board, false);\n\n board[0] = true;\n for(int i=1; i<=s.length(); i++) {\n boolean flag = false;\n for(int j=0; j<i; j++) {\n\n // BUG: confuse = and ==\n // BUG: confuse substring(j, i) and substring(j+1, i), because define exclusive above\n if(board[j] == true && dic.contains(s.substring(j, i))) {\n flag = true;\n break;\n }\n }\n board[i] = flag;\n }\n\n return board[s.length()];\n }", "public boolean isMatch(String s, String p) {\n if(s == null || p == null){\n return false;\n }\n int pPoint = 0;\n int sPoint = 0;\n int starPoint =-1;\n int sMatch = 0;\n while(sPoint < s.length()){\n // there is no star, then we should match char by char\n if(pPoint < p.length() && (p.charAt(pPoint) == '?' || s.charAt(sPoint) == p.charAt(pPoint))){\n pPoint ++;\n sPoint ++;\n }else if( pPoint < p.length() && p.charAt(pPoint) == '*'){\n //if there is start, we mark the start position and pos in s\n // compare pPoint +1 and sPoint;\n starPoint = pPoint;\n sMatch = sPoint;\n pPoint++;\n }else if(starPoint != -1){\n // if there is a start already and there is mismatch between pPoint and sPoint\n // we use the * to match the sPoint\n // bring back the point to startPoint+1 for pPoint \n // sMatch ++\n pPoint = starPoint+1;\n sPoint = sMatch+1;\n sMatch ++;\n }else{\n return false;\n }\n }\n while(pPoint < p.length()){\n if(p.charAt(pPoint) != '*'){\n return false;\n }\n pPoint++;\n }\n return true;\n }", "public String longestPalindrome_DP(String s) {\n int n = s.length();\n boolean[][] isPa = new boolean[n][n];\n int lo = 0, hi = 0, maxLen = 1;\n for(int l = 1; l <= n; l++) {\n for(int i = 0; i <= n-l; i++) {\n int j = i + l - 1;\n if(i == j) {\n isPa[i][j] = true;\n } else {\n if(s.charAt(i) == s.charAt(j)) {\n if(j-i == 1 || isPa[i+1][j-1]) {\n isPa[i][j] = true;\n int len = j - i + 1;\n if(len > maxLen) {\n lo = i;\n hi = j;\n maxLen = len;\n }\n } else {\n isPa[i][j] = false;\n }\n } else {\n isPa[i][j] = false;\n }\n }\n }\n }\n return s.substring(lo, hi+1);\n }", "public int[] solution(String S, int[] P, int[] Q) {\n \n int[][] result = new int[S.length()][4];\n int[] returnResult = new int[P.length];\n \n //how many different solutions exist?\n //'A' [0], [0] - 1 solution\n //'AG' [0, 0, 1], [0, 1, 1] - 3\n // 'AGT' [0,0,0,1,1,2], [0,1,1,2,2,2] - 6\n // 10\n // 15\n // 21\n \n //Prefix Sum - calculation\n \n for (int i = 1; i< S.length()+1; i++){\n \n if (i == 1){\n switch (S.substring(i-1, i)){\n case \"A\": result[i-1][0] = 1;\n break;\n case \"C\": result[i-1][1] = 1;\n break;\n case \"G\": result[i-1][2] = 1;\n break;\n case \"T\": result[i-1][3] = 1;\n break;\n }\n }else{\n int a = 0;\n switch (S.substring(i-1, i)){\n case \"A\": a = 0;\n break;\n case \"C\": a= 1;\n break;\n case \"G\": a =2;\n break;\n case \"T\": a =3;\n break;\n }\n result[i-1][a] = 1 + result[i-2][a];\n result[i-1][(a+1)%4] = result[i-2][(a+1)%4];\n result[i-1][(a+2)%4] = result[i-2][(a+2)%4];\n result[i-1][(a+3)%4] = result[i-2][(a+3)%4];\n }\n\n }\n \n /*\n for (double i : result){\n System.out.println(i);\n }\n */\n \n //A = 1, G = 2, C = 3, T = 4\n //when A found return 1 and move to next computation.\n // P[k] <= Q[K]\n int lowerBound = 0;\n int upperBound = 0;\n for (int i = 0; i < P.length; i++){\n lowerBound = P[i];\n upperBound = Q[i];\n \n int[] toEvaluate = new int[4];\n\n //System.out.println(lowerBound);\n if (lowerBound == 0){\n toEvaluate[0]= result[upperBound][0];\n toEvaluate[1]= result[upperBound][1];\n toEvaluate[2]= result[upperBound][2];\n toEvaluate[3]= result[upperBound][3];\n }else{\n toEvaluate[0]= result[upperBound][0] - result[lowerBound-1][0]; \n toEvaluate[1]= result[upperBound][1] - result[lowerBound-1][1];\n toEvaluate[2]= result[upperBound][2] - result[lowerBound-1][2];\n toEvaluate[3]= result[upperBound][3] - result[lowerBound-1][3];\n }\n \n /*\n for (int eval : toEvaluate){\n System.out.println(eval);\n \n }\n */\n if (toEvaluate[0] > 0) {returnResult[i] = 1;\n }else if (toEvaluate[1] > 0) {returnResult[i] = 2;\n }else if (toEvaluate[2] > 0) {returnResult[i] = 3;\n }else if (toEvaluate[3] > 0) {returnResult[i] = 4;\n }\n \n }\n \n return returnResult; \n }", "public double P(SearchPath sp, int i, int j, boolean end) {\r\n\t\tsp.remove(\".\");\r\n\t\tint completeMatch = 0;\r\n\t\tint partialMatch = 0;\r\n\r\n\t\tint temp = Math.min(i, j);\r\n\t\tj = Math.max(i, j);\r\n\t\ti = temp;\r\n\r\n\t\tfor (SearchPath vertices : sp.expandAll()) {\r\n\t\t\tfor (SearchPath p : paths) {\r\n\t\t\t\tint currentIndex = end ? i : i + 1;\r\n\t\t\t\t// start at 1 if we might not care about the beginning node\r\n\r\n\t\t\t\tfor (int k = 0; k < p.size(); k++) {\r\n\t\t\t\t\tif (p.get(k) == vertices.get(currentIndex)) { // another match\r\n\t\t\t\t\t\tcurrentIndex++;\r\n\r\n\t\t\t\t\t\tif (end) {\r\n\t\t\t\t\t\t\tif (currentIndex == j - 1)\r\n\t\t\t\t\t\t\t\tpartialMatch++;\r\n\t\t\t\t\t\t\tif (currentIndex == j)\r\n\t\t\t\t\t\t\t\tcompleteMatch++;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif (currentIndex == j) {\r\n\t\t\t\t\t\t\t\tpartialMatch++;\r\n\r\n\t\t\t\t\t\t\t\tif (p.get(k - j + i) == vertices.get(i))\r\n\t\t\t\t\t\t\t\t\tcompleteMatch++;\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\telse {\r\n\t\t\t\t\t\tcurrentIndex = end ? i : i + 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn partialMatch == 0 ? 0 : completeMatch / (double) partialMatch;\r\n\t}", "static int editDistDP(String str1, String str2, int m, int n) \n {\n int dp[][] = new int[m+1][n+1]; \n \n // Fill d[][] in bottom up manner \n for (int i=0; i<=m; i++) \n { \n for (int j=0; j<=n; j++) \n { \n // If first string is empty, only option is to \n // insert all characters of second string \n if (i==0) \n dp[i][j] = j; // Min. operations = j \n \n // If second string is empty, only option is to \n // remove all characters of second string \n else if (j==0) \n dp[i][j] = i; // Min. operations = i \n \n // If last characters are same, ignore last char \n // and recur for remaining string \n else if (str1.charAt(i-1) == str2.charAt(j-1)) \n dp[i][j] = dp[i-1][j-1]; \n \n // If the last character is different, consider all \n // possibilities and find the minimum \n else\n dp[i][j] = 1 + min(dp[i][j-1], // Insert \n dp[i-1][j], // Remove \n dp[i-1][j-1]); // Replace \n } \n } \n \n return dp[m][n]; \n }", "private static boolean Star(String s, String p)\n\t{\n\t\twhile (wildmat(s, p) == false)\n\t//if (++s == s.length())\n\t\t\treturn(false);\n\t\treturn(true);\n\t}", "static int editDistDP(String str1, String str2, int m, int n) \n {\n int dp[][] = new int[m + 1][n + 1]; \n \n // Fill d[][] in bottom up manner \n for (int i = 0; i <= m; i++) { \n for (int j = 0; j <= n; j++) { \n // If first string is empty, only option is to \n // insert all characters of second string \n if (i == 0) \n dp[i][j] = j; // Min. operations = j \n \n // If second string is empty, only option is to \n // remove all characters of second string \n else if (j == 0) \n dp[i][j] = i; // Min. operations = i \n \n // If last characters are same, ignore last char \n // and recur for remaining string \n else if (str1.charAt(i - 1) == str2.charAt(j - 1)) \n dp[i][j] = dp[i - 1][j - 1]; \n \n // If the last character is different, consider all \n // possibilities and find the minimum \n else\n dp[i][j] = 1 + min(dp[i][j - 1], // Insert \n dp[i - 1][j], // Remove \n dp[i - 1][j - 1]); // Replace \n } \n }\n\t\tprint2DArray(dp);\n \n return dp[m][n]; \n }", "public int countSubstrings_dp2(String s) {\n\t\tint sLen = s.length();\n\t\tchar[] cArr = s.toCharArray();\n\n\t\tint totalPallindromes = 0;\n\t\tboolean[][] dp = new boolean[sLen][sLen];\n\n\t\t// Single length pallindroms\n\t\tfor (int i = 0; i < sLen; i++) {\n\t\t\tdp[i][i] = true;\n\t\t\ttotalPallindromes++;\n\t\t}\n\n\t\t// 2 length pallindromes\n\t\tfor (int i = 0; i < sLen - 1; i++) {\n\t\t\tif (cArr[i] == cArr[i + 1]) {\n\t\t\t\tdp[i][i + 1] = true;\n\t\t\t\ttotalPallindromes++;\n\t\t\t}\n\t\t}\n\n\t\t// Lengths > 3\n\t\tfor (int subLen = 2; subLen < sLen; subLen++) {\n\t\t\tfor (int i = 0; i < sLen - subLen; i++) {\n\t\t\t\tint j = i + subLen;\n\n\t\t\t\tif (dp[i + 1][j - 1] && cArr[i] == cArr[j]) {\n\t\t\t\t\tdp[i][j] = true;\n\t\t\t\t\ttotalPallindromes++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn totalPallindromes;\n\t}", "public boolean isMatch_recursive(String s, String p) {\n return isMatch(s.toCharArray(), p.toCharArray(), 0, 0);\n }", "private boolean dfs(String word, TrieNode parent) {\n if (word.length() == 0) {//since it's parent node so idx cannot be len - 1\n return parent.isLeaf;\n }\n boolean firstMatch = word.length() > 0 && (parent.map.containsKey(word.charAt(0)) || word.charAt(0) == '.');\n if (word.length() > 1 && word.charAt(1) == '*') {\n if(word.charAt(0) == '.') {\n boolean tmp = false;\n for (TrieNode curr : parent.map.values()) {\n tmp = tmp || firstMatch && dfs(word, curr);\n }\n return tmp || firstMatch && dfs(word.substring(2), parent); //match || no match\n } else {\n return firstMatch && (dfs(word, parent.map.get(word.charAt(0))) || dfs(word.substring(2), parent.map.get(word.charAt(0))));\n }\n } else {\n if (word.charAt(0) == '.') {\n boolean tmp = false;\n for (TrieNode curr : parent.map.values()) {\n tmp = tmp || firstMatch && dfs(word.substring(1), curr);\n }\n return tmp;\n } else {\n return firstMatch && dfs(word.substring(1), parent.map.get(word.charAt(0)));\n }\n }\n }", "public KMP(String pat) {\n this.R = 256; //the ascii numerical equivalent of a character could be from 1-256\n \t\t\t //So that many number of rows\n this.pat = pat;\n\n // build DFA from pattern\n int M = pat.length();\n\n //dfa array is a lookup table for the next transition, given the 'character' and 'current-state'\n //dfa is built from the pattern\n //read: dfa[incomingCharacter][currentState]\n dfa = new int[R][M]; //R possible characters, M possible states\n \n //if I am currently in State 2 and the incoming character is A, what state should this go to ?\n //that is given by dfa[65][2] i.e dfa['A'][2]\n\n //I am in the very first state (initial state) and receive\n //the first pattern character. Go to the next state.\n\n dfa[pat.charAt(0)][0] = 1;\n\n //For j=0, dfa[pat.charAt(0)][0] = 1; takes care of success transition and the rest default to 0.\n //So we don't worry about 0th state, in this for loop\n\n for (int X = 0, j = 1; j < M; j++) {\n //Start with fallback state X=0 initially\n //Have to update missing transitions for states 1 through end-of-pattern\n\n \tfor (int c = 0; c < R; c++)\n { dfa[c][j] = dfa[c][X]; \t\t// Copy mismatch cases. \n } \t\t\t\t\t\t\t\t// Copy the whole column at X, to the current column position j\n \t\t\t\t\t\t\t \n \t/*Override for the matching cases\n \tStates: 0-1-2-3\n \tPattern:\"abc\" a at 0 transitions to 1, b at 1 transitions to 2, c at 2 transitions to 3\n \tpat.chatAt(j) at state j should trigger a transition to state j+1\n \t */\n\n //For matching cases, override the cell values\n //The cell value would be currentStateNo+1. So j+1\n\n dfa[pat.charAt(j)][j] = j+1;\n\n //Now finally change the fallback state\n //If I had, received the same character at the fallback state, where would I have gone ?\n \t//That's the new fallback state.\n\n X = dfa[pat.charAt(j)][X]; // Update restart state.\n } \n }", "public boolean wordBreak(String s, List<String> wordDict) {\n int iIndex = 0;\n int jIndex = 0;\n int sLength = s.length();\n boolean dp[][] = new boolean[sLength][sLength];\n int i = 0;\n int j = 0;\n System.out.println(s.substring(0,0));\n System.out.println(s.substring(0,1));\n while (jIndex < sLength) {\n \ti = iIndex; \n \tj = jIndex;\n \twhile (j < sLength) {\n \t\tif (wordDict.contains(s.substring(i, j + 1))) {\n \t\t\tdp[i][j] = true;\n \t\t} else {\n \t\t\tint firstStart = 0;\n \t\t\tint firstEnd = 0;\n \t\t\tint secondStart = firstEnd + 1;\n \t\t\tint secondEnd = j;\n \t\t\twhile (secondStart <= secondEnd) {\n \t\t\t\tdp[i][j] = dp[firstStart][firstEnd] && dp[secondStart][secondEnd];\n \t\t\t\tif (dp[i][j]) {\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\tfirstEnd++;\n \t\t\t\tsecondStart = firstEnd + 1;\n \t\t\t}\n \t\t}\n \t\ti++;\n \t\tj++;\n \t}\n \tiIndex = 0;\n \tjIndex++;\n }\n\n // for (int x = 0; x < dp.length; x++) {\n // \tfor (int y = 0; y < dp[0].length; y++) {\n // \t\tSystem.out.print(dp[x][y] + \" \");\n // \t}\n // \tSystem.out.println();\n // }\n\n return dp[0][sLength - 1];\n }", "public final int[][] solve(final Point s, final char[][] g) {\n visited = new boolean[g.length][g[0].length];\n stack.push(s);\n Point top;\n while (!stack.isEmpty()) {\n top = (Point) stack.peek();\n int i = top.x;\n int j = top.y;\n if (g[i][j] == 'E') {\n break;\n }\n visited[i][j] = true;\n if (i - 1 >= 0 && isValid(i - 1, j, g)) {\n stack.push(new Point(i - 1, j));\n } else if (j + 1 < m && isValid(i, j + 1, g)) {\n stack.push(new Point(i, j + 1));\n } else if (i + 1 < n && isValid(i + 1, j, g)) {\n stack.push(new Point(i + 1, j));\n } else if (j - 1 >= 0 && isValid(i, j - 1, g)) {\n stack.push(new Point(i, j - 1));\n } else {\n stack.pop();\n }\n }\n if (stack.size() == 0) {\n return null;\n }\n int[][] ret = new int[stack.size()][2];\n for (int i = stack.size() - 1; i >= 0; i--) {\n ret[i][0] = ((Point) stack.peek()).x;\n ret[i][1] = ((Point) stack.pop()).y;\n }\n return ret;\n }", "static String recurse(int j,int p,int s,int steps)\r\n\t{\n\t\tif (steps==0)\r\n\t\t\treturn \"\";\r\n\t\tif (j==J)\r\n\t\t\treturn null;\r\n\t\tif ((J-j-1)*P*S+(P-p-1)*S+S-s<steps)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tint sn=s+1;\r\n\t\tint pn=p+(sn/S);\r\n\t\tint jn=j+(pn/P);\r\n\t\tpn%=P;\r\n\t\tsn%=S;\r\n\t\t\r\n\t\tString sol=recurse(jn,pn,sn,steps);\r\n\t\tif (sol!=null)\r\n\t\t\treturn sol;\r\n\t\t\r\n\t\tif (jp[j][p]<K && js[j][s]<K && ps[p][s]<K)\r\n\t\t{\r\n\t\t\tjp[j][p]++;\r\n\t\t\tjs[j][s]++;\r\n\t\t\tps[p][s]++;\r\n\t\t\tsol=recurse(jn,pn,sn,steps-1);\r\n\t\t\tif (sol!=null)\r\n\t\t\t\treturn \"\"+(j+1)+\" \"+(p+1)+\" \"+(s+1)+\"\\n\"+sol;\r\n\t\t\tjp[j][p]--;\r\n\t\t\tjs[j][s]--;\r\n\t\t\tps[p][s]--;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public boolean wordBreakDP(String s, List<String> wordDict) {\n int[] memo = new int[s.length()];\n Arrays.fill(memo, -1);\n return dp(s, wordDict, memo, s.length() - 1);\n }", "public static void main(String[] args) {\n\t\tint width=35;\n\t\tint length=31;\n\t\tlong[][] dp = new long[width+1][length+1];\n\t\tdp[0][0]=0;\n\t\tfor(int i=1;i<length+1;i++){\n\t\t\tif(badCheck(0,i,0,i-1)){\n\t\t\t\tdp[0][i]=0;\n\t\t\t\tfor(int k=i+1;k<length+1;k++){\n\t\t\t\t\tdp[0][k]=0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tdp[0][i]=1;\n\t\t\t}\n\t\t}\n\t\tfor(int i=1;i<width+1;i++){\n\t\t\tif(badCheck(i,0,i-1,0)){\n\t\t\t\tdp[i][0]=0;\n\t\t\t\tfor(int k=i+1;k<width+1;k++){\n\t\t\t\t\tdp[k][0]=0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tdp[i][0]=1;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i=1;i<=width;i++){\n\t\t\tfor(int j=1;j<=length;j++){\n\t\t\t\tif(!badCheck(i-1,j,i,j)){\n\t\t\t\t\tdp[i][j]+=dp[i-1][j];\n\t\t\t\t}\n\t\t\t\tif(!badCheck(i,j-1,i,j)){\n\t\t\t\t\tdp[i][j]+=dp[i][j-1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//System.out.println(dp[6][6]);\n\t\t//System.out.println(dp[2][2]);\n\t\t//System.out.println(dp[1][1]);\n\t\tSystem.out.println(dp[35][31]);\n\t}", "public boolean isMatch(String s, String p) {\n\t\tint slen = s.length();\n\t\tint plen = p.length();\n\t\tif (plen >= 2) {\n\t\t\tString t = \"\";\n\t\t\tfor (int k = 0; k < plen - 1; k++) {\n\t\t\t\tif (p.charAt(k) == '*' && p.charAt(k + 1) == '*') {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tt += p.substring(k, k + 1);\n\t\t\t}\n\t\t\tif (p.charAt(plen - 1) == '*' && p.charAt(plen - 2) != '*') {\n\t\t\t\tt += \"*\";\n\t\t\t} else {\n\t\t\t\tt += p.substring(plen - 1, plen);\n\t\t\t}\n\t\t\tp = t;\n\t\t\tplen = t.length();\n\t\t}\n\t\tchar[] sarr = new char[slen + 1];\n\t\tchar[] parr = new char[plen + 1];\n\t\tfor (int i = 0; i < slen; i++) {\n\t\t\tsarr[i] = s.charAt(i);\n\t\t}\n\t\tfor (int j = 0; j < plen; j++) {\n\t\t\tparr[j] = p.charAt(j);\n\t\t}\n\t\tsarr[slen] = '\\0';\n\t\tparr[plen] = '\\0';\n\t\treturn isMatchRecur(sarr, 0, parr, 0);\n\n\t}", "public static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint t = scn.nextInt();\n\t\twhile (t-- > 0) {\n\t\t\tint n = scn.nextInt();\n\t\t\tint k = scn.nextInt();\n\t\t\tString s = scn.next();\n\t\t\tString s1 = new StringBuilder(s).reverse().toString();\n\t\t\tint[][] dp = new int[n + 1][n + 1];\n\t\t\tfor (int i = 0; i <= n; i++) {\n\t\t\t\tfor (int j = 0; j <= n; j++) {\n\t\t\t\t\tif (i == 0 || j == 0)\n\t\t\t\t\t\tdp[i][j] = 0;\n\t\t\t\t\telse if (s.charAt(i - 1) == s1.charAt(j - 1))\n\t\t\t\t\t\tdp[i][j] = dp[i - 1][j - 1] + 1;\n\t\t\t\t\telse\n\t\t\t\t\t\tdp[i][j] = Math.max(dp[i - 1][j], dp[i][j - 1]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int[] c : dp) {\n\t\t\t\tfor (int v : c) {\n\t\t\t\t\tSystem.out.print(v + \" \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\tint rem = n - dp[n][n];\n\t\t\tif (rem <= k)\n\t\t\t\tSystem.out.println(\"YES\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"NO\");\n\t\t}\n\t}", "public boolean repeatedSubstringPattern(String s) {\n char[] ch = s.toCharArray();\n int[] pi = new int[ch.length];\n pi[0] = 0;\n int matched = 0;\n for (int i = 1; i < pi.length; i++) {\n while (matched > 0 && ch[matched] != ch[i])\n matched = pi[matched-1];\n if (ch[matched] == ch[i])\n matched++;\n pi[i] = matched;\n }\n return pi[pi.length-1] != 0 && pi.length % (pi.length - pi[pi.length-1]) == 0;\n }", "public static String findRepetitivePattern(String s) {\n if (s.isEmpty()) {\n return s;\n }\n int n = 0;\n int pLength = 1;\n\n int i = 1;\n char[] arr = s.toCharArray();\n while (i < arr.length) {\n\n boolean patternMatched = true;\n for (int j = 0; j < pLength && i + j < arr.length; ++j) {\n int k = i + j;\n if (k >= arr.length || arr[j] != arr[k]) {\n patternMatched = false;\n break;\n }\n }\n if (patternMatched) {\n n++;\n i += pLength;\n } else {\n i += 1;\n pLength = i;\n n = 0;\n }\n }\n return String.copyValueOf(arr, 0, pLength);\n }", "static int lps(char seq[], int i, int j) {\n // Base Case 1: If there is only 1 character\n if (i == j) {\n return 1;\n }\n\n // Base Case 2: If there are only 2 characters and both are same\n if (seq[i] == seq[j] && i + 1 == j) {\n return 2;\n }\n\n // If the first and last characters match\n if (seq[i] == seq[j]) {\n return lps(seq, i + 1, j - 1) + 2;\n }\n\n // If the first and last characters do not match\n return max(lps(seq, i, j - 1), lps(seq, i + 1, j));\n }", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint t = s.nextInt();\n\t\twhile(t-->0)\n\t\t{\n\t\t\tint n = s.nextInt();\n\t\t\tint k = s.nextInt();\n\t\t\tint[] arr = new int[n];\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t\tarr[i] = s.nextInt();\n\t\t\tArrays.sort(arr);\n\t\t\tint[][] dp = new int[k+1][n+1];\n\t\t\tfor(int i=0;i<=k;i++)\n\t\t\t\tfor(int j=0;j<=n;j++)\n\t\t\t\t{\n\t\t\t\t\tif(i==0)\n\t\t\t\t\t\tdp[i][j] = 0;\n\t\t\t\t\telse if(j==0)\n\t\t\t\t\t\tdp[i][j] = -1;\n\t\t\t\t\telse if(i-arr[j-1]>=0)\n\t\t\t\t\t{\n\t\t\t\t\t\tint val1 = dp[i-arr[j-1]][j-1];\n\t\t\t\t\t\tint val2 = dp[i][j-1];\n\t\t\t\t\t\tif(val1!=-1 && val2!=-1)\n\t\t\t\t\t\t\tdp[i][j] = Math.min(1+val1,val2);\n\t\t\t\t\t\telse if(val1!=-1)\n\t\t\t\t\t\t\tdp[i][j] = 1+val1;\n\t\t\t\t\t\telse if(val2!=-1)\n\t\t\t\t\t\t\tdp[i][j] = val2;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tdp[i][j] = -1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif(dp[i][j-1]==-1)\n\t\t\t\t\t\t\tdp[i][j] = -1;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tdp[i][j] = dp[i][j-1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif(dp[k][n]!=-1)\n\t\t\t\tSystem.out.println(dp[k][n]);\n\t\t\telse\n\t\t\t\tSystem.out.println(\"impossible\");\n\t\t}\n\t}", "public boolean dfs(String s, Set<String> dic) {\n if(s.equals(\"\")) return true;\n for(int i=0; i<s.length(); i++) {\n String temp = s.substring(0, i+1);\n if(dic.contains(temp)) {\n if(dfs(s.substring(i+1), dic)) return true;\n }\n }\n return false;\n }", "public static int matchingPairs(String s, String t) {\n if(s.length() != t.length()) return 0;\r\n StringBuilder sb1 = new StringBuilder();\r\n StringBuilder sb2 = new StringBuilder();\r\n int res = 0;\r\n boolean hasDuplicates = false; //Edge Case where if it has Dups then you can just to inner swap and you will get same result\r\n Set<Character> dupsCheckSet = new HashSet<>();\r\n\r\n for(int idx = 0; idx < s.length(); idx++){\r\n if(s.charAt(idx) != t.charAt(idx)){\r\n sb1.append(s.charAt(idx));\r\n sb2.append(t.charAt(idx));\r\n }else {\r\n if(!dupsCheckSet.add(s.charAt(idx))){\r\n hasDuplicates = true;\r\n }\r\n res++;\r\n }\r\n }\r\n\r\n //if both string are same then you don't have to calculate\r\n if(sb1.length() == 0){\r\n if(hasDuplicates){\r\n return res;\r\n }\r\n return res - 2;\r\n }\r\n\r\n Map<Character, Integer> mapS = new HashMap<>(), mapT = new HashMap<>();\r\n for (int idx = 0; idx < sb1.length(); idx++){ //\"bd\",\"db\";\r\n //if mapS contains chars from sb2 then if we swap them with each other it will be a matching pair\r\n if(mapS.containsKey(sb2.charAt(idx))){\r\n res++;\r\n }\r\n //if both Chars are reverse of each other then we can switch and add 1 to it\r\n if(mapS.getOrDefault(sb2.charAt(idx), -1) == mapT.getOrDefault(sb1.charAt(idx), -2)){\r\n return res + 1;\r\n }\r\n mapS.put(sb1.charAt(idx), idx);\r\n mapT.put(sb2.charAt(idx), idx);\r\n }\r\n\r\n\r\n return res + ((sb1.length() == 1) ? -1 : 0);\r\n }", "static int paths_dp(int[][] matrix) {\n\t\tint n = matrix.length;\n\t\tint m = matrix[0].length;\n\t\t\n\t\tint[][] dp = new int[n][m];\n\t\tdp[0][0] = matrix[0][0] == 1? 0 : 1;\n\t\t\n\t\tfor(int i = 1; i < m; i++) {\n\t\t\tif(matrix[0][i] == 1) {\n\t\t\t\tdp[0][i] = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdp[0][i] = dp[0][i-1];\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tif(matrix[i][0] == 1) {\n\t\t\t\tdp[i][0] = 0;\n\t\t\t} else {\n\t\t\t\tdp[i][0] = dp[i-1][0];\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tfor(int j = 1; j < m; j++) {\n\t\t\t\tif(matrix[i][j] == 1 ) {\n\t\t\t\t\tdp[i][j] = 0;\n\t\t\t\t} else {\n\t\t\t\t\tdp[i][j] = dp[i-1][j] + dp[i][j+1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn dp[n-1][m-1];\n\t}", "public boolean isInterleave(String s1, String s2, String s3) {\n // write your code here\n\n int l1 = s1.length();\n int l2 = s2.length();\n int l3 = s3.length();\n\n // interleaving condition\n if (l1 + l2 != l3)\n return false;\n\n boolean[][] dp = new boolean[l1+1][l2+2];\n dp[0][0] = true;\n\n // initializing the table based on first string\n for (int i = 1; i <= l1; i++){\n if (s3.charAt(i-1) == s1.charAt(i-1) && dp[i-1][0])\n dp[i][0] = true;\n }\n\n // initializing the table based on second string\n for (int i = 1; i <= l2; i++){\n if (s3.charAt(i-1) == s2.charAt(i-1) && dp[0][i-1])\n dp[0][i] = true;\n }\n\n for (int i = 1; i<=l1; i++){\n for (int j=1; j<=l2; j++){\n if (dp[i][j-1] && (s3.charAt(i+j-1) == s2.charAt(j-1)) ||\n dp[i-1][j] && (s3.charAt(i+j-1) == s1.charAt(i-1)))\n dp[i][j] = true;\n }\n\n }\n return dp[l1][l2];\n }", "public static int[] solution(String str1, String str2) {\n int[] ans = new int[2];\n int n = str1.length(), m = str2.length();\n int[][] dp = new int[m + 1][n];\n for (int k = 0; k < n; k++) {\n for (int i = 0, j = k; j < n; i++, j++) {\n if (k == 0)\n dp[i][j] = str1.charAt(j) - '0';\n else if (k == 1) {\n int a = str1.charAt(i) - '0', b = str1.charAt(j) - '0';\n if (str2.charAt(i) == '+')\n dp[i][j] = a + b;\n else\n dp[i][j] = a * b;\n } else {\n int min = Integer.MAX_VALUE;\n for (int x = i; x < j; x++) {\n if (str2.charAt(x) == '+')\n min = Math.min(min, dp[i][x] + dp[x + 1][j]);\n else\n min = Math.min(min, dp[i][x] * dp[x + 1][j]);\n }\n dp[i][j] = min;\n }\n }\n }\n\n ans[0] = dp[0][n - 1];\n\n for (int k = 0; k < n; k++) {\n for (int i = 0, j = k; j < n; i++, j++) {\n if (k == 0)\n dp[i][j] = str1.charAt(j) - '0';\n else if (k == 1) {\n int a = str1.charAt(i) - '0', b = str1.charAt(j) - '0';\n if (str2.charAt(i) == '+')\n dp[i][j] = a + b;\n else\n dp[i][j] = a * b;\n } else {\n int max = Integer.MIN_VALUE;\n for (int x = i; x < j; x++) {\n if (str2.charAt(x) == '+')\n max = Math.max(max, dp[i][x] + dp[x + 1][j]);\n else\n max = Math.max(max, dp[i][x] * dp[x + 1][j]);\n }\n dp[i][j] = max;\n }\n }\n }\n\n ans[1] = dp[0][n - 1];\n\n return ans;\n }", "static char[][] solveTask2(char[][] board) {\n for(int i=0; i<board.length; i++){\n for(int j=0; j<board[0].length; j++){\n if(board[i][j]== '.'){\n board = updateBoard(board, i, j);\n }\n }\n }\n\n return board;\n }", "public static int firstOccurrence(String s, String x) {\n int lens = s.length();\n int lenx = x.length();\n // base cases\n if (x.equals(s) || x.equals(\"*\")&&s.length()==1) return 0;\n if (x.isEmpty() || s.isEmpty()) return -1;\n\n int[][] dp = new int[lenx+1][lens+1];\n\n for(int i = 1;i<lenx+1;i++){\n for(int j = 1;j<lens+1;j++){\n //int max = Math.max(dp[i-1][j-1], Math.max(dp[i-1][j], dp[i][j-1]));\n int max= dp[i-1][j-1];\n if((s.charAt(j-1)==x.charAt(i-1))||x.charAt(i-1)=='*'){\n dp[i][j] = max+1;\n if(dp[i][j]==lenx){\n return j-lenx;\n }\n }else{\n dp[i][j]= max;\n }\n }\n }\n return -1;\n\n }", "public int longestValidParenthesesDP(String s) {\n int n = s.length();\n int maxLength = 0;\n int DP[] = new int[n + 1];\n\n for (int i = 1; i <= n; i++) {\n char c = s.charAt(i - 1);\n int j = i - 2 - DP[i - 1];\n if (c == '(' || j < 0 || s.charAt(j) == ')') {\n DP[i] = 0;\n } else {\n DP[i] = 2 + DP[i - 1] + DP[j];\n maxLength = Math.max(maxLength, DP[i]);\n }\n }\n\n return maxLength;\n }", "public static String check(String p) {\n\t\tString answer = \"\";\n\t\tif(p.equals(\"\")) {\n\t\t\treturn \"\";\n\t\t}\n\t\t// p 가 들어오면\n\t\t// ()))((()\n\t\tchar[] chararr = p.toCharArray(); // ( ) ) ) ( ( ( ) 인데.\n\t\tint chknum = 0;\n\t\tboolean correct = false;\n\t\tif(chararr[0] == '(') {\n\t\t\tchknum--;\n\t\t\tcorrect = true;\n\t\t} else {\n\t\t\tchknum++;\n\t\t}\n\t\t// ( 은 -1 ) 은 +1\n\t\tint i = 1; // 현재 인덱스\n\t\twhile(chknum != 0) {\n\t\t\t//System.out.println(chknum);\n\t\t\tif(chararr[i] == '(') {\n\t\t\t\tchknum--;\n\t\t\t} else {\n\t\t\t\tchknum++;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\t\n\t\t// 0 - (i-1) 까지 u 고\n\t\t// i - 끝까지 v\n\t\t\n\t\tif(correct == true) {\n\t\t\tanswer = p.substring(0, i) + check(p.substring(i, p.length()));\n\t\t} else {\n\t\t\t// p.substring을 원래대로 돌려놔야한다!\n\t\t\t// 0 부터 i-1 까지!\n\t\t\tchar[] changearr = new char[i];\n\t\t\t//changearr[0] = '(';\n\t\t\t//changearr[i-1] = ')';\n\t\t\t\n\t\t\tfor(int j=1; j<i-1; j++) {\n\t\t\t\tchangearr[j] = chararr[j] == '('? ')':'(';\n\t\t\t}\n\t\t\t\n\t\t\tanswer = \"(\" + check(p.substring(i, p.length())) + \")\" + String.valueOf(changearr).substring(1,i-1);\n\t\t\t//System.out.println(String.valueOf(changearr));\n\t\t\t//System.out.println(\"answer 1 : \" + answer);\n\t\t}\n\t\t\n\t\t// u, v 로 분리.\n\t\t// u는 조건 수행하고\n\t\t// 뒤에 check (v)를 붙일 것임...\n\t\t// check(v)\n\t\t//System.out.println(\"answer : \"+answer);\n\t\treturn answer;\n\t\t\n\t}", "public boolean isMatch(String str1, String str2) {\n \r\n if( str1 == null || str2 == null)\r\n return false;\r\n \r\n int i = 0;\r\n int j = 0;\r\n char preChar = ' ';\r\n \r\n while( i < str1.length() && j < str2.length() ){\r\n char c1 = str1.charAt(i);\r\n char c2 = str2.charAt(j);\r\n \r\n if( c1 == c2 || c2 == '.' ){\r\n i++;\r\n \r\n preChar = c2;\r\n j++;\r\n }\r\n else{\r\n if( c2 == '*' ){\r\n if( c1 == preChar || preChar == '.' ){\r\n i++;\r\n }\r\n else if( j+1 < str2.length() ){\r\n if( c1 == str2.charAt(j+1) || str2.charAt(j+1) == '.' ){\r\n i++;\r\n \r\n preChar = str2.charAt(j+1);\r\n j = j+2;\r\n }\r\n else\r\n return false;\r\n }\r\n else\r\n return false;\r\n }\r\n else{\r\n if( j+1 < str2.length() && str2.charAt(j+1) == '*' ){\r\n i++;\r\n \r\n preChar = c2;\r\n j = j+2;\r\n } \r\n else\r\n return false;\r\n }\r\n }\r\n }\r\n \r\n if( i == str1.length() ){\r\n if( j == str2.length() )\r\n return true;\r\n else if( str2.charAt(j)=='*' ){\r\n \r\n int countStr1 = 0;\r\n for(int k = str1.length()-1; k >= 0; k--){\r\n if( str1.charAt(k) == preChar )\r\n countStr1++;\r\n else\r\n break;\r\n }\r\n \r\n int countStr2 = 0;\r\n int countStarInStr2 = 0;\r\n for(int k = str2.length()-1; k >= 0; k--){\r\n if( str2.charAt(k) == preChar || str2.charAt(k) == '.' )\r\n countStr2++;\r\n else if( str2.charAt(k) == '*' )\r\n countStarInStr2++;\r\n else\r\n break;\r\n } \r\n \r\n if( countStr2 - countStarInStr2 <= countStr1 )\r\n return true;\r\n else\r\n return false;\r\n }\r\n else\r\n }\r\n else \r\n return false;\r\n }", "private static void dp() {\n\t\tm[0] = 0;\n\t\tk[0] = 0;\n\n\t\t// base case 1:for 1 cent we need give 1 cent\n\t\tm[1] = 1;\n\t\tk[1] = 1;\n\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tint min = Integer.MAX_VALUE;\n\t\t\tint sel = -1;\n\t\t\tfor (int j = 0; j < sd; j++) {\n\t\t\t\tint a = d[j];\n\t\t\t\tif (a > i) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tint v = 1 + m[i - a];\n\t\t\t\tif (v < min) {\n\t\t\t\t\tmin = v;\n\t\t\t\t\tsel = a;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (sel == -1)\n\t\t\t\tthrow new NullPointerException(\"sel != -1\");\n\t\t\tm[i] = min;\n\t\t\tk[i] = sel;\n\t\t}\n\t}", "public List<Integer> diffWaysToCompute(String input) {\n List<Integer> result=new ArrayList<>();\n if(input==null||input.length()==0) return result;\n List<String> ops=new ArrayList<>();\n for(int i=0; i<input.length(); i++){\n int j=i;\n while(j<input.length()&&Character.isDigit(input.charAt(j)))\n j++;\n ops.add(input.substring(i, j));\n if(j!=input.length()) ops.add(input.substring(j, j+1));\n i=j;\n }\n int N=(ops.size()+1)/2; //num of integers\n ArrayList<Integer>[][] dp=(ArrayList<Integer>[][]) new ArrayList[N][N];\n for(int d=0; d<N; d++){\n if(d==0){\n for(int i=0; i<N; i++){\n dp[i][i]=new ArrayList<>();\n dp[i][i].add(Integer.valueOf(ops.get(i*2)));\n }\n continue;\n }\n for(int i=0; i<N-d; i++){\n dp[i][i+d]=new ArrayList<>();\n for(int j=i; j<i+d; j++){\n ArrayList<Integer> left=dp[i][j], right=dp[j+1][i+d];\n String operator=ops.get(j*2+1);\n for(int leftNum:left)\n for(int rightNum:right){\n if(operator.equals(\"+\"))\n dp[i][i+d].add(leftNum+rightNum);\n else if(operator.equals(\"-\"))\n dp[i][i+d].add(leftNum-rightNum);\n else\n dp[i][i+d].add(leftNum*rightNum);\n }\n }\n }\n }\n return dp[0][N-1];\n}", "public static ArrayList<String> makePostV(String s){\r\n String sD = s+\"$\";\r\n Stack<String> st1 = new Stack<String>();//Operators and parenthesis are stored temporarily on string stack \"st1\"\r\n ArrayList<String> postV = new ArrayList<String>();\r\n int p=0;//Pointer for each character in the expression; Gets incremented \r\n \r\n while(p<s.length()){\r\n int count = 0;//Count for making sure only one of the following \"if\"s are executed in one iteration \r\n String s1=Character.toString(sD.charAt(p));\r\n \r\n String sNext = Character.toString(sD.charAt(p+1));\r\n if(Character.toString(s1.charAt(s1.length()-1)).matches(\"[a-zA-Z].*\")||Character.toString(s1.charAt(s1.length()-1)).matches(\"-?\\\\d+(\\\\.\\\\d+)?\")){\r\n while(!sNext.matches(\".*[-+*/^%$()].*\")){\r\n p++;\r\n s1=s1+sNext;\r\n sNext=Character.toString(sD.charAt(p+1));\r\n }\r\n }\r\n \r\n //For identifiers in the expression \r\n if((s1.matches(\"[a-zA-Z].*\"))&&count==0){postV.add(s1);count++;}\r\n \r\n //For numerical values given directly in the expression\r\n if(s1.matches(\"-?\\\\d+(\\\\.\\\\d+)?\")&&count==0){postV.add(s1);count++;}\r\n \r\n //For parenthesis in the expression\r\n if((s1.equals(\"(\")||s1.equals(\")\"))&&count==0){ \r\n if(s1.equals(\"(\")){st1.push(\"(\");}\r\n if(s1.equals(\")\")){\r\n while(!st1.peek().equals(\"(\")&&!st1.empty()){String currOp = st1.pop();postV.add(currOp);}\r\n st1.pop();\r\n }count++;\r\n } \r\n \r\n //For operators in the expression\r\n if(s1.equals(\"+\")||s1.equals(\"-\")||s1.equals(\"%\")||s1.equals(\"/\")||s1.equals(\"*\")||s1.equals(\"^\")){ \r\n if(st1.empty()&&count==0){st1.push(s1);count++;}\r\n \r\n if(!st1.empty()&&count==0){\r\n if(st1.peek().equals(\"(\")){st1.push(s1);count++;} \r\n \r\n String s2=st1.peek();\r\n char op1 = s2.charAt(0);\r\n char op2=s1.charAt(0); \r\n \r\n if(count==0){\r\n while((precedenceLevel(op1)>=precedenceLevel(op2))&&!st1.empty()){\r\n String currOp=st1.pop(); \r\n postV.add(currOp);\r\n if(!st1.empty()&&st1.peek().equals(\"(\")){break;}\r\n if(!st1.empty()){s2=st1.peek();op1 = s2.charAt(0);}\r\n } st1.push(s1);count++; \r\n }\r\n \r\n if((precedenceLevel(op1)<precedenceLevel(op2))&&count==0){\r\n st1.push(s1);\r\n count++;\r\n } \r\n } \r\n } \r\n p++; \r\n }\r\n \r\n //At the end pops operators if remained in the stack\r\n while(!st1.empty()){\r\n String currOp=st1.pop();\r\n postV.add(currOp);\r\n } \r\n return postV;//Returns the postfix expression\r\n }", "public static int longestValidParentheses_dp(String s) {\n if (s == null || s.length() <= 1) {\n return 0;\n }\n\n int max = 0;\n int len = s.length();\n int[] dp = new int[len];\n for (int i = 1; i < len; i++) {\n char ch = s.charAt(i);\n if (ch == ')') {\n if (s.charAt(i - 1) == '(') {\n dp[i] = (i >= 2 ? dp[i - 2] : 0) + 2;\n } else if (i - dp[i - 1] > 0 && s.charAt(i - dp[i - 1] - 1) == '(') {\n dp[i] = dp[i - 1] + ((i - dp[i - 1]) >= 2 ? dp[i - dp[i - 1] - 2] : 0) + 2;\n }\n\n max = Math.max(max, dp[i]);\n }\n }\n\n return max;\n }", "private boolean dfs(int n, int[] P) { // 0 is empty, 1 is false, 2 is true\n if (P[n] != 0) {\n if (P[n] == 1) {\n return false;\n }\n else {\n return true;\n }\n }\n\n if (n == 1) {\n P[1] = 2;\n //return true;\n }\n else if (n == 2) {\n P[2] = 2;\n //return true;\n }\n else if (n == 3) {\n P[3] = 1;\n //return false;\n }\n else {\n boolean res = dfs(n-2, P) && dfs(n-3, P) || dfs(n-3, P) && dfs(n-4, P);\n P[n] = res ? 2 : 1;\n }\n\n return P[n] == 2;\n\n //P[n] = P[n-2] + P[n-3] == 4 || P[n-3] + P[n-4] == 4 ? 2 : 1;\n //boolean res = dfs(n-2, P) && dfs(n-3, P) || dfs(n-3, P) && dfs(n-4, P);\n //P[n] = res ? 2 : 1;\n //return res;\n }", "private static boolean dfs(char[][] board, int r, int c) {\n if (r == 9)\n return true;\n\n // return here and line 57 is because you will backtrack to the very beginning once a solution is found\n if (c == 9)\n return dfs(board, r + 1, 0);\n\n if (board[r][c] == '.') {\n // try each number\n for (int k = 1; k <= 9; k++) {\n board[r][c] = Character.forDigit(k, 10);\n if (isValid(board, r, c)) {\n // when find the solution should return true to avoid any more backtrack search\n if (dfs(board, r, c + 1))\n return true;\n }\n board[r][c] = '.';\n }\n } else {\n return dfs(board, r, c + 1);\n }\n return false;\n }", "public int countSubstrings(String s) {\n int count =0;\n int n = s.length();\n boolean[][] isPall = new boolean[n][n];\n \n for(int len =0;len<n;len++){\n \n for(int i=0,j=len;j<n;i++,j++){\n if(len == 0){\n isPall[i][j] = true;\n }\n else if(len == 1){\n isPall[i][j] = s.charAt(i) == s.charAt(j);\n }\n else{\n isPall[i][j] = (s.charAt(i) == s.charAt(j) &&\n isPall[i+1][j-1]);\n }\n \n if(isPall[i][j]){\n count++;\n }\n }\n \n } \n return count;\n }", "public int[] solutionPrefixSum(String S, int[] P, int[] Q) {\n int[][] prefixSums = new int[S.length() + 1][3];\n\n // primeira linha, aqui não foi lido nada ainda (para facilitar as contas depois)\n prefixSums[0] = new int[3];\n\n for (int i = 0; i < S.length(); i++) {\n prefixSums[i + 1] = prefixSums[i].clone();\n atualizaLinha(prefixSums[i + 1], S.charAt(i));\n }\n\n // somas prefixadas prontas, hora de caçar as respostas\n\n int[] solutions = new int[P.length];\n\n for (int i = 0; i < P.length; i++) {\n int inicioIntervalo = P[i] + 1;\n int fimIntervalo = Q[i] + 1;\n\n if (prefixSums[fimIntervalo][0] - prefixSums[inicioIntervalo - 1][0] > 0) {\n solutions[i] = decode('A');\n } else if (prefixSums[fimIntervalo][1] - prefixSums[inicioIntervalo - 1][1] > 0) {\n solutions[i] = decode('C');\n } else if (prefixSums[fimIntervalo][2] - prefixSums[inicioIntervalo - 1][2] > 0) {\n solutions[i] = decode('G');\n } else {\n solutions[i] = decode('T');\n }\n\n }\n\n return solutions;\n }", "static int Prec(String s){\n switch (s)\n {\n case \"+\":\n case \"-\":\n return 1;\n case \"*\":\n case \"/\":\n return 2;\n }\n return -1;\n }", "public String longestPalindrome(String s) {\n int len = s.length();\n if (len <= 1) {\n return s;\n }\n char[] chars = s.toCharArray();\n boolean[][] dp = new boolean[len][len];\n int begin = 0;\n int end = 0;\n int subLen = 1;\n for (int j = 1; j < len; j++) {\n for (int i = 0; i < j; i++) {\n if (chars[i] == chars[j]) {\n dp[i][j] = (j - i < 3) || dp[i + 1][j - 1];\n } else {\n dp[i][j] = false;\n }\n if (dp[i][j]) {\n if (j - i + 1 > subLen) {\n subLen = j - i + 1;\n begin = i;\n end = j;\n }\n }\n }\n }\n return s.substring(begin, end + 1);\n }", "public boolean canPartition(int[] nums) {\n int sum = 0;\n int n = nums.length;\n for (int num : nums) sum += num;\n // sum cannot be splitted evenly\n if ((sum & 1) == 1) return false;\n int target = sum / 2;\n \n // dp[i][j] represents whether 0~i-1 numbers can reach\n // weight capacity j\n boolean[][] dp = new boolean[n+1][target+1];\n \n for (int i = 1; i <= n; i++) dp[i][0] = true;\n for (int j = 1; j <= target; j++) dp[0][j] = false;\n dp[0][0] = true;\n \n for (int i = 1; i <= n; i++) {\n for (int j = 1; j <= target; j++) {\n // if don't pick current number\n dp[i][j] = dp[i-1][j];\n if (j >= nums[i-1]) {\n dp[i][j] = dp[i][j] || dp[i-1][j-nums[i-1]];\n }\n }\n }\n return dp[n][target];\n \n \n // Solution2: optimizing to save space\n // https://leetcode.com/problems/partition-equal-subset-sum/discuss/90592/01-knapsack-detailed-explanation/94996\n int sum = 0;\n int n = nums.length;\n for (int num : nums) sum += num;\n if ((sum & 1) == 1) return false;\n int target = sum / 2;\n boolean[] dp = new boolean[target+1];\n dp[0] = true;\n for (int num : nums) {\n // here is the trick to save space\n // because we have to update dp[j] based on \n // previous dp[j-num] and dp[j] from previous loop.\n // if we update dp from left to right\n // we first update smaller dp which is dp[j-num]\n // then we won't be able to get original dp[j-num] and dp[j]\n // from previous loop, and eventually we get the wrong\n // answer. But if we update dp from right to left\n // we can assure everything is based on previous state\n for (int j = target; j >= num; j--) {\n // if (j >= num) {\n dp[j] = dp[j] || dp[j-num];\n // }\n }\n }\n return dp[target];\n }", "public static int countUniqueCombinationsDP(int score) {\r\n /*\r\n * Return Type of DP array is same as return type of the recursive function\r\n * Dimensions of DP array is the number of non constant parameters to the recursive function\r\n */\r\n \t\r\n \t/*\r\n \t * Fn(s) = Fn(s-7) [if(s>=7)] + Fn(s-3) [if(s>=3)] + Fn(s-2) [if(s>=2)]\r\n\t\t * Fn(0) = 1\r\n\t\t * \r\n * F(11) = F(4) + F(8) + F(9)\r\n */\r\n \tint[][] comb = new int[score + 1][3];\r\n // int[] points = {2,3,7};\r\n \r\n // Halting Conditions\r\n comb[0][0] = 1;\r\n comb[0][1] = 1;\r\n comb[0][2] = 1;\r\n \r\n /*\r\n * Loop goes in the direction opposite to that of the recursion \r\n */\r\n for (int s = 1; s <= score; ++s) {\t\t// s is the score of the recursion\r\n \tfor (int p = 0; p < 3; ++p) {\r\n\t \tint total = 0;\r\n\t if (s >= 2 && p == 0)\r\n\t \ttotal = total + comb[s - 2][0];\r\n\t if (s >= 3 && p <= 1)\r\n\t \ttotal = total + comb[s - 3][1];\r\n\t if (s >= 7)\t\t\t// No need of condition p<=2; as it will always be true\r\n\t \ttotal = total + comb[s - 7][2];\r\n\t comb[s][p] = total;\r\n \t}\r\n }\r\n\r\n return comb[score][0];\r\n }", "public static void main(String[] args)\n {\n String string = \"101101101\";\n int[][] dp = new int[string.length()+1][string.length() +1];\n int len = string.length();\n for (int i=0 ; i<= len ;i++) {\n for (int j=0 ;j<=len ;j++) {\n dp[i][j] = -1;\n }\n }\n System.out.println(minPartitions(string, 0, string.length() -1, dp));\n }", "private static boolean dfs(char[][] matrix, String word, int i, int j, int index) {\n if (index == word.length()) {\n return true;\n }\n if (i < 0 || i >= matrix.length || j < 0 || j >= matrix[i].length) {\n // System.out.println(\"out of bound\");\n return false;\n }\n if (word.charAt(index) != matrix[i][j]) {\n // System.out.println(\"char not == \");\n return false;\n }\n if (matrix[i][j] == '$') {\n // System.out.println(\"mark \" + i + \", \" + j + \" as $\");\n return false;\n }\n char ori = matrix[i][j];\n matrix[i][j] = '$';\n if (dfs(matrix, word, i + 1, j, index + 1)|| dfs(matrix, word, i - 1, j, index + 1) ||\n dfs(matrix, word, i, j + 1, index + 1) || dfs(matrix, word, i, j - 1, index + 1)) {\n matrix[i][j] = ori; // backtracking here!!!\n return true;\n }\n matrix[i][j] = ori;\n return false;\n }", "public static void main(String[] args) {\n\t\tString s = \"aab\";//\"aab\";//\"aaaaaa\";//\"mississpp\";//\"aaabbbccc\";\r\n\t\tString p = \"c*a*b\";//\"c*a*b\";//\"a*\";//\"mis*is*p*.\";//\"a*bb.cc*\"\r\n\r\n\t\tSystem.out.println(\"Match ? \" + isMatchLC(s, p));\r\n\r\n\t}", "private boolean canPartitionDP(int[] array, int sum) {\n int len = array.length;\n boolean[][] dp = new boolean[len + 1][sum + 1];\n\n for (int i = 0; i < len + 1; i++) dp[i][0] = true;\n\n for (int i = 1; i < len + 1; i++) {\n for (int j = 1; j < sum + 1; j++) {\n if (array[i - 1] <= j) dp[i][j] = dp[i - 1][j] || dp[i - 1][j - array[i - 1]];\n else dp[i][j] = dp[i - 1][j];\n }\n }\n\n return dp[len][sum];\n }", "static int countEvalWaysDP(String expr, boolean result,\n HashMap<String, Integer> trueExprCache, HashMap<String, Integer> falseExprCache) {\n // check error\n if (expr == null || expr.length() == 0) {\n return 0;\n }\n // DP\n if (result && trueExprCache.containsKey(expr)) {\n return trueExprCache.get(expr);\n } else if (!result && falseExprCache.containsKey(expr)) {\n return falseExprCache.get(expr);\n }\n // base case\n if (expr.length() == 1) {\n if (expr.equals(\"1\") && result) return 1; // count as one way\n else if (expr.equals(\"0\") && !result) return 1; // count as one way\n else return 0; // not evaluted to desired result\n }\n int count = 0;\n for (int i = 1; i < expr.length() - 1; i++) { // from first operator to last operator\n if (result) {\n if (expr.charAt(i) == '&') {\n count += countEvalWays(expr.substring(0, i), true) * countEvalWays(expr.substring(i + 1), true);\n }\n if (expr.charAt(i) == '|') {\n count += countEvalWays(expr.substring(0, i), true) * countEvalWays(expr.substring(i + 1), true)\n + countEvalWays(expr.substring(0, i), true) * countEvalWays(expr.substring(i + 1), false)\n + countEvalWays(expr.substring(0, i), false) * countEvalWays(expr.substring(i + 1), true);\n }\n if (expr.charAt(i) == '^') {\n count += countEvalWays(expr.substring(0, i), true) * countEvalWays(expr.substring(i + 1), false)\n + countEvalWays(expr.substring(0, i), false) * countEvalWays(expr.substring(i + 1), true);\n }\n } else if (!result) {\n if (expr.charAt(i) == '&') {\n count += countEvalWays(expr.substring(0, i), false) * countEvalWays(expr.substring(i + 1), true)\n + countEvalWays(expr.substring(0, i), true) * countEvalWays(expr.substring(i + 1), false)\n + countEvalWays(expr.substring(0, i), false) * countEvalWays(expr.substring(i + 1), false);\n }\n if (expr.charAt(i) == '|') {\n count += countEvalWays(expr.substring(0, i), false) * countEvalWays(expr.substring(i + 1), false);\n }\n if (expr.charAt(i) == '^') {\n count += countEvalWays(expr.substring(0, i), true) * countEvalWays(expr.substring(i + 1), true)\n + countEvalWays(expr.substring(0, i), false) * countEvalWays(expr.substring(i + 1), false);\n }\n }\n }\n if (result) {\n trueExprCache.put(expr, count);\n } else {\n falseExprCache.put(expr, count);\n }\n return count;\n }", "boolean comparison(String str, String pattern) {\n int s = 0, p = 0, match = 0, starIdx = -1;\n while (s < str.length()){\n /**\n * advancing both pointers\n */\n if (p < pattern.length() && (pattern.charAt(p) == '?' || str.charAt(s) == pattern.charAt(p))){\n s++;\n p++;\n }\n\n /**\n * '*' found, only advancing pattern pointer\n *\n * check the situation when '*' matches no char\n *\n * starIdx : remember location of '*' in pattern\n * match : remember index in s when the last '*\" appears\n */\n else if (p < pattern.length() && pattern.charAt(p) == '*'){\n starIdx = p;\n match = s;\n p++;\n }\n\n /**\n * the last pattern pointer was *, advancing string pointer\n *\n * !!!\n * If pattern character != string character\n * OR\n * pattern is used up\n * AND\n * there was '*' character in pattern before :\n *\n * Backtrack check the situation when '*' matches one more character\n */\n else if (starIdx != -1){\n p = starIdx + 1;\n match++;\n s = match;\n }\n\n /**\n * current pattern pointer is not star, last pattern pointer was not *\n * characters do not match\n */\n else return false;\n }\n\n /**\n * check for remaining characters in pattern\n */\n while (p < pattern.length() && pattern.charAt(p) == '*') {\n p++;\n }\n\n return p == pattern.length();\n }", "static int lcs(String s, String t)\n{\n\tint n = s.length(), m = t.length();\n\tint[][] dp = new int[n+1][m+1];\n\tfor(int i = 1; i<=n; i++)\n\t\tfor(int j = 1; j<=m; j++)\n\t\t{\n\t\t\tdp[i][j] = Math.max(dp[i-1][j], dp[i][j-1]);\n\t\t\tint cur = (s.charAt(i-1) == t.charAt(j-1)) ? 1 : 0;\n\t\t\tdp[i][j] = Math.max(dp[i][j], cur + dp[i-1][j-1]);\n\t\t}\n\treturn dp[n][m];\n}", "public static boolean iterativeSolution(TreeNode p, TreeNode q)\n\t{\n\t\tStack<TreeNode> s = new Stack();\n\t\ts.push(p);\n\t\ts.push(q);\n\t\t\n\t\twhile(!s.isEmpty())\n\t\t{\n\t\t\tp = s.pop();\n\t\t\tq = s.pop();\n\t\t\t\n\t\t\tif(p == null && q == null)\n\t\t\t\tcontinue;//terminate this round\n\t\t\tif(p == null || q == null)\n\t\t\t\treturn false;//trim\n\t\t\tif(p.val != q.val)\n\t\t\t\treturn false;//trim\n\t\t\t\n\t\t\ts.push(p.left);\n\t\t\ts.push(q.left);\n\n\t\t\ts.push(p.right);\n\t\t\ts.push(q.right);\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public static String solution(String S) {\n List<String> rules= new ArrayList<>();\n rules.add(\"AA\");\n rules.add(\"BB\");\n rules.add(\"CC\");\n boolean flag=true;\n // while(flag){\n \tint count=0;\n for(int i=0;i<rules.size();i++) {\n \tcount++; \t\n \tif(S.contains(rules.get(i))){\n \t\tS=S.replace(rules.get(i),\"\"); \t\t\n \t}else{ \t\t\n \t\tif(S.length()>0 && count == rules.size()){\n \t\t\ti=0;\n \t\t\tcount=0;\n \t\t}\n \t}\n \t\n \tif(count == rules.size()){\n \t\ti=0;\n \t\tcount=0;\n \t}\n \t\n \tSystem.out.println(S);\n \tSystem.out.println(count); \n \t\n \t/*System.out.println(S);\n \tboolean tempflag = S.contains(rule.getKey()); \n \tSystem.out.println(flag);\n \tif(tempflag){\n S=S.replace(rule.getKey(),rule.getValue());\n \t}*/\n //System.out.println(S);\n // }\n }\n \n \n \n return S;\n }", "public int minDistanceDP(String s1, String s2){\n\t\tint [][] dp = new int [s1.length()+1][s2.length()+1];\n\t\tfor(int i = 0 ; i <= s1.length(); i ++){\n\t\t\tfor(int j = 0; j <= s2.length(); j++){\n\t\t\t\tif (s1.charAt(i) == s2.charAt(j)){\n\t\t\t\t\tdp[i][j] = 1 + dp[i-1][j-1];\n\t\t\t\t}else{\n\t\t\t\t\tdp[i][j] = Math.max(dp[i-1][j], dp[i][j-1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn s1.length() + s2.length() - 2*dp[s1.length()][s2.length()];\n\t}", "public boolean isMatch(String s, String p) {\n mem= new int[s.length()+1][p.length()+1];\n return match(s,p);\n }", "public int[] solution(String S, int[] P, int[] Q) {\n char[] symbs = S.toCharArray();\n int[][] preSums = new int[3][symbs.length + 1];\n\n for(int idx = 0; idx < symbs.length; idx++){\n preSums[0][idx+1] = preSums[0][idx] + (symbs[idx] == 'A'? 1:0);\n preSums[1][idx+1] = preSums[1][idx] + (symbs[idx] == 'C'? 1:0);\n preSums[2][idx+1] = preSums[2][idx] + (symbs[idx] == 'G'? 1:0);\n }\n\n int[] result = new int[P.length];\n\n for(int idx = 0; idx < P.length; idx++){\n if(preSums[0][Q[idx]+1]-preSums[0][P[idx]] > 0)\n result[idx] = 1;\n else\n if(preSums[1][Q[idx]+1]-preSums[1][P[idx]] > 0)\n result[idx] = 2;\n else\n if(preSums[2][Q[idx]+1]-preSums[2][P[idx]] > 0)\n result[idx] = 3;\n else\n result[idx] = 4;\n }\n\n return result;\n }", "private int uniquePaths(int x, int y, int[][] dp) {\n \t\tif (x == 0 || y == 0) return 1;\n \t\tif (dp[x][y] == 0)\n \t\t\tdp[x][y] = uniquePaths(x - 1, y, dp) + uniquePaths(x, y - 1, dp);\n \t\treturn dp[x][y];\n \t}", "public boolean judgePoint241(int[] nums) {\n double n1 = nums[0];\n double n2 = nums[1];\n double n3 = nums[2];\n double n4 = nums[3];\n //case1:\n if(Math.abs(n1-8)<=0.01&&Math.abs(n2-4)<=0.01){\n int a = 1;\n }\n if(combine(combine(n1,n2),combine(n3,n4)))return true;\n //case2:\n for(double d:combine(n2,n3)){\n if(contains(combine(n1,d,n4),24.0)){\n return true;\n };\n }\n //case3:\n for(double d:combine(n1,n2,n3)){\n if(contains(combine(d,n4),24.0))return true;\n }\n //case4:\n for(double d:combine(n2,n3,n4)){\n if(contains(combine(n1,d),24.0))return true;\n }\n return false;\n }", "static void computeLPSArray(String pat, int M, int lps[]) {\n int len = 0;\r\n int i = 1;\r\n lps[0] = 0; // lps[0] is always 0 \r\n\r\n // the loop calculates lps[i] for i = 1 to M-1 \r\n while (i < M) {\r\n if (pat.charAt(i) == pat.charAt(len)) {\r\n len++;\r\n lps[i] = len;\r\n i++;\r\n } else // (pat[i] != pat[len]) \r\n {\r\n // This is tricky. Consider the example. \r\n // AAACAAAA and i = 7. The idea is similar \r\n // to search step. \r\n if (len != 0) {\r\n len = lps[len - 1];\r\n\r\n // Also, note that we do not increment \r\n // i here \r\n } else // if (len == 0) \r\n {\r\n lps[i] = len;\r\n i++;\r\n }\r\n }\r\n }\r\n }", "public String encode(String s) {\n if (s == null || s.length() == 0) {\n return \"\";\n }\n int n = s.length();\n String[][] dp = new String[n][n];\n for (int len = 1; len <= n; len++) {\n if (len == 10) {\n int a = 1;\n }\n for (int i = 0; i + len - 1 < n; i++) {\n int j = i + len - 1;\n String word = s.substring(i, j + 1);\n dp[i][j] = word;\n if (len <= 4) {\n continue;\n }\n for (int k = i; k < j; k++) {\n if (dp[i][k].length() + dp[k + 1][j].length() < dp[i][j].length()) {\n dp[i][j] = dp[i][k] + dp[k + 1][j];\n }\n }\n String tmp = word + word;\n int second = tmp.indexOf(word, 1);\n if (second > 0 && second < len) {\n int times = len / (second);\n String sub = dp[i][i + second - 1];\n String encoded = times + \"[\" + sub + \"]\";\n if (encoded.length() < dp[i][j].length()) {\n dp[i][j] = encoded;\n }\n }\n }\n }\n return dp[0][s.length() - 1];\n }", "public void findSolution() {\n\t\tif (lenA > lenB) {\n\t\t\toptPairs = new String[lenB];\n\t\t} else {\n\t\t\toptPairs = new String[lenA];\n\t\t}\n\n\t\tint counter = 0;\n\t\tint i = lenA;\n\t\tint j = lenB;\n\n\t\twhile(i>0 && j>0) {\n\t\t\tif (optArray[i][j] == g+optArray[i-1][j]) {\n\t\t\t\ti--;\n\t\t\t}\n\t\t\telse if (optArray[i][j] == g+optArray[i][j-1]) {\n\t\t\t\tj--;\n\t\t\t}\n\t\t\telse {\n\t\t\t\toptPairs[counter] = i + \" \" + j;\n\t\t\t\tcounter++;\n\t\t\t\ti--;\n\t\t\t\tj--;\n\t\t\t}\n\t\t}\n\n\t\tpairNum = counter;\n\n\t}", "private int[] computeLspTable(String pattern) {\n\t\tint lsp[] = new int[pattern.length()];\n\t\tlsp[0] = 0;\n\t\tfor (int i = 1; i < pattern.length(); i++) {\n\t\t\tint j = lsp[i - 1];\n\t\t\twhile (j > 0 && pattern.charAt(i) != pattern.charAt(j)) {\n\t\t\t\tj = lsp[j - 1]; // in worst case, this instruction will be called (pattern.length - 1) times\n//\t\t\t\tSystem.out.print(j + \",\");\n\t\t\t}\n\t\t\tif (pattern.charAt(i) == pattern.charAt(j)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tlsp[i] = j;\n\t\t}\n\t\treturn lsp;\n\t\t\n//\t a a a a b\n//\t 0 1 2 3 0\n\t \n//\t a b c a b c a c a //abcdbcddd\n//\t 0 0 0 1 2 3 4 0 1\n\t \n//\t a b c d b c d d d //abcdbcddd\n//\t 0 0 0 0 0 0 0 0 0\n//\t a b a b a b c\n//\t 0 0 1 2 3 4 0\n\t}", "public double compare(Pattern p) {\n\t\tdouble[][] dtwMatrix = new double[length][p.length];\n\n\t\tfor (int i=0; i<length; i++) {\n\t\t\tfor (int j=0; j<p.length; j++) {\n\t\t\t\tdouble[] scores = new double[3];\n\n\t\t\t\tdouble cost = compareFrames(i, p, j)[0];\n\t\t\t\t\n\t\t\t\tif (i > 0 && j > 0)\n\t\t\t\t\tscores[0] = cost + dtwMatrix[i-1][j-1];\n\t\t\t\telse\n\t\t\t\t\tscores[0] = -1;\n\n\t\t\t\tif (i > 0)\n\t\t\t\t\tscores[1] = cost + dtwMatrix[i-1][j];\n\t\t\t\telse\n\t\t\t\t\tscores[1] = -1;\n\n\t\t\t\tif (j > 0)\n\t\t\t\t\tscores[2] = cost + dtwMatrix[i][j-1];\n\t\t\t\telse\n\t\t\t\t\tscores[2] = -1;\n\n\t\t\t\tdouble min = dtwMin(scores);\n\n\t\t\t\tif (min == -1) //must be top left cell\n\t\t\t\t\tdtwMatrix[i][j] = cost;\n\t\t\t\telse\n\t\t\t\t\tdtwMatrix[i][j] = min;\n\t\t\t}\n\t\t}\n\n\t\treturn dtwMatrix[length - 1][p.length - 1];\n\t}", "private void preparePat(String pat) {\n this.pat = pat;\n\n // build DFA from pattern\n int M = pat.length();\n dfa = new int[R][M];\n dfa[pat.charAt(0)][0] = 1;\n for (int X = 0, j = 1; j < M; j++) {\n for (int c = 0; c < R; c++)\n dfa[c][j] = dfa[c][X]; // Copy mismatch cases.\n dfa[pat.charAt(j)][j] = j+1; // Set match case.\n X = dfa[pat.charAt(j)][X]; // Update restart state.\n }\n }", "boolean permutationOpt(String s, String t) {\n if (s.length() != t.length() ) { return false;}\r\n\r\n int[] charCnt = new int[128];\r\n for (int i = 0; i < s.length(); i ++) {\r\n int val = s.charAt(i);\r\n charCnt[val] ++;\r\n }\r\n\r\n for (int i = 0; i < t.length(); i ++) {\r\n int val = t.charAt(i);\r\n charCnt[val] --;\r\n if (charCnt[val] < 0) {\r\n return false;\r\n }\r\n }\r\n\r\n return true; // If the length of two strings are equal, then when there is no negative counts there should not be positive counts either.\r\n }", "public static ArrayList<String> getPerms(String s){\n\t\tArrayList<String> permutations = new ArrayList<String>();\n\t\t\n\t\tif(s==null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(s.length()==0){\n\t\t\tpermutations.add(\"\");\n\t\t\treturn permutations;\n\t\t}\n\t\t\n\t\t//firstly, choose the first char\n\t\tchar first = s.charAt(0);\n\t\t\n\t\t//store the remainder\n\t\tString remainder = s.substring(1);\n\t\t\n\t\t\n\t\t//using recursion\n\t\tArrayList<String> words = getPerms(remainder);\n\t\t\n\t\t//adding the first char to the result of the getPerms(remainder)\n\t\tfor(String word:words){\n\t\t\tfor(int i=0;i<=word.length();i++){\n\t\t\t\tpermutations.add(insertCharAt(word,first,i));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn permutations;\n\t}", "public int numDistinct(String s, String t) {\n int m=s.length(), n=t.length();\n if(m<n) {\n return 0;\n }\n int dp[][]=new int[m+1][n+1];\n for(int i=0; i<m+1; i++) {\n Arrays.fill(dp[i], 0);\n }\n for(int i=0; i<m+1; i++) {\n dp[i][0]=1;\n }\n for(int j=1; j<n+1; j++) {\n for(int i=1; i<m+1; i++) {\n if(s.charAt(i-1)==t.charAt(j-1)) {\n // it's the sum of using s.charAt(i-1) as the last match and NOT using it as the last match\n dp[i][j]=dp[i-1][j-1]+dp[i-1][j];\n } else {\n dp[i][j]=dp[i-1][j];\n }\n }\n }\n return dp[m][n];\n }", "static long solve(long[] d) {\n int len = d.length;\n long[] dp = new long[len];\n\n Set<Long> set = new HashSet<>();\n\n for (int index1 = len - 1; index1 >= 0; index1--) {\n int count = 0;\n for (int index2 = index1 + 1; index2 < len; index2++) {\n if (d[index2] > d[index1]) {\n if( set.contains(d[index2] ) )continue;\n set.add(d[index2]);\n count++;\n }\n }\n set = new HashSet<>();\n dp[index1] = count;\n }\n\n long res = 0;\n Set<Long> distinct = new HashSet<>();\n for (int index1 = 0; index1 < len; index1++) {\n long curr = d[index1];\n if (distinct.contains(curr)) {\n continue;\n } else distinct.add(curr);\n for (int index2 = index1 + 1; index2 < len; index2++) {\n if (d[index2] > curr) {\n if (set.contains(d[index2])) continue;\n res += dp[index2];\n set.add(d[index2]);\n }\n }\n set = new HashSet<>();\n }\n\n return res;\n\n }", "int[] parse(String re, int s, int t)\r\n\t{\r\n\t\tint [] st;\r\n\t\tint i;\r\n\t\t\r\n\t\t//single symbol\r\n\t\tif (s==t)\r\n\t\t{\r\n\t\t\tst=new int[2];\r\n\t\t\tst[0]=incCapacity();\r\n\t\t\tst[1]=incCapacity();\r\n\t\t\tif (re.charAt(s)=='e') //epsilon\r\n\t\t\t\taddEdge(st[0],symbol,st[1]);\r\n\t\t\telse addEdge(st[0],re.charAt(s)-'0',st[1]);\r\n\t\t\treturn st;\r\n\t\t}\r\n\t\t\r\n\t\t//(....)\r\n\t\tif ((re.charAt(s)=='(')&&(re.charAt(t)==')'))\r\n\t\t{\r\n\t\t\tif (next[s]==t)\r\n\t\t\t\treturn parse(re,s+1,t-1);\r\n\t\t}\r\n\t\t\r\n\t\t//RE1+RE2\r\n\t\ti=s;\r\n\t\twhile (i<=t)\r\n\t\t{\r\n\t\t\ti=next[i];\r\n\t\t\t\r\n\t\t\tif ((i<=t)&&(re.charAt(i)=='+'))\r\n\t\t\t{\r\n\t\t\t\tint [] st1=parse(re,s,i-1);\r\n\t\t\t\tint [] st2=parse(re,i+1,t);\r\n\t\t\t\tst = union(st1[0],st1[1],st2[0],st2[1]);\r\n\t\t\t\treturn st;\r\n\t\t\t}\r\n\t\t\t++i;\r\n\t\t}\r\n\t\t\r\n\t\t//RE1.RE2\r\n\t\ti=s;\r\n\t\twhile (i<=t)\r\n\t\t{\r\n\t\t\ti=next[i];\r\n\t\t\t\r\n\t\t\tif ((i<=t)&&(re.charAt(i)=='.'))\r\n\t\t\t{\r\n\t\t\t\tint [] st1=parse(re,s,i-1);\r\n\t\t\t\tint [] st2=parse(re,i+1,t);\r\n\t\t\t\tst = concat(st1[0],st1[1],st2[0],st2[1]);\r\n\t\t\t\treturn st;\r\n\t\t\t}\r\n\t\t\t++i;\r\n\t\t}\r\n\t\t\r\n\t\t//(RE)*\r\n\t\tassert(re.charAt(t)=='*');\r\n\t\tint [] st1=parse(re,s,t-1);\r\n\t\tst=clo(st1[0],st1[1]);\r\n\t\treturn st; \r\n\t}", "static int lcs(int p, int q, String s1, String s2){\n int [][]t=new int[p+1][q+1];\n for(int i=0;i<p+1;i++){\n for(int j=0;j<q+1;j++){\n if(i==0||j==0){\n t[i][j]=0;\n }\n }\n }\n for(int i=1;i<p+1;i++){\n for(int j=1;j<q+1;j++){\n if(s1.charAt(i-1)==s2.charAt(j-1)){\n t[i][j]=1+t[i-1][j-1];\n }\n else{\n t[i][j]=Math.max(t[i-1][j],t[i][j-1]);\n }\n }\n }\n return t[p][q];\n }", "public int minimumDeleteSum(String s1, String s2) {\n int n1 = s1.length();\n int n2 = s2.length();\n int dp[][] = new int[n1 + 1][n2 + 1];\n for(int i = 1; i <= n1; i ++)\n {\n for(int j = 1; j <= n2; j ++)\n {\n dp[i][j] = s1.charAt(i - 1) == s2.charAt(j - 1) ?\n dp[i - 1][j - 1] + s1.charAt(i - 1) : \n Math.max(dp[i - 1][j], dp[i][j - 1]);\n }\n }\n int sum = 0;\n for(int i = 0; i < n1; i ++)\n sum += s1.charAt(i);\n for(int i = 0; i < n2; i ++)\n sum += s2.charAt(i);\n return sum - 2 * dp[n1][n2];\n }", "public static int[] findNumsOfRepsv1(String s, char[] c){\n int[] sums = new int[c.length]; // 1\n for (int i = 0; i < s.length(); i++){ // 1, n+1, n\n for(int j = 0; j < c.length; j++){ // n, n*m + 1, n*m\n if (s.charAt(i) == c[j]){ // n*m\n sums[j] = sums[j] + 1; // n*m\n }\n }\n }\n return sums; // 1\n }", "private boolean dfs(String word, int idx, TrieNode parent) {\n if (idx == word.length()) {//since it's parent node so idx cannot be len - 1\n return parent.isLeaf;\n }\n if (word.charAt(idx) == '.') {\n for (TrieNode curr : parent.map.values()) {\n boolean res = dfs(word, idx + 1, curr);\n if (res) return true;\n }\n } else {\n if (parent.map.containsKey(word.charAt(idx))) {\n return dfs(word, idx + 1, parent.map.get(word.charAt(idx)));\n }\n }\n return false;\n}", "public static boolean isPal(String s)\n {\n if(s.length() == 0 || s.length() == 1){\n return true; \n }\n //recursive call\n if(s.charAt(0) == s.charAt(s.length()-1))\n /* check for first and last char of String:\n * if they are same then do the same thing for a substring\n * with first and last char removed. and carry on this\n * until you string completes or condition fails\n * Function calling itself: Recursion\n */\n {\n return isPal(s.substring(1, s.length()-1));\n }\n /* If program control reaches to this statement it means\n * the String is not palindrome hence return false.\n */\n return false;\n }", "public static boolean isPalin(String s){\n int i = 0;\n boolean con = true;\n\n con = true;\n i = 0;\n while((i <= s.length()/2) && (con)){\n if(s.charAt(i) != s.charAt(s.length()-i-1))\n con = false;\n i++;\n }\n return con;\n }", "public static boolean stringPermutation(String s, String t){\r\n if (s.length() != t.length()){\r\n return false;\r\n }\r\n HashMap<Character, Integer> map1 = new HashMap<Character, Integer>();\r\n HashMap<Character, Integer> map2 = new HashMap<Character, Integer>();\r\n for (int i = 0; i < s.length(); i++){\r\n if (map1.get(s.charAt(i)) == null){\r\n map1.put(s.charAt(i), 1);\r\n }\r\n else {\r\n map1.put(s.charAt(i), map1.get(s.charAt(i)) + 1);\r\n }\r\n }\r\n for (int i = 0; i < t.length(); i++){\r\n if (map2.get(t.charAt(i)) == null){\r\n map2.put(t.charAt(i), 1);\r\n }\r\n else {\r\n map2.put(t.charAt(i), map2.get(t.charAt(i)) + 1);\r\n }\r\n }\r\n return map1.equals(map2);\r\n }", "static String solve(String puzzle, String delimiter) {\n char cc = 0; // Current character\n\n // Melakukan iterasi ke dalam string dan menyimpan alfabet ke dalam cc\n for (int i = 0; i < puzzle.length(); i++) {\n if (isAlphabetic(puzzle.charAt(i))) {\n cc = puzzle.charAt(i);\n break;\n }\n }\n\n if (cc == 0) {\n // Jika seluruh karakter dalam string sudah diganti dengan digit angka, maka akan dilakukan pengujian\n // terhadap kombinasi angka\n\n totalTest++; // Menghitung total tes yang dilakukan untuk menemukan kombinasi angka yang benar\n String[] operands = puzzle.split(delimiter);\n int op1 = check(operands[0]);\n int op2 = check(operands[1]);\n if (op1 == op2) {\n return puzzle;\n } else {\n return \"\";\n }\n } else {\n // Buat array of numbers [0..9] untuk menyimpan angka-angka yang sudah digunakan\n boolean[] numbers = new boolean[10];\n\n // Melakukan iterasi ke dalam string untuk menandai angka-angka yang sudah digunakan\n for (int i = 0; i < puzzle.length(); i++)\n if (isDigit(puzzle.charAt(i)))\n numbers[puzzle.charAt(i) - '0'] = true;\n\n for (int i = 0; i < 10; i++) {\n if (!numbers[i]) {\n\n // Melakukan substitusi alfabet dengan angka sampai ketemu kombinasi angka yang sesuai\n String solution = solve(puzzle.replaceAll(String.valueOf(cc),\n String.valueOf(i)), delimiter);\n\n // Jika kombinasi angka sudah teruji benar secara matematis,\n // kita akan cek apakah ada angka 0 di depan\n if (!solution.isEmpty()) {\n String[] split = solution.split(\"\\n\");\n boolean zeroAtLeft = false;\n\n for (int j = 0; j < split.length; j++){\n split[j] = split[j].trim();\n if (split[j].charAt(0) == '0'){\n zeroAtLeft = true;\n break;\n }\n }\n // Jika tidak ada angka 0 di depan, solusi ditemukan dan di-return ke main\n if (!zeroAtLeft) {\n return solution;\n }\n }\n }\n }\n }\n return \"\";\n }", "private Boolean solution(String s1, String s2){\n\t\t\n\t\tint k = s1.length();\n\t\tchar[] input1 = s1.toCharArray();\n\t\t\n\t\tint m =0 ,count=0;\n\t\t\n\t\twhile(m < s2.length()-1){\n\t\t\t\n\t\tchar[] temp1 = s2.substring(m, m+k).toCharArray();\n\t\t\t\n\t\t\tfor(int i=0; i<s1.length(); i++){\n\t\t\t\tfor(int j=0; j<s1.length(); j++){\n\t\t\t\t\tif(input1[i] == temp1[j] ){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t\tif(count == s1.length())\n\t\t\t\treturn true;\n\t\tcount =0;\n\t\tm++;\n\t\t}\n\t\treturn false;\n\t\t\n\t}", "public boolean isMatch2(){\r\n if(str==null ||pattern==null) return false; \r\n boolean[][] match=new boolean[lens+1][lenp+1];\r\n match[0][0]=true; \r\n for (int i = 0; i <lenp; i++) {\r\n if (pattern.charAt(i) == '*' && match[0][i-1]) \r\n match[0][i+1] = true; \r\n }\r\n for (int i = 0 ; i < lens; i++) {\r\n for (int j = 0; j < lenp; j++) {\r\n if (pattern.charAt(j) == '.') {\r\n match[i+1][j+1] = match[i][j];\r\n }\r\n if (pattern.charAt(j) == str.charAt(i)) {\r\n match[i+1][j+1] = match[i][j];\r\n }\r\n if (pattern.charAt(j) == '*') {\r\n if (pattern.charAt(j-1) != str.charAt(i) && pattern.charAt(j-1) != '.') {\r\n match[i+1][j+1] = match[i+1][j-1];\r\n } else {\r\n match[i+1][j+1] = (match[i+1][j] || match[i][j+1] || match[i+1][j-1]);\r\n }\r\n }\r\n }\r\n }\r\n return match[lens][lenp];\r\n }", "static double resultRPN(String[] s){\n\t\t\tif(s.length == 0)\treturn -1;\n\t\t\tStack<Double> stack = new Stack<Double>();\n\n\t\t\tdouble res = 0;\n\t\t\t\n\t\t\tfor(int i=0; i<s.length; i++){\n\t\t\t\tif(!isSign(s[i])){\n\t\t\t\t\tstack.push(Double.parseDouble(s[i]));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tdouble val1 = stack.pop();\n\t\t\t\t\tdouble val2 = stack.pop();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(s[i] == \"*\"){\n\t\t\t\t\t\tres = val2*val1;\n\t\t\t\t\t}\n\t\t\t\t\tif(s[i] == \"+\"){\n\t\t\t\t\t\tres = val2+val1;\n\t\t\t\t\t}\n\t\t\t\t\tif(s[i] == \"-\"){\n\t\t\t\t\t\tres = val2-val1;\n\t\t\t\t\t}\n\t\t\t\t\telse if(s[i] == \"/\"){\n\t\t\t\t\t\tif(val1 == 0){\n\t\t\t\t\t\t\tthrow new ArithmeticException();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tres = val2/val1;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tstack.push(res);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tres = stack.pop();\n\t\t\t\n\t\t\tif(!stack.isEmpty()){\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t}\n\t\t\t\n\t\t\treturn res;\n\n\t\t}", "public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int sum = sc.nextInt();\n int N = sc.nextInt();\n sc.nextLine();\n int [][] arr = new int[N][2];\n for(int i = 0;i<N;i++)\n {\n arr[i][0] = sc.nextInt();\n arr[i][1] = sc.nextInt();\n sc.nextLine();\n }\n //Arrays.sort(arr, new Comparator<int[]>() {\n // @Override\n // public int compare(int[] o1, int[] o2) {\n // return o1[1]-o2[1]; //按第二列价值排个序。\n // }\n //});\n int [][] dp = new int[N+1][sum+1];\n int [][] path = new int[N+1][sum+1];\n for(int i = 1;i<=N;i++)\n {\n for(int j = 1;j<=sum;j++)\n {\n if(j<arr[i-1][0])\n dp[i][j] = dp[i-1][j];\n else\n {\n if(dp[i-1][j]<dp[i-1][j-arr[i-1][0]]+arr[i-1][1])\n path[i][j] = 1;\n dp[i][j] = Math.max(dp[i-1][j],dp[i-1][j-arr[i-1][0]]+arr[i-1][1]);\n }\n }\n }\n System.out.println(dp[N][sum]);\n\n int i = N;\n int j = sum;\n while (i>0&&j>0)\n {\n if(path[i][j]==1)\n {\n System.out.print(1+\" \");\n j -=arr[i-1][0];\n }\n else\n {\n i--;\n System.out.print(0+\" \");\n }\n }\n\n\n // 改进版。只使用一维数组。\n // int [] f = new int[sum+1];\n // for(int i = 0;i<N;i++)\n // {\n // for (int j = sum;j>=0;j--)\n // {\n // if(j>=arr[i][0])\n // f[j] = Math.max(f[j], f[j-arr[i][0]]+arr[i][1]);\n // }\n // }\n // System.out.println(f[sum]);\n\n }", "public static int countCombinationsDP(int score) {\r\n /*\r\n * Return Type of DP array is same as return type of the recursive function\r\n * Dimensions of DP array is the number of non constant parameters to the recursive function\r\n */\r\n \t\r\n \t/*\r\n \t * Fn(s) = Fn(s-7) [if(s>=7)] + Fn(s-3) [if(s>=3)] + Fn(s-2) [if(s>=2)]\r\n\t\t * Fn(0) = 1\r\n\t\t * \r\n * F(11) = F(4) + F(8) + F(9)\r\n */\r\n \tint comb[] = new int[score + 1];\r\n \r\n \r\n comb[0] = 1;\t// Halting Condition\r\n \r\n /*\r\n * Loop goes in the direction opposite to that of the recursion \r\n */\r\n for (int s = 1; s <= score; ++s) {\t\t// s is the score of the recursion\r\n int total = 0;\r\n if (s >= 7)\r\n \ttotal = total + comb[s - 7];\r\n if (s >= 3)\r\n \ttotal = total + comb[s - 3];\r\n if (s >= 2)\r\n \ttotal = total + comb[s - 2];\r\n comb[s] = total;\r\n }\r\n\r\n return comb[score];\r\n }", "public DP_Suffix_Solution(DP_Decision dec)\n {\n \tthis.first_decision = dec;\n \tthis.shorter_suffix = null;\n \t// this.length = 1;\n this.cost = dec.cost;\n this.next = null;\n }" ]
[ "0.77631366", "0.7225803", "0.7191668", "0.715136", "0.6600359", "0.6553784", "0.6388282", "0.6219804", "0.60988307", "0.60945284", "0.60161614", "0.5999862", "0.5915682", "0.5912316", "0.58496153", "0.5823272", "0.580564", "0.57964677", "0.57701355", "0.5758726", "0.5749345", "0.5651362", "0.56496984", "0.5632791", "0.55693674", "0.5513919", "0.54687", "0.5466959", "0.5406141", "0.53540665", "0.5331837", "0.5289033", "0.52854496", "0.52819085", "0.5268125", "0.5257713", "0.52351564", "0.5187925", "0.5175306", "0.5170613", "0.51643527", "0.5158774", "0.51573545", "0.51544183", "0.5154063", "0.5152528", "0.51088715", "0.5083641", "0.50782424", "0.5073792", "0.50374174", "0.5033202", "0.50310636", "0.5028211", "0.5026522", "0.5025226", "0.50099736", "0.49788424", "0.49773818", "0.49690828", "0.49626145", "0.4959491", "0.49513867", "0.49408337", "0.49216482", "0.4921555", "0.49144408", "0.49096963", "0.49032998", "0.48992983", "0.48892125", "0.48840603", "0.4879773", "0.48547187", "0.48361143", "0.4835808", "0.48353323", "0.4819366", "0.4814862", "0.48146826", "0.48113507", "0.48071805", "0.4806405", "0.47980934", "0.47936222", "0.4788072", "0.4776838", "0.4775354", "0.47678742", "0.4766879", "0.47549853", "0.47549403", "0.4753919", "0.47493523", "0.4747246", "0.4744893", "0.47390607", "0.4735738", "0.4717023", "0.47135222" ]
0.688757
4
TODO Autogenerated method stub
public void run(String... args) throws Exception { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
El metodo onCreate se ejecuta cada vez que hay un cambio en el estado de ejcucion de la actividad
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Carga los componentes definidos en el xml activity_main TextView texto = (TextView) findViewById(R.id.idTexto); // Instanciamos el componente de tipo TextView buscandolo por el id definido en el xml activity_main // texto.setText("Hola!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n \n // Carga las texturas necesarias\n mTextures = new Vector<Texture>();\n cargarTexturas();\n\n // Inicializa la flag de la versión de OpenGL ES\n mQCARFlags = QCAR.GL_20;\n //getFlagsOpenGLES();\n\n // Crea el detector de gestos para procesar el doble click\n mDetectorGestos = new GestureDetector(this, new GestorListener(this));\n\n // Actualiza el estado de la aplicación al inicial\n actualizarEstadoAplicacion(EstadoAPP.INIT_APP);\n \n // Creamos el SoundPlayer para la reproducción de sonidos\n mReproductor = new SoundPlayer(this);\n \n // Comprobamos si tiene cámara frontal el dispositivo\n CameraInfo ci = new CameraInfo();\n for (int i = 0; i < Camera.getNumberOfCameras(); i++)\n {\n Camera.getCameraInfo(i, ci);\n if (ci.facing == CameraInfo.CAMERA_FACING_FRONT)\n hasFrontCamera = true;\n }\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_djs);\n ButterKnife.bind(this);\n\n actionBarIconTittle();\n configs();\n //creacionDjs(); //solo llamar en la creacion de la app o para ejecutar algun cambio en FB\n //creacionLinks(); //solo llamar en la creacion de la app o para ejecutar algun cambio en FB\n configRV();//llamar una vez configurados los djs en FB sino arroja error\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.activity_addjiaojie);\r\n\t\tExitManager.getInstance().addActivity(this);\r\n\t\tMyUntils.getUersInfo(this);\r\n\t\tinit();\r\n\t\tinitData();\r\n\t\tStatics.ADDAVTIVITY=Statics.AddjiaoyvActivity;\r\n\t}", "protected void onCreate() {\n }", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n BusProvider.register(this);\n findViews();\n init();\n getData();\n //customizeActionBar();\n\n loadContact();\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.login);\n\t\t//\n\t\tretriveViews();\n\t\tautoEnterNP();\n\t\tregisterEventHandler();\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.listexcursionscreen);\n\n ActionsDelegator.getInstance().synchronizeActionsWithServer(this);\n runId = PropertiesAdapter.getInstance(this).getCurrentRunId();\n\n RunDelegator.getInstance().loadRun(this, runId);\n ResponseDelegator.getInstance().synchronizeResponsesWithServer(this, runId);\n\n }", "@Override\n public void onCreate() {\n super.onCreate();\n initData();\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tAnnotationProcessor.processActivity(this);\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler(this));\n setContentView(R.layout.register);\n\n//\t\texport_database();\n getIntentData();\n initComponentData();\n initComponentListeners();\n\n\n }", "@Override\n public void onCreate() {\n initData();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n if (savedInstanceState != null) {\n msgType = savedInstanceState.getString(\"msgType\");\n timeFlag = savedInstanceState.getString(\"time\");\n fromme = savedInstanceState.getBoolean(\"fromme\");\n title = savedInstanceState.getString(\"title\");\n } else {\n initPassData();\n }\n initViews();\n initDeatilsData();\n initListener();\n }", "@Override \n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetParams();\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\t\n\t\tactivity = (MainActivity)getActivity(); \n\t\t\n\t\tactivity.setContListener(this);\n\t\t\n\t\tif(MODE == Const.MODE_DEFAULT){\n\t\t\tinitializeInfoForm();\n\t\t}else{\n\t\t\tinitializeAddEditForm();\t\t\t\n\t\t}\n\t\t\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.auth_activity);\n connectVariablesToViews();\n listenToFields();\n WorkSpace.authorizationCompleted = false;\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n // initialize Rocos agent\n // Agent SDK is a singleton instance, only need to initialize once per application\n SdkConfig sdkConfig = new SdkConfig()\n .setAgentAddress(\"127.0.0.1\")\n .setAgentPort(9000);\n AgentSdk.getInstance().setConfig(sdkConfig).init();\n\n // initialize robot\n sRobot = Robot.getInstance();\n\n // run publisher\n sHandler.post(dataPublisher);\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tinitMain();\n\n\t}", "public void onCreate() {\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n init();\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t}", "@Override\n public void onCreate()\n {\n\n super.onCreate();\n }", "@Override\n\tpublic void onActivityCreated(@Nullable Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\t\n\t\tBundle args = getArguments();\n\t\t\n if (args != null) {\n \t\n \tactiv=(Actividad)args.get(\"Actividad\");\n \t\n \tObtenerVistas();\n \t\n \t//Verificar el tipo de gestion del proyecto: Por Cantidades o Por Porcentajes\n \ttGestion = Proyecto.ObtenerTipoGestionProyecto(getActivity(),\n \t\t\tactiv.getIdCliente(),activ.getIdProyecto());\n\n \tEstablecerVistas(tGestion);\n \t \t\n }\n\t}", "@Override\n public void onCreate() {\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tinitView();\n\t\tinitData();\n\t\tinitEvent();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n\tpublic void onCreate() {\n\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\n\t\tLog.i(TAG, \"onCreate\");\n\t\tsuper.onCreate(savedInstanceState);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(new RaceCamera(this));\n\n\t\tgetWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n\n\t\tNumberDetect numdet = new NumberDetect(this);\n\t\tnumdet.start();\n\n\t\traceMan = new RaceManager(this);\n\t\traceMan.start();\n\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t\thandleIntent(getIntent());\r\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tinit();\r\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n inizializzaAzioni();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.add_plan_action);\n\t\t\n\t\tinitControls();\n\t\tinitpath();\n\t\tgetJson_file();\n\t\tinitList();\n\t\tsetVMlisten();\n\t\tsetVMControlsData();\n\t\t\n\t\tsetlisten();\n\t\t\n\t}", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.senior_activity);\n init();\n initEvent();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n\n // inisiasi instance\n instance = this;\n\n // memanggil fungsi setup\n setup();\n\n // jika aplikasi di run dengan mode debug\n // lakukan sesuatu\n if (BuildConfig.DEBUG){\n\n }\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n initData();\n // L.e(TAG, \"msg: onCreate\" + city);\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tIntent intent = this.getIntent();\r\n\t\tcodigo_cliente = intent.getStringExtra(CODIGO_CLIENTE);\r\n\t\tcodigo_plan = intent.getStringExtra(CODIGO_PLAN);\r\n\t\tcodigo_actividad = intent.getStringExtra(CODIGO_ACTIVIDAD);\r\n\t\t\r\n\t\tsetContentView(R.layout.plandesarrollo_sustento_activity);\r\n\t\tfinal RTMApplication application = (RTMApplication)contextProvider.get().getApplicationContext();\r\n\t\tClienteResumenTO cliente = application.getClienteTO();\r\n\t\tmActionBar.setSubTitle(cliente.getCodigoCliente()+\"-\"+cliente.getRazonSocial());\r\n\t\tmActionBar.setTitle(R.string.pd_mostrar_sustento_activity_title);\r\n\t\tmActionBar.setHomeLogo(R.drawable.header_logo);\r\n\t}", "@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n initArguments();\n }", "@Override\n public void onCreate() {\n L.d(\"onCreate is called\");\n super.onCreate();\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t\tmControlCenter = FragmentControlCenter.getInstance(this);\n\t\tpersonfragmentModel = mControlCenter.getPersonFragmentModel();\n\t\tInfos.main=this;\n\t\tsetupViews();\n\t\t\n\t\tinitData();\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t// Establezco el layout que mostrará la actividad.\n\t\tsetContentView(R.layout.activity_main);\n\t\t// Obtengo las vistas.\n\t\tgetVistas();\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n mAlumno = new Alumno(\"\", Alumno.DEFAULT_EDAD);\n // Se obtienen e inicializan las vistas.\n initVistas();\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tAppendMainBody(R.layout.os_jsh_wdj_ldss_introduce);\r\n\t\tisShowSlidingMenu(false);\r\n\t\tAppendTitleBody1();\r\n\t\tinitView();\r\n\t\tinitListener();\r\n\t\tinitData();\r\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\r\n\t}", "@Override\n public void onCreate() {\n super.onCreate();\n ACRA.init(this);\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitViewPager();\r\n\t\t\r\n\t\tinitView();\r\n\r\n\t\tinitCursor();\r\n\t\t\r\n\t\tinithuanxin(savedInstanceState);\r\n\t\r\n \r\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.main);\n\t\tinitView();\n\t\tprepareListener();\n\t\tsetListener();\n\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\r\n\t}", "@Override\n protected void onCreate(final Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n if (savedInstanceState == null) {\n //get conexus data\n try {\n mConexus = (Conexus) getIntent().getSerializableExtra(\"conexus\");\n conexusID = mConexus.getId();\n } catch (NullPointerException e) {\n onLoadingError();\n return;\n }\n\n //begin loading\n mDataGrabber = DataGrabber.getInstance(conexusID);\n getSupportFragmentManager().beginTransaction()\n .add(mDataGrabber, mLoadConexusFragmentTag)\n .commit();\n } else {\n //get data loading fragment that already exists\n mDataGrabber =\n (DataGrabber) getSupportFragmentManager().findFragmentByTag(mLoadConexusFragmentTag);\n\n if (!mDataGrabber.loading) {\n mConexus = (Conexus) savedInstanceState.getSerializable(\"conexus\");\n }\n\n hideProgressBar();\n }\n\n setActionBarAndTitle(\"Conexus\");\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n \n \n \n //Pruebas de clientes\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.activity_antilost);\r\n\t\tinitView();\r\n\t\tinitData();\r\n\t\taddListener();\r\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tAppendTitleBody2();\r\n\t\tAppendMainBody(R.layout.os_grzl_activity);\r\n\t\tisShowSlidingMenu(false);\r\n\t\tSetTopBarTitle(\"编辑个人资料\");\r\n\t\tinitView();\r\n\t\tinitData();\r\n\t\tinitListener();\r\n\t}", "@Override\n protected void onStart() {\n super.onStart();\n iniciar();\n }", "@Override\n public void onCreate() {\n\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tLogUtil.d(TAG, \"onActivityCreated---------\");\n\t\tinitData(savedInstanceState);\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.rename_room_name);\n init();\n initView();\n initListener();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tinitView();\n\n\t\tinitData();\n\n\t\tinitEvent();\n\n\t\tinitAnimation();\n\n\t\tshowUp();\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.main_register);\n\t\thttpUtils = new HttpUtils();\n\t\tcontext = this;\n\t\ttypeChange = new TypeChange();\n\t\tmyApplication = (MyApplication) getApplication();\n\t\tmyMD5Util = new MyMD5Util();\n\t\tgetCodeInfo = new GetCodeInfo();\n\t\tuserId = myApplication.getUserId();\n\t\tinputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\tinitFristView();\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tLogUtil.d(TAG, \"oncreate---------\");\n\t\tsuper.onCreate(savedInstanceState);\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\r\n\t\tif (savedInstanceState != null) {\r\n\t\t\tsCameraFilename = savedInstanceState.getString(\"sCameraFilename\");\r\n\t\t\tfCurrentFile = (File) savedInstanceState.getSerializable(\"fCurrentFile\");\r\n\t\t\tPalmchatLogUtils.println(\"--cfd onCreate savedInstanceState sCameraFilename =\" + sCameraFilename);\r\n\t\t\tif (fCurrentFile != null) {\r\n\t\t\t\tsetShowHean(fCurrentFile.getAbsolutePath());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n\tsuper.onCreate(savedInstanceState);\n }", "public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n initView();\n initListener();\n }", "@Override\n public void onCreate() {\n Thread.setDefaultUncaughtExceptionHandler(new TryMe());\n\n super.onCreate();\n\n // Write the content of the current application\n context = getApplicationContext();\n display = context.getResources().getDisplayMetrics();\n\n\n // Initializing DB\n App.databaseManager.initial(App.context);\n\n // Initialize user secret\n App.accountModule.initial();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tLog.e(TAG, \"onCreate------\");\r\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tLog.e(TAG, \"onCreate------\");\r\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t}", "@Override\n\tprotected void onCreate() {\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tLog.d(TAG,\"onCreate\");\n\t\tsuper.onCreate();\n\t\tinitCamera();\n\t\tinitFloatTool();\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n public void onCreate() {\n super.onCreate();\n //是不是第一次打开此app\n// initSplashed();\n //缓存文件\n// initCache();\n\n// initUser();\n\n// initAccessToken();\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t}", "@Override\n\t\tpublic void onCreate(Bundle savedInstanceState)\n\t\t\t{\n\t\t\t\tsuper.onCreate(savedInstanceState);\n\t\t\t}", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n // Init parameter\n arApplicationSession = new ARApplicationSession(this);\n\n // Start loading Vuforia AR Session\n arApplicationSession.initAR(this, ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);\n }", "public void onCreate();", "public void onCreate();", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n \tsuper.onCreate(savedInstanceState);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitView();\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tinitData(savedInstanceState);\r\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsetContentView(R.layout.caifushi_record);\n\t\tsuper.onCreate(savedInstanceState);\n\t\tinitview();\n\t\tMyApplication.getInstance().addActivity(this);\n\t\t\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tsetContentView(R.layout.user_main_activity);\n\t\tinitSlidingMenu(R.layout.menu_settings_layout);\n\t\tinit();\n\t\tinitControl();\n\t\tensureUi();\n\t\tUmengUpdateAgent.update(this);\n\t\t\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }" ]
[ "0.7442438", "0.72051275", "0.72051", "0.71560544", "0.71506876", "0.714176", "0.7134554", "0.71244913", "0.71180516", "0.7116679", "0.7115048", "0.70912915", "0.70861083", "0.70667696", "0.7063578", "0.7053209", "0.70516676", "0.7050101", "0.7041776", "0.70407534", "0.70367265", "0.7021258", "0.70205677", "0.70138437", "0.70087", "0.70032424", "0.70032424", "0.70006484", "0.69956034", "0.6988468", "0.6984742", "0.69795877", "0.6978998", "0.6972536", "0.6972536", "0.6969034", "0.69599664", "0.6958151", "0.6958151", "0.6953061", "0.6951372", "0.6951372", "0.69490796", "0.6942963", "0.69406146", "0.6932899", "0.6931655", "0.6927789", "0.69236", "0.69235605", "0.69166857", "0.69132626", "0.6912471", "0.69055396", "0.6900404", "0.6899206", "0.68958986", "0.68949443", "0.6894473", "0.68931144", "0.689184", "0.68893814", "0.68886983", "0.6879891", "0.68714446", "0.6868505", "0.6866916", "0.68629056", "0.6862186", "0.68615764", "0.68590695", "0.68590456", "0.68573576", "0.68559486", "0.68467605", "0.68467605", "0.6844891", "0.6844891", "0.6844891", "0.6844891", "0.6844891", "0.68447", "0.68442243", "0.6844174", "0.6843951", "0.6843504", "0.6843504", "0.6835161", "0.683455", "0.6833286", "0.6833286", "0.6832885", "0.68313783", "0.6829811", "0.68269014", "0.68268126", "0.68257004", "0.6825525", "0.6822068", "0.6822068", "0.6822068" ]
0.0
-1
Created by nankai on 8/3/2017.
public interface MainContract { interface View extends CallbackListener { void onLogout(); void onUserInForwardProfile(UserInfoResponse userInfoResponse); void onReadAllNotification(); } interface Presenter extends PresenterListener<MainContract.View> { void onLogout(LogoutRequest logoutRequest); void getUserInForwardProfile(UserInfoRequest userInfoRequest); void markReadAllNotification(ReadAllNotificationRequest request); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo38117a() {\n }", "private void poetries() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n void init() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private void init() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "public void mo4359a() {\n }", "private static void cajas() {\n\t\t\n\t}", "private void m50366E() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n protected void init() {\n }", "public void gored() {\n\t\t\n\t}", "@Override\n public void init() {}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void initialize() { \n }", "private void kk12() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void mo6081a() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "private void init() {\n\n\n\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n public void initialize() {\n \n }", "private void strin() {\n\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}" ]
[ "0.6185126", "0.60067344", "0.59125835", "0.5872752", "0.586502", "0.585821", "0.584221", "0.584221", "0.5807621", "0.5792924", "0.57335305", "0.57207626", "0.57080233", "0.57060105", "0.5695879", "0.56717134", "0.56717134", "0.56717134", "0.56717134", "0.56717134", "0.5666874", "0.5663186", "0.5662926", "0.5662741", "0.565947", "0.56502473", "0.5645549", "0.56438607", "0.56328195", "0.56232274", "0.5620197", "0.56096274", "0.5608755", "0.5608755", "0.5608755", "0.5608755", "0.5608755", "0.5608755", "0.560106", "0.5600781", "0.5600781", "0.5593928", "0.55792797", "0.5576043", "0.5565712", "0.555853", "0.555853", "0.555853", "0.5556371", "0.5556371", "0.55507815", "0.5546683", "0.553954", "0.5538306", "0.5538306", "0.5538306", "0.5537209", "0.5537209", "0.5537209", "0.553517", "0.55138165", "0.5511646", "0.5511646", "0.5511331", "0.5509073", "0.55009186", "0.5496881", "0.54821414", "0.54797345", "0.54756814", "0.5473381", "0.5468821", "0.5462381", "0.5451218", "0.5443274", "0.5436843", "0.54321647", "0.542839", "0.542839", "0.542839", "0.542839", "0.542839", "0.542839", "0.542839", "0.5428248", "0.54275084", "0.5414614", "0.5414104", "0.54075336", "0.54074633", "0.5395426", "0.53950983", "0.53950983", "0.5386665", "0.5385984", "0.53845155", "0.53842056", "0.5375137", "0.5366413", "0.5364597", "0.53571373" ]
0.0
-1
Method invoking the Internet check thread
private void createAndStartNetworkCheckThread(final Shell shell, final ToolItem widgetItem, final Image off, final Image on) { new Thread(new Runnable() { public void run() { while (!stop) { try { Thread.sleep(5000); } catch (Exception e) { log.error(e.getMessage()); } if (!shell.isDisposed()) { toolbar.getDisplay().asyncExec(new Runnable() { public void run() { if (isInternetReachable()) { log.info("Connection - ON"); widgetItem.setImage(on); } else { log.info("Connection - OFF"); widgetItem.setImage(off); } } }); } } } }).start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void run() {\n\t\tresult = InternetConn.pushURL(URL);\r\n\t\tif(result.equals(\"-1\")){\r\n\t\t\t\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.obj = \"网络连接错误\";\r\n\t\t\tmsg.what = -1;\r\n\t\t\tmHandler.sendMessage(msg);\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.obj = result;\r\n\t\t\tmsg.what = 1;\r\n\t\t\tmHandler.sendMessage(msg);\r\n\t\t}\r\n\t}", "public void run() {\n\t\t\t\tHttpURLConnection connection = null;\r\n\t\t\t\tStringBuilder response = new StringBuilder();\r\n\t\t\t\ttry{\r\n\t\t\t\t\tURL url = new URL(address);\r\n\t\t\t\t\tconnection = (HttpURLConnection) url.openConnection();\r\n\t\t\t\t\tconnection.setRequestMethod(\"GET\");\r\n\t\t\t\t\tconnection.setConnectTimeout(8000);\r\n\t\t\t\t\tconnection.setReadTimeout(8000);\r\n\t\t\t\t\tconnection.setDoInput(true);\r\n\t\t\t\t\t//connection.setDoOutput(true);\r\n\t\t\t\t\tint responseCode = connection.getResponseCode();\r\n\t\t\t\t\tLog.d(\"HttpUtil\", String.valueOf(responseCode));\r\n\t\t\t\t\tif(responseCode != 200){\r\n\t\t\t\t\t\tLog.d(\"HttpUtil\", \"Get Fail\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tInputStream in = connection.getInputStream();\r\n\t\t\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\r\n\t\t\t\t\t\tString line;\r\n\t\t\t\t\t\twhile((line = reader.readLine()) != null){\r\n\t\t\t\t\t\t\tresponse.append(line);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tLog.d(\"HttpUtil\", \"Get Success\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(listener != null){\r\n\t\t\t\t\t\tlistener.onFinish(response.toString());\r\n\t\t\t\t\t}\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tif(listener != null){\r\n\t\t\t\t\t\tlistener.onError(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}finally{\r\n\t\t\t\t\tif(connection != null){\r\n\t\t\t\t\t\tconnection.disconnect();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}", "private void checkInternetConnection() {\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n public void run() {\n String inMessage;\n String GET = null;\n String cookie = null;\n try {\n boolean coockieCheck = false;\n boolean validURL = false;\n boolean getRequest = false;\n this.in = new BufferedReader(new InputStreamReader(this.connectionSocket.getInputStream()));\n this.out = new PrintWriter(connectionSocket.getOutputStream());\n protocol = new netProtocol();\n //parses incomming header data, pass that to netProtocol to extract information about headers\n while (true) {\n inMessage = in.readLine();\n //System.out.println(inMessage);\n if(inMessage == null){\n break;\n }\n\n String response = protocol.parseHeaderInfo(inMessage);\n //System.out.println(\"READ...\" + inMessage + \" RESPONSE...\" + response);\n\n if(response.equals(VALID)){ //check if hostname valid\n validURL = true;\n } else if(response.equals(INVALID)){\n postErrorPage();\n break;\n }\n\n if(response.equals(\"GET\")){\n getRequest = true;\n GET = inMessage;\n }\n\n if(response.equals(\"CookieFound\")){\n cookie = inMessage;\n }\n\n if(inMessage.length() == 0){ //when all headers have been parsed, we need to come up with an appropriate response to POST back\n if(validURL && getRequest){\n processRequest(GET, cookie);\n } else{\n postErrorPage();\n }\n out.close();\n in.close();\n connectionSocket.close();\n break;\n }\n }\n\n\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(\"Client closed.\");\n }\n }", "@Override\n public void run() {\n\n new Thread() {\n\n @Override\n public void run() {\n HttpGet requestForTest = new HttpGet(\"http://m.google.com\");\n try {\n new DefaultHttpClient().execute(requestForTest); // can last...\n responded = true;\n } catch (Exception e) {}\n }\n\n }.start();\n\n try {\n int waited = 0;\n while(!responded && (waited < timeout)) {\n sleep(100);\n if(!responded ) { \n waited += 100;\n }\n }\n } \n catch(InterruptedException e) {} // do nothing \n finally { \n if (!responded) { handler.sendEmptyMessage(0); } \n else { handler.sendEmptyMessage(1); }\n }\n\n }", "public void internetConnectionProble()\n\t\t{\n\n\n\t\t}", "@Override\n\tpublic void run() {\n\t\ttry{\n\t\t\tboolean redirected=false;\n\t\t\tint responseCode=0;\n\t\t\tint tries=0;\n\t\t\tString location=site.getUrl();\n\t\t\tHttpURLConnection urlConnection=null;\n\t\t\tdo{\n\t\t\t\tURL url = new URL(location);\n\t\t\t\turlConnection = (HttpURLConnection) url.openConnection();\n\t\t\t\turlConnection.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11\");\n\t\t\t\turlConnection.setConnectTimeout(Constants.CONNECTION_TIMEOUT);\n\t\t\t\turlConnection.setReadTimeout(Constants.READ_TIMEOUT);\n\t\t\t\turlConnection.setRequestMethod(\"GET\");\n\t\t\t\turlConnection.setInstanceFollowRedirects(true);\n\t\t\t\turlConnection.setUseCaches(false);\n\t\t\t\turlConnection.setAllowUserInteraction(false);\n\t\t\t\turlConnection.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\t\tresponseCode = urlConnection.getResponseCode();\n\t\t\t\t\n\t\t\t\tif(responseCode==HttpURLConnection.HTTP_MOVED_TEMP || responseCode==HttpURLConnection.HTTP_MOVED_PERM){ //handle 302 and 301 redirect. \n\t\t\t\t\tredirected=true;\n\t\t\t\t\tlocation = urlConnection.getHeaderField(\"Location\");\n\t\t\t\t\ttries++;\n\t\t\t\t}else\n\t\t\t\t\tredirected=false;\n\t\t\t}while(redirected && tries<3);\n\t\t\t\n\t\t\tif (responseCode == HttpURLConnection.HTTP_OK){\n\t\t\t\ttry (InputStream is = urlConnection.getInputStream();\n\t\t BufferedReader br = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8))) {\n\t\t String content = br.lines().collect(Collectors.joining(System.lineSeparator()));\n\t \tthis.callback.webContentCallBack(site, content);\n\t\t } \n\t\t\t}else this.callback.webContentCallBack(site, null); //any other case, null is returned as the content. \n\t\t}catch (Exception e) {\n\t\t\tLogger.getLogger(Fetcher.class.getName()).log(Level.WARNING, \"Site:\"+site.getUrl()+\" failed fetching.\", e);\n\t\t\ttry {\n\t\t\t\tthis.callback.webContentCallBack(site, null); //any exception, null is returned as the content. \n\t\t\t} catch (Exception e1) {\n\t\t\t} \n\t\t}\n\t}", "@Test\r\n public void testInternetConnection(){\r\n CheckConnection checkConnection = new CheckConnection();\r\n checkConnection.checkURL();\r\n }", "public void checkNetworkStatus() {\n if (this.mCheckNetworkStateTask == null) {\n this.mCheckNetworkStateTask = new CheckNetworkStateTask(this);\n this.mCheckNetworkStateTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new ArrayList[]{this.mServerList});\n }\n }", "@Override\n public void run() {\n try {\n ServiceInfo serviceInfo = this.getServiceStatus(url);\n this.saveServiceStatusInfo(serviceInfo);\n if(serviceInfo.getResponseTimeInMillis() > 200)\n log.warn(\"The service is taking too long to respond\");\n\n if(serviceInfo.getStatusCode()!=200)\n log.warn(\"The service did not respond OK\");\n\n\n } catch (IOException e) {\n log.error(\"Error while accessing the service\" ,e);\n }\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tList<String> headers = readRequest(client);\n\t\t\t\t\t\t\tif (headers != null && headers.size() >= 1) {\n\t\t\t\t\t\t\t\tString requestURL = getRequestURL(headers.get(0));\n\t\t\t\t\t\t\t\tLog.d(TAG, requestURL);\n\n\t\t\t\t\t\t\t\tif (requestURL.startsWith(\"http://\")) {\n\n\t\t\t\t\t\t\t\t\t// HttpRequest request = new\n\t\t\t\t\t\t\t\t\t// BasicHttpRequest(\"GET\", requestURL);\n\n\t\t\t\t\t\t\t\t\tprocessHttpRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tprocessFileRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (IllegalStateException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Override\n protected Boolean doInBackground(Void... params) {\n check_internet = hasActiveInternetConnection(getApplicationContext());\n return check_internet;\n }", "public static void isNetworkAvailable(final Handler handler, final int timeout) {\n\n new Thread() {\n\n private boolean responded = false;\n\n @Override\n public void run() {\n\n // set 'responded' to TRUE if is able to connect with google mobile (responds fast)\n\n new Thread() {\n\n @Override\n public void run() {\n HttpGet requestForTest = new HttpGet(\"http://m.google.com\");\n try {\n new DefaultHttpClient().execute(requestForTest); // can last...\n responded = true;\n } catch (Exception e) {}\n }\n\n }.start();\n\n try {\n int waited = 0;\n while(!responded && (waited < timeout)) {\n sleep(100);\n if(!responded ) { \n waited += 100;\n }\n }\n } \n catch(InterruptedException e) {} // do nothing \n finally { \n if (!responded) { handler.sendEmptyMessage(0); } \n else { handler.sendEmptyMessage(1); }\n }\n\n }\n\n }.start();\n\n}", "@Override\r\n\t\tprotected Boolean doInBackground(String... args) {\r\n\t\t\tConnectivityManager cm = (ConnectivityManager) getActivity()\r\n\t\t\t\t\t.getSystemService(Context.CONNECTIVITY_SERVICE);\r\n\t\t\tNetworkInfo netInfo = cm.getActiveNetworkInfo();\r\n\t\t\tif (netInfo != null && netInfo.isConnected()) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tURL url = new URL(UserFunctions.chkConnURL);\r\n\t\t\t\t\t// URL url = new\r\n\t\t\t\t\t// URL(\"http://10.0.2.2/notified/all_con.php\");\r\n\t\t\t\t\tHttpURLConnection urlc = (HttpURLConnection) url\r\n\t\t\t\t\t\t\t.openConnection();\r\n\t\t\t\t\turlc.setConnectTimeout(3000);\r\n\t\t\t\t\turlc.connect();\r\n\t\t\t\t\tif (urlc.getResponseCode() == 200) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (MalformedURLException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t// Message.message(getApplicationContext(), \"malformedUrl\");\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t// Message.message(getApplicationContext(), \"exception\");\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t// Message.message(getApplicationContext(), \"exception\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}", "public void run()\n\t\t{\n\t\t\tint num = 0;\n\t\t\ttry{\n\t\t\t\tlog.debug(\"Dealing with: \" + url.toString() + \" From : \" + urlp);\n\t\t\t\t\n\t\t\t\tSocket socket = new Socket(url.getHost(), PORT);\n\t\t\t\tPrintWriter writer = new PrintWriter(socket.getOutputStream());\n\t\t\t\tBufferedReader reader = \n\t\t\t\t\tnew BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\t\tString request = \"GET \" + url.getPath() + \" HTTP/1.1\\n\" +\n\t\t\t\t\t\t\t\t\"Host: \" + url.getHost() + \"\\n\" +\n\t\t\t\t\t\t\t\t\"Connection: close\\n\" + \n\t\t\t\t\t\t\t\t\"\\r\\n\";\n\t\t\t\twriter.println(request);\n\t\t\t\twriter.flush();\n\t\t\n\t\t\t\tString line = reader.readLine();\n\t\t\t\t// filter the head message of the response\n\t\t\t\twhile(line != null && line.length() != 0)\n\t\t\t\t{\n\t\t\t\t\tline = reader.readLine();\n\t\t\t\t}\n\t\t\t\t// keep the html context\n\t\t\t\twhile (line != null) \n\t\t\t\t{\n\t\t\t\t\tcontext += line + \"\\n\";\n\t\t\t\t\tline = reader.readLine();\n\t\t\t\t}\n\t\t\t\treader.close();\n\t\t\t\twriter.close();\n\t\t\t\tsocket.close();\n\t\t\t\t//log.debug(context);\n\t\t\t\tstripper = new TagStripper(context);\n\t\t\t\tlog.debug(\"Removing script and style from: \" + url.toString());\n\t\t\t\tstripper.removeComments();\n\t\t\t\tstripper.removeScript();\n\t\t\t\tstripper.removeStyle();\n\t\t\t\tlog.debug(\"Getting links from: \" + url.toString());\n\t\t\t\tArrayList<String> link = new ArrayList<String>();\n\t\t\t\tstripper.buildLinks(url.toString());\n\t\t\t\t\n\t\t\t\tlink = stripper.getLinks();\n\t\t\t\tfor(String tmp : link) {\n\t\t\t\t\tif(getCount() < pageNum ) {\n\t\t\t\t\t\t// find if the link has been already visited\n\t\t\t\t\t\tif(!urlList.contains(tmp)) {\n\t\t\t\t\t\t\tworkers.execute(new SingleHTMLFetcher(new URL(tmp), this.url.toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString title = stripper.getTitle();\n\t\t\t\tif(title == null)\n\t\t\t\t\ttitle = \"NO title\";\n\t\t\t\ttitle = title.replaceAll(\"&[^;]*;\", \"\");\n\t\t\t\tlog.debug(\"Removing tags from: \" + url.toString());\n\t\t\t\tstripper.removeTags();\n\t\t\t\tstripper.removeSymbol();\n\t\t\t\tString snippet = stripper.getSnippet(title);\n\t\t\t\tdb.savePageInfo(connection, title, snippet, url.toString());\n\t\t\t\tcontext = stripper.getContext();\n\t\t\t\tString[] words = context.toLowerCase().split(\"\\\\s\");\n\t\t\t\tArrayList<String> wordsList = new ArrayList<String>();\n\t\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\t\t// delete non-word character\n\t\t\t\t\twords[i] = words[i].replaceAll(\"\\\\W\", \"\").replace(\"_\",\n\t\t\t\t\t\t\t\"\");\n\t\t\t\t\tif(words[i].length() != 0)\n\t\t\t\t\t\twordsList.add(words[i]);\n\t\t\t\t}\n\t\t\t\tfor (String w : wordsList) {\n\t\t\t\t\tif (w.length() != 0) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tindex.addNum(w, url.toString(), num);\n\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\tnum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlog.debug(\"URL: \" + url.toString() + \" is finished!\");\n\t\t\t\tdecrementPending();\n\t\t\t}catch(Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}", "@Override\n protected Boolean doInBackground(String... args){\n ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n if (netInfo != null && netInfo.isConnected()) {\n try {\n URL url = new URL(\"http://www.google.com\");\n HttpURLConnection urlc = (HttpURLConnection) url.openConnection();\n urlc.setConnectTimeout(3000);\n urlc.connect();\n if (urlc.getResponseCode() == 200) {\n return true;\n }\n } catch (MalformedURLException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n return false;\n\n }", "private void testConnection(){ \n\t\t\tconnection=false;\n\t\t\tip = ipfield.getText().toString();\n\t\t\tLog.d(null,\"ip is \"+ip);\n\t\t\tif(ip.equals(\"\")) \n\t\t\t\tToast.makeText(getApplicationContext(), \"Please Enter an IP Address\", Toast.LENGTH_SHORT).show();\n\t\t\telse{\n\t\t\t\tRunnable runnable = new Runnable(){\n\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tSocket s = new Socket(ip,6969);\n\t\t\t\t\t\t\t\ts.close();\n\t\t\t\t\t\t\t\tconnection=true;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t catch (UnknownHostException e1) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\tLog.d(null, \"Wrong ip\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\t\tLog.d(null, \"Wrong ip\");\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tThread thread = new Thread(runnable);\n\t\t\t\tthread.start();\n\t\t\t}\n\t}", "@Override\n public void run() {\n showToast(\"请检查您的网络\");\n }", "public void run() \r\n\t\t{\n\r\n\t\t\tMyNameValuePair NameValuePair1 = new MyNameValuePair(\"app\", \"api\");\r\n\t\t\tMyNameValuePair NameValuePair2 = new MyNameValuePair(\"mod\",\r\n\t\t\t\t\t\"Notifytion\");\r\n\t\t\tMyNameValuePair NameValuePair3 = new MyNameValuePair(\"act\",\r\n\t\t\t\t\t\"get_notify_by_count\");\r\n\t\t\tMyNameValuePair NameValuePair4 = new MyNameValuePair(\"oauth_token\",\r\n\t\t\t\t\tac.getOauth_token());\r\n\t\t\tMyNameValuePair NameValuePair5 = new MyNameValuePair(\r\n\t\t\t\t\t\"oauth_token_secret\", ac.getOauth_token_secret());\r\n\r\n\t\t\tString result = MHttpClient.post(ThinkSNSApplication.baseUrl,\r\n\t\t\t\t\tNameValuePair1, NameValuePair2, NameValuePair3,\r\n\t\t\t\t\tNameValuePair4, NameValuePair5);\r\n\t\t\tSystem.out.println(\"GetNotifyThread结果:\" + result);\r\n\r\n\t\t\tinfos = format(result);\r\n\t\t\t\r\n\t\t}", "private void showWeb() {\n\n new Thread(() -> {\n if (!webService.isStarted()) {\n new Thread(() -> trayIcon.displayMessage(null, \"Please wait, the web server starts!\", TrayIcon.MessageType.INFO)).start();\n webService.startService();\n while (!webService.isStarted()) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n /**NOP*/\n }\n }\n openUri();\n }).start();\n }", "NetThread(){}", "boolean isNetworkAvailable();", "public void run() \r\n\t\t{\n\t\t\tMyNameValuePair NameValuePair1 = new MyNameValuePair(\"app\", \"api\");\r\n\t\t\tMyNameValuePair NameValuePair2 = new MyNameValuePair(\"mod\",\r\n\t\t\t\t\t\"Notifytion\");\r\n\t\t\tMyNameValuePair NameValuePair3 = new MyNameValuePair(\"act\",\r\n\t\t\t\t\t\"set_notify_read\");\r\n\t\t\tMyNameValuePair NameValuePair4 = new MyNameValuePair(\"oauth_token\",\r\n\t\t\t\t\tac.getOauth_token());\r\n\t\t\tMyNameValuePair NameValuePair5 = new MyNameValuePair(\r\n\t\t\t\t\t\"oauth_token_secret\", ac.getOauth_token_secret());\r\n\t\t\tMyNameValuePair NameValuePair6 = new MyNameValuePair(\r\n\t\t\t\t\t\"type\", type);\r\n\r\n\t\t\tString result = MHttpClient.post(ThinkSNSApplication.baseUrl,\r\n\t\t\t\t\tNameValuePair1, NameValuePair2, NameValuePair3,\r\n\t\t\t\t\tNameValuePair4, NameValuePair5, NameValuePair6);\r\n\t\t\tSystem.out.println(\"SetNotifyReadThread结果:\" + result);\r\n\t\t}", "@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\t\t\t\tProxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(\n\t\t\t\t\t\t\"proxy.iiit.ac.in\", 8080));\n\t\t\t\tURL url = new URL(url1);\n\t\t\t\tHttpURLConnection conn = (HttpURLConnection) url\n\t\t\t\t\t\t.openConnection(proxy);\n\t\t\t\tconn.setRequestMethod(\"GET\");\n\t\t\t\tconn.setRequestProperty(\"Accept\", \"application/json\");\n\n\t\t//\t\tif (conn.getResponseCode() != 200) {\n\t\t\t//\t\tthrow new RuntimeException(\"Failed : HTTP error code : \"\n\t\t\t//\t\t\t\t+ conn.getResponseCode());\n\t\t\t//\t}\n\n\t\t\t\t/*\n\t\t\t\t * BufferedReader br = new BufferedReader(new InputStreamReader(\n\t\t\t\t * (conn.getInputStream())));\n\t\t\t\t * \n\t\t\t\t * String output;\n\t\t\t\t * System.out.println(\"Output from Server .... \\n\"); while\n\t\t\t\t * ((output = br.readLine()) != null) {\n\t\t\t\t * System.out.println(output); }\n\t\t\t\t */\n\t\t\t\tlong tID = Thread.currentThread().getId();\n\t\t\t\tlong time = ManagementFactory.getThreadMXBean()\n\t\t\t\t\t\t.getThreadCpuTime(tID);\n\t\t\t\tSystem.out.println(\"My thread \" + tID + \" execution time: \"\n\t\t\t\t\t\t+ time + \" ns.\");\n\t\t\t\tsumTimes=sumTimes+time;\n\t\t\t\tconn.disconnect();\n\n\t\t\t} catch (MalformedURLException e) {\n\n\t\t\t\te.printStackTrace();\n\n\t\t\t} catch (IOException e) {\n\n\t\t\t\te.printStackTrace();\n\n\t\t\t} catch (Exception e) {\n\n\t\t\t\te.printStackTrace();\n\n\t\t\t}\n\n\t\t\t// long end_time = System.currentTimeMillis();\n\n\t\t\t// long difference = end_time-start_time;\n\t\t\t// System.out.println(\"Complete in \"+difference+\" ms.\");\n\t\t}", "private Callable<Boolean> isReachable() {\n return () -> {\n try {\n if (!isOnline()) {\n return false;\n }\n\n URL url = new URL(\"https://api.vk.com\"); //url for ex.\n HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();\n httpURLConnection.setConnectTimeout(2000);\n httpURLConnection.connect();\n\n return true;\n } catch (Exception e) {\n return false;\n }\n };\n }", "@Override\n public void run() {\n try {\n //获取可用性结果\n boolean result = ResponseUtil.getResponseCode(createHttpUrl())!= 404;\n //可用性记录\n recordEnum(application,result);\n } catch (Throwable t){\n logger.error(\"[扫描URL出错] there is an error occurred on Scanning URL or recordEnum...\");\n }\n\n }", "public void startThread(){\n String message = \"Connecting to RescueNet...Please Wait\";\n showProgressDialog(message);\n connectionThread = new ConnectionThread(mwifiAdmin, handlerMain);\n connectionThread.start();\n }", "public void listenNetwork()\n {\n final int[] num = {0};\n final Timer timers = new Timer();\n timers.schedule(new TimerTask(){\n @Override\n public void run() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n final Toast toast = Toast.makeText(getApplicationContext(), ++num[0] +\"\",Toast.LENGTH_SHORT );\n //toast.show();\n if(isNetworkAvailable())\n {\n btnLogin.setEnabled(true);\n cardError.setVisibility(View.INVISIBLE);\n }\n else\n {\n btnLogin.setEnabled(false);\n cardError.setVisibility(View.VISIBLE);\n }\n }\n });\n }\n },0,5000);\n }", "public void run() { wait for the launcher script to talk to us\n //\n try {\n ssocket.setSoTimeout(30 * 1000); // 30 seconds\n socket = ssocket.accept();\n socket.setSoTimeout(3 * 60 * 1000);\n socket.setTcpNoDelay(true);\n } catch (SocketTimeoutException stmo) {\n String msg = \"timeout error on initial connection from \" + execName();\n task.log(msg, Project.MSG_ERR);\n failure = new BuildException(msg);\n } catch (Exception e) {\n String err = \"error establishing communication with \" + execName();\n String msg = e.getMessage();\n if (msg != null) {\n err = err + \": \" + msg;\n } else {\n err = err + \": \" + e;\n }\n task.log(err, Project.MSG_ERR);\n failure = new BuildException(err);\n }\n }", "netthread(String url,Handler h) {\n this.urlstring = url;\n this.ntthrd_handler = h;//指定activity\n }", "@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tR.string.No_Internet_Connection,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.show();\n\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n\tprotected synchronized void getArticles() throws Exception {\n\t\tif(thread == null || thread.isAlive() == false) {\n\t\t\tWebRunner runner = new WebRunner(mHandler);\n\t\t\tthread = new Thread(runner);\n\t\t\tthread.start();\n\t\t}\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tclient = new AuctioneerWindow();\n\t\t\t\tsure = client.getSure();\n\t\t\t\tip_text = client.getIp_text();\n\t\t\t\tcontent = client.getContent();\n\t\t\t\tsure.addActionListener(new ActionListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t\tIP = ip_text.getText();\n\t\t\t\t\t\tip_text.setEnabled(false);\n\t\t\t\t\t\tsure.setEnabled(false);\n\n\t\t\t\t\t\tcontent.append(\"获取IP成功\");\n\n\t\t\t\t\t\tnew Thread(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tinitBroadCastClient();\n\t\t\t\t\t\t\t\t\tReceivePublicKey();\n\t\t\t\t\t\t\t\t\tReceiveEncryptPrice();\n\t\t\t\t\t\t\t\t\tgenerateEProduct();\n\t\t\t\t\t\t\t\t\tsendEProduct();\n\t\t\t\t\t\t\t\t\tGarbleCircuits();\n\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}).start();\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t}", "@Override\n\t\tpublic void run() {\n\t\t\tURL url;\n\t\t\ttry {\n\t\t\t\tThread.sleep(3000);\n\t\t\t\turl = new URL(strUrl);\n\t\t\t\tURLConnection con = url.openConnection();\n\t\t\t\tcon.connect();\n\t\t\t\tInputStream input = con.getInputStream();\n\t\t\t\tList<Map<String,Object>> temp = json.getListItems(input);\n\t\t\t\tif(temp != null){\n\t\t\t\t\tif(merger.mergeTwoList(list, temp, direction))\n\t\t\t\t\t\tmyHandler.sendEmptyMessage(1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tmyHandler.sendEmptyMessage(5);\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}", "protected HttpUtils.HttpResult doInBackground() {\n\t\tHttpUtils.HttpResult result = null;\n if (context != null && !HttpUtils.isOnline(context)) {\n result = new HttpUtils.HttpResult();\n result.setEnvelope(context.getString(R.string.error_internet_not_connected));\n result.setCode(HttpUtils.HttpResult.BAD_REQUEST);\n result.setMessage(context.getString(R.string.error_connecting_message));\n return result;\n }\n\t\tif (RequestType.POST == requestType) {\n\t\t\tresult = HttpUtils.post(url, envelope, headers);\n\t\t} else if (RequestType.GET == requestType) {\n\t\t\tresult = HttpUtils.get(url, headers);\n\t\t}\n\t\treturn result;\n\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\tR.string.No_Internet_Connection,\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\n\t\t\t\t\t\t\t\t}", "public boolean isInternetReachable() {\n \t\ttry {\n \t\t\t// URL to a source\n \t\t\tURL url = new URL(\"http://www.betfair.com\");\n \t\t\t// Open a connection\n \t\t\tHttpURLConnection urlConnect = (HttpURLConnection) url\n \t\t\t\t\t.openConnection();\n \t\t\t// Retrieving data from the source - if there is no connection,\n \t\t\t// throws and exception\n \t\t\t@SuppressWarnings(\"unused\")\n \t\t\tObject objData = urlConnect.getContent();\n \t\t} catch (Exception e) {\n \t\t\treturn false;\n \t\t}\n \t\treturn true;\n \t}", "@Override \n public void run() {\n\t\tString path = Urls.URL_32;\n\t\t\n\t\tMap<String, String> map = new HashMap<String, String>();\n\t\tmap.put(\"login-name-or-mobile\", username);\n\t\tmap.put(\"pwd\", password);\n\t \tList<BasicNameValuePair> params = HttpUtils.setParams(map);\n\t \t\n\t\tMap<String, String> map2 = new HashMap<String, String>();\n\t \tmap2.put(\"Accept-Encoding\", \"gzip, deflate\");\n\t \tmap2.put(\"Accept\", \"application/json\");\n\n\t \tMap<String,String> info = new HashMap<String,String>();\n\t\tString jsonStr = \"\";\n\t\ttry {\n\t\t\tjsonStr = RequestService.getInstance().getRequest(params, path, map2);\n\t\t\t\n\t\t\tif(jsonStr==null || \"null\".equals(jsonStr) || \"\".equals(jsonStr)){\n\t\t\t\tinfo.put(\"available\", \"0\");\n\t\t\t}else{\n\t\t\t\tHttpUtils.parseJson(jsonStr, info, null);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tMessage msg = new Message(); \n\t msg.what = Constants.NETWORK_ERROR;\n\t handler.sendMessage(msg); \n\t return;\n\t\t}\n\t\t\n Message msg = new Message(); \n msg.obj = info;\n msg.what = Constants.GET_BALANCE_SUCCESS;\n handler.sendMessage(msg); \n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\tR.string.No_Internet_Connection, Toast.LENGTH_SHORT)\n\t\t\t\t\t\t\t.show();\n\t\t\t\t}", "public void hasInternetCallback(LifecycleOwner owner, Context ctx,connectionStatusInterface status){\n NetworkConnection networkConnection = new NetworkConnection(ctx.getApplicationContext());\n networkConnection.observe(owner, status::connectionStatus);\n }", "public void retrieveThread() {\n\t\tRunnable runScrape = () -> {\n\t\t\ttry {\n\t\t\t\tPlatform.runLater(() -> { //enables non-FX application thread to update UI elements\n\t\t\t\t\tsetLoadingTxt(\"Getting data...\");\n\t\t\t\t\tsetErrorTxt(\"\");\n\t\t\t\t});\n\t\t\t\tscraper.retrieve(url.getText());\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tPlatform.runLater(() -> setErrorTxt(\"Error: could not retrieve data\"));\n\t\t\t}\n\t\t\tPlatform.runLater(() -> setLoadingTxt(\"\"));\n\t\t};\n\t\tThread t = new Thread(runScrape);\n\t\tt.start();\n\t}", "public void run() {\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"before job: \" + PingServersEndpoint.status.get( usertoken ) );\r\n\t\tint count = 0;\r\n\t\t\r\n\t\t// grab the ip range\r\n\t\tlong startIp = PingThreadJob.ipToLong( ip_start );\r\n\t\tlong endIp = PingThreadJob.ipToLong( ip_end );\r\n\t\tlong currentIp = startIp;\r\n\t\t\r\n\t\t\r\n\t\twhile( PingServersEndpoint.status.get( usertoken ) && (currentIp <= endIp) ) {\r\n\t\t\tcount++;\r\n\t\t\r\n\t\t\t\r\n\t\t\t// find the range we want to \r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Loop count : \" + count );\r\n\t\t\tSystem.out.println(\"Found check : \" + PingServersEndpoint.status.get( usertoken ));\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tString currentIp_string = PingThreadJob.longToIp( currentIp );\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\tPingJob job = new PingJob();\r\n\r\n\t\t\tLong ping = job.ping( currentIp_string, port );\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t\r\n\t\t\t\tJSONObject resultPayload = new JSONObject();\r\n\t\t\t\t\r\n\t\t\t\tresultPayload.put(\"pingstatus\", \"good\" );\r\n\t\t\t\tresultPayload.put( \"ip\", currentIp_string );\r\n\t\t\t\tresultPayload.put( \"ip_num\", currentIp );\r\n\t\t\t\tresultPayload.put(\"port\", \"port\" );\r\n\t\t\t\t\r\n\t\t\t\tif( ping != null ) {\r\n\t\t\t\t\tresultPayload.put(\"accepting\", true );\r\n\t\t\t\t\tresultPayload.put( \"ping\", ping );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t\r\n\t\t\t\t\tresultPayload.put(\"accepting\", false );\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tsession.getBasicRemote().sendText( resultPayload.toString() );\r\n\t\t\t} catch (IOException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n//\t\t\ttry {\r\n//\t\t\t\tThread.sleep(2000);\r\n//\t\t\t} catch (InterruptedException e) {\r\n//\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\te.printStackTrace();\r\n//\t\t\t} \r\n\t\t\t\r\n\t\t\tcurrentIp++;\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Final count : \" + count );\r\n\t}", "private static void checkStatus() {\n\r\n\t\tDate date = new Date();\r\n\t\tSystem.out.println(\"Checking at :\"+date.toString());\r\n\t\tString response = \"\";\r\n\t\ttry {\r\n\t\t\tresponse = sendGET(GET_URL_COVAXIN);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//System.out.println(response.toString());\r\n\t\tArrayList<Map> res = formatResponse(response);\r\n\r\n\t\tres = checkAvailability(res);\r\n\t\tif(res.size()>0)\r\n\t\t\tnotifyUser(res);\r\n\t\t//System.out.println(emp.toString());\r\n\t}", "@Override\r\n protected Boolean doInBackground(String... args){\r\n\r\n\r\n\r\n ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\r\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\r\n if (netInfo != null && netInfo.isConnected()) {\r\n try {\r\n URL url = new URL(\"http://www.google.com\");//(\"http://www.entreprenia15.com/quiz/select_paid.php\");\r\n HttpURLConnection urlc = (HttpURLConnection) url.openConnection();\r\n urlc.setConnectTimeout(3000);\r\n urlc.connect();\r\n if (urlc.getResponseCode() == 200) {\r\n return true;\r\n }\r\n } catch (MalformedURLException e1) {\r\n // TODO Auto-generated catch block\r\n e1.printStackTrace();\r\n } catch (IOException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n return false;\r\n\r\n }", "@Override\r\n protected Boolean doInBackground(String... args){\r\n\r\n\r\n\r\n ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\r\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\r\n if (netInfo != null && netInfo.isConnected()) {\r\n try {\r\n URL url = new URL(\"http://www.google.com\");//(\"http://www.entreprenia15.com/quiz/select_paid.php\");\r\n HttpURLConnection urlc = (HttpURLConnection) url.openConnection();\r\n urlc.setConnectTimeout(3000);\r\n urlc.connect();\r\n if (urlc.getResponseCode() == 200) {\r\n return true;\r\n }\r\n } catch (MalformedURLException e1) {\r\n // TODO Auto-generated catch block\r\n e1.printStackTrace();\r\n } catch (IOException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n return false;\r\n\r\n }", "@MainThread\n public abstract boolean shouldFetchFromNetwork();", "private void checking() {\n checkProgress = new ProgressDialog(DownloadActivity.this);\n checkProgress.setCancelable(false);\n checkProgress.setMessage(getResources().getString(R.string.checking_message));\n checkProgress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n checkProgress.setIndeterminate(true);\n checkProgress.show();\n new Thread(new Runnable() {\n public void run() {\n while (check == 0) {}\n checkProgress.dismiss();\n }\n }).start();\n }", "public boolean isNetworkReachable();", "@Override\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\t\t\tIP = ip_text.getText();\n\t\t\t\t\t\tip_text.setEnabled(false);\n\t\t\t\t\t\tsure.setEnabled(false);\n\n\t\t\t\t\t\tcontent.append(\"获取IP成功\");\n\n\t\t\t\t\t\tnew Thread(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tinitBroadCastClient();\n\t\t\t\t\t\t\t\t\tReceivePublicKey();\n\t\t\t\t\t\t\t\t\tReceiveEncryptPrice();\n\t\t\t\t\t\t\t\t\tgenerateEProduct();\n\t\t\t\t\t\t\t\t\tsendEProduct();\n\t\t\t\t\t\t\t\t\tGarbleCircuits();\n\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}).start();\n\n\t\t\t\t\t}", "public void run(){\n\n if(!initProxy()){\n //Check if we have been aborted\n if(mode != OK_MODE) return;\n if(net_thread != Thread.currentThread()) return;\n\n mode = COMMAND_MODE;\n warning_label.setText(\"Look up failed.\");\n warning_label.invalidate();\n return;\n }\n\n //System.out.println(\"Done!\");\n while(!warning_dialog.isShowing())\n ; /* do nothing*/;\n\n warning_dialog.dispose();\n //dispose(); //End Dialog\n }", "@Override\n\t\tprotected String doInBackground(String... params) {\n\t\t\tString deviceVersion = Build.VERSION.RELEASE;\n\t\t\tif (deviceVersion.contentEquals(\"4.3\")) {\n//\t\t\t\tLog.d(\"log\", \"Jelly Bean\");\n\t\t\t\tNetworkInfo localNetworkInfo = ((ConnectivityManager) getSystemService(\"connectivity\"))\n\t\t\t\t\t\t.getActiveNetworkInfo();\n\t\t\t\tif ((localNetworkInfo != null) && (localNetworkInfo.isConnectedOrConnecting())) {\n\t\t\t\t\treturn \"true\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n//\t\t\t\tLog.d(\"log\", \"No Jelly Bean\");\n\t\t\t\tString bool = \"false\";\n\t\t\t\ttry {\n\t\t\t\t\tProcess p1 = java.lang.Runtime.getRuntime().exec(\"/system/bin/ping -c 1 www.searchcarpools.com\");\n\t\t\t\t\tint returnVal = p1.waitFor();\n\t\t\t\t\tif (returnVal == 0) {\n\t\t\t\t\t\tbool = \"true\";\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t}\n\t\t\t\t// Log.i(\"log\", \"Network Status after doInBackGround: \" +\n\t\t\t\t// netWorking);\n\t\t\t\treturn bool;\n\t\t\t}\n\t\t\treturn \"false\";\n\t\t}", "@Override\n public void onPermissionGranted() {\n Timer t = new Timer();\n boolean checkConnection = new ApplicationUtility().checkConnection(SplashActivity.this);\n if (checkConnection) {\n t.schedule(new splash(), 3000);\n Toast.makeText(SplashActivity.this,\n \"Internet permission granted\", 3000).show();\n } else {\n Toast.makeText(SplashActivity.this,\n \"connection not found...plz check connection\", 3000).show();\n t.schedule(new splash(), 3000);\n }\n }", "private void doPing()\r\n {\r\n requestQueue.add( new ChargerHTTPConn( weakContext,\r\n CHARGE_NODE_JSON_DATA, \r\n PING_URL,\r\n SN_HOST,\r\n null, \r\n cookieData,\r\n false,\r\n token,\r\n secret ) );\r\n }", "public boolean hasActiveInternetConnection()\n {\n Runtime runtime = Runtime.getRuntime();\n try {\n Process ipProcess = runtime.exec(\"/system/bin/ping -c 1 8.8.8.8\");\n int exitValue = ipProcess.waitFor();\n return (exitValue == 0);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return false;\n }", "public void startCheckConnection(OperatorContext context) {\r\n\t\tcheckConnectionThread = context.getThreadFactory().newThread(new Runnable() {\r\n\t\t\t\r\n\t\t@Override\r\n\t\tpublic void run() {\r\n\t\t\tint i = 0;\r\n\t\t\twhile(true)\r\n\t\t\t{\r\n\t\t\t\t// check the JDBC connection every 5 seconds \r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\t Thread.sleep(5000);\r\n System.out.println(\"checkConnection \" + i++);\r\n\t\t\t\t} \r\n\t\t\t\tcatch(InterruptedException ex) \r\n\t\t\t\t{\r\n\t\t\t\t Thread.currentThread().interrupt();\r\n\t\t\t\t}\r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\tif (!jdbcClientHelper.isValidConnection()) {\t\r\n System.out.println(\"JDBC connection is invalid \");\t\t\t\t\t\r\n\t\t\t\t\ttry \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// f connection files it tries to reset JDBC connection\r\n\t\t\t\t\t\t// it is depending to the reconnection policy parameters\r\n\t\t\t\t\t\tresetJDBCConnection();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception e2) {\r\n\t\t\t\t\t\tif (!jdbcClientHelper.isValidConnection() && hasErrorPort){\r\n\t\t try \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t// if connection files it sends a sqlcode = -1 to the error output port\r\n\t\t JDBCSqlStatus jSqlStatus = new JDBCSqlStatus();\r\n\t\t jSqlStatus.sqlCode = -1;\r\n\t\t jSqlStatus.sqlMessage = \"Invalid Connection\";\r\n\t\t\t\t\t\t\t\t// submit error message\r\n\t\t\t\t\t\t\t\tsubmitErrorTuple(errorOutputPort, null, jSqlStatus);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcatch (Exception e1) {\r\n\t\t\t\t\t\t\t\te1.printStackTrace();\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t \r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (SQLException e3) {\r\n\t\t\t\t}\t\r\n\t\t\t} // end while\r\n\t\t} // end of run()\r\n\t\t\r\n\t\t}); \r\n\t\t\r\n\t\t// start checkConnectionThread\r\n\t\tcheckConnectionThread.start();\r\n\t}", "public void run() {\n\t\tthis.checkConnectedList();\n\t}", "@Override\r\n protected Result check() throws Exception {\n try {\r\n Response response = webTarget.request().get();\r\n\r\n if (!response.getStatusInfo().getFamily().equals(Response.Status.Family.SUCCESSFUL)) {\r\n\r\n return Result.unhealthy(\"Received status: \" + response.getStatus());\r\n }\r\n\r\n return Result.healthy();\r\n } catch (Exception e) {\r\n\r\n return Result.unhealthy(e.getMessage());\r\n }\r\n }", "@Override\r\n\tpublic void run() {\n\t\t\r\n\t\ttest testt = new test();\r\n\t\ttestt.oninIt();\r\n\t\ttry {\r\n\t\t\ttestt.pingServer();\r\n\t\t} catch (DeploymentException | IOException | URISyntaxException | InterruptedException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tcheck();\n\t\t}", "@Override\r\n\t public void run() {\n\t\tsuper.run();\r\n\t\ttry {\r\n\t\t // String newParams=URLEncoder.encode(params, \"utf-8\");\r\n\t\t String newurl = url + \"?\" + params;\r\n\r\n\t\t URL uri = new URL(newurl);\r\n\t\t try {\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection) uri\r\n\t\t\t\t.openConnection();\r\n\t\t\tconn.connect();\r\n\t\t\t// 获取返回结果\r\n\t\t\tif (conn.getResponseCode() == 200) {\r\n\t\t\t InputStream is = conn.getInputStream();\r\n\t\t\t String result = convertInputStreamToString(is);\r\n\t\t\t // 通过handle发送消息\r\n\t\t\t Message msg = new Message();\r\n\t\t\t msg.what = 2;\r\n\t\t\t msg.obj = result;\r\n\t\t\t handle.sendMessage(msg);\r\n\t\t\t}\r\n\t\t } catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t }\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t // TODO Auto-generated catch block\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t }", "public void check () {\n // declaring local variables\n WebElement webElement;\n\n if (isStubbed()) {\n log(\"=== This checkbox's locator is currently stubbed out. ===\");\n } else {\n // getting the web element of the check box with the default timeout\n // and then check its status\n\n int MAXRETRIES = 3;\n int tries = 1;\n while (!this.isChecked() && tries <= MAXRETRIES) {\n // need to give a second for the browser to catch up with the web driver\n //sleep(1, TimeUnit.SECONDS);\n\n // Directly get the web element since we know that it exists and is displayed\n webElement = getWebElement ();\n this.clickWebElement (webElement);\n\n\n\n\n tries++;\n if (this.isChecked() == false)\n {\n sleep(1, TimeUnit.SECONDS);\n }\n }\n }\n }", "public static void test(URL url, boolean readFromServer) throws Exception {\n TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {\n @Override\n public java.security.cert.X509Certificate[] getAcceptedIssuers() {\n return null;\n }\n @Override\n public void checkClientTrusted(X509Certificate[] certs, String authType) {\n }\n @Override\n public void checkServerTrusted(X509Certificate[] certs, String authType) {\n }\n } };\n // Install the all-trusting trust manager\n final SSLContext sc = SSLContext.getInstance(\"TLS\");\n sc.init(null, trustAllCerts, new java.security.SecureRandom());\n HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());\n // Create all-trusting host name verifier\n HostnameVerifier allHostsValid = (hostname, session) -> true;\n\n // Install the all-trusting host verifier\n HttpsURLConnection.setDefaultHostnameVerifier(allHostsValid);\n\n //URL url = new URL(\"https://www.google.com\");\n URLConnection con = url.openConnection();\n System.out.println(\"Connection background: \"+con.getClass().getName()+\" \"+url.getHost());\n\n if (readFromServer) {\n final Reader reader = new InputStreamReader(con.getInputStream());\n final BufferedReader br = new BufferedReader(reader);\n String line = \"\";\n while ((line = br.readLine()) != null) {\n System.out.println(line);\n }\n br.close();\n } /**/\n }", "@Override\r\n\t\tpublic void run() {\n\t\t\tString httpresponse = new String();\r\n\t\t\t// for (int i = 0; i < 10; i++) {\r\n\t\t\thttpresponse = HTTPGetInfo();\r\n\t\t\ttry {\r\n\t\t\t\tJSONparser(httpresponse);\r\n\t\t\t} catch (JSONException e) {\r\n\t\t\t\t// TODO 自动生成的 catch 块\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}", "@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\t\t\t\tProxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(\n\t\t\t\t\t\t\"proxy.iiit.ac.in\", 8080));\n\t\t\t\tURL url = new URL(url1);\n\t\t\t\tHttpURLConnection connection = (HttpURLConnection) url\n\t\t\t\t\t\t.openConnection(proxy);\n\t\t\t\tconnection.setRequestMethod(\"POST\");\n\t\t\t\t// connection.setRequestProperty(\"Content-Type\",\n\t\t\t\t// \"application/x-www-form-urlencoded\");\n\n\t\t\t\tconnection.setRequestProperty(\"Content-Length\",\n\t\t\t\t\t\t\"\" + Integer.toString(parameters.getBytes().length));\n\t\t\t\tconnection.setRequestProperty(\"Content-Language\", \"en-US\");\n\n\t\t\t\tconnection.setUseCaches(false);\n\t\t\t\tconnection.setDoInput(true);\n\t\t\t\tconnection.setDoOutput(true);\n\n\t\t\t\t// Send request\n\t\t\t\tDataOutputStream wr = new DataOutputStream(\n\t\t\t\t\t\tconnection.getOutputStream());\n\t\t\t\twr.writeBytes(parameters);\n\t\t\t\twr.flush();\n\t\t\t\twr.close();\n\n\t\t\t\t// Get Response\n\t\t\t\tInputStream is = connection.getInputStream();\n\t\t\t\tBufferedReader rd = new BufferedReader(\n\t\t\t\t\t\tnew InputStreamReader(is));\n\t\t\t\tString line;\n\t\t\t\tStringBuffer response = new StringBuffer();\n\t\t\t\twhile ((line = rd.readLine()) != null) {\n\t\t\t\t\tresponse.append(line);\n\t\t\t\t\tresponse.append('\\r');\n\t\t\t\t}\n\t\t\t\trd.close();\n\t\t\t\t// return response.toString();\n\t\t\t\tlong tID = Thread.currentThread().getId();\n\t\t\t\tlong time = ManagementFactory.getThreadMXBean()\n\t\t\t\t\t\t.getThreadCpuTime(tID);\n\t\t\t\tSystem.out.println(\"My thread \" + tID + \" execution time: \"\n\t\t\t\t\t\t+ time + \" ns.\");\n\t\t\t\tsumTimes=sumTimes+time;\n\t\t\t\tconnection.disconnect();\n\t\t\t} catch (Exception e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t\t// return null;\n\n\t\t\t} finally {\n\n\t\t\t}\n\t\t}", "public void getNXVersionFromURL (){\n new Thread(new Runnable() {\n public void run() {\n try {\n\n //Getting page title from URL using Jsoup.\n Document document = Jsoup.connect(nxURL).followRedirects(false).timeout(60000).get();\n pageTitle = document.title();\n\n } catch (Exception e) { Log.d(\"MyTag\", e.toString()); }\n\n //On finish\n runOnUiThread(new Runnable() {\n public void run() {\n InternetCheck.deleteCache(getApplicationContext()); ///Deleting cache on to avoid bugs.\n srl.setRefreshing(false); //Stop Refreshing animation.\n latestKernel = pageTitle.substring(24, 26); //Shorting page title to the latest version.\n lkernel = Integer.parseInt(latestKernel);\n latestVersion.setText(\"R\" + latestKernel);\n nxColor(); //Colorizing the kernel text.\n }\n });\n\n }\n }).start();\n }", "private boolean checkInternetPermission() {\n if (ActivityCompat.checkSelfPermission(mLayout.getContext().getApplicationContext(), Manifest.permission.INTERNET)\n == PackageManager.PERMISSION_GRANTED) {\n return true;\n\n } else {\n\n return false;\n }\n }", "public abstract void executeOnNetwork(@NonNull Runnable runnable);", "private boolean checkConnection() {\n return InternetConnectivityReceiver.isConnected();\n }", "protected synchronized boolean checkConnectivity() {\n return this.connect();\n }", "@Override\r\n public void run() \r\n {\r\n //Log.d(TAG ,\"==========>Task Run In!\");\r\n checkConnectState(); \r\n }", "public void run()\r\n {\n\ttopLevelSearch=FIND_TOP_LEVEL_PAGES;\r\n\ttopLevelPages=new Vector();\r\n\tnextLevelPages=new Vector();\r\n \r\n\t// Check to see if a proxy is being used. If so then we use IP Address rather than host name.\r\n\tproxyDetected=detectProxyServer();\r\n\t \r\n\tstartSearch();\r\n \r\n\tapp.enableButtons();\r\n\tapp.abort.disable();\r\n \r\n\tif(hitsFound == 0 && pageOpened == true)\r\n\t app.statusArea.setText(\"No Matches Found\");\r\n else if(hitsFound==1)\r\n\t app.statusArea.setText(hitsFound+\" Match Found\");\r\n else app.statusArea.setText(hitsFound+\" Matches Found\");\r\n }", "private static boolean testNotFound() {\r\n\t\t// use ExecutorService to manage threads\r\n\t\tExecutorService executor = Executors.newFixedThreadPool(1);\r\n\t\t\r\n\t\tlogger.finest(\"sending request\");\r\n\t\tURL url = urlList.get(0);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tURL notFoundURL = new URL(url.getProtocol(), url.getHost(), url.getPort(), url.getFile() + \"random\");\r\n\t\t\tHttpClient client = new HttpClient(notFoundURL);\r\n\t\t\texecutor.execute(client);\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\tlogger.severe(\"problem formatting URL\");\r\n\t\t}\r\n\t\t\r\n\t\t// wait for test to finish\r\n\t\tlogger.finest(\"waiting for request to complete...\");\r\n\t\texecutor.shutdown(); \r\n\t\twhile (!executor.isTerminated())\r\n\t\t\tThread.yield(); // return the control to system\r\n\t\tlogger.finest(\"not found request completed\");\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public void runActivity(Body body) {\n this.peers = StartP2PService.checkingPeersUrl(this.peers);\n // First coontact\n connectingPeer();\n while (body.isAlive()) {\n if (this.peers.size() != 0) {\n if (this.acqGroup.size() == 0) {\n // We have some url and we know nobody\n connectingPeer();\n }\n try {\n Thread.sleep(Long.parseLong(System.getProperty(PROPERTY_TTU)));\n } catch (Exception e) {\n }\n }\n }\n }", "@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t\tSharedPreferences sharedPreferences = getSharedPreferences(\"LOGIN\", 0);\n\t\t\tid = sharedPreferences.getString(\"id\", \"\");\n\t\t\tString path = null;\n\t\t\tif(loc_flag.equals(\"1\")){\n\t\t\t\t path = \"http://2naive.cn/\";\n\t\t\t}\n\t\t\tif(loc_flag.equals(\"2\")){\n\t\t\t\tpath = App.address + \"CUpdateLoc.php?id=\"+id+\"&setLong=\"+long_t+\"&setLat=\"+lat_t;\n\t\t\t}\n\t\t\tfinal Editor editor = sharedPreferences.edit();\n\t\t\tHttpUtils http = new HttpUtils(3000);//10s超时\n\t\t\thttp.configCurrentHttpCacheExpiry(300); // 设置缓存5秒,5秒内直接返回上次成功请求的结果。\n\t\t\twhile (flag) {\n\t\t\t\t http.send(HttpMethod.GET, path,new RequestCallBack<String>() {\n\t\t\t\t @Override \n\t\t\t\t public void onFailure(HttpException arg0, String arg1) { \n\t\t\t\t //联网失败\n\t\t\t\t\t // Toast.makeText(getBaseContext(), \"\"+lon+\"---\"+lat, Toast.LENGTH_LONG).show();\n\t\t\t\t\t editor.putString(\"conn\", \"0\");\n\t\t\t\t }\t \n\t\t\t\t @Override \n\t\t\t\t public void onSuccess(ResponseInfo<String> arg0) { \n\t\t\t\t\t //联网成功\n\t\t\t\t\t editor.putString(\"conn\", \"1\");\n\t\t\t\t }\n\t\t\t\t});\n\t\t\t\teditor.commit();\n\t\t\t\tMessage message = new Message();\n\t\t\t\tmessage.what = 2;\n\t\t\t\tupdateUI.sendMessage(message);\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(3*1000); //暂定延时3s\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tThread.interrupted();\n\t\t}", "private boolean checkInternetConnection() {\n\n ConnectivityManager connectivityManager = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();\n\n return (networkInfo != null && networkInfo.isConnected());\n\n }", "public void run() {\n //we are now inside our own thread separated from the gui.\n ServerSocket serversocket = null;\n //Pay attention, this is where things starts to cook!\n try {\n //print/send message to the guiwindow\n s(\"Trying to bind to localhost on port \" + Integer.toString(port) + \"...\");\n //make a ServerSocket and bind it to given port,\n serversocket = new ServerSocket(port);\n } catch (Exception e) { //catch any errors and print errors to gui\n s(\"\\nFatal Error:\" + e.getMessage());\n return;\n }\n\n //go in a infinite loop, wait for connections, process request, send response\n while (true) {\n s(\"\\nReady, Waiting for requests...\\n\");\n try {\n //this call waits/blocks until someone connects to the port we\n //are listening to\n Socket connectionsocket = serversocket.accept();\n //figure out what ipaddress the client commes from, just for show!\n InetAddress client = connectionsocket.getInetAddress();\n //and print it to gui\n s(client.getHostName() + \" connected to server.\\n\");\n //Read the http request from the client from the socket interface\n //into a buffer.\n BufferedReader input =\n new BufferedReader(new InputStreamReader(connectionsocket.getInputStream()));\n //Prepare a outputstream from us to the client,\n //this will be used sending back our response\n //(header + requested file) to the client.\n DataOutputStream output =\n new DataOutputStream(connectionsocket.getOutputStream());\n\n //as the name suggest this method handles the http request, see further down.\n //abstraction rules\n http_handler(input, output);\n } catch (Exception e) { //catch any errors, and print them\n s(\"\\nError:\" + e.getMessage());\n }\n\n } //go back in loop, wait for next request\n }", "@Override\n protected String doInBackground(String... params) {\n if (Utilities.isNetworkAvailable(getContext())) {\n\n // Call the method of StartAppRequests class to process App Startup Requests\n startAppRequests.RequestBanners();\n startAppRequests.RequestAllCategories(startAppRequests.page_number);\n\n return \"1\";\n } else {\n\n return \"0\";\n }\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tif(desktop == null) return ;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tdesktop.browse(uri);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}", "private void loadPage() {\n \t\n if (((sPref.equals(ANY)) && (wifiConnected || mobileConnected))\n || ((sPref.equals(WIFI)) && (wifiConnected))) {\n // AsyncTask subclass\n \t\n new DownloadXmlTask().execute(URL);\n } else {\n showErrorPage();\n }\n }", "public void run() {\n \t\t\r\n\t\t\tarraylist_destination.clear();\r\n\t\t\tarraylist_driverid.clear();\r\n\t\t\tarraylist_riderid.clear();\r\n\t\t\tarraylist_drivername.clear();\r\n\t\t\tarraylist_pickuptime.clear();\r\n\t\t\tarraylist_tripid.clear();\r\n\t\t\tarraylist_driver_image.clear();\r\n\t\t\tarraylist_rider_image.clear();\r\n\t\t\tarraylist_distance.clear();\r\n\t\t\tarraylist_requesttype.clear();\r\n\t\t\tarraylist_start.clear();\r\n\t\t\tarraylist_actualfare.clear();\r\n\t\t\tarraylist_suggestion.clear();\r\n\t\t\tarraylist_eta.clear();\r\n\t\t\tarraylist_driverrating.clear();\r\n\t\t\tarraylist_status.clear();\r\n\t\t\tarraylist_vehicle_color.clear();\r\n\t\t\tarraylist_vehicle_type.clear();\r\n\t\t\tarraylist_vehicle_name.clear();\r\n\t\t\tarraylist_vehicle_img.clear();\r\n\t\t\tarraylist_vehicle_year.clear();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(Utility.isConnectingToInternet(RiderQueue_Activity.this))\r\n \t \t{\r\n \t\t\t\t/**call pending request for rider queue class**/\r\n\t\t\t\tnew httpPendingRequest_riderqueue().execute(); \r\n \t \t\t}\r\n \t \telse{\r\n \t \t\tUtility.alertMessage(RiderQueue_Activity.this,\"error in internet connection\");\r\n \t \t}\r\n\t\t \r\n }", "public static boolean isConnectedToInternet() {\n String pingServerURL = pingBackUrl.substring(0, pingBackUrl.indexOf(\"/\", \"http://url\".length()));\n try {\n URL url = new URL(pingServerURL);\n HttpURLConnection urlConn = (HttpURLConnection) url.openConnection();\n urlConn.connect();\n return (HttpURLConnection.HTTP_NOT_FOUND != urlConn.getResponseCode());\n } catch (MalformedURLException e) {\n LOG.error(\"LeadCapture : Error creating HTTP connection to the server : \" + pingServerURL);\n \n } catch (IOException e) {\n LOG.error(\"LeadCapture : Error creating HTTP connection to the server : \" + pingServerURL);\n }\n return false;\n }", "@Override\r\n public void run() {\n JSONObject res = LoginAction.login_test(iptext);\r\n try {\r\n if (res != null) {\r\n Message message = new Message();\r\n message.obj = \"连接成功\";\r\n message.what = 1;\r\n loginHandler.sendMessage(message);\r\n // builder.dismiss();\r\n } else {\r\n Message message = new Message();\r\n message.obj = \"连接失败\";\r\n message.what = 1;\r\n loginHandler.sendMessage(message);\r\n }\r\n } catch (Exception e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }", "public void run() {\n\t\tHtmlPage page = null;\n\t\tHtmlSelect select = null;\n\t\tHtmlOption option = null;\n\t\tDataStreamWriter connection = null;\n\t\tWebClient client = new WebClient(BrowserVersion.FIREFOX_3);\n\t\t/* eseguo i job assegnati al thread in esecuzione */\n\t\tfor(int j = 0; j < this.jobs.length; j++) {\n\t\t\tint currentJob = this.jobs[j];\n\t\t\ttry {\n\t\t\t\t/* faccio dei tentativi per collegarmi alle pagine */\n\t\t\t\tpage = getPage(client, this.getDataSourceURL());\n\t\t\t\t/* seleziono l'opzione relativa alla regione assegnata al task */\n\t\t\t\tselect = (HtmlSelect) page.getByXPath(\"//select\").get(0);\n\t\t\t\toption = select.getOption(currentJob);\n\t\t\t\toption.setSelected(true);\n\t\t\t\tString regione = option.asText();\n\t\t\t\t/* seleziono l'opzione ed ottengo la pagina aggiornata */\n\t\t\t\tpage = (HtmlPage) select.fireEvent(Event.TYPE_CHANGE).getNewPage();\n\t\t\t\t\n\t\t\t\t/* estraggo i dati e li salvo nello \"storage\" */\n\t\t\t\tconnection = this.storageFacade.getDataStreamWriter();\n\t\t\t\tconnection.openStreamWriter();\n\t\t\t\tthis.extractData(client, connection, page, regione);\n\t\t\t}\n\t\t\tcatch (HTMLCrawlerException e) {\n\t\t\t\tSystem.err.println(\"@ HTMLCrawlerException : Extracting Data Error\");\n\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\t//client.closeAllWindows();\n\t\t\t\tif (connection != null)\n\t\t\t\t\tconnection.closeStreamWriter();\n\t\t\t}\n\t\t}\n\t\tclient.closeAllWindows();\n\t}", "@Override\n\tpublic void run() {\n\t\t\t\t\n\t\tString codigo = null;\n\t\ttry {\n\t\t\tcodigo = page.get();\n\t\t} catch (InterruptedException e) {\n\t\t\t//e.printStackTrace();\n\t\t} catch (ExecutionException e) {\n\t\t\t//e.printStackTrace();\n\t\t}\n\t\t\n\t\tif(codigo != null)\n\t\t{\n\t\t\ttrabalharCodigo(codigo);\t\t\t\n\t\t\t\t\n\t\t\tadapter = new NoticiaAdapter(getApplicationContext(),noticias);\t\t\t\t\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\tmsg = new Message();\n\t\tmsg.arg1 = 1;\n\t\thandler.sendMessage(msg);\n\t\t\n\t}", "private void startSendHttpRequestThread(final String word)\n {\n\n Thread sendHttpRequestThread = new Thread()\n {\n @Override\n public void run() {\n // using Panel 7.2.21 as a model- The Movie API\n\n //make empty URL and connection\n URL url;\n HttpURLConnection ur1Connection = null; //HttpsURLConnection aiso avaitab1e\n try {\n\n //String service = reqUrl; // call rhymebrain\n String service = \"https://rhymebrain.com/talk?\"; // call rhymebrain\n //String parm = \"getRhymes&word=\" + word;\n //String queryString = URLEncoder.encode(parm, \"UTF-8\");\n String queryString = \"getRhymes&word=\" + word + \"&maxResults=\" + String.valueOf(MAX_RESULTS);\n //try to process url and connect to it\n url = new URL( service + \"function=\" + queryString);\n Log.d(\"which URL: \", String.valueOf(url));\n ur1Connection = (HttpURLConnection)url.openConnection();\n ur1Connection.setRequestMethod(\"GET\");\n\n // Set connection timeout and read timeout value.\n ur1Connection.setConnectTimeout(70000);\n ur1Connection.setReadTimeout(70000);\n\n //create an input stream and stream reader from the connection\n InputStream inputStream = ur1Connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n\n //get some data from the stream\n int data = inputStreamReader.read();\n //string for collecting all output\n output = \"\";\n //if the stream is not empty\n while(data != -1) {\n //turn what we read into a char and print it\n char current = (char) data;\n output += current;\n data = inputStreamReader.read();\n\n //Log.d(\"Network\", output);\n }\n Log.d(\"Network\", output);\n parseJSON(output);\n int i =0;\n }catch (Exception e) {\n Log.d( \"Network\", e.toString());\n }finally {\n if (ur1Connection != null) {\n ur1Connection.disconnect();\n ur1Connection = null;\n }\n }\n }\n\n };\n // Start the child thread to request web page.\n sendHttpRequestThread.start();\n }", "@Override\r\n\tpublic void initialize(URL arg0, ResourceBundle arg1) {\r\n\t\ttheController = Controller.getInstance();\r\n\r\n\t\t/*\r\n\t\t * Checks for internet after a certain interval and modifies UI accordingly\r\n\t\t */\r\n\t\ttimer = new Timer();\r\n\t\ttimer.schedule(new TimerTask() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tPlatform.runLater(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tInternetAvailibility ia = new InternetAvailibility();\r\n\t\t\t\t\t\tThread t1 = new Thread(ia);\r\n\t\t\t\t\t\tt1.start();\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tboolean flag = ia.get();\r\n\t\t\t\t\t\t\tif(!flag){\r\n\t\t\t\t\t\t\t\tlbInternetAvailabilityMain.setTextFill(Color.RED);\r\n\t\t\t\t\t\t\t\tlbInternetAvailabilityMain.setText(\"Not Available\");\r\n\t\t\t\t\t\t\t\tactionItemsScreen.setDisable(true);\r\n\t\t\t\t\t\t\t\tmemberScreen.setDisable(true);\r\n\t\t\t\t\t\t\t\tteamScreen.setDisable(true);\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tif(loginSuccess)\r\n\t\t\t\t\t\t\t\t\t\thandleConsoleButton();\r\n\t\t\t\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else{\r\n\t\t\t\t\t\t\t\tlbInternetAvailabilityMain.setTextFill(Color.GREEN);\r\n\t\t\t\t\t\t\t\tlbInternetAvailabilityMain.setText(\"Available\");\r\n\t\t\t\t\t\t\t\tif(loginSuccess){\r\n\t\t\t\t\t\t\t\t\tactionItemsScreen.setDisable(false);\r\n\t\t\t\t\t\t\t\t\tif(userCred.equals(\"manager\")){\r\n\t\t\t\t\t\t\t\t\t\tmemberScreen.setDisable(false);\r\n\t\t\t\t\t\t\t\t\t\tteamScreen.setDisable(false);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\t\t\tmemberScreen.setDisable(true);\r\n\t\t\t\t\t\t\t\t\t\tteamScreen.setDisable(true);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tDataSync ds = new DataSync();\r\n\t\t\t\t\t\t\t\tThread t2 = new Thread(ds);\r\n\t\t\t\t\t\t\t\tt2.start();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t} catch (ExecutionException e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}, 0*1000, interval*1000);\r\n\t}", "public IgniteThread checkpointerThread() {\n return checkpointerThread;\n }", "@Override\r\n\tpublic void run() {\n\t\tsuper.run();\r\n\t\ttry {\r\n\r\n\t\t\tBufferedReader in = null;\r\n\t\t\tPrintWriter out = null;\r\n\t\t\tString result = \"\";\r\n\t\t\twhile (isStart) {\r\n\t\t\t\tsocket = new Socket();\r\n\t\t\t\tsocket.connect(\r\n\t\t\t\t\t\tnew InetSocketAddress(MyApplication.share.getIp(), PORT),\r\n\t\t\t\t\t\t5 * 1000);\r\n\t\t\t\twhile (!socket.isClosed()) {\r\n\t\t\t\t\tin = new BufferedReader(new InputStreamReader(\r\n\t\t\t\t\t\t\tsocket.getInputStream()));\r\n\t\t\t\t\tout = new PrintWriter(socket.getOutputStream());\r\n\r\n\t\t\t\t\tout.println(\"getNotification\");\r\n\t\t\t\t\tout.flush();\r\n\r\n\t\t\t\t\tresult = in.readLine();\r\n\t\t\t\t\tif (!TextUtils.isEmpty(result)) {\r\n\t\t\t\t\t\taccessResult(new String(Base64.decode(\r\n\t\t\t\t\t\t\t\tresult.getBytes(), Base64.DEFAULT)));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tLog.w(TAG, \"Socket ���ؽ��Ϊ null...\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tsleep(3 * 1000);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tsocket.close();\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void run() {\n //Request the HTML\n try {\n HttpClient Client = new DefaultHttpClient();\n //String URL = \"http://10.0.2.2:8888/url\";\n String URL = \"http://\" + ipAddress + \":8888/hello\";\n String responseJsonString = \"\";\n\n // Create Request to server and get response\n HttpGet httpget = new HttpGet(URL);\n ResponseHandler<String> responseHandler = new BasicResponseHandler();\n responseJsonString = Client.execute(httpget, responseHandler);\n\n JSONObject responseJSON = new JSONObject(responseJsonString);\n // Show response on activity\n speakOut(responseJSON.getString(\"speechText\"));\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n }\n }", "private void checkAccount() {\n Runnable load = new Runnable() {\n public void run() {\n try {\n// mPerson = mProvider.getPerson(mLogin.getUserGuid(), false);\n } catch (Exception ex) {\n ex.printStackTrace();\n } finally {\n mActivity.runOnUiThread(checkAccountRunnable);\n }\n }\n };\n\n Thread thread = new Thread(null, load, \"checkAccount\");\n thread.start();\n }", "public static void setCallback(final WaitForInternetCallback callback) { \n\t\tfinal ConnectivityManager connMan = (ConnectivityManager) callback.mActivity.getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\tfinal AtomicBoolean isConnected = new AtomicBoolean(connMan.getActiveNetworkInfo() != null && connMan.getActiveNetworkInfo().isConnected());\n\t\tif (isConnected.get()) {\n\t\t\tcallback.onConnectionSuccess();\n\t\t\treturn;\n\t\t}\n\t \n\t\tfinal AtomicBoolean isRetrying = new AtomicBoolean(true);\n\n\t\t/* dialog */\n\t\tfinal AlertDialog.Builder connDialog = new AlertDialog.Builder(callback.mActivity);\n\t\tconnDialog.setTitle(R.string.dialogWaitForInternetTitle);\n\t\tconnDialog.setMessage(R.string.dialogWaitForInternetMessage);\n\t\tconnDialog.setPositiveButton(R.string.dialogWaitForInternetBtnRetry, new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialogInterface, int i) {\n\t\t\t\tsynchronized (isRetrying) {\n\t\t\t\t\tisRetrying.notify();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tconnDialog.setNegativeButton(R.string.dialogWaitForInternetBtnAbort, new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialogInterface, int i) {\n\t\t\t\tsynchronized (isRetrying) {\n\t\t\t\t\tisRetrying.set(false);\n\t\t\t\t\tisRetrying.notify();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tnew Thread() {\n\t\t\tpublic void run() {\n\t\t\t\twhile (!isConnected.get() && isRetrying.get()) {\n\t\t\t\t\tcallback.mActivity.runOnUiThread(new Thread() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tconnDialog.show();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tsynchronized (isRetrying) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tisRetrying.wait();\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t//Log.w(\"WaitForInternet\", \"Error waiting for retry lock\", e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tisConnected.set( (connMan.getActiveNetworkInfo() != null && connMan.getActiveNetworkInfo().isConnected()) );\n\t\t\t\t}\n\t\t\t\tif (isConnected.get()) {\n\t\t\t\t\tcallback.onConnectionSuccess();\n\t\t\t\t} else {\n\t\t\t\t\tcallback.onConnectionFailure();\n\t\t\t\t}\n\t\t\t}\n\t\t}.start();\n\t}", "private void promptInternetConnect() {\n android.support.v7.app.AlertDialog.Builder builder = new android.support.v7.app.AlertDialog.Builder(AdminHomePage.this);\n builder.setTitle(R.string.title_alert_no_intenet);\n builder.setMessage(R.string.msg_alert_no_internet);\n String positiveText = getString(R.string.btn_label_refresh);\n builder.setPositiveButton(positiveText,\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n //Block the Application Execution until user grants the permissions\n if (startStep2(dialog)) {\n //Now make sure about location permission.\n if (checkPermissions()) {\n //Step 2: Start the Location Monitor Service\n //Everything is there to start the service.\n startStep3();\n } else if (!checkPermissions()) {\n requestPermissions();\n }\n }\n }\n });\n android.support.v7.app.AlertDialog dialog = builder.create();\n dialog.show();\n }", "public void run() {\n if(isOnline){\n if(!webView.getUrl().contains(MainActivity.url)){\n webView.loadUrl(url);\n// webView.addJavascriptInterface(new WebAppInterface(context), \"Android\");\n\n }\n }else {\n webView.loadUrl(\"file:///android_asset/noConnection.html\");\n\n }\n }", "public void run() {\n\t\t\t\tHttpURLConnection connection = null;\r\n\r\n\t\t\t\tPrintWriter printWriter = null;\r\n\t\t\t\tBufferedReader bufferedReader = null;\r\n\r\n\t\t\t\tStringBuffer response = new StringBuffer();\r\n\t\t\t\tStringBuffer request = new StringBuffer();\r\n\r\n\t\t\t\t// 组织请求参数\r\n\t\t\t\tif (null != params && !params.isEmpty()){\r\n\t\t\t\t\tfor (Map.Entry<String, String> entry : params.entrySet()){\r\n\t\t\t\t\t\trequest.append(entry.getKey()).append(\"=\").append(entry.getValue()).append(\"&\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//< 删除多余的&\r\n\t\t\t\t\trequest.deleteCharAt(request.length() - 1);\r\n\t\t\t\t}\r\n\t\t\t\tLog.d(\"HttpUtil\", request.toString());\r\n\r\n\t\t\t\ttry{\r\n\t\t\t\t\tURL url = new URL(address);\r\n\t\t\t\t\tconnection = (HttpURLConnection) url.openConnection();\r\n\t\t\t\t\tconnection.setRequestMethod(\"POST\");\r\n\t\t\t\t\tconnection.setRequestProperty(\"Content-Length\", String.valueOf(request.length()));\r\n\t\t\t\t\tconnection.setDoInput(true);\r\n\t\t\t\t\tconnection.setDoOutput(true);\r\n\t\t\t\t\tprintWriter = new PrintWriter(connection.getOutputStream());\r\n\t\t\t\t\tprintWriter.write(request.toString());\r\n\t\t\t\t\tprintWriter.flush();\r\n\r\n\t\t\t\t\tint responseCode = connection.getResponseCode();\r\n\t\t\t\t\tif(responseCode != 200){\r\n\t\t\t\t\t\tLog.d(\"HttpUtil\", \"Post Fail\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tLog.d(\"HttpUtil\", \"Post Success\");\r\n\t\t\t\t\t\tbufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream()));\r\n\t\t\t\t\t\tString line;\r\n\t\t\t\t\t\twhile ((line = bufferedReader.readLine()) != null) {\r\n\t\t\t\t\t\t\tresponse.append(line);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(listener != null){\r\n\t\t\t\t\t\tlistener.onFinish(response.toString());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tif(listener != null){\r\n\t\t\t\t\t\tlistener.onError(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}finally{\r\n\t\t\t\t\tif(connection != null){\r\n\t\t\t\t\t\tconnection.disconnect();\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tif (printWriter != null) {\r\n\t\t\t\t\t\t\tprintWriter.close();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (bufferedReader != null) {\r\n\t\t\t\t\t\t\tbufferedReader.close();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch (IOException ex) {\r\n\t\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}", "@Override\n public void run() {\n numStarted ++;\n\n while (true) {\n try {\n // pull a link from the link queue\n URL url = new URL(SharedLinkQueue.getNextLink());\n\n // download the HTML page text at the given URL\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n BufferedReader download = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n\n // store the HTML page text on the page queue as a string\n String pageText = \"\";\n String inputLine;\n while ((inputLine = download.readLine()) != null) {\n pageText += inputLine;\n }\n SharedPageQueue.addPage(pageText);\n\n download.close();\n } catch (MalformedURLException e) {\n errorCount ++;\n System.out.println(\"MalformedURLException: \" + e.getMessage());\n } catch (IOException e) {\n errorCount ++;\n System.out.println(\"IOException: \" + e.getMessage());\n } catch (InterruptedException e) {\n errorCount ++;\n System.out.println(\"InterruptedException: \" + e.getMessage());\n }\n }\n }", "public static boolean checkNetworkAndShowDialog(Context context) {\r\n if (!checkNetConnection(context)) {\r\n //Logger.showShortMessage(context, context.getString(R.string.check_internet));\r\n return false;\r\n }\r\n return true;\r\n }", "private void waitForServerReady() throws IOException, InterruptedException {\n\t\tfinal var httpget = new HttpGet(getPingUri());\n\t\tvar counter = 0;\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tif (HttpStatus.SC_OK == httpclient.execute(httpget, HttpResponse::getCode)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcheckRetries(counter);\n\t\t\t} catch (final HttpHostConnectException ex) { // NOSONAR - Wait, and check later\n\t\t\t\tlog.info(\"Check failed, retrying...\");\n\t\t\t\tcheckRetries(counter);\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\t}", "public boolean checkNetWork(Activity aActivity){\n switch (NetworkUtil.getConnectivityStatus(aActivity)) {\n case OFFLINE:\n MessageUtility.showToast(aActivity,\"No Internet Connection\");\n return false;\n case WIFI_CONNECTED_WITHOUT_INTERNET:\n MessageUtility.showToast(aActivity,\"No Internet Connection\");\n return false;\n case MOBILE_DATA_CONNECTED:\n case WIFI_CONNECTED_WITH_INTERNET:\n return true;\n case UNKNOWN:\n MessageUtility.showToast(aActivity,\"No Internet Connection\");\n return false;\n default:\n return false;\n }\n }", "public void loadPage() { \n\t \n\t if((sPref.equals(ANY)) && (wifiConnected || mobileConnected)) {\n\t \tnew DownloadXmlTask().execute(URL);\n\t }\n\t else if ((sPref.equals(WIFI)) && (wifiConnected)) {\n\t new DownloadXmlTask().execute(URL);\n\t } else {\n\t // show error\n\t } \n\t }", "@Override\n\t\t\t\tpublic void onClickOk() {\n\t\t\t\t\tnew BrowserWebsiteAsyncTask().execute(url,Boolean.FALSE.toString());\n\t\t\t\t}" ]
[ "0.7062881", "0.68421954", "0.6523725", "0.6409333", "0.63697314", "0.6353207", "0.62880564", "0.62842095", "0.628331", "0.625925", "0.6232249", "0.6145895", "0.60879487", "0.60591936", "0.60547185", "0.60418665", "0.5951479", "0.59504277", "0.593507", "0.59307986", "0.5929308", "0.59119934", "0.5905974", "0.59023863", "0.5901245", "0.5898352", "0.5888053", "0.5879542", "0.58767873", "0.5851189", "0.5846457", "0.58451664", "0.5828032", "0.5813949", "0.58042765", "0.580137", "0.5799651", "0.57923484", "0.579219", "0.5789142", "0.57576513", "0.5753934", "0.57477856", "0.57296455", "0.57296455", "0.5724111", "0.5719652", "0.56997395", "0.5694617", "0.5684378", "0.5682991", "0.5671176", "0.5665189", "0.56578475", "0.56548226", "0.56537116", "0.565354", "0.5647941", "0.56428", "0.5637984", "0.5637374", "0.56181186", "0.5614275", "0.5613529", "0.5603467", "0.5598374", "0.55916095", "0.55914295", "0.55910486", "0.557067", "0.556857", "0.5564906", "0.5558396", "0.55551463", "0.5553507", "0.5551828", "0.55510277", "0.55503935", "0.5545363", "0.5543919", "0.5542003", "0.55371", "0.5536532", "0.5536015", "0.55342513", "0.5530014", "0.55225414", "0.5520497", "0.5517365", "0.5511601", "0.55032265", "0.54987603", "0.54962754", "0.54905075", "0.5472181", "0.54708976", "0.546766", "0.5459024", "0.54539025", "0.545245" ]
0.61617553
11
Method invoking the memory usage check
private void createUsageBarCheck (final Shell shell, final ProgressBar usage) { new Thread(new Runnable() { public void run() { while (!stop) { try { Thread.sleep(1000); } catch (Exception e) { log.error(e.getMessage()); } if (!shell.isDisposed()) { toolbar.getDisplay().asyncExec(new Runnable() { public void run() { double max = (double) Runtime.getRuntime().maxMemory(); double fraction = max - (double) Runtime.getRuntime().freeMemory(); double selection = (fraction / max) * 100; Runtime.getRuntime().gc(); int selection_int = (int) (selection); usage.setSelection(selection_int); } }); } } } }).start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default boolean hasEnoughMemory(long memory){\n return getUnusedMemory() >= memory;\n }", "long memoryUnused();", "public static void getMemoryUsage(){\r\n MemoryMeasurement actMemoryStatus = new MemoryMeasurement();\r\n //MemoryMeasurement.printMemoryUsage(actMemoryStatus);\r\n memoryUsageList.add(actMemoryStatus);\r\n }", "long memoryUsed();", "@FXML\n public void checkMemory()\n {\n long heapSize = Runtime.getRuntime().totalMemory(); \n System.out.println(\"Current: \" +heapSize);\n // Get maximum size of heap in bytes. The heap cannot grow beyond this size.// Any attempt will result in an OutOfMemoryException.\n long heapMaxSize = Runtime.getRuntime().maxMemory();\n System.out.println(\"Max: \" + heapMaxSize);\n }", "public abstract long estimateMemorySize();", "long getMemory();", "long getMemory();", "public static void hasMemAllocation(String filePath) {\n\t\tString row = firstRow(filePath);\n\t\tArrayList<String> splits = splits(row);\n\t\tString memAllocation = splits.get(2); // 22966436\n\t\t\n\t\tif (memAllocation.matches(\"\\\\d*\")) {\n\t\t\tMain.debug.LOG(\"omni-epsilon.log contains memory allocation\");\n\t\t} else {\n\t\t\tMain.debug.LOGError(\"omni-epsilon.log does not contain memory allocation\");\n\t\t}\n\t}", "public static void hasMemUsage(String filePath) {\n\t\tString row = firstRow(filePath);\n\t\tArrayList<String> splits = splits(row);\n\t\tString memUsage = splits.get(1); // 083\n\t\t\n\t\tif (memUsage.matches(\"\\\\d*\")) {\n\t\t\tMain.debug.LOG(\"omni-epsilon.log contains memory usage\");\n\t\t} else {\n\t\t\tMain.debug.LOGError(\"omni-epsilon.log does not contain memory usage\");\n\t\t}\n\t}", "public void onMemoryExceed();", "public static int checkMis(int mis,long datasize,FileSystem fs) throws IOException\r\n\t{\r\n\t /*int checkmis = -1;\r\n\t long mb = 1024*1024;\r\n\t long lmis = mis*mb;\r\n\t OperatingSystemMXBean operatingSystemMXBean = ManagementFactory.getOperatingSystemMXBean();\r\n //free memory size\r\n long freememory= ((com.sun.management.OperatingSystemMXBean)operatingSystemMXBean).getFreePhysicalMemorySize();\r\n\t \r\n\t DistributedFileSystem dfs = (DistributedFileSystem) fs;\r\n\t DatanodeInfo[] live = dfs.getClient().datanodeReport(DatanodeReportType.LIVE);\r\n\t \r\n\t String mapredheap_str = fs.getConf().get(\"mapred.child.java.opts\");\r\n String lastchar = String.valueOf(mapredheap_str.charAt(mapredheap_str.length()-1));\r\n long mapredheap = Long.valueOf(mapredheap_str.replaceAll(\"[^0-9]*\",\"\"));\r\n if(lastchar.matches(\"[mM]+\"))\r\n mapredheap = mapredheap*1024*1024;\r\n else\r\n mapredheap = mapredheap*1024*1024*1024;\r\n\t \t \r\n\t //(physical machine free memory) > (mpared child heap size)*(datasize/mis+1)/(# of data nodes)\r\n\t // Free Memory > Required Memory for per node (Assume free memory of master node and slave node are equal, because it only detect memory usage of master node.)\r\n\t //System.out.println(\"FreeMemory: \"+freememory+\", RequiredMemory: \"+mapredheap*(datasize/lmis+1)/live.length+\" for per node of cluster\");\r\n\t if(freememory > mapredheap*(datasize/lmis+1)/live.length)\r\n\t checkmis = mis;\r\n\t else //mis is too small, enlarge and re-check\r\n\t checkmis = checkMis(mis*2,datasize,fs);\r\n\t if(checkmis!=mis)\r\n\t\tSystem.out.println(\"Argument \\\"mis\\\" is too small: \"+mis+\", automatically increace to: \"+checkmis);\r\n\t return checkmis;*/\r\n\t //recent day, in the SSBDS this part has some weird error...\r\n\t return mis;\r\n\t}", "private boolean hasEnoughHeapMemoryForScreenshot() {\n final Runtime runtime = Runtime.getRuntime();\n\n // Auto casting to floats necessary for division\n float free = runtime.freeMemory();\n float total = runtime.totalMemory();\n float remaining = free / total;\n\n TurbolinksLog.d(\"Memory remaining percentage: \" + remaining);\n\n return remaining > .10;\n }", "public void testPhysicalMemoryLessThanJvmAllocation() {\n String jvmOptions = \"-Xmx1024M -XX:MaxPermSize=128M\";\n GcManager gcManager = new GcManager();\n Jvm jvm = new Jvm(jvmOptions, null);\n JvmRun jvmRun = gcManager.getJvmRun(jvm, Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n jvmRun.getJvm().setPhysicalMemory(1207959551);\n jvmRun.doAnalysis();\n Assert.assertTrue(Analysis.ERROR_PHYSICAL_MEMORY + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.ERROR_PHYSICAL_MEMORY));\n }", "public boolean goodMemorySize(){\n\t\t\n\t\tif (memorySize < 128) {\n\t\t\tgoodMemorySize = false;\n\t\t}\n\t\t\n\t\telse {\n\t\t\tgoodMemorySize = true;\n\t\t}\n\t\t\n\t\treturn goodMemorySize;\n\t}", "boolean hasTotalSize();", "@Test\n public void testHeapMetricUsageNotStatic() throws Exception {\n final InterceptingOperatorMetricGroup heapMetrics = new InterceptingOperatorMetricGroup();\n\n MetricUtils.instantiateHeapMemoryMetrics(heapMetrics);\n\n @SuppressWarnings(\"unchecked\")\n final Gauge<Long> used = (Gauge<Long>) heapMetrics.get(MetricNames.MEMORY_USED);\n\n runUntilMetricChanged(\"Heap\", 10, () -> new byte[1024 * 1024 * 8], used);\n }", "public native int getTotalMemory();", "public void testPhysicalMemoryEqualJvmAllocation() {\n String jvmOptions = \"-Xmx1024M -XX:MaxPermSize=128M\";\n GcManager gcManager = new GcManager();\n Jvm jvm = new Jvm(jvmOptions, null);\n JvmRun jvmRun = gcManager.getJvmRun(jvm, Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n jvmRun.getJvm().setPhysicalMemory(1207959552);\n jvmRun.doAnalysis();\n Assert.assertFalse(Analysis.ERROR_PHYSICAL_MEMORY + \" analysis incorrectly identified.\",\n jvmRun.getAnalysis().contains(Analysis.ERROR_PHYSICAL_MEMORY));\n }", "abstract int getMaxMemoryUsage();", "protected boolean memoryLogging() throws Exception\r\n\t{\r\n\t\tRuntime runtime = Runtime.getRuntime();\r\n\r\n\t\t// write log\r\n\t\tNumberFormat format = NumberFormat.getInstance();\r\n\r\n\t\tlong maxMemory = runtime.maxMemory();\r\n\t\tlong allocatedMemory = runtime.totalMemory();\r\n\t\tlong freeMemory = runtime.freeMemory();\r\n\r\n\t\tFile file = new File(warningDiskPath);\r\n\r\n\t\tlong totalDiskSize = file.getTotalSpace();\r\n\t\tlong usableDiskSize = file.getUsableSpace();\r\n\t\tlong usedDiskSize = totalDiskSize - usableDiskSize;\r\n\t\tlong percentUsedDisk = 100 * (usedDiskSize) / totalDiskSize;\r\n\r\n\t\tsystemDump.append(\"\\r\\n\");\r\n\t\tsystemDump.append(\"Memory information:\\r\\n\");\r\n\t\tsystemDump.append(\"\\t :: Free memory : \");\r\n\t\tsystemDump.append(format.format(freeMemory / 1024 / 1024));\r\n\t\tsystemDump.append(\" MB\\r\\n\");\r\n\t\tsystemDump.append(\"\\t :: Allocated memory : \");\r\n\t\tsystemDump.append(format.format(allocatedMemory / 1024 / 1024));\r\n\t\tsystemDump.append(\" MB\\r\\n\");\r\n\t\tsystemDump.append(\"\\t :: Max memory : \");\r\n\t\tsystemDump.append(format.format(maxMemory / 1024 / 1024));\r\n\t\tsystemDump.append(\" MB\\r\\n\");\r\n\t\tsystemDump.append(\"\\t :: Total free memory : \");\r\n\t\tsystemDump.append(format.format((freeMemory + (maxMemory - allocatedMemory)) / 1024 / 1024));\r\n\t\tsystemDump.append(\" MB\\r\\n\");\r\n\t\tsystemDump.append(\"\\t :: Total free memory : \");\r\n\t\tsystemDump.append(format.format((100 * (freeMemory + (maxMemory - allocatedMemory)) / maxMemory)));\r\n\t\tsystemDump.append(\" (%)\\r\\n\");\r\n\t\tsystemDump.append(\"\\t :: Disk in used : \");\r\n\t\tsystemDump.append(format.format(usedDiskSize / 1024 / 1024));\r\n\t\tsystemDump.append(\"/\");\r\n\t\tsystemDump.append(format.format(totalDiskSize / 1024 / 1024));\r\n\t\tsystemDump.append(\" MB, Used \");\r\n\t\tsystemDump.append(format.format(percentUsedDisk));\r\n\t\tsystemDump.append(\" (%) (\");\r\n\t\tsystemDump.append(warningDiskPath);\r\n\t\tsystemDump.append(\")\\r\\n\");\r\n\t\tsystemDump.append(\"\\t :: Total running thread : \");\r\n\t\tsystemDump.append(Thread.activeCount());\r\n\t\tsystemDump.append(\"\\r\\n\");\r\n\r\n\t\treturn (percentUsedDisk >= warningDiskPercent);\r\n\t}", "public static void initializeMetrics()\n {\n // Get the Java runtime\n Runtime runtime = Runtime.getRuntime();\n // Run the garbage collector\n runtime.gc();\n \tstartingMemory = runtime.totalMemory() - runtime.freeMemory();\n }", "@Test\n public void testMemoryMetric() {\n MetricValue mv = new MetricValue.Builder().load(40).add();\n\n MEMORY_METRICS.forEach(cmt -> testUpdateMetricWithoutId(cmt, mv));\n MEMORY_METRICS.forEach(cmt -> testLoadMetric(nodeId, cmt, mv));\n }", "public interface MemoryInstrumentation {\n\n\n /**\n * Returns an <i>estimate</i> of the total bytes of memory that has been allocated by this instance. The return value is equal to the sum\n * of the values returned by {@link #memoryUsed()} and {@link #memoryUnused()}.\n * <p>\n * This value must be estimated because actual memory consumed is different for different CPU architectures and Java runtime implementations,\n * and possibly even on flags used to invoke the runtime.\n *\n * @return the estimated bytes of memory allocated by this instance\n */\n long memoryAllocated();\n\n\n /**\n * Returns an <i>estimate</i> of the total bytes of memory actually in use by this instance.\n * <p>\n * This value must be estimated because actual memory consumed is different for different CPU architectures and Java runtime implementations,\n * and possibly even on flags used to invoke the runtime.\n *\n * @return the estimated bytes of memory actually in use by this instance\n */\n long memoryUsed();\n\n\n /**\n * Returns an <i>estimate</i> of the total bytes of memory allocated, but not actually in use by this instance.\n * <p>\n * This value must be estimated because actual memory consumed is different for different CPU architectures and Java runtime implementations,\n * and possibly even on flags used to invoke the runtime.\n *\n * @return the estimated bytes of memory allocated but not in use by this instance\n */\n long memoryUnused();\n}", "protected void checkSize()\n {\n // check if pruning is required\n if (m_cCurUnits > m_cMaxUnits)\n {\n synchronized (this)\n {\n // recheck so that only one thread prunes\n if (m_cCurUnits > m_cMaxUnits)\n {\n prune();\n }\n }\n }\n }", "public native long memoryConsumed();", "private void setMemorySize() { }", "private boolean isMemorySpaceAvailable() {\n File storagePath;\n if (getStorageDirectories(currentActivity).length > 0) {\n try {\n storagePath = new File(getStorageDirectories(currentActivity)[0]);\n } catch (Exception e) {\n //Log.e(TAG, \"Failed to set appropriate storage path: \" +\n// e.getMessage());\n setUserDownloadLocationPref(false);\n storagePath = Environment.getExternalStorageDirectory();\n }\n } else {\n setUserDownloadLocationPref(false);\n storagePath = Environment.getExternalStorageDirectory();\n }\n return getMegabytesAvailable(storagePath) > getRemainingDownloadSize();\n }", "public long memory() {\n\treturn 0;\n }", "private void collectCpuMemoryUsage(){\r\n\t\tHmDomain hmDomain = CacheMgmt.getInstance().getCacheDomainByName(\"home\");\r\n\t\tfloat cpuUsage = LinuxSystemInfoCollector.getInstance().getCpuInfo() * 100;\r\n\t\tfloat memoryUsage = 0;\r\n\t\ttry {\r\n\t\t\tlong count[] = LinuxSystemInfoCollector.getInstance().getMemInfo();\r\n\t\t\tif(count[0] != 0){\r\n\t\t\t\tmemoryUsage = ((float)(count[0] - count[1] - count[2] - count[3]) * 100 / count[0]);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tBeLogTools.error(HmLogConst.M_PERFORMANCE,\"calculate memory usage failure.\", e);\r\n\t\t}\r\n\t\tCpuMemoryUsage cmu = new CpuMemoryUsage();\r\n\t\tcmu.setCpuUsage(cpuUsage);\r\n\t\tcmu.setMemUsage(memoryUsage);\r\n\t\tcmu.setOwner(hmDomain);\r\n\t\tcmu.setTimeStamp((new Date()).getTime());\r\n\t\ttry {\r\n\t\t\tQueryUtil.createBo(cmu);\r\n\t\t} catch (Exception e) {\r\n\t\t\tBeLogTools.error(HmLogConst.M_PERFORMANCE,\"create CpuMemoryUsage failure.\", e);\r\n\t\t}\r\n\t}", "public boolean hasMemRate() {\n return result.hasMemRate();\n }", "public static void showMemoryInfo()\r\n\t{ \r\n\t\tRuntime rt = Runtime.getRuntime(); \r\n\t\tpf(\"Maxx : \\t %d Kb\\n\", rt.maxMemory() / 1024); \r\n\t\tpf(\"Free : \\t %d Kb\\n\", rt.freeMemory() / 1024); \r\n\t\tpf(\"Totl : \\t %d Kb\\n\", rt.totalMemory() / 1024); \r\n\t\tpf(\"Used : \\t %d Kb\\n\", (rt.totalMemory()-rt.freeMemory()) / 1024); \r\n\t}", "private void detectLowMemory() throws Exception {\r\n\t\tif (Runtime.getRuntime().freeMemory() < 10000000) {\r\n\t\t\tthrow new Exception(\"Low on memory, please choose a report with less memory usage\");\r\n\t\t}\r\n\t}", "boolean hasUsage();", "boolean isRAM();", "boolean hasCapacity();", "int memSize() {\n // treat Code as free\n return BASE_NODE_SIZE + 3 * 4;\n }", "public interface MemoryEstimator {\n\n /**\n * Returns an estimate of how much memory an object consumes.\n * @param instance the object instance\n * @return the estimated memory in bytes\n */\n long getObjectSize(Object instance);\n\n\n /**\n * A MemoryEstimator implementation that leverages org.github.jamm.MemoryMeter\n */\n class DefaultMemoryEstimator implements MemoryEstimator {\n\n private Object meter;\n private Method measureDeep;\n\n /**\n * Constructor\n */\n public DefaultMemoryEstimator() {\n try {\n final Class<?> clazz = Class.forName(\"org.github.jamm.MemoryMeter\");\n final Method method = clazz.getDeclaredMethod(\"hasInstrumentation\");\n final boolean instrumentation = (Boolean) method.invoke(clazz);\n if (instrumentation) {\n this.meter = clazz.newInstance();\n this.measureDeep = clazz.getDeclaredMethod(\"measureDeep\", Object.class);\n }\n } catch (ClassNotFoundException ex) {\n System.err.println(\"Unable to initialize MemoryMeter, class not found\");\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }\n\n @Override\n public long getObjectSize(Object instance) {\n try {\n final Object result = measureDeep != null ? measureDeep.invoke(meter, instance) : -1;\n return result instanceof Number ? ((Number)result).longValue() : -1;\n } catch (Exception ex) {\n throw new RuntimeException(\"Failed to measure memory for instance: \" + instance, ex);\n }\n }\n }\n\n}", "default long getUnusedMemory() {\n return getMaxMemory() - getMemory();\n }", "private float getMemoryUsage() {\n\t\tRuntime runtime = Runtime.getRuntime();\n\t\tlong allocatedMemory = runtime.totalMemory();\n\t\tlong freeMemory = runtime.freeMemory();\n\t\treturn (allocatedMemory - freeMemory);\n\t}", "public static void main(String[] args) throws InstanceNotFoundException, AttributeNotFoundException, MalformedObjectNameException, ReflectionException, MBeanException {\r\n \r\n MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();\r\n Object attribute = mBeanServer.getAttribute(new ObjectName(\"java.lang\",\"type\",\"OperatingSystem\"), \"TotalPhysicalMemorySize\");\r\n Object attribute2 = mBeanServer.getAttribute(new ObjectName(\"java.lang\",\"type\",\"OperatingSystem\"), \"FreePhysicalMemorySize\");\r\n System.out.println(\"Total memory: \"+ (double) Long.parseLong(attribute.toString()) / 1024/1024/1024 + \" gigabytes\");\r\n System.out.println(\"Free memory: \"+ (double) Long.parseLong(attribute2.toString()) / 1024/1024/1024 + \" gigabytes\");\t\r\n\r\n }", "public native long memoryRemaining();", "private void cmdInfoProg() {\n long total = Runtime.getRuntime().totalMemory();\n long free = Runtime.getRuntime().freeMemory();\n NumberFormat nf = NumberFormat.getInstance();\n Log.println(\"(mem: \"\n + NumberFormat.getPercentInstance().format(\n (double) free / (double) total) + \" = \"\n + nf.format(free) + \" bytes free, \" + nf.format(total)\n + \" bytes total)\");\n }", "public synchronized void updateMemory(){\n \tint memory = Math.round(System.getRuntime().totalMemory()/System.getRuntime().freeMemory());\n \tstore(new DisplayableData(\"memory\", \"M\"+memory+\"%\", memory));\n }", "public native int getFreeMemory();", "public native int getUsedMemory();", "int getTotalFree();", "@TargetApi(16)\n /*\n -------------------------------------get ram statistics----------------------------\n gets ram usage from system\n possible args:\n \"in use\" - returns the amount of ram in use in kb\n \"free\" - returns the amount of free ram in kb\n Default: returns the percentage of free ram avalible\n */\n private double getRamStatistics(String args) throws Exception\n {\n RandomAccessFile reader = new RandomAccessFile(\"/proc/meminfo\", \"r\");\n int numLine = 0;\n List<String> allLines = new ArrayList<String>();\n while(true) {\n String line = reader.readLine();\n if(line == null)\n {\n break;\n }\n else\n {\n allLines.add(line);\n }\n }\n int totalRam = getNumFromLine(allLines.get(0).split(\" \"));\n int ramFree = getNumFromLine(allLines.get(1).split((\" \")));\n if(args.toLowerCase() == freeArg)\n {\n return(ramFree);\n }\n else if(args.toLowerCase() == inUseArg)\n {\n return(totalRam - ramFree);\n }\n else\n {\n double retVal = (double)ramFree / (double)totalRam;\n return(retVal);\n }\n }", "int checkElapsedTime(){\r\n\t\treturn gc.getElapsedTime();\r\n\t}", "public int memUsage(){\n\t\tint usage = 36;\n\t\tusage += 12 * point.length;\n\t\tusage += 4 * glComannd.length;\n\t\tusage += 12 * glVertex.length;\n\t\tusage += 24 * state.length;\n\t\treturn usage;\n\t}", "long getMaxMemory();", "boolean isBeingUsed() {\n return usageCount > 0;\n }", "private static boolean FullRAM(String jobId){\n if(pcb.getProcessSize(jobId) <= RAMSpace()){\n return false;\n }\n else{\n return true;\n }\n }", "long getMemLimit();", "public abstract long getTotalMemoryBytes(int minibatchSize, @NonNull MemoryUseMode memoryUseMode,\n @NonNull CacheMode cacheMode, @NonNull DataType dataType);", "protected long calculateLiveMemoryUsage() {\n // NOTE: MemoryUsageGaugeSet provides memory usage statistics but we do not use them\n // here since it will require extra allocations and incur cost, hence it is cheaper to use\n // MemoryMXBean directly. Ideally, this call should not add noticeable\n // latency to a query -- but if it does, please signify on SOLR-14588\n return MEMORY_MX_BEAN.getHeapMemoryUsage().getUsed();\n }", "@Override\n public boolean isTripped() {\n\n long localAllowedMemory = getCurrentMemoryThreshold();\n long localSeenMemory = calculateLiveMemoryUsage();\n\n allowedMemory.set(localAllowedMemory);\n\n seenMemory.set(localSeenMemory);\n\n return (localSeenMemory >= localAllowedMemory);\n }", "@Override\n public void run() {\n MemUsage memUsage = new MemUsage();\n Runtime run = Runtime.getRuntime();\n String memPath = \"/proc/\" + processId + \"/status\";\n LOG.info(\"Reading the file for memory: \" + memPath);\n String currentTime;\n File statusFile;\n float pcpu;\n int pmem;\n ProcessInfoBean processInfoBean = new ProcessInfoBean();\n processInfoBean.setLocalHostIp(ip);\n processInfoBean.setProceeName(processName);\n while (running) {\n pcpu = getCPUUsageByTopCommond(run, cmd);\n if (pcpu != -1) {\n statusFile = new File(memPath);\n if (statusFile.exists()) {\n pmem = memUsage.getMemUsage(statusFile);\n if (pmem != -1) {\n currentTime = TimeUtils.getCurrentTime();//获取系统当前时间\n processInfoBean.setUpdateTime(currentTime);\n processInfoBean.setCpuUsage(pcpu);\n processInfoBean.setMemUsage(pmem);\n processInfoBean.setPid(Integer.parseInt(processId));\n processInfoDao.insert_process_monitor(processInfoBean);\n MybatisUtils.session.commit();\n try {\n Thread.sleep(intervalTime);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }\n }\n }\n }", "@GetMapping(value = \"/memFree\")\n public ResponseEntity<Long> memFree(){\n try {\n String s = CommandExecutor.execute(Commands.mem);\n s = findLine(s, \"MemFree\");\n System.out.println(s);\n s = filterForNumbers(s);\n Long memFree = Long.parseLong(s)/1_000_000;\n return ResponseEntity.ok(memFree);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return ResponseEntity.status(500).build();\n }", "public boolean freeSpace(int neededSpace) {\n \t\treturn true;\n \t}", "private void checkFreeDiskSpace(List<File> inputFiles) {\n //Check for free space\n long usableSpace = 0;\n long totalSize = 0;\n for (File f : inputFiles) {\n if (f.exists()) {\n totalSize += f.length();\n usableSpace = f.getUsableSpace();\n }\n }\n log.info(\"Total expected store size is {} Mb\",\n new DecimalFormat(\"#,##0.0\").format(totalSize / (1024 * 1024)));\n log.info(\"Usable free space on the system is {} Mb\",\n new DecimalFormat(\"#,##0.0\").format(usableSpace / (1024 * 1024)));\n if (totalSize / (double) usableSpace >= 0.66) {\n throw new OutOfDiskSpace(\"Aborting because there isn't enough free disk space\");\n }\n }", "private MemoryTest() {\r\n }", "static boolean checkAvailableSpace(File path, int requiredMb){\n long spaceInMb = path.getUsableSpace() / (1024 * 1024);\n return spaceInMb >= requiredMb;\n }", "public boolean hasMemoryAddress()\r\n/* 138: */ {\r\n/* 139:167 */ return false;\r\n/* 140: */ }", "public void checkCapacity(String target, long size) throws Exception;", "public static long freeMemory() {\n return Native.freeMemory(false);\n }", "public int getMemory()\n\t{\n\t\treturn memorySize;\n\t}", "boolean isUsed();", "boolean isUsed();", "public void freeMemory() {\n native_freeMemory();\n }", "@Override\n\t\tpublic long usage() {\n\t\t\t\n\t\t\treturn super.usage();\n\t\t}", "public void enforceMemoryLimits()\n {\n memoryManager.process(queries.values().stream()\n .filter(query -> query.getState() == RUNNING)\n .collect(toImmutableList()));\n }", "int measure();", "public static void main(String[] args) {\n\n printMemory();\n\n byte[] buf1 = new byte[1*1024*1024];\n printMemory(\"分配1M内存\");\n\n byte[] buf2 = new byte[4*1024*1024];\n printMemory(\"分配4M内存\");\n }", "private long getMemoryFootprint() {\n Runtime runtime = Runtime.getRuntime();\n long memAfter = runtime.totalMemory() - runtime.freeMemory();\n long memBefore = memAfter + 1;\n while (memBefore != memAfter) {\n memBefore = memAfter;\n System.gc();\n memAfter = runtime.totalMemory() - runtime.freeMemory();\n }\n return memAfter;\n }", "protected abstract Object createJvmMemoryMBean(String paramString1, String paramString2, ObjectName paramObjectName, MBeanServer paramMBeanServer);", "ResourceUsage getMemoryInfoByDate(Long date) {\n return daoInterface.getMemoryInfoByDate(date);\n\n }", "public boolean isOutOfMemory() {\n if (isEnabled())\n return ((getMax() - getCurrent()) < (getInitial() + 200000));\n else\n return false;\n }", "boolean hasPakringFree();", "boolean hasPakringFree();", "long getTotalFreeSpaceInBytes();", "long getTotalFreeSpaceInBytes();", "private void checkCapacity() {\n\t\tif (size.get() >= region.getCapacity()) {\n\t\t\tsynchronized (cleanUpThread) {\n\t\t\t\tcleanUpThread.notify();\n\t\t\t}\n\t\t}\n\t}", "private SensorData collectMemoryInfo() throws SigarException {\n \n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Collecting Memory Utilization Information\");\n }\n SensorData data = new SensorData();\n \n Mem mem = sigar.getMem();\n \n data.add(SensorAttributeConstants.MemoryConstants.TOTAL_MEMORY, (mem.getTotal() / (1024 * 1024)));\n data.add(SensorAttributeConstants.MemoryConstants.FREE_MEMORY, (mem.getFree() / (1024 * 1024)));\n data.add(SensorAttributeConstants.MemoryConstants.MEM_ACTUAL_USED, (mem.getActualUsed() / (1024 * 1024)));\n \n return data;\n }", "public abstract long getMemoryBytes(MemoryType memoryType, int minibatchSize, MemoryUseMode memoryUseMode,\n CacheMode cacheMode, DataType dataType);", "public static long totalMemory() {\n return Native.totalMemory(false);\n }", "private boolean hasCapacity() {\n int used = 0 + evaluations.size() * 2;\n int available = Runtime.getRuntime().availableProcessors() * ServerRunner.getProcessorMultiplier();\n return used < available;\n }", "private MainMemory() {\n\t\tPropertiesParser prop = PropertiesLoader.getPropertyInstance();\n\t\tnumOfbank = prop.getIntProperty(\"sim.mem.numberofbank\", 8);\n\t\tlogger.debug(\"numOfBank in main memory :\"+ numOfbank);\n\t\t\n\t\tinit();\n\t}", "public Boolean checkifItHasExternalMemory() {\n\t\tString state = Environment.getExternalStorageState();\n\t\tif (Environment.MEDIA_MOUNTED.equals(state)) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public static void readMemory() {\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd_MM_yyyy_hh_mm\");\n\n\t\t//getting the running container's id\n\t\tHashMap<String,String> hMap = ContainerUtil.getActiveContainers();\n\n\t\t//getting the process IDs for the running conteiners\n\t\tFile[] directories = new File(\"/proc\").listFiles(File::isDirectory);\n\n\t\tfor(Map.Entry<String,String> entry : hMap.entrySet()){\n\n\t\t\t//getting start time of mem copy\n\t\t\tDate startDate = new Date();\n\n\t\t\t//pausing the container to get its memory\n\t\t\tContainerUtil.pauseContainer( entry.getKey() );\n\n\t\t\tfor(File dir : directories) {\n\n\t\t\t\tif(NumberUtils.isNumber(dir.getName())){\n\t\t\t\t\n\t\t\t\t\tString filename = \"/proc/\" + dir.getName() + \"/cgroup\";\n\n\t\t\t\t\t//finding the cgroup file for the containerId\t\t\t\t\t\n\t\t\t\t\ttry(Stream<String> stream = Files.lines(Paths.get(filename))){\n\n\t\t\t\t\t\tif(stream.filter(line -> line.indexOf(entry.getKey()) > 0 ).findFirst().isPresent()){\n\t\t\t\t\t\t\t//change this point to save file to a mapped directory\n\t\t\t\t\t\t\tString outFile = \"./\" +\tentry.getKey() + \"-\" + \n\t\t\t\t\t\t\t\t\t\tentry.getValue() + \"-\" + \n\t\t\t\t\t\t\t\t\t\tdir.getName() + \"-\" + \n\t\t\t\t\t\t\t\t\t\tdateFormat.format(new Date()) + \".mem\";\n\n\t\t\t\t\t\t\tString fileSource = \"/proc/\" + dir.getName() + \"/numa_maps\";\n\n\t\t\t\t\t\t\t//writing memory to file\n\t\t\t\t\t\t\twriteMemToFile(outFile, fileSource);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (IOException e){\n\t\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//unpausing the container after memory collection\n\t\t\tContainerUtil.unpauseContainer( entry.getKey() );\n\n\t\t\t//calculating total time for mem copy\n\t\t\tlong seconds = (new Date().getTime() - startDate.getTime());\n\t\t\tSystem.out.println(\" copy time: \" + seconds);\n\t\t}\n\t}", "private void updateMemInfo() {\n\t\tproNum = getRunningNum();\r\n\r\n\t\ttv_pronum.setText(\"进程总数:\" + proNum);\r\n\r\n\t\ttv_mem.setText(\"剩余内存:\" + getRomAvailaleSize());\r\n\t}", "public boolean checkAvailability(int num_used) {\n return num_used != this.num_uses;\n }", "public static void dumpMem() {\n\t\tRuntime runtime = Runtime.getRuntime();\n\n\t\t// Print used memory\n\t\tSystem.out.println(\"Used Memory:\" + (runtime.totalMemory() - runtime.freeMemory()) / mb);\n\n\t\t// Print free memory\n\t\tSystem.out.println(\"Free Memory:\" + runtime.freeMemory() / mb);\n\n\t\t// Print total available memory\n\t\tSystem.out.println(\"Total Memory:\" + runtime.totalMemory() / mb);\n\n\t\t// Print Maximum available memory\n\t\tSystem.out.println(\"Max Memory:\" + runtime.maxMemory() / mb);\n\n\t}", "boolean hasSize();", "boolean hasSize();", "boolean hasSize();", "boolean hasSize();", "public static void main(String[] args) {\r\n\t\tmeasureHeapMemory();\r\n\t}", "int memSize() {\n return super.memSize() + 4 * 4; }", "public double recallMemory() {\n return memoryValue;\n }" ]
[ "0.72637725", "0.7028408", "0.679238", "0.67879677", "0.6694615", "0.6459164", "0.6445864", "0.6445864", "0.6377539", "0.6367651", "0.6360609", "0.6341932", "0.6339477", "0.6287643", "0.6237616", "0.61869127", "0.61788404", "0.6170199", "0.6143386", "0.6135911", "0.6117437", "0.61136866", "0.60700756", "0.60683674", "0.60524327", "0.6043546", "0.59987843", "0.59905505", "0.59754395", "0.59693533", "0.5961915", "0.5927329", "0.59180206", "0.5910793", "0.5905213", "0.588309", "0.58669", "0.58631766", "0.58513564", "0.5850941", "0.5809419", "0.57880366", "0.57871103", "0.57629", "0.5762073", "0.5730797", "0.57217216", "0.57072", "0.56997347", "0.5694468", "0.5693616", "0.5693271", "0.5687899", "0.5684475", "0.5669221", "0.5644635", "0.5633472", "0.5633169", "0.56321824", "0.5631958", "0.5618005", "0.5597847", "0.5568464", "0.556514", "0.55620754", "0.5549085", "0.55173075", "0.5512422", "0.5512422", "0.55045485", "0.55033785", "0.5490603", "0.54767215", "0.5470128", "0.5465293", "0.54647946", "0.5464268", "0.5458768", "0.5455233", "0.5455233", "0.54443145", "0.54443145", "0.5444221", "0.5441307", "0.54360193", "0.5431207", "0.54164636", "0.5406998", "0.5403389", "0.54031885", "0.5400928", "0.53937715", "0.5378866", "0.53766966", "0.53766966", "0.53766966", "0.53766966", "0.5371898", "0.5351516", "0.53453904" ]
0.5386076
92
Method checking the Internet availability
public boolean isInternetReachable() { try { // URL to a source URL url = new URL("http://www.betfair.com"); // Open a connection HttpURLConnection urlConnect = (HttpURLConnection) url .openConnection(); // Retrieving data from the source - if there is no connection, // throws and exception @SuppressWarnings("unused") Object objData = urlConnect.getContent(); } catch (Exception e) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isNetworkAvailable();", "private boolean isInternetAvailable() {\n ConnectivityManager connectivityManager = (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n Network[] networks = connectivityManager.getAllNetworks();\n NetworkInfo networkInfo;\n for (Network mNetwork : networks) {\n networkInfo = connectivityManager.getNetworkInfo(mNetwork);\n if (networkInfo.getState().equals(NetworkInfo.State.CONNECTED)) {\n return true;\n }\n }\n } else {\n if (connectivityManager != null) {\n NetworkInfo[] info = connectivityManager.getAllNetworkInfo();\n if (info != null) {\n for (NetworkInfo networkInfo : info) {\n if (networkInfo.getState() == NetworkInfo.State.CONNECTED) {\n return true;\n }\n }\n }\n }\n }\n Toast.makeText(getContext(), getString(R.string.internet_connection_needed),Toast.LENGTH_SHORT).show();\n return false;\n }", "private boolean checkInternetConnection() {\n\n ConnectivityManager connectivityManager = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();\n\n return (networkInfo != null && networkInfo.isConnected());\n\n }", "private boolean checkInternetConnection() {\n ConnectivityManager cm =\n (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n return activeNetwork != null && activeNetwork.isConnectedOrConnecting();\n }", "private boolean checkInternetConnection() {\n ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();\n\n return networkInfo != null && networkInfo.isConnectedOrConnecting();\n }", "private Boolean checkInternetConnectivity(){\n // Code to check the network connectivity status\n ConnectivityManager connMgr = (ConnectivityManager)\n getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n return networkInfo != null && networkInfo.isConnected();\n }", "public boolean isNetworkAvailable() {\n initNetwork();\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n}", "public boolean hasActiveInternetConnection()\n {\n Runtime runtime = Runtime.getRuntime();\n try {\n Process ipProcess = runtime.exec(\"/system/bin/ping -c 1 8.8.8.8\");\n int exitValue = ipProcess.waitFor();\n return (exitValue == 0);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return false;\n }", "private boolean isInternetConnected() {\n ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo ni = cm.getActiveNetworkInfo();\n if (ni!=null && ni.isAvailable() && ni.isConnected()) {\n return true;\n } else {\n return false;\n }\n }", "private boolean isNetworkAvailable() {\r\n ConnectivityManager connectivityManager \r\n = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\r\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\r\n return activeNetworkInfo != null;\r\n }", "private boolean isNetworkAvailable(){\n ConnectivityManager connectivityManager = (ConnectivityManager)\n getSystemService(CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n\n }", "public static boolean isInternetAvailable(Context context) {\n Log.d(TAG, \"isInternetAvailable\");\n ConnectivityManager mConMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n return mConMgr.getActiveNetworkInfo() != null\n && mConMgr.getActiveNetworkInfo().isAvailable()\n && mConMgr.getActiveNetworkInfo().isConnected();\n }", "protected boolean NetworkAviable() {\n\t\t\tConnectivityManager cm =(ConnectivityManager)contextyeild.getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\t\t NetworkInfo netInfo = cm.getActiveNetworkInfo();\n\t\t if (netInfo != null && netInfo.isConnectedOrConnecting()) {\n\t\t \t try{\n\t\t \t\t \n\t\t \t \t//new OnGetPondsdata().execute();\n\t\t \t }catch(Exception e){\n\t\t \t\t e.printStackTrace();\n\t\t \t }\n\t\t \t \t\n\t\t return true;\t\t \n\t\t }\n\t\t else{ \n\t\t \t\n\t\t \t// TODO Auto-generated method stub\n\t\t\t\tToast.makeText(contextyeild, \"No internet connection\", Toast.LENGTH_SHORT).show();\t\t\t\t\t\n\t\t }\n\t\t return false;\n\t\t\t}", "private boolean isNetworkAvailable()\n\t{\n\t\tNetworkInfo info = mConnectivityManager.getActiveNetworkInfo();\n\n\t\treturn info != null && info.isConnected();\n\t}", "private Boolean hasInternetConnection() {\n ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();\n if ((networkInfo != null) && networkInfo.isConnected()) {\n return true;\n } else {\n makeToast(\"There is no internet connection\");\n return false;\n }\n }", "protected boolean checkInternetConnection() {\n if (!Utils.hasInternetConnection(getApplicationContext())) {\n final AlertDialog.Builder adBuilder = createAlertDialog(R.string.dialog_title_no_internet, R.string.dialog_message_no_internet);\n adBuilder.setPositiveButton(R.string.dialog_btn_ok, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n });\n adBuilder.show();\n return false;\n }\n\n return true;\n }", "public boolean checkInternetConnection()\n {\n ConnectivityManager cm =\n (ConnectivityManager)getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\n\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n return activeNetwork != null && activeNetwork.isConnectedOrConnecting();\n }", "public Boolean isOnlineNet() {\n\n try {\n Process p = java.lang.Runtime.getRuntime().exec(\"ping -c 1 www.google.es\");\n\n int val = p.waitFor();\n boolean reachable = (val == 0);\n return reachable;\n\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return false;\n }", "public boolean internetErisimi() {\n\n ConnectivityManager conMgr = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\n if (conMgr.getActiveNetworkInfo() != null\n\n && conMgr.getActiveNetworkInfo().isAvailable()\n\n && conMgr.getActiveNetworkInfo().isConnected()) {\n\n return true;\n\n } else {\n\n return false;\n\n }\n\n }", "private void checkInternetConnection() {\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}", "public final int isInternetOn() {\n ConnectivityManager connec =\r\n (ConnectivityManager)getSystemService(getBaseContext().CONNECTIVITY_SERVICE);\r\n\r\n // Check for network connections\r\n if ( connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.CONNECTED ||\r\n connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.CONNECTING ||\r\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.CONNECTING ||\r\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.CONNECTED ) {\r\n\r\n // if connected with internet\r\n\r\n //Toast.makeText(this, \" Connected \", Toast.LENGTH_LONG).show();\r\n return 1;\r\n\r\n } else if (\r\n connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.DISCONNECTED ||\r\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.DISCONNECTED ) {\r\n\r\n //Toast.makeText(this, \" Not Connected \", Toast.LENGTH_LONG).show();\r\n return 0;\r\n }\r\n return 0;\r\n }", "private boolean isNetworkAvailable() {\n ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "public boolean isNetworkReachable();", "private boolean isNetworkAvailable() {\n ConnectivityManager cm = (ConnectivityManager)ctx.getSystemService(Context.CONNECTIVITY_SERVICE);\n if ( cm.getActiveNetworkInfo() != null ) {\n return true;\n }\n return false;\n }", "public static boolean isConnectedToInternet() {\n String pingServerURL = pingBackUrl.substring(0, pingBackUrl.indexOf(\"/\", \"http://url\".length()));\n try {\n URL url = new URL(pingServerURL);\n HttpURLConnection urlConn = (HttpURLConnection) url.openConnection();\n urlConn.connect();\n return (HttpURLConnection.HTTP_NOT_FOUND != urlConn.getResponseCode());\n } catch (MalformedURLException e) {\n LOG.error(\"LeadCapture : Error creating HTTP connection to the server : \" + pingServerURL);\n \n } catch (IOException e) {\n LOG.error(\"LeadCapture : Error creating HTTP connection to the server : \" + pingServerURL);\n }\n return false;\n }", "public boolean probarInternet() {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "private boolean networkIsAvailable() {\t\t\t\t\t\t\t\t\n\t\tConnectivityManager connectivityManager \t\t\t\t\t\t\t\t\n\t\t= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\t\t\t\t\t\t\t\t\n\t\tNetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\t\t\t\t\t\t\t\t\n\t\treturn activeNetworkInfo != null && activeNetworkInfo.isConnectedOrConnecting();\t\t\t\t\t\t\t\t\n\t}", "public static boolean isInternetAvailable(Context c) {\n\n ConnectivityManager connectivity = (ConnectivityManager) c\n .getSystemService(Context.CONNECTIVITY_SERVICE);\n\n if (connectivity != null) {\n\n NetworkInfo[] info = connectivity.getAllNetworkInfo();\n if (info != null)\n for (int i = 0; i < info.length; i++)\n if (info[i].getState() == NetworkInfo.State.CONNECTED) {\n return true;\n }\n }\n\n return false;\n }", "public boolean isNetworkAvailable() {\n try {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n } catch (Exception e) {\n FirebaseCrash.report(new Exception(\"Error while trying to check network availability \" + e));\n return false;\n }\n }", "private boolean isNetworkAvailable() {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "private boolean isNetworkAvailable() {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "private boolean isNetworkAvailable() {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "private boolean isNetworkAvailable() {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "boolean isInternetConnected(){\n\n ConnectivityManager connectivityManager = (ConnectivityManager)getSystemService(CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();\n\n return networkInfo!=null && networkInfo.isConnected(); // -> true if we have internet connected\n\n }", "private boolean isNetworkAvailable() {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) ApplicationContext.get().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "private boolean checkNetworkState() {\n ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\n if (connectivityManager.getActiveNetworkInfo() == null || !connectivityManager.getActiveNetworkInfo().isConnected()) {\n showNetworkAlert();\n return false;\n }\n\n else return true;\n }", "private boolean isNetworkAvailable() {\n // Create a connectivity manager and\n // get the service type currently in use (Wi-fi, 3g etc)\n ConnectivityManager cm = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);\n // Get network info from the service\n NetworkInfo networkInfo = cm.getActiveNetworkInfo();\n\n // return true or false based on connection\n return (networkInfo != null)\n && networkInfo.isConnected()\n && networkInfo.isAvailable();\n }", "private boolean isConnectedToInternet(){\n ConnectivityManager connectivityManager = (ConnectivityManager) main.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();\n return networkInfo != null && networkInfo.isConnected();\n }", "Boolean isAvailable();", "public boolean isOnline() {\n ConnectivityManager conMgr = (ConnectivityManager) getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = conMgr.getActiveNetworkInfo();\n // In case it's not notify it through a toast\n if(netInfo == null || !netInfo.isConnected() || !netInfo.isAvailable()){\n Toast.makeText(MainActivity.this, \"No Internet connection!\", Toast.LENGTH_LONG).show();\n return false;\n }\n return true;\n }", "public boolean isNetworkAvailable() {\n ConnectivityManager connectivity = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n if (connectivity == null) {\n return false;\n } else {\n NetworkInfo[] info = connectivity.getAllNetworkInfo();\n if (info != null) {\n for (int i = 0; i < info.length; i++) {\n if (info[i].getState() == NetworkInfo.State.CONNECTED) {\n return true;\n }\n }\n }\n }\n return false;\n }", "public boolean isNetworkAvailable() {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n Log.i(\"Utilities\",\"isNetworkAvailable()\"+(activeNetworkInfo != null\n && activeNetworkInfo.isConnected()));\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "private boolean checkConnection() {\n return InternetConnectivityReceiver.isConnected();\n }", "private boolean isConnectedToInternet() {\n ConnectivityManager conManager = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = conManager.getActiveNetworkInfo();\n return networkInfo != null && networkInfo.isConnected();\n }", "public boolean isConnectingToInternet(){\n ConnectivityManager connectivity = (ConnectivityManager) _context.getSystemService(Context.CONNECTIVITY_SERVICE);\n if (connectivity != null)\n {\n NetworkInfo[] info = connectivity.getAllNetworkInfo();\n if (info != null)\n for (int i = 0; i < info.length; i++)\n if (info[i].getState() == NetworkInfo.State.CONNECTED)\n {\n return true;\n }\n \n }\n return false;\n }", "public boolean isConnectingToInternet(){\n ConnectivityManager connectivity = (ConnectivityManager) _context.getSystemService(Context.CONNECTIVITY_SERVICE);\n if (connectivity != null)\n {\n NetworkInfo[] info = connectivity.getAllNetworkInfo();\n if (info != null)\n for (int i = 0; i < info.length; i++)\n if (info[i].getState() == NetworkInfo.State.CONNECTED)\n {\n return true;\n }\n \n }\n return false;\n }", "protected boolean isNetworkAvailable() {\n ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "boolean isNetworkAvailable() {\n Context context = getApplicationContext();\n ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n boolean isConnected = activeNetwork != null && activeNetwork.isConnectedOrConnecting();\n return isConnected;\n }", "@Override\n protected Boolean doInBackground(Void... params) {\n check_internet = hasActiveInternetConnection(getApplicationContext());\n return check_internet;\n }", "public boolean isNetworkAvailable() {\n ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "public static boolean isInternetAvailable(Context currentContext) {\n ConnectivityManager conectivityManager = (ConnectivityManager) currentContext.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = conectivityManager.getActiveNetworkInfo();\n if (networkInfo != null) {\n if (networkInfo.getType() == ConnectivityManager.TYPE_WIFI) {\n if (networkInfo.isConnected()) {\n return true;\n }\n } else if (networkInfo.getType() == ConnectivityManager.TYPE_MOBILE) {\n if (networkInfo.isConnected()) {\n return true;\n }\n }\n }\n return false;\n }", "private boolean isNetworkAvailable2() {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "public boolean checkServer() {\n boolean result = false;\n \n int url = 195885416; //Using www.vg.no for now. There might be a problem in the ip-format, but we'll know more after testing.\n if(isNetworkAvailable()) {\n ConnectivityManager cm = (ConnectivityManager)ctx.getSystemService(Context.CONNECTIVITY_SERVICE);\n \n if(cm.requestRouteToHost(ConnectivityManager.TYPE_WIFI, url)) {\n result = true;\n } else if(cm.requestRouteToHost(ConnectivityManager.TYPE_MOBILE, url)) {\n result = true;\n }\n }\n \n return result;\n }", "private boolean isNetworkAvailable() {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) Objects.requireNonNull(this).getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = Objects.requireNonNull(connectivityManager).getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "public static boolean isNetworkAvailable() {\n\n ConnectivityManager connectivityManager\n = (ConnectivityManager) DumbApplication.getAppContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnectedOrConnecting();\n }", "private boolean isNetworkAvailable( ) {\n\t\t// Assume it's not\n\t\tboolean networkIsAvailable = false;\n\n\t\t// Check to see if we have an available network and it's connected\n\t\tConnectivityManager connectivityManager = (ConnectivityManager) context_.getSystemService( Context.CONNECTIVITY_SERVICE );\n\t\tNetworkInfo networkInfo = connectivityManager .getActiveNetworkInfo();\n\n\t\tif (networkInfo != null && networkInfo.isConnected()) {\n\t\t\tnetworkIsAvailable = true;\n\t\t}\n\n\t\treturn networkIsAvailable;\n\t}", "private boolean isOnline() {\n ConnectivityManager conMgr = (ConnectivityManager) getApplicationContext().getSystemService(CONNECTIVITY_SERVICE);\n if (conMgr != null) {\n NetworkInfo netInfo = conMgr.getActiveNetworkInfo();\n if (netInfo == null || !netInfo.isConnected() || !netInfo.isAvailable()) {\n Toast.makeText(this, \"No Internet connection!\", Toast.LENGTH_LONG).show();\n return false;\n }\n }\n return true;\n }", "private static boolean isNetworkAvailable(Context context) {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null;\n }", "private boolean isNetworkAvailable() {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "public final boolean isInternetOn() {\n ConnectivityManager connec =\n (ConnectivityManager) getSystemService(getBaseContext().CONNECTIVITY_SERVICE);\n\n // Check for network connections\n if (connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.CONNECTED ||\n connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.CONNECTING ||\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.CONNECTING ||\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.CONNECTED) {\n\n // if connected with internet\n\n\n return true;\n\n } else if (\n connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.DISCONNECTED ||\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.DISCONNECTED) {\n\n\n return false;\n }\n return false;\n }", "public boolean networkAvailable() {\n ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = cm.getActiveNetworkInfo();\n // if network is off, networkInfo will be null\n //otherwise check if we are connected\n if (networkInfo != null && networkInfo.isConnected()) {\n return true;\n }\n return false;\n }", "public static boolean checkInternetConnection(Context context) {\n ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "private static boolean isNetworkAvailable(Context context) {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "public final boolean isInternetOn() {\n ConnectivityManager connec =\n (ConnectivityManager)context.getSystemService(context.CONNECTIVITY_SERVICE);\n\n // Check for network connections\n if ( connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.CONNECTED ||\n connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.CONNECTING ||\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.CONNECTING ||\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.CONNECTED ) {\n\n // if connected with internet\n\n Toast.makeText(context, \" Connected \", Toast.LENGTH_LONG).show();\n return true;\n\n } else if (\n connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.DISCONNECTED ||\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.DISCONNECTED ) {\n\n Toast.makeText(context, \" Not Connected \", Toast.LENGTH_LONG).show();\n return false;\n }\n return false;\n }", "private boolean isNetworkAvailable() {\n // Using ConnectivityManager to check for Network Connection\n ConnectivityManager connectivityManager = (ConnectivityManager) getActivity()\n .getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null;\n }", "public static boolean isInternetOn(Context context)\r\n {\r\n ConnectivityManager cm = (ConnectivityManager) context\r\n .getSystemService(Context.CONNECTIVITY_SERVICE);\r\n // test for connection\r\n if (cm.getActiveNetworkInfo() != null\r\n && cm.getActiveNetworkInfo().isAvailable()\r\n && cm.getActiveNetworkInfo().isConnected())\r\n {\r\n // No need to bother user when everything's ok :)\r\n Log.d(logVerifyNet, \"Internet is working\");\r\n return true;\r\n }\r\n else\r\n {\r\n Toast.makeText(context, \"No internet connection...\", Toast.LENGTH_LONG).show();\r\n Log.d(logVerifyNet, \"No internet connection...\");\r\n return false;\r\n }\r\n }", "private boolean isNetworkAvailable() {\n\t\tConnectivityManager connectivityManager = (ConnectivityManager) mContext\n\t\t\t\t.getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\tNetworkInfo activeNetworkInfo = connectivityManager\n\t\t\t\t.getActiveNetworkInfo();\n\t\treturn activeNetworkInfo != null && activeNetworkInfo.isConnected();\n\t}", "protected boolean checkNetworkStatus() {\n\n ConnectivityManager manager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = manager.getActiveNetworkInfo();\n\n if ((activeNetworkInfo != null && activeNetworkInfo.isConnected())) {\n return true;\n } else {\n return false;\n }\n }", "private boolean isConnectedToInternet() {\n ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n return cm.getActiveNetworkInfo() != null && cm.getActiveNetworkInfo().isConnected();\n }", "private Callable<Boolean> isReachable() {\n return () -> {\n try {\n if (!isOnline()) {\n return false;\n }\n\n URL url = new URL(\"https://api.vk.com\"); //url for ex.\n HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();\n httpURLConnection.setConnectTimeout(2000);\n httpURLConnection.connect();\n\n return true;\n } catch (Exception e) {\n return false;\n }\n };\n }", "public static boolean isInternetOn(Context context) {\n _context = context;\n ConnectivityManager connec = null;\n // get Connectivity Manager object to check connection\n //ConnectivityManager connec = \n //(ConnectivityManager) _context.getSystemService(Context.CONNECTIVITY_SERVICE);\n // get Connectivity Manager object to check connection\n try {\n connec = (ConnectivityManager) _context.getSystemService(Context.CONNECTIVITY_SERVICE);\n // 0 is Mobile dataconnection\n // 1 for Wifi Connection\n NetworkInfo activeNetwork = connec.getActiveNetworkInfo();\n if (activeNetwork != null) {\n if (connec.getNetworkInfo(1).getState() == NetworkInfo.State.CONNECTING ||\n connec.getNetworkInfo(1).getState() == NetworkInfo.State.CONNECTED) {\n //Common.IsLocalConnection = 2;\n return true;\n\n } else if (connec.getNetworkInfo(0).getState() == NetworkInfo.State.CONNECTED ||\n connec.getNetworkInfo(0).getState() == NetworkInfo.State.CONNECTING) {\n //Common.IsLocalConnection = 1;\n return true;\n } else if (connec.getNetworkInfo(0).getState() == NetworkInfo.State.DISCONNECTED ||\n connec.getNetworkInfo(1).getState() == NetworkInfo.State.DISCONNECTED) {\n //Common.IsLocalConnection = 0;\n return false;\n } // Check for network connections\n } else {\n // not connected to the internet\n }\n } catch (Exception ex) {\n CrashAnalytics.CrashReport(ex);\n }\n return false;\n }", "public boolean checkInternetConnection(@NonNull Context context) {\n return ((ConnectivityManager) context.getSystemService(\n Context.CONNECTIVITY_SERVICE)).getActiveNetworkInfo() != null;\n }", "private boolean isOnline(){\n ConnectivityManager cm= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n if(netInfo != null && netInfo.isConnectedOrConnecting()){\n return true;\n } else{\n return false;\n }\n }", "@RequiresPermission(Manifest.permission.ACCESS_NETWORK_STATE)\n public static boolean isNetworkAvailable(Context cxt) {\n NetworkInfo network = getActiveNetworkInfo(cxt);\n return network != null && network.isConnected();\n }", "public boolean isOnline() {\n Runtime runtime = Runtime.getRuntime();\n try {\n Process ipProcess = runtime.exec(\"/system/bin/ping -c 1 8.8.8.8\");\n int exitValue = ipProcess.waitFor();\n return (exitValue == 0);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return false;\n }", "private static boolean isConnectingToInternet() {\n ConnectivityManager connectivity = (ConnectivityManager) context\n .getSystemService(Context.CONNECTIVITY_SERVICE);\n if (connectivity != null) {\n NetworkInfo[] info = connectivity.getAllNetworkInfo();\n if (info != null)\n for (int i = 0; i < info.length; i++)\n if (info[i].getState() == NetworkInfo.State.CONNECTED) {\n // return connectivity.getActiveNetworkInfo() != null\n // && connectivity.getActiveNetworkInfo()\n // .isConnectedOrConnecting();\n return true;\n }\n }\n return false;\n }", "public boolean hasInternetConnection(final Context context) {\n\t\tConnectivityManager conMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\tif (conMgr.getActiveNetworkInfo() != null\n\t\t\t\t&& conMgr.getActiveNetworkInfo().isAvailable()\n\t\t\t\t&& conMgr.getActiveNetworkInfo().isConnected()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public void checkConnectivity(){\n ConnectivityManager cm = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);\n mIsOnline = cm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE)\n .isConnectedOrConnecting() || cm.getNetworkInfo(ConnectivityManager.TYPE_WIFI)\n .isConnectedOrConnecting();\n }", "private boolean isKonekInternet()\n\t{\n\t\tConnectivityManager connectivityManager = (ConnectivityManager) this\n\t\t\t\t.getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\tif (connectivityManager != null)\n\t\t{\n\t\t\tNetworkInfo[] info = connectivityManager.getAllNetworkInfo();\n\t\t\tif (info != null)\n\t\t\t{\n\t\t\t\tfor (int i = 0; i < info.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif (info[i].getState() == NetworkInfo.State.CONNECTED)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn false;\n\t}", "public static boolean hasInternetConnection(final Context context) {\n final ConnectivityManager connectivityManager = (ConnectivityManager) context.\n getSystemService(Context.CONNECTIVITY_SERVICE);\n\n final Network network = connectivityManager.getActiveNetwork();\n final NetworkCapabilities capabilities = connectivityManager\n .getNetworkCapabilities(network);\n\n return capabilities != null\n && capabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED);\n }", "private boolean isNetworkAvailable(Context context) {\n ConnectivityManager connectivity = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n if (connectivity != null) {\n NetworkInfo[] info = connectivity.getAllNetworkInfo();\n if (info != null) {\n for (int i = 0; i < info.length; i++) {\n Log.v(LOGTAG, String.valueOf(i));\n if (info[i].getState() == NetworkInfo.State.CONNECTED) {\n Log.v(LOGTAG, \"connected!\");\n return true;\n }\n }\n }\n }\n return false;\n }", "public boolean isNetworkAvailable() {\n ConnectivityManager connectivityManager = (ConnectivityManager) BaseActivity.this.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "public static boolean isConnect() {\n try {\n if (!isConnectingToInternet()) {\n // Internet Connection is not present\n Toast.makeText(context, \"Please Check your connection\", Toast.LENGTH_LONG).show();\n return false;\n }\n } catch (Exception e) {\n\n }\n return true;\n }", "private boolean isDeviceConnectedToInternet() {\n ConnectivityManager cm =\n (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n return activeNetwork != null && activeNetwork.isConnectedOrConnecting();\n }", "public Boolean isNetworkAvailable() {\n\t\tConnectivityManager connectivityManager = (ConnectivityManager) getActivity()\n\t\t\t\t.getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\t\n\t NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n\t return activeNetworkInfo != null && activeNetworkInfo.isConnectedOrConnecting();\n\t}", "boolean hasAvailableConnection();", "private boolean isNetworkStatusAvialable(Context applicationContext) {\n ConnectivityManager connectivityManager = (ConnectivityManager) getBaseContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n if (connectivityManager != null) {\n NetworkInfo netInfos = connectivityManager.getActiveNetworkInfo();\n if (netInfos != null)\n if (netInfos.isConnected())\n\n return true;\n\n }\n\n return false;\n }", "public void checkNetworkStatus() {\n if (this.mCheckNetworkStateTask == null) {\n this.mCheckNetworkStateTask = new CheckNetworkStateTask(this);\n this.mCheckNetworkStateTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new ArrayList[]{this.mServerList});\n }\n }", "public boolean networkCheck(String region) throws IOException {\r\n // Debug mode can be run offline.\r\n if(DEBUG) {\r\n return true;\r\n }\r\n \r\n try {\r\n getServerStatusData();\r\n networkOK = true;\r\n return true;\r\n }\r\n catch(UnknownHostException e) {\r\n System.out.println(e);\r\n networkOK = false;\r\n return false;\r\n }\r\n }", "public boolean isNetworkAvailable() {\n ConnectivityManager connectivity = (ConnectivityManager) getApplicationContext()\n .getSystemService(Context.CONNECTIVITY_SERVICE);\n if (connectivity != null) {\n NetworkInfo[] info = connectivity.getAllNetworkInfo();\n for (NetworkInfo anInfo : info)\n if (anInfo.getDetailedState() == NetworkInfo.DetailedState.CONNECTED) {\n return true;\n }\n }\n return false;\n }", "public void checkConnection() {\n\t\tif (isOnline()) {\n\t\t\tgetFirsTopRatedMovies();\n\t\t} else {\n\t\t\tprogress.setVisibility(View.GONE);\n\t\t\tlayout_nothing_to_show.setVisibility(View.VISIBLE);\n\t\t\tToast.makeText(this, getString(R.string.no_netowrk), Toast.LENGTH_SHORT).show();\n\t\t}\n\t}", "private boolean serviceIsAvailable(String urlStr) {\r\n\r\n\t\tint respCode = 0;\r\n\t\tURL url;\r\n\t\tint testingTimeout = 3000;\r\n\t\t\r\n\t\ttry {\r\n\t\t\turl = new URL(urlStr);\r\n\r\n\t\t\tHttpURLConnection huc = (HttpURLConnection) url.openConnection();\r\n\t\t\thuc.setRequestMethod(\"POST\");\r\n\r\n\t\t\t/*\r\n\t\t\t * Time out set to 3 seconds, checked at 4 seconds, response should\r\n\t\t\t * be almost instant so this can be hardcoded in this method.\r\n\t\t\t */\r\n\t\t\thuc.setConnectTimeout(testingTimeout);\r\n\t\t\thuc.setReadTimeout(testingTimeout + 1000);\r\n\t\t\thuc.connect();\r\n\t\t\t\r\n\t\t\trespCode = huc.getResponseCode();\r\n\r\n\t\t\tif (this.debug) {\r\n\t\t\t\tprintln(\"Response code from \" + urlStr + \" is \" + respCode);\r\n\t\t\t}\r\n\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\tprintln(\"MalformedURLException from \" + urlStr\r\n\t\t\t\t\t+ \" : Response code is \" + respCode);\r\n\t\t\treturn false;\r\n\t\t} catch (SocketTimeoutException s) {\r\n\t\t\tprintln(\"Timeout occurred when checking availability of Speech Synthesis service at...\\n\"\r\n\t\t\t\t\t+ urlStr);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tprintln(\"IOException (other than Connection Timeout) from \" + urlStr\r\n\t\t\t\t\t+ \" is \" + respCode);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (respCode == 200) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}", "private boolean isOnline() {\n ConnectivityManager connect = (ConnectivityManager) this.getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = connect.getActiveNetworkInfo();\n if(netInfo != null && netInfo.isConnected()){\n return true;\n }\n return false;\n }", "public abstract boolean isAvailable();", "public abstract boolean isAvailable();", "public static boolean isInternetOn(Activity context) {\n boolean isActive = false;\n\n ConnectivityManager connec = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n if (connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.CONNECTED ||\n connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.CONNECTING ||\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.CONNECTING ||\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.CONNECTED) {\n\n isActive = true;\n } else if (\n\n connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.DISCONNECTED ||\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.DISCONNECTED) {\n\n isActive = false;\n }\n\n\n return isActive;\n }" ]
[ "0.82123053", "0.7837591", "0.774776", "0.76863253", "0.76456815", "0.754592", "0.7542287", "0.7469294", "0.744445", "0.7399315", "0.7378896", "0.73369443", "0.73368305", "0.7329604", "0.73201287", "0.7316622", "0.7308129", "0.72725147", "0.7266299", "0.7258339", "0.7254839", "0.7251735", "0.7242104", "0.72401947", "0.72288275", "0.7207802", "0.71970344", "0.7188732", "0.718276", "0.7174122", "0.7174122", "0.7174122", "0.7174122", "0.7164961", "0.7164339", "0.71580464", "0.71580464", "0.71580464", "0.71580464", "0.7153189", "0.71496516", "0.71411467", "0.71127415", "0.7083767", "0.70797235", "0.7074155", "0.7069674", "0.70630115", "0.70627046", "0.70627046", "0.7055611", "0.7051388", "0.7039652", "0.7033266", "0.7019157", "0.7011004", "0.70100087", "0.7006232", "0.69987077", "0.699795", "0.6973314", "0.69718313", "0.69703895", "0.6966472", "0.69589347", "0.69522333", "0.6946317", "0.6933552", "0.6925382", "0.69138664", "0.6907773", "0.69004613", "0.6888611", "0.6874904", "0.68713295", "0.6857729", "0.6848673", "0.6847269", "0.68398136", "0.68354344", "0.6814672", "0.6792715", "0.6787389", "0.6785304", "0.67807776", "0.67733663", "0.67682976", "0.6765631", "0.67646444", "0.6728934", "0.67288667", "0.67286694", "0.67264116", "0.67226297", "0.6711875", "0.670778", "0.66979504", "0.6692626", "0.6692626", "0.6690532" ]
0.77784663
2
FIXME, copy each file ourselfs, to prevent copying .svn files.
static IFolder createWorkspaceFolderFromBundle(String srcpath, IContainer parent, String destname) throws CoreException, URISyntaxException, IOException { Bundle bundle = Platform.getBundle(DeeTestsPlugin.PLUGIN_ID); IPath bundlesrcpath = new Path(DeeTestsPlugin.TESTDATA + srcpath); URL sampleURL = FileLocator.find(bundle, bundlesrcpath, null); IFolder folder = parent.getFolder(new Path("__"+destname+"link")); folder.createLink(FileLocator.toFileURL(sampleURL).toURI(), IResource.NONE, null); IPath projpath = parent.getFullPath(); folder.copy(projpath.append(destname), false, null); folder.delete(false, null); return parent.getFolder(new Path(destname)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void copyFiles() {\n if( !USE_EXTERNAL_FILES_DIR ) return;\n boolean ret = mFileUtil.copyFilesAssetToExternalFilesDir( FILE_EXT );\n if(ret) {\n showList();\n showToast(\"copy successful\");\n } else {\n showToast(\"copy faild\");\n }\n}", "public static synchronized void initializeArchiveFiles() {\n System.out.println(Thread.currentThread().getName() + \"********************************************************* TestHelper.initializeArchiveFiles\");\n File sourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"QVCSEnterpriseServer.kbwb\");\n String firstDestinationDirName = System.getProperty(USER_DIR)\n + File.separator\n + QVCSConstants.QVCS_PROJECTS_DIRECTORY\n + File.separator\n + getTestProjectName();\n File firstDestinationDirectory = new File(firstDestinationDirName);\n firstDestinationDirectory.mkdirs();\n File firstDestinationFile = new File(firstDestinationDirName + File.separator + \"QVCSEnterpriseServer.kbwb\");\n\n String secondDestinationDirName = firstDestinationDirName + File.separator + SUBPROJECT_DIR_NAME;\n File secondDestinationDirectory = new File(secondDestinationDirName);\n secondDestinationDirectory.mkdirs();\n File secondDestinationFile = new File(secondDestinationDirName + File.separator + \"QVCSEnterpriseServer.kbwb\");\n\n String thirdDestinationDirName = secondDestinationDirName + File.separator + SUBPROJECT2_DIR_NAME;\n File thirdDestinationDirectory = new File(thirdDestinationDirName);\n thirdDestinationDirectory.mkdirs();\n File thirdDestinationFile = new File(thirdDestinationDirName + File.separator + \"ThirdDirectoryFile.kbwb\");\n\n File fourthDestinationFile = new File(firstDestinationDirName + File.separator + \"Server.kbwb\");\n File fifthDestinationFile = new File(firstDestinationDirName + File.separator + \"AnotherServer.kbwb\");\n File sixthDestinationFile = new File(firstDestinationDirName + File.separator + \"ServerB.kbwb\");\n File seventhDestinationFile = new File(firstDestinationDirName + File.separator + \"ServerC.kbwb\");\n try {\n ServerUtility.copyFile(sourceFile, firstDestinationFile);\n ServerUtility.copyFile(sourceFile, secondDestinationFile);\n ServerUtility.copyFile(sourceFile, thirdDestinationFile);\n ServerUtility.copyFile(sourceFile, fourthDestinationFile);\n ServerUtility.copyFile(sourceFile, fifthDestinationFile);\n ServerUtility.copyFile(sourceFile, sixthDestinationFile);\n ServerUtility.copyFile(sourceFile, seventhDestinationFile);\n } catch (IOException ex) {\n Logger.getLogger(TestHelper.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private static void updateFiles(Gitlet currCommit) {\n HashMap<String, String> currHeadFiles = currCommit.tree.getHeadCommit()\n .getFileLoc();\n currCommit.tree.setMap(currHeadFiles);\n for (String fileName : currHeadFiles.keySet()) {\n FileManip temp = new FileManip(currHeadFiles.get(fileName));\n temp.copyFile(fileName);\n }\n\n }", "private void updateFiles() {\n\t}", "protected abstract boolean copyCheckedFiles();", "protected List <WebFile> getSourceDirChildFiles()\n{\n // Iterate over source dir and add child packages and files\n List children = new ArrayList();\n for(WebFile child : getFile().getFiles()) {\n if(child.isDir() && child.getType().length()==0)\n addPackageDirFiles(child, children);\n else children.add(child);\n }\n \n return children;\n}", "public void copyUserLibFiles(File srcDir, File trgDir) {\n //- get the appropriate list of lib files to exclude\n String osName = System.getProperty(\"os.name\");\n String pkgName = this.getClass().getPackage().getName();\n String excludeFile = pkgName + \".unixV2LibExcludeList\";\n if (osName.indexOf(\"Windows\") != -1) {\n excludeFile = pkgName + \".winV2LibExcludeList\";\n } else if (osName.indexOf(\"Mac\") != -1) {\n excludeFile = pkgName + \".macV2LibExcludeList\";\n }\n String verEd = CommonInfoModel.getInstance().getSource().getVersionEdition();\n if (verEd.startsWith(UpgradeConstants.VERSION_3_0)) {\n excludeFile = excludeFile.replaceFirst(\"V2\", \"V3\");\n }\n\n try {\n String excludeF = excludeFile.replace('.', '/') + \".properties\";\n UpgradeFileFilter fs = new UpgradeFileFilter(excludeF);\n File[] l = srcDir.listFiles(fs);\n\n for (File tmpF : l) {\n if (tmpF.isDirectory()) {\n try {\n File tmpDir = new File(trgDir, tmpF.getName());\n tmpDir.mkdir();\n copyDirectory(tmpF, tmpDir);\n logger.log(Level.INFO,\n stringManager.getString(\"upgrade.common.copied_dir\", tmpDir.getName()));\n } catch (IOException ioe) {\n logger.log(Level.SEVERE,\n stringManager.getString(\"upgrade.common.lib_copy_error\", ioe));\n }\n } else {\n try {\n File tmpFile = new File(trgDir, tmpF.getName());\n copyFile(tmpF.getCanonicalPath(), tmpFile.getCanonicalPath());\n logger.log(Level.INFO,\n stringManager.getString(\"upgrade.common.copied_file\", tmpFile.getName()));\n } catch (IOException ioe) {\n logger.log(Level.SEVERE,\n stringManager.getString(\"upgrade.common.lib_copy_error\", ioe));\n }\n }\n }\n } catch (FileNotFoundException e) {\n logger.log(Level.SEVERE,\n stringManager.getString(\"upgrade.common.lib_exclude_error\", e));\n } catch (IOException io) {\n logger.log(Level.SEVERE,\n stringManager.getString(\"upgrade.common.lib_exclude_error\", io));\n } catch (NullPointerException ne) {\n logger.log(Level.SEVERE,\n stringManager.getString(\"upgrade.common.lib_exclude_error\", ne.toString()));\n }\n }", "private static void copyFile(File scrFile, File file) {\n\t\r\n}", "private void copySTLs()\n\t{\n\t\tint u = 0;\n\t\tfor(int i = 0; i < astl.size(); i++)\n\t\t{\n\t\t\tfor(int subMod1 = 0; subMod1 < astl.get(i).size(); subMod1++)\n\t\t\t{\n\t\t\t\tString s = astl.get(i).fileItCameFrom(subMod1);\n\t\t\t\tastl.get(i).setUnique(subMod1, u);\n\t\t\t\tfor(int j = 0; j < i; j++)\n\t\t\t\t{\n\t\t\t\t\tfor(int subMod2 = 0; subMod2 < astl.get(j).size(); subMod2++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(s.equals(astl.get(j).fileItCameFrom(subMod2)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tastl.get(i).setUnique(subMod1, astl.get(j).getUnique(subMod2));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(astl.get(i).getUnique(subMod1) == u)\n\t\t\t\t{\n\t\t\t\t\tcopyFile(s, rfoDir + stlName(u));\n\t\t\t\t\tu++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t}", "private static void copyFiles(File source, File dest) throws IOException {\n\t\tif(!source.equals(dest))\n\t\t\tFileUtils.copyFile(source, dest);\n\t}", "public interface GetPath {\n //path是svn中的地址,realpath是class的路径\n public void copyFileAndFloder(String[] paths, String realPath);\n}", "private void checkOutFiles(HashMap<String, Blob> allFiles,\n HashMap<String, Blob> curFile)\n throws IOException {\n for (String fileName: allFiles.keySet()) {\n File fileInCWD = new File(Main.CWD, fileName);\n String content = allFiles.get(fileName).getContent();\n checkUntracked(fileName, curFile);\n if (!fileInCWD.exists()) {\n fileInCWD.createNewFile();\n }\n Utils.writeContents(fileInCWD, content);\n }\n for (String fileName: curFile.keySet()) {\n Blob ourBlob = allFiles.get(fileName);\n if (ourBlob == null) {\n File fileInCWD = new File(Main.CWD, fileName);\n if (fileInCWD.exists()) {\n fileInCWD.delete();\n }\n }\n }\n }", "public List <WebFile> getChildFiles()\n{\n if(_type==FileType.SOURCE_DIR) return getSourceDirChildFiles();\n return _file.getFiles();\n}", "static void processSVNFiles(final ThreadContext context, final Repository repository, final Configuration config, final String path, final long previousRevision, long latestRevision) throws SVNException\r\n {\r\n /*\r\n * Gets the contents of the directory specified by path at the latest\r\n * revision (for this purpose -1 is used here as the revision number to\r\n * mean HEAD-revision) getDir returns a Collection of SVNDirEntry\r\n * elements. SVNDirEntry represents information about the directory\r\n * entry. Here this information is used to get the entry name, the name\r\n * of the person who last changed this entry, the number of the revision\r\n * when it was last changed and the entry type to determine whether it's\r\n * a directory or a file. If it's a directory listEntries steps into a\r\n * next recursion to display the contents of this directory. The third\r\n * parameter of getDir is null and means that a user is not interested\r\n * in directory properties. The fourth one is null, too - the user\r\n * doesn't provide its own Collection instance and uses the one returned\r\n * by getDir.\r\n */\r\n\r\n SVNRepository svnRepository = context.getSVNRepository();\r\n final RendererMap renderers = config.getRenderers();\r\n\r\n //noinspection unchecked\r\n List<SVNDirEntry> entries = new ArrayList<>(svnRepository.getDir(path, -1, null, (Collection) null));\r\n Collections.sort(entries);\r\n List<String> directories = new ArrayList<>(entries.size());\r\n\r\n for (final SVNDirEntry entry : entries)\r\n {\r\n if (entry.getKind() == SVNNodeKind.FILE)\r\n {\r\n String name = entry.getName();\r\n int index = name.lastIndexOf('.');\r\n\r\n final String extension = index != -1 ? name.substring(index).toLowerCase() : \"\"; // No extension case\r\n final String filePath = createFilePath(path, name);\r\n\r\n if (!renderers.containsKey(extension) || !config.isAllowedFile(filePath))\r\n {\r\n addFile(_skippedFileCounts, extension);\r\n continue;\r\n }\r\n else\r\n {\r\n addFile(_checkedFileCounts, extension);\r\n }\r\n\r\n LicenseRenderer renderer = renderers.get(extension);\r\n\r\n try\r\n {\r\n svnRepository.log(new String[]{filePath}, previousRevision, latestRevision, false, false, 1, svnLogEntry -> {\r\n File file = new File(repository.getSourceDir(), filePath);\r\n Extractor extractor = config.getExtractor(context);\r\n Date createDate = extractor.getYear1(filePath, svnLogEntry);\r\n String year2 = context.getYear(extractor.getYear2(filePath, entry));\r\n String author = extractor.getAuthor(filePath, svnLogEntry);\r\n\r\n readRepoFile(file, filePath, renderer, createDate, year2, author, context, repository);\r\n });\r\n }\r\n catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }\r\n else if (entry.getKind() == SVNNodeKind.DIR)\r\n {\r\n String filePath = createFilePath(path, entry.getName());\r\n\r\n if (config.isAllowedDirectory(filePath))\r\n directories.add(filePath);\r\n }\r\n }\r\n\r\n for (String directory : directories)\r\n exec.execute(new SVNLicenseRunnable(repository, config, directory, previousRevision, latestRevision));\r\n }", "private void processBulk()\n {\n File inDir = new File(m_inDir);\n String [] fileList = inDir.list();\n \n for (int j=0; j<fileList.length; j++)\n {\n String file = fileList[j];\n if (file.endsWith(\".xml\"))\n {\n m_inFile = m_inDir + \"/\" + file;\n m_localeStr = Utilities.extractLocaleFromFilename(file);\n processSingle();\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void copyDocFiles() {\n\t\tPackageDoc containingPackage = classDoc.containingPackage();\n\t\tif ((configuration.packages == null || Arrays.binarySearch(configuration.packages, containingPackage) < 0)\n\t\t\t\t&& !containingPackagesSeen.contains(containingPackage.name())) {\n\t\t\t// Only copy doc files dir if the containing package is not\n\t\t\t// documented AND if we have not documented a class from the same\n\t\t\t// package already. Otherwise, we are making duplicate copies.\n\t\t\tUtil.copyDocFiles(\n\t\t\t\t\tconfiguration,\n\t\t\t\t\tUtil.getPackageSourcePath(configuration, classDoc.containingPackage())\n\t\t\t\t\t\t\t+ DirectoryManager.getDirectoryPath(classDoc.containingPackage())\n\t\t\t\t\t\t\t+ File.separator, DocletConstants.DOC_FILES_DIR_NAME, true);\n\t\t\tcontainingPackagesSeen.add(containingPackage.name());\n\t\t}\n\t}", "public boolean copy(File fileToLoadOrig, boolean withDuplicate, List<String> passedFiles) {\n //Let us get the current Date\n Date date = new Date();\n LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n int year = localDate.getYear();\n int month = localDate.getMonthValue();\n int day = localDate.getDayOfMonth();\n\n String destDirectoryPath = year + \"-\" + month + \"-\" + day;\n\n //check if directory is created\n\n File destDirecoty = new File(\"./testing/dest/\" + destDirectoryPath);\n System.out.println(\"the file path:\" + destDirecoty.getAbsolutePath());\n\n if (!destDirecoty.exists()) {\n System.out.println(\"creating a new directory with path:\" + destDirecoty.getAbsolutePath());\n boolean created = destDirecoty.mkdirs();\n System.out.println(\"is file created:\" + created);\n }\n System.out.println(\"Directory is created\");\n //Great, now let us check if the file already in the dirctory\n\n\n boolean duplicateFound = false;\n\n\n File[] sourceFiles = fileToLoadOrig.listFiles();\n\n for (File sourceFile : sourceFiles) {\n //let us get the file extension\n String sourceFileType = \"\";\n int location = sourceFile.getName().lastIndexOf('.');\n if (location > 0) {\n sourceFileType = sourceFile.getName().substring(location + 1);\n }\n //cool, let us go on\n String nestedDirectory;\n switch (sourceFileType) {\n case \"txt\":\n nestedDirectory = \"txt\";\n break;\n case \"pdf\":\n nestedDirectory = \"pdf\";\n break;\n case \"xls\":\n nestedDirectory = \"xls\";\n default:\n nestedDirectory = \"others\";\n }\n\n //check if the type directory is created or not\n File nestedDirecotyFile = new File(destDirecoty.getAbsolutePath()+\"/\" + nestedDirectory);\n System.out.println(\"the file path:\" + nestedDirecotyFile.getAbsolutePath());\n\n if (!nestedDirecotyFile.exists()) {\n System.out.println(\"creating a new directory with path:\" + nestedDirecotyFile.getAbsolutePath());\n boolean created = nestedDirecotyFile.mkdirs();\n System.out.println(\"is file created:\" + created);\n }\n\n\n\n File[] destinationFiles = nestedDirecotyFile.listFiles();\n\n for (File destinationFile : destinationFiles) {\n if (destinationFile.getName().equals(sourceFile.getName())) {\n if (withDuplicate) {\n int maxSeqNum = 0;\n //Let us find the last sequence of the destinationFile\n for (File fileForDuplicate : destinationFiles) {\n String[] fileParts = fileForDuplicate.getName().split(\"_\");\n if (fileParts.length == 2) {\n //got a split\n if (fileParts[0].equals(destinationFile.getName())) {\n maxSeqNum = Math.max(maxSeqNum, Integer.parseInt(fileParts[1]));\n }\n }else{\n new RuntimeException(\"Files were found with multiple _\");\n }\n }\n String newFilePath = sourceFile.getName() + \"_\" + (maxSeqNum + 1);\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + newFilePath));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n } else {\n // let us delete the destinationFile and replace it\n destinationFile.delete();\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n break;\n } else {\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n }\n\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n\n }\n return true;\n }", "@Test\n public void testCopyFileUsingJavaFiles() throws Exception {\n long start = System.nanoTime();\n CopyFile.copyFileUsingJavaFiles(sourceFile, filesDestFile);\n System.out.println(\"Time taken by files using:\" + (System.nanoTime() - start) / 1000);\n }", "GitFile[] getFilesImpl() throws Exception\n {\n TreeWalk twalk = new TreeWalk(getRepo()); twalk.addTree(_rev);\n List <GitFile> files = new ArrayList();\n while(twalk.next()) {\n ObjectId id = twalk.getObjectId(0);\n RevObject rid = getRevObject(id);\n String path = _path + (_path.length()>1? \"/\" : \"\") + twalk.getNameString();\n GitFile child = rid instanceof RevTree? new GitTree((RevTree)rid, path) : new GitBlob((RevBlob)rid, path);\n files.add(child);\n }\n return files.toArray(new GitFile[files.size()]);\n }", "public static void getListOfAllFileVarianta2() {\n\t\tPath pathToSrc = Paths.get(\"D:\\\\TorrentsMd\");\r\n\t\ttry {\r\n\t\t\t//cu method references\r\n//\t\t\tFiles.walk(pathToSrc)\r\n//\t\t\t\t.map(Path::toFile)\r\n//\t\t\t\t.filter(File::isFile)\r\n//\t\t\t\t.map(File::getName)\r\n//\t\t\t\t.sorted()\r\n//\t\t\t\t.forEach(System.out::println);\r\n\t\t\t\r\n\t\t\t//cu lambda, dar dpdv semantic sunt identice\r\n\t\t\tFiles.walk(pathToSrc)\r\n\t\t\t\t .map(path -> path.toFile()) //trasnform fiecare Path din stream intr-un File\r\n\t\t\t\t .filter(file -> file.isFile()) //filtrez doar fisierele\r\n\t\t\t\t .map(file -> file.getName())//transform fiecare File din stream intr-un String, care e numele sau\r\n\t\t\t\t .sorted()\r\n\t\t\t\t .forEach(file -> System.out.println(file));\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public abstract List<LocalFile> getAllFiles();", "public Map<String,List<RevisionFile>> getSourceFiles();", "private static void copyFile(File in, File out)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFileChannel inChannel = new\tFileInputStream(in).getChannel();\n\t\t\tFileChannel outChannel = new FileOutputStream(out).getChannel();\n\t\t\tinChannel.transferTo(0, inChannel.size(), outChannel);\n\t\t\tinChannel.close();\n\t\t\toutChannel.close();\t\t\t\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.copyFile(): \" + e);\n\t\t}\n\n\t}", "private List<String> copyResources(File targetDirectory, List<FileSet> fileSets) throws MojoExecutionException {\n ArrayList<String> addedFiles = new ArrayList<String>();\n for (FileSet fileSet : fileSets) {\n // Get the absolute base directory for the FileSet\n File sourceDirectory = new File(fileSet.getDirectory());\n\n if (!sourceDirectory.isAbsolute()) {\n sourceDirectory = new File(project.getBasedir(), sourceDirectory.getPath());\n }\n\n if (!sourceDirectory.exists()) {\n // If the requested directory does not exist, log it and carry on\n getLog().warn(\"Specified source directory \" + sourceDirectory.getPath() + \" does not exist.\");\n continue;\n }\n\n List<String> includedFiles = scanFileSet(sourceDirectory, fileSet);\n addedFiles.addAll(includedFiles);\n\n getLog().info(\"Copying \" + includedFiles.size() + \" additional resource\" + (includedFiles.size() > 1 ? \"s\" : \"\"));\n\n for (String destination : includedFiles) {\n File source = new File(sourceDirectory, destination);\n File destinationFile = new File(targetDirectory, destination);\n\n // Make sure that the directory we are copying into exists\n destinationFile.getParentFile().mkdirs();\n\n try {\n FileUtils.copyFile(source, destinationFile);\n destinationFile.setExecutable(fileSet.isExecutable(),false);\n\n } catch (IOException e) {\n throw new MojoExecutionException(\"Error copying additional resource \" + source, e);\n }\n }\n }\n return addedFiles;\n }", "private void removeOldFiles() {\n Set<File> existingFiles = new HashSet<File>();\n collectFiles(existingFiles);\n for (ResourceResponse r : cacheResponseProcessor.getResources()) {\n String remotePathId = r.pathId;\n String remotePath = localClasspathProcessor.getLocalClasspath().get(remotePathId);\n String localPath = localPathTranslation.get(remotePath);\n File localFile = new File(localPath);\n File file = new File(localFile, r.name);\n existingFiles.remove(file);\n }\n }", "private void copyFiles(String Language) {\n try {\n String filepath = mDataPath + \"/tessdata/\" + Language + \".traineddata\";\n AssetManager assetManager = getAssets();\n InputStream instream = assetManager.open(\"tessdata/\"+Language+\".traineddata\");\n OutputStream outstream = new FileOutputStream(filepath);\n byte[] buffer = new byte[1024];\n int read;\n while ((read = instream.read(buffer)) != -1) {\n outstream.write(buffer, 0, read);\n }\n outstream.flush();\n outstream.close();\n instream.close();\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static void copyFile(String from, String to)\n\t{\n\t\tFile inputFile;\n\t File outputFile;\n\t\tint fIndex = from.indexOf(\"file:\");\n\t\tint tIndex = to.indexOf(\"file:\");\n\t\tif(fIndex < 0)\n\t\t\tinputFile = new File(from);\n\t\telse\n\t\t\tinputFile = new File(from.substring(fIndex + 5, from.length()));\n\t\tif(tIndex < 0)\n\t\t\toutputFile = new File(to);\n\t\telse\n\t\t\toutputFile = new File(to.substring(tIndex + 5, to.length())); \n\t\tcopyFile(inputFile, outputFile);\t\t\n\t}", "private List<String> newChangNotStaged(HashMap<String, Blob> allFiles) {\n ArrayList<String> result = new ArrayList<>();\n for (String fileName: Utils.plainFilenamesIn(Main.CWD)) {\n Blob ourBlob = allFiles.get(fileName);\n File fileInCWD = new File(Main.CWD, fileName);\n String content = Utils.readContentsAsString(fileInCWD);\n if (ourBlob != null) {\n if (!ourBlob.getContent().equals(content)\n && !isStaged(fileName)) {\n String elem = fileName + \" (modified)\";\n result.add(elem);\n }\n allFiles.remove(fileName);\n }\n }\n return result;\n }", "public static synchronized void initializeApacheCompareTestArchiveFiles() {\n System.out.println(Thread.currentThread().getName() + \"********************************************************* TestHelper.initializeApacheCompareTestArchiveFiles\");\n\n File oneaSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest1a.uyu\");\n File onebSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest1b.uyu\");\n\n File twoaSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest2a.uyu\");\n File twobSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest2b.uyu\");\n\n File threeaSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest3a.uyu\");\n File threebSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest3b.uyu\");\n\n File fouraSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest4a.uyu\");\n File fourbSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest4b.uyu\");\n\n File fiveaSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest5a.uyu\");\n File fivebSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest5b.uyu\");\n\n File sixaSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest6a.uyu\");\n File sixbSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest6b.uyu\");\n\n File sevenaSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest7a.uyu\");\n File sevenbSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest7b.uyu\");\n\n File eightaSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest8a.uyu\");\n File eightbSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest8b.uyu\");\n\n File nineaSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest9a.uyu\");\n File ninebSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest9b.uyu\");\n\n File tenaSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest10a.uyu\");\n File tenbSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest10b.uyu\");\n\n File twelveaSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest12a.uyu\");\n File twelvebSourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"CompareTest12b.uyu\");\n\n String destinationDirName = System.getProperty(USER_DIR)\n + File.separator\n + QVCSConstants.QVCS_PROJECTS_DIRECTORY\n + File.separator\n + getTestProjectName();\n\n File firstDestinationDirectory = new File(destinationDirName);\n firstDestinationDirectory.mkdirs();\n\n File oneaDestinationFile = new File(destinationDirName + File.separator + \"CompareTest1a.uyu\");\n File onebDestinationFile = new File(destinationDirName + File.separator + \"CompareTest1b.uyu\");\n\n File twoaDestinationFile = new File(destinationDirName + File.separator + \"CompareTest2a.uyu\");\n File twobDestinationFile = new File(destinationDirName + File.separator + \"CompareTest2b.uyu\");\n\n File threeaDestinationFile = new File(destinationDirName + File.separator + \"CompareTest3a.uyu\");\n File threebDestinationFile = new File(destinationDirName + File.separator + \"CompareTest3b.uyu\");\n\n File fouraDestinationFile = new File(destinationDirName + File.separator + \"CompareTest4a.uyu\");\n File fourbDestinationFile = new File(destinationDirName + File.separator + \"CompareTest4b.uyu\");\n\n File fiveaDestinationFile = new File(destinationDirName + File.separator + \"CompareTest5a.uyu\");\n File fivebDestinationFile = new File(destinationDirName + File.separator + \"CompareTest5b.uyu\");\n\n File sixaDestinationFile = new File(destinationDirName + File.separator + \"CompareTest6a.uyu\");\n File sixbDestinationFile = new File(destinationDirName + File.separator + \"CompareTest6b.uyu\");\n\n File sevenaDestinationFile = new File(destinationDirName + File.separator + \"CompareTest7a.uyu\");\n File sevenbDestinationFile = new File(destinationDirName + File.separator + \"CompareTest7b.uyu\");\n\n File eightaDestinationFile = new File(destinationDirName + File.separator + \"CompareTest8a.uyu\");\n File eightbDestinationFile = new File(destinationDirName + File.separator + \"CompareTest8b.uyu\");\n\n File nineaDestinationFile = new File(destinationDirName + File.separator + \"CompareTest9a.uyu\");\n File ninebDestinationFile = new File(destinationDirName + File.separator + \"CompareTest9b.uyu\");\n\n File tenaDestinationFile = new File(destinationDirName + File.separator + \"CompareTest10a.uyu\");\n File tenbDestinationFile = new File(destinationDirName + File.separator + \"CompareTest10b.uyu\");\n\n File twelveaDestinationFile = new File(destinationDirName + File.separator + \"CompareTest12a.uyu\");\n File twelvebDestinationFile = new File(destinationDirName + File.separator + \"CompareTest12b.uyu\");\n\n try {\n ServerUtility.copyFile(oneaSourceFile, oneaDestinationFile);\n ServerUtility.copyFile(onebSourceFile, onebDestinationFile);\n\n ServerUtility.copyFile(twoaSourceFile, twoaDestinationFile);\n ServerUtility.copyFile(twobSourceFile, twobDestinationFile);\n\n ServerUtility.copyFile(threeaSourceFile, threeaDestinationFile);\n ServerUtility.copyFile(threebSourceFile, threebDestinationFile);\n\n ServerUtility.copyFile(fouraSourceFile, fouraDestinationFile);\n ServerUtility.copyFile(fourbSourceFile, fourbDestinationFile);\n\n ServerUtility.copyFile(fiveaSourceFile, fiveaDestinationFile);\n ServerUtility.copyFile(fivebSourceFile, fivebDestinationFile);\n\n ServerUtility.copyFile(sixaSourceFile, sixaDestinationFile);\n ServerUtility.copyFile(sixbSourceFile, sixbDestinationFile);\n\n ServerUtility.copyFile(sevenaSourceFile, sevenaDestinationFile);\n ServerUtility.copyFile(sevenbSourceFile, sevenbDestinationFile);\n\n ServerUtility.copyFile(eightaSourceFile, eightaDestinationFile);\n ServerUtility.copyFile(eightbSourceFile, eightbDestinationFile);\n\n ServerUtility.copyFile(nineaSourceFile, nineaDestinationFile);\n ServerUtility.copyFile(ninebSourceFile, ninebDestinationFile);\n\n ServerUtility.copyFile(tenaSourceFile, tenaDestinationFile);\n ServerUtility.copyFile(tenbSourceFile, tenbDestinationFile);\n\n ServerUtility.copyFile(twelveaSourceFile, twelveaDestinationFile);\n ServerUtility.copyFile(twelvebSourceFile, twelvebDestinationFile);\n\n } catch (IOException ex) {\n Logger.getLogger(TestHelper.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private static INodeFile[] verifySrcFiles(FSDirectory fsd, String[] srcs,\n INodesInPath targetIIP, FSPermissionChecker pc) throws IOException {\n Set<INodeFile> si = new LinkedHashSet<>();\n final INodeFile targetINode = targetIIP.getLastINode().asFile();\n final INodeDirectory targetParent = targetINode.getParent();\n // now check the srcs\n for (String src : srcs) {\n final INodesInPath iip = fsd.getINodesInPath4Write(src);\n // permission check for srcs\n if (pc != null) {\n fsd.checkPathAccess(pc, iip, FsAction.READ); // read the file\n fsd.checkParentAccess(pc, iip, FsAction.WRITE); // for delete\n }\n\n final INode srcINode = iip.getLastINode();\n final INodeFile srcINodeFile = INodeFile.valueOf(srcINode, src);\n // make sure the src file and the target file are in the same dir\n if (srcINodeFile.getParent() != targetParent) {\n throw new HadoopIllegalArgumentException(\"Source file \" + src\n + \" is not in the same directory with the target \"\n + targetIIP.getPath());\n }\n // source file cannot be the same with the target file\n if (srcINode == targetINode) {\n throw new HadoopIllegalArgumentException(\"concat: the src file \" + src\n + \" is the same with the target file \" + targetIIP.getPath());\n }\n\n if(srcINodeFile.getStoragePolicyID() == HdfsConstants.DB_STORAGE_POLICY_ID) {\n throw new HadoopIllegalArgumentException(\"concat: source file \" + src\n + \" is stored in DB.\");\n }\n\n // source file cannot be under construction or empty\n if(srcINodeFile.isUnderConstruction() || srcINodeFile.numBlocks() == 0) {\n throw new HadoopIllegalArgumentException(\"concat: source file \" + src\n + \" is invalid or empty or underConstruction\");\n }\n // source file's preferred block size cannot be greater than the target\n // file\n if (srcINodeFile.getPreferredBlockSize() >\n targetINode.getPreferredBlockSize()) {\n throw new HadoopIllegalArgumentException(\"concat: source file \" + src\n + \" has preferred block size \" + srcINodeFile.getPreferredBlockSize()\n + \" which is greater than the target file's preferred block size \"\n + targetINode.getPreferredBlockSize());\n }\n si.add(srcINodeFile);\n }\n \n // make sure no two files are the same\n if (si.size() < srcs.length) {\n // it means at least two files are the same\n throw new HadoopIllegalArgumentException(\n \"concat: at least two of the source files are the same\");\n }\n return si.toArray(new INodeFile[si.size()]);\n }", "private void copyWebDaveItem(final ArrayList<WebDavItemEntity> copyWebDavItemEntities){\n\t\tboolean isHaveSameFolderPath = isHaveSameFolderPath(copyWebDavItemEntities, currentPath);\n\t\tif (isHaveSameFolderPath) {\n\t\t\tisStopCopy = true;\n\t\t\tToast.makeText(getActivity().getApplicationContext(),\n\t\t\t\t\t\"Can not copy self folder into self folder...\", Toast.LENGTH_LONG).show();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tshowHandleWebDavItemProgressDialog(\"Coping files...\");\n\t\tcurrentNumber = 0;\n\t\ttotalTextView.setText(Integer.toString(copyWebDavItemEntities.size()));\n\t\thandleProgressBar.setMax(copyWebDavItemEntities.size());\n\t\tisStopCopy = false;\n\t\t\n\t\tcopyWebDavItemThread = new Thread(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t\thandleProgressBar.setProgress(0);\n\n\t\t\t\tfor (WebDavItemEntity copyWebDavItemEntity : copyWebDavItemEntities) {\n\t\t\t\t\t\n\t\t\t\t\t// Stop copy \n\t\t\t\t\tif (isStopCopy) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfinal String webDavItemName = copyWebDavItemEntity.getName();\n\t\t\t\t\t\n\t\t\t\t\tgetActivity().runOnUiThread(new Runnable() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tcurrentNumber++;\n\t\t\t\t\t\t\tcurrentNumberTextView.setText(Integer.toString(currentNumber));\n\t\t\t\t\t\t\tcurrentFileNameTextView.setText(webDavItemName);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\thandleProgressBar.setProgress(currentNumber);\n\t\t\t\t\t\n\t\t\t\t\tString destinationName = webDavItemName;\n\n\t\t\t\t\tfor (WebDavItemEntity webDavItemEntity : webDavItemEntities) {\n\t\t\t\t\t\tif (webDavItemName.equals(webDavItemEntity.getName())) {\n\t\t\t\t\t\t\tdestinationName = \"copy_\" + webDavItemName;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tWebDavManager.getInstance().setAbort(false);\n\t\t\t\t\tWebDavManager.getInstance().copyWebDavItem(\n\t\t\t\t\t\t\tcopyWebDavItemEntity.getUrl(), currentPath,\n\t\t\t\t\t\t\tdestinationName);\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(500);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\tgetActivity().runOnUiThread(new Runnable() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tcloudFileListAdapter.cleanAllSelected();\n\t\t\t\t\t\tdismissHandleWebDavItemProgressDialog();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t}\n\t\t});\t\t\n\t\t\n\t\tcopyWebDavItemThread.start();\n\t\t\n\t}", "public DiskBackedProjectFilePartSet() {\r\n // make two files to use\r\n fileA = TempFileUtil.createTemporaryFile();\r\n fileB = TempFileUtil.createTemporaryFile();\r\n }", "private Step copyRemoteFiles() {\n return stepBuilderFactory.get(STEP_COPY_REMOTE_FILES)\n .tasklet(copyRemoteFilesTask)\n .build();\n }", "private static ArrayList<File> buildFilesArray() {\n ArrayList<File> result = new ArrayList<>();\n rAddFilesToArray(workingDirectory, result);\n return result;\n }", "private void getFiles() {\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(inputFileName);\n\t\t\tinputBuffer = new BufferedReader(fr);\n\n\t\t\tFileWriter fw = new FileWriter(outputFileName);\n\t\t\toutputBuffer = new BufferedWriter(fw);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File not found: \" + e.getMessage());\n\t\t\tSystem.exit(-2);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IOException \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-3);\n\t\t}\n\t}", "public void doFiles(){\r\n serversDir = new File(rootDirPath+\"/servers/\");\r\n serverList = new File(rootDirPath+\"serverList.txt\");\r\n if(!serversDir.exists()){ //if server Directory doesn't exist\r\n serversDir.mkdirs(); //create it\r\n }\r\n updateServerList();\r\n }", "public java.lang.String[] getNewFiles(){\r\n return localNewFiles;\r\n }", "private ArrayList<String> stagedButDiffInCWD() {\n ArrayList<String> result = new ArrayList<>();\n List<String> addingStage = Utils.plainFilenamesIn(INDEX);\n for (String file: addingStage) {\n File fileCWD = new File(Main.CWD, file);\n File stagedFile = new File(INDEX, file);\n if (!fileCWD.exists()) {\n String message = file + \" (deleted)\";\n result.add(message);\n } else {\n String contentOne = Utils.readContentsAsString(fileCWD);\n String contentTwo = Utils.readContentsAsString(stagedFile);\n if (!contentOne.equals(contentTwo)) {\n String message = file + \" (modified)\";\n result.add(message);\n }\n }\n }\n return result;\n }", "private void copyAndSaveFileStats(final String sourceTenant, final String targetTenant, final List<String> pageIds)\n {\n // copy file state meta information from source...\n final List<FileStatsDO> soureFileStats = wikiContext.runInTenantContext(sourceTenant, getWikiSelector(),\n new CallableX<List<FileStatsDO>, RuntimeException>()\n {\n @Override\n public List<FileStatsDO> call() throws RuntimeException\n {\n BranchFileStats pageStats = PlcUtils.getBranchFileStats(wikiContext);\n List<FileStatsDO> fileStatsForPage = pageStats.getFileStatsForIds(pageIds);\n return fileStatsForPage;\n }\n });\n if (soureFileStats == null || soureFileStats.isEmpty() == true) {\n return;\n }\n\n // ...to destination\n wikiContext.runInTenantContext(targetTenant, getWikiSelector(), new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n final GWikiElement fileStats = wikiContext.getWikiWeb().findElement(PlcConstants.FILE_STATS_LOCATION);\n if (fileStats == null || fileStats.getMainPart() == null) {\n return null;\n }\n GWikiArtefakt<?> artefakt = fileStats.getMainPart();\n if (artefakt instanceof GWikiBranchFileStatsArtefakt == false) {\n return null;\n }\n\n GWikiBranchFileStatsArtefakt branchFilestatsArtefakt = (GWikiBranchFileStatsArtefakt) artefakt;\n BranchFileStats pageStats = branchFilestatsArtefakt.getCompiledObject();\n for (FileStatsDO source : soureFileStats) {\n pageStats.addFileStats(source);\n }\n branchFilestatsArtefakt.setStorageData(pageStats.toString());\n\n // because filestats is located in /admin folder you need to be su to store/update that file\n wikiContext.getWikiWeb().getAuthorization().runAsSu(wikiContext, new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n wikiContext.getWikiWeb().saveElement(wikiContext, fileStats, true);\n return null;\n }\n });\n\n GLog.note(GWikiLogCategory.Wiki,\n \"Copied BranchFileStats information from \" + sourceTenant + \" to \" + targetTenant,\n new LogAttribute(GWikiLogAttributeType.PageIds, StringUtils.join(pageIds, \",\")));\n return null;\n }\n });\n }", "protected ArrayList<File> prepareUpload(Modpack modpack, String workspace) throws Exception {\n String uploadDirectory = workspace + \"/\" + String.valueOf(modpack.getId()) + \"-\" + modpack.getName() + \"/\";\n File dir = new File(uploadDirectory);\n ArrayList<File> files = new ArrayList<>();\n if (dir != null) {\n File zipToUpload = createZipArchive(dir, modpack.getName(), workspace);\n files.add(zipToUpload);\n }\n return files;\n }", "private static void getFiles(String root, Vector files) {\n Location f = new Location(root);\n String[] subs = f.list();\n if (subs == null) subs = new String[0];\n Arrays.sort(subs);\n \n // make sure that if a config file exists, it is first on the list\n for (int i=0; i<subs.length; i++) {\n if (subs[i].endsWith(\".bioformats\") && i != 0) {\n String tmp = subs[0];\n subs[0] = subs[i];\n subs[i] = tmp;\n break;\n }\n }\n \n if (subs == null) {\n LogTools.println(\"Invalid directory: \" + root);\n return;\n }\n \n ImageReader ir = new ImageReader();\n Vector similarFiles = new Vector();\n \n for (int i=0; i<subs.length; i++) {\n LogTools.println(\"Checking file \" + subs[i]);\n subs[i] = new Location(root, subs[i]).getAbsolutePath();\n if (isBadFile(subs[i]) || similarFiles.contains(subs[i])) {\n LogTools.println(subs[i] + \" is a bad file\");\n String[] matching = new FilePattern(subs[i]).getFiles();\n for (int j=0; j<matching.length; j++) {\n similarFiles.add(new Location(root, matching[j]).getAbsolutePath());\n }\n continue;\n }\n Location file = new Location(subs[i]);\n \n if (file.isDirectory()) getFiles(subs[i], files);\n else if (file.getName().equals(\".bioformats\")) {\n // special config file for the test suite\n configFiles.add(file.getAbsolutePath());\n }\n else {\n if (ir.isThisType(subs[i])) {\n LogTools.println(\"Adding \" + subs[i]);\n files.add(file.getAbsolutePath());\n }\n else LogTools.println(subs[i] + \" has invalid type\");\n }\n file = null;\n }\n }", "private void findAndAddChecksumFiles(FileInfo fileInfo) throws IOException {\n Set<ChecksumInfo> checksums = fileInfo.getChecksumsInfo().getChecksums();\n for (ChecksumType checksumType : ChecksumType.BASE_CHECKSUM_TYPES) {\n String checksumValue = repoChecksumPolicy.getChecksum(checksumType, checksums);\n if (StringUtils.isNotBlank(checksumValue)) {\n // if we got something, write it\n writeArtifactChecksum(checksumValue, checksumType, fileInfo.getRepoPath(), checksumValue.length());\n }\n }\n }", "static ArrayList<String> loadShop() {\n //check directory, create if missing\n File dir = new File(\"./plugins/SkyblockShop/\");\n if (!dir.exists()) {if (!dir.mkdir()) { System.out.println(\"Failed to create SkyblockShop directory!\");}}\n\n //create fullShop to return all retrieved files\n ArrayList<String> fullShop = new ArrayList<>();\n\n //iterate through all files in directory and add them to fullShop\n File[] files = dir.listFiles();\n if (files != null) {\n for (File file : files) {\n if (file.getName().endsWith(\".txt\")) {\n fullShop.addAll(loadShop(file));\n }\n }\n }\n\n return fullShop;\n }", "@Override\n public void finish() {\n storeProperties();\n // retrieve the full list of files according to the selected mode\n List<org.jajuk.base.File> files = getFiles();\n if (files == null) {\n return;\n }\n // define the target directory\n final Date curDate = new Date();\n // Do not use ':' character in destination directory, it's\n // forbidden under Windows\n final SimpleDateFormat stamp = new SimpleDateFormat(\"yyyyMMdd-HHmm\", Locale.getDefault());\n final String dirName = \"Party-\" + stamp.format(curDate);\n final java.io.File destDir = new java.io.File(((String) data.get(Variable.DEST_PATH)), dirName);\n if (!destDir.mkdir()) {\n Log.warn(\"Could not create destination directory \" + destDir);\n }\n Log.debug(\"Going to copy \" + files.size() + \" files to directory {{\"\n + destDir.getAbsolutePath() + \"}}\");\n // perform the actual copying\n UtilPrepareParty.copyFiles(files, destDir, isTrue(Variable.NORMALIZE_FILENAME),\n isTrue(Variable.ONE_MEDIA_ENABLED) && isTrue(Variable.CONVERT_MEDIA),\n (String) data.get(Variable.ONE_MEDIA), (String) data.get(Variable.CONVERT_COMMAND));\n }", "@Override\n protected void process() {\n final List<File> srtFiles = new FileFinder().collect(new File(Constants.FILEFIXER_ROOT_DIR), Constants.SRT_EXTENSION);\n\n // process each file, making a backup first if it is enabled\n for (final File srtFile : srtFiles) {\n System.out.println(\"Processing subtitle file :: \" + srtFile.getName());\n\n if (Constants.MAKE_BACKUPS) {\n backupFile(srtFile);\n }\n\n fix(srtFile);\n }\n }", "private List<String> copyDependencies(File javaDirectory) throws MojoExecutionException {\n ArtifactRepositoryLayout layout = new DefaultRepositoryLayout();\n\n List<String> list = new ArrayList<String>();\n\n // First, copy the project's own artifact\n File artifactFile = project.getArtifact().getFile();\n list.add(layout.pathOf(project.getArtifact()));\n\n try {\n FileUtils.copyFile(artifactFile, new File(javaDirectory, layout.pathOf(project.getArtifact())));\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Could not copy artifact file \" + artifactFile + \" to \" + javaDirectory, ex);\n }\n\n if (excludeDependencies) {\n // skip adding dependencies from project.getArtifacts()\n return list;\n }\n\n for (Artifact artifact : project.getArtifacts()) {\n File file = artifact.getFile();\n File dest = new File(javaDirectory, layout.pathOf(artifact));\n\n getLog().debug(\"Adding \" + file);\n\n try {\n FileUtils.copyFile(file, dest);\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying file \" + file + \" into \" + javaDirectory, ex);\n }\n\n list.add(layout.pathOf(artifact));\n }\n\n return list;\n }", "private void findAssignmentFiles(ArrayList<File> files, String directory) {\n\n //---------- Step 1: find and uncompress zip files ----------\n if (bAutoUncompress) {\n ArrayList<File> compressedFiles = findFilesByExtension(directory, COMPRESSION_EXTENSIONS);\n for (File cFile : compressedFiles) {\n //uncompress each zip file\n String[] cmd = {\"unzip\", \"-u\", cFile.getAbsolutePath(), \"-d\", stripFileExtension(cFile.getAbsolutePath())};\n String cmdStr = \"unzip -u \\\"\" + cFile.getAbsolutePath() + \"\\\" -d \\\"\" + stripFileExtension(cFile.getAbsolutePath()) + \"\\\"\";\n console(cmdStr);\n\n try {\n Runtime r = Runtime.getRuntime();\n Process p = r.exec(cmd); //execute the unzip command\n //Process p = r.exec(\"unzip -u \\34/Users/jvolcy/work/test/JordanStill_1124140_assignsubmission_file_/P0502b.zip\\34 -d \\34/Users/jvolcy/work/test/JordanStill_1124140_assignsubmission_file_/P0502b\\34\");\n p.waitFor();\n } catch (Exception e) {\n console(\"[findAssignmentFiles()]\", e);\n }\n }\n }\n\n //---------- Step 2: find programming files in the directory ----------\n ArrayList<File> programmingFiles = findFilesByExtension(directory, PYTHON_AND_CPP_EXTENSIONS);\n if (programmingFiles.size() > 0) {\n files.addAll(programmingFiles);\n //if we found any files, we are done\n return;\n }\n\n //---------- Step 3: search for sub-directories ----------\n ArrayList<File> subDirs = getSubDirectories(directory, true);\n for (File sDir : subDirs) {\n //Step 4: recursively call findAssignmentFiles() if we find subdirectories\n findAssignmentFiles(files, sDir.toString());\n }\n\n //---------- Step 5 ----------\n //No assignment files found. This may be the end of the recursion.\n }", "void doShowFiles()\n\t{\n\t\ttry\n\t\t{\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tIterator itr = m_fileInfo.getAllFiles();\n\n\t\t\twhile(itr.hasNext())\n\t\t\t{\n\t\t\t\tSourceFile m = (SourceFile) ((Map.Entry)itr.next()).getValue();\n\n\t\t\t\tString name = m.getName();\n\t\t\t\tint id = m.getId();\n\t\t\t\tString path = m.getFullPath();\n\n\t\t\t\tsb.append(id);\n\t\t\t\tsb.append(' ');\n\t\t\t\tsb.append(path);\n\t\t\t\tsb.append(\", \"); //$NON-NLS-1$\n\t\t\t\tsb.append(name);\n\t\t\t\tsb.append(m_newline);\n\t\t\t}\n\t\t\tout( sb.toString() );\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noSourceFilesFound\")); //$NON-NLS-1$\n\t\t}\n\t}", "public Collection<File> getCopiedFiles() {\n return new ArrayList<>(copiedFiles);\n }", "private void get_file_List() {\n\tString file_name=null;\r\n\tfor (int i = 0; i < listOfFiles.length; i++) \r\n\t {\r\n\t \r\n\t if (listOfFiles[i].isFile()) \r\n\t {\r\n\t\t file_name = listOfFiles[i].getName();\r\n\t if (file_name.endsWith(\".xml\") || file_name.endsWith(\".XML\"))\r\n\t {\r\n\t file_list.add(file_name) ;\r\n\t }\r\n\t }\r\n\t }\r\n\t\r\n}", "private void runSvnBatch(String subCmd, File ws, List<String> files) throws IOException, ProcessingException {\n while(!files.isEmpty()) {\n // build up command line\n StringBuilder cmd = new StringBuilder(buildSvnCommand(subCmd));\n for( int i=0; i<20 && !files.isEmpty(); i++ ) {\n cmd.append(' ').append(files.remove(0));\n }\n\n exec(cmd.toString(),ws,\"Failed to \"+subCmd);\n }\n }", "private static void processRepository(File repo) {\n System.out.println(\"Processing repository: \" + repo);\n for (File fileOrDir : repo.listFiles()) {\n if (fileOrDir.isDirectory()) {\n processModule(fileOrDir);\n }\n }\n }", "public static void updatePOFiles(){\n\t\tfor(TableInfo tableInfo: tables.values()){\n\t\t\tJavaFileUtils.createJavaPOFile(tableInfo,new MySQLTypeConvertor());\n\t\t}\n\t}", "private void initializeFileArrays(){\n File downloadedFilesFolder = new File(MainActivity.DB_PATH);\n File[] files = downloadedFilesFolder.listFiles();\n System.out.println(\"*** \" + files.length + \" ***\");\n if(files != null){\n System.out.println(\"*** \" + files.length + \" ***\");\n for(File f : files){\n if(f != null){\n System.out.println(\"***\\n FILE FOUND - \" + f.getAbsolutePath()+\"\\nSIZE - \" +\n f.length() + \" BYTES \\n***\");\n fileNames.add(f.getName());\n fileSizes.add(f.length()+\"\");\n this.files.add(f);\n }\n }\n }\n }", "void putFile(String relativePath, Codebase codebase) {\n try {\n File dest = new File(rootDirectory.getAbsolutePath(), relativePath);\n File src = codebase.getFile(relativePath);\n boolean srcExists = filesystem.exists(src);\n boolean destExists = filesystem.exists(dest);\n\n boolean srcExecutable = filesystem.isExecutable(src);\n boolean destExecutable = filesystem.isExecutable(dest);\n\n if (!srcExists && !destExists) {\n throw new MoeProblem(\n \"Neither src nor dests exists. Unreachable code:%n%s%n%s%n%s\", relativePath, src, dest);\n }\n\n if (!srcExists) {\n util.runSvnCommandWithWorkingDirectory(rootDirectory.getAbsolutePath(), \"rm\", relativePath);\n // TODO(dbentley): handle newly-empty directories\n return;\n }\n\n try {\n filesystem.makeDirsForFile(dest);\n filesystem.copyFile(src, dest);\n } catch (IOException e) {\n throw new MoeProblem(e, \"Failed to copy %s to %s\", src, dest);\n }\n\n if (!destExists) {\n util.runSvnCommandWithWorkingDirectory(\n rootDirectory.getAbsolutePath(), \"add\", \"--parents\", relativePath);\n }\n\n String mimeType = guessMimeType(relativePath);\n if (mimeType != null) {\n try {\n util.runSvnCommandWithWorkingDirectory(\n rootDirectory.getAbsolutePath(), \"propset\", \"svn:mime-type\", mimeType, relativePath);\n } catch (CommandRunner.CommandException e) {\n // If the mime type setting fails, it's not really a big deal.\n // Just log it and keep going.\n ui.message(\"Error setting mime-type for %s\", relativePath);\n }\n }\n\n if (destExecutable != srcExecutable) {\n if (srcExecutable) {\n util.runSvnCommandWithWorkingDirectory(\n rootDirectory.getAbsolutePath(), \"propset\", \"svn:executable\", \"*\", relativePath);\n } else {\n util.runSvnCommandWithWorkingDirectory(\n rootDirectory.getAbsolutePath(), \"propdel\", \"svn:executable\", relativePath);\n }\n }\n } catch (CommandRunner.CommandException e) {\n throw new MoeProblem(\"problem occurred while running svn: %s\", e.stderr);\n }\n }", "public void getSourceJavaFilesForOneRepository(File dir, FilenameFilter searchSuffix, ArrayList<File> al) {\n\n\t\tFile[] files = dir.listFiles();\t\t\n\t\tfor(File f : files) {\n\t\t\tString lowercaseName = f.getName().toLowerCase();\n\t\t\tif(lowercaseName.indexOf(\"test\")!=-1)\n\t\t\t{\n\t\t\t\t/* we do not consider test files in our study */\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t if(f.isDirectory()){\n\t\t\t\t /* iterate over every directory */\n\t\t\t\t getSourceJavaFilesForOneRepository(f, searchSuffix, al);\t\t\n\t\t\t } else {\n\t\t\t\t /* returns the desired java files */\n\t\t\t\t if(searchSuffix.accept(dir, f.getName())){\n\t\t\t\t\t al.add(f);\n\t\t\t\t }\n\t\t\t }\n\t\t\t}\n\t\t}\n\t}", "public void createFileObjects() {\n List<String> externalFiles = abbreviationsPreferences.getExternalJournalLists();\n externalFiles.forEach(name -> openFile(Paths.get(name)));\n }", "private void copyFile(InputStream ins, OutputStream outs) throws IOException {\n byte[] buffer = new byte[1024];\n int read;\n while((read = ins.read(buffer)) != -1) {\n outs.write(buffer, 0, read);\n }\n }", "protected void addFiles(Vector v, ZipOutputStream zOut, String prefix)\n throws IOException {\n for (int i=0; i<v.size(); i++) {\n FileSet fs = (FileSet) v.elementAt(i);\n DirectoryScanner ds = fs.getDirectoryScanner(project);\n addFiles(ds, zOut, prefix);\n }\n }", "public List<LsFileEntry> lsFiles() \n \tthrows CorruptObjectException, IOException {\n \t\tMap<String, LsFileEntry> cachedEntries = new TreeMap<String, LsFileEntry>(); \n \t\t\n \t\t//first read all the files which are the Index\n \t\tfinal DirCache cache = DirCache.read(db);\n \t\tfor (int i = 0; i < cache.getEntryCount(); i++) {\n \t\t\tfinal DirCacheEntry ent = cache.getEntry(i);\n \t\t\t\n \t\t\t//X TODO this is surely not enough ;)\n \t\t\tLsFileStatus fs = LsFileStatus.CACHED;\n \t\t\tLsFileEntry fileEntry = new LsFileEntry(ent.getPathString(), fs, ent.getObjectId());\n \t\t\tcachedEntries.put(ent.getPathString(), fileEntry);\n \t\t}\n \n \t\t// now read all the files on the disk\n \t\tSet<String> filesOnDisk = new TreeSet<String>(); \n \t\tFile workDir = db.getWorkDir();\n \t\taddFiles(filesOnDisk, \"\", workDir);\n \t\t\n \t\t// and now compare them. since both are already sorted because we used TreeMap and TreeSort\n \t\t// we can simply crawl over them end compare them. kind of a merge sort though...\n \t\tArrayList<LsFileEntry> fileEntries = new ArrayList<LsFileEntry>();\n \n \t\tIterator<String> cacheIt = cachedEntries.keySet().iterator();\n \t\tIterator<String> fileIt = filesOnDisk.iterator();\n \t\t\n \t\tString cachedPath = null;\n \t\tString fsPath = null;\n \t\twhile (cacheIt.hasNext() || fileIt.hasNext()) {\n \t\t\t\n \t\t\tif (cachedPath == null && cacheIt.hasNext()) {\n \t\t\t\tcachedPath = cacheIt.next();\n \t\t\t}\n \t\t\t\n \t\t\tif (fsPath == null && fileIt.hasNext()) {\n \t\t\t\tfsPath = fileIt.next();\n \t\t\t}\n \t\t\t\n \t\t\tif (cachedPath != null && cachedPath.equals(fsPath)) {\n \t\t\t\t// oh found in both systems\n \t\t\t\tfileEntries.add(cachedEntries.get(cachedPath));\n \t\t\t\tcachedPath = null;\n \t\t\t\tfsPath = null;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tif (cachedPath != null && !fileEntries.contains(cachedPath)) {\n \t\t\t\tfileEntries.add(new LsFileEntry(cachedPath, LsFileStatus.REMOVED, null));\n \t\t\t\tcachedPath = null;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tif (fsPath != null && !cachedEntries.keySet().contains(fsPath)) {\n \t\t\t\tfileEntries.add(new LsFileEntry(fsPath, LsFileStatus.OTHER, null));\n \t\t\t\tfsPath = null;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tcachedPath = null;\n \t\t\tfsPath = null;\n \t\t\t\n \t\t}\n \t\t\n \t\treturn fileEntries;\n \t}", "@Test\n public void testCopyFileUsingApacheCommonsIO() throws Exception {\n long start = System.nanoTime();\n CopyFile.copyFileUsingApacheCommonsIO(sourceFile, apacheDestFile);\n System.out.println(\"Time taken by apache using:\" + (System.nanoTime() - start) / 1000);\n }", "private void checkFile2(File dir,String lang) {\n if (!dir.exists()&& dir.mkdirs()){\n copyFiles2(lang);\n }\n //The directory exists, but there is no data file in it\n if(dir.exists()) {\n String datafilepath = mDataPath+ \"/tessdata/\"+lang+\".traineddata\";\n File datafile = new File(datafilepath);\n if (!datafile.exists()) {\n copyFiles2(lang);\n }\n }\n }", "private void addFileToTarGz(TarArchiveOutputStream tOut, String path, String base) throws IOException {\n File f = new File(path);\n String entryName = base + f.getName();\n TarArchiveEntry tarEntry = new TarArchiveEntry(f, entryName);\n tOut.putArchiveEntry(tarEntry);\n Platform.runLater(() -> fileLabel.setText(\"Processing \" + f.getPath()));\n\n if (f.isFile()) {\n FileInputStream fin = new FileInputStream(f);\n IOUtils.copy(fin, tOut);\n fin.close();\n tOut.closeArchiveEntry();\n } else {\n tOut.closeArchiveEntry();\n File[] children = f.listFiles();\n if (children != null) {\n for (File child : children) {\n addFileToTarGz(tOut, child.getAbsolutePath(), entryName + \"/\");\n }\n }\n }\n }", "private void syncSources(String name) {\n TemplateSourceInfo info = (TemplateSourceInfo)mTemplateMap.get(name);\n Unit compUnit = (Unit)this.getCompilationUnit(name,null);\n File destFile = compUnit.getDestinationFile();\n if (destFile != null) {\n destFile.setLastModified(info.timestamp);\n }\n }", "private void copyAndResolve() throws IOException {\n if (abort) {\n LOG.debug(\"Nothing to resolve on the backend.\");\n return;\n }\n // Step one is to see if there are any classes in the distributed cache\n if (!jConf.getBoolean(PIG_SCHEMA_TUPLE_ENABLED, SCHEMA_TUPLE_ON_BY_DEFAULT)) {\n LOG.info(\"Key [\" + PIG_SCHEMA_TUPLE_ENABLED +\"] was not set... will not generate code.\");\n return;\n }\n // Step two is to copy everything from the distributed cache if we are in distributed mode\n if (!isLocal) {\n copyAllFromDistributedCache();\n }\n // Step three is to see if the file needs to be resolved\n // If there is a \"$\" in the name, we know that it is an inner\n // class and thus doesn't need to be instantiated directly.\n for (File f : codeDir.listFiles()) {\n String name = f.getName().split(\"\\\\.\")[0];\n if (!name.contains(\"$\")) {\n filesToResolve.add(name);\n LOG.info(\"Added class to list of class to resolve: \" + name);\n }\n }\n // Step four is to actually try and resolve the classes\n resolveClasses();\n }", "private static void taskContentsFileTransfer() {\n // Transfer text file to temporary file\n try {\n String taskContentsFilePath, taskContents;\n BufferedReader taskContentsLocation = new BufferedReader(new FileReader(FILE_PATH_CONTENT));\n taskContentsFilePath = taskContentsLocation.readLine();\n\n if (taskContentsFilePath != null) {\n BufferedReader taskContentsReader = new BufferedReader(new FileReader(taskContentsFilePath));\n\n taskContents = taskContentsReader.readLine();\n while (taskContents != null) {\n fileContent.add(taskContents);\n taskContents = taskContentsReader.readLine();\n }\n taskContentsReader.close();\n // Clear file\n PrintWriter pw = new PrintWriter(taskContentsFilePath);\n pw.close();\n }\n taskContentsLocation.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void mo83570c() {\n File[] listFiles;\n File file = new File(this.f60297d);\n if (file.isDirectory() && (listFiles = file.listFiles()) != null && listFiles.length >= this.f60294a) {\n Arrays.sort(listFiles, this.f60295b);\n for (int i = 0; i < listFiles.length && listFiles.length >= this.f60294a; i++) {\n File file2 = listFiles[i];\n if (!this.f60299f.contains(file2)) {\n ArgusLogger.m85574b(String.format(C6969H.m41409d(\"G4D8AC619BE22AF20E809D047FEE1C6C47DC3D008AD3FB969E71DD05BE6EAD1D26DC3D008AD3FB969EA079D41E6A5D1D26880DD1FBB70E36CF547\"), file2.getPath()));\n mo83569b(Collections.singleton(file2));\n }\n }\n }\n }", "@Test\n\tpublic void prepSourceFile() throws Exception {\n\t\t\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(\"source/source.txt\"));\n\t\tfor (int i = 0; i < 125; i++) {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"source/small-source.txt\"));\n\t\t\tfor (int j = 0; j < 80000; j++) {\n\t\t\t\tbw.write(br.readLine() + \"\\n\");\t\t\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\t\tbw.close();\n\t}", "@Override\n public void addSingleFile(FileInfo file) {\n }", "private void copyExampleWorkouts() {\n\t\ttry {\n\t\t\tString[] exampleWorkouts = mContext.getAssets().list(\n\t\t\t\t\tIDataProvider.EXAMPLE_WORKOUT_FOLDER);\n\t\t\tfor (String file : exampleWorkouts) {\n\t\t\t\tInputStream in = null;\n\t\t\t\tOutputStream out = null;\n\t\t\t\ttry {\n\t\t\t\t\tin = mContext.getAssets().open(IDataProvider.EXAMPLE_WORKOUT_FOLDER + \"/\" + file);\n\t\t\t\t\tout = new FileOutputStream(mContext.getFilesDir().toString() + \"/\" + file);\n\n\t\t\t\t\t// copy file\n\t\t\t\t\tbyte[] buffer = new byte[1024];\n\t\t\t\t\tint read;\n\t\t\t\t\twhile ((read = in.read(buffer)) != -1) {\n\t\t\t\t\t\tout.write(buffer, 0, read);\n\t\t\t\t\t}\n\n\t\t\t\t\tin.close();\n\t\t\t\t\tin = null;\n\t\t\t\t\tout.flush();\n\t\t\t\t\tout.close();\n\t\t\t\t\tout = null;\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tLog.e(\"tag\", \"Failed to copy asset file: \" + file, e);\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\tLog.e(TAG, \"Copying example workouts failed\", e);\n\t\t}\n\t}", "public void getFileChooser(){\r\n \r\n FileNameExtensionFilter txtfilter = new FileNameExtensionFilter(\"*.txt\", \"txt\");\r\n //FileNameExtensionFilter pngfilter = new FileNameExtensionFilter(\"*.png\", \"png\");\r\n FileNameExtensionFilter zipfilter = new FileNameExtensionFilter(\"*.zip\", \"zip\");\r\n \r\n final JFileChooser fc = new JFileChooser();\r\n fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\r\n fc.setAcceptAllFileFilterUsed(false);\r\n fc.setDialogTitle(\"Choose directory [USQ_DATA] or File\");\r\n //filter txt and png\r\n //fc.setFileFilter(pngfilter);\r\n fc.setFileFilter(txtfilter);\r\n fc.setFileFilter(zipfilter);\r\n \r\n try{\r\n fc.setCurrentDirectory(new File(workplace));\r\n }catch(Exception e) {\r\n FileSystemView fsv = FileSystemView.getFileSystemView();\r\n wppath = fsv.getDefaultDirectory();\r\n File rd = new File(wppath.getAbsolutePath() + \"/USQ_Reporter.txt\");\r\n rd.delete();\r\n try {\r\n setDir();\r\n } catch (FileNotFoundException ex) {\r\n JOptionPane.showMessageDialog(null, \"file not found.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n } catch (IOException ex) {\r\n JOptionPane.showMessageDialog(null, \"IOException when get file.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }\r\n int returnVal = fc.showOpenDialog(this);\r\n if(returnVal == JFileChooser.APPROVE_OPTION) {\r\n File file = fc.getSelectedFile();\r\n //if txt from zip, dont copy to old\r\n fromzip = false;\r\n if(!file.exists()) {\r\n JOptionPane.showMessageDialog(null, \"file doesn't exist.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n } else if(file.isDirectory()) {\r\n File files[] = file.listFiles();\r\n File old = new File(workplace + \"/old\");\r\n //create old folder\r\n if(!old.exists())old.mkdir();\r\n if(old.exists()&&old.isFile())old.mkdir();\r\n for(int i=0 ; i<files.length ; i++) {\r\n if(files[i].isFile()) {\r\n readFile(files[i]);\r\n if(files[i].getName().equals(\"USQRecorders.txt\"))\r\n createSes(files[i]);\r\n }\r\n }\r\n //delete read in dir\r\n for(int i=0 ; i<files.length ; i++){\r\n boolean b =files[i].delete();\r\n System.out.println(files[i].getAbsolutePath() + \" \" + b);\r\n }\r\n file.delete(); \r\n } else if (file.isFile()) {\r\n File old = new File(workplace + \"/old\");\r\n //create old folder\r\n if(old.exists()&&old.isFile())old.mkdir();\r\n if(!old.exists())old.mkdir();\r\n if(file.getName().endsWith(\".zip\")){fromzip=true;}else{fromzip=false;}\r\n readFile(file);\r\n if(file.getName().equals(\"USQRecorders.txt\"))\r\n createSes(file);\r\n }\r\n \r\n //delete read in file\r\n file.delete();\r\n }\r\n }", "private void loadBasePaths() {\n\n Log.d(TAG, \"****loadBasePaths*****\");\n List<FileInfo> paths = BaseMediaPaths.getInstance().getBasePaths();\n for (FileInfo path : paths) {\n\n }\n }", "private void migrate (String name)\t{\n\t\ttry{\n\t\t\tFile f1 = new File( sourceDir + name);\n\t\t\t\n\t\t\tif (!f1.exists())\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tFile f2 = new File(targetDir +name);\n\t\t\t\n\t\t InputStream in = new FileInputStream(f1);\n\t\t \n\t\t OutputStream out = new FileOutputStream(f2);\n\n\t\t byte[] buf = new byte[1024];\n\t\t int len;\n\t\t while ((len = in.read(buf)) > 0){\n\t\t out.write(buf, 0, len);\n\t\t }\n\t\t in.close();\n\t\t out.close();\n\t\t System.out.println(\"File copied.\");\n\t\t }\n\t\t catch(FileNotFoundException ex){\n\t\t System.out.println(ex.getMessage() + \" in the specified directory.\");\n\t\t System.exit(0);\n\t\t }\n\t\t catch(IOException e){\n\t\t System.out.println(e.getMessage()); \n\t\t }\n\t}", "static void walkTheDir(){ \n\t try (Stream<Path> paths = Files.walk(Paths.get(\"/ownfiles/tullverketCert/source\"))) {\n\t \t paths\n\t \t .filter(Files::isRegularFile)\n\t \t //.forEach(System.out::println);\n\t \t .forEach( e ->{\n\t \t \t\tSystem.out.println(e);\n\t \t \t\tSystem.out.println(e.getParent());\n\t \t \t\t\n\t \t \t});\n\t \t \n \t}catch (Exception e) { \n\t System.out.println(\"Exception: \" + e); \n\t } \n\t }", "private void loadFiles() {\n User user = ConnectionManager.getInstance().getUser();\n List<NoteFile> files = DatabaseManager.getInstance().getSharedFiles(user);\n ObservableList<GuiFile> guiFiles = FXCollections.observableArrayList();\n\n for (NoteFile file : files)\n guiFiles.add(new GuiFile(file));\n\n tableFiles.setItems(guiFiles);\n GUIUtils.autoResizeColumns(tableFiles);\n }", "public void searchAllFiles() {\n\t\t/**\n\t\t * Realizamos un pequeño algoritmo de recorrido de árboles en preorden para listar todos los\n\t\t * ebooks con un coste de 2n+1 donde n es el número de nodos.\n\t\t */\n\t\tArrayList<Entry> booksEntry = null;\n\t\ttry {\n\t\t\tString auxPath;\n\t\t\tbooksEntry = new ArrayList<DropboxAPI.Entry>();\n\t\t\tLinkedList<Entry> fifo = new LinkedList<DropboxAPI.Entry>();\n\t\t\tEntry nodo = _mApi.metadata(\"/\", 0, null, true, null);\n\t\t\tfifo.addAll(nodo.contents);\n\t\t\twhile (!fifo.isEmpty()) {\n\t\t\t\tSystem.out.println(fifo);\n\t\t\t\tnodo = fifo.getFirst();\n\t\t\t\tfifo.removeFirst();\n\t\t\t\tauxPath = nodo.path;\n\t\t\t\tif (nodo.isDir) {\n\t\t\t\t\tfifo.addAll(_mApi.metadata(auxPath, 0, null, true, null).contents);\n\t\t\t\t} else {\n\t\t\t\t\tif (isEbook(nodo))\n\t\t\t\t\t\tbooksEntry.add(nodo);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"parar\");\n\t\t} catch (DropboxUnlinkedException e) {\n\t\t\t// The AuthSession wasn't properly authenticated or user unlinked.\n\t\t} catch (DropboxPartialFileException e) {\n\t\t\t// We canceled the operation\n\t\t\t_mErrorMsg = \"Download canceled\";\n\t\t} catch (DropboxServerException e) {\n\t\t\t// Server-side exception. These are examples of what could happen,\n\t\t\t// but we don't do anything special with them here.\n\t\t\tif (e.error == DropboxServerException._304_NOT_MODIFIED) {\n\t\t\t\t// won't happen since we don't pass in revision with metadata\n\t\t\t} else if (e.error == DropboxServerException._401_UNAUTHORIZED) {\n\t\t\t\t// Unauthorized, so we should unlink them. You may want to\n\t\t\t\t// automatically log the user out in this case.\n\t\t\t} else if (e.error == DropboxServerException._403_FORBIDDEN) {\n\t\t\t\t// Not allowed to access this\n\t\t\t} else if (e.error == DropboxServerException._404_NOT_FOUND) {\n\t\t\t\t// path not found (or if it was the thumbnail, can't be\n\t\t\t\t// thumbnailed)\n\t\t\t} else if (e.error == DropboxServerException._406_NOT_ACCEPTABLE) {\n\t\t\t\t// too many entries to return\n\t\t\t} else if (e.error == DropboxServerException._415_UNSUPPORTED_MEDIA) {\n\t\t\t\t// can't be thumbnailed\n\t\t\t} else if (e.error == DropboxServerException._507_INSUFFICIENT_STORAGE) {\n\t\t\t\t// user is over quota\n\t\t\t} else {\n\t\t\t\t// Something else\n\t\t\t}\n\t\t\t// This gets the Dropbox error, translated into the user's language\n\t\t\t_mErrorMsg = e.body.userError;\n\t\t\tif (_mErrorMsg == null) {\n\t\t\t\t_mErrorMsg = e.body.error;\n\t\t\t}\n\t\t} catch (DropboxIOException e) {\n\t\t\t// Happens all the time, probably want to retry automatically.\n\t\t\t_mErrorMsg = \"Network error. Try again.\";\n\t\t} catch (DropboxParseException e) {\n\t\t\t// Probably due to Dropbox server restarting, should retry\n\t\t\t_mErrorMsg = \"Dropbox error. Try again.\";\n\t\t} catch (DropboxException e) {\n\t\t\t// Unknown error\n\t\t\t_mErrorMsg = \"Unknown error. Try again.\";\n\t\t}\n\t\t_booksListEntry = booksEntry;\n\t\tcreateListBooks();\n\t}", "private void addPackageDirFiles(WebFile aDir, List aList)\n{\n boolean hasNonPkgFile = false;\n for(WebFile child : aDir.getFiles())\n if(child.isDir() && child.getType().length()==0)\n addPackageDirFiles(child, aList);\n else hasNonPkgFile = true;\n if(hasNonPkgFile || aDir.getFileCount()==0) aList.add(aDir);\n}", "public GitFile[] getFiles() { return null; }", "private FileUtil() {}", "private void prepareAssignmentFiles() {\n for (Assignment assignment : assignments) {\n //---------- initialize the assignmentFiles array list ----------\n assignment.assignmentFiles = new ArrayList<>();\n\n //create a temporary assignment files array list\n ArrayList<File> assignmentFiles = new ArrayList<>();\n\n //---------- call the recursive findAssignmentFiles method ----------\n findAssignmentFiles(assignmentFiles, assignment.assignmentDirectory);\n\n //---------- set the language for the assignment ----------\n if (language.equals( IAGConstant.LANGUAGE_AUTO) ) {\n assignment.language = autoDetectLanguage(assignmentFiles);\n }\n else {\n assignment.language = language;\n }\n\n String[] extensions;\n\n switch (assignment.language) {\n case IAGConstant.LANGUAGE_PYTHON3:\n extensions = IAGConstant.PYTHON_EXTENSIONS;\n break;\n case IAGConstant.LANGUAGE_CPP:\n extensions = IAGConstant.CPP_EXTENSIONS;\n break;\n default: //unable to determine the language\n extensions = new String[] {};\n }\n\n //add only files of the right type to the assignment file list\n for (File f: assignmentFiles) {\n String f_extension = getFileExtension(f).toLowerCase();\n if (Arrays.asList(extensions).contains(f_extension)){\n //---------- if the extension on the file matches\n // one of the extension in the extensions list, add\n // it to the programming files list. ----------\n assignment.assignmentFiles.add(f);\n }\n }\n assignment.bAutoGraded = false; //indicate the assignment has not yet been auto-graded\n }\n\n }", "@Override\n public void execute() {\n\n if(!isValid){\n System.out.println(invalidReasonString);\n return;\n }\n\n\n Path filteredFilesRoot = Path.of(pathToDir,filteredFilesRootDirectory);\n\n try {\n\n if (Files.exists(filteredFilesRoot) && Files.isDirectory(filteredFilesRoot)){\n emptyDirectory(filteredFilesRoot.toFile());\n Files.delete(filteredFilesRoot);\n } else if (Files.isRegularFile(filteredFilesRoot)){\n Files.delete(filteredFilesRoot);\n }\n\n Files.createDirectory(filteredFilesRoot);\n\n List<Path> filteredFiles = PostProcessor.filterRootDirectory(pathToDir,maxFileSize,keywords);\n\n copyFiles(filteredFilesRoot,filteredFiles);\n\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(e.getMessage());\n }\n\n }", "@Test\r\n public void testGetChangedFileList() throws IOException {\n helper.exportRevChangedFiles(PJ_ROOT, 1, LOCAL_ROOT);\r\n helper.exportRevChangedFiles(PJ_ROOT, 4, LOCAL_ROOT);\r\n //helper.exportRevChangedFiles(PJ_ROOT, -1, LOCAL_ROOT);\r\n //helper.exportRevChangedFiles(9, 9, true);\r\n }", "private void expungeAllHistoricFiles()\r\n {\r\n debug(\"expungeAllHistoricFiles() - Delete ALL HISTORIC Files\");\r\n\r\n java.io.File fileList = new java.io.File(\"./\");\r\n String rootName = getString(\"WatchListTableModule.edit.historic_details_basic_name\");\r\n String[] list = fileList.list(new MyFilter(rootName));\r\n for (int i = 0; i < list.length; i++)\r\n {\r\n StockMarketUtils.expungeListsFile(list[i]);\r\n }\r\n debug(\"expungeAllHistoricFiles() - Delete ALL HISTORIC Files - complete\");\r\n\r\n }", "private void getExtractWithFiles(){\n\t\ttry{\n\t\t\t\n\t\t\tFileInputStream fStream = new FileInputStream(tfile);\n\t\t\tfileBytes = new byte[(int)tfile.length()];\n\t\t\t\n\t\t\tfStream.read(fileBytes, 0, fileBytes.length);\n\t\t\tfileSize = fileBytes.length;\n\t\t}catch(Exception ex){\n\t\t\tSystem.err.println(\"File Packet \"+ex.getMessage());\n\t\t}\n\t}", "List<ChangedFile> addUntrackedFilesToIndex(Map<Project, List<ChangedFile>> files);", "private FileUtil() {\n \t\tsuper();\n \t}", "final public VFile copyTo(VDir parentDir) throws VlException\n {\n //return (VFile)doCopyMoveTo(parentDir,null,false /*,options*/);\n return (VFile)this.getTransferManager().doCopyMove(this,parentDir,null,false); \n }", "String prepareFile();", "private static void addOSMFilesToPersistedOSMFiles(Set<File> files) {\n for (File f : files) {\n persistedOSMFiles.add(f.getAbsolutePath());\n }\n updateSharedPreferences();\n }", "private FileOperations() throws FileNotFoundException {\r\n\t\tbiddingPersistence = new BiddingPersistence(Constants.biddingsFilePath, \r\n\t\t\t\tConstants.indexBiddingsPath);\r\n\t\tusersPersistence = new UsersPersistence(Constants.usersFilePath,\r\n\t\t\t\tConstants.indexUsersPath);\t\t\r\n\t}", "public static void main(String[] args) {\n String startDir = \"E:/DEKSTOP/Projets/photosortTest\";\n\n //We list what is in this folder :\n\n System.out.println(\"\\n\\n\\nListing of files recursively : \\n\");\n\n printListFilesRecursive(startDir);\n\n //Then we create 2 directories\n createDirectory(startDir, \"css_files\");\n createDirectory(startDir, \"js_files\");\n\n //Then we select all the js file and move it to /js_file, same for css files\n List<String> list_js = new ArrayList<>();\n List<String> list_css = new ArrayList<>();\n\n listFilesRecursiveByExtension(startDir,\"js\",list_js);\n listFilesRecursiveByExtension(startDir,\"css\",list_css);\n\n for (String item_js : list_js){\n copyFile(item_js,startDir+\"/js_files\",new File(item_js).getName());\n }\n\n\n for (String item_css : list_css){\n copyFile(item_css,startDir+\"/css_files\",new File(item_css).getName());\n }\n System.out.println(\"Listing of file dummy : \\n\");\n //array in which we will store the names of files and directories\n\n printDummyListFiles(startDir);\n\n\n\n\n System.out.println(\"\\n\\n\\nListing of JS files recursively : \\n\");\n\n printListFilesRecursiveByExtension(startDir, \"map\");\n\n System.out.println(\"\\n\\n\\nListing of JS files recursively : \\n\");\n\n printListFilesRecursiveByExtension(startDir, \"map\");\n }", "protected abstract void perform(VCSHistoryProvider.HistoryEntry entry, Set<VCSFileProxy> files);", "private void copyAndSave()\n {\n // create new branch\n if (NEW_BRANCH.equals(selectedBranch)) {\n createAndSetNewBranch();\n }\n List<String> updatePages = getAllPageIdsForUpdate();\n\n // copy current filestats entry to source target branch\n copyAndSaveFileStats(branch, selectedBranch, updatePages);\n\n // add new page information to filestats of new branch\n updateFileStats(FileState.valueOf(newPageState), selectedAssignee, selectedBranch, updatePages);\n\n // save page(s) in new branch\n wikiContext.runInTenantContext(selectedBranch, getWikiSelector(), new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n for (GWikiElement pageToUpdate : getAllPagesForUpdate()) {\n wikiContext.getWikiWeb().saveElement(wikiContext, pageToUpdate, true);\n }\n return null;\n }\n });\n\n // remove page(s) in old branch\n wikiContext.runInTenantContext(branch, getWikiSelector(), new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n for (GWikiElement pageToUpdate : getAllPagesForUpdate()) {\n wikiContext.getWikiWeb().removeWikiPage(wikiContext, pageToUpdate);\n }\n return null;\n }\n });\n }", "private void copyResourcesFromDirectory(ContentCollection directory,\r\n\t String toSite_ref, Map<String, String> documentSecurityMap){\r\n \ttry {\r\n \tList<ContentEntity> members = directory.getMemberResources();\r\n \t for (Iterator<ContentEntity> iMbrs = members.iterator(); iMbrs\r\n \t\t .hasNext();) {\r\n \t\tContentEntity next = (ContentEntity) iMbrs.next();\r\n\r\n \t\tString thisEntityRef = next.getId();\r\n\r\n\r\n \t\t//if this is a directory\r\n \t\tif (\"org.sakaiproject.content.types.folder\".equals(next.getResourceType())){\r\n \t\tContentCollection subdirectory =(ContentCollection) next;\r\n\r\n \t\t\t//we get the new destination directory\r\n \t\tString toSubSite_ref = toSite_ref +\r\n \t\t\tthisEntityRef.substring(directory.getId().lastIndexOf(\"/\") + 1);\r\n\r\n \t\t//we call recursively the same function\r\n \t\tcopyResourcesFromDirectory(subdirectory,\r\n \t\t\ttoSubSite_ref, documentSecurityMap);\r\n \t\t}\r\n \t\telse{\r\n \t\tString permission = documentSecurityMap.get(thisEntityRef);\r\n\r\n \t\t// we copy if doc exists in CO or if it is doc references\r\n \t\tif (permission != null || \"org.sakaiproject.citation.impl.CitationList\".equals(next.getResourceType())) {\r\n \t\t contentHostingService.copyIntoFolder(thisEntityRef,\r\n \t\t\t toSite_ref);\r\n \t\t}\r\n \t\t}\r\n \t }\r\n \t} catch (Exception e) {\r\n \t log.error(\"Unable to copy the resources from directory\", e);\r\n \t}\r\n }", "private StupidContainer populateFileList() throws Exception {\n\n\t\tString root = getCodeRepo();\n\n\t\tif (root == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tArrayList<String> files = new ArrayList<String>();\n\t\tsearchDFS(new File(root).listFiles(), files);\n\n\t\tString dir = System.getProperty(\"user.dir\");\n\n\t\tif (gitDir == null)\n\t\t\treturn new StupidContainer(files, root);\n\n\t\tcommitCounts = new Hashtable<String, Integer>();\n\t\tProcess p = null;\n\n\t\tif (isOSWindows) {\n\t\t\tp = Runtime.getRuntime().exec(\n\t\t\t\t\t\"cmd /C \" + dir + \"\\\\scripts\\\\gitlog.sh \" + gitDir);\n\t\t} else {\n\t\t\tp = Runtime.getRuntime().exec(\"./scripts/gitlog.sh \" + gitDir);\n\t\t}\n\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\tp.getInputStream()));\n\n\t\tString line = null, name;\n\t\tInteger count;\n\t\twhile ((line = in.readLine()) != null) {\n\t\t\tif (line.contains(\".java\")) {\n\t\t\t\tname = extractName(line);\n\t\t\t\tcount = commitCounts.get(name);\n\t\t\t\tif (count == null)\n\t\t\t\t\tcount = new Integer(0);\n\t\t\t\tcommitCounts.put(name, count + 1);\n\t\t\t}\n\t\t}\n\n\t\tin.close();\n\t\treturn new StupidContainer(files, root, folderName, commitCounts);\n\t}", "public BlockStoreFileIterator(File base) {\n String[] names = base.list();\n if (names == null) {\n return;\n }\n Arrays.sort(names);\n for (String name : names) {\n File file = new File(base, name);\n if (!file.isDirectory()) {\n continue;\n }\n layer1.add(file);\n }\n }", "private void copy(File src, File dst) throws IOException \r\n {\r\n InputStream in = new FileInputStream(src);\r\n OutputStream out = new FileOutputStream(dst);\r\n \r\n // Transfer bytes from in to out\r\n byte[] buf = new byte[1024];\r\n int len;\r\n while ((len = in.read(buf)) > 0) \r\n {\r\n out.write(buf, 0, len);\r\n }\r\n in.close();\r\n out.close();\r\n }", "private FilesDelta copy(FilesDelta that) {\n if (!(key.contains(that.key))) {\n throw new IllegalArgumentException();\n }\n\n Set<IFile> newlyTouchedDirs = SetSequence.fromSet(new HashSet<IFile>());\n // copy all but stale values, stale entries shall not override explicitly set\n for (IFile file : MapSequence.fromMap(that.files).keySet()) {\n Status newStatus = MapSequence.fromMap(that.files).get(file);\n if (newStatus == Status.STALE && MapSequence.fromMap(files).containsKey(file)) {\n continue;\n } else {\n MapSequence.fromMap(files).put(file, newStatus);\n }\n SetSequence.fromSet(newlyTouchedDirs).addElement((file.isDirectory() ? file : file.getParent()));\n }\n // in case we've got stale directory, check if any updates from that didn't touch it\n for (IFile file : MapSequence.fromMap(files).keySet()) {\n if (MapSequence.fromMap(files).get(file) == Status.STALE && file.isDirectory()) {\n String staleDir = DirUtil.normalizeAsDir(file.getPath());\n for (IFile touchDir : newlyTouchedDirs) {\n // if staleDir is parent of any newly touched directories, it's not stale any more\n if (DirUtil.startsWith(DirUtil.normalizeAsDir(touchDir.getPath()), staleDir)) {\n MapSequence.fromMap(files).put(file, Status.KEPT);\n break;\n }\n }\n }\n }\n return this;\n }", "@Override\n public boolean doWork() {\n\n logger.debug(\"CopyCommand->doWork()\");\n\n // Parameter ermitteln\n strSrcFile = getValueForKey(CONST_PARAM_SCRFILE);\n strDestFile = getValueForKey(CONST_PARAM_DESTFILE);\n bIsDirectory = Boolean.parseBoolean(getValueForKey(CONST_PARAM_ISDIRECTORY));\n\n // TODO: richtigen Replaces einfuegen\n VarReplace objVarRepl = new VarReplace();\n strSrcFile = objVarRepl.replacePlaceholder(strSrcFile);\n strDestFile = objVarRepl.replacePlaceholder(strDestFile);\n\n if ((strSrcFile == null) || (strDestFile == null)) {\n return false;\n }\n else if (new File(strSrcFile).isDirectory()) {\n try {\n FileUtils.copyDirectory(new File(strSrcFile), new File(strDestFile));\n }\n catch (IOException ioe) {\n logger.error(\" unable to copy file: \" + ioe.getMessage());\n }\n return true;\n\n }\n else {\n try {\n if (new File(strDestFile).getName().startsWith(\"v\")\n || new File(strDestFile).getName().startsWith(\"z\")) {\n strDestFile = new File(strDestFile).getParent() + File.separator\n + new File(strDestFile).getName().toUpperCase();\n }\n logger.debug(\"srcFile: \" + strSrcFile + \", destFile: \" + strDestFile);\n\n if (!new File(strSrcFile).getParentFile().exists()) {\n logger.debug(\"srcFile parent folder existiert nicht: \" + new File(strSrcFile).getParent());\n }\n\n if (!new File(strSrcFile).exists()) {\n logger.debug(\"srcFile existiert nicht: \" + new File(strSrcFile).getAbsolutePath());\n }\n\n if (!new File(strDestFile).getParentFile().exists()) {\n logger.debug(\"destFile parent folder existstiert nicht: \"\n + new File(strDestFile).getParentFile().getAbsolutePath());\n new File(strDestFile).getParentFile().mkdirs();\n }\n\n FileUtils.copyFile(new File(strSrcFile), new File(strDestFile));\n }\n catch (IOException ioe) {\n\n logger.error(\" unable to copy file: \" + ioe.getMessage());\n\n ioe.printStackTrace();\n\n while (iCounter < 20) {\n\n logger.debug(\"IOException loop: \" + iCounter);\n\n try {\n logger.debug(\"wait 20 seconds\");\n Thread.sleep(TimeUnit.SECONDS.toMillis(20));\n }\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n try {\n FileUtils.copyFile(new File(strSrcFile), new File(strDestFile));\n logger.debug(\"break loop\");\n break;\n }\n catch (IOException e) {\n\n logger.debug(\"again an exception: \" + e.getMessage());\n }\n\n iCounter++ ;\n\n logger.debug(\"try it ounce again\");\n\n }\n\n }\n return true;\n }\n\n }", "public synchronized void addProjectFilesCP(File f) { projectFilesCP.add(f); }", "public PublishFileSet(Path root) throws IOException {\n this.root = root;\n this.files = getFilesOnPath(root);\n }" ]
[ "0.65603244", "0.6411972", "0.636026", "0.6334055", "0.61657476", "0.60949373", "0.5992206", "0.59778076", "0.5895404", "0.58897847", "0.5886359", "0.58797705", "0.573813", "0.57241255", "0.5718999", "0.5669709", "0.5643076", "0.5597217", "0.55896246", "0.5570952", "0.55390376", "0.5530873", "0.5523788", "0.55162174", "0.5494354", "0.54922915", "0.5490334", "0.5482741", "0.54663396", "0.54637337", "0.5457175", "0.5454449", "0.54424995", "0.5429749", "0.54249865", "0.54217136", "0.5421682", "0.5418062", "0.5404173", "0.5384243", "0.5383292", "0.53665364", "0.5358275", "0.53558284", "0.5348708", "0.53484535", "0.5342559", "0.53420734", "0.5341199", "0.53382814", "0.53355145", "0.532746", "0.53254044", "0.53241557", "0.53215957", "0.53173107", "0.5316446", "0.53076375", "0.53068537", "0.52970725", "0.5278592", "0.5273685", "0.5269546", "0.52684116", "0.52649474", "0.52610636", "0.5256034", "0.52545595", "0.5254164", "0.5251312", "0.524718", "0.5239682", "0.5234557", "0.52259", "0.522411", "0.5219309", "0.5212015", "0.5208566", "0.5207856", "0.520753", "0.5202622", "0.51992905", "0.51875395", "0.518505", "0.51822084", "0.51775306", "0.5174646", "0.5174555", "0.5174149", "0.5164798", "0.5154651", "0.5151309", "0.51453024", "0.51409334", "0.5140016", "0.51391774", "0.51386184", "0.51374006", "0.5136395", "0.5136301", "0.513252" ]
0.0
-1
Processes an Atom feed at the URL found in the FeedContext object.
public static void processFeed(FeedContext fc) { String feedUrl = fc.getFeedUrl(); mLog.info("Processing Atom feed at URL: " + feedUrl); try { AbderaAtomParser atomParser = new AbderaAtomParser(new URL(feedUrl)); atomParser.persistFeed(fc); mLog.info("Finished processing Atom feed at URL " + feedUrl); } catch (MalformedURLException url_e) { mLog.error("MalformedURL found for " + fc.getFeedUrl()); } catch (ArrayIndexOutOfBoundsException a) { // this happens if the feed is empty (typically an activity stream), // need a better way to track this though mLog.warn("Feed at URL [" + feedUrl + "] is probably empty, but this " + "exception should have been prevented."); } catch (Exception e) { mLog.error("Error processing feed at [" + fc.getFeedUrl() + "]: " + e.getMessage()); } catch (Throwable t) { mLog.error("Error processing feed at [" + fc.getFeedUrl() + "]: " + t.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void processFeed(String feedUrl) throws Exception {\n processFeed(new FeedContext(feedUrl));\n }", "public static void processFeed(FeedContext fc, Feed feed) {\n try {\n\t\t\tAbderaAtomParser parser = new AbderaAtomParser(feed);\n\t\t\tparser.persistFeed(fc);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tmLog.error(\"Error processing feed at [\" + fc.getFeedUrl() + \"]: \" + e.getMessage());\n\t\t}\n }", "public URL ParseRSSFromFeed() throws java.net.MalformedURLException\n {\n URL feedUrl = new URL(Src_URL);\n return feedUrl;\n }", "public AtomFeed(String feedURL) throws ParserConfigurationException, IOException\r\n\t{\r\n\t\tthis.feedURL = feedURL;\r\n\t\txml = null;\r\n\t\tdocumentbuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\r\n\t\tif (!refresh()) throw new IOException();\r\n\t}", "public void PopulateRSSData()\n {\n try\n {\n URL Feed = ParseRSSFromFeed();\n ParseRSS(Feed);\n }\n catch(java.net.MalformedURLException exp)\n {\n String message = exp.getMessage();\n System.out.println(message);\n }\n catch(com.rometools.rome.io.FeedException fexp)\n {\n String message = fexp.getMessage();\n System.out.println(message);\n }\n catch(java.io.IOException ioexp)\n {\n String message = ioexp.getMessage();\n System.out.println(message);\n }\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tgetGmailAtomFeed(access_token,token_type);\t\t\t\t\t\n\t\t\t\t}", "private URL getFeedUrl() throws MalformedURLException{\n String feedUrl = \"http://\" + host + \":\" + port + \"/xmlfeed\";\n URL url = new URL(feedUrl);\n return url;\n }", "public void addFeedIntoFolder(String feedURL, String name);", "protected void onPostExecute(String feed) {\n }", "protected void onPostExecute(String feed) {\n }", "protected void onPostExecute(String feed) {\n\t\t}", "public void getGmailAtomFeed(final String access_token,final String token_type) {\n\t\tThread th = new Thread(new Runnable(){\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\ttry {\n\t\t\t\t\tURL url = new URL(\"https://mail.google.com/mail/feed/atom\");\n\t\t\t\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\t\t\t\tconn.addRequestProperty(\"Authorization\", token_type + \" \"+access_token);\n\t\t\t\t\tint respCode = conn.getResponseCode();\n\t\t\t\t\tif (respCode == HttpURLConnection.HTTP_OK) {\n\t\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\t\tInputStream is = conn.getInputStream();\n\t\t\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\n\t\t\t\t\t\tString str;\n\t\t\t\t\t\twhile((str = br.readLine()) != null) {\n\t\t\t\t\t\t\tsb.append(str).append(\"\\n\\r\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal String text = sb.toString();\n\t\t\t\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\ttextView.setText(text);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\tToast.makeText(SampleGoogleOAuthActivity.this, \"������ ���� ����\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tth.start();\n\t}", "public List<LinkDetails> scrapeRSSPageForLinks(String rssUrl) {\n\t\tString description = \"\";\n\t\tString title = \"\";\n\t\tString link = \"\";\n\t\tString pubdate = \"\";\n\t\tURL url;\n\t\tInputStream in;\n\n\t\tList<LinkDetails> rssProcessedData = new ArrayList<LinkDetails>();\n\n\t\ttry {\n\t\t\turl = new URL(rssUrl);\n\t\t} catch (MalformedURLException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t\ttry {\n\t\t\tin = url.openStream();\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t\t// create XML input factory\n\t\tXMLInputFactory inputFactory = XMLInputFactory.newInstance();\n\n\t\t// read the XML document\n\t\ttry {\n\n\t\t\tXMLEventReader eventReader = inputFactory.createXMLEventReader(in);\n\n\t\t\tboolean isFeedHeader = true;\n\t\t\twhile (eventReader.hasNext()) {\n\t\t\t\tXMLEvent event = eventReader.nextEvent();\n\t\t\t\tif (event.isStartElement()) {\n\t\t\t\t\tString localPart = event.asStartElement().getName().getLocalPart();\n\n\t\t\t\t\t// System.out.println(localPart);\n\n\t\t\t\t\tswitch (localPart) {\n\n\t\t\t\t\tcase \"item\":\n\t\t\t\t\t\t// if (isFeedHeader) {\n\t\t\t\t\t\t// isFeedHeader = false;\n\t\t\t\t\t\t// System.out.println(\" title: \"+title+ \" description: \"+ description + \" link:\n\t\t\t\t\t\t// \"+link+\" pubDate: \"+pubdate);\n\t\t\t\t\t\t// }\n\t\t\t\t\t\tevent = eventReader.nextEvent();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"title\":\n\t\t\t\t\t\ttitle = getCharacterData(event, eventReader);\n\t\t\t\t\t\t// System.out.println(\"title: \"+title);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"description\":\n\t\t\t\t\t\tdescription = getCharacterData(event, eventReader);\n\t\t\t\t\t\t// System.out.println(\"description: \"+description);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"link\":\n\t\t\t\t\t\tlink = getCharacterData(event, eventReader);\n\t\t\t\t\t\tSystem.out.println(\"link: \" + link);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"pubDate\":\n\t\t\t\t\t\tpubdate = getCharacterData(event, eventReader);\n\t\t\t\t\t\t// System.out.println(\"pubDate: \"+pubdate);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\t\t\t\t} else if (event.isEndElement()) {\n\t\t\t\t\tif (event.asEndElement().getName().getLocalPart() == (\"item\")) {\n\n\t\t\t\t\t\tLinkDetails linkDetails = new LinkDetails(link, title, description, pubdate);\n\t\t\t\t\t\trssProcessedData.add(linkDetails);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (XMLStreamException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t\treturn rssProcessedData;\n\t}", "void handle(List<FeedEntry> feedEntryBatch);", "public static void processFeeds(List<FeedContext> fcs) {\n for (FeedContext fc : fcs) {\n try {\n processFeed(fc);\n }\n catch (Exception e) {\n mLog.error(\"Skipping feed at URL [\" + fc.getFeedUrl() +\n \"] due to error while processing: \" + e,e);\n }\n\t\t}\n\t}", "java.lang.String getFeed();", "private static void processFeed(String url, String file, SimpleWriter out) \n {\n \tXMLTree rss = new XMLTree1(url);\n \t\n \t// make sure the rss tree is a valid rss tree\n if(!ensureValidRSSTree(rss, out))\n {\n \tout.println(\"This is not a valid RSS Tree.\");\n \treturn;\n }\n \n // print entire document to file\n outputHeader(rss.child(0), out);\n outputFooter(out);\n \n }", "public void openNewFeed(final String datfeed) {\n\n //close the navigation drawer\n closeDrawer();\n\n //show swipe refresh\n swiperefresh.setRefreshing(true);\n\n //detect if there's a connection issue or not: if there's a connection problem stop refreshing and show message\n if (cM.getActiveNetworkInfo() == null) {\n Toast toast = Toast.makeText(getBaseContext(), R.string.no_internet, Toast.LENGTH_SHORT);\n toast.show();\n swiperefresh.setRefreshing(false);\n\n } else {\n\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n DOMParser tmpDOMParser = new DOMParser();\n fFeed = tmpDOMParser.parseXml(datfeed);\n ListActivity.this.runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n if (fFeed != null && fFeed.getItemCount() > 0) {\n\n adapter.notifyDataSetChanged();\n\n //close swipe refresh\n swiperefresh.setRefreshing(false);\n\n //set feedURL calling setFeedString method, it is important if we want working swipe refresh listener\n setFeedString(datfeed);\n }\n }\n });\n }\n });\n thread.start();\n }\n }", "@Override\n\tprotected ModelAndView handleRequestInternal(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception {\n\t\tfinal String startUrlToken = \"/feed/\";\n\t\tfinal String endUrlToken = \".\";\n\t\t\n\t\t// Get feed name\n\t\tString requestedUrl = request.getRequestURI();\n\t\tString feedName = requestedUrl.substring(requestedUrl.indexOf(startUrlToken) + startUrlToken.length(), requestedUrl.indexOf(endUrlToken));\n\t\t\n\t\tString feed;\n\t\tif (\"rse\".equals(feedName)) {\n\t\t\tfeed = FeedService.getRseFeed();\n\t\t} else if (\"twitter\".equals(feedName)) {\n\t\t\tfeed = FeedService.getTwitterFeed();\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(feedName + \"is not a valid feedName\");\n\t\t}\n\t\t\n\t\t// Map to view\n\t\treturn new ModelAndView(\"/jsp/feed.jsp\", \"feed\", feed);\n\t}", "public void ParseRSS(URL feedUrl) throws com.rometools.rome.io.FeedException, java.io.IOException {\n //TODO: EVERY THING HERE SHOULD BE IN A TRANSACTION\n List<String> HashFields = new ArrayList<>();\n SyndFeedInput input = new SyndFeedInput();\n SyndFeed feed = input.build(new XmlReader(feedUrl));\n RSSChannelElements ChannelElements = new RSSChannelElements();\n Date CurrentDate = new Date();\n SimpleDateFormat SDF = new java.text.SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n //GET ADDITIONAL PROPERTIES OF THE CHANNEL\n //GET CHANNEL AUTHOR\n String ch_author = feed.getAuthor();\n ChannelElements.Author = ch_author;\n //GET PUBLISHED DATE\n Date ch_PubDate = feed.getPublishedDate();\n ChannelElements.PublishedDate = ch_PubDate;\n //GET LANGUAGE\n String ch_Language = feed.getLanguage();\n ChannelElements.Language = ch_Language;\n //GET WEBMASTER\n String ch_WebMaster = feed.getWebMaster();\n ChannelElements.webMaster = ch_WebMaster;\n //GET MANAGING EDITOR\n String ch_ME = feed.getManagingEditor();\n ChannelElements.managingEditor = ch_ME;\n //GET GENERATOR\n String ch_generator = feed.getGenerator();\n ChannelElements.Generator = ch_generator;\n //GET DESCRIPTION\n String ch_description = feed.getDescription();\n ChannelElements.Description = ch_description;\n int CurrentChannelID = 0;\n //TODO: DO THIS IN A STORED PROCEDURE\n try\n {\n TimeValidations ValidateTime = new TimeValidations();\n if (ValidateTime.IsWithinValidWindow(CurrentDate, ch_PubDate, ReadInterval))\n {\n //INSERT TO DB THE CHANNEL DETAILS\n CurrentChannelID = InsertChannelDetails(ChannelElements);\n }\n }\n catch(java.sql.SQLException exp)\n {\n String message = exp.getMessage();\n System.out.println(message);\n }\n\n\n //GET ELEMENTS FROM THE \"ITEMS\"\n List entries = feed.getEntries();\n Iterator it = entries.iterator();\n while (it.hasNext()) {\n RSSFields RssFieldValues = new RSSFields();\n SyndEntry entry = (SyndEntry) it.next();\n //GET TITLE\n System.out.println(entry.getTitle());\n String Title = entry.getTitle();\n RssFieldValues.Title = Title;\n //HashFields.add(Title);\n //GET LINK\n System.out.println(entry.getLink());\n RssFieldValues.Link = entry.getLink();\n HashFields.add(RssFieldValues.Link);\n //GET DESCRIPTION\n SyndContent description = entry.getDescription();\n System.out.println(description.getValue());\n RssFieldValues.Description = description.getValue();\n //HashFields.add(description.getValue());\n //GET PUBLISHED DATE\n Date Pub_Date = entry.getPublishedDate();\n System.out.println(SDF.format(Pub_Date));\n RssFieldValues.PublishedDate = entry.getPublishedDate();\n //GET UPDATED DATE\n Date U_date = entry.getUpdatedDate();\n System.out.println(U_date);\n RssFieldValues.UpdatedDate = entry.getPublishedDate();\n //GET AUTHOR\n String Author = entry.getAuthor();\n RssFieldValues.Author = Author;\n System.out.println(Author);\n //GET COMMENTS;\n String Comments = entry.getComments();\n RssFieldValues.Comments = Comments;\n System.out.println();\n try {\n //org.joda.time.Period P = new org.joda.time.Period(Pub_Date, CurrentDate);\n //if(SDF.parse(Pub_Date.toString()) == SDF.parse(CurrentDate.toString()))\n //org.joda.time.Period p = new org.joda.time.Period(CurrentDate, Pub_Date);\n //ONLY INSERT IF THE FEED IS WITHIN THE SPECIFIED PERIOD\n TimeValidations ValidateTime = new TimeValidations();\n if (ValidateTime.IsWithinValidWindow(CurrentDate, U_date, ReadInterval))\n {\n //INSERT NEWS SPECIFIC VALUES TO DB\n HashGenerator Gen = new HashGenerator();\n RssFieldValues.ComputedHash = Gen.HashCalculator(HashFields);\n InsertToDB(RssFieldValues, CurrentChannelID);\n }\n } catch (java.sql.SQLException ex) {\n String message = ex.getMessage();\n System.out.println(message);\n }\n }\n // System.out.println(feed);\n }", "public Feed getFeed(URL feedURLObject, Date lastUpdatedDate, boolean summary) {\n inputStream = null;\n FeedHandler feedHandler = new FeedHandler(lastUpdatedDate, summary);\n if (xmlReader != null && feedURLObject != null) {\n try {\n String encoding = detectEncoding(feedURLObject);\n if (inputStream == null) {\n if (\"file\".equals(feedURLObject.getProtocol())) {\n inputStream = feedURLObject.openStream();\n } else {\n inputStream = client.loadInputStream(feedURLObject);\n }\n }\n InputSource inputSource = new InputSource(inputStream);\n if (encoding != null) {\n inputSource.setEncoding(encoding);\n }\n\n xmlReader.setContentHandler(feedHandler);\n xmlReader.parse(inputSource);\n\n } catch (EndSAXException e) {\n // No problem\n } catch (IOException e) {\n System.err.println(e.getMessage());\n } catch (SAXException e) {\n System.err.println(e.getMessage());\n } finally {\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (IOException e) {\n System.err.println(e.getMessage());\n }\n }\n }\n }\n return feedHandler.getFeed();\n }", "private void refreshFeed() {\n Calendar cal = new GregorianCalendar();\n cal.set(Calendar.HOUR_OF_DAY, 0);\n cal.set(Calendar.MINUTE, 0);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.DATE, cal.get(Calendar.DATE) - DEFAULT_DAYS_BACK);\n String asOfDate = iso8601.fromCalendar(cal);\n \n feedService.feed(asOfDate, new Callback<List<Post>>() {\n @Override\n public void success(List<Post> posts, Response response) {\n Log.i(TAG, \"Received \" + posts.size() + \" posts from the feed service.\");\n \n ArrayList<Post> p = new ArrayList<Post>(posts);\n postArrayAdapter = new PostArrayAdapter(context, R.layout.listitem_feed, p);\n listView.setAdapter(postArrayAdapter);\n }\n \n @Override\n public void failure(RetrofitError retrofitError) {\n //TODO: Handle this better\n Log.e(TAG, \"Error retrieving posts from the feed: \" + retrofitError.getCause().toString());\n \n if (!retrofitError.isNetworkError()) {\n Log.i(TAG, \"Not network error, so likely cookie has expired; return user to login page\");\n sessionManager.terminateSession();\n startActivity(new Intent(getApplicationContext(), MainActivity.class));\n }\n else {\n Toast toast = new Toast(context);\n toast.makeText(context, getString(R.string.error_connecting), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "public static void getFeed(String url) {\n if (rssReader != null) {\n rssReader.loadFeeds(url);\n }\n }", "public void readFeed() {\n\t\tfeedSvc.getFeed(date, new GetFeedCallback());\n\t\tdate=new Date();\n\t}", "public abstract void updateFeed(final ServerBaseFeed feed,\n final GDataAccount account) throws ServiceException;", "public PodcastEntity getPodcastByFeed(String feed);", "private void parseJsonFeed(JSONObject response) {\n try {\n JSONArray feedArray = response.getJSONArray(\"feed\");\n\n for (int i = 0; i < feedArray.length(); i++) {\n JSONObject feedObj = (JSONObject) feedArray.get(i);\n\n FeedItem item = new FeedItem();\n item.setId(feedObj.getInt(\"organisation_id\"));\n item.setPortId(feedObj.getInt(\"portfolio_id\"));\n item.setName(feedObj.getString(\"name\"));\n //int id=item.getId();\n // Image might be null sometimes\n String image = feedObj.isNull(\"image\") ? null : feedObj.getString(\"image\");\n item.setImge(image);\n item.setStatus(feedObj.getString(\"status\"));\n item.setProfilePic(feedObj.getString(\"profilePic\"));\n item.setTimeStamp(feedObj.getString(\"timeStamp\"));\n item.setCommentCount(feedObj.getString(\"commentCount\"));\n\n // url might be null sometimes\n String feedUrl = feedObj.isNull(\"url\") ? null : feedObj.getString(\"url\");\n item.setUrl(feedUrl);\n\n feedItems.add(item);\n }\n\n\n // notify data changes to list adapater\n listAdapter.notifyDataSetChanged();\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public Feed getFeed(String feedURL, Date lastUpdatedDate) throws MalformedURLException {\n return getFeed(feedURL, lastUpdatedDate, false);\n }", "public Feed getFeed() throws Exception {\n final Reference feedRef = getHref();\n\n if (feedRef.isRelative()) {\n feedRef.setBaseRef(getWorkspace().getService().getReference());\n }\n\n final Request request = new Request(Method.GET, feedRef.getTargetRef());\n final Response response = getWorkspace().getService()\n .getClientDispatcher().handle(request);\n\n if (response.getStatus().equals(Status.SUCCESS_OK)) {\n return new Feed(response.getEntity());\n } else {\n throw new Exception(\n \"Couldn't get the feed representation. Status returned: \"\n + response.getStatus().getDescription());\n }\n }", "com.google.ads.googleads.v6.resources.Feed getFeed();", "public void refreshRssFeed( ContactRssImpl rssURL)\n {\n submitRssQuery(rssURL, true);\n }", "public OldFeedRequest(HttpServletRequest request) throws Exception {\n \n // parse the request object and figure out what we've got\n mLogger.debug(\"parsing url \"+request.getRequestURL());\n \n String servlet = request.getServletPath();\n String pathInfo = request.getPathInfo();\n \n // what servlet is our destination?\n if(servlet != null) {\n // strip off the leading slash\n servlet = servlet.substring(1);\n \n if(feedServlets.contains(servlet)) {\n this.context = \"weblog\";\n this.flavor = servlet;\n } else {\n // not a request to a feed servlet\n throw new Exception(\"not a weblog feed request, \"+request.getRequestURL());\n }\n } else {\n throw new Exception(\"not a weblog feed request, \"+request.getRequestURL());\n }\n \n // parse the path info\n if(pathInfo != null && pathInfo.trim().length() > 1) {\n // strip off the leading slash\n pathInfo = pathInfo.substring(1);\n String[] pathElements = pathInfo.split(\"/\");\n \n if(pathElements[0].length() > 0) {\n this.weblogHandle = pathElements[0];\n }\n \n } else {\n \n // no path info means this was a non-weblog request\n // we handle a few exceptions for this which include\n // /rss - main rss feed\n // /atom - main atom feed\n // /flavor - main flavor feed\n \n this.context = \"main\";\n }\n \n /* \n * parse request parameters\n *\n * the only params we currently care about are:\n * flavor - defines the feed type\n * catname - specifies a weblog category\n * path - specifies a weblog category\n * excerpts - specifies the feed should only include excerpts\n *\n */\n if(request.getParameter(\"flavor\") != null) {\n this.flavor = request.getParameter(\"flavor\");\n }\n \n if(request.getParameter(\"path\") != null) {\n this.weblogCategory = request.getParameter(\"path\");\n }\n \n if(request.getParameter(\"catname\") != null) {\n this.weblogCategory = request.getParameter(\"catname\");\n }\n \n if(request.getParameter(\"excerpts\") != null) {\n this.excerpts = Boolean.valueOf(request.getParameter(\"excerpts\")).booleanValue();\n }\n \n // one small final adjustment.\n // if our flavor is \"flavor\" then that means someone is just getting\n // the default flavor, which is rss, so let's set that\n if(this.flavor.equals(\"flavor\")) {\n this.flavor = \"rss\";\n }\n \n }", "void threadUpdateReceived(FeedItem feedItem);", "@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tURL url = new URL(\"https://mail.google.com/mail/feed/atom\");\n\t\t\t\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\t\t\t\tconn.addRequestProperty(\"Authorization\", token_type + \" \"+access_token);\n\t\t\t\t\tint respCode = conn.getResponseCode();\n\t\t\t\t\tif (respCode == HttpURLConnection.HTTP_OK) {\n\t\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\t\tInputStream is = conn.getInputStream();\n\t\t\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\n\t\t\t\t\t\tString str;\n\t\t\t\t\t\twhile((str = br.readLine()) != null) {\n\t\t\t\t\t\t\tsb.append(str).append(\"\\n\\r\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal String text = sb.toString();\n\t\t\t\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\ttextView.setText(text);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\tToast.makeText(SampleGoogleOAuthActivity.this, \"������ ���� ����\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "protected void update(FeedItemHandler handler, Date cacheExpiryDate, ExecutorService executor) {\n\t\ttry {\n\t\t\tURLConnection connection = new URL(url).openConnection();\n\t\t\tconnection.setConnectTimeout(settings.getFeedConnectTimeout());\n\t\t\tconnection.setReadTimeout(settings.getFeedReadTimeout());\n\t\t\tconnection.connect();\n\t\t\tSyndFeedInput feedInput = new SyndFeedInput();\n\t\t\tCharset charset = Charset.forName(\"utf-8\"); //NOI18N\n\t\t\tif (connection.getContentEncoding() != null) {\n\t\t\t\tcharset = Charset.forName(connection.getContentEncoding());\n\t\t\t} else if (connection.getContentType() != null) {\n\t\t\t\tString[] contentTypeParts = connection.getContentType().split(\";\"); //NOI18N\n\t\t\t\tfor (String contentTypePart : contentTypeParts) {\n\t\t\t\t\tString[] contentTypePartComponents = contentTypePart.trim().split(\"=\", 2); //NOI18N\n\t\t\t\t\tif (contentTypePartComponents.length == 2 && contentTypePartComponents[0].matches(\"charset\")) //NOI18N\n\t\t\t\t\t\tcharset = Charset.forName(contentTypePartComponents[1].trim());\n\t\t\t\t}\n\t\t\t}\n\t\t\tSyndFeed feed = feedInput.build(new InputStreamReader(connection.getInputStream(), charset));\n\t\t\ttitle = feed.getTitle();\n\t\t\tencoding = feed.getEncoding();\n\t\t\thandleEntries(feed.getEntries(), handler, cacheExpiryDate, executor);\n\t\t} catch (IOException | IllegalArgumentException ex) {\n\t\t\tthrow new RuntimeException(MessageFormat.format(messages.getString(\"CANNOT_UPDATE_FEED\"), new Object[]{url}), ex);\n\t\t} catch (Exception ex) {\n\t\t\tthrow new RuntimeException(MessageFormat.format(messages.getString(\"CANNOT_UPDATE_FEED\"), new Object[]{url}), ex);\n\t\t}\n\t}", "void onContentChanged(@Nullable List<FeedContent> feedContents);", "public void refreshAllRssFeeds()\n {\n Vector rssContactList = new Vector();\n rssContactList = opSetPersPresence.getContactListRoot().\n getRssURLList(rssContactList);\n Iterator rssContact = rssContactList.iterator();\n while(rssContact.hasNext())\n {\n ContactRssImpl contact = (ContactRssImpl)rssContact.next();\n try\n {\n \n submitRssQuery(contact, false);\n }\n catch (Exception ex)\n {\n logger.error(\"Failed to refresh feed for \" + contact, ex);\n }\n }\n }", "public void parseInputStream(InputStream is) throws IOException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\n\t\tString str = null;\n\t\twhile((str = br.readLine()) != null) {\n\t\t\tsb.append(str).append(\"\\n\\r\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tJSONObject jObject = new JSONObject(sb.toString());\n\t\t\tfinal String access_token = jObject.getString(\"access_token\");\n\t\t\tfinal String token_type = jObject.getString(\"token_type\");\n\t\t\tfinal String expires_in = jObject.getString(\"expires_in\");\n\t\t\tfinal String refresh_token = jObject.getString(\"refresh_token\");\n\t\t\t\n\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tgetGmailAtomFeed(access_token,token_type);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@HEAD\n Call<Void> headFeed(@Url String url);", "@Override\n\t\tprotected Boolean doInBackground(Void... params) {\n\t\t\tlinklist = parseRSS();\n\t\t\treturn updateDatabase(linklist);\n\t\t}", "@Override\n protected String doInBackground(String... args) {\n // rss link url\n String query_url = args[0];\n\n // weather object of rss.\n woeid = parser.getRSSFeedWeather2(query_url);\n\n // updating UI from Background Thread\n runOnUiThread(new Runnable() {\n public void run() {\n /**\n * Updating parsed data into text view.\n * */\n Intent intent = new Intent(MainActivity.this, Summit.class);\n String description = woeid.getWoeid();\n intent.putExtra(EXTRA_MESSAGE, description);\n // Log.d(\"Long\", description);\n startActivity(intent);\n }\n });\n return null;\n }", "public Feed getFeed(String feedURL, boolean summary) throws MalformedURLException {\n return getFeed(feedURL, null, summary);\n }", "@Override\r\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\ttry{\r\n\t\t\tURL feedUrl = new URL(\"http://blog.rss.naver.com/leeminji25.xml\");\r\n\t\t\tSyndFeedInput input = new SyndFeedInput();\r\n\t\t\tSyndFeed syndFeed = input.build(new XmlReader(feedUrl));\r\n\t\t\t\r\n\t\t\t/* RSS */\r\n\t\t\tSystem.out.println( syndFeed.getFeedType() );\r\n\t\t\tList<SyndEntry> entries = syndFeed.getEntries();\r\n\t\t\trequest.setAttribute(\"entries\", entries);\t\r\n\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\r\n\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(\"/content/blog.jsp\");\r\n\t\tdispatcher.forward(request, response);\r\n\t}", "public FeedManager loadFeed() throws IOException, XmlPullParserException {\n\t\tInputStream stream = null;\n\t\tSolsticeXmlParser solsticeXmlParser = new SolsticeXmlParser();\n\n\t\ttry {\n\t\t\tstream = downloadUrl(URL);\n\t\t\treturn solsticeXmlParser.parse(stream);\n\t\t} finally {\n\t\t\tif (stream != null) {\n\t\t\t\tstream.close();\n\t\t\t}\n\t\t}\n\t}", "private void setFeedString(String feed_string) {\n\n feedURL = feed_string;\n }", "private void saveNewFeed() {\n String rssUrl = mUrlEditText.getText().toString();\n\n if (!rssUrl.equals(\"\") && userNotAlreadyFollowing(rssUrl)) {\n getActivity().setProgressBarIndeterminateVisibility(true);\n\n FeedProcessingService service = new FeedProcessingService(getActivity(), mFeedHandler);\n service.getAndProcessFeed(rssUrl);\n }\n }", "@Override\n protected Void doInBackground(Void... arg0) {\n helper = new LiveFeedParser(999);\n helper.get();\n viewEntries = helper.getViewEntries();\n return null;\n }", "public FeedResponse getFeed(FeedRequest request, String urlPath) throws IOException, TweeterRemoteException{\n FeedResponse response = clientCommunicator.doPost(urlPath, request, null, FeedResponse.class);\n\n if(response.isSuccess()) {\n return response;\n } else {\n throw new RuntimeException(response.getMessage());\n }\n }", "public abstract void createFeed(final ServerBaseFeed feed,\n final GDataAccount account) throws ServiceException;", "boolean hasFeed();", "boolean hasFeed();", "public Feed getFeed(String feedURL, Date lastUpdatedDate, boolean summary) throws MalformedURLException {\n return getFeed(new URL(feedURL), lastUpdatedDate, summary);\n }", "public com.google.common.util.concurrent.ListenableFuture<injective.ocr.v1beta1.Tx.MsgUpdateFeedResponse> updateFeed(\n injective.ocr.v1beta1.Tx.MsgUpdateFeed request) {\n return futureUnaryCall(\n getChannel().newCall(getUpdateFeedMethod(), getCallOptions()), request);\n }", "@NonNull\n default T feed(@NonNull Iterator<Map<String, Object>> feeder) {\n return ScalaFeeds.apply(this, feeder);\n }", "private String getURL(String feedUrl) {\n\tStringBuilder sb = null;\n\ttry {\n for(int i = 3; i>0; i--) {\n\t sb = new StringBuilder();\n URL url = new URL(feedUrl);\n\tHttpURLConnection uc = (HttpURLConnection) url.openConnection();\n\tuc.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22 GTB7.1 ( .NET CLR 3.5.30729)\");\n\tuc.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\");\n\tuc.setRequestProperty(\"Accept-Language\", \"en-us,en;q=0.5\");\n\tuc.setRequestProperty(\"Accept-Encoding\", \"gzip,deflate\");\n\tuc.setRequestProperty(\"Accept-Charset\", \"ISO-8859-1,utf-8;q=0.7,*;q=0.7\");\n\tuc.setRequestProperty(\"Keep-Alive\", \"115\");\n\tuc.setRequestProperty(\"Connection\", \"keep-alive\");\n\tuc.setDoOutput(true);\n\tuc.setDoInput(true);\n\tuc.setUseCaches(false);\n\tuc.setRequestMethod(\"POST\");\n\tuc.setRequestProperty(\"Content-Type\", \"text/xml\");\n\t\n\tBufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));//uc.getInputStream()\n\tString inputLine;\n\tboolean refreshAgain = false;\n\twhile ((inputLine = in.readLine()) != null) {\n\t\tsb.append(inputLine);\n\t\tif( inputLine.contains(\"Refresh\") ) {\n\t\t\trefreshAgain = true;\n\t\t\tSystem.out.println(\"Refresh\");\n\t\t}\n\t}\n\tin.close();\n\tuc.disconnect();\t\t\n//\tRefresh\n\tif( refreshAgain ) {\n\t Thread.sleep(1000);\n\t}\n\telse break;\n }\n }catch(Exception ee){}\nreturn sb.toString();\n}", "List<SyndFeed> getRssFeeds(Set<String> feedUrls) throws FeedException, IOException,\n FetcherException;", "public long createFeed(String feedName,String feedURL,String encoding) {\r\n final ContentValues initialValues = new ContentValues();\r\n initialValues.put(FEED_NAME, feedName);\r\n initialValues.put(FEED_URL, feedURL);\r\n initialValues.put(XML_ENCODING, encoding);\r\n return mDB.insert(Tables.FEED_SOURCE, null, initialValues);\r\n }", "public Object parseChannel(int rssType, Document doc) throws Exception;", "public Feed getFeed(URL feedURLObject, Date lastUpdatedDate) {\n return getFeed(feedURLObject, lastUpdatedDate, false);\n }", "private void handleEntries(List<SyndEntry> entries, FeedItemHandler handler, Date cacheExpiryDate, ExecutorService executor) throws IOException, InterruptedException, ExecutionException {\n\t\tSet<FeedItem> newItems = new HashSet<>();\n\t\tfor (SyndEntry entry : entries)\n\t\t\tnewItems.add(new FeedItem(this, entry));\n\n\t\t//Find outdated items\n\t\tfor (FeedItem oldItem : new HashSet<>(items))\n\t\t\tif (!newItems.contains(oldItem) && oldItem.getLastSeen() != null && oldItem.getLastSeen().before(cacheExpiryDate)) {\n\t\t\t\t//Item expired\n\t\t\t\titems.remove(oldItem);\n\t\t\t} else if (newItems.contains(oldItem)) {\n\t\t\t\tfor (FeedItem newItem : newItems)\n\t\t\t\t\tif (newItem.equals(oldItem))\n\t\t\t\t\t\tnewItem.setState(oldItem.getState());//Transfer state to new item\n\t\t\t\tif (oldItem.getState() != FeedItem.State.SENT_PDF)\n\t\t\t\t\titems.remove(oldItem);//Replace with new item to resend pdf\n\t\t\t\telse\n\t\t\t\t\toldItem.updateLastSeen();\n\t\t\t}\n\n\t\t// Ignore already existing items\n\t\tnewItems.removeAll(items);\n\n\t\t//Add new items\n\t\titems.addAll(newItems);\n\n\t\tList<Future<?>> futures = new ArrayList<>();\n\t\tfor (FeedItem item : newItems) {\n\t\t\tFuture<?> future = executor.submit(new Runnable() {\n\t\t\t\tprivate FeedItemHandler handler;\n\t\t\t\tprivate Feed feed;\n\t\t\t\tprivate FeedItem item;\n\n\t\t\t\tpublic Runnable setParameters(FeedItemHandler handler, Feed feed, FeedItem item) {\n\t\t\t\t\tthis.handler = handler;\n\t\t\t\t\tthis.feed = feed;\n\t\t\t\t\tthis.item = item;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\thandler.handle(feed, item);\n\t\t\t\t\t} catch (RuntimeException ex) {\n\t\t\t\t\t\tlog.error(MessageFormat.format(messages.getString(\"ERROR_HANDLING_FEED_ITEM\"), new Object[]{item}), ex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}.setParameters(handler, this, item));\n\t\t\tfutures.add(future);\n\t\t}\n\t\tfor (Future future : futures)\n\t\t\tfuture.get();\n\t}", "@Override\n protected void onHandleIntent(Intent workIntent) {\n // Gets a URL to read from the incoming Intent's \"data\" value\n String urlString = workIntent.getDataString();\n\n // URL to download from\n URL url;\n\n //block that tries to connect to xml data, and throws an IOException if one occurs\n try {\n // Convert the incoming data string to a URL.\n url = new URL(urlString);\n\n /**\n * Tries to open a connection to the URL. If an IO error occurs, this throws an\n * IOException\n */\n URLConnection urlConnection = url.openConnection();\n\n // If the connection is an HTTP connection, continue\n if (urlConnection instanceof HttpURLConnection) {\n // Broadcasts an Intent indicating that processing has started.\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_STARTED);\n\n // Casts the connection to a HTTP connection\n HttpURLConnection httpURLConnection = (HttpURLConnection) urlConnection;\n\n // Reports that the service is about to connect to the RSS feed\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_CONNECTING);\n\n // Get response code from site\n int responseCode = httpURLConnection.getResponseCode();\n\n // Continue if response is OK\n if (responseCode == HttpURLConnection.HTTP_OK) {\n // Get content length (in bytes) to calculate progress from\n int contentLength = httpURLConnection.getContentLength();\n\n InputStream inputStream = urlConnection.getInputStream();\n\n // Save to file\n //FileOutputStream outputStream = new FileOutputStream(Constants.XML_SAVE_FILE_PATH);\n // Save to internal storage instead\n File file = new File(getFilesDir(), Constants.XML_SAVE_FILE_NAME);\n FileOutputStream outputStream = new FileOutputStream(file);\n\n // keep track of how much is downloaded\n int totalBytesRead = 0;\n int progressDone = 0;\n // Report downloading state\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_DOWNLOADING);\n\n int bytesRead = -1;\n byte[] buffer = new byte[BUFFER_SIZE];\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n outputStream.write(buffer, 0, bytesRead);\n totalBytesRead += bytesRead;\n progressDone = totalBytesRead/contentLength * 100;\n // TODO: broadcast progress\n }\n\n outputStream.close();\n inputStream.close();\n httpURLConnection.disconnect();\n // Report download complete\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_DOWNLOAD_COMPLETE);\n }\n\n }\n else {\n // Report that action failed\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_FAILED);\n return;\n }\n\n // TODO: make sure tvheadend is running\n // Open sockect connection to xmltv.sock\n String socketName = getFilesDir() + \"/xmltv.sock\";\n Log.d(\"socketConnection\", \"Connecting to \" + socketName);\n LocalSocketAddress socketAddress = new LocalSocketAddress(socketName,\n LocalSocketAddress.Namespace.FILESYSTEM);\n LocalSocket socket = new LocalSocket();\n socket.connect(socketAddress);\n if (socket.isConnected()) {\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_SOCKET_CONNECTED);\n\n // open xml file\n File file = new File(getFilesDir(), Constants.XML_SAVE_FILE_NAME);\n FileInputStream inputStream = new FileInputStream(file);\n\n // get socket output stream\n OutputStream outputStream = socket.getOutputStream();\n\n // write xml data to xmltv socket\n int bytesRead = -1;\n byte[] buffer = new byte[BUFFER_SIZE];\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n outputStream.write(buffer, 0, bytesRead);\n }\n outputStream.close();;\n inputStream.close();\n socket.close();\n }\n else {\n // Report that action failed\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_FAILED);\n return;\n }\n // Done successfully\n // set last update time - THIS could be DANGEROUS since shared prefs is not thread safe!\n Date now = new Date();\n EpgStoredSettings settings = new EpgStoredSettings(getApplicationContext());\n settings.setLastUpdateTime(now);\n // notify status fragment\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_COMPLETE);\n }\n catch (MalformedURLException e) {\n e.printStackTrace();\n // Report that action failed\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_FAILED);\n\n }\n catch (IOException e) {\n e.printStackTrace();\n // Report that action failed\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_FAILED);\n }\n catch (SecurityException e)\n {\n e.printStackTrace();\n // Report that action failed\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_FAILED);\n }\n }", "@Override\n\tprotected Feed newFeed() {\n\t\treturn new Feed(this.feedType);\n\t}", "@Override\n\tpublic InputStream createForumRss(String objectId, String link)\n\t\t\tthrows Exception {\n\t\treturn null;\n\t}", "public AclFeed getAclFeed(DocumentListEntry entry) throws MalformedURLException, IOException, ServiceException;", "public DocumentListFeed getAllFeeds() throws MalformedURLException, IOException, ServiceException;", "void fetchFactFeeds();", "@Asynchronous\n public Future<?> doGenerate() {\n final AtomLink atomLink = newChannelAtomLink();\n final Channel channel = newChannel(atomLink);\n\n visitor.visit(p -> {\n final String url = visitor.buildLink(p);\n\n final Guid guid = new Guid();\n guid.setValue(url + \"?rssGuid=\" + Long.toString(p.getId()));\n\n final AtomLink link = new AtomLink();\n link.setRel(\"self\");\n link.setType(atomLink.getType());\n link.setHref(atomLink.getHref() + \"?post=\" + p.getId());\n\n final Item item = new Item();\n item.setTitle(p.getTitle());\n item.setLink(url);\n item.setDescription(p.getSummary());\n item.setPubDate(RFC_1123_DATE_TIME.format(ZonedDateTime.ofInstant(p.getUpdated().toInstant(), ZoneId.systemDefault())));\n item.setGuid(guid);\n item.setAtomLink(link);\n channel.getItem().add(item);\n });\n\n final Rss rss = new Rss();\n rss.setChannel(channel);\n this.rss = rss;\n return new AsyncResult<>(true);\n }", "public void addRss(final String url, final String outputFileName, final Long pollPeriod, final Long itemsAmount,\n final List<String> parameters) {\n try {\n if (isNotValidRss(url)) {\n System.out.println(\"Rss is not valid.\");\n return;\n }\n RssConfiguration configuration = PropertiesHandler.createNewRssConfiguration(url, outputFileName, pollPeriod, itemsAmount, parameters);\n ParseFeedTask task = new ParseFeedTask(configuration);\n ScheduledFuture future = scheduledExecutorService.scheduleWithFixedDelay(task, configuration.getPollPeriod(), configuration.getPollPeriod(), TimeUnit.SECONDS);\n futures.put(url, future);\n tasks.put(url, task);\n } catch (IOException e) {\n System.out.println(String.format(\"An error occurred during the adding feed %s\", url));\n } catch (FeedException e) {\n System.out.println(String.format(\"Sorry, but feed %s is not valid.\", url));\n }\n }", "public Feed findFeedByFeedID(Integer fid);", "protected void populateFeed() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.addDescendingOrder(Post.CREATED_AT);\n query.setLimit(20);\n query.findInBackground(new FindCallback<Post>() {\n // Result of the call to Parse\n @Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n posts.addAll(queryPosts);\n adapter.notifyDataSetChanged();\n }\n });\n }", "public SnapshotFeedReader(String feedurl) {\n super(feedurl);\n this.feed = new SnapshotFeed();\n this.links = new HashSet<AtomLink>();\n }", "private List<DBFeedModel> parseResult(ConnectionResult connectionResult) {\n try {\n JSONObject response = new JSONObject(connectionResult.getResult());\n JSONArray posts = response.optJSONArray(\"posts\");\n List<DBFeedModel> feedsList = new ArrayList<>();\n\n for (int i = 0; i < posts.length(); i++) {\n JSONObject post = posts.optJSONObject(i);\n DBFeedModel item = new DBFeedModel();\n item.setViewType(Constants.FEED_VIEW_TYPE_LEFT);\n item.setTitle(post.optString(\"title\"));\n item.setThumb(post.optString(\"thumbnail\"));\n item.setUrl(\"http://m.dantri.com.vn/xa-hoi/hai-phong-yeu-cau-thao-do-rong-vang-dau-pikachu-gay-tranh-cai-20170108172552427.htm\");\n feedsList.add(item);\n }\n\n return feedsList;\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public long insertFeedEntry(ActivityFeedEntity activityFeed) throws SQLException;", "com.google.ads.googleads.v6.resources.FeedOrBuilder getFeedOrBuilder();", "public void populate(HttpServletRequest request, Context context, IndexableObject dso,\n List<IndexableObject> items, Map<String, String> labels) {\n String logoURL = null;\n String objectURL = null;\n String defaultTitle = null;\n boolean podcastFeed = false;\n this.request = request;\n // dso is null for the whole site, or a search without scope\n if (dso == null) {\n defaultTitle = configurationService.getProperty(\"dspace.name\");\n feed.setDescription(localize(labels, MSG_FEED_DESCRIPTION));\n objectURL = resolveURL(request, null);\n } else {\n Bitstream logo = null;\n if (dso instanceof IndexableCollection) {\n Collection col = ((IndexableCollection) dso).getIndexedObject();\n defaultTitle = col.getName();\n feed.setDescription(collectionService.getMetadataFirstValue(col,\n CollectionService.MD_SHORT_DESCRIPTION, Item.ANY));\n logo = col.getLogo();\n String cols = configurationService.getProperty(\"webui.feed.podcast.collections\");\n if (cols != null && cols.length() > 1 && cols.contains(col.getHandle())) {\n podcastFeed = true;\n }\n objectURL = resolveURL(request, col);\n } else if (dso instanceof IndexableCommunity) {\n Community comm = ((IndexableCommunity) dso).getIndexedObject();\n defaultTitle = comm.getName();\n feed.setDescription(communityService.getMetadataFirstValue(comm,\n CommunityService.MD_SHORT_DESCRIPTION, Item.ANY));\n logo = comm.getLogo();\n String comms = configurationService.getProperty(\"webui.feed.podcast.communities\");\n if (comms != null && comms.length() > 1 && comms.contains(comm.getHandle())) {\n podcastFeed = true;\n }\n objectURL = resolveURL(request, comm);\n }\n\n if (logo != null) {\n logoURL = urlOfBitstream(request, logo);\n }\n }\n feed.setTitle(labels.containsKey(MSG_FEED_TITLE) ?\n localize(labels, MSG_FEED_TITLE) : defaultTitle);\n feed.setLink(objectURL);\n feed.setPublishedDate(new Date());\n feed.setUri(objectURL);\n\n // add logo if we found one:\n if (logoURL != null) {\n // we use the path to the logo for this, the logo itself cannot\n // be contained in the rdf. Not all RSS-viewers show this logo.\n SyndImage image = new SyndImageImpl();\n image.setLink(objectURL);\n if (StringUtils.isNotBlank(feed.getTitle())) {\n image.setTitle(feed.getTitle());\n } else {\n image.setTitle(localize(labels, MSG_LOGO_TITLE));\n }\n image.setUrl(logoURL);\n feed.setImage(image);\n }\n\n // add entries for items\n if (items != null) {\n List<SyndEntry> entries = new ArrayList<>();\n for (IndexableObject idxObj : items) {\n if (!(idxObj instanceof IndexableItem)) {\n continue;\n }\n Item item = ((IndexableItem) idxObj).getIndexedObject();\n boolean hasDate = false;\n SyndEntry entry = new SyndEntryImpl();\n entries.add(entry);\n\n String entryURL = resolveURL(request, item);\n entry.setLink(entryURL);\n entry.setUri(entryURL);\n\n String title = getOneDC(item, titleField);\n entry.setTitle(title == null ? localize(labels, MSG_UNTITLED) : title);\n\n // \"published\" date -- should be dc.date.issued\n String pubDate = getOneDC(item, dateField);\n if (pubDate != null) {\n entry.setPublishedDate((new DCDate(pubDate)).toDate());\n hasDate = true;\n }\n // date of last change to Item\n entry.setUpdatedDate(item.getLastModified());\n\n StringBuilder db = new StringBuilder();\n for (String df : descriptionFields) {\n // Special Case: \"(date)\" in field name means render as date\n boolean isDate = df.indexOf(\"(date)\") > 0;\n if (isDate) {\n df = df.replaceAll(\"\\\\(date\\\\)\", \"\");\n }\n\n List<MetadataValue> dcv = itemService.getMetadataByMetadataString(item, df);\n if (dcv.size() > 0) {\n String fieldLabel = labels.get(MSG_METADATA + df);\n if (fieldLabel != null && fieldLabel.length() > 0) {\n db.append(fieldLabel).append(\": \");\n }\n boolean first = true;\n for (MetadataValue v : dcv) {\n if (first) {\n first = false;\n } else {\n db.append(\"; \");\n }\n db.append(isDate ? new DCDate(v.getValue()).toString() : v.getValue());\n }\n db.append(\"\\n\");\n }\n }\n if (db.length() > 0) {\n SyndContent desc = new SyndContentImpl();\n desc.setType(\"text/plain\");\n desc.setValue(db.toString());\n entry.setDescription(desc);\n }\n\n // This gets the authors into an ATOM feed\n List<MetadataValue> authors = itemService.getMetadataByMetadataString(item, authorField);\n if (authors.size() > 0) {\n List<SyndPerson> creators = new ArrayList<>();\n for (MetadataValue author : authors) {\n SyndPerson sp = new SyndPersonImpl();\n sp.setName(author.getValue());\n creators.add(sp);\n }\n entry.setAuthors(creators);\n }\n\n // only add DC module if any DC fields are configured\n if (dcCreatorField != null || dcDateField != null ||\n dcDescriptionField != null) {\n DCModule dc = new DCModuleImpl();\n if (dcCreatorField != null) {\n List<MetadataValue> dcAuthors = itemService\n .getMetadataByMetadataString(item, dcCreatorField);\n if (dcAuthors.size() > 0) {\n List<String> creators = new ArrayList<>();\n for (MetadataValue author : dcAuthors) {\n creators.add(author.getValue());\n }\n dc.setCreators(creators);\n }\n }\n if (dcDateField != null && !hasDate) {\n List<MetadataValue> v = itemService.getMetadataByMetadataString(item, dcDateField);\n if (v.size() > 0) {\n dc.setDate((new DCDate(v.get(0).getValue())).toDate());\n }\n }\n if (dcDescriptionField != null) {\n List<MetadataValue> v = itemService\n .getMetadataByMetadataString(item, dcDescriptionField);\n if (v.size() > 0) {\n StringBuilder descs = new StringBuilder();\n for (MetadataValue d : v) {\n if (descs.length() > 0) {\n descs.append(\"\\n\\n\");\n }\n descs.append(d.getValue());\n }\n dc.setDescription(descs.toString());\n }\n }\n entry.getModules().add(dc);\n }\n\n //iTunes Podcast Support - START\n if (podcastFeed) {\n // Add enclosure(s)\n List<SyndEnclosure> enclosures = new ArrayList();\n try {\n List<Bundle> bunds = itemService.getBundles(item, \"ORIGINAL\");\n if (bunds.get(0) != null) {\n List<Bitstream> bits = bunds.get(0).getBitstreams();\n for (Bitstream bit : bits) {\n String mime = bit.getFormat(context).getMIMEType();\n if (ArrayUtils.contains(podcastableMIMETypes, mime)) {\n SyndEnclosure enc = new SyndEnclosureImpl();\n enc.setType(bit.getFormat(context).getMIMEType());\n enc.setLength(bit.getSizeBytes());\n enc.setUrl(urlOfBitstream(request, bit));\n enclosures.add(enc);\n\n }\n }\n }\n //Also try to add an external value from dc.identifier.other\n // We are assuming that if this is set, then it is a media file\n List<MetadataValue> externalMedia = itemService\n .getMetadataByMetadataString(item, externalSourceField);\n if (externalMedia.size() > 0) {\n for (MetadataValue anExternalMedia : externalMedia) {\n SyndEnclosure enc = new SyndEnclosureImpl();\n enc.setType(\n \"audio/x-mpeg\"); //We can't determine MIME of external file, so just\n // picking one.\n enc.setLength(1);\n enc.setUrl(anExternalMedia.getValue());\n enclosures.add(enc);\n }\n }\n\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n entry.setEnclosures(enclosures);\n\n // Get iTunes specific fields: author, subtitle, summary, duration, keywords\n EntryInformation itunes = new EntryInformationImpl();\n\n String author = getOneDC(item, authorField);\n if (author != null && author.length() > 0) {\n itunes.setAuthor(author); // <itunes:author>\n }\n\n itunes.setSubtitle(title == null ? localize(labels, MSG_UNTITLED) : title); // <itunes:subtitle>\n\n if (db.length() > 0) {\n itunes.setSummary(db.toString()); // <itunes:summary>\n }\n\n String extent = getOneDC(item,\n \"dc.format.extent\"); // assumed that user will enter this field\n // with length of song in seconds\n if (extent != null && extent.length() > 0) {\n extent = extent.split(\" \")[0];\n long duration = Long.parseLong(extent);\n itunes.setDuration(new Duration(duration)); // <itunes:duration>\n }\n\n String subject = getOneDC(item, \"dc.subject\");\n if (subject != null && subject.length() > 0) {\n String[] subjects = new String[1];\n subjects[0] = subject;\n itunes.setKeywords(subjects); // <itunes:keywords>\n }\n\n entry.getModules().add(itunes);\n }\n }\n feed.setEntries(entries);\n }\n }", "public void setFeedType(String feedType) {\n\t\tthis.feedType = feedType;\n\t}", "public Feed getFeed(URL feedURLObject, boolean summary) {\n return getFeed(feedURLObject, null, summary);\n }", "public abstract void deleteFeed(final ServerBaseFeed feed) throws ServiceException;", "public List<RssFeedItem> getItems() throws Exception {\n // using SaxParser as the method of parsing the feed. \n SAXParserFactory factory = SAXParserFactory.newInstance();\n SAXParser saxParser = factory.newSAXParser();\n // SAX parser handler object which handles feed elements\n RssParseHandler handler = new RssParseHandler();\n saxParser.parse(rssUrl, handler);\n // The result of the parsing process is being stored in the handler object\n return handler.getItems();\n }", "@Override\n protected ArrayList<Object> doInBackground(String... params) {\n RequestBody postData = new FormEncodingBuilder()\n .add(\"type\", \"json\")\n .build();\n\n ArrayList<Object> feedDataList = CMFeedJsonUtil.feed(params[0], postData);\n Log.d(\"Tag\", feedDataList.toString());\n return feedDataList;\n }", "public interface RSSService {\n\n //if only RSS feeds used the last-modified tag..\n @HEAD\n Call<Void> headFeed(@Url String url);\n\n @GET\n Call<RSSFeed> getFeed(@Url String url);\n}", "public void threadedContactFeedUpdate(ContactRssImpl contact)\n {\n RssThread rssThr = new RssThread(this, contact);\n rssThr.start();\n }", "public void processUrl() {\n try {\n\n JsonNode rootNode = getJsonRootNode(getJsonFromURL()); // todo: pass url in this method (to support multi-urls)\n getValuesFromJsonNodes(rootNode);\n setAndFormatValues();\n\n } catch (Exception e) {\n System.out.println(\"ERROR: caught error in processUrl()\");\n e.printStackTrace();\n }\n }", "private void refreshFeed() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.addDescendingOrder(\"createdAt\");\n query.setLimit(20);\n query.findInBackground(new FindCallback<Post>() {\n // Result of the call to Parse\n @Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n\n adapter.clear();\n adapter.addAll(queryPosts);\n }\n });\n }", "public void init() {\n BufferedReader in = null;\n try {\n //URL feed = new URL(\"http://twitter.com/statuses/user_timeline/48274520.rss\");\n URL feed = new URL(\"http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=g_damian\");\n in = new BufferedReader(new InputStreamReader(feed.openStream()));\n String inputLine;\n String data = null;\n while ((inputLine = in.readLine()) != null) {\n inputLine = inputLine.trim();\n if (inputLine.startsWith(\"<created_at>\") && inputLine.endsWith(\"</created_at>\")) {\n inputLine = inputLine.substring(12, inputLine.length() - 13);\n data = inputLine.replaceAll(\"\\\\+\\\\d* \", \"\");\n }\n if (inputLine.startsWith(\"<text>\") && inputLine.endsWith(\"</text>\")) {\n inputLine = inputLine.substring(6, inputLine.length() - 7);\n buffer.append(escapeMessage(inputLine));\n buffer.append(\"<br/>[\" + data + \"]\");\n buffer.append(\"\\n\");\n }\n }\n in.close();\n } catch (MalformedURLException ex) {\n Logger.getLogger(ShowTweetsApplet.class.getName()).log(Level.SEVERE, null, ex);\n appendException(buffer, ex);\n } catch (IOException ex) {\n Logger.getLogger(ShowTweetsApplet.class.getName()).log(Level.SEVERE, null, ex);\n appendException(buffer, ex);\n } finally {\n try {\n if (in != null) {\n in.close();\n }\n } catch (IOException ex) {\n Logger.getLogger(ShowTweetsApplet.class.getName()).log(Level.SEVERE, null, ex);\n appendException(buffer, ex);\n }\n }\n }", "private void parseJsonFeed(JSONObject response) {\n try {\n JSONArray newsArray = response.getJSONArray(\"news\");\n hidePDialog();\n\n for (int i = 0; i < newsArray.length(); i++) {\n JSONObject feedObj = (JSONObject) newsArray.get(i);\n\n NewsItem news = new NewsItem();\n\n news.setId(feedObj.getString(\"id\"));\n news.setTitle(feedObj.getString(\"title\"));\n news.setDate(\"Posted on \" + feedObj.getString(\"created_at\"));\n news.setBrief(feedObj.getString(\"brief\"));\n\n //news.setDate(feedObj.getString(\"mdate\"));\n// String rd = feedObj.getString(\"mdate\");\n// news.setDate(\"Release date: \" + rd);\n\n mItems.add(news);\n }\n\n // notify data changes to list adapater\n newsAdapter.notifyDataSetChanged();\n\n } catch (JSONException e) {\n e.printStackTrace();\n hidePDialog();\n }\n }", "public void updateFeed(injective.ocr.v1beta1.Tx.MsgUpdateFeed request,\n io.grpc.stub.StreamObserver<injective.ocr.v1beta1.Tx.MsgUpdateFeedResponse> responseObserver) {\n asyncUnimplementedUnaryCall(getUpdateFeedMethod(), responseObserver);\n }", "@SuppressWarnings(\"deprecation\")\n\tprotected void postToWall() {\n\t\tBundle parameters = new Bundle();\n\n\t\tparameters.putString(\"link\", link);\n\t\tfacebook.dialog(FacebookActivity.this, \"feed\", parameters,\n\t\t\t\tnew DialogListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onCancel() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onComplete(Bundle values) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\tfinish();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onError(DialogError e) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onFacebookError(FacebookError e) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\t\t});\n\t}", "public void useItemsFrom(Feed feed) {\n\t\titems = feed.items;\n\t}", "protected abstract List<Entry> buildFeedEntries(\n\t\t\tMap<String, Object> model, HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows Exception;", "public injective.ocr.v1beta1.Tx.MsgUpdateFeedResponse updateFeed(injective.ocr.v1beta1.Tx.MsgUpdateFeed request) {\n return blockingUnaryCall(\n getChannel(), getUpdateFeedMethod(), getCallOptions(), request);\n }", "public boolean getFeed() {\r\n return Feed;\r\n }", "public void feeds(Parameters parameters, final onSuccessCallback callback){\n getJSONArray(parameters.buildQuery(Endpoint.FEEDS), new onSuccessCallback() {\n @Override\n public void onSuccess(JSONArray result) {\n callback.onSuccess(result);\n }\n\n @Override\n public void onError(VolleyError error) {\n callback.onError(error);\n }\n });\n }", "public RSS getRSS(URL url) throws JAXBException {\n\t\tJAXBContext ctx = JAXBContext.newInstance(RSS.class);\n\t\tUnmarshaller um = ctx.createUnmarshaller();\n\t\tRSS rss = (RSS) um.unmarshal(url);\n\t\treturn rss;\n\t}", "@Scheduled(fixedRate = 120000)\n public void readRss() {\n\n List<ItemNews> itemList = new ArrayList<>();\n\n try {\n String url = \"https://www.nytimes.com/svc/collections/v1/publish/https://www.nytimes.com/section/world/rss.xml\";\n\n try (XmlReader reader = new XmlReader(new URL(url))) {\n SyndFeed feed = new SyndFeedInput().build(reader);\n for (SyndEntry entry : feed.getEntries()) {\n LocalDateTime localDateTime = entry.getPublishedDate().toInstant()\n .atZone(ZoneId.systemDefault())\n .toLocalDateTime();\n ItemNews item = new ItemNews();\n item.setTitle(entry.getTitle());\n item.setAuthor(entry.getAuthor());\n item.setLink(entry.getLink());\n item.setDescription(entry.getDescription().getValue());\n item.setDateTime(localDateTime);\n modifyItem(item);\n itemList.add(item);\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n if (!itemList.isEmpty()) {\n Collections.sort(itemList , Comparator.comparing(ItemNews::getDateTime));\n saveItems(itemList);\n }\n }", "public static void validate(FeedProvider _feedProvider) throws FeedInvalidException {\n\t\tif(_feedProvider.getnNumber() == null || _feedProvider.getnNumber().equals(\"\") \r\n\t\t\t\t|| _feedProvider.getNickName() == null || _feedProvider.getNickName().equals(\"\")\r\n\t\t\t\t|| _feedProvider.getUrl() == null || _feedProvider.getUrl().equals(\"\") )\r\n\t\t\tthrow new FeedInvalidException(message_02);\r\n\t\t\r\n\t\tUrlValidator urlValidator = new UrlValidator();\t\t \r\n\t //validation URL\r\n\t if (!urlValidator.isValid(_feedProvider.getUrl())) \r\n\t \tthrow new FeedInvalidException(message);\r\n\t \r\n\t // verify if URL is a valid RSS\r\n\t try {\r\n\t\t \r\n\t \tDocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\r\n\t\t org.w3c.dom.Document doc = builder.parse(_feedProvider.getUrl()); \r\n\t\t boolean validRss = doc.getDocumentElement().getNodeName().equalsIgnoreCase(\"rss\");\r\n\t\t if(!validRss)\r\n\t\t \tthrow new FeedInvalidException(message);\r\n\t\t \r\n\t } catch (FeedInvalidException fe) {\r\n\t \t\r\n\t\t throw fe;\r\n\t\t \r\n\t } catch (Exception e) {\r\n\t \t//for unknown case\r\n\t \tthrow new FeedInvalidException( message +\"\\n\"+ e.getMessage() );\r\n\t\t}\r\n\t \r\n\t}", "private void processUrls(){\n // Strip quoted tweet URL\n if(quotedTweetId > 0){\n if(entities.urls.size() > 0 &&\n entities.urls.get(entities.urls.size() - 1)\n .expandedUrl.endsWith(\"/status/\" + String.valueOf(quotedTweetId))){\n // Match! Remove that bastard.\n entities.urls.remove(entities.urls.size() - 1);\n }\n }\n\n // Replace minified URLs\n for(Entities.UrlEntity entity : entities.urls){\n // Find the starting index for this URL\n entity.indexStart = text.indexOf(entity.minifiedUrl);\n // Replace text\n text = text.replace(entity.minifiedUrl, entity.displayUrl);\n // Find the last index for this URL\n entity.indexEnd = entity.indexStart + entity.displayUrl.length();\n }\n }", "public interface FeedService {\n\n /**\n * Returns the users that the user specified in the request is following. Uses information in\n * the request object to limit the number of followees returned and to return the next set of\n * followees after any that were returned in a previous request. Uses the {@link } to\n * get the followees from the server.\n *\n * @param request contains the data required to fulfill the request.\n * @return the followees.\n */\n public FeedResponse getFeeds(FeedRequest request);\n\n\n}", "void start(String feedAddr) {\n this.scheduler = Executors.newSingleThreadScheduledExecutor(r -> new Thread(r, \"f\" + feedAddr));\n this.scheduler.scheduleAtFixedRate(this.newsProducer, this.newsProducingRateInMillis,\n this.newsProducingRateInMillis, TimeUnit.MILLISECONDS);\n }", "public void execute(JobExecutionContext context) throws JobExecutionException {\n\t\tthis.servletContext=(ServletContext)context.getMergedJobDataMap().get(\"servletContext\");\t\n\t\tloadProperties();\t\t\n\t\tlog.info(\"-------------------------------------------------------------------\");\n\t\tlog.info(\"Starting to generate Atom Feed files.\");\n\t\t\n\t\tif(cswURL == null && feedURL == null && servicePath==null && dataSetPath==null && opensearchPath == null){\n\t\t\tlog.error(\"Config.properties parameter missing.\");\n\t\t}\n\t\t\n\t\tString[] downloadIDs = downloadUUIDs.split(\",\");\n\n\t\tfor(int id=0; id < downloadIDs.length; id ++){\n\t\t\tString downloadUUID = downloadIDs[id];\n\t\t\t\n\t\t\ttry{\n\t\t\t\t\t\t\n\t\t\t\tString resp = CSWUtil.executeRequest(cswURL, downloadUUID, proxyHost, proxyPort);\n\t\t\t\t\n\t\t\t\tif (!resp.contains(\"Exception\")) {\n\t\t\t\t\tparseMetadata(resp,downloadUUID);\n\t\n\t\t\t\t}else{\n\t\t\t\t\tlog.error(\"Service UUID can not be found!\");\n\t\t\t\t}\n\t\t\t}catch(DocumentException de){\n\t\t\t\tlog.error(de.toString(), de.fillInStackTrace());\n\t\t\t \tSystem.out.println(de.toString());\n\t\t\t}\t\t\t\t\n\t\t}\n\t}" ]
[ "0.7095245", "0.7037386", "0.6195408", "0.6016712", "0.55881363", "0.5552531", "0.54114527", "0.540667", "0.5393218", "0.5393218", "0.53852504", "0.5354446", "0.53307974", "0.5318021", "0.5317737", "0.53133076", "0.5300392", "0.5291605", "0.528287", "0.52807677", "0.52690226", "0.52480876", "0.52413666", "0.5235043", "0.5216454", "0.5212864", "0.5201072", "0.5179757", "0.5171113", "0.5126076", "0.51240504", "0.51194644", "0.5107679", "0.5105696", "0.5069603", "0.5058839", "0.503213", "0.5020514", "0.49971327", "0.4977512", "0.49730703", "0.4966789", "0.4901649", "0.4892533", "0.4882818", "0.48728594", "0.48430118", "0.48317152", "0.4799189", "0.47762", "0.47762", "0.4774757", "0.4768967", "0.47602588", "0.47548926", "0.47445497", "0.47203264", "0.47131", "0.47077382", "0.47073084", "0.46973875", "0.4696647", "0.46945697", "0.46828553", "0.4671148", "0.46608546", "0.46588737", "0.4642436", "0.46415827", "0.46364963", "0.46203125", "0.45881668", "0.45702118", "0.45630297", "0.45615205", "0.4550438", "0.45488212", "0.4540327", "0.45403048", "0.45374146", "0.45324904", "0.45316085", "0.45204863", "0.45200294", "0.45179114", "0.45117345", "0.4496934", "0.44913113", "0.44864094", "0.4481166", "0.4477368", "0.4468903", "0.4466981", "0.4463158", "0.44540718", "0.44383636", "0.44325274", "0.4414865", "0.4412016", "0.44090885" ]
0.80493987
0
Processes an Atom feed given as an Abdera Feed object
public static void processFeed(FeedContext fc, Feed feed) { try { AbderaAtomParser parser = new AbderaAtomParser(feed); parser.persistFeed(fc); } catch (Exception e) { mLog.error("Error processing feed at [" + fc.getFeedUrl() + "]: " + e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void processFeed(FeedContext fc) {\n\n String feedUrl = fc.getFeedUrl();\n mLog.info(\"Processing Atom feed at URL: \" + feedUrl);\n\n try {\n AbderaAtomParser atomParser = new AbderaAtomParser(new URL(feedUrl));\n atomParser.persistFeed(fc);\n\n mLog.info(\"Finished processing Atom feed at URL \" + feedUrl);\n }\n catch (MalformedURLException url_e) {\n mLog.error(\"MalformedURL found for \" + fc.getFeedUrl());\n }\n catch (ArrayIndexOutOfBoundsException a) {\n // this happens if the feed is empty (typically an activity stream),\n // need a better way to track this though\n \tmLog.warn(\"Feed at URL [\" + feedUrl + \"] is probably empty, but this \" +\n \t\t\t\"exception should have been prevented.\");\n }\n catch (Exception e) {\n mLog.error(\"Error processing feed at [\" + fc.getFeedUrl() + \"]: \" + e.getMessage());\n }\n catch (Throwable t) {\n mLog.error(\"Error processing feed at [\" + fc.getFeedUrl() + \"]: \" + t.getMessage());\n }\n }", "void handle(List<FeedEntry> feedEntryBatch);", "public void PopulateRSSData()\n {\n try\n {\n URL Feed = ParseRSSFromFeed();\n ParseRSS(Feed);\n }\n catch(java.net.MalformedURLException exp)\n {\n String message = exp.getMessage();\n System.out.println(message);\n }\n catch(com.rometools.rome.io.FeedException fexp)\n {\n String message = fexp.getMessage();\n System.out.println(message);\n }\n catch(java.io.IOException ioexp)\n {\n String message = ioexp.getMessage();\n System.out.println(message);\n }\n }", "java.lang.String getFeed();", "public static void processFeed(String feedUrl) throws Exception {\n processFeed(new FeedContext(feedUrl));\n }", "public Object parseChannel(int rssType, Document doc) throws Exception;", "public interface Feed extends Element {\n\n /**\n * Returns the feed type.\n */\n public FeedType getType();\n \n /**\n * Convenience method to retrieve the feed title.\n */\n public String getTitle();\n \n /**\n * Convenience method to retrieve the feed link.\n */\n public String getLink();\n \n /**\n * Convenience method to retrieve the feed description.\n */\n public String getDescription();\n \n /**\n * Convenience method to retrieve the language.\n */\n public String getLanguage();\n \n /**\n * Convenience method to retrieve the copyright.\n */\n public String getCopyright();\n \n /**\n * Convenience method to retrieve the published date.\n */\n public Date getPubDate();\n \n /**\n * Convenience method to retrieve a list of categories.\n */\n public List<String> getCategories();\n \n /**\n * Returns a list of Items in the feed.\n */\n public List<Item> getItemList();\n}", "public PodcastEntity getPodcastByFeed(String feed);", "public void ParseRSS(URL feedUrl) throws com.rometools.rome.io.FeedException, java.io.IOException {\n //TODO: EVERY THING HERE SHOULD BE IN A TRANSACTION\n List<String> HashFields = new ArrayList<>();\n SyndFeedInput input = new SyndFeedInput();\n SyndFeed feed = input.build(new XmlReader(feedUrl));\n RSSChannelElements ChannelElements = new RSSChannelElements();\n Date CurrentDate = new Date();\n SimpleDateFormat SDF = new java.text.SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n //GET ADDITIONAL PROPERTIES OF THE CHANNEL\n //GET CHANNEL AUTHOR\n String ch_author = feed.getAuthor();\n ChannelElements.Author = ch_author;\n //GET PUBLISHED DATE\n Date ch_PubDate = feed.getPublishedDate();\n ChannelElements.PublishedDate = ch_PubDate;\n //GET LANGUAGE\n String ch_Language = feed.getLanguage();\n ChannelElements.Language = ch_Language;\n //GET WEBMASTER\n String ch_WebMaster = feed.getWebMaster();\n ChannelElements.webMaster = ch_WebMaster;\n //GET MANAGING EDITOR\n String ch_ME = feed.getManagingEditor();\n ChannelElements.managingEditor = ch_ME;\n //GET GENERATOR\n String ch_generator = feed.getGenerator();\n ChannelElements.Generator = ch_generator;\n //GET DESCRIPTION\n String ch_description = feed.getDescription();\n ChannelElements.Description = ch_description;\n int CurrentChannelID = 0;\n //TODO: DO THIS IN A STORED PROCEDURE\n try\n {\n TimeValidations ValidateTime = new TimeValidations();\n if (ValidateTime.IsWithinValidWindow(CurrentDate, ch_PubDate, ReadInterval))\n {\n //INSERT TO DB THE CHANNEL DETAILS\n CurrentChannelID = InsertChannelDetails(ChannelElements);\n }\n }\n catch(java.sql.SQLException exp)\n {\n String message = exp.getMessage();\n System.out.println(message);\n }\n\n\n //GET ELEMENTS FROM THE \"ITEMS\"\n List entries = feed.getEntries();\n Iterator it = entries.iterator();\n while (it.hasNext()) {\n RSSFields RssFieldValues = new RSSFields();\n SyndEntry entry = (SyndEntry) it.next();\n //GET TITLE\n System.out.println(entry.getTitle());\n String Title = entry.getTitle();\n RssFieldValues.Title = Title;\n //HashFields.add(Title);\n //GET LINK\n System.out.println(entry.getLink());\n RssFieldValues.Link = entry.getLink();\n HashFields.add(RssFieldValues.Link);\n //GET DESCRIPTION\n SyndContent description = entry.getDescription();\n System.out.println(description.getValue());\n RssFieldValues.Description = description.getValue();\n //HashFields.add(description.getValue());\n //GET PUBLISHED DATE\n Date Pub_Date = entry.getPublishedDate();\n System.out.println(SDF.format(Pub_Date));\n RssFieldValues.PublishedDate = entry.getPublishedDate();\n //GET UPDATED DATE\n Date U_date = entry.getUpdatedDate();\n System.out.println(U_date);\n RssFieldValues.UpdatedDate = entry.getPublishedDate();\n //GET AUTHOR\n String Author = entry.getAuthor();\n RssFieldValues.Author = Author;\n System.out.println(Author);\n //GET COMMENTS;\n String Comments = entry.getComments();\n RssFieldValues.Comments = Comments;\n System.out.println();\n try {\n //org.joda.time.Period P = new org.joda.time.Period(Pub_Date, CurrentDate);\n //if(SDF.parse(Pub_Date.toString()) == SDF.parse(CurrentDate.toString()))\n //org.joda.time.Period p = new org.joda.time.Period(CurrentDate, Pub_Date);\n //ONLY INSERT IF THE FEED IS WITHIN THE SPECIFIED PERIOD\n TimeValidations ValidateTime = new TimeValidations();\n if (ValidateTime.IsWithinValidWindow(CurrentDate, U_date, ReadInterval))\n {\n //INSERT NEWS SPECIFIC VALUES TO DB\n HashGenerator Gen = new HashGenerator();\n RssFieldValues.ComputedHash = Gen.HashCalculator(HashFields);\n InsertToDB(RssFieldValues, CurrentChannelID);\n }\n } catch (java.sql.SQLException ex) {\n String message = ex.getMessage();\n System.out.println(message);\n }\n }\n // System.out.println(feed);\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tgetGmailAtomFeed(access_token,token_type);\t\t\t\t\t\n\t\t\t\t}", "public AtomFeed(String feedURL) throws ParserConfigurationException, IOException\r\n\t{\r\n\t\tthis.feedURL = feedURL;\r\n\t\txml = null;\r\n\t\tdocumentbuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\r\n\t\tif (!refresh()) throw new IOException();\r\n\t}", "public void readFeed() {\n\t\tfeedSvc.getFeed(date, new GetFeedCallback());\n\t\tdate=new Date();\n\t}", "public void parseInputStream(InputStream is) throws IOException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\n\t\tString str = null;\n\t\twhile((str = br.readLine()) != null) {\n\t\t\tsb.append(str).append(\"\\n\\r\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tJSONObject jObject = new JSONObject(sb.toString());\n\t\t\tfinal String access_token = jObject.getString(\"access_token\");\n\t\t\tfinal String token_type = jObject.getString(\"token_type\");\n\t\t\tfinal String expires_in = jObject.getString(\"expires_in\");\n\t\t\tfinal String refresh_token = jObject.getString(\"refresh_token\");\n\t\t\t\n\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tgetGmailAtomFeed(access_token,token_type);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "com.google.ads.googleads.v6.resources.Feed getFeed();", "private void parseJsonFeed(JSONObject response) {\n try {\n JSONArray feedArray = response.getJSONArray(\"feed\");\n\n for (int i = 0; i < feedArray.length(); i++) {\n JSONObject feedObj = (JSONObject) feedArray.get(i);\n\n FeedItem item = new FeedItem();\n item.setId(feedObj.getInt(\"organisation_id\"));\n item.setPortId(feedObj.getInt(\"portfolio_id\"));\n item.setName(feedObj.getString(\"name\"));\n //int id=item.getId();\n // Image might be null sometimes\n String image = feedObj.isNull(\"image\") ? null : feedObj.getString(\"image\");\n item.setImge(image);\n item.setStatus(feedObj.getString(\"status\"));\n item.setProfilePic(feedObj.getString(\"profilePic\"));\n item.setTimeStamp(feedObj.getString(\"timeStamp\"));\n item.setCommentCount(feedObj.getString(\"commentCount\"));\n\n // url might be null sometimes\n String feedUrl = feedObj.isNull(\"url\") ? null : feedObj.getString(\"url\");\n item.setUrl(feedUrl);\n\n feedItems.add(item);\n }\n\n\n // notify data changes to list adapater\n listAdapter.notifyDataSetChanged();\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tprotected Feed newFeed() {\n\t\treturn new Feed(this.feedType);\n\t}", "public Feed getFeed(URL feedURLObject, Date lastUpdatedDate, boolean summary) {\n inputStream = null;\n FeedHandler feedHandler = new FeedHandler(lastUpdatedDate, summary);\n if (xmlReader != null && feedURLObject != null) {\n try {\n String encoding = detectEncoding(feedURLObject);\n if (inputStream == null) {\n if (\"file\".equals(feedURLObject.getProtocol())) {\n inputStream = feedURLObject.openStream();\n } else {\n inputStream = client.loadInputStream(feedURLObject);\n }\n }\n InputSource inputSource = new InputSource(inputStream);\n if (encoding != null) {\n inputSource.setEncoding(encoding);\n }\n\n xmlReader.setContentHandler(feedHandler);\n xmlReader.parse(inputSource);\n\n } catch (EndSAXException e) {\n // No problem\n } catch (IOException e) {\n System.err.println(e.getMessage());\n } catch (SAXException e) {\n System.err.println(e.getMessage());\n } finally {\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (IOException e) {\n System.err.println(e.getMessage());\n }\n }\n }\n }\n return feedHandler.getFeed();\n }", "public static Facts parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception {\r\n Facts object =\r\n new Facts();\r\n\r\n int event;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n try {\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n\r\n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\", \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(\":\"));\r\n }\r\n nsPrefix = nsPrefix == null ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\") + 1);\r\n\r\n if (!\"Facts\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\r\n return (Facts) ExtensionMapper.getTypeObject(\r\n nsUri, type, reader);\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.List handledAttributes = new java.util.ArrayList();\r\n\r\n\r\n reader.next();\r\n\r\n java.util.ArrayList list1 = new java.util.ArrayList();\r\n\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n\r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\", \"fact\").equals(reader.getName())) {\r\n\r\n\r\n // Process the array and step past its final element's end.\r\n\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\", \"nil\");\r\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)) {\r\n list1.add(null);\r\n reader.next();\r\n } else {\r\n list1.add(Fact.Factory.parse(reader));\r\n }\r\n //loop until we find a start element that is not part of this array\r\n boolean loopDone1 = false;\r\n while (!loopDone1) {\r\n // We should be at the end element, but make sure\r\n while (!reader.isEndElement())\r\n reader.next();\r\n // Step out of this element\r\n reader.next();\r\n // Step to next element event.\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n if (reader.isEndElement()) {\r\n //two continuous end elements means we are exiting the xml structure\r\n loopDone1 = true;\r\n } else {\r\n if (new javax.xml.namespace.QName(\"\", \"fact\").equals(reader.getName())) {\r\n\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\", \"nil\");\r\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)) {\r\n list1.add(null);\r\n reader.next();\r\n } else {\r\n list1.add(Fact.Factory.parse(reader));\r\n }\r\n } else {\r\n loopDone1 = true;\r\n }\r\n }\r\n }\r\n // call the converter utility to convert and set the array\r\n\r\n object.setFact((Fact[])\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(\r\n Fact.class,\r\n list1));\r\n\r\n } // End of if for expected property start element\r\n\r\n else {\r\n\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement())\r\n // A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\r\n\r\n\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "protected void onPostExecute(String feed) {\n\t\t}", "private List<DBFeedModel> parseResult(ConnectionResult connectionResult) {\n try {\n JSONObject response = new JSONObject(connectionResult.getResult());\n JSONArray posts = response.optJSONArray(\"posts\");\n List<DBFeedModel> feedsList = new ArrayList<>();\n\n for (int i = 0; i < posts.length(); i++) {\n JSONObject post = posts.optJSONObject(i);\n DBFeedModel item = new DBFeedModel();\n item.setViewType(Constants.FEED_VIEW_TYPE_LEFT);\n item.setTitle(post.optString(\"title\"));\n item.setThumb(post.optString(\"thumbnail\"));\n item.setUrl(\"http://m.dantri.com.vn/xa-hoi/hai-phong-yeu-cau-thao-do-rong-vang-dau-pikachu-gay-tranh-cai-20170108172552427.htm\");\n feedsList.add(item);\n }\n\n return feedsList;\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public URL ParseRSSFromFeed() throws java.net.MalformedURLException\n {\n URL feedUrl = new URL(Src_URL);\n return feedUrl;\n }", "public static FragmentFeed readPostFeed(Reader in)\n throws IOException, SAXException {\n PostFeedReader handler = new PostFeedReader();\n XMLReader parser = parserfactory.createXMLReader();\n // turning this on so we get the 'xmlns*' attributes\n parser.setFeature(\"http://xml.org/sax/features/namespace-prefixes\", true);\n parser.setContentHandler(handler);\n parser.parse(new InputSource(in));\n return handler.getFragmentFeed();\n }", "protected void onPostExecute(String feed) {\n }", "protected void onPostExecute(String feed) {\n }", "@NonNull\n default T feed(@NonNull Iterator<Map<String, Object>> feeder) {\n return ScalaFeeds.apply(this, feeder);\n }", "public Object parseItem(int rssType, Document doc, int index) throws Exception;", "private void refreshFeed() {\n Calendar cal = new GregorianCalendar();\n cal.set(Calendar.HOUR_OF_DAY, 0);\n cal.set(Calendar.MINUTE, 0);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.DATE, cal.get(Calendar.DATE) - DEFAULT_DAYS_BACK);\n String asOfDate = iso8601.fromCalendar(cal);\n \n feedService.feed(asOfDate, new Callback<List<Post>>() {\n @Override\n public void success(List<Post> posts, Response response) {\n Log.i(TAG, \"Received \" + posts.size() + \" posts from the feed service.\");\n \n ArrayList<Post> p = new ArrayList<Post>(posts);\n postArrayAdapter = new PostArrayAdapter(context, R.layout.listitem_feed, p);\n listView.setAdapter(postArrayAdapter);\n }\n \n @Override\n public void failure(RetrofitError retrofitError) {\n //TODO: Handle this better\n Log.e(TAG, \"Error retrieving posts from the feed: \" + retrofitError.getCause().toString());\n \n if (!retrofitError.isNetworkError()) {\n Log.i(TAG, \"Not network error, so likely cookie has expired; return user to login page\");\n sessionManager.terminateSession();\n startActivity(new Intent(getApplicationContext(), MainActivity.class));\n }\n else {\n Toast toast = new Toast(context);\n toast.makeText(context, getString(R.string.error_connecting), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "void fetchFactFeeds();", "void onContentChanged(@Nullable List<FeedContent> feedContents);", "public List<LinkDetails> scrapeRSSPageForLinks(String rssUrl) {\n\t\tString description = \"\";\n\t\tString title = \"\";\n\t\tString link = \"\";\n\t\tString pubdate = \"\";\n\t\tURL url;\n\t\tInputStream in;\n\n\t\tList<LinkDetails> rssProcessedData = new ArrayList<LinkDetails>();\n\n\t\ttry {\n\t\t\turl = new URL(rssUrl);\n\t\t} catch (MalformedURLException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t\ttry {\n\t\t\tin = url.openStream();\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t\t// create XML input factory\n\t\tXMLInputFactory inputFactory = XMLInputFactory.newInstance();\n\n\t\t// read the XML document\n\t\ttry {\n\n\t\t\tXMLEventReader eventReader = inputFactory.createXMLEventReader(in);\n\n\t\t\tboolean isFeedHeader = true;\n\t\t\twhile (eventReader.hasNext()) {\n\t\t\t\tXMLEvent event = eventReader.nextEvent();\n\t\t\t\tif (event.isStartElement()) {\n\t\t\t\t\tString localPart = event.asStartElement().getName().getLocalPart();\n\n\t\t\t\t\t// System.out.println(localPart);\n\n\t\t\t\t\tswitch (localPart) {\n\n\t\t\t\t\tcase \"item\":\n\t\t\t\t\t\t// if (isFeedHeader) {\n\t\t\t\t\t\t// isFeedHeader = false;\n\t\t\t\t\t\t// System.out.println(\" title: \"+title+ \" description: \"+ description + \" link:\n\t\t\t\t\t\t// \"+link+\" pubDate: \"+pubdate);\n\t\t\t\t\t\t// }\n\t\t\t\t\t\tevent = eventReader.nextEvent();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"title\":\n\t\t\t\t\t\ttitle = getCharacterData(event, eventReader);\n\t\t\t\t\t\t// System.out.println(\"title: \"+title);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"description\":\n\t\t\t\t\t\tdescription = getCharacterData(event, eventReader);\n\t\t\t\t\t\t// System.out.println(\"description: \"+description);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"link\":\n\t\t\t\t\t\tlink = getCharacterData(event, eventReader);\n\t\t\t\t\t\tSystem.out.println(\"link: \" + link);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"pubDate\":\n\t\t\t\t\t\tpubdate = getCharacterData(event, eventReader);\n\t\t\t\t\t\t// System.out.println(\"pubDate: \"+pubdate);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\t\t\t\t} else if (event.isEndElement()) {\n\t\t\t\t\tif (event.asEndElement().getName().getLocalPart() == (\"item\")) {\n\n\t\t\t\t\t\tLinkDetails linkDetails = new LinkDetails(link, title, description, pubdate);\n\t\t\t\t\t\trssProcessedData.add(linkDetails);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (XMLStreamException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t\treturn rssProcessedData;\n\t}", "@Override\n\tpublic InputStream createForumRss(String objectId, String link)\n\t\t\tthrows Exception {\n\t\treturn null;\n\t}", "void threadUpdateReceived(FeedItem feedItem);", "public AclFeed getAclFeed(DocumentListEntry entry) throws MalformedURLException, IOException, ServiceException;", "public void openNewFeed(final String datfeed) {\n\n //close the navigation drawer\n closeDrawer();\n\n //show swipe refresh\n swiperefresh.setRefreshing(true);\n\n //detect if there's a connection issue or not: if there's a connection problem stop refreshing and show message\n if (cM.getActiveNetworkInfo() == null) {\n Toast toast = Toast.makeText(getBaseContext(), R.string.no_internet, Toast.LENGTH_SHORT);\n toast.show();\n swiperefresh.setRefreshing(false);\n\n } else {\n\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n DOMParser tmpDOMParser = new DOMParser();\n fFeed = tmpDOMParser.parseXml(datfeed);\n ListActivity.this.runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n if (fFeed != null && fFeed.getItemCount() > 0) {\n\n adapter.notifyDataSetChanged();\n\n //close swipe refresh\n swiperefresh.setRefreshing(false);\n\n //set feedURL calling setFeedString method, it is important if we want working swipe refresh listener\n setFeedString(datfeed);\n }\n }\n });\n }\n });\n thread.start();\n }\n }", "com.google.ads.googleads.v6.resources.FeedOrBuilder getFeedOrBuilder();", "boolean hasFeed();", "boolean hasFeed();", "public abstract void updateFeed(final ServerBaseFeed feed,\n final GDataAccount account) throws ServiceException;", "@Override\n protected ArrayList<Object> doInBackground(String... params) {\n RequestBody postData = new FormEncodingBuilder()\n .add(\"type\", \"json\")\n .build();\n\n ArrayList<Object> feedDataList = CMFeedJsonUtil.feed(params[0], postData);\n Log.d(\"Tag\", feedDataList.toString());\n return feedDataList;\n }", "@Override\n protected Void doInBackground(Void... arg0) {\n helper = new LiveFeedParser(999);\n helper.get();\n viewEntries = helper.getViewEntries();\n return null;\n }", "public void useItemsFrom(Feed feed) {\n\t\titems = feed.items;\n\t}", "public Feed findFeedByFeedID(Integer fid);", "public Object parseImage(int rssType, Document doc) throws Exception;", "static public Feed feedsFeedIdGet(Long id)\n {\n Feed f = new Feed();\n\n f.setId(Math.toIntExact(id));\n f.setCategory(\"Political News\");\n f.setLanguage(\"Navajo\");\n f.setLink(\"http://google.com\");\n f.setDescription(\"In computing, a news aggregator, also termed a feed aggregator, feed reader, news reader, RSS reader or simply aggregator, is client software or a web application which aggregates syndicated web content such as online newspapers, blogs, podcasts, and video blogs (vlogs) in one location for easy viewing. RSS is a synchronized subscription system.\");\n return f;\n }", "public void getGmailAtomFeed(final String access_token,final String token_type) {\n\t\tThread th = new Thread(new Runnable(){\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\ttry {\n\t\t\t\t\tURL url = new URL(\"https://mail.google.com/mail/feed/atom\");\n\t\t\t\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\t\t\t\tconn.addRequestProperty(\"Authorization\", token_type + \" \"+access_token);\n\t\t\t\t\tint respCode = conn.getResponseCode();\n\t\t\t\t\tif (respCode == HttpURLConnection.HTTP_OK) {\n\t\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\t\tInputStream is = conn.getInputStream();\n\t\t\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\n\t\t\t\t\t\tString str;\n\t\t\t\t\t\twhile((str = br.readLine()) != null) {\n\t\t\t\t\t\t\tsb.append(str).append(\"\\n\\r\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal String text = sb.toString();\n\t\t\t\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\ttextView.setText(text);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\tToast.makeText(SampleGoogleOAuthActivity.this, \"������ ���� ����\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tth.start();\n\t}", "private static void processFeed(String url, String file, SimpleWriter out) \n {\n \tXMLTree rss = new XMLTree1(url);\n \t\n \t// make sure the rss tree is a valid rss tree\n if(!ensureValidRSSTree(rss, out))\n {\n \tout.println(\"This is not a valid RSS Tree.\");\n \treturn;\n }\n \n // print entire document to file\n outputHeader(rss.child(0), out);\n outputFooter(out);\n \n }", "public abstract void createFeed(final ServerBaseFeed feed,\n final GDataAccount account) throws ServiceException;", "private void parseJsonFeed(JSONObject response) {\n try {\n JSONArray newsArray = response.getJSONArray(\"news\");\n hidePDialog();\n\n for (int i = 0; i < newsArray.length(); i++) {\n JSONObject feedObj = (JSONObject) newsArray.get(i);\n\n NewsItem news = new NewsItem();\n\n news.setId(feedObj.getString(\"id\"));\n news.setTitle(feedObj.getString(\"title\"));\n news.setDate(\"Posted on \" + feedObj.getString(\"created_at\"));\n news.setBrief(feedObj.getString(\"brief\"));\n\n //news.setDate(feedObj.getString(\"mdate\"));\n// String rd = feedObj.getString(\"mdate\");\n// news.setDate(\"Release date: \" + rd);\n\n mItems.add(news);\n }\n\n // notify data changes to list adapater\n newsAdapter.notifyDataSetChanged();\n\n } catch (JSONException e) {\n e.printStackTrace();\n hidePDialog();\n }\n }", "public Feed getFeed() throws Exception {\n final Reference feedRef = getHref();\n\n if (feedRef.isRelative()) {\n feedRef.setBaseRef(getWorkspace().getService().getReference());\n }\n\n final Request request = new Request(Method.GET, feedRef.getTargetRef());\n final Response response = getWorkspace().getService()\n .getClientDispatcher().handle(request);\n\n if (response.getStatus().equals(Status.SUCCESS_OK)) {\n return new Feed(response.getEntity());\n } else {\n throw new Exception(\n \"Couldn't get the feed representation. Status returned: \"\n + response.getStatus().getDescription());\n }\n }", "public SnapshotFeedReader(String feedurl) {\n super(feedurl);\n this.feed = new SnapshotFeed();\n this.links = new HashSet<AtomLink>();\n }", "public void refreshAllRssFeeds()\n {\n Vector rssContactList = new Vector();\n rssContactList = opSetPersPresence.getContactListRoot().\n getRssURLList(rssContactList);\n Iterator rssContact = rssContactList.iterator();\n while(rssContact.hasNext())\n {\n ContactRssImpl contact = (ContactRssImpl)rssContact.next();\n try\n {\n \n submitRssQuery(contact, false);\n }\n catch (Exception ex)\n {\n logger.error(\"Failed to refresh feed for \" + contact, ex);\n }\n }\n }", "@Override\n\tpublic boolean useItem(Object linkmon) {\n\t\treturn ((Linkmon)linkmon).feed(feedAmount, hungerFactor);\n\t}", "public void fillFromEntry(BlogEntry entry) {\n\t\tif(entry.getId()==null) {\n\t\t\tthis.id = \"\";\n\t\t} else {\n\t\t\tthis.id = entry.getId().toString();\n\t\t}\n\t\tthis.title = entry.getTitle();\n\t\tthis.text = entry.getText();\n\t\t\n\t}", "public Class<? extends SugarHolder> dispatch(MomentsFeed momentsFeed) {\n return FeedViewHolderHelper.m60888a(momentsFeed);\n }", "public boolean getFeed() {\r\n return Feed;\r\n }", "private Feed(Entity entity, Settings settings) {\n\t\tthis.url = entity.getKey().getName();\n\t\tthis.items = Collections.synchronizedSet(new HashSet<FeedItem>());\n\t\tList<EmbeddedEntity> savedItems = (List<EmbeddedEntity>) entity.getProperty(\"items\"); //NOI18N\n\t\tif (savedItems != null)\n\t\t\tfor (EmbeddedEntity item : savedItems)\n\t\t\t\tthis.items.add(new FeedItem(this, item));\n\t\tthis.settings = settings;\n\t}", "private void readFeed(XmlPullParser parser) throws XmlPullParserException, IOException {\n\n String name;\n\n while (parser.next() != XmlPullParser.END_TAG) {\n if (parser.getEventType() != XmlPullParser.START_TAG) {\n\n if (complete_flag) {\n break;\n }\n continue;\n }\n name = parser.getName();\n // Starts by looking for the entry tag\n if (name.equals(\"student\")) {\n readEntry(parser);\n } else {\n skip(parser);\n }\n }\n\n }", "@Override\r\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\ttry{\r\n\t\t\tURL feedUrl = new URL(\"http://blog.rss.naver.com/leeminji25.xml\");\r\n\t\t\tSyndFeedInput input = new SyndFeedInput();\r\n\t\t\tSyndFeed syndFeed = input.build(new XmlReader(feedUrl));\r\n\t\t\t\r\n\t\t\t/* RSS */\r\n\t\t\tSystem.out.println( syndFeed.getFeedType() );\r\n\t\t\tList<SyndEntry> entries = syndFeed.getEntries();\r\n\t\t\trequest.setAttribute(\"entries\", entries);\t\r\n\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\r\n\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(\"/content/blog.jsp\");\r\n\t\tdispatcher.forward(request, response);\r\n\t}", "public Class<? extends SugarHolder> dispatch(Feed feed) {\n return FeedViewHolderHelper.m60884a(feed);\n }", "protected void populateFeed() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.addDescendingOrder(Post.CREATED_AT);\n query.setLimit(20);\n query.findInBackground(new FindCallback<Post>() {\n // Result of the call to Parse\n @Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n posts.addAll(queryPosts);\n adapter.notifyDataSetChanged();\n }\n });\n }", "protected abstract void parseEntries(final Document doc,\n final ContentCleaner contentCleaner,\n final Resource.Builder resource);", "public interface FeedService {\n\n /**\n * Returns the users that the user specified in the request is following. Uses information in\n * the request object to limit the number of followees returned and to return the next set of\n * followees after any that were returned in a previous request. Uses the {@link } to\n * get the followees from the server.\n *\n * @param request contains the data required to fulfill the request.\n * @return the followees.\n */\n public FeedResponse getFeeds(FeedRequest request);\n\n\n}", "public Feed getFeed(String feedURL, boolean summary) throws MalformedURLException {\n return getFeed(feedURL, null, summary);\n }", "public void addFeedIntoFolder(String feedURL, String name);", "public static void processFeeds(List<FeedContext> fcs) {\n for (FeedContext fc : fcs) {\n try {\n processFeed(fc);\n }\n catch (Exception e) {\n mLog.error(\"Skipping feed at URL [\" + fc.getFeedUrl() +\n \"] due to error while processing: \" + e,e);\n }\n\t\t}\n\t}", "List<SyndFeed> getRssFeeds(Set<String> feedUrls) throws FeedException, IOException,\n FetcherException;", "public long insertFeedEntry(ActivityFeedEntity activityFeed) throws SQLException;", "@Override\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes attributes) throws SAXException {\n\t\tsuper.startElement(uri, localName, qName, attributes);\n\t\ttag = qName;\n\t\tsb.delete(0, sb.length());\n\t\tif (qName.equals(\"entry\")) {\n\t\t\tisFeed = true;\n\t\t\tcommentsInfo = new CommentsInfo();\n\t\t} else if (qName.equals(\"feed\")) {\n\t\t\tisFeed = false;\n\t\t}\n\n\t}", "@Override\n protected String doInBackground(String... args) {\n // rss link url\n String query_url = args[0];\n\n // weather object of rss.\n woeid = parser.getRSSFeedWeather2(query_url);\n\n // updating UI from Background Thread\n runOnUiThread(new Runnable() {\n public void run() {\n /**\n * Updating parsed data into text view.\n * */\n Intent intent = new Intent(MainActivity.this, Summit.class);\n String description = woeid.getWoeid();\n intent.putExtra(EXTRA_MESSAGE, description);\n // Log.d(\"Long\", description);\n startActivity(intent);\n }\n });\n return null;\n }", "private Entry readEntry(XmlPullParser parser) throws XmlPullParserException, IOException {\n\t parser.require(XmlPullParser.START_TAG, ns, \"entry\");\n\t String title = null;\n\t String summary = null;\n\t String link = null;\n\t while (parser.next() != XmlPullParser.END_TAG) {\n\t if (parser.getEventType() != XmlPullParser.START_TAG) {\n\t continue;\n\t }\n\t String name = parser.getName();\n\t if (name.equals(\"title\")) {\n\t title = readTitle(parser);\n\t } else if (name.equals(\"summary\")) {\n\t summary = readSummary(parser);\n\t } else if (name.equals(\"link\")) {\n\t link = readLink(parser);\n\t } else {\n\t skip(parser);\n\t }\n\t }\n\t return new Entry(title, summary, link);\n\t }", "public DocumentListFeed getAllFeeds() throws MalformedURLException, IOException, ServiceException;", "@Override\n\t\tprotected Boolean doInBackground(Void... params) {\n\t\t\tlinklist = parseRSS();\n\t\t\treturn updateDatabase(linklist);\n\t\t}", "com.google.ads.googleads.v6.resources.FeedItem getFeedItem();", "public static Fact parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception {\r\n Fact object =\r\n new Fact();\r\n\r\n int event;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n try {\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n\r\n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\", \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(\":\"));\r\n }\r\n nsPrefix = nsPrefix == null ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\") + 1);\r\n\r\n if (!\"Fact\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\r\n return (Fact) ExtensionMapper.getTypeObject(\r\n nsUri, type, reader);\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.List handledAttributes = new java.util.ArrayList();\r\n\r\n\r\n reader.next();\r\n\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n\r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\", \"attributes\").equals(reader.getName())) {\r\n\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\", \"nil\");\r\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)) {\r\n object.setAttributes(null);\r\n reader.next();\r\n\r\n reader.next();\r\n\r\n } else {\r\n\r\n object.setAttributes(FactAttributes.Factory.parse(reader));\r\n\r\n reader.next();\r\n }\r\n } // End of if for expected property start element\r\n\r\n else {\r\n\r\n }\r\n\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n\r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\", \"identifier\").equals(reader.getName())) {\r\n\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\", \"nil\");\r\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)) {\r\n object.setIdentifier(null);\r\n reader.next();\r\n\r\n reader.next();\r\n\r\n } else {\r\n\r\n object.setIdentifier(FactIdentifier.Factory.parse(reader));\r\n\r\n reader.next();\r\n }\r\n } // End of if for expected property start element\r\n\r\n else {\r\n\r\n }\r\n\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n\r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\", \"name\").equals(reader.getName())) {\r\n\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\", \"nil\");\r\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)) {\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setName(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\r\n\r\n } else {\r\n\r\n\r\n reader.getElementText(); // throw away text nodes if any.\r\n }\r\n\r\n reader.next();\r\n\r\n } // End of if for expected property start element\r\n\r\n else {\r\n\r\n }\r\n\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n\r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\", \"source\").equals(reader.getName())) {\r\n\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\", \"nil\");\r\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)) {\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setSource(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\r\n\r\n } else {\r\n\r\n\r\n reader.getElementText(); // throw away text nodes if any.\r\n }\r\n\r\n reader.next();\r\n\r\n } // End of if for expected property start element\r\n\r\n else {\r\n\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement())\r\n // A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\r\n\r\n\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "public CleanUpActivityFeedResponse cleanActivityFeed(String client, String cisId);", "@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tURL url = new URL(\"https://mail.google.com/mail/feed/atom\");\n\t\t\t\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\t\t\t\tconn.addRequestProperty(\"Authorization\", token_type + \" \"+access_token);\n\t\t\t\t\tint respCode = conn.getResponseCode();\n\t\t\t\t\tif (respCode == HttpURLConnection.HTTP_OK) {\n\t\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\t\tInputStream is = conn.getInputStream();\n\t\t\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\n\t\t\t\t\t\tString str;\n\t\t\t\t\t\twhile((str = br.readLine()) != null) {\n\t\t\t\t\t\t\tsb.append(str).append(\"\\n\\r\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal String text = sb.toString();\n\t\t\t\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\ttextView.setText(text);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\tToast.makeText(SampleGoogleOAuthActivity.this, \"������ ���� ����\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "public void populate(HttpServletRequest request, Context context, IndexableObject dso,\n List<IndexableObject> items, Map<String, String> labels) {\n String logoURL = null;\n String objectURL = null;\n String defaultTitle = null;\n boolean podcastFeed = false;\n this.request = request;\n // dso is null for the whole site, or a search without scope\n if (dso == null) {\n defaultTitle = configurationService.getProperty(\"dspace.name\");\n feed.setDescription(localize(labels, MSG_FEED_DESCRIPTION));\n objectURL = resolveURL(request, null);\n } else {\n Bitstream logo = null;\n if (dso instanceof IndexableCollection) {\n Collection col = ((IndexableCollection) dso).getIndexedObject();\n defaultTitle = col.getName();\n feed.setDescription(collectionService.getMetadataFirstValue(col,\n CollectionService.MD_SHORT_DESCRIPTION, Item.ANY));\n logo = col.getLogo();\n String cols = configurationService.getProperty(\"webui.feed.podcast.collections\");\n if (cols != null && cols.length() > 1 && cols.contains(col.getHandle())) {\n podcastFeed = true;\n }\n objectURL = resolveURL(request, col);\n } else if (dso instanceof IndexableCommunity) {\n Community comm = ((IndexableCommunity) dso).getIndexedObject();\n defaultTitle = comm.getName();\n feed.setDescription(communityService.getMetadataFirstValue(comm,\n CommunityService.MD_SHORT_DESCRIPTION, Item.ANY));\n logo = comm.getLogo();\n String comms = configurationService.getProperty(\"webui.feed.podcast.communities\");\n if (comms != null && comms.length() > 1 && comms.contains(comm.getHandle())) {\n podcastFeed = true;\n }\n objectURL = resolveURL(request, comm);\n }\n\n if (logo != null) {\n logoURL = urlOfBitstream(request, logo);\n }\n }\n feed.setTitle(labels.containsKey(MSG_FEED_TITLE) ?\n localize(labels, MSG_FEED_TITLE) : defaultTitle);\n feed.setLink(objectURL);\n feed.setPublishedDate(new Date());\n feed.setUri(objectURL);\n\n // add logo if we found one:\n if (logoURL != null) {\n // we use the path to the logo for this, the logo itself cannot\n // be contained in the rdf. Not all RSS-viewers show this logo.\n SyndImage image = new SyndImageImpl();\n image.setLink(objectURL);\n if (StringUtils.isNotBlank(feed.getTitle())) {\n image.setTitle(feed.getTitle());\n } else {\n image.setTitle(localize(labels, MSG_LOGO_TITLE));\n }\n image.setUrl(logoURL);\n feed.setImage(image);\n }\n\n // add entries for items\n if (items != null) {\n List<SyndEntry> entries = new ArrayList<>();\n for (IndexableObject idxObj : items) {\n if (!(idxObj instanceof IndexableItem)) {\n continue;\n }\n Item item = ((IndexableItem) idxObj).getIndexedObject();\n boolean hasDate = false;\n SyndEntry entry = new SyndEntryImpl();\n entries.add(entry);\n\n String entryURL = resolveURL(request, item);\n entry.setLink(entryURL);\n entry.setUri(entryURL);\n\n String title = getOneDC(item, titleField);\n entry.setTitle(title == null ? localize(labels, MSG_UNTITLED) : title);\n\n // \"published\" date -- should be dc.date.issued\n String pubDate = getOneDC(item, dateField);\n if (pubDate != null) {\n entry.setPublishedDate((new DCDate(pubDate)).toDate());\n hasDate = true;\n }\n // date of last change to Item\n entry.setUpdatedDate(item.getLastModified());\n\n StringBuilder db = new StringBuilder();\n for (String df : descriptionFields) {\n // Special Case: \"(date)\" in field name means render as date\n boolean isDate = df.indexOf(\"(date)\") > 0;\n if (isDate) {\n df = df.replaceAll(\"\\\\(date\\\\)\", \"\");\n }\n\n List<MetadataValue> dcv = itemService.getMetadataByMetadataString(item, df);\n if (dcv.size() > 0) {\n String fieldLabel = labels.get(MSG_METADATA + df);\n if (fieldLabel != null && fieldLabel.length() > 0) {\n db.append(fieldLabel).append(\": \");\n }\n boolean first = true;\n for (MetadataValue v : dcv) {\n if (first) {\n first = false;\n } else {\n db.append(\"; \");\n }\n db.append(isDate ? new DCDate(v.getValue()).toString() : v.getValue());\n }\n db.append(\"\\n\");\n }\n }\n if (db.length() > 0) {\n SyndContent desc = new SyndContentImpl();\n desc.setType(\"text/plain\");\n desc.setValue(db.toString());\n entry.setDescription(desc);\n }\n\n // This gets the authors into an ATOM feed\n List<MetadataValue> authors = itemService.getMetadataByMetadataString(item, authorField);\n if (authors.size() > 0) {\n List<SyndPerson> creators = new ArrayList<>();\n for (MetadataValue author : authors) {\n SyndPerson sp = new SyndPersonImpl();\n sp.setName(author.getValue());\n creators.add(sp);\n }\n entry.setAuthors(creators);\n }\n\n // only add DC module if any DC fields are configured\n if (dcCreatorField != null || dcDateField != null ||\n dcDescriptionField != null) {\n DCModule dc = new DCModuleImpl();\n if (dcCreatorField != null) {\n List<MetadataValue> dcAuthors = itemService\n .getMetadataByMetadataString(item, dcCreatorField);\n if (dcAuthors.size() > 0) {\n List<String> creators = new ArrayList<>();\n for (MetadataValue author : dcAuthors) {\n creators.add(author.getValue());\n }\n dc.setCreators(creators);\n }\n }\n if (dcDateField != null && !hasDate) {\n List<MetadataValue> v = itemService.getMetadataByMetadataString(item, dcDateField);\n if (v.size() > 0) {\n dc.setDate((new DCDate(v.get(0).getValue())).toDate());\n }\n }\n if (dcDescriptionField != null) {\n List<MetadataValue> v = itemService\n .getMetadataByMetadataString(item, dcDescriptionField);\n if (v.size() > 0) {\n StringBuilder descs = new StringBuilder();\n for (MetadataValue d : v) {\n if (descs.length() > 0) {\n descs.append(\"\\n\\n\");\n }\n descs.append(d.getValue());\n }\n dc.setDescription(descs.toString());\n }\n }\n entry.getModules().add(dc);\n }\n\n //iTunes Podcast Support - START\n if (podcastFeed) {\n // Add enclosure(s)\n List<SyndEnclosure> enclosures = new ArrayList();\n try {\n List<Bundle> bunds = itemService.getBundles(item, \"ORIGINAL\");\n if (bunds.get(0) != null) {\n List<Bitstream> bits = bunds.get(0).getBitstreams();\n for (Bitstream bit : bits) {\n String mime = bit.getFormat(context).getMIMEType();\n if (ArrayUtils.contains(podcastableMIMETypes, mime)) {\n SyndEnclosure enc = new SyndEnclosureImpl();\n enc.setType(bit.getFormat(context).getMIMEType());\n enc.setLength(bit.getSizeBytes());\n enc.setUrl(urlOfBitstream(request, bit));\n enclosures.add(enc);\n\n }\n }\n }\n //Also try to add an external value from dc.identifier.other\n // We are assuming that if this is set, then it is a media file\n List<MetadataValue> externalMedia = itemService\n .getMetadataByMetadataString(item, externalSourceField);\n if (externalMedia.size() > 0) {\n for (MetadataValue anExternalMedia : externalMedia) {\n SyndEnclosure enc = new SyndEnclosureImpl();\n enc.setType(\n \"audio/x-mpeg\"); //We can't determine MIME of external file, so just\n // picking one.\n enc.setLength(1);\n enc.setUrl(anExternalMedia.getValue());\n enclosures.add(enc);\n }\n }\n\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n entry.setEnclosures(enclosures);\n\n // Get iTunes specific fields: author, subtitle, summary, duration, keywords\n EntryInformation itunes = new EntryInformationImpl();\n\n String author = getOneDC(item, authorField);\n if (author != null && author.length() > 0) {\n itunes.setAuthor(author); // <itunes:author>\n }\n\n itunes.setSubtitle(title == null ? localize(labels, MSG_UNTITLED) : title); // <itunes:subtitle>\n\n if (db.length() > 0) {\n itunes.setSummary(db.toString()); // <itunes:summary>\n }\n\n String extent = getOneDC(item,\n \"dc.format.extent\"); // assumed that user will enter this field\n // with length of song in seconds\n if (extent != null && extent.length() > 0) {\n extent = extent.split(\" \")[0];\n long duration = Long.parseLong(extent);\n itunes.setDuration(new Duration(duration)); // <itunes:duration>\n }\n\n String subject = getOneDC(item, \"dc.subject\");\n if (subject != null && subject.length() > 0) {\n String[] subjects = new String[1];\n subjects[0] = subject;\n itunes.setKeywords(subjects); // <itunes:keywords>\n }\n\n entry.getModules().add(itunes);\n }\n }\n feed.setEntries(entries);\n }\n }", "public FeedEvent processMessage(DdfMarketBase msg) {\n\t\tif (msg == null) {\n\t\t\t// sanity check\n\t\t\treturn null;\n\t\t}\n\n\t\tif (log.isDebugEnabled()) {\n\t\t\tlog.debug(\"processMessage: \" + msg);\n\t\t}\n\n\t\t/*\n\t\t * Can contain Quotes, Book, and a series of Market Events. Always\n\t\t * return the DDF message even if we can't process it by this class. The\n\t\t * TCP and UDP Listen modes (which pushes data from the replay server)\n\t\t * just use the raw DDF Message.\n\t\t */\n\t\tFeedEvent fe = new FeedEvent();\n\t\t// Save RAW DDF Message\n\t\tfe.setDdfMessage(msg);\n\n\t\tif (_type == MasterType.EndOfDay) {\n\t\t\t// Do not process live messages if EOD cache.\n\t\t\treturn fe;\n\t\t}\n\n\t\t/*\n\t\t * Mark as an unknown symbol until we receive the refresh quote.\n\t\t */\n\t\tif (msg.getSymbol() != null && msg.getSymbol().length() > 0) {\n\t\t\tString s = msg.getSymbol();\n\t\t\tQuote quote = getQuote(s);\n\t\t\tif (quote == null) {\n\t\t\t\tunrecoginzedSymbols.put(s, System.currentTimeMillis());\n\t\t\t} else if (unrecoginzedSymbols.containsKey(s)) {\n\t\t\t\t// We have the quote, pull from the unrecognized list\n\t\t\t\tunrecoginzedSymbols.remove(s);\n\t\t\t}\n\t\t}\n\n\t\t// //////////////////////////////////////////////////////////\n\t\t// //////////////////////////////////////////////////////////\n\t\t// Process based on Record Type (Message Type)\n\t\t// ///////////////////////////////////////////////////////////\n\t\t// ///////////////////////////////////////////////////////////\n\t\tif (msg.getRecord() == DdfRecord.Timestamp.value()) {\n\t\t\t// /////////////////////////////\n\t\t\t// TimeStamp Beacon\n\t\t\t// TIME!ZONE\n\t\t\t// ///////////////////////////\n\t\t\tmillisCST = ((DdfTimestamp) msg).getMillisCST();\n\t\t\tDate d = new Date(millisCST);\n\t\t\tfe.setDate(d);\n\n\t\t} else if (msg.getRecord() == DdfRecord.RefreshOld.value()) {\n\t\t\t// /////////////////////////////////////////////////////////\n\t\t\t// record = % - Older Refresh Message, not Used\n\t\t\t// /////////////////////////////////////////////////////////\n\t\t} else if (msg.getRecord() == DdfRecord.RefreshXml.value()) {\n\t\t\t// /////////////////////////////////////////////////////////\n\t\t\t// record = X - Market Data Refresh Messages from Jerq, in XML\n\t\t\t// format\n\t\t\t// ///////////////////////////////////////////////////////////\n\t\t\trecordX_marketRefresh(msg, fe);\n\n\t\t} else if ((msg.getRecord() == '2') || (msg.getRecord() == 'C')) {\n\t\t\t// /////////////////////////////////////////////////////////\n\t\t\t// record = 2 live prices\n\t\t\t// ///////////////////////////////////////////////////////////\n\t\t\t/*\n\t\t\t * If the message is a Trade, set here in order for the\n\t\t\t * ExchangeTradeHandler to be called, regardless if there is a quote\n\t\t\t * available or not.\n\t\t\t */\n\n\t\t\tif (msg instanceof DdfMarketTrade) {\n\t\t\t\tfe.setTrade((DdfMarketTrade) msg);\n\t\t\t}\n\n\t\t\tfinal Quote quote = getQuote(msg.getSymbol());\n\t\t\tif (quote == null) {\n\t\t\t\t/*\n\t\t\t\t * Initial Quote refresh not received yet, get snapshot refresh\n\t\t\t\t * from the web service. Until we receive the snapshot we will\n\t\t\t\t * not call the QuoteHandler.\n\t\t\t\t */\n\t\t\t\tif (feedService != null) {\n\t\t\t\t\t// Schedule the refresh\n\t\t\t\t\tfeedService.scheduleQuoteRefresh(msg.getSymbol());\n\t\t\t\t}\n\t\t\t\treturn fe;\n\t\t\t}\n\t\t\t/*\n\t\t\t * Process record 2, since the symbol is in the system and we have\n\t\t\t * the refresh quote. The Quote object will be updated.\n\t\t\t */\n\t\t\trecord2_liveprices(msg, quote, fe);\n\t\t\tfe.setQuote(quote);\n\t\t\treturn fe;\n\n\t\t} else if (msg.getRecord() == DdfRecord.DepthEndOfDay.value()) {\n\t\t\t// ////////////////////////////////////////////\n\t\t\t// record 3 Market Depth, End of Day\n\t\t\t// ///////////////////////////////////////////\n\t\t\tBookQuote b = record3_book_eod(msg);\n\t\t\tfe.setBook(b);\n\t\t} else {\n\t\t\tlog.warn(\"Unrecognized DDF Message: \" + msg);\n\t\t}\n\n\t\treturn fe;\n\t}", "protected abstract List<Entry> buildFeedEntries(\n\t\t\tMap<String, Object> model, HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows Exception;", "public void parse(InputStream in) throws XmlPullParserException, IOException {\n try {\n XmlPullParser parser = Xml.newPullParser();\n\n parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false);\n parser.setInput(in, null);\n readFeed(parser);\n\n } finally {\n in.close();\n }\n }", "public interface RSSService {\n\n //if only RSS feeds used the last-modified tag..\n @HEAD\n Call<Void> headFeed(@Url String url);\n\n @GET\n Call<RSSFeed> getFeed(@Url String url);\n}", "public FeedManager loadFeed() throws IOException, XmlPullParserException {\n\t\tInputStream stream = null;\n\t\tSolsticeXmlParser solsticeXmlParser = new SolsticeXmlParser();\n\n\t\ttry {\n\t\t\tstream = downloadUrl(URL);\n\t\t\treturn solsticeXmlParser.parse(stream);\n\t\t} finally {\n\t\t\tif (stream != null) {\n\t\t\t\tstream.close();\n\t\t\t}\n\t\t}\n\t}", "@Scheduled(fixedRate = 120000)\n public void readRss() {\n\n List<ItemNews> itemList = new ArrayList<>();\n\n try {\n String url = \"https://www.nytimes.com/svc/collections/v1/publish/https://www.nytimes.com/section/world/rss.xml\";\n\n try (XmlReader reader = new XmlReader(new URL(url))) {\n SyndFeed feed = new SyndFeedInput().build(reader);\n for (SyndEntry entry : feed.getEntries()) {\n LocalDateTime localDateTime = entry.getPublishedDate().toInstant()\n .atZone(ZoneId.systemDefault())\n .toLocalDateTime();\n ItemNews item = new ItemNews();\n item.setTitle(entry.getTitle());\n item.setAuthor(entry.getAuthor());\n item.setLink(entry.getLink());\n item.setDescription(entry.getDescription().getValue());\n item.setDateTime(localDateTime);\n modifyItem(item);\n itemList.add(item);\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n if (!itemList.isEmpty()) {\n Collections.sort(itemList , Comparator.comparing(ItemNews::getDateTime));\n saveItems(itemList);\n }\n }", "public Feed getFeed(URL feedURLObject, boolean summary) {\n return getFeed(feedURLObject, null, summary);\n }", "com.google.protobuf.ByteString\n getFeedBytes();", "public Feed getFeed(String feedURL, Date lastUpdatedDate) throws MalformedURLException {\n return getFeed(feedURL, lastUpdatedDate, false);\n }", "private void refreshFeed() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.addDescendingOrder(\"createdAt\");\n query.setLimit(20);\n query.findInBackground(new FindCallback<Post>() {\n // Result of the call to Parse\n @Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n\n adapter.clear();\n adapter.addAll(queryPosts);\n }\n });\n }", "void processIntent(Intent intent) {\n Parcelable[] rawMsgs = intent.getParcelableArrayExtra(\n NfcAdapter.EXTRA_NDEF_MESSAGES);\n // only one message sent during the beam\n NdefMessage msg = (NdefMessage) rawMsgs[0];\n // record 0 contains the MIME type, record 1 is the AAR, if present\n String payload = new String(msg.getRecords()[0].getPayload());\n Toast.makeText(this, payload, Toast.LENGTH_LONG).show();\n Log.i(TAG, payload);\n }", "public ArrayList<Feed> findFeedFromUidFolderID (Integer uid, Integer feed_folder_id);", "protected void update(FeedItemHandler handler, Date cacheExpiryDate, ExecutorService executor) {\n\t\ttry {\n\t\t\tURLConnection connection = new URL(url).openConnection();\n\t\t\tconnection.setConnectTimeout(settings.getFeedConnectTimeout());\n\t\t\tconnection.setReadTimeout(settings.getFeedReadTimeout());\n\t\t\tconnection.connect();\n\t\t\tSyndFeedInput feedInput = new SyndFeedInput();\n\t\t\tCharset charset = Charset.forName(\"utf-8\"); //NOI18N\n\t\t\tif (connection.getContentEncoding() != null) {\n\t\t\t\tcharset = Charset.forName(connection.getContentEncoding());\n\t\t\t} else if (connection.getContentType() != null) {\n\t\t\t\tString[] contentTypeParts = connection.getContentType().split(\";\"); //NOI18N\n\t\t\t\tfor (String contentTypePart : contentTypeParts) {\n\t\t\t\t\tString[] contentTypePartComponents = contentTypePart.trim().split(\"=\", 2); //NOI18N\n\t\t\t\t\tif (contentTypePartComponents.length == 2 && contentTypePartComponents[0].matches(\"charset\")) //NOI18N\n\t\t\t\t\t\tcharset = Charset.forName(contentTypePartComponents[1].trim());\n\t\t\t\t}\n\t\t\t}\n\t\t\tSyndFeed feed = feedInput.build(new InputStreamReader(connection.getInputStream(), charset));\n\t\t\ttitle = feed.getTitle();\n\t\t\tencoding = feed.getEncoding();\n\t\t\thandleEntries(feed.getEntries(), handler, cacheExpiryDate, executor);\n\t\t} catch (IOException | IllegalArgumentException ex) {\n\t\t\tthrow new RuntimeException(MessageFormat.format(messages.getString(\"CANNOT_UPDATE_FEED\"), new Object[]{url}), ex);\n\t\t} catch (Exception ex) {\n\t\t\tthrow new RuntimeException(MessageFormat.format(messages.getString(\"CANNOT_UPDATE_FEED\"), new Object[]{url}), ex);\n\t\t}\n\t}", "public interface JsonFeedReader {\n\n JsonFeed read(String string);\n JsonFeed read(Reader reader);\n}", "public void testBlogEntryHasTagsAndMediaIsNewsfeed() throws Exception {\n Category category = new Category(\"/java\", \"Java\");\n category.setBlog(blog);\n category.setTags(\"java\");\n blogEntry.addCategory(category);\n blogEntry.setExcerpt(\"Excerpt - here is some text\");\n blogEntry.setBody(\"Body - here is some text\");\n blogEntry.setTags(\"junit, automated unit testing\");\n context.setMedia(ContentDecoratorContext.NEWS_FEED);\n decorator.decorate(context, blogEntry);\n\n StringBuffer tags = new StringBuffer();\n// tags.append(\"<!--<div class=\\\"tags\\\">Tags : \");\n// tags.append(\"<a href=\\\"http://technorati.com/tag/automated+unit+testing\\\" rel=\\\"tag\\\">automated unit testing</a>, \");\n// tags.append(\"<a href=\\\"http://technorati.com/tag/junit\\\" rel=\\\"tag\\\">junit</a>, \");\n// tags.append(\"<a href=\\\"http://technorati.com/tag/java\\\" rel=\\\"tag\\\">java</a>\");\n// tags.append(\"</div>-->\");\n\n assertEquals(\"Excerpt - here is some text\" + tags, blogEntry.getExcerpt());\n assertEquals(\"Body - here is some text\" + tags, blogEntry.getBody());\n }", "public void threadedContactFeedUpdate(ContactRssImpl contact)\n {\n RssThread rssThr = new RssThread(this, contact);\n rssThr.start();\n }", "public ICalendarEntryPayload parsePayload( Element element ) throws ParseException ;", "public static ArrayList<Map<String,String>> getContFromRssNoHtml(String urlAdress) {\n\n URL url = null;\n Iterator itEntries = null;\n try {\n //thetume ton browser Agent se browser-like gia na apofigume 403 errors\n System.setProperty(\"http.agent\", \"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0\");\n url = new URL(urlAdress);\n HttpURLConnection httpcon = (HttpURLConnection) url.openConnection();\n httpcon.setRequestProperty(\"User-Agent\",\n \"Mozilla/5.0 (Windows NT 5.1; rv:19.0) Gecko/20100101 Firefox/19.0\");\n // Reading the feed\n SyndFeedInput input = new SyndFeedInput();\n SyndFeed feed = input.build(new XmlReader(httpcon));\n List entries = feed.getEntries();\n itEntries = entries.iterator();\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (FeedException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n //contAr has all the entries\n ArrayList<Map<String,String>> contAr = new ArrayList<Map<String, String>>();\n\n //contMap has all the entries contents\n Map<String,String> contMap = new HashMap<String, String>();\n contMap.put(\"URI\",urlAdress);\n\n\n while (itEntries.hasNext()) {\n contMap = new HashMap<String, String>();\n SyndEntry entry = (SyndEntry) itEntries.next();\n System.out.println(entry.getUri());\n contMap.put(\"Title\",entry.getTitle());\n contMap.put(\"Link\",entry.getLink());\n contMap.put(\"Description\",entry.getDescription().getValue());\n\n contAr.add(contMap);\n System.out.println();\n }\n return contAr;\n }", "@NonNull\n default T feed(@NonNull Iterator<Map<String, Object>> feeder, int numberOfRecords) {\n return ScalaFeeds.apply(this, feeder, numberOfRecords);\n }", "private URL getFeedUrl() throws MalformedURLException{\n String feedUrl = \"http://\" + host + \":\" + port + \"/xmlfeed\";\n URL url = new URL(feedUrl);\n return url;\n }", "boolean hasFeedItem();", "private void parseEntities() {\n // See: https://github.com/twitter/twitter-text/tree/master/java\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractCashtagsWithIndices(getText()));\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractHashtagsWithIndices(getText()));\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractMentionedScreennamesWithIndices(getText()));\n }", "private final void updateEvent(Feed feed) {\n\t ContentValues values = new ContentValues();\n\t // values.put(NotePad.Notes.COLUMN_NAME_MODIFICATION_DATE, System.currentTimeMillis());\n\n\t // This puts the desired notes text into the map.\n\t values.put(FeedingEventsContract.Feeds.column_timeStamp, feed.ts.toString());\n\t values.put(FeedingEventsContract.Feeds.column_leftDuration, Integer.toString(feed.lDuration) );\n\t values.put(FeedingEventsContract.Feeds.column_rightDuration, Integer.toString(feed.rDuration));\n\t values.put(FeedingEventsContract.Feeds.column_bottleFeed, Double.toString(feed.BFQuantity));\n\t values.put(FeedingEventsContract.Feeds.column_expressFeed, Double.toString(feed.EFQuantity));\n\t values.put(FeedingEventsContract.Feeds.column_note, feed.note);\n\t \n\t /*\n\t * Updates the provider with the new values in the map. The ListView is updated\n\t * automatically. The provider sets this up by setting the notification URI for\n\t * query Cursor objects to the incoming URI. The content resolver is thus\n\t * automatically notified when the Cursor for the URI changes, and the UI is\n\t * updated.\n\t * Note: This is being done on the UI thread. It will block the thread until the\n\t * update completes. In a sample app, going against a simple provider based on a\n\t * local database, the block will be momentary, but in a real app you should use\n\t * android.content.AsyncQueryHandler or android.os.AsyncTask.\n\t */\n\t getContentResolver().update(\n\t mUri, // The URI for the record to update.\n\t values, // The map of column names and new values to apply to them.\n\t null, // No selection criteria are used, so no where columns are necessary.\n\t null // No where columns are used, so no where arguments are necessary.\n\t );\n\n\n\t }" ]
[ "0.7569617", "0.6209569", "0.6129439", "0.6082496", "0.6042771", "0.5852074", "0.57961786", "0.5709694", "0.5700137", "0.5689007", "0.56877995", "0.56777954", "0.56625575", "0.5645533", "0.5562414", "0.55548835", "0.5548543", "0.55390644", "0.54804176", "0.54800504", "0.54797864", "0.54681826", "0.5459598", "0.5459598", "0.54548967", "0.5439884", "0.5421021", "0.5410176", "0.53781503", "0.5333827", "0.5316605", "0.52617645", "0.52439904", "0.5242776", "0.5219024", "0.51959", "0.51959", "0.5162925", "0.51011515", "0.508801", "0.5082616", "0.5081535", "0.50786865", "0.5067654", "0.50652426", "0.50561124", "0.5049646", "0.5046584", "0.5039564", "0.50310916", "0.50080633", "0.5002812", "0.49972427", "0.4995904", "0.49813375", "0.49769953", "0.4976588", "0.49667263", "0.49607408", "0.49598837", "0.49581262", "0.49422377", "0.49355346", "0.49280486", "0.49203697", "0.49171168", "0.4916836", "0.49159676", "0.48963773", "0.48876545", "0.48863608", "0.48651335", "0.48616704", "0.4860915", "0.48594883", "0.4838423", "0.48330957", "0.4832702", "0.48300642", "0.48294005", "0.48255783", "0.48225796", "0.4821817", "0.4805904", "0.48021737", "0.47898442", "0.47715598", "0.47623718", "0.47619018", "0.47607952", "0.47561008", "0.47506258", "0.47502607", "0.47418702", "0.47377086", "0.47372052", "0.4736433", "0.47349223", "0.473404", "0.47259244" ]
0.7368108
1
Processes an Atom feed at the given URL
public static void processFeed(String feedUrl) throws Exception { processFeed(new FeedContext(feedUrl)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void processFeed(FeedContext fc) {\n\n String feedUrl = fc.getFeedUrl();\n mLog.info(\"Processing Atom feed at URL: \" + feedUrl);\n\n try {\n AbderaAtomParser atomParser = new AbderaAtomParser(new URL(feedUrl));\n atomParser.persistFeed(fc);\n\n mLog.info(\"Finished processing Atom feed at URL \" + feedUrl);\n }\n catch (MalformedURLException url_e) {\n mLog.error(\"MalformedURL found for \" + fc.getFeedUrl());\n }\n catch (ArrayIndexOutOfBoundsException a) {\n // this happens if the feed is empty (typically an activity stream),\n // need a better way to track this though\n \tmLog.warn(\"Feed at URL [\" + feedUrl + \"] is probably empty, but this \" +\n \t\t\t\"exception should have been prevented.\");\n }\n catch (Exception e) {\n mLog.error(\"Error processing feed at [\" + fc.getFeedUrl() + \"]: \" + e.getMessage());\n }\n catch (Throwable t) {\n mLog.error(\"Error processing feed at [\" + fc.getFeedUrl() + \"]: \" + t.getMessage());\n }\n }", "public URL ParseRSSFromFeed() throws java.net.MalformedURLException\n {\n URL feedUrl = new URL(Src_URL);\n return feedUrl;\n }", "public AtomFeed(String feedURL) throws ParserConfigurationException, IOException\r\n\t{\r\n\t\tthis.feedURL = feedURL;\r\n\t\txml = null;\r\n\t\tdocumentbuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\r\n\t\tif (!refresh()) throw new IOException();\r\n\t}", "private static void processFeed(String url, String file, SimpleWriter out) \n {\n \tXMLTree rss = new XMLTree1(url);\n \t\n \t// make sure the rss tree is a valid rss tree\n if(!ensureValidRSSTree(rss, out))\n {\n \tout.println(\"This is not a valid RSS Tree.\");\n \treturn;\n }\n \n // print entire document to file\n outputHeader(rss.child(0), out);\n outputFooter(out);\n \n }", "public static void getFeed(String url) {\n if (rssReader != null) {\n rssReader.loadFeeds(url);\n }\n }", "public List<LinkDetails> scrapeRSSPageForLinks(String rssUrl) {\n\t\tString description = \"\";\n\t\tString title = \"\";\n\t\tString link = \"\";\n\t\tString pubdate = \"\";\n\t\tURL url;\n\t\tInputStream in;\n\n\t\tList<LinkDetails> rssProcessedData = new ArrayList<LinkDetails>();\n\n\t\ttry {\n\t\t\turl = new URL(rssUrl);\n\t\t} catch (MalformedURLException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t\ttry {\n\t\t\tin = url.openStream();\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t\t// create XML input factory\n\t\tXMLInputFactory inputFactory = XMLInputFactory.newInstance();\n\n\t\t// read the XML document\n\t\ttry {\n\n\t\t\tXMLEventReader eventReader = inputFactory.createXMLEventReader(in);\n\n\t\t\tboolean isFeedHeader = true;\n\t\t\twhile (eventReader.hasNext()) {\n\t\t\t\tXMLEvent event = eventReader.nextEvent();\n\t\t\t\tif (event.isStartElement()) {\n\t\t\t\t\tString localPart = event.asStartElement().getName().getLocalPart();\n\n\t\t\t\t\t// System.out.println(localPart);\n\n\t\t\t\t\tswitch (localPart) {\n\n\t\t\t\t\tcase \"item\":\n\t\t\t\t\t\t// if (isFeedHeader) {\n\t\t\t\t\t\t// isFeedHeader = false;\n\t\t\t\t\t\t// System.out.println(\" title: \"+title+ \" description: \"+ description + \" link:\n\t\t\t\t\t\t// \"+link+\" pubDate: \"+pubdate);\n\t\t\t\t\t\t// }\n\t\t\t\t\t\tevent = eventReader.nextEvent();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"title\":\n\t\t\t\t\t\ttitle = getCharacterData(event, eventReader);\n\t\t\t\t\t\t// System.out.println(\"title: \"+title);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"description\":\n\t\t\t\t\t\tdescription = getCharacterData(event, eventReader);\n\t\t\t\t\t\t// System.out.println(\"description: \"+description);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"link\":\n\t\t\t\t\t\tlink = getCharacterData(event, eventReader);\n\t\t\t\t\t\tSystem.out.println(\"link: \" + link);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"pubDate\":\n\t\t\t\t\t\tpubdate = getCharacterData(event, eventReader);\n\t\t\t\t\t\t// System.out.println(\"pubDate: \"+pubdate);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\t\t\t\t} else if (event.isEndElement()) {\n\t\t\t\t\tif (event.asEndElement().getName().getLocalPart() == (\"item\")) {\n\n\t\t\t\t\t\tLinkDetails linkDetails = new LinkDetails(link, title, description, pubdate);\n\t\t\t\t\t\trssProcessedData.add(linkDetails);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (XMLStreamException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t\treturn rssProcessedData;\n\t}", "@HEAD\n Call<Void> headFeed(@Url String url);", "public static void processFeed(FeedContext fc, Feed feed) {\n try {\n\t\t\tAbderaAtomParser parser = new AbderaAtomParser(feed);\n\t\t\tparser.persistFeed(fc);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tmLog.error(\"Error processing feed at [\" + fc.getFeedUrl() + \"]: \" + e.getMessage());\n\t\t}\n }", "private URL getFeedUrl() throws MalformedURLException{\n String feedUrl = \"http://\" + host + \":\" + port + \"/xmlfeed\";\n URL url = new URL(feedUrl);\n return url;\n }", "public void PopulateRSSData()\n {\n try\n {\n URL Feed = ParseRSSFromFeed();\n ParseRSS(Feed);\n }\n catch(java.net.MalformedURLException exp)\n {\n String message = exp.getMessage();\n System.out.println(message);\n }\n catch(com.rometools.rome.io.FeedException fexp)\n {\n String message = fexp.getMessage();\n System.out.println(message);\n }\n catch(java.io.IOException ioexp)\n {\n String message = ioexp.getMessage();\n System.out.println(message);\n }\n }", "public void addFeedIntoFolder(String feedURL, String name);", "private String getURL(String feedUrl) {\n\tStringBuilder sb = null;\n\ttry {\n for(int i = 3; i>0; i--) {\n\t sb = new StringBuilder();\n URL url = new URL(feedUrl);\n\tHttpURLConnection uc = (HttpURLConnection) url.openConnection();\n\tuc.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22 GTB7.1 ( .NET CLR 3.5.30729)\");\n\tuc.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\");\n\tuc.setRequestProperty(\"Accept-Language\", \"en-us,en;q=0.5\");\n\tuc.setRequestProperty(\"Accept-Encoding\", \"gzip,deflate\");\n\tuc.setRequestProperty(\"Accept-Charset\", \"ISO-8859-1,utf-8;q=0.7,*;q=0.7\");\n\tuc.setRequestProperty(\"Keep-Alive\", \"115\");\n\tuc.setRequestProperty(\"Connection\", \"keep-alive\");\n\tuc.setDoOutput(true);\n\tuc.setDoInput(true);\n\tuc.setUseCaches(false);\n\tuc.setRequestMethod(\"POST\");\n\tuc.setRequestProperty(\"Content-Type\", \"text/xml\");\n\t\n\tBufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));//uc.getInputStream()\n\tString inputLine;\n\tboolean refreshAgain = false;\n\twhile ((inputLine = in.readLine()) != null) {\n\t\tsb.append(inputLine);\n\t\tif( inputLine.contains(\"Refresh\") ) {\n\t\t\trefreshAgain = true;\n\t\t\tSystem.out.println(\"Refresh\");\n\t\t}\n\t}\n\tin.close();\n\tuc.disconnect();\t\t\n//\tRefresh\n\tif( refreshAgain ) {\n\t Thread.sleep(1000);\n\t}\n\telse break;\n }\n }catch(Exception ee){}\nreturn sb.toString();\n}", "public void refreshRssFeed( ContactRssImpl rssURL)\n {\n submitRssQuery(rssURL, true);\n }", "private String loadXmlFromNetwork(String urlString) throws XmlPullParserException, IOException {\n InputStream stream = null;\n StackOverflowXmlParser stackOverflowXmlParser = new StackOverflowXmlParser();\n List<Entry> entries = null;\n String title = null;\n String url = null;\n String summary = null;\n Calendar rightNow = Calendar.getInstance();\n DateFormat formatter = new SimpleDateFormat(\"MMM dd h:mmaa\");\n int count = 1;\n\n // Checks whether the user set the preference to include summary text\n SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);\n boolean pref = sharedPrefs.getBoolean(\"summaryPref\", false);\n\n StringBuilder htmlString = new StringBuilder();\n htmlString.append(\"<h3>\" + getResources().getString(R.string.page_title) + \"</h3>\");\n htmlString.append(\"<em>\" + getResources().getString(R.string.updated) + \" \" +\n formatter.format(rightNow.getTime()) + \"</em>\");\n\n try {\n stream = downloadUrl(urlString);\n entries = stackOverflowXmlParser.parse(stream);\n // Makes sure that the InputStream is closed after the app is\n // finished using it.\n } finally {\n if (stream != null) {\n stream.close();\n }\n }\n\n // StackOverflowXmlParser returns a List (called \"entries\") of Entry objects.\n // Each Entry object represents a single post in the XML feed.\n // This section processes the entries list to combine each entry with HTML markup.\n // Each entry is displayed in the UI as a link that optionally includes\n // a text summary.\n for (Entry entry : entries) {\n \t\n \tString photo = \"\";\n \tString video = \"video\";\n htmlString.append(\"<p><a href='\");\n photo = \"https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photoreference=\"+entry.link+\"&sensor=true&key=AIzaSyBeNRBzRlJQy0-L8OlYFTnMcJ9LRb6h_-s\";\n \n \n htmlString.append(photo);\n htmlString.append(\"'>\" + entry.title + \"</a></p>\");\n if(count == 1 ||count == 3 ||count == 6 ||count == 8 ||count == 9) {\n \tvideo =\"http://192.168.0.16:8010/cloud/my_videos/\"+Integer.toString(count);\n \thtmlString.append(\"<a href='\"+video+\"'> - Video</a>\");\n }\n count++;\n \n // If the user set the preference to include summary text,\n // adds it to the display.\n if (pref) {\n htmlString.append(entry.summary);\n }\n }\n// URL url2 = new URL(\"http://192.168.0.16:8000/cloud/images/\");\n// HttpURLConnection conn2 = (HttpURLConnection) url2.openConnection();\n//\t\t\n// //conn2.setDoOutput(true);\n// conn2.setConnectTimeout(10000 /* milliseconds */);\n// conn2.setRequestMethod(\"GET\");\n// conn2.setDoInput(true);\n// conn2.connect();\n// //OutputStream out1 = new BufferedOutputStream(conn2.getOutputStream());\n// \n// \n// InputStream in = new BufferedInputStream(conn2.getInputStream());\n// BufferedReader br = new BufferedReader(new InputStreamReader(in));\n// String test = br.readLine();\n// String output=\"\";\n// while(test != null) {\n// \toutput = output +test;\n// \ttest = br.readLine();\n// }\n// output=\"<html><body><video width=\\\"320\\\" height=\\\"240\\\" controls><source src=\\\"movie.mp4\\\" type=\\\"video/mp4\\\"><source src=\\\"movie.ogg\\\" type=\\\"video/ogg\\\">Your browser does not support the video tag.</video></body></html>\";\n \n return htmlString.toString();\n }", "@Override\n\t\tprotected Boolean doInBackground(Void... params) {\n\t\t\tlinklist = parseRSS();\n\t\t\treturn updateDatabase(linklist);\n\t\t}", "public Feed getFeed(String feedURL, Date lastUpdatedDate) throws MalformedURLException {\n return getFeed(feedURL, lastUpdatedDate, false);\n }", "private String loadXmlFromNetwork(String urlString) throws XmlPullParserException, IOException {\n\t InputStream stream = null;\n\t // Instantiate the parser\n\t StackOverflowXmlParser stackOverflowXmlParser = new StackOverflowXmlParser();\n\t List<Entry> entries = null;\n\t String title = null;\n\t String url = null;\n\t String summary = null;\n\t Calendar rightNow = Calendar.getInstance(); \n\t DateFormat formatter = new SimpleDateFormat(\"MMM dd h:mmaa\");\n\t \n\t // Checks whether the user set the preference to include summary text\n\t SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);\n\t boolean pref = sharedPrefs.getBoolean(\"summaryPref\", false);\n\t \n\t StringBuilder htmlString = new StringBuilder();\n\t htmlString.append(\"<h3>\" + \"title: \" + \"</h3>\");\n\t htmlString.append(\"<em>\" + \" \" + formatter.format(rightNow.getTime()) + \"</em>\");\n\t \n\t try {\n\t stream = downloadUrl(urlString); \n\t entries = stackOverflowXmlParser.parse(stream);\n\t // Makes sure that the InputStream is closed after the app is\n\t // finished using it.\n\t } finally {\n\t if (stream != null) {\n\t stream.close();\n\t } \n\t }\n\t \n\t // StackOverflowXmlParser returns a List (called \"entries\") of Entry objects.\n\t // Each Entry object represents a single post in the XML feed.\n\t // This section processes the entries list to combine each entry with HTML markup.\n\t // Each entry is displayed in the UI as a link that optionally includes\n\t // a text summary.\n\t for (Entry entry : entries) { \n\t htmlString.append(\"<p><a href='\");\n\t htmlString.append(entry.link);\n\t htmlString.append(\"'>\" + entry.title + \"</a></p>\");\n\t // If the user set the preference to include summary text,\n\t // adds it to the display.\n\t if (pref) {\n\t htmlString.append(entry.summary);\n\t }\n\t }\n\t return htmlString.toString();\n\t}", "public void ParseRSS(URL feedUrl) throws com.rometools.rome.io.FeedException, java.io.IOException {\n //TODO: EVERY THING HERE SHOULD BE IN A TRANSACTION\n List<String> HashFields = new ArrayList<>();\n SyndFeedInput input = new SyndFeedInput();\n SyndFeed feed = input.build(new XmlReader(feedUrl));\n RSSChannelElements ChannelElements = new RSSChannelElements();\n Date CurrentDate = new Date();\n SimpleDateFormat SDF = new java.text.SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n //GET ADDITIONAL PROPERTIES OF THE CHANNEL\n //GET CHANNEL AUTHOR\n String ch_author = feed.getAuthor();\n ChannelElements.Author = ch_author;\n //GET PUBLISHED DATE\n Date ch_PubDate = feed.getPublishedDate();\n ChannelElements.PublishedDate = ch_PubDate;\n //GET LANGUAGE\n String ch_Language = feed.getLanguage();\n ChannelElements.Language = ch_Language;\n //GET WEBMASTER\n String ch_WebMaster = feed.getWebMaster();\n ChannelElements.webMaster = ch_WebMaster;\n //GET MANAGING EDITOR\n String ch_ME = feed.getManagingEditor();\n ChannelElements.managingEditor = ch_ME;\n //GET GENERATOR\n String ch_generator = feed.getGenerator();\n ChannelElements.Generator = ch_generator;\n //GET DESCRIPTION\n String ch_description = feed.getDescription();\n ChannelElements.Description = ch_description;\n int CurrentChannelID = 0;\n //TODO: DO THIS IN A STORED PROCEDURE\n try\n {\n TimeValidations ValidateTime = new TimeValidations();\n if (ValidateTime.IsWithinValidWindow(CurrentDate, ch_PubDate, ReadInterval))\n {\n //INSERT TO DB THE CHANNEL DETAILS\n CurrentChannelID = InsertChannelDetails(ChannelElements);\n }\n }\n catch(java.sql.SQLException exp)\n {\n String message = exp.getMessage();\n System.out.println(message);\n }\n\n\n //GET ELEMENTS FROM THE \"ITEMS\"\n List entries = feed.getEntries();\n Iterator it = entries.iterator();\n while (it.hasNext()) {\n RSSFields RssFieldValues = new RSSFields();\n SyndEntry entry = (SyndEntry) it.next();\n //GET TITLE\n System.out.println(entry.getTitle());\n String Title = entry.getTitle();\n RssFieldValues.Title = Title;\n //HashFields.add(Title);\n //GET LINK\n System.out.println(entry.getLink());\n RssFieldValues.Link = entry.getLink();\n HashFields.add(RssFieldValues.Link);\n //GET DESCRIPTION\n SyndContent description = entry.getDescription();\n System.out.println(description.getValue());\n RssFieldValues.Description = description.getValue();\n //HashFields.add(description.getValue());\n //GET PUBLISHED DATE\n Date Pub_Date = entry.getPublishedDate();\n System.out.println(SDF.format(Pub_Date));\n RssFieldValues.PublishedDate = entry.getPublishedDate();\n //GET UPDATED DATE\n Date U_date = entry.getUpdatedDate();\n System.out.println(U_date);\n RssFieldValues.UpdatedDate = entry.getPublishedDate();\n //GET AUTHOR\n String Author = entry.getAuthor();\n RssFieldValues.Author = Author;\n System.out.println(Author);\n //GET COMMENTS;\n String Comments = entry.getComments();\n RssFieldValues.Comments = Comments;\n System.out.println();\n try {\n //org.joda.time.Period P = new org.joda.time.Period(Pub_Date, CurrentDate);\n //if(SDF.parse(Pub_Date.toString()) == SDF.parse(CurrentDate.toString()))\n //org.joda.time.Period p = new org.joda.time.Period(CurrentDate, Pub_Date);\n //ONLY INSERT IF THE FEED IS WITHIN THE SPECIFIED PERIOD\n TimeValidations ValidateTime = new TimeValidations();\n if (ValidateTime.IsWithinValidWindow(CurrentDate, U_date, ReadInterval))\n {\n //INSERT NEWS SPECIFIC VALUES TO DB\n HashGenerator Gen = new HashGenerator();\n RssFieldValues.ComputedHash = Gen.HashCalculator(HashFields);\n InsertToDB(RssFieldValues, CurrentChannelID);\n }\n } catch (java.sql.SQLException ex) {\n String message = ex.getMessage();\n System.out.println(message);\n }\n }\n // System.out.println(feed);\n }", "public abstract XMLDocument parse(URL url);", "@Override\n protected String doInBackground(String... args) {\n // rss link url\n String query_url = args[0];\n\n // weather object of rss.\n woeid = parser.getRSSFeedWeather2(query_url);\n\n // updating UI from Background Thread\n runOnUiThread(new Runnable() {\n public void run() {\n /**\n * Updating parsed data into text view.\n * */\n Intent intent = new Intent(MainActivity.this, Summit.class);\n String description = woeid.getWoeid();\n intent.putExtra(EXTRA_MESSAGE, description);\n // Log.d(\"Long\", description);\n startActivity(intent);\n }\n });\n return null;\n }", "public FeedManager loadFeed() throws IOException, XmlPullParserException {\n\t\tInputStream stream = null;\n\t\tSolsticeXmlParser solsticeXmlParser = new SolsticeXmlParser();\n\n\t\ttry {\n\t\t\tstream = downloadUrl(URL);\n\t\t\treturn solsticeXmlParser.parse(stream);\n\t\t} finally {\n\t\t\tif (stream != null) {\n\t\t\t\tstream.close();\n\t\t\t}\n\t\t}\n\t}", "public Feed getFeed(URL feedURLObject, Date lastUpdatedDate, boolean summary) {\n inputStream = null;\n FeedHandler feedHandler = new FeedHandler(lastUpdatedDate, summary);\n if (xmlReader != null && feedURLObject != null) {\n try {\n String encoding = detectEncoding(feedURLObject);\n if (inputStream == null) {\n if (\"file\".equals(feedURLObject.getProtocol())) {\n inputStream = feedURLObject.openStream();\n } else {\n inputStream = client.loadInputStream(feedURLObject);\n }\n }\n InputSource inputSource = new InputSource(inputStream);\n if (encoding != null) {\n inputSource.setEncoding(encoding);\n }\n\n xmlReader.setContentHandler(feedHandler);\n xmlReader.parse(inputSource);\n\n } catch (EndSAXException e) {\n // No problem\n } catch (IOException e) {\n System.err.println(e.getMessage());\n } catch (SAXException e) {\n System.err.println(e.getMessage());\n } finally {\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (IOException e) {\n System.err.println(e.getMessage());\n }\n }\n }\n }\n return feedHandler.getFeed();\n }", "public static ArrayList<Map<String,String>> getContFromRssNoHtml(String urlAdress) {\n\n URL url = null;\n Iterator itEntries = null;\n try {\n //thetume ton browser Agent se browser-like gia na apofigume 403 errors\n System.setProperty(\"http.agent\", \"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0\");\n url = new URL(urlAdress);\n HttpURLConnection httpcon = (HttpURLConnection) url.openConnection();\n httpcon.setRequestProperty(\"User-Agent\",\n \"Mozilla/5.0 (Windows NT 5.1; rv:19.0) Gecko/20100101 Firefox/19.0\");\n // Reading the feed\n SyndFeedInput input = new SyndFeedInput();\n SyndFeed feed = input.build(new XmlReader(httpcon));\n List entries = feed.getEntries();\n itEntries = entries.iterator();\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (FeedException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n //contAr has all the entries\n ArrayList<Map<String,String>> contAr = new ArrayList<Map<String, String>>();\n\n //contMap has all the entries contents\n Map<String,String> contMap = new HashMap<String, String>();\n contMap.put(\"URI\",urlAdress);\n\n\n while (itEntries.hasNext()) {\n contMap = new HashMap<String, String>();\n SyndEntry entry = (SyndEntry) itEntries.next();\n System.out.println(entry.getUri());\n contMap.put(\"Title\",entry.getTitle());\n contMap.put(\"Link\",entry.getLink());\n contMap.put(\"Description\",entry.getDescription().getValue());\n\n contAr.add(contMap);\n System.out.println();\n }\n return contAr;\n }", "public void addRss(final String url, final String outputFileName, final Long pollPeriod, final Long itemsAmount,\n final List<String> parameters) {\n try {\n if (isNotValidRss(url)) {\n System.out.println(\"Rss is not valid.\");\n return;\n }\n RssConfiguration configuration = PropertiesHandler.createNewRssConfiguration(url, outputFileName, pollPeriod, itemsAmount, parameters);\n ParseFeedTask task = new ParseFeedTask(configuration);\n ScheduledFuture future = scheduledExecutorService.scheduleWithFixedDelay(task, configuration.getPollPeriod(), configuration.getPollPeriod(), TimeUnit.SECONDS);\n futures.put(url, future);\n tasks.put(url, task);\n } catch (IOException e) {\n System.out.println(String.format(\"An error occurred during the adding feed %s\", url));\n } catch (FeedException e) {\n System.out.println(String.format(\"Sorry, but feed %s is not valid.\", url));\n }\n }", "public RSS getRSS(URL url) throws JAXBException {\n\t\tJAXBContext ctx = JAXBContext.newInstance(RSS.class);\n\t\tUnmarshaller um = ctx.createUnmarshaller();\n\t\tRSS rss = (RSS) um.unmarshal(url);\n\t\treturn rss;\n\t}", "protected void onPostExecute(String feed) {\n }", "protected void onPostExecute(String feed) {\n }", "public void turnOnRss(final String url) {\n ParseFeedTask task = tasks.get(url);\n if (task == null) {\n System.out.println(String.format(\"Rss with url %s is not found\", url));\n return;\n }\n RssConfiguration configuration = task.getConfiguration();\n if (configuration.getTurnOn()) {\n System.out.println(\"Rss is already running\");\n return;\n }\n configuration.setTurnOn(true);\n try {\n PropertiesHandler.writeProperties(configuration);\n ScheduledFuture future = scheduledExecutorService.scheduleWithFixedDelay(task, configuration.getPollPeriod(), configuration.getPollPeriod(), TimeUnit.SECONDS);\n futures.put(url, future);\n System.out.println(String.format(\"Rss %s is running\", url));\n } catch (IOException e) {\n System.out.println(String.format(\"An error occurred during the change poll period for feed %s\", url));\n }\n }", "public void getGmailAtomFeed(final String access_token,final String token_type) {\n\t\tThread th = new Thread(new Runnable(){\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\ttry {\n\t\t\t\t\tURL url = new URL(\"https://mail.google.com/mail/feed/atom\");\n\t\t\t\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\t\t\t\tconn.addRequestProperty(\"Authorization\", token_type + \" \"+access_token);\n\t\t\t\t\tint respCode = conn.getResponseCode();\n\t\t\t\t\tif (respCode == HttpURLConnection.HTTP_OK) {\n\t\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\t\tInputStream is = conn.getInputStream();\n\t\t\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\n\t\t\t\t\t\tString str;\n\t\t\t\t\t\twhile((str = br.readLine()) != null) {\n\t\t\t\t\t\t\tsb.append(str).append(\"\\n\\r\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal String text = sb.toString();\n\t\t\t\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\ttextView.setText(text);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\tToast.makeText(SampleGoogleOAuthActivity.this, \"������ ���� ����\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tth.start();\n\t}", "public SnapshotFeedReader(String feedurl) {\n super(feedurl);\n this.feed = new SnapshotFeed();\n this.links = new HashSet<AtomLink>();\n }", "protected void onPostExecute(String feed) {\n\t\t}", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tgetGmailAtomFeed(access_token,token_type);\t\t\t\t\t\n\t\t\t\t}", "public void openNewFeed(final String datfeed) {\n\n //close the navigation drawer\n closeDrawer();\n\n //show swipe refresh\n swiperefresh.setRefreshing(true);\n\n //detect if there's a connection issue or not: if there's a connection problem stop refreshing and show message\n if (cM.getActiveNetworkInfo() == null) {\n Toast toast = Toast.makeText(getBaseContext(), R.string.no_internet, Toast.LENGTH_SHORT);\n toast.show();\n swiperefresh.setRefreshing(false);\n\n } else {\n\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n DOMParser tmpDOMParser = new DOMParser();\n fFeed = tmpDOMParser.parseXml(datfeed);\n ListActivity.this.runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n if (fFeed != null && fFeed.getItemCount() > 0) {\n\n adapter.notifyDataSetChanged();\n\n //close swipe refresh\n swiperefresh.setRefreshing(false);\n\n //set feedURL calling setFeedString method, it is important if we want working swipe refresh listener\n setFeedString(datfeed);\n }\n }\n });\n }\n });\n thread.start();\n }\n }", "public void parseInputStream(InputStream is) throws IOException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\n\t\tString str = null;\n\t\twhile((str = br.readLine()) != null) {\n\t\t\tsb.append(str).append(\"\\n\\r\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tJSONObject jObject = new JSONObject(sb.toString());\n\t\t\tfinal String access_token = jObject.getString(\"access_token\");\n\t\t\tfinal String token_type = jObject.getString(\"token_type\");\n\t\t\tfinal String expires_in = jObject.getString(\"expires_in\");\n\t\t\tfinal String refresh_token = jObject.getString(\"refresh_token\");\n\t\t\t\n\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tgetGmailAtomFeed(access_token,token_type);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "java.lang.String getFeed();", "public void processUrl() {\n try {\n\n JsonNode rootNode = getJsonRootNode(getJsonFromURL()); // todo: pass url in this method (to support multi-urls)\n getValuesFromJsonNodes(rootNode);\n setAndFormatValues();\n\n } catch (Exception e) {\n System.out.println(\"ERROR: caught error in processUrl()\");\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\ttry{\r\n\t\t\tURL feedUrl = new URL(\"http://blog.rss.naver.com/leeminji25.xml\");\r\n\t\t\tSyndFeedInput input = new SyndFeedInput();\r\n\t\t\tSyndFeed syndFeed = input.build(new XmlReader(feedUrl));\r\n\t\t\t\r\n\t\t\t/* RSS */\r\n\t\t\tSystem.out.println( syndFeed.getFeedType() );\r\n\t\t\tList<SyndEntry> entries = syndFeed.getEntries();\r\n\t\t\trequest.setAttribute(\"entries\", entries);\t\r\n\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\r\n\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(\"/content/blog.jsp\");\r\n\t\tdispatcher.forward(request, response);\r\n\t}", "public synchronized Node parse(String url) throws IOException,SAXException\n {\n if(log.isDebugEnabled())\n log.debug(\"parse: \"+url);\n return parse(new InputSource(url));\n }", "private String getURL(String feedUrl) {\n\tStringBuilder sb = null;\n\ttry {\n for(int i = 3; i>0; i--) {\n\t sb = new StringBuilder();\n URL url = new URL(feedUrl);\n//User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22 GTB7.1 ( .NET CLR 3.5.30729)\n//Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\n//Accept-Language: en-us,en;q=0.5\n//Accept-Encoding: gzip,deflate\n//Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\n//Keep-Alive: 115\n//Connection: keep-alive\n//\tHttpsURLConnection uc = (HttpsURLConnection) url.openConnection();\n\tHttpURLConnection uc = (HttpURLConnection) url.openConnection();\n\tuc.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22 GTB7.1 ( .NET CLR 3.5.30729)\");\n//Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\n\tuc.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\");\n\tuc.setRequestProperty(\"Accept-Language\", \"en-us,en;q=0.5\");\n\tuc.setRequestProperty(\"Accept-Encoding\", \"gzip,deflate\");\n\tuc.setRequestProperty(\"Accept-Charset\", \"ISO-8859-1,utf-8;q=0.7,*;q=0.7\");\n\tuc.setRequestProperty(\"Keep-Alive\", \"115\");\n\tuc.setRequestProperty(\"Connection\", \"keep-alive\");\n//Keep-Alive: 115\n//Connection: keep-alive\n//\tif (userName != null && password != null) {\n//\t\tuc.setRequestProperty(\"Authorization\", \"Basic \" + encodedAuthenticationString);\n//\t}\n\t// ori setting??\n//\tuc.setReadTimeout(TIME_OUT);\n//\tuc.setFollowRedirects(true);\n//\tuc.setInstanceFollowRedirects(true);\n//\tuc.setAllowUserInteraction(true);\n\tuc.setDoOutput(true);\n\tuc.setDoInput(true);\n\tuc.setUseCaches(false);\n\tuc.setRequestMethod(\"POST\");\n\tuc.setRequestProperty(\"Content-Type\", \"text/xml\");\n\t\n\tBufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));//uc.getInputStream()\n\tString inputLine;\n//\t'aa7c.com')\" onmouseout=\"menuLayers.hide()\">Available</a>\n\tboolean refreshAgain = false;\n\twhile ((inputLine = in.readLine()) != null) {\n//\t\tSystem.out.println(inputLine);\n\t\tsb.append(inputLine);\n\t\tif( inputLine.contains(\"Refresh\") ) {\n\t\t\trefreshAgain = true;\n\t\t\tSystem.out.println(\"Refresh\");\n\t\t}\n\t}\n\tin.close();\n\tuc.disconnect();\t\t\n//\tRefresh\n\tif( refreshAgain ) {\n\t Thread.sleep(1000);\n\t}\n\telse break;\n }\n }catch(Exception ee){}\nreturn sb.toString();\n}", "private boolean pull(String url) {\r\n\t\ttry {\r\n\t\t\tHttpURLConnection con = (HttpURLConnection) new URL(url).openConnection();\r\n\t\t\tint respCode = con.getResponseCode();\r\n\t\t\tif (respCode != HttpURLConnection.HTTP_OK) {\r\n\t\t\t\tHaypiLog.d(TAG, respCode + \" \" + con.getResponseMessage());\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tInputStream in = con.getInputStream();\r\n\t\t\tByteArrayOutputStream out = new ByteArrayOutputStream(4096);\r\n\t\t\tbyte[] buf = new byte[2048];\r\n\t\t\tint n;\r\n\t\t\twhile ((n = in.read(buf)) > -1) {\r\n\t\t\t\tout.write(buf, 0, n);\r\n\t\t\t}\r\n\t\t\tString encoding = con.getContentEncoding();\r\n\t\t\tif (encoding == null) {\r\n\t\t\t\tencoding = \"UTF-8\";\r\n\t\t\t}\r\n\t\t\tString resp = out.toString(encoding);\r\n\t\t\tString[] ss = HaypiUtil.split(resp, \"\\r\\n\");\r\n\r\n\t\t\tif (ss.length >= 3 && ss[0].equals(\"0\") && ss[1].equals(\"0\")) {\r\n\t\t\t\tint index = 2;\r\n\t\t\t\tint count = Integer.parseInt(ss[index++]);\r\n\t\t\t\tif (count > 0) {\r\n\t\t\t\t\tArrayList<News> list = new ArrayList<News>();\r\n\t\t\t\t\tfor (; count > 0; count--) {\r\n\t\t\t\t\t\tint version = Integer.parseInt(ss[index++]);\r\n\t\t\t\t\t\tif (version <= News.lastNewsVersion)\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tNews.lastNewsVersion = version;\r\n\t\t\t\t\t\tNews entity = new News();\r\n\t\t\t\t\t\tentity.setNew(true);\r\n\t\t\t\t\t\tentity.setVersion(version);\r\n\t\t\t\t\t\tentity.setStartTime(Integer.parseInt(ss[index++]));\r\n\t\t\t\t\t\tentity.setEndTime(Integer.parseInt(ss[index++]));\r\n\t\t\t\t\t\tentity.setSubject(ss[index++]);\r\n\t\t\t\t\t\tentity.setDescription(ss[index++]);\r\n\t\t\t\t\t\tentity.setContent(ss[index++]);\r\n\t\t\t\t\t\tentity.setToken(ss[index++]);\r\n\t\t\t\t\t\tentity.setButtonText(ss[index++]);\r\n\t\t\t\t\t\tentity.setNewsType(News.TYPE.values()[Integer.parseInt(ss[index++])]);\r\n\t\t\t\t\t\tentity.setTopNews(\"1\".equals(ss[index++]));\r\n\t\t\t\t\t\tentity.setParams1(ss[index++]);\r\n\t\t\t\t\t\tentity.setParams2(ss[index++]);\r\n\t\t\t\t\t\tentity.setParams3(ss[index++]);\r\n\t\t\t\t\t\tlist.add(entity);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (list.size() > 0) {\r\n\t\t\t\t\t\tNews.add(list);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcon.disconnect();\r\n\t\t\treturn true;\r\n\t\t} catch (Exception e) {\r\n\t\t\tHaypiLog.e(TAG, \"poll\", e);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public void refresh(View view) {\n Intent intent = new Intent(this, RSSService.class);\n intent.putExtra(\"RSS_URL\", url);\n startService(intent);\n\n }", "private void saveNewFeed() {\n String rssUrl = mUrlEditText.getText().toString();\n\n if (!rssUrl.equals(\"\") && userNotAlreadyFollowing(rssUrl)) {\n getActivity().setProgressBarIndeterminateVisibility(true);\n\n FeedProcessingService service = new FeedProcessingService(getActivity(), mFeedHandler);\n service.getAndProcessFeed(rssUrl);\n }\n }", "private boolean isNotValidRss(final String url) throws FeedException, IOException {\n final SyndFeed feed = FeedHandler.getFeed(url);\n final List<SyndEntry> items = feed.getEntries();\n if (items.isEmpty()) {\n return true;\n }\n for (SyndEntry item : items) {\n if (item.getPublishedDate() == null) {\n return true;\n }\n }\n return false;\n }", "private void parseJsonFeed(JSONObject response) {\n try {\n JSONArray feedArray = response.getJSONArray(\"feed\");\n\n for (int i = 0; i < feedArray.length(); i++) {\n JSONObject feedObj = (JSONObject) feedArray.get(i);\n\n FeedItem item = new FeedItem();\n item.setId(feedObj.getInt(\"organisation_id\"));\n item.setPortId(feedObj.getInt(\"portfolio_id\"));\n item.setName(feedObj.getString(\"name\"));\n //int id=item.getId();\n // Image might be null sometimes\n String image = feedObj.isNull(\"image\") ? null : feedObj.getString(\"image\");\n item.setImge(image);\n item.setStatus(feedObj.getString(\"status\"));\n item.setProfilePic(feedObj.getString(\"profilePic\"));\n item.setTimeStamp(feedObj.getString(\"timeStamp\"));\n item.setCommentCount(feedObj.getString(\"commentCount\"));\n\n // url might be null sometimes\n String feedUrl = feedObj.isNull(\"url\") ? null : feedObj.getString(\"url\");\n item.setUrl(feedUrl);\n\n feedItems.add(item);\n }\n\n\n // notify data changes to list adapater\n listAdapter.notifyDataSetChanged();\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n\t\tprotected String doInBackground(String... params) {\n\t\t\tfor (int i = 0; i < mEntries.size(); ++i) {\n\t\t\t\tEntry ent = mEntries.get(i);\n\n\t\t\t\t// Grab the text from the url\n\t\t\t\tString url = ent.getURL();\n\t\t\t\tString result = downloadURL(url);\n\n\t\t\t\t// The up-to-date entry\n\t\t\t\tEntry uEnt = (Entry) EntryType.getTypeEntry(\n\t\t\t\t\t\tent.getType(), -1);\n\t\t\t\tuEnt.setFromURLText(url, result);\n\n\t\t\t\tonProgressUpdate(new Object[] { i, uEnt });\n\t\t\t}\n\n\t\t\t// Successful exit\n\t\t\treturn \"Success\";\n\t\t}", "public Feed getFeed(String feedURL, Date lastUpdatedDate, boolean summary) throws MalformedURLException {\n return getFeed(new URL(feedURL), lastUpdatedDate, summary);\n }", "public void init() {\n BufferedReader in = null;\n try {\n //URL feed = new URL(\"http://twitter.com/statuses/user_timeline/48274520.rss\");\n URL feed = new URL(\"http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=g_damian\");\n in = new BufferedReader(new InputStreamReader(feed.openStream()));\n String inputLine;\n String data = null;\n while ((inputLine = in.readLine()) != null) {\n inputLine = inputLine.trim();\n if (inputLine.startsWith(\"<created_at>\") && inputLine.endsWith(\"</created_at>\")) {\n inputLine = inputLine.substring(12, inputLine.length() - 13);\n data = inputLine.replaceAll(\"\\\\+\\\\d* \", \"\");\n }\n if (inputLine.startsWith(\"<text>\") && inputLine.endsWith(\"</text>\")) {\n inputLine = inputLine.substring(6, inputLine.length() - 7);\n buffer.append(escapeMessage(inputLine));\n buffer.append(\"<br/>[\" + data + \"]\");\n buffer.append(\"\\n\");\n }\n }\n in.close();\n } catch (MalformedURLException ex) {\n Logger.getLogger(ShowTweetsApplet.class.getName()).log(Level.SEVERE, null, ex);\n appendException(buffer, ex);\n } catch (IOException ex) {\n Logger.getLogger(ShowTweetsApplet.class.getName()).log(Level.SEVERE, null, ex);\n appendException(buffer, ex);\n } finally {\n try {\n if (in != null) {\n in.close();\n }\n } catch (IOException ex) {\n Logger.getLogger(ShowTweetsApplet.class.getName()).log(Level.SEVERE, null, ex);\n appendException(buffer, ex);\n }\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tURL url = new URL(\"https://mail.google.com/mail/feed/atom\");\n\t\t\t\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\t\t\t\tconn.addRequestProperty(\"Authorization\", token_type + \" \"+access_token);\n\t\t\t\t\tint respCode = conn.getResponseCode();\n\t\t\t\t\tif (respCode == HttpURLConnection.HTTP_OK) {\n\t\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\t\tInputStream is = conn.getInputStream();\n\t\t\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\n\t\t\t\t\t\tString str;\n\t\t\t\t\t\twhile((str = br.readLine()) != null) {\n\t\t\t\t\t\t\tsb.append(str).append(\"\\n\\r\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal String text = sb.toString();\n\t\t\t\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\ttextView.setText(text);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\tToast.makeText(SampleGoogleOAuthActivity.this, \"������ ���� ����\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "public Feed getFeed(String feedURL, boolean summary) throws MalformedURLException {\n return getFeed(feedURL, null, summary);\n }", "public interface RSSService {\n\n //if only RSS feeds used the last-modified tag..\n @HEAD\n Call<Void> headFeed(@Url String url);\n\n @GET\n Call<RSSFeed> getFeed(@Url String url);\n}", "protected void update(FeedItemHandler handler, Date cacheExpiryDate, ExecutorService executor) {\n\t\ttry {\n\t\t\tURLConnection connection = new URL(url).openConnection();\n\t\t\tconnection.setConnectTimeout(settings.getFeedConnectTimeout());\n\t\t\tconnection.setReadTimeout(settings.getFeedReadTimeout());\n\t\t\tconnection.connect();\n\t\t\tSyndFeedInput feedInput = new SyndFeedInput();\n\t\t\tCharset charset = Charset.forName(\"utf-8\"); //NOI18N\n\t\t\tif (connection.getContentEncoding() != null) {\n\t\t\t\tcharset = Charset.forName(connection.getContentEncoding());\n\t\t\t} else if (connection.getContentType() != null) {\n\t\t\t\tString[] contentTypeParts = connection.getContentType().split(\";\"); //NOI18N\n\t\t\t\tfor (String contentTypePart : contentTypeParts) {\n\t\t\t\t\tString[] contentTypePartComponents = contentTypePart.trim().split(\"=\", 2); //NOI18N\n\t\t\t\t\tif (contentTypePartComponents.length == 2 && contentTypePartComponents[0].matches(\"charset\")) //NOI18N\n\t\t\t\t\t\tcharset = Charset.forName(contentTypePartComponents[1].trim());\n\t\t\t\t}\n\t\t\t}\n\t\t\tSyndFeed feed = feedInput.build(new InputStreamReader(connection.getInputStream(), charset));\n\t\t\ttitle = feed.getTitle();\n\t\t\tencoding = feed.getEncoding();\n\t\t\thandleEntries(feed.getEntries(), handler, cacheExpiryDate, executor);\n\t\t} catch (IOException | IllegalArgumentException ex) {\n\t\t\tthrow new RuntimeException(MessageFormat.format(messages.getString(\"CANNOT_UPDATE_FEED\"), new Object[]{url}), ex);\n\t\t} catch (Exception ex) {\n\t\t\tthrow new RuntimeException(MessageFormat.format(messages.getString(\"CANNOT_UPDATE_FEED\"), new Object[]{url}), ex);\n\t\t}\n\t}", "@Scheduled(fixedRate = 120000)\n public void readRss() {\n\n List<ItemNews> itemList = new ArrayList<>();\n\n try {\n String url = \"https://www.nytimes.com/svc/collections/v1/publish/https://www.nytimes.com/section/world/rss.xml\";\n\n try (XmlReader reader = new XmlReader(new URL(url))) {\n SyndFeed feed = new SyndFeedInput().build(reader);\n for (SyndEntry entry : feed.getEntries()) {\n LocalDateTime localDateTime = entry.getPublishedDate().toInstant()\n .atZone(ZoneId.systemDefault())\n .toLocalDateTime();\n ItemNews item = new ItemNews();\n item.setTitle(entry.getTitle());\n item.setAuthor(entry.getAuthor());\n item.setLink(entry.getLink());\n item.setDescription(entry.getDescription().getValue());\n item.setDateTime(localDateTime);\n modifyItem(item);\n itemList.add(item);\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n if (!itemList.isEmpty()) {\n Collections.sort(itemList , Comparator.comparing(ItemNews::getDateTime));\n saveItems(itemList);\n }\n }", "void handle(List<FeedEntry> feedEntryBatch);", "List<SyndFeed> getRssFeeds(Set<String> feedUrls) throws FeedException, IOException,\n FetcherException;", "public void readFeed() {\n\t\tfeedSvc.getFeed(date, new GetFeedCallback());\n\t\tdate=new Date();\n\t}", "@Override\n protected Void doInBackground(Void... arg0) {\n helper = new LiveFeedParser(999);\n helper.get();\n viewEntries = helper.getViewEntries();\n return null;\n }", "public Set<Anchor> parse(Reader reader, String url) {\n\n Set<Anchor> elements = new HashSet<>();\n String urtContent = null;\n try {\n urtContent = readFully(reader);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (urtContent == null){\n return elements;\n }\n\n mTag = pTag.matcher(urtContent);\n\n while (mTag.find()) {\n\n String href = mTag.group(1); // get the values of href\n String linkElem = mTag.group(2); // get the text of link Html Element\n\n mLink = pLink.matcher(href);\n\n while (mLink.find()) {\n\n String link = mLink.group(1);\n Anchor anchor = new Anchor();\n anchor.setUrl(link);\n anchor.setText(linkElem);\n\n elements.add(anchor);\n\n }\n }\n return elements;\n }", "public Address interpretUrl(String url);", "public void run()\n\t\t{\n\t\t\tint num = 0;\n\t\t\ttry{\n\t\t\t\tlog.debug(\"Dealing with: \" + url.toString() + \" From : \" + urlp);\n\t\t\t\t\n\t\t\t\tSocket socket = new Socket(url.getHost(), PORT);\n\t\t\t\tPrintWriter writer = new PrintWriter(socket.getOutputStream());\n\t\t\t\tBufferedReader reader = \n\t\t\t\t\tnew BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\t\tString request = \"GET \" + url.getPath() + \" HTTP/1.1\\n\" +\n\t\t\t\t\t\t\t\t\"Host: \" + url.getHost() + \"\\n\" +\n\t\t\t\t\t\t\t\t\"Connection: close\\n\" + \n\t\t\t\t\t\t\t\t\"\\r\\n\";\n\t\t\t\twriter.println(request);\n\t\t\t\twriter.flush();\n\t\t\n\t\t\t\tString line = reader.readLine();\n\t\t\t\t// filter the head message of the response\n\t\t\t\twhile(line != null && line.length() != 0)\n\t\t\t\t{\n\t\t\t\t\tline = reader.readLine();\n\t\t\t\t}\n\t\t\t\t// keep the html context\n\t\t\t\twhile (line != null) \n\t\t\t\t{\n\t\t\t\t\tcontext += line + \"\\n\";\n\t\t\t\t\tline = reader.readLine();\n\t\t\t\t}\n\t\t\t\treader.close();\n\t\t\t\twriter.close();\n\t\t\t\tsocket.close();\n\t\t\t\t//log.debug(context);\n\t\t\t\tstripper = new TagStripper(context);\n\t\t\t\tlog.debug(\"Removing script and style from: \" + url.toString());\n\t\t\t\tstripper.removeComments();\n\t\t\t\tstripper.removeScript();\n\t\t\t\tstripper.removeStyle();\n\t\t\t\tlog.debug(\"Getting links from: \" + url.toString());\n\t\t\t\tArrayList<String> link = new ArrayList<String>();\n\t\t\t\tstripper.buildLinks(url.toString());\n\t\t\t\t\n\t\t\t\tlink = stripper.getLinks();\n\t\t\t\tfor(String tmp : link) {\n\t\t\t\t\tif(getCount() < pageNum ) {\n\t\t\t\t\t\t// find if the link has been already visited\n\t\t\t\t\t\tif(!urlList.contains(tmp)) {\n\t\t\t\t\t\t\tworkers.execute(new SingleHTMLFetcher(new URL(tmp), this.url.toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString title = stripper.getTitle();\n\t\t\t\tif(title == null)\n\t\t\t\t\ttitle = \"NO title\";\n\t\t\t\ttitle = title.replaceAll(\"&[^;]*;\", \"\");\n\t\t\t\tlog.debug(\"Removing tags from: \" + url.toString());\n\t\t\t\tstripper.removeTags();\n\t\t\t\tstripper.removeSymbol();\n\t\t\t\tString snippet = stripper.getSnippet(title);\n\t\t\t\tdb.savePageInfo(connection, title, snippet, url.toString());\n\t\t\t\tcontext = stripper.getContext();\n\t\t\t\tString[] words = context.toLowerCase().split(\"\\\\s\");\n\t\t\t\tArrayList<String> wordsList = new ArrayList<String>();\n\t\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\t\t// delete non-word character\n\t\t\t\t\twords[i] = words[i].replaceAll(\"\\\\W\", \"\").replace(\"_\",\n\t\t\t\t\t\t\t\"\");\n\t\t\t\t\tif(words[i].length() != 0)\n\t\t\t\t\t\twordsList.add(words[i]);\n\t\t\t\t}\n\t\t\t\tfor (String w : wordsList) {\n\t\t\t\t\tif (w.length() != 0) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tindex.addNum(w, url.toString(), num);\n\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\tnum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlog.debug(\"URL: \" + url.toString() + \" is finished!\");\n\t\t\t\tdecrementPending();\n\t\t\t}catch(Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}", "private void pageContent( String url) {\n\t\t\n\t\tif ( !url.matches(URL)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tList<String> outlinks = null; // out link urls\n\t\tUrlBean bean = null; // basic info of the url\n\t\t\n\t\tbean = new UrlBean();\n\t\ttry {\n\t\t\t\n\t\t\tconn = Jsoup.connect(url).timeout(5000);\n\t\t\tif ( conn == null) {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\t\n\t\t\tdocument = conn.get(); // 得到网页源代码,超时时间是5秒\n\t\t\t\n\t\t\t/*\n\t\t\t * 文章基本信息\n\t\t\t */\n\t\t\telements = document.getElementsByTag(\"title\");\n\t\t\tif ( elements!= null && elements.size() != 0) {\n\t\t\t\telement = elements.get(0);\n\t\t\t}\n\t\t\tString title = element.text();\n\t\t\tbean.setTitle(title);\n\t\t\tbean.setKeywords(title);\n\t\t\t\n\t\t\telements = document.getElementsByTag(\"a\");\n\t\t\tif ( elements != null) {\n\t\t\t\tString linkUrl = null;\n\t\t\t\toutlinks = new ArrayList<String>();\n\t\t\t\tfor ( int i = 0; i < elements.size(); i++) {\n\t\t\t\t\tlinkUrl = elements.get(i).attr(\"href\");\n\t\t\t\t\tif ( linkUrl.matches(URL)) {\n\t\t\t\t\t\toutlinks.add(linkUrl);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t} \n\t\t\n\t\tbean.setUrl(url);\n\t\tbean.setId(urlId++);\n\t\tbean.setRank(1);\n\t\tif ( outlinks != null) {\n\t\t\tint count = outlinks.size();\n\t\t\tbean.setOutlinks(count);\n\t\t\tfor ( int i = 0; i < count; i++) {\n\t\t\t\turlsSet.add(outlinks.get(i));\n\t\t\t}\n\t\t\tif ( new AllInterface().addOneUrlInfo(bean, outlinks)) {\n\t\t\t\tSystem.out.println(\"Add to database successfully, url is '\" + url + \"'.\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Fail to add to database, maybe url exists. Url is '\" + url + \"'.\");\n\t\t\t}\n\t\t\tSystem.out.println(\"[\" + count + \" urls remain...]\");\n\t\t\tSystem.out.println();\n\t\t} else {\n\t\t\tSystem.out.println(\"Error occurs in crawl, url is '\" + url + \"'.\");\n\t\t\tSystem.out.println(\"[[FINISHED]]\");\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t}", "void threadUpdateReceived(FeedItem feedItem);", "void onContentChanged(@Nullable List<FeedContent> feedContents);", "@Asynchronous\n public Future<?> doGenerate() {\n final AtomLink atomLink = newChannelAtomLink();\n final Channel channel = newChannel(atomLink);\n\n visitor.visit(p -> {\n final String url = visitor.buildLink(p);\n\n final Guid guid = new Guid();\n guid.setValue(url + \"?rssGuid=\" + Long.toString(p.getId()));\n\n final AtomLink link = new AtomLink();\n link.setRel(\"self\");\n link.setType(atomLink.getType());\n link.setHref(atomLink.getHref() + \"?post=\" + p.getId());\n\n final Item item = new Item();\n item.setTitle(p.getTitle());\n item.setLink(url);\n item.setDescription(p.getSummary());\n item.setPubDate(RFC_1123_DATE_TIME.format(ZonedDateTime.ofInstant(p.getUpdated().toInstant(), ZoneId.systemDefault())));\n item.setGuid(guid);\n item.setAtomLink(link);\n channel.getItem().add(item);\n });\n\n final Rss rss = new Rss();\n rss.setChannel(channel);\n this.rss = rss;\n return new AsyncResult<>(true);\n }", "public void refreshAllRssFeeds()\n {\n Vector rssContactList = new Vector();\n rssContactList = opSetPersPresence.getContactListRoot().\n getRssURLList(rssContactList);\n Iterator rssContact = rssContactList.iterator();\n while(rssContact.hasNext())\n {\n ContactRssImpl contact = (ContactRssImpl)rssContact.next();\n try\n {\n \n submitRssQuery(contact, false);\n }\n catch (Exception ex)\n {\n logger.error(\"Failed to refresh feed for \" + contact, ex);\n }\n }\n }", "private boolean extractArticleFromUrl(URL url) {\n\n\t\tif (!mDBh.urlExistsInWebsite(url)) {\n\t\t\tString content = null;\n\n\t\t\t//REMEMBER TO: when switching content format text <-> HTML, change the textType in SIMMO Document\n\n\t\t\t//Extract the content as plain text\n//\t\t\ttry {\n//\t\t\t\tfinal InputSource is = HTMLFetcher.fetch(url).toInputSource();\n//\t\t\t\tfinal BoilerpipeSAXInput in;\n//\t\t\t\tin = new BoilerpipeSAXInput(is);\n//\t\t\t\tfinal TextDocument doc = in.getTextDocument();\n//\t\t\t\tcontent = ArticleExtractor.INSTANCE.getText(doc);\n//\t\t\t} catch (SAXException e) {\n//\t\t\t\tSystem.out.println(\"KIndex :: Scrapper.extractArticleFromUrl() SAXException for url: \" + url.toString());\n//\t\t\t\te.printStackTrace();\n//\t\t\t\treturn false;\n//\t\t\t} catch (BoilerpipeProcessingException e) {\n//\t\t\t\tSystem.out.println(\"KIndex :: Scrapper.extractArticleFromUrl() BoilerpipeProcessingException for url: \" + url.toString());\n//\t\t\t\te.printStackTrace();\n//\t\t\t\treturn false;\n//\t\t\t} catch (IOException e) {\n//\t\t\t\tSystem.out.println(\"KIndex :: Scrapper.extractArticleFromUrl() IOException for url: \" + url.toString());\n//\t\t\t\te.printStackTrace();\n//\t\t\t\treturn false;\n//\t\t\t}\n\n\t\t\t//extract the content as HTML\n\t\t\tfinal BoilerpipeExtractor extractor = CommonExtractors.DEFAULT_EXTRACTOR;\n\t\t\tfinal HTMLHighlighter hh = HTMLHighlighter.newExtractingInstance();\n\t\t\ttry {\n\t\t\t\tcontent = hh.process(url, extractor);\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"KIndex :: Scrapper.extractArticleFromUrl() IOException for url: \" + url.toString());\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn false;\n\t\t\t} catch (BoilerpipeProcessingException e) {\n\t\t\t\tSystem.out.println(\"KIndex :: Scrapper.extractArticleFromUrl() BoilerpipeProcessingException for url: \" + url.toString());\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn false;\n\t\t\t} catch (SAXException e) {\n\t\t\t\tSystem.out.println(\"KIndex :: Scrapper.extractArticleFromUrl() SAXException for url: \" + url.toString());\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn false;\n\t\t\t}\n\n\n\t\t\t//checking if website already exist\n\n\t\t\t//Storing content in Simmo\n\t\t\t//Create a Simmo Webpage\n\t\t\tWebpage wp = new Webpage();\n\t\t\twp.setUrl(url.toString());\n\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\twp.setCreationDate(cal.getTime());\n\n\t\t\t//Create a Simmo Text\n\t\t\tText txt = new Text();\n\t\t\ttxt.setContent(content);\n\t\t\ttxt.setTextType(Text.TEXT_TYPE.HTML);\n//\t\t\ttxt.setTextType(Text.TEXT_TYPE.TXT);\n\n\t\t\t//Add Text to Webpage\n\t\t\twp.addItem(txt);\n\n\t\t\t//Store Webpage to db\n\t\t\tDAOManager manager = new DAOManager(MongoDBHandler.getTrgDBName());\n\t\t\tmanager.saveWebpage(wp);\n\n\n\t\t\t//Politeness policy of one second.\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000); //1000 milliseconds is one second.\n\t\t\t} catch (InterruptedException ex) {\n\t\t\t\t//Thread.currentThread().interrupt();\n\t\t\t\tSystem.out.println(\"Could not make the thread sleep\");\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\t\tSystem.out.println(\"Already exist in database: \" + url.toString());\n\t\treturn false;\n\t}", "public FeedResponse getFeed(FeedRequest request, String urlPath) throws IOException, TweeterRemoteException{\n FeedResponse response = clientCommunicator.doPost(urlPath, request, null, FeedResponse.class);\n\n if(response.isSuccess()) {\n return response;\n } else {\n throw new RuntimeException(response.getMessage());\n }\n }", "private void refreshFeed() {\n Calendar cal = new GregorianCalendar();\n cal.set(Calendar.HOUR_OF_DAY, 0);\n cal.set(Calendar.MINUTE, 0);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.DATE, cal.get(Calendar.DATE) - DEFAULT_DAYS_BACK);\n String asOfDate = iso8601.fromCalendar(cal);\n \n feedService.feed(asOfDate, new Callback<List<Post>>() {\n @Override\n public void success(List<Post> posts, Response response) {\n Log.i(TAG, \"Received \" + posts.size() + \" posts from the feed service.\");\n \n ArrayList<Post> p = new ArrayList<Post>(posts);\n postArrayAdapter = new PostArrayAdapter(context, R.layout.listitem_feed, p);\n listView.setAdapter(postArrayAdapter);\n }\n \n @Override\n public void failure(RetrofitError retrofitError) {\n //TODO: Handle this better\n Log.e(TAG, \"Error retrieving posts from the feed: \" + retrofitError.getCause().toString());\n \n if (!retrofitError.isNetworkError()) {\n Log.i(TAG, \"Not network error, so likely cookie has expired; return user to login page\");\n sessionManager.terminateSession();\n startActivity(new Intent(getApplicationContext(), MainActivity.class));\n }\n else {\n Toast toast = new Toast(context);\n toast.makeText(context, getString(R.string.error_connecting), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "@Override\n\t\tprotected List<NewsBean> doInBackground(Void... params) {\n\t\t\tsynchronized (this) {\n\t\t\t\treturn new ParseXMLUtil().parseNewsXml(ls, url);\n\t\t\t}\n\t\t}", "public void crawl(String url);", "public PodcastEntity getPodcastByFeed(String feed);", "@Override\n protected void onHandleIntent(Intent workIntent) {\n // Gets a URL to read from the incoming Intent's \"data\" value\n String urlString = workIntent.getDataString();\n\n // URL to download from\n URL url;\n\n //block that tries to connect to xml data, and throws an IOException if one occurs\n try {\n // Convert the incoming data string to a URL.\n url = new URL(urlString);\n\n /**\n * Tries to open a connection to the URL. If an IO error occurs, this throws an\n * IOException\n */\n URLConnection urlConnection = url.openConnection();\n\n // If the connection is an HTTP connection, continue\n if (urlConnection instanceof HttpURLConnection) {\n // Broadcasts an Intent indicating that processing has started.\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_STARTED);\n\n // Casts the connection to a HTTP connection\n HttpURLConnection httpURLConnection = (HttpURLConnection) urlConnection;\n\n // Reports that the service is about to connect to the RSS feed\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_CONNECTING);\n\n // Get response code from site\n int responseCode = httpURLConnection.getResponseCode();\n\n // Continue if response is OK\n if (responseCode == HttpURLConnection.HTTP_OK) {\n // Get content length (in bytes) to calculate progress from\n int contentLength = httpURLConnection.getContentLength();\n\n InputStream inputStream = urlConnection.getInputStream();\n\n // Save to file\n //FileOutputStream outputStream = new FileOutputStream(Constants.XML_SAVE_FILE_PATH);\n // Save to internal storage instead\n File file = new File(getFilesDir(), Constants.XML_SAVE_FILE_NAME);\n FileOutputStream outputStream = new FileOutputStream(file);\n\n // keep track of how much is downloaded\n int totalBytesRead = 0;\n int progressDone = 0;\n // Report downloading state\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_DOWNLOADING);\n\n int bytesRead = -1;\n byte[] buffer = new byte[BUFFER_SIZE];\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n outputStream.write(buffer, 0, bytesRead);\n totalBytesRead += bytesRead;\n progressDone = totalBytesRead/contentLength * 100;\n // TODO: broadcast progress\n }\n\n outputStream.close();\n inputStream.close();\n httpURLConnection.disconnect();\n // Report download complete\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_DOWNLOAD_COMPLETE);\n }\n\n }\n else {\n // Report that action failed\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_FAILED);\n return;\n }\n\n // TODO: make sure tvheadend is running\n // Open sockect connection to xmltv.sock\n String socketName = getFilesDir() + \"/xmltv.sock\";\n Log.d(\"socketConnection\", \"Connecting to \" + socketName);\n LocalSocketAddress socketAddress = new LocalSocketAddress(socketName,\n LocalSocketAddress.Namespace.FILESYSTEM);\n LocalSocket socket = new LocalSocket();\n socket.connect(socketAddress);\n if (socket.isConnected()) {\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_SOCKET_CONNECTED);\n\n // open xml file\n File file = new File(getFilesDir(), Constants.XML_SAVE_FILE_NAME);\n FileInputStream inputStream = new FileInputStream(file);\n\n // get socket output stream\n OutputStream outputStream = socket.getOutputStream();\n\n // write xml data to xmltv socket\n int bytesRead = -1;\n byte[] buffer = new byte[BUFFER_SIZE];\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n outputStream.write(buffer, 0, bytesRead);\n }\n outputStream.close();;\n inputStream.close();\n socket.close();\n }\n else {\n // Report that action failed\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_FAILED);\n return;\n }\n // Done successfully\n // set last update time - THIS could be DANGEROUS since shared prefs is not thread safe!\n Date now = new Date();\n EpgStoredSettings settings = new EpgStoredSettings(getApplicationContext());\n settings.setLastUpdateTime(now);\n // notify status fragment\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_COMPLETE);\n }\n catch (MalformedURLException e) {\n e.printStackTrace();\n // Report that action failed\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_FAILED);\n\n }\n catch (IOException e) {\n e.printStackTrace();\n // Report that action failed\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_FAILED);\n }\n catch (SecurityException e)\n {\n e.printStackTrace();\n // Report that action failed\n mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_FAILED);\n }\n }", "public void Calculate(String url){\n Object object[] = new Object[1];\n object[0] = url;\n directionsList = parseData(this.doInBackground(object));\n }", "@Override\n public void onCommentsReceived(String comment, String URL) {\n\n }", "public MsxReader ( URL url ) {\r\n\t\tsuper();\r\n\r\n\t\taddURL(url);\r\n\t}", "private void getArticles() throws Exception {\n\t\t\tHttpClient httpClient = new DefaultHttpClient();\n\n\t\t\tStringBuilder uriBuilder = new StringBuilder(BASE_URL);\n\t\t\turiBuilder.append(mURL);\n\n\t\t\tHttpGet request = new HttpGet(uriBuilder.toString());\n\t\t\tHttpResponse response = httpClient.execute(request);\n\n\t\t\tint status = response.getStatusLine().getStatusCode();\n\n\t\t\tif (status != HttpStatus.SC_OK) {\n\n\t\t\t\t// Log whatever the server returns in the response body.\n\t\t\t\tByteArrayOutputStream ostream = new ByteArrayOutputStream();\n\n\t\t\t\tresponse.getEntity().writeTo(ostream);\n\t\t\t\tmHandler.sendEmptyMessage(0);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tInputStream content = response.getEntity().getContent();\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(content));\n\t\t\tStringBuilder result = new StringBuilder();\n\n\t\t\tString line;\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tresult.append(line);\n\t\t\t}\n\n\t\t\t// Clean up and close connection.\n\t\t\tcontent.close();\n\n\t\t\tString html = result.toString();\n\t\t\t//This is our regex to match each article\n\t\t\t//This website's html is not xml compatible so regex is next best thing\n\t\t\tPattern p = Pattern.compile(\"<td class=\\\"title\\\"><a href=\\\"(.*?)\\\".*?>(.*?)<\\\\/a>(<span class=\\\"comhead\\\">(.*?)<\\\\/span>)?.*?<\\\\/td><\\\\/tr><tr><td colspan=2><\\\\/td><td class=\\\"subtext\\\">.*? by <a href=\\\"user\\\\?.*?\\\">(.*?)<\\\\/a>.*?<a href=\\\"item\\\\?id=(.*?)\\\">\");\n\t\t\tMatcher m = p.matcher(html);\n\t\t\tList<Article> articles = new ArrayList<Article>();\n\t\t\twhile(m.find()) {\n\t\t\t\tString url = m.group(1);\n\t\t\t\tString title = m.group(2);\n\t\t\t\tString domain = m.group(4);\n\t\t\t\tString author = m.group(5);\n\t\t\t\tString discussionID = m.group(6);\n\t\t\t\tArticle eachArticle = new Article(title, domain, url, author, discussionID);\n\t\t\t\tarticles.add(eachArticle); \n\t\t\t}\n\n\t\t\tMessage msg = mHandler.obtainMessage();\n\t\t\tBundle bundle = new Bundle();\n\t\t\tbundle.putParcelableArrayList(\"articles\", (ArrayList<? extends Parcelable>) articles);\n\t\t\tmsg.setData(bundle);\n\t\t\tmHandler.sendMessage(msg);\n\t\t}", "public Object parseChannel(int rssType, Document doc) throws Exception;", "private void parseLastfm() {\t\t\r\n\t\tfor(String artist : library.getCopyArtists()) {\r\n\t\t\ttry {\r\n\t\t\t\tartist = URLEncoder.encode(artist, \"UTF-8\");\r\n\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tthis.wq.execute(new Fetcher(artist, library));\r\n\t\t}\r\n\t}", "private void processUrls(){\n // Strip quoted tweet URL\n if(quotedTweetId > 0){\n if(entities.urls.size() > 0 &&\n entities.urls.get(entities.urls.size() - 1)\n .expandedUrl.endsWith(\"/status/\" + String.valueOf(quotedTweetId))){\n // Match! Remove that bastard.\n entities.urls.remove(entities.urls.size() - 1);\n }\n }\n\n // Replace minified URLs\n for(Entities.UrlEntity entity : entities.urls){\n // Find the starting index for this URL\n entity.indexStart = text.indexOf(entity.minifiedUrl);\n // Replace text\n text = text.replace(entity.minifiedUrl, entity.displayUrl);\n // Find the last index for this URL\n entity.indexEnd = entity.indexStart + entity.displayUrl.length();\n }\n }", "public Feed getFeed(URL feedURLObject, Date lastUpdatedDate) {\n return getFeed(feedURLObject, lastUpdatedDate, false);\n }", "public interface RssFetcherService {\n\n /**\n * Returns a list of SyndFeed generated by an array of feed urls.\n *\n * @param feedUrls set of rss feed urls\n * @return a list of Rome SyndFeeds generated by the list of urls\n * @throws IOException an I/O exception has occurred\n * @throws FeedException an Feed exception has occurred\n * @throws FetcherException an FetcherException has occurred\n */\n List<SyndFeed> getRssFeeds(Set<String> feedUrls) throws FeedException, IOException,\n FetcherException;\n\n List<Map<String, String>> getAllInformationFromLatestFeed();\n}", "@Override\n\t\tprotected List<NewsBean> doInBackground(Void... params) {\n\t\t\tsynchronized (this) {\t\t\t\n\t\t\t\treturn new ParseXMLUtil().parseNewsXml(ls,url);\n\t\t\t}\t\t\t\n\t\t}", "private void parseJsonFeed(JSONObject response) {\n try {\n JSONArray newsArray = response.getJSONArray(\"news\");\n hidePDialog();\n\n for (int i = 0; i < newsArray.length(); i++) {\n JSONObject feedObj = (JSONObject) newsArray.get(i);\n\n NewsItem news = new NewsItem();\n\n news.setId(feedObj.getString(\"id\"));\n news.setTitle(feedObj.getString(\"title\"));\n news.setDate(\"Posted on \" + feedObj.getString(\"created_at\"));\n news.setBrief(feedObj.getString(\"brief\"));\n\n //news.setDate(feedObj.getString(\"mdate\"));\n// String rd = feedObj.getString(\"mdate\");\n// news.setDate(\"Release date: \" + rd);\n\n mItems.add(news);\n }\n\n // notify data changes to list adapater\n newsAdapter.notifyDataSetChanged();\n\n } catch (JSONException e) {\n e.printStackTrace();\n hidePDialog();\n }\n }", "private synchronized void processNews() throws ClientProtocolException,\n\t\t\t\tIOException, JSONException {\n\n\t\t\tlong lastTime = mAdapter.getItem(mCount - 1).date;\n\t\t\tlong startTime = lastTime - Utils.MONTH;\n\n\t\t\tsetNews(ApiHandler.getData(lastTime, startTime));\n\t\t\tmHandler.sendEmptyMessage(UPDATE_LIST);\n\t\t}", "private void setFeedString(String feed_string) {\n\n feedURL = feed_string;\n }", "private static FeedSource createFeedSource(String name, URL url) {\n FeedSource feedSource = new FeedSource();\n feedSource.fetchFrequency = FetchFrequency.MINUTES;\n feedSource.fetchInterval = 1;\n feedSource.deployable = false;\n feedSource.name = name;\n feedSource.projectId = project.id;\n feedSource.retrievalMethod = FeedRetrievalMethod.FETCHED_AUTOMATICALLY;\n feedSource.url = url;\n return feedSource;\n }", "public long createFeed(String feedName,String feedURL,String encoding) {\r\n final ContentValues initialValues = new ContentValues();\r\n initialValues.put(FEED_NAME, feedName);\r\n initialValues.put(FEED_URL, feedURL);\r\n initialValues.put(XML_ENCODING, encoding);\r\n return mDB.insert(Tables.FEED_SOURCE, null, initialValues);\r\n }", "public void updateURL(String url) {\n\t\tthis.url = url;\n\t\ttry{\n\t\t\tthis.content = BrowsrDocumentValidator.assertIsValidBrowsrDocument(new URL(url));\n\t\t} catch (Exception exception){\n\t\t\tthis.content = new Text(exception.toString());\n\t\t}\n\t}", "@Override\n\tprotected ModelAndView handleRequestInternal(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception {\n\t\tfinal String startUrlToken = \"/feed/\";\n\t\tfinal String endUrlToken = \".\";\n\t\t\n\t\t// Get feed name\n\t\tString requestedUrl = request.getRequestURI();\n\t\tString feedName = requestedUrl.substring(requestedUrl.indexOf(startUrlToken) + startUrlToken.length(), requestedUrl.indexOf(endUrlToken));\n\t\t\n\t\tString feed;\n\t\tif (\"rse\".equals(feedName)) {\n\t\t\tfeed = FeedService.getRseFeed();\n\t\t} else if (\"twitter\".equals(feedName)) {\n\t\t\tfeed = FeedService.getTwitterFeed();\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(feedName + \"is not a valid feedName\");\n\t\t}\n\t\t\n\t\t// Map to view\n\t\treturn new ModelAndView(\"/jsp/feed.jsp\", \"feed\", feed);\n\t}", "boolean hasFeed();", "boolean hasFeed();", "public OldFeedRequest(HttpServletRequest request) throws Exception {\n \n // parse the request object and figure out what we've got\n mLogger.debug(\"parsing url \"+request.getRequestURL());\n \n String servlet = request.getServletPath();\n String pathInfo = request.getPathInfo();\n \n // what servlet is our destination?\n if(servlet != null) {\n // strip off the leading slash\n servlet = servlet.substring(1);\n \n if(feedServlets.contains(servlet)) {\n this.context = \"weblog\";\n this.flavor = servlet;\n } else {\n // not a request to a feed servlet\n throw new Exception(\"not a weblog feed request, \"+request.getRequestURL());\n }\n } else {\n throw new Exception(\"not a weblog feed request, \"+request.getRequestURL());\n }\n \n // parse the path info\n if(pathInfo != null && pathInfo.trim().length() > 1) {\n // strip off the leading slash\n pathInfo = pathInfo.substring(1);\n String[] pathElements = pathInfo.split(\"/\");\n \n if(pathElements[0].length() > 0) {\n this.weblogHandle = pathElements[0];\n }\n \n } else {\n \n // no path info means this was a non-weblog request\n // we handle a few exceptions for this which include\n // /rss - main rss feed\n // /atom - main atom feed\n // /flavor - main flavor feed\n \n this.context = \"main\";\n }\n \n /* \n * parse request parameters\n *\n * the only params we currently care about are:\n * flavor - defines the feed type\n * catname - specifies a weblog category\n * path - specifies a weblog category\n * excerpts - specifies the feed should only include excerpts\n *\n */\n if(request.getParameter(\"flavor\") != null) {\n this.flavor = request.getParameter(\"flavor\");\n }\n \n if(request.getParameter(\"path\") != null) {\n this.weblogCategory = request.getParameter(\"path\");\n }\n \n if(request.getParameter(\"catname\") != null) {\n this.weblogCategory = request.getParameter(\"catname\");\n }\n \n if(request.getParameter(\"excerpts\") != null) {\n this.excerpts = Boolean.valueOf(request.getParameter(\"excerpts\")).booleanValue();\n }\n \n // one small final adjustment.\n // if our flavor is \"flavor\" then that means someone is just getting\n // the default flavor, which is rss, so let's set that\n if(this.flavor.equals(\"flavor\")) {\n this.flavor = \"rss\";\n }\n \n }", "WebCrawlerData retrieve(String url);", "com.google.ads.googleads.v6.resources.Feed getFeed();", "@Override\n protected List<Flower> doInBackground(String... params) {\n // InputStream in = null;\n String content = HttpManager.getData(params[0]);\n flowerList = JSONParser.parserFeed(content);\n return flowerList;\n }", "private void handleEntries(List<SyndEntry> entries, FeedItemHandler handler, Date cacheExpiryDate, ExecutorService executor) throws IOException, InterruptedException, ExecutionException {\n\t\tSet<FeedItem> newItems = new HashSet<>();\n\t\tfor (SyndEntry entry : entries)\n\t\t\tnewItems.add(new FeedItem(this, entry));\n\n\t\t//Find outdated items\n\t\tfor (FeedItem oldItem : new HashSet<>(items))\n\t\t\tif (!newItems.contains(oldItem) && oldItem.getLastSeen() != null && oldItem.getLastSeen().before(cacheExpiryDate)) {\n\t\t\t\t//Item expired\n\t\t\t\titems.remove(oldItem);\n\t\t\t} else if (newItems.contains(oldItem)) {\n\t\t\t\tfor (FeedItem newItem : newItems)\n\t\t\t\t\tif (newItem.equals(oldItem))\n\t\t\t\t\t\tnewItem.setState(oldItem.getState());//Transfer state to new item\n\t\t\t\tif (oldItem.getState() != FeedItem.State.SENT_PDF)\n\t\t\t\t\titems.remove(oldItem);//Replace with new item to resend pdf\n\t\t\t\telse\n\t\t\t\t\toldItem.updateLastSeen();\n\t\t\t}\n\n\t\t// Ignore already existing items\n\t\tnewItems.removeAll(items);\n\n\t\t//Add new items\n\t\titems.addAll(newItems);\n\n\t\tList<Future<?>> futures = new ArrayList<>();\n\t\tfor (FeedItem item : newItems) {\n\t\t\tFuture<?> future = executor.submit(new Runnable() {\n\t\t\t\tprivate FeedItemHandler handler;\n\t\t\t\tprivate Feed feed;\n\t\t\t\tprivate FeedItem item;\n\n\t\t\t\tpublic Runnable setParameters(FeedItemHandler handler, Feed feed, FeedItem item) {\n\t\t\t\t\tthis.handler = handler;\n\t\t\t\t\tthis.feed = feed;\n\t\t\t\t\tthis.item = item;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\thandler.handle(feed, item);\n\t\t\t\t\t} catch (RuntimeException ex) {\n\t\t\t\t\t\tlog.error(MessageFormat.format(messages.getString(\"ERROR_HANDLING_FEED_ITEM\"), new Object[]{item}), ex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}.setParameters(handler, this, item));\n\t\t\tfutures.add(future);\n\t\t}\n\t\tfor (Future future : futures)\n\t\t\tfuture.get();\n\t}", "private void refreshMetadata(String url) {\n Log.d(LOG_TAG, \"refreshMetadata()\");\n\n final IcyStreamMeta streamMeta = new IcyStreamMeta();\n\n //Set the url\n try {\n\n streamMeta.setStreamUrl(new URL(url));\n } catch (MalformedURLException e) {\n Log.w(LOG_TAG, \"Malformed URL: \" + url);\n return;\n }\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n\n retrieveTimer = new Timer();\n retrieveTimer.scheduleAtFixedRate(new TimerTask() {\n @Override\n public void run() {\n String songTitle = \"\";\n try {\n //Refresh metadata\n streamMeta.refreshMeta();\n songTitle = new String(streamMeta.getStreamTitle().getBytes(\"ISO-8859-1\"), \"UTF-8\");\n } catch (IOException e) {\n Log.d(LOG_TAG, \"No song title info!\");\n return;\n }\n\n //Send song title to RadioPlayer Fragment\n if (songTitle.length() > 4) {\n Log.d(LOG_TAG, \"Current song: \" + songTitle);\n sendAlert(RadioPlayerFragment.SEND_TITLE, songTitle);\n }\n }\n }, 0, 1000);\n\n }\n }).start();\n\n }", "private void parseResponse(String response, List<NewsDetailItem> items) {\n\n Pattern pText = Pattern.compile(ITEM_TEXT_PREF + \".*?\" + ITEM_TEXT_POSTF);\n Pattern pTitle = Pattern.compile(TITLE_PREF + \".*?\" + TITLE_POSTF);\n Pattern pDate = Pattern.compile(\"class=\\\"metadata\\\">.*?</a>\");\n Pattern pDate2 = Pattern.compile(\"</strong>.*?<\");\n\n Pattern pImage2 = Pattern.compile(IMG_PREF + \".*?\" + IMG_POSTF);\n\n Pattern pVideo = Pattern.compile(VIDEO_PREF + \".*?\" + VIDEO_POSTF);\n\n Pattern pImageUrl = Pattern.compile(IMG_URL_PREF + \".*?\" + IMG_URL_POSTF);\n\n Pattern pComment = Pattern.compile(\"li class=\\\" item\\\" id=\\\"comment.*?</li>\");\n Pattern pAuthor = Pattern.compile(\"class=\\\"commentauthor\\\".*?</span>\");\n\n Pattern pAuthorName1 = Pattern.compile(\"'>.*?</span>\");\n Pattern pAuthorName2 = Pattern.compile(\"/>.*?</span>\");\n Pattern pAuthorImage = Pattern.compile(AUTHOR_IMAGE_PREF + \".*?\" + AUTHOR_IMAGE_POSTF);\n\n Pattern pCommentText = Pattern.compile(\"<span id=\\\"co_.*?</li>\");\n Pattern pCommentId = Pattern.compile(COMMENT_ID_PREFIX + \".*?\" + COMMENT_ID_POSTFIX);\n\n Pattern pCommentTex2t = Pattern.compile(\"dislike-counter.*?comment-toolbar\"); //Pattern.compile(COMMENT_PREFIX + \".*?\" + COMMENT_POSTFIX);\n Pattern pCommentText3 = Pattern.compile(COMMENT_PREFIX + \".*?\" + COMMENT_POSTFIX);\n Pattern pThumbsDown = Pattern.compile(\"dislike-counter-comment.*?</span>\");\n Pattern pThumbsUp = Pattern.compile(\"like-counter-comment.*?</span>\");\n Pattern pThumb2 = Pattern.compile(THUMB_PREF + \".*?\" + THUMB_POSTF);\n\n Pattern pCommentDate = Pattern.compile(COMMENTDATE_PREF + \".*?\" + COMMENTDATE_POSTF);\n Pattern pWidth = Pattern.compile(WIDTH_PREF + \".*?\" + WIDTH_POSTF);\n Pattern pHeight = Pattern.compile(HEIGHT_PREF + \".*?\" + HEIGHT_POSTF);\n\n Pattern pAkismet = Pattern.compile(\"vortex_ajax_comment\"+\".*?\"+\";\");\n\n Pattern pAkismet2 = Pattern\n .compile(\"\\\"nonce\\\":\\\".*?\"+\"\\\"\");\n\n Pattern pValue = Pattern.compile(\"value=\\\".*?\\\"\");\n\n Pattern pAk_js = Pattern\n .compile(\"id=\\\"ak_js\\\".*?/>\");\n\n\n String akismet = \"\";\n String ak_js = \"\";\n String postId = \"\";\n Matcher makismet_comment = pAkismet.matcher(response);\n if (makismet_comment.find()) {\n Matcher mvalue = pAkismet2.matcher(makismet_comment.group());\n if (mvalue.find()) {\n akismet = mvalue.group();\n akismet = akismet.replace(\"\\\"\", \"\");\n akismet = akismet.replace(\"nonce:\", \"\");\n }\n }\n\n Matcher mak_js = pAk_js.matcher(response);\n if (mak_js.find()) {\n Matcher mvalue = pValue.matcher(mak_js.group());\n if (mvalue.find()) {\n ak_js = mvalue.group();\n ak_js = ak_js.replace(\"\\\"\", \"\");\n ak_js = ak_js.replace(\"value=\", \"\");\n }\n }\n\n\n Pattern ppost_id = Pattern.compile(\"name=\\\"comment_post_ID\\\".*?/>\");\n Matcher mpost_id = ppost_id.matcher(response);\n if (mpost_id.find()) {\n Matcher mvalue = pValue.matcher(mpost_id.group());\n if (mvalue.find()) {\n postId = mvalue.group();\n postId = postId.replace(\"\\\"\", \"\");\n postId = postId.replace(\"value=\", \"\");\n }\n }\n\n Matcher itemMatcher;\n itemMatcher = pDate.matcher(response);\n String date = \"\";\n if (itemMatcher.find()) {\n itemMatcher = pDate2.matcher(itemMatcher.group());\n if (itemMatcher.find()) {\n date = itemMatcher.group().substring(10);\n date = date.substring(0, date.length() - 2);\n }\n }\n\n Matcher mTitle = pTitle.matcher(response);\n if (mTitle.find()) {\n String itemText = mTitle.group().substring(TITLE_PREF.length()); //(\" dc:title=\\\"\".length()).replace(\"\\\"\", \"\");\n itemText = itemText.substring(0, itemText.length() - TITLE_POSTF.length());\n NewsDetailItem item = new NewsDetailItem();\n item.setText(itemText);\n item.setDate(date);\n item.setContentType(NewsDetailDBHelper.NewsItemType.TITLE.ordinal());\n item.setPostUrl(mUrl);\n item.setCommentId(postId);\n item.setAkismet(akismet);\n item.setAk_js(ak_js);\n items.add(item);\n }\n\n Matcher mText = pText.matcher(response);\n int imageEnd = 0;\n int textStart;\n\n if (mText.find()) {\n String text = mText.group().substring(ITEM_TEXT_PREF.length());\n text = text.substring(0, text.length() - ITEM_TEXT_POSTF.length());\n Matcher mImage = pImage2.matcher(text);\n while (mImage.find()) {\n int textEnd = mImage.start();\n textStart = imageEnd;\n imageEnd = mImage.end();\n String itemText = text.substring(textStart, textEnd);\n addTextItem(items, itemText);\n processImageItem(items, mImage.group(), pImageUrl, pWidth, pHeight);\n }\n\n Matcher mVideo = pVideo.matcher(text);\n while (mVideo.find()) {\n int textEnd = mVideo.start();\n textStart = imageEnd;\n imageEnd = mVideo.end();\n String itemText = \"\";\n if (textEnd >= textStart) {\n itemText = text.substring(textStart, textEnd);\n }\n addTextItem(items, itemText);\n processVideoItem(items, mVideo.group(), pImageUrl, pWidth, pHeight);\n }\n\n text = text.substring(imageEnd);\n addTextItem(items, text);\n }\n\n\n NewsDetailItem item = new NewsDetailItem();\n item.setContentType(NewsDetailDBHelper.NewsItemType.REPLY_HEADER.ordinal());\n item.setPostUrl(mUrl);\n items.add(item);\n\n Matcher mComment = pComment.matcher(response);\n while (mComment.find()) {\n item = new NewsDetailItem();\n item.setContentType(NewsDetailDBHelper.NewsItemType.REPLY.ordinal());\n item.setPostUrl(mUrl);\n items.add(item);\n item.setAkismet(akismet);\n String comment = mComment.group();\n\n // if (comment.contains(CAN_CHANGE_KARMA_PREFIX)) {\n item.setCanChangeKarma(1);\n // } else {\n // item.setCanChangeKarma(0);\n // }\n\n Matcher mAuthor = pAuthor.matcher(comment);\n if (mAuthor.find()) {\n String authorText = mAuthor.group();\n item.setAuthorImage(getAuthorImgage(authorText, pAuthorImage));\n item.setAuthor(getAuthorName(authorText, pAuthorName1, pAuthorName2));\n }\n Matcher mCommentText = pCommentText.matcher(comment);\n if (mCommentText.find()) {\n String s = mCommentText.group();\n mCommentText = pCommentTex2t.matcher(s);\n if (mCommentText.find()) {\n mCommentText = pCommentText3.matcher(mCommentText.group());\n if (mCommentText.find()) {\n String commentText = mCommentText.group().substring(COMMENT_PREFIX.length());\n commentText = commentText.substring(0, commentText.length() - COMMENT_POSTFIX.length());\n commentText = commentText.replace(\"<p>\", \"\");\n commentText = commentText.replace(\"</p>\", \"\");\n item.setText(commentText);\n }\n }\n }\n Matcher mCommentId = pCommentId.matcher(comment);\n if (mCommentId.find()) {\n String commentId = mCommentId.group().substring(COMMENTDATE_PREF.length());\n commentId = commentId.substring(0, commentId.length() - COMMENT_ID_POSTFIX.length());\n item.setCommentId(commentId);\n }\n Matcher mCommentDate = pCommentDate.matcher(comment);\n if (mCommentDate.find()) {\n String commentDate = mCommentDate.group().substring(COMMENTDATE_PREF.length());\n commentDate = commentDate.substring(0, commentDate.length() - COMMENTDATE_POSTF.length());\n item.setDate(commentDate);\n }\n item.setKarmaUp(getKarma(comment, pThumbsUp, pThumb2));\n item.setkarmaDown(getKarma(comment, pThumbsDown, pThumb2));\n }\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp)\n throws IOException {\n resp.setStatus(204);\n\n SyndFeed feed = Feeds.parseFeed(req.getInputStream());\n if (feed == null) {\n return;\n }\n \n List<SyndEntry> entries = feed.getEntries();\n \n if (entries.isEmpty()) {\n return;\n } \n \n JID user = new JID(req.getPathInfo().substring(1));\n // TODO(mihaip): this is potentially incorrect if a feed gets redirected and\n // its self URL changes since the time the subscription was created\n List<URL> feedUrls = Feeds.getLinkUrl(feed, Feeds.SELF_RELATION); \n if (!feedUrls.isEmpty()) {\n URL feedUrl = feedUrls.get(0);\n List<Subscription> subscriptions =\n Subscription.getSubscriptionsForUserAndFeedUrl(user, feedUrl);\n \n if (!subscriptions.isEmpty()) {\n final Subscription subscription = subscriptions.get(0);\n Set<String> seenEntryIds = subscription.getSeenEntryIds();\n List<String> newEntryIds = Lists.newArrayList();\n List<SyndEntry> filteredEntries = Lists.newArrayList();\n for (SyndEntry entry : entries) {\n String entryId = Feeds.getEntryId(entry);\n if (seenEntryIds.contains(entryId)) {\n logger.info(\"Filtering out already seen entry from \" + feedUrl);\n continue;\n }\n filteredEntries.add(entry);\n newEntryIds.add(entryId);\n }\n \n if (!filteredEntries.isEmpty()) {\n subscription.addSeenEntryIds(newEntryIds);\n Persistence.withManager(new Persistence.Closure() {\n @Override public void run(PersistenceManager manager) {\n manager.makePersistent(subscription);\n }\n });\n } else {\n return;\n }\n \n entries = filteredEntries;\n } else {\n logger.warning(\"Got notification for feed without subscription \" + feedUrl);\n }\n }\n \n \n // If subscribing to a previously unseen URL, the hub might report a bunch\n // of entries as new, so we sort them by published date and only show the\n // first few\n Collections.sort(entries, new Comparator<SyndEntry>() {\n @Override public int compare(SyndEntry o1, SyndEntry o2) {\n if (o1.getPublishedDate() == null) {\n return 1;\n }\n if (o2.getPublishedDate() == null) {\n return -1;\n }\n return o2.getPublishedDate().compareTo(o1.getPublishedDate());\n }\n });\n \n List<SyndEntry> displayEntries;\n if (entries.size() > MAX_ENTRIES_TO_DISPLAY) {\n displayEntries = entries.subList(0, MAX_ENTRIES_TO_DISPLAY);\n } else {\n displayEntries = entries;\n }\n \n StringBuilder message = new StringBuilder(\"Update from \")\n .append(StringEscapeUtils.unescapeHtml4(feed.getTitle())).append(\":\");\n for (SyndEntry displayEntry : displayEntries) {\n String title = displayEntry.getTitle();\n if (Strings.isNullOrEmpty(title)) {\n title = \"(title unknown)\";\n } else {\n title = StringEscapeUtils.unescapeHtml4(title);\n }\n String link = displayEntry.getLink();\n if (Strings.isNullOrEmpty(link)) {\n link = \"<no link>\";\n }\n \n message.append(\"\\n \").append(title).append(\": \").append(link);\n }\n \n if (displayEntries.size() != entries.size()) {\n message.append(\"\\n (and \")\n .append(entries.size() - displayEntries.size()).append(\" more)\");\n }\n \n Xmpp.sendMessage(user, message.toString());\n }", "private void publishFeedDialog(String url, String description) {\n Bundle params = new Bundle();\n params.putString(\"description\", description);\n params.putString(\"link\", url);\n\n WebDialog feedDialog = (\n new WebDialog.FeedDialogBuilder(this,\n Session.getActiveSession(),\n params))\n .setOnCompleteListener(new WebDialog.OnCompleteListener() {\n\n @Override\n public void onComplete(Bundle values,\n FacebookException error) {\n if (error == null) {\n // When the story is posted, echo the success\n // and the post Id.\n final String postId = values.getString(\"post_id\");\n if (postId != null) {\n Toast.makeText(getApplicationContext(),\n \"Posted story, id: \" + postId,\n Toast.LENGTH_SHORT).show();\n } else {\n // User clicked the Cancel button\n Toast.makeText(getApplicationContext(),\n \"Publish cancelled\",\n Toast.LENGTH_SHORT).show();\n }\n } else if (error instanceof FacebookOperationCanceledException) {\n // User clicked the \"x\" button\n Toast.makeText(getApplicationContext(),\n \"Publish cancelled\",\n Toast.LENGTH_SHORT).show();\n } else {\n // Generic, ex: network error\n Toast.makeText(getApplicationContext(),\n \"Error posting story\",\n Toast.LENGTH_SHORT).show();\n }\n }\n\n })\n .build();\n feedDialog.show();\n }", "public Feed getFeed() throws Exception {\n final Reference feedRef = getHref();\n\n if (feedRef.isRelative()) {\n feedRef.setBaseRef(getWorkspace().getService().getReference());\n }\n\n final Request request = new Request(Method.GET, feedRef.getTargetRef());\n final Response response = getWorkspace().getService()\n .getClientDispatcher().handle(request);\n\n if (response.getStatus().equals(Status.SUCCESS_OK)) {\n return new Feed(response.getEntity());\n } else {\n throw new Exception(\n \"Couldn't get the feed representation. Status returned: \"\n + response.getStatus().getDescription());\n }\n }" ]
[ "0.72400355", "0.65984285", "0.6417274", "0.6312018", "0.605366", "0.60276484", "0.6010645", "0.59743285", "0.59718835", "0.5971718", "0.5766475", "0.5747382", "0.56833476", "0.567205", "0.559674", "0.5594811", "0.55581015", "0.5556525", "0.5537622", "0.5533927", "0.5529045", "0.55268645", "0.5513156", "0.5486165", "0.5469153", "0.5449405", "0.5449405", "0.5432089", "0.5422213", "0.5404735", "0.54005474", "0.5396927", "0.5386573", "0.53843755", "0.53827703", "0.5381792", "0.5341332", "0.5295082", "0.52709585", "0.526793", "0.52414584", "0.5239656", "0.5238527", "0.52384794", "0.5236403", "0.5230093", "0.5225907", "0.5215943", "0.52037776", "0.5189723", "0.5188516", "0.5184093", "0.51668024", "0.5159564", "0.5150251", "0.5135755", "0.51213676", "0.51138884", "0.5104082", "0.5081342", "0.50614905", "0.504732", "0.5026563", "0.5012392", "0.50110674", "0.50032806", "0.499692", "0.49956122", "0.49817666", "0.49697927", "0.49643555", "0.4961116", "0.49584404", "0.49561024", "0.49131128", "0.49025244", "0.48991024", "0.48934633", "0.48815468", "0.48565155", "0.4854684", "0.4853877", "0.4847134", "0.48351502", "0.48249212", "0.4815013", "0.48016807", "0.48010325", "0.4788459", "0.4788459", "0.47871003", "0.47735023", "0.47691494", "0.47644454", "0.4762267", "0.4759265", "0.47528288", "0.47462395", "0.47419894", "0.47300565" ]
0.6618536
1
Processes Atom feeds given a list of feed URLs
public static void processFeeds(List<FeedContext> fcs) { for (FeedContext fc : fcs) { try { processFeed(fc); } catch (Exception e) { mLog.error("Skipping feed at URL [" + fc.getFeedUrl() + "] due to error while processing: " + e,e); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<SyndFeed> getRssFeeds(Set<String> feedUrls) throws FeedException, IOException,\n FetcherException;", "public static void processFeed(FeedContext fc) {\n\n String feedUrl = fc.getFeedUrl();\n mLog.info(\"Processing Atom feed at URL: \" + feedUrl);\n\n try {\n AbderaAtomParser atomParser = new AbderaAtomParser(new URL(feedUrl));\n atomParser.persistFeed(fc);\n\n mLog.info(\"Finished processing Atom feed at URL \" + feedUrl);\n }\n catch (MalformedURLException url_e) {\n mLog.error(\"MalformedURL found for \" + fc.getFeedUrl());\n }\n catch (ArrayIndexOutOfBoundsException a) {\n // this happens if the feed is empty (typically an activity stream),\n // need a better way to track this though\n \tmLog.warn(\"Feed at URL [\" + feedUrl + \"] is probably empty, but this \" +\n \t\t\t\"exception should have been prevented.\");\n }\n catch (Exception e) {\n mLog.error(\"Error processing feed at [\" + fc.getFeedUrl() + \"]: \" + e.getMessage());\n }\n catch (Throwable t) {\n mLog.error(\"Error processing feed at [\" + fc.getFeedUrl() + \"]: \" + t.getMessage());\n }\n }", "public List<LinkDetails> scrapeRSSPageForLinks(String rssUrl) {\n\t\tString description = \"\";\n\t\tString title = \"\";\n\t\tString link = \"\";\n\t\tString pubdate = \"\";\n\t\tURL url;\n\t\tInputStream in;\n\n\t\tList<LinkDetails> rssProcessedData = new ArrayList<LinkDetails>();\n\n\t\ttry {\n\t\t\turl = new URL(rssUrl);\n\t\t} catch (MalformedURLException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t\ttry {\n\t\t\tin = url.openStream();\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t\t// create XML input factory\n\t\tXMLInputFactory inputFactory = XMLInputFactory.newInstance();\n\n\t\t// read the XML document\n\t\ttry {\n\n\t\t\tXMLEventReader eventReader = inputFactory.createXMLEventReader(in);\n\n\t\t\tboolean isFeedHeader = true;\n\t\t\twhile (eventReader.hasNext()) {\n\t\t\t\tXMLEvent event = eventReader.nextEvent();\n\t\t\t\tif (event.isStartElement()) {\n\t\t\t\t\tString localPart = event.asStartElement().getName().getLocalPart();\n\n\t\t\t\t\t// System.out.println(localPart);\n\n\t\t\t\t\tswitch (localPart) {\n\n\t\t\t\t\tcase \"item\":\n\t\t\t\t\t\t// if (isFeedHeader) {\n\t\t\t\t\t\t// isFeedHeader = false;\n\t\t\t\t\t\t// System.out.println(\" title: \"+title+ \" description: \"+ description + \" link:\n\t\t\t\t\t\t// \"+link+\" pubDate: \"+pubdate);\n\t\t\t\t\t\t// }\n\t\t\t\t\t\tevent = eventReader.nextEvent();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"title\":\n\t\t\t\t\t\ttitle = getCharacterData(event, eventReader);\n\t\t\t\t\t\t// System.out.println(\"title: \"+title);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"description\":\n\t\t\t\t\t\tdescription = getCharacterData(event, eventReader);\n\t\t\t\t\t\t// System.out.println(\"description: \"+description);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"link\":\n\t\t\t\t\t\tlink = getCharacterData(event, eventReader);\n\t\t\t\t\t\tSystem.out.println(\"link: \" + link);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"pubDate\":\n\t\t\t\t\t\tpubdate = getCharacterData(event, eventReader);\n\t\t\t\t\t\t// System.out.println(\"pubDate: \"+pubdate);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\t\t\t\t} else if (event.isEndElement()) {\n\t\t\t\t\tif (event.asEndElement().getName().getLocalPart() == (\"item\")) {\n\n\t\t\t\t\t\tLinkDetails linkDetails = new LinkDetails(link, title, description, pubdate);\n\t\t\t\t\t\trssProcessedData.add(linkDetails);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (XMLStreamException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t\treturn rssProcessedData;\n\t}", "public void PopulateRSSData()\n {\n try\n {\n URL Feed = ParseRSSFromFeed();\n ParseRSS(Feed);\n }\n catch(java.net.MalformedURLException exp)\n {\n String message = exp.getMessage();\n System.out.println(message);\n }\n catch(com.rometools.rome.io.FeedException fexp)\n {\n String message = fexp.getMessage();\n System.out.println(message);\n }\n catch(java.io.IOException ioexp)\n {\n String message = ioexp.getMessage();\n System.out.println(message);\n }\n }", "public static void processFeed(String feedUrl) throws Exception {\n processFeed(new FeedContext(feedUrl));\n }", "void handle(List<FeedEntry> feedEntryBatch);", "private void handleEntries(List<SyndEntry> entries, FeedItemHandler handler, Date cacheExpiryDate, ExecutorService executor) throws IOException, InterruptedException, ExecutionException {\n\t\tSet<FeedItem> newItems = new HashSet<>();\n\t\tfor (SyndEntry entry : entries)\n\t\t\tnewItems.add(new FeedItem(this, entry));\n\n\t\t//Find outdated items\n\t\tfor (FeedItem oldItem : new HashSet<>(items))\n\t\t\tif (!newItems.contains(oldItem) && oldItem.getLastSeen() != null && oldItem.getLastSeen().before(cacheExpiryDate)) {\n\t\t\t\t//Item expired\n\t\t\t\titems.remove(oldItem);\n\t\t\t} else if (newItems.contains(oldItem)) {\n\t\t\t\tfor (FeedItem newItem : newItems)\n\t\t\t\t\tif (newItem.equals(oldItem))\n\t\t\t\t\t\tnewItem.setState(oldItem.getState());//Transfer state to new item\n\t\t\t\tif (oldItem.getState() != FeedItem.State.SENT_PDF)\n\t\t\t\t\titems.remove(oldItem);//Replace with new item to resend pdf\n\t\t\t\telse\n\t\t\t\t\toldItem.updateLastSeen();\n\t\t\t}\n\n\t\t// Ignore already existing items\n\t\tnewItems.removeAll(items);\n\n\t\t//Add new items\n\t\titems.addAll(newItems);\n\n\t\tList<Future<?>> futures = new ArrayList<>();\n\t\tfor (FeedItem item : newItems) {\n\t\t\tFuture<?> future = executor.submit(new Runnable() {\n\t\t\t\tprivate FeedItemHandler handler;\n\t\t\t\tprivate Feed feed;\n\t\t\t\tprivate FeedItem item;\n\n\t\t\t\tpublic Runnable setParameters(FeedItemHandler handler, Feed feed, FeedItem item) {\n\t\t\t\t\tthis.handler = handler;\n\t\t\t\t\tthis.feed = feed;\n\t\t\t\t\tthis.item = item;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\thandler.handle(feed, item);\n\t\t\t\t\t} catch (RuntimeException ex) {\n\t\t\t\t\t\tlog.error(MessageFormat.format(messages.getString(\"ERROR_HANDLING_FEED_ITEM\"), new Object[]{item}), ex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}.setParameters(handler, this, item));\n\t\t\tfutures.add(future);\n\t\t}\n\t\tfor (Future future : futures)\n\t\t\tfuture.get();\n\t}", "private void processUrls(){\n // Strip quoted tweet URL\n if(quotedTweetId > 0){\n if(entities.urls.size() > 0 &&\n entities.urls.get(entities.urls.size() - 1)\n .expandedUrl.endsWith(\"/status/\" + String.valueOf(quotedTweetId))){\n // Match! Remove that bastard.\n entities.urls.remove(entities.urls.size() - 1);\n }\n }\n\n // Replace minified URLs\n for(Entities.UrlEntity entity : entities.urls){\n // Find the starting index for this URL\n entity.indexStart = text.indexOf(entity.minifiedUrl);\n // Replace text\n text = text.replace(entity.minifiedUrl, entity.displayUrl);\n // Find the last index for this URL\n entity.indexEnd = entity.indexStart + entity.displayUrl.length();\n }\n }", "public void refreshAllRssFeeds()\n {\n Vector rssContactList = new Vector();\n rssContactList = opSetPersPresence.getContactListRoot().\n getRssURLList(rssContactList);\n Iterator rssContact = rssContactList.iterator();\n while(rssContact.hasNext())\n {\n ContactRssImpl contact = (ContactRssImpl)rssContact.next();\n try\n {\n \n submitRssQuery(contact, false);\n }\n catch (Exception ex)\n {\n logger.error(\"Failed to refresh feed for \" + contact, ex);\n }\n }\n }", "public interface RssFetcherService {\n\n /**\n * Returns a list of SyndFeed generated by an array of feed urls.\n *\n * @param feedUrls set of rss feed urls\n * @return a list of Rome SyndFeeds generated by the list of urls\n * @throws IOException an I/O exception has occurred\n * @throws FeedException an Feed exception has occurred\n * @throws FetcherException an FetcherException has occurred\n */\n List<SyndFeed> getRssFeeds(Set<String> feedUrls) throws FeedException, IOException,\n FetcherException;\n\n List<Map<String, String>> getAllInformationFromLatestFeed();\n}", "public DocumentListFeed getAllFeeds() throws MalformedURLException, IOException, ServiceException;", "public static void processFeed(FeedContext fc, Feed feed) {\n try {\n\t\t\tAbderaAtomParser parser = new AbderaAtomParser(feed);\n\t\t\tparser.persistFeed(fc);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tmLog.error(\"Error processing feed at [\" + fc.getFeedUrl() + \"]: \" + e.getMessage());\n\t\t}\n }", "void onContentChanged(@Nullable List<FeedContent> feedContents);", "public URL ParseRSSFromFeed() throws java.net.MalformedURLException\n {\n URL feedUrl = new URL(Src_URL);\n return feedUrl;\n }", "public void addRss(final String url, final String outputFileName, final Long pollPeriod, final Long itemsAmount,\n final List<String> parameters) {\n try {\n if (isNotValidRss(url)) {\n System.out.println(\"Rss is not valid.\");\n return;\n }\n RssConfiguration configuration = PropertiesHandler.createNewRssConfiguration(url, outputFileName, pollPeriod, itemsAmount, parameters);\n ParseFeedTask task = new ParseFeedTask(configuration);\n ScheduledFuture future = scheduledExecutorService.scheduleWithFixedDelay(task, configuration.getPollPeriod(), configuration.getPollPeriod(), TimeUnit.SECONDS);\n futures.put(url, future);\n tasks.put(url, task);\n } catch (IOException e) {\n System.out.println(String.format(\"An error occurred during the adding feed %s\", url));\n } catch (FeedException e) {\n System.out.println(String.format(\"Sorry, but feed %s is not valid.\", url));\n }\n }", "private String getURL(String feedUrl) {\n\tStringBuilder sb = null;\n\ttry {\n for(int i = 3; i>0; i--) {\n\t sb = new StringBuilder();\n URL url = new URL(feedUrl);\n\tHttpURLConnection uc = (HttpURLConnection) url.openConnection();\n\tuc.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22 GTB7.1 ( .NET CLR 3.5.30729)\");\n\tuc.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\");\n\tuc.setRequestProperty(\"Accept-Language\", \"en-us,en;q=0.5\");\n\tuc.setRequestProperty(\"Accept-Encoding\", \"gzip,deflate\");\n\tuc.setRequestProperty(\"Accept-Charset\", \"ISO-8859-1,utf-8;q=0.7,*;q=0.7\");\n\tuc.setRequestProperty(\"Keep-Alive\", \"115\");\n\tuc.setRequestProperty(\"Connection\", \"keep-alive\");\n\tuc.setDoOutput(true);\n\tuc.setDoInput(true);\n\tuc.setUseCaches(false);\n\tuc.setRequestMethod(\"POST\");\n\tuc.setRequestProperty(\"Content-Type\", \"text/xml\");\n\t\n\tBufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));//uc.getInputStream()\n\tString inputLine;\n\tboolean refreshAgain = false;\n\twhile ((inputLine = in.readLine()) != null) {\n\t\tsb.append(inputLine);\n\t\tif( inputLine.contains(\"Refresh\") ) {\n\t\t\trefreshAgain = true;\n\t\t\tSystem.out.println(\"Refresh\");\n\t\t}\n\t}\n\tin.close();\n\tuc.disconnect();\t\t\n//\tRefresh\n\tif( refreshAgain ) {\n\t Thread.sleep(1000);\n\t}\n\telse break;\n }\n }catch(Exception ee){}\nreturn sb.toString();\n}", "private void parseJsonFeed(JSONObject response) {\n try {\n JSONArray feedArray = response.getJSONArray(\"feed\");\n\n for (int i = 0; i < feedArray.length(); i++) {\n JSONObject feedObj = (JSONObject) feedArray.get(i);\n\n FeedItem item = new FeedItem();\n item.setId(feedObj.getInt(\"organisation_id\"));\n item.setPortId(feedObj.getInt(\"portfolio_id\"));\n item.setName(feedObj.getString(\"name\"));\n //int id=item.getId();\n // Image might be null sometimes\n String image = feedObj.isNull(\"image\") ? null : feedObj.getString(\"image\");\n item.setImge(image);\n item.setStatus(feedObj.getString(\"status\"));\n item.setProfilePic(feedObj.getString(\"profilePic\"));\n item.setTimeStamp(feedObj.getString(\"timeStamp\"));\n item.setCommentCount(feedObj.getString(\"commentCount\"));\n\n // url might be null sometimes\n String feedUrl = feedObj.isNull(\"url\") ? null : feedObj.getString(\"url\");\n item.setUrl(feedUrl);\n\n feedItems.add(item);\n }\n\n\n // notify data changes to list adapater\n listAdapter.notifyDataSetChanged();\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public void addFeedIntoFolder(String feedURL, String name);", "public void ParseRSS(URL feedUrl) throws com.rometools.rome.io.FeedException, java.io.IOException {\n //TODO: EVERY THING HERE SHOULD BE IN A TRANSACTION\n List<String> HashFields = new ArrayList<>();\n SyndFeedInput input = new SyndFeedInput();\n SyndFeed feed = input.build(new XmlReader(feedUrl));\n RSSChannelElements ChannelElements = new RSSChannelElements();\n Date CurrentDate = new Date();\n SimpleDateFormat SDF = new java.text.SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n //GET ADDITIONAL PROPERTIES OF THE CHANNEL\n //GET CHANNEL AUTHOR\n String ch_author = feed.getAuthor();\n ChannelElements.Author = ch_author;\n //GET PUBLISHED DATE\n Date ch_PubDate = feed.getPublishedDate();\n ChannelElements.PublishedDate = ch_PubDate;\n //GET LANGUAGE\n String ch_Language = feed.getLanguage();\n ChannelElements.Language = ch_Language;\n //GET WEBMASTER\n String ch_WebMaster = feed.getWebMaster();\n ChannelElements.webMaster = ch_WebMaster;\n //GET MANAGING EDITOR\n String ch_ME = feed.getManagingEditor();\n ChannelElements.managingEditor = ch_ME;\n //GET GENERATOR\n String ch_generator = feed.getGenerator();\n ChannelElements.Generator = ch_generator;\n //GET DESCRIPTION\n String ch_description = feed.getDescription();\n ChannelElements.Description = ch_description;\n int CurrentChannelID = 0;\n //TODO: DO THIS IN A STORED PROCEDURE\n try\n {\n TimeValidations ValidateTime = new TimeValidations();\n if (ValidateTime.IsWithinValidWindow(CurrentDate, ch_PubDate, ReadInterval))\n {\n //INSERT TO DB THE CHANNEL DETAILS\n CurrentChannelID = InsertChannelDetails(ChannelElements);\n }\n }\n catch(java.sql.SQLException exp)\n {\n String message = exp.getMessage();\n System.out.println(message);\n }\n\n\n //GET ELEMENTS FROM THE \"ITEMS\"\n List entries = feed.getEntries();\n Iterator it = entries.iterator();\n while (it.hasNext()) {\n RSSFields RssFieldValues = new RSSFields();\n SyndEntry entry = (SyndEntry) it.next();\n //GET TITLE\n System.out.println(entry.getTitle());\n String Title = entry.getTitle();\n RssFieldValues.Title = Title;\n //HashFields.add(Title);\n //GET LINK\n System.out.println(entry.getLink());\n RssFieldValues.Link = entry.getLink();\n HashFields.add(RssFieldValues.Link);\n //GET DESCRIPTION\n SyndContent description = entry.getDescription();\n System.out.println(description.getValue());\n RssFieldValues.Description = description.getValue();\n //HashFields.add(description.getValue());\n //GET PUBLISHED DATE\n Date Pub_Date = entry.getPublishedDate();\n System.out.println(SDF.format(Pub_Date));\n RssFieldValues.PublishedDate = entry.getPublishedDate();\n //GET UPDATED DATE\n Date U_date = entry.getUpdatedDate();\n System.out.println(U_date);\n RssFieldValues.UpdatedDate = entry.getPublishedDate();\n //GET AUTHOR\n String Author = entry.getAuthor();\n RssFieldValues.Author = Author;\n System.out.println(Author);\n //GET COMMENTS;\n String Comments = entry.getComments();\n RssFieldValues.Comments = Comments;\n System.out.println();\n try {\n //org.joda.time.Period P = new org.joda.time.Period(Pub_Date, CurrentDate);\n //if(SDF.parse(Pub_Date.toString()) == SDF.parse(CurrentDate.toString()))\n //org.joda.time.Period p = new org.joda.time.Period(CurrentDate, Pub_Date);\n //ONLY INSERT IF THE FEED IS WITHIN THE SPECIFIED PERIOD\n TimeValidations ValidateTime = new TimeValidations();\n if (ValidateTime.IsWithinValidWindow(CurrentDate, U_date, ReadInterval))\n {\n //INSERT NEWS SPECIFIC VALUES TO DB\n HashGenerator Gen = new HashGenerator();\n RssFieldValues.ComputedHash = Gen.HashCalculator(HashFields);\n InsertToDB(RssFieldValues, CurrentChannelID);\n }\n } catch (java.sql.SQLException ex) {\n String message = ex.getMessage();\n System.out.println(message);\n }\n }\n // System.out.println(feed);\n }", "@Override\n public String processJournals(List<String> journalUrls) {\n List<String> finalData = new LinkedList<>();\n ExecutorService executorService = Executors.newFixedThreadPool(10);\n// UminExtractJournalMetadata uminExtractJournalMetadata = new UminExtractJournalMetadata();\n for (String journalUrl : journalUrls) {\n// Runnable uminExtractJournalMetadata = new UminExtractJournalMetadata();\n// ((UminExtractJournalMetadata)uminExtractJournalMetadata).setJournalUrl(journalUrl);\n// ((UminExtractJournalMetadata)uminExtractJournalMetadata).setFinalData(finalData);\n// executorService.execute(uminExtractJournalMetadata);\n UminExtractJournalMetadata uminExtractJournalMetadata = new UminExtractJournalMetadata();\n uminExtractJournalMetadata.setJournalUrl(journalUrl);\n uminExtractJournalMetadata.setFinalData(finalData);\n uminExtractJournalMetadata.getJournalMetadata();\n// String contents = uminExtractJournalMetadata.getJournalMetadata();\n// addEmailToQueue(contents);\n//\t\t\tString contents = getJournalMetadata(journalUrl);\n// if (contents.indexOf(\"@\") == -1)\n// continue;\n//\t\t\tSystem.out.println(\"contents: \" + contents);\n// fData = fData + contents;\n }\n executorService.shutdown();\n while (!executorService.isTerminated()){}\n// addEmailToQueue(\"Processing done for: \" + url);\n String fData = String.join(\"\\n\", finalData);\n return fData;\n }", "public AtomFeed(String feedURL) throws ParserConfigurationException, IOException\r\n\t{\r\n\t\tthis.feedURL = feedURL;\r\n\t\txml = null;\r\n\t\tdocumentbuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\r\n\t\tif (!refresh()) throw new IOException();\r\n\t}", "@Override\n protected String doInBackground(String... urls) {\n String response = \"\";\n HttpURLConnection urlConnection = null;\n for (String url : urls) {\n try {\n URL urlObject = new URL(url);\n urlConnection = (HttpURLConnection) urlObject.openConnection();\n\n InputStream content = urlConnection.getInputStream();\n\n BufferedReader buffer = new BufferedReader(new InputStreamReader(content));\n String s = \"\";\n while ((s = buffer.readLine()) != null) {\n response += s;\n }\n\n } catch (Exception e) {\n response = \"Unable to download the list of posts, Reason: \"\n + e.getMessage();\n }\n finally {\n if (urlConnection != null)\n urlConnection.disconnect();\n }\n }\n return response;\n\n }", "private static void processFeed(String url, String file, SimpleWriter out) \n {\n \tXMLTree rss = new XMLTree1(url);\n \t\n \t// make sure the rss tree is a valid rss tree\n if(!ensureValidRSSTree(rss, out))\n {\n \tout.println(\"This is not a valid RSS Tree.\");\n \treturn;\n }\n \n // print entire document to file\n outputHeader(rss.child(0), out);\n outputFooter(out);\n \n }", "public void feeds(Parameters parameters, final onSuccessCallback callback){\n getJSONArray(parameters.buildQuery(Endpoint.FEEDS), new onSuccessCallback() {\n @Override\n public void onSuccess(JSONArray result) {\n callback.onSuccess(result);\n }\n\n @Override\n public void onError(VolleyError error) {\n callback.onError(error);\n }\n });\n }", "public static ArrayList<Map<String,String>> getContFromRssNoHtml(String urlAdress) {\n\n URL url = null;\n Iterator itEntries = null;\n try {\n //thetume ton browser Agent se browser-like gia na apofigume 403 errors\n System.setProperty(\"http.agent\", \"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0\");\n url = new URL(urlAdress);\n HttpURLConnection httpcon = (HttpURLConnection) url.openConnection();\n httpcon.setRequestProperty(\"User-Agent\",\n \"Mozilla/5.0 (Windows NT 5.1; rv:19.0) Gecko/20100101 Firefox/19.0\");\n // Reading the feed\n SyndFeedInput input = new SyndFeedInput();\n SyndFeed feed = input.build(new XmlReader(httpcon));\n List entries = feed.getEntries();\n itEntries = entries.iterator();\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (FeedException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n //contAr has all the entries\n ArrayList<Map<String,String>> contAr = new ArrayList<Map<String, String>>();\n\n //contMap has all the entries contents\n Map<String,String> contMap = new HashMap<String, String>();\n contMap.put(\"URI\",urlAdress);\n\n\n while (itEntries.hasNext()) {\n contMap = new HashMap<String, String>();\n SyndEntry entry = (SyndEntry) itEntries.next();\n System.out.println(entry.getUri());\n contMap.put(\"Title\",entry.getTitle());\n contMap.put(\"Link\",entry.getLink());\n contMap.put(\"Description\",entry.getDescription().getValue());\n\n contAr.add(contMap);\n System.out.println();\n }\n return contAr;\n }", "@Override\n\t\tprotected Boolean doInBackground(Void... params) {\n\t\t\tlinklist = parseRSS();\n\t\t\treturn updateDatabase(linklist);\n\t\t}", "public void processOffers(List<OfferPublishedEvent> events) {\n }", "private void parseResponse(String response, List<NewsDetailItem> items) {\n\n Pattern pText = Pattern.compile(ITEM_TEXT_PREF + \".*?\" + ITEM_TEXT_POSTF);\n Pattern pTitle = Pattern.compile(TITLE_PREF + \".*?\" + TITLE_POSTF);\n Pattern pDate = Pattern.compile(\"class=\\\"metadata\\\">.*?</a>\");\n Pattern pDate2 = Pattern.compile(\"</strong>.*?<\");\n\n Pattern pImage2 = Pattern.compile(IMG_PREF + \".*?\" + IMG_POSTF);\n\n Pattern pVideo = Pattern.compile(VIDEO_PREF + \".*?\" + VIDEO_POSTF);\n\n Pattern pImageUrl = Pattern.compile(IMG_URL_PREF + \".*?\" + IMG_URL_POSTF);\n\n Pattern pComment = Pattern.compile(\"li class=\\\" item\\\" id=\\\"comment.*?</li>\");\n Pattern pAuthor = Pattern.compile(\"class=\\\"commentauthor\\\".*?</span>\");\n\n Pattern pAuthorName1 = Pattern.compile(\"'>.*?</span>\");\n Pattern pAuthorName2 = Pattern.compile(\"/>.*?</span>\");\n Pattern pAuthorImage = Pattern.compile(AUTHOR_IMAGE_PREF + \".*?\" + AUTHOR_IMAGE_POSTF);\n\n Pattern pCommentText = Pattern.compile(\"<span id=\\\"co_.*?</li>\");\n Pattern pCommentId = Pattern.compile(COMMENT_ID_PREFIX + \".*?\" + COMMENT_ID_POSTFIX);\n\n Pattern pCommentTex2t = Pattern.compile(\"dislike-counter.*?comment-toolbar\"); //Pattern.compile(COMMENT_PREFIX + \".*?\" + COMMENT_POSTFIX);\n Pattern pCommentText3 = Pattern.compile(COMMENT_PREFIX + \".*?\" + COMMENT_POSTFIX);\n Pattern pThumbsDown = Pattern.compile(\"dislike-counter-comment.*?</span>\");\n Pattern pThumbsUp = Pattern.compile(\"like-counter-comment.*?</span>\");\n Pattern pThumb2 = Pattern.compile(THUMB_PREF + \".*?\" + THUMB_POSTF);\n\n Pattern pCommentDate = Pattern.compile(COMMENTDATE_PREF + \".*?\" + COMMENTDATE_POSTF);\n Pattern pWidth = Pattern.compile(WIDTH_PREF + \".*?\" + WIDTH_POSTF);\n Pattern pHeight = Pattern.compile(HEIGHT_PREF + \".*?\" + HEIGHT_POSTF);\n\n Pattern pAkismet = Pattern.compile(\"vortex_ajax_comment\"+\".*?\"+\";\");\n\n Pattern pAkismet2 = Pattern\n .compile(\"\\\"nonce\\\":\\\".*?\"+\"\\\"\");\n\n Pattern pValue = Pattern.compile(\"value=\\\".*?\\\"\");\n\n Pattern pAk_js = Pattern\n .compile(\"id=\\\"ak_js\\\".*?/>\");\n\n\n String akismet = \"\";\n String ak_js = \"\";\n String postId = \"\";\n Matcher makismet_comment = pAkismet.matcher(response);\n if (makismet_comment.find()) {\n Matcher mvalue = pAkismet2.matcher(makismet_comment.group());\n if (mvalue.find()) {\n akismet = mvalue.group();\n akismet = akismet.replace(\"\\\"\", \"\");\n akismet = akismet.replace(\"nonce:\", \"\");\n }\n }\n\n Matcher mak_js = pAk_js.matcher(response);\n if (mak_js.find()) {\n Matcher mvalue = pValue.matcher(mak_js.group());\n if (mvalue.find()) {\n ak_js = mvalue.group();\n ak_js = ak_js.replace(\"\\\"\", \"\");\n ak_js = ak_js.replace(\"value=\", \"\");\n }\n }\n\n\n Pattern ppost_id = Pattern.compile(\"name=\\\"comment_post_ID\\\".*?/>\");\n Matcher mpost_id = ppost_id.matcher(response);\n if (mpost_id.find()) {\n Matcher mvalue = pValue.matcher(mpost_id.group());\n if (mvalue.find()) {\n postId = mvalue.group();\n postId = postId.replace(\"\\\"\", \"\");\n postId = postId.replace(\"value=\", \"\");\n }\n }\n\n Matcher itemMatcher;\n itemMatcher = pDate.matcher(response);\n String date = \"\";\n if (itemMatcher.find()) {\n itemMatcher = pDate2.matcher(itemMatcher.group());\n if (itemMatcher.find()) {\n date = itemMatcher.group().substring(10);\n date = date.substring(0, date.length() - 2);\n }\n }\n\n Matcher mTitle = pTitle.matcher(response);\n if (mTitle.find()) {\n String itemText = mTitle.group().substring(TITLE_PREF.length()); //(\" dc:title=\\\"\".length()).replace(\"\\\"\", \"\");\n itemText = itemText.substring(0, itemText.length() - TITLE_POSTF.length());\n NewsDetailItem item = new NewsDetailItem();\n item.setText(itemText);\n item.setDate(date);\n item.setContentType(NewsDetailDBHelper.NewsItemType.TITLE.ordinal());\n item.setPostUrl(mUrl);\n item.setCommentId(postId);\n item.setAkismet(akismet);\n item.setAk_js(ak_js);\n items.add(item);\n }\n\n Matcher mText = pText.matcher(response);\n int imageEnd = 0;\n int textStart;\n\n if (mText.find()) {\n String text = mText.group().substring(ITEM_TEXT_PREF.length());\n text = text.substring(0, text.length() - ITEM_TEXT_POSTF.length());\n Matcher mImage = pImage2.matcher(text);\n while (mImage.find()) {\n int textEnd = mImage.start();\n textStart = imageEnd;\n imageEnd = mImage.end();\n String itemText = text.substring(textStart, textEnd);\n addTextItem(items, itemText);\n processImageItem(items, mImage.group(), pImageUrl, pWidth, pHeight);\n }\n\n Matcher mVideo = pVideo.matcher(text);\n while (mVideo.find()) {\n int textEnd = mVideo.start();\n textStart = imageEnd;\n imageEnd = mVideo.end();\n String itemText = \"\";\n if (textEnd >= textStart) {\n itemText = text.substring(textStart, textEnd);\n }\n addTextItem(items, itemText);\n processVideoItem(items, mVideo.group(), pImageUrl, pWidth, pHeight);\n }\n\n text = text.substring(imageEnd);\n addTextItem(items, text);\n }\n\n\n NewsDetailItem item = new NewsDetailItem();\n item.setContentType(NewsDetailDBHelper.NewsItemType.REPLY_HEADER.ordinal());\n item.setPostUrl(mUrl);\n items.add(item);\n\n Matcher mComment = pComment.matcher(response);\n while (mComment.find()) {\n item = new NewsDetailItem();\n item.setContentType(NewsDetailDBHelper.NewsItemType.REPLY.ordinal());\n item.setPostUrl(mUrl);\n items.add(item);\n item.setAkismet(akismet);\n String comment = mComment.group();\n\n // if (comment.contains(CAN_CHANGE_KARMA_PREFIX)) {\n item.setCanChangeKarma(1);\n // } else {\n // item.setCanChangeKarma(0);\n // }\n\n Matcher mAuthor = pAuthor.matcher(comment);\n if (mAuthor.find()) {\n String authorText = mAuthor.group();\n item.setAuthorImage(getAuthorImgage(authorText, pAuthorImage));\n item.setAuthor(getAuthorName(authorText, pAuthorName1, pAuthorName2));\n }\n Matcher mCommentText = pCommentText.matcher(comment);\n if (mCommentText.find()) {\n String s = mCommentText.group();\n mCommentText = pCommentTex2t.matcher(s);\n if (mCommentText.find()) {\n mCommentText = pCommentText3.matcher(mCommentText.group());\n if (mCommentText.find()) {\n String commentText = mCommentText.group().substring(COMMENT_PREFIX.length());\n commentText = commentText.substring(0, commentText.length() - COMMENT_POSTFIX.length());\n commentText = commentText.replace(\"<p>\", \"\");\n commentText = commentText.replace(\"</p>\", \"\");\n item.setText(commentText);\n }\n }\n }\n Matcher mCommentId = pCommentId.matcher(comment);\n if (mCommentId.find()) {\n String commentId = mCommentId.group().substring(COMMENTDATE_PREF.length());\n commentId = commentId.substring(0, commentId.length() - COMMENT_ID_POSTFIX.length());\n item.setCommentId(commentId);\n }\n Matcher mCommentDate = pCommentDate.matcher(comment);\n if (mCommentDate.find()) {\n String commentDate = mCommentDate.group().substring(COMMENTDATE_PREF.length());\n commentDate = commentDate.substring(0, commentDate.length() - COMMENTDATE_POSTF.length());\n item.setDate(commentDate);\n }\n item.setKarmaUp(getKarma(comment, pThumbsUp, pThumb2));\n item.setkarmaDown(getKarma(comment, pThumbsDown, pThumb2));\n }\n }", "public void addURLSeries(List urls) {\n/* 143 */ List listToAdd = null;\n/* 144 */ if (urls != null) {\n/* 145 */ listToAdd = new ArrayList(urls);\n/* */ }\n/* 147 */ this.urlSeries.add(listToAdd);\n/* */ }", "public void openNewFeed(final String datfeed) {\n\n //close the navigation drawer\n closeDrawer();\n\n //show swipe refresh\n swiperefresh.setRefreshing(true);\n\n //detect if there's a connection issue or not: if there's a connection problem stop refreshing and show message\n if (cM.getActiveNetworkInfo() == null) {\n Toast toast = Toast.makeText(getBaseContext(), R.string.no_internet, Toast.LENGTH_SHORT);\n toast.show();\n swiperefresh.setRefreshing(false);\n\n } else {\n\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n DOMParser tmpDOMParser = new DOMParser();\n fFeed = tmpDOMParser.parseXml(datfeed);\n ListActivity.this.runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n if (fFeed != null && fFeed.getItemCount() > 0) {\n\n adapter.notifyDataSetChanged();\n\n //close swipe refresh\n swiperefresh.setRefreshing(false);\n\n //set feedURL calling setFeedString method, it is important if we want working swipe refresh listener\n setFeedString(datfeed);\n }\n }\n });\n }\n });\n thread.start();\n }\n }", "private void parseLastfm() {\t\t\r\n\t\tfor(String artist : library.getCopyArtists()) {\r\n\t\t\ttry {\r\n\t\t\t\tartist = URLEncoder.encode(artist, \"UTF-8\");\r\n\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tthis.wq.execute(new Fetcher(artist, library));\r\n\t\t}\r\n\t}", "public void setRssUrlList(List<String> rssUrlList) {\n\t\tthis.rssUrlList = rssUrlList;\n\t}", "public Set<Anchor> parse(Reader reader, String url) {\n\n Set<Anchor> elements = new HashSet<>();\n String urtContent = null;\n try {\n urtContent = readFully(reader);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (urtContent == null){\n return elements;\n }\n\n mTag = pTag.matcher(urtContent);\n\n while (mTag.find()) {\n\n String href = mTag.group(1); // get the values of href\n String linkElem = mTag.group(2); // get the text of link Html Element\n\n mLink = pLink.matcher(href);\n\n while (mLink.find()) {\n\n String link = mLink.group(1);\n Anchor anchor = new Anchor();\n anchor.setUrl(link);\n anchor.setText(linkElem);\n\n elements.add(anchor);\n\n }\n }\n return elements;\n }", "void fetchFactFeeds();", "@Scheduled(fixedRate = 120000)\n public void readRss() {\n\n List<ItemNews> itemList = new ArrayList<>();\n\n try {\n String url = \"https://www.nytimes.com/svc/collections/v1/publish/https://www.nytimes.com/section/world/rss.xml\";\n\n try (XmlReader reader = new XmlReader(new URL(url))) {\n SyndFeed feed = new SyndFeedInput().build(reader);\n for (SyndEntry entry : feed.getEntries()) {\n LocalDateTime localDateTime = entry.getPublishedDate().toInstant()\n .atZone(ZoneId.systemDefault())\n .toLocalDateTime();\n ItemNews item = new ItemNews();\n item.setTitle(entry.getTitle());\n item.setAuthor(entry.getAuthor());\n item.setLink(entry.getLink());\n item.setDescription(entry.getDescription().getValue());\n item.setDateTime(localDateTime);\n modifyItem(item);\n itemList.add(item);\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n if (!itemList.isEmpty()) {\n Collections.sort(itemList , Comparator.comparing(ItemNews::getDateTime));\n saveItems(itemList);\n }\n }", "protected Collection<ArticleMetadata> modifyAMList(SourceXmlSchemaHelper helper,\n CachedUrl datasetCu, List<ArticleMetadata> allAMs) {\n\n Matcher mat = TOP_METADATA_PATTERN.matcher(datasetCu.getUrl());\n Pattern ARTICLE_METADATA_PATTERN = null;\n if (mat.matches()) {\n // must create this here because it is specific to this tar set\n String pattern_string = \"^\" + mat.group(1) + mat.group(2) + \"[A-Z]\\\\.tar!/\" + mat.group(2) + \"/.*/main\\\\.xml$\";\n log.debug3(\"Iterate and find the pattern: \" + pattern_string);\n ARTICLE_METADATA_PATTERN = Pattern.compile(pattern_string, Pattern.CASE_INSENSITIVE);\n\n // Limit the scope of the iteration to only those TAR archives that share this tar number\n List<String> rootList = createRootList(datasetCu, mat);\n // Now create the map of files to the tarfile they're in\n ArchivalUnit au = datasetCu.getArchivalUnit();\n SubTreeArticleIteratorBuilder articlebuilder = new SubTreeArticleIteratorBuilder(au);\n SubTreeArticleIterator.Spec artSpec = articlebuilder.newSpec();\n // Limit it just to this group of tar files\n artSpec.setRoots(rootList); \n artSpec.setPattern(ARTICLE_METADATA_PATTERN); // look for url-ending \"main.xml\" files\n artSpec.setExcludeSubTreePattern(NESTED_ARCHIVE_PATTERN); //but do not descend in to any underlying archives\n artSpec.setVisitArchiveMembers(true);\n articlebuilder.setSpec(artSpec);\n articlebuilder.addAspect(MAIN_XML_PATTERN,\n XML_REPLACEMENT,\n ArticleFiles.ROLE_ARTICLE_METADATA);\n\n for (SubTreeArticleIterator art_iterator = articlebuilder.getSubTreeArticleIterator();\n art_iterator.hasNext(); ) {\n // because we haven't set any roles, the AF will be what the iterator matched\n String article_xml_url = art_iterator.next().getFullTextCu().getUrl();\n log.debug3(\"tar map iterator found: \" + article_xml_url);\n int tarspot = StringUtil.indexOfIgnoreCase(article_xml_url, \".tar!/\");\n int dividespot = StringUtil.indexOfIgnoreCase(article_xml_url, \"/\", tarspot+6);\n TarContentsMap.put(article_xml_url.substring(dividespot + 1), article_xml_url);\n log.debug3(\"TarContentsMap add key: \" + article_xml_url.substring(dividespot + 1));\n }\n } else {\n log.warning(\"ElsevierDTD5: Unable to create article-level map for \" + datasetCu.getUrl() + \" - metadata will not include article titles or useful access.urls\");\n }\n return allAMs;\n }", "private String getURL(String feedUrl) {\n\tStringBuilder sb = null;\n\ttry {\n for(int i = 3; i>0; i--) {\n\t sb = new StringBuilder();\n URL url = new URL(feedUrl);\n//User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22 GTB7.1 ( .NET CLR 3.5.30729)\n//Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\n//Accept-Language: en-us,en;q=0.5\n//Accept-Encoding: gzip,deflate\n//Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\n//Keep-Alive: 115\n//Connection: keep-alive\n//\tHttpsURLConnection uc = (HttpsURLConnection) url.openConnection();\n\tHttpURLConnection uc = (HttpURLConnection) url.openConnection();\n\tuc.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22 GTB7.1 ( .NET CLR 3.5.30729)\");\n//Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\n\tuc.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\");\n\tuc.setRequestProperty(\"Accept-Language\", \"en-us,en;q=0.5\");\n\tuc.setRequestProperty(\"Accept-Encoding\", \"gzip,deflate\");\n\tuc.setRequestProperty(\"Accept-Charset\", \"ISO-8859-1,utf-8;q=0.7,*;q=0.7\");\n\tuc.setRequestProperty(\"Keep-Alive\", \"115\");\n\tuc.setRequestProperty(\"Connection\", \"keep-alive\");\n//Keep-Alive: 115\n//Connection: keep-alive\n//\tif (userName != null && password != null) {\n//\t\tuc.setRequestProperty(\"Authorization\", \"Basic \" + encodedAuthenticationString);\n//\t}\n\t// ori setting??\n//\tuc.setReadTimeout(TIME_OUT);\n//\tuc.setFollowRedirects(true);\n//\tuc.setInstanceFollowRedirects(true);\n//\tuc.setAllowUserInteraction(true);\n\tuc.setDoOutput(true);\n\tuc.setDoInput(true);\n\tuc.setUseCaches(false);\n\tuc.setRequestMethod(\"POST\");\n\tuc.setRequestProperty(\"Content-Type\", \"text/xml\");\n\t\n\tBufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));//uc.getInputStream()\n\tString inputLine;\n//\t'aa7c.com')\" onmouseout=\"menuLayers.hide()\">Available</a>\n\tboolean refreshAgain = false;\n\twhile ((inputLine = in.readLine()) != null) {\n//\t\tSystem.out.println(inputLine);\n\t\tsb.append(inputLine);\n\t\tif( inputLine.contains(\"Refresh\") ) {\n\t\t\trefreshAgain = true;\n\t\t\tSystem.out.println(\"Refresh\");\n\t\t}\n\t}\n\tin.close();\n\tuc.disconnect();\t\t\n//\tRefresh\n\tif( refreshAgain ) {\n\t Thread.sleep(1000);\n\t}\n\telse break;\n }\n }catch(Exception ee){}\nreturn sb.toString();\n}", "List<WebURL> Filter(List<WebURL> urls){\n return null;\n }", "private static void loadTriples$(BulkStreamRDF dest, List<String> urls) {\n dest.startBulk();\n for ( String url : urls ) {\n loadLogger.info(\"Load: \" + url + \" -- \" + DateTimeUtils.nowAsString());\n Lang lang = RDFLanguages.filenameToLang(url, Lang.NTRIPLES);\n RDFParser.source(url).lang(lang).parse(dest);\n }\n dest.finishBulk();\n }", "public List<RssItem> getItems() throws Exception {\n if (rssUrl.equals(\"http://www.prothom-alo.com/\"))\n return ProthomAlo.GetLinks();\n if (rssUrl.equals(\"http://www.bhorerkagoj.net/online/\"))\n return Bhorerkagoj.GetLinks();\n SAXParserFactory factory = SAXParserFactory.newInstance();\n SAXParser saxParser = factory.newSAXParser();\n\n RssParseHandler handler = new RssParseHandler();\n\n saxParser.parse(rssUrl, handler);\n\n\n return handler.getItems();\n\n }", "protected void update(FeedItemHandler handler, Date cacheExpiryDate, ExecutorService executor) {\n\t\ttry {\n\t\t\tURLConnection connection = new URL(url).openConnection();\n\t\t\tconnection.setConnectTimeout(settings.getFeedConnectTimeout());\n\t\t\tconnection.setReadTimeout(settings.getFeedReadTimeout());\n\t\t\tconnection.connect();\n\t\t\tSyndFeedInput feedInput = new SyndFeedInput();\n\t\t\tCharset charset = Charset.forName(\"utf-8\"); //NOI18N\n\t\t\tif (connection.getContentEncoding() != null) {\n\t\t\t\tcharset = Charset.forName(connection.getContentEncoding());\n\t\t\t} else if (connection.getContentType() != null) {\n\t\t\t\tString[] contentTypeParts = connection.getContentType().split(\";\"); //NOI18N\n\t\t\t\tfor (String contentTypePart : contentTypeParts) {\n\t\t\t\t\tString[] contentTypePartComponents = contentTypePart.trim().split(\"=\", 2); //NOI18N\n\t\t\t\t\tif (contentTypePartComponents.length == 2 && contentTypePartComponents[0].matches(\"charset\")) //NOI18N\n\t\t\t\t\t\tcharset = Charset.forName(contentTypePartComponents[1].trim());\n\t\t\t\t}\n\t\t\t}\n\t\t\tSyndFeed feed = feedInput.build(new InputStreamReader(connection.getInputStream(), charset));\n\t\t\ttitle = feed.getTitle();\n\t\t\tencoding = feed.getEncoding();\n\t\t\thandleEntries(feed.getEntries(), handler, cacheExpiryDate, executor);\n\t\t} catch (IOException | IllegalArgumentException ex) {\n\t\t\tthrow new RuntimeException(MessageFormat.format(messages.getString(\"CANNOT_UPDATE_FEED\"), new Object[]{url}), ex);\n\t\t} catch (Exception ex) {\n\t\t\tthrow new RuntimeException(MessageFormat.format(messages.getString(\"CANNOT_UPDATE_FEED\"), new Object[]{url}), ex);\n\t\t}\n\t}", "List<String> getFeeds();", "public interface RSSService {\n\n //if only RSS feeds used the last-modified tag..\n @HEAD\n Call<Void> headFeed(@Url String url);\n\n @GET\n Call<RSSFeed> getFeed(@Url String url);\n}", "public static void getFeed(String url) {\n if (rssReader != null) {\n rssReader.loadFeeds(url);\n }\n }", "private boolean isNotValidRss(final String url) throws FeedException, IOException {\n final SyndFeed feed = FeedHandler.getFeed(url);\n final List<SyndEntry> items = feed.getEntries();\n if (items.isEmpty()) {\n return true;\n }\n for (SyndEntry item : items) {\n if (item.getPublishedDate() == null) {\n return true;\n }\n }\n return false;\n }", "private void refreshFeed() {\n Calendar cal = new GregorianCalendar();\n cal.set(Calendar.HOUR_OF_DAY, 0);\n cal.set(Calendar.MINUTE, 0);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.DATE, cal.get(Calendar.DATE) - DEFAULT_DAYS_BACK);\n String asOfDate = iso8601.fromCalendar(cal);\n \n feedService.feed(asOfDate, new Callback<List<Post>>() {\n @Override\n public void success(List<Post> posts, Response response) {\n Log.i(TAG, \"Received \" + posts.size() + \" posts from the feed service.\");\n \n ArrayList<Post> p = new ArrayList<Post>(posts);\n postArrayAdapter = new PostArrayAdapter(context, R.layout.listitem_feed, p);\n listView.setAdapter(postArrayAdapter);\n }\n \n @Override\n public void failure(RetrofitError retrofitError) {\n //TODO: Handle this better\n Log.e(TAG, \"Error retrieving posts from the feed: \" + retrofitError.getCause().toString());\n \n if (!retrofitError.isNetworkError()) {\n Log.i(TAG, \"Not network error, so likely cookie has expired; return user to login page\");\n sessionManager.terminateSession();\n startActivity(new Intent(getApplicationContext(), MainActivity.class));\n }\n else {\n Toast toast = new Toast(context);\n toast.makeText(context, getString(R.string.error_connecting), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private URL getFeedUrl() throws MalformedURLException{\n String feedUrl = \"http://\" + host + \":\" + port + \"/xmlfeed\";\n URL url = new URL(feedUrl);\n return url;\n }", "public List<RssFeedItem> getItems() throws Exception {\n // using SaxParser as the method of parsing the feed. \n SAXParserFactory factory = SAXParserFactory.newInstance();\n SAXParser saxParser = factory.newSAXParser();\n // SAX parser handler object which handles feed elements\n RssParseHandler handler = new RssParseHandler();\n saxParser.parse(rssUrl, handler);\n // The result of the parsing process is being stored in the handler object\n return handler.getItems();\n }", "public void populate(HttpServletRequest request, Context context, IndexableObject dso,\n List<IndexableObject> items, Map<String, String> labels) {\n String logoURL = null;\n String objectURL = null;\n String defaultTitle = null;\n boolean podcastFeed = false;\n this.request = request;\n // dso is null for the whole site, or a search without scope\n if (dso == null) {\n defaultTitle = configurationService.getProperty(\"dspace.name\");\n feed.setDescription(localize(labels, MSG_FEED_DESCRIPTION));\n objectURL = resolveURL(request, null);\n } else {\n Bitstream logo = null;\n if (dso instanceof IndexableCollection) {\n Collection col = ((IndexableCollection) dso).getIndexedObject();\n defaultTitle = col.getName();\n feed.setDescription(collectionService.getMetadataFirstValue(col,\n CollectionService.MD_SHORT_DESCRIPTION, Item.ANY));\n logo = col.getLogo();\n String cols = configurationService.getProperty(\"webui.feed.podcast.collections\");\n if (cols != null && cols.length() > 1 && cols.contains(col.getHandle())) {\n podcastFeed = true;\n }\n objectURL = resolveURL(request, col);\n } else if (dso instanceof IndexableCommunity) {\n Community comm = ((IndexableCommunity) dso).getIndexedObject();\n defaultTitle = comm.getName();\n feed.setDescription(communityService.getMetadataFirstValue(comm,\n CommunityService.MD_SHORT_DESCRIPTION, Item.ANY));\n logo = comm.getLogo();\n String comms = configurationService.getProperty(\"webui.feed.podcast.communities\");\n if (comms != null && comms.length() > 1 && comms.contains(comm.getHandle())) {\n podcastFeed = true;\n }\n objectURL = resolveURL(request, comm);\n }\n\n if (logo != null) {\n logoURL = urlOfBitstream(request, logo);\n }\n }\n feed.setTitle(labels.containsKey(MSG_FEED_TITLE) ?\n localize(labels, MSG_FEED_TITLE) : defaultTitle);\n feed.setLink(objectURL);\n feed.setPublishedDate(new Date());\n feed.setUri(objectURL);\n\n // add logo if we found one:\n if (logoURL != null) {\n // we use the path to the logo for this, the logo itself cannot\n // be contained in the rdf. Not all RSS-viewers show this logo.\n SyndImage image = new SyndImageImpl();\n image.setLink(objectURL);\n if (StringUtils.isNotBlank(feed.getTitle())) {\n image.setTitle(feed.getTitle());\n } else {\n image.setTitle(localize(labels, MSG_LOGO_TITLE));\n }\n image.setUrl(logoURL);\n feed.setImage(image);\n }\n\n // add entries for items\n if (items != null) {\n List<SyndEntry> entries = new ArrayList<>();\n for (IndexableObject idxObj : items) {\n if (!(idxObj instanceof IndexableItem)) {\n continue;\n }\n Item item = ((IndexableItem) idxObj).getIndexedObject();\n boolean hasDate = false;\n SyndEntry entry = new SyndEntryImpl();\n entries.add(entry);\n\n String entryURL = resolveURL(request, item);\n entry.setLink(entryURL);\n entry.setUri(entryURL);\n\n String title = getOneDC(item, titleField);\n entry.setTitle(title == null ? localize(labels, MSG_UNTITLED) : title);\n\n // \"published\" date -- should be dc.date.issued\n String pubDate = getOneDC(item, dateField);\n if (pubDate != null) {\n entry.setPublishedDate((new DCDate(pubDate)).toDate());\n hasDate = true;\n }\n // date of last change to Item\n entry.setUpdatedDate(item.getLastModified());\n\n StringBuilder db = new StringBuilder();\n for (String df : descriptionFields) {\n // Special Case: \"(date)\" in field name means render as date\n boolean isDate = df.indexOf(\"(date)\") > 0;\n if (isDate) {\n df = df.replaceAll(\"\\\\(date\\\\)\", \"\");\n }\n\n List<MetadataValue> dcv = itemService.getMetadataByMetadataString(item, df);\n if (dcv.size() > 0) {\n String fieldLabel = labels.get(MSG_METADATA + df);\n if (fieldLabel != null && fieldLabel.length() > 0) {\n db.append(fieldLabel).append(\": \");\n }\n boolean first = true;\n for (MetadataValue v : dcv) {\n if (first) {\n first = false;\n } else {\n db.append(\"; \");\n }\n db.append(isDate ? new DCDate(v.getValue()).toString() : v.getValue());\n }\n db.append(\"\\n\");\n }\n }\n if (db.length() > 0) {\n SyndContent desc = new SyndContentImpl();\n desc.setType(\"text/plain\");\n desc.setValue(db.toString());\n entry.setDescription(desc);\n }\n\n // This gets the authors into an ATOM feed\n List<MetadataValue> authors = itemService.getMetadataByMetadataString(item, authorField);\n if (authors.size() > 0) {\n List<SyndPerson> creators = new ArrayList<>();\n for (MetadataValue author : authors) {\n SyndPerson sp = new SyndPersonImpl();\n sp.setName(author.getValue());\n creators.add(sp);\n }\n entry.setAuthors(creators);\n }\n\n // only add DC module if any DC fields are configured\n if (dcCreatorField != null || dcDateField != null ||\n dcDescriptionField != null) {\n DCModule dc = new DCModuleImpl();\n if (dcCreatorField != null) {\n List<MetadataValue> dcAuthors = itemService\n .getMetadataByMetadataString(item, dcCreatorField);\n if (dcAuthors.size() > 0) {\n List<String> creators = new ArrayList<>();\n for (MetadataValue author : dcAuthors) {\n creators.add(author.getValue());\n }\n dc.setCreators(creators);\n }\n }\n if (dcDateField != null && !hasDate) {\n List<MetadataValue> v = itemService.getMetadataByMetadataString(item, dcDateField);\n if (v.size() > 0) {\n dc.setDate((new DCDate(v.get(0).getValue())).toDate());\n }\n }\n if (dcDescriptionField != null) {\n List<MetadataValue> v = itemService\n .getMetadataByMetadataString(item, dcDescriptionField);\n if (v.size() > 0) {\n StringBuilder descs = new StringBuilder();\n for (MetadataValue d : v) {\n if (descs.length() > 0) {\n descs.append(\"\\n\\n\");\n }\n descs.append(d.getValue());\n }\n dc.setDescription(descs.toString());\n }\n }\n entry.getModules().add(dc);\n }\n\n //iTunes Podcast Support - START\n if (podcastFeed) {\n // Add enclosure(s)\n List<SyndEnclosure> enclosures = new ArrayList();\n try {\n List<Bundle> bunds = itemService.getBundles(item, \"ORIGINAL\");\n if (bunds.get(0) != null) {\n List<Bitstream> bits = bunds.get(0).getBitstreams();\n for (Bitstream bit : bits) {\n String mime = bit.getFormat(context).getMIMEType();\n if (ArrayUtils.contains(podcastableMIMETypes, mime)) {\n SyndEnclosure enc = new SyndEnclosureImpl();\n enc.setType(bit.getFormat(context).getMIMEType());\n enc.setLength(bit.getSizeBytes());\n enc.setUrl(urlOfBitstream(request, bit));\n enclosures.add(enc);\n\n }\n }\n }\n //Also try to add an external value from dc.identifier.other\n // We are assuming that if this is set, then it is a media file\n List<MetadataValue> externalMedia = itemService\n .getMetadataByMetadataString(item, externalSourceField);\n if (externalMedia.size() > 0) {\n for (MetadataValue anExternalMedia : externalMedia) {\n SyndEnclosure enc = new SyndEnclosureImpl();\n enc.setType(\n \"audio/x-mpeg\"); //We can't determine MIME of external file, so just\n // picking one.\n enc.setLength(1);\n enc.setUrl(anExternalMedia.getValue());\n enclosures.add(enc);\n }\n }\n\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n entry.setEnclosures(enclosures);\n\n // Get iTunes specific fields: author, subtitle, summary, duration, keywords\n EntryInformation itunes = new EntryInformationImpl();\n\n String author = getOneDC(item, authorField);\n if (author != null && author.length() > 0) {\n itunes.setAuthor(author); // <itunes:author>\n }\n\n itunes.setSubtitle(title == null ? localize(labels, MSG_UNTITLED) : title); // <itunes:subtitle>\n\n if (db.length() > 0) {\n itunes.setSummary(db.toString()); // <itunes:summary>\n }\n\n String extent = getOneDC(item,\n \"dc.format.extent\"); // assumed that user will enter this field\n // with length of song in seconds\n if (extent != null && extent.length() > 0) {\n extent = extent.split(\" \")[0];\n long duration = Long.parseLong(extent);\n itunes.setDuration(new Duration(duration)); // <itunes:duration>\n }\n\n String subject = getOneDC(item, \"dc.subject\");\n if (subject != null && subject.length() > 0) {\n String[] subjects = new String[1];\n subjects[0] = subject;\n itunes.setKeywords(subjects); // <itunes:keywords>\n }\n\n entry.getModules().add(itunes);\n }\n }\n feed.setEntries(entries);\n }\n }", "protected void onPostExecute(String feed) {\n\t\t}", "private List<DBFeedModel> parseResult(ConnectionResult connectionResult) {\n try {\n JSONObject response = new JSONObject(connectionResult.getResult());\n JSONArray posts = response.optJSONArray(\"posts\");\n List<DBFeedModel> feedsList = new ArrayList<>();\n\n for (int i = 0; i < posts.length(); i++) {\n JSONObject post = posts.optJSONObject(i);\n DBFeedModel item = new DBFeedModel();\n item.setViewType(Constants.FEED_VIEW_TYPE_LEFT);\n item.setTitle(post.optString(\"title\"));\n item.setThumb(post.optString(\"thumbnail\"));\n item.setUrl(\"http://m.dantri.com.vn/xa-hoi/hai-phong-yeu-cau-thao-do-rong-vang-dau-pikachu-gay-tranh-cai-20170108172552427.htm\");\n feedsList.add(item);\n }\n\n return feedsList;\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "protected abstract List<Entry> buildFeedEntries(\n\t\t\tMap<String, Object> model, HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows Exception;", "@HEAD\n Call<Void> headFeed(@Url String url);", "public static void AddUrls (List<String> links) {\n\t for(String LoopedLinks:links) { \n\t\n\t\t//if page isn't part of domain, ignore\n\t\t if (LoopedLinks.startsWith(variables.domain)) {\n\t\n\t\t\t //if page doesn't have an octothorpe\n\t\t\t if (!LoopedLinks.contains(\"#\")) {\n\t\t\t\t \n\t\t\t\t //if page doesn't ends with one of the file extensions to not use\n\t\t\t\t String extension = getExtension(LoopedLinks);//gets file extension from URL\n\t\t\t\t if(!variables.list.stream().anyMatch(extension::contains)) {\n\n\t\t\t\t\t //if link isn't already part of master list, add it.\n\t\t\t\t\t if(!variables.master.contains(LoopedLinks)) {\n\t\t\t\t\t\t Reporter.log(\"Adding to master list \"+LoopedLinks, variables.verboseReport);\n\t\t\t\t\t\t variables.master.add(LoopedLinks);\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t }\n\t}", "protected void onPostExecute(String feed) {\n }", "protected void onPostExecute(String feed) {\n }", "private void getArticles() throws Exception {\n\t\t\tHttpClient httpClient = new DefaultHttpClient();\n\n\t\t\tStringBuilder uriBuilder = new StringBuilder(BASE_URL);\n\t\t\turiBuilder.append(mURL);\n\n\t\t\tHttpGet request = new HttpGet(uriBuilder.toString());\n\t\t\tHttpResponse response = httpClient.execute(request);\n\n\t\t\tint status = response.getStatusLine().getStatusCode();\n\n\t\t\tif (status != HttpStatus.SC_OK) {\n\n\t\t\t\t// Log whatever the server returns in the response body.\n\t\t\t\tByteArrayOutputStream ostream = new ByteArrayOutputStream();\n\n\t\t\t\tresponse.getEntity().writeTo(ostream);\n\t\t\t\tmHandler.sendEmptyMessage(0);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tInputStream content = response.getEntity().getContent();\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(content));\n\t\t\tStringBuilder result = new StringBuilder();\n\n\t\t\tString line;\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tresult.append(line);\n\t\t\t}\n\n\t\t\t// Clean up and close connection.\n\t\t\tcontent.close();\n\n\t\t\tString html = result.toString();\n\t\t\t//This is our regex to match each article\n\t\t\t//This website's html is not xml compatible so regex is next best thing\n\t\t\tPattern p = Pattern.compile(\"<td class=\\\"title\\\"><a href=\\\"(.*?)\\\".*?>(.*?)<\\\\/a>(<span class=\\\"comhead\\\">(.*?)<\\\\/span>)?.*?<\\\\/td><\\\\/tr><tr><td colspan=2><\\\\/td><td class=\\\"subtext\\\">.*? by <a href=\\\"user\\\\?.*?\\\">(.*?)<\\\\/a>.*?<a href=\\\"item\\\\?id=(.*?)\\\">\");\n\t\t\tMatcher m = p.matcher(html);\n\t\t\tList<Article> articles = new ArrayList<Article>();\n\t\t\twhile(m.find()) {\n\t\t\t\tString url = m.group(1);\n\t\t\t\tString title = m.group(2);\n\t\t\t\tString domain = m.group(4);\n\t\t\t\tString author = m.group(5);\n\t\t\t\tString discussionID = m.group(6);\n\t\t\t\tArticle eachArticle = new Article(title, domain, url, author, discussionID);\n\t\t\t\tarticles.add(eachArticle); \n\t\t\t}\n\n\t\t\tMessage msg = mHandler.obtainMessage();\n\t\t\tBundle bundle = new Bundle();\n\t\t\tbundle.putParcelableArrayList(\"articles\", (ArrayList<? extends Parcelable>) articles);\n\t\t\tmsg.setData(bundle);\n\t\t\tmHandler.sendMessage(msg);\n\t\t}", "private void parseJsonFeed(JSONObject response) {\n try {\n JSONArray newsArray = response.getJSONArray(\"news\");\n hidePDialog();\n\n for (int i = 0; i < newsArray.length(); i++) {\n JSONObject feedObj = (JSONObject) newsArray.get(i);\n\n NewsItem news = new NewsItem();\n\n news.setId(feedObj.getString(\"id\"));\n news.setTitle(feedObj.getString(\"title\"));\n news.setDate(\"Posted on \" + feedObj.getString(\"created_at\"));\n news.setBrief(feedObj.getString(\"brief\"));\n\n //news.setDate(feedObj.getString(\"mdate\"));\n// String rd = feedObj.getString(\"mdate\");\n// news.setDate(\"Release date: \" + rd);\n\n mItems.add(news);\n }\n\n // notify data changes to list adapater\n newsAdapter.notifyDataSetChanged();\n\n } catch (JSONException e) {\n e.printStackTrace();\n hidePDialog();\n }\n }", "public List<Recurso> getRecursos(String feedUrl, boolean ind) {\r\n\t\tURL url = null;\r\n\t\tthis.individual = ind;\r\n\t\t\r\n\t\ttry {\r\n\r\n\t\t\tSAXParserFactory spf = SAXParserFactory.newInstance();\r\n\t\t\tSAXParser sp = spf.newSAXParser();\r\n\t\t\tXMLReader xr = sp.getXMLReader();\r\n\r\n\t\t\turl = new URL(feedUrl);\r\n\r\n\t\t\txr.setContentHandler(this);\r\n\t\t\txr.parse(new InputSource(url.openStream()));\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\tLog.e(\"RSS Handler IO\", e.getMessage() + \" >> \" + e.toString());\r\n\t\t} catch (SAXException e) {\r\n\t\t\tLog.e(\"RSS Handler SAX\", e.toString());\r\n\t\t} catch (ParserConfigurationException e) {\r\n\t\t\tLog.e(\"RSS Handler Parser Config\", e.toString());\r\n\t\t}\r\n\r\n\t\treturn listaRecursos;\r\n\t}", "public void parseInputStream(InputStream is) throws IOException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\n\t\tString str = null;\n\t\twhile((str = br.readLine()) != null) {\n\t\t\tsb.append(str).append(\"\\n\\r\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tJSONObject jObject = new JSONObject(sb.toString());\n\t\t\tfinal String access_token = jObject.getString(\"access_token\");\n\t\t\tfinal String token_type = jObject.getString(\"token_type\");\n\t\t\tfinal String expires_in = jObject.getString(\"expires_in\");\n\t\t\tfinal String refresh_token = jObject.getString(\"refresh_token\");\n\t\t\t\n\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tgetGmailAtomFeed(access_token,token_type);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void useItemsFrom(Feed feed) {\n\t\titems = feed.items;\n\t}", "public SnapshotFeedReader(String feedurl) {\n super(feedurl);\n this.feed = new SnapshotFeed();\n this.links = new HashSet<AtomLink>();\n }", "@NonNull\n default T feed(@NonNull Iterator<Map<String, Object>> feeder) {\n return ScalaFeeds.apply(this, feeder);\n }", "public Feed getFeed(URL feedURLObject, Date lastUpdatedDate, boolean summary) {\n inputStream = null;\n FeedHandler feedHandler = new FeedHandler(lastUpdatedDate, summary);\n if (xmlReader != null && feedURLObject != null) {\n try {\n String encoding = detectEncoding(feedURLObject);\n if (inputStream == null) {\n if (\"file\".equals(feedURLObject.getProtocol())) {\n inputStream = feedURLObject.openStream();\n } else {\n inputStream = client.loadInputStream(feedURLObject);\n }\n }\n InputSource inputSource = new InputSource(inputStream);\n if (encoding != null) {\n inputSource.setEncoding(encoding);\n }\n\n xmlReader.setContentHandler(feedHandler);\n xmlReader.parse(inputSource);\n\n } catch (EndSAXException e) {\n // No problem\n } catch (IOException e) {\n System.err.println(e.getMessage());\n } catch (SAXException e) {\n System.err.println(e.getMessage());\n } finally {\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (IOException e) {\n System.err.println(e.getMessage());\n }\n }\n }\n }\n return feedHandler.getFeed();\n }", "@Override\n protected List<Flower> doInBackground(String... params) {\n // InputStream in = null;\n String content = HttpManager.getData(params[0]);\n flowerList = JSONParser.parserFeed(content);\n return flowerList;\n }", "public void getLinks() {\n\n var client = HttpClient.newBuilder()\n .followRedirects(HttpClient.Redirect.ALWAYS)\n .build();\n\n HttpRequest request = HttpRequest.newBuilder()\n .uri(URI.create(URL_PREFIX))\n .build();\n client.sendAsync(request, HttpResponse.BodyHandlers.ofLines())\n .thenApply(HttpResponse::body)\n .thenApply(this::processLines)\n .thenApply(versions -> tasks(versions))\n .join();\n }", "private void removeFeeds(GoogleAdsClient googleAdsClient, long customerId, List<Feed> feeds) {\n List<FeedOperation> removeOperations =\n feeds.stream()\n .map(f -> FeedOperation.newBuilder().setRemove(f.getResourceName()).build())\n .collect(Collectors.toList());\n try (FeedServiceClient feedServiceClient =\n googleAdsClient.getLatestVersion().createFeedServiceClient()) {\n feedServiceClient.mutateFeeds(String.valueOf(customerId), removeOperations);\n }\n }", "public Feed getFeed(String feedURL, Date lastUpdatedDate) throws MalformedURLException {\n return getFeed(feedURL, lastUpdatedDate, false);\n }", "private List<FeedItemRO> getFeedFromGoogle() {\n\t\t// create RO list\n\t\tList<FeedItemRO> feedItemROs = new ArrayList<>();\n\t\t// parse the data with ROME library inside a try-catch so that if there is a connection problem it will throw an exception.\n\t\tURL feedUrl;\n\t\ttry {\n\t\t\tfeedUrl = new URL(\"https://news.google.com/gn/news/?ned=us&gl=US&hl=en&output=rss\");\n\t\t\tSyndFeedInput input = new SyndFeedInput();\n\t\t\tSyndFeed feed = input.build(new XmlReader(feedUrl));\n\t\t\t\n\t\t\t// every news story in the feed is an entry, for each one construct a RO with title, link, description and add it to the list. \n\t\t\tList<SyndEntry> entries = feed.getEntries();\n\t\t\tfor (SyndEntry syndEntry : entries) {\n\t\t\t\tfeedItemROs.add(new FeedItemRO(syndEntry.getTitle(),syndEntry.getLink(), syndEntry.getDescription().getValue()));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t//Should be logged properly\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// return RO list of news stories.\n\t\treturn feedItemROs;\n\t}", "@NonNull\n default T feed(@NonNull Iterator<Map<String, Object>> feeder, String numberOfRecords) {\n return ScalaFeeds.apply(this, feeder, numberOfRecords);\n }", "static public List<InlineResponse2001> feedsGet()\n {\n ArrayList<InlineResponse2001> l = new ArrayList<>();\n\n for (int i = 0; i < 512; i += (i % 2 == 0) ? 3 : 7)\n {\n InlineResponse2001 f = new InlineResponse2001();\n\n f.setId(i);\n f.setTitle(\"Some random [\" + i + \"] feed\");\n l.add(f);\n }\n return l;\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tgetGmailAtomFeed(access_token,token_type);\t\t\t\t\t\n\t\t\t\t}", "@SuppressWarnings(\"unchecked\")\n @Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp)\n throws IOException {\n resp.setStatus(204);\n\n SyndFeed feed = Feeds.parseFeed(req.getInputStream());\n if (feed == null) {\n return;\n }\n \n List<SyndEntry> entries = feed.getEntries();\n \n if (entries.isEmpty()) {\n return;\n } \n \n JID user = new JID(req.getPathInfo().substring(1));\n // TODO(mihaip): this is potentially incorrect if a feed gets redirected and\n // its self URL changes since the time the subscription was created\n List<URL> feedUrls = Feeds.getLinkUrl(feed, Feeds.SELF_RELATION); \n if (!feedUrls.isEmpty()) {\n URL feedUrl = feedUrls.get(0);\n List<Subscription> subscriptions =\n Subscription.getSubscriptionsForUserAndFeedUrl(user, feedUrl);\n \n if (!subscriptions.isEmpty()) {\n final Subscription subscription = subscriptions.get(0);\n Set<String> seenEntryIds = subscription.getSeenEntryIds();\n List<String> newEntryIds = Lists.newArrayList();\n List<SyndEntry> filteredEntries = Lists.newArrayList();\n for (SyndEntry entry : entries) {\n String entryId = Feeds.getEntryId(entry);\n if (seenEntryIds.contains(entryId)) {\n logger.info(\"Filtering out already seen entry from \" + feedUrl);\n continue;\n }\n filteredEntries.add(entry);\n newEntryIds.add(entryId);\n }\n \n if (!filteredEntries.isEmpty()) {\n subscription.addSeenEntryIds(newEntryIds);\n Persistence.withManager(new Persistence.Closure() {\n @Override public void run(PersistenceManager manager) {\n manager.makePersistent(subscription);\n }\n });\n } else {\n return;\n }\n \n entries = filteredEntries;\n } else {\n logger.warning(\"Got notification for feed without subscription \" + feedUrl);\n }\n }\n \n \n // If subscribing to a previously unseen URL, the hub might report a bunch\n // of entries as new, so we sort them by published date and only show the\n // first few\n Collections.sort(entries, new Comparator<SyndEntry>() {\n @Override public int compare(SyndEntry o1, SyndEntry o2) {\n if (o1.getPublishedDate() == null) {\n return 1;\n }\n if (o2.getPublishedDate() == null) {\n return -1;\n }\n return o2.getPublishedDate().compareTo(o1.getPublishedDate());\n }\n });\n \n List<SyndEntry> displayEntries;\n if (entries.size() > MAX_ENTRIES_TO_DISPLAY) {\n displayEntries = entries.subList(0, MAX_ENTRIES_TO_DISPLAY);\n } else {\n displayEntries = entries;\n }\n \n StringBuilder message = new StringBuilder(\"Update from \")\n .append(StringEscapeUtils.unescapeHtml4(feed.getTitle())).append(\":\");\n for (SyndEntry displayEntry : displayEntries) {\n String title = displayEntry.getTitle();\n if (Strings.isNullOrEmpty(title)) {\n title = \"(title unknown)\";\n } else {\n title = StringEscapeUtils.unescapeHtml4(title);\n }\n String link = displayEntry.getLink();\n if (Strings.isNullOrEmpty(link)) {\n link = \"<no link>\";\n }\n \n message.append(\"\\n \").append(title).append(\": \").append(link);\n }\n \n if (displayEntries.size() != entries.size()) {\n message.append(\"\\n (and \")\n .append(entries.size() - displayEntries.size()).append(\" more)\");\n }\n \n Xmpp.sendMessage(user, message.toString());\n }", "public void turnOnRss(final String url) {\n ParseFeedTask task = tasks.get(url);\n if (task == null) {\n System.out.println(String.format(\"Rss with url %s is not found\", url));\n return;\n }\n RssConfiguration configuration = task.getConfiguration();\n if (configuration.getTurnOn()) {\n System.out.println(\"Rss is already running\");\n return;\n }\n configuration.setTurnOn(true);\n try {\n PropertiesHandler.writeProperties(configuration);\n ScheduledFuture future = scheduledExecutorService.scheduleWithFixedDelay(task, configuration.getPollPeriod(), configuration.getPollPeriod(), TimeUnit.SECONDS);\n futures.put(url, future);\n System.out.println(String.format(\"Rss %s is running\", url));\n } catch (IOException e) {\n System.out.println(String.format(\"An error occurred during the change poll period for feed %s\", url));\n }\n }", "public void refreshRssFeed( ContactRssImpl rssURL)\n {\n submitRssQuery(rssURL, true);\n }", "@Override\n protected ArrayList<Object> doInBackground(String... params) {\n RequestBody postData = new FormEncodingBuilder()\n .add(\"type\", \"json\")\n .build();\n\n ArrayList<Object> feedDataList = CMFeedJsonUtil.feed(params[0], postData);\n Log.d(\"Tag\", feedDataList.toString());\n return feedDataList;\n }", "@Override\n\t\tprotected String doInBackground(String... params) {\n\t\t\tfor (int i = 0; i < mEntries.size(); ++i) {\n\t\t\t\tEntry ent = mEntries.get(i);\n\n\t\t\t\t// Grab the text from the url\n\t\t\t\tString url = ent.getURL();\n\t\t\t\tString result = downloadURL(url);\n\n\t\t\t\t// The up-to-date entry\n\t\t\t\tEntry uEnt = (Entry) EntryType.getTypeEntry(\n\t\t\t\t\t\tent.getType(), -1);\n\t\t\t\tuEnt.setFromURLText(url, result);\n\n\t\t\t\tonProgressUpdate(new Object[] { i, uEnt });\n\t\t\t}\n\n\t\t\t// Successful exit\n\t\t\treturn \"Success\";\n\t\t}", "private void setFeedString(String feed_string) {\n\n feedURL = feed_string;\n }", "@NonNull\n default T feed(@NonNull Iterator<Map<String, Object>> feeder, int numberOfRecords) {\n return ScalaFeeds.apply(this, feeder, numberOfRecords);\n }", "public static <T, E> MultiKindFeedParser<T> create(\n HttpResponse response,\n XmlNamespaceDictionary namespaceDictionary,\n Class<T> feedClass,\n Class<E>... entryClasses)\n throws IOException, XmlPullParserException {\n InputStream content = response.getContent();\n try {\n Atom.checkContentType(response.getContentType());\n XmlPullParser parser = Xml.createParser();\n parser.setInput(content, null);\n MultiKindFeedParser<T> result =\n new MultiKindFeedParser<T>(namespaceDictionary, parser, content, feedClass);\n result.setEntryClasses(entryClasses);\n return result;\n } finally {\n content.close();\n }\n }", "public void getGmailAtomFeed(final String access_token,final String token_type) {\n\t\tThread th = new Thread(new Runnable(){\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\ttry {\n\t\t\t\t\tURL url = new URL(\"https://mail.google.com/mail/feed/atom\");\n\t\t\t\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\t\t\t\tconn.addRequestProperty(\"Authorization\", token_type + \" \"+access_token);\n\t\t\t\t\tint respCode = conn.getResponseCode();\n\t\t\t\t\tif (respCode == HttpURLConnection.HTTP_OK) {\n\t\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\t\tInputStream is = conn.getInputStream();\n\t\t\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\n\t\t\t\t\t\tString str;\n\t\t\t\t\t\twhile((str = br.readLine()) != null) {\n\t\t\t\t\t\t\tsb.append(str).append(\"\\n\\r\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal String text = sb.toString();\n\t\t\t\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\ttextView.setText(text);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\tToast.makeText(SampleGoogleOAuthActivity.this, \"������ ���� ����\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tth.start();\n\t}", "public static List<DeebResource> parse(String sourceCode, String url, Context context) {\n LinkedList<DeebResource> resources = new LinkedList<DeebResource>();\n \n // get XML Document from a parser\n String xmlDocument = null;\n \n if(url.contains(\"europeana\")) {\n Log.d(LOG_TAG, \"trying to parse json\");\n xmlDocument = JSONParser.parseJSON(sourceCode);\n }\n else if(url.contains(\"openarchives\")) {\n Log.d(LOG_TAG, \"trying to parse xml\");\n // TODO connect XMLParser\n }\n else if(url.contains(\"dbpedia\")) {\n Log.d(LOG_TAG, \"trying to parse rdf\");\n \n try {\n xmlDocument = LDParser.parseLD(sourceCode);\n }\n catch(ParserConfigurationException e) {\n Log.w(LOG_TAG, Log.getStackTraceString(e));\n }\n catch(SAXException e) {\n Log.w(LOG_TAG, Log.getStackTraceString(e));\n }\n catch(IOException e) {\n Log.w(LOG_TAG, Log.getStackTraceString(e));\n }\n }\n else {\n Log.d(LOG_TAG, \"trying to use the default parser\");\n // TODO connect MicrodataParser\n }\n \n if(xmlDocument == null) {\n Log.w(LOG_TAG, \"nothing could be parsed\");\n return resources;\n }\n \n // apply XSL to receive RDFXML\n Log.d(LOG_TAG, \"applying xml_to_rdfxml.xsl\");\n ByteArrayOutputStream rdfXml = applyXSL(context,\n new ByteArrayInputStream(xmlDocument.getBytes()), R.raw.xml_to_rdfxml);\n \n // TODO get resources from rdfXml\n \n // TODO return the data from this request (for visualization)\n return resources;\n }", "@Override\r\n\tpublic void process(ResultItems resultItems, Task task) {\n\t\tfinal String url = resultItems.getRequest().getUrl();\r\n\t\tSystem.out.println(\"****************--Entry Pipeline Process--*****************\");\r\n\t\tSystem.out.println(\"Get page: \" + url);\r\n\r\n\t\t/*\r\n\t\t * if(url.matches(\r\n\t\t * \"http://blog\\\\.sina\\\\.com\\\\.cn/s/articlelist_.*\\\\.html\")){//文章列表\r\n\t\t * System.out.println(\"No Op in Article List\"); // }else\r\n\t\t * if(url.matches(\"http://www\\\\.asianews\\\\.it/news-en/.*\")){\r\n\t\t */\r\n\t\t// 具体文章内容\r\n\t\tString time = null, title = null, content = null, abstracts = null, convertUrl = null,query=\"\";\r\n\r\n\t\tfor (Map.Entry<String, Object> entry : resultItems.getAll().entrySet()) {\r\n\t\t\t// System.out.println(entry.getKey()+\":\\n\"+entry.getValue());\r\n\r\n\t\t\tif (AsianViewDetailItem.TIME.equals(entry.getKey())) {\r\n\t\t\t\ttime = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.TITLE.equals(entry.getKey())) {\r\n\t\t\t\ttitle = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.ABSTRACT.equals(entry.getKey())) {\r\n\t\t\t\tabstracts = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.CONTENT.equals(entry.getKey())) {\r\n\t\t\t\tcontent = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.URL.equals(entry.getKey())) {\r\n\t\t\t\tassert url.equals(entry.getValue());\r\n\t\t\t} else if (AsianViewDetailItem.CONVERT_URL.equals(entry.getKey())) {\r\n\t\t\t\tconvertUrl = (String) entry.getValue();\r\n\t\t\t}else if(AsianViewDetailItem.QUERY.equals(entry.getKey())){\r\n//\t\t\t\tquery=\"//query_\"+(String) entry.getValue();\r\n\t\t\t\tquery=(entry.getValue()!=null)?\"//query_\"+entry.getValue():\"\";\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// System.out.println(\"Time:\\n\"+CorpusFormatter.timeFormat(time));\r\n\t\t//\r\n\t\t// System.out.println(\"Title:\\n\"+title);\r\n\t\t//\r\n\t\t// System.out.println(\"Abstract:\\n\"+abstracts);\r\n\t\t//\r\n\t\t// System.out.println(\"Content:\\n\"+content);\r\n\t\t//\r\n\t\t// System.out.println(\"Url:\\n\"+url);\r\n\r\n\t\tString id = String.format(\"%s-%s\", time, ++counter);\r\n\r\n\t\tfinal String fileName = String.format(\".//\" + FileUtils.docName + \"%s//%s.txt\",query, id);\r\n\t\tSystem.out.println(\"File name :\" + fileName);\r\n\t\t// FileUtils.writeContent(fileName, time, title, content);\r\n\t\tFileUtils.writeCorpus(fileName,\r\n\t\t\t\tconvertUrl != null\r\n\t\t\t\t\t\t? CorpusFormatter.format(id, time, url, \"T\", \"P\", title, abstracts,\r\n\t\t\t\t\t\t\t\tcontent, \"\", \"\", convertUrl)\r\n\t\t\t\t\t\t: CorpusFormatter.format(id, time, url, \"T\", \"P\", title, abstracts,\r\n\t\t\t\t\t\t\t\tcontent, \"\", \"\"));\r\n\r\n\t\t// }else{\r\n\t\t// System.out.println(\"Can't match Url\");\r\n\t\t// }\r\n\t\tSystem.out.println(\"****************--Exit Pipeline Process--*****************\");\r\n\r\n\t}", "protected void reduce(Text mainUrl, Iterable<Text> links, Context context) throws IOException, InterruptedException {\n\n LinkedList<String> linksIn = new LinkedList<>();\n LinkedList<String> linksOut = new LinkedList<>();\n\n for (Text link : links) {\n char who = link.toString().trim().charAt(0);\n String content = link.toString().trim().substring(1);\n if (who == '>') {\n linksOut.add(content);\n } else if (who == '<') {\n linksIn.add(content);\n }\n }\n\n // Собираем статистику\n context.getCounter(\"TOPS\", \"ALL\").increment(1);\n if (linksOut.size() == 0) {\n context.getCounter(\"TOPS\", \"HANGING\").increment(1);\n }\n\n context.write(mainUrl, new Text(\"###\\t\" + String.join(\"\\t\", linksOut) + \"\\t###\\t\" + String.join(\"\\t\", linksIn)));\n }", "public void init() {\n BufferedReader in = null;\n try {\n //URL feed = new URL(\"http://twitter.com/statuses/user_timeline/48274520.rss\");\n URL feed = new URL(\"http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=g_damian\");\n in = new BufferedReader(new InputStreamReader(feed.openStream()));\n String inputLine;\n String data = null;\n while ((inputLine = in.readLine()) != null) {\n inputLine = inputLine.trim();\n if (inputLine.startsWith(\"<created_at>\") && inputLine.endsWith(\"</created_at>\")) {\n inputLine = inputLine.substring(12, inputLine.length() - 13);\n data = inputLine.replaceAll(\"\\\\+\\\\d* \", \"\");\n }\n if (inputLine.startsWith(\"<text>\") && inputLine.endsWith(\"</text>\")) {\n inputLine = inputLine.substring(6, inputLine.length() - 7);\n buffer.append(escapeMessage(inputLine));\n buffer.append(\"<br/>[\" + data + \"]\");\n buffer.append(\"\\n\");\n }\n }\n in.close();\n } catch (MalformedURLException ex) {\n Logger.getLogger(ShowTweetsApplet.class.getName()).log(Level.SEVERE, null, ex);\n appendException(buffer, ex);\n } catch (IOException ex) {\n Logger.getLogger(ShowTweetsApplet.class.getName()).log(Level.SEVERE, null, ex);\n appendException(buffer, ex);\n } finally {\n try {\n if (in != null) {\n in.close();\n }\n } catch (IOException ex) {\n Logger.getLogger(ShowTweetsApplet.class.getName()).log(Level.SEVERE, null, ex);\n appendException(buffer, ex);\n }\n }\n }", "public void run() {\n\t\t\tString html = \"\";\n\t\t\ttry {\n\t\t\t\thtml = HTTPFetcher.fetchHTML(this.url);\n\t\t\t} catch (UnknownHostException e) {\n\t\t\t\tSystem.out.println(\"Unknown host\");\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\tSystem.out.println(\"MalformedURL\");\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"IOException\");\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif(html != null) {\n\t\t\t\t\tthis.newLinks = LinkParser.listLinks(new URL(this.url), html);\n\t\t\t\t}\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\tSystem.out.println(\"MalformedURL\");\n\t\t\t}\n\t\t\tif(newLinks != null) {\n\t\t\t\tfor(URL theURL : newLinks) {\n\t\t\t\t\tif(!(urls.contains(theURL))) {\n\t\t\t\t\t\tsynchronized(urls) {\n\t\t\t\t\t\t\turls.add(theURL);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinnerCrawl(theURL, limit);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tInvertedIndex local = new InvertedIndex();\n\t\t\t\tString no_html = HTMLCleaner.stripHTML(html.toString());\n\t\t\t\tString[] the_words = WordParser.parseWords(no_html);\n\t\t\t\tlocal.addAll(the_words, this.url);\n\t\t\t\tindex.addAll(local);\n\t\t\t}\n\t\t}", "public interface FeedService {\n\n /**\n * Returns the users that the user specified in the request is following. Uses information in\n * the request object to limit the number of followees returned and to return the next set of\n * followees after any that were returned in a previous request. Uses the {@link } to\n * get the followees from the server.\n *\n * @param request contains the data required to fulfill the request.\n * @return the followees.\n */\n public FeedResponse getFeeds(FeedRequest request);\n\n\n}", "java.lang.String getFeed();", "private void saveNewFeed() {\n String rssUrl = mUrlEditText.getText().toString();\n\n if (!rssUrl.equals(\"\") && userNotAlreadyFollowing(rssUrl)) {\n getActivity().setProgressBarIndeterminateVisibility(true);\n\n FeedProcessingService service = new FeedProcessingService(getActivity(), mFeedHandler);\n service.getAndProcessFeed(rssUrl);\n }\n }", "protected Feed(String url, List<String> userTitle, Settings settings) {\n\t\tthis.url = url;\n\t\tthis.items = Collections.synchronizedSet(new HashSet<FeedItem>());\n\t\tthis.userTitle = new ArrayList<>(userTitle);\n\t\tthis.settings = settings;\n\t}", "Set<Link> extractLinks(CrawlDoc doc, ParseState parseState)\n throws IOException;", "@Override\n protected String doInBackground(String... arguments) {\n // Extract arguments\n String urlIn = arguments[0];\n String theaddress=\"\",thetitle=\"\", theimg=\"\", s=\"\";\n ArrayList<String> addressarray= new ArrayList<String>();\n ArrayList<String> titlearray= new ArrayList<String>();\n ArrayList<String> imgarray = new ArrayList<String>();\n ArrayList<String> pricearray = new ArrayList<String>();\n BufferedReader in = null;\n InputStream ins = null;\n\n if (titlePattern == null)\n titlePattern = Pattern.compile(titleRE); // slow, only do once, and not on UI thread\n if(addressPattern == null){\n addressPattern = Pattern.compile(addressRE); // slow, only do once, and not on UI thread\n }\n if(imgPattern == null){\n imgPattern = Pattern.compile(imageRE); // slow, only do once, and not on UI thread\n }\n if(dPattern == null){\n dPattern = Pattern.compile(dRE); // slow, only do once, and not on UI thread\n }\n try {\n int count = 0;\n for(int j=1;j<=3;j++){\n pagenum=j;\n urlIn = urlIn.substring(0, urlIn.length()-1);\n urlIn = urlIn + pagenum;\n ins = openHttpConnection(urlIn);\n in = new BufferedReader(new InputStreamReader(ins));\n\n /* //this approach only reads in a stream\n URL url = new URL(urlIn);\n in = new BufferedReader(\n new InputStreamReader(\n url.openStream()));\n */\n\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n Matcher amatch = titlePattern.matcher(inputLine);\n if (amatch.find()) {//find title\n thetitle = amatch.group();\n thetitle = thetitle.substring(4,thetitle.length()-5);\n titlearray.add(thetitle);\n }\n Matcher bmatch = addressPattern.matcher(inputLine);\n if (bmatch.find()) {//find address\n theaddress = bmatch.group();\n theaddress = theaddress.substring(10,theaddress.length()-4);\n addressarray.add(theaddress);\n\n inputLine = in.readLine(); //skip a line\n inputLine = in.readLine(); //skip a line\n inputLine = in.readLine(); //skip a line\n inputLine = in.readLine(); //skip a line\n inputLine = in.readLine(); //skip a line\n inputLine = in.readLine(); //skip a line\n inputLine = in.readLine(); //skip a line\n inputLine = in.readLine(); //skip a line\n inputLine = in.readLine(); //skip a line\n inputLine = in.readLine(); //skip a line\n\n Matcher m = dPattern.matcher(inputLine);\n if (m.find()) {\n s = m.group();\n pricearray.add(s);\n// Log.e(\"IMPORTANT\", s);\n }\n }\n Matcher cmatch = imgPattern.matcher(inputLine);\n if (cmatch.find()) {//find image URL\n theimg = cmatch.group();\n theimg = theimg.substring(10,theimg.length()-1);\n imgarray.add(theimg);\n }\n count++;\n }\n }\n for(int i=0; i<addressarray.size(); i++){\n Property returnproperty = new Property(titlearray.get(i),addressarray.get(i), imgarray.get(i), pricearray.get(i));\n datasource.createProperty(returnproperty.getTitle(), returnproperty.getAddress(), returnproperty.getImgURL(), returnproperty.getPrice());\n Log.e(\"Adding Property to DB\", returnproperty.toString());\n }\n Log.e(\"end count\", \"\" + count);\n return getString(R.string.unknown); // never found the pattern\n } catch (IOException e) {\n Log.e(\"ScrapeTemperatures\", \"Unable to open url: \" + url);\n return getString(R.string.unknown);\n } catch (Exception e) {\n Log.e(\"ScrapeTemperatures\", e.toString());\n return getString(R.string.unknown);\n } finally {\n if (in != null)\n try {\n in.close();\n } catch (IOException e) {\n // ignore, we tried and failed to close, limp along anyway\n }\n }\n }", "private void pullLinks(String htmlPage) {\n\n Document doc = Jsoup.parse(htmlPage);\n Elements links = doc.select(\"a[href]\");\n\n for (Element link : links) {\n\n String possibleUrl = link.attr(\"abs:href\");\n\n if (!possibleUrl.equals(\"\")) {\n// Log.v(\"pullLinks\", \" will try to make URL from\" + possibleUrl);\n //if the link attr isn't empty, make a URL\n URL theUrl = NetworkUtils.makeURL(possibleUrl);\n\n if (RegexUtils.urlDomainNameMatch(firstLinkAsString, theUrl.toString())) {\n //if the string version of url is within the same domain as original query\n if (!visitedLinks.contains(theUrl.toString())) {\n// Log.v(\"DLAsyncTask.pullLinks\", \" thinks that \" + theUrl.toString() + \" wasn't visited, add into collected...\");\n collectedLinks.add(theUrl.toString());\n }\n }\n }\n\n }\n }", "public interface RSSItemListener {\n\n void addRSSItem(RSSItem rssItem);\n\n ArrayList<RSSItem> getAllRSSItems();\n\n int getRSSItemCount();\n\n}", "private static void loadQuads$(BulkStreamRDF dest, List<String> urls) {\n dest.startBulk();\n for ( String url : urls ) {\n loadLogger.info(\"Load: \" + url + \" -- \" + DateTimeUtils.nowAsString());\n Lang lang = RDFLanguages.filenameToLang(url, Lang.NQUADS);\n RDFParser.source(url).lang(lang).parse(dest);\n }\n dest.finishBulk();\n }", "public void execute(JobExecutionContext context) throws JobExecutionException {\n\t\tthis.servletContext=(ServletContext)context.getMergedJobDataMap().get(\"servletContext\");\t\n\t\tloadProperties();\t\t\n\t\tlog.info(\"-------------------------------------------------------------------\");\n\t\tlog.info(\"Starting to generate Atom Feed files.\");\n\t\t\n\t\tif(cswURL == null && feedURL == null && servicePath==null && dataSetPath==null && opensearchPath == null){\n\t\t\tlog.error(\"Config.properties parameter missing.\");\n\t\t}\n\t\t\n\t\tString[] downloadIDs = downloadUUIDs.split(\",\");\n\n\t\tfor(int id=0; id < downloadIDs.length; id ++){\n\t\t\tString downloadUUID = downloadIDs[id];\n\t\t\t\n\t\t\ttry{\n\t\t\t\t\t\t\n\t\t\t\tString resp = CSWUtil.executeRequest(cswURL, downloadUUID, proxyHost, proxyPort);\n\t\t\t\t\n\t\t\t\tif (!resp.contains(\"Exception\")) {\n\t\t\t\t\tparseMetadata(resp,downloadUUID);\n\t\n\t\t\t\t}else{\n\t\t\t\t\tlog.error(\"Service UUID can not be found!\");\n\t\t\t\t}\n\t\t\t}catch(DocumentException de){\n\t\t\t\tlog.error(de.toString(), de.fillInStackTrace());\n\t\t\t \tSystem.out.println(de.toString());\n\t\t\t}\t\t\t\t\n\t\t}\n\t}", "public static List<Feed> load(Settings settings) {\n\t\tList<Feed> feeds = new ArrayList<>();\n\t\tQuery query = new Query(Feed.class.getSimpleName(), settings.getKey());\n\t\tPreparedQuery preparedQuery = datastore.prepare(query);\n\t\tfor (Entity result : preparedQuery.asIterable())\n\t\t\tfeeds.add(new Feed(result, settings));\n\t\treturn feeds;\n\t}", "protected String doInBackground(String... urls) {\n String value;\n value = this.downloadEmails(urls[0], urls[1], urls[2], urls[3], urls[4]);\n return value;\n }", "public static List<String> resolveURLs(final String css) {\n final Matcher matcher = URL.matcher(css);\n final List<String> urls = new ArrayList<String>();\n while (matcher.find()) {\n final String url = matcher.group(1);\n urls.add(url);\n }\n return urls;\n }", "public abstract void updateFromFeed(Map<String,List<Map<String,String>>> data);" ]
[ "0.6994773", "0.6881773", "0.60867983", "0.6068289", "0.60461795", "0.6033804", "0.59314173", "0.5877243", "0.58612037", "0.58325666", "0.5787685", "0.5758269", "0.57464236", "0.56733763", "0.56598586", "0.5521272", "0.5474394", "0.54561466", "0.5399606", "0.5384425", "0.537393", "0.5371", "0.5351438", "0.53294754", "0.53274125", "0.5319456", "0.53144354", "0.529898", "0.52693164", "0.52195466", "0.51974756", "0.5182398", "0.51762635", "0.5175248", "0.51742184", "0.515778", "0.5142938", "0.5083589", "0.507832", "0.50635666", "0.5055336", "0.502832", "0.50261444", "0.50177354", "0.50132895", "0.5008043", "0.5006576", "0.500524", "0.500412", "0.50029385", "0.50000477", "0.4974019", "0.4973851", "0.496837", "0.49585983", "0.49585983", "0.49522182", "0.4927776", "0.4923695", "0.49183422", "0.49172622", "0.49164638", "0.49074018", "0.49034575", "0.48994052", "0.48974344", "0.48913652", "0.4882477", "0.4882164", "0.48795852", "0.4862639", "0.48506278", "0.4836548", "0.4834358", "0.48183906", "0.4818136", "0.47941765", "0.47774062", "0.47602892", "0.4756744", "0.47456107", "0.47452232", "0.4734707", "0.47261146", "0.4721586", "0.47115844", "0.47114167", "0.4708285", "0.47061756", "0.470554", "0.46929017", "0.4692785", "0.4689707", "0.4686387", "0.46861684", "0.4681515", "0.46746504", "0.46726286", "0.46666533", "0.46471953" ]
0.6494011
2
preparamos el cuadro de dialogo
@Override protected void onPreExecute(){ progressDialog = new ProgressDialog(context, R.style.AppThemeAssacDialog); progressDialog.setMessage(Const.STR_VERIFY_CONECTION_SERVER); progressDialog.setCancelable(false); progressDialog.show(); super.onPreExecute(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void generar_dialog_preguntas();", "public void abrirDialogoCustodio(){\n\t\tif(aut_empleado.getValor()!=null){\n\t\t\ttab_tarspaso_Custodio.limpiar();\n\t\t\ttab_tarspaso_Custodio.insertar();\n\t\t\t//tab_direccion.limpiar();\n\t\t//\ttab_direccion.insertar();\n\t\t\tdia_traspaso_custodio.dibujar();\n\t\t}\n\t\telse{\n\t\t\tutilitario.agregarMensaje(\"Inserte un Custodio\", \"\");\n\t\t}\n\n\t}", "private void mostrarDialogoCargar(){\n materialDialog = new MaterialDialog.Builder(this)\n .title(\"Validando datos\")\n .content(\"Por favor espere\")\n .progress(true, 0)\n .contentGravity(GravityEnum.CENTER)\n .widgetColorRes(R.color.colorPrimary)\n .show();\n\n materialDialog.setCancelable(false);\n materialDialog.setCanceledOnTouchOutside(false);\n }", "public void dialogoEditarUsuario() {\n vEditarUsuario = new V_EditarUsuario(new JFrame(), true);\n vEditarUsuario.setVisible(true);\n }", "public void dialogoAgregarUsuario() {\n vAgregarUsuario = new V_AgregarUsuario(new JFrame(), true);\n vAgregarUsuario.setVisible(true);\n }", "private void initDialog() {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n predata();\n }", "public CustomDialog(Activity context, String monto, String mensaje1, String mensaje2, String mensaje3, String mensaje4, String aprobacion, String typeMoney, Runnable aceptar){\n dialog = new Dialog(context, android.R.style.Theme_Black_NoTitleBar_Fullscreen);\n dialog.setCanceledOnTouchOutside(false);\n dialog.setContentView(R.layout.dialog_pago_realizado);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n AutoResizeTextView tvMonto = dialog.findViewById(R.id.importeEntero);\n\n tvMonto.setText(\"$ \"+monto+\" \"+ typeMoney);\n\n TextView tvAprobacion = dialog.findViewById(R.id.tvAprob);\n tvAprobacion.setText(\"No. de Aprobación: \"+aprobacion);\n\n TextView tvMensaje = dialog.findViewById(R.id.tvMensaje);\n\n //tvMensaje.setText(Html.fromHtml(mensaje1 + \"<br><font color='#0abaee'>\" + mensaje2 + \"</font><br>\" + mensaje3 + \"<font color='#0abaee'>\" + mensaje4 + \"</font>\"));\n Button tvAceptar = dialog.findViewById(R.id.tvAceptar2);\n tvAceptar.setOnClickListener(v -> {\n context.runOnUiThread(aceptar);\n dialog.dismiss();\n });\n }", "public void TipoCliente() {\n\tint cambio=1;\n\tString tipoCliente=\"\";\n\tdo {\n\t\ttry {\n\t\t\ttipoCliente = (JOptionPane.showInputDialog(null, \"Selecciona el tipo de cliente\", null, JOptionPane.PLAIN_MESSAGE,null, new Object[]\n\t\t\t\t\t{ \"Selecciona\",\"Docente\", \"Administrativo\"}, \"Selecciona\")).toString() ;\n\t\t\t\n\t\t\tif(tipoCliente.equalsIgnoreCase(\"Docente\")) {\n\t\t\t\tingresaDocente();\n\t\t\t\tsetTipoCliente(\"Docente\");\n\t\t\t\t\n\t\t\t}else if(tipoCliente.equalsIgnoreCase(\"Administrativo\")) {\n\t\t\t\tingresaAdministrativo();\n\t\t\t\tsetTipoCliente(\"Administrativo\");\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(null,\"Escoge una de las dos opciones\");\n\t\t\t}\n\t} catch (Exception e) {\n\t\tJOptionPane.showMessageDialog(null, \"Debes escoger una opcion\");\n\t\tcambio=0;\n\t}\n\t} while (tipoCliente==\"Selecciona\"||tipoCliente==null||cambio==0);\t\n}", "private void Ignorado() {\n Dialogo(R.string.ignorada);\n }", "public void confirmacionVolverMenu(){\n AlertDialog.Builder builder = new AlertDialog.Builder(Postre.this);\n builder.setCancelable(false);\n builder.setMessage(\"¿Desea salir?\")\n .setPositiveButton(\"Aceptar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\tIntent intent = new Intent(Postre.this, HomeAdmin.class);\n\t\t\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_FORWARD_RESULT);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\toverridePendingTransition(R.anim.left_in, R.anim.left_out);\t\n }\n })\n .setNegativeButton(\"Cancelar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n \n builder.show();\n }", "public FiltroGirosDialog() {\n \n }", "private void dialog() {\n\t\tGenericDialog gd = new GenericDialog(\"Bildart\");\n\t\t\n\t\tgd.addChoice(\"Bildtyp\", choices, choices[0]);\n\t\t\n\t\t\n\t\tgd.showDialog();\t// generiere Eingabefenster\n\t\t\n\t\tchoice = gd.getNextChoice(); // Auswahl uebernehmen\n\t\t\n\t\tif (gd.wasCanceled())\n\t\t\tSystem.exit(0);\n\t}", "public ReorganizeDialog() { }", "@Override\n\tprotected void onPreExecute() {\n\t\tthis.dialog.setMessage(\"Mise à jour des horaires ....\");\n\t\tthis.dialog.show();\n\t}", "@Override\n public void onClick(View v) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(FormEnviarSpei.this);\n builder.setMessage(\"Estas a punto de enviar el pago ¿Desea continuar?\")\n .setTitle(\"Alerta\")\n .setCancelable(true)\n .setNegativeButton(\"Cancelar\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n\n }\n })\n .setPositiveButton(\"Continuar\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n String c_dev = causa_devolucionid.getText().toString();\n String cv_pb = clave_p_b.getText().toString();\n String cv_po = clave_p_o.getText().toString();\n String cv_ra = clave_rastreo.getText().toString();\n String cv_tb = clave_tc_b.getText().toString();\n String cv_to = clave_tc_o.getText().toString();\n String cv_ti = clave_tipo_operacion.getText().toString();\n String comi = comision.getText().toString();\n String conc = concepto.getText().toString();\n String entr = entrada.getText().toString();\n String est_p = estado_pago_speiid.getText().toString();\n String fcha = fecha_hora.getText().toString();\n String foli = folio.getText().toString();\n String fo_in = folio_instruccion.getText().toString();\n String iva_p = iva_pago.getText().toString();\n String mont = monto_pago.getText().toString();\n String nom_b = nombreb.getText().toString();\n String nom_e = nombre_estado.getText().toString();\n String nom_o = nombreo.getText().toString();\n String cuen_b = Numero_cuenta_b.getText().toString();\n String cuen_o = Numero_cuenta_o.getText().toString();\n String id_pa = pagos_speiid.getText().toString();\n String rfc_b = rfc_curp_b.getText().toString();\n String rfc_o = rfc_curp_o.getText().toString();\n String tpago = tipo_pagoid.getText().toString();\n String topo = topologia.getText().toString();\n String ref_n = rfnumerica.getText().toString();\n String re_co = recobranza.getText().toString();\n String cv_op = cvoperacion.getText().toString();\n\n if (cv_op.isEmpty()){\n cvoperacion.setError(\"Campo vacio\");\n cvoperacion.requestFocus();\n }else {\n\n Conexion(c_dev, cv_pb, cv_po, cv_ra, cv_tb, cv_to, cv_ti, comi, conc, entr,\n est_p, fcha, foli, fo_in, iva_p, mont, nom_b, nom_e, nom_o, cuen_b,\n cuen_o, id_pa, rfc_b, rfc_o, tpago, topo, cv_op, ref_n, re_co);\n }\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n\n }", "void showAddParameterDialog();", "public void performTambah() {\n\n dialogEntry.postInit();\n dialogEntry.clearFields();\n dialogEntry.setRowToBeEdited(-1);\n //dialogEntry.clearFields ();\n dialogEntry.show(true); // -- modal dialog ya, jd harus menunggu..\n //if (isDirty()) {\n loadTable();\n // TODO : select last item added\n //}\n }", "protected void dialog() {\n TextInputDialog textInput = new TextInputDialog(\"\");\n textInput.setTitle(\"Text Input Dialog\");\n textInput.getDialogPane().setContentText(\"Nyt bord nr: \");\n textInput.showAndWait()\n .ifPresent(response -> {\n if (!response.isEmpty()) {\n newOrderbutton(response.toUpperCase());\n }\n });\n }", "@Override\n\tpublic void updateProgessDialog(String title, String message, boolean visible, Integer increment) {\n\t\t\n\t}", "private void inizia() throws Exception {\n\n try { // prova ad eseguire il codice\n\n /* questo dialogo non e' modale */\n this.getDialogo().setModal(false);\n\n this.setTitolo(TITOLO_DIALOGO);\n this.addBottoneStampa();\n this.addBottoneChiudi();\n\n /* crea il modulo con db in memoria */\n this.creaModuloMem();\n\n /* crea i pannelli del dialogo */\n this.creaPannelli();\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "private void dialogGame(final Game game) {\n final boolean isInsert = game.getId() == null;\n final Dialog dialog = new Dialog(this);\n\n dialog.setContentView(R.layout.new_game);\n\n dialog.setTitle(R.string.label_novo_game);\n\n final TextInputLayout etTitulo = (TextInputLayout) dialog.findViewById(R.id.inputTitulo);\n\n Spinner spGenero = (Spinner)dialog.findViewById(R.id.spGenero);\n\n Spinner spPlataforma = (Spinner)dialog.findViewById(R.id.spPlataforma);\n\n initGeneroSpinner(spGenero, game.getGenero());\n\n initPlataformaSpinner(spPlataforma, game.getPlataforma());\n\n etTitulo.getEditText().setText(game.getTitulo());\n\n Button btConfirmar = (Button) dialog.findViewById(R.id.btConfirmar);\n\n btConfirmar.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String titulo = etTitulo.getEditText().getText().toString();\n if(titulo.trim().equals(\"\")){\n etTitulo.setError(getString(R.string.label_campo_obrigatorio));\n } else {\n etTitulo.setErrorEnabled(false);\n game.setTitulo(etTitulo.getEditText().getText().toString());\n game.setGenero(generoSelecionado);\n game.setPlataforma(plataformaSelecionada);\n game.save();\n\n if (isInsert)\n mAdapter.add(game);\n\n mAdapter.notifyDataSetChanged();\n\n dialog.dismiss();\n Toast.makeText(MainActivity.this, R.string.label_gravado_com_sucesso, Toast.LENGTH_SHORT).show();\n }\n\n }\n });\n\n Button btCancelar = (Button) dialog.findViewById(R.id.btCancelar);\n\n btCancelar.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n dialog.show();\n }", "@Override\r\n\t protected void onPrepareDialog(int id, Dialog dialog) {\n\t switch(id){\r\n\t case(ID_SCREENDIALOG):\r\n\t \tdialog.setTitle(\"Send Instant Message\");\r\n\t break;\r\n\t }\r\n\t }", "public void displayRespuesta(){\n final Dialog customDialog = new Dialog(this);\n customDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n customDialog.setCancelable(false);\n customDialog.setContentView(ar.com.klee.marvinSimulator.R.layout.dialog_sms_respond);\n customDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n\n actualDialog = customDialog;\n\n Typeface fontBold = Typeface.createFromAsset(getApplicationContext().getAssets(),\"Bariol_Bold.otf\");\n Typeface fontRegular = Typeface.createFromAsset(getApplicationContext().getAssets(),\"Bariol_Bold.otf\");\n\n answer = (EditText) customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.contenido);\n answer.setTypeface(fontRegular);\n\n TextView textFor = (TextView) customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.textFor);\n textFor.setTypeface(fontRegular);\n\n TextView contact = (TextView) customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.contact);\n TextView phone = (TextView) customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.phone);\n\n if(!mensaje.getContactName().equals(mensaje.getPhoneNumber())) {\n contact.setText(mensaje.getContactName());\n contact.setTypeface(fontBold);\n phone.setText(mensaje.getPhoneNumber());\n phone.setTypeface(fontRegular);\n }else{\n contact.setText(mensaje.getPhoneNumber());\n contact.setTypeface(fontBold);\n phone.setText(\"Número no agendado\");\n phone.setTypeface(fontRegular);\n }\n\n\n customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.cancelar).setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View view){\n STTService.getInstance().setIsListening(false);\n commandHandlerManager.setNullCommand();\n customDialog.dismiss();\n }\n });\n customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.enviar).setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View view) {\n String smsBody=answer.getText().toString();\n if(smsBody.equals(\"\"))\n Toast.makeText(getApplicationContext(), \"Ingresá un mensaje\", Toast.LENGTH_LONG).show();\n else {\n try {\n\n SmsManager smsManager = SmsManager.getDefault();\n smsManager.sendTextMessage(mensaje.getPhoneNumber(), null, smsBody, null, null);\n if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT)\n saveInOutbox(mensaje.getPhoneNumber(), smsBody);\n Toast.makeText(getApplicationContext(), \"SMS enviado\", Toast.LENGTH_LONG).show();\n\n } catch (Exception e) {\n Toast.makeText(getApplicationContext(), \"El envío falló. Reintentá luego\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n STTService.getInstance().setIsListening(false);\n commandHandlerManager.setNullCommand();\n customDialog.dismiss();\n }\n }\n });\n customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.leer).setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View view)\n {\n final boolean isListening = STTService.getInstance().getIsListening();\n STTService.getInstance().setIsListening(false);\n\n String smsBody = answer.getText().toString();\n\n if(smsBody.equals(\"\"))\n Toast.makeText(getApplicationContext(), \"Ingresá un mensaje\", Toast.LENGTH_LONG).show();\n else {\n\n customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.cancelar).setEnabled(false);\n customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.leer).setEnabled(false);\n customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.enviar).setEnabled(false);\n\n int delay = commandHandlerManager.getTextToSpeech().speakTextWithoutStart(smsBody);\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n public void run() {\n STTService.getInstance().setIsListening(isListening);\n customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.cancelar).setEnabled(true);\n customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.leer).setEnabled(true);\n customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.enviar).setEnabled(true);\n }\n }, delay);\n }\n }\n });\n\n customDialog.show();\n\n }", "public CriarPromocaoDialog() {\n\n\t\tsetTitle(\"Nova Promoção\");\n\t\tsetBounds(500, 300, 465, 412);\n\t\tcontentPanel.setLayout(null);\n\t\tgetContentPane().setLayout(new BorderLayout());\n\t\tcontentPanel.setBackground(Color.WHITE);\n\t\tcontentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tgetContentPane().add(contentPanel, BorderLayout.CENTER);\n\t\tsetResizable(false);\n\t\tinicialize();\n\n\t}", "private void Screentocharge() {\r\n\r\n\t\t\t\t\r\n\t\tJTextField nombre = new JTextField();\r\n\t\tJTextField edad = new JTextField();\r\n\t\tJTextField raza = new JTextField();\r\n\t\tJTextField cuento = new JTextField();\r\n\t\tChoice tipo = new Choice();\r\n\t\t\t\t\t\t\r\n\t\ttipo.add(\"Perro\");\r\n\t\ttipo.add(\"Gato\");\r\n\t\ttipo.add(\"Conejo\");\r\n\t\t\r\n\t\tedad.addKeyListener(new KeyAdapter()\r\n\t\t{\r\n\t\t public void keyTyped(KeyEvent e)\r\n\t\t {\r\n\t\t char caracter = e.getKeyChar();\r\n\t\t if(((caracter<'0')||(caracter>'9'))&&(caracter!='\\b'))\r\n\t\t {\r\n\t\t e.consume(); \r\n\t\t }\r\n\t\t }\r\n\t\t});\r\n\t\t\r\n\t\tObject[] message = { \"Tipo:\", tipo, \"Nombre:\", nombre, \"Edad\", edad, \"Raza\", raza, \"Causa\", cuento };\r\n\r\n\t\tUIManager.put(\"OptionPane.minimumSize\",new Dimension(500,400));\r\n\t\tint option = JOptionPane.showConfirmDialog(null, message, \"Ingreso de Pasiente\", JOptionPane.OK_CANCEL_OPTION);\r\n\t\tif (option == JOptionPane.OK_OPTION) {\t\r\n\t\t\tif (edad.getText().equals(\"\")) {\r\n\t\t\t\tedad.setText(\"0\");\r\n\t\t\t\treturnAnimal(tipo.getSelectedItem(), nombre.getText(), raza.getText(), \r\n\t\t\t\t\t\tInteger.valueOf(edad.getText()), cuento.getText());\r\n\t\t\t}\r\n\t\t\t returnAnimal(tipo.getSelectedItem(), nombre.getText(), raza.getText(), \r\n\t\t\t\t\t\t\tInteger.valueOf(edad.getText()), cuento.getText());\r\n\t\t}\r\n\t\t\r\n\t\tnombre = null;\r\n\t\tedad =null;\r\n\t\traza = null;\r\n\t\tcuento = null;\r\n\t\ttipo =null;\r\n\t\t\r\n\t}", "@Override\n public Dialog onCreateDialog(Bundle bundle) {\n AlertDialog.Builder builder =\n new AlertDialog.Builder(getActivity());\n builder.setMessage(\n getString(R.string.results,\n totalSuposicoes,\n (1000 / (double) totalSuposicoes)));\n\n // \"Resetar Questão\" Button\n builder.setPositiveButton(R.string.reset_quiz,\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,\n int id) {\n resetQuiz();\n }\n }\n );\n\n return builder.create(); // retorna o AlertDialog\n }", "public CustomDialog(Activity context, String mensaje, String parteVerde){\n dialog = new Dialog(context);\n dialog.setCanceledOnTouchOutside(false);\n dialog.setContentView(R.layout.dialog_sucees);\n TextView tvMensError = dialog.findViewById(R.id.tvMensSucces);\n tvMensError.setText(Html.fromHtml(mensaje + \"<font color='#072146'>\" + parteVerde + \"</font>\"));\n Button tvAceptar = dialog.findViewById(R.id.tvAceptar);\n tvAceptar.setOnClickListener(v -> {\n dialog.dismiss();\n });\n }", "public VModalReimprimirFactura() {\n initComponents();\n this.setLocationRelativeTo(null);\n txtNumFactura.grabFocus();\n unaCuenta=null;\n unUsuario=null;\n usuario=null;\n clpdv = new CLPDV();\n }", "private void rejouer() {\n AlertDialog alertDialog = new AlertDialog.Builder(this).create();\n alertDialog.setTitle(getString(R.string.rejouer));\n alertDialog.setButton(AlertDialog.BUTTON_POSITIVE, getString(R.string.oui), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n initialisation();\n }\n });\n alertDialog.setButton(AlertDialog.BUTTON_NEGATIVE, getString(R.string.non), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n });\n alertDialog.show();\n\n }", "public void onClick(DialogInterface dialog, int whichButton) {\n String srt = input.getEditableText().toString();\n\n if (srt.isEmpty()) {\n Snackbar.make(mRecyclerView, \"Debe ingresar datos en el comentario\", Snackbar.LENGTH_SHORT).show(); // Don’t forget to show!\n } else {\n\n agregarComentario(new Comentario(\"\", srt, MobileServiceCustom.USUARIO_LOGUEADO.id, MyTime.getFecha(), MyTime.getHora(), ID_NOTICIA));\n }\n\n }", "void autofinanciarPoliza(AutofinanciarPolizaCancelCommand datosPoliza);", "public DialogoAggiungiFissi() {\n /* rimanda al costruttore della superclasse */\n super();\n\n\n try { // prova ad eseguire il codice\n /* regolazioni iniziali di riferimenti e variabili */\n this.inizia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "public void verificaAlteracao() {\r\n if (produto != null) {\r\n dialog.getTfNome().setText(produto.getNome());\r\n dialog.getTfCodigoBarra().setText(produto.getCodigoBarra());\r\n dialog.getTfPrecoCompra().setText(produto.getPrecoCompra().toString());\r\n dialog.getTfPrecoVenda().setText(produto.getPrecoVenda().toString());\r\n dialog.getCbCategoria().setSelectedItem(produto.getCategoriaId());\r\n dialog.getCbFornecedor().setSelectedItem(produto.getFornecedorId());\r\n }\r\n }", "@Override\n\tpublic void dialogar() {\n\t\tSystem.out.println(\"Ofrece un Discurso \");\n\t\t\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which){\n guardarUsr();\n }", "@Override\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tcheck = getActivity().getIntent().getIntExtra(\"Check\", 11);\n\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\t\tView view = getActivity().getLayoutInflater().inflate(\n\t\t\t\tR.layout.dialog_med_presc, null);\n\t\tmsg = (TextView) view.findViewById(R.id.prIddlg);\n\t\tmsg.setText(\"Prescription ID: \" + prescId);\n\t\tbuilder.setView(view)\n\t\t\t\t.setTitle(\"Do you want to Upload this Prescripion?\")\n\t\t\t\t.setPositiveButton(\"Upload\", new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\n\t\t\t\t\t\tif (check == 1) {\n\t\t\t\t\t\t\tCartDataBean cbean = Okler.getInstance()\n\t\t\t\t\t\t\t\t\t.getSingleCart();\n\t\t\t\t\t\t\tcbean.setPresc_id(prescId);\n\t\t\t\t\t\t\tOkler.getInstance().setSingleCart(cbean);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tCartDataBean cbean = Okler.getInstance()\n\t\t\t\t\t\t\t\t\t.getMainCart();\n\t\t\t\t\t\t\tcbean.setPresc_id(prescId);\n\t\t\t\t\t\t\tOkler.getInstance().setMainCart(cbean);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tIntent intent = new Intent(con,\n\t\t\t\t\t\t\t\tProductCheckoutSummary.class);\n\t\t\t\t\t\tintent.putExtra(\"Check\", check);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.setNegativeButton(\"Cancel\",\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t// Only dismiss the dialog\n\t\t\t\t\t\t\t\tdismiss();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}).create();\n\t\treturn builder.create();\n\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n View view = getActivity().getLayoutInflater().inflate(R.layout.rollback_detail_dialog, new LinearLayout(getActivity()), false);\n\n initUI(view);\n // clickEvents();\n\n /*\n assert getArguments() != null;\n voucherTypes = (ArrayList<VoucherType>) getArguments().getSerializable(\"warehouses\");\n voucherType=\"\";\n*/\n\n Dialog builder = new Dialog(getActivity());\n builder.requestWindowFeature(Window.FEATURE_NO_TITLE);\n builder.setContentView(view);\n return builder;\n\n\n }", "public void cancelarRegistro() {\n this.departamento = new Departamento();\n this.materia = new Materia();\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.execute(\"PF('MateriaCreateDlg').hide()\");\n }", "public void crearDialogo() {\r\n final PantallaCompletaDialog a2 = PantallaCompletaDialog.a(getString(R.string.hubo_error), getString(R.string.no_hay_internet), getString(R.string.cerrar).toUpperCase(), R.drawable.ic_error);\r\n a2.f4589b = new a() {\r\n public void onClick(View view) {\r\n a2.dismiss();\r\n }\r\n };\r\n a2.show(getParentFragmentManager(), \"TAG\");\r\n }", "public void btn_actualizar(View v) {\n String conteo1 = cap_1.getText().toString();\n String conteo2 = cap_2.getText().toString();\n\n if (conteo1.isEmpty()) {\n tostada(\"No haz seleccionado un registro para actualizar\").show();\n } else if (conteo2.isEmpty()) {\n tostada(\"No haz seleccionado un registro para actualizar\").show();\n } else {\n String msj = \"Seguro que deseas actualizar este registro\";\n String tipo = \"btn_actualizar\";\n DialogConfirm(msj, tipo);\n }\n }", "@Override\n protected void onPrepareDialog(int id, Dialog dialog) {\n \tToast.makeText(this, dialog.toString(), Toast.LENGTH_SHORT).show();\n }", "public Rubros(java.awt.Frame parent, boolean modal,int idpresupuesto,int quincena, int mes, int ano) {\n super(parent, modal);\n initComponents();\n this.idpresupuesto=idpresupuesto;\n this.quincena=quincena;\n this.mes=mes;\n String nmes=\"\";\n this.ano=ano; \n \n \t\n setLocationRelativeTo(null);\n \n PresupuestoDAO con;\n try {\n con = PresupuestoDAO.getInstance();\n TiposPagoSingleton tipospago_singleton = TiposPagoSingleton.getInstance();\n this.tiposp = tipospago_singleton.getTiposp();\n \n cmb_tipo_pago.setModel(new javax.swing.DefaultComboBoxModel(this.tiposp));\n cmb_tipo_pago.setSelectedItem(\"EFECTIVO\");\n }catch(SQLException e){} \n\n }", "public static void mostrarAfirmacionDeCreacion(JDialog dialogo) {\n JOptionPane.showMessageDialog(dialogo, afirmacionDeCreacion, \"BancoSoft: Mensaje\", JOptionPane.INFORMATION_MESSAGE);\n }", "@FXML\n\tpublic void onAnadirConocimiento() {\n\t\tDialog<ButtonType> dialog = new Dialog<>();\n\t\tdialog.setTitle(\"Nuevo Conocimiento\");\n\n\t\t// declaramos los tipo de botones\n\n\t\tButtonType anadirButton = new ButtonType(\"Crear\", ButtonData.OK_DONE);\n\t\tdialog.getDialogPane().getButtonTypes().addAll(anadirButton, ButtonType.CANCEL);\n\t\tStage stage = (Stage) dialog.getDialogPane().getScene().getWindow();\n\t\tstage.getIcons().add(new Image(\"dad/javafx/resources/cv64x64.png\"));\n\n\t\t// creamos los campos\n\t\tGridPane grid = new GridPane();\n\t\tgrid.setHgap(10);\n\t\tgrid.setVgap(10);\n\t\tgrid.setPadding(new Insets(20, 150, 10, 10));\n\n\t\tButton xButton = new Button(\"X\");\n\n\t\tTextField denominacionTextField = new TextField();\n\t\tLabel denominacionDialogLabel = new Label(\"Denominacion\");\n\t\tLabel nivelDialogLabel = new Label(\"Nivel\");\n\n\t\tComboBox<Nivel> nivelComboBox = new ComboBox<Nivel>();\n\n\t\tnivelComboBox.getItems().addAll(Nivel.values());\n\t\tHBox box = new HBox(nivelComboBox, xButton);\n\t\tbox.setSpacing(5);\n\n\t\tgrid.add(denominacionDialogLabel, 0, 0);\n\t\tgrid.add(denominacionTextField, 1, 0);\n\t\tgrid.add(nivelDialogLabel, 0, 1);\n\t\tgrid.add(box, 1, 1);\n\n\t\txButton.setOnAction(e -> nivelComboBox.getSelectionModel().select(-1));\n\n\t\t// activar o desactivar el boton a�adir dependiendo de si se ha a�adido un\n\t\t// numero de telefono o no\n\n\t\t// metemos el grid pane en nuestro dialog\n\t\tdialog.getDialogPane().setContent(grid);\n\n\t\txButton.setOnAction(e -> nivelComboBox.getSelectionModel().select(-1));\n\t\t\n\t\tOptional<ButtonType> result = dialog.showAndWait();\n\t\tif (result.get() == anadirButton) {\n\t\t\tConocimiento conocimiento = new Conocimiento();\n\t\t\tconocimiento.setDenominacion(denominacionTextField.getText());\n\t\t\tconocimiento.setNivel(nivelComboBox.getSelectionModel().getSelectedItem());\n\t\t\tmodel.getConocimiento().add(conocimiento);\n\t\t}\n\t}", "private void addConfirmDialog() {\n builder = UIUtil.getConfirmDialog(getContext(),\"You are about to delete data for this payment. proceed ?\");\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n boolean isDeleted = mydb.deletePayment(paymentId);\n if(isDeleted) {\n Bundle bundle = new Bundle();\n bundle.putString(\"orderId\", String.valueOf(orderId));\n FragmentViewPayments mfragment = new FragmentViewPayments();\n UIUtil.refreshFragment(mfragment,bundle, getFragmentManager());\n } else {\n Toast.makeText(getContext(),\"Error deleting data!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void confirmar(){\n\n cliente = new Cliente();\n\n if (validaCampos() == false){\n\n cliente.idade = Integer.parseInt(edtIdade.getText().toString());\n try {\n\n clienteRepositorio.inserir(cliente);\n AlertDialog.Builder dlg = new AlertDialog.Builder(this);\n finish();\n dlg.setTitle(\"Sucess\");\n dlg.setMessage(\"Cadastro realizado com sucesso\");\n dlg.setNeutralButton(\"OK\",null);\n dlg.show();\n\n }catch (SQLException ex){\n AlertDialog.Builder dlg = new AlertDialog.Builder(this);\n dlg.setTitle(\"Error\");\n dlg.setMessage(ex.getMessage());\n dlg.setNeutralButton(\"OK\",null);\n dlg.show();\n }\n }\n }", "public void agregarNuevoUsuario(){\n //recupero objeto rol usuario\n usuarioBean.getUsuario().setRol(new ListadoRoles().getListaRoles().get(1));\n usuarioBean.agregarUsuario(); \n FacesContext context = FacesContext.getCurrentInstance(); \n context.addMessage(null, new FacesMessage(\"Éxito\", \"Se agregó un Usuario correctamente.\" )); \n RequestContext.getCurrentInstance().execute(\"PF('dlgAltaUsuario').hide();\");\n }", "public abstract void initDialog();", "private void esegui() {\n /* variabili e costanti locali di lavoro */\n OperazioneMonitorabile operazione;\n\n try { // prova ad eseguire il codice\n\n /**\n * Lancia l'operazione di analisi dei dati in un thread asincrono\n * al termine il thread aggiorna i dati del dialogo\n */\n operazione = new OpAnalisi(this.getProgressBar());\n operazione.avvia();\n\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n }", "private void msgNoServidorConfigurado() {\r\n\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n\tbuilder.setMessage(R.string.txtSinServidor).setCancelable(false)\r\n\t\t.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\r\n\t\t public void onClick(DialogInterface dialog, int id) {\r\n\t\t\tListaRutasActivity.this.finish();\r\n\t\t }\r\n\t\t});\r\n\tAlertDialog alert = builder.create();\r\n\talert.show();\r\n }", "private void showConfirmClearDialog() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(getActivity());\n dialog.setTitle(res.getString(R.string.dialog_clear_sale));\n dialog.setPositiveButton(res.getString(R.string.no), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n }\n });\n\n dialog.setNegativeButton(res.getString(R.string.clear), new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n register.cancleSale();\n update();\n }\n });\n\n dialog.show();\n }", "public JDialogZonas(java.awt.Frame parent, boolean modal, Remiseria remiseria, JComboBox cmbZona, Maestro unMaestro, Operario unOperario) {\n super(parent, modal);\n this.remiseria = remiseria;\n this.cmbZona = cmbZona;\n this.unOperario = unOperario;\n this.unMaestro = unMaestro;\n this.utilidades = new Utilidad();\n initComponents();\n this.setModal(true);\n this.setLocationRelativeTo(null);\n this.cargarZonas();\n jXTaskPane1.setCollapsed(true);\n btnGuardarModificaciones.setEnabled(false);\n btnGuardarChofer.setEnabled(false);\n txtNombreZona.setEnabled(false);\n txtDescripcion.setEnabled(false);\n btnModificar.setEnabled(true);\n btnAgregar.setEnabled(true);\n btnEliminar.setEnabled(true); \n try\n {\n tablaZonas.setRowSelectionInterval(0, 0);\n }\n catch (Exception ex)\n {\n JOptionPane.showMessageDialog(null, \"No hay Zonas registradas aúx\", null, JOptionPane.WARNING_MESSAGE);\n }\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n getCariSemua();\n//\n }", "@Override\n\tpublic void pegaInstanciaDialogo(AposentadoriaCompulsoria obj) {\n\t\t\n\t}", "private void jMenuItemCentroInscripcionesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemCentroInscripcionesActionPerformed\n LOG.trace(evt.paramString());\n\n JDialogCentroInscripciones vci = new JDialogCentroInscripciones(listaDeportes);\n LOG.info(\"Launching JDialogCentroInscripciones...\");\n vci.setModalityType(modal);\n vci.setLocationRelativeTo(this);\n vci.setVisible(true);\n}", "public void abrirDialogoEspecie() {\n ModalDialogoEspecie modalDialogoEspecie = new ModalDialogoEspecie();\n modalDialogoEspecie.show(getSupportFragmentManager(), \"especie dialog\");\n }", "public DialogoAggiungiFissiConto(int codConto) {\n /* rimanda al costruttore della superclasse */\n super();\n\n try { // prova ad eseguire il codice\n\n /* regola le variabili di istanza coi parametri */\n this.setCodConto(codConto);\n\n /* regolazioni iniziali di riferimenti e variabili */\n this.inizia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "public void actualizar() {\n\n try {\n\n servtpDocumento.actualizarTipoDocumento(tipoDocumento);\n req = RequestContext.getCurrentInstance();\n req.execute(\"PF('dialogoTpDocuActualizar').hide();\");//Cierra el dialogo para actualizar\n req = null;\n tipoDocumento = new TipoDocumento();\n MensajesFaces.informacion(\"Actualizado\", \"Exitoso\");\n\n } catch (Exception e) {\n MensajesFaces.error(\"Error\", \"detalle\" + e);\n\n }\n\n }", "@Override\r\n\tpublic void dialogControyCancel() {\n\r\n\t}", "void openDialog()\n {\n if(main.copyCmd.listEvCopy.size() >0){\n widgCopy.setBackColor(GralColor.getColor(\"rd\"), 0);\n } else {\n widgCopy.setBackColor(GralColor.getColor(\"wh\"), 0);\n }\n \n windStatus.setFocus(); //setWindowVisible(true);\n\n }", "@FXML\r\n private void mostrarSolicitudes() {\r\n try {\r\n //Carga la vista \r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(Principal.class.getResource(\"/vista/MostrarRma.fxml\"));\r\n VBox vistaMostrar = (VBox) loader.load();\r\n\r\n //Crea un dialogo para mostrar la vista\r\n Stage dialogo = new Stage();\r\n dialogo.setTitle(\"Solicitudes enviadas\");\r\n dialogo.initModality(Modality.WINDOW_MODAL);\r\n dialogo.initOwner(primerStage);\r\n Scene escena = new Scene(vistaMostrar);\r\n dialogo.setScene(escena);\r\n\r\n //Annadir controlador y datos\r\n ControladorMostrarRma controlador = loader.getController();\r\n controlador.setDialogs(primerStage, dialogo);\r\n\r\n //Modifica el dialogo para que no se pueda cambiar el tamaño y lo muestra\r\n dialogo.setResizable(false);\r\n dialogo.showAndWait();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void confirmarGuardarUsr() {\n String pregunta = \"Esto seguro de realizar el registro?\";\n new AlertDialog.Builder(this)\n .setTitle(getResources().getString(R.string.msj_confirmacion))\n .setMessage(pregunta)\n .setNegativeButton(android.R.string.cancel, null)//sin listener\n .setPositiveButton(getResources().getString(R.string.lbl_aceptar),\n new DialogInterface.OnClickListener() {//un listener que al pulsar, solicite el WS de Transsaccion\n @Override\n public void onClick(DialogInterface dialog, int which){\n guardarUsr();\n }\n })\n .show();\n }", "public void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tJDialog jDialog = getPomocDialog();\n\t\t\t\t\tjDialog.setTitle(\"Pomoc\");\n\t\t\t\t\tjDialog.pack();\n\t\t\t\t\tPoint loc = getHlavneOkno().getLocation();\n\t\t\t\t\tloc.translate(20, 20);\n\t\t\t\t\tjDialog.setLocation(loc);\n\t\t\t\t\tjDialog.setVisible(true);\n\t\t\t\t\n\t\t\t\t}", "public void iniciar(String numCaso) {\n pantalla.setTitle(\"Consultar Avance de Reclamo\");\n pantalla.setLocationRelativeTo(null);\n pantalla.setVisible(true);\n pantalla.setRetorno(OTRO);\n pantalla.getTxtNumeroCaso().setText(numCaso);\n pantalla.getTxtNumeroCaso().setEnabled(false);\n pantalla.getRadioBtnDenuncia().setEnabled(false);\n pantalla.getRadioBtnReclamo().setEnabled(false);\n pantalla.getBotonConsultar().setEnabled(false);\n pantalla.getBtnSalir().setText(\"Regresar\");\n pantalla.getBtnSalir().setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Utilidades/Imagenes/iconos/dialog-apply.png\")));\n\n\n ConsultarEstadoCaso(numCaso, ExpertoConsultarAvanceDeReclamo.DENUNCIA);\n }", "public interface DialogKonstanten {\n\n String HANDBOOK_TITLE = \"Bedienungsanleitung\";\n String HANDBOOK_HEADER = \"Tastenbelegung und Menüpunkte\";\n String HANDBOOK_TEXT = \"Ein Objekt kann über den Menüpunkt \\\"File -> Load File\\\" geladen werden.\\nZu Bewegung des Objektes wird die Maus verwendet.\\nRMB + Maus: Bewegen\\nLMB + Maus: Rotieren\\nEine Verbindung zu einem anderen Programm wir über den Menüpunkt Network aufgebaut. Der Server wird gestartet indem keine IP eingegeben wird und eine Verbindung zu einem Server wird erreicht indem die jeweilige IP-Adresse in das erste Textfeld eigegeben wird.\";\n\n}", "private void creatDialog() {\n \t mDialog=new ProgressDialog(this);\n \t mDialog.setTitle(\"\");\n \t mDialog.setMessage(\"正在加载请稍后\");\n \t mDialog.setIndeterminate(true);\n \t mDialog.setCancelable(true);\n \t mDialog.show();\n \n\t}", "public void mostrarDialogoOpciones()\n {\n // Solo se muestran las opciones si la APP ya ha sido inicializada\n if (mEstadoActualAPP != EstadoAPP.CAMERA_RUNNING && mEstadoActualAPP != EstadoAPP.CAMERA_STOPPED)\n {\n return;\n }\n\n final int itemCameraFlash = 0;\n final int itemAutofocusIndex = 1;\n final int itemCameraActive = 2;\n\n AlertDialog dialogoOpciones = null;\n\n CharSequence[] items = {\tgetString(R.string.menu_flash_on),\n \t\t\t\t\tgetString(R.string.menu_contAutofocus_off), \n \t\t\t\t\tgetString(R.string.menu_contCameraBack)};\n\n // Actualizar los títulos de la lista de acuerdo al estado actual\n // de las opciones\n if (mFlash)\n items[itemCameraFlash] = (getString(R.string.menu_flash_off));\n else\n items[itemCameraFlash] = (getString(R.string.menu_flash_on));\n\n if (mContinuoAutoenfoque)\n items[itemAutofocusIndex] = (getString(R.string.menu_contAutofocus_off));\n else\n items[itemAutofocusIndex] = (getString(R.string.menu_contAutofocus_on));\n \n if(mCamaraActiva == 0)\n \titems[itemCameraActive] = (getString(R.string.menu_contCameraFront));\n else\n \titems[itemCameraActive] = (getString(R.string.menu_contCameraBack));\n\n\n AlertDialog.Builder cameraOptionsDialogBuilder = new AlertDialog.Builder(ARXylophoneBase.this);\n \n cameraOptionsDialogBuilder.setTitle(getString(R.string.menu_camera_title));\n \n cameraOptionsDialogBuilder.setItems(items,\n new DialogInterface.OnClickListener()\n {\n public void onClick(DialogInterface dialog, int item)\n {\n \tswitch(item)\n \t{\n \t\tcase(itemCameraFlash):\n \t\t\tif (setFlash(!mFlash))\n {\n mFlash = !mFlash;\n if(mFlash)\n \tUtils.crearToast(getString(R.string.toast_flash_on), ARXylophoneBase.this);\n else\n \tUtils.crearToast(getString(R.string.toast_flash_off), ARXylophoneBase.this);\n }\n \t\t\telse\n \t\t\t\tUtils.crearToast(getString(R.string.toast_flash_fallo), ARXylophoneBase.this);\n\n \tdialog.dismiss();\n \t\t\tbreak;\n \t\t\t\n \t\tcase(itemAutofocusIndex):\n \t\t\tif (mContinuoAutoenfoque)\n {\n \t\t\t\tif (setModoEnfoque(ModoEnfoque.NORMAL.ordinal()))\n {\n \t\t\t\t\tmContinuoAutoenfoque = false;\n \t\t\t\tUtils.crearToast(getString(R.string.toast_enfoque_on), ARXylophoneBase.this);\n }\n \t\t\t\telse\n \t\t\t\tUtils.crearToast(getString(R.string.toast_enfoque_fallo), ARXylophoneBase.this);\n }\n \t\t\telse\n {\n \t\t\t\tif (setModoEnfoque(ModoEnfoque.CONTINUO_AUTO.ordinal()))\n \t\t\t\t{\n \t\t\t\t\tmContinuoAutoenfoque = true;\n \t\t\t\tUtils.crearToast(getString(R.string.toast_autoenfoque_on), ARXylophoneBase.this);\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t\tUtils.crearToast(getString(R.string.toast_autoenfoque_fallo), ARXylophoneBase.this);\n }\n \t\t\n \tdialog.dismiss();\n \t\t\tbreak;\n \t\t\t\n \t\tcase(itemCameraActive):\n \tif(hasFrontCamera)\n \t{\n \t \tmCamaraActiva = mCamaraActiva == 0 ? 1 : 0;\n \t \tiniciarCamara(mCamaraActiva);\n \t}\n \telse\n \t\t\t\tUtils.crearToast(getString(R.string.toast_camara_fallo), ARXylophoneBase.this);\n \t\t\n\t dialog.dismiss();\n\t \t\tbreak;\n \t}\n }\n });\n\n dialogoOpciones = cameraOptionsDialogBuilder.create();\n dialogoOpciones.show();\n }", "@FXML\r\n private void crearSolicitud() {\r\n try {\r\n //Carga la vista de crear solicitud rma\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(Principal.class.getResource(\"/vista/CrearSolicitud.fxml\"));\r\n BorderPane vistaCrear = (BorderPane) loader.load();\r\n\r\n //Crea un dialogo para mostrar la vista\r\n Stage dialogo = new Stage();\r\n dialogo.setTitle(\"Solicitud RMA\");\r\n dialogo.initModality(Modality.WINDOW_MODAL);\r\n dialogo.initOwner(primerStage);\r\n Scene escena = new Scene(vistaCrear);\r\n dialogo.setScene(escena);\r\n\r\n //Annadir controlador y datos\r\n ControladorCrearSolicitud controlador = loader.getController();\r\n controlador.setDialog(dialogo, primerStage);\r\n\r\n //Carga el numero de Referencia\r\n int numReferencia = DAORma.crearReferencia();\r\n\r\n //Modifica el dialogo para que no se pueda cambiar el tamaño y lo muestra\r\n dialogo.setResizable(false);\r\n dialogo.showAndWait();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void dialog_returnSheet() {\n final Dialog dialog = new Dialog(ReportActivity.this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialog_return_sheet);\n dialog.getWindow().setBackgroundDrawable(getResources().getDrawable(R.drawable.transparent));\n\n TextView tv_returnDialog = dialog.findViewById(R.id.tv_returnDialog);\n tv_returnDialog.setText(return_text);\n\n DataBaseHandler dataBaseHandler = new DataBaseHandler(ReportActivity.this);\n ArrayList<ReturnSheet> preReturnSheetList = new ArrayList<>();\n preReturnSheetList = dataBaseHandler.getAllReturnSheet();\n\n TextView tv_Title = dialog.findViewById(R.id.tv_Title);\n if (preReturnSheetList.size() == 0) {\n tv_Title.setText(no_return_dialog);\n } else {\n tv_Title.setText(has_return_dialog);\n }\n\n\n ListView lv_preReturnSheet = dialog.findViewById(R.id.lv_preReturnSheet);\n PreReturnSheetAdapter preEntranceSheetAdapter = new PreReturnSheetAdapter(ReportActivity.this, preReturnSheetList, dialog);\n lv_preReturnSheet.setAdapter(preEntranceSheetAdapter);\n\n Button bt_AddReturnSheet = dialog.findViewById(R.id.bt_AddReturnSheet);\n bt_AddReturnSheet.setText(add_new_return_process);\n bt_AddReturnSheet.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n dialog_AddReturnSheet();\n dialog.dismiss();\n dialog.cancel();\n }\n });\n\n dialog.setCancelable(true);\n dialog.show();\n }", "private void show_input() {\n clear();\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"ادخل رقم البطاقة\");\n\n// Set up the input\n final EditText input = new EditText(this);\n// Specify the type of input expected; this, for example, sets the input as a password, and will mask the text\n input.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_TEXT_VARIATION_PASSWORD);\n builder.setView(input);\n\n// Set up the buttons\n builder.setPositiveButton(\"تم\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n String Customer_id = input.getText().toString();\n getMenuID_Card(getCardURL, Customer_id);\n Log.d(\"karrar\", \"getMenuID_Card func \" + Customer_id);\n session.setScanfor(\"0\");\n\n }\n });\n// builder.setNegativeButton(\"الغاء\", new DialogInterface.OnClickListener() {\n// @Override\n// public void onClick(DialogInterface dialog, int which) {\n// dialog.cancel();\n// }\n// });\n\n builder.show();\n }", "@Override\n\tpublic void onCardComfrim() {\n\t\tdialog = MessageUtils.showCommonDialog(\n\t\t\t\tactivity, \n\t\t\t\tactivity.getText(R.string.common_cardno_comfirm).toString(),\n\t\t\t\tbean.getPan(), \n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t// 确认\n\t\t\t\t\t\tdissmiss();\n\t\t\t\t\t\tonSucess();\n\t\t\t\t\t}\n\t\t\t\t}, \n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t// 取消\n\t\t\t\t\t\tdissmiss();\n\t\t\t\t\t\tonFail();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t30,\n\t\t\t\tTimeOutOper.CANCEL\n\t\t\t\t);\n\t}", "public void showConfirmDialog() {\n mDialogClickInterface = (DialogueInterface) mContext;\n final Dialog dialog = new Dialog(mContext);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialogue_modify);\n Button buttonCancel = dialog.findViewById(R.id.btn_cancel);\n Button buttonOK = dialog.findViewById(R.id.btn_ok);\n final RadioGroup radioGroupLanguage = dialog.findViewById(R.id.radio_group);\n\n\n\n\n dialog.setCancelable(true);\n dialog.show(); // if decline button is clicked, close the custom dialog\n buttonCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Close dialog\n mDialogClickInterface.onLanguageSelected(dialog);\n }\n });\n buttonOK.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Close dialog\n int selectedId = radioGroupLanguage.getCheckedRadioButtonId();\n\n switch (selectedId) {\n\n case R.id.rb_arabic:\n view.editItem(listModel,index);\n break;\n case R.id.rb_english:\n view.deleteItem(listModel);\n break;\n }\n mDialogClickInterface.onLanguageSelected(dialog);\n }\n });\n\n }", "@Override\n public void onCancel(DialogInterface dialog) {\n }", "public void estableceEquipoComputo() {\n\tsetDispositivo(JOptionPane.showInputDialog(\"Ingrese el nombre del dispositivo a adquirir\"));\n\tsetComercio(JOptionPane.showInputDialog(\"Ingrese el nombre del comercio donde lo comprara\"));\n}", "public static void mensagemRealizarCadastro() {\n\t\tJOptionPane.showMessageDialog(null, \"Favor clique em atualizar para re-listar e selecionar o novo item recem cadastrado.\", \"Informação\", JOptionPane.INFORMATION_MESSAGE, new ImageIcon(Toolkit.getDefaultToolkit().getImage(CadastroQuartos.class.getResource(\"/Imagens/Informacao32.png\"))));\n\t}", "private void modositodialog(){\n mennyisegmodositodialog.setTargetFragment(Targyleirasreszletek.this,9999);\n mennyisegmodositodialog.show(getFragmentManager(),\"TargyMennyisegModositoDialog\");\n }", "@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n //EditText vacìo.\n\n etCardName.setText(\"\");\n etCardCVV.setText(\"\");\n etCardNumber.setText(\"\");\n etCardValidThru.setText(\"\"); //esperame miro el codigo\n\n Toast.makeText(getApplicationContext(),\"Pagado Exitosamente\",Toast.LENGTH_SHORT).show();\n Toast.makeText(getApplicationContext(),\"Brindanos tus Comentarios Para Nuestras Mejoras\",Toast.LENGTH_SHORT).show();\n //aqui pegas el codigo para abrir la otra activity\n startActivity(new Intent(Pago.this,Coomentarios.class));\n finish();\n\n\n//si ya sale amigo solo le agregare un evento mas q me envie a una nueva actividad desde el mismo si\n\n\n }", "public void alertDialogBasico() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n\r\n // 2. Encadenar varios métodos setter para ajustar las características del diálogo\r\n builder.setMessage(R.string.dialog_message);\r\n\r\n\r\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n\r\n }\r\n });\r\n\r\n\r\n builder.show();\r\n\r\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n actualizar_administrador();\n aceptoCambios.aceptar(administrador, especialidades);\n dismiss();\n }", "@Override\r\n\t protected void onPrepareDialog(int id, Dialog dialog) {\n\t switch(id){\r\n\t case(ID_SCREENDIALOG):\r\n\t \tdialog.setTitle(\"Job Details\");\r\n\t \tButton myButton = new Button(this);\r\n\t \tmyButton.setText(\"Cancel\");\r\n\t \tmyButton.setBackgroundColor(Color.parseColor(\"#ff4c67\"));\r\n\t \tmyButton.setTextColor(Color.parseColor(\"#ffffff\"));\r\n\t \tRelativeLayout datlis = (RelativeLayout)screenDialog.findViewById(R.id.datalist01);\r\n\t \tLayoutParams lp = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);\r\n\t \tlp.addRule(RelativeLayout.BELOW, list.getId());\r\n\t \tdatlis.addView(myButton, lp);\r\n\t \tmyButton.setOnClickListener(dismissscreen);\r\n\t \t\r\n\t break;\r\n\t }\r\n\t }", "@FXML\n\tpublic void onAnadirIdioma() {\n\t\tDialog<ButtonType> dialog = new Dialog<>();\n\t\tdialog.setTitle(\"Nuevo Conocimiento\");\n\n\t\t// declaramos los tipo de botones\n\n\t\tButtonType anadirButton = new ButtonType(\"Crear\", ButtonData.OK_DONE);\n\t\tdialog.getDialogPane().getButtonTypes().addAll(anadirButton, ButtonType.CANCEL);\n\t\tStage stage = (Stage) dialog.getDialogPane().getScene().getWindow();\n\t\tstage.getIcons().add(new Image(\"dad/javafx/resources/cv64x64.png\"));\n\n\t\t// creamos los campos\n\t\tGridPane grid = new GridPane();\n\t\tgrid.setHgap(10);\n\t\tgrid.setVgap(10);\n\t\tgrid.setPadding(new Insets(20, 150, 10, 10));\n\n\t\tButton xButton = new Button(\"X\");\n\n\t\tTextField denominacionTextField = new TextField();\n\t\tTextField certificacionTextField = new TextField();\n\t\tLabel certificacionLabel = new Label(\"Certificacion\");\n\t\tLabel denominacionDialogLabel = new Label(\"Denominacion\");\n\t\tLabel nivelDialogLabel = new Label(\"Nivel\");\n\n\t\tComboBox<Nivel> nivelComboBox = new ComboBox<Nivel>();\n\t\tnivelComboBox.getItems().addAll(Nivel.values());\n\t\tHBox box = new HBox(nivelComboBox, xButton);\n\t\tbox.setSpacing(5);\n\n\t\tgrid.add(denominacionDialogLabel, 0, 0);\n\t\tgrid.add(denominacionTextField, 1, 0);\n\t\tgrid.add(nivelDialogLabel, 0, 1);\n\t\tgrid.add(box, 1, 1);\n\t\tgrid.add(certificacionLabel, 0, 2);\n\t\tgrid.add(certificacionTextField, 1, 2);\n\n\t\txButton.setOnAction(e -> nivelComboBox.getSelectionModel().select(-1));\n\n\t\t// activar o desactivar el boton a�adir dependiendo de si se ha a�adido un\n\t\t// numero de telefono o no\n\n\t\t// metemos el grid pane en nuestro dialog\n\t\tdialog.getDialogPane().setContent(grid);\n\n\t\t// accion al apretar a�adir button\n\n\t\tOptional<ButtonType> result = dialog.showAndWait();\n\t\tif (result.get() == anadirButton) {\n\t\t\tIdioma idioma = new Idioma();\n\t\t\tidioma.setCertificacion(certificacionTextField.getText());\n\t\t\tConocimiento conocimiento = new Conocimiento();\n\t\t\tconocimiento.setDenominacion(denominacionTextField.getText());\n\t\t\tconocimiento.setNivel(nivelComboBox.getValue());\n\t\t\tconocimiento.setIdioma(idioma);\n\t\t\tmodel.conocimientoProperty().add(conocimiento);\n\t\t}\n\t}", "private void MessageDialog(String message, String pTitulo, String pLabelBoton){ // mostrar mensaje emergente\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()).setMessage(message).setTitle(pTitulo).setPositiveButton(pLabelBoton, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n return;\n }\n });\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "private void dialogshow(String title, String msg) {\n\n AlertDialog.Builder builder =\n new AlertDialog.Builder(this, R.style.AppCompatAlertDialogStyle);\n builder.setTitle(title);\n builder.setMessage(msg);\n builder.setCancelable(false);\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if (acc1.equals(\"no\")) {\n// sendacktorider();\n Intent fare = new Intent(SlideMainActivity.this, SlideMainActivity.class);\n fare.putExtra(\"userid\", User_id);\n fare.putExtra(\"fbuserproimg\", fbuserproimg);\n fare.putExtra(\"whologin\", WhoLogin);\n fare.putExtra(\"password\", checkpassword);\n startActivity(fare);\n finish();\n }\n dialog.cancel();\n }\n });\n\n builder.show();\n\n }", "DialogResult show();", "@Override\n protected Dialog onCreateDialog(int id) {\n final Dialog dialog;\n dialog = new AlertDialog.Builder(this).setMessage(\n \"Are you sure you want to delete \" + listOfMyPalaces.getPalace(palacePosition).getName() + \" ?\")\n .setCancelable(false)\n .setPositiveButton(\"Yes\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n System.out.println(listOfMyPalaces + \" \" + palacePosition);\n listOfMyPalaces.deletePalace(palacePosition, getApplicationContext());\n finish();\n startActivity(new Intent(MyPalaceDetail.this, ViewPalaceList.class));\n }\n })\n .setNegativeButton(\"No\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n\n }\n }).create();\n return dialog;\n\n }", "private void changeBioDialog() {\n\n AlertDialog.Builder alert;\n alert = new AlertDialog.Builder(this,R.style.Theme_MaterialComponents_Dialog_Alert);\n LayoutInflater inflater = getLayoutInflater();\n\n View view = inflater.inflate(R.layout.change_bio_dialog,null);\n\n changeBio = view.findViewById(R.id.change_bio);\n bCancel = view.findViewById(R.id.b_cancel);\n bSave = view.findViewById(R.id.b_save);\n\n alert.setView(view);\n alert.setCancelable(false);\n\n AlertDialog dialog = alert.create();\n dialog.getWindow().setBackgroundDrawableResource(R.color.transparent);\n\n dialog.show();\n\n bSave.setOnClickListener(v -> {\n txtBio = changeBio.getText().toString().trim();\n if(TextUtils.isEmpty(txtBio)){\n Toast.makeText(UserActivity.this, \"Your bio is empty\" , Toast.LENGTH_SHORT).show();\n dialog.dismiss();\n }\n else {\n updateUserBio(txtBio);\n dialog.dismiss();\n }\n });\n\n bCancel.setOnClickListener(v -> dialog.dismiss());\n }", "public Dialog onCreateDialogSingleChoice() {\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n \t//Source of the data in the DIalog\n \t\n\n \t// Set the dialog title\n \tbuilder.setTitle(R.string.dtitle)\n \t// Specify the list array, the items to be selected by default (null for none),\n \t// and the listener through which to receive callbacks when items are selected\n \t.setSingleChoiceItems(items, choice, new DialogInterface.OnClickListener() {\n\n \t@Override\n \tpublic void onClick(DialogInterface dialog, int which) {\n \t// TODO Auto-generated method stub\n myPref.setSummary(items[which]);\n switch(which)\n {\n case 0:\n editor.putInt(\"Theme\",R.style.AppThemeRed);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 1:\n editor.putInt(\"Theme\",R.style.AppThemeBlue);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 2:\n editor.putInt(\"Theme\",R.style.AppThemePurple);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 3:\n editor.putInt(\"Theme\",R.style.AppThemeGreen);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 4:\n editor.putInt(\"Theme\",R.style.AppThemeOrange);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 5:\n editor.putInt(\"Theme\",R.style.AppThemeGrey);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n }\n\n \t}\n \t})\n\n \t// Set the action buttons\n \t.setPositiveButton(R.string.dok, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n // User clicked OK, so save the result somewhere\n // or return them to the component that opened the dialog\n //Preferences.restart();\n //theme = sharedPreferences.getInt(\"Theme\", R.style.AppThemeRed);\n startActivity(new Intent(context, Preferences.class));\n }\n })\n \t.setNegativeButton(R.string.dcancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n\n \treturn builder.create();\n \t}", "@Override\n\tpublic void onCancel(DialogInterface dialog) {\n\t\tBase.car_v.wzQueryDlg = null;\n\t}", "public void Sair() {\r\n\t\t\t\r\n\t\t\tnome = JOptionPane.showInputDialog(\"Informe o seu nome ou SAIR para finalizar\");\r\n }", "private Dialog recreateDialog() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(OptionActivity.this);\n builder.setMessage(\"Do you want to change your profile?\")\n .setPositiveButton(\"Yah!\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Intent intent = new Intent(OptionActivity.this, amountscreen.class);\n startActivity(intent);\n }\n })\n .setNegativeButton(\"Nope\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tConfirmDialog.show(UI.getCurrent(), MESSAGE_1,\"\",\"Aceptar\",\"Crear mas Usuarios\",\n\t\t\t\t new ConfirmDialog.Listener() {\n\n\t\t\t\t public void onClose(ConfirmDialog dialog) {\t\n\t\t\t\t \tent= false;\n\t\t\t\t if (dialog.isConfirmed()) {\n\t\t\t\t // Confirmed to continue\t\n\t\t\t\t \tc.navegar((StartView.VIEW_NAME));\n\t\t\t\t } else {\n\t\t\t\t // User did not confirm\t\t\t \n\t\t\t\t \t//c.crearWindow(RegistrarUser.VIEW_NAME);\n\t\t\t\t \tc.navegar((StartView.VIEW_NAME));\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t });\n\t\t\t\t\n\t\t\t\t//Notification nota= new Notification(\"Registro Exitoso!\",Notification.Type.HUMANIZED_MESSAGE);\n\t\t\t\t//nota.setDelayMsec(-1);\n\t\t\t\t//nota.show(Page.getCurrent());\t\n\t\t\t\t\n\t\t\t\tclose();\t\t\t\n\t\t\t}", "public void diler(View view) {\n//dialogi stexcman mek ayl dzev en kirarel\n dialog_diler.show();\n }", "public String pedirDato() \r\n\t{\r\n\t\treturn (JOptionPane.showInputDialog(null,\"Ingrese un dato\",\"Titulo del InputDialog\",JOptionPane.INFORMATION_MESSAGE));\r\n\t}", "public void choixDeJeu () {\n\t\t//Affichage d'une fenetre qui permet de choisir entre un labyrinthe genere aleatoirement et un fichier txt\n\t\tString[] choixPossibles = {\"Generer un labyrinthe aleatoirement\", \"Ouvrir un labyrinthe en .txt\"};\n\t\tString choix = (String)JOptionPane.showInputDialog(null, \"Que voulez-vous faire ?\", \"Labyrinthe\", JOptionPane.QUESTION_MESSAGE, new ImageIcon(getClass().getResource(\"/images/icone.gif\")), choixPossibles, choixPossibles[0]);\n\t\t\n\t\t//Si le bouton \"Annuler\" n'est pas presse\n\t\tif (choix != null) {\n\t\t\t//Affichage d'une fenetre qui permet de choisir le theme du jeu\n\t\t\tString[] choixTheme = {\"Theme par defaut\", \"Theme d'ancien labyrinthe en pierre\", \"Theme de The legend of zelda\", \"Theme de Métroid\", \"Theme d'incendie dans un batiment\", \"Theme de Mario\"};\n\t\t\tString theme = (String)JOptionPane.showInputDialog(null, \"Quel theme voulez-vous ?\", \"Choix du theme\", JOptionPane.QUESTION_MESSAGE, new ImageIcon(getClass().getResource(\"/images/icone.gif\")), choixTheme, choixTheme[1]);\n\n\t\t\t//Si le bouton \"Annuler\" n'est pas presse\n\t\t\tif (theme != null) {\n\t\t\t\t\n\t\t\t\t//Enregistrement du theme et changement de la couleur de fond de la fenetre.\t\n\t\t\t\tswitch (theme) {\n\t\t\t\tcase \"Theme par defaut\" : \n\t\t\t\t\tthemeJeu = 0;\n\t\t\t\t\tgrille.setBackground(new Color(91, 60, 17));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Theme de The legend of zelda\" : \n\t\t\t\t\tthemeJeu = 2; \n\t\t\t\t\tgrille.setBackground(Color.BLACK);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Theme de Métroid\" : \n\t\t\t\t\tthemeJeu = 3; \n\t\t\t\t\tgrille.setBackground(Color.white);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Theme d'incendie dans un batiment\" : \n\t\t\t\t\tthemeJeu = 4; \n\t\t\t\t\tgrille.setBackground(new Color(61, 43, 31));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Theme de Mario\" : \n\t\t\t\t\tthemeJeu = 5; \n\t\t\t\t\tgrille.setBackground(Color.cyan);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\tthemeJeu = 1;\n\t\t\t\t\tgrille.setBackground(new Color(69, 69, 69));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t//Si l'utilisateur a choisi d'ouvrir un fichier texte\n\t\t\t\tif (choix.equals(\"Ouvrir un labyrinthe en .txt\")) {\t\t\t\t\n\t\t\t\t\t//On ouvre un explorateur qui permet de ne selectionner que des fichiers .txt\n\t\t\t\t\tJFileChooser exploreur = new JFileChooser();\n\t\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\".txt\", \"txt\");\n\t\t\t\t\texploreur.setFileFilter(filter);\n\t\t\t\t\texploreur.setAcceptAllFileFilterUsed(false);\n\t\t\t\t\tint valeurRetournee = exploreur.showOpenDialog(null);\n\n\t\t\t\t\t//Si le fichier est correct, on enregistre le nom de ce dernier, et on initie une partie.\n\t\t\t\t\tif (valeurRetournee == JFileChooser.APPROVE_OPTION) {\n\t\t\t\t\t\tpartie.fichier = exploreur.getSelectedFile().getPath();\n\t\t\t\t\t\tpartie.largeur = 0;\n\t\t\t\t\t\tpartie.hauteur = 0;\n\t\t\t\t\t\tpartie.nbFilons = 0;\n\t\t\t\t\t\tinitialisation();\n\t\t\t\t\t}\n\t\t\t\t\t//Sinon, on quitte le programme.\n\t\t\t\t\tif (valeurRetournee == JFileChooser.CANCEL_OPTION) {\n\t\t\t\t\t\tpartie.quitter();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Si l'utilisateur a choisi de generer un labyrinthe aleatoirement\n\t\t\t\telse {\n\t\t\t\t\t//On cree une nouvelle fenetre\n\t\t\t\t\tJFrame fenetreDimensions = new JFrame();\n\n\t\t\t\t\t//On cree un premier panneau qui contient un texte et un slider afin de regler la hauteur du labyrinthe\n\t\t\t\t\tJPanel panneauHauteur = new JPanel();\n\t\t\t\t\tJLabel labelHauteur = new JLabel(\"25 cases :\");\n\t\t\t\t\tJSlider sliderHauteur = new JSlider();\t\t\t\t\n\t\t\t\t\tsliderHauteur.setMaximum(21);\n\t\t\t\t\tsliderHauteur.setMinimum(6);\n\t\t\t\t\tsliderHauteur.setValue(13);\n\t\t\t\t\tsliderHauteur.addChangeListener(new ChangeListener(){\n\t\t\t\t\t\t//Action liee au deplacement du slider\n\t\t\t\t\t\tpublic void stateChanged(ChangeEvent event){\n\t\t\t\t\t\t\tlabelHauteur.setText(2*((JSlider)event.getSource()).getValue()-1 + \" cases :\");\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tpanneauHauteur.setBorder(BorderFactory.createTitledBorder(\"Hauteur du labyrinthe\"));\n\t\t\t\t\tpanneauHauteur.add(labelHauteur);\n\t\t\t\t\tpanneauHauteur.add(sliderHauteur);\n\n\t\t\t\t\t//On cree un second panneau qui contient un texte et un slider afin de regler la largeur du labyrinthe\n\t\t\t\t\tJPanel panneauLargeur = new JPanel();\n\t\t\t\t\tJLabel labelLargeur = new JLabel(\"25 cases :\");\n\t\t\t\t\tJSlider sliderLargeur = new JSlider();\n\t\t\t\t\tsliderLargeur.setMaximum(38);\n\t\t\t\t\tsliderLargeur.setMinimum(6);\n\t\t\t\t\tsliderLargeur.setValue(13);\n\t\t\t\t\tsliderLargeur.addChangeListener(new ChangeListener(){\n\t\t\t\t\t\tpublic void stateChanged(ChangeEvent event){\n\t\t\t\t\t\t\t//Action liee au deplacement du slider\n\t\t\t\t\t\t\tlabelLargeur.setText(2*((JSlider)event.getSource()).getValue()-1 + \" cases :\");\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tpanneauLargeur.setBorder(BorderFactory.createTitledBorder(\"Largeur du labyrinthe\"));\n\t\t\t\t\tpanneauLargeur.add(labelLargeur);\n\t\t\t\t\tpanneauLargeur.add(sliderLargeur);\n\n\t\t\t\t\t//On cree un bouton \"Continuer\"\n\t\t\t\t\tJButton boutonContinuer = new JButton(\"Continuer\");\n\t\t\t\t\tboutonContinuer.addActionListener(new ActionListener() {\n\t\t\t\t\t\t//Action liee a l'appui sur le bouton \"continuer\"\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\t//On efface la fenetre precedente et on en recree une\n\t\t\t\t\t\t\tfenetreDimensions.dispose();\n\t\t\t\t\t\t\tJFrame fenetreFilons = new JFrame();\n\n\t\t\t\t\t\t\t//On enregistre les valeurs des sliders precedents\n\t\t\t\t\t\t\tpartie.largeur = 2*sliderLargeur.getValue()-1;\n\t\t\t\t\t\t\tpartie.hauteur = 2*sliderHauteur.getValue()-1;\n\n\t\t\t\t\t\t\t//On cree un nouveau panneau qui contient un texte et un slider afin de regler le nombre de filons\n\t\t\t\t\t\t\tJPanel panneauFilons = new JPanel();\n\t\t\t\t\t\t\tJLabel labelFilons = new JLabel(1 + \" filon(s) :\");\n\t\t\t\t\t\t\tJSlider sliderFilons = new JSlider();\n\t\t\t\t\t\t\tsliderFilons.setMinimum(0);\n\t\t\t\t\t\t\tsliderFilons.setMaximum((partie.largeur*partie.hauteur-partie.largeur-partie.hauteur+3)/4);\n\t\t\t\t\t\t\tsliderFilons.setValue(1);\n\t\t\t\t\t\t\tsliderFilons.setMajorTickSpacing((partie.largeur*partie.hauteur-partie.largeur-partie.hauteur+3)/8);\n\t\t\t\t\t\t\tsliderFilons.setPaintTicks(true);\n\t\t\t\t\t\t\tsliderFilons.setPaintLabels(true);\n\t\t\t\t\t\t\tsliderFilons.addChangeListener(new ChangeListener(){\n\t\t\t\t\t\t\t\tpublic void stateChanged(ChangeEvent event) {\n\t\t\t\t\t\t\t\t\t//Action liee au deplacement du slider\n\t\t\t\t\t\t\t\t\tlabelFilons.setText(((JSlider)event.getSource()).getValue() + \" filons :\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tpanneauFilons.setBorder(BorderFactory.createTitledBorder(\"Nombre de filons\"));\t\n\t\t\t\t\t\t\tpanneauFilons.add(labelFilons);\n\t\t\t\t\t\t\tpanneauFilons.add(sliderFilons);\t\n\n\t\t\t\t\t\t\t//On cree un bouton \"Jouer\"\n\t\t\t\t\t\t\tJButton boutonJouer = new JButton(\"Jouer\");\n\t\t\t\t\t\t\tboutonJouer.addActionListener(new ActionListener() {\n\t\t\t\t\t\t\t\t//Action liee a l'appui sur le bouton \"jouer\"\n\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\t\t\tfenetreFilons.dispose();\n\t\t\t\t\t\t\t\t\tpartie.nbFilons = sliderFilons.getValue();\n\t\t\t\t\t\t\t\t\tinitialisation();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t//On cree un bouton \"Annuler\"\n\t\t\t\t\t\t\tJButton annulerFilons = new JButton(\"Annuler\");\n\t\t\t\t\t\t\tannulerFilons.addActionListener(new ActionListener() {\n\t\t\t\t\t\t\t\t//Action liee a l'appui sur le bouton \"jouer\"\n\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\t\t\tfenetreFilons.dispose();\n\t\t\t\t\t\t\t\t\tpartie.quitter();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t//On cree un panneau recueillant deux bontons\n\t\t\t\t\t\t\tJPanel boutonsFilons = new JPanel();\n\t\t\t\t\t\t\tboutonsFilons.add(boutonJouer);\n\t\t\t\t\t\t\tboutonsFilons.add(annulerFilons);\t\n\n\t\t\t\t\t\t\t//On parametre la fenetre et agence les differents panneaux, puis on l'affiche\n\t\t\t\t\t\t\tfenetreFilons.setSize(320, 140);\n\t\t\t\t\t\t\tfenetreFilons.setTitle(\"Choix du nombre de filons\");\n\t\t\t\t\t\t\tfenetreFilons.setIconImage(new ImageIcon(getClass().getResource(\"/images/icone.gif\")).getImage());\n\t\t\t\t\t\t\tfenetreFilons.setLocationRelativeTo(null);\n\t\t\t\t\t\t\tfenetreFilons.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\t\t\t\tfenetreFilons.getContentPane().add(panneauFilons, BorderLayout.CENTER);\n\t\t\t\t\t\t\tfenetreFilons.getContentPane().add(boutonsFilons, BorderLayout.SOUTH);\n\t\t\t\t\t\t\tfenetreFilons.setVisible(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t//On cree un bouton \"Annuler\"\n\t\t\t\t\tJButton annulerDimension = new JButton(\"Annuler\");\n\t\t\t\t\tannulerDimension.addActionListener(new ActionListener() {\n\t\t\t\t\t\t//Un appui sur le bouton \"annuler\" quitte le jeu\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tfenetreDimensions.dispose();\n\t\t\t\t\t\t\tpartie.quitter();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t//On cree un panneau recueillant deux bontons\n\t\t\t\t\tJPanel boutonsDimensions = new JPanel();\n\t\t\t\t\tboutonsDimensions.add(boutonContinuer);\n\t\t\t\t\tboutonsDimensions.add(annulerDimension);\t\n\n\t\t\t\t\t//On parametre la fenetre et agence les differents panneaux, puis on l'affiche\n\t\t\t\t\tfenetreDimensions.setSize(575, 120);\n\t\t\t\t\tfenetreDimensions.setTitle(\"Choix des dimensions du labyrinthe\");\n\t\t\t\t\tfenetreDimensions.setIconImage(new ImageIcon(getClass().getResource(\"/images/icone.gif\")).getImage());\n\t\t\t\t\tfenetreDimensions.setLocationRelativeTo(null);\n\t\t\t\t\tfenetreDimensions.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\t\tfenetreDimensions.getContentPane().add(panneauHauteur, BorderLayout.EAST);\n\t\t\t\t\tfenetreDimensions.getContentPane().add(panneauLargeur, BorderLayout.WEST);\n\t\t\t\t\tfenetreDimensions.getContentPane().add(boutonsDimensions, BorderLayout.SOUTH);\n\t\t\t\t\tfenetreDimensions.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Un appui sur le bouton \"annuler\" quitte le jeu\n\t\t\telse {\n\t\t\t\tpartie.quitter();\n\t\t\t}\n\t\t}\n\t\t//Un appui sur le bouton \"annuler\" quitte le jeu\n\t\telse {\n\t\t\tpartie.quitter();\n\t\t}\n\t}", "private void CargaInicial() {\r\n this.setTitle(\"\" + gui.getTitle().concat(\"\").concat(\" - [Modulo: Precio por Producto/Servicio]\"));\r\n }", "public CustomDialog(Activity context, String mensaje, String parteVerde, Runnable aceptar){\n dialog = new Dialog(context);\n dialog.setCanceledOnTouchOutside(false);\n dialog.setContentView(R.layout.dialog_sucees);\n TextView tvMensError = dialog.findViewById(R.id.tvMensSucces);\n tvMensError.setText(Html.fromHtml(mensaje + \"<font color='#072146'>\" + parteVerde + \"</font>\"));\n Button tvAceptar = dialog.findViewById(R.id.tvAceptar);\n tvAceptar.setOnClickListener(v -> {\n context.runOnUiThread(aceptar);\n dialog.dismiss();\n } );\n }", "public void mostrarDetallesCompra(View view) {\n AlertDialog alertDialog = new AlertDialog.Builder(context).create();\n LayoutInflater inflater = this.getLayoutInflater();\n View dialogView = inflater.inflate(R.layout.dialog_detalles_compra, null);\n alertDialog.setView(dialogView);\n TextView textViewTotal = (TextView) dialogView.findViewById(R.id.total);\n textViewTotal.append(compraEncontrada.getTotal());\n\n TextView textViewSubtotal = (TextView) dialogView.findViewById(R.id.subtotal);\n textViewSubtotal.append(compraEncontrada.getSubtotal());\n\n\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n //Salir\n ActividadBusquedaPersona actividad = (ActividadBusquedaPersona) Cotexto;\n actividad.finish();\n\n ContentValues valores2 = new ContentValues();\n valores2.put(ContratoDbCmacIca.PersFteIngresoTable.cPersFIPersCod,persel.getcPersCod());\n valores2.put(ContratoDbCmacIca.PersFteIngresoTable.cRazSocDescrip,persel.getcPersNombre());\n valores2.put(ContratoDbCmacIca.PersFteIngresoTable.cRazSocDirecc,persel.getcDireccion());\n valores2.put(ContratoDbCmacIca.PersFteIngresoTable.cPersOcupacion,\"\");\n\n valores2.put(ContratoDbCmacIca.PersFteIngresoTable.nEstadoOpe,\"1\");\n new UConsultas.TareaUpdateFteIngreso(Cotexto.getContentResolver(),valores2,IdPersFteIngreso)\n .execute();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tpd = ProgressDialog.show(Evento.this, \"ENVIAR\", \"ESPERE UN MOMENTO\");\n\t\t\tpd.setCancelable(false);\n\t\t}" ]
[ "0.7354818", "0.689009", "0.6819371", "0.6763522", "0.6679262", "0.6627161", "0.66146606", "0.65613186", "0.6559717", "0.64869183", "0.64617836", "0.6443606", "0.6435228", "0.64081573", "0.6396404", "0.6382082", "0.63686734", "0.6344747", "0.63317835", "0.6315938", "0.63158846", "0.63062334", "0.6304871", "0.6301734", "0.62775654", "0.626902", "0.6257811", "0.6245819", "0.6243863", "0.6234819", "0.62344897", "0.6230091", "0.62298", "0.6226098", "0.6222226", "0.6218181", "0.6217111", "0.62133276", "0.6211073", "0.6200874", "0.619966", "0.61982894", "0.6190821", "0.61756146", "0.6172701", "0.6170786", "0.6156571", "0.61557025", "0.61519784", "0.6149847", "0.6136048", "0.6134281", "0.6129604", "0.6128871", "0.61180294", "0.61163414", "0.6115694", "0.61151934", "0.61096364", "0.608284", "0.60819364", "0.60808975", "0.6079982", "0.60697997", "0.6069706", "0.60599154", "0.6055623", "0.60457546", "0.60348916", "0.6022106", "0.60177344", "0.60158455", "0.60125846", "0.6011177", "0.6002012", "0.60003525", "0.60000926", "0.5996622", "0.59949887", "0.59908503", "0.5989125", "0.59889287", "0.59883714", "0.59821343", "0.5971378", "0.5971296", "0.5971113", "0.596997", "0.59664273", "0.59645075", "0.59614056", "0.5959352", "0.5951398", "0.5950032", "0.5943186", "0.5937476", "0.5933582", "0.592975", "0.5925014", "0.59214073", "0.5920969" ]
0.0
-1
nasty bit of legacy here
public String getUid() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void method_4270() {}", "protected boolean func_70814_o() { return true; }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "protected boolean func_70041_e_() { return false; }", "public abstract void mo56925d();", "Compatibility compatibility();", "private void m50366E() {\n }", "private void kk12() {\n\n\t}", "public abstract void mo6549b();", "public abstract void mo27385c();", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public abstract Object mo26777y();", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "private stendhal() {\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public abstract void mo2624j();", "public abstract String mo13682d();", "public abstract String mo41079d();", "public final void mo51373a() {\n }", "public abstract void mo27386d();", "public void smell() {\n\t\t\n\t}", "public abstract void mo30696a();", "private void strin() {\n\n\t}", "public abstract String mo9239aw();", "private void level7() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "@Deprecated\n\tprivate void oldCode()\n\t{\n\t}", "public void mo38117a() {\n }", "public abstract String mo118046b();", "void m1864a() {\r\n }", "public abstract void mo53562a(C18796a c18796a);", "public final void mo91715d() {\n }", "void mo57277b();", "public abstract int mo9754s();", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public void m23075a() {\n }", "@Override\n\tpublic void jugar() {}", "public abstract void mo35054b();", "@Override\n public void perish() {\n \n }", "public abstract void mo42331g();", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "void mo72113b();", "@Override\n\tprotected void interr() {\n\t}", "public abstract void mo27464a();", "public abstract Object mo1771a();", "public void func_70305_f() {}", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "public abstract boolean mo9234ar();", "public abstract String mo11611b();", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public abstract String mo83558a(Object obj);", "public abstract void mo42329d();", "public boolean method_2453() {\r\n return false;\r\n }", "public Unsafe method_4123() {\n return null;\n }", "protected abstract T mo2623i();", "public void mo21787L() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public boolean method_2434() {\r\n return false;\r\n }", "public abstract int mo9753r();", "abstract String mo1747a(String str);", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public abstract String mo41086i();", "public abstract void mo42330e();", "public void mo23813b() {\n }", "public abstract int mo8526p();", "public void mo21825b() {\n }", "public void mo12628c() {\n }", "public abstract String mo9751p();", "public abstract long mo9229aD();", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public void method_191() {}", "public abstract String mo24851a(String str);", "public abstract void m15813a();", "public void mo21877s() {\n }", "public boolean method_216() {\r\n return false;\r\n }", "public abstract int mo9747l();", "abstract String mo1748c();", "public abstract Object mo1185b();", "public void skystonePos6() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public abstract void mo3994a();", "private void m50367F() {\n }", "void mo57278c();", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public void mo56167c() {\n }", "public abstract String mo9238av();", "public void mo3376r() {\n }", "public boolean method_218() {\r\n return false;\r\n }", "abstract int pregnancy();", "public int func_176881_a() {\n/* */ return this.field_176893_h;\n/* */ }", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "public abstract String mo8770a();", "public void method_206() {}", "public void mo21779D() {\n }" ]
[ "0.6113038", "0.61107856", "0.59799844", "0.5916969", "0.5831686", "0.5787092", "0.57153994", "0.57113457", "0.56940037", "0.5692891", "0.56685627", "0.5617983", "0.5603225", "0.56022495", "0.5599075", "0.55938184", "0.55447793", "0.5527591", "0.55068964", "0.5502395", "0.5502307", "0.5499995", "0.549168", "0.54847676", "0.54625994", "0.54613024", "0.5458505", "0.54455984", "0.54251224", "0.5424708", "0.54157865", "0.5411552", "0.5411368", "0.5384591", "0.53755885", "0.53745854", "0.53721106", "0.53716654", "0.53716654", "0.5370141", "0.53603154", "0.5351447", "0.5345521", "0.5339876", "0.53361446", "0.5330261", "0.5328116", "0.53252083", "0.5311571", "0.53105843", "0.5306527", "0.5274883", "0.52693844", "0.52617973", "0.5260071", "0.5258416", "0.52544767", "0.52468014", "0.5241452", "0.5237163", "0.52318805", "0.5226936", "0.5223129", "0.5221629", "0.5220061", "0.5217433", "0.52150023", "0.52146745", "0.52040213", "0.52030486", "0.5200323", "0.5199515", "0.5197787", "0.5193718", "0.51872027", "0.51871055", "0.5186611", "0.51856667", "0.51839054", "0.51823056", "0.51808655", "0.51791257", "0.5178402", "0.51773566", "0.5173942", "0.5170045", "0.51694995", "0.5166135", "0.51660335", "0.516587", "0.51609737", "0.5159883", "0.5158487", "0.5157862", "0.5152961", "0.5148738", "0.514265", "0.514265", "0.5139587", "0.5139296", "0.51356894" ]
0.0
-1
randomly decide pos or negative
private int randomValue(int value, int distance) { int pos = rand.nextInt(2) > 0 ? 1 : -1; int newValue = value + pos * rand.nextInt(distance); if(newValue > 255 || newValue < 0) { return randomValue(value, distance); } return newValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Position sampleRandomUniformPosition();", "public static Point pos(){\r\n\t\tRandom random = new Random();\r\n\t\tint x = 0;\r\n\t\tint y = 0;\r\n\t\t//acts as a 4 sided coin flip\r\n\t\t//this is to decide which side the asteroid will appear\r\n\t\tint pos = random.nextInt(4);\r\n\t\t//west\r\n\t\tif(pos == 0){\r\n\t\t\tx = 0;\r\n\t\t\ty = random.nextInt(601);\r\n\t\t}\r\n\t\t//north\r\n\t\telse if(pos == 1){\r\n\t\t\tx = random.nextInt(801);\r\n\t\t\ty = 0;\r\n\t\t}\r\n\t\t//east\r\n\t\telse if(pos == 2){\r\n\t\t\tx = 800;\r\n\t\t\ty = random.nextInt(601);\r\n\t\t}\r\n\t\t//\r\n\t\telse if(pos == 3){\r\n\t\t\tx = random.nextInt(801);\r\n\t\t\ty = 600;\r\n\t\t}\r\n\t\tPoint p = new Point(x,y);\r\n\t\treturn p;\r\n\t}", "@Override\r\n public int positionRandom() {\r\n int random = ((int) (Math.random() * arrayWords.length - 1) + 1);//define a random number with lengt more one for not getout the number zero\r\n return random;\r\n }", "static int getRandomDelta() {\n int d = rand.nextInt(100);\n if (d < 50) {\n return -1;\n } else {\n return 1;\n }\n }", "private static Position fetchRandomPosition(){\n return new Position(0,0).returnRandomPosition();\n }", "int randomPoint() { return 1 + (int)Math.round((Math.random()*20) % (size - 2)); }", "public Position randposition()\r\n\t{\n\t\tRandom random = new Random();\r\n\t\tPosition position = new Position(random.nextInt(7680), random.nextInt(4320), random.nextDouble());\r\n\t\treturn position;\r\n\t}", "public void generateRandomPosition() {\n\t\tx.set((int)(Math.floor(Math.random()*23+1)));\n\t\ty.set((int)(Math.floor(Math.random()*23+1)));\n\n\t}", "public static int randomPosition(){\r\n int max = 4;\r\n int min = 1;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n int pos = randNum;\r\n \r\n return pos;\r\n }", "private Point randomIndex() {\r\n\t\tRandom rand = new Random();\r\n\t\tint val1 = rand.nextInt(rows_size);\r\n\t\tint val2 = rand.nextInt(columns_size);\r\n\t\twhile (!isEmpty(val1,val2)) {\r\n\t\t\tval1 = rand.nextInt(rows_size);\r\n\t\t\tval2 = rand.nextInt(columns_size);\r\n\t\t}\r\n\t\treturn new Point(val1,val2);\r\n\t}", "public int RandomNegativeNumbers() {\n\t\tint result = 0;\n\t\tresult = rnd.nextInt(10) - 10;\n\t\treturn result;\n\t}", "public int decideRandomMove() {\n return (int) (Math.random() * 4);\n }", "public static Position getRandomPosition() {\n\t\tRandom rand = new Random();\n\t\treturn values()[rand.nextInt(values().length)];\n\t}", "private void randomBehavior() {\n\t\trandom = rand.nextInt(50);\n\t\tif (random == 0) {\n\t\t\trandom = rand.nextInt(4);\n\t\t\tswitch (random) {\n\t\t\t\tcase 0:\n\t\t\t\t\tchangeFacing(ACTION.DOWN);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tchangeFacing(ACTION.RIGHT);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchangeFacing(ACTION.UP);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchangeFacing(ACTION.LEFT);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public static int randomNegativeInt() {\n return randomInt(Integer.MIN_VALUE, 0);\n }", "Point getRandomPoint() {\n\t\t\t\t\tdouble val = Math.random() * 3;\n\t\t\t\t\tif (val >=0.0 && val <1.0)\n\t\t\t\t\t\treturn p1;\n\t\t\t\t\telse if (val >=1.0 && val <2.0)\n\t\t\t\t\t\t\treturn p2;\n\t\t\t\t\telse\n\t\t\t\t\t\t\treturn p3;\n\t\t\t\t\t}", "private PositionData getRandomPoint() {\r\n int posX = new Random().nextInt(Constants.WIDTH);\r\n int posY = new Random().nextInt(Constants.HEIGHT);\r\n //make sure point is open\r\n while(!isOpenSpace(posX, posY)) {\r\n posX = new Random().nextInt(Constants.WIDTH);\r\n posY = new Random().nextInt(Constants.HEIGHT);\r\n }\r\n return new PositionData(posX, posY, Constants.PLAYER_A_ID);\r\n }", "public void random_dragao(int pos) {\n\t\tint randomX = 1;\n\t\tint randomY = 1;\n\t\twhile (true) {\n\t\t\trandomX = (int)(1 + Math.random()*labirinto.getSize());\n\t\t\trandomY = (int)(1 + Math.random()*labirinto.getSize());\n\t\t\trandomX--;\n\t\t\trandomY--;\n\t\t\tif (labirinto.getLab()[randomX][randomY] == ' ')\n\t\t\t\tbreak;\n\t\t}\n\t\tdragoes[pos].setX_coord(randomX);\n\t\tdragoes[pos].setY_coord(randomY);\n\t\tchange_dragon_pos(pos);\n\t}", "public static void Random() {\n\t\tRandom ran =new Random();\r\n\t\trandom=ran.nextInt(6)+1;\r\n\t\t//random=1;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tif((ch[who].status)>0) {\r\n\t\t\tch[who].location=(ch[who].location)+random;\r\n\t\t\tch[who].status=(ch[who].status)-1;\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\r\n\t}", "private Vector3 randomLocationDolphin() {\n\t\tVector3 center = this.getEngine().getSceneManager().getRootSceneNode().getLocalPosition();\n\t\tVector3 randomPosition;\n\t\tfloat[] randomFloat;\n\t\tdo {\n\t\t\trandomFloat = randomFloatArray(1000);\n\t\t\trandomPosition = Vector3f.createFrom(randomFloat[0], 0.0f, randomFloat[2]);\n\t\t} while (distanceFrom(center, randomPosition) < 420f);\n\t\treturn randomPosition;\n\t}", "private int randomIndex() {\n return StdRandom.uniform(head, tail);\n }", "public void randomMove(Random choiceGen){\n\tint choice = choiceGen.nextInt(4);\n\tswitch(choice){\n case 0:\n\tif(position[0] < worldEdge[0]){\n\t position[0] += 1;\n\t break;\n\t}\n\t\n\tcase 1:\n\t if(position[0] > 0){\n\t\tposition[0] -= 1;\n\t }\n\t else{\n\t position[0] += 1;\n\t }\n\t break;\n\tcase 2:\n\t if(position[1] < worldEdge[1]){\n\t\tposition[1] += 1;\n\t\tbreak;\n\t}\n\tcase 3:\n\t if(position[1] > 0){\n\t\tposition[1] -= 1;\n\t }\n\t else{\n\t\tposition[1] += 1;\n\t }\n\t break;\n\t}\n }", "private static int randomDirection() {\n return (int) (Math.random() * Direction.values().length);\n }", "private Vector3 randomLocationMonster() {\n\t\t\n\t\tVector3 center = this.getEngine().getSceneManager().getRootSceneNode().getLocalPosition();\n\t\tVector3 randomPosition;\n\t\tfloat[] randomFloat;\n\t\tdo {\n\t\t\trandomFloat = randomFloatArray(1000);\n\t\t\trandomPosition = Vector3f.createFrom(randomFloat[0], 1.5f, randomFloat[2]);\n\t\t} while (distanceFrom(center, randomPosition) > 380f);\n\t\treturn randomPosition;\n\t}", "protected boolean teleportRandomly() {\n double x = this.posX + (this.rand.nextDouble() - 0.5) * 64.0;\n double y = this.posY + (this.rand.nextInt(64) - 32);\n double z = this.posZ + (this.rand.nextDouble() - 0.5) * 64.0;\n return this.teleportTo(x, y, z);\n }", "public int randomMove()\r\n {\r\n r = new Random();\r\n x = r.nextInt(7);\r\n return x;\r\n }", "public void randomizeDirection()\n\t{\n\t\txSpeed = (int) (Math.pow(-1, random.nextInt(2)) * speed);\n\t\tySpeed = (int) (Math.pow(-1, random.nextInt(2)) * speed);\n\t}", "private void random() {\n GameState gs = cc.getGameState();\n ArrayList<int[]> moves = cc.getPlayerMoves(player);\n ArrayList<GameState> states = nextStates(moves, gs);\n for (int[] m : moves) {\n GameState next = checkMove(m, cc);\n states.add(next);\n }\n Random rand = new Random(System.nanoTime());\n int i = rand.nextInt(states.size());\n cc.setAIMove(states.get(i));\n }", "private void randomMove() {\n }", "void setPosition(){\n Random random =new Random();\n position = new Position(random.nextInt(maxrows),random.nextInt(maxcols));\n\n }", "void move()\n {\n Random rand = new Random();\n int moveOrNot = rand.nextInt(2);//50% chance\n if(moveOrNot == 1)\n super.move();\n }", "public static int randomNext() { return 0; }", "public int performDuel(){\n Random rand = new Random();\n int intRand;\n intRand = rand(6);\n while(this.engine.getGameInformation().cards[intRand][intRand] == 0 ){\n intRand = rand(6);\n }\n return intRand;\n }", "public static String randomNegativeAdj()\n {\n int index = (int)(Math.random() * negAdjectives.size());\n return negAdjectives.get(index);\n \n }", "private int getRandomPos(int max){\r\n byte[] buffer = new byte[1];\r\n png.nextBytes(buffer);\r\n while((buffer[0]&63) > max){\r\n png.nextBytes(buffer);\r\n }\r\n return (int)(buffer[0]&63);\r\n\t}", "public void randomTeleport() {\n Random random = new Random(seed);\n seed = random.nextInt(10000);\n int randomY = RandomUtils.uniform(random, 0, worldHeight);\n int randomX = RandomUtils.uniform(random, 0, worldWidth);\n int randomDirection = RandomUtils.uniform(random, 0, 4);\n move(randomX, randomY);\n turn(randomDirection);\n }", "public void generateRandomPosition(Zone samusZone) {\n\t\t\n\t\tint i = samusZone.getI(), j = samusZone.getJ();\n\t\twhile(i == samusZone.getI() && j == samusZone.getJ()) {\n\t\t\ti = ThreadLocalRandom.current().nextInt(1, 12 + 1);\n\t\t\tj = ThreadLocalRandom.current().nextInt(1, 12 + 1);\n\t\t}\n\t\t\n\t\tsamusZone.getSamus().setI(i);\n\t\tsamusZone.getSamus().setJ(j);\n\t}", "private int Rand_Move() {\n\t\tRandom r = new Random();\n\t\tint move = NO_MOVE;\n\t\tdo{\n\t\t\tmove = r.nextInt(9);\n\t\t}while(square_empty[move] == false);\n\t\treturn move;\n\t}", "public static Location genRandomSpawn() {\n final Random r = new Random();\n\n final World world = Bukkit.getWorld(\"Normal_tmp\");\n\n final int half = WIDTH / 2,\n x = randomBetween(r, -half + CENTERX, half + CENTERX),\n z = randomBetween(r, -half + CENTERZ, half + CENTERZ);\n\n return permutateLocation(new Location(world, x, 0, z));\n }", "public void randomDestino(){\n\t\tRandom aleatorio = new Random();\n\t\tint numero = aleatorio.nextInt(2);\n\t\tif (numero == 0)\n\t\t\tsetGiro(90);\n\t\telse \n\t\t\tsetGiro(270);\n\t}", "public int getRandomPositiveInt(){\r\n long gen = (a*seed+c)%m;\r\n seed = gen;\r\n return (int)gen;\r\n }", "private void random() {\n\n\t}", "private void generateRandomPosition() {\r\n int indexX, indexY;\r\n boolean collidesWithPlayers;\r\n playerState.position.x = Integer.MIN_VALUE; // While we trying...\r\n playerState.position.y = Integer.MIN_VALUE;\r\n final ExtensiveMovingObject testObject = new ExtensiveMovingObject( 0.0f, 0.0f, 0.0f, 0.0f, GeneralConsts.WORM_WIDTH, GeneralConsts.WORM_HEIGHT );\r\n int positionGenerationTrialFailureCounter = 0;\r\n do {\r\n do {\r\n indexX = 1 + (int) ( Math.random() * ( map.getWidth () - 1 ) );\r\n indexY = 1 + (int) ( Math.random() * ( map.getHeight() - 1 ) );\r\n if ( positionGenerationTrialFailureCounter++ == MAX_POSITION_GENERATION_TRIAL_FAILURE_COUNT )\r\n if ( map.getWall( indexX, indexY ) == Map.WALL_STONE )\r\n map.setWall( indexX, indexY, Map.WALL_BRICK ); // Not to empty: it can be under water!!\r\n } while( map.getWall( indexX, indexY ) == Map.WALL_STONE ); // Stone can't be cleared: it can be part of swimming pool boundaries. (But if there isn't other places where to start, we clear it!)\r\n testObject.position.x = ( indexX << GeneralConsts.WALL_WIDTH_SHIFT ) + GeneralConsts.WALL_WIDTH / 2;\r\n testObject.position.y = ( indexY << GeneralConsts.WALL_HEIGHT_SHIFT ) + GeneralConsts.WALL_HEIGHT / 2;\r\n collidesWithPlayers = false;\r\n for ( int playerIndex = 0; playerIndex < players.length && !collidesWithPlayers; playerIndex++ )\r\n if ( playerIndex != ownIndex && players[ playerIndex ] != null && testObject.hitsExtensiveObject( players[ playerIndex ].playerState ) )\r\n collidesWithPlayers = true;\r\n try {\r\n Thread.sleep( 0, 100 );\r\n }\r\n catch( InterruptedException ie ) {\r\n }\r\n } while ( collidesWithPlayers );\r\n playerState.position.x = testObject.position.x;\r\n playerState.position.y = testObject.position.y;\r\n map.clearMapForEnteringPlayer( indexX, indexY );\r\n }", "private MoveAction wanderRandomly() {\n\t\tint intDir = rand.nextInt(8) + 1;\n\t\tDirection direction = Direction.fromInt(intDir);\n\t\treturn moveInDirection(direction);\n\t}", "public static int generatRandomPositiveNegitiveValue(int max , int min) {\n\t int ii = -min + (int) (Math.random() * ((max - (-min)) + 1));\n\t return ii;\n\t}", "public Point randomLocation() {\r\n\t\tRandom rand = new Random();\r\n\t\treturn new Point(this.location.getPosition().getX()+ rand.nextInt() % location.getSize().getHeight(),this.location.getPosition().getY()+ rand.nextInt() % location.getSize().getWidth());\r\n\t}", "private void goRandomDirection() {\n\t\tdesiredDirection = Math.random() * 360.0;\n\t}", "public static int randomPos(int grid) {\n Random rand = new Random();\n return rand.nextInt((grid));\n }", "private double getRandom() {\n return 2*Math.random() - 1;\n }", "Boolean getRandomize();", "private int rand() {\n return (int)(Math.random()*(RAND_MAX + 1));\n }", "private GameWorld.Position randomAvatarPosition(GameWorld world) {\n int xVal = world.getRand().nextInt(world.WIDTH - 1);\n int yVal = world.getRand().nextInt(world.HEIGHT - 1);\n if (world.getNumOfSq() > 0) {\n while (!(world.world[xVal][yVal].equals(Tileset.FLOOR))) {\n xVal = world.getRand().nextInt(world.WIDTH - 1);\n yVal = world.getRand().nextInt(world.HEIGHT - 1);\n }\n System.out.println(yVal);\n System.out.println(\"therethere\");\n world.avatarPosition = new GameWorld.Position(xVal, yVal);\n return world.avatarPosition;\n }\n return new GameWorld.Position(xVal, yVal);\n }", "private PointF getRandCoordinate() {\n Random r = new Random();\n float xRand = (r.nextInt(getWidth()) / density) + 1;\n float y = 10 / density;\n\n return new PointF(xRand, y);\n }", "Optional<Possession> randomPossession();", "public abstract boolean isRandom();", "@Override\n public int attack() {\n return new Random().nextInt(5);\n }", "public static String randomPositiveAdj()\n {\n int index = (int)(Math.random() * posAdjectives.size());\n return posAdjectives.get(index);\n }", "private Point getRandomMiniPoint()\n {\n Random r = new Random();\n\n // Random x value\n int minX = 0;\n int x = 0;\n int maxX = findViewById(R.id.the_canvas).getWidth() - ((GameBoard)findViewById(R.id.the_canvas)).getMiniSpriteWidth();\n x = r.nextInt(maxX-minX+1)+minX;\n\n // Start at the top\n int y = 0;\n\n return new Point (x,y);\n }", "public void makeRandomMove() {\n\t\ttry{\r\n\t\t\tif (playerId == game.getState().getTurn()){\r\n\t\t\t\tgame.execute(randPlayer.requestAction(game.getState()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IllegalArgumentException e){\r\n\t\t\t\r\n\t\t}\r\n\t}", "public static String randomAdjective()\n {\n boolean positive = Math.random() < .5;\n if(positive){\n return randomPositiveAdj();\n } else {\n return randomNegativeAdj();\n }\n }", "public PositionInTheGameBoard()\r\n\t{\r\n\t\tthis.X = new Random().nextInt(PositionInTheGameBoard.max_X);\r\n\t\tthis.Y = new Random().nextInt(PositionInTheGameBoard.max_Y);\r\n\t}", "public void randomize() {\n\t\tx = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t\ty = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t}", "public void setRandomSpawn(final Random random)\r\n {\r\n final List<Double> rows = new ArrayList<>();\r\n \r\n final double column;\r\n \r\n //get a random true/false result\r\n if (random.nextBoolean())\r\n {\r\n //here we will do west\r\n column = 0.5;\r\n }\r\n else\r\n {\r\n //here we will do east\r\n column = COLUMNS - 0.5;\r\n }\r\n \r\n for (double row=0; row < ROWS; row++)\r\n {\r\n //if platform exists add this as a possibility\r\n if (getObject(Type.Platform, (int)column, row) != null)\r\n rows.add(row);\r\n }\r\n \r\n super.setCol(column);\r\n \r\n final int index = random.nextInt(rows.size());\r\n super.setRow(rows.get(index) + 0.5);\r\n }", "public abstract int getRandomDamage();", "protected Direction selectMove() {\n Map<Integer, Direction> positive, negative;\n // Add the directions that contains negative stations in a negative set\n // And every other direction in a positive set\n positive = new HashMap<Integer,Direction>(16);\n negative = new HashMap<Integer,Direction>(16);\n for (Direction d : Direction.directions) {\n int result = checkMove(d);\n if (result == 1) {\n positive.put(positive.size(), d);\n } else if (result == 0) {\n negative.put(negative.size(), d);\n } else {\n continue;\n }\n }\n // If there is no positive move, choose a RANDOM negative move\n if (positive.isEmpty()) {\n return negative.get(rand.nextInt(negative.size()));\n } else { // Otherwise choose a RANDOM positive move\n return positive.get(rand.nextInt(positive.size()));\n }\n }", "public Point2D getRandomNodeLocation() {\n int validNum = 0;\n for (GraphNode graphNode : nodeVector) {\n if (graphNode.isValid()){\n validNum++;\n }\n }\n int randomIndex = RandomEnhanced.randInt(0,validNum-1);\n\n for (GraphNode graphNode : nodeVector) {\n if (graphNode.isValid()){\n if (randomIndex==0) return ((NavNode)graphNode).getPosition();\n randomIndex--;\n }\n }\n return null;\n }", "Chromosome getRandom();", "@Override\n public void relocatedWithinBounds() {\n x = random.nextInt(maxX - width);\n y = random.nextInt(maxY - height);\n }", "@Override\n public int orinar() {\n\n return (int) (Math.random() * 400) + 400;\n }", "public int randomizeDamage(CircleEntity entity){\n int min = entity.minDamage();\r\n int max = entity.maxDamage();\r\n return(max-min <= 0)? min: rand.nextInt(max-min + 1) + min;\r\n }", "private void randomPosBoats(GameData gameData) {\n int x0 = 0;\n int y0 = 0;\n for ( int n = gameData.getBoatArray().size()-1; n>=0; n--){\n Boat b = gameData.getBoatArray().get(n);\n Random rand = new Random();\n int l = b.getLength();\n\n boolean retry = true;\n while(retry) {\n int direction = rand.nextInt(2);\n\n //HORIZONTAL\n if (direction == 1) {\n x0 = rand.nextInt(gameData.getBoard().getWidth() - l);\n y0 = rand.nextInt(gameData.getBoard().getHeight());\n\n // we suppose it's a good starting point\n retry = false;\n for (int i = 0; i < l; i++) {\n //if one of the tiles already has a boat\n if (gameData.existsBoatAround(x0 + i, y0)) {\n retry = true;\n }\n }\n //POSITION BOAT\n if (!retry) {\n ArrayList pos = new ArrayList();\n for (int i = 0; i < l; i++) {\n int x = x0 + i;\n gameData.getMatrix()[y0][x] = b.getBoatid();\n pos.add(new int[]{x, y0});\n }\n b.setPositions(pos);\n }\n\n //VERTICAL\n } else {\n // determine the tile on which to start\n x0 = rand.nextInt(gameData.getBoard().getWidth());\n y0 = rand.nextInt(gameData.getBoard().getHeight() - l);\n\n // we suppose it's a good starting point\n retry = false;\n for (int i = 0; i < l; i++) {\n if (gameData.existsBoatAround(x0, y0 + i)) {\n retry = true;\n }\n }\n if(!retry){\n ArrayList pos = new ArrayList();\n for (int i = 0; i < l; i++) {\n int y = y0 + i;\n gameData.getMatrix()[y][x0] = b.getBoatid();\n pos.add(new int[]{x0, y});\n }\n b.setPositions(pos);\n }\n }\n }\n }\n }", "@Override\n public int attack(){\n //create an int list to store the numbers\n int[] arr = {zero, six, ten};\n //get a random index of the list\n int index = getRandom().nextInt(arr.length);\n //return the number on that random index\n int damageVal = arr[index];\n return damageVal;\n }", "int getYPos() {\n if (new Random().nextBoolean()) {\n return CollectTheFruit.height - 35;\n } \n else {\n return CollectTheFruit.height - 200;\n }\n }", "public int getRandom() {\n if(list.size() <= 0) return -1;\n return list.get(new Random().nextInt(list.size()));\n }", "private int rand(int lower, int higher) {\n\t\treturn lower + (int) ((higher - lower + 1) * Math.random());\n\t\t\n\t}", "public abstract void randomize();", "void moveNorthEast(){\n xpos = xpos + 3;\n ypos = ypos-xspeed;\n if (xpos > width){ // 20\n xpos = random(-width/2, width/2); // 25\n ypos = width; // 30\n }\n }", "public void randomMove() {\r\n\t\tRandom rand = new Random();\r\n\t\tint moveNum = rand.nextInt(100)+100;\r\n\t\tcheck++;\r\n\t\tif(check >= moveNum) {\r\n\t\t\tspeed = speed*-1;\r\n\t\t\tcheck =0;\r\n\r\n\t\t}\r\n\r\n\t\tif(speed > 0) {\r\n\t\t\tsetIcon(rightImage);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsetIcon(leftImage);\r\n\t\t}\r\n\t\tx += speed; setLocation(x,y); repaint();\r\n\t}", "private int randomNumber(int high, int low){\n \t\t Random r = new Random();\n \t\t return (r.nextInt(high-low) + low);\n \t }", "public int monsterAttack(){\n Random ran = new Random();\n return ran.nextInt(4);\n }", "void moveSouthEast(){\n xpos = xpos + 15;\n ypos = ypos + 15;\n if (xpos > width){ // 25\n xpos = random(-width, width); // 30\n ypos = 0; // 35\n }\n }", "static void randomMove() {\n int directionNum; // Randomly set to 0, 1, 2, or 3 to choose direction.\n directionNum = ( int )( Math.random() * 4 );\n\n switch ( directionNum ) {\n case 0: // Move up.\n currentRow--;\n if ( currentRow < 0 )\n currentRow = ROWS - 1;\n break;\n case 1 : // Move right.\n currentColumn++;\n if ( currentColumn >= COLUMNS )\n currentColumn = 0;\n break;\n case 2 : // Move down.\n currentRow++;\n if ( currentRow >= ROWS )\n currentRow = 0;\n break;\n case 3 : // Move left.\n currentColumn--;\n if ( currentColumn < 0 )\n currentColumn = COLUMNS - 1;\n break;\n\n }\n }", "public int eDmg(){\r\n eDmg = rand.nextInt(13);\r\n return eDmg;\r\n }", "public void randomMove(){\n ArrayList<Hole> availableHoles = availableMoves(nextToPlay);\n int holeIndex = (int)(Math.random() * (((availableHoles.size()-1) - 0) + 1)) + 0;\n ArrayList<Korgool> korgools = availableHoles.get(holeIndex).getKoorgools();\n while(korgools.size() == 0){\n holeIndex = (int)(Math.random() * (((availableHoles.size()-1) - 0) + 1)) + 0;\n korgools = availableHoles.get(holeIndex).getKoorgools();\n }\n redistribute(availableHoles.get(holeIndex).getHoleIndex());\n }", "public int generateRandom(Random ran)\n {\n if(nums.size()<=0)\n {\n Log.i(\"test\",\"No Pokemon left\");\n return 0;\n }\n return nums.remove(ran.nextInt(nums.size()));\n }", "public void rollRandom() {\n\t\tthis.strength = randomWithRange();\r\n\t\tthis.wisdom = randomWithRange();\r\n\t\tthis.dexterity = randomWithRange();\r\n\t\tthis.constitution = randomWithRange();\r\n\t\tthis.intelligence = randomWithRange();\r\n\t\tthis.charisma = randomWithRange();\r\n\t}", "public int hideBomb() {\r\n\r\n\t\tint randomLocation = (int) Math.floor(Math.random() * 9);\r\n\t\trandomLocation = Math.round(randomLocation);\r\n\r\n\t\treturn randomLocation; \r\n\r\n\t}", "public static Point randomPoint() {\r\n\t\tString n = \"\" + (char) (65 + rand.nextInt(26));\r\n\t\tint x = rand.nextInt(11);\r\n\t\tint y = rand.nextInt(11);\r\n\t\treturn new Point(n, x, y);\r\n\t}", "public void randomizePointer(){\n\n pointerPos.set(p.random(BASE_POS.x,BASE_POS.x+300),p.random(BASE_POS.y-300,BASE_POS.y+300));\n while(pointerPos.dist(BASE_POS)>280 || pointerPos.dist(BASE_POS)<80 || p.atan2(pointerPos.y-BASE_POS.y,pointerPos.x - BASE_POS.x)>p.radians(60)){\n pointerPos.set(p.random(BASE_POS.x,BASE_POS.x+300),p.random(BASE_POS.y-300,BASE_POS.y+300));\n }\n }", "public void movimentar_dragao(int pos) {\n\t\tint check = 0;\n\t\tint counter = 0; //After 1000 tries it means that the dragon is trapped and cant move either way\n\t\twhile (check == 0 && counter < 1000) {\n\t\t\tint random = 1 + (int)(Math.random()*4);\n\t\t\tif (random == 1) {\n\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'X' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'S' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'D' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'd' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'O') {\n\t\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()] == 'F')\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), 'E');\n\t\t\t\t\telse\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), ' ');\n\t\t\t\t\tdragoes[pos].setX_coord(dragoes[pos].getX_coord()+1);\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (random == 2) {\n\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'X' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'S' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'D' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'd' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'O') {\n\t\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()] == 'F')\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), 'E');\n\t\t\t\t\telse\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), ' ');\n\t\t\t\t\tdragoes[pos].setX_coord(dragoes[pos].getX_coord()-1);\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (random == 3) {\n\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'X' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'S' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'D' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'd' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'O') {\n\t\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()] == 'F')\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), 'E');\n\t\t\t\t\telse\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), ' ');\n\t\t\t\t\tdragoes[pos].setY_coord(dragoes[pos].getY_coord()-1);\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'X' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'S' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'D' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'd' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'O') {\n\t\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()] == 'F')\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), 'E');\n\t\t\t\t\telse\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), ' ');\n\t\t\t\t\tdragoes[pos].setY_coord(dragoes[pos].getY_coord()+1);\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\t}", "public void randomTick(World world, BlockPos pos, IBlockState state, Random random) {\n\t\tVolcano.genVolcano(world.getChunkFromBlockCoords(pos), world);\n\t}", "public int firstRandom(View v) {\r\n\r\n // to show the start text view (textViewSubtraction)\r\n TextView textViewSubtraction = (TextView) findViewById(R.id.textViewSubtraction);\r\n textViewSubtraction.setVisibility(View.VISIBLE);\r\n\r\n // to hide the onClick text view (textViewSubtraction)\r\n TextView textViewSubtraction2 = (TextView) findViewById(R.id.textViewSubtraction2);\r\n textViewSubtraction2.setVisibility(View.INVISIBLE);\r\n\r\n // reset the value\r\n counter = 0;\r\n\r\n // get the random numbers\r\n TextView tv = (TextView) findViewById(R.id.textViewSubtraction);\r\n Random r = new Random();\r\n i = r.nextInt(100-1)+1;\r\n a = r.nextInt(100-1)+1;\r\n if (i >= a){\r\n answer = i - a;\r\n // print the numbers\r\n tv.setText(Integer.toString(i) + \" - \" + Integer.toString(a));\r\n }else {\r\n answer = a - i;\r\n // print the numbers\r\n tv.setText(Integer.toString(a) + \" - \" + Integer.toString(i));\r\n }\r\n return answer;\r\n }", "private int rand(int lower, int upper) {\n return lower + (int)(Math.random() * ((upper - lower) + 1));\n }", "public Position sampleRandomGaussianPosition();", "private String whichPlayerToStart(){\n\t\tdouble whichPlayerToCommence = Math.random();\n\t\tdouble randomLimit = Math.random();\n\t\tif(whichPlayerToCommence <= randomLimit){ \n\t\tthis.turn = \"blue\";\n\t\treturn this.turn;\n\t\t}\n\t\telse{\n\t\tthis.turn = \"red\";\n\t\treturn this.turn;\n\t\t} \n\t}", "int accidentVelo()\r\n\t{\r\n\t\tdouble rand = Math.random()*100;\r\n\t\tSystem.out.println(rand);\r\n\t\tif ((double)rand <= 0.5) {\r\n\t\t\tSystem.out.println(\"Finalement vous auriez du y aller à pied. Vous vous vider de votre sang sur le bord du trottoir.\");\r\n\t\t\treturn 0.5;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "private void moveRandomly()\r\n {\r\n if (Greenfoot.getRandomNumber (100) == 50)\r\n turn(Greenfoot.getRandomNumber(360));\r\n else\r\n move(speed);\r\n }", "public void randomX() {\r\n\t\tdouble randomDub = Math.random();\r\n\t\tint randomIntX = (int)randomDub*4;\r\n\t\tthis.xcoord = randomIntX;\r\n\t}", "public void randomY() {\r\n\t\tdouble randomDub = Math.random();\r\n\t\tint randomIntY = (int)randomDub*4;\r\n\t\tthis.ycoord = randomIntY;\r\n\t}", "public void random_dardo(int pos) {\n\t\tint randomX;\n\t\tint randomY;\n\t\twhile (true) {\n\t\t\trandomX = (int)(1 + Math.random()*labirinto.getSize());\n\t\t\trandomY = (int)(1 + Math.random()*labirinto.getSize());\n\t\t\trandomX--;\n\t\t\trandomY--;\n\t\t\tif (labirinto.getLab()[randomX][randomY] == ' ')\n\t\t\t\tbreak;\n\t\t}\n\t\tdardos[pos].setX_coord(randomX);\n\t\tdardos[pos].setY_coord(randomY);\n\t\tchange_dardo_pos(pos);\n\t}", "public Point randomPoint() \t // creates a random point for gameOjbects to be placed into\r\n\t{\n\t\tint x = rand.nextInt(900);\r\n\t\tx = x + 50;\r\n\t\tint y = rand.nextInt(900);\r\n\t\ty = y + 50;\r\n\t\tPoint p = new Point(x, y);\r\n\t\treturn p;\r\n\t}" ]
[ "0.7228643", "0.71214336", "0.69077593", "0.68678266", "0.6762065", "0.6753992", "0.67209184", "0.6694538", "0.66870767", "0.66442347", "0.6492652", "0.648838", "0.64537007", "0.64386964", "0.6416787", "0.6387165", "0.6355097", "0.6353434", "0.6346366", "0.6345466", "0.6330668", "0.63080287", "0.62991816", "0.6282663", "0.62816584", "0.6243384", "0.62420523", "0.62113935", "0.62058246", "0.620103", "0.6132706", "0.61295515", "0.61270297", "0.6102542", "0.6096573", "0.60955375", "0.6094732", "0.6079515", "0.60738605", "0.6061235", "0.60538006", "0.6053216", "0.60477006", "0.60453683", "0.6031226", "0.60306823", "0.6016417", "0.6007451", "0.60010743", "0.59980303", "0.5992198", "0.5962565", "0.5961015", "0.5958359", "0.593923", "0.5938733", "0.5934724", "0.5930205", "0.5928737", "0.59269446", "0.59185266", "0.5904097", "0.58936536", "0.58927304", "0.58898443", "0.5889072", "0.58682936", "0.58675206", "0.58556837", "0.5849084", "0.5847747", "0.5847081", "0.584397", "0.58437663", "0.5839536", "0.5838316", "0.5836981", "0.5826906", "0.5817681", "0.58133924", "0.58030427", "0.579731", "0.57969", "0.5793127", "0.57665277", "0.57656103", "0.57625055", "0.5760532", "0.5753759", "0.5752489", "0.5748672", "0.57447195", "0.57417774", "0.5736021", "0.573421", "0.57337797", "0.5732634", "0.57322246", "0.57288826", "0.5728627", "0.57176656" ]
0.0
-1
TODO: Use builder() or newBuilder() consistently.
public static Builder newBuilder() { return new AutoValue_GeoJsonFeature.Builder(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Builder() {}", "static Builder newBuilder() {\n return new Builder();\n }", "private Builder() {\n\t\t}", "public Builder() {}", "public Builder() {}", "public Builder() {}", "public static Builder newBuilder() {\n return Builder.createDefault();\n }", "public static Builder newBuilder() {\n return Builder.createDefault();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "private Builder()\n {\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "public static Builder newBuilder() {\n return new Builder();\n }", "private Builder() {\n }", "private Builder() {\n }", "public static Builder builder(){ return new Builder(); }", "public Builder() { }", "static Builder builder() {\n return new Builder();\n }", "public Builder() {\n }", "public Builder() {\n\t\t}", "private BuilderUtils() {}", "private Construct(Builder builder) {\n super(builder);\n }", "private E(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public static Value.Builder newBuilder() {\n return new Value.Builder();\n }", "public static Object builder() {\n\t\treturn null;\r\n\t}", "Reproducible newInstance();", "public Builder() {\n }", "public Builder() {\n }", "public static Builder builder ()\n {\n\n return new Builder ();\n\n }", "public static Object builder() {\n\t\treturn null;\n\t}", "private Instance(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private SimpleData(Builder builder) {\n super(builder);\n }", "private Request(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Request(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Request(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Request(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Interest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "Builder makePermanent();", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "private Package(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "private Value(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private ObjectReference(Builder builder) {\n super(builder);\n }", "private C(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Playready(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private DataObject(Builder builder) {\n super(builder);\n }", "private Builder builder() {\n\n\t\tif (!(message instanceof Builder)) {\n\t\t\tthrow new IllegalStateException(\"Message is not a builder\");\n\t\t}\n\n\t\treturn (Builder) message;\n\n\t}", "private SimpleMap(Builder builder) {\n super(builder);\n }", "public Builder(){\n }", "private Quat(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private DataModelBuilder() {\n }", "private Index(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Response(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Response(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Response(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Response(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Response(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Response(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Response(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private B(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "static Builder builder() {\n return new SourceContextImpl.Builder();\n }", "Object build();", "private Code(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private ReflectionRequest(Builder builder) {\n super(builder);\n }", "private Map(Builder builder) {\n super(builder);\n }", "private GRPCRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "private ReflectionResponse(Builder builder) {\n super(builder);\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "public static Builder builder() {\n return new Builder();\n }", "private Donatie(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Basis(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Payload(Builder builder) {\n super(builder);\n }", "private TestBeanRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Compilation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Message(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }" ]
[ "0.7359139", "0.7292936", "0.7070823", "0.6963908", "0.6963908", "0.6963908", "0.69385886", "0.69385886", "0.69224477", "0.69169253", "0.69169253", "0.69169253", "0.6890564", "0.6826333", "0.67948145", "0.67948145", "0.67948145", "0.67948145", "0.6750822", "0.6750822", "0.67445624", "0.67295194", "0.65473175", "0.65391797", "0.6520448", "0.64280236", "0.637519", "0.6339299", "0.63283783", "0.6315989", "0.62838525", "0.6275482", "0.6275482", "0.6272458", "0.6271543", "0.6265387", "0.62631315", "0.62040246", "0.62040246", "0.62040246", "0.62040246", "0.616435", "0.6157538", "0.6157538", "0.6157538", "0.61509305", "0.6139914", "0.6139914", "0.6139914", "0.6139914", "0.6139914", "0.6139914", "0.6139914", "0.61289835", "0.6127783", "0.61239344", "0.6111589", "0.6110174", "0.61041415", "0.6100733", "0.6099837", "0.60996723", "0.6096557", "0.60820293", "0.6068356", "0.60606736", "0.60606736", "0.60606736", "0.60606736", "0.60606736", "0.60606736", "0.60606736", "0.60532176", "0.60479975", "0.6042652", "0.60400385", "0.6035146", "0.6032348", "0.60265344", "0.6025375", "0.6025375", "0.6025375", "0.6025375", "0.6020526", "0.6010121", "0.6010121", "0.6010121", "0.6010121", "0.6010121", "0.6010121", "0.6010121", "0.6010121", "0.6010121", "0.6010121", "0.6010121", "0.6007988", "0.6007565", "0.6004651", "0.6002102", "0.5998692", "0.59961396" ]
0.0
-1
TODO: Parse at conversion type instead of here.
public JSONObject getGeoJson() { try { return new JSONObject(getGeoJsonString()); } catch (JSONException e) { Timber.d("Invalid GeoJSON in feature %s", getId()); return new JSONObject(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "T convert(S e);", "private CData convert(EValueType type, String str) {\n switch (type)\n {\n case DOUBLE_64:\n return new CData(type, Double.valueOf(str));\n case FLOAT_32:\n return new CData(type, Float.valueOf(str));\n case INT_16:\n return new CData(type, Short.valueOf(str));\n case INT_32:\n return new CData(type, Integer.valueOf(str));\n case INT_64:\n return new CData(type, Long.valueOf(str));\n case INT_8:\n return new CData(type, str.charAt(0));\n case UINT_64:\n return new CData(type, Long.valueOf(str));\n case UINT_32:\n return new CData(type, Long.valueOf(str));\n case UINT_16:\n return new CData(type, Character.valueOf(str.charAt(0)));\n case UINT_8:\n return new CData(type, str.charAt(0));\n case VOID:\n default:\n return CData.VOID;\n }\n }", "Object getConvertedValue() throws ConversionException;", "T convert(S s) throws UnconvertableException;", "public interface DataConverter<JAVATYPE,METATYPE extends FieldDefinition> {\n /** Method invoked for a single JAVATYPE */\n JAVATYPE convert(JAVATYPE oldValue, final METATYPE meta);\n\n /** Method invoked for a JAVATYPE List. This can be used to alter the list length / add / remove elements after processing.\n * Please note that the converter is only invoked on the list itself, not on the individual elements. */\n List <JAVATYPE> convertList(List<JAVATYPE> oldList, final METATYPE meta);\n\n /** Method invoked for a JAVATYPE Set. This can be used to alter the set size / add / remove elements after processing.\n * Please note that the converter is only invoked on the list itself, not on the individual elements. */\n Set <JAVATYPE> convertSet(Set<JAVATYPE> oldSet, final METATYPE meta);\n\n /** Method invoked for an array of JAVATYPEs. This can be used to alter the list length / add / remove elements after processing.\n * Please note that the converter is only invoked on the array itself, not on the individual elements. */\n JAVATYPE [] convertArray(JAVATYPE [] oldArray, final METATYPE meta);\n\n /** Map-type methods. The tree walker converses the value parts of the map only. */\n public <K> Map<K, JAVATYPE> convertMap(Map<K, JAVATYPE> oldMap, final METATYPE meta);\n}", "T convert(String value);", "public interface Conversion {\n /**\n * Returns the cost of the conversion. If there are several matching\n * overloads, the one with the lowest overall cost will be preferred.\n *\n * @return Cost of conversion\n */\n int getCost();\n\n /**\n * Checks the viability of implicit conversions. Converting from a\n * dimension to a hierarchy is valid if is only one hierarchy.\n */\n void checkValid();\n\n /**\n * Applies this conversion to its argument, modifying the argument list\n * in place.\n *\n * @param validator Validator\n * @param args Argument list\n */\n void apply(Validator validator, List<Exp> args);\n }", "Class<?> getSimpleConversionClass() {\n Class<?> c = null;\n final String sa4 = sa[4] != null ? sa[4].toLowerCase() : null;\n final String sa5 = sa[5] != null ? sa[5].toLowerCase() : null;\n if (\"t\".equals(sa4)) {\n c = Calendar.class;\n } else if (\"b\".equals(sa5)) {\n c = Boolean.class;\n } else if (\"h\".equals(sa5) /* Hashcode */) {\n c = Object.class;\n } else if (\"s\".equals(sa5)) {\n c = Object.class; /* Conversion using toString() */\n } else if (\"c\".equals(sa5)) {\n c = Character.class;\n } else if (\"d\".equals(sa5) || \"o\".equals(sa5) || \"x\".equals(sa5)\n || \"e\".equals(sa5) || \"f\".equals(sa5) || \"g\".equals(sa5)\n || \"a\".equals(sa5)) {\n c = Number.class;\n } else if (\"n\".equals(sa5) || \"%\".equals(sa5)) {\n // ignore literals\n }\n return c;\n }", "public String makeConversion(String value);", "T convert(S source) throws ConversionException;", "private Object parse(\n String value\n ){\n return \n value.startsWith(\"P\") || value.startsWith(\"-P\") ? Datatypes.create(Duration.class, value) : \n value.indexOf('T') < 0 ? Datatypes.create(XMLGregorianCalendar.class, value) : \n Datatypes.create(java.util.Date.class, value);\n }", "public void testObjectToStringScalar() {\n\n assertEquals(\"Boolean->String\", \"false\", LocaleConvertUtils.convert(Boolean.FALSE));\n assertEquals(\"Boolean->String\", \"true\", LocaleConvertUtils.convert(Boolean.TRUE));\n assertEquals(\"Byte->String\", \"123\", LocaleConvertUtils.convert(Byte.valueOf((byte) 123)));\n assertEquals(\"Character->String\", \"a\", LocaleConvertUtils.convert(Character.valueOf('a')));\n assertEquals(\"Double->String\", \"123\" + decimalSeparator + \"4\", LocaleConvertUtils.convert(Double.valueOf(123.4)));\n assertEquals(\"Float->String\", \"123\" + decimalSeparator + \"4\", LocaleConvertUtils.convert(Float.valueOf((float) 123.4)));\n assertEquals(\"Integer->String\", \"123\", LocaleConvertUtils.convert(Integer.valueOf(123)));\n assertEquals(\"Long->String\", \"123\", LocaleConvertUtils.convert(Long.valueOf(123)));\n assertEquals(\"Short->String\", \"123\", LocaleConvertUtils.convert(Short.valueOf((short) 123)));\n assertEquals(\"String->String\", \"abc\", LocaleConvertUtils.convert(\"abc\"));\n assertEquals(\"String->String null\", null, LocaleConvertUtils.convert(null));\n\n }", "private String externalConversion() {\n int reading = ((record[19] & 255) + ((record[21] & 0x03) << 8));\n\n Map<String, BigDecimal> variables = new HashMap<String, BigDecimal>();\n variables.put(\"x\", new BigDecimal(reading));\n BigDecimal result = externalConversion.eval(variables);\n\n String x = result + \"\";\n\n if(this.counter){\n x = Integer.parseInt(x) * (60/rate) + \"\";\n }\n\n return x;\n }", "@Override\n public void buildConvert() throws LibrecException {\n super.buildConvert();\n }", "default Object convert(GenericRowData row) {\n return convert(row, -1);\n }", "public void converted() {\n conversions++;\n }", "JAVATYPE convert(JAVATYPE oldValue, final METATYPE meta);", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "@Override\n\t\t\tprotected Type convert(String text) {\n\t\t\t\tType t = null;\n\t\t\t\ttry {\n\t\t\t\t\t// return null if the types do not match the\n\t\t\t\t\t// original\n\t\t\t\t\tt = Type.getType(text);\n\t\t\t\t\tif (t == null || !match(t, original)) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {}\n\t\t\t\treturn t;\n\t\t\t}", "abstract Object getValue (String str, ValidationContext vc) throws DatatypeException;", "public void convert(){\n afterValue = firstValue * 1000;\n }", "@Test\n public void testConvertBadge() {\n Object result = converter.convert(null, badge,Long.class, Badge.class);\n\n assertEquals(result.getClass(), Long.class, \"Converted object is not of a Long class.\");\n assertSame(result, badge.getId(), \"Converted object is not the one expected.\");\n }", "public interface ImpExValues {\n\n /**\n * String value (default for all import data).\n */\n String STRING = \"STRING\";\n /**\n * Boolean value (e.g. for flags).\n */\n String BOOLEAN = \"BOOLEAN\";\n /**\n * Long value (e.g. for PK's).\n */\n String LONG = \"LONG\";\n /**\n * Integer value.\n */\n String INT = \"INT\";\n /**\n * BigDecimal value.\n */\n String DECIMAL = \"DECIMAL\";\n /**\n * Date value. Format: \"yyyy-MM-dd\" {@link DateUtils#ldParseSDT(String)}\n */\n String DATE = \"DATE\";\n /**\n * Date value. Format: \"yyyy-MM-dd HH:mm:ss\" {@link DateUtils#ldtParseSDT(String)}\n */\n String DATETIME = \"DATETIME\";\n /**\n * Date value. Format: \"yyyy-MM-dd HH:mm:ss\" {@link DateUtils#zdtParseSDT(String)}\n */\n String ZONEDTIME = \"ZONEDTIME\";\n /**\n * Date value. Format: \"yyyy-MM-dd HH:mm:ss\" {@link DateUtils#iParseSDT(String)}\n */\n String INSTANT = \"INSTANT\";\n\n}", "public Object elConvertType(Object value);", "public abstract org.acorns.lesson.Lesson convert(float version) throws IOException;", "private static Object parseData(String source, Class<?> expectedType){\n\t\tif(expectedType.equals(Integer.class)) return new Integer(source);\n\t\tif(expectedType.equals(Boolean.class)) return new Boolean(source);\n\t\tif(expectedType.equals(Double.class)) return new Double(source);\n\t\treturn source;\n\t}", "public void testNegativeScalar() {\n\n /*\n * fixme Boolean converters not implemented at this point value = LocaleConvertUtils.convert(\"foo\", Boolean.TYPE); ...\n *\n * value = LocaleConvertUtils.convert(\"foo\", Boolean.class); ...\n */\n\n try {\n LocaleConvertUtils.convert(\"foo\", Byte.TYPE);\n fail(\"Should have thrown conversion exception (1)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Byte.class);\n fail(\"Should have thrown conversion exception (2)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n /*\n * fixme - not implemented try { value = LocaleConvertUtils.convert(\"org.apache.commons.beanutils2.Undefined\", Class.class);\n * fail(\"Should have thrown conversion exception\"); } catch (ConversionException e) { ; // Expected result }\n */\n\n try {\n LocaleConvertUtils.convert(\"foo\", Double.TYPE);\n fail(\"Should have thrown conversion exception (3)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Double.class);\n fail(\"Should have thrown conversion exception (4)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Float.TYPE);\n fail(\"Should have thrown conversion exception (5)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Float.class);\n fail(\"Should have thrown conversion exception (6)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Integer.TYPE);\n fail(\"Should have thrown conversion exception (7)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Integer.class);\n fail(\"Should have thrown conversion exception (8)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Byte.TYPE);\n fail(\"Should have thrown conversion exception (9)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Long.class);\n fail(\"Should have thrown conversion exception (10)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Short.TYPE);\n fail(\"Should have thrown conversion exception (11)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Short.class);\n fail(\"Should have thrown conversion exception (12)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n }", "private Object getTypeObjectPair() throws MathLinkException, NumberRangeException {\n Object result = null;\n int type = this.getInteger();\n if (type % -17 == -15) {\n type = -7 + -17 * (type / -17);\n } else if (type % -17 == -16) {\n type = -8 + -17 * (type / -17);\n }\n switch (type) {\n case -5: {\n result = new Integer(this.getInteger());\n break;\n }\n case -6: {\n result = new Long(this.getLongInteger());\n break;\n }\n case -4: {\n int i = this.getInteger();\n if (i < -32768 || i > 32767) {\n throw new NumberRangeException(i, \"short\");\n }\n result = new Short((short)i);\n break;\n }\n case -2: {\n int i = this.getInteger();\n if (i < -128 || i > 127) {\n throw new NumberRangeException(i, \"byte\");\n }\n result = new Byte((byte)i);\n break;\n }\n case -3: {\n int i = this.getInteger();\n if (i < 0 || i > 65535) {\n throw new NumberRangeException(i, \"char\");\n }\n result = new Character((char)i);\n break;\n }\n case -15: \n case -7: {\n double d = this.getDouble();\n if (d < -3.4028234663852886E38 || d > 3.4028234663852886E38) {\n throw new NumberRangeException(d, \"float\");\n }\n result = new Float((float)d);\n break;\n }\n case -16: \n case -8: {\n result = new Double(this.getDouble());\n break;\n }\n case -9: {\n int tok = this.getType();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n result = this.getString();\n if (tok != 35 || !result.equals(\"Null\")) break;\n result = null;\n break;\n }\n case -1: {\n String s = this.getSymbol();\n if (s.equals(\"True\")) {\n result = Boolean.TRUE;\n break;\n }\n result = Boolean.FALSE;\n break;\n }\n case -13: {\n long mark = this.createMark();\n try {\n int tok = this.getNext();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n if (tok == 35) {\n result = this.getSymbol();\n if (result.equals(\"Null\")) {\n result = null;\n break;\n }\n this.seekMark(mark);\n result = this.getComplex();\n break;\n }\n this.seekMark(mark);\n result = this.getComplex();\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -10: {\n long mark = this.createMark();\n try {\n int tok = this.getType();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n if (tok == 35) {\n result = this.getSymbol();\n if (result.equals(\"Null\")) {\n result = null;\n break;\n }\n result = new BigInteger((String)result);\n break;\n }\n result = new BigInteger(this.getString());\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -11: {\n long mark = this.createMark();\n try {\n int tok = this.getType();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n if (tok == 35) {\n result = this.getSymbol();\n if (result.equals(\"Null\")) {\n result = null;\n break;\n }\n result = Utils.bigDecimalFromString((String)result);\n break;\n }\n result = Utils.bigDecimalFromString(this.getString());\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -12: {\n long mark = this.createMark();\n try {\n int tok = this.getNext();\n if (tok == 100000 && (result = this.getObject()) != null) break;\n this.seekMark(mark);\n result = this.getExpr();\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -14: {\n result = this.getObject();\n break;\n }\n case -10000: {\n break;\n }\n default: {\n int tok = this.getNext();\n result = tok == 100000 || tok == 35 ? this.getObject() : (type > -34 ? this.getArray(type - -17, 1) : (type > -51 ? this.getArray(type - -34, 2) : (type > -68 ? this.getArray(type - -51, 3) : (type > -85 ? this.getArray(type - -68, 4) : this.getArray(type - -85, 5)))));\n }\n }\n return result;\n }", "private AerospikeConverters() {}", "@Test\n public void testConvertPokemon() {\n Object result = converter.convert(null, pokemon, Long.class, Pokemon.class);\n\n assertEquals(result.getClass(), Long.class, \"Converted object is not of a Long class.\");\n assertSame(result, pokemon.getId(), \"Converted object is not the one expected.\");\n }", "private String MiniOneConversion() {\n int reading = ((raw[22] & 0xF0) >> 4) + ((raw[23] & 0x3F) << 4);\n\n Map<String, BigDecimal> variables = new HashMap<String, BigDecimal>();\n variables.put(\"x\", new BigDecimal(reading));\n BigDecimal result = m1Conv.eval(variables);\n return result.setScale(3, RoundingMode.UP) + \"\";\n }", "Object convert(Object source, TypeToken<?> targetTypeToken);", "Object transform(String cellValue, Type toValueType) throws Throwable;", "public interface ValueConvertor {\n\t/**\n\t * \n\t * Convert the value of result set to JAVA type<BR>\n\t * \n\t * @param cursor\n\t * @param columnIndex\n\t * @param javaType\n\t * @return value after converting\n\t */\n\tObject convertCursorToJavaValue(Cursor cursor, int columnIndex,\n\t\t\tClass<?> javaType);\n\n\t/**\n\t * \n\t * Convert DB type to JAVA type<BR>\n\t * \n\t * @param value\n\t * @param javaType\n\t * @return value after converting\n\t */\n\tObject convertDBValueToJavaValue(Object value, Class<?> javaType);\n\n\t/**\n\t * Convert JAVA type to DB type<BR>\n\t * \n\t * @param value\n\t * @param javaType\n\t * @return value after converting\n\t */\n\tObject convertJavaValueToDBValue(Object value, Class<?> javaType);\n}", "@Test\n public void testConvertStadium() {\n Object result = converter.convert(null, stadium, Long.class, Stadium.class);\n\n assertEquals(result.getClass(), Long.class, \"Converted object is not of a Long class.\");\n assertSame(result, stadium.getId(), \"Converted object is not the one expected.\");\n }", "public void Convert() {\n value = value;\n }", "public interface Converter {\n\n public double convert(String converterName, double value);\n}", "protected abstract Object toObject(ByteBuffer content, Type targetType) throws BeanConversionException;", "@Test\n public void testConversionFunction2() throws Exception {\n String sql = \"SELECT CONVERT(CONVERT(a, timestamp), string) FROM g\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node function1Node = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, Function.ID);\n verifyProperty(function1Node, Function.NAME_PROP_NAME, \"CONVERT\");\n\n Node function2Node = verify(function1Node, Function.ARGS_REF_NAME, 1, Function.ID);\n verifyProperty(function2Node, Function.NAME_PROP_NAME, \"CONVERT\");\n\n verifyElementSymbol(function2Node, Function.ARGS_REF_NAME, 1, \"a\");\n verifyConstant(function2Node, Function.ARGS_REF_NAME, 2, \"timestamp\");\n\n verifyConstant(function1Node, Function.ARGS_REF_NAME, 2, \"string\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"g\");\n\n verifySql(sql, fileNode);\n }", "@Test\n public void testConvertBadgeId() {\n Object result = converter.convert(null, badge.getId(), Badge.class, Long.class);\n\n assertEquals(result.getClass(), Badge.class, \"Converted object is not of a Badge class.\");\n assertSame(result, badge, \"Converted object is not the one expected.\");\n }", "void convert(ConversionPostedData postedData);", "private String BtaOneConversion() {\n int reading = (raw[25] & 0xFF) + ((raw[26] & 0x03) << 8);\n\n Map<String, BigDecimal> variables = new HashMap<String, BigDecimal>();\n variables.put(\"x\", new BigDecimal(reading));\n BigDecimal result = b1Conv.eval(variables);\n return result.setScale(3, RoundingMode.UP) + \"\";\n }", "default T convert(final String value, final String format) {\n return convert(value);\n }", "private static Object convert(final String identifier, final Class<?> type, Object value) throws ParseException {\n if (type == Date.class) {\n return toDate(value, identifier);\n }\n if (type == PeriodDuration.class && value instanceof String) {\n try {\n return new PeriodDurationType((String) value);\n } catch (IllegalArgumentException ex) {\n // TODO: \"log and continue\" is not appropriate here, since the user can not know that his data is lost.\n LOGGER.log(Level.WARNING, \"Bad period duration value: {0} (property: {1})\",\n new Object[] {value, identifier});\n return null;\n }\n }\n if (InternationalString.class.isAssignableFrom(type) && value instanceof String) {\n return new SimpleInternationalString(value.toString());\n }\n if (Charset.class.isAssignableFrom(type) && value instanceof String) {\n return Charset.forName(value.toString());\n }\n if (Locale.class.isAssignableFrom(type) && value instanceof String) {\n String text = value.toString();\n text = text.substring(text.indexOf('.') + 1).trim();\n return Locales.parse(text);\n }\n if (!CharSequence.class.isAssignableFrom(type) && (value instanceof CharSequence)) {\n String text = value.toString();\n if (text.startsWith(\"nilReason:\")) {\n try {\n value = NilReason.valueOf(text.substring(\"nilReason:\".length())).createNilObject(type);\n } catch (URISyntaxException | IllegalArgumentException e) {\n throw new ParseException(\"Illegal value: \\\"\" + text + \"\\\".(property:\" + identifier + \")\", e);\n }\n } else {\n final boolean isCodeList = CodeList.class.isAssignableFrom(type);\n if (isCodeList || type == Locale.class || type == Charset.class || type.isEnum()) {\n text = text.substring(text.indexOf('.') + 1).trim();\n if (isCodeList) {\n value = Types.forCodeName(type.asSubclass(CodeList.class), text, false);\n } else {\n value = text;\n }\n }\n }\n }\n return value;\n }", "public static HiveObjectConversion getConversion(\n ObjectInspector inspector, LogicalType dataType, HiveShim hiveShim) {\n if (inspector instanceof PrimitiveObjectInspector) {\n HiveObjectConversion conversion;\n if (inspector instanceof BooleanObjectInspector\n || inspector instanceof StringObjectInspector\n || inspector instanceof ByteObjectInspector\n || inspector instanceof ShortObjectInspector\n || inspector instanceof IntObjectInspector\n || inspector instanceof LongObjectInspector\n || inspector instanceof FloatObjectInspector\n || inspector instanceof DoubleObjectInspector\n || inspector instanceof BinaryObjectInspector\n || inspector instanceof VoidObjectInspector) {\n conversion = IdentityConversion.INSTANCE;\n } else if (inspector instanceof DateObjectInspector) {\n conversion = hiveShim::toHiveDate;\n } else if (inspector instanceof TimestampObjectInspector) {\n conversion = hiveShim::toHiveTimestamp;\n } else if (inspector instanceof HiveCharObjectInspector) {\n conversion =\n o ->\n o == null\n ? null\n : new HiveChar(\n (String) o, ((CharType) dataType).getLength());\n } else if (inspector instanceof HiveVarcharObjectInspector) {\n conversion =\n o ->\n o == null\n ? null\n : new HiveVarchar(\n (String) o, ((VarCharType) dataType).getLength());\n } else if (inspector instanceof HiveDecimalObjectInspector) {\n conversion = o -> o == null ? null : HiveDecimal.create((BigDecimal) o);\n } else if (inspector instanceof HiveIntervalYearMonthObjectInspector) {\n conversion =\n o -> {\n if (o == null) {\n return null;\n } else {\n Period period = (Period) o;\n return new HiveIntervalYearMonth(\n period.getYears(), period.getMonths());\n }\n };\n } else if (inspector instanceof HiveIntervalDayTimeObjectInspector) {\n conversion =\n o -> {\n if (o == null) {\n return null;\n } else {\n Duration duration = (Duration) o;\n return new HiveIntervalDayTime(\n duration.getSeconds(), duration.getNano());\n }\n };\n } else {\n throw new FlinkHiveUDFException(\n \"Unsupported primitive object inspector \" + inspector.getClass().getName());\n }\n // if the object inspector prefers Writable objects, we should add an extra conversion\n // for that\n // currently this happens for constant arguments for UDFs\n if (((PrimitiveObjectInspector) inspector).preferWritable()) {\n conversion = new WritableHiveObjectConversion(conversion, hiveShim);\n }\n return conversion;\n }\n\n if (inspector instanceof ListObjectInspector) {\n HiveObjectConversion eleConvert =\n getConversion(\n ((ListObjectInspector) inspector).getListElementObjectInspector(),\n ((ArrayType) dataType).getElementType(),\n hiveShim);\n return o -> {\n if (o == null) {\n return null;\n }\n Object[] array = (Object[]) o;\n List<Object> result = new ArrayList<>();\n\n for (Object ele : array) {\n result.add(eleConvert.toHiveObject(ele));\n }\n return result;\n };\n }\n\n if (inspector instanceof MapObjectInspector) {\n MapObjectInspector mapInspector = (MapObjectInspector) inspector;\n MapType kvType = (MapType) dataType;\n\n HiveObjectConversion keyConversion =\n getConversion(\n mapInspector.getMapKeyObjectInspector(), kvType.getKeyType(), hiveShim);\n HiveObjectConversion valueConversion =\n getConversion(\n mapInspector.getMapValueObjectInspector(),\n kvType.getValueType(),\n hiveShim);\n\n return o -> {\n if (o == null) {\n return null;\n }\n Map<Object, Object> map = (Map) o;\n Map<Object, Object> result = CollectionUtil.newHashMapWithExpectedSize(map.size());\n\n for (Map.Entry<Object, Object> entry : map.entrySet()) {\n result.put(\n keyConversion.toHiveObject(entry.getKey()),\n valueConversion.toHiveObject(entry.getValue()));\n }\n return result;\n };\n }\n\n if (inspector instanceof StructObjectInspector) {\n StructObjectInspector structInspector = (StructObjectInspector) inspector;\n\n List<? extends StructField> structFields = structInspector.getAllStructFieldRefs();\n\n List<RowType.RowField> rowFields = ((RowType) dataType).getFields();\n\n HiveObjectConversion[] conversions = new HiveObjectConversion[structFields.size()];\n for (int i = 0; i < structFields.size(); i++) {\n conversions[i] =\n getConversion(\n structFields.get(i).getFieldObjectInspector(),\n rowFields.get(i).getType(),\n hiveShim);\n }\n\n return o -> {\n if (o == null) {\n return null;\n }\n Row row = (Row) o;\n List<Object> result = new ArrayList<>(row.getArity());\n for (int i = 0; i < row.getArity(); i++) {\n result.add(conversions[i].toHiveObject(row.getField(i)));\n }\n return result;\n };\n }\n\n throw new FlinkHiveUDFException(\n String.format(\n \"Flink doesn't support convert object conversion for %s yet\", inspector));\n }", "@Test\n public void testConversionFunction() throws Exception {\n String sql = \"SELECT CONVERT(a, string) FROM g\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node functionNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, Function.ID);\n verifyProperty(functionNode, Function.NAME_PROP_NAME, \"CONVERT\");\n\n verifyElementSymbol(functionNode, Function.ARGS_REF_NAME, 1, \"a\");\n verifyConstant(functionNode, Function.ARGS_REF_NAME, 2, \"string\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"g\");\n \n verifySql(sql, fileNode);\n }", "T convert(F experimenterMessageCase, D data) throws ConversionException;", "public Class<?> getConversionClass();", "@Test\n public void testConvertPokemonId() {\n Object result = converter.convert(null, pokemon.getId(), Pokemon.class, Long.class);\n\n assertEquals(result.getClass(), Pokemon.class, \"Converted object is not of a Pokemon class.\");\n assertSame(result, pokemon, \"Converted object is not the one expected.\");\n }", "private Object parse(String literalValue, Class<?> returnType) throws ClassNotFoundException\r\n {\r\n // Primitives\r\n \r\n if (byte.class.equals(returnType))\r\n {\r\n return Byte.valueOf(literalValue);\r\n }\r\n if (short.class.equals(returnType))\r\n {\r\n return Short.valueOf(literalValue);\r\n }\r\n if (int.class.equals(returnType))\r\n {\r\n return Integer.valueOf(literalValue);\r\n }\r\n if (long.class.equals(returnType))\r\n {\r\n String valueToUse = literalValue;\r\n if (valueToUse.endsWith(\"l\") || valueToUse.endsWith(\"L\"))\r\n {\r\n valueToUse = valueToUse.substring(0, valueToUse.length() - 1);\r\n }\r\n return Long.valueOf(valueToUse);\r\n }\r\n if (float.class.equals(returnType))\r\n {\r\n String valueToUse = literalValue;\r\n if (valueToUse.endsWith(\"f\") || valueToUse.endsWith(\"F\"))\r\n {\r\n valueToUse = valueToUse.substring(0, valueToUse.length() - 1);\r\n }\r\n return Float.valueOf(valueToUse);\r\n }\r\n if (double.class.equals(returnType))\r\n {\r\n String valueToUse = literalValue;\r\n if (valueToUse.endsWith(\"d\") || valueToUse.endsWith(\"D\"))\r\n {\r\n valueToUse = literalValue.substring(0, valueToUse.length() - 1);\r\n }\r\n return Double.valueOf(valueToUse);\r\n }\r\n if (boolean.class.equals(returnType))\r\n {\r\n return Boolean.valueOf(literalValue);\r\n }\r\n if (char.class.equals(returnType))\r\n {\r\n return Character.valueOf(literalValue.charAt(1));\r\n }\r\n \r\n // Arrays\r\n \r\n if (returnType.isArray())\r\n {\r\n String[] values = literalValue.substring(1, literalValue.length() - 1).split(\",\");\r\n int length = values.length;\r\n Class<?> componentType = returnType.getComponentType();\r\n Object array = Array.newInstance(componentType, length);\r\n \r\n for (int loop = 0; loop < length; loop++)\r\n {\r\n Array.set(array, loop, parse(values[loop], componentType));\r\n }\r\n \r\n return array;\r\n }\r\n \r\n // Enums\r\n \r\n if (returnType.isEnum())\r\n {\r\n Enum<?>[] constants = (Enum<?>[]) returnType.getEnumConstants();\r\n \r\n String valueToUse = StringUtils.substringAfterLast(literalValue, '.');\r\n \r\n for (Enum<?> inst : constants)\r\n {\r\n if (inst.name().equals(valueToUse))\r\n {\r\n return inst;\r\n }\r\n }\r\n \r\n return null;\r\n }\r\n \r\n // Strings\r\n \r\n if (String.class.equals(returnType))\r\n {\r\n return literalValue.substring(1, literalValue.length() - 1);\r\n }\r\n \r\n // Classes\r\n \r\n if (Class.class.equals(returnType))\r\n {\r\n String resolvedType = StringUtils.substringBefore(literalValue, \".class\");\r\n resolvedType = ((JavaSource<?>) this.annotationSource.getOrigin()).resolveType(resolvedType);\r\n return Class.forName(resolvedType);\r\n }\r\n \r\n // Annotations\r\n \r\n if (Annotation.class.isAssignableFrom(returnType))\r\n {\r\n String resolvedType = StringUtils.substringAfter(literalValue, \"@\");\r\n resolvedType = ((JavaSource<?>) this.annotationSource.getOrigin()).resolveType(resolvedType);\r\n \r\n return AnnotationProxy.newInstance(this.annotationSource);\r\n }\r\n \r\n // Unknown\r\n \r\n throw new UnsupportedOperationException(returnType.getSimpleName());\r\n }", "com.google.protobuf.StringValue getConversionAction();", "@Test @SpecAssertion(id = \"432-A1\", section=\"4.3.2\")\n public void testConversion(){\n Assert.fail();\n }", "private void setExternalConversion(int conversionType) {\n\n //Vector of conversions.\n Vector<String[]> conversions = new Vector<String[]>();\n\n String line;\n\n //Create a buffered reader to read in the file.\n BufferedReader in = new BufferedReader(new StringReader(conversionsText));\n\n //Read in every line to memory.\n try {\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t conversions.add(line.split(\",\"));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n Iterator<String[]> iter = conversions.iterator();\n String[] temp = new String[4];\n\n //Iterate through the vector to find the correct conversion function.\n while (iter.hasNext()) {\n temp = (String[]) iter.next();\n\n if (Integer.parseInt(temp[0]) == conversionType) {\n \n break;\n }\n }\n\n //Create the expression from the conversion that was chosen from the file.\n Expression exp = new Expression(temp[3]);\n externalConversion = exp;\n\n }", "public void testElementWithConverterType() {\n ElementWithConverterTypeTestDTO obj = new ElementWithConverterTypeTestDTO();\n obj.element = getDateForConverter(\"28.02.2007:15:21:27\");\n assertTrue(JSefaTestUtil.serialize(XML, obj).indexOf(\"2007-02-28T15:21:27.000Z\") >= 0);\n }", "public T convert(Number source)\r\n/* 26: */ {\r\n/* 27:56 */ return NumberUtils.convertNumberToTargetClass(source, this.targetType);\r\n/* 28: */ }", "@Test\n public void testConvertTrainer() {\n Object result = converter.convert(null, trainer, Long.class, Trainer.class);\n\n assertEquals(result.getClass(), Long.class, \"Converted object is not of a Long class.\");\n assertSame(result, trainer.getId(), \"Converted object is not the one expected.\");\n }", "Map<String, PrimitiveTypeProvider> convert(T data);", "private TypeInfo convertToOdpsType(String type) {\n String hiveType = type.toUpperCase();\n\n // hiveType = hiveType.replaceAll(\"(?<=DECIMAL[^(]{0,10}\\\\()[^)]*\", \"36,18\");\n hiveType = hiveType.replaceAll(\"(?<!VAR)CHAR.*\\\\)\", \"STRING\");\n\n return TypeInfoParser.getTypeInfoFromTypeString(hiveType);\n }", "@Test\n @Ignore\n public void testConvert() {\n System.out.println(\"convert\");\n Object object = null;\n SntParser instance = new SntParser();\n byte[] expResult = null;\n byte[] result = instance.convert(object);\n assertArrayEquals(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 }", "static ProjectedTuple castNumbers(ProjectedTuple tuple) {\n List<Object> newVaues = new ArrayList<>();\n for (int i = 0; i < tuple.values().size(); i++) {\n newVaues.add(convert(tuple.values().get(i), tuple.paths().get(i).returnType()));\n }\n\n return ProjectedTuple.of(tuple.paths(), newVaues);\n }", "public Object caste(Object item, CastTo ct){\n Object result = new Object();\n switch(ct){\n case date:result = DateParser.parse((String)item, OutFormat.date);\n break;\n case datetime:result = DateParser.parse((String)item, OutFormat.datetime);\n break;\n case datetime2:result = DateParser.parse((String)item, OutFormat.datetime2);\n break;\n case smalldatetime:result = DateParser.parse((String)item, OutFormat.smalldatetime);\n break;\n case time:result = DateParser.parse((String)item, OutFormat.time);\n break;\n case CHAR:result = CharCatster(item);\n //return result.toString();\n break;\n case UNSIGNED:result = UnSigndCatster(item);\n break;\n case SIGNED:result = SigndCatster(item);\n break;\n case BINARY:result = BinaryCaster(item);\n break;\n }\n return result;\n }", "private static Object parseStringToObject(String text, Class ObjectType) {\n if (ObjectType == Integer.class) return Integer.parseInt(text);\n else if (ObjectType == Float.class) return Float.parseFloat(text);\n else if (ObjectType == Double.class) return Double.parseDouble(text);\n return null;\n }", "@Test \n\tpublic void CheckConvertionsTest1() throws Exception {\n\t\t\n\t\t/** these are non-defined conversions **/\n\t\tassertEquals((double)-1, PortionSearchEngine.CheckConvertions(\"kilocalories\", 1.0),0.01);\n\t\tassertEquals((double)-1, PortionSearchEngine.CheckConvertions(\"bamba\", 1.0),0.01);\n\n\t\t/** these are defined conversions **/\n\t\tassertEquals((double)28.3495, PortionSearchEngine.CheckConvertions(\"ounce\", 1.0),0.01);\n\t\tassertEquals((double)28.3495, PortionSearchEngine.CheckConvertions(\"ounces\", 1.0),0.01);\n\t\tassertEquals((double)3.7854, PortionSearchEngine.CheckConvertions(\"gallon\", 1.0),0.01);\n\t\t\n\t\t/** these suppose to return -1 as these are trivial conversions **/\n\t\tassertEquals((double)-1, PortionSearchEngine.CheckConvertions(\"grams\", 1.0),0.01);\n\t\tassertEquals((double)-1, PortionSearchEngine.CheckConvertions(\"kilograms\", 1.0),0.01);\n\t\tassertEquals((double)-1, PortionSearchEngine.CheckConvertions(\"milligrams\", 1.0),0.01);\n\t\t\n\t\t\n\t}", "private boolean convert(String type) {\n\n String convert = \"\";\n\n switch (type) {\n\n case \"h\":\n /* Loop through the operands and convert each to decimal. */\n for (int i = 0; i < operands.size(); i++){\n\n convert = Converter.hexToDec(operands.get(i));\n operands.set(i, convert);\n }\n break;\n\n case \"b\":\n /* Loop through the operands and convert each to decimal. */\n for (int i = 0; i < operands.size(); i++){\n\n convert = Converter.binToDec(operands.get(i));\n operands.set(i, convert);\n }\n break;\n default: return false;\n\n }\n\n return true;\n }", "Test convert(TestData testData);", "protected abstract Object convertNonNull(Object o);", "protected abstract SimpleType doParseString(String s);", "@Override\r\n\tpublic void cast() {\n\r\n\t}", "@Override\n public Object convert(Object dest, Object source, Class<?> aClass, Class<?> aClass1) {\n return null;\n\n }", "@Override\n\t\tpublic Integer convert(String s) {\n\t\t\treturn Integer.parseInt(s);\n\t\t}", "private Variable stringToVariable(String value, int smiSyntax) {\n Variable var = AbstractVariable.createFromSyntax(smiSyntax);\n try {\n if (var instanceof AssignableFromString) {\n ((AssignableFromString) var).setValue(value);\n } else if (var instanceof AssignableFromInteger) {\n ((AssignableFromInteger) var).setValue(Integer.valueOf(value));\n } else if (var instanceof AssignableFromLong) {\n ((AssignableFromLong) var).setValue(Long.valueOf(value));\n } else {\n this.getLogger().error(\"Unsupported conversion of [\" + value +\"] to \" + var.getSyntaxString());\n var = null;\n }\n } catch (IllegalArgumentException e) {\n this.getLogger().error(\"Unsupported conversion of [\" + value +\"] to \" + var.getSyntaxString(), e);\n var = null;\n }\n return var;\n }", "public void testAttributeWithConverterType() {\n AttributeWithConverterTypeTestDTO obj = new AttributeWithConverterTypeTestDTO();\n obj.attribute = getDateForConverter(\"28.02.2007:15:21:27\");\n assertTrue(JSefaTestUtil.serialize(XML, obj).indexOf(\"2007-02-28T15:21:27.000Z\") >= 0);\n }", "protected Object getObjectValue(IRI propertyIRI, Literal object) {\n IRI datatype = object.getDatatype();\n if (datatype.equals(XMLSchema.STRING) || datatype.equals(RDF.LANGSTRING)) {\n final Optional<String> language = object.getLanguage();\n if (parserConfig.getLanguageFilter() == null || !language.isPresent() || parserConfig\n .getLanguageFilter().equals(language.get())) {\n return object.stringValue() + (\n parserConfig.getGraphConf().isKeepLangTag() && language.isPresent() ? \"@\"\n + language.get()\n : \"\");\n } else {\n //filtered by lang\n return null;\n }\n } else if (typeMapsToLongType(datatype)) {\n return object.longValue();\n } else if (typeMapsToDouble(datatype)) {\n return object.doubleValue();\n } else if (datatype.equals(XMLSchema.BOOLEAN)) {\n return object.booleanValue();\n } else if (datatype.equals(XMLSchema.DATETIME)) {\n try {\n return ZonedDateTime.parse(object.stringValue());\n }catch(DateTimeParseException dtpe){\n try{\n //formatter to support the format shown int the cypher refcard (timezone but no offset)\n DateTimeFormatter neo4jZonedDateFormat = new DateTimeFormatterBuilder()\n .appendPattern(\"yyyy-MM-dd'T'HH:mm:ss\")\n .appendFraction(ChronoField.MILLI_OF_SECOND, 0, 9, true)\n .appendPattern(\"'['\").appendZoneId().appendPattern(\"']'\").toFormatter();\n return ZonedDateTime.parse(object.stringValue(), neo4jZonedDateFormat);\n }catch(DateTimeParseException dtpe2){\n try {\n return DateUtils.parseDateTime(object.stringValue());\n } catch (IllegalArgumentException e) {\n //if date cannot be parsed we return string value\n return object.stringValue();\n }\n }\n }\n }else if (datatype.equals(vf.createIRI(GEOSPARQL_NS, WKTLITERAL))) {\n try {\n return PointValue.parse(wktToCartesian(object.stringValue()));\n } catch (InvalidArgumentException e) {\n //if pointvalue cannot be parsed we return string value\n return object.stringValue();\n }\n } else if (datatype.equals(XMLSchema.DATE)) {\n try {\n return DateUtils.parseDate(object.stringValue());\n } catch (IllegalArgumentException e) {\n //if date cannot be parsed we return string value\n return object.stringValue();\n }\n } else {\n //it's a custom data type\n if (parserConfig.getGraphConf().isKeepCustomDataTypes() && !(\n parserConfig.getGraphConf().getHandleVocabUris() == GRAPHCONF_VOC_URI_IGNORE\n || parserConfig.getGraphConf().getHandleVocabUris() == GRAPHCONF_VOC_URI_MAP)) {\n //keep custom type as long as property is not absent from customDT list\n if (parserConfig.getGraphConf().getCustomDataTypePropList() == null || parserConfig\n .getGraphConf().getCustomDataTypePropList()\n .contains(propertyIRI.stringValue())) {\n return getValueWithDatatype(datatype, object.stringValue());\n } else {\n return object.stringValue();\n }\n }\n }\n // default\n return object.stringValue();\n }", "com.google.protobuf.StringValueOrBuilder getConversionActionOrBuilder();", "public interface Converter extends Comparable<Converter> {\n int DEFAULT_PRIORITY = 5;\n\n /**\n * Convert to given type\n *\n * @param source the source\n * @param targetTypeToken the TypeToken of the type\n * @return converted object\n */\n Object convert(Object source, TypeToken<?> targetTypeToken);\n\n /**\n * Check that source can convert to given type\n *\n * @param source the source\n * @param targetTypeToken the TypeToken of the type\n * @return true if it can convert\n */\n boolean canHandle(Object source, TypeToken<?> targetTypeToken);\n\n /**\n * Executing priority. Low value is high priority.\n * @return priority\n */\n int getPriority();\n}", "public Object parse(String s) throws JDBFException {\r\n s = s.trim();\r\n if (type == 'N' || type == 'F') {\r\n if (s.equals(\"\")) {\r\n s = \"0\";\r\n }\r\n try {\r\n if (getDecimalCount() == 0) {\r\n return new Long(s);\r\n } else {\r\n return new Double(s);\r\n }\r\n } catch (NumberFormatException numberformatexception) {\r\n throw new JDBFException(numberformatexception);\r\n }\r\n }\r\n if (type == 'C') {\r\n return s;\r\n }\r\n if (type == 'L') {\r\n if (s.equals(\"Y\") || s.equals(\"y\") || s.equals(\"T\") || s.equals(\"t\")) {\r\n return new Boolean(true);\r\n }\r\n if (s.equals(\"N\") || s.equals(\"n\") || s.equals(\"F\") || s.equals(\"f\")) {\r\n return new Boolean(false);\r\n } else {\r\n throw new JDBFException(\"Unrecognized value for logical field: \" + s);\r\n }\r\n }\r\n if (type == 'D') {\r\n SimpleDateFormat simpledateformat = new SimpleDateFormat(\"yyyyMMdd\");\r\n try {\r\n if (\"\".equals(s)) {\r\n return null;\r\n } else {\r\n return simpledateformat.parse(s);\r\n }\r\n } catch (ParseException parseexception) {\r\n //throw new JDBFException(parseexception);\r\n return null;\r\n }\r\n } else {\r\n throw new JDBFException(\"Unrecognized JDBFField type: \" + type);\r\n }\r\n }", "Value getInterpretation();", "@Test\n public void testConvertStadiumId() {\n Object result = converter.convert(null, stadium.getId(), Stadium.class, Long.class);\n\n assertEquals(result.getClass(), Stadium.class, \"Converted object is not of a Stadium class.\");\n assertSame(result, stadium, \"Converted object is not the one expected.\");\n }", "private void convert(Map map) {\n if (map == null)\n return;\n\n for (Object key : valueTypes.keySet()) {\n MessagePackObject mpo = (MessagePackObject) map.get(key);\n if (mpo != null)\n map.put(key, mpo.convert(Templates.tNullable(\n TemplateRegistry.lookup(valueTypes.get(key)))));\n }\n\n }", "private String MiniTwoConversion() {\n int reading = ((raw[23] & 0xC0) >> 6) + ((raw[24] & 0xFF) << 2);\n\n Map<String, BigDecimal> variables = new HashMap<String, BigDecimal>();\n variables.put(\"x\", new BigDecimal(reading));\n BigDecimal result = m2Conv.eval(variables);\n return result.setScale(3, RoundingMode.UP) + \"\";\n }", "public void testDateTimeConverters() throws Exception {\n long currentTime = System.currentTimeMillis();\n java.util.Date utilDate = new java.util.Date(currentTime);\n assertConversion(\"DateToLong\", new DateTimeConverters.DateToLong(), utilDate, currentTime);\n assertConversion(\"DateToSqlDate\", new DateTimeConverters.DateToSqlDate(), utilDate, new java.sql.Date(currentTime));\n assertConversion(\"DateToString\", new DateTimeConverters.DateToString(), utilDate, utilDate.toString());\n //assertConversion(\"StringToDate\", new DateTimeConverters.StringToDate(), utilDate.toString(), utilDate);\n assertConversion(\"DateToTimestamp\", new DateTimeConverters.DateToTimestamp(), utilDate, new java.sql.Timestamp(currentTime));\n // Source class = java.sql.Date\n java.sql.Date sqlDate = new java.sql.Date(currentTime);\n assertConversion(\"SqlDateToDate\", new DateTimeConverters.SqlDateToDate(), sqlDate, utilDate);\n assertConversion(\"SqlDateToString\", new DateTimeConverters.SqlDateToString(), sqlDate, sqlDate.toString());\n //assertConversion(\"StringToSqlDate\", new DateTimeConverters.StringToSqlDate(), sqlDate.toString(), sqlDate);\n java.sql.Timestamp timestamp = new java.sql.Timestamp(currentTime);\n assertConversion(\"SqlDateToTimestamp\", new DateTimeConverters.SqlDateToTimestamp(), sqlDate, timestamp);\n assertConversion(\"StringToTimestamp\", new DateTimeConverters.StringToTimestamp(), timestamp.toString(), timestamp);\n assertConversion(\"TimestampToDate\", new DateTimeConverters.TimestampToDate(), timestamp, utilDate);\n assertConversion(\"TimestampToSqlDate\", new DateTimeConverters.TimestampToSqlDate(), timestamp, sqlDate);\n //assertConversion(\"TimestampToString\", new DateTimeConverters.TimestampToString(), timestamp, timestamp.toString());\n }", "@Test\n public void test4(){\n final int num = 1;\n Converter<Integer, String> stringConverter =\n (from) -> String.valueOf(from + num);\n // 3\n System.out.println(stringConverter.convert(2));\n\n }", "static Map<Name, ObjectConverter> createConversionMap (final FeatureType input, final FeatureType toConvert) throws NonconvertibleObjectException{\n\n if(input.equals(toConvert)){\n return null;\n }\n final Map<Name, ObjectConverter> map = new HashMap<Name, ObjectConverter>();\n\n for (PropertyDescriptor toConvertDesc : toConvert.getDescriptors()) {\n for(PropertyDescriptor inputDesc : input.getDescriptors()){\n\n //same property name\n if(toConvertDesc.getName().equals(inputDesc.getName())){\n\n final Class inputClass = inputDesc.getType().getBinding();\n final Class toConvertClass = toConvertDesc.getType().getBinding();\n if(toConvertClass.equals(inputClass)){\n //same name and same type\n map.put(toConvertDesc.getName(), null);\n }else{\n //same name but different type\n if(toConvertDesc instanceof GeometryDescriptor){\n map.put(toConvertDesc.getName(), new GeomConverter(toConvertClass, inputClass));\n }else{\n map.put(toConvertDesc.getName(), ConverterRegistry.system().converter(toConvertClass, inputClass));\n }\n }\n }\n }\n }\n return map;\n\n }", "public void testElementMapWithConverterType() {\n ElementMapWithConverterTypeTestDTO obj = new ElementMapWithConverterTypeTestDTO();\n obj.map = new HashMap<Date, BigDecimal>();\n obj.map.put(getDateForConverter(\"28.02.2007:15:21:27\"), new BigDecimal(3.14));\n obj.map.put(getDateForConverter(\"01.03.2007:15:21:27\"), new BigDecimal(0.815));\n assertTrue(JSefaTestUtil.serialize(XML, obj).indexOf(\"2007-02-28T15:21:27.000Z\") >= 0);\n assertTrue(JSefaTestUtil.serialize(XML, obj).indexOf(\"2007-03-01T15:21:27.000Z\") >= 0);\n }", "public void testElementWithFormatAndConverterType() {\n ElementWithFormatAndConverterTypeTestDTO obj = new ElementWithFormatAndConverterTypeTestDTO();\n obj.element = getDateForFormatAndConverter(\"28.02.2007:15:21:27\");\n assertTrue(JSefaTestUtil.serialize(XML, obj).indexOf(\"2007-02-28T14:21:27.000-01:00\") >= 0);\n }", "protected IValue narrow(Object result){\n\t\tif(result instanceof Integer) {\n\t\t\treturn vf.integer((Integer)result);\n\t\t}\n\t\tif(result instanceof IValue) {\n\t\t\treturn (IValue) result;\n\t\t}\n\t\tif(result instanceof Thrown) {\n\t\t\t((Thrown) result).printStackTrace(stdout);\n\t\t\treturn vf.string(((Thrown) result).toString());\n\t\t}\n\t\tif(result instanceof Object[]) {\n\t\t\tIListWriter w = vf.listWriter();\n\t\t\tObject[] lst = (Object[]) result;\n\t\t\tfor(int i = 0; i < lst.length; i++){\n\t\t\t\tw.append(narrow(lst[i]));\n\t\t\t}\n\t\t\treturn w.done();\n\t\t}\n\t\tif(result == null){\n\t\t\treturn null;\n\t\t}\n\t\tthrow new InternalCompilerError(\"Cannot convert object back to IValue: \" + result);\n\t}", "private static Object valueFromBytes(ByteBuffer bytes) throws JSONException{\n\t\tbyte type = bytes.get();\n\t\t//System.out.println(\"From value: \" + new Integer(type).toString());\n\t\tswitch(type){\n\t\tcase MAP_INDICATOR:\n\t\t\t//System.out.println(\"MAP!\");\n\t\t\treturn mapFromBytes(bytes);\n\t\tcase ARRAY_INDICATOR:\n\t\t\treturn arrayFromBytes(bytes);\n\t\tcase STRING_INDICATOR:\n\t\t\t//System.out.println(\"STRING!\");\n\t\t\tint length = bytes.getInt();\n\t\t\tbyte[] stringBytes = new byte[length];\n\t\t\tbytes.get(stringBytes, 0, length);\n\t\t\treturn new String(stringBytes);\n\t\tcase INTEGER_INDICATOR:\n\t\t\treturn bytes.getInt();\n\t\tcase LONG_INDICATOR:\n\t\t\treturn bytes.getLong();\n\t\tcase DOUBLE_INDICATOR:\n\t\t\treturn bytes.getDouble();\n\t\tcase FLOAT_INDICATOR:\n\t\t\treturn bytes.getFloat();\n\t\tcase BOOLEAN_INDICATOR:\n\t\t\treturn bytes.get() == 1 ? 1: 0;\n\t\tdefault:\n\t\t\tthrow new JSONException(\"Tried to decode unknown type from byte array!\");\n\t\t}\n\t\t\n\t\t\t\n\t\t\t\n\t}", "public void testConvertNull() throws Exception {\n try {\n makeConverter().convert(getExpectedType(), null);\n fail(\"Expected ConversionException\");\n } catch(ConversionException e) {\n // expected\n }\n }", "Target convert(Source source);", "private <T> T convert(String json, Type resultObject) {\n\t\tGson gson = new GsonBuilder().create();\n\t\treturn gson.fromJson(json, resultObject);\n\t}", "protected abstract Scalar parseScalar(Scalar s);", "private static HashMap<String, String> initMapping()\n {\n HashMap<String, String> typeMapping = new HashMap<String, String>();\n\n typeMapping.put(\"boolean\", \"boolean\");\n typeMapping.put(\"float\", \"float\");\n typeMapping.put(\"double\", \"double\");\n typeMapping.put(\"byte\", \"byte\");\n typeMapping.put(\"unsignedByte\", \"short\");\n typeMapping.put(\"short\", \"short\");\n typeMapping.put(\"unsignedShort\", \"int\");\n typeMapping.put(\"int\", \"int\");\n typeMapping.put(\"integer\", \"java.math.BigDecimal\");\n typeMapping.put(\"positiveInteger\", \"java.math.BigInteger\");\n typeMapping.put(\"unsignedInt\", \"java.math.BigInteger\");\n typeMapping.put(\"long\", \"java.math.BigInteger\");\n typeMapping.put(\"unsignedLong\", \"java.math.BigDecimal\");\n typeMapping.put(\"decimal\", \"java.math.BigDecimal\");\n typeMapping.put(\"string\", \"String\");\n typeMapping.put(\"hexBinary\", \"byte[]\");\n typeMapping.put(\"base64Binary\", \"byte[]\");\n typeMapping.put(\"dateTime\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"time\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"date\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gDay\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gMonth\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gMonthDay\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gYear\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gYearMonth\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"duration\", \"javax.xml.datatype.Duration\");\n typeMapping.put(\"NOTATION\", \"javax.xml.namespace.QName\");\n typeMapping.put(\"QName\", \"javax.xml.namespace.QName\");\n typeMapping.put(\"anyURI\", \"String\");\n typeMapping.put(\"Name\", \"String\");\n typeMapping.put(\"NCName\", \"String\");\n typeMapping.put(\"negativeInteger\", \"java.math.BigDecimal\");\n typeMapping.put(\"NMTOKEN\", \"String\");\n typeMapping.put(\"nonNegativeInteger\", \"java.math.BigDecimal\");\n typeMapping.put(\"nonPositiveInteger\", \"java.math.BigDecimal\");\n typeMapping.put(\"normalizedString\", \"String\");\n typeMapping.put(\"token\", \"String\");\n typeMapping.put(\"any\", \"Object\");\n\n return typeMapping;\n }", "private T convert(String value)\n {\n if (value == null)\n {\n return null;\n }\n\n Object result = null;\n\n if (this.converter != null)\n {\n try\n {\n result = converter.convert(value);\n }\n catch (Exception e)\n {\n throw ExceptionUtils.throwAsRuntimeException(e);\n }\n }\n else if (String.class.equals(configEntryType))\n {\n result = value;\n }\n else if (Class.class.equals(configEntryType))\n {\n result = ClassUtils.tryToLoadClassForName(value);\n }\n else if (Boolean.class.equals(configEntryType))\n {\n Boolean isTrue = \"TRUE\".equalsIgnoreCase(value);\n isTrue |= \"1\".equalsIgnoreCase(value);\n isTrue |= \"YES\".equalsIgnoreCase(value);\n isTrue |= \"Y\".equalsIgnoreCase(value);\n isTrue |= \"JA\".equalsIgnoreCase(value);\n isTrue |= \"J\".equalsIgnoreCase(value);\n isTrue |= \"OUI\".equalsIgnoreCase(value);\n\n result = isTrue;\n }\n else if (Integer.class.equals(configEntryType))\n {\n result = Integer.parseInt(value);\n }\n else if (Long.class.equals(configEntryType))\n {\n result = Long.parseLong(value);\n }\n else if (Float.class.equals(configEntryType))\n {\n result = Float.parseFloat(value);\n }\n else if (Double.class.equals(configEntryType))\n {\n result = Double.parseDouble(value);\n }\n\n return (T) result;\n }", "public void testAttributeWithFormatAndConverterType() {\n AttributeWithFormatAndConverterTypeTestDTO obj = new AttributeWithFormatAndConverterTypeTestDTO();\n obj.attribute = getDateForFormatAndConverter(\"28.02.2007:15:21:27\");\n assertTrue(JSefaTestUtil.serialize(XML, obj).indexOf(\"2007-02-28T14:21:27.000-01:00\") >= 0);\n }", "@Override\n public Number convert(final Number value) {\n return c2.convert(c1.convert(value));\n }", "protected void sequence_Conversion(ISerializationContext context, Conversion semanticObject) {\r\n\t\tif (errorAcceptor != null) {\r\n\t\t\tif (transientValues.isValueTransient(semanticObject, GoPackage.Literals.CONVERSION__TYPE) == ValueTransient.YES)\r\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, GoPackage.Literals.CONVERSION__TYPE));\r\n\t\t\tif (transientValues.isValueTransient(semanticObject, GoPackage.Literals.CONVERSION__EXPRESSION) == ValueTransient.YES)\r\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, GoPackage.Literals.CONVERSION__EXPRESSION));\r\n\t\t}\r\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\r\n\t\tfeeder.accept(grammarAccess.getConversionAccess().getTypeTypeParserRuleCall_1_0(), semanticObject.getType());\r\n\t\tfeeder.accept(grammarAccess.getConversionAccess().getExpressionExpressionParserRuleCall_3_0(), semanticObject.getExpression());\r\n\t\tfeeder.finish();\r\n\t}", "@Override\n\tpublic String convert(String sLine) throws ExceptionZZZ {\n\t\treturn null;\n\t}", "protected <T> T convert(Object value, Class<T> type) {\r\n return typeConversionManager.convert(value, type);\r\n }", "public abstract T parse(Object valueToParse, Type type);" ]
[ "0.62647194", "0.6099592", "0.6053392", "0.59720945", "0.58994865", "0.5850122", "0.57674575", "0.5757937", "0.5748358", "0.57105815", "0.56856894", "0.5647917", "0.562091", "0.55561274", "0.5539584", "0.5530494", "0.55111855", "0.549127", "0.549127", "0.549127", "0.547436", "0.5471873", "0.5468842", "0.5460467", "0.54354775", "0.5422758", "0.541074", "0.53977525", "0.5395043", "0.53944874", "0.5392955", "0.5385956", "0.53693765", "0.5367813", "0.5353239", "0.5350307", "0.5346251", "0.53438395", "0.53356797", "0.53261745", "0.5322383", "0.53155917", "0.53152496", "0.530855", "0.53073937", "0.5306968", "0.5302883", "0.52985066", "0.529287", "0.52894807", "0.5285206", "0.52806026", "0.52720875", "0.5268988", "0.5266529", "0.5263394", "0.5262555", "0.52561104", "0.5246638", "0.5244669", "0.5234749", "0.5233604", "0.5230387", "0.5225844", "0.52087164", "0.5207607", "0.5205472", "0.52053833", "0.5197982", "0.51943797", "0.51933026", "0.5191767", "0.5191104", "0.5181332", "0.5175653", "0.5166854", "0.5162131", "0.5161627", "0.5159814", "0.5157906", "0.5152986", "0.51523274", "0.515158", "0.51384485", "0.51362306", "0.5133345", "0.5125866", "0.512393", "0.5118922", "0.5116858", "0.5113742", "0.51061046", "0.510469", "0.50972843", "0.5085982", "0.50829244", "0.50780886", "0.50741947", "0.5072521", "0.50556076", "0.5054927" ]
0.0
-1
standard: camera.viewportWidht = width/25; standard: camera.viewportheight = height/25;
@Override public void resize(int width, int height) { camera.viewportWidth = width/25; camera.viewportHeight = height/25; camera.update(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onSurfaceChanged(GL10 unused, int width, int height) {\n GLES20.glViewport(0, 0, width, height);\n \n float ratio = (float) width / height;\n /*\n mWidth = width;\n mHeight = height;\n */\n \n // this projection matrix is applied to object coordinates\n // in the onDrawFrame() method\n /*\n Near / far clipping planes, in terms of units away from the camera\n Cannot be negative or 0, should not be close to 0\n */\n //Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 3, 7);\n Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 0.5f, 21);\n \n }", "@Override\n\tpublic void resize(int width, int height) {\n\t\tviewCamera.viewportWidth = width;\n\t\tviewCamera.viewportHeight = height;\n\t\tviewCamera.position.set(0, 0, 0);\n\t\tviewCamera.update();\n\n\t\tVector3 min = MIN_BOUND.cpy();\n\t\tVector3 max = new Vector3(MAX_BOUND.x - width, MAX_BOUND.y - height, 0);\n\t\tviewCamera.project(min, 0, 0, width, height);\n\t\tviewCamera.project(max, 0, 0, width, height);\n\t\tbounds = new BoundingBox(min, max);\n\t\t// do a pan to reset camera position\n\t\tpan(min);\n\t}", "private void setupCamera(final int camera) {\n try {\n // mPreview = new CamPreview(this, camera, CamPreview.LayoutMode.NoBlank);// .FitToParent);\n } catch (Exception e) {\n Toast.makeText(this, R.string.cannot_connect_to_camera, Toast.LENGTH_LONG).show();\n finish();\n return;\n }\n\n RelativeLayout.LayoutParams previewLayoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n Display display = getWindowManager().getDefaultDisplay();\n DisplayMetrics outMetrics = new DisplayMetrics();\n display.getMetrics(outMetrics);\n\n int width = outMetrics.widthPixels;\n int height = outMetrics.heightPixels;\n\n previewLayoutParams.height = width;\n previewLayoutParams.width = width;\n\n // Un-comment below line to specify the position.\n // mPreview.setCenterPosition(width / 2, height / 2);\n\n // previewParent.addView(mPreview, 0, previewLayoutParams);\n\n\n }", "@Override\n public void onCameraViewStarted(int width, int height) {\n mRgba = new Mat(height, width, CvType.CV_8UC4);\n mRgbaF = new Mat(width, height, CvType.CV_8UC4);\n mRgbaT = new Mat(width, height, CvType.CV_8UC4);\n Log.i(TAG, \"height : \" + height);\n Log.i(TAG, \"width : \" + width);\n //Log.i(TAG, \"mOpenCvCameraView size (w,h):\" + mOpenCvCameraView.getWidth() + \" - \" + mOpenCvCameraView.getHeight());\n }", "@Override\n public void resize(int width, int height) {\n float camWidth = tileMap.tileWidth * 10.0f * cameraDistance;\n\n //for the height, we just maintain the aspect ratio\n float camHeight = camWidth * ((float)height / (float)width);\n\n cam.setToOrtho(false, camWidth, camHeight);\n uiCam.setToOrtho(false, 10,6);\n cam.position.set(cameraPosition);\n\n uiCam.update();\n cam.update();\n }", "public void resize (int width, int height) \n\t{ \n\t\tcamera.viewportWidth = (Constants.VIEWPORT_HEIGHT / height) *\n\t\t\twidth;\n\t\tcamera.update();\n\t\tcameraGUI.viewportHeight = Constants.VIEWPORT_GUI_HEIGHT;\n\t\tcameraGUI.viewportWidth = (Constants.VIEWPORT_GUI_HEIGHT\n\t\t\t\t/ (float)height) * (float)width;\n\t\tcameraGUI.position.set(cameraGUI.viewportWidth / 2,\n\t\t\t\tcameraGUI.viewportHeight / 2, 0);\n\t\tcameraGUI.update();\n\t}", "private void configureCamera() {\n float fHeight = cam.getFrustumTop() - cam.getFrustumBottom();\n float fWidth = cam.getFrustumRight() - cam.getFrustumLeft();\n float fAspect = fWidth / fHeight;\n float yDegrees = 45f;\n float near = 0.02f;\n float far = 20f;\n cam.setFrustumPerspective(yDegrees, fAspect, near, far);\n\n flyCam.setMoveSpeed(5f);\n\n cam.setLocation(new Vector3f(2f, 4.7f, 0.4f));\n cam.setRotation(new Quaternion(0.348f, -0.64f, 0.4f, 0.556f));\n }", "void glViewport(int x, int y, int width, int height);", "private void setupCameraOutputs(int width, int height) {\n MLog.d(TAG, \"setupCameraOutputs()\" +\n \" width: \" + width +\n \" height: \" + height);\n\n Activity activity = getActivity();\n CameraManager manager =\n (CameraManager) activity.getSystemService(Context.CAMERA_SERVICE);\n Point displaySize = new Point();\n activity.getWindowManager().getDefaultDisplay().getSize(displaySize);\n int rotatedPreviewWidth = width;\n int rotatedPreviewHeight = height;\n int screenWidth = displaySize.x;\n int screenHeight = displaySize.y;\n // screenWidth: 720 screenHeight: 1280\n MLog.d(TAG, \"setupCameraOutputs()\" +\n \" screenWidth: \" + screenWidth +\n \" screenHeight: \" + screenHeight);\n\n try {\n for (String cameraId : manager.getCameraIdList()) {\n MLog.d(TAG, \"setupCameraOutputs()\" +\n \" cameraId: \" + cameraId);\n if (TextUtils.isEmpty(cameraId)) {\n continue;\n }\n\n mCameraId = cameraId;\n\n //获取某个相机(摄像头特性)\n CameraCharacteristics characteristics\n = manager.getCameraCharacteristics(cameraId);\n\n // 检查支持\n int deviceLevel = characteristics.get(\n CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);\n if (deviceLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY) {\n\n }\n\n // We don't use a front facing camera in this sample.\n Integer facing = characteristics.get(CameraCharacteristics.LENS_FACING);\n if (facing != null && facing == CameraCharacteristics.LENS_FACING_FRONT) {\n continue;\n }\n\n // 获取StreamConfigurationMap,它是管理摄像头支持的所有输出格式和尺寸\n StreamConfigurationMap map = characteristics.get(\n CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);\n if (map == null) {\n continue;\n }\n\n // 拍照时使用最大的宽高\n // For still image captures, we use the largest available size.\n Size largest = Collections.max(\n Arrays.asList(map.getOutputSizes(ImageFormat.JPEG)),\n //Arrays.asList(map.getOutputSizes(TextureView.class)),// 不能这样使用\n new CompareSizesByArea());\n // ImageFormat.JPEG largest.getWidth(): 3264 largest.getHeight(): 2448\n // ImageFormat.YV12 largest.getWidth(): 960 largest.getHeight(): 720\n // ImageFormat.YUV_420_888 largest.getWidth(): 960 largest.getHeight(): 720\n MLog.d(TAG, \"setupCameraOutputs() \" + printThis() +\n \" largest.getWidth(): \" + largest.getWidth() +\n \" largest.getHeight(): \" + largest.getHeight());\n\n /***\n * 实时帧数据获取类\n * 由于获取实时帧所以选用YV12或者YUV_420_888两个格式,暂时不采用JPEG格式\n * 在真机显示的过程中,不同的数据格式所设置的width和height需要注意,否侧视频会很卡顿\n * YV12:width 720, height 960\n * YUV_420_888:width 720, height 960\n * JPEG:获取帧数据不能用 ImageFormat.JPEG 格式,否则你会发现预览非常卡的,\n * 因为渲染 JPEG 数据量过大,导致掉帧,所以预览帧请使用其他编码格式\n *\n * 输入相机的尺寸必须是相机支持的尺寸,这样画面才能不失真,TextureView输入相机的尺寸也是这个\n */\n /*mImageReader = ImageReader.newInstance(\n largest.getWidth(),\n largest.getHeight(),\n ImageFormat.YUV_420_888,\n *//*maxImages*//*5);// ImageFormat.JPEG, 2\n mImageReader.setOnImageAvailableListener(\n mOnImageAvailableListener,\n mBackgroundHandler);*/\n\n // Find out if we need to swap dimension to get the preview size relative to sensor\n // coordinate.\n int displayRotation = activity.getWindowManager().getDefaultDisplay().getRotation();\n // noinspection ConstantConditions\n mSensorOrientation = characteristics.get(\n CameraCharacteristics.SENSOR_ORIENTATION);\n MLog.d(TAG, \"setupCameraOutputs() \" + printThis() +\n \" displayRotation: \" + displayRotation +\n \" mSensorOrientation: \" + mSensorOrientation);\n boolean swappedDimensions = false;\n switch (displayRotation) {\n // 竖屏\n case Surface.ROTATION_0:\n case Surface.ROTATION_180:\n if (mSensorOrientation == 90 || mSensorOrientation == 270) {\n swappedDimensions = true;\n }\n break;\n // 横屏\n case Surface.ROTATION_90:\n case Surface.ROTATION_270:\n if (mSensorOrientation == 0 || mSensorOrientation == 180) {\n swappedDimensions = true;\n }\n break;\n default:\n Log.e(TAG, \"Display rotation is invalid: \" + displayRotation);\n break;\n }\n\n if (swappedDimensions) {\n rotatedPreviewWidth = height;\n rotatedPreviewHeight = width;\n screenWidth = displaySize.y;\n screenHeight = displaySize.x;\n }\n\n if (screenWidth > MAX_PREVIEW_WIDTH) {\n screenWidth = MAX_PREVIEW_WIDTH;\n }\n\n if (screenHeight > MAX_PREVIEW_HEIGHT) {\n screenHeight = MAX_PREVIEW_HEIGHT;\n }\n\n // Danger, W.R.! Attempting to use too large a preview size could exceed the camera\n // bus' bandwidth limitation, resulting in gorgeous previews but the storage of\n // garbage capture data.\n mPreviewSize = chooseOptimalSize(\n map.getOutputSizes(SurfaceTexture.class),\n rotatedPreviewWidth,\n rotatedPreviewHeight,\n screenWidth,\n screenHeight,\n largest);\n // mPreviewSize.getWidth(): 960 mPreviewSize.getHeight(): 720\n MLog.d(TAG, \"setupCameraOutputs()\" +\n \" mPreviewSize.getWidth(): \" + mPreviewSize.getWidth() +\n \" mPreviewSize.getHeight(): \" + mPreviewSize.getHeight());\n\n // We fit the aspect ratio of TextureView to the size of preview we picked.\n int orientation = getResources().getConfiguration().orientation;\n // 横屏\n if (orientation == Configuration.ORIENTATION_LANDSCAPE) {\n mTextureView.setAspectRatio(\n mPreviewSize.getWidth(), mPreviewSize.getHeight());\n } else {\n mTextureView.setAspectRatio(\n mPreviewSize.getHeight(), mPreviewSize.getWidth());\n }\n\n // Check if the flash is supported.\n Boolean available = characteristics.get(\n CameraCharacteristics.FLASH_INFO_AVAILABLE);\n mFlashSupported = available == null ? false : available;\n return;\n }\n } catch (CameraAccessException e) {\n e.printStackTrace();\n } catch (NullPointerException e) {\n // Currently an NPE is thrown when the Camera2API is used but not supported on the\n // device this code runs.\n Camera2Fragment.ErrorDialog.newInstance(getString(R.string.camera_error))\n .show(getChildFragmentManager(), FRAGMENT_DIALOG);\n }\n }", "private void setCamera() {\n\t\tVector viewTranslation = controller.getCameraPosition();\n\n\t\tGL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);\n\t\tGL11.glMatrixMode(GL11.GL_PROJECTION);\n\t\tGL11.glLoadIdentity();\n\n\t\tfloat whRatio = (float) windowWidth / (float) windowHeight;\n\t\tGLU.gluPerspective(controller.getFOV(), whRatio, 1, 100000);\n\t\tGLU.gluLookAt((float) viewTranslation.x, (float) viewTranslation.y,\n\t\t\t\t(float) controller.getCameraDistance(), (float) viewTranslation.x,\n\t\t\t\t(float) viewTranslation.y, 0, 0, 1, 0);\n\n\t\tGL11.glMatrixMode(GL11.GL_MODELVIEW);\n\t\tGL11.glLoadIdentity();\n\t}", "private Camera() {\n viewport = new Rectangle();\n dirtyAreas = new ArrayList<Rectangle>();\n renderedAreas = new ArrayList<Rectangle>();\n fullUpdate = false;\n dirtyAreaCounter = 0;\n }", "@Override\n public void onSurfaceChanged(GL10 unused, int width, int height) {\n GLES20.glViewport(0, 0, width, height);\n\n float ratio = (float) width / height;\n\n // this projection matrix is applied to object coordinates\n // in the onDrawFrame() method\n Matrix.frustumM(mProjectionMatrix, 0, -ratio, ratio, -1, 1, 3, 7);\n\n }", "public void setupCamera() {\r\n p.camera(width/2.0f, height/2.0f, cameraZ,\r\n width/2.0f, height/2.0f, 0, 0, 1, 0);\r\n\r\n if(isTiling) {\r\n float mod=1f/10f;\r\n p.frustum(width*((float)tileX/(float)tileNum-.5f)*mod,\r\n width*((tileX+1)/(float)tileNum-.5f)*mod,\r\n height*((float)tileY/(float)tileNum-.5f)*mod,\r\n height*((tileY+1)/(float)tileNum-.5f)*mod,\r\n cameraZ*mod, 10000);\r\n }\r\n\r\n }", "public static void setCameraFrame() {\n\t\tCAMERA.src = VERTICES[CAMERA.v];\n\t\tVector zc = CAMERA.src.d.scale(-1).normalized();\n\t\tCAMERA.zAxis = zc;\n\t\tVector xc = MathUtils.cross(CAMERA.src.d, new Vector(0, 1, 0)).normalized();\n\t\tCAMERA.xAxis = xc;\n\t\tVector yc = MathUtils.cross(zc, xc).normalized();\n\t\tCAMERA.yAxis = yc;\n\t\t\n\t\tSystem.out.println(\"***** just set camera: \" + CAMERA.toString());\n\t}", "private void updateViewport(int width, int height)\n\t{\n\t\tviewportWidth = width;\n\t\tviewportHeight = height;\n\t}", "public float getViewportRatio() {\n\t\treturn viewportRatio;\n\t}", "@Override\n\tpublic void resize(int width, int height) {\n\t\tui.setViewport(width, height);\n\t\tcamera.setToOrtho(false);\n\t}", "public void setSize(int w, int h){\n this.width = w;\n this.height = h;\n ppuX = (float)width / CAMERA_WIDTH;\n ppuY = (float)height / CAMERA_HEIGHT;\n }", "@Override\n\tpublic void onCameraViewStarted(int width, int height) {\n\n\n\n\t\tmRgbaT = new Mat(width, height, CvType.CV_8UC4); // NOTE width,width is NOT a typo\n\n\t}", "private void setCameraView() {\n double bottomBoundary = mUserPosition.getLatitude() - .1;\n double leftBoundary = mUserPosition.getLongitude() - .1;\n double topBoundary = mUserPosition.getLatitude() + .1;\n double rightBoundary = mUserPosition.getLongitude() + .1;\n\n mMapBoundary = new LatLngBounds(\n new LatLng(bottomBoundary, leftBoundary),\n new LatLng(topBoundary, rightBoundary)\n );\n\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngBounds(mMapBoundary, 500,500,1));\n }", "private void updateCameraParametersPreference() {\n\n int camOri = CameraHolder.instance().getCameraInfo()[mCameraId].orientation;\n // Set the preview frame aspect ratio according to the picture size.\n Camera.Size size = mParameters.getPictureSize();\n double aspectWtoH = 0.0;\n if ((camOri == 0 || camOri == 180) && size.height > size.width) {\n aspectWtoH = (double) size.height / size.width;\n } else {\n aspectWtoH = (double) size.width / size.height;\n }\n\n if (LOGV)\n Log.e(TAG, \"picture width=\" + size.width + \", height=\" + size.height);\n\n // Set a preview size that is closest to the viewfinder height and has the right aspect ratio.\n List<Camera.Size> sizes = mParameters.getSupportedPreviewSizes();\n Camera.Size optimalSize;\n //if (mode == SettingsActivity.CAPTURE_MODE)\n //\toptimalSize = Util.getOptimalPreviewSize(this, sizes, aspectWtoH);\n //else\n {\n int requiredArea = mPreviewWidth * mPreviewHeight;\n\n //optimalSize = Util.getOptimalPreviewSize(this, sizes, aspectWtoH);\n optimalSize = Util.getOptimalPreviewSizeByArea(this, sizes, requiredArea);\n }\n\n // Camera.Size optimalSize = Util.getMaxPreviewSize(sizes, camOri);\n Camera.Size original = mParameters.getPreviewSize();\n\n Log.i(TAG, \" Sensor[\" + mCameraId + \"]'s orientation is \" + camOri);\n if (!original.equals(optimalSize)) {\n if (camOri == 0 || camOri == 180) {\n mParameters.setPreviewSize(optimalSize.height, optimalSize.width);\n } else {\n mParameters.setPreviewSize(optimalSize.width, optimalSize.height);\n }\n\n // Zoom related settings will be changed for different preview\n // sizes, so set and read the parameters to get lastest values\n\n if (mCameraDevice != null) {\n mCameraDevice.setParameters(mParameters);\n mParameters = mCameraDevice.getParameters();\n }\n }\n if (LOGV)\n Log.e(TAG, \"Preview size is \" + optimalSize.width + \"x\"\n + optimalSize.height);\n\n String previewSize = \"\";\n previewSize = \"[\" + optimalSize.width + \"x\" + optimalSize.height + \"]\";\n// mPreviewSizeView.setText(previewSize);\n\n // Set JPEG quality.\n int jpegQuality = CameraProfile.getJpegEncodingQualityParameter(\n mCameraId, CameraProfile.QUALITY_HIGH);\n mParameters.setJpegQuality(jpegQuality);\n\n // For the following settings, we need to check if the settings are\n // still supported by latest driver, if not, ignore the settings.\n\n //if (Parameters.SCENE_MODE_AUTO.equals(mSceneMode))\n {\n if (mParameters != null) {\n // Set white balance parameter.\n String whiteBalance = \"auto\";\n if (isSupported(whiteBalance,\n mParameters.getSupportedWhiteBalance())) {\n mParameters.setWhiteBalance(whiteBalance);\n }\n\n String focusMode = mFocusManager.getFocusMode();\n mParameters.setFocusMode(focusMode);\n\n // Set exposure compensation\n int value = 0;\n int max = mParameters.getMaxExposureCompensation();\n int min = mParameters.getMinExposureCompensation();\n if (value >= min && value <= max) {\n mParameters.setExposureCompensation(value);\n } else {\n Log.w(TAG, \"invalid exposure range: \" + value);\n }\n }\n }\n\n\n if (mParameters != null) {\n // Set flash mode.\n String flashMode = \"off\";\n List<String> supportedFlash = mParameters.getSupportedFlashModes();\n if (isSupported(flashMode, supportedFlash)) {\n mParameters.setFlashMode(flashMode);\n }\n\n Log.e(TAG, \"focusMode=\" + mParameters.getFocusMode());\n }\n\n }", "private void setCamera(GL2 gl, GLU glu)\n {\n Boundary bc = simulation.getBoundary();\n int w = (int) (bc.getMaxSize(0)-bc.getMinSize(0));\n int h = (int) (bc.getMaxSize(1)-bc.getMinSize(1));\n\n gl.glViewport(0, 0, w, h);\n\n\n gl.glMatrixMode(GL2.GL_PROJECTION);\n gl.glLoadIdentity();\n //opening angle, ratio of height and width, near and far\n glu.gluPerspective(80.0, 1,0.1,3*( bc.getMaxSize(2)-bc.getMinSize(2)));\n\n gl.glTranslatef(0.5f*(float) bc.getMinSize(0),-0.5f*(float) bc.getMinSize(1),1.5f*(float) bc.getMinSize(2));\n // gl.glTranslatef(0.5f*(float) (bc.getMaxSize(0)+bc.getMinSize(0)),0.5f*(float)(bc.getMaxSize(1)+ bc.getMinSize(1)),(float) -(bc.getMaxSize(2)-bc.getMinSize(2)));\n\n }", "private void setupCamera(int width, int height) {\n CameraManager cameraManager = (CameraManager) getSystemService(CAMERA_SERVICE);\n try {\n if (cameraManager == null) return;\n for (String cameraId : cameraManager.getCameraIdList()) {\n CameraCharacteristics cc = cameraManager.getCameraCharacteristics(cameraId);\n if (cc.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_BACK) {\n continue;\n }\n mCameraId = cameraId;\n\n int deviceOrientation = getWindowManager().getDefaultDisplay().getRotation();\n mTotalRotation = CameraUtils.calculateTotalRotation(cc, deviceOrientation);\n StreamConfigurationMap map = cc.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);\n\n int finalWidth = width;\n int finalHeight = height;\n boolean swapDimensions = mTotalRotation == 90 || mTotalRotation == 270;\n if (swapDimensions) {\n finalHeight = width;\n finalWidth = height;\n }\n mPreviewSize = CameraUtils.chooseOptimalSize(map.getOutputSizes(SurfaceTexture.class), finalWidth, finalHeight);\n mVideoSize = CameraUtils.chooseOptimalSize(map.getOutputSizes(MediaRecorder.class), finalWidth, finalHeight);\n return;\n }\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }", "public void setViewportDims(float width, float height) {\n\t\tthis.viewportDims[0] = width;\n\t\tthis.viewportDims[1] = height;\n\t\tthis.viewportRatio = width / height;\n\t}", "public void setCameraPreviewSize(int width, int height) {\n Log.d(TAG, \"setCameraPreviewSize\");\n mIncomingWidth = width;\n mIncomingHeight = height;\n mIncomingSizeUpdated = true;\n }", "private void configureCamera(int width, int height)\n {\n mCameraId = CAMERA_FACE_BACK;\n ///Configure camera output surfaces\n setupCameraOutputs(mWidth, mHeight);\n }", "public int getViewportWidth() {\n return viewport.getWidth();\n }", "@Override\n public void onSurfaceChanged(GL10 glUnused, int width, int height) {\n glViewport(0, 0, width, height);\n\n this.width = width;\n this.height = height;\n setPerspectiveView();\n \n }", "public void updateCamera() {\n\t}", "private void onCameraModeChangedTo(int n) {\n Camera.Parameters parameters = this.mStateMachine.getCurrentCameraParameters(false);\n if (!(parameters != null && this.isHeadUpDesplayReady())) {\n return;\n }\n int n2 = parameters.getPreviewSize().width;\n int n3 = parameters.getPreviewSize().height;\n Rect rect = LayoutDependencyResolver.getSurfaceRect((Activity)this.mActivity, (float)n2 / (float)n3);\n PositionConverter.getInstance().setSurfaceSize(rect.width(), rect.height());\n PositionConverter.getInstance().setPreviewSize(n2, n3);\n this.mFocusRectangles.updateDevicePreviewSize(n2, n3);\n this.mFocusRectangles.clearExceptTouchFocus();\n switch (n) {\n default: {\n throw new IllegalArgumentException(\"ViewFinder.onCameraModeChangedTo():[INVALID]\");\n }\n case 1: {\n super.setupCapturingModeSelectorButton(BaseFastViewFinder.HeadUpDisplaySetupState.PHOTO_STANDBY);\n super.updateViewFinderCaptureAreaTouchEventHandling(this.mTouchCapture, BaseFastViewFinder.HeadUpDisplaySetupState.PHOTO_STANDBY);\n this.mSettingDialogStack.showShortcutTray();\n super.setupZoomBar(BaseFastViewFinder.HeadUpDisplaySetupState.PHOTO_STANDBY);\n break;\n }\n case 2: {\n super.setupCapturingModeSelectorButton(BaseFastViewFinder.HeadUpDisplaySetupState.VIDEO_RECORDING);\n super.updateViewFinderCaptureAreaTouchEventHandling(this.mTouchCapture, BaseFastViewFinder.HeadUpDisplaySetupState.VIDEO_STANDBY);\n this.mSettingDialogStack.showShortcutTray();\n super.setupZoomBar(BaseFastViewFinder.HeadUpDisplaySetupState.VIDEO_STANDBY);\n }\n }\n this.setOrientation(this.getOrientation());\n }", "public void adjustCameraParameters() {\n SortedSet<Size> sizes = this.mPreviewSizes.sizes(this.mAspectRatio);\n if (sizes == null) {\n this.mAspectRatio = chooseAspectRatio();\n sizes = this.mPreviewSizes.sizes(this.mAspectRatio);\n }\n Size chooseOptimalSize = chooseOptimalSize(sizes);\n Size last = this.mPictureSizes.sizes(this.mAspectRatio).last();\n if (this.mShowingPreview) {\n this.mCamera.stopPreview();\n }\n this.mCameraParameters.setPreviewSize(chooseOptimalSize.getWidth(), chooseOptimalSize.getHeight());\n this.mCameraParameters.setPictureSize(last.getWidth(), last.getHeight());\n this.mCameraParameters.setRotation(calcCameraRotation(this.mDisplayOrientation));\n setAutoFocusInternal(this.mAutoFocus);\n setFlashInternal(this.mFlash);\n this.mCamera.setParameters(this.mCameraParameters);\n if (this.mShowingPreview) {\n this.mCamera.startPreview();\n }\n }", "private void setDimension() {\n float videoProportion = getVideoProportion();\n int screenWidth = getResources().getDisplayMetrics().widthPixels;\n int screenHeight = getResources().getDisplayMetrics().heightPixels;\n float screenProportion = (float) screenHeight / (float) screenWidth;\n ViewGroup.LayoutParams lp = mVideoPlayer.getLayoutParams();\n\n if (videoProportion < screenProportion) {\n lp.height = screenHeight;\n lp.width = (int) ((float) screenHeight / videoProportion);\n } else {\n lp.width = screenWidth;\n lp.height = (int) ((float) screenWidth * videoProportion);\n }\n mVideoPlayer.setLayoutParams(lp);\n }", "@Override\n public Camera setupCamera() {\n mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);\n try {\n Camera.Parameters parameters = mCamera.getParameters();\n parameters.setPreviewSize(mWidth, mHeight);\n parameters.setPreviewFormat(mFormat);\n mCamera.setDisplayOrientation(90);\n for (Camera.Size size : parameters.getSupportedPreviewSizes()) {\n Log.d(TAG, \"SIZE:\" + size.width + \"x\" + size.height);\n }\n for (Integer format : parameters.getSupportedPreviewFormats()) {\n Log.d(TAG, \"FORMAT:\" + format);\n }\n\n List<int[]> fps = parameters.getSupportedPreviewFpsRange();\n for (int[] count : fps) {\n Log.d(TAG, \"T:\");\n for (int data : count) {\n Log.d(TAG, \"V=\" + data);\n }\n }\n mCamera.setParameters(parameters);\n } catch (Exception e) {\n e.printStackTrace();\n }\n if (mCamera != null) {\n mWidth = mCamera.getParameters().getPreviewSize().width;\n mHeight = mCamera.getParameters().getPreviewSize().height;\n }\n return mCamera;\n }", "@Override\n protected Camera getCamera() {\n return Camera.createForPositionAndAngles(new ThreeDoubleVector(31.0, 7.0, 5.5), 0.0, 0.7);\n\n // Camera for orientation curve interpolation presentation\n// return Camera.createForPositionAndAngles(new ThreeDoubleVector(54.5, 10.0, 2.5), -0.5, 0.3);\n }", "void cameraSetup();", "@Override\r\n\tpublic void onSurfaceChanged(GL10 gl, int width, int height) {\n\t\tLog.d(TAG, \"onSurfacechanged\");\r\n\t\tif (height == 0) height = 1; // To prevent divide by zero\r\n\t float aspect = (float)width / height;\r\n\t \r\n\t // Set the viewport (display area) to cover the entire window\r\n\t gl.glViewport(0, 0, width, height);\r\n\t \r\n\t // Setup perspective projection, with aspect ratio matches viewport\r\n\t gl.glMatrixMode(GL10.GL_PROJECTION); // Select projection matrix\r\n\t gl.glLoadIdentity(); // Reset projection matrix\r\n\t // Use perspective projection\r\n\t GLU.gluPerspective(gl, 45, aspect, 0.1f, 100.f);\r\n\t \r\n\t gl.glMatrixMode(GL10.GL_MODELVIEW); // Select model-view matrix\r\n\t gl.glLoadIdentity(); // Reset\r\n\t \r\n\t // You OpenGL|ES display re-sizing code here\r\n\t // ......\r\n\t}", "private void setCamera() {\n\t\tCamera.CameraInfo cameraInfo = new Camera.CameraInfo();\n\t\tint cameraCount = Camera.getNumberOfCameras();\n\t\tLog.i(TAG, \"count = \" + cameraCount);\n\t\tLog.i(TAG, \"isBack = \" + isBack);\n\t\tint id = 0;\n\n\t\tfor (int camIdx = 0; camIdx < cameraCount; camIdx++) {\n\t\t\tCamera.getCameraInfo(camIdx, cameraInfo);\n\t\t\tLog.i(TAG, \"cameraInfoFacing = \" + cameraInfo.facing);\n\t\t\tif (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_BACK\n\t\t\t\t\t&& isBack) {\n\t\t\t\ttry {\n\t\t\t\t\tLog.i(TAG, \"SETTING mCamera\");\n\t\t\t\t\tmCamera = Camera.open(camIdx);\n\t\t\t\t\tid = camIdx;\n\t\t\t\t} catch (RuntimeException e) {\n\t\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\t\"Camera failed to open: \" + e.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t} else if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_FRONT\n\t\t\t\t\t&& !isBack){\n\t\t\t\ttry {\n\t\t\t\t\tLog.i(TAG, \"SETTING mCamera\");\n\t\t\t\t\tmCamera = Camera.open(camIdx);\n\t\t\t\t\tid = camIdx;\n\t\t\t\t} catch (RuntimeException e) {\n\t\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\t\"Camera failed to open: \" + e.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (mCamera != null) {\n\t\t\tCamera.Parameters cameraParameters = mCamera.getParameters();\n\t\t\tDisplay display = getActivity().getWindowManager().getDefaultDisplay();\n\t\t\tPoint size = new Point();\n\t\t\tdisplay.getSize(size);\n\t\t\tint screenWidth = size.x;\n\t\t\tint width = Integer.MAX_VALUE;\n\t\t\tint height = 0;\n\t\t\tLog.i(TAG, \"SCREENWIDTH: \" + screenWidth);\n\t\t\tList<Camera.Size> sizes = cameraParameters.getSupportedPreviewSizes();\n\t\t\tfor (Camera.Size cSize : sizes) {\n\t\t\t\tif (cSize.width >= screenWidth && cSize.width <= width) {\n\t\t\t\t\twidth = cSize.width;\n\t\t\t\t\theight = cSize.height;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tLog.i(TAG, \"Width: \" + width + \" HEIGHT: \" + height);\n\n\t\t\tif (mPreview != null) {\n\t\t\t\tmPreview.switchCamera(mCamera, id, width, height);\n\t\t\t} else {\n\t\t\t\tmPreview = new CameraPreview(getActivity(), mCamera, id, width, height);\n\t\t\t\tFrameLayout preview = (FrameLayout) view\n\t\t\t\t\t\t.findViewById(R.id.camera_preview);\n\t\t\t\tpreview.addView(mPreview);\n\t\t\t}\n\t\t\tmCamera.startPreview();\n\t\t}\n\t}", "Camera getCamera();", "public void setTargetResolution(int w, int h) {\n captureW = w;\n captureH = h;\n }", "private void updateView(){\n \n camera.updateView();\n }", "@Override\n public void onRenderSurfaceSizeChanged(GL10 gl, int width, int height) {\n super.onRenderSurfaceSizeChanged(gl, width, height);\n mSceneCameraConfigured = false;\n }", "private void adjustCameraPosition() {\n if (upward) {\n\n if (tilt<90) {\n tilt ++;\n zoom-=0.01f;\n } else {\n upward=false;\n }\n\n } else {\n if (tilt>0) {\n tilt --;\n zoom+=0.01f;\n } else {\n upward=true;\n }\n }\n }", "@Override\r\n\tpublic void onSurfaceChanged(GL10 gl, int width, int height) {\n\t\tfloat aspect = (float)width/(float)(height==0?1:height);\r\n\t\tgl.glViewport(0, 0, width, height);\r\n\t\tgl.glMatrixMode(GL10.GL_PROJECTION);\r\n\t\tgl.glLoadIdentity();\r\n\r\n\t\tGLU.gluPerspective(gl, 45.0f, aspect, 0.1f, 200.0f);\r\n\t\tGLU.gluLookAt(gl, 5f, 5f, 5f, 0f, 0f, 0f, 0, 1, 0);\r\n\r\n\t}", "private void setCameraParameters() {\n mParameters = mCameraDevice.getParameters();\n\n// Camera.Size previewSize = getDefaultPreviewSize(mParameters);\n//\n// //获取计算过的摄像头分辨率\n// if(previewSize != null ){\n// mPreviewWidth = previewSize.width;\n// mPreviewHeight = previewSize.height;\n// } else {\n// mPreviewWidth = 480;\n// mPreviewHeight = 480;\n// }\n// mParameters.setPreviewSize(mPreviewWidth, mPreviewHeight);\n// //将获得的Preview Size中的最小边作为视频的大小\n// mVideoWidth = mPreviewWidth > mPreviewHeight ? mPreviewHeight : mPreviewWidth;\n// mVideoHeight = mPreviewWidth > mPreviewHeight ? mPreviewHeight : mPreviewWidth;\n// if(mFFmpegFrameRecorder != null) {\n// mFFmpegFrameRecorder.setImageWidth(mVideoWidth);\n// mFFmpegFrameRecorder.setImageHeight(mVideoHeight);\n// }\n//\n// mParameters.setPreviewFrameRate(mPreviewFrameRate);\n\n List<String> supportedFocusMode = mParameters.getSupportedFocusModes();\n if(isSupported(Camera.Parameters.FOCUS_MODE_AUTO, supportedFocusMode)) {\n mParameters.setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO);\n }\n\n\n mCameraDevice.setParameters(mParameters);\n\n // 设置闪光灯,默认关闭\n setVideoFlash(false);\n\n //是否支持打开/关闭闪光灯\n mSettingWindow.setFlashEnabled(isSupportedVideoFlash());\n\n mTBtnFocus.setEnabled(isSupportedFocus());\n\n layoutPreView();\n }", "@Override\n public void resize(int width, int height) {game.screenPort.update(width, height, true);}", "private void handleScreenBoundaries() {\n\t\tif (tiledMapHelper.getCamera().position.x < screenWidth / 2) {\n\t\t\ttiledMapHelper.getCamera().position.x = screenWidth / 2;\n\t\t}\n\t\tif (tiledMapHelper.getCamera().position.x >= tiledMapHelper.getWidth()\n\t\t\t\t- screenWidth / 2) {\n\t\t\ttiledMapHelper.getCamera().position.x = tiledMapHelper.getWidth()\n\t\t\t\t\t- screenWidth / 2;\n\t\t}\n\n\t\tif (tiledMapHelper.getCamera().position.y < screenHeight / 2) {\n\t\t\ttiledMapHelper.getCamera().position.y = screenHeight / 2;\n\t\t}\n\t\tif (tiledMapHelper.getCamera().position.y >= tiledMapHelper.getHeight()\n\t\t\t\t- screenHeight / 2) {\n\t\t\ttiledMapHelper.getCamera().position.y = tiledMapHelper.getHeight()\n\t\t\t\t\t- screenHeight / 2;\n\t\t}\n\t}", "public ParametersBuilder setViewportSize(\n int viewportWidth, int viewportHeight, boolean viewportOrientationMayChange) {\n this.viewportWidth = viewportWidth;\n this.viewportHeight = viewportHeight;\n this.viewportOrientationMayChange = viewportOrientationMayChange;\n return this;\n }", "public void configureCamera(){\n try{\n camera = Camera.open(findBackFacingCamera());\n } catch (Exception e){}\n\n if(camera != null) {\n cameraView = new CameraView(this.getApplicationContext(), camera);\n FrameLayout camera_view = (FrameLayout)findViewById(R.id.CameraView);\n camera_view.addView(cameraView);\n }\n }", "@Override\n\tpublic void onSurfaceChanged(GL10 gl, int width, int height) {\n\tgl.glViewport(0, 0, width, height);\n\t//set projection matrix as active matrix\n\tgl.glMatrixMode(GL10.GL_PROJECTION); \n\t//load identity matrix to multiply with next matrix operation\n\tgl.glLoadIdentity(); \n\t//set perspective projection(GL10,FovY,Aspect,zNear,zFar)\n\tGLU.gluPerspective(gl, 70,width/(float)height,0.1f, 10f);\n\t//set ModelView matrix as active\n\tgl.glMatrixMode(GL10.GL_MODELVIEW);\n\t}", "public void surfaceCreated(SurfaceHolder holder) {\n Log.i(TAG, \"surface created\");\n if (mCamera != null) {\n final Camera.Parameters params = mCamera.getParameters();\n final List<Camera.Size> sizes = params.getSupportedPreviewSizes();\n final int screenWidth = ((View) getParent()).getWidth();\n int minDiff = Integer.MAX_VALUE;\n Camera.Size bestSize = null;\n\n /*\n * Impostazione dimensione frame a seconda delle dimensioni ottimali e dell'orientamento\n */\n if (getResources().getConfiguration().orientation\n == Configuration.ORIENTATION_LANDSCAPE) {\n for (Camera.Size size : sizes) {\n final int diff = Math.abs(size.width - screenWidth);\n if (diff < minDiff) {\n minDiff = diff;\n bestSize = size;\n }\n }\n } else {\n mCamera.setDisplayOrientation(90);\n for (Camera.Size size : sizes) {\n final int diff = Math.abs(size.height - screenWidth);\n if (Math.abs(size.height - screenWidth) < minDiff) {\n minDiff = diff;\n bestSize = size;\n }\n }\n }\n\n final int previewWidth = bestSize.width;\n final int previewHeight = bestSize.height;\n mHeight = previewHeight;\n mWidth = previewWidth;\n\n ViewGroup.LayoutParams layoutParams = getLayoutParams();\n layoutParams.height = previewHeight;\n layoutParams.width = previewWidth;\n setLayoutParams(layoutParams);\n\n // FORMATO PREVIEW\n params.setPreviewFormat(ImageFormat.NV21);\n params.setPreviewSize(previewWidth, previewHeight);\n params.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);\n\n mCamera.setParameters(params);\n\n //buffer di uscita\n int size = previewWidth * previewHeight *\n ImageFormat.getBitsPerPixel(params.getPreviewFormat()) / 8;\n setupCallback(size);\n\n // Esecuzione preview\n try {\n mCamera.setPreviewDisplay(holder);\n mCamera.startPreview();\n Log.i(TAG, \"preview started\");\n } catch (IOException e) {\n Log.e(TAG, \"Error setting camera preview: \" + e.getMessage());\n }\n\n }\n }", "public int getViewportHeight() {\n return viewport.getHeight();\n }", "@Override\n public void onSurfaceChanged(GL10 gl, int width, int height) {\n if (height == 0) height = 1; // To prevent divide by zero\n float aspect = (float)width / height;\n \n // Set the viewport (display area) to cover the entire window\n gl.glViewport(0, 0, width, height);\n \n // Setup perspective projection, with aspect ratio matches viewport\n gl.glMatrixMode(GL10.GL_PROJECTION); // Select projection matrix\n gl.glLoadIdentity(); // Reset projection matrix\n // Use perspective projection\n GLU.gluPerspective(gl, 45, aspect, 0.1f, 100.f);\n \n gl.glMatrixMode(GL10.GL_MODELVIEW); // Select model-view matrix\n gl.glLoadIdentity(); // Reset\n \n // You OpenGL|ES display re-sizing code here\n // ......\n }", "@Override\n public void onCameraViewStarted(int width, int height){\n mRgba = new Mat(height, width, CvType.CV_8UC4);\n mGray = new Mat(height, width, CvType.CV_8UC1);\n mDrawingLayer = new Mat(height,width,CvType.CV_8UC4);\n mMixed = new Mat(height,width,CvType.CV_8UC4);\n mOutput = new Mat(width,height,CvType.CV_8UC4);\n mGaussianMask = new Mat();\n\n Mat horizontal = Imgproc.getGaussianKernel(width * 2, staticConfig.vignetteLevel,CvType.CV_32F);\n Mat vertical = Imgproc.getGaussianKernel(height * 2, staticConfig.vignetteLevel, CvType.CV_32F);\n Mat matrix = new Mat();\n Core.gemm(vertical,horizontal,1,new Mat(),0,matrix,Core.GEMM_2_T);\n Core.MinMaxLocResult mmr = Core.minMaxLoc(matrix);\n Core.divide(matrix,new Scalar(mmr.maxVal),mGaussianMask);\n\n /* initialising mats that are necessary for frame processing */\n mEdges = new Mat(height, width, CvType.CV_8UC1);\n mTemplateTargetPoints = new MatOfPoint2f(new Point(0, 0), new Point(0, staticConfig.templateSize),new Point(staticConfig.templateSize,staticConfig.templateSize),new Point(staticConfig.templateSize,0));\n mFrameBox = new MatOfPoint2f();\n /* mTemplateTargetPoints.fromArray(new Point(0, 0), new Point(0, staticConfig.templateSize),new Point(staticConfig.templateSize,staticConfig.templateSize),new Point(staticConfig.templateSize,0)); */\n\n /* loading template */\n /* the template is a 200 x 50 png image */\n /* containing the template in 4 different orientations */\n\n mTemplate = new Mat();\n InputStream stream = null;\n Uri uri = Uri.parse(\"android.resource://au.com.pandamakes.www.pureblacktea/drawable/templatelg7\");\n try{\n stream = getContentResolver().openInputStream(uri);\n }catch(FileNotFoundException e){\n e.printStackTrace();\n }\n BitmapFactory.Options bmpFactoryOptions = new BitmapFactory.Options();\n bmpFactoryOptions.inPreferredConfig = Bitmap.Config.ARGB_8888;\n Bitmap bmp = BitmapFactory.decodeStream(stream,null,bmpFactoryOptions);\n Utils.bitmapToMat(bmp, mTemplate);\n mTemplateGray = new Mat();\n Imgproc.cvtColor(mTemplate, mTemplateGray, Imgproc.COLOR_RGB2GRAY);\n\n /* setting up feature detectors */\n mDetector = FeatureDetector.create(FeatureDetector.ORB);\n mExtractor = DescriptorExtractor.create(DescriptorExtractor.ORB);\n mMatcher = DescriptorMatcher.create(DescriptorExtractor.ORB);\n\n /* detect key points */\n mKeyPoints = new MatOfKeyPoint();\n mDescriptor = new Mat();\n mDetector.detect(mTemplateGray, mKeyPoints);\n mExtractor.compute(mTemplateGray, mKeyPoints, mDescriptor);\n List<KeyPoint> listKeyPoint = mKeyPoints.toList();\n mArrayListTemplateKP = new ArrayList<>();\n for(int i = 0; i<listKeyPoint.size(); i++){\n mArrayListTemplateKP.add(listKeyPoint.get(i).pt);\n }\n mFrameKP = new MatOfPoint2f();\n mKpMat = new MatOfKeyPoint();\n\n /* setting up templates */\n Imgproc.resize(mTemplateGray, mTemplateGray, new Size(staticConfig.templateSize, staticConfig.templateSize));\n\n mTemplate90 = new Mat();\n Core.transpose(mTemplateGray, mTemplate90);\n Core.flip(mTemplate90, mTemplate90, 0);\n\n mTemplate180 = new Mat();\n Core.flip(mTemplateGray,mTemplate180,-1);\n\n mTemplate270 = new Mat();\n Core.flip(mTemplate90,mTemplate270,-1);\n\n /* options associated with rendering */\n mCameraCaliberation = new Mat(3,3,CvType.CV_32F);\n float data[] = {3284,0,(float) width/2,0,3284,(float) height/2,0,0,1};\n mCameraCaliberation.put(0,0,data);\n mRefCoord = new MatOfPoint3f();\n mRefBox = new MatOfPoint3f(new Point3(-50,-50,0),new Point3(-50,50,0),new Point3(50,50,0),new Point3(50,-50,0));\n mRVec = new Mat();\n mTVec = new Mat();\n mCaptureAreaAdjusted = new MatOfPoint2f();\n\n /* helper class */\n mXAxis = new visualisation();\n mXAxis.start = new Point3(0,0,0);\n mXAxis.end = new Point3(30,0,0);\n mXAxis.width = 3;\n mXAxis.color = new Scalar(155,55,55);\n\n mYAxis = new visualisation();\n mYAxis.start = new Point3(0,0,0);\n mYAxis.end = new Point3(0,30,0);\n mYAxis.width = 3;\n mYAxis.color = new Scalar(55,155,55);\n\n mZAxis = new visualisation();\n mZAxis.start = new Point3(0,0,0);\n mZAxis.end = new Point3(0,0,-30);\n mZAxis.width = 3;\n mZAxis.color = new Scalar(55,55,155);\n\n /* other misc settings */\n mScanCenter = new Point(width/2,height/2);\n mBoxCenter = new Point(width/2,height/2);\n mScanWidth = staticConfig.scanWidth;\n mRectBorder = new Scalar(200,200,50);\n mLostTrackCounter = 0;\n\n mMostRight = width;\n mMostBottom = height;\n\n adjustROI(mScanCenter,mDetectionBoxSize);\n\n /* init visualisation parameters */\n if(staticConfig.showMolecule){\n mMolecule = new ArrayList<>();\n Boolean flag1 = false,\n flag2 = false;\n File molFile = new File(getFilesDir()+\"/mol.mol\");\n try{\n BufferedReader reader = new BufferedReader(new FileReader(molFile));\n String line;\n while((line=reader.readLine())!=null){\n if(line.contains(\"END\")){\n break;\n }else if(flag2){\n\n }else if(flag1){\n if(line.replace(\" \",\"\").contains(\"000000000000\")) {\n visualisation newAtom = new visualisation();\n try{\n newAtom.initAtom(line);\n }catch (NumberFormatException e){\n /* if a double parsing error occurred */\n mMolecule = new ArrayList<>();\n boolean deleted = molFile.delete();\n if(deleted){\n Toast.makeText(getApplicationContext(),\"Coordinates NaN. For the healthiness of the app, the mol file was deleted.\",Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(getApplicationContext(),\"Coordinates NaN. The file was not able to be deleted somehow.\",Toast.LENGTH_LONG).show();\n }\n break;\n }\n mMolecule.add(newAtom);\n }else{\n flag2 = true;\n }\n }else if(line.contains(\"V2000\")){\n flag1 = true;\n }\n }\n }catch (IOException e){\n e.printStackTrace();\n }\n }\n }", "@Override\n\tpublic void onSurfaceChanged(final GL10 iGL10, final int width, final int height)\n\t{\n\t\tglViewport(0, 0, width, height);\n\t\t\n\t\tMatrixHelper.perspectiveM(mProjectionMatrix, 45, (float) width / (float) height, 1f, 10f);\n\t\tMatrix.setLookAtM(mViewMatrix, 0, 0f, 1.2f, 2.2f, 0f, 0f, 0f, 0f, 1f, 0f);\n\t}", "public void initializeCamera(){\n mCamera = Camera.open();\n\n Camera.Parameters parameters = mCamera.getParameters();\n parameters.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH);\n\n List<Camera.Size> previewSizes = parameters.getSupportedPreviewSizes();\n // Get the supported preview size closest to the requested dimensions:\n Camera.Size previewSize = previewSizes.get(previewSizes.size() - 1); // getOptimalPreviewSize(previewSizes, width, height);\n width = previewSize.width;\n height = previewSize.height;\n Log.d(TAG, \"width: \" + width + \" , height: \" + height);\n nPixels = width * height;\n pixels = new int[nPixels];\n setSize(width, height);\n parameters.setPreviewSize(width, height);\n\n mCamera.setParameters(parameters);\n\n int dataBufferSize=(int)(height * width * (ImageFormat.getBitsPerPixel(parameters.getPreviewFormat())/8.0));\n\n mCamera.addCallbackBuffer(new byte[dataBufferSize]);\n mCamera.setPreviewCallbackWithBuffer(this);\n }", "public void resize( int width, int height ) {\n uiViewport.update( width, height );\n uiCamera.update();\n }", "private void getWidthAndHeight() {\n DisplayMetrics displaymetrics = new DisplayMetrics();\n getActivity().getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);\n screenHeight = displaymetrics.heightPixels;\n screenWidth = displaymetrics.widthPixels;\n }", "public void resize(int width, int height) {\n hudCamera.setToOrtho(false, VIRTUAL_HEIGHT * width / (float) height, VIRTUAL_HEIGHT);\n hudBatch.setProjectionMatrix(hudCamera.combined);\n }", "public void checkCameraLimits()\n {\n //Daca camera ar vrea sa mearga prea in stanga sau prea in dreapta (Analog si pe verticala) ea e oprita (practic cand se intampla acest lucru Itemul asupra caruia se incearca centrarea nu mai e in centrul camerei )\n\n if(xOffset < 0 )\n xOffset = 0;\n else if( xOffset > refLinks.GetMap().getWidth()* Tile.TILE_WIDTH - refLinks.GetWidth())\n xOffset =refLinks.GetMap().getWidth()* Tile.TILE_WIDTH - refLinks.GetWidth();\n if(yOffset<0)\n yOffset = 0;\n if(yOffset > refLinks.GetMap().getHeight()*Tile.TILE_HEIGHT - refLinks.GetHeight())\n {\n yOffset = refLinks.GetMap().getHeight()*Tile.TILE_HEIGHT - refLinks.GetHeight();\n }\n }", "@Override\r\n\tpublic void resize(GL10 gl, int w, int h) {\n\t\t if (h == 0) \r\n\t\t\t h = 1;\r\n\r\n\t gl.glViewport(0, 0, w, h); // Reset The Current Viewport And Perspective Transformation\r\n\t gl.glMatrixMode(GL10.GL_PROJECTION); // Select The Projection Matrix\r\n\t gl.glLoadIdentity(); // Reset The Projection Matrix\r\n\t GLU.gluPerspective(gl, 45.0f, (float) w / (float) h, 0.1f, 100.0f); // Calculate The Aspect Ratio Of The Window\r\n\t GLU.gluLookAt(gl, 0, 0, -5, 0, 0, 0, 0, 1, 0);\r\n\t gl.glMatrixMode(GL10.GL_MODELVIEW); // Select The Modelview Matrix\r\n\t gl.glLoadIdentity(); // Reset The ModalView Matrix\r\n\t}", "protected void processViewport (LightProperties lp, boolean cameraViewport) {\n\t\tCamera camera = lp.camera;\n\t\tShadowMapRegion r = allocator.nextResult(currentLight);\n\n\t\tif (r == null) return;\n\n\t\tTextureRegion region = lp.region;\n\t\tregion.setTexture(frameBuffers[currentPass].getColorBufferTexture());\n\n\t\t// We don't use HdpiUtils\n\t\t// gl commands related to shadow map size and not to screen size\n\t\tGdx.gl.glViewport(r.x, r.y, r.width, r.height);\n\t\tGdx.gl.glScissor(r.x + 1, r.y + 1, r.width - 2, r.height - 2);\n\t\tregion.setRegion(r.x, r.y, r.width, r.height);\n\n\t\tif (cameraViewport) {\n\t\t\tcamera.viewportHeight = r.height;\n\t\t\tcamera.viewportWidth = r.width;\n\t\t\tcamera.update();\n\t\t}\n\t}", "@Override\n public void onSurfaceChanged(GL10 gl, int width, int height) {\n gl.glViewport(0, 0, width, height);\n // To prevent divide by zero\n float aspect = (float)width / height;\n // Set the viewport (display area) to cover the entire window.\n gl.glViewport(0, 0, width, height);\n // Setup perspective projection, with aspect ratio matches viewport\n // Select projection matrix.\n gl.glMatrixMode(GL10.GL_PROJECTION);\n // Reset projection matrix.\n gl.glLoadIdentity();\n // Use perspective projection.\n GLU.gluPerspective(gl, 70, aspect, 0.1f, 200.f);\n // Select model-view matrix.\n gl.glMatrixMode(GL10.GL_MODELVIEW);\n // Reset.\n gl.glLoadIdentity();\n }", "public void updateMvpMatrix()\n\t\t{\n\t\t\t// Set the matrix, specifying the edges of the visible canvas and the near and far clipping planes.\n\t\t\tMatrix.orthoM(mvpMatrix, 0,\n\t\t\t\t\t-viewportWidth / (2f * zoom) + cameraX,\n\t\t\t\t\tviewportWidth / (2f * zoom) + cameraX,\n\t\t\t\t\t-viewportHeight / (2f * zoom) + cameraY,\n\t\t\t\t\tviewportHeight / (2f * zoom) + cameraY, -1, 1);\n\t\t}", "public void setCameraParameters(Camera cCamera)\n {\n if (cCamera != null)\n {\n Camera.Parameters cParams = cCamera.getParameters();\n cParams.setPreviewFpsRange(30000, 30000);\n// cParams.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE);\n\n cParams.setFlashMode(Camera.Parameters.FLASH_MODE_ON);\n cParams.setJpegQuality(100);\n\n cCamera.setParameters(cParams);\n }\n }", "public void recalculateViewport() {\r\n glViewport(0, 0, getWidth(), getHeight());\r\n spriteBatch.recalculateViewport(getWidth(), getHeight());\r\n EventManager.getEventManager().fireEvent(new WindowResizedEvent(getWidth(), getHeight()));\r\n }", "private void openCamera(int desiredWidth, int desiredHeight) {\n if (mCamera != null) {\n throw new RuntimeException(\"camera already initialized\");\n }\n\n android.hardware.Camera.CameraInfo info = new android.hardware.Camera.CameraInfo();\n\n // Try to find a front-facing camera (e.g. for videoconferencing).\n int numCameras = android.hardware.Camera.getNumberOfCameras();\n for (int i = 0; i < numCameras; i++) {\n android.hardware.Camera.getCameraInfo(i, info);\n if (info.facing == android.hardware.Camera.CameraInfo.CAMERA_FACING_BACK) {\n mCamera = android.hardware.Camera.open(i);\n break;\n }\n }\n if (mCamera == null) {\n// Log.d(TAG, \"No front-facing camera found; opening default\");\n mCamera = android.hardware.Camera.open(); // opens first back-facing camera\n }\n if (mCamera == null) {\n throw new RuntimeException(\"Unable to open camera\");\n }\n\n android.hardware.Camera.Parameters parms = mCamera.getParameters();\n\n CameraUtils.choosePreviewSize(parms, desiredWidth, desiredHeight);\n\n // Give the camera a hint that we're recording video. This can have a big\n // impact on frame rate.\n parms.setRecordingHint(true);\n\n // leave the frame rate set to default\n mCamera.setParameters(parms);\n\n int[] fpsRange = new int[2];\n android.hardware.Camera.Size mCameraPreviewSize = parms.getPreviewSize();\n parms.getPreviewFpsRange(fpsRange);\n String previewFacts = mCameraPreviewSize.width + \"x\" + mCameraPreviewSize.height;\n if (fpsRange[0] == fpsRange[1]) {\n previewFacts += \" @\" + (fpsRange[0] / 1000.0) + \"fps\";\n } else {\n previewFacts += \" @[\" + (fpsRange[0] / 1000.0) +\n \" - \" + (fpsRange[1] / 1000.0) + \"] fps\";\n }\n// TextView text = (TextView) findViewById(R.id.cameraParams_text);\n// text.setText(previewFacts);\n\n mCameraPreviewWidth = mCameraPreviewSize.width;\n mCameraPreviewHeight = mCameraPreviewSize.height;\n\n\n// AspectFrameLayout layout = (AspectFrameLayout) findViewById(R.id.cameraPreview_afl);\n\n Display display = ((WindowManager)getSystemService(WINDOW_SERVICE)).getDefaultDisplay();\n\n if(display.getRotation() == Surface.ROTATION_0) {\n mCamera.setDisplayOrientation(90);\n// layout.setAspectRatio((double) mCameraPreviewHeight / mCameraPreviewWidth);\n } else if(display.getRotation() == Surface.ROTATION_270) {\n// layout.setAspectRatio((double) mCameraPreviewHeight/ mCameraPreviewWidth);\n mCamera.setDisplayOrientation(180);\n } else {\n // Set the preview aspect ratio.\n// layout.setAspectRatio((double) mCameraPreviewWidth / mCameraPreviewHeight);\n }\n }", "@Override\n\tpublic EngineOptions onCreateEngineOptions() {\n\t\t\n\t\t// Device properties & dimensions\n\t\tDisplay display = getWindowManager().getDefaultDisplay();\n\t\tPoint size = new Point();\n\t\tdisplay.getSize(size);\n\t\tint width = size.x;\n\t\tint height = size.y;\n\t\t\n\t\tCAMERA_WIDTH = width;\n\t\tCAMERA_HEIGHT = height;\n\t\t\n\t\tfinal Camera camera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);\n\n\t\treturn new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), camera);\n\t}", "public void updateParametersPictureSize() {\n if (this.mCameraDevice == null) {\n Log.w(TAG, \"attempting to set picture size without camera device\");\n return;\n }\n String pictureSizeKey;\n this.mCameraSettings.setSizesLocked(false);\n SettingsManager settingsManager = this.mActivity.getSettingsManager();\n if (isCameraFrontFacing()) {\n pictureSizeKey = Keys.KEY_PICTURE_SIZE_FRONT;\n } else {\n pictureSizeKey = Keys.KEY_PICTURE_SIZE_BACK;\n }\n String pictureSize = settingsManager.getString(SettingsManager.SCOPE_GLOBAL, pictureSizeKey, SettingsUtil.getDefaultPictureSize(isCameraFrontFacing()));\n Size size = new Size(960, MotionPictureHelper.FRAME_HEIGHT_9);\n if (isDepthEnabled()) {\n size = SettingsUtil.getBokehPhotoSize(this.mActivity, pictureSize);\n } else {\n size = SettingsUtil.sizeFromString(pictureSize);\n }\n this.mCameraSettings.setPhotoSize(size);\n if (ApiHelper.IS_NEXUS_5) {\n if (ResolutionUtil.NEXUS_5_LARGE_16_BY_9.equals(pictureSize)) {\n this.mShouldResizeTo16x9 = true;\n } else {\n this.mShouldResizeTo16x9 = false;\n }\n }\n if (size != null) {\n Size optimalSize;\n Tag tag;\n Size optimalSize2 = CameraUtil.getOptimalPreviewSize(this.mActivity, this.mCameraCapabilities.getSupportedPreviewSizes(), ((double) size.width()) / ((double) size.height()));\n Size original = this.mCameraSettings.getCurrentPreviewSize();\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"Photo module Set preview size \");\n stringBuilder.append(size);\n stringBuilder.append(\" calculate size \");\n stringBuilder.append(optimalSize2);\n stringBuilder.append(\" original size \");\n stringBuilder.append(original);\n android.util.Log.e(\"===++++++=====\", stringBuilder.toString());\n if (isDepthEnabled()) {\n optimalSize = SettingsUtil.getBokehPreviewSize(pictureSize, false);\n } else {\n if ((size.width() == 4160 && size.height() == 1970) || (size.width() == 3264 && size.height() == 1546)) {\n optimalSize2 = new Size(1440, MotionPictureHelper.FRAME_HEIGHT_9);\n }\n optimalSize = optimalSize2;\n this.mActivity.getCameraAppUI().setSurfaceHeight(optimalSize.height());\n this.mActivity.getCameraAppUI().setSurfaceWidth(optimalSize.width());\n }\n this.mUI.setCaptureSize(optimalSize);\n Log.w(TAG, String.format(\"KPI original size is %s, optimal size is %s\", new Object[]{original.toString(), optimalSize.toString()}));\n if (!optimalSize.equals(original)) {\n tag = TAG;\n StringBuilder stringBuilder2 = new StringBuilder();\n stringBuilder2.append(\"setting preview size. optimal: \");\n stringBuilder2.append(optimalSize);\n stringBuilder2.append(\"original: \");\n stringBuilder2.append(original);\n Log.v(tag, stringBuilder2.toString());\n this.mCameraSettings.setPreviewSize(optimalSize);\n this.mCameraDevice.applySettings(this.mCameraSettings);\n this.mCameraSettings = this.mCameraDevice.getSettings();\n if (this.mCameraSettings == null) {\n Log.e(TAG, \"camera setting is null ?\");\n }\n }\n if (!(optimalSize.width() == 0 || optimalSize.height() == 0)) {\n Log.v(TAG, \"updating aspect ratio\");\n this.mUI.updatePreviewAspectRatio(((float) optimalSize.width()) / ((float) optimalSize.height()));\n }\n this.mCameraSettings.setSizesLocked(true);\n tag = TAG;\n StringBuilder stringBuilder3 = new StringBuilder();\n stringBuilder3.append(\"Preview size is \");\n stringBuilder3.append(optimalSize);\n Log.d(tag, stringBuilder3.toString());\n }\n }", "private void setupCamera(int width, int height) {\n CameraManager cameraManager = (CameraManager) mActivity.getSystemService(Context.CAMERA_SERVICE);\n\n if (cameraManager == null) {\n return;\n }\n\n try {\n for (String cameraId : cameraManager.getCameraIdList()) {\n // get camera characteristics\n CameraCharacteristics cameraCharacteristics = cameraManager.getCameraCharacteristics(cameraId);\n\n Integer currentCameraId = cameraCharacteristics.get(CameraCharacteristics.LENS_FACING);\n if (currentCameraId == null) {\n // The return value of that key could be null if the field is not set.\n return;\n }\n if (currentCameraId != mRokidCameraParamCameraId.getParam()) {\n // if not desired Camera ID, skip\n continue;\n }\n int deviceOrientation = mActivity.getWindowManager().getDefaultDisplay().getRotation();\n mTotalRotation = CameraDeviceUtils.sensorToDeviceRotation(cameraCharacteristics, deviceOrientation, ORIENTATIONS);\n\n mImageReader = ImageReader.newInstance(mSizeImageReader.getSize().getWidth(), mSizeImageReader.getSize().getHeight(), mImageFormat, mMaxImages);\n mImageReader.setOnImageAvailableListener(mOnImageAvailableListener, mBackgroundHandler);\n\n // Check if auto focus is supported\n int[] afAvailableModes = cameraCharacteristics.get(\n CameraCharacteristics.CONTROL_AF_AVAILABLE_MODES);\n if (afAvailableModes.length == 0 ||\n (afAvailableModes.length == 1\n && afAvailableModes[0] == CameraMetadata.CONTROL_AF_MODE_OFF)) {\n mAutoFocusSupported = false;\n } else {\n mAutoFocusSupported = true;\n }\n\n mCameraId = cameraId;\n return;\n }\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }", "public Viewport getViewport() {\n return viewport;\n }", "public void onSurfaceChanged(GL10 glUnused, int width, int height)\n {\n GLES20.glViewport(0, 0, width, height);\n float ratio = (float) width / height;\n Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 3, 7);\n }", "@Override\n public void resize(int width, int height) {\n stage.getViewport().update(width, height, true);\n stage.mapImg.setHeight(Gdx.graphics.getHeight());\n stage.mapImg.setWidth(Gdx.graphics.getWidth());\n stage.gameUI.show();\n }", "Point inViewPort();", "int getVerticalResolution();", "public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {\n\t\tCamera.Parameters parameters = camera.getParameters();\r\n\t\tList<Size> sizes = parameters.getSupportedPreviewSizes();\r\n\t\tSize optimalSize = getOptimalPreviewSize(sizes, w, h);\r\n\t\tparameters.setPreviewSize(optimalSize.width, optimalSize.height);\r\n\t\tcamera.setParameters(parameters);\r\n\t\tcamera.startPreview();\r\n\t\t\r\n\t\tCamera.Parameters p = camera.getParameters();\r\n\t\tint zoom = p.getZoomRatios().get(p.getZoom()).intValue();\r\n\t\tCamera.Size sz = p.getPreviewSize();\r\n\t\tdouble aspect = (double) sz.width / (double) sz.height;\r\n\t\tdouble thetaV = Math.toRadians(p.getVerticalViewAngle());\r\n\t\tdouble thetaH = 2d * Math.atan(aspect * Math.tan(thetaV / 2));\r\n\t\tthetaV = 2d * Math.atan(100d * Math.tan(thetaV / 2d) / zoom);\r\n\t\tthetaH = 2d * Math.atan(100d * Math.tan(thetaH / 2d) / zoom);\r\n\t\t\r\n\t\t\r\n\t\tvCameraAngle = Math.toDegrees(thetaH);\r\n\t}", "@Override\n\tpublic void pan(Vector2 delta) {\n\t\t// keep camera within borders\n\t\tfloat x = Utils.between(viewCamera.position.x + delta.x, bounds.min.x, bounds.max.x);\n\t\tfloat y = Utils.between(viewCamera.position.y + delta.y, bounds.min.y, bounds.max.y);\n\t\tviewCamera.position.set(x, y, 0);\n\t\tviewCamera.update();\n\t}", "@Override\n\tpublic void initCameraGlSurfaceView() {\n\t\t\n\t}", "@Override\n\tpublic void pan(Vector3 delta) {\n\t\t// keep camera within borders\n\t\tfloat x = Utils.between(viewCamera.position.x + delta.x, bounds.min.x, bounds.max.x);\n\t\tfloat y = Utils.between(viewCamera.position.y + delta.y, bounds.min.y, bounds.max.y);\n\t\tfloat z = Utils.between(viewCamera.position.z + delta.z, bounds.min.z, bounds.max.z);\n\t\tviewCamera.position.set(x, y, z);\n\t\tviewCamera.update();\n\t}", "public void setCamera(Camera camera) {\r\n\t\tthis.camera = camera;\r\n\t}", "@Override\r\n\tpublic void surfaceChanged(SurfaceHolder holder, int format, int width,\r\n\t\t\tint height) {\n\t\tif(myCamera!=null){\r\n\t\t\tCamera.Parameters parameters = myCamera.getParameters();//得到initial參數\r\n\t\t\tmyCamera.setParameters(parameters);\r\n\t\t\tmyCamera.startPreview();\r\n\t\t}\r\n\t}", "private void updateViewBounds() \r\n {\r\n assert !sim.getMap().isEmpty() : \"Visualiser needs simulator whose a map has at least one node\"; \r\n \r\n \r\n viewMinX = minX * zoomFactor;\r\n viewMinY = minY * zoomFactor;\r\n \r\n viewMaxX = maxX * zoomFactor;\r\n viewMaxY = maxY * zoomFactor;\r\n \r\n \r\n double marginLength = zoomFactor * maxCommRange;\r\n \r\n \r\n // Set the size of the component\r\n int prefWidth = (int)Math.ceil( (viewMaxX - viewMinX) + (marginLength * 2) );\r\n int prefHeight = (int)Math.ceil( (viewMaxY - viewMinY) + (marginLength * 2) );\r\n setPreferredSize( new Dimension( prefWidth, prefHeight ) );\r\n \r\n \r\n // Adjust for margin lengths \r\n viewMinX -= marginLength;\r\n viewMinY -= marginLength;\r\n \r\n viewMaxX += marginLength;\r\n viewMaxY += marginLength;\r\n }", "public void restoreCamera() {\r\n float mod=1f/10f;\r\n p.camera(width/2.0f, height/2.0f, cameraZ,\r\n width/2.0f, height/2.0f, 0, 0, 1, 0);\r\n p.frustum(-(width/2)*mod, (width/2)*mod,\r\n -(height/2)*mod, (height/2)*mod,\r\n cameraZ*mod, 10000);\r\n }", "public void setCameraWidth(float width) {\n setValueInTransaction(PROP_CAMERA_WIDTH, width);\n }", "public void settings() { size(1200, 800); }", "private void previewXY() {\n Viewport tempViewport = new Viewport(chart.getMaximumViewport());\n // Make temp viewport smaller.\n float dx = tempViewport.width() / 4;\n float dy = tempViewport.height() / 4;\n tempViewport.inset(dx, dy);\n previewChart.setCurrentViewportWithAnimation(tempViewport);\n }", "abstract void setCaptureParameters(int width, int height, int frameRate,\n android.hardware.Camera.Parameters cameraParameters);", "public void handleCamera(){\n CameraIsScrolling = true;\n //if the camera is scrolling, scroll the camera\n if(CameraIsScrolling){\n mainCamera.position.set(mainCamera.position.x + CameraScrollSpeed, mainCamera.position.y, mainCamera.position.z);\n mainCamera.update();\n }\n\n }", "private void changeCameraPosition() {\n yPosition = mPerspectiveCamera.position.y;\n if (isMovingUp) {\n yPosition += 0.1;\n if (yPosition > 20)\n isMovingUp = false;\n } else {\n yPosition -= 0.1;\n if (yPosition < 1)\n isMovingUp = true;\n }\n\n mPerspectiveCamera.position.set(xPosition, yPosition, zPosition);\n mPerspectiveCamera.update();\n }", "public void setCamera(Camera camera) {\n mCamera = camera;\n }", "public void onSurfaceChanged(GL10 glUnused, int width, int height) {\n\t\tGLES20.glViewport(0, 0, width, height);\n\t\tLog.d(\"ShelXle.Droid Screen Size\", width + \" \" + height);\n\t\tpixh = height;\n\t\tpixw = width;\n\t\tfpsscal = 350.0f / Math.min(width, height);\n\t\tfpsMat[0] = -fpsscal;\n\t\tfpsMat[12] = 1.0f - fpsscal;\n\t\tfpsMat3[0] = -fpsscal*1.24f;\n\t\tfpsMat3[12] = 1.0f - fpsscal*1.24f;\n\n\t\tfpsMat4[0] = -fpsscal*1.26f;\n\t\tfpsMat4[12] = 1.0f - fpsscal*1.26f;\n\t\tfpsMat2[0] = -0.25f * fpsscal;\n\t\tLog.d(\"ShelXle.Droid FPS text scaling \", fpsscal + \" \");\n\t\tfloat ratio = (float) width / height;\n\t\tfloat fh = (float) Math.tan(29.0 / 360.0 * 3.14159265358979) * 5.0f;\n\t\tfloat fw = fh * ratio;\n\t\tMatrix.frustumM(proj, 0, -fw, fw, -fh, fh, 5.0f, 800.0f);\n\t\tMatrix.setLookAtM(mv, 0, 0.0f, 200f, 0f, 0f, 0.0f, 0.0f, 0.0f, 00f, 1f);\n\t\tMatrix.multiplyMM(pmv1, 0, proj, 0, mv, 0);\n\t\tSystem.arraycopy(pmv1, 0, proj, 0, 16);\n\n\t\tMatrix.setIdentityM(mv, 0);\n\t\tMatrix.scaleM(mv, 0, 9.0f, 9.0f, 9.0f);\n\n\t\t/*\n\t\t * if (f!=null){ f.write(proj); f.write(proj);\n\t\t * \n\t\t * }\n\t\t */\n\t\t// Matrix.setIdentityM(proj,0);\n\t\t// Matrix.perspectiveM(proj, 0, 29.0f,ratio,5.0f,800.0f);\n\n\t}", "@Override\n public void resize(int width, int height) {\n viewport.update(width, height);\n }", "@Override\n public void resize(int width, int height) {\n viewport.update(width, height);\n }", "private void updateCamera() {\n\t\tVector3f x = new Vector3f();\n\t\tVector3f y = new Vector3f();\n\t\tVector3f z = new Vector3f();\n\t\tVector3f temp = new Vector3f(this.mCenterOfProjection);\n\n\t\ttemp.sub(this.mLookAtPoint);\n\t\ttemp.normalize();\n\t\tz.set(temp);\n\n\t\ttemp.set(this.mUpVector);\n\t\ttemp.cross(temp, z);\n\t\ttemp.normalize();\n\t\tx.set(temp);\n\n\t\ty.cross(z, x);\n\n\t\tMatrix4f newMatrix = new Matrix4f();\n\t\tnewMatrix.setColumn(0, x.getX(), x.getY(), x.getZ(), 0);\n\t\tnewMatrix.setColumn(1, y.getX(), y.getY(), y.getZ(), 0);\n\t\tnewMatrix.setColumn(2, z.getX(), z.getY(), z.getZ(), 0);\n\t\tnewMatrix.setColumn(3, mCenterOfProjection.getX(),\n\t\t\t\tmCenterOfProjection.getY(), mCenterOfProjection.getZ(), 1);\n\t\ttry {\n\t\t\tnewMatrix.invert();\n\t\t\tthis.mCameraMatrix.set(newMatrix);\n\t\t} catch (SingularMatrixException exc) {\n\t\t\tLog.d(\"Camera\",\n\t\t\t\t\t\"SingularMatrixException on Matrix: \"\n\t\t\t\t\t\t\t+ newMatrix.toString());\n\t\t}\n\t}", "@Override\n\tpublic void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) {\n\t\tscreenWidth = getWidth();\n\t\tscreenHeight = getHeight();\n\t}", "@Override\n public void settings() {\n size(800, 800, P3D);\n }", "@Override\n\tpublic void moveCamera() {\n\n\t}", "public static void main(String[] args) {\n// Vector v1 = new Vector(new double[]{0, 0, 1});\n// Vector v2 = new Vector(new double[]{1, 0, 0});\n// System.out.println(v1.dot(v2));\n System.setProperty(\"sun.java2d.opengl\", \"true\");\n \n // Make World\n //WorldSpace world = new StreetWorldSpace();\n WorldSpace world = new TestWorldSpace();\n //WorldSpace world = new BigAssPolygonSpace();\n \n // Make Frame\n JFrame frame = new JFrame();\n \n // Get effective screen size\n Dimension screenSize = getScreenDimension(frame);\n\n // Set Camera View dimensions\n int width = 730;\n int height = width;\n \n // Make Camera\n Polygon[] polygons = world.getPolygons();\n Camera camera = new Camera(polygons, width, height, frame.getGraphicsConfiguration());\n image = camera.observe();\n \n // Make Camera Control Panel\n// int controlPanelHeight = 100;\n// CameraControlPanel cameraControlPanel = new CameraControlPanel(camera);\n// cameraControlPanel.setPreferredSize(new Dimension(width, controlPanelHeight));\n// cameraControlPanel.setBorder(BorderFactory.createCompoundBorder(new LineBorder(Color.BLACK, 2, false), new EmptyBorder(10, 10, 10, 10)));\n \n // Make Camera View Component\n CameraViewComponent cameraViewComponent = new CameraViewComponent(camera);\n cameraViewComponent.updateImage(image);\n cameraViewComponent.updateData(camera.getData());\n cameraViewComponent.setPreferredSize(new Dimension(width, height));\n\n // Make Camera Panel\n JPanel cameraPanel = new JPanel();\n cameraPanel.setLayout(new BoxLayout(cameraPanel, BoxLayout.Y_AXIS));\n cameraPanel.setPreferredSize(new Dimension(width, height));// + controlPanelHeight));\n cameraPanel.add(cameraViewComponent);\n //cameraPanel.add(cameraControlPanel);\n\n // Make Camera Data Panel\n //CameraDataPanel cameraDataPanel = new CameraDataPanel(camera);\n \n // Make Master Panel\n JPanel masterPanel = new JPanel();\n masterPanel.add(cameraPanel);\n //masterPanel.add(cameraDataPanel);\n \n frame.add(masterPanel);\n frame.pack();\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setVisible(true);\n\n // Make keyboard listener\n KeyListener kl = new KeyListener();\n \n // Time\n int lastTenthOfASecond = 0;\n double lastMilliSecond = 0;\n double currentMilliSecond = System.currentTimeMillis();\n double averageFrameRate = 0;\n double currentFrameRate = 0;\n long totalTime = 0;\n long totalFrames = 0;\n \n // Redraw camera view upon keyboard input\n while(true) { \n int currentTenthOfASecond = (int)((currentMilliSecond%1000)/100);\n if (currentMilliSecond/100 > lastMilliSecond/100) {\n boolean cameraMoved = false;\n if (kl.isWPressed()) {\n camera.move(FORWARD); \n cameraMoved = true;\n }\n if (kl.isSPressed()) {\n camera.move(BACKWARD); \n cameraMoved = true;\n }\n if (kl.isAPressed()) {\n camera.move(LEFT); \n cameraMoved = true;\n }\n if (kl.isDPressed()) {\n camera.move(RIGHT); \n cameraMoved = true;\n }\n if (kl.isSpacePressed()) {\n camera.move(UP); \n cameraMoved = true;\n }\n if (kl.isShiftPressed()) {\n camera.move(DOWN); \n cameraMoved = true;\n }\n if (cameraViewComponent.wasUpdated()) {\n cameraMoved = true;\n }\n// if (cameraControlPanel.getWasCameraChanged() || cameraViewComponent.wasUpdated()) {\n// cameraMoved = true;\n// }\n if (cameraMoved) {\n image = camera.observe();\n cameraViewComponent.updateImage(image);\n //cameraDataPanel.update();\n //cameraControlPanel.update(); \n totalFrames++;\n totalTime += currentMilliSecond-lastMilliSecond + 1;\n averageFrameRate = (totalFrames)/(totalTime/1000.0); \n currentFrameRate = (1000.0/(currentMilliSecond-lastMilliSecond));\n \n }\n }\n if (currentTenthOfASecond > lastTenthOfASecond) {\n \n String[] cameraData = camera.getData();\n String[] frameData = {\n \"Average Framerate: \" + String.format(\"%.2f\", averageFrameRate), \n \"Current Framerate: \" + String.format(\"%.2f\",currentFrameRate)\n };\n String[] data = new String[cameraData.length + frameData.length ];\n System.arraycopy(cameraData, 0, data, 0, cameraData.length);\n System.arraycopy(frameData, 0, data, cameraData.length, frameData.length);\n cameraViewComponent.updateData(data);\n } \n lastTenthOfASecond = currentTenthOfASecond;\n lastMilliSecond = currentMilliSecond;\n currentMilliSecond = System.currentTimeMillis(); \n }\n }", "public void onCamera();", "public void setViewport(double x, double y, double width, double height) {\n xViewport = x;\n yViewport = y;\n widthViewport = width;\n heightViewport = height;\n nViewportUpdates++;\n setScaleFactor();\n }", "public void setViewPort(int width, int height) {\n String res = Integer.toString(width) + \"x\" + Integer.toString(height);\n this.standardPairs.put(Parameters.VIEWPORT, res);\n }" ]
[ "0.6826992", "0.6678303", "0.6670369", "0.6644614", "0.6643902", "0.66267586", "0.6574972", "0.6529539", "0.645463", "0.6450429", "0.6421558", "0.64041984", "0.63886106", "0.6375178", "0.63523597", "0.6339951", "0.62982804", "0.62902737", "0.62822074", "0.6281136", "0.62779313", "0.626784", "0.62668276", "0.6240406", "0.62286884", "0.62100494", "0.6164447", "0.6154527", "0.61148846", "0.60855615", "0.6077574", "0.60708624", "0.6051227", "0.6023588", "0.60207826", "0.6006241", "0.60021013", "0.59940386", "0.5992196", "0.5987573", "0.59809005", "0.5979076", "0.5968667", "0.59670943", "0.5963748", "0.5947641", "0.59145415", "0.59057546", "0.58926356", "0.58832467", "0.5881411", "0.585279", "0.5849364", "0.58456653", "0.58453256", "0.5826241", "0.5823808", "0.5815386", "0.58118564", "0.5811038", "0.58090603", "0.57903427", "0.5755866", "0.5755492", "0.5747165", "0.5738022", "0.5734874", "0.5733365", "0.57293576", "0.5715061", "0.571414", "0.57052714", "0.57048774", "0.5697887", "0.5680305", "0.5679927", "0.5677698", "0.56727123", "0.56689245", "0.56449765", "0.56428653", "0.5630887", "0.56278104", "0.5621897", "0.56217074", "0.5620404", "0.5619336", "0.56122565", "0.560651", "0.56059223", "0.56009626", "0.56009626", "0.5597608", "0.559492", "0.5585538", "0.55816334", "0.55794483", "0.5577312", "0.5563708", "0.55627024" ]
0.7450222
0
TODO Autogenerated method stub
@Override public String Dump() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public List<BookCopies> get() throws SQLException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void post(BookCopies object) throws SQLException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
@Override public void put(Integer id, BookCopies object) throws SQLException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void delete(Integer id) throws SQLException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
insert the elements at first
public void insertAtFirst(int data) { System.out.println("iam inserting at front :"); Node new_front = new Node(data); new_front.right = root; root = new_front; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void duplicateAndInsertElements() {\n\t\t\n\t\tif (highlightedFields.isEmpty()) return;\n\t\t\n\t\t// highlighted fields change while adding. Make a copy first\n\t\tArrayList<XmlNode> tempArray = new ArrayList<XmlNode>(highlightedFields);\n\t\t\n\t\tcopyAndInsertElements(tempArray);\n\t}", "@Override\n public void prepend(T element){\n if(isEmpty()){\n add(element);\n } else{\n this.first = new DLLNode<T>(element, null, this.first);\n this.first.successor.previous = this.first;\n }\n }", "@Override\n public void prepend(T elem) {\n if(isEmpty()) { //if list is empty\n first = new DLNode(elem, null, null);//new element created, there's nothing before and after it yet\n last = first;\n }\n else{ //list in not empty\n \n first = new DLNode(elem, null, first); //new element goes to the front, there nothing before it, the old first element is after it\n \n first.next.prev = first; //ensure that reference to our first element is pointing to the new first element\n }\n \n }", "@Override\n\tpublic int insert_all(Object[] ob) {\n\t\treturn 0;\n\t}", "private void insertFirst(T data){\n Node<T> node = new Node<T>(data);\n this.begin = node;\n this.end = node;\n }", "void insertBefore(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (length == 0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertBefore() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertBefore() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == front) \n\t\t{\n\t\t\tprepend(data); //if the cursor is at the front of the list, you can just call prepend since you will be inserting the element before the front element \n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\ttemp.prev = cursor.prev; //the new node temp's previous becomes the cursors previous\t\n temp.next = cursor; //the new node temp's next becomes the cursor\n cursor.prev.next = temp; //cursor's previous next element becomes temp\n cursor.prev = temp; //cursor's previous becomes temp\n length++;\n index++;\n\t\t}\n\t}", "@Override\n\tpublic <S extends Basket> List<S> insert(Iterable<S> arg0) {\n\t\treturn null;\n\t}", "@Override\n public void addFirst(E element) {\n Node<E> newNodeList = new Node<>(element, head);\n\n head = newNodeList;\n cursor = newNodeList;\n size++;\n }", "public void addFirst(T t) {\n if (size == elements.length) // checks potential overflow\n ensureCapacity(); // increase capacity\n for (int j = size; j > 0; j--) // treat elements of list with indexes in range [1, n]\n elements[j] = elements[j - 1]; // element shifts to right\n size++; // increment size\n elements[0] = t; // store element at index 0\n }", "@Override\n\tpublic void preInsert() {\n\n\t}", "void prepend(T element);", "public ExtElement insertBefore(ExtElement element, List<BaseModel> values) {\r\n\t\treturn insertBefore(element, BaseModel.fromList(values));\r\n\t}", "public void insert(Object element1, Object element2, Object element3);", "@Test (timeout = 44245500)\n\tpublic void testInsertFirstIsEmptySizeAndGetFirst1() {\n\t\tassertTrue(list.isEmpty());\n\t\tassertEquals(0,list.size());\n\t\tassertEquals(list,list.insertAt(0, \"Hello\"));\n\t\tassertFalse(list.isEmpty());\n\t\tassertEquals(1,list.size());\n\t\tassertEquals(\"Hello\",list.get(0));\n\t\tlist.insertAt(1, \"world\");\n\t\tassertEquals(\"world\",list.get(1));\n\t\tassertEquals(2, list.size());\n\t\tlist.insertAt(0, \"foo\");\n\t\tassertEquals(3,list.size());\n\t\tassertEquals(\"foo\", list.get(0));\n\t\tassertEquals(\"Hello\", list.get(1));\n\t\t\n\t\t\n\t}", "public void prepend(T element);", "@Override\n\tpublic void insertar() {\n\t\t\n\t}", "public ExtElement insertBefore(ExtElement element, BaseModel... values) {\r\n\t\treturn insertBefore(element, Arrays.asList(values));\r\n\t}", "public ExtElement insertFirst(ExtElement element, List<BaseModel> values) {\r\n\t\treturn insertFirst(element, BaseModel.fromList(values));\r\n\t}", "public void insert(JspElement e) {\r\n\tif (_first == null) {\r\n\t\t_first = e;\r\n\t\t_last = e;\r\n\t\te.setNext(null);\r\n\t}\t\r\n\telse {\r\n\t\te.setNext(_first);\r\n\t\t_first = e;\r\n\t}\r\n}", "private Node prepend(E element) {\n \treturn new Node(sentinel, element);\n }", "void prepend(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (front == null) \n\t\t{\n\t\t\tfront = back = temp; // if the list is empty the node will be the first node in the list making it the front and back node\n\t\t\tlength++;\n index = 0; //added because i failed the test scripts because i wasn't managing the indicies\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfront.prev=temp; //the temp node is inserted before the front\n\t\t\ttemp.next=front; //the node after temp will be the front because temp was inserted before the front\n\t\t\tfront = temp; //the front is now the temp node\n\t\t\tlength++;\n index++;//added because i failed the test scripts because i wasn't managing the indicies\n\t\t}\n\t}", "public void insert(T element);", "public ExtElement insertBefore(String element, List<BaseModel> values) {\r\n\t\treturn insertBefore(element, BaseModel.fromList(values));\r\n\t}", "void prepend(int element) {\n Node newHead = new Node(element,head);\n head = newHead;\n }", "private void insertar(ArrayList<Estado> hijos) {\r\n\t\tfor (Estado p : hijos) { // Añado hijos a nodos abiertos\r\n\t\t\tabiertos.add(p);\r\n\t\t\tif (abiertos.size() > estados_abiertos)\r\n\t\t\t\testados_abiertos = abiertos.size(); // Variable para contar el numero maximo de estados abiertos\r\n\t\t}\r\n\t}", "public void insertAtStart(int val)\n {\n List nptr = new List(val, null, null); \n if(start == null)\n {\n start = nptr;\n end = start;\n }\n else\n {\n start.setListPrev(nptr);\n nptr.setListNext(start);\n start = nptr;\n }\n size++;\n }", "private void expandAndInsert(RankedListElement currentExplanation) {\n\t\tboolean disOverlap = currentExplanation.extensionWithoutOverlap();\n\t\tsortedSets.remove(currentExplanation);\n\n\t\tfor (int i = 0; i < errorExpl.get(currentExplanation.firstUnset).size(); i++) {\n\t\t\tRankedListElement newOne = new RankedListElement(currentExplanation, i);\n\t\t\tif (log.isDebugEnabled()) {\n\t\t\t\tlog.debug(\"Was included? : \" + sortedSets.contains(newOne)\n\t\t\t\t\t\t+ \"\\n\" + newOne);\n\t\t\t}\n\t\t\tif ((!disOverlap || !newOne.lastAdditionHasOverlap())\n\t\t\t\t\t&& !sortedSets.contains(newOne))\n\t\t\t\tsortedSets.add(newOne);\n\t\t}\n\t}", "public ExtElement insertFirst(ExtElement element, BaseModel... values) {\r\n\t\treturn insertFirst(element, Arrays.asList(values));\r\n\t}", "public ExtElement insertFirst(String element, List<BaseModel> values) {\r\n\t\treturn insertFirst(element, BaseModel.fromList(values));\r\n\t}", "@Override\n\tpublic void insert() {\n\t\t\n\t}", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }" ]
[ "0.6564994", "0.64396423", "0.64261013", "0.6402994", "0.63166136", "0.6312443", "0.6227121", "0.62082195", "0.62043536", "0.6183875", "0.6157557", "0.6146158", "0.61308956", "0.61076856", "0.6068137", "0.6040678", "0.6036695", "0.602213", "0.5999586", "0.59730583", "0.5968091", "0.59674615", "0.5965096", "0.59586674", "0.5930421", "0.59287816", "0.5923024", "0.5915654", "0.5904552", "0.5903654", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.59008217", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908", "0.5898908" ]
0.0
-1
printing the current root data
public void printRoot() { System.out.println("Root is:"+root.data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void print() {\n\t\tprint(root);\n\t}", "public void print()\r\n {\r\n print(root);\r\n }", "public void print_root(){\r\n\t\tfor(int id = 0; id < label.length; id++){\r\n\t\t\tSystem.out.printf(\"\"%d \"\", find(id));\r\n\t\t}\r\n\t\tSystem.out.printf(\"\"\\n\"\");\r\n\t}", "public void printTree() {\n\t\tSystem.out.println(printHelp(root));\r\n\t\t\r\n\t}", "public void printRoot(){\n for(String temp : root){\n System.out.println(temp);\n }\n }", "public void printTree() {\r\n printTree(overallRoot, 0);\r\n }", "public void printTree() {\n printTreeHelper(root);\n }", "public void printOut() {\n\t\tif(root.left != null) {\n\t\t\tprintOut(root.left);\n\t\t}\n\t\t\n\t\tSystem.out.println(root.element);\n\t\t\n\t\tif(root.right != null) {\n\t\t\tprintOut(root.right);\n\t\t}\n\t}", "public void printStructure() {\n printStructure(mRoot);\n }", "public void print() {\n\t\ttraversePreOrder(root, 0);\n\t}", "public void display() {\n ITree.Node root = this.createNode(0);\n TreePrinter.printNode(root);\n }", "public void printAll() {\n\t\tNode node = root;\n\t\twhile (node != null) {\n\t\t\tSystem.out.println(node.data);\n\t\t\tnode = node.left;\n\t\t}\n\t}", "public void print() {\n\n if (root == null) // If the root does not exist, then we cannot print anything\n {\n System.out.println(\"The head does not exist \");\n return;\n }\n\n directory Fileptr = root;\n while (Fileptr != null) {\n System.out.print(Fileptr.a);\n System.out.print(\" ( Available Space \" + Fileptr.availableSpace + \" ) \" + \" ----> \");\n Fileptr = Fileptr.forward;\n }\n System.out.print(\" NULL \\n\");\n }", "public void printTree() {\n Object[] nodeArray = this.toArray();\n for (int i = 0; i < nodeArray.length; i++) {\n System.out.println(nodeArray[i]);\n }\n }", "public void displayNode() {\n\t\t\tSystem.out.println(\"{ \" + data + \" } \");\n\t\t}", "protected void print(Node<T> root)\r\n {\r\n if (root != null) {\r\n print(root.left);\r\n System.out.print(root.data + \" \");\r\n print(root.right);\r\n }\r\n }", "private void printFullTree()\r\n {\r\n System.out.println(fullXmlTree.toString());\r\n }", "public void printTree(){ \n System.out.format(\"The suffix tree for S = %s is: %n\",this.text); \n this.print(0, this.root); \n }", "public void tree()\n\t{\n\t\tIterable<Position<FileElement>> toPrint = fileSystem.PreOrder();\n\t\tfor (Position<FileElement> p : toPrint)\n\t\t{\n\t\t\tint depth = fileSystem.getDepth(p);\n\t\t\tfor (int i = 0; i < depth; i++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tSystem.out.println(p.getValue());\n\t\t}\n\t}", "@Override\n public void printTree() {\n System.out.println(\"node with char: \" + this.getChar() + \" and key: \" + this.getKey());\n int i = 0;\n for(IABTNode node : this.sons) {\n if(!node.isNull()) {\n System.out.print(\"Son \" + i + \" :\");\n node.printTree();\n }\n i++;\n }\n }", "void Print() {\r\n\r\n AVLTreeNode node = root;\r\n\r\n printInorder(node);\r\n\r\n }", "public String toString() {\r\n\t\treturn print(this.root,0);\r\n\t}", "public void print(){\n for(int i = 0; i < rootDir.length; i++){\n System.out.println(rootDir[i]);\n }\n }", "public void printTree() {\r\n\t if (expressionRoot == null) {\r\n\t return;\r\n\t }\r\n if (expressionRoot.right != null) {\r\n printTree(expressionRoot.right, true, \"\");\r\n }\r\n System.out.println(expressionRoot.data);\r\n if (expressionRoot.left != null) {\r\n printTree(expressionRoot.left, false, \"\");\r\n }\r\n }", "static void printTree(AbstractNode root) throws IOException {\n if (root == null) {\n return;\n }\n System.out.println(root.toString());\n if(root.getTypeNode() == 0) {\n ConscellNode nextNode = (ConscellNode)root;\n printTree(nextNode.getFirst());\n printTree(nextNode.getNext());\n }\n }", "public void displayNode() // display ourself\n\t{\n\t\tSystem.out.print('{');\n\t\tSystem.out.print(iData);\n\t\t\n\t\tSystem.out.print(\"} \");\n\t}", "void printTree(Node root) { \r\n if (root != null) { \r\n \tprintTree(root.leftChild); \r\n System.out.println(\"\\\"\" + root.keyValuePair.getKey() + \"\\\"\" + \" : \" + root.getKeyValuePair().getValue()); \r\n printTree(root.rightChild); \r\n } \r\n }", "public static void display(Node root){\r\n String str = \"[\"+root.data+\"] -> \";\r\n for(Node child : root.children){\r\n str += child.data + \", \";\r\n }\r\n System.out.println(str + \" . \");\r\n \r\n for(int i=0; i<root.children.size(); i++){\r\n Node child = root.children.get(i);\r\n display(child);\r\n }\r\n }", "public void printTree(T root) {\n List<TreeLine> treeLines = buildTreeLines(root);\n printTreeLines(treeLines);\n if(flush) outStream.flush();\n }", "public void update(){\r\n try {\r\n TreePrinter.print(root);\r\n } catch (Exception e) {\r\n System.out.println(\"[Alert] Could not print diagram!\");\r\n }\r\n }", "public void postOrderPrint() {\n\t\tpostOrderPrint(root);\n\t\tSystem.out.println();\n\t}", "public void printLDR() {\n if(!empty()) {\n printLDRNodes(root);\n System.out.println();\n }\n }", "public void printTree(){\n if(root!=null) // มี node ใน tree\n {\n super.printTree(root); // ปริ้นโดยส่ง node root ไป static fn\n }\n else\n {\n System.out.println(\"Empty tree!!!\");\n }\n }", "public void printTree() {\r\n\t\tif (isEmpty())\r\n\t\t\tSystem.out.println(\"Empty tree\");\r\n\t\telse\r\n\t\t\tprintTree(root);\r\n\t}", "public void printDLR() {\n if(!empty()) {\n printDLRNodes(root);\n System.out.println();\n }\n }", "@Override\n\tpublic void print() {\n System.out.println(\"Leaf [isbn=\"+number+\", title=\"+title+\"]\");\n\t}", "public void printLRD() {\n if(!empty()){\n printLRDNodes(root);\n System.out.println();\n }\n }", "public void printNodes() {\n\t\tprintNodes(root);\n\n\t}", "public void levelOrderPrint() {\n\t\tlevelOrderPrint(root);\n\t}", "public void print(){\r\n\t\tSystem.out.println(\"Size of each block:\\t\\t\" + this.blockSize);\r\n\t\tSystem.out.println(\"Total Number of Inodes:\\t\\t\" + this.inodeCount);\r\n\t\tSystem.out.println(\"Total Number of Blocks:\\t\\t\" + this.blocksCount);\r\n\t\tSystem.out.println(\"Number of Free Blocks:\\t\\t\" + this.freeBlocksCount);\r\n\t\tSystem.out.println(\"Number of Free Inodes:\\t\\t\" + this.freeInodesCount);\r\n\t\tSystem.out.println(\"First Data Block:\\t\\t\" + this.firstDataBlock);\r\n\t\tSystem.out.println(\"Last Written Date and Time:\\t\" + GeneralUtils.getDateFromLong(this.wTime));\r\n\t\tSystem.out.println(\"First Inode:\\t\\t\\t\" + this.firstInode);\r\n\t\tSystem.out.println(\"Inode Size:\\t\\t\\t\" + this.inodeSize);\r\n\t}", "public String display()\r\n {\r\n return recDisplay(root);\r\n }", "@Override\n public String toString() { return root.toString(); }", "public void print() {\n System.out.print(datum+\" \");\n if (next != null) {\n next.print();\n }\n }", "private void _printInorder(IntTreeNode root) {\r\n if (root != null) {\r\n _printInorder(root.left);\r\n System.out.print(\" \" + root.data);\r\n _printInorder(root.right);\r\n }\r\n }", "protected void printTree(){\n if (this.leftNode != null){\n leftNode.printTree();\n }\n System.out.println(value);\n\n if (this.rightNode != null){\n rightNode.printTree();\n }\n }", "public void print(){\n inorderTraversal(this.root);\n }", "public void printTopView() {\r\n\t\tfinal ArrayList<Integer> nodeDataList = new ArrayList<>();\r\n\r\n\t\tgetLeftChildren(rootNode.left, nodeDataList);\r\n\t\tnodeDataList.add(rootNode.data);\r\n\t\tgetRightChildren(rootNode.right, nodeDataList);\r\n\r\n\t\tSystem.out.println(\"Printing Top View\");\r\n\r\n\t\tnodeDataList.forEach(nodeData -> {\r\n\t\t\tSystem.out.print(nodeData + \" \");\r\n\t\t});\r\n\t}", "private void printTree(Tree parse) {\n \t\tparse.pennPrint();\n \t}", "public String printTree() {\n printSideways();\n return \"\";\n }", "public void printTree( )\r\n\t{\r\n\t\tif( isEmpty( ) )\r\n\t\t\tSystem.out.println( \"Empty tree\" );\r\n\t\telse\r\n\t\t\tprintTree( root );\r\n\t}", "@Override\r\n\tpublic void print()\r\n\t{\t//TODO méthode à compléter (TP1-ex11)\r\n\t\tfor (IndexEntry indexEntry : data) {\r\n\t\t\tif(indexEntry ==null){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(indexEntry.toString());\r\n\t\t}\r\n\t}", "public static void print(Node root) {\n Node temp = root;\n while (temp != null) {\n System.out.print(temp.data + \" \");\n temp = temp.next;\n }\n }", "private void printInorder(IntTreeNode root) {\r\n if (root != null) {\r\n printInorder(root.left);\r\n System.out.print(\" \" + root.data);\r\n printInorder(root.right);\r\n }\r\n }", "public void printInfo() {\n\t\tString nodeType = \"\";\n\t\tif (nextLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Output Node\";\n\t\t} else if (prevLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Input Node\";\n\t\t} else {\n\t\t\tnodeType = \"Hidden Node\";\n\t\t}\n\t\tSystem.out.printf(\"%n-----Node Values %s-----%n\", nodeType);\n\t\tSystem.out.printf(\"\tNumber of nodes in next layer: %d%n\", nextLayerNodes.size());\n\t\tSystem.out.printf(\"\tNumber of nodes in prev layer: %d%n\", prevLayerNodes.size());\n\t\tSystem.out.printf(\"\tNext Layer Node Weights:%n\");\n\t\tNode[] nextLayer = new Node[nextLayerNodes.keySet().toArray().length];\n\t\tfor (int i = 0; i < nextLayer.length; i++) {\n\t\t\tnextLayer[i] = (Node) nextLayerNodes.keySet().toArray()[i];\n\t\t}\n\t\tfor (int i = 0; i < nextLayerNodes.size(); i++) {\n\t\t\tSystem.out.printf(\"\t\t# %f%n\", nextLayerNodes.get(nextLayer[i]));\n\t\t}\n\t\tSystem.out.printf(\"%n\tPartial err partial out = %f%n%n\", getPartialErrPartialOut());\n\t}", "private void printInorder(IntTreeNode root) {\n if (root != null) {\n printInorder(root.left);\n System.out.print(\" \" + root.data);\n printInorder(root.right);\n }\n }", "public void print() {\n\t\tSystem.out.println(\"DECISION TREE\");\n\t\tString indent = \" \";\n\t\tprint(root, indent, \"\");\n\t}", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dumpTree() {\n\t\tsendMessage(\"/g_dumpTree\", new Object[] { 0, 0 });\n\t}", "public void print() {\r\n\t\tSystem.out.print(getUID());\r\n\t\tSystem.out.print(getTITLE());\r\n\t\tSystem.out.print(getNOOFCOPIES());\r\n\t}", "public void print(){\n if (isLeaf){\n for(int i =0; i<n;i++)\n System.out.print(key[i]+\" \");\n System.out.println();\n }\n else{\n for(int i =0; i<n;i++){\n c[i].print();\n System.out.print(key[i]+\" \");\n }\n c[n].print();\n }\n }", "void printNode() {\n\t\tint j;\n\t\tSystem.out.print(\"[\");\n\t\tfor (j = 0; j <= lastindex; j++) {\n\n\t\t\tif (j == 0)\n\t\t\t\tSystem.out.print (\" * \");\n\t\t\telse\n\t\t\t\tSystem.out.print(keys[j] + \" * \");\n\n\t\t\tif (j == lastindex)\n\t\t\t\tSystem.out.print (\"]\");\n\t\t}\n\t}", "public void print() {\r\n\t\tif(isEmpty()) {\r\n\t\t\tSystem.out.printf(\"%s is Empty%n\", name);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tSystem.out.printf(\"%s: %n\", name);\r\n\t\tNode<E> current = first;//node to traverse the list\r\n\t\t\r\n\t\twhile(current != null) {\r\n\t\t\tSystem.out.printf(\"%d \", current.data);\r\n\t\t\tcurrent = current.next;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public void displayTree()\r\n {\r\n Stack globalStack = new Stack();\r\n globalStack.push(root);\r\n int nBlanks = 32;\r\n boolean isRowEmpty = false;\r\n System.out.println(\r\n \"......................................................\");\r\n while(isRowEmpty==false)\r\n {\r\n Stack localStack = new Stack();\r\n isRowEmpty = true;\r\n\r\n for(int j=0; j<nBlanks; j++)\r\n System.out.print(' ');\r\n\r\n while(globalStack.isEmpty()==false)\r\n {\r\n Node temp = (Node)globalStack.pop();\r\n if(temp != null)\r\n {\r\n if((temp.getStoredChar()) != '\\u0000'){\r\n System.out.print(\"{\"+temp.getStoredChar() + \",\" + temp.getFrequency()+\"}\");\r\n \r\n }\r\n else{\r\n System.out.print(\"{_,\"+ temp.getFrequency()+\"}\");\r\n \r\n }\r\n localStack.push(temp.getLeftChild());\r\n localStack.push(temp.getRightChild());\r\n\r\n if(temp.getLeftChild() != null ||\r\n temp.getRightChild() != null)\r\n isRowEmpty = false;\r\n }\r\n else\r\n {\r\n System.out.print(\"-\");\r\n localStack.push(null);\r\n localStack.push(null);\r\n }\r\n for(int j=0; j<nBlanks*2-2; j++)\r\n System.out.print(' ');\r\n } // end while globalStack not empty\r\n System.out.println();\r\n nBlanks /= 2;\r\n while(localStack.isEmpty()==false)\r\n globalStack.push( localStack.pop() );\r\n } // end while isRowEmpty is false\r\n System.out.println(\r\n \"......................................................\");\r\n System.out.println(\"\");\r\n }", "public String toString(){\r\n\t\treturn root.toString();\r\n\t}", "private void _printPreorder(IntTreeNode root) {\r\n if (root != null) {\r\n System.out.print(\" \" + root.data);\r\n _printPreorder(root.left);\r\n _printPreorder(root.right);\r\n }\r\n }", "public void inOrderPrint()\r\n\t{\r\n\t\tif(root != null)\r\n\t\t\troot.inOrderPrint();\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Empty\");\r\n\t}", "public void print() {\r\n System.out.print(\"[id: <\" + this.id + \"> \");\r\n if (this.dimension > 0) {\r\n System.out.print(this.data[0]);\r\n }\r\n for (int i = 1; i < this.dimension * 2; i++) {\r\n System.out.print(\" \" + this.data[i]);\r\n }\r\n System.out.println(\"]\");\r\n }", "public void print(Node2 root){\n Node2 current = leftMostNode2(root);\n //now travel using right pointers\n while(current!=null){\n System.out.print(\" \" + current.data);\n //check if node has a right thread\n if(current.rightThread)\n current = current.right;\n else // else go to left most node in the right subtree\n current = leftMostNode2(current.right);\n }\n System.out.println();\n }", "public void printString()\r\n\t{\r\n\t\t//print the column labels\r\n\t\tSystem.out.printf(\"%-20s %s\\n\", \"Word\", \"Occurrences [form: (Paragraph#, Line#)]\");\r\n\t\tSystem.out.printf(\"%-20s %s\\n\", \"----\", \"-----------\");\r\n\t\troot.printString();\r\n\t}", "public String toString()\n {\n return _root.toString( ) ;\n }", "private void printTree(Tree parse) {\n\t\tparse.pennPrint();\n\t}", "@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}", "public void printTree(TernaryTreeNode root) {\n if (root==null) return;\n printTree(root.left);\n System.out.print(root.data+ \" \");\n printTree(root.right);\n }", "private void _printPreorder(IntTreeNode root) {\n if (root != null) {\n System.out.print(\" \" + root.data);\n _printPreorder(root.left);\n _printPreorder(root.right);\n }\n }", "void printTree(Node root, int space)\n\t{\n\t\t\n\t\tif(root == null)\n\t\t\treturn;\n\t\t\n\t\tprintTree(root.right, space + 5);\n\t\t\n\t\tfor(int i=0; i<space; i++)\n\t\t\tSystem.out.print(\" \");\n\t\tSystem.out.print(root.data);\n\t\tSystem.out.println();\n\t\t\n\t\tprintTree(root.left, space + 5);\n\t}", "private void _printPostorder(IntTreeNode root) {\r\n if (root != null) {\r\n _printPostorder(root.left);\r\n _printPostorder(root.right);\r\n System.out.print(\" \" + root.data);\r\n }\r\n }", "public static void printTree(Node root) {\r\n if (root == null)\r\n return;\r\n printTree(root.left);\r\n System.out.print(Integer.toString(root.value) + \" \");\r\n printTree(root.right);\r\n }", "public String toString() {\r\n return _toString(overallRoot);\r\n }", "public void printString()\r\n\t\t{\r\n\t\t\tTreeNode previousTreeNode = null; //holds the previous node\r\n\t\t\tTreeNode currentTreeNode = null; //holds current node\r\n\r\n\t\t\tData currentData = head; //start at the head of our data which is a linked list\r\n\t\t\twhile (currentData != null) //while the currentData is not null\r\n\t\t\t{\r\n\t\t\t\tcurrentTreeNode = currentData.getLT(); //get the Less Than tree\r\n\t\t\t\tif (currentTreeNode != previousTreeNode)\r\n\t\t\t\t\tcurrentTreeNode.printString(); //print the Less Than tree\r\n\t\t\t\tpreviousTreeNode = currentTreeNode;\r\n\r\n\t\t\t\tcurrentData.getWord(); //get the current word\r\n\t\t\t\tSystem.out.printf(\"%-20s\", currentData.getWord()); //print the current word\r\n\t\t\t\tArrayList locations = currentData.getLocations(); //get the word's locations in the file\r\n\t\t\t\tfor (int i = 0; i < locations.size(); i++) //print all of those\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.printf(\" (%s,%s)\", ((Point) locations.get(i)).x, ((Point) locations.get(i)).y);\r\n\t\t\t\t\tif ((((i + 1) % 8) == 0) && ((i + 1) != locations.size())) //only print 8 items per line\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.printf(\"\\n%-20s\", \"\\\"\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(); //print a newline\r\n\r\n\t\t\t\tcurrentTreeNode = currentData.getGT(); //get the Greater Than tree\r\n\t\t\t\tif (currentTreeNode != previousTreeNode)\r\n\t\t\t\t\tcurrentTreeNode.printString(); //print the Greater Than tree\r\n\t\t\t\tpreviousTreeNode = currentTreeNode;\r\n\t\t\t\tcurrentData = currentData.nextData();\r\n\t\t\t}\r\n\t\t}", "@Override\n\t\tpublic void print() {\n\n\t\t}", "public void prettyPrintTree() {\r\n\t\tSystem.out.print(\"prettyPrintTree starting\");\r\n\t\tfor (int i = 0; i <= this.getTreeDepth(); i++) {\r\n\t\t\tprettyPrintTree(root, 0, i);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "@Override\r\n\t\t\tpublic void print() {\n\t\t\t\t\r\n\t\t\t}", "private void printNode() {\n System.out.println(\"value:\" + value + \" next:\" + nextNode);\n }", "public void printInfo() {\n String s = \"\";\n if (map.isEmpty()) {\n s += \"not keeping any entries\\n\";\n } else {\n s += \"This Node stores a range of \" + map.size() + \" keys :\\n from:\" + map.firstKey() + \" up to: \" + map.lastKey() + \"\\n\";\n }\n s += \"node key:\\t\" + nodeKey + \"\\n\";\n s += \"previous key:\\t\" + predKey + \"\\n\";\n\n window.getKeysInfoText().setText(s);\n }", "public String toString()\r\n\t{\r\n\t\treturn root.toString();\r\n\t}", "void printPostorder() { \n\t\tprintPostorder(root);\n\t}", "public void display()\n\t{\n\t\tSystem.out.println(data+\" \");\n\t}", "public void print(){\n\t\tif(isEmpty()){\n\t\t\tSystem.out.printf(\"Empty %s\\n\", name);\n\t\t\treturn;\n\t\t}//end if\n\n\t\tSystem.out.printf(\"The %s is: \", name);\n\t\tListNode current = firstNode;\n\n\t\t//while not at end of list, output current node's data\n\t\twhile(current != null){\n\t\t\tSystem.out.printf(\"%s \", current.data);\n\t\t\tcurrent = current.nextNode;\n\t\t}//end while\n\n\t\tSystem.out.println(\"\\n\");\n\t}", "public void printBST() {\n prnt = \" \";\n try {\n int size = ((int) Math.pow(2, root.height)) - 1;\n if (size > 0) {\n ArrayTree = new int[size];\n\n int index = 0;\n ArrayTree[index] = root.key;\n\n if (size > 1) {\n BinarySearch(root, index);\n }\n for (int i = 0; i < ArrayTree.length; i++) {\n if (i <= lastIndex) {\n String bstoutput = (ArrayTree[i] == 0) ? \"null \" : ArrayTree[i] + \" \";\n prnt = prnt + \" \" + bstoutput + \", \";\n }\n }\n System.out.print(\"\\nBinary Tree: {\" + prnt + \"}\");\n }\n } catch (NullPointerException e) {\n System.out.println(\"null\");\n\n }\n }", "public void print ()\n\t{\n\t\tSystem.out.println(\"Polyhedron File Name: \" + FileName);\n\t\tSystem.out.println(\"Object active: \" + Boolean.toString(isActive()));\n\t\tprintCoordinates();\n\t}", "private void writeInternal(QuestionNode root, PrintStream output) {\r\n if(root != null) {\r\n if(root.isLeafNode()) { // leaf node\r\n output.println(\"A:\");\r\n output.println(root.data);\r\n } else {\r\n output.println(\"Q:\");\r\n output.println(root.data);\r\n }\r\n writeInternal(root.left, output);\r\n writeInternal(root.right, output);\r\n }\r\n }", "private void printPreorder(IntTreeNode root) {\n if (root != null) {\n System.out.print(\" \" + root.data);\n printPreorder(root.left);\n printPreorder(root.right);\n }\n }" ]
[ "0.79012597", "0.78536564", "0.77558887", "0.77205485", "0.7715324", "0.76957804", "0.76912665", "0.7661898", "0.7562535", "0.7517948", "0.7485821", "0.7483945", "0.74541646", "0.7406487", "0.73911935", "0.7375787", "0.73343325", "0.7330246", "0.7319106", "0.7297414", "0.7280369", "0.72745943", "0.72646743", "0.7220436", "0.7192493", "0.71788514", "0.71531826", "0.7151019", "0.7149612", "0.71488994", "0.7146412", "0.7139771", "0.7116349", "0.70837194", "0.7059571", "0.7049879", "0.70487326", "0.7044101", "0.70017135", "0.69779855", "0.69779074", "0.69689494", "0.69644654", "0.6962515", "0.69485146", "0.6946043", "0.69422704", "0.6928685", "0.6921082", "0.6889825", "0.68721324", "0.6864702", "0.6847795", "0.68406904", "0.6836756", "0.68221474", "0.6802795", "0.6802795", "0.6802795", "0.6802795", "0.6802795", "0.6802795", "0.6802795", "0.6802795", "0.6802795", "0.6790493", "0.6781397", "0.67761", "0.67672247", "0.6766742", "0.6762893", "0.67539376", "0.6749855", "0.6748942", "0.67468", "0.6745021", "0.67409104", "0.6733847", "0.6731023", "0.67276746", "0.67269695", "0.6724753", "0.670425", "0.6690217", "0.66799784", "0.66584665", "0.66468185", "0.6646576", "0.6639143", "0.66332096", "0.66315013", "0.6603106", "0.6598964", "0.65960383", "0.6591346", "0.6586192", "0.65857923", "0.65853494", "0.658413", "0.6582781" ]
0.87680763
0
inserting at the end
public void insertAtEnd(int data) { if(root ==null) { Node atEnd = new Node(data); root = atEnd; } else { Node tmp = root; //traversing the last node that has null at the end while(tmp!=null) { tmp = tmp.right; } Node atEnd = new Node(data); atEnd.right = atEnd; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void InsertAtEnd(K pk){\n\t\tsuper.append(pk);\n\t}", "public void insertAtEnd(Employee e) {\n\t}", "void insertAfter(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (length==0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == back) \n\t\t{\n\t\t\tappend(data); //if the cursor is at the back of the list then you can just all append since you will be inserting the element into the back element\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\ttemp.next = cursor.next; //the new node temp's next will be the cursor's next\n\t\t\ttemp.prev = cursor; //the new node temp's previous will become the cursor\n\t\t\tcursor.next.prev = temp; //cursor's next previous element becomes temp\n\t\t\tcursor.next = temp; //cursor's next becomes temp\n\t\t\tlength++;\n\t\t}\n\t}", "protected void insertEnd(T value) {\r\n\t\tSNode<T> iterator = head;\r\n\t\twhile (iterator.getPrev() != this.tail) {\r\n\t\t\titerator = iterator.getPrev();\r\n\t\t}\r\n\t\titerator.setPrev(new SNode<T>(value, this.tail));\r\n\t\tsize++;\r\n\t}", "@Override\n\tpublic Position insertLast(Object element) {\n\t\treturn null;\n\t}", "public void insertEnd(T data){\n Node<T> node = new Node<T>(data);\n if(this.isEmpty()) {\n this.insertFirst(data);\n }\n else{\n this.end.next = node;\n node.previous = this.end;\n this.end = node;\n }\n size++;\n }", "@Override\n\tpublic void insert() {\n\t\t\n\t}", "public void insertAfter(SequiturSymbol toInsert){\n join(toInsert,n);\n join(this,toInsert);\n }", "private static void insertAtEnd(int data) {\n\tNode newnode=new Node(data);\n\tnewnode.next=null;\n\tNode n=head;\n\tNode last=head;\n\twhile(last.next!=null)\n\t{\n\t\tlast=last.next;\n\t}\n\tlast.next=newnode;\n\tnewnode.prev=last;\n\treturn;\n\t\n}", "public Node insertAfter(Node node);", "public void insertEnd(T newdata){\n\n if (head == null){\n push(newdata);\n return;\n }\n\n Node n = new Node(newdata);\n n.next = null;\n Node last = head;\n while (last.next!=null){\n last = last.next;\n }\n last.next = n;\n }", "@Override\n public void insertAtEnd(T value) {\n Node<T> new_node = new Node<T>(value);\n if (start == null) {\n start = new_node;\n }\n if (end == null) {\n end = new_node;\n } else {\n end.next = new_node;\n end = new_node;\n }\n\n }", "public void insertAfterCursor(String s) {\n if(this.isEmpty())\n {\n lines.addFirst(s);\n }\n else\n lines.addAfter(new PositionObject<>(lines.get(cursor)), s);\n cursor++;\n }", "public void insertAfter(T element) {\n setNext( new LLNode<T>(element, getNext()));\n }", "public void insertAtBack(L insertItem){\n\t\tListNode node = new ListNode(insertItem);\n\t\tif(isEmpty()) //firstNode and lastNode refer to same Object\n\t\tfirstNode = lastNode = node;\n\t\telse{ //lastNode's nextNode refers to new node\n\t\t\tlastNode.nextNode = node;\n\t\t\tlastNode = node;\n\t\t\t//you can replace the two previous lines with this line: lastNode = lastNode.nextNode = new ListNode( insertItem );\n\t\t}\n\t}", "Position<T> addAfter(Position<T> p, T data) throws IllegalStateException;", "void insert(int insertSize);", "public void insertAtBack(T insertItem) {\n\t\tNode<T> node = new Node<T>(insertItem);\n\t\t\n\t\tif (isEmpty()) // firstNode and lastNode refer to same Object\n\t\t\tfirstNode = lastNode = node;\n\t\telse { // lastNode's nextNode refers to new node\n\t\t\tlastNode.nextNode = node;\n\t\t\tlastNode = node;\n\t\t\t// you can replace the two previous lines with this line: lastNode =\n\t\t\t// lastNode.nextNode = new ListNode( insertItem );\n\t\t}\n\t\tsize++;\n\t}", "private void pushBack() {\n\t\tbufferLocal.insertarEnCabeza(listaTokens.get(listaTokens.size()-1));\n\t}", "public void insertAtEnd(int data){\n\t\tif(head == null){\n\t\t\thead = new Node(data);\n\t\t\tsize ++ ;\n\t\t}else{\n\t\t\tNode currentNode = head;\n\t\t\twhile(currentNode.getNext() != null){\n\t\t\t\tcurrentNode = currentNode.getNext();\n\t\t\t}\n\t\t\tcurrentNode.setNext(new Node(data));\n\t\t\tsize ++;\n\t\t}\n\t}", "public void moveEnd(\n )\n {moveLast(); moveNext();}", "@Override\n\tpublic void insertProcess() {\n\t\t\n\t}", "public void insertAfter(ListNode next){\n ListNode cur = this.next;\n this.next = next;\n next.next = cur;\n }", "Position<T> addLast(T data);", "@Override\r\n\tpublic void insert(FollowUp followup) {\n\t\t\r\n\t}", "@Override\n\tpublic void insertar() {\n\t\t\n\t}", "public void insert()\n\t{\n\t}", "@Override\n\tpublic Position<E> addLast(E e) {\n\t\treturn addBetween(tail.prev, tail, e);\n\t}", "public void insertAtEnd(String v) {\n\t\tif(length==0) insertAtBegin(v);\n\t\telse {ElementDPtr e= new ElementDPtr(v,tail.getPrev(),tail);\n\t\t System.out.println(v + \" tail \" + tail.getPrev().getValue());\n\t\t if (tail.getPrev().getValue().equals(\"\")) e.setPrev(head);\n\t\t \n\t\t e.getPrev().setNext(e);\n\t\t System.out.println(v + \" it \" + length);\n\t\t tail.setPrev(e); \n\t\t length += 1; }\n\t\tSystem.out.println(tail.getPrev().getValue() + \" insertE \" + length);\n\t}", "@Override\n\tpublic void preInsert() {\n\n\t}", "static ListNode insertAtEnding(ListNode head, int data) {\n\n ListNode newNode = new ListNode(data);\n\n if (head == null) {\n return newNode;\n }\n\n ListNode current = head;\n\n while (current.next != null) {\n\n current = current.next;\n }\n current.next = newNode;\n\n return head;\n }", "@Test\n\tpublic void addNodeAfterGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node after the given node \");\n\t\tdll.push(4);\n\t\tdll.push(2);\n\t\tdll.push(1);\n\t\tdll.InsertAfter(dll.head.next, 3);\n\t\tdll.print();\n\t}", "@Override\n\tpublic Position insertAfter(Position p, Object element) throws InvalidPositionException {\n\t\treturn null;\n\t}", "public void insertLast( T data ) {\n\t\t//make a new node \n\t\tLinkedListNode<T> lastNode = new LinkedListNode<T>();\n\t\t//if somebody accidently called insert after with an empty list\n\n\t\t///add data to this node\n\t\tlastNode.setData(data);\t\n\t\t//invoke insertfirstnode to link up the new node\n\t\tinsertAfter (getLastNode(), data);\n\t\t\n\t}", "public void insertAtEnd(int val)\n\n {\n\n Node nptr = new Node(val, null, null); \n\n if(start == null)\n\n {\n\n start = nptr;\n\n end = start;\n\n }\n\n else\n\n {\n\n nptr.setLinkPrev(end);\n\n end.setLinkNext(nptr);\n\n end = nptr;\n\n }\n\n size++;\n\n }", "public void insertAtEnd(int val)\n {\n List nptr = new List(val, null, null); \n if(start == null)\n {\n start = nptr;\n end = start;\n }\n else\n {\n nptr.setListPrev(end);\n end.setListNext(nptr);\n end = nptr;\n }\n size++;\n }", "public void insertEnd(Item item) {\n if (size == 0) insertCreator(item); // if circle is empty\n else { // if these's at least one node already\n Node temp = new Node(item, head, head.before); // creates a new node\n head.before.next = temp;\n head.before = temp;\n }\n size++;\n }", "@Test\n\tpublic void addNodeAtEnd() {\n\t\tSystem.out.println(\"Adding a node at the End of the list\");\n\t\tdll.append(1);\n\t\tdll.append(2);\n\t\tdll.append(3);\n\t\tdll.print();\n\t}", "public void insertAtEnd(Computer Computer) {\n // Computer Computer = new Computer(null, null);\n if (start == null) {\n Computer.setLinkNext(Computer);\n Computer.setLinkPrev(Computer);\n start = Computer;\n end = start;\n } else {\n Computer.setLinkPrev(end);\n end.setLinkNext(Computer);\n start.setLinkPrev(Computer);\n Computer.setLinkNext(start);\n end = Computer; // The computer is placed at the end\n }\n taille++;\n }", "@Override\r\n\tprotected void doLast() {\n\t\t\r\n\t}", "public void MoveLast()\r\n {\r\n\r\n \t try{\r\n \t\t rsTution.last();\r\n \t\t Display();\r\n\r\n\r\n \t }catch(SQLException sqle)\r\n \t {System.out.println(\"MoveLast Error:\"+sqle);}\r\n \t}", "public void insertAfter( long after, T data){\n Node<T> node = new Node<T>(data);\n if(this.isEmpty()|| after == 0) {\n this.insertFirst(data);\n }\n else if(after >= size) { //if new Node inserted in the end of list\n this.insertEnd(data);\n }\n else{\n Node<T> current = begin;\n for(int i = 0; i < after; i++)\n current = current.next;\n node.next = current.next;\n current.next.previous = node;\n node.previous = current;\n current.next = node;\n }\n size++;\n }", "public void insertLast( T data ){\n\t\t//create temporary node that will contain data\n\t\tDLLNode<T> newNode = new DLLNode<T>();\n\t\tnewNode.setData( data );\n\t\t//if tail = empty\n\t\tif( tail == null ){\n\t\t\ttail = newNode;\n\t\t} else{\n\t\t\tnewNode.setPrev( tail );\n\t\t\ttail.setNext(newNode);\n\t\t\ttail = newNode;\n\t\t}\n\t\tsize++;\n\t}", "private String addEnd() {\n\t\t// NO PARAMETERS\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|End\");\n\t\treturn tag.toString();\n\t}", "public JsStatement insertAfter(String expression)\n\t{\n\t\tchain(ManipulatingHelper.insertAfter(expression));\n\t\treturn this;\n\t}", "@Override\r\n\tpublic void addLast(E e) {\n\t\t\r\n\t}", "public void insert_last(int data){\n Node new_node = new Node(data);\n Node cursor = this.head;\n if(head==null){\n new_node.prev = null;\n head = new_node;\n System.out.println(\"Node Added !\");\n this.print_list();\n return;\n }\n while(cursor != null){\n if(cursor.next == null){\n cursor.next = new_node;\n new_node.prev = cursor;\n System.out.println(\"Node added !\");\n this.print_list();\n return;\n }\n cursor = cursor.next;\n }\n return;\n }", "public void insert(int value){\n linkedList.insertLast(value);\n }", "public void insertAtBack(T data) {\n \t//we create a new node\n Node<T> aNode = new Node<>(data);\n //and again if there is no node we make a new node as first and last node\n if (isEmpty()) {\n firstNode = lastNode = aNode;\n } \n //otherwise we set a new node as last node\n //and we assign to last node the next node of the last one\n //so the last node is new created node now\n else {\n lastNode.setNext(aNode);\n lastNode = lastNode.getNext();\n }\n }", "private void insert(int pos, T elem) {\n for (int i = size; i >= pos + 1; i--) {\n arr[i] = arr[i-1];\n }\n arr[pos] = elem;\n }", "public String insertAfter(String v) {\n\t\t\t\t\tString result=\"\";\n\t\t\t\t\treturn result ;\n\t\t\t\t}", "public void addLast(T e) {\n if (_size == 0) {\n _end = new DLLNode<T>(e, null, null);// Same thing as in addFront()\n _front = _end;\n }\n else {\n _end.setNext(new DLLNode<T>(e, _end, null));// add something after the last thing and make that the new end\n _end = _end.getNext();\n }\n _size++;\n }", "public void insertLast( T data ) \n {\n \tDLLNode newNode;\n\n if(isEmpty()){\n \t newNode = new DLLNode(data, null, null);\n \t head = newNode;\n \t tail = newNode;\n }\n \n else{\n \tnewNode = new DLLNode(data, tail, null);\n \ttail.next = newNode;\n \ttail = newNode;\n }\n }", "public void insert(JspElement e) {\r\n\tif (_first == null) {\r\n\t\t_first = e;\r\n\t\t_last = e;\r\n\t\te.setNext(null);\r\n\t}\t\r\n\telse {\r\n\t\te.setNext(_first);\r\n\t\t_first = e;\r\n\t}\r\n}", "public void afterLast() throws SQLException\n {\n m_rs.afterLast();\n }", "public static void incrInsertions() { ++insertions; }", "public void insertAfterCurernt(T aData){\r\n if(curr == null){\r\n return;\r\n }\r\n curr.link = new ListNode(aData,curr.link);\r\n }", "void insert(T value, int position);", "@Override\n\tpublic int insert2(Object ob) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int insert2(Object ob) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int insert(Object ob) {\n\t\treturn 0;\n\t}", "public void addLast(Item x);", "public synchronized void insertAtEnd(ListNode tmp) {\n\t\tif (head == null)\n\t\t\thead = tmp;\n\t\telse {\n\t\t\tListNode p, q;\n\t\t\tfor (p = head; (q = p.getNext()) != null; p = q)\n\t\t\t\t;\n\t\t\tp.setNext(tmp);\n\t\t}\n\t\tlength++;\n\t}", "public boolean insertAfter(O where, O what)\r\n {\r\n return insertAt(indexOf(where)+1,what);\r\n }", "public abstract void appendBlock();", "public void moveToEnd() {\r\n\t\tcurr = tail;\r\n\t}", "public long insert();", "public void beforeLast() throws SQLException {\n/* 261 */ notSupported();\n/* */ }", "public void addLast(Object o) {\r\n addBefore(o, header);\r\n }", "void insert(Object value, int position);", "@Override\n\t\t\t\tpublic void rowsInserted(int firstRow, int endRow) {\n\n\t\t\t\t}", "public void insertLast( T data )\n\t{\n\t\t//if the list is empty or the head is the last node\n\t\tif(isEmpty() || head.getNext() == null){\n\t\t\t//insert first node\n\t\t\tinsertFirst(data);\n\t\t\t//increment the size of the list\n\t\t\tlistSize++;\n\t\t}\n\t\telse\n\t\t\t//insert a new node after last node\n\t\t\tinsertAfter(getLastNode(), data);\n\t}", "public void insertAfterCurrent(T aData) {\r\n\t\t// Can't insert if there is nothing at current\r\n\t\tif (curr == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tListNode newNode = new ListNode(aData, curr.link);\r\n\t\tif (curr != null && prev == null) { // at the head\r\n\t\t\thead.link = newNode; // curr.link = newNode;\r\n\t\t} else if (curr != null && prev != null) { // If it's in the middle\r\n\t\t\tcurr.link = newNode;\r\n\t\t}\r\n\r\n\t}", "public void insertLast(Movimiento data){\n\n NodeD newNode = new NodeD(data);\n\n if (this.isEmpty()){\n this.head = this.tail = this.selec = newNode;\n }else{\n this.tail.setNext(newNode);\n newNode.setPrev(this.tail);\n this.tail = newNode;\n }\n this.size++;\n }", "public void insertAtLast(int data) {\n\t\tNode node = new Node(); // Defining Object Of Node Class\n\t\tnode.data = data; // initializing the data from the end user to node\n\t\t\t\t\t\t\t// object\n\t\tnode.next = null; // Setting the next to null,since last node hold null\n\t\t\t\t\t\t\t// value\n\n\t\t// Checking the condition if there is not present data already,might be\n\t\t// the first node\n\t\tif (head == null) {\n\t\t\thead = node;\n\t\t} else {\n\t\t\tNode n = head; // starting from head itself\n\t\t\twhile (n.next != null) { // traversing the next element which is not\n\t\t\t\t\t\t\t\t\t\t// null\n\t\t\t\tn = n.next;\n\t\t\t}\n\t\t\tn.next = node;\n\n\t\t}\n\t}", "net.opengis.gml.x32.TimePositionType addNewEndPosition();", "public void addTileAtTheEnd(Tile tile);", "public void insertEnd(int val)\r\n {\n Node newNode = new Node(val);\r\n if( isEmpty() )\r\n start = newNode;\r\n else\r\n end.next = newNode;\r\n end = newNode;\r\n }", "public void insertAfter(Object item) {\n this.next = new SListNode(item, next);\n }", "public void order_insert(Packet p){//well_tested\n \tListIterator<Packet> it=b_pending_packet.listIterator();\n\t\tPacket temp = null;\n\t\tboolean end_flag=false;\n\t\tboolean begin_flag=true;\n\t\tboolean middle_flag=false;\n \tif(b_expect_seqnum<=(b_expect_seqnum+WindowSize-1)%LimitSeqNo){//normal case \t\t\n \t\twhile(it.hasNext()){\n \t\t\tbegin_flag=false;\n \t\t\tend_flag=true;\n \t\t\ttemp=(Packet) it.next();\n \t\t\tif(temp.getSeqnum()==p.getSeqnum())//already received\n \t\t\t\treturn;\n \t\t\telse{\n \t\t\t\tif(temp.getSeqnum()>p.getSeqnum()){//logic\n \t\t\t\t\tmiddle_flag=true;\n \t\t\t\t\tend_flag=false;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t\tcontinue;\n \t\t\t} \t\t\t\t\n \t\t}\n \t\tif(begin_flag==true)\n \t\t\tb_pending_packet.addFirst(p);\n \t\telse{\n \t\t\tif(end_flag==true)\n \t\t\t\tb_pending_packet.addLast(p);\n \t\t\telse{\n \t\t\t\tif(!it.hasPrevious())\n \t\t\t\t\tb_pending_packet.addFirst(p);\n \t\t\t\telse{\n \t\t\t\t\tit.previous();\n \t\t\t\t\tit.add(p);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n \telse{//wrap around\n \t\tif(p.getSeqnum()>=b_expect_seqnum){//insert before the LimitSeqNo\n \t\t\twhile(it.hasNext()){\n \t\t\tbegin_flag=false;\n \t\t\tend_flag=true;\n \t\t\ttemp=(Packet) it.next();\n \t\t\tif(temp.getSeqnum()<b_expect_seqnum){//prevent wrap around\n \t\t\t\t//it.previous();\n \t\t\t\tmiddle_flag=true;\n \t\t\t\t\tend_flag=false;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\tif(temp.getSeqnum()==p.getSeqnum())//already received\n \t\t\t\treturn;\n \t\t\telse{\n \t\t\t\tif(temp.getSeqnum()>p.getSeqnum()){//logic\n \t\t\t\t\tmiddle_flag=true;\n \t\t\t\t\tend_flag=false;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t\tcontinue;\n \t\t\t} \t\t\t\t\n \t\t}\n \t\tif(begin_flag==true)\n \t\t\tb_pending_packet.addFirst(p);\n \t\telse{\n \t\t\tif(end_flag==true)\n \t\t\t\tb_pending_packet.addLast(p);\n \t\t\telse{\n \t\t\t\tif(!it.hasPrevious())\n \t\t\t\t\tb_pending_packet.addFirst(p);\n \t\t\t\telse{\n \t\t\t\t\tit.previous();\n \t\t\t\t\tit.add(p);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t}\n \t\telse{//insert between zero and end\n \t\t\twhile(it.hasNext()){\n \t\t\tbegin_flag=false;\n \t\t\tend_flag=true;\n \t\t\ttemp=(Packet) it.next();\n \t\t\tif(temp.getSeqnum()>=b_expect_seqnum)\n \t\t\t\tcontinue; \t\t\n \t\t\tif(temp.getSeqnum()==p.getSeqnum())//already received\n \t\t\t\treturn;\n \t\t\telse{\n \t\t\t\tif(temp.getSeqnum()>p.getSeqnum()){//logic\n \t\t\t\t\tmiddle_flag=true;\n \t\t\t\t\tend_flag=false;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t\tcontinue;\n \t\t\t} \t\t\t\t\n \t\t}\n \t\tif(begin_flag==true)\n \t\t\tb_pending_packet.addFirst(p);\n \t\telse{\n \t\t\tif(end_flag==true)\n \t\t\t\tb_pending_packet.addLast(p);\n \t\t\telse{\n \t\t\t\tif(!it.hasPrevious())\n \t\t\t\t\tb_pending_packet.addFirst(p);\n \t\t\t\telse{\n \t\t\t\t\tit.previous();\n \t\t\t\t\tit.add(p);\n \t\t\t\t}\n \t\t\t}\n \t\t} \t\t\t\n \t\t}//else ,insert between zero and end\n \t}//else (has warp around)\t\t\n\t}", "void addToEnd(Object[] by);", "public void insertBeforeCursor(String s) {\n if(this.isEmpty() || cursor==-1)\n {\n lines.addFirst(s);\n }\n else\n lines.addBefore(new PositionObject<>(lines.get(cursor)), s);\n //cursor--;\n }", "private void addAfter(Node n, String data)\n {\n Node next = n.next;\n n.next = new Node(data, next);\n size++;\n }", "public void insertAfter(String insertData, String findData) {\n\t\t// write you code for insertAfter using the specification above\n\t\tNode compare = new Node(findData);\n\t\tNode nodref = head;\n\t\twhile (nodref != null){\n\t\t\tif (nodref.equals(compare)){\n\t\t\t\tNode adder = new Node(insertData);\n\t\t\t\tadder.next = nodref.next;\n\t\t\t\tnodref.next = adder; \n\t\t\t\tnumElements++;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tnodref = nodref.next;\n\t\t}\n\t\treturn;\n\t}", "public void addANodeToEnd(E addData)\n\n\t{\n\t\tNode position = head;\n\t\t// when the link is null, stop the loop and add a node \n\t\twhile (position.link != null) {\n\t\t\t// get next node\n\t\t\tposition = position.link;\n\t\t}\n\t\t// add a new node to the end\n\t\tposition.link = new Node(addData, null);\n\n\t}", "public void insert(int pos,int data)\n{\n Node n=new Node(data);\nint count=1;\nNode last=head;\n\nif(pos==0)\n{\n n.next=last;\n head=n;\n}\nelse\n{\nif(pos>length())\n{\n pos=length();\n}\nwhile(count<pos)\n{\n last=last.next;\ncount++;\n}\nn.next=last.next;\nlast.next=n;\n}\n}", "public static native Element insertAfter(Element elem, DomConfig config)/*-{\r\n\t\tvar configJS = config.@com.ait.toolkit.sencha.shared.client.dom.DomConfig::getJsObject()();\r\n\t\treturn $wnd.Ext.DomHelper.insertAfter(parent, configJS);\r\n\t}-*/;", "public void insertRight( long j ) {\n if ( end == max - 1 ) {\n end = -1;\n }\n Array[++end] = j;\n nItems++;\n }", "void insertEnd(int key)\n {\n if (isFull())\n {\n System.out.println(\" Overflow \");\n return;\n }\n\n // If queue is empty\n if (front == -1)\n {\n front = end = 0;\n } else if (end == size-1) { // last one\n end = 0;\n } else {\n end++;\n }\n arr[end] = key ;\n }", "@Override\n public void addToEnd(T data){\n Node<T> dataNode = new Node<>();\n\n dataNode.setData(data);\n dataNode.setNext(null);\n\n Node<T> tempHead = this.head;\n while(tempHead.getNext() != null) {\n tempHead = tempHead.getNext();\n }\n\n tempHead.setNext(dataNode);\n }", "@Override\r\n\tpublic String insert() {\n\t\treturn \"insert\";\r\n\t}", "public void addLast(T item){\n\tif ( _size == 0 ) {\n\t _front = _end = new DLLNode<T>(item, null, null);\n\n\t}\n\telse{\n\t DLLNode<T> temp = new DLLNode<T>(item, null, _end);\n\t _end.setPrev(temp);\n\t _end = temp;\n\t}\n\t_size++;\n }", "public void insertAfter( DLLNode<T> current, T data ){\n\t\t//create new node that contains data\n\t\tDLLNode<T> newNode = new DLLNode<T>();\n\t\tnewNode.setData( data );\n\t\t\n\t\t//DL's code\n\t\tDLLNode<T> nextNode = current.next;\n\t\t\n\t\tnewNode.setPrev( current );\n\t\t//DL's code\n\t\tnewNode.setNext( nextNode );\n\t\t\n\t\t//DL's code\n\t\tif (nextNode != null)\n\t\t\tnextNode.setPrev(newNode);\t\t\t\n\t\t\t//current.getPrev().setNext( newNode );\n\t\t\n\t\t//DL's code\n\t\tcurrent.setNext(newNode);\n\t\t\n\t\t//increase size by 1\n\t\tsize++;\n\t}", "public static native Element insertAfter(Element elem, String rawHtml)/*-{\r\n\t\treturn $wnd.Ext.DomHelper.insertAfter(parent, rawHtml);\r\n\t}-*/;", "public void afterLast() throws SQLException {\n/* 241 */ notSupported();\n/* */ }", "@Override\n\tpublic void insertAtLast(T item) {\n\t\tNode<T> newNode = new Node<>(item);\n\t\tif (this.head == null) {\n\t\t\tthis.head = newNode;\n\t\t} else {\n\t\t\tNode<T> tmpNode = this.head;\n\t\t\twhile (tmpNode.getNext() != null) {\n\t\t\t\ttmpNode = tmpNode.getNext();\n\t\t\t}\n\t\t\ttmpNode.setNext(newNode);\n\t\t}\n\t\tlistSize++;\n\t}", "void moveToEnd();", "private Node<E> addAfter(Node current, E toAdd) {\n\t\tif ((((Comparable<E>) toAdd).compareTo((E) current.data)) >= 0) {\n\t\t\tif (current.rightChild == null) {\n\t\t\t\tcurrent.rightChild = new Node(toAdd, current, null, null);\n\t\t\t\treturn current.rightChild;\n\t\t\t} else {\n\t\t\t\treturn addAfter(current.rightChild, toAdd);\n\t\t\t}\n\t\t} else {\n\t\t\tif (current.leftChild == null) {\n\t\t\t\tcurrent.leftChild = new Node(toAdd, current, null, null);\n\t\t\t\treturn current.leftChild;\n\t\t\t} else {\n\t\t\t\treturn addAfter(current.leftChild, toAdd);\n\t\t\t}\n\t\t}\n\t}", "public void addLast(E e) {\n addBetween(e, trailer.getPrev(), trailer);\n }", "protected int insert(int toAdd){\n\n tnode object = new tnode();\n\n return object.insert(toAdd);\n\n }" ]
[ "0.7229994", "0.7083057", "0.6964526", "0.6832874", "0.67684066", "0.66520756", "0.6618357", "0.6596451", "0.652978", "0.6493364", "0.64432776", "0.6418084", "0.63879067", "0.63707167", "0.635687", "0.6355131", "0.6312763", "0.63104135", "0.6295549", "0.62955016", "0.62920004", "0.6276547", "0.6262961", "0.62563753", "0.6207765", "0.6186538", "0.6153409", "0.6140283", "0.6137525", "0.61363375", "0.6132456", "0.6128126", "0.6126545", "0.6121202", "0.61161405", "0.60982966", "0.60876155", "0.60731345", "0.60217327", "0.6018912", "0.6007009", "0.5999369", "0.5986542", "0.59865", "0.5974219", "0.5958726", "0.5947907", "0.5933199", "0.5915761", "0.5907427", "0.5900151", "0.58940125", "0.58768255", "0.58679795", "0.58637494", "0.58585936", "0.58537555", "0.584055", "0.583833", "0.583833", "0.5831283", "0.5827091", "0.5819046", "0.58042073", "0.5802823", "0.57924205", "0.5791286", "0.5783586", "0.5782828", "0.57807183", "0.57803154", "0.57760984", "0.5775738", "0.5775242", "0.5771851", "0.57662857", "0.5764147", "0.5763517", "0.5761866", "0.57611436", "0.57607967", "0.57585794", "0.57530856", "0.5750432", "0.5747758", "0.57477015", "0.57454336", "0.5722191", "0.57175183", "0.570647", "0.57006335", "0.56903744", "0.5686427", "0.56835496", "0.5673097", "0.5666707", "0.56661034", "0.5660298", "0.56599444", "0.56544197" ]
0.6290578
21
TODO Autogenerated method stub
private void addArray(ArrayList<Student> array) { System.out.println("请输入学号:"); String id = sc.next(); System.out.println("请输入姓名:"); String name = sc.next(); System.out.println("请输入年龄:"); int age = sc.nextInt(); System.out.println("请输入性别:"); String sex = sc.next(); System.out.println("请输入地址:"); String address = sc.next(); Student s= new Student(name,age,id,sex,address); array.add(s); System.out.println("添加学生成功"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Test of export method, of class ExportHTML.
@Test public void testExport() { System.out.println("testExport"); List<String[]> text = new ArrayList(); text.add("1;2;3".split(";")); text.add("4;5;6".split(";")); text.add("7;8;9".split(";")); String expResult = "<!DOCTYPE html><html> <head> <title> Export File HTML </title>\n" + " <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"> <link rel=\"icon\" type=\"image/ico\" href=\"http://www.isep.ipp.pt/favicon.ico\"> </head> <body> <div> <img src=\"http://www.dei.isep.ipp.pt/images/topo_index.png\" alt=\"Logotipo ISEP\"> </div> <hr> <div> <TABLE> <TR> <TD align='center'>&nbsp;1&nbsp;</TD> <TD align='center'>&nbsp;2&nbsp;</TD> <TD align='center'>&nbsp;3&nbsp;</TD> </TR> <TR> <TD align='center'>&nbsp;4&nbsp;</TD> <TD align='center'>&nbsp;5&nbsp;</TD> <TD align='center'>&nbsp;6&nbsp;</TD> </TR> <TR> <TD align='center'>&nbsp;7&nbsp;</TD> <TD align='center'>&nbsp;8&nbsp;</TD> <TD align='center'>&nbsp;9&nbsp;</TD> </TR> </TABLE> <br> </div> <hr> </body></html>"; ExportHTML instance = new ExportHTML(); String result = instance.export(text); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void testGetExtension() {\r\n\t\tSystem.out.println(\"getExtension\");\r\n\t\tExportHTML instance = new ExportHTML();\r\n\t\tString expResult = \"html\";\r\n\t\tString result = instance.getExtension();\r\n\t\tassertEquals(expResult, result);\r\n\t}", "private HtmlExporter createHtmlTemplate( final HtmlExporter aExporter )\n {\n aExporter.addCssStyle( \"body { font-family: sans-serif; } \" );\n aExporter.addCssStyle( \"table { border-width: 1px; border-spacing: 0px; border-color: gray;\"\n + \" border-collapse: collapse; border-style: solid; margin-bottom: 15px; } \" );\n aExporter.addCssStyle( \"table th { border-width: 1px; padding: 2px; border-style: solid; border-color: gray;\"\n + \" background-color: #E0E0FF; text-align: center; font-weight: bold; font-family: sans-serif; } \" );\n aExporter.addCssStyle( \"table td { border-width: 1px; padding: 2px; border-style: solid; border-color: gray;\"\n + \" font-family: monospace; } \" );\n aExporter.addCssStyle( \".date { text-align: right; font-size: x-small; margin-bottom: 15px; } \" );\n aExporter.addCssStyle( \".w100 { width: 100%; } \" );\n aExporter.addCssStyle( \".w30 { width: 30%; } \" );\n aExporter.addCssStyle( \".w20 { width: 20%; } \" );\n aExporter.addCssStyle( \".w15 { width: 15%; } \" );\n aExporter.addCssStyle( \".w10 { width: 10%; } \" );\n\n final Element body = aExporter.getBody();\n body.addChild( H1 ).addContent( \"Asm45 Analysis results\" );\n body.addChild( HR );\n body.addChild( DIV ).addAttribute( \"class\", \"date\" ).addContent( \"{date-now}\" );\n\n Element table, tr, thead, tbody;\n\n table = body.addChild( TABLE ).addAttribute( \"class\", \"w100\" );\n tbody = table.addChild( TBODY );\n tr = tbody.addChild( TR );\n tr.addChild( TH ).addAttribute( \"colspan\", \"2\" ).addContent( \"Bus configuration\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"IDA0/..IDA15/\" );\n tr.addChild( TD ).addContent( \"0..15\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"BSC0/..BSC5/\" );\n tr.addChild( TD ).addContent( \"16..21\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"SMC/\" );\n tr.addChild( TD ).addContent( \"{smc-bus-config}\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"STM/\" );\n tr.addChild( TD ).addContent( \"{stm-bus-config}\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"EBG\" );\n tr.addChild( TD ).addContent( \"{ebg-bus-config}\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"BYTE\" );\n tr.addChild( TD ).addContent( \"{byte-bus-config}\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"BL\" );\n tr.addChild( TD ).addContent( \"{bl-bus-config}\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"WRT/\" );\n tr.addChild( TD ).addContent( \"{wrt-bus-config}\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"SYNC\" );\n tr.addChild( TD ).addContent( \"{sync-bus-config}\" );\n\n tbody = table.addChild( TBODY );\n tr = tbody.addChild( TR );\n tr.addChild( TH ).addAttribute( \"colspan\", \"2\" ).addContent( \"Statistics\" );\n tr = tbody.addChild( TR );\n tr.addChild( TD ).addAttribute( \"class\", \"w30\" ).addContent( \"Decoded words\" );\n tr.addChild( TD ).addContent( \"{decoded-words}\" );\n\n table = body.addChild( TABLE ).addAttribute( \"class\", \"w100\" );\n thead = table.addChild( THEAD );\n tr = thead.addChild( TR );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Index\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Clocks\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Block\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Address\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Value\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Bus Grant\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w10\" ).addContent( \"Type\" );\n tr.addChild( TH ).addAttribute( \"class\", \"w30\" ).addContent( \"Event\" );\n tbody = table.addChild( TBODY );\n tbody.addContent( \"{decoded-data}\" );\n\n return aExporter;\n }", "@Test\r\n\tpublic void testGetExtensionDescription() {\r\n\t\tSystem.out.println(\"getExtensionDescription\");\r\n\t\tExportHTML instance = new ExportHTML();\r\n\t\tString expResult = \"HTML Documents (*.html)\";\r\n\t\tString result = instance.getExtensionDescription();\r\n\t\tassertEquals(expResult, result);\r\n\t}", "public static void main(String[] args) {\n\t\tString data = \"\";\r\n ExportFactory exportFactory = new ExportHtmlFactory();\r\n ExportFile ef = exportFactory.factory(\"financial\");\r\n ef.export(data);\r\n\t}", "public void fnWriteToHtmlOutput(String strDescription, String strExpectedValue, String strObtainedValue, String strResult) {\r\n \tString sStep;\r\n \tif (Dictionary.containsKey(\"STEP\")){\r\n \t\tsStep = Dictionary.get(\"STEP\") + \"<NS>\" + strDescription + \"<ND>\" + strExpectedValue + \"<ND>\" + strObtainedValue + \"<ND>\" + strResult;\r\n \t\tDictionary.remove(\"STEP\");\r\n \t}else{\r\n \t\tsStep = strDescription + \"<ND>\" + strExpectedValue + \"<ND>\" + strObtainedValue + \"<ND>\" + strResult;\r\n \t}\r\n \t\t\r\n \tDictionary.put(\"STEP\", sStep);\r\n \t\r\n //Declaring Variables\r\n String snapshotFilePath,sRowColor;\r\n\r\n //Open the test case report for writing\r\n //Open the HTML file\r\n\t\t//Open the report file to write the report\r\n\t\ttry {\r\n\t\t\tfoutStrm = new FileOutputStream(g_strTestCaseReport, true);\r\n\r\n\t\t} catch (FileNotFoundException fe) {\r\n\t\t\tfe.printStackTrace();\r\n\t\t}\r\n \r\n //Increment the Operation Count\r\n g_OperationCount = g_OperationCount + 1;\r\n \r\n //Row Color\r\n if (g_OperationCount % 2 == 0)\r\n {\r\n sRowColor = \"#EEEEEE\";\r\n }\r\n else\r\n {\r\n sRowColor = \"#D3D3D3\";\r\n \r\n }\r\n \r\n //Check if the result is Pass or Fail\r\n if (strResult.toUpperCase().equals(\"PASS\")){ \r\n //Increment the Pass Count\r\n g_iPassCount++;\r\n //Increment the snapshot count\r\n g_iSnapshotCount++;\r\n //Get the Full path of the snapshot\r\n snapshotFilePath = g_strSnapshotFolderName + \"\\\\SS_\" + g_iSnapshotCount + \".png\";\r\n \r\n //Capture the Snapshot\r\n fTakeScreenshot(snapshotFilePath);\r\n \r\n //Write the result into the file\r\n //new PrintStream(foutStrm).println(\"<TR WIDTH=100%><TD BGCOLOR=\" + sRowColor + \" WIDTH=5% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2><B>\" + g_OperationCount + \"</B></FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=28%><FONT FACE=VERDANA SIZE=2>\" + strDescription + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strExpectedValue + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strObtainedValue + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=7% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2 COLOR=GREEN><B>\" + strResult + \"</B></FONT></TD></TR>\");\r\n new PrintStream(foutStrm).println(\"<TR WIDTH=100%><TD BGCOLOR=\" + sRowColor + \" WIDTH=5% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2 ><B>\" + g_OperationCount + \"</B></FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=28%><FONT FACE=VERDANA SIZE=2>\" + strDescription + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strExpectedValue +\" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strObtainedValue +\" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=7% ALIGN=CENTER><A HREF='\" + snapshotFilePath + \"'><FONT FACE=VERDANA SIZE=2 COLOR=GREEN><B>\" + strResult + \" </B></FONT></A></TD></TR>\");\r\n }\r\n else\r\n {\r\n if (strResult.toUpperCase().equals(\"FAIL\")){\r\n //Increment the SnapShot count\r\n g_iSnapshotCount++ ;\r\n\r\n //Increment the Fail Count\r\n g_iFailCount++;\r\n\r\n //Get the Full path of the snapshot\r\n snapshotFilePath = g_strSnapshotFolderName + \"\\\\SS_\" + g_iSnapshotCount + \".png\";\r\n\r\n //Capture the Snapshot\r\n fTakeScreenshot(snapshotFilePath);\r\n \r\n //Write the result into the file\r\n new PrintStream(foutStrm).println(\"<TR WIDTH=100%><TD BGCOLOR=\" + sRowColor + \" WIDTH=5% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2 ><B>\" + g_OperationCount + \"</B></FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=28%><FONT FACE=VERDANA SIZE=2>\" + strDescription + \" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strExpectedValue +\" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strObtainedValue +\" </FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=7% ALIGN=CENTER><A HREF='\" + snapshotFilePath + \"'><FONT FACE=VERDANA SIZE=2 COLOR=RED><B>\" + strResult + \" </B></FONT></A></TD></TR>\");\r\n \r\n }else if (strResult.toUpperCase().equals(\"DONE\")){ \r\n \tstrResult = \"Pass\";\r\n //Write Results into the file\r\n \tnew PrintStream(foutStrm).println(\"<TR WIDTH=100%><TD BGCOLOR=\" + sRowColor + \" WIDTH=5% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2><B>\" + g_OperationCount +\"</B></FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=28%><FONT FACE=VERDANA SIZE=2>\"+ strDescription +\"</FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\" + strExpectedValue + \"</FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=25%><FONT FACE=VERDANA SIZE=2>\"+ strObtainedValue +\"</FONT></TD><TD BGCOLOR=\" + sRowColor + \" WIDTH=7% ALIGN=CENTER><FONT FACE=VERDANA SIZE=2 COLOR=LimeGreen><B>\"+ strResult +\"</B></FONT></TD></TR>\");\r\n }\r\n \r\n }\r\n try\r\n {\t\t\t\r\n \t//Close File stream\r\n\t\t\tfoutStrm.close();\r\n\t\t\t\r\n\t\t} catch (IOException io) {\r\n\t\t\tio.printStackTrace();\r\n\t\t}\r\n }", "@Test\n\tpublic void html_test() {\n\t\tString text = \"\";\n\t\tassertEquals(\"<html></html>\", createHTML(text));\n\t}", "Downloadable export(ExportType exportType, String query, Pageable pageable);", "public void fnCreateHtmlReport(String strTestName) {\r\n\r\n //Set the default Operation count as 0\r\n g_OperationCount = 0;\r\n \r\n //Number of default Pass and Fail cases to 0\r\n g_iPassCount = 0;\r\n g_iFailCount = 0;\r\n \r\n //Snapshot count to start from 0\r\n g_iSnapshotCount = 0;\r\n \r\n //script name\r\n g_strScriptName = strTestName;\t\t\r\n\r\n //Set the name for the Test Case Report File\r\n g_strTestCaseReport = Environment.get(\"HTMLREPORTSPATH\") + \"\\\\Report_\" + g_strScriptName + \".html\";\r\n \r\n //Snap Shot folder\r\n g_strSnapshotFolderName = Environment.get(\"SNAPSHOTSFOLDER\") + \"\\\\\" + g_strScriptName;\r\n \r\n //Delete the Summary Folder if present\r\n\t\tFile file = new File(g_strSnapshotFolderName);\r\n\r\n\t\tif (file.exists()) {\r\n\t\t\tfile.delete();\r\n\t\t}\r\n\r\n\t\t//Make a new snapshot folder\r\n\t\tfile.mkdir();\r\n\r\n\t\t//Open the report file to write the report\r\n\r\n\t\ttry {\r\n\t\t\tfoutStrm = new FileOutputStream(g_strTestCaseReport);\r\n\t\t} catch (FileNotFoundException fe) {\r\n\t\t\tfe.printStackTrace();\r\n\t\t}\r\n\r\n\t\t//Write the Test Case name and allied headers into the file\r\n //Write the Test Case name and allied headers into the file\r\n\t\t//Close the html file\r\n\t\ttry \r\n\t\t{\t\t\r\n\t\t\tnew PrintStream(foutStrm).println(\"<HTML><BODY><TABLE BORDER=0 CELLPADDING=3 CELLSPACING=1 WIDTH=100% BGCOLOR=ORANGE>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TR><TD WIDTH=90% ALIGN=CENTER BGCOLOR=WHITE><FONT FACE=VERDANA COLOR=ORANGE SIZE=3><B>Tieto NetBank Automation</B></FONT></TD></TR><TR><TD ALIGN=CENTER BGCOLOR=ORANGE><FONT FACE=VERDANA COLOR=WHITE SIZE=3><B>Selenium Framework Reporting</B></FONT></TD></TR></TABLE><TABLE CELLPADDING=3 WIDTH=100%><TR height=30><TD WIDTH=100% ALIGN=CENTER BGCOLOR=WHITE><FONT FACE=VERDANA COLOR=//0073C5 SIZE=2><B>&nbsp; Automation Result : \" + new Date() + \" on Machine \" + InetAddress.getLocalHost().getHostName() + \" by user \" + System.getProperty(\"user.name\") + \" on Browser \" + driverType +\"</B></FONT></TD></TR><TR HEIGHT=5></TR></TABLE>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TABLE BORDER=0 BORDERCOLOR=WHITE CELLPADDING=3 CELLSPACING=1 WIDTH=100%>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TR><TD BGCOLOR=BLACK WIDTH=20%><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>Test Name:</B></FONT></TD><TD COLSPAN=6 BGCOLOR=BLACK><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>\" + g_strScriptName + \"</B></FONT></TD></TR>\");\r\n\t //new PrintStream(foutStrm).println(\"<TR><TD BGCOLOR=BLACK WIDTH=20%><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>Test Iteration:</B></FONT></TD><TD COLSPAN=6 BGCOLOR=BLACK><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B> </B></FONT></TD></TR>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"</TABLE><BR/><TABLE WIDTH=100% CELLPADDING=3>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TR WIDTH=100%><TH BGCOLOR=ORANGE WIDTH=5%><FONT FACE=VERDANA SIZE=2>Step No.</FONT></TH><TH BGCOLOR=ORANGE WIDTH=28%><FONT FACE=VERDANA SIZE=2>Step Description</FONT></TH><TH BGCOLOR=ORANGE WIDTH=25%><FONT FACE=VERDANA SIZE=2>Expected Value</FONT></TH><TH BGCOLOR=ORANGE WIDTH=25%><FONT FACE=VERDANA SIZE=2>Obtained Value</FONT></TH><TH BGCOLOR=ORANGE WIDTH=7%><FONT FACE=VERDANA SIZE=2>Result</FONT></TH></TR>\");\r\n\t\t\r\n\t\t\tfoutStrm.close();\r\n\t\t} catch (IOException io) \r\n\t\t{\r\n\t\t\tio.printStackTrace();\r\n\t\t}\r\n\t\t//Deference the file pointer\r\n\t\tfoutStrm = null;\r\n\r\n\t\t//Get the start time of the execution\r\n\t\tg_StartTime = new Date();\r\n\r\n\t}", "@Test(description = \"export interface with special characters\")\n public void exportWithSpecialCharacters()\n throws Exception\n {\n final DataCollection data = new DataCollection(this);\n final InterfaceData parent1 = data.getInterface(\"TestInerfaceParent \\\" 1\");\n final InterfaceData parent2 = data.getInterface(\"TestInerfaceParent \\\" 2\");\n final AttributeStringData attr1 = data.getAttributeString(\"Attribute \\\" 1\");\n final AttributeStringData attr2 = data.getAttributeString(\"Attribute \\\" 2\");\n final TypeData type1 = data.getType(\"TestType \\\" 1\");\n final TypeData type2 = data.getType(\"TestType \\\" 2\");\n final RelationshipData rel1 = data.getRelationship(\"TestRel \\\" 1\");\n final RelationshipData rel2 = data.getRelationship(\"TestRel \\\" 2\");\n final InterfaceData inter = data.getInterface(\"TestInterface \\\"\")\n .addParent(parent1)\n .addParent(parent2)\n .addAttribute(attr1)\n .addAttribute(attr2)\n .addType(type1)\n .addType(type2)\n .addRelationship(rel1)\n .addRelationship(rel2);\n data.create();\n\n inter.checkExport(inter.export());\n }", "void export(DataExportOptions options, Pageable pageable, OutputStream outputStream);", "@Test\n\tpublic void testHTML(){\n \tFile xml = new File(testData,\"html/htmlsidekick.html\");\n \t\n \tBuffer b = TestUtils.openFile(xml.getPath());\n\t\t\n \t// wait for end of parsing\n \tdoInBetween(new Runnable(){\n \t\t\tpublic void run(){\n \t\t\t\taction(\"sidekick-parse\",1);\n \t\t}}, \n \t\tmessageOfClassCondition(sidekick.SideKickUpdate.class),\n \t\t10000);\n\t\t\n \taction(\"sidekick-tree\");\n \tPause.pause(2000);\n\n \tHyperlinkSource src = HTMLHyperlinkSource.create();\n\t\tfinal Hyperlink h = src.getHyperlink(TestUtils.view().getBuffer(), 3319);\n\t\tassertNotNull(h);\n\t\tassertTrue(h instanceof jEditOpenFileHyperlink);\n\t\tassertEquals(67, h.getStartLine());\n\t\tassertEquals(67, h.getEndLine());\n\t\tGuiActionRunner.execute(new GuiTask() {\n\t\t\t\n\t\t\t@Override\n\t\t\tprotected void executeInEDT() throws Throwable {\n\t\t\t\th.click(TestUtils.view());\n\t\t\t}\n\t\t});\n\t\t\n\t\tassertEquals(\"jeditresource:/SideKick.jar!/index.html\",TestUtils.view().getBuffer().getPath());\n\t\t\n\t\tTestUtils.close(TestUtils.view(), TestUtils.view().getBuffer());\n\t\tTestUtils.close(TestUtils.view(), b);\n\t}", "protected String exportElements() {\n\t\treturn \"\";\n\t}", "@Test\n\tpublic void testBinaryOperationHtmlResponseFromProvider() throws Exception {\n\t\tHttpGet httpGet = new HttpGet(\"http://localhost:\" + ourPort + \"/Patient/html/$binaryOp\");\n\t\thttpGet.addHeader(\"Accept\", \"text/html\");\n\n\t\tCloseableHttpResponse status = ourClient.execute(httpGet);\n\t\tString responseContent = IOUtils.toString(status.getEntity().getContent(), Charsets.UTF_8);\n\t\tstatus.close();\n\t\tassertEquals(200, status.getStatusLine().getStatusCode());\n\t\tassertEquals(\"text/html\", status.getFirstHeader(\"content-type\").getValue());\n\t\tassertEquals(\"<html>DATA</html>\", responseContent);\n\t\tassertEquals(\"Attachment;\", status.getFirstHeader(\"Content-Disposition\").getValue());\n\t}", "@Test\n public void parserHtml() throws JSONException, IOException {\n }", "public interface ExportFile {\r\n\r\n void export();\r\n}", "private void startHtmlPage(PrintWriter out,ITestResult result)\r\n\t{\r\n\t\tout.println(\"<html>\");\r\n\t\tout.println(\"<head>\");\r\n\t\tout.println(\"<meta content=\\\"text/html; charset=UTF-8\\\" http-equiv=\\\"content-type\\\"/><meta content=\\\"cache-control\\\" http-equiv=\\\"no-cache\\\"/><meta content=\\\"pragma\\\" http-equiv=\\\"no-cache\\\"/>\");\r\n\t\tout.println(\"<style type=\\\"text/css\\\">\");\r\n\t\tout.println(\"body, table {\");\r\n\t\tout.println(\"font-family: Verdana, Arial, sans-serif;\");\r\n\t\tout.println(\"font-size: 12;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\"table {\");\r\n\t\tout.println(\"border-collapse: collapse;\");\r\n\t\tout.println(\"border: 1px solid #ccc;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\"th, td {\");\r\n\t\tout.println(\"padding-left: 0.3em;\");\r\n\t\tout.println(\"padding-right: 0.3em;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\"a {\");\r\n\t\tout.println(\"text-decoration: none;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\".title {\");\r\n\t\tout.println(\"font-style: italic;\");\r\n\t\tout.println(\"background-color: #B2ACAC;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\".selected {\");\r\n\t\tout.println(\"background-color: #ffffcc;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\".status_done {\");\r\n\t\tout.println(\"background-color: #eeffee;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t out.println(\".status_passed {\");\r\n\t out.println(\"background-color: #ccffcc;\");\r\n\t out.println(\"}\");\r\n\t\t\r\n\t out.println(\".status_failed {\");\r\n\t out.println(\"background-color: #ffcccc;\");\r\n\t out.println(\"}\");\r\n\t\t\r\n\t out.println(\".status_maybefailed {\");\r\n\t out.println(\"background-color: #ffffcc;\");\r\n\t out.println(\"}\");\r\n\t\t\r\n\t out.println(\".breakpoint {\");\r\n\t out.println(\"background-color: #cccccc;\");\r\n\t out.println(\"border: 1px solid black;\");\r\n\t out.println(\"}\");\r\n\t out.println(\"</style>\");\r\n\t out.println(\"<title>Test results</title>\");\r\n\t out.println(\"</head>\");\r\n\t out.println(\"<body>\");\r\n\t out.println(\"<h1>Test results </h1>\");\r\n\t out.println(\"<h2>Test Name: \"+className+\".\"+result.getName()+\"</h2>\");\r\n\t \r\n\t out.println(\"<table border=\\\"1\\\">\");\r\n\t out.println(\"<tbody>\");\r\n\t out.println(\"<tr>\");\r\n\t out.println(\"<td><b>Selenium-Command</b></td>\");\r\n\t out.println(\"<td><b>Parameter-1</b></td>\");\r\n\t\tout.println(\"<td><b>Parameter-2</b></td>\");\r\n\t\tout.println(\"<td><b>Status</b></td>\");\r\n\t\tout.println(\"<td><b>Screenshot</b></td>\");\r\n\t\tout.println(\"<td><b>Calling-Class with Linenumber</b></td>\");\r\n\t\tout.println(\"</tr>\");\r\n\t\t\r\n\t}", "@Test\n\tpublic void testUsingTempFolder2() throws IOException {\n\t\tFile createdFile1= temp.newFile(\"mytestfile.html\");\n\t\t\n\t\t// construct temp(test) html file\n\t\tString content = \"<title>This is title<title>\";\n\t\t\n\t\tPrintStream ps = new PrintStream(new FileOutputStream(createdFile1));\n\t\tps.println(content); \n\t\t// what I think it should be\n\t\tString res = null; \n\n\t\t// what actually it is\n\t\tString result = extractTitleModule.WebPageExtraction(createdFile1);\n\t\tassertEquals(res,result); \n\t}", "public interface ExportableText {\r\n String toTxt();\r\n}", "public byte[] runPdfExport() throws DocumentException, IOException, JRException, TalentStudioException {\n\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n\n if (isResultSetEmpty(jasperPrint.getPages())) {\n document = new Document(PageSize.A4);\n writer = PdfWriter.getInstance(document, outputStream);\n document.open();\n final Paragraph noResult = new Paragraph(getHeading(getMessage(\"no.results\")));\n noResult.setAlignment(Rectangle.ALIGN_CENTER);\n document.add(noResult);\n document.add(new Paragraph(\"\\n\"));\n\n } else {\n createDocument(jasperPrint.getPages());\n writer = PdfWriter.getInstance(document, outputStream);\n document.open();\n //below three lines force to be zoom at 100 and focus page 1\n document.newPage();\n PdfDestination destination = new PdfDestination(PdfDestination.XYZ, 0, -1, 1);\n writer.setOpenAction(PdfAction.gotoLocalPage(1, destination, writer));\n\n\n List<JRPrintPage> pages = jasperPrint.getPages();\n\n\n addPageHeader(document);\n\n for (JRPrintPage page : pages) {\n\n JRExporterGridCell[][] grid = getGrid(page);\n\n PdfPTable table = getTable(1);\n table.getDefaultCell().setBorder(Rectangle.BOX);\n int emptyRowCount = 0;\n for (int i = 0; i < grid.length; i++) {\n JRExporterGridCell[] jrExporterGridCells = grid[i];\n if (!isNullRow(jrExporterGridCells)) {\n\n\n int oddEvenNo = i - emptyRowCount;\n Color rowColor = null;\n if (oddEvenNo > 0) {\n\n if (oddEvenNo % 2 == 0) {\n rowColor = getDataBackgroundEvenColor();\n } else {\n rowColor = getDataBackgroundOddColor();\n }\n\n }\n\n PdfPTable subTable = getTable(jrExporterGridCells.length);\n subTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);\n subTable.getDefaultCell().setPadding(0);\n\n for (int j = 0; j < jrExporterGridCells.length; j++) {\n JRExporterGridCell jrExporterGridCell = jrExporterGridCells[j];\n\n final JRPrintElement jrPrintElement = jrExporterGridCell.getElement();\n\n\n if (jrPrintElement instanceof JRPrintText) {\n final JRPrintText element = (JRPrintText) jrExporterGridCell.getElement();\n\n String style = element.getStyle() != null ? element.getStyle().getName() : \"\";\n\n final String text = element.getText();\n\n if (TEMPLATE_HEADER.equalsIgnoreCase(style)) {\n final Paragraph paragraph = getHeading(text);\n final PdfPCell pCell = new PdfPCell(paragraph);\n pCell.setBackgroundColor(getHeaderBackgroundColor());\n subTable.addCell(pCell);\n } else if (TEMPLATE_GROUP.equalsIgnoreCase(style)) {\n if (StringUtils.hasText(text)) {\n Paragraph paragraph = getGroupHeading(text);\n PdfPCell groupHeader = new PdfPCell(paragraph);\n groupHeader.setColspan(jrExporterGridCells.length);\n groupHeader.setBackgroundColor(getHeaderGroupBackgroundColor());\n\n subTable.addCell(groupHeader);\n } else {\n //empty header\n final PdfPCell pCell = new PdfPCell();\n pCell.setBackgroundColor(rowColor);\n subTable.addCell(pCell);\n }\n\n } else {\n\n if (!isAddImageColumn(j, text, subTable, rowColor)) {\n final Paragraph paragraph = getText(text);\n final PdfPCell pdfPCell = new PdfPCell(paragraph);\n pdfPCell.setBackgroundColor(rowColor);\n subTable.addCell(pdfPCell);\n }\n }\n\n\n } else if (jrPrintElement instanceof JRTemplatePrintRectangle) {\n final PdfPCell pCell = new PdfPCell();\n pCell.setBackgroundColor(rowColor);\n subTable.addCell(pCell);\n\n } else if (jrPrintElement instanceof JRBasePrintElement) {\n\n } else {\n\n\n final PdfPCell pCell = new PdfPCell();\n pCell.setBackgroundColor(rowColor);\n subTable.addCell(pCell);\n }\n }\n\n table.getDefaultCell().setPadding(0);\n subTable.completeRow();\n\n clearEmptyRows(subTable);\n\n table.addCell(subTable);\n\n synchronizeTableMemory(table, i);\n\n } else {\n emptyRowCount++;\n }\n }\n document.add(table);\n }\n }\n document.close();\n\n return outputStream.toByteArray();\n }", "private void storeToHtmlFile( final File aSelectedFile, final Asm45DataSet aAnalysisResult )\n {\n try\n {\n toHtmlPage( aSelectedFile, aAnalysisResult );\n }\n catch ( final IOException exception )\n {\n // Make sure to handle IO-interrupted exceptions properly!\n if ( !HostUtils.handleInterruptedException( exception ) )\n {\n LOG.log( Level.WARNING, \"HTML export failed!\", exception );\n }\n }\n }", "@Test\n\tpublic void testUsingTempFolder1() throws IOException {\n\t\tFile createdFile= temp.newFile(\"mytestfile.html\");\n\t\t\n\t\t// construct temp(test) html file\n\t\tString content = \"<title>This is title</title>\";\n\t\t\n\t\tPrintStream ps = new PrintStream(new FileOutputStream(createdFile));\n\t\tps.println(content); \n\t\t// what I think it should be\n\t\tString res = \"This is title\"; \n\n\t\t// what actually it is\n\t\tString result = extractTitleModule.WebPageExtraction(createdFile);\n\t\tassertEquals(res,result); \n\t}", "@Test\r\n\tpublic void ExportOrdersInCsv() {\n\t\tdriver.findElement(By.id(\"username\")).sendKeys(\"user01\");\r\n\t\t\r\n\t\t//password\r\n\t\tdriver.findElement(By.id(\"login\")).sendKeys(\"guru99com\");\r\n\t\t\r\n\t\t//Login btn\r\n\t\tdriver.findElement(By.xpath(\"//*[@value='Login']\")).click();\r\n\t\t\r\n\t\t//close the Pop-Up\r\n\t\tdriver.findElement(By.xpath(\"//*[@title='close']\")).click();\r\n\t\t\r\n\t\tWebElement wb=driver.findElement(By.xpath(\"//span[text()='Sales']\"));\r\n\t\t\r\n\t\tActions act=new Actions(driver);\r\n\t\tact.moveToElement(wb).perform();\r\n\t\t\r\n\t\t//click on submenu link\r\n\t\tdriver.findElement(By.xpath(\"//span[text()='Orders']\")).click();\r\n\t\t\r\n\t\t/*FirefoxProfile profile=new FirefoxProfile();\r\n\t\tprofile.setPreference(\"browser.download.folderList\", 0);\r\n\t\tprofile.setPreference(\"browser.helperApps.neverAsk.saveToDisk\",\"text/csv\");*/\r\n\t\t\r\n\t\t//click on 'EXPORT' btn\r\n\t\tdriver.findElement(By.xpath(\"//*[@title='Export']\")).click();\r\n\t\t\r\n\t\t\r\n\t}", "public void testHtml() {\r\n\r\n Map<String, String> parameters = new HashMap<String, String>();\r\n parameters.put(\"type\", \"html\");\r\n ConnectionParameters cp = new ConnectionParameters(new MockConnectionEl(parameters,\r\n \"mailto:scriptella@gmail.com?subject=Hello\"), MockDriverContext.INSTANCE);\r\n MailConnection mc = new MailConnection(cp) {\r\n @Override\r\n protected void send(MimeMessage message) {\r\n try {\r\n assertEquals(\"scriptella@gmail.com\", message.getRecipients(Message.RecipientType.TO)[0].toString());\r\n assertEquals(\"Hello\", message.getSubject());\r\n assertEquals(\"Message. *example*\",\r\n ((MimeMultipart)message.getContent()).getBodyPart(0).getContent());\r\n } catch (Exception e) {\r\n throw new IllegalStateException(e);\r\n }\r\n\r\n }\r\n };\r\n mc.executeScript(new StringResource(\"Message. $example\"), MockParametersCallbacks.SIMPLE);\r\n }", "@Test\n \tpublic void testTableThenHR() throws IOException{\n \t\tString testString = \"Tau | MAPT | MCF7,BT20\\nVASP | VASP | MCF7,BT20\\nXIAP | XIAP | MCF7,BT20\\n--------------------------------\\n## Additional Data Details\";\n \t\tString actualResult = processor.markdown2Html(testString, false);\n \t\tassertTrue(actualResult.contains(\"<hr\"));\n \t\tassertFalse(actualResult.contains(\"<del\"));\n \t}", "public void fnCloseHtmlReport() {\r\n\r\n\t\t//Declaring variables\r\n\r\n\t\tString strTestCaseResult = null;\r\n\r\n\t\t//Open the report file to write the report\r\n\t\ttry {\r\n\t\t\tfoutStrm = new FileOutputStream(g_strTestCaseReport, true);\r\n\r\n\t\t} catch (FileNotFoundException fe) {\r\n\t\t\tfe.printStackTrace();\r\n\t\t}\r\n\r\n\t\t//Get the current time\r\n\t\tg_EndTime = new Date();\r\n\t\t\r\n\t\t//Fetch the time difference\r\n\t\tString strTimeDifference = fnTimeDiffference(g_StartTime.getTime(),g_EndTime.getTime());\r\n\t\t\r\n\t\t//Close the html file\r\n\t\ttry {\t\t\r\n\t //Write the number of test steps passed/failed and the time which the test case took to run\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TR></TR><TR><TD BGCOLOR=BLACK WIDTH=5%></TD><TD BGCOLOR=BLACK WIDTH=28%><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>Time Taken : \"+ strTimeDifference + \"</B></FONT></TD><TD BGCOLOR=BLACK WIDTH=25%><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>Pass Count : \" + g_iPassCount + \"</B></FONT></TD><TD BGCOLOR=BLACK WIDTH=25%><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>Fail Count : \" + g_iFailCount + \"</b></FONT></TD><TD BGCOLOR=Black WIDTH=7%></TD></TR>\");\r\n\t //Close the HTML tags\r\n\t\t\tnew PrintStream(foutStrm).println(\"</TABLE><TABLE WIDTH=100%><TR><TD ALIGN=RIGHT><FONT FACE=VERDANA COLOR=ORANGE SIZE=1>&copy; Tieto NetBank Automation - Integrated Customer Management</FONT></TD></TR></TABLE></BODY></HTML>\");\r\n\t\t\t//Close File stream\r\n\t\t\tfoutStrm.close();\r\n\t\t\t\r\n\t\t} catch (IOException io) {\r\n\t\t\tio.printStackTrace();\r\n\t\t}\r\n\r\n\t\t//Deference the file pointer\r\n\t\tfoutStrm = null;\r\n\r\n\t\t//Check if test case passed or failed\r\n\r\n\t\tif (g_iFailCount != 0) {\r\n\t\t\tstrTestCaseResult = \"Fail\";\r\n\t\t} else \r\n\t\t{\r\n\t\t\tstrTestCaseResult = \"Pass\";\r\n\t\t}\r\n\t\t\r\n //fnCloseHtmlReport = strTestCaseResult\r\n \r\n //Write into the Summary Report\r\n fnWriteTestSummary (\"Report_\"+ Dictionary.get(\"TEST_NAME\") + \"-\" + Dictionary.get(\"ACTION\"),strTestCaseResult,strTimeDifference);\r\n\t\t\r\n\t}", "@Test\n public void testGetContent_2() {\n System.out.println(\"getContent\");\n MockServletResponse instance = new MockServletResponse();\n\n try (HtmlElement html = HtmlElement.niceOf(instance)) {\n html.getBody().addHeading(\"ABC:ČÁŠ\", \"cssType\");\n }\n String result = instance.toString();\n String expected = String.join(\"\\n\"\n , \"<!DOCTYPE html>\"\n , \"<html lang=\\\"en\\\">\"\n , \"\\t<head>\"\n , \"\\t\\t<meta charset=\\\"UTF-8\\\"/>\"\n , \"\\t\\t<title>Demo</title>\"\n , \"\\t</head>\"\n , \"\\t<body>\"\n , \"\\t\\t<h1 class=\\\"cssType\\\">ABC:ČÁŠ</h1>\"\n , \"\\t</body>\"\n , \"</html>\");\n assertEquals(expected, result);\n\n }", "HTML createHTML();", "protected GuiTestObject html_main() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"html_main\"));\n\t}", "@Override\r\npublic void onTestSuccess(ITestResult arg0) {\n\tExtentReports er = new ExtentReports(\"./Report/Report.html\");\r\n\tExtentTest t1 = er.startTest(\"TC001\");\r\n\tt1.log(LogStatus.PASS, \"Passed\");\r\n\tSystem.out.println(\"balle\");\r\n\ter.endTest(t1);\r\n\ter.flush();\r\n\ter.close();\r\n\r\n\t}", "public void fnWriteTestSummary(String strTestCaseName, String strResult, String strDuration){\r\n \tString sColor,sRowColor;\r\n \r\n //Close the file\r\n try{ \r\n\t //Open the test case report for writing \r\n\t foutStrm = new FileOutputStream(Environment.get(\"HTMLREPORTSPATH\")+ \"\\\\SummaryReport.html\", true);\r\n\t \r\n\t //Check color result\r\n\t if (strResult.toUpperCase().equals(\"PASSED\") || strResult.toUpperCase().equals(\"PASS\")){\r\n\t sColor = \"GREEN\";\r\n\t g_iTCPassed ++;\r\n\t }\r\n\t else if (strResult.toUpperCase().equals(\"FAILED\") || strResult.toUpperCase().equals(\"FAIL\")){\r\n\t \tsColor = \"RED\";\r\n\t }\r\n\t else{\r\n\t \tsColor = \"ORANGE\";\r\n\t }\r\n\t\r\n\t g_iTestCaseNo++;\r\n\t\r\n\t if (g_iTestCaseNo % 2 == 0){sRowColor = \"#EEEEEE\";}\r\n\t else{sRowColor = \"#D3D3D3\";}\r\n\t \r\n\t //Write the result of Individual Test Case\r\n\t new PrintStream(foutStrm).println (\"<TR COLS=3 BGCOLOR=\" + sRowColor + \"><TD WIDTH=10%><FONT FACE=VERDANA SIZE=2>\" + g_iTestCaseNo + \"</FONT></TD><TD WIDTH=60%><FONT FACE=VERDANA SIZE=2>\" + strTestCaseName + \"</FONT></TD><TD WIDTH=15%><A HREF='\" + strTestCaseName + \".html'><FONT FACE=VERDANA SIZE=2 COLOR=\" + sColor + \"><B>\" + strResult + \"</B></FONT></A></TD><TD WIDTH=15%><FONT FACE=VERDANA SIZE=2>\" + strDuration+ \"</FONT></TD></TR>\");\r\n \r\n \tfoutStrm.close();\r\n }\r\n catch (IOException io) \r\n\t\t{\r\n\t\t\tio.printStackTrace();\r\n\t\t}\r\n foutStrm = null;\r\n\r\n }", "@Test(description = \"export interface with two types\")\n public void exportWithTwoTypes()\n throws Exception\n {\n final DataCollection data = new DataCollection(this);\n final TypeData type1 = data.getType(\"TestType1\");\n final TypeData type2 = data.getType(\"TestType2\");\n final InterfaceData inter = data.getInterface(\"TestInterface\")\n .addType(type1)\n .addType(type2);\n data.create();\n\n inter.checkExport(inter.export());\n }", "@Test\r\n public void test()\r\n {\r\n Assert.assertEquals(\"<table>\\n\" +\r\n \"<tr>\\n\" +\r\n \"\\t<th></th>\\n\" +\r\n \"\\t<th>Sunny</th>\\n\" +\r\n \"\\t<th>Rainy</th>\\n\" +\r\n \"</tr>\\n\" +\r\n \"<tr>\\n\" +\r\n \"\\t<td>week1</td>\\n\" +\r\n \"\\t<td>5</td>\\n\" +\r\n \"\\t<td>2</td>\\n\" +\r\n \"</tr>\\n\" +\r\n \"<tr>\\n\" +\r\n \"\\t<td>week2</td>\\n\" +\r\n \"\\t<td>3</td>\\n\" +\r\n \"\\t<td>4</td>\\n\" +\r\n \"</tr>\\n\" +\r\n \"</table>\", new HtmlReportPrinter().print(report));\r\n }", "@Test\r\n\tpublic void shouldVerifyXMLExport() throws IOException, JAXBException, URISyntaxException {\n\t\tCriterion criterion = criterionService.getCriterionByClassFieldAndStringValue(Settings.class, \"name\",\r\n\t\t\t\t\"Intersections test\");\r\n\r\n\t\tList<Settings> settList = DAO.findAllWithRestrictions(Settings.class, criterion);\r\n\r\n\t\tassertEquals(1, settList.size());\r\n\r\n\t\tSettings setting = settList.get(0);\r\n\r\n\t\tList<SettingsConversion> conversionLines = setting.getConversion();\r\n\t\tassertThat(conversionLines.size()).isGreaterThan(0);\r\n\r\n\t\tSat sat = XMLExporter.exportSettingsConversionPresentationToSF5Format(conversionLines);\r\n\r\n\t\t// http://www.concretepage.com/spring/spring-jaxb-integration-annotation-pretty-print-example-with-jaxb2marshaller\r\n\t\t// try (FileOutputStream fos = new\r\n\t\t// FileOutputStream(\"sf5Jnitoutput.xml\");) {\r\n\t\t// springMarshaller.marshal(sat, new StreamResult(fos));\r\n\t\t// }\r\n\r\n\t\tStringWriter sw = new StringWriter();\r\n\r\n\t\tURL responseFile = ClassLoader.getSystemResource(\"xml/sf5Jnitoutput.xml\");\r\n\t\tassertThat(responseFile).isNotNull();\r\n\r\n\t\tURI uri = responseFile.toURI();\r\n\t\tassertThat(uri).isNotNull();\r\n\r\n\t\tString content = new String(Files.readAllBytes(Paths.get(uri)), Charset.forName(\"UTF-8\"));\r\n\r\n\t\tSat retrievedSat = (Sat) springMarshaller.unmarshal(new StringSource(content));\r\n\t\t// trying to compare resolved Sats.\r\n\t\tassertEquals(retrievedSat, sat);\r\n\r\n\t\t// assertThat(retrievedSat).isEqualTo(sat);\r\n\r\n\t\t// assertThat(retrievedSat.equals(sat)).isTrue();\r\n\r\n\t\t// content = content.replace(\"\\r\\n\\r\\n\", \"\\r\\n\"); // it adds\r\n\t\t// // superfluous\r\n\t\t// // \\r\\n\r\n\t\t//\r\n\t\t// // marshalling sat\r\n\t\t// springMarshaller.marshal(sat, new StreamResult(sw));\r\n\t\t//\r\n\t\t// assertEquals(content, sw.toString());\r\n\r\n\t}", "String exportTo(CopybookExport exporter, String xmlCopybook);", "public String generateHtmlReport() {\n try {\n LogManager.suitLogger.info(\"Generating HTML report...\");\n writer = createWriter();\n writer.println(new String(api.core.htmlreport()));\n writer.flush();\n writer.close();\n Thread.sleep(2000);\n return new File(Config.getReportsLocation() + File.separator + \"penetration-test-report.html\").getAbsolutePath();\n } catch (Exception e) {\n LogManager.suitLogger.error(\"Failed to generate penetration test html report. \", e);\n }\n return null;\n }", "public void createDeatilsPage(String deatils, ITestResult r) {\n\n\t\tPrintWriter writer = null;\n\t\ttry {\n\t\t\twriter = createHTMLWriter(folderToSave + \"\\\\support\", r.getName() + \"_\" + r.getStartMillis() + \".html\");\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"unable to create \" + r.getName() + \"_\" + r.getEndMillis());\n\t\t\treturn;\n\t\t}\n\t\twriter.println(\n\t\t\t\t\"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\\\">\");\n\t\twriter.println(\"<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\">\");\n\t\twriter.println(\n\t\t\t\t\"<head><style>.class-green{background-color:green;} .class-blue{background-color:blue;}</style><script> \"\n\t\t\t\t\t\t+ \"function goBack() \" + \"{ \" + \"window.history.back() } </script></head> \");\n\t\twriter.println(\"<body><table border=\\\"1\\\" CELLPADDING=\\\"1\\\" CELLSPACING=\\\"1\\\">\");\n\t\twriter.println(\"<thead><tr><th COLSPAN=\\\"2\\\"><h4>Execution Steps for \" + r.getName() + \"</h4></th></tr>\"\n\t\t\t\t+ \"<tr><th>Step No</th> <th>Action Details</th></tr>\" + \"</thead>\");\n\t\twriter.println(deatils);\t\t\n\t\twriter.println(\"</tbody></table> \");\n\t\tif (r.getAttribute(\"LOGSRC\") != null) {\n\t\t\twriter.println(\n\t\t\t\t\t\"</br><br/><a href='\" + r.getName() + \"_\" + r.getStartMillis() + \".png'>Reference Screen</a>\");\n\t\t}\n\t\t// writer.println(\"</br><br/><input type=\\\"button\\\" value=\\\"Back To Test\n\t\t// Cases\\\" onclick=\\\"goBack()\\\"/> </body>\");\n\t\twriter.println(\"</body>\");\n\t\twriter.println(\"</html>\");\n\t\twriter.flush();\n\t\twriter.close();\n\t}", "public interface ExportFileApi {\n public boolean export(String data);\n}", "private String getExpectedHTMLTextOutput(OutputFormat format) throws InvalidDDMSException {\r\n\t\tUtil.requireHTMLText(format);\r\n\t\tStringBuffer text = new StringBuffer();\r\n\t\ttext.append(buildHTMLTextOutput(format, \"verticalExtent.unitOfMeasure\", String.valueOf(TEST_UOM)));\r\n\t\ttext.append(buildHTMLTextOutput(format, \"verticalExtent.datum\", String.valueOf(TEST_DATUM)));\r\n\t\ttext.append(buildHTMLTextOutput(format, \"verticalExtent.minimum\", String.valueOf(TEST_MIN)));\r\n\t\ttext.append(buildHTMLTextOutput(format, \"verticalExtent.maximum\", String.valueOf(TEST_MAX)));\r\n\t\treturn (text.toString());\r\n\t}", "@Test\r\n\tpublic void extendReports() throws IOException {\n\t\tString File = \"./Reports/report.html\";\r\n\t\tExtentHtmlReporter html = new ExtentHtmlReporter(File);\r\n\t\thtml.setAppendExisting(true);\r\n\t\t//to write on the created html file\r\n\t\tExtentReports extents = new ExtentReports();\r\n\t\textents.attachReporter(html);\r\n\t\t\r\n\t\tExtentTest createAccountTest = extents.createTest(\"TC001\", \"CreateAccount\");\r\n\t\tcreateAccountTest.pass(\"username entered\", MediaEntityBuilder.createScreenCaptureFromPath(\"./../snaps/img1.png\").build());\r\n\t\textents.flush();\r\n\t\t\r\n\r\n\t}", "@Override\n protected void assertRendering(String source, String expectedHtml, String optionsSet) {\n DataHolder options = optionsSet == null ? null : getOptions(example(), optionsSet);\n String parseSource = expectedHtml;\n\n if (options != null && options.get(NO_FILE_EOL)) {\n parseSource = DumpSpecReader.trimTrailingEOL(parseSource);\n }\n\n Node node = parser().withOptions(options).parse(parseSource);\n String renderedResult = renderer().withOptions(options).render(node);\n String expectedResult = source;\n\n actualSource(renderedResult, optionsSet);\n\n boolean useActualHtml = useActualHtml();\n\n // include source for better assertion errors\n String expected;\n String actual;\n if (example() != null && example().getSection() != null) {\n StringBuilder outExpected = new StringBuilder();\n DumpSpecReader.addSpecExample(outExpected, expectedResult, expectedHtml, \"\", optionsSet, true, example().getSection(), example().getExampleNumber());\n expected = outExpected.toString();\n\n StringBuilder outActual = new StringBuilder();\n DumpSpecReader.addSpecExample(outActual, useActualHtml ? renderedResult : expectedResult, expectedHtml, \"\", optionsSet, true, example().getSection(), example().getExampleNumber());\n actual = outActual.toString();\n } else {\n expected = DumpSpecReader.addSpecExample(expectedResult, expectedHtml, \"\", optionsSet);\n actual = DumpSpecReader.addSpecExample(useActualHtml ? renderedResult : expectedResult, expectedHtml, \"\", optionsSet);\n }\n\n specExample(expected, actual, optionsSet);\n if (options != null && options.get(FAIL)) {\n thrown.expect(ComparisonFailure.class);\n }\n assertEquals(expected, actual);\n }", "public void testExport() throws Exception {\n\t\tBundle tb = getContext().installBundle(\n\t\t\t\tgetWebServer() + \"classpath.tb2.jar\");\n\t\ttry {\n\t\t\ttry {\n\t\t\t\ttb.start();\n\t\t\t}\n\t\t\tcatch (BundleException be) {\n\t\t\t\tif (tb.getState() == Bundle.INSTALLED)\n\t\t\t\t\tfail(\"Export failed!\", be);\n\t\t\t\telse\n\t\t\t\t\tfail(\"BundleException thrown, Error!\", be);\n\t\t\t}\n\t\t}\n\t\tfinally {\n\t\t\ttb.uninstall();\n\t\t}\n\t}", "@Test\n\tpublic void testBinaryReadHtmlResponseFromProvider() throws Exception {\n\t\tHttpGet httpGet = new HttpGet(\"http://localhost:\" + ourPort + \"/Binary/html\");\n\t\thttpGet.addHeader(\"Accept\", \"text/html\");\n\n\t\tCloseableHttpResponse status = ourClient.execute(httpGet);\n\t\tString responseContent = IOUtils.toString(status.getEntity().getContent(), Charsets.UTF_8);\n\t\tstatus.close();\n\t\tassertEquals(200, status.getStatusLine().getStatusCode());\n\t\tassertEquals(\"text/html\", status.getFirstHeader(\"content-type\").getValue());\n\t\tassertEquals(\"<html>DATA</html>\", responseContent);\n\t\tassertEquals(\"Attachment;\", status.getFirstHeader(\"Content-Disposition\").getValue());\n\t}", "private void outputPageData(Webpage webpage, CSVPrinter html, CSVPrinter html5) {\n try {\n synchronized (html) {\n //Information for the global file\n ArrayList<String> pageInfo = new ArrayList<String>();\n pageInfo.add(webpage.getWARCname());\n pageInfo.add(webpage.getURI().toString());\n if(webpage.getOriginalURI() == null)\n pageInfo.add(\"N.D.\");\n else\n pageInfo.add(webpage.getOriginalURI().toString());\n pageInfo.add(\"\" + webpage.getNumHTMLelem());\n pageInfo.add(webpage.getDoctype());\n pageInfo.add(\"\" + webpage.getNumLinks());\n pageInfo.add(\"\" + webpage.getNumLinksInt());\n pageInfo.add(\"\" + webpage.getNumLinksBook());\n pageInfo.add(\"\" + webpage.getNumLinksExt());\n pageInfo.add(\"\" + webpage.getNumImages());\n pageInfo.add(\"\" + webpage.getNumComments());\n pageInfo.add(\"\" + webpage.getFileSize());\n pageInfo.add(\"\" + webpage.getSizeText());\n pageInfo.add(\"\" + webpage.getSizeElements());\n pageInfo.add(\"\" + webpage.getSizeComments());\n pageInfo.add(\"\" + webpage.getTextToElementsRatio());\n pageInfo.add(\"\" + webpage.getElementsToSizeRatio());\n pageInfo.add(\"\" + webpage.getTextToSizeRatio());\n pageInfo.add(\"\" + webpage.getCommentsToSizeRatio());\n pageInfo.add(\"\" + webpage.getNumErrors());\n pageInfo.add(\"\" + webpage.getNumWarnings());\n pageInfo.add(webpage.getResourceType());\n pageInfo.add(webpage.getHTTPCode());\n pageInfo.add(webpage.getContentType());\n pageInfo.add(webpage.getServer());\n pageInfo.add(webpage.getCharset());\n\n html.printRecord(pageInfo);\n html.flush();\n\n //If an HTML5 document, output to its specific file as well\n String doctype = webpage.getDoctype().toLowerCase();\n\n if (doctype.contains(\"<!doctype html>\")) {\n synchronized (html5) {\n html5.printRecord(pageInfo);\n html5.flush();\n }\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "DataFrameExport export();", "public void exportMedia(){\r\n \r\n }", "public void run(Hashtable<String, Object> hashTable) throws java.lang.Exception {\r\n\tVCDocument documentToExport = (VCDocument)hashTable.get(\"documentToExport\");\r\n\tFile exportFile = fetch(hashTable,EXPORT_FILE,File.class, true);\r\n\tExtensionFilter fileFilter = fetch(hashTable,FILE_FILTER,ExtensionFilter.class, true);\r\n\t\r\n\tDocumentManager documentManager = fetch(hashTable,DocumentManager.IDENT,DocumentManager.class,true);\r\n\tString resultString = null;\r\n\tFileCloseHelper closeThis = null;\r\n\ttry{\r\n\t\tif (documentToExport instanceof BioModel) {\r\n\t\t\tif(!(fileFilter instanceof SelectorExtensionFilter)){\r\n\t\t\t\tthrow new Exception(\"Expecting fileFilter type \"+SelectorExtensionFilter.class.getName()+\" but got \"+fileFilter.getClass().getName());\r\n\t\t\t}\r\n\t\t\tBioModel bioModel = (BioModel)documentToExport;\r\n\t\t\tSimulationContext chosenSimContext = fetch(hashTable,SIM_CONTEXT,SimulationContext.class, false);\r\n\t\t\t((SelectorExtensionFilter)fileFilter).writeBioModel(documentManager, bioModel, exportFile, chosenSimContext); \r\n\t/*\t\tDELETE this after finishing validation testing\r\n\t\t\t\r\n\t\t\t// check format requested\r\n\t\t\tif (fileFilter.getDescription().equals(FileFilters.FILE_FILTER_MATLABV6.getDescription())){\r\n\t\t\t\t// matlab from application; get application\r\n\t\t\r\n\t\t\t\tSimulationContext chosenSimContext = fetch(hashTable,SIM_CONTEXT,SimulationContext.class, true);\r\n\t\t\t\t// regenerate a fresh MathDescription\r\n\t\t\t\tMathMapping mathMapping = chosenSimContext.createNewMathMapping();\r\n\t\t\t\tMathDescription mathDesc = mathMapping.getMathDescription();\r\n\t\t\t\tif(mathDesc != null && !mathDesc.isSpatial() && !mathDesc.isNonSpatialStoch()){\r\n\t\t\t\t\t// do export\r\n\t\t\t\t\tresultString = exportMatlab(exportFile, fileFilter, mathDesc);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Exception(\"Matlab export failed: NOT an non-spatial deterministic application!\");\r\n\t\t\t\t}\r\n\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_PDF)) { \r\n\t\t\t\tFileOutputStream fos = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(exportFile);\r\n\t\t\t\t\tdocumentManager.generatePDF(bioModel, fos);\t\t\t\t\r\n\t\t\t\t} finally {\r\n\t\t\t\t\tif(fos != null) {\r\n\t\t\t\t\t\tfos.close();\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn; \t\t\t\t\t\t\t\t\t//will take care of writing to the file as well.\r\n\t\t\t}\r\n\t\t\t//Export a simulation to Smoldyn input file, if there are parameter scans\r\n\t\t\t//in simulation, we'll export multiple Smoldyn input files.\r\n\t\t\telse if (fileFilter.equals(FileFilters.FILE_FILTER_SMOLDYN_INPUT)) \r\n\t\t\t{ \r\n\t\t\t\tSimulation selectedSim = (Simulation)hashTable.get(\"selectedSimulation\");\r\n\t\t\t\tif (selectedSim != null) {\r\n\t\t\t\t\tint scanCount = selectedSim.getScanCount();\r\n\t\t\t\t\tif(scanCount > 1) // has parameter scan\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString baseExportFileName = exportFile.getPath().substring(0, exportFile.getPath().indexOf(\".\"));\r\n\t\t\t\t\t\tfor(int i=0; i<scanCount; i++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSimulationTask simTask = new SimulationTask(new SimulationJob(selectedSim, i, null),0);\r\n\t\t\t\t\t\t\t// Need to export each parameter scan into a separate file\r\n\t\t\t\t\t\t\tString newExportFileName = baseExportFileName + \"_\" + i + SMOLDYN_INPUT_FILE_EXTENSION;\r\n\t\t\t\t\t\t\texportFile = new File(newExportFileName);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tPrintWriter pw = new PrintWriter(exportFile);\r\n\t\t\t\t\t\t\tSmoldynFileWriter smf = new SmoldynFileWriter(pw, true, null, simTask, false);\r\n\t\t\t\t\t\t\tsmf.write();\r\n\t\t\t\t\t\t\tpw.close();\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scanCount == 1)// regular simulation, no parameter scan\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSimulationTask simTask = new SimulationTask(new SimulationJob(selectedSim, 0, null),0);\r\n\t\t\t\t\t\t// export the simulation to the selected file\r\n\t\t\t\t\t\tPrintWriter pw = new PrintWriter(exportFile);\r\n\t\t\t\t\t\tSmoldynFileWriter smf = new SmoldynFileWriter(pw, true, null, simTask, false);\r\n\t\t\t\t\t\tsmf.write();\r\n\t\t\t\t\t\tpw.close();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthrow new Exception(\"Simulation scan count is smaller than 1.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t// convert it if other format\r\n\t\t\t\tif (!fileFilter.equals(FileFilters.FILE_FILTER_VCML)) {\r\n\t\t\t\t\t// SBML or CellML; get application name\r\n\t\t\t\t\tif ((fileFilter.equals(FileFilters.FILE_FILTER_SBML_12)) || (fileFilter.equals(FileFilters.FILE_FILTER_SBML_21)) || \r\n\t\t\t\t\t\t(fileFilter.equals(FileFilters.FILE_FILTER_SBML_22)) || (fileFilter.equals(FileFilters.FILE_FILTER_SBML_23)) || \r\n\t\t\t\t\t\t(fileFilter.equals(FileFilters.FILE_FILTER_SBML_24)) || (fileFilter.equals(FileFilters.FILE_FILTER_SBML_31_CORE)) || \r\n\t\t\t\t\t\t(fileFilter.equals(FileFilters.FILE_FILTER_SBML_31_SPATIAL)) ) {\r\n\t\t\t\t\t\tSimulationContext selectedSimContext = (SimulationContext)hashTable.get(\"selectedSimContext\");\r\n\t\t\t\t\t\tSimulation selectedSim = (Simulation)hashTable.get(\"selectedSimulation\");\r\n\t\t\t\t\t\tint sbmlLevel = 0;\r\n\t\t\t\t\t\tint sbmlVersion = 0;\r\n\t\t\t\t\t\tint sbmlPkgVersion = 0;\r\n\t\t\t\t\t\tboolean bIsSpatial = false;\r\n\t\t\t\t\t\tif ((fileFilter.equals(FileFilters.FILE_FILTER_SBML_12))) {\r\n\t\t\t\t\t\t\tsbmlLevel = 1;\r\n\t\t\t\t\t\t\tsbmlVersion = 2;\r\n\t\t\t\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_SBML_21)) {\r\n\t\t\t\t\t\t\tsbmlLevel = 2;\r\n\t\t\t\t\t\t\tsbmlVersion = 1;\r\n\t\t\t\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_SBML_22)) {\r\n\t\t\t\t\t\t\tsbmlLevel = 2;\r\n\t\t\t\t\t\t\tsbmlVersion = 2;\r\n\t\t\t\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_SBML_23)) {\r\n\t\t\t\t\t\t\tsbmlLevel = 2;\r\n\t\t\t\t\t\t\tsbmlVersion = 3;\r\n\t\t\t\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_SBML_24)) {\r\n\t\t\t\t\t\t\tsbmlLevel = 2;\r\n\t\t\t\t\t\t\tsbmlVersion = 4;\r\n\t\t\t\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_SBML_31_CORE)) {\r\n\t\t\t\t\t\t\tsbmlLevel = 3;\r\n\t\t\t\t\t\t\tsbmlVersion = 1;\r\n\t\t\t\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_SBML_31_SPATIAL)) {\r\n\t\t\t\t\t\t\tsbmlLevel = 3;\r\n\t\t\t\t\t\t\tsbmlVersion = 1;\r\n\t\t\t\t\t\t\tsbmlPkgVersion = 1;\r\n\t\t\t\t\t\t\tbIsSpatial = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (selectedSim == null) {\r\n\t\t\t\t\t\t\tresultString = XmlHelper.exportSBML(bioModel, sbmlLevel, sbmlVersion, sbmlPkgVersion, bIsSpatial, selectedSimContext, null);\r\n\t\t\t\t\t\t\tXmlUtil.writeXMLStringToFile(resultString, exportFile.getAbsolutePath(), true);\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfor (int sc = 0; sc < selectedSim.getScanCount(); sc++) {\r\n\t\t\t\t\t\t\t\tSimulationJob simJob = new SimulationJob(selectedSim, sc, null);\r\n\t\t\t\t\t\t\t\tresultString = XmlHelper.exportSBML(bioModel, sbmlLevel, sbmlVersion, sbmlPkgVersion, bIsSpatial, selectedSimContext, simJob);\r\n\t\t\t\t\t\t\t\t// Need to export each parameter scan into a separate file \r\n\t\t\t\t\t\t\t\tString newExportFileName = exportFile.getPath().substring(0, exportFile.getPath().indexOf(\".xml\")) + \"_\" + sc + \".xml\";\r\n\t\t\t\t\t\t\t\texportFile.renameTo(new File(newExportFileName));\r\n\t\t\t\t\t\t\t\tXmlUtil.writeXMLStringToFile(resultString, exportFile.getAbsolutePath(), true);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_BNGL)) {\r\n\t\t\t\t\t\tRbmModelContainer rbmModelContainer = bioModel.getModel().getRbmModelContainer();\r\n\t\t\t\t\t\tStringWriter bnglStringWriter = new StringWriter();\r\n\t\t\t\t\t\tPrintWriter pw = new PrintWriter(bnglStringWriter);\r\n\t\t\t\t\t\tRbmNetworkGenerator.writeBngl(bioModel, pw);\r\n\t\t\t\t\t\tresultString = bnglStringWriter.toString();\r\n\t\t\t\t\t\tpw.close();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_NFSIM)) {\r\n\t\t\t\t\t\t// TODO: get the first thing we find for now, in the future we'll need to modify ChooseFile \r\n\t\t\t\t\t\t// to only offer the applications / simulations with bngl content\r\n\t\t\t\t\t\tSimulationContext simContexts[] = bioModel.getSimulationContexts();\r\n\t\t\t\t\t\tSimulationContext aSimulationContext = simContexts[0];\r\n\t\t\t\t\t\tSimulation selectedSim = aSimulationContext.getSimulations(0);\r\n\t\t\t\t\t\t//Simulation selectedSim = (Simulation)hashTable.get(\"selectedSimulation\");\r\n\t\t\t\t\t\tSimulationTask simTask = new SimulationTask(new SimulationJob(selectedSim, 0, null),0);\r\n\t\t\t\t\t\tlong randomSeed = 0;\t// a fixed seed will allow us to run reproducible simulations\r\n\t\t\t\t\t\t//long randomSeed = System.currentTimeMillis();\r\n\t\t\t\t\t\tNFsimSimulationOptions nfsimSimulationOptions = new NFsimSimulationOptions();\r\n\t\t\t\t\t\t// we get the data we need from the math description\r\n\t\t\t\t\t\tElement root = NFsimXMLWriter.writeNFsimXML(simTask, randomSeed, nfsimSimulationOptions);\r\n\t\t\t\t\t\tDocument doc = new Document();\r\n\t\t\t\t\t\tdoc.setRootElement(root);\r\n\t\t\t\t\t\tXMLOutputter xmlOut = new XMLOutputter();\r\n\t\t\t\t\t\tresultString = xmlOut.outputString(doc);\r\n\t\r\n\t\t\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_CELLML)) {\r\n\t\t\t\t\t\tInteger chosenSimContextIndex = (Integer)hashTable.get(\"chosenSimContextIndex\");\r\n\t\t\t\t\t\tString applicationName = bioModel.getSimulationContext(chosenSimContextIndex.intValue()).getName();\r\n\t\t\t\t\t\tresultString = XmlHelper.exportCellML(bioModel, applicationName);\r\n\t\t\t\t\t\t// cellml still uses default character encoding for now ... maybe UTF-8 in the future\r\n\t\t\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_OMEX)) {\r\n\t\t\t\t\t\t// export the entire biomodel to a SEDML file (for now, only non-spatial,non-stochastic applns)\r\n\t\t\t\t\t\tint sedmlLevel = 1;\r\n\t\t\t\t\t\tint sedmlVersion = 1;\r\n\t\t\t\t\t\tString sPath = FileUtils.getFullPathNoEndSeparator(exportFile.getAbsolutePath());\r\n\t\t\t\t\t\tString sFile = FileUtils.getBaseName(exportFile.getAbsolutePath());\r\n\t\t\t\t\t\tString sExt = FileUtils.getExtension(exportFile.getAbsolutePath());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tSEDMLExporter sedmlExporter = null;\r\n\t\t\t\t\t\tif (bioModel instanceof BioModel) {\r\n\t\t\t\t\t\t\tsedmlExporter = new SEDMLExporter(bioModel, sedmlLevel, sedmlVersion);\r\n\t\t\t\t\t\t\tresultString = sedmlExporter.getSEDMLFile(sPath);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tthrow new RuntimeException(\"unsupported Document Type \" + bioModel.getClass().getName() + \" for SedML export\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(sExt.equals(\"sedx\")) {\r\n\t\t\t\t\t\t\tsedmlExporter.createManifest(sPath, sFile);\r\n\t\t\t\t\t\t\tString sedmlFileName = sPath + FileUtils.WINDOWS_SEPARATOR + sFile + \".sedml\";\r\n\t\t\t\t\t\t\tXmlUtil.writeXMLStringToFile(resultString, sedmlFileName, true);\r\n\t\t\t\t\t\t\tsedmlExporter.addSedmlFileToList(sFile + \".sedml\");\r\n\t\t\t\t\t\t\tsedmlExporter.addSedmlFileToList(\"manifest.xml\");\r\n\t\t\t\t\t\t\tsedmlExporter.createZipArchive(sPath, sFile);\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tXmlUtil.writeXMLStringToFile(resultString, exportFile.getAbsolutePath(), true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// if format is VCML, get it from biomodel.\r\n\t\t\t\t\tbioModel.getVCMetaData().cleanupMetadata();\r\n\t\t\t\t\tresultString = XmlHelper.bioModelToXML(bioModel);\r\n\t\t\t\t\tXmlUtil.writeXMLStringToFile(resultString, exportFile.getAbsolutePath(), true);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}*/\r\n\t\t} else if (documentToExport instanceof MathModel) {\r\n\t\t\tMathModel mathModel = (MathModel)documentToExport;\r\n\t\t\t// check format requested\r\n\t\t\tif (fileFilter.equals(FileFilters.FILE_FILTER_MATLABV6)){\r\n\t\t\t\t//check if it's ODE\r\n\t\t\t\tif(mathModel.getMathDescription() != null && \r\n\t\t\t\t (!mathModel.getMathDescription().isSpatial() && !mathModel.getMathDescription().isNonSpatialStoch())){\r\n\t\t\t\t\tMathDescription mathDesc = mathModel.getMathDescription();\r\n\t\t\t\t\tresultString = exportMatlab(exportFile, fileFilter, mathDesc,mathModel.getOutputFunctionContext());\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Exception(\"Matlab export failed: NOT an non-spatial deterministic model.\");\r\n\t\t\t\t}\r\n\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_PDF)) { \r\n\t\t\t\tFileOutputStream fos = new FileOutputStream(exportFile);\r\n\t\t\t\tdocumentManager.generatePDF(mathModel, fos);\r\n\t\t\t\tfos.close();\r\n\t\t\t\treturn; //will take care of writing to the file as well.\r\n\t\t\t}else if (fileFilter.equals(FileFilters.FILE_FILTER_VCML)) {\r\n\t\t\t\tresultString = XmlHelper.mathModelToXML(mathModel);\r\n\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_CELLML)) {\r\n\t\t\t\tresultString = XmlHelper.exportCellML(mathModel, null);\r\n//\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_SBML_23)) {\r\n//\t\t\t\tresultString = XmlHelper.exportSBML(mathModel, 2, 3, 0, false, null, null);\r\n//\t\t\t} else if (fileFilter.equals(FileFilters.FILE_FILTER_SBML_24)) {\r\n//\t\t\t\tresultString = XmlHelper.exportSBML(mathModel, 2, 4, 0, false, null, null);\r\n\t\t\t} \r\n\t\t\t//Export a simulation to Smoldyn input file, if there are parameter scans\r\n\t\t\t//in simulation, we'll export multiple Smoldyn input files.\r\n\t\t\telse if (fileFilter.equals(FileFilters.FILE_FILTER_SMOLDYN_INPUT)) \r\n\t\t\t{ \r\n\t\t\t\tSimulation selectedSim = (Simulation)hashTable.get(\"selectedSimulation\");\r\n\t\t\t\tif (selectedSim != null) {\r\n\t\t\t\t\tint scanCount = selectedSim.getScanCount();\r\n\t\t\t\t\t//-----\r\n\t\t\t\t\tString baseExportFileName = (scanCount==1?null:exportFile.getPath().substring(0, exportFile.getPath().indexOf(\".\")));\r\n\t\t\t\t\tfor(int i=0; i<scanCount; i++){\r\n\t\t\t\t\t\tSimulationTask simTask = new SimulationTask(new SimulationJob(selectedSim, i, null),0);\r\n\t\t\t\t\t\t// Need to export each parameter scan into a separate file\r\n\t\t\t\t\t\tFile localExportFile = (scanCount==1?exportFile:new File(baseExportFileName + \"_\" + i + SMOLDYN_INPUT_FILE_EXTENSION));\r\n\t\t\t\t\t\tFileCloseHelper localCloseThis = new FileCloseHelper(localExportFile);\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tSmoldynFileWriter smf = new SmoldynFileWriter(localCloseThis.getPrintWriter(), true, null, simTask, false);\r\n\t\t\t\t\t\t\tsmf.write();\r\n\t\t\t\t\t\t}finally{\r\n\t\t\t\t\t\t\tif(localCloseThis != null){\r\n\t\t\t\t\t\t\t\tlocalCloseThis.close();\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\treturn;\r\n\t\t\t}\r\n\t\t} else if (documentToExport instanceof Geometry){\r\n\t\t\tGeometry geom = (Geometry)documentToExport;\r\n\t\t\tif (fileFilter.equals(FileFilters.FILE_FILTER_PDF)) {\r\n\t\t\t\tdocumentManager.generatePDF(geom, (closeThis = new FileCloseHelper(exportFile)).getFileOutputStream());\r\n\t\t\t}else if (fileFilter.equals(FileFilters.FILE_FILTER_VCML)) {\r\n\t\t\t\tresultString = XmlHelper.geometryToXML(geom);\r\n\t\t\t}else if (fileFilter.equals(FileFilters.FILE_FILTER_AVS)) {\r\n\t\t\t\tcbit.vcell.export.AVS_UCD_Exporter.writeUCDGeometryOnly(geom.getGeometrySurfaceDescription(),(closeThis = new FileCloseHelper(exportFile)).getFileWriter());\r\n\t\t\t}else if (fileFilter.equals(FileFilters.FILE_FILTER_STL)) {\r\n\t\t\t\t//make sure filename end with .stl\r\n\t\t\t\tFile stlFile = exportFile;\r\n\t\t\t\tif(!exportFile.getName().toLowerCase().endsWith(\".stl\")){\r\n\t\t\t\t\tstlFile = new File(exportFile.getParentFile(),exportFile.getName()+\".stl\");\r\n\t\t\t\t}\r\n\t\t\t\tcbit.vcell.geometry.surface.StlExporter.writeBinaryStl(geom.getGeometrySurfaceDescription(),(closeThis = new FileCloseHelper(stlFile)).getRandomAccessFile(\"rw\"));\r\n\t\t\t}else if (fileFilter.equals(FileFilters.FILE_FILTER_PLY)) {\r\n\t\t\t\twriteStanfordPolygon(geom.getGeometrySurfaceDescription(), (closeThis = new FileCloseHelper(exportFile)).getFileWriter());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(resultString != null){\r\n\t\t\t(closeThis = new FileCloseHelper(exportFile)).getFileWriter().write(resultString);\r\n\t\t}\r\n\t}finally{\r\n\t\tif(closeThis != null){\r\n\t\t\tcloseThis.close();\r\n\t\t}\r\n\t}\r\n}", "@Test\n public void testGetPathHtml() {\n System.out.println(\"getPathHtml\");\n CharterDto instance = new CharterDto(\"Test name\");\n instance.setPathHtml(\"www.relytest.uy\");\n String expResult = \"www.relytest.uy\";\n String result = instance.getPathHtml();\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 }", "String renderHTML();", "@Ignore\n @Test\n public void renderTemplate() {\n\n Content html = views.html.index.render(\"Your new application is ready.\");\n assertThat(html.contentType(), is(\"text/html\"));\n assertThat(contentAsString(html), containsString(\"Your new application is ready.\"));\n }", "@Test\r\n\tvoid testExportRecordsShouldExportAFile() {\r\n\t\tRecordParser parser = new RecordParser();\r\n\t\tFile temp;\r\n\t\ttry {\r\n\t\t\ttemp = File.createTempFile(\"temp\", \"tmp\");\r\n\t\t\tFileWriter writer = new FileWriter(temp);\r\n\t\t\twriter.write(\"Costley, Dukie, Male, Green, 1947-07-13\\n\"\r\n\t\t\t\t\t+ \"Bettley | Abbe | Female | Purple | 1930-01-01\\n\"\r\n\t\t\t\t\t+ \"Kindall Rici Female Aquamarine 2004-01-14\\n\");\r\n\t\t\twriter.flush();\r\n\t\t\twriter.close();\r\n\t\t\ttemp.deleteOnExit();\r\n\t\t\tassertTrue(parser.importRecords(temp));\r\n\t\t\tassertEquals(3, parser.getPeople().size());\r\n\t\t\tassertEquals(\"Costley Dukie male Green 7/13/1947 \", parser.getPeople().get(0).getDetails());\r\n\t\t\tFile file = new File(\"test.txt\");\r\n\t\t\tString fileName = parser.exportRecords(\"test.txt\");\r\n\t\t\tassertEquals(\"test.txt\", fileName);\r\n\t\t\tassertTrue(file.delete());\r\n\t\t} catch (FileNotFoundException fnfe) {\r\n\t\t\tfnfe.printStackTrace();\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tioe.printStackTrace();\r\n\t\t}\r\n\t}", "void export(UtilityDataExportQuery query) throws ApplicationException;", "public interface ReportExporter {\n\n /**\n * @param jasperPrint printable report object to export as associated format\n * @param file the destination file to export\n */\n void exportToFile(JasperPrint jasperPrint, File file) throws JRException;\n}", "public void tester() {\n FileResource fr = new FileResource();\n CSVParser parser = fr.getCSVParser();\n //listExporters(parser, \"coffee\");\n //System.out.println(countryInfo(parser, \"Nauru\"));\n //listExportersTwoProducts(parser, \"cotton\",\"flowers\");\n //System.out.println(numberOfExporters(parser, \"cocoa\"));\n bigExporters(parser, \"$999,999,999,999\");\n }", "public boolean saveHTMLInFile()\n {\n String filePath = formatFilePath();\n return saveHTMLInFile(filePath);\n }", "private void Html_footer_Summary(int total, int pass, int fail, int skipp, long timetoexecute) {\n\n\t\thtmlWriter.println(\"<br/><a href='../test-output/index.html'>TestNG default Report</a>\");\n\t\thtmlWriter.flush();\n\t}", "@Override\r\n\tpublic void exportThis()\r\n\t{\n\t\tsuper.exportThis();\r\n\t}", "private static List<InOut> getHtmlTestCases() {\n final List<InOut> testCases = new ArrayList<>();\n // <p> tag is allowed\n addTestCase(testCases, \"<p>test</p>\");\n // <h7> tag is not allowed\n addTestCase(testCases, \"<h7>test</h7>\", \"test\");\n // href's are allowed to http, https, mailto and ANET objects, but nofollow is added\n addTestCase(testCases, \"<a href=\\\"http://www.example.com/\\\">test</a>\",\n \"<a href=\\\"http://www.example.com/\\\" rel=\\\"nofollow\\\">test</a>\");\n addTestCase(testCases, \"<a href=\\\"https://www.example.com/\\\">test</a>\",\n \"<a href=\\\"https://www.example.com/\\\" rel=\\\"nofollow\\\">test</a>\");\n addTestCase(testCases, \"<a href=\\\"mailto:nobody@example.com/\\\">test</a>\",\n \"<a href=\\\"mailto:nobody&#64;example.com/\\\" rel=\\\"nofollow\\\">test</a>\");\n addTestCase(testCases,\n \"<a href=\\\"urn:anet:people:00000000-0000-0000-0000-000000000000\\\">test</a>\",\n \"<a href=\\\"urn:anet:people:00000000-0000-0000-0000-000000000000\\\" rel=\\\"nofollow\\\">test</a>\");\n // href's to ftp and data are not allowed\n addTestCase(testCases, \"<a href=\\\"ftp://ftp.example.com/\\\">test</a>\", \"test\");\n addTestCase(testCases, \"<a href=\\\"data:MMM\\\">test</a>\", \"test\");\n // but title is\n addTestCase(testCases, \"<a href=\\\"data:MMM\\\" title=\\\"test\\\">test</a>\",\n \"<a title=\\\"test\\\">test</a>\");\n // in-line <img> is allowed\n addTestCase(testCases, \"<img src=\\\"data:image/jpeg;base64;MMM\\\" />\");\n // <img> reference is not allowed\n addTestCase(testCases, \"<img src=\\\"http://www.wexample.com/logo.gif\\\" />\", \"\");\n // allowed <img> attributes\n addTestCase(testCases,\n \"<img title=\\\"test\\\" align=\\\"top\\\" alt=\\\"test\\\" border=\\\"0\\\" name=\\\"test\\\" height=\\\"1\\\" width=\\\"1\\\" hspace=\\\"0\\\" vspace=\\\"0\\\" />\");\n // disallowed <img> attributes\n addTestCase(testCases, \"<img crossorigin=\\\"anonymous\\\" />\", \"\");\n addTestCase(testCases, \"<img onload=\\\"test();\\\" />\", \"\");\n // <script> tag is disallowed\n addTestCase(testCases, \"<script type=\\\"text/javascript\\\">alert(\\\"Hello World!\\\");</script>\",\n \"\");\n return testCases;\n }", "private boolean exportResult(){\n System.out.println(\"Writing to \" + \"out_\" + inputFile);\n return true;\n }", "@Test(groups = { \"wso2.esb\" },priority = 39, description = \"Feedly {exportOPML} integration test.\")\n public void testExportOPML() throws Exception {\n\n String jsonRequestFilePath = pathToRequestsDirectory + \"feedly_exportOPML.txt\";\n String methodName = \"feedly_exportOPML\";\n\n final String jsonString = ConnectorIntegrationUtil.getFileContent(jsonRequestFilePath);\n String newJsonString = String.format(jsonString,\n feedlyConnectorProperties.getProperty(\"accessToken\"));\n\n final String proxyFilePath = \"file:///\" + pathToProxiesDirectory + methodName + \".xml\";\n proxyAdmin.addProxyService(new DataHandler(new URL(proxyFilePath)));\n\n try {\n int response = ConnectorIntegrationUtil.sendRequestToRetriveHeaders(getProxyServiceURL(methodName),newJsonString);\n\n Assert.assertTrue(response == 200);\n } finally {\n proxyAdmin.deleteProxy(methodName);\n }\n }", "public void onExportMeeting() {\n ExportOutputHandler handler = inputExport.getValue();\n\n if (handler == null) {\n AlertHelper.showError(LanguageKey.ERROR_HANDLER_NULL, null);\n return;\n }\n\n String path = null;\n\n if (handler instanceof FileExportOutputHandler) {\n FileExportOutputHandler fileExportOutputHandler = (FileExportOutputHandler) handler;\n\n String initialDirectory = getInitialDirectory();\n File file = FileChooserHelper.showExportDialog(initialDirectory,\n fileExportOutputHandler.getFileExtension(), this);\n\n if (file == null) {\n // Happens on user cancel\n return;\n }\n\n path = file.getAbsolutePath();\n }\n\n boolean result = controller.export(handler, path);\n\n if (result) {\n return;\n }\n\n AlertHelper.showError(LanguageKey.ERROR_EXPORT, null);\n }", "public void foreachResultCreateHTML(ParameterHelper _aParam)\n {\n // TODO: auslagern in eine function, die ein Interface annimmt.\n String sInputPath = _aParam.getInputPath();\n File aInputPath = new File(sInputPath);\n// if (!aInputPath.exists())\n// {\n// GlobalLogWriter.println(\"Error, InputPath or File in InputPath doesn't exists. Please check: '\" + sInputPath + \"'\");\n// assure(\"Error, InputPath or File in InputPath doesn't exists. Please check: '\" + sInputPath + \"'\", false);\n// }\n\n // call for a single ini file\n if (sInputPath.toLowerCase().endsWith(\".ini\") )\n {\n callEntry(sInputPath, _aParam);\n }\n else\n {\n // check if there exists an ini file\n String sPath = FileHelper.getPath(sInputPath); \n String sBasename = FileHelper.getBasename(sInputPath);\n\n runThroughEveryReportInIndex(sPath, sBasename, _aParam);\n \n // Create a HTML page which shows locally to all files in .odb\n if (sInputPath.toLowerCase().endsWith(\".odb\"))\n {\n String sIndexFile = FileHelper.appendPath(sPath, \"index.ini\");\n File aIndexFile = new File(sIndexFile);\n if (aIndexFile.exists())\n { \n IniFile aIniFile = new IniFile(sIndexFile);\n\n if (aIniFile.hasSection(sBasename))\n {\n // special case for odb files\n int nFileCount = aIniFile.getIntValue(sBasename, \"reportcount\", 0);\n ArrayList<String> aList = new ArrayList<String>();\n for (int i=0;i<nFileCount;i++)\n {\n String sValue = aIniFile.getValue(sBasename, \"report\" + i);\n\n String sPSorPDFName = getPSorPDFNameFromIniFile(aIniFile, sValue);\n if (sPSorPDFName.length() > 0)\n {\n aList.add(sPSorPDFName);\n }\n }\n if (aList.size() > 0)\n {\n // HTML output for the odb file, shows only all other documents.\n HTMLResult aOutputter = new HTMLResult(sPath, sBasename + \".ps.html\" );\n aOutputter.header(\"content of DB file: \" + sBasename);\n aOutputter.indexSection(sBasename);\n \n for (int i=0;i<aList.size();i++)\n {\n String sPSFile = aList.get(i);\n\n // Read information out of the ini files\n String sIndexFile2 = FileHelper.appendPath(sPath, sPSFile + \".ini\");\n IniFile aIniFile2 = new IniFile(sIndexFile2);\n String sStatusRunThrough = aIniFile2.getValue(\"global\", \"state\");\n String sStatusMessage = \"\"; // aIniFile2.getValue(\"global\", \"info\");\n aIniFile2.close();\n\n\n String sHTMLFile = sPSFile + \".html\";\n aOutputter.indexLine(sHTMLFile, sPSFile, sStatusRunThrough, sStatusMessage);\n }\n aOutputter.close();\n\n// String sHTMLFile = FileHelper.appendPath(sPath, sBasename + \".ps.html\");\n// try\n// {\n//\n// FileOutputStream out2 = new FileOutputStream(sHTMLFile);\n// PrintStream out = new PrintStream(out2);\n//\n// out.println(\"<HTML>\");\n// out.println(\"<BODY>\");\n// for (int i=0;i<aList.size();i++)\n// {\n// // <A href=\"link\">blah</A>\n// String sPSFile = (String)aList.get(i);\n// out.print(\"<A href=\\\"\");\n// out.print(sPSFile + \".html\");\n// out.print(\"\\\">\");\n// out.print(sPSFile);\n// out.println(\"</A>\");\n// out.println(\"<BR>\");\n// }\n// out.println(\"</BODY></HTML>\");\n// out.close();\n// out2.close();\n// }\n// catch (java.io.IOException e)\n// {\n// \n// }\n }\n }\n aIniFile.close();\n }\n\n }\n }\n }", "@Override\n protected String[] getExportTitles() {\n return null;\n }", "@Override\n protected String[] getExportTitles() {\n return null;\n }", "@Override\n protected String[] getExportTitles() {\n return null;\n }", "@Test\n\t@Override\n\tpublic void testSaveURLXml() throws Exception {\n\t}", "public void exportXML() throws Exception{\n\t\t \n\t\t try {\n\n\t // create DOMSource for source XML document\n\t\t Source xmlSource = new DOMSource(convertStringToDocument(iet.editorPane.getText()));\n\t\t \n\t\t JFileChooser c = new JFileChooser();\n\t\t\t\t\n\t\t\t\tint rVal = c.showSaveDialog(null);\n\t\t\t\tString name = c.getSelectedFile().getAbsolutePath() + \".xml\";\n\t \n\t File f = new File(name);\n\t \n\t if (rVal == JFileChooser.APPROVE_OPTION) {\n\n\t\t // create StreamResult for transformation result\n\t\t Result result = new StreamResult(new FileOutputStream(f));\n\n\t\t // create TransformerFactory\n\t\t TransformerFactory transformerFactory = TransformerFactory.newInstance();\n\n\t\t // create Transformer for transformation\n\t\t Transformer transformer = transformerFactory.newTransformer();\n\t\t transformer.setOutputProperty(\"indent\", \"yes\");\n\n\t\t // transform and deliver content to client\n\t\t transformer.transform(xmlSource, result);\n\t\t \n\t\t }\n\t\t }\n\t\t // handle exception creating TransformerFactory\n\t\t catch (TransformerFactoryConfigurationError factoryError) {\n\t\t System.err.println(\"Error creating \" + \"TransformerFactory\");\n\t\t factoryError.printStackTrace();\n\t\t } // end catch 1\n\t\t \t catch (TransformerException transformerError) {\n\t\t System.err.println(\"Error transforming document\");\n\t\t transformerError.printStackTrace();\n\t\t } //end catch 2 \n\t\t \t catch (IOException ioException) {\n\t\t ioException.printStackTrace();\n\t\t } // end catch 3\n\t\t \n\t }", "public void testRenderMyPage() {\n tester.startPage(HomePage.class);\r\n\r\n // assert rendered page class\r\n tester.assertRenderedPage(HomePage.class);\r\n\r\n // assert rendered label component\r\n tester.assertLabel(\"message\", \"Congratulations!\");\r\n }", "public void exportAllLists(){\n }", "boolean isNoExport();", "public static void main(String[] args) {\n\t\tDocument pdfDocument = new Document(\"input.pdf\");\n\t\tString outHtmlFile = \"resultant.html\";\n\t\t// Create HtmlSaveOption with tested feature\n\t\tHtmlSaveOptions saveOptions = new HtmlSaveOptions();\n\t\tsaveOptions.setFixedLayout(true);\n\t\t// save images in PNG format instead of SVG\n\t\tsaveOptions.RasterImagesSavingMode = HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground;\n\t\t// save output as HTML\n\t\tpdfDocument.save(outHtmlFile, saveOptions);\n\t}", "@Test\n\tpublic void testHTMLAsXML(){\n \tFile xml = new File(testData,\"html/htmlsidekick.html\");\n \t\n \tBuffer b = TestUtils.openFile(xml.getPath());\n\t\t\n \t// wait for end of parsing\n \tdoInBetween(new Runnable(){\n \t\t\tpublic void run(){\n \t\t\t\taction(\"sidekick.parser.xml-switch\",1);\n \t\t}}, \n \t\tmessageOfClassCondition(sidekick.SideKickUpdate.class),\n \t\t10000);\n\t\t\n \taction(\"sidekick-tree\");\n \tPause.pause(2000);\n\n \tHyperlinkSource src = HTMLHyperlinkSource.create();\n\t\tfinal Hyperlink h = src.getHyperlink(TestUtils.view().getBuffer(), 3319);\n\t\tassertNotNull(h);\n\t\tassertTrue(h instanceof jEditOpenFileHyperlink);\n\t\tassertEquals(67, h.getStartLine());\n\t\tassertEquals(67, h.getEndLine());\n\t\tGuiActionRunner.execute(new GuiTask() {\n\t\t\t\n\t\t\t@Override\n\t\t\tprotected void executeInEDT() throws Throwable {\n\t\t\t\th.click(TestUtils.view());\n\t\t\t}\n\t\t});\n\t\t\n\t\tassertEquals(\"jeditresource:/SideKick.jar!/index.html\",TestUtils.view().getBuffer().getPath());\n\t\t\n\t\tTestUtils.close(TestUtils.view(), TestUtils.view().getBuffer());\n\t\tTestUtils.close(TestUtils.view(), b);\n\t}", "@Override\r\n\tprotected String getExportFileTitle() {\n\t\treturn null;\r\n\t}", "void onActionFromExport() {\n\t\ttry {\n\t\t\tHSSFWorkbook document = new HSSFWorkbook();\n\t\t\tHSSFSheet sheet = ReportUtil.createSheet(document);\n\n\t\t\tsheet.setMargin((short) 0, 0.5);\n\t\t\tReportUtil.setColumnWidths(sheet, 0, 0.5, 1, 0.5, 2, 2, 3, 2, 3, 2, 4, 3, 5, 2, 6, 2, 7, 2, 8, 3, 9, 3, 10,\n\t\t\t\t\t3, 11, 2, 12, 2);\n\n\t\t\tMap<String, HSSFCellStyle> styles = ReportUtil.createStyles(document);\n\n\t\t\tint sheetNumber = 0;\n\t\t\tint rowIndex = 1;\n\t\t\tint colIndex = 1;\n\t\t\tLong index = 1L;\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2, messages.get(\"empList\"), styles.get(\"title\"), 5);\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, ++rowIndex, 1,\n\t\t\t\t\tmessages.get(\"date\") + \": \" + format.format(new Date()), styles.get(\"plain-left-wrap\"), 5);\n\t\t\trowIndex += 2;\n\n\t\t\t/* column headers */\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 1, messages.get(\"number-label\"),\n\t\t\t\t\tstyles.get(\"header-wrap\"));\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2, messages.get(\"firstname-label\"),\n\t\t\t\t\tstyles.get(\"header-wrap\"));\n\n\t\t\tif (lastname) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"lastname-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (origin1) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"persuasion-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (register) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"register-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (status) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"status-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (gender) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"gender-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (occ) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"occupation-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (birthday) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"birthDate-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (phoneNo) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"phoneNo-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (email) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"email-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (org) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"organization-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (appointment) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"appointment-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (militaryDegree) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, \"Цэргийн цол\", styles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (militaryDegreeStatus) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, \"Цолны статус\",\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (militaryDegreeDate) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, \"Цол авсан огноо\",\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (TotalWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"TotalOrgWorkedYear-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (StateWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"stateWorkedYear-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (CourtWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i,\n\t\t\t\t\t\tmessages.get(\"courtOrgTotalWorkedYear-label\"), styles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (CourtMilitaryWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i,\n\t\t\t\t\t\tmessages.get(\"CourtMilitaryWorkedYear-label\"), styles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (CourtSimpleWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i,\n\t\t\t\t\t\tmessages.get(\"CourtSimpleWorkedYear-label\"), styles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (familyCount) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"familyCount-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (childCount) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"childCount-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tReportUtil.setRowHeight(sheet, rowIndex, 3);\n\n\t\t\trowIndex++;\n\t\t\tif (listEmployee != null)\n\t\t\t\tfor (Employee empDTO : listEmployee) {\n\n\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\tlistEmployee.indexOf(empDTO) + 1 + \"\", styles.get(\"plain-left-wrap-border\"));\n\n\t\t\t\t\tif (lastname) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getLastname() != null) ? empDTO.getLastname() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++, empDTO.getFirstName(),\n\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t\n\t\t\t\t\tif (origin1) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getOrigin().getName() != null) ? empDTO.getOrigin().getName() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (register) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getRegisterNo() != null) ? empDTO.getRegisterNo() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (status) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getEmployeeStatus() != null) ? empDTO.getEmployeeStatus().name() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (gender) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\tmessages.get((empDTO.getGender() != null) ? empDTO.getGender().toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (occ) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getOccupation() != null) ? empDTO.getOccupation().getName() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (birthday) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getBirthDate() != null) ? format.format(empDTO.getBirthDate()) : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (phoneNo) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getPhoneNo() != null) ? empDTO.getPhoneNo() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (email) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.geteMail() != null) ? empDTO.geteMail() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (org) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getOrganization() != null) ? empDTO.getOrganization().getName() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (appointment) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getAppointment() != null) ? empDTO.getAppointment().getAppointmentName() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (militaryDegree) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((dao.getEmployeeMilitary(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? dao.getEmployeeMilitary(empDTO.getId()).getMilitary().getMilitaryName() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (militaryDegreeStatus) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((dao.getEmployeeMilitary(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? dao.getEmployeeMilitary(empDTO.getId()).getDegreeStatus().name() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (militaryDegreeDate) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((dao.getEmployeeMilitary(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? format.format(dao.getEmployeeMilitary(empDTO.getId()).getOlgosonOgnoo())\n\t\t\t\t\t\t\t\t\t\t: \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (TotalWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getTotalOrgWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getTotalOrgWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t\tif (StateWorkedYear) {\n\t\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t\t((getStateWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t\t? getStateWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (CourtWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getCourtOrgTotalWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getCourtOrgTotalWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (CourtMilitaryWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getCourtMilitaryWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getCourtMilitaryWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (CourtSimpleWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getCourtSimpleWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getCourtSimpleWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (familyCount) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex,\n\t\t\t\t\t\t\t\tcolIndex++, ((getFamilyCountExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getFamilyCountExport(empDTO.getId()) : \"0\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (childCount) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex,\n\t\t\t\t\t\t\t\tcolIndex++, ((getChildCountExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getChildCountExport(empDTO.getId()) : \"0\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tReportUtil.setRowHeight(sheet, rowIndex, 3);\n\t\t\t\t\trowIndex++;\n\t\t\t\t\tindex++;\n\t\t\t\t\tcolIndex = 1;\n\n\t\t\t\t}\n\n\t\t\trowIndex += 2;\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 1,\n\t\t\t\t\t\"ТАЙЛАН ГАРГАСАН: \" + \"..................................... / \"\n\t\t\t\t\t\t\t+ loginState.getEmployee().getLastname().charAt(0) + \".\"\n\t\t\t\t\t\t\t+ loginState.getEmployee().getFirstName() + \" /\",\n\t\t\t\t\tstyles.get(\"plain-left-wrap\"), 8);\n\t\t\trowIndex++;\n\n\t\t\tOutputStream out = response.getOutputStream(\"application/vnd.ms-excel\");\n\t\t\tresponse.setHeader(\"Content-Disposition\", \"attachment; filename=\\\"employeeList.xls\\\"\");\n\n\t\t\tdocument.write(out);\n\t\t\tout.close();\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public String getExportMimeType(){\n return \"text/plain\";\n }", "@Test\n public void exportTest1() {\n isl.exportSP();\n SharedPreferences sp = appContext.getSharedPreferences(spName, Context.MODE_PRIVATE);\n assertEquals(5, sp.getInt(\"nr\", 0));\n assertEquals(\"#suiker#smaakmakers#5.0#2.1#GRAMS#\", sp.getString(\"1\", null));\n assertEquals(\"#spruitjes#groente#20.0#3.0#NONE#\", sp.getString(\"3\", null));\n }", "public void exportSuccess(BeanXporterEvent e);", "@Test\n public void testGetAsHTML() throws Exception {\n List<String> linksToFind = new ArrayList<>(Arrays.asList(\"layers\", \"layergroups\", \"styles\", \"workspaces\"));\n List<String> invalidLinks = Arrays.asList(\"reset\", \"reload\");\n Document dom = getAsDOM(RestBaseController.ROOT_PATH);\n print(dom);\n NodeList links = CatalogRESTTestSupport.xp.getMatchingNodes(\"//li/a\", dom);\n for (int i = 0; i < (links.getLength()); i++) {\n Element link = ((Element) (links.item(i)));\n String linkText = link.getTextContent();\n linksToFind.remove(linkText);\n Assert.assertFalse((\"Index should only contain GET endpoints. Found: \" + linkText), invalidLinks.contains(linkText));\n }\n Assert.assertTrue((\"Could not find the following links in index: \" + (linksToFind.toString())), ((linksToFind.size()) == 0));\n }", "@RequestMapping( value = \"/htmlExtract\", method = RequestMethod.GET )\n\t@Transactional\n\tpublic @ResponseBody Map<String, String> doHtmlExtractionTest(\n\t\t\t@RequestParam( value = \"id\", required = false ) final String id,\n\t\t\t@RequestParam( value = \"url\", required = false ) final String url, \n\t\t\tfinal HttpServletResponse response) throws InterruptedException, IOException, ExecutionException\n\t{\n\t\treturn publicationFeature.getPublicationApi().extractHtmlFile( url );\n\t}", "@Override\n public void closeExportWriter() {\n }", "public interface Telematics {\n\n void report(VehicleInfo vehicleInfo) throws IOException;\n\n String HTML = \"<html>\\n\" +\n \"<title>Vehicle Telematics Dashboard</title>\\n\" +\n \"<body>\\n\" +\n \"<h1 align=\\\"center\\\">Averages for num_vehicles vehicles</h1>\\n\" +\n \"<table align=\\\"center\\\">\\n\" +\n \" <tr>\\n\" +\n \" <th>Odometer (miles) |</th><th>Consumption (gallons) |</th><th>Last Oil Change |</th><th>Engine Size (liters)</th>\\n\" +\n \" </tr>\\n\" +\n \" <tr>\\n\" +\n \" <td align=\\\"center\\\">odometer_average</td><td align=\\\"center\\\">consumption_average</td><td align=\\\"center\\\">oc_average</td align=\\\"center\\\"><td align=\\\"center\\\">es_average</td>\\n\" +\n \" </tr>\\n\" +\n \"</table>\\n\" +\n \"<h1 align=\\\"center\\\">History</h1>\\n\" +\n \"<table align=\\\"center\\\" border=\\\"1\\\">\\n\" +\n \" <tr>\\n\" +\n \" <th>VIN</th><th>Odometer (miles)</th><th>Consumption (gallons)</th><th>Last Oil Change</th><th>Engine Size (liters)</th>\\n\" +\n \" </tr>\\n\" +\n \" <tr>\\n\" +\n \" <td align=\\\"center\\\">0123456</td><td align=\\\"center\\\">111.1</td><td align=\\\"center\\\">222.2</td><td align=\\\"center\\\">333.3</td align=\\\"center\\\"><td align=\\\"center\\\">2.0</td>\\n\" +\n \" </tr>\\n\" +\n \" <tr>\\n\" +\n \" <td align=\\\"center\\\">45435</td><td align=\\\"center\\\">123</td><td align=\\\"center\\\">234</td><td align=\\\"center\\\">345</td align=\\\"center\\\"><td align=\\\"center\\\">4.5</td>\\n\" +\n \" </tr>\\n\" +\n \"</table>\\n\" +\n \"</body>\\n\" +\n \"</html>\\n\";\n\n\n}", "@Test(description = \"export interface with all types\")\n public void exportWithAllTypes()\n throws Exception\n {\n final DataCollection data = new DataCollection(this);\n final InterfaceData inter = data.getInterface(\"TestInterface\").addAllTypes();\n data.create();\n\n inter.checkExport(inter.export());\n }", "@Test(groups = \"wso2.ds.dashboard\", description = \"Tests dashboard personalization\", dependsOnMethods = \"testForViewer\")\n public void testCustomizeButtonDashboard()\n throws MalformedURLException, XPathExpressionException {\n getDriver().findElement(By.cssSelector(\"i.ues-copy\")).click();\n selectPane(\"pages\");\n getDriver().findElement(By.cssSelector(\"[name=title]\")).clear();\n getDriver().findElement(By.cssSelector(\"[name=title]\")).sendKeys(DASHBOARD_PAGE_NAME + \"\\n\");\n assertEquals(DASHBOARD_PAGE_NAME, getDriver().findElement(By.cssSelector(\"div.page-title h1\")).getText(),\n \"error occurred while edit the new page name\");\n }", "public static void main(String[] args) throws InterruptedException {\n\t\tExtentReports report = new ExtentReports(\"Report08.html\");\r\n\t\tExtentTest test = report.startTest(\"TestCase08\");\r\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"chromedriver.exe\");\r\n\t\tWebDriver driver=new ChromeDriver();\r\n\r\n\t\tdriver.get(\"file:///D:/TestCases_11Feb/testcase8.html\");\r\n\t\tWebElement drop=driver.findElement(By.xpath(\"/html/body/div/button\"));\r\n\r\n\t\tActions actions=new Actions(driver);\r\n\t\tactions.moveToElement(drop).build().perform();\r\n\t\t\r\n\t\tThread.sleep(2000);\r\n\t\tdriver.findElement(By.linkText(\"Google\")).click();\r\n\r\n\t\tThread.sleep(4000);\r\n\t\t\r\n\t\tif(driver.getTitle().equals(\"Google\"))\r\n\t\t{\r\n\t\tSystem.out.println(\"Google\");\r\n\t\ttest.log(LogStatus.PASS, \"Verified\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\tSystem.out.println(\"Failure\");\r\n\t\ttest.log(LogStatus.FAIL, \"Failed to move to Google page\");\r\n\t\t}\r\n\t\tThread.sleep(2000);\r\n\t\treport.endTest(test);\r\n\t\treport.flush();\r\n\t\tdriver.quit();\t\t\r\n\t\r\n\t\r\n\t}", "public void fnCreateSummaryReport(){\r\n //Setting counter value\r\n g_iTCPassed = 0;\r\n g_iTestCaseNo = 0;\r\n g_SummaryStartTime = new Date();\r\n \r\n\t\ttry \r\n\t\t{ \r\n\t //Open the test case report for writing \r\n\t foutStrm = new FileOutputStream(Environment.get(\"HTMLREPORTSPATH\")+ \"\\\\SummaryReport.html\", true);\r\n\t \r\n\t\t\t//Close the html file\r\n\t new PrintStream(foutStrm).println(\"<HTML><BODY><TABLE BORDER=0 CELLPADDING=3 CELLSPACING=1 WIDTH=100% BGCOLOR=BLACK>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TR><TD WIDTH=90% ALIGN=CENTER BGCOLOR=WHITE><FONT FACE=VERDANA COLOR=ORANGE SIZE=3><B>Tieto NetBank automation</B></FONT></TD></TR><TR><TD ALIGN=CENTER BGCOLOR=ORANGE><FONT FACE=VERDANA COLOR=WHITE SIZE=3><B>Selenium Framework Reporting</B></FONT></TD></TR></TABLE><TABLE CELLPADDING=3 WIDTH=100%><TR height=30><TD WIDTH=100% ALIGN=CENTER BGCOLOR=WHITE><FONT FACE=VERDANA COLOR=//0073C5 SIZE=2><B>&nbsp; Automation Result : \" + new Date() + \" on Machine \" + InetAddress.getLocalHost().getHostName() + \" by user \" + System.getProperty(\"user.name\") + \" on Browser \" + driverType +\"</B></FONT></TD></TR><TR HEIGHT=5></TR></TABLE>\"); \r\n\t new PrintStream(foutStrm).println(\"<TABLE CELLPADDING=3 CELLSPACING=1 WIDTH=100%>\"); \r\n\t new PrintStream(foutStrm).println(\"<TR COLS=6 BGCOLOR=ORANGE><TD WIDTH=10%><FONT FACE=VERDANA COLOR=BLACK SIZE=2><B>TC No.</B></FONT></TD><TD WIDTH=60%><FONT FACE=VERDANA COLOR=BLACK SIZE=2><B>Test Name</B></FONT></TD><TD BGCOLOR=ORANGE WIDTH=15%><FONT FACE=VERDANA COLOR=BLACK SIZE=2><B>Status</B></FONT></TD><TD WIDTH=15%><FONT FACE=VERDANA COLOR=BLACK SIZE=2><B>Test Duration</B></FONT></TD></TR>\");\r\n\t \r\n\t //Close the object\r\n\t foutStrm.close();\r\n\t\t} catch (IOException io) \r\n\t\t{\r\n\t\t\tio.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\tfoutStrm = null;\r\n }", "@Test(description = \"export interface with one single type\")\n public void exportWithOneType()\n throws Exception\n {\n final DataCollection data = new DataCollection(this);\n final TypeData type = data.getType(\"TestType\");\n final InterfaceData inter = data.getInterface(\"TestInterface\").addType(type);\n data.create();\n\n inter.checkExport(inter.export());\n }", "private void createPDF(OutputStream os,String htmlFileName) {\n\t\tLog.info(\"url : \"+htmlFileName);\r\n //String HTML_TO_PDF = \"D:\\\\ConvertedFile.pdf\";\r\n // OutputStream os = new FileOutputStream(HTML_TO_PDF); \r\n \r\n /* File myhtml = new File(htmlFileName);\r\n FileInputStream fileinput = null;\r\n BufferedInputStream mybuffer = null;\r\n DataInputStream datainput = null;\r\n\r\n fileinput = new FileInputStream(myhtml);\r\n mybuffer = new BufferedInputStream(fileinput);\r\n datainput = new DataInputStream(mybuffer);\r\n\r\n while (datainput.available() != 0) {\r\n \t\r\n \tif(datainput.readLine().)\r\n \tSystem.out.println(datainput.readLine());\r\n \t}\r\n*/\r\n try {\r\n\t ITextRenderer renderer = new ITextRenderer();\r\n\t Log.info(\"Skill PDF Export->Create PDF->File name: \" + htmlFileName);\r\n\t renderer.setDocument(new File(htmlFileName)); \r\n\t renderer.layout();\r\n\t renderer.createPDF(os); \r\n\t os.close();\r\n }catch (Exception e) {\r\n \tLog.error(\"Error in SkillPdfExport\",e);\r\n }\r\n\t}", "public abstract String getExportLocation();", "void exportDivision(Connection con, OutputStream out) throws Exception;", "private void writeContent(OutputStream os) throws Exception {\n os.write(HTMLcontent.getBytes());\n}", "@Test\r\n\tpublic void testCreatePdf(){\n\t}", "public void exportPuzzle (Puzzle puzzle) {\n if (puzzle != null && puzzle.getNumWords () > 0) {\n if (chooser.showSaveDialog (null) == JFileChooser.APPROVE_OPTION) {\n File newFile = chooser.getSelectedFile ();\n try {\n FileWriter writer = new FileWriter (newFile + \" puzzle.html\");\n writer.write (puzzle.export (true));\n writer.close ();\n writer = new FileWriter (newFile + \" solution.html\");\n writer.write (puzzle.export (false));\n writer.close ();\n } catch (IOException e) {\n JOptionPane.showMessageDialog (null, \"File IO Exception\\n\" + e.getLocalizedMessage (), \"Error!\", JOptionPane.ERROR_MESSAGE);\n }\n }\n } else {\n JOptionPane.showMessageDialog (null, \"Please Generate a Puzzle before Exporting\", \"Error!\", JOptionPane.ERROR_MESSAGE);\n }\n }", "protected void executeTest(final Class<? extends Page> pageClass, final String filename) throws Exception\n\t{\n\t\tSystem.out.println(\"=== \" + pageClass.getName() + \" ===\");\n\n\t\ttester.startPage(pageClass);\n\t\ttester.assertRenderedPage(pageClass);\n\t\ttester.assertResultPage(this.getClass(), filename);\n\t}", "public void exportResultsToFile(){\r\n\t\t\t\t\r\n\t\t// This if clause shouldn't fire as the icon is grayed out if there is no tab open\r\n\t\tif(currentView == null \r\n\t\t\t\t|| currentView.getDynamicModelView() == null \r\n\t\t\t\t|| currentView.getDynamicModelView().getModel() == null){\r\n\t\t\tJOptionPane.showMessageDialog(this, \"A tab must be open, and a model and table must be present before results can be exported\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif(currentView.getDynamicModelView().getModel().getDefaultHistory() == null){\r\n\t\t\tJOptionPane.showMessageDialog(this, \"A table must be present before results can be exported\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tDynamicModelHistory history = currentView.getDynamicModelView().getModel().getDefaultHistory();\r\n\r\n\t\tStringBuffer buffer = new StringBuffer(30000);\r\n\r\n\t\tif(history != null && history.getTimePointCount() > 0 && history.getSnapshot(0) != null){\r\n\t\t\r\n\t\t\t// Get the filename\r\n\t\t\tYorkGUIUtils guiUtils = new YorkGUIUtils();\r\n\t\t\tString selectedFile = guiUtils.getUserToDefineFilename(this, propertiesMemento.getBaseDir(), \"txt csv\", \"Results files (.txt, .csv)\", JFileChooser.SAVE_DIALOG);\r\n\r\n\t\t\tif(selectedFile == null || guiUtils.wasCancelled()){\r\n\t\t\t\trequestFocusInWindow();\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\t\r\n\t\t\tlogger.info(\"Selected file for exporting results:\" + selectedFile);\r\n\t\t\r\n\t\t\tbuffer.append(\"time point\").append(\"\\t\");\r\n\t\t\tfor(int t = 0; t < history.getTimePointCount(); t++){\r\n\t\t\t\tbuffer.append(t).append(\"\\t\");\r\n\t\t\t}\r\n\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t\r\n\t\t\tfor(Iterator<String> it = history.getSnapshot(0).keySet().iterator(); it.hasNext();){\r\n\t\t\t\tString name = it.next();\r\n\t\t\t\tbuffer.append(name).append(\"\\t\");\r\n\t\t\t\t// For all time points\r\n\t\t\t\tfor(int t = 0; t < history.getTimePointCount(); t++){\r\n\t\t\t\t\tbuffer.append(history.getSnapshot(t).get(name).getOutputValue()).append(\"\\t\");\r\n\t\t\t\t}\r\n\t\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t}\r\n\t\t\tFileLoader.save(selectedFile, buffer.toString());\r\n\t\t}\r\n\t\telse{\r\n\t\t\tJOptionPane.showMessageDialog(this, \"No results available in the selected tab. Run the model first.\", \"Warning\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\r\n\t\t}\r\n\t}", "@Override\n\tprotected String[] getExportTitles() {\n\t\treturn null;\n\t}", "@Test\n public void serialization_pageLoad() throws Exception {\n final String page1Content = \"<html><body>hello 1</body></html>\";\n final WebClient client = getWebClient();\n final HtmlPage page1 = loadPage(client, page1Content, null, URL_FIRST);\n assertEquals(\"hello 1\", page1.asText());\n\n final String page2Content = \"<html><body>hello 2</body></html>\";\n final WebClient copy = clone(client);\n final HtmlPage page2 = loadPage(copy, page2Content, null, URL_SECOND);\n assertEquals(\"hello 2\", page2.asText());\n copy.closeAllWindows();\n }", "private static void createAxeHtmlReportFile(SearchContext context, Results results, String destination,\n Set<ResultType> requestedResults) throws IOException, ParseException {\n context = (context instanceof WrapsElement)\n ? ((WrapsElement) context).getWrappedElement() : context;\n\n HashSet<String> selectors = new HashSet<>();\n final int violationCount = getCount(results.getViolations(), selectors);\n final int incompleteCount = getCount(results.getIncomplete(), selectors);\n final int passCount = getCount(results.getPasses(), selectors);\n final int inapplicableCount = getCount(results.getInapplicable(), selectors);\n\n String stringBuilder = \"<!DOCTYPE html>\\r\\n\" + \"<html lang=\\\"en\\\">\" + \"<head>\"\n + \"<meta charset=\\\"utf-8\\\">\"\n + \"<meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1.0\\\">\"\n + \"<title>Accessibility Check</title><style></style>\"\n + \"</head>\" + \"<body><content></content><script></script></body>\" + \"</html>\";\n\n Document doc = Jsoup.parse(stringBuilder);\n\n doc.select(\"style\").append(getCss(context));\n\n Element contentArea = doc.select(\"content\").first();\n\n Element reportTitle = new Element(\"h1\");\n reportTitle.text(\"Accessibility Check\");\n contentArea.appendChild(reportTitle);\n\n Element metaFlex = new Element(\"div\");\n metaFlex.attributes().put(\"id\", \"metadata\");\n contentArea.appendChild(metaFlex);\n\n Element contextGroup = new Element(\"div\");\n contextGroup.attributes().put(\"id\", \"context\");\n metaFlex.appendChild(contextGroup);\n\n Element contextHeader = new Element(\"h3\");\n contextHeader.text(\"Context:\");\n contextGroup.appendChild(contextHeader);\n\n Element contextContent = new Element(\"div\");\n contextContent.attributes().put(classString, \"emOne\");\n contextContent.attributes().put(\"id\", \"reportContext\");\n getContextContent(results, contextContent);\n contextGroup.appendChild(contextContent);\n\n Element imgGroup = new Element(\"div\");\n imgGroup.attributes().put(\"id\", \"image\");\n metaFlex.appendChild(imgGroup);\n\n Element imageHeader = new Element(\"h3\");\n imageHeader.appendText(\"Image:\");\n imgGroup.appendChild(imageHeader);\n\n Element imageContent = new Element(\"img\");\n imageContent.attributes().put(classString, \"thumbnail\");\n imageContent.attributes().put(\"id\", \"screenshotThumbnail\");\n imageContent.attributes().put(\"alt\", \"A Screenshot of the page\");\n imageContent.attributes().put(\"width\", \"33%\");\n imageContent.attributes().put(\"height\", \"auto\");\n imgGroup.appendChild(imageContent);\n\n Element countsGroup = new Element(\"div\");\n countsGroup.attributes().put(\"id\", \"counts\");\n metaFlex.appendChild(countsGroup);\n\n Element countsHeader = new Element(\"h3\");\n countsHeader.appendText(\"Counts:\");\n countsGroup.appendChild(countsHeader);\n\n Element countsContent = new Element(\"div\");\n countsContent.attributes().put(classString, \"emOne\");\n getCountContent(violationCount, incompleteCount, passCount, inapplicableCount, requestedResults, countsContent);\n countsGroup.appendChild(countsContent);\n\n Element resultsFlex = new Element(\"div\");\n resultsFlex.attributes().put(\"id\", \"results\");\n contentArea.appendChild(resultsFlex);\n\n\n if (results.isErrored()) {\n Element errorHeader = new Element(\"h2\");\n errorHeader.appendText(\"SCAN ERRORS:\");\n contentArea.appendChild(errorHeader);\n\n Element errorContent = new Element(\"div\");\n errorContent.attributes().put(\"id\", \"ErrorMessage\");\n errorContent.appendText(results.getErrorMessage());\n contentArea.appendChild(errorContent);\n }\n\n if (violationCount > 0 && requestedResults.contains(ResultType.Violations)) {\n getReadableAxeResults(results.getViolations(), ResultType.Violations.name(), resultsFlex);\n }\n\n if (incompleteCount > 0 && requestedResults.contains(ResultType.Incomplete)) {\n getReadableAxeResults(results.getIncomplete(), ResultType.Incomplete.name(), resultsFlex);\n }\n\n if (passCount > 0 && requestedResults.contains(ResultType.Passes)) {\n getReadableAxeResults(results.getPasses(), ResultType.Passes.name(), resultsFlex);\n }\n\n if (inapplicableCount > 0 && requestedResults.contains(ResultType.Inapplicable)) {\n getReadableAxeResults(results.getInapplicable(), ResultType.Inapplicable.name(), resultsFlex);\n }\n\n Element modal = new Element(\"div\");\n modal.attributes().put(\"id\", \"modal\");\n contentArea.appendChild(modal);\n\n Element modalClose = new Element(\"div\");\n modalClose.text(\"X\");\n modalClose.attributes().put(\"id\", \"modalclose\");\n modal.appendChild(modalClose);\n\n Element modalImage = new Element(\"img\");\n modalImage.attributes().put(\"id\", \"modalimage\");\n modal.appendChild(modalImage);\n\n Element script = doc.select(\"script\").first();\n script.text(getJavascriptToString());\n\n FileUtils.writeStringToFile(new File(destination), doc.outerHtml(), StandardCharsets.UTF_8);\n }", "HtmlPackage getHtmlPackage();", "@Override\n\tpublic boolean getExportEnabled(String ref) {\n\t\treturn false;\n\t}", "public interface BaseExportFileApi {\n boolean export(String data);\n}", "public boolean exportToFile(String text, String outputPath) {\r\n\t\t\r\n\t\t// Validate outputPath\r\n\t\tFile file = new File(outputPath.substring(0,outputPath.lastIndexOf(\"/\")));\r\n\t\tif(!file.isDirectory())\r\n\t\t\treturn false;\r\n\r\n\t\t// Write into file (overwrites if file exists)\r\n\t\ttry {\r\n\t\t\tWriter fileWriter = new FileWriter(outputPath);\r\n\t\t\tfileWriter.write(text);\r\n\t\t\tfileWriter.close();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}" ]
[ "0.65069765", "0.6399725", "0.63379663", "0.6329826", "0.6118347", "0.60364354", "0.5921078", "0.5845761", "0.58421165", "0.5721209", "0.57154924", "0.570779", "0.5659428", "0.5617579", "0.5610971", "0.56107444", "0.55949837", "0.55857223", "0.55813795", "0.556661", "0.55506146", "0.54583275", "0.5444431", "0.54347026", "0.54300755", "0.54184365", "0.54105335", "0.539217", "0.5387133", "0.5384114", "0.5367801", "0.5361354", "0.53477234", "0.53403395", "0.53403175", "0.53393114", "0.53337157", "0.5331219", "0.5330357", "0.52899915", "0.52877915", "0.526534", "0.52577466", "0.52469593", "0.5240916", "0.5229599", "0.52203196", "0.52183056", "0.5217305", "0.5210298", "0.5209453", "0.5200842", "0.5185696", "0.51802206", "0.5176718", "0.5167498", "0.5165801", "0.51601875", "0.51592064", "0.5154873", "0.51462203", "0.51390207", "0.51390207", "0.51390207", "0.5138358", "0.5134695", "0.51315635", "0.51278955", "0.51262045", "0.51112276", "0.5091371", "0.5087315", "0.5084195", "0.50840133", "0.5083612", "0.5078575", "0.5073194", "0.507306", "0.50657547", "0.50515866", "0.50447303", "0.50320065", "0.5024846", "0.5024036", "0.5023399", "0.50229776", "0.5019944", "0.5016482", "0.5011043", "0.50097734", "0.5003962", "0.4998971", "0.49928752", "0.4990474", "0.4989711", "0.4988821", "0.49854502", "0.49851957", "0.49756783", "0.49754798" ]
0.83083534
0
Test of getExtension method, of class ExportHTML.
@Test public void testGetExtension() { System.out.println("getExtension"); ExportHTML instance = new ExportHTML(); String expResult = "html"; String result = instance.getExtension(); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void testGetExtensionDescription() {\r\n\t\tSystem.out.println(\"getExtensionDescription\");\r\n\t\tExportHTML instance = new ExportHTML();\r\n\t\tString expResult = \"HTML Documents (*.html)\";\r\n\t\tString result = instance.getExtensionDescription();\r\n\t\tassertEquals(expResult, result);\r\n\t}", "String getOutputExtension();", "protected abstract String getExtension(JasperPrint jrprint);", "String getExtension();", "java.lang.String getExtensionText();", "public void testGetExtension() throws Exception {\n Object[] test_values = {\n new String[]{\"/foo.bar\", \".bar\"},\n new String[]{\"foo.bar#a\", \".bar\"},\n new String[]{\"foo.bar?b=c\", \".bar\"},\n new String[]{\"foo.bar#a?b=c\", \".bar\"},\n new String[]{\"foo.bar\", \".bar\"},\n new String[]{\"foo/bar\", null},\n new String[]{\"/x.html\", \".html\"},\n new String[]{\"/foo.bar.org/x.y.z.html\", \".html\"}\n };\n for (int i = 0; i < test_values.length; i++) {\n String tests[] = (String[]) test_values[i];\n String test = tests[0];\n String expected = tests[1];\n\n String result = NetUtils.getExtension(test);\n String message = \"Test \" + \"'\" + test + \"'\";\n assertEquals(message, expected, result);\n }\n }", "private static String getHtmlExtension(String markupName) {\r\n\t\treturn \"html\";\r\n\t}", "@Test\r\n\tpublic void testExport() {\r\n\t\tSystem.out.println(\"testExport\");\r\n\t\tList<String[]> text = new ArrayList();\r\n\t\ttext.add(\"1;2;3\".split(\";\"));\r\n\t\ttext.add(\"4;5;6\".split(\";\"));\r\n\t\ttext.add(\"7;8;9\".split(\";\"));\r\n\t\tString expResult = \"<!DOCTYPE html><html> <head> <title> Export File HTML </title>\\n\"\r\n\t\t\t+ \" <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=UTF-8\\\"> <link rel=\\\"icon\\\" type=\\\"image/ico\\\" href=\\\"http://www.isep.ipp.pt/favicon.ico\\\"> </head> <body> <div> <img src=\\\"http://www.dei.isep.ipp.pt/images/topo_index.png\\\" alt=\\\"Logotipo ISEP\\\"> </div> <hr> <div> <TABLE> <TR> <TD align='center'>&nbsp;1&nbsp;</TD> <TD align='center'>&nbsp;2&nbsp;</TD> <TD align='center'>&nbsp;3&nbsp;</TD> </TR> <TR> <TD align='center'>&nbsp;4&nbsp;</TD> <TD align='center'>&nbsp;5&nbsp;</TD> <TD align='center'>&nbsp;6&nbsp;</TD> </TR> <TR> <TD align='center'>&nbsp;7&nbsp;</TD> <TD align='center'>&nbsp;8&nbsp;</TD> <TD align='center'>&nbsp;9&nbsp;</TD> </TR> </TABLE> <br> </div> <hr> </body></html>\";\r\n\t\tExportHTML instance = new ExportHTML();\r\n\t\tString result = instance.export(text);\r\n\t\tassertEquals(expResult, result);\r\n\r\n\t}", "public boolean isExtensionElement();", "@objid (\"e20e1709-9e0b-4c6a-bf6c-3f3e7b57cdfe\")\n @Override\n boolean isExtension();", "public interface Extension\r\n {\r\n String XHTML = \"xhtml\";\r\n String JSF = \"jsf\";\r\n String FACES = \"faces\";\r\n String JSP = \"jsp\";\r\n }", "boolean hasExtensionText();", "protected String getExtension() {\n\t\treturn \"\";\n\t}", "public String getOutputExtension(String inputExtension);", "protected abstract String getFileExtension();", "public boolean isExtension() {\n\t\treturn true;\n\t}", "Extension createExtension();", "public abstract String getFileExtension();", "public String getExtension() {\n return extension;\n }", "public String getExtension() {\n return extension;\n }", "public String[] getOutputExtensions();", "String getViewExtension();", "public String getExtension() {\n return extension;\n }", "public interface Extension {\r\n\r\n /**\r\n *\r\n * @return the extension name\r\n */\r\n String getName();\r\n}", "public Object getExtension(){\n\t\treturn ext;\n\t}", "public Extension getExtension() {\n return extension;\n }", "public void ExtentRepoter() {\n\t\treporter = new ExtentHtmlReporter(\"./Reports/learn_automation1.html\");\n\n\t}", "public java.lang.Object getExtension() {\r\n return extension;\r\n }", "public String getExtensions()\n {\n return ext;\n }", "public String getFileExtension();", "String getFileExtension();", "@Test\r\n\tpublic void extendReports() throws IOException {\n\t\tString File = \"./Reports/report.html\";\r\n\t\tExtentHtmlReporter html = new ExtentHtmlReporter(File);\r\n\t\thtml.setAppendExisting(true);\r\n\t\t//to write on the created html file\r\n\t\tExtentReports extents = new ExtentReports();\r\n\t\textents.attachReporter(html);\r\n\t\t\r\n\t\tExtentTest createAccountTest = extents.createTest(\"TC001\", \"CreateAccount\");\r\n\t\tcreateAccountTest.pass(\"username entered\", MediaEntityBuilder.createScreenCaptureFromPath(\"./../snaps/img1.png\").build());\r\n\t\textents.flush();\r\n\t\t\r\n\r\n\t}", "String getSkipExtension();", "@Test\n\tpublic void testTypeExtension() {\n\t}", "public void setExtension(String extension) {\n this.extension = extension;\n }", "public void setExtension(String extension) {\n this.extension = extension;\n }", "public int lookupWriteFileExtension(String extension);", "public String getExtensions() {\n return extensions;\n }", "public void setExtension(java.lang.Object extension) {\r\n this.extension = extension;\r\n }", "@AfterClass\n\t/* Executa a leitura das configuracoes do extends report */\n\tpublic static void writeExtentReport() {\n\t\tReporter.loadXMLConfig(new File(\"src/test/resources/configs/extension-config.xml\"));\n\t\t\n\t\t/* Informa qual o sistema foi utilizado para efetuar os testes */\n\t\tReporter.setSystemInfo(\"OS\", \"Windows10\");\n\t\t\n\t\t/* Informa o nome do analista no relatorio */\n\t\tReporter.setSystemInfo(\"Tester Name\", \"Wilker\");\n\t\t\n\t}", "HtmlPackage getHtmlPackage();", "@Test\n public void testGetContent_2() {\n System.out.println(\"getContent\");\n MockServletResponse instance = new MockServletResponse();\n\n try (HtmlElement html = HtmlElement.niceOf(instance)) {\n html.getBody().addHeading(\"ABC:ČÁŠ\", \"cssType\");\n }\n String result = instance.toString();\n String expected = String.join(\"\\n\"\n , \"<!DOCTYPE html>\"\n , \"<html lang=\\\"en\\\">\"\n , \"\\t<head>\"\n , \"\\t\\t<meta charset=\\\"UTF-8\\\"/>\"\n , \"\\t\\t<title>Demo</title>\"\n , \"\\t</head>\"\n , \"\\t<body>\"\n , \"\\t\\t<h1 class=\\\"cssType\\\">ABC:ČÁŠ</h1>\"\n , \"\\t</body>\"\n , \"</html>\");\n assertEquals(expected, result);\n\n }", "@Override\r\n \t\tprotected boolean validatePage() {\r\n \t\t\tif (super.validatePage()) {\r\n \t\t\t\tString extension = new Path(getFileName()).getFileExtension();\r\n \t\t\t\tif (extension == null || !FILE_EXTENSIONS.contains(extension)) {\r\n \t\t\t\t\tString key = FILE_EXTENSIONS.size() > 1 ? \"_WARN_FilenameExtensions\" : \"_WARN_FilenameExtension\";\r\n \t\t\t\t\tsetErrorMessage(Reqif10EditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS }));\r\n \t\t\t\t\treturn false;\r\n \t\t\t\t}\r\n \t\t\t\treturn true;\r\n \t\t\t}\r\n \t\t\treturn false;\r\n \t\t}", "@Test\n\tpublic void html_test() {\n\t\tString text = \"\";\n\t\tassertEquals(\"<html></html>\", createHTML(text));\n\t}", "public String getWriteFileExtension(int formatIndex);", "@Test\n\tpublic void testBinaryOperationHtmlResponseFromProvider() throws Exception {\n\t\tHttpGet httpGet = new HttpGet(\"http://localhost:\" + ourPort + \"/Patient/html/$binaryOp\");\n\t\thttpGet.addHeader(\"Accept\", \"text/html\");\n\n\t\tCloseableHttpResponse status = ourClient.execute(httpGet);\n\t\tString responseContent = IOUtils.toString(status.getEntity().getContent(), Charsets.UTF_8);\n\t\tstatus.close();\n\t\tassertEquals(200, status.getStatusLine().getStatusCode());\n\t\tassertEquals(\"text/html\", status.getFirstHeader(\"content-type\").getValue());\n\t\tassertEquals(\"<html>DATA</html>\", responseContent);\n\t\tassertEquals(\"Attachment;\", status.getFirstHeader(\"Content-Disposition\").getValue());\n\t}", "@Override\n public String[] getExtensions() {\n return new String[]{};\n }", "public String getFileExtension() {\r\n return Generator.ANIMALSCRIPT_FORMAT_EXTENSION;\r\n }", "public String[] getExtensions()\r\n {\r\n return new String[] {\"\"};\r\n }", "final public String getExtension()\n\t{\n\t\treturn this.getLocation().getExtension(); \n\t}", "public ArrayList<String> getAvalaibleExtensions() {\n ArrayList<String> ext = new ArrayList<String>();\n ext.add(\"txt\");\n return ext;\n }", "public void setExtensions(String extensions)\n {\n this.ext = extensions;\n }", "private String extensions() {\n return Arrays.stream(f.getName().split(\"\\\\.\")).skip(1).collect(Collectors.joining(\".\"));\n }", "public boolean producesFileType(String outputExtension);", "public void setHtmlextension(String htmlExtension) \r\n {\r\n this.htmlExtension = htmlExtension;\r\n //Trim the starting \".\"\r\n if(this.htmlExtension.startsWith(\".\")) {\r\n this.htmlExtension = this.htmlExtension.substring(1);\r\n }\r\n }", "Extensions getExtensions() {\n return this.extensions;\n }", "public String[] getExtensions() {\r\n return extensions;\r\n }", "public String[] getExtensions() {\n\t\treturn url.getExtensions();\n }", "ExtensionsType getExtensions();", "public Set<String> getExtensions() {\n return extensions;\n }", "@Test\n public void testTakeExtensionAway264() { // FlairImage: 264\n assertEquals(\"From: FlairImage line: 265\", \"asd\", takeExtensionAway(\"asd.asd\")); \n assertEquals(\"From: FlairImage line: 266\", \"asd\", takeExtensionAway(\"asd.a\")); \n assertEquals(\"From: FlairImage line: 267\", \"asd\", takeExtensionAway(\"asd.\")); \n assertEquals(\"From: FlairImage line: 268\", \"asd\", takeExtensionAway(\"asd\")); \n assertEquals(\"From: FlairImage line: 269\", \"\", takeExtensionAway(\".asd\")); \n assertEquals(\"From: FlairImage line: 270\", \"\", takeExtensionAway(\".\")); \n assertEquals(\"From: FlairImage line: 271\", \"asd.asd\", takeExtensionAway(\"asd.asd.asd\")); \n assertEquals(\"From: FlairImage line: 272\", \"merkki.jono\", takeExtensionAway(\"merkki.jono.png\")); \n assertEquals(\"From: FlairImage line: 273\", \"mer.kki.jono\", takeExtensionAway(\"mer.kki.jono.png\")); \n }", "com.google.protobuf.ByteString\n getExtensionTextBytes();", "@Test\n public void testGetNotationFileExtension(){\n assertNull(notationService.getNotationFileExtension(null));\n\n // not existing notation\n assertNull(notationService.getNotationFileExtension(epcNotation.getIdentifier() + \"_\"));\n\n assertEquals(\n notationService.getNotationFileExtension(epcNotation.getIdentifier()),\n epcNotation.getLocalIOController().getNotationFileExtension()\n );\n\n assertEquals(\n notationService.getNotationFileExtension(hierarchyNotation.getIdentifier()),\n hierarchyNotation.getLocalIOController().getNotationFileExtension()\n );\n\n // order doesn't matter\n assertEquals(\n notationService_reverse.getNotationFileExtension(epcNotation.getIdentifier()),\n epcNotation.getLocalIOController().getNotationFileExtension()\n );\n\n assertEquals(\n notationService_reverse.getNotationFileExtension(hierarchyNotation.getIdentifier()),\n hierarchyNotation.getLocalIOController().getNotationFileExtension()\n );\n\n // empty\n assertNull(notationService_empty.getNotationFileExtension(epcNotation.getIdentifier()));\n\n assertNull(notationService_empty.getNotationFileExtension(hierarchyNotation.getIdentifier()));\n }", "public String getName() {\r\n return (\"Simple Extension\");\r\n }", "@Internal(\"Represented as part of archiveName\")\n public String getExtension() {\n return extension;\n }", "File downloadExtension(DownloadExtensionRequest request);", "public String[] getExtensions()\n\t{\n\t\treturn extensions;\n\t}", "private void _setExtension(XSTCtrl_extensionType ext) {\n\n\t}", "public Boolean validExtension(String extension) {\n ArrayList<String> acceptedExtensions = new ArrayList<>();\n acceptedExtensions.add(\"obj\");\n acceptedExtensions.add(\"mtl\");\n// acceptedExtensions.add(\"md2\");\n// acceptedExtensions.add(\"g3d\");\n// acceptedExtensions.add(\"g3dt\");\n\n //For testing purposes\n acceptedExtensions.add(\"png\");\n acceptedExtensions.add(\"jpg\");\n\n Log.i(\"extract\",\"Extension: \"+extension);\n\n for(int i = 0; i < acceptedExtensions.size(); i++) {\n if(extension.equals(acceptedExtensions.get(i)))\n return true;\n }\n return false;\n }", "Boolean supportsMultipleExtensions();", "@Test\n public void parserHtml() throws JSONException, IOException {\n }", "@Test\n\tpublic void testUsingTempFolder2() throws IOException {\n\t\tFile createdFile1= temp.newFile(\"mytestfile.html\");\n\t\t\n\t\t// construct temp(test) html file\n\t\tString content = \"<title>This is title<title>\";\n\t\t\n\t\tPrintStream ps = new PrintStream(new FileOutputStream(createdFile1));\n\t\tps.println(content); \n\t\t// what I think it should be\n\t\tString res = null; \n\n\t\t// what actually it is\n\t\tString result = extractTitleModule.WebPageExtraction(createdFile1);\n\t\tassertEquals(res,result); \n\t}", "public String[] getAllOutputExtensions();", "@Override\r\n public String getExtension() {\r\n if (extension == null) {\r\n getBaseName();\r\n final int pos = baseName.lastIndexOf('.');\r\n // if ((pos == -1) || (pos == baseName.length() - 1))\r\n // imario@ops.co.at: Review of patch from adagoubard@chello.nl\r\n // do not treat file names like\r\n // .bashrc c:\\windows\\.java c:\\windows\\.javaws c:\\windows\\.jedit c:\\windows\\.appletviewer\r\n // as extension\r\n if (pos < 1 || pos == baseName.length() - 1) {\r\n // No extension\r\n extension = \"\";\r\n } else {\r\n extension = baseName.substring(pos + 1).intern();\r\n }\r\n }\r\n return extension;\r\n }", "public void registerCustomExtensions(HtmlTable table) throws ExtensionLoadingException {\n \n \t\tif (StringUtils.isNotBlank(table.getTableConfiguration().getBasePackage())) {\n \n \t\t\tlogger.debug(\"Scanning custom extensions...\");\n \n \t\t\t// Scanning custom extension based on the base.package property\n \t\t\tList<AbstractExtension> customExtensions = scanCustomExtensions(table.getTableConfiguration()\n \t\t\t\t\t.getBasePackage());\n \n \t\t\t// Load custom extension if enabled\n \t\t\tif (customExtensions != null && !customExtensions.isEmpty() && table.getTableConfiguration().getExtraCustomExtensions() != null) {\n \t\t\t\tfor (String extensionToRegister : table.getTableConfiguration().getExtraCustomExtensions()) {\n \t\t\t\t\tfor (AbstractExtension customExtension : customExtensions) {\n \t\t\t\t\t\tif (extensionToRegister.equals(customExtension.getName().toLowerCase())) {\n \t\t\t\t\t\t\ttable.getTableConfiguration().registerExtension(customExtension);\n \t\t\t\t\t\t\tlogger.debug(\"Extension {} (version: {}) registered\", customExtension.getName(),\n \t\t\t\t\t\t\t\t\tcustomExtension.getVersion());\n \t\t\t\t\t\t\tcontinue;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tlogger.warn(\"No custom extension found\");\n \t\t\t}\n \t\t}\n \t\telse{\n \t\t\tlogger.debug(\"The 'base.package' property is blank. Unable to scan any class.\");\n \t\t}\n \t}", "String getTilePathExtension();", "Exp getSubscriptExp();", "private String getExpectedHTMLTextOutput(OutputFormat format) throws InvalidDDMSException {\r\n\t\tUtil.requireHTMLText(format);\r\n\t\tStringBuffer text = new StringBuffer();\r\n\t\ttext.append(buildHTMLTextOutput(format, \"verticalExtent.unitOfMeasure\", String.valueOf(TEST_UOM)));\r\n\t\ttext.append(buildHTMLTextOutput(format, \"verticalExtent.datum\", String.valueOf(TEST_DATUM)));\r\n\t\ttext.append(buildHTMLTextOutput(format, \"verticalExtent.minimum\", String.valueOf(TEST_MIN)));\r\n\t\ttext.append(buildHTMLTextOutput(format, \"verticalExtent.maximum\", String.valueOf(TEST_MAX)));\r\n\t\treturn (text.toString());\r\n\t}", "public String getExtensionClass()\n {\n return extensionClass;\n }", "Registries createExtension();", "public boolean saveHTMLInFile()\n {\n String filePath = formatFilePath();\n return saveHTMLInFile(filePath);\n }", "@Test\n\tpublic void testUsingTempFolder1() throws IOException {\n\t\tFile createdFile= temp.newFile(\"mytestfile.html\");\n\t\t\n\t\t// construct temp(test) html file\n\t\tString content = \"<title>This is title</title>\";\n\t\t\n\t\tPrintStream ps = new PrintStream(new FileOutputStream(createdFile));\n\t\tps.println(content); \n\t\t// what I think it should be\n\t\tString res = \"This is title\"; \n\n\t\t// what actually it is\n\t\tString result = extractTitleModule.WebPageExtraction(createdFile);\n\t\tassertEquals(res,result); \n\t}", "public String fileExtension() {\r\n return getContent().fileExtension();\r\n }", "public static String sourceExtension()\n {\n read_if_needed_();\n \n return _ext; \n }", "@CheckForNull\n String getPreferredExtension();", "public List<String> getTemplateExtension() {\n\t\treturn tplExtension;\n\t}", "public String getExportMimeType(){\n return \"text/plain\";\n }", "public static ExtentReports extentReportGenerator() \n\t{\n\tString path=System.getProperty(\"user.dir\")+\"\\\\reports\\\\index.html\";\n//\tExtentSparkReporter reporter=new ExtentSparkReporter(path);\n//\t\treporter.config().setEncoding(\"utf-8\");\n//\t\treporter.config().setReportName(\"Automation Test Results\");\n//\t\treporter.config().setDocumentTitle(\"Automation Reports\");\n//\t\treporter.config().setTheme(Theme.STANDARD);\n\t\t\n\t\tExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(path);\t\n\t\thtmlReporter.setAppendExisting(true);\n\t\thtmlReporter.config().setEncoding(\"utf-8\");\n\t\thtmlReporter.config().setDocumentTitle(\"Automation Reports\");\n\t\thtmlReporter.config().setReportName(\"Automation Test Results\");\n\t\thtmlReporter.config().setTheme(Theme.STANDARD);\n\t\tLocale.setDefault(Locale.ENGLISH);\n\t\t\n\t\textent=new ExtentReports();\n\t\textent.attachReporter(htmlReporter);\n\t\textent.setSystemInfo(\"Tester\", \"Sonu\");\n\t\t\n\t\t\n\t\t\n\t\treturn extent;\n\t}", "boolean isUsingTPExtension();", "public String getPageFileName();", "protected abstract ExtensionAttachment instantiateExtensionAttachment();", "public void setExtensionClass(String extensionClass)\n {\n this.extensionClass = extensionClass;\n }", "@Override\n\tpublic boolean accept(File dir, String filename) {\n\t\treturn filename.endsWith(\".html\");\n\t}", "public String getExtInfo() {\n return this.ExtInfo;\n }", "public String getDescription() {\n return \"*\" + extension_pattern;\n }", "public String getDescription() {\n return \"*\" + extension_pattern;\n }", "public String getFileExtension() {\r\n\t\treturn this.fileExtension;\r\n\t}", "@Test\n\tpublic void testBinaryReadHtmlResponseFromProvider() throws Exception {\n\t\tHttpGet httpGet = new HttpGet(\"http://localhost:\" + ourPort + \"/Binary/html\");\n\t\thttpGet.addHeader(\"Accept\", \"text/html\");\n\n\t\tCloseableHttpResponse status = ourClient.execute(httpGet);\n\t\tString responseContent = IOUtils.toString(status.getEntity().getContent(), Charsets.UTF_8);\n\t\tstatus.close();\n\t\tassertEquals(200, status.getStatusLine().getStatusCode());\n\t\tassertEquals(\"text/html\", status.getFirstHeader(\"content-type\").getValue());\n\t\tassertEquals(\"<html>DATA</html>\", responseContent);\n\t\tassertEquals(\"Attachment;\", status.getFirstHeader(\"Content-Disposition\").getValue());\n\t}", "public java.util.List<Extension> extension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_EXTENSION);\n }", "public java.util.List<Extension> extension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_EXTENSION);\n }" ]
[ "0.8181942", "0.6547237", "0.6489919", "0.64387375", "0.6394607", "0.62970966", "0.62959963", "0.6294684", "0.6268789", "0.62362254", "0.6197798", "0.6127632", "0.6088733", "0.60632586", "0.5963545", "0.59357125", "0.59264416", "0.5897586", "0.58735627", "0.58735627", "0.5850094", "0.58247703", "0.58014745", "0.5793773", "0.5769232", "0.5718132", "0.57084614", "0.56633973", "0.56604385", "0.5613939", "0.56038535", "0.5574115", "0.5533101", "0.5492223", "0.54916084", "0.54916084", "0.5479414", "0.5469174", "0.5450548", "0.54123926", "0.5388651", "0.53831214", "0.5377769", "0.53725415", "0.53646666", "0.533857", "0.5304953", "0.52985543", "0.5297159", "0.5283537", "0.52795607", "0.52771056", "0.52578497", "0.5248445", "0.5248384", "0.5245253", "0.5235053", "0.5227063", "0.5227019", "0.5223239", "0.5218416", "0.52013844", "0.52012736", "0.5198211", "0.519467", "0.51920485", "0.51801586", "0.51757824", "0.51654464", "0.5162371", "0.51597565", "0.5145729", "0.5137955", "0.51337934", "0.51233685", "0.51104766", "0.5109992", "0.5078198", "0.5074554", "0.507111", "0.5064184", "0.5053827", "0.5050167", "0.5029594", "0.50268114", "0.5026705", "0.50262827", "0.50257546", "0.5023606", "0.5020986", "0.50051767", "0.5001728", "0.5001583", "0.49948347", "0.4993562", "0.4993562", "0.4979093", "0.49610206", "0.4960554", "0.4960554" ]
0.8487503
0
Test of getExtensionDescription method, of class ExportHTML.
@Test public void testGetExtensionDescription() { System.out.println("getExtensionDescription"); ExportHTML instance = new ExportHTML(); String expResult = "HTML Documents (*.html)"; String result = instance.getExtensionDescription(); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void testGetExtension() {\r\n\t\tSystem.out.println(\"getExtension\");\r\n\t\tExportHTML instance = new ExportHTML();\r\n\t\tString expResult = \"html\";\r\n\t\tString result = instance.getExtension();\r\n\t\tassertEquals(expResult, result);\r\n\t}", "public URL getHtmlDescription();", "public String getDescription() {\n return \"*\" + extension_pattern;\n }", "public String getDescription() {\n return \"*\" + extension_pattern;\n }", "@Test\r\n\tpublic void testExport() {\r\n\t\tSystem.out.println(\"testExport\");\r\n\t\tList<String[]> text = new ArrayList();\r\n\t\ttext.add(\"1;2;3\".split(\";\"));\r\n\t\ttext.add(\"4;5;6\".split(\";\"));\r\n\t\ttext.add(\"7;8;9\".split(\";\"));\r\n\t\tString expResult = \"<!DOCTYPE html><html> <head> <title> Export File HTML </title>\\n\"\r\n\t\t\t+ \" <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=UTF-8\\\"> <link rel=\\\"icon\\\" type=\\\"image/ico\\\" href=\\\"http://www.isep.ipp.pt/favicon.ico\\\"> </head> <body> <div> <img src=\\\"http://www.dei.isep.ipp.pt/images/topo_index.png\\\" alt=\\\"Logotipo ISEP\\\"> </div> <hr> <div> <TABLE> <TR> <TD align='center'>&nbsp;1&nbsp;</TD> <TD align='center'>&nbsp;2&nbsp;</TD> <TD align='center'>&nbsp;3&nbsp;</TD> </TR> <TR> <TD align='center'>&nbsp;4&nbsp;</TD> <TD align='center'>&nbsp;5&nbsp;</TD> <TD align='center'>&nbsp;6&nbsp;</TD> </TR> <TR> <TD align='center'>&nbsp;7&nbsp;</TD> <TD align='center'>&nbsp;8&nbsp;</TD> <TD align='center'>&nbsp;9&nbsp;</TD> </TR> </TABLE> <br> </div> <hr> </body></html>\";\r\n\t\tExportHTML instance = new ExportHTML();\r\n\t\tString result = instance.export(text);\r\n\t\tassertEquals(expResult, result);\r\n\r\n\t}", "private static String getHtmlExtension(String markupName) {\r\n\t\treturn \"html\";\r\n\t}", "java.lang.String getExtensionText();", "String getOutputExtension();", "public abstract String getContentDescription();", "public String getHtmlDescription() {\n return \"<html>\" + getName() + \"</html>\";\n }", "public boolean isExtensionElement();", "protected abstract String getExtension(JasperPrint jrprint);", "public void testBlogEntryHasTagsAndMediaIsHtml() throws Exception {\n Category category = new Category(\"/java\", \"Java\");\n category.setBlog(blog);\n category.setTags(\"java\");\n blogEntry.addCategory(category);\n blogEntry.setExcerpt(\"Excerpt - here is some text\");\n blogEntry.setBody(\"Body - here is some text\");\n blogEntry.setTags(\"junit, automated unit testing\");\n context.setMedia(ContentDecoratorContext.HTML_PAGE);\n decorator.decorate(context, blogEntry);\n\n StringBuffer tags = new StringBuffer();\n tags.append(\"<div class=\\\"tags\\\"><span>Technorati Tags : </span>\");\n tags.append(\"<a href=\\\"http://technorati.com/tag/automatedunittesting\\\" target=\\\"_blank\\\" rel=\\\"tag\\\">automatedunittesting</a>, \");\n tags.append(\"<a href=\\\"http://technorati.com/tag/java\\\" target=\\\"_blank\\\" rel=\\\"tag\\\">java</a>, \");\n tags.append(\"<a href=\\\"http://technorati.com/tag/junit\\\" target=\\\"_blank\\\" rel=\\\"tag\\\">junit</a>\");\n tags.append(\"</div>\");\n\n assertEquals(\"Excerpt - here is some text\" + tags, blogEntry.getExcerpt());\n assertEquals(\"Body - here is some text\" + tags, blogEntry.getBody());\n }", "public abstract Element getDescription();", "public void testGetExtension() throws Exception {\n Object[] test_values = {\n new String[]{\"/foo.bar\", \".bar\"},\n new String[]{\"foo.bar#a\", \".bar\"},\n new String[]{\"foo.bar?b=c\", \".bar\"},\n new String[]{\"foo.bar#a?b=c\", \".bar\"},\n new String[]{\"foo.bar\", \".bar\"},\n new String[]{\"foo/bar\", null},\n new String[]{\"/x.html\", \".html\"},\n new String[]{\"/foo.bar.org/x.y.z.html\", \".html\"}\n };\n for (int i = 0; i < test_values.length; i++) {\n String tests[] = (String[]) test_values[i];\n String test = tests[0];\n String expected = tests[1];\n\n String result = NetUtils.getExtension(test);\n String message = \"Test \" + \"'\" + test + \"'\";\n assertEquals(message, expected, result);\n }\n }", "public String getHtmlDescription() {\n\t\treturn null;\n\t}", "public interface Extension\r\n {\r\n String XHTML = \"xhtml\";\r\n String JSF = \"jsf\";\r\n String FACES = \"faces\";\r\n String JSP = \"jsp\";\r\n }", "public String getHtmlDescription() {\n\t\treturn \"http://prom.win.tue.nl/research/wiki/online/redesign\";\n\t}", "@Test\n\tpublic void html_test() {\n\t\tString text = \"\";\n\t\tassertEquals(\"<html></html>\", createHTML(text));\n\t}", "private String getExpectedHTMLTextOutput(OutputFormat format) throws InvalidDDMSException {\r\n\t\tUtil.requireHTMLText(format);\r\n\t\tStringBuffer text = new StringBuffer();\r\n\t\ttext.append(buildHTMLTextOutput(format, \"verticalExtent.unitOfMeasure\", String.valueOf(TEST_UOM)));\r\n\t\ttext.append(buildHTMLTextOutput(format, \"verticalExtent.datum\", String.valueOf(TEST_DATUM)));\r\n\t\ttext.append(buildHTMLTextOutput(format, \"verticalExtent.minimum\", String.valueOf(TEST_MIN)));\r\n\t\ttext.append(buildHTMLTextOutput(format, \"verticalExtent.maximum\", String.valueOf(TEST_MAX)));\r\n\t\treturn (text.toString());\r\n\t}", "boolean hasExtensionText();", "HtmlPackage getHtmlPackage();", "@Test\r\n public void testGetDescription() {\r\n System.out.println(\"getDescription\");\r\n \r\n String expResult = \"\";\r\n String result = instance.getDescription();\r\n assertEquals(expResult, result);\r\n \r\n \r\n }", "String getDescribe();", "String getDescribe();", "@Override\n public Description getDescription() {\n return suiteDescription;\n }", "public String[] getOutputExtensions();", "@Test\n public void testGetContent_2() {\n System.out.println(\"getContent\");\n MockServletResponse instance = new MockServletResponse();\n\n try (HtmlElement html = HtmlElement.niceOf(instance)) {\n html.getBody().addHeading(\"ABC:ČÁŠ\", \"cssType\");\n }\n String result = instance.toString();\n String expected = String.join(\"\\n\"\n , \"<!DOCTYPE html>\"\n , \"<html lang=\\\"en\\\">\"\n , \"\\t<head>\"\n , \"\\t\\t<meta charset=\\\"UTF-8\\\"/>\"\n , \"\\t\\t<title>Demo</title>\"\n , \"\\t</head>\"\n , \"\\t<body>\"\n , \"\\t\\t<h1 class=\\\"cssType\\\">ABC:ČÁŠ</h1>\"\n , \"\\t</body>\"\n , \"</html>\");\n assertEquals(expected, result);\n\n }", "public boolean isExtensionListInDescription() {\n\t return useExtensionsInDescription;\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "public abstract String getDescription ( );", "String getViewExtension();", "public final SafeHtml getDescription() {\n return description;\n }", "public abstract String getTemplDesc();", "@Test\n\tpublic void h2_header_italic_test() {\n\t\tString text = \"## *heading2*\";\n\t\tassertEquals(\"<html><h2><em>heading2</em></h2></html>\", createHTML(text));\n\t}", "String getExtension();", "private static List<InOut> getHtmlTestCases() {\n final List<InOut> testCases = new ArrayList<>();\n // <p> tag is allowed\n addTestCase(testCases, \"<p>test</p>\");\n // <h7> tag is not allowed\n addTestCase(testCases, \"<h7>test</h7>\", \"test\");\n // href's are allowed to http, https, mailto and ANET objects, but nofollow is added\n addTestCase(testCases, \"<a href=\\\"http://www.example.com/\\\">test</a>\",\n \"<a href=\\\"http://www.example.com/\\\" rel=\\\"nofollow\\\">test</a>\");\n addTestCase(testCases, \"<a href=\\\"https://www.example.com/\\\">test</a>\",\n \"<a href=\\\"https://www.example.com/\\\" rel=\\\"nofollow\\\">test</a>\");\n addTestCase(testCases, \"<a href=\\\"mailto:nobody@example.com/\\\">test</a>\",\n \"<a href=\\\"mailto:nobody&#64;example.com/\\\" rel=\\\"nofollow\\\">test</a>\");\n addTestCase(testCases,\n \"<a href=\\\"urn:anet:people:00000000-0000-0000-0000-000000000000\\\">test</a>\",\n \"<a href=\\\"urn:anet:people:00000000-0000-0000-0000-000000000000\\\" rel=\\\"nofollow\\\">test</a>\");\n // href's to ftp and data are not allowed\n addTestCase(testCases, \"<a href=\\\"ftp://ftp.example.com/\\\">test</a>\", \"test\");\n addTestCase(testCases, \"<a href=\\\"data:MMM\\\">test</a>\", \"test\");\n // but title is\n addTestCase(testCases, \"<a href=\\\"data:MMM\\\" title=\\\"test\\\">test</a>\",\n \"<a title=\\\"test\\\">test</a>\");\n // in-line <img> is allowed\n addTestCase(testCases, \"<img src=\\\"data:image/jpeg;base64;MMM\\\" />\");\n // <img> reference is not allowed\n addTestCase(testCases, \"<img src=\\\"http://www.wexample.com/logo.gif\\\" />\", \"\");\n // allowed <img> attributes\n addTestCase(testCases,\n \"<img title=\\\"test\\\" align=\\\"top\\\" alt=\\\"test\\\" border=\\\"0\\\" name=\\\"test\\\" height=\\\"1\\\" width=\\\"1\\\" hspace=\\\"0\\\" vspace=\\\"0\\\" />\");\n // disallowed <img> attributes\n addTestCase(testCases, \"<img crossorigin=\\\"anonymous\\\" />\", \"\");\n addTestCase(testCases, \"<img onload=\\\"test();\\\" />\", \"\");\n // <script> tag is disallowed\n addTestCase(testCases, \"<script type=\\\"text/javascript\\\">alert(\\\"Hello World!\\\");</script>\",\n \"\");\n return testCases;\n }", "public void ExtentRepoter() {\n\t\treporter = new ExtentHtmlReporter(\"./Reports/learn_automation1.html\");\n\n\t}", "@Test\n public void testGetDescription() {\n System.out.println(\"getDescription\");\n \n String expResult = \"Description\";\n instance.setDescription(expResult);\n String result = instance.getDescription();\n assertEquals(\"Description not as expected\", 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 }", "java.lang.String getDescribe();", "@Test\r\n\tpublic void extendReports() throws IOException {\n\t\tString File = \"./Reports/report.html\";\r\n\t\tExtentHtmlReporter html = new ExtentHtmlReporter(File);\r\n\t\thtml.setAppendExisting(true);\r\n\t\t//to write on the created html file\r\n\t\tExtentReports extents = new ExtentReports();\r\n\t\textents.attachReporter(html);\r\n\t\t\r\n\t\tExtentTest createAccountTest = extents.createTest(\"TC001\", \"CreateAccount\");\r\n\t\tcreateAccountTest.pass(\"username entered\", MediaEntityBuilder.createScreenCaptureFromPath(\"./../snaps/img1.png\").build());\r\n\t\textents.flush();\r\n\t\t\r\n\r\n\t}", "@objid (\"e20e1709-9e0b-4c6a-bf6c-3f3e7b57cdfe\")\n @Override\n boolean isExtension();", "public interface Extension {\r\n\r\n /**\r\n *\r\n * @return the extension name\r\n */\r\n String getName();\r\n}", "protected String getExtension() {\n\t\treturn \"\";\n\t}", "@Test\n public void parserHtml() throws JSONException, IOException {\n }", "@Test\n\tpublic void testGetDescription_1()\n\t\tthrows Exception {\n\t\tTreeData fixture = new TreeData((IFile) null, \"\", 1, 1);\n\n\t\tString result = fixture.getDescription();\n\n\t\t// add additional test code here\n\t\tassertEquals(\"\", result);\n\t}", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription1();", "public String getDescription ();", "@Test\n\tpublic void testBinaryOperationHtmlResponseFromProvider() throws Exception {\n\t\tHttpGet httpGet = new HttpGet(\"http://localhost:\" + ourPort + \"/Patient/html/$binaryOp\");\n\t\thttpGet.addHeader(\"Accept\", \"text/html\");\n\n\t\tCloseableHttpResponse status = ourClient.execute(httpGet);\n\t\tString responseContent = IOUtils.toString(status.getEntity().getContent(), Charsets.UTF_8);\n\t\tstatus.close();\n\t\tassertEquals(200, status.getStatusLine().getStatusCode());\n\t\tassertEquals(\"text/html\", status.getFirstHeader(\"content-type\").getValue());\n\t\tassertEquals(\"<html>DATA</html>\", responseContent);\n\t\tassertEquals(\"Attachment;\", status.getFirstHeader(\"Content-Disposition\").getValue());\n\t}", "public void addDescriptionPage(String _htmlPage, int _width, int _height, boolean _visible) {\r\n\t\tif (OSPRuntime.isJS)\r\n\t\t\treturn;\r\n\t\tHtmlPageInfo pageInfo = model._getHtmlPageInfo(_htmlPage, currentLocaleItem);\r\n\t\tif (pageInfo == null) {\r\n\t\t\tJOptionPane.showMessageDialog(popupTriggeredBy, \"Html file not found: \" + _htmlPage, \"Description Error\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n// if (model._isApplet()) { // So that resource loader minimizes traffic network\r\n// if (!_htmlPage.startsWith(\"/\")) _htmlPage = \"/\" + _htmlPage;\r\n// }\r\n\r\n// System.out.println (\"Locale = \"+this.currentLocaleItem.getKeyword());\r\n// System.out.println (\"Loading html page = \"+pageInfo.getLink());\r\n\r\n\t\tResource htmlRes = ResourceLoader.getResource(pageInfo.getLink());\r\n\t\tif (htmlRes == null) {\r\n\t\t\tSystem.err.println(\"Add description page error : Couldn't find description file: \" + _htmlPage);\r\n\t\t\tSystem.err.println(\"Link = \" + pageInfo.getLink());\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (descriptionDialog == null)\r\n\t\t\tcreateDescriptionDialog(_width, _height);\r\n\r\n\t\ttry {\r\n\t\t\tJEditorPane editorPane = new JEditorPane() {\r\n\t\t\t\t// public void paintComponent(java.awt.Graphics g) {\r\n\t\t\t\t// java.awt.Graphics2D g2 = (java.awt.Graphics2D) g;\r\n\t\t\t\t// g2.setRenderingHint(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING,java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON);\r\n\t\t\t\t// g2.setRenderingHint(java.awt.RenderingHints.KEY_RENDERING,java.awt.RenderingHints.VALUE_RENDER_QUALITY);\r\n\t\t\t\t// super.paintComponent(g2);\r\n\t\t\t\t// }\r\n\t\t\t};\r\n\t\t\tHTMLEditorKit kit = new HTMLEditorKit();\r\n\t\t\teditorPane.setEditorKit(kit);\r\n\t\t\teditorPane.setDocument(kit.createDefaultDocument());\r\n\t\t\t// editorPane.setContentType (\"text/html\");\r\n\t\t\t// editorPane.putClientProperty(com.sun.java.swing.SwingUtilities2.AA_TEXT_PROPERTY_KEY,Boolean.TRUE\r\n\t\t\t// );\r\n\t\t\teditorPane.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, Boolean.TRUE);\r\n\t\t\teditorPane.setEditable(false);\r\n\t\t\t// try {\r\n\t\t\t// kit.getStyleSheet().loadRules(ResourceLoader.openReader(\"_ejs_library/css/ejsPage.css\"),null);\r\n\t\t\t// }\r\n\t\t\t// catch (Exception exc) { exc.printStackTrace(); }\r\n\t\t\teditorPane.addHyperlinkListener(new HyperlinkListener() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void hyperlinkUpdate(HyperlinkEvent e) {\r\n\t\t\t\t\tif (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {\r\n\t\t\t\t\t\topenURL(e.getSource(), e.getURL(), getView().getComponent(getMainWindow()), false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\teditorPane.setPage(htmlRes.getURL());\r\n\t\t\tJScrollPane editorScrollPane = new JScrollPane(editorPane);\r\n\t\t\teditorScrollPane.setPreferredSize(new Dimension(_width, _height));\r\n\t\t\t// descriptionPanel.add(pageInfo.getTitle(),editorScrollPane);\r\n\t\t\t// descriptionDialog.pack();\r\n\t\t\tif (descriptionPagesList == null)\r\n\t\t\t\tdescriptionPagesList = new ArrayList<EditorAndScroll>();\r\n\t\t\tEditorAndScroll pane = new EditorAndScroll(_htmlPage, editorPane, editorScrollPane);\r\n\t\t\tpane.setVisible(_visible);\r\n\t\t\tdescriptionPagesList.add(pane);\r\n\t\t} catch (IOException ioExc) {\r\n\t\t\tSystem.err.println(\"Attempted to read a bad URL: \" + htmlRes.getURL());\r\n\t\t}\r\n\t}", "@AfterClass\n\t/* Executa a leitura das configuracoes do extends report */\n\tpublic static void writeExtentReport() {\n\t\tReporter.loadXMLConfig(new File(\"src/test/resources/configs/extension-config.xml\"));\n\t\t\n\t\t/* Informa qual o sistema foi utilizado para efetuar os testes */\n\t\tReporter.setSystemInfo(\"OS\", \"Windows10\");\n\t\t\n\t\t/* Informa o nome do analista no relatorio */\n\t\tReporter.setSystemInfo(\"Tester Name\", \"Wilker\");\n\t\t\n\t}", "@Test\n \tpublic void testTableThenHR() throws IOException{\n \t\tString testString = \"Tau | MAPT | MCF7,BT20\\nVASP | VASP | MCF7,BT20\\nXIAP | XIAP | MCF7,BT20\\n--------------------------------\\n## Additional Data Details\";\n \t\tString actualResult = processor.markdown2Html(testString, false);\n \t\tassertTrue(actualResult.contains(\"<hr\"));\n \t\tassertFalse(actualResult.contains(\"<del\"));\n \t}", "String getDesc();", "public abstract String getDescription();" ]
[ "0.76374173", "0.64993757", "0.61515373", "0.61515373", "0.60209143", "0.6019908", "0.5913494", "0.5872166", "0.58476263", "0.5826489", "0.5734835", "0.57272154", "0.57064", "0.56935334", "0.5668586", "0.56619495", "0.5606791", "0.55911016", "0.55859405", "0.5583492", "0.55669487", "0.5555673", "0.5554915", "0.551926", "0.551926", "0.55146724", "0.5480319", "0.54786336", "0.54724675", "0.5453252", "0.5453252", "0.5453252", "0.5453252", "0.5453252", "0.5453252", "0.5453252", "0.5453252", "0.5453252", "0.5438529", "0.5422741", "0.5414731", "0.5413578", "0.54052573", "0.54046184", "0.5401963", "0.53999424", "0.5399479", "0.5397616", "0.5390934", "0.538318", "0.5381232", "0.53779674", "0.53706056", "0.5357306", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.53505635", "0.5327922", "0.53231245", "0.53076065", "0.5284142", "0.52841294", "0.5269473", "0.5239198", "0.52331644" ]
0.8541424
0
Interswitch.ENV_SANDBOX, is for sandbox environment Interswitch.ENV_PROD, is for production environment
public static void main(String[] args) { FundsTransfer transfer = new FundsTransfer(clientId, clientSecret, Interswitch.ENV_DEV); try { BankResponse response = transfer.fetchBanks(); // makes network call Bank[] bank = response.getBanks(); // a bank array of all banks if (bank instanceof Object) { // successful Bank testBank = bank[0]; // bank at index 0 String cbnCode = testBank.getCbnCode(); // Central bank code String bankName = testBank.getBankName(); // bank name: String bankCode = testBank.getBankCode(); // bankcode in alphabetical form: UBA, GTB, FBN } else { // error occured } } catch ( Exception ex) { // request was not completed } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void selectPRODUCTIONEnv() {\n ((AppController) getApplication()).setAppEnvironment(AppEnvironment.PRODUCTION);\n editor = settings.edit();\n editor.putBoolean(\"is_prod_env\", false);\n editor.apply();\n }", "public void intServerEnv() {\n\t\tServerUtils serverUtils = new ServerUtils();\n\t\tTouchstoneParsers parsers = new TouchstoneParsers();\n\n\t\tString CONFIGFILE = psoResourcePkg + \"/configs/server.properties\";\n\t\tString testConfigFile = ServerUtils.class.getResource(CONFIGFILE).getFile();\n\n\t\tHashMap<String, HashMap<String, String>> configPropsMap = parsers.readPropsFile(new File(testConfigFile));\n\t\thostIP = (configPropsMap.get(\"URL_PARAMS\").get(\"LOCAL_ENV\").equalsIgnoreCase(\"yes\") ? \"localhost\" : serverUtils.getHostIp());\n\n\t\t// JDBC driver name and database URL\n\t\tJDBC_DRIVER=\"com.mysql.jdbc.Driver\";\n\t\tDB_URL=\"jdbc:mysql://\" + hostIP + \"/psotest\";\n\n\t\t// Database credentials\n\t\tUSERID = configPropsMap.get(\"SERVER_ENV\").get(\"USERID\");\n\t\tPASSWORD = configPropsMap.get(\"SERVER_ENV\").get(\"PASSWORD\");\n\n\t\t// Database tables:\n\t\tCLICKS_TABLE = configPropsMap.get(\"SERVER_ENV\").get(\"CLICKS_TABLE\");\n\t\tBEACON_TABLE = configPropsMap.get(\"SERVER_ENV\").get(\"BEACON_TABLE\");\n\n\t}", "private Map<String, String> getTestProcessEnvironment() {\n Map<String, String> env = new HashMap<>();\n env.put(\"TESTSERVICE_AUTH_TYPE\", \"noAuth\");\n return env;\n }", "private int getEnvironment() {\n\n if (ServiceBaseGlobal.env != null) {\n return ServiceBaseGlobal.env.getValue();\n }\n return ProjectUtil.Environment.dev.getValue();\n }", "private void selectProdEnv() {\n\n new Handler(getMainLooper()).postDelayed(new Runnable() {\n @Override\n public void run() {\n ((AppController) getApplication()).setAppEnvironment(AppEnvironment.PRODUCTION);\n editor = settings.edit();\n editor.putBoolean(\"is_prod_env\", true);\n editor.apply();\n }\n }, AppPreference.MENU_DELAY);\n }", "String getEnvironment();", "public boolean isProdEnvironment() {\n\n\t\tif (driver.getCurrentUrl().contains(\"www.homedepot.com\")\n\t\t\t\t|| dataHelper.getCommonData(CommonDataColumn.EnvironmentUrl)\n\t\t\t\t\t\t.contains(\"www.homedepot.com\")\n\t\t\t\t|| HelperClass.baseModel.runEnvironment.equals(\"Prod\")) {\n\n\t\t\treturn true;\n\n\t\t} else {\n\n\t\t\treturn false;\n\t\t}\n\t}", "private static String getEnvironVar(String env) {\r\n \treturn System.getenv(env);\r\n }", "private static Map<String, Environment> getEnvironments() {\n Map<String, Environment> environmentMap = new HashMap<String, Environment>();\n Environment prodEnv = new Environment();\n prodEnv.setName(PROD_1);\n prodEnv.setPassword(PROD_1_PASSWORD);\n\n Environment sandBoxEnv = new Environment();\n sandBoxEnv.setName(SND_1);\n sandBoxEnv.setPassword(SND_1_PASSWORD);\n\n environmentMap.put(PROD_1, prodEnv);\n environmentMap.put(SND_1, sandBoxEnv);\n return environmentMap;\n }", "public static String extractEnvironment(String string) {\n\t\t\n\t\tlogger.trace(\"Extracting environment from service name: {}\" , string);\n\t\t\n\t\tif(string.length() < 3 ){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tString env = string.substring(0,3);\n\t\tif (env.equalsIgnoreCase(\"DEV\") || env.equalsIgnoreCase(\"UAT\") || env.equalsIgnoreCase(\"LAB\")){\n\t\t\treturn env;\n\t\t}\n\t\t\n\t\tif(string.length() < 4 ){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tenv = string.substring(0,4);\n\t\tif (env.equalsIgnoreCase(\"PROD\") || env.equalsIgnoreCase(\"TEST\") || env.equalsIgnoreCase(\"PERF\")){\n\t\t\treturn env;\n\t\t}\n\t\treturn null;\n\t}", "private void checkProductionMode() {\n if (getApplicationOrSystemProperty(SERVLET_PARAMETER_DEBUG, \"true\")\n .equals(\"false\")) {\n // \"Debug=true\" is the old way and should no longer be used\n productionMode = true;\n } else if (getApplicationOrSystemProperty(\n SERVLET_PARAMETER_PRODUCTION_MODE, \"false\").equals(\"true\")) {\n // \"productionMode=true\" is the real way to do it\n productionMode = true;\n }\n \n if (!productionMode) {\n /* Print an information/warning message about running in debug mode */\n // TODO Maybe we need a different message for portlets?\n logger.warning(NOT_PRODUCTION_MODE_INFO);\n }\n }", "private void loadPropertiesFromBluemixVcap() {\n\t\ttry {\n\t\t\tJSONObject vcapServiceInfos = BluemixEnvConfiguration.getServicesVcaps();\n\t\t\tif (vcapServiceInfos != null) {\n//\t\t\t\tBluemixEnvConfiguration bmEnvCfg = new BluemixEnvConfiguration();\n//\t\t\t\tssosvc_name = bmEnvCfg.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"name\").toString();\n//\t\t\t\tssosvc_label = bmEnvCfg.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"label\").toString();\n//\t\t\t\tssosvc_plan = bmEnvCfg.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"plan\").toString();\n//\t\t\t\t// String[] ssosvc_credentials = (String[]) BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials\");\n//\t\t\t\tssosvc_cred_clientId = bmEnvCfg.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.clientId\").toString();\n//\t\t\t\tssosvc_cred_secret = bmEnvCfg.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.secret\").toString();\n//\t\t\t\tssosvc_cred_serverSupportedScope = bmEnvCfg.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.serverSupportedScope\").toString();\n//\t\tlLogger.info(DEBUG_PREFIX + \"CONFIG FILE parsing, found Scopes = \" + ssosvc_cred_serverSupportedScope + \" for service name = \" + ssosvc_name);\t\n//\t\t Pattern seperators = Pattern.compile(\".*\\\\[ *(.*) *\\\\].*\");\n//\t\t if (seperators != null) {\n//\t\t \tMatcher scopeMatcher = seperators.matcher(ssosvc_cred_serverSupportedScope);\n//\t\t\t scopeMatcher.find();\n//\t\t\t ssosvc_cred_serverSupportedScope = scopeMatcher.group(1); // only get the first occurrence\n//\t\t\t lLogger.info(DEBUG_PREFIX + \"VCAP_SERVICE config parsing, retrieved first Scope = \" + ssosvc_cred_serverSupportedScope);\n//\t\t }\t\t\t\tssosvc_cred_issuerIdentifier = bmEnvCfg.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.issuerIdentifier\").toString();\n//\t\t\t\tssosvc_cred_authorizationEndpointUrl = bmEnvCfg.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.authorizationEndpointUrl\").toString();\n//\t\t\t\tssosvc_cred_tokenEndpointUrl = bmEnvCfg.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.tokenEndpointUrl\").toString();\n\t\t\t\tssosvc_name = BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"name\").toString();\n\t\t\t\tssosvc_label = BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"label\").toString();\n\t\t\t\tssosvc_plan = BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"plan\").toString();\n\t\t\t\t// String[] ssosvc_credentials = (String[]) BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials\");\n\t\t\t\tssosvc_cred_clientId = BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.clientId\").toString();\n\t\t\t\tssosvc_cred_secret = BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.secret\").toString();\n\t\t\t\tssosvc_cred_serverSupportedScope = BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.serverSupportedScope\").toString();\n\tlLogger.info(DEBUG_PREFIX + \"CONFIG FILE parsing, found Scopes = \" + ssosvc_cred_serverSupportedScope + \" for service name = \" + ssosvc_name);\t\n\t\t Pattern seperators = Pattern.compile(\".*\\\\[ *(.*) *\\\\].*\");\n\t\t if (seperators != null) {\n\t\t \tMatcher scopeMatcher = seperators.matcher(ssosvc_cred_serverSupportedScope);\n\t\t\t scopeMatcher.find();\n\t\t\t ssosvc_cred_serverSupportedScope = scopeMatcher.group(1); // only get the first occurrence\n\t\t\t lLogger.info(DEBUG_PREFIX + \"VCAP_SERVICE config parsing, retrieved first Scope = \" + ssosvc_cred_serverSupportedScope);\n\t\t }\t\t\t\tssosvc_cred_issuerIdentifier = BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.issuerIdentifier\").toString();\n\t\t\t\tssosvc_cred_authorizationEndpointUrl = BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.authorizationEndpointUrl\").toString();\n\t\t\t\tssosvc_cred_tokenEndpointUrl = BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.tokenEndpointUrl\").toString();\n\n\t\t\t\tlLogger.info(DEBUG_PREFIX + \"VCAP_SERVICE found for service name = \" + ssosvc_name);\n\t\t\t} else {\n\t\t\t\tlLogger.severe(DEBUG_PREFIX + \"VCAP_SERVICE and/or VCAP_APPLICATION information not accessible! Using default connection settings.\");\t\t\t\t\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tlLogger.severe(DEBUG_PREFIX + \"VCAP_SERVICE and/or VCAP_APPLICATION information not accessible! Using default connection settings.\");\n\t\t\te.printStackTrace();\n\t\t}\n \t}", "@Property(name = \"staging:ssl\")\n public abstract boolean isSsl();", "@Test\n public void whenEnvironmentIsWeb_thenUrlsShouldStartWithHttp() {\n String address = \"https://www.geeksforgeeks.org/run-levels-linux/\";\n assumingThat(!\"WEB\".equals(System.getenv(\"ENV\")),\n () -> {\n assertTrue(address.startsWith(\"http\"));\n });\n\n\n }", "private void randomizeEnvironment() {\n }", "public String getEnvironment(){\n\n String env = null;\n try {\n env = System.getProperty(\"env\");\n if(env !=null)\n return env;\n else\n return prop.getProperty(ENVIRONMENT_KEY);\n\n }catch(Exception e)\n {\n return prop.getProperty(ENVIRONMENT_KEY);\n }\n }", "public String getWebEnv(int i){\n return this.webEnvs.get(i);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n// EnvUtils.setEnv(EnvUtils.EnvEnum.SANDBOX);\n super.onCreate(savedInstanceState);\n initView();\n initData();\n }", "public String getSystemEnv() {\n return \"\";\n }", "public void determineBaseUrl() {\n if (Environment.isLatest()) {\n baseUrl = \"api-latest.wdpro.starwave.com\";\n } else if (Environment.isStage()) {\n baseUrl = \"api-stage.wdpro.starwave.com\";\n } else if (Environment.isENV4()) {\n baseUrl = \"api-latest.wdpro.starwave.com\";\n } else if (Environment.isENV2()) {\n // baseUrl = \"api-qa.wdpro.disney.go.com:8088\";\n baseUrl = \"api-env2.wdpro.starwave.com\";\n } else if (Environment.isSoftLaunch()) {\n baseUrl = \"api.wdpro.disney.go.com\";\n } else if (Environment.isShadow()) {\n baseUrl = \"api-shadow.wdpro.starwave.com\";\n } else if (Environment.isProduction()) {\n baseUrl = \"api.wdpro.disney.go.com\";\n } else {\n baseUrl = \"api.wdpro.disney.go.com\";\n }\n }", "@BeforeTest\n public void setupEnv() {\n CLUSTER.start();\n endpoints = CLUSTER.getClientEndpoints();\n Client client = Client.builder()\n .endpoints(endpoints)\n .build();\n\n this.authDisabledKVClient = client.getKVClient();\n this.authDisabledAuthClient = client.getAuthClient();\n }", "public String getEnv() {\n\n return env;\n }", "public static boolean isDevEnv() {\n return (Boolean) Launch.blackboard.get(\"fml.deobfuscatedEnvironment\");\n }", "public static LinkedHashMap<String, String> getServerEnvi() {\n return _m_server_envi;\n }", "public static boolean inAwsEnv() {\n\t\treturn RuntimeParamUtil.isAwsMode();\n\t}", "public Verif() {\n\t\tenv = new Environ();\n\t}", "@Before\n public void setupEnvironment() {\n TestEnvironment testEnvironment;\n switch (mode) {\n case CLUSTER:\n // This only works because of the quirks we built in the TestEnvironment.\n // We should refactor this in the future!!!\n testEnvironment = MINI_CLUSTER_RESOURCE.getTestEnvironment();\n testEnvironment.getConfig().disableObjectReuse();\n testEnvironment.setAsContext();\n break;\n case CLUSTER_OBJECT_REUSE:\n // This only works because of the quirks we built in the TestEnvironment.\n // We should refactor this in the future!!!\n testEnvironment = MINI_CLUSTER_RESOURCE.getTestEnvironment();\n testEnvironment.getConfig().enableObjectReuse();\n testEnvironment.setAsContext();\n break;\n case COLLECTION:\n new CollectionTestEnvironment().setAsContext();\n break;\n }\n }", "boolean k2h_load_debug_env();", "public Map<String, String> getEnvironment();", "java.lang.String getEnv(int index);", "private static boolean development() {\n final String mode = mode();\n return \"dev\".equalsIgnoreCase(mode);\n }", "@Test\n void testIsProdMode() {\n\n BaseSpringParent s1 = bean(\"beanProd\", BaseSpringParent.class);\n Assertions.assertTrue(s1.isProdMode());\n }", "String provisioningState();", "public String getEnvironment() {\n return environment;\n }", "public static void read_Environment_Variable_for_Web() {\n\t\tProperties prop = new Properties();\n\t\tInputStream input = null;\n\n\t\ttry {\n\n\t\t\tinput = new FileInputStream(\"/Environment File/environmentVariableForWebProduction2.properties\");\n\n\t\t\t// load a properties file\n\t\t\tprop.load(input);\n\n\t\t\t// get the property value and print it out\n\t\t Map<String, Object> map = new HashMap<>();\n\t\t\tfor (Entry<Object, Object> entry : prop.entrySet()) {\n\t\t\t\tmap.put((String) entry.getKey(), entry.getValue());\n\t\t\t}\n\t\t\tEnvironmentVariablesForWeb.setEnvironmentPropertyMap(map);\n\t\t\t/*EnvironmentVariables.PLATFORM_NAME = prop.getProperty(\"PLATFORM_NAME\");\n\t\t\tEnvironmentVariables.VERSION_NAME = prop.getProperty(\"VERSION_NAME\");\n\t\t\tEnvironmentVariables.DEVICE_NAME = prop.getProperty(\"DEVICE_NAME\");\n\t\t\tSystem.out.println(EnvironmentVariables.PLATFORM_NAME);\n\t\t\tSystem.out.println(EnvironmentVariables.VERSION_NAME);\n\t\t\tSystem.out.println(EnvironmentVariables.DEVICE_NAME);*/\n\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tif (input != null) {\n\t\t\t\ttry {\n\t\t\t\t\tinput.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t }", "public java.lang.Boolean getProduction() {\n return genClient.cacheGet(CacheKey.production);\n }", "public boolean isProductionMode() {\n return productionMode;\n }", "Properties getEnvironment();", "Properties getEnvironment();", "private static void loadTestEnv() {\n\n\t\tPropertyReader reader = new PropertyReader(GlobalContext.getAppDir(), Constants.FILENAME_TESTENV);\n\n\t\tTestEnv env = new TestEnv();\n\t\tenv.setDefaultHostName(reader.getProperty(Constants.DEFAULT_HOST_NAME));\n\t\tenv.setDefaultHostOS(reader.getProperty(Constants.DEFAULT_HOST_OS));\n\t\tenv.setDefaultCredentials(reader.getProperty(Constants.DEFAULT_CREDENTIALS));\n\t\tenv.setDefaultBrowser(reader.getProperty(Constants.DEFAULT_BROWSER));\n\t\tenv.setAppServer(reader.getProperty(Constants.APP_SERVER));\n\t\tenv.setDatabaseServer(reader.getProperty(Constants.DATABASE_SERVER));\n\t\tenv.setEmailReceipients(reader.getProperty(Constants.EMAIL_RECEIPIENTS));\n\t\tenv.setEmailSender(reader.getProperty(Constants.EMAIL_SENDER));\n\n\t\t// sets to global context.\n\t\tGlobalContext.setTestEnv(env);\n\t}", "private void getConfigurationInfo(BankFusionEnvironment env) {\n controlDetails = ATMConfigCache.getInstance().getInformation(env);\n if (controlDetails != null) {\n sharedSwitch = controlDetails.isSharedSwitch();\n }\n }", "private static void initForProd() {\r\n try {\r\n appTokenManager = new AppTokenManager();\r\n app = new CerberusApp(301L, \"3dd25f8ef8429ffe\",\r\n \"526fbde088cc285a957f8c2b26f4ca404a93a3fb29e0dc9f6189de8f87e63151\");\r\n appTokenManager.addApp(app);\r\n appTokenManager.start();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "ProvisioningState provisioningState();", "ProvisioningState provisioningState();", "ProvisioningState provisioningState();", "Environment createEnvironment();", "Environment createEnvironment();", "public void processVCAPServices() {\n\t\tif (!BluemixContextManager.getInstance().isRunningOnBluemix()) {\n\t\t\treturn;\n\t\t}\n\n\t\tJsonJavaObject sysEnv = getVcapServices();\n\t\tif (sysEnv == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (sysEnv.containsKey(serviceName)) {\n\t\t\tJsonJavaArray services = sysEnv.getAsArray(serviceName);\n\t\t\tJsonJavaObject service = (JsonJavaObject) services.get(0);\n\t\t\tJsonJavaObject credentials = (JsonJavaObject) service\n\t\t\t\t\t.get(\"credentials\");\n\t\t\tsetBaseUrl((String) credentials.get(\"url\"));\n\t\t\tsetUsername((String) credentials.get(\"username\"));\n\t\t\tsetPassword((String) credentials.get(\"password\"));\n\n\t\t}\n\t}", "public boolean hasProduction() {\n return genClient.cacheHasKey(CacheKey.production);\n }", "private static String mode() {\n return System.getProperty(SYSTEM_PROPERTY_NAME, System.getenv(ENV_VARIABLE_NAME));\n }", "public boolean isNotNullProduction() {\n return genClient.cacheValueIsNotNull(CacheKey.production);\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n boolean boolean0 = DBUtil.existsEnvironment(\"alter session\");\n assertFalse(boolean0);\n }", "protected boolean isDevelopment() {\n\t\treturn ArrayUtils.contains(environment.getActiveProfiles(), \"dev\")\n\t\t\t\t|| ArrayUtils.contains(environment.getActiveProfiles(), \"test\");\n\t}", "public Production(String depositKey, String secretKey) {\n super(depositKey, secretKey, PRODUCTION_BASE_URL);\n }", "@BeforeAll\n public static void configInitialization() {\n System.setProperty(\"VSAC_DRC_URL\", \"https://vsac.nlm.nih.gov/vsac\");\n System.setProperty(\"SERVER_TICKET_URL\", \"https://vsac.nlm.nih.gov/vsac/ws/Ticket\");\n System.setProperty(\"SERVER_SINGLE_VALUESET_URL\", \"https://vsac.nlm.nih.gov/vsac/ws/RetrieveValueSet?\");\n System.setProperty(\"SERVER_MULTIPLE_VALUESET_URL_NEW\", \"https://vsac.nlm.nih.gov/vsac/svs/RetrieveMultipleValueSets?\");\n System.setProperty(\"SERVICE_URL\", \"http://umlsks.nlm.nih.gov\");\n System.setProperty(\"PROFILE_SERVICE\", \"https://vsac.nlm.nih.gov/vsac/profiles\");\n System.setProperty(\"VERSION_SERVICE\", \"https://vsac.nlm.nih.gov/vsac/oid/\");\n }", "public interface RealEnvironment extends Environment {\n\n}", "public String getEnvironment(String env) {\n\t\treturn environment.get(env);\n\t}", "@BeforeClass(alwaysRun = true)\n public void setEnvironment() throws Exception {\n \n esbRequestHeadersMap = new HashMap<String, String>();\n \n apiRequestHeadersMap = new HashMap<String, String>();\n \n init(\"agilezen-connector-1.0.2-SNAPSHOT\");\n \n esbRequestHeadersMap.put(\"Accept\", \"application/json\");\n esbRequestHeadersMap.put(\"Content-Type\", \"application/json\");\n \n apiRequestHeadersMap.putAll(esbRequestHeadersMap);\n \n apiRequestHeadersMap.put(\"X-Zen-ApiKey\", connectorProperties.getProperty(\"apiKey\"));\n apiRequestUrl = connectorProperties.getProperty(\"apiUrl\") + \"/api/v1\";\n \n }", "public void sandbox(boolean sandbox) {\n this.sandbox = sandbox;\n }", "boolean check (Env env) {\n return true;\n }", "@Test\n public void useAppContext() {\n Context appContext = getInstrumentation().getTargetContext();\n assertEquals(\"com.example.gestionreunion\", appContext.getPackageName());\n }", "private boolean getStandalone( HttpServletRequest request )\r\n {\r\n String strStandalone = request.getParameter( PARAMETER_STANDALONE );\r\n if ( strStandalone != null && ( strStandalone.equalsIgnoreCase( \"true\" ) || strStandalone.equalsIgnoreCase( \"on\" ) ) )\r\n {\r\n return true;\r\n }\r\n strStandalone = AppPropertiesService.getProperty( PROPERTY_STANDALONE );\r\n if ( strStandalone != null && ( strStandalone.equalsIgnoreCase( \"true\" ) || strStandalone.equalsIgnoreCase( \"on\" ) ) )\r\n {\r\n return true;\r\n }\r\n return false;\r\n }", "public Sandbox(String depositKey, String secretKey) {\n super(depositKey, secretKey, SANDBOX_BASE_URL);\n }", "@Test\n public void testGetEnvironmentApplications() {\n EnvironmentViewBuilder builder = EnvironmentViewBuilder.getInstance(\"Test environment\");\n builder.setServerDAO(new MockEnvironmentViewDAO());\n builder.setRunningApplicationChecker(new MockRunningApplicationChecker());\n EnvironmentView view = builder.getEnvironmentView(Long.MAX_VALUE);\n Assert.assertEquals(\"Test Application\", view.getRows().get(2).getApplicationName());\n Assert.assertEquals(\"Test Application\", view.getRows().get(2).getApplication().getNameInEnvironmentView());\n\n ServerSessionPool ssp = allSessionPools.getServerSessionPool(server);\n // if you get connection refused try installing openssh-server. On Ubuntu...\n //\n // sudo apt update\n // sudo apt install openssh-server\n // sudo systemctl status ssh\n //\n // and generate your public/private rsa key pair.\n //\n // ssh-keygen -t rsa\n //\n Session session = ssp.getSession(\"testGetEnvironmentApplications\");\n session.setEnvironmentName(\"Test environment\");\n\n ApplicationViewBuilder applicationViewBuilder = new ApplicationViewBuilder();\n String apps = applicationViewBuilder.getEnvironmentApplications(session.getSessionId());\n\n // It finds the environment from the sessionId and lists all applications on the server.\n\n Assert.assertEquals(\"sessionID............: \" + session.getSessionId() + \"\\n\" +\n \"nameInEnvironmentView: Test Application\\n\" +\n \"fileName.............: applications/test-application-with-long-name-001.txt\\n\" +\n \"ps -ef | grep java...: test-application\\n\" +\n \"and stdout '1' from..: if [ -d /var/log/test-application ] ; then echo \\\"1\\\" ; else echo \\\"0\\\"; fi\\n\" +\n \"and stdout '1' from..: echo 1\\n\" +\n \"<\\n\" +\n \"sessionID............: \" + session.getSessionId() + \"\\n\" +\n \"nameInEnvironmentView: Environment monitor\\n\" +\n \"fileName.............: applications/environment-monitor-001.txt\\n\" +\n \"ps -ef | grep java...: monitor.api.Main\"\n , apps);\n allSessionPools.logoutAllSessionsOnAllServers(\"testGetEnvironmentApplications\");\n\n }", "private static ModelFileEnv m114844k() {\n if (!C7163a.m22363a() || !f93230L.mo93342a(AVSettings.Property.ModelFileTestEnv)) {\n return ModelFileEnv.ONLINE;\n }\n return ModelFileEnv.TEST;\n }", "@Parameters({\"sandbox\",\"browser\"})//allows to pass the values of Environment & Browser Type\n\t@Test (priority=0)\n\tpublic void TestInitialSetup(@Optional(\"Test\")String sandbox,@Optional(\"mozilla\")String browser){//default values are Environment=Test & Browser=Mozilla \n\t\tapp.InitialSetup(sandbox,browser);\n\t}", "public interface Api {\n String APP_DOMAIN = \"https://devapi.90sbid.com\";\n String RequestSuccess = \"0\";\n}", "private String getEncryptedEnvironmentVariable(String keyName) {\n return decryptKey(System.getenv(keyName));\n }", "public String getContainerEnv() {\n return containerEnv;\n }", "protected String getenv(String varname) {\n\t\t//return System.getProperty(varname);\n\t\treturn \"\"; //TODO allow virtual system variables for each computer, that are remembered on restart\n\t}", "@Before\n public void setUp() throws Exception {\n String apiKey = System.getenv(\"OST_KIT_API_KEY\");\n if ( null == apiKey ) {\n throw new Exception(\"Environment Variable OST_KIT_API_KEY is not set.\");\n }\n \n // get the ost kit api secret from environment.\n String apiSecret = System.getenv(\"OST_KIT_API_SECRET\");\n if ( null == apiSecret ) {\n throw new Exception(\"Environment Variable OST_KIT_API_SECRET is not set.\");\n }\n \n // get the ost kit api endpoint from environment.\n String v0Endpoint = System.getenv(\"OST_KIT_API_ENDPOINT\");\n if ( null == v0Endpoint ) {\n throw new Exception(\"Environment Variable OST_KIT_API_ENDPOINT is not set.\");\n }\n \n // get the ost kit api endpoint for v1 version from environment.\n String v1Endpoint = System.getenv(\"OST_KIT_API_V1_ENDPOINT\");\n if ( null == v1Endpoint ) {\n throw new Exception(\"Environment Variable OST_KIT_API_V1_ENDPOINT is not set.\");\n }\n\n apiV0Params = new HashMap<String, Object>();\n apiV0Params.put( \"apiKey\", apiKey);\n apiV0Params.put( \"apiSecret\", apiSecret);\n apiV0Params.put( \"apiEndpoint\", v0Endpoint);\n\n apiV1Params = new HashMap<String, Object>();\n apiV1Params.put( \"apiKey\", apiKey);\n apiV1Params.put( \"apiSecret\", apiSecret);\n apiV1Params.put( \"apiEndpoint\", v1Endpoint);\n }", "private void debugAuthentcation() {\n\n\t\t/*\n\t\t * XPagesUtil.showErrorMessage(\"bluemix util: serviceName: \" +\n\t\t * serviceName + \", baseUrl: \" + baseUrl + \" username: \" + username +\n\t\t * \" password: \" + password);\n\t\t * XPagesUtil.showErrorMessage(\"bluemix util: service name: \" +\n\t\t * serviceName + \", hardcodedBaseUrl: \" + hardcodedBaseUrl +\n\t\t * \" hardcodedUsername: \" + hardcodedUsername + \" hardcodedPassword: \" +\n\t\t * hardcodedPassword);\n\t\t */\n\t}", "@Override\n public void execute(IEnvironment env)\n {\n \n }", "private void setupEnvironment() {\n // Create mocks for configurations\n bgpConfig = createMock(BgpConfig.class);\n participantsConfig = createMock(SdxParticipantsConfig.class);\n\n // Create mocks for services\n coreService = new TestCoreService();\n configService = new TestNetworkConfigService();\n registry = new NetworkConfigRegistryAdapter();\n interfaceService = createMock(InterfaceService.class);\n interfaceService.addListener(anyObject(InterfaceListener.class));\n expectLastCall().anyTimes();\n intentSynchronizer = createMock(IntentSynchronizationService.class);\n }", "public String getTccConfigInstrumentOrigin() {\n return \"phoenix\";\n }", "public interface Constants {\n String API_ENDPOINT = \"http://dcb86d07.ngrok.io\";\n}", "public java.lang.String getEnv(int index) {\n return env_.get(index);\n }", "@Test\n public void useAppContext() {\n assertEquals(\"com.mango.puppet.test\", appContext.getPackageName());\n }", "@Before\n\tpublic void setUp() {\n accessToken = \"123\";\n xeroTenantId = \"xyz\";\n \n // Init projectApi client\n // NEW Sandbox for API Mocking\n\t\tdefaultClient = new ApiClient(\"https://ba3fd247-8fc6-4d7c-bcd1-bdbea4ea1803.mock.pstmn.io/payroll.xro/2.0\",null,null,null,null);\n payrollUkApi = PayrollUkApi.getInstance(defaultClient); \n \n\t}", "public interface WebConstants {\n\n String REQUEST_ATTR_ORIGIN_IP = \"ORIGIN_IP\";\n\n String USER_LOGIN_STATUS = \"USER_LOGIN_STATUS\";\n}", "@Override\n\tpublic Environment<String, V> getEnvironment() {\n\t\treturn null;\n\t}", "public interface WebContainerConstants\n{\n\n /**\n * Service PID used for configuration.\n */\n static final String PID = \"org.ops4j.pax.web\";\n\n /**\n * Init param name for specifying a context name.\n */\n static final String CONTEXT_NAME = \"webapp.context\";\n\n /**\n * Servlet init param name for specifying a servlet name.\n */\n static final String SERVLET_NAME = \"servlet-name\";\n\n /**\n * Filter init param name for specifying a filter name.\n */\n static final String FILTER_NAME = \"filter-name\";\n\n /**\n * Filter init param name for specifying a filter-mapping dispatch behaviour\n * Must be a comma delimited string of:\n * <ol>\n * <li>request</li>\n * <li>forward</li>\n * <li>include</li>\n * <li>error</li>\n * </ol>\n *\n * values are not case sensitive.\n */\n static final String FILTER_MAPPING_DISPATCHER = \"filter-mapping-dispatcher\".intern();\n\n static final String PROPERTY_HTTP_USE_NIO = \"org.osgi.service.http.useNIO\";\n static final String PROPERTY_HTTP_PORT = \"org.osgi.service.http.port\";\n static final String PROPERTY_HTTP_SECURE_PORT = \"org.osgi.service.http.port.secure\";\n static final String PROPERTY_HTTP_ENABLED = \"org.osgi.service.http.enabled\";\n static final String PROPERTY_HTTP_SECURE_ENABLED = \"org.osgi.service.http.secure.enabled\";\n\n static final String PROPERTY_SSL_KEYSTORE = PID + \".ssl.keystore\";\n static final String PROPERTY_SSL_KEYSTORE_TYPE = PID + \".ssl.keystore.type\";\n static final String PROPERTY_SSL_PASSWORD = PID + \".ssl.password\";\n static final String PROPERTY_SSL_KEYPASSWORD = PID + \".ssl.keypassword\";\n\n static final String PROPERTY_SSL_CLIENT_AUTH_WANTED = PID + \".ssl.clientauthwanted\";\n static final String PROPERTY_SSL_CLIENT_AUTH_NEEDED = PID + \".ssl.clientauthneeded\";\n\n static final String PROPERTY_SESSION_TIMEOUT = PID + \".session.timeout\";\n static final String PROPERTY_SESSION_COOKIE = PID + \".session.cookie\";\n static final String PROPERTY_SESSION_URL = PID + \".session.url\";\n static final String PROPERTY_WORKER_NAME = PID + \".worker.name\";\n\n static final String PROPERTY_TEMP_DIR = \"javax.servlet.context.tempdir\";\n\n static final String PROPERTY_LISTENING_ADDRESSES = PID + \".listening.addresses\";\n\n static final String PROPERTY_LOG_NCSA_ENABLED = \"org.ops4j.pax.web.log.ncsa.enabled\";\n static final String PROPERTY_LOG_NCSA_FORMAT = \"org.ops4j.pax.web.log.ncsa.format\";\n static final String PROPERTY_LOG_NCSA_RETAINDAYS = \"org.ops4j.pax.web.log.ncsa.retaindays\";\n static final String PROPERTY_LOG_NCSA_APPEND = \"org.ops4j.pax.web.log.ncsa.append\";\n static final String PROPERTY_LOG_NCSA_EXTENDED = \"org.ops4j.pax.web.log.ncsa.extended\";\n static final String PROPERTY_LOG_NCSA_LOGTIMEZONE = \"org.ops4j.pax.web.log.ncsa.logtimezone\";\n static final String PROPERTY_LOG_NCSA_LOGDIR = \"org.ops4j.pax.web.log.ncsa.directory\";\n\n /**\n * Servlet context attribute containing the bundle context of the bundle registereing the http context.\n */\n static final String BUNDLE_CONTEXT_ATTRIBUTE = \"osgi-bundlecontext\";\n \n static final String PROPERTY_SERVER_CONFIGURATION_FILE = PID + \".config.file\";\n \n}", "public void updateEnvironment(Context context, JSONObject post) {\n try {\n post.put(Jsonkey.Environment.getKey(), isPackageInstalled(context) ? Jsonkey.NativeApp.getKey() : Jsonkey.InstantApp.getKey());\n } catch (Exception e) {\n }\n }", "@Test\n public void testLoadEnvironmentVariable() throws Exception {\n try {\n dao.loadEnvironmentVariable();\n } catch (DataPersistenceException e) {\n fail(e.getMessage());\n }\n }", "@Test\n public void useAppContext() {\n Context appContext = getInstrumentation().getTargetContext();\n assertEquals(\"test.cn.myapplication\", appContext.getPackageName());\n\n System.out.println(\"测试进行中......\");\n\n }", "public interface AppConfigService {\n /**\n * 获取中台AppKey\n * @return\n */\n String getAppKey();\n /**\n * 获取中台channel\n * @return\n */\n String getChannel();\n /**\n * 获取中台domain\n * @return\n */\n String getMiddleDomain();\n /**\n * 获取自己服务器domain\n * @return\n */\n String getOwnDomain();\n /**\n * 获取网页domain\n * @return\n */\n String getH5Domain();\n\n /**\n * 获取weex远端地址目录\n * @return\n */\n String getWeexDomain();\n /**\n * 获取全局ApplicationContext\n * @return\n */\n Application getApplication();\n}", "public static boolean isProductionMode() {\n return getConfiguration() != null && ApplicationConfiguration.PRODUCTION_MODE\n .equals(getConfiguration().applicationMode());\n }", "public java.lang.String getEnv(int index) {\n return env_.get(index);\n }", "static boolean env_var_value(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"env_var_value\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, \"env\");\n r = r && consumeTokens(b, 0, L_PAREN, STRING, R_PAREN);\n exit_section_(b, m, null, r);\n return r;\n }", "@BeforeClass(alwaysRun = true)\n\t@Parameters(\"Environment\")\n\tpublic void startEnvironment(String sEnv) {\n\t\ttry {\n\t\t\tcs = null;\n\t\t\tal = new AppLib(cs);\n\t\t\tal.setEnvironmentInfo(sEnv);\n\t\t\tproxy = al.getHttpProxy();\n\t\t\tapi = new API();\n\t\t\tapi.setProxy(proxy);\n\t\t\tmydb = al.getMongoDbConnection();\n\t\t\tma = new MemberAPIs();\n\t\t\tmember = new TC01_FindMemberFromDB();\n\t\t\t} catch (Exception e) {\n\t\t\t\tfail(e.toString());\n\t\t\t\t}\n\t}", "public interface EnvironmentAware extends Aware{\n void setEnvironment(Environment ev);\n}", "@Before\n public void initValidString() {\n appStateParcel = new AppStateParcel();\n sessionParcel = new SessionParcel();\n evaluationParcel = new EvaluationParcel();\n appStateParcel.setAppMode(AppStateParcel.NORMAL_MODE);\n appStateParcel.setUserType(AppStateParcel.TEACHER);\n appStateParcel.setUserId(\"1\");\n appStateParcel.setToken(TOKEN);\n }", "@Override\n\tpublic String getName() {\n\t\treturn \"Production Configuration\";\n\t}", "public void setEnvironment(String environment1) {\n this.environment = environment1;\n }", "public static String getdevBaseUrl(){\n\n return DEV_BASE_URL;\n }", "public static void checkEnvironmentVars() throws Exception {\n String apiBaseUrl = System.getenv(\"DIRECTUS_API_HOST\");\n String token = System.getenv(\"DIRECTUS_ADMIN_TOKEN\");\n if (apiBaseUrl == null || token == null) {\n if (apiBaseUrl == null) {\n System.out.println(\"environment variable DIRECTUS_ADMIN_TOKEN must be set\");\n }\n\n if (token == null) {\n System.out.println(\"environment variable DIRECTUS_API_HOST must be set\");\n }\n System.exit(-2);\n }\n }", "@Test\n public void testDescSuportedContext() throws Throwable\n {\n testDescDeployment(\"supported\");\n }", "@Test\r\npublic void baseDirectory() throws Exception{\r\n\taccessdata.setAppguid(\"shiv223acharya\");\r\n\tSystem.out.println(accessdata.getAppguid()); \r\n\t/*primaryService.setAppurl(\"NodeJS/Authentication_Template\");\r\n\t\r\n\tJSONObject json=new JSONObject();\r\n\t\r\n\taccessdata.setParentdirectory(\"\");\r\n\taccessdata.setHookObj(json);\r\n\taccessdata.setRunningapp(\"Drishya\");\r\n\taccessdata.setEndpoint(\"\");\r\n\taccessdata.setDomainguid(\"\");\r\n\taccessdata.setHost(\"\");\r\n\taccessdata.setEnv_json(json);\r\n\t\r\n\tfb.setClientID(\"468331803360754\");\r\n\tfb.setClientSecret(\"8fc8690146770e0a637adcc7293280cc\");\r\n\tGoogle.setClientID(\"625227390094-m47bnlnuaguvq3phn5t5kmp503fsiagd.apps.googleusercontent.com\");\r\n\tGoogle.setClientSecret(\"k0vpP0Tp5dP2oqXmcF9v10G8\");\r\n\tprimaryProviders.setFacebook(fb);\r\n\tprimaryProviders.setGoogle(Google);*/\r\n\tassertNotNull(generateApp.baseDirectory());\r\n}", "@Test\n public void shouldConnectorMatchWithConnectorDefinition() {\n\n securityUtil.logInAs(\"salaboy\");\n\n processRuntime.start(ProcessPayloadBuilder.start()\n .withProcessDefinitionKey(CATEGORIZE_IMAGE_CONNECTORS_PROCESS)\n .withVariable(\"input-variable-name-1\",\n \"input-variable-name-1\")\n .withVariable(\"input-variable-name-2\",\n \"input-variable-name-2\")\n .withVariable(\"expectedKey\",\n true)\n .build());\n\n }", "public void testCredentialsIsActiveConstant() {\n assertEquals(\"CREDENTIALS_IS_ACTIVE is incorrect\",\n UserConstants.CREDENTIALS_IS_ACTIVE, \"credentials-is-active\");\n }", "@Test\n public void useAppContext() {\n assertEquals(\"com.example.kitchen\", appContext.getPackageName());\n }" ]
[ "0.58524275", "0.5805125", "0.56218493", "0.54851335", "0.54586273", "0.54315656", "0.5419979", "0.5401144", "0.53110063", "0.52899987", "0.5275786", "0.5213839", "0.5190007", "0.5164708", "0.5085717", "0.5071893", "0.50585806", "0.50351197", "0.50156045", "0.5015082", "0.50093704", "0.49871886", "0.49800664", "0.49776897", "0.49709392", "0.49644113", "0.49588525", "0.49507508", "0.48963866", "0.48873135", "0.48772418", "0.48617858", "0.4843574", "0.48393366", "0.48337904", "0.4827853", "0.4814051", "0.48048097", "0.48048097", "0.47991964", "0.47857404", "0.47811067", "0.4768734", "0.4768734", "0.4768734", "0.47600645", "0.47600645", "0.47573003", "0.47533536", "0.47446725", "0.47429043", "0.47141564", "0.4711762", "0.46999815", "0.4689635", "0.46878704", "0.46802428", "0.46665522", "0.46592382", "0.46579945", "0.46383426", "0.46346948", "0.4631919", "0.46219748", "0.4612257", "0.4611042", "0.4606533", "0.45879865", "0.4584081", "0.4583932", "0.4577858", "0.45549244", "0.45548144", "0.45509166", "0.4547918", "0.45463905", "0.4544405", "0.45417574", "0.4541072", "0.45332065", "0.45326367", "0.45322108", "0.45316657", "0.45293045", "0.45281056", "0.4524435", "0.45243648", "0.4518898", "0.45148832", "0.45139667", "0.4505091", "0.4502879", "0.44994387", "0.44983575", "0.4495217", "0.44924396", "0.4491824", "0.4487381", "0.4478825", "0.44749776", "0.447447" ]
0.0
-1
Returns the OSGi service identifier.
@Override public java.lang.String getOSGiServiceIdentifier() { return _autoDetailsService.getOSGiServiceIdentifier(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getOSGiServiceIdentifier();", "public String getOSGiServiceIdentifier();", "public static String getOSGiServiceIdentifier() {\n\t\treturn getService().getOSGiServiceIdentifier();\n\t}", "public static String getOSGiServiceIdentifier() {\n\t\treturn getService().getOSGiServiceIdentifier();\n\t}", "public static String getOSGiServiceIdentifier() {\n\t\treturn getService().getOSGiServiceIdentifier();\n\t}", "@Override\n\tpublic java.lang.String getOSGiServiceIdentifier() {\n\t\treturn _clipLocalService.getOSGiServiceIdentifier();\n\t}", "@Override\n\tpublic java.lang.String getOSGiServiceIdentifier() {\n\t\treturn _weatherLocalService.getOSGiServiceIdentifier();\n\t}", "@Override\n\tpublic java.lang.String getOSGiServiceIdentifier() {\n\t\treturn _vcmsPortionLocalService.getOSGiServiceIdentifier();\n\t}", "@Override\n\tpublic String getOSGiServiceIdentifier() {\n\t\treturn _participationLocalService.getOSGiServiceIdentifier();\n\t}", "java.lang.String getServiceId();", "String getService_id();", "String getServiceId();", "public String getServiceID();", "@Override\n\tpublic String getOSGiServiceIdentifier() {\n\t\treturn WFMS_Position_AuditLocalService.class.getName();\n\t}", "@Override\n\tpublic String getOSGiServiceIdentifier() {\n\t\treturn MonthlyTradingLocalService.class.getName();\n\t}", "public int getServiceID() {\n return serviceID;\n }", "@Override\n\tpublic String getOSGiServiceIdentifier() {\n\t\treturn ItemPublicacaoLocalService.class.getName();\n\t}", "public java.lang.String getServiceID()\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(SERVICEID$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "@Override\n\tpublic String getOSGiServiceIdentifier() {\n\t\treturn LocalRichService.class.getName();\n\t}", "public java.lang.Long getServiceId() {\n return serviceId;\n }", "public ID getServiceID() {\n\treturn serviceID;\n }", "public java.lang.Long getServiceId() {\n return serviceId;\n }", "@Override\n\tpublic String getOSGiServiceIdentifier() {\n\t\treturn CsclPollsChoiceLocalService.class.getName();\n\t}", "public ServiceID getServiceID() {\n\t\treturn null;\n\t}", "public Integer getServiceid() {\r\n return serviceid;\r\n }", "java.lang.String getServiceName();", "java.lang.String getServiceName();", "String getServiceName();", "String getServiceName();", "public org.apache.xmlbeans.XmlString xgetServiceID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SERVICEID$6, 0);\n return target;\n }\n }", "public String getServiceName();", "public ServiceID getServiceID() {\n return null;\n }", "public abstract String getServiceId() throws RcsServiceException;", "public long getId() {\n return mServiceId;\n }", "java.lang.String getSOID();", "String serviceId(RequestContext ctx) {\n\n String serviceId = (String) ctx.get(SERVICE_ID);\n if (serviceId == null) {\n log.info(\"No service id found in request context {}\", ctx);\n }\n return serviceId;\n }", "public long getServiceTypeId() {\r\n\t\treturn serviceTypeId;\r\n\t}", "@Override\n public ServiceID getServiceID() {\n\treturn servID;\n }", "@Transient\n\tpublic String getServiceId()\t{\n\t\treturn mServiceId;\n\t\t//else return \"N/A\";\n\t}", "int getServiceNum();", "public abstract String getServiceName();", "public java.lang.String getServiceId(){\r\n return localServiceId;\r\n }", "public String getSystemId();", "public String toString() {\n return getServiceId();\n }", "com.microsoft.schemas._2003._10.serialization.Guid xgetServiceId();", "public static String getServiceName() {\n\t\treturn serviceName;\n\t}", "public static String getServiceName() {\n\t\treturn serviceName;\n\t}", "public ID getMainService() { \r\n\t\tID retVal = this.getTypedField(46, 0);\r\n\t\treturn retVal;\r\n }", "public String getServiceName()\r\n {\r\n return serviceName;\r\n }", "public String getServiceName()\n {\n return serviceName;\n }", "public String getServiceSn() {\n return serviceSn;\n }", "public String getInstanceIdentifier();", "protected abstract String getATiempoServiceName();", "public String getServiceName() {\n return serviceName;\n }", "public String getServiceName() {\n return serviceName;\n }", "public String getService() {\n\t\treturn service.get();\n\t}", "@Override\n\tpublic String serviceTypeId() throws Exception{\n\t\treturn \"121\";\n\t}", "@AutoEscape\n\tpublic String getIdPtoServicio();", "public String getServiceName() {\n return this.serviceName;\n }", "public String getNomService() {\r\n\t\treturn nomService;\r\n\t}", "public String getServiceName() {\r\n return this.serviceName;\r\n }", "public int getIdServicio() {\n return idServicio;\n }", "public String getSystemId() {\n return agentConfig.getSystemId();\n }", "public java.lang.String getServiceName() {\n java.lang.Object ref = serviceName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n serviceName_ = s;\n }\n return s;\n }\n }", "public java.lang.String getServiceName() {\n java.lang.Object ref = serviceName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n serviceName_ = s;\n }\n return s;\n }\n }", "public java.lang.Integer getServicecode() {\n\treturn servicecode;\n}", "public String getService() {\n return service;\n }", "public String getService() {\n return service;\n }", "public String getService() {\n return service;\n }", "public String getServiceName() {\n return this.serviceName;\n }", "public final String getIdentifier() {\n return ServerUtils.getIdentifier(name, ip, port);\n }", "public int getId_serviceMethod() {\r\n\t\treturn id_serviceMethod;\r\n\t}", "public String getServiceName()\n {\n return this.mServiceName;\n }", "String getServiceRef();", "public java.lang.String getServiceName() {\n java.lang.Object ref = serviceName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n serviceName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getServiceName() {\n java.lang.Object ref = serviceName_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n serviceName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getServiceName() {\n java.lang.Object ref = serviceName_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n serviceName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getServiceName() {\n java.lang.Object ref = serviceName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n serviceName_ = s;\n return s;\n }\n }", "public java.lang.String getServiceName(){\n return localServiceName;\n }", "public String getServiceName(){\n return serviceName;\n }", "java.lang.String getService();", "java.lang.String getService();", "java.lang.String getService();", "String getId(IApiComponent component) throws CoreException {\n StringBuffer buffer = new StringBuffer();\n //$NON-NLS-1$\n buffer.append(component.getSymbolicName()).append(\" \").append('(').append(component.getVersion()).append(')');\n return buffer.toString();\n }", "public QName getServiceName() {\n\t\treturn null;\n\t}", "public java.lang.String getServicename() {\n\treturn servicename;\n}", "public SvcIdent getSvcIdent() {\r\n\t\treturn svcIdent;\r\n\t}", "public static Serializable getSystemId() {\n Serializable ret = null;\n if (getSystemStatic() != null) {\n ret = getSystemStatic().getDistributionManager().getId();\n }\n return ret;\n }", "public String getDescriptiveServiceName() {\n if (serviceAbbreviation != null) {\n return serviceAbbreviation;\n }\n return serviceFullName;\n }", "public ServiceName getServiceName() {\n return serviceName;\n }", "public String getTypeOfService(){\n\t\treturn typeOfService;\n\t}", "public String getSystemId() {\n // TODO Auto-generated method stub\n return null;\n }", "@Override\r\n\t\t\tpublic Object getKey() {\n\t\t\t\treturn service;\r\n\t\t\t}", "private String getServiceName(Descriptors.ServiceDescriptor descriptor ) {\r\n return descriptor.getFullName();\r\n }", "public abstract String getOsID();", "public Integer getServiceType() {\r\n return serviceType;\r\n }", "java.lang.String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();" ]
[ "0.89526385", "0.8865057", "0.8802445", "0.8802445", "0.8802445", "0.80645627", "0.80380356", "0.79950273", "0.7884506", "0.7761788", "0.7746527", "0.7728435", "0.7595578", "0.7377867", "0.7359522", "0.71958965", "0.7179898", "0.7172983", "0.71391976", "0.7108751", "0.7091632", "0.70885974", "0.7068293", "0.7048541", "0.6974196", "0.696468", "0.696468", "0.6886407", "0.6886407", "0.6883278", "0.68765604", "0.68585646", "0.6826185", "0.6809005", "0.6757184", "0.67409533", "0.67246354", "0.67214304", "0.66091424", "0.65961295", "0.6565733", "0.6551098", "0.6543107", "0.6511705", "0.6490898", "0.6446255", "0.6446255", "0.6434082", "0.6375594", "0.63581073", "0.6350256", "0.6345039", "0.6323226", "0.6279765", "0.62671643", "0.62454057", "0.6224479", "0.6223283", "0.6173032", "0.6170226", "0.6168227", "0.6143652", "0.6133367", "0.613225", "0.613225", "0.6105718", "0.61035913", "0.61035913", "0.61035913", "0.6096847", "0.60967374", "0.6096524", "0.6084602", "0.60602844", "0.6056552", "0.60535157", "0.60535157", "0.60531414", "0.60523194", "0.6051697", "0.6018761", "0.6018761", "0.6018761", "0.6004451", "0.60010004", "0.59979016", "0.5996255", "0.59908384", "0.5976522", "0.5964441", "0.59541905", "0.5931207", "0.5908711", "0.59043795", "0.58945364", "0.5888908", "0.5885491", "0.5882983", "0.5882983", "0.5882983" ]
0.8172362
5
read trees from a directory, each tree in a separate file
public static ArrayList<Tree> readTreesFromDir(File dir) { ArrayList<Tree> trees = new ArrayList<Tree>(); File dirName = dir; File[] directory = dirName.listFiles(); for (int p = 0; p < directory.length; p++) { trees.add(new Tree(directory[p])); } return trees; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void builtTree\n ( ArrayList<DefaultMutableTreeNode> treeArray , \n int recursion , DefaultMutableTreeNode selected , \n boolean enableDirs , boolean enableFiles )\n {\n int m;\n if (recursion<0) { m = DEFAULT_RECURSION_LIMIT; }\n else { m = recursion; }\n for ( int k=0; k<m; k++ )\n {\n boolean request = false;\n // Start cycle for entries\n int n = treeArray.size();\n for ( int i=0; i<n; i++ )\n {\n DefaultMutableTreeNode x1 = treeArray.get(i);\n // Support selective mode, skip if not selected\n if ( (selected != null) & ( selected != x1 ) ) continue;\n // Analyse current entry, skip if already handled\n ListEntry x2 = (ListEntry)x1.getUserObject();\n if ( x2.handled == true ) continue;\n request = true;\n x2.failed = false;\n // Start handling current entry\n String x3 = x2.path;\n File file1 = new File( x3 );\n boolean exists1 = file1.exists();\n boolean directory1=false;\n if (exists1) { directory1 = file1.isDirectory(); }\n // Handling directory: make list of childs directories/files\n if ( exists1 & directory1 )\n {\n String[] list = file1.list();\n int count=0;\n if ( list != null ) count = list.length;\n for ( int j=0; j<count; j++ )\n {\n String s1 = list[j];\n String s2 = x3+\"/\"+s1;\n File file2 = new File(s2);\n boolean dir = file2.isDirectory();\n if ( ( enableDirs & dir ) | ( enableFiles & !dir ) )\n {\n ListEntry y1 = \n new ListEntry ( s1, \"\", s2, false, false );\n DefaultMutableTreeNode y2 = \n new DefaultMutableTreeNode( y1 );\n treeArray.add( y2 );\n x1.add( y2 );\n x1.setAllowsChildren( true ); // this entry is DIRECTORY\n }\n }\n }\n // Handling file: read content\n if ( exists1 & !directory1 )\n {\n int readSize = 0;\n //\n StringBuilder data = new StringBuilder(\"\");\n FileInputStream fis;\n byte[] array = new byte[BUFFER_SIZE];\n try \n { \n fis = new FileInputStream(file1);\n readSize = fis.read(array); \n fis.close();\n }\n catch ( Exception e ) \n // { data = \"N/A : \" + e; x2.failed=true; }\n { data.append( \"N/A : \" + e ); x2.failed = true; }\n char c1;\n for (int j=0; j<readSize; j++)\n { \n c1 = (char)array[j];\n // if ( (c1=='\\n') | (c1=='\\r') ) { data = data + \" \"; }\n if ( ( c1 == '\\n' ) | (c1 == '\\r' ) ) { data.append( \" \" ); }\n else \n { \n if ( ( c1 < ' ' )|( c1 > 'z' ) ) { c1 = '_'; }\n // data = data + c1;\n data.append( c1 );\n }\n }\n x2.name2 = data.toString();\n x2.leaf = true;\n x1.setAllowsChildren( false ); // this entry is FILE\n }\n // End cycle for entries\n x2.handled = true;\n }\n // End cycle for recursion\n if (request==false) break;\n }\n }", "private void printTree(File directory, int level, Environment env) {\n\t\tfor (int i = 0; i < level; i++) {\n\t\t\tenv.write(\" \"); // shift output\n\t\t}\n\n\t\tif (directory.isDirectory()) {\n\t\t\tenv.writeln(\"[\" + directory.getName() + \"]\");\n\t\t\t\n\t\t\t\n\t\t\tFile[] children = directory.listFiles();\n\t\t\t\n\t\t\tif(children != null) {\n\t\t\t\tfor (File file : children) {\n\t\t\t\t\tprintTree(file, level + 1, env);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tenv.writeln(directory.getName()); // print file name\n\t\t}\n\t}", "@SuppressFBWarnings({\"NP_NULL_PARAM_DEREF\", \"DM_DEFAULT_ENCODING\", \"NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE\"})\n public Tree getTreeFromFile(String path) {\n FileInputStream fileInputStream = null;\n try {\n fileInputStream = new FileInputStream(path);\n } catch (FileNotFoundException e) {\n \n }\n\n BufferedReader r = new BufferedReader(new InputStreamReader(fileInputStream));\n TreeParser tp = new TreeParser(r);\n\n String f = Paths.get(path).getFileName().toString();\n return tp.tokenize(f);\n }", "void createTree() throws IOException {\n\n // create root\n rootTreeItem = createTreeRoot();\n\n // create tree structure recursively\n createTree(rootTreeItem);\n\n // sort tree structure by name\n rootTreeItem.getChildren()\n .sort(Comparator.comparing(new Function<TreeItem<FilePath>, String>() {\n @Override\n public String apply(TreeItem<FilePath> t) {\n return t.getValue().toString().toLowerCase();\n }\n }));\n\n }", "public static ArrayList<Tree> readTreesFromFile(File file) {\n \n ArrayList<Tree> trees = new ArrayList<Tree>();\n \n BufferedReader br = null;\n \n try {\n \n br = new BufferedReader(new FileReader(file));\n \n String line;\n \n while ((line = br.readLine()) != null) {\n \n if (!line.contains(\"(\")) {\n continue;\n }\n \n Tree auxTree = new Tree(line);\n trees.add(auxTree);\n }\n \n br.close();\n \n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n return trees;\n }", "public void tree()\n\t{\n\t\tIterable<Position<FileElement>> toPrint = fileSystem.PreOrder();\n\t\tfor (Position<FileElement> p : toPrint)\n\t\t{\n\t\t\tint depth = fileSystem.getDepth(p);\n\t\t\tfor (int i = 0; i < depth; i++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tSystem.out.println(p.getValue());\n\t\t}\n\t}", "private static void traverse(Path path, ArrayList<Path> fileArray) {\r\n try (DirectoryStream<Path> listing = Files.newDirectoryStream(path)) {\r\n for (Path file : listing) {\r\n if (file.toString().toLowerCase().endsWith(\".txt\")) {\r\n fileArray.add(file);\r\n } else if (Files.isDirectory(file)) {\r\n traverse(file, fileArray);\r\n }\r\n }\r\n } catch (IOException e) {\r\n System.out.println(\"Invalid path: \" + path);\r\n }\r\n }", "public synchronized void readFileTree() throws FileTreeReadingException {\n final Set<Path> missingFiles = new HashSet<>(projectFiles.keySet());\n\n final LinkedHashMap<Path, Boolean> newFiles = new LinkedHashMap<>();\n\n try {\n Files.walkFileTree(projectDirectoryPath, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult preVisitDirectory(Path path, BasicFileAttributes attrs) throws IOException {\n if (projectDirectoryPath.compareTo(path) == 0)\n return FileVisitResult.CONTINUE;\n\n if (!missingFiles.remove(path))\n newFiles.put(path, true);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) throws IOException {\n if (!missingFiles.remove(path))\n newFiles.put(path, false);\n return FileVisitResult.CONTINUE;\n }\n });\n\n projectFiles.keySet().removeAll(missingFiles);\n projectFiles.putAll(newFiles);\n globalEventManager.fireEventListeners(this,\n new ProjectFileListChangedEvent(newFiles, missingFiles));\n\n } catch (IOException e) {\n throw new FileTreeReadingException(projectDirectoryPath, e);\n }\n }", "public static void Java_tree(File dir, int depth, String sort_method, int initialDepth) {\n // TODO: print file tree\n File[] fileList = sortFileList(dir.listFiles(), sort_method);\n depth--;\n\n if (fileList != null && fileList.length != 0) {\n for (File file : fileList) {\n if (dir == currentDirectory) {\n System.out.println(file.getName());\n } else {\n String output = \"|-\" + file.getName();\n for (int i = 0; i < (initialDepth - depth - 1); i++) {\n output = \" \" + output;\n }\n System.out.println(output);\n }\n\n if (depth > 0 && file.isDirectory()) {\n Java_tree(file, depth, sort_method, initialDepth);\n }\n }\n }\n\n }", "public LevelOrderIterator(File rootNode) throws FileNotFoundException {\n\t\t// TODO 1\n\t\tfileQueue = new Queue<>();\n\t\tQueue<File> temp = new Queue<>();\n\t\t// Queue<File> tempTemp = new Queue<>();\n\t\tif (!rootNode.exists()) throw new FileNotFoundException();\n\t\tfileQueue.enqueue(rootNode);\n\t\t//temp.enqueue(rootNode);\n\t\tFile[] files = rootNode.listFiles();\n\t\tif (files == null) return;\n\t\tArrays.sort(files);\n\t\tfor (File f : files) {\n\t\t\ttemp.enqueue(f);\n\t\t}\n\t\twhile (!temp.isEmpty()) {\n\t\t\tif (temp.peek().isDirectory()){\n\t\t\t\tFile[] dir = temp.peek().listFiles();\n\t\t\t\tif (dir == null) {\n\t\t\t\t\tfileQueue.enqueue(temp.dequeue());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tArrays.sort(dir);\n\t\t\t\tfor (File f : dir) {\n\t\t\t\t\ttemp.enqueue(f);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tfileQueue.enqueue(temp.dequeue());\n\t\t}\n//\t\tfor (File f : files) {\n//\t\t\tfileQueue.enqueue(f);\n//\t\t\tif (f.isDirectory()){\n//\t\t\t\tFile[] filesTemp = f.listFiles();\n//\t\t\t\tif (filesTemp == null) continue;\n//\t\t\t\tArrays.sort(filesTemp);\n//\t\t\t\tfor (File g : filesTemp) {\n//\t\t\t\t\ttemp.enqueue(g);\n//\t\t\t\t\tif (f.isDirectory()){\n//\t\t\t\t\t\tFile[] filesTempTemp = f.listFiles();\n//\t\t\t\t\t\tif (filesTempTemp == null) continue;\n//\t\t\t\t\t\tArrays.sort(filesTempTemp);\n//\t\t\t\t\t\tfor (File h : filesTempTemp)\n//\t\t\t\t\t\t\ttempTemp.enqueue(h);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n//\t\twhile(!temp.isEmpty())\n//\t\t\tfileQueue.enqueue(temp.dequeue());\n//\t\twhile(!tempTemp.isEmpty())\n//\t\t\tfileQueue.enqueue(tempTemp.dequeue());\n\t}", "@Test\n public void treeOutputsFromLocalFileSystem_works() throws Exception {\n if (OS.getCurrent() == OS.WINDOWS) {\n return;\n }\n // Test that tree artifact generated locally can be consumed by other actions.\n // See https://github.com/bazelbuild/bazel/issues/16789\n\n // Disable remote execution so tree outputs are generated locally\n addOptions(\"--modify_execution_info=OutputDir=+no-remote-exec\");\n setDownloadToplevel();\n writeOutputDirRule();\n write(\n \"BUILD\",\n \"load(':output_dir.bzl', 'output_dir')\",\n \"output_dir(\",\n \" name = 'foo',\",\n \" content_map = {'file-1': '1'},\",\n \")\",\n \"genrule(\",\n \" name = 'foobar',\",\n \" srcs = [':foo'],\",\n \" outs = ['out/foobar.txt'],\",\n \" cmd = 'cat $(location :foo)/file-1 > $@ && echo bar >> $@',\",\n \")\");\n\n buildTarget(\"//:foobar\");\n waitDownloads();\n\n assertValidOutputFile(\"out/foobar.txt\", \"1bar\\n\");\n }", "public void writeTree(String path) {\n this.sb = new StringBuilder();\n writeTreeRec(this._root);\n\n try (PrintWriter out = new PrintWriter(path)){\n out.println(sb.toString());\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "private static void createTree(TreeItem<FilePath> rootItem) throws IOException {\n\n try (DirectoryStream<Path> directoryStream = Files\n .newDirectoryStream(rootItem.getValue().getPath())) {\n\n for (Path path : directoryStream) {\n TreeItem<FilePath> newItem = new TreeItem<FilePath>(new FilePath(path));\n newItem.setExpanded(true);\n\n rootItem.getChildren().add(newItem);\n\n if (Files.isDirectory(path)) {\n createTree(newItem);\n }\n }\n } catch (AccessDeniedException ignored) {\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "public static void main(String argv[]) {\n\t\ttry {\n\t\t\tFile f = new File(argv[0]);\n\t\t\tVector v = readTreeSet(f, \"utf-8\");\n\t\t\tObjectInputStream ois = new ObjectInputStream(new FileInputStream((File)v.get(0)));\n\t\t\tint size = ((Integer)v.get(1)).intValue();\n\t\t\tDebug.debug(true, \"Read \"+size+\" trees\");\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tTreeItem t = (TreeItem)ois.readObject();\n\t\t\t\tDebug.debug(true, t.numNodes()+\" nodes: \"+t.toString());\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tStackTraceElement elements[] = e.getStackTrace();\n\t\t\tint n = elements.length;\n\t\t\tfor (int i = 0; i < n; i++) { \n\t\t\t\tSystem.err.println(e.toString()+\": \"+elements[i].getFileName() + \":\" \n\t\t\t\t\t\t+ elements[i].getLineNumber() \n\t\t\t\t\t\t+ \">> \" \n\t\t\t\t\t\t+ elements[i].getMethodName() + \"()\");\n\t\t\t}\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t}", "public void parseDirectory(File directory) throws IOException {\n this.parsedFiles.clear();\n File[] contents = directory.listFiles();\n for (File file : contents) {\n if (file.isFile() && file.canRead() && file.canWrite()) {\n String fileName = file.getPath();\n if (fileName.endsWith(\".html\")) {\n Document parsed;\n parsed = Jsoup.parse(file, \"UTF-8\");\n if (this.isWhiteBearArticle(parsed)) {\n HTMLFile newParsedFile = new HTMLFile(parsed, false);\n String name = file.getName();\n this.parsedFiles.put(name, newParsedFile);\n } else if (this.isMenuPage(parsed)) {\n //HTMLFile newParsedFile = new HTMLFile(parsed, false);\n //String name = file.getName();\n //this.parsedFiles.put(name, newParsedFile);\n }\n }\n }\n }\n }", "private static List<File> listChildFiles(File dir) throws IOException {\n\t\t List<File> allFiles = new ArrayList<File>();\n\t\t \n\t\t File[] childFiles = dir.listFiles();\n\t\t for (File file : childFiles) {\n\t\t if (file.isFile()) {\n\t\t allFiles.add(file);\n\t\t } else {\n\t\t List<File> files = listChildFiles(file);\n\t\t allFiles.addAll(files);\n\t\t }\n\t\t }\n\t\t return allFiles;\n\t\t }", "@Override\r\n\tpublic void run() {\n \tFile in = new File(\"input.txt\");\r\n\t\t String strLine;\r\n\t\t int k;\r\n\t\t Tree mytree = new Tree();\r\n\t\t try {\r\n\t\t Scanner sc = new Scanner(in);\r\n\t\t while (sc.hasNext()) {\r\n\t\t mytree.insert(sc.nextInt());\r\n\t\t }\r\n\t\t } catch (FileNotFoundException e) {\r\n\t\t e.printStackTrace();\r\n\t\t }\r\n\t\t try(FileWriter fos=new FileWriter(\"output.txt\"))\r\n\t {\r\n\t \r\n\t\t\t mytree.PreOrderTraversal(mytree.root, fos);\r\n\t }\r\n\t catch(IOException ex){\r\n\t \tSystem.out.println(ex.getMessage());\r\n\t }\r\n \t\r\n\t}", "public void createFullTree(String path) {\n String str = null;\n BufferedReader br = ExternalFunctions.getBufferedFile(path);\n\n try {\n while((str = br.readLine()) != null) { // Insert all the password to the tree by the algo. here the dog buried\n //str = str.toLowerCase();\n \tinsert(str);\n }\n br.close();\n }\n catch (IOException e) {\n System.out.println(\"File text is wrong\");\n }\n }", "private static ArrayList<Node> getNodes(File path)\n {\n //log the event happining\n Start.log(\"Getting Nodes\");\n ArrayList<Node> tempNodes = new ArrayList<Node>();\n ArrayList<String> file = getFile(path);\n for (int i =0; i < file.size();i++)\n {\n //use scanner to pharse the string into the relivant bits for getting the node data\n Scanner parse = new Scanner(file.get(i));\n tempNodes.add(new Node(parse.nextInt(),CPType.valueOf(parse.next())));\n }\n return tempNodes;\n }", "@Test\n public void testLsDirectoryAndFileRSub() {\n FileTree myTree = new FileTree();\n String[] paths = {\"file\", \"file/file1\", \"file/file2\", \"file/file1/file3\"};\n try {\n myTree.mkdir(paths);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"Could not create directory\");\n }\n String result = \"\";\n try {\n myTree.makeFile(\"fileA\");\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"could not create file\");\n }\n try {\n myTree.cd(\"/file/file1\");\n } catch (NotDirectoryException e) {\n fail(\"could not cd into directory\");\n }\n try {\n myTree.makeFile(\"fileB\");\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"could not create file\");\n }\n try {\n myTree.cd(\"/file/file1/file3\");\n } catch (NotDirectoryException e) {\n fail(\"could not cd into directory\");\n }\n try {\n myTree.makeFile(\"fileC\");\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"could not create file\");\n }\n try {\n myTree.cd(\"/\");\n } catch (NotDirectoryException e) {\n fail(\"could not cd into directory\");\n }\n String[] empty_path = {};\n try {\n result = myTree.ls(true, empty_path);\n } catch (InvalidPathException e1) {\n fail(\"Could not find the directories\");\n }\n\n assertEquals(result, \"Path at /: \\nfile\\nfileA\\nPath at /file: \"\n + \"\\nfile1\\nfile2\\nPath at /file/file1: \\nfile3\\nfileB\\nPath at \"\n + \"/file/file1/file3: \\nfileC\\nPath at /file/file2: \\n\");\n }", "public static DefaultMutableTreeNode createFileTree(String folder, String extension) {\n File f = new File(folder);\n DefaultMutableTreeNode top = new DefaultMutableTreeNode();\n top.setUserObject(f.getName());\n if (f.isDirectory()) {\n File fls[] = f.listFiles();\n for (int i = 0; i < fls.length; i++) {\n String name = fls[i].getName();\n if (name.endsWith(extension)\n || fls[i].isDirectory()) //skip non-csv files\n top.add(createFileTree(fls[i].getPath(), extension) );\n else\n System.out.println(\"Ignoring....\" + name);\n }\n }\n return (top);\n }", "public static void traverse(Path path, ArrayList<Path> paths) throws IOException {\n\t\tif (Files.isDirectory(path)) {\n\t\t\ttry (DirectoryStream<Path> listing = Files.newDirectoryStream(path)) {\n\t\t\t\tfor (Path file : listing) {\n\t\t\t\t\ttraverse(file, paths);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (isTextFile(path)) {\n\t\t\tpaths.add(path);\n\t\t}\n\t}", "@Test\n public void testLsDirectoryAndFileR() {\n FileTree myTree = new FileTree();\n String[] paths = {\"file\"};\n try {\n myTree.mkdir(paths);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"Could not create directory\");\n }\n String result = \"\";\n try {\n myTree.makeFile(\"file1\");\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"could not create file\");\n }\n String[] empty_path = {};\n try {\n result = myTree.ls(true, empty_path);\n } catch (InvalidPathException e1) {\n fail(\"Could not find the directories\");\n }\n\n assertEquals(result, \"Path at /: \\nfile\\nfile1\\nPath at /file: \\n\");\n }", "public static native void deleteTreesBelow(String dir) throws IOException;", "@Test\n public void testAllConstructions() throws IOException, LexerException, ParseException {\n TreeNode<ASTNode> tree = getTree(\"all.txt\");\n System.out.println(tree);\n }", "public static void findStructureFiles() {\n\t\tstructureFiles = new LinkedList<File>();\n\t\tLinkedList<File> unexploredDirectories = new LinkedList<File>();\n\t\tFile baseDir = new File(\"structures\");\n\t\t\n\t\tif (baseDir.exists() && baseDir.isDirectory()) {\n\t\t\t// load base directory's files\n\t\t\trecursiveFindStructureFiles(baseDir, unexploredDirectories);\n\t\t\t\n\t\t\t// load sub-directories' files, breadth-first\n\t\t\twhile (!unexploredDirectories.isEmpty()) {\n\t\t\t\trecursiveFindStructureFiles(unexploredDirectories.pop(), unexploredDirectories);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"Unable to locate structures folder.\");\n\t\t}\n\t}", "public static void main(String[] args) throws AVLTreeException, BSTreeException, IOException {\n\t\tint bsDepths = 0, avlDepths = 0; // tracks the sum of the depths of every node\n\t\tScanner inFile = new Scanner(new FileReader(args[0]));\n\t\tAVLTree<String> avltree = new AVLTree<>();\n\t\tBSTree<String> bstree = new BSTree<>();\n\t\tFunction<String, PrintStream> printUpperCase = x -> System.out.printf(\"%S\\n\", x); // function example from Duncan. Hope this is okay :)\n\t\tArrayList<String> words = new ArrayList<>(); // Way to store the words without opening the file twice\n\t\twhile (inFile.hasNext()) { // inserting words into each tree without using an extra loop\n\t\t\twords.add(inFile.next().toUpperCase());\n\t\t\tbstree.insert(words.get(words.size() - 1));\n\t\t\tavltree.insert(words.get(words.size() - 1));\n\t\t}\n\t\tinFile.close();\n\t\t// VVV Prints table 1 VVV\n\t\tSystem.out.printf(\"Table 1: Binary Search Tree [%s]\\n\" + \"Level-Order Traversal\\n\"\n\t\t\t\t+ \"=========================================\\n\" + \"Word\\n\"\n\t\t\t\t+ \"-----------------------------------------\\n\", args[0]);\n\t\tbstree.levelTraverse(printUpperCase);\n\t\tSystem.out.println(\"-----------------------------------------\\n\");\n\t\t// VVV Prints table 2 VVV\n\t\tSystem.out.printf(\n\t\t\t\t\"Table 2: AVL Tree [%s]\\n\" + \"Level-Order Traversal\\n\" + \"=========================================\\n\"\n\t\t\t\t\t\t+ \"Word\\n\" + \"-----------------------------------------\\n\",\n\t\t\t\targs[0]);\n\t\tavltree.levelTraverse(printUpperCase);\n\t\tSystem.out.println(\"-----------------------------------------\\n\");\n\t\t// VVV Prints table 3 VVV\n\t\tSystem.out.printf(\"Table 3:Number of Nodes vs Height vs Diameter\\n\" + \"Using Data in [%s]\\n\"\n\t\t\t\t+ \"=========================================\\n\" + \"Tree # Nodes Height Diameter\\n\"\n\t\t\t\t+ \"-----------------------------------------\\n\" + \"BST\\t%d\\t %d\\t %d\\n\" + \"AVL\\t%d\\t %d\\t %d\\n\",\n\t\t\t\targs[0], bstree.size(), bstree.height(), bstree.diameter(), avltree.size(), avltree.height(),\n\t\t\t\tavltree.diameter());\n\t\tSystem.out.println(\"-----------------------------------------\\n\");\n\t\tfor (int i = 0; i < words.size(); i++) { //searches the trees for each word, totaling their depths\n\t\t\tbsDepths += 1 + bstree.depth(words.get(i));\n\t\t\tavlDepths += 1 + avltree.depth(words.get(i));\n\t\t}\n\t\t// VVV Prints table 4 VVV\n\t\tSystem.out.printf(\"Table 4:Total Number of Node Accesses\\n\" + \"Searching for all the Words in [%s]\\n\"\n\t\t\t\t+ \"=========================================\\n\" + \"Tree # Nodes\\n\"\n\t\t\t\t+ \"-----------------------------------------\\n\" + \"BST %d\\n\" + \"AVL %d\\n\",\n\t\t\t\targs[0], bsDepths, avlDepths);\n\t\tSystem.out.println(\"-----------------------------------------\\n\");\n\t}", "@Override\r\n public List<File> getValues(final String term) throws IOException {\n {\r\n File file = new File(term);\r\n // is a directory -> get all children\r\n if (file.exists() && file.isDirectory()) {\r\n return children(file, fileFilter);\r\n }\r\n File parent = file.getParentFile();\r\n // is not a directory but has parent -> get siblings\r\n if (parent != null && parent.exists()) {\r\n return children(parent, normalizedFilter(term));\r\n }\r\n }\r\n // case 2: relative path\r\n {\r\n for (File path : paths) {\r\n File file = new File(path, term);\r\n // is a directory -> get all children\r\n if (file.exists() && file.isDirectory()) {\r\n return toRelativeFiles(children(file, fileFilter), path);\r\n }\r\n File parent = file.getParentFile();\r\n // is not a directory but has parent -> get siblings\r\n if (parent != null && parent.exists()) {\r\n return toRelativeFiles(children(parent, normalizedFilter(file.getAbsolutePath())), path);\r\n }\r\n }\r\n }\r\n return Collections.emptyList();\r\n }", "public static List<File> splitData(String treeFileName, int foldSize) {\n ArrayList<File> tempFilePaths = new ArrayList<File>();\n Random random = new Random(100);\n for (int i = 0; i < foldSize+1; i++) {\n tempFilePaths.add(new File(String.valueOf(random.nextInt())));\n }\n URL treeResource = CommonUtils.class.getClassLoader().getResource(treeFileName);\n if (treeResource == null) {\n logger.error(\"Make sure the file is in the classpath of the project: \" + treeFileName);\n return null;\n }\n\n URL trainResource = null;\n\n File treeFile = new File(treeResource.getPath());\n ArrayList<String> tempAttributeList = new ArrayList<String>();\n try {\n FileReader treeFileInputStream = new FileReader(treeFile);\n BufferedReader bufferedReader = new BufferedReader(treeFileInputStream);\n String line = null;\n String line1 = null;\n int count = 0;\n try {\n while ((line = bufferedReader.readLine()) != null) {\n if (count == 0) {\n trainResource = CommonUtils.class.getClassLoader().getResource(line);\n if (trainResource == null) {\n logger.error(\"Make sure the file is in the classpath of the project: \" + line);\n return null;\n }\n FileReader fileReader = new FileReader(new File(trainResource.getPath()));\n BufferedReader bufferedReader1 = new BufferedReader(fileReader);\n int count1 = 0;\n while ((line1 = bufferedReader1.readLine()) != null) {\n if (count1 == 0) {\n BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(tempFilePaths.get(0)));\n bufferedWriter.write(line1);\n bufferedWriter.write(\"\\n\");\n bufferedWriter.flush();\n bufferedWriter.close();\n }else {\n tempAttributeList.add(line1);\n }\n count1++;\n }\n }\n count++;\n logger.info(line);\n }\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n }\n\n\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n }\n\n // now we randomly write data\n int fileIndex = 1;\n while(tempAttributeList.size()!=0) {\n int index0 = new Random(100).nextInt();\n if(index0<0){\n index0 = index0 * -1;\n }\n String s = tempAttributeList.get(index0 % tempAttributeList.size());\n\n try {\n BufferedWriter bufferedWriter1 = new BufferedWriter(new FileWriter(tempFilePaths.get(fileIndex),true));\n bufferedWriter1.write(s);\n bufferedWriter1.write(\"\\n\");\n bufferedWriter1.flush();\n bufferedWriter1.close();\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n }\n tempAttributeList.remove(s);\n if(fileIndex==foldSize){\n fileIndex=1;\n }else{\n fileIndex++;\n }\n }\n return tempFilePaths;\n }", "public static void main(String[] args) {\n\t\tif (args.length == 0) {\n\t\t\t System.err.println(\"Usage Error: the program expects a file name as an argument\");\n\t\t\t System.exit(-1);\n\t\t}\n\t\t\n\t\t// create a file with the entered file name\n\t\tFile file= new File(args[0]);\n\t\t\n\t\t// if the file does not exist inform the user and terminate the program\n\t\tif(file.exists()!=true){\n\t\t\t\tSystem.err.println(\"Usage Error: the file \"+args[0]+\" cannot be opened.\");\n\t\t\t\tSystem.exit(-1);\n\t\t}\n\t\t// if the file cannot be read inform the user and terminate the program\n\t\telse if(file.canRead()!=true){\n\t\t\t\t\tSystem.err.println(\"Usage Error: the file \"+args[0]+\" cannot be opened.\");\n\t\t\t\t\tSystem.exit(-1);\n\t\t}\n\t\t// if the file is not a file inform the user and terminate the program\n\t\telse if(file.isFile()!=true){\n\t\t\t\t\tSystem.err.println(\"Usage Error: the file \"+args[0]+\" cannot be opened.\");\n\t\t\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\t\n\t\t// create a list of type TreeList that will contain all the tree objects \n\t\tTreeList list= new TreeList();\n\t\t\t\n\t\ttry{\n\t\t\t// send the file to the scanner\n\t\t\tScanner inputFile = new Scanner(file);\n\t\t\t\n\t\t\t// create a boolean variable that is initially equal to true. \n\t\t\t// Since the first line does not contain info that can be parsed use the \n\t\t\t// variable to ensure the first line is skipped\n\t\t\tboolean firstLine=true;\n\t\t\t\n\t\t\t// while there is another line in the file continue the loop\n\t\t\twhile (inputFile.hasNextLine())\t{\n\t\t\t\t\n\t\t\t\t// create a string that represents a single line from the file\n\t\t\t\tString line= inputFile.nextLine();\n\t\t\t\t\n\t\t\t\t// send the line to have its information separated and entered into an\n\t\t\t\t// arrayList of strings\n\t\t\t\tArrayList<String> splitLine= splitCSVLine(line);\n\t\t\t\t\n\t\t\t\t\t// ensure the splitLine contains 41 elements, if not, skip it\n\t\t\t\t\tif (splitLine.size()==41){\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t// parse the information according to the needed information\n\t\t\t\t\t\t\t// about a tree that is sent to the tree class\n\t\t\t\t\t\t\tint id= Integer.parseInt(splitLine.get(0));\n\t\t\t\t\t\t\tint diam= Integer.parseInt(splitLine.get(3));\n\t\t\t\t\t\t\tString status= splitLine.get(6);\n\t\t\t\t\t\t\tString health= splitLine.get(7);\n\t\t\t\t\t\t\tString spc= splitLine.get(9);\n\t\t\t\t\t\t\tint zip= Integer.parseInt(splitLine.get(25));\n\t\t\t\t\t\t\tString boro= splitLine.get(29);\n\t\t\t\t\t\t\tdouble x= Double.parseDouble(splitLine.get(39));\n\t\t\t\t\t\t\tdouble y= Double.parseDouble(splitLine.get(40));\n\t\t\t\t\t\t\t// once information is parsed, use its information to create a \n\t\t\t\t\t\t\t// new tree\n\t\t\t\t\t\t\tTree tree= new Tree(id,diam,status,health,spc,zip,boro,x,y);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// ensure that the new tree does not have the same\n\t\t\t\t\t\t\t// ID, but a different species name from the other trees\n\t\t\t\t\t\t\t// in treeList\n\t\t\t\t\t\t\tfor (int i=0; i<list.size();i++){\n\t\t\t\t\t\t\t\ttree.equals(list.get(i));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// if the tree object is valid, add it to treeList list\n\t\t\t\t\t\t\tlist.add(tree);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// catch any invalid values sent to the constructor of the tree class\n\t\t\t\t\t\tcatch (IllegalArgumentException e){\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// throw a general exception in the case there is a parsing error\n\t\t\t\t\t\t// therefore the line will be ignored\n\t\t\t\t\t\tcatch (Exception e){\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t//}\n\t\t\t\t// after the first line passes through the loop set it equal\n\t\t\t\t// to false so the following information can be parsed and \n\t\t\t\t// sent to the tree class\n\t\t\t\tfirstLine=false;\n\t\t\t\n\t\t\t}\n\t\t\t// close the scanner\n\t\t\tinputFile.close();\n\t\t }\n\t\t\n\t\t// catch if the file cannot be found and send a message describing what happened\n\t\t// to the user. Exit the program.\n\t\tcatch (FileNotFoundException e){\n\t\t\tSystem.err.println(\"Usage Error: the file \"+args[0]+\" does not exist.\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\t// create an if statement to terminate the program if the file is empty or contains\n\t\t// no usable information\n\t\tif (list.size()==0){\n\t\t\tSystem.err.println(\"Usage Error: the file \"+args[0]+\" contains no usable information.\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\t// this portion of the program will handle user input and print the correct\n\t\t// tree information according to the tree species the user enters \n\t\t\n\t \t// create an exit word that will terminate the loop\n\t\tString exitWord=\"quit\";\n\t\t\n\t\t// create a string variable that represents the user's answer\n\t\tString answer;\n\t\t \n\t\t// open the scanner \n\t\tScanner input= new Scanner(System.in);\n\t\t// print a statement informing the user what to do\n\t\tSystem.out.println(\"Enter the tree species to learn more about it ('quit' to stop):\");\n\t\t// set the answer equal to the user's response\n answer= input.nextLine();\n \n // while the answer is not quit, keep prompting the user for a tree species\n\t\twhile (!(answer.equalsIgnoreCase(exitWord))){\n\t\t\t// if the tree species exists within the list of trees, print its matching species\n\t\t\t// and how many of that species exists within NYC and its boroughs\n\t\t\tif ((list.getCountByTreeSpecies(answer))>0){\n\t\t\t\tSystem.out.println(getMatchingSpecies(list,answer)+\"\\n\");\n\t\t\t\tSystem.out.println(getSpeciesInfo(list,answer));\n\t\t\t}\n\t\t\t\n\t\t\t// if the tree species is not within the list of trees, print a statement to \n\t\t\t// the user explaining it does not exist in NYC\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tSystem.out.println(\"There are no records of \"+answer+\" on NYC streets\");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t}\n\t\t\n\t\t// re-prompt the user to enter a tree species\n\t\t System.out.println(\"Enter the tree species to learn more about it ('quit' to stop):\");\n\t\t answer= input.nextLine();\n\t\t}\n\t\t\n\t\t//close the scanner\n\t\t input.close();\n\t\t \n\t\t \n\t}", "private ObservableList<TreeItem<Path>> buildChildren() {\r\n if (Files.isDirectory(getValue())) {\r\n try {\r\n\r\n return Files.list(getValue())\r\n .map(FileTreeItem::new)\r\n .collect(Collectors.toCollection(() -> FXCollections.observableArrayList()));\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n return FXCollections.emptyObservableList();\r\n } \r\n }\r\n\r\n return FXCollections.emptyObservableList();\r\n }", "public void readAll() throws FileNotFoundException{ \n b = new BinaryIn(this.filename);\n this.x = b.readShort();\n this.y = b.readShort();\n \n int count = (x * y) / (8 * 8);\n this.blocks = new double[count][8][8][3];\n \n Node juuri = readTree();\n readDataToBlocks(juuri);\n }", "@Test\n public void testLsFile() {\n FileTree myTree = new FileTree();\n String[] paths = {};\n try {\n myTree.makeFile(\"/file\");\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"Could not create file\");\n }\n String result = \"\";\n try {\n result = myTree.ls(false, paths);\n } catch (InvalidPathException e1) {\n fail(\"Could not find the directories\");\n }\n\n assertEquals(result, \"Path at /: \\nfile\\n\");\n }", "public void extractAll(String pathToDir) throws Exception {\n File dir = new File(pathToDir);\n File[] files = dir.listFiles();\n\n Set<String> edges = readEdges(files);\n writeEdgeFile(edges, pathToDir + \"/../edge_file.txt\");\n }", "private static void iteratorFilePath(File file){\n while(file.isDirectory()){\n for(File f : file.listFiles()){\n System.out.println(f.getPath());\n iteratorFilePath(f);\n }\n break;\n }\n }", "private void tarFolder( String parent, String path, TarOutputStream out ) \n throws IOException \n {\n BufferedInputStream origin = null;\n File f = new File( path );\n String files[] = f.list();\n if (files == null) \n {\n files = new String[1];\n files[0] = f.getName();\n }\n parent = ( ( parent == null ) ? ( f.isFile() ) ? \"\" \n : f.getName() + \"/\" : parent + f.getName() + \"/\" );\n for (int i = 0; i < files.length; i++) \n {\n File fe = f;\n byte data[] = new byte[BUFFER];\n \n if (f.isDirectory()) {\n fe = new File( f, files[i] );\n }\n \n if (fe.isDirectory()) {\n String[] fl = fe.list();\n if (fl != null && fl.length != 0)\n tarFolder( parent, fe.getPath(), out );\n else \n {\n TarEntry entry = new TarEntry( fe, parent + files[i] + \"/\" );\n out.putNextEntry( entry );\n }\n continue;\n }\n FileInputStream fi = new FileInputStream( fe );\n origin = new BufferedInputStream( fi );\n TarEntry entry = new TarEntry( fe, parent + files[i] );\n out.putNextEntry( entry );\n int count;\n //int bc=0;\n while ( (count=origin.read(data)) != -1 ) \n {\n out.write( data, 0, count );\n //bc+=count;\n }\n //System.out.println(\"Wrote \"+bc+\" bytes from \"+files[i]+\" to out\");\n out.flush();\n origin.close();\n }\n }", "protected void readOntology() {\r\n\t\ttry \r\n\t\t{\r\n\t\t\troot.removeAllChildren();\r\n\t\t\tIterator<String> rc = ob.listRootClasses();\r\n\t\t\twhile(rc.hasNext())\r\n\t\t\t{\r\n\t\t\t\tDefaultMutableTreeNode node = createNode(rc.next(), ob, 0);\r\n\t\t\t\troot.add(node);\r\n\t\t\t}\r\n\t\t\tontologyTree.setModel(new DefaultTreeModel(root));\r\n\t ontologyTree.expandRow(0);\r\n\t \r\n\t\t} catch (Exception e) {\r\n\t\t\torg.apache.commons.logging.LogFactory.getLog(this.getClass()).error(e);\r\n\t\t}\r\n\t}", "public static BST readProfiles(String filename)\n\t{\n\t\t\n\t\t// Opening file.\n\t\tFile inputFile=new File(PATH + filename);\n\t\t\n\t\t// create a Scanner to read from file\n\t\tScanner in=FileReader.createScanner(inputFile);\n\t\t\t\n\t\t// call readDataFile, which will construct a tree for us\n\t\treturn FileReader.readDataFile(in);\n\t}", "public static void loadTree() throws NotBoundException, MalformedURLException, RemoteException, ClassNotFoundException, SQLException, InterruptedException {\n\n List<Object> ob1 = new ArrayList<>();\n ob1.add(1);\n ob1.add(1);\n//db Access1 \n List<List<Object>> sspFindMultyResult1 = ServerConnection.getServerConnector().searchMultipleResults(ob1, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n DefaultTreeModel model = (DefaultTreeModel) jTree1.getModel();\n\n DefaultMutableTreeNode root = (DefaultMutableTreeNode) model.getRoot();\n\n for (List<Object> sspFindMultyResults1 : sspFindMultyResult1) {\n DefaultMutableTreeNode dmtn1 = new DefaultMutableTreeNode(sspFindMultyResults1.get(1) + \"-\" + sspFindMultyResults1.get(3));\n root.add(dmtn1);\n\n List<Object> ob2 = new ArrayList<>();\n ob2.add(2);\n ob2.add(sspFindMultyResults1.get(0));\n//db Access2\n List<List<Object>> sspFindMultyResult2 = ServerConnection.getServerConnector().searchMultipleResults(ob2, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n for (List<Object> sspFindMultyResults2 : sspFindMultyResult2) {\n DefaultMutableTreeNode dmtn2 = new DefaultMutableTreeNode(sspFindMultyResults2.get(1) + \"-\" + sspFindMultyResults2.get(3));\n dmtn1.add(dmtn2);\n dmtn1.getLevel();\n\n List<Object> ob3 = new ArrayList<>();\n ob3.add(3);\n ob3.add(sspFindMultyResults2.get(0));\n//db Access3\n List<List<Object>> sspFindMultyResult3 = ServerConnection.getServerConnector().searchMultipleResults(ob3, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n for (List<Object> sspFindMultyResults3 : sspFindMultyResult3) {\n DefaultMutableTreeNode dmtn3 = new DefaultMutableTreeNode(sspFindMultyResults3.get(1) + \"-\" + sspFindMultyResults3.get(3));\n dmtn2.add(dmtn3);\n\n List<Object> ob4 = new ArrayList<>();\n ob4.add(4);\n ob4.add(sspFindMultyResults3.get(0));\n//db Access4\n List<List<Object>> sspFindMultyResult4 = ServerConnection.getServerConnector().searchMultipleResults(ob4, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n for (List<Object> sspFindMultyResults4 : sspFindMultyResult4) {\n DefaultMutableTreeNode dmtn4 = new DefaultMutableTreeNode(sspFindMultyResults4.get(1) + \"-\" + sspFindMultyResults4.get(3));\n dmtn3.add(dmtn4);\n\n List<Object> ob5 = new ArrayList<>();\n ob5.add(5);\n ob5.add(sspFindMultyResults4.get(0));\n//db Access5 \n List<List<Object>> sspFindMultyResult5 = ServerConnection.getServerConnector().searchMultipleResults(ob5, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n for (List<Object> sspFindMultyResults5 : sspFindMultyResult5) {\n DefaultMutableTreeNode dmtn5 = new DefaultMutableTreeNode(sspFindMultyResults5.get(1) + \"-\" + sspFindMultyResults5.get(3));\n dmtn4.add(dmtn5);\n\n }\n }\n }\n }\n }\n model.reload(root);\n }", "private static DecisionTree loadTree(File file) throws FileNotFoundException {\r\n\t\tScanner scan = new Scanner(file); // Read from file\r\n\t\t// First line of file is question at root node\r\n\t\tDecisionTree dt = new DecisionTree(scan.nextLine());\r\n\t\tBinaryNode<String> root = dt.getRootNode();\r\n\t\tfillTree(Branch.LEFT, scan, root); // Fill left subtree using Scanner\r\n\t\tfillTree(Branch.RIGHT, scan, root); // Fill right subtree using Scanner\r\n\t\tscan.close(); // Close the file loaded from\r\n\t\treturn dt;\r\n\t}", "private void writeTree() throws IOException {\n\t\ttry (final BufferedWriter writer = Files.newBufferedWriter(destinationFile, CHARSET)) {\n\t\t\tfinal char[] treeString = new char[512];\n\t\t\tint treeStringLength = 0;\n\t\t\tfor (final CharacterCode cur : sortedCodes) {\n\t\t\t\ttreeString[treeStringLength++] = cur.getChar();\n\t\t\t\ttreeString[treeStringLength++] = (char) cur.getCode().length();\n\t\t\t}\n\t\t\tif (treeStringLength > 0xff) { //tree length will not always be less than 255, we have to write it on two bytes\n\t\t\t\tfinal int msb = (treeStringLength & 0xff00) >> Byte.SIZE;\n\t\t\t\ttreeStringLength &= 0x00ff;\n\t\t\t\twriter.write(msb);\n\t\t\t} else {\n\t\t\t\twriter.write(0);\n\t\t\t}\n\t\t\twriter.write(treeStringLength);\n\t\t\twriter.write(treeString, 0, treeStringLength);\n\t\t}\n\t}", "List<String> getTrees();", "public TreeNode readDataFile() {\n\t\tdata = new ArrayList<Instance>();\n\t\ttry {\n\t\t\tScanner s = new Scanner(new File(testFile));\n\t\t\t// took these lines from helper-code\n\t\t\tScanner l = new Scanner(s.nextLine());\n\t\t\tfor (int i = 0; l.hasNext(); i++) {\n\t\t\t\tif (!l.next().equals(classifierNames.get(i))) {\n\t\t\t\t\tSystem.err.println(\"This data file does not use the same category names as the training file.\");\n\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tl.close();\n\t\t\tl = new Scanner(s.nextLine());\n\t\t\tfor (int i = 0; l.hasNext(); i++) {\n\t\t\t\tif (!l.next().equals(attributeNames.get(i))) {\n\t\t\t\t\tSystem.err.println(\"This data file does not match the attributes of the training file.\");\n\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tl.close();\n\t\t\tSystem.out.println(\"Read attributes \"+attributeNames.toString()+\".\");\n\t\t\treadFile(s,data);\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.err.println(\"Training file not found, you should have put tests for this in main.\");\n\t\t\tSystem.err.println(\"Attempted to read \"+testFile+\".\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tArrayList<Boolean> attrs = new ArrayList<Boolean>();\n\t\tfor (int i = 0; i < attributeNames.size(); i++) {\n\t\t\tattrs.add(false);\n\t\t}\n\t\tTreeNode root = BuildTree(instances, attrs);\n\t\treturn root;\n\t}", "public void readResult() {\n File dirXml = new File(System.getProperty(\"user.dir\") + \"/target/classes/\");\n /// Get Parent Directory\n String parentDirectory = dirXml.getParent();\n File folder = new File(parentDirectory + \"/jbehave\");\n File[] listOfFiles = folder.listFiles();\n\n if (listOfFiles != null) {\n for (File listOfFile : listOfFiles) {\n if (listOfFile.isFile()) {\n String filePath = folder.getPath() + \"/\" + listOfFile.getName();\n System.out.println(\"File \" + filePath);\n if (filePath.contains(\".xml\") && !filePath.contains(\"AfterStories\") && !filePath.contains(\n \"BeforeStories\")) {\n readXML(filePath);\n }\n }\n }\n }\n }", "private static void buildDir (File dir) \n\t\tthrows Exception\n\t{\n\t\tFile[] contents = dir.listFiles();\n\t\tfor (int i = 0; i < contents.length; i++) {\n\t\t\tFile file = contents[i];\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tbuildDir(file);\n\t\t\t} else if (file.getName().endsWith(\".xml\")) {\n\t\t\t\tbuildFile(file);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public List<FileDescription> loadFileTree(FileTreeOptions fileTreeOptions) {\n try {\n String path = GetNormalizedBlobName(fileTreeOptions.getPath());\n List<FileDescription> fileTree = GetFileTree(path);\n// switch (fileTreeOptions.getOrderBy())\n// {\n// case Name:\n// fileTree = fileTreeOptions.getOrderAsc() ? fileTree.OrderBy(_ => _.Name).ToList() : fileTree.OrderByDescending(_ => _.Name).ToList();\n// break;\n// case LastModificationDate:\n// fileTree = fileTreeOptions.getOrderAsc() ? fileTree.OrderBy(_ => _.LastModificationDate).ToList() : fileTree.OrderByDescending(_ => _.LastModificationDate).ToList();\n// break;\n// case Size:\n// fileTree = fileTreeOptions.getOrderAsc() ? fileTree.OrderBy(_ => _.Size).ToList() : fileTree.OrderByDescending(_ => _.Size).ToList();\n// break;\n// default:\n// break;\n// }\n return fileTree;\n } catch (Exception ex) {\n throw new GroupDocsException(\"Failed to load file tree.\" + ex.getMessage());\n }\n }", "public String makeTree() {\r\n // Create a stack to store the files/directories in the tree\r\n Stack<DirectoryTreeNode> itemStack = new Stack<>();\r\n // Initialize a string variable to store the tree diagram\r\n String tree = \"\";\r\n // Push the root directory into the stack\r\n itemStack.push(this.rootDir);\r\n\r\n // Loop through the items in the Stack until all the items have been\r\n // traversed (this is similar to the pre-order traversal of the tree)\r\n while (!itemStack.isEmpty()) {\r\n // Get the item on the top of the stack and store it in current\r\n DirectoryTreeNode current = (DirectoryTreeNode) itemStack.pop();\r\n // Get the number of tabs required in the output for this item\r\n int numTabs = this.getNumberOfAncestors((E) current);\r\n // Get the string of tabs needed to put before current's name\r\n String tabs = this.getNumberOfTabs(numTabs);\r\n // Add the required number of tabs, the current item's of name and a\r\n // newline\r\n tree += tabs + current.getName() + \"\\n\";\r\n\r\n // Check if current is a Directory (in which case it may have\r\n // sub directories and files)\r\n if (current instanceof Directory) {\r\n // Get the list of files and directories of current directory\r\n ArrayList<DirectoryTreeNode> contents =\r\n ((Directory) current).getContents();\r\n // Loop through the contents of current and add them to the stack\r\n for (int i = contents.size() - 1; i >= 0; i--) {\r\n itemStack.add(contents.get(i));\r\n }\r\n }\r\n }\r\n // Return the generated tree diagram\r\n return tree;\r\n }", "public List<String[]> readArticlesFromDirectory(String path) throws FileNotFoundException, IOException {\n List<String[]> res = new ArrayList();\n final File directory = new File(path);\n for(final File article : directory.listFiles()) {\n BufferedReader br = new BufferedReader(new FileReader(article));\n String line;\n String[] str = new String[2];\n int label = 0;\n while((line = br.readLine()) != null) {\n if(label == 0) {\n str[0] = line;\n str[1] = \"\";\n label ++; \n }\n str[1] += line;\n }\n \n res.add(str);\n }\n return res;\n }", "private void openTreeML()\r\n {\r\n// // Create the file filter.\r\n// SimpleFileFilter[] filters = new SimpleFileFilter[] {\r\n// new SimpleFileFilter(\"xml\", \"Tree ML (*.xml)\")\r\n// };\r\n// \r\n// // Open the file.\r\n// String file = openFileChooser(true, filters);\r\n// \r\n// // Process the file. \r\n// if (file != null)\r\n// {\r\n// m_gtree = Loader.loadTreeML(file);\r\n// TreeDisplay disp = new TreeDisplay(m_gtree,0);\r\n// TreePanel panel = new TreePanel(disp, LEGEND, ORIENTATION_CONTROL_WIDGET);\r\n// m_tabbedPane.setComponentAt(1, panel);\r\n// }\r\n }", "public void showTree(IGPProgram a_prog, String a_filename)\n throws InvalidConfigurationException {\n if (a_prog == null) {\n return;\n }\n TreeNode myTree = createTree(a_prog);\n if (myTree == null) {\n return;\n }\n TreeVisualizer tv = new TreeVisualizer();\n tv.setTreeBranchRenderer(new JGAPTreeBranchRenderer());\n tv.setTreeNodeRenderer(new JGAPTreeNodeRenderer());\n tv.setBranchStartWidth(18.0);\n tv.setArenaColor(Color.black);\n tv.setBkgndColor(Color.black);\n tv.setRenderNodes(true);\n tv.setSide(1024);\n tv.setCircleDiminishFactor(0.5);\n tv.writeImageFile(tv.renderTree(myTree), new File(a_filename));\n }", "public static void main(String[] args) throws IOException{\n Tree tree = new Tree(new DoubleString(0, \"M\"));\n \n for(int x = 0; x < fileCount; x ++) {\n \t//inserts every line from every input file into the tree\n \tBufferedReader input = new BufferedReader(new FileReader(x + \".txt\"));\n \t\n \tfor(int y = 0; y < 5; y ++) {\n \t\tinput.readLine();\n \t}\n \t\n \tString line = input.readLine();\n \t\n \twhile(line != null) {\n \t\tif(line.contains(\"----\")) {\n \t\t\tbreak;\n \t\t}\n \t\t\n \t\ttree.insert(new DoubleString(Double.parseDouble(betweenPipes(line, 3).trim().substring(0, betweenPipes(line, 3).trim().length() - 1)), betweenPipes(line, 2).trim()));\n \t\tline = input.readLine();\n \t}\n \t\n \tinput.close();\n }\n \n //converts the tree into an array and sorts the array\n DoubleString[] array = Tree.toArray(tree);\n DoubleString.sort(array, true);\n //creates (or overwrites, if it's already created) the output file\n PrintWriter output = new PrintWriter(new BufferedWriter(new FileWriter(\"output.txt\")));\n output.println(\"[hide=\" + format + \" stats)][code]Combined usage for \" + format + \" stats)\\n\" + \n \t\t\"+ ---- + ------------------ + ------- +\\n\" + \n \t\t\"| Rank | Pokemon | Percent |\\n\" + \n \t\t\"+ ---- + ------------------ + ------- +\");\n \n for(int i = 0; i < array.length; i ++) {\n \t//divides every stat from the array by the number of months and prints it into the output file\n \tarray[i].divideEquals(fileCount);\n \toutput.print(\"| \");\n \tString rank = i + \"\";\n \t\n \twhile(rank.length() < 3) {\n \t\trank = ' ' + rank;\n \t}\n \t\n \toutput.print(rank + \" | \");\n \tString name = array[i].toString();\n \t\n \twhile(name.length() < 19) {\n \t\tname = name + ' ';\n \t}\n \t\n \toutput.print(name + \"| \");\n \tString integer = (array[i].getNumber() + \"\").substring(0, (array[i].getNumber() + \"\").indexOf('.'));\n \tString fraction = (array[i].getNumber() + \"000\").substring((array[i].getNumber() + \"\").indexOf('.')).substring(0, 4);\n \t\n \twhile(integer.length() < 2) {\n \t\tinteger = ' ' + integer;\n \t}\n \t\n \toutput.println(integer + fraction + \"% |\");\n }\n \n //line of code I have to include to prevent weird things\n output.close();\n\t}", "@Test\n public void testLsDirectoryAndFile() {\n FileTree myTree = new FileTree();\n String[] paths = {\"file\"};\n try {\n myTree.mkdir(paths);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"Could not create directory\");\n }\n String result = \"\";\n try {\n myTree.makeFile(\"file1\");\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"could not create file\");\n }\n String[] empty_path = {};\n try {\n result = myTree.ls(false, empty_path);\n } catch (InvalidPathException e1) {\n fail(\"Could not find the directories\");\n }\n\n assertEquals(result, \"Path at /: \\nfile\\nfile1\\n\");\n }", "public void testGetChildren() throws IOException {\n FileObject fobj = getFileObject(testFile);\n FileObject parent = fobj.getParent();\n parent = parent.createFolder(\"parent\");\n File pFile = getFile(parent);\n for (int i = 0; i < 10; i++) {\n assertTrue(new File(pFile, \"file\" + i).createNewFile());\n assertTrue(new File(pFile, \"fold\" + i).mkdir());\n }\n monitor.reset();\n FileObject[] children = parent.getChildren();\n //20 x children, 1 x File.listFiles \n monitor.getResults().assertResult(21, StatFiles.ALL);\n monitor.getResults().assertResult(21, StatFiles.READ);\n //second time\n monitor.reset();\n children = parent.getChildren();\n monitor.getResults().assertResult(0, StatFiles.ALL);\n }", "public static void main(String... aArgs) throws IOException{\n String ROOT = inputDir;\n \n output.append(header);\n output.append(NEWLINE);\n output.append(OPEN_START + rootname + CLOSE);\n output.append(NEWLINE);\n \n FileVisitor<Path> fileProcessor = new ProcessFile();\n Files.walkFileTree(Paths.get(ROOT), fileProcessor);\n }", "public void initializeTree(List<FilePlanEntry> entries) {\n\t\t\n\t\tList<FilePlan> fileList = creatingFilesPlan(entries);\n\t\tSystem.out.println(fileList);\n\t\t\n\t}", "AntiIterator<FsPath> listFilesAndDirectories(FsPath dir);", "public static void main(String[] args) throws IOException {\r\n\t\t\r\n\t\ttry {\r\n\t\tString inputfile = args[0]+\".txt\";\r\n\t\tString outputfile = args[1]+\".txt\";\r\n\t\tString outputfile2 = args[2]+\".txt\";\r\n\r\n\r\n\r\n\t\tFileInputStream textFile1 = new FileInputStream(inputfile);\r\n\t\tScanner scan = new Scanner(textFile1);\r\n\t\tBinaryTree bst = new BinaryTree();\r\n\t\t\r\n\t\t//reading input files and storing\r\n\t\twhile(scan.hasNextLine()){\r\n\t\t\t\r\n\t\tString s = scan.nextLine();\r\n\t\tchar code=s.charAt(0);\r\n\t\tint id = Integer.parseInt(s.substring(1, 8));\r\n\t\t\tString nah=s.substring(8,8+25);\r\n\t\t\tString name= nah.trim();\r\n\t\t\tString department=s.substring(33,37);\r\n\t\t\tString program=s.substring(37,40);\r\n\t\t\tchar year=s.charAt(41);\r\n\t\t\tNode n= new Node();\r\n\t\t\tStudent stu = new Student();\r\n\t\t\tn.code=code;\r\n\t\t\tstu.id=id;\r\n\t\t\tstu.name=name;\r\n\t\t\tstu.department=department;\r\n\t\t\tstu.program=program;\r\n\t\t\tstu.year=year;\r\n\t\t\tif(code=='I')\r\n\t\t\t\tbst.insert(stu);\r\n\t\t\telse if(code=='D')\r\n\t\t\t\tbst.deleteKey(stu);\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\"Wrong code detected in input file. Should be I or D\");\r\n\t\t\t//System.out.println(\"Code: \" + code + \" ID: \" + stu.id + \" Name: \" + stu.name+ \" Dep: \" + stu.department + \" Program: \" + stu.program + \" Year: \"+ stu.year);\r\n\t\t}\r\n\t\t //Just changing the Stream so it will print to a file instead of console.\r\n\t\t PrintStream printStream = new PrintStream(new FileOutputStream(outputfile));\r\n\t\t System.setOut(printStream);\r\n\t\t System.out.println(\"\\nInorder traversal of binary tree is \");\r\n\t\t System.out.println(String.format(\"%-10s %-7s %-4s %-4s %-4s \",\"Name\",\" ID\",\"Department\",\"Program\",\"Year\"));\r\n\t\t bst.printInorder(outputfile);\r\n\t\t PrintStream printStream2 = new PrintStream(new FileOutputStream(outputfile2));\r\n\t\t System.setOut(printStream2);\r\n\t\t System.out.println(\"\\nBreadthFirst traversal of binary tree is \");\r\n\t\t System.out.println(String.format(\"%-10s %-7s %-4s %-4s %-4s \",\"Name\",\" ID\",\"Department\",\"Program\",\"Year\"));\r\n\t\t bst.printLevelOrder(outputfile2);\r\n\t\t \r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"usage\");\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\r\n\t}", "private void exportTreeML()\r\n {\r\n // Create the file filter.\r\n// SimpleFileFilter[] filters = new SimpleFileFilter[] {\r\n// new SimpleFileFilter(\"xml\", \"Tree ML (*.xml)\")\r\n// };\r\n// \r\n// // Save the file.\r\n// String file = openFileChooser(false, filters);\r\n// \r\n// // Write the file.\r\n// if (file != null)\r\n// {\r\n// String extension = file.substring(file.length() - 4);\r\n// if (!extension.equals(\".xml\")) file = file + \".xml\";\r\n// Writer.writeTreeML(m_gtree, file);\r\n// }\r\n }", "@Test\n public void incrementalBuild_treeArtifacts_correctlyProducesNewTree() throws Exception {\n if (OS.getCurrent() == OS.WINDOWS) {\n return;\n }\n writeOutputDirRule();\n write(\n \"BUILD\",\n \"load(':output_dir.bzl', 'output_dir')\",\n \"output_dir(\",\n \" name = 'foo',\",\n \" content_map = {'file-1': '1', 'file-2': '2', 'file-3': '3'},\",\n \")\");\n setDownloadToplevel();\n buildTarget(\"//:foo\");\n waitDownloads();\n\n write(\n \"BUILD\",\n \"load(':output_dir.bzl', 'output_dir')\",\n \"output_dir(\",\n \" name = 'foo',\",\n \" content_map = {'file-1': '1', 'file-4': '4'},\",\n \")\");\n restartServer();\n setDownloadToplevel();\n buildTarget(\"//:foo\");\n waitDownloads();\n\n assertValidOutputFile(\"foo/file-1\", \"1\");\n assertValidOutputFile(\"foo/file-4\", \"4\");\n assertOutputDoesNotExist(\"foo/file-2\");\n assertOutputDoesNotExist(\"foo/file-3\");\n }", "public void showTree(IGPProgram a_prog, String a_filename,\n TreeBranchRenderer a_treeBranchRenderer,\n TreeNodeRenderer a_treeNodeRenderer)\n throws InvalidConfigurationException {\n TreeNode myTree = createTree(a_prog);\n if (myTree == null) {\n return;\n }\n TreeVisualizer tv = new TreeVisualizer();\n tv.setTreeBranchRenderer(a_treeBranchRenderer);\n tv.setTreeNodeRenderer(a_treeNodeRenderer);\n tv.setBranchStartWidth(18.0);\n tv.setArenaColor(Color.black);\n tv.setBkgndColor(Color.black);\n tv.setRenderNodes(true);\n tv.setSide(1024);\n tv.setCircleDiminishFactor(0.5);\n tv.writeImageFile(tv.renderTree(myTree), new File(a_filename));\n }", "public void recursiveList(String path) {\n Directory tDir = Directory.getDir(path);\n if (tDir == null) {\n str += \"Error: the input path \" + path + \" does not exist!\\n\";\n } else if (tDir.getSubContent().isEmpty()) {\n str += tDir.getName() + \"\\n\";\n } else {\n str += tDir.getName() + \":\";\n indentation += \"\\t\";\n for (int i = 0; i < tDir.getSubContent().size(); i++) {\n str += indentation;\n recursiveList(tDir.getSubContent().get(i).getAbsolutePath());\n }\n indentation = indentation.substring(0, indentation.length() - 1);\n }\n }", "private void findChildNodesForDirFile(WebFile dirFile, List<ClassTreeNode> classTreeNodes)\n {\n // Get directory files\n WebFile[] dirFiles = dirFile.getFiles();\n\n // Iterate over dir files and add to ClassFiles or PackageDirs\n for (WebFile file : dirFiles) {\n\n // Handle class file\n if (isClassFile(file)) {\n String className = getClassNameForClassFile(file);\n ClassTreeNode classNode = new ClassTreeNode(className, false);\n classTreeNodes.add(classNode);\n }\n\n // Handle package\n if (isPackageDir(file)) {\n String packageName = getPackageNameForPackageDirFile(file);\n if (!ListUtils.hasMatch(classTreeNodes, classTreeNode -> classTreeNode.fullName.equals(packageName))) {\n ClassTreeNode packageNode = new ClassTreeNode(packageName, true);\n classTreeNodes.add(packageNode);\n }\n }\n }\n }", "public static DecisionTree loadTree(String filename) throws FileNotFoundException {\r\n\r\n\t\treturn loadTree(new File(filename));\r\n\t}", "public TreeNode readTrainingFile() {\n\t\t// first, read the training data into some storage location\n\t\ttry {\n\t\t\tScanner s = new Scanner(new File(trainingFile));\n\t\t\t// took these lines from helper-code\n\t\t classifierNames = new ArrayList<String>();\n\t\t for (Scanner l = new Scanner(s.nextLine()); l.hasNext();) {\n\t\t \tclassifierNames.add(l.next());\n\t\t }\n\t\t\tif (attributeNames.size() == 0) {\n\t\t\t\tScanner line = new Scanner(s.nextLine());\n\t\t\t\twhile (line.hasNext()) {\n\t\t\t\t\tattributeNames.add(line.next());\n\t\t\t\t}\n\t\t\t\tline.close();\n\t\t\t}\n\t\t\treadFile(s,instances);\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.err.println(\"Training file not found, you should have put tests for this in main.\");\n\t\t\tSystem.err.println(\"Attempted to read \"+trainingFile+\".\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tsetDefaultNode();\n\t\tArrayList<Boolean> ar = new ArrayList<Boolean>();\n\t\tfor (int i = 0; i < attributeNames.size(); i++) {\n\t\t\tar.add(false);\n\t\t}\n\t\treturn BuildTree(instances, ar);\n\t}", "public LevelOrderIterator(File rootNode) throws FileNotFoundException {\n\t\t// TODO 1\n\t\tif(!rootNode.exists())\n\t\t\tthrow new FileNotFoundException(\"Doesn't exsit\");\n\t\tqueue.enqueue(rootNode);\n\t\t//root = rootNode;\n\t}", "private void parseTree(BufferedReader in, VssProject vssProject) {\r\n try {\r\n String line;\r\n boolean start = false;\r\n while ((line = in.readLine()) != null) {\r\n if (!start) {\r\n if (line.startsWith(\"$\") && line.endsWith(\":\")) {\r\n start = true;\r\n continue;\r\n }\r\n } else {\r\n if (line.length() == 0)\r\n break;\r\n if (line.startsWith(\"$\")) {\r\n \t\r\n String projectName = line.substring(1);\r\n if ( config.getProjectsToIgnore().contains( projectName ) )\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\t// Ignore list!\r\n \t\t\t\t\t\tLOG.warn( \"Ignore project \" + projectName + \" found in : \" + vssProject.getVssPath() );\r\n \t\t\t\t\t\tcontinue;\r\n \t\t\t\t\t}\r\n \r\n VssProject newProject = new VssProject();\r\n newProject.setName(projectName);\r\n newProject.setParent(vssProject);\r\n vssProject.addSubproject(newProject);\r\n \r\n } else \r\n {\r\n if (line.startsWith(\"No items found under $\")) {\r\n continue;\r\n } \r\n String filename = line;\r\n String parent = vssProject.getVssPath().substring(config.getProject().length());\r\n if (parent.length() > 0) {\r\n if (parent.startsWith(\"/\"))\r\n parent = parent.substring(1);\r\n if (!parent.endsWith(\"/\"))\r\n parent += \"/\";\r\n }\r\n String path = parent + filename;\r\n VssFile newFile = new VssFile(path, filename);\r\n newFile.setParent(vssProject);\r\n vssProject.addFile(newFile);\r\n }\r\n }\r\n }\r\n } catch (IOException e) {\r\n throw new VssException(\"readLine\", e);\r\n }\r\n }", "public static ArrayList<Path> traverse(Path directory) {\r\n ArrayList<Path> filenames = new ArrayList<Path>();\r\n traverse(directory, filenames);\r\n return filenames;\r\n }", "private static BST readDataFile(Scanner in)\n\t{\n\t\tBST tree=new BST();\n\t\t\n\t\t//read the file line by line\n\t\twhile(in.hasNextLine())\n\t\t{\n\t\t\t// Scanner to read 1 line; closed before end of while loop\n\t\t\tString currentLine=in.nextLine();\n\t\t\tScanner line=new Scanner(currentLine);\n\t\t\t\n\t\t\t// makes the scanner separate the information in the line by \",\" and \";\"\n\t\t\tline.useDelimiter(\",|;\");\n\t\t\t\n\t\t\t// create a profile from the line and insert it into the tree\n\t\t\tProfile p=createProfile(line);\n\t\t\ttree.insertProfile(p);\t\n\t\t\t\t\t\n\t\t\tline.close();\n\t\t}\n\t\t\n\t\tin.close();\n\t\treturn tree;\n\t}", "public void saveTree(String filename) {\r\n\t\ttry { // Try saving tree\r\n\t\t\tsaveTree(new File(filename));\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// Exit if there is an exception\r\n\t\t\tSystem.err.println(\"Could not save to file: \" + filename);\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}", "public void run(){\n\n File fileRoot = new File(path);\n root = new DefaultMutableTreeNode(new fileNode(fileRoot));\n treemodel = new DefaultTreeModel(root);\n\n tree = new JTree(treemodel);\n tree.setShowsRootHandles(true);\n JScrollPane scrollPane = new JScrollPane(tree);\n this.panel.add(scrollPane);\n //frame.setLocationByPlatform(true);\n this.panel.setSize(1000, 1000);\n this.panel.setVisible(true);\n /*\n this.panel.add(scrollPane);\n //frame.setLocationByPlatform(true);\n this.panel.setSize(1000, 1000);\n this.panel.setVisible(true);\n */\n\n createChildren cc = new createChildren(fileRoot, root);\n new Thread(cc).start();\n\n\n }", "static Stream<File> allFilesIn(File folder) \r\n\t{\r\n\t\tFile[] children = folder.listFiles();\r\n\t\tStream<File> descendants = Arrays.stream(children).filter(File::isDirectory).flatMap(Program::allFilesIn);\r\n\t\treturn Stream.concat(descendants, Arrays.stream(children).filter(File::isFile));\r\n\t}", "public void parseFile(File dir) {\r\n\t\tFile[] files = dir.listFiles();\r\n\t\tfor(int i = 0; i < files.length; i++) {\r\n\t\t\tif(files[i].isDirectory()) {\r\n\t\t\t\tparseFile(files[i]);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(!files[i].exists()) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tString fileName = files[i].getName();\r\n\t\t\t\tif(fileName.toLowerCase().endsWith(\".json\")) {\r\n\t\t\t\t\twq.execute(new Worker(library, files[i]));\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Stream<Path> loadAll() {\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(\"File Retrived\");\n\t\t\treturn Files.walk(this.path, 1).filter(path->!path.equals(this.path)).map(this.path::relativize);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"File Retrived Error\");\n\t\t}\n\t\treturn null;\n\t}", "public final void readFile(final String filePath, final boolean printTree)\r\n {\r\n setNumberOfPivotalElements(0);\r\n clearFullTree();\r\n\r\n taggedDataListArray = new TaggedDataList[stdef.MAX_NUMBER_OF_PARTS];\r\n temporaryTaggedDataList = new TaggedDataList(stdef.MAX_NUMBER_OF_PARTS);\r\n pivotalElementName = new String[stdef.MAX_NUMBER_OF_PARTS];\r\n\r\n setPrintFullTree(printTree);\r\n loadData(filePath);\r\n }", "public ArrayList<String> traverseFiles(File inputDir, ArrayList<String> Documents2 )\n\t{\n\t\tif (inputDir.isDirectory()) {\n\t\t\t//System.out.println(\"Checking for directory...\");\n\t String[] children = inputDir.list();\n\t for (int i = 0; children != null && i < children.length; i++) {\n\t traverseFiles(new File(inputDir, children[i]), Documents2);\n\t }\n\t }\n\t if (inputDir.isFile()) \n\t \t{ Documents2.add(inputDir.getAbsolutePath());}//change it if needed\n\t \n\t return Documents2;\n\t // System.out.println(Documents.size());\n\t}", "public ArrayList<Root> separateRoots(String fileName) throws FileNotFoundException {\n\t\t//TODO: Make this a constructor so that roots are automatically separated when a Separation object is created.\n\t\treadIn(fileName);\n\t\tsplitLevels();\n\t\tcombineSeeds();\n\t\tremoveSmallRoots(20); //Change this number to change size of \"small\" root\n\t\treturn allRoots;\n\t}", "private static void processRepository(File repo) {\n System.out.println(\"Processing repository: \" + repo);\n for (File fileOrDir : repo.listFiles()) {\n if (fileOrDir.isDirectory()) {\n processModule(fileOrDir);\n }\n }\n }", "static void walkTheDir(){ \n\t try (Stream<Path> paths = Files.walk(Paths.get(\"/ownfiles/tullverketCert/source\"))) {\n\t \t paths\n\t \t .filter(Files::isRegularFile)\n\t \t //.forEach(System.out::println);\n\t \t .forEach( e ->{\n\t \t \t\tSystem.out.println(e);\n\t \t \t\tSystem.out.println(e.getParent());\n\t \t \t\t\n\t \t \t});\n\t \t \n \t}catch (Exception e) { \n\t System.out.println(\"Exception: \" + e); \n\t } \n\t }", "private static void listar(Path a){\n File dir = new File(a.toString());\n if(dir.isDirectory()){\n String[] dirContents = dir.list();\n for(int i =0; i < dirContents.length; i++){\n System.out.println(dirContents[i]);\n }\n }\n }", "public String recursivelyTraverse(IDirectory currentDir) {\r\n ArrayList<DirectoryTreeNode> contents =\r\n ((Directory) currentDir).getContents();\r\n ArrayList<IDirectory> subDirectories =\r\n ((Directory) currentDir).getSubDirectories();\r\n String resultList = \"\";\r\n\r\n if (contents.isEmpty()) {\r\n return resultList + \"\\n\";\r\n } else {\r\n // prints the names of the sub directories and the files\r\n for (DirectoryTreeNode content : contents) {\r\n resultList += content.getName() + \"\\n\";\r\n }\r\n resultList += \"\\n\";\r\n for (IDirectory subDir : subDirectories) {\r\n resultList += subDir.getName() + \":\\n\";\r\n resultList += this.recursivelyTraverse(subDir);\r\n }\r\n resultList += \"\\n\";\r\n }\r\n return resultList;\r\n }", "public void read(List<File> filesOrDirs) throws IOException {\n List<File> files = resolveFiles(filesOrDirs);\n\n if (files.isEmpty())\n return;\n\n for (File file : files) {\n buf.clear();\n\n UUID nodeId = nodeId(file);\n\n try (FileIO io = ioFactory.create(file)) {\n fileIo = io;\n\n while (true) {\n if (io.read(buf) <= 0) {\n if (forwardRead == null)\n break;\n\n io.position(forwardRead.nextRecPos);\n\n buf.clear();\n\n curHnd = handlers;\n\n forwardRead = null;\n\n continue;\n }\n\n buf.flip();\n\n buf.mark();\n\n while (deserialize(buf, nodeId)) {\n if (forwardRead != null && forwardRead.found) {\n if (forwardRead.resetBuf) {\n buf.limit(0);\n\n io.position(forwardRead.curRecPos);\n }\n else\n buf.position(forwardRead.bufPos);\n\n curHnd = handlers;\n\n forwardRead = null;\n }\n\n buf.mark();\n }\n\n buf.reset();\n\n if (forwardRead != null)\n forwardRead.resetBuf = true;\n\n buf.compact();\n }\n }\n\n knownStrs.clear();\n forwardRead = null;\n }\n }", "private void processDir(final String filename) throws FileNotFoundException, IOException, RepositoryException,\n RDFHandlerException\n {\n final File dataDir = new File(filename);\n System.out.println(\"Using data directory: \" + dataDir);\n\n // get the data files\n final File[] dataFiles = dataDir.listFiles(new FilenameFilter()\n {\n @Override\n public boolean accept(final File dir, final String name)\n {\n return name.contains(\"heartrate\") && (name.endsWith(\"csv\") || name.endsWith(\"CSV\"));\n }\n });\n // want to make sure we only create each person and sensor once\n Arrays.sort(dataFiles);\n\n // FIXME testing with just 1 file to start\n final File[] testFiles = dataFiles;\n // testFiles[0] = dataFiles[0];\n\n int count = 0;\n\n for (final File file : testFiles)\n {\n final String oldPid = currentPid;\n\n System.out.println(\"processing \" + file);\n\n try\n {\n parseFilename(file);\n\n // did we change people?\n if (oldPid != currentPid)\n {\n createNewPersonHeartRate();\n }\n\n repoConn.begin();\n count += processFileHeartRate(file);\n repoConn.commit();\n\n System.out.println(String.format(\" %,d records\", Integer.valueOf(count)));\n }\n catch (final NumberFormatException e)\n {\n System.err.println(\"Cannot read the date from the file format\");\n }\n }\n }", "public void walkTree(File source, File target, int depth) throws Exception {\n depth++;\n boolean noTarget = (null == target);\n\n if (!source.canRead())\n Utils.rude(\"Cannot read from source directory \" + source);\n if (!noTarget && !target.canWrite())\n Utils.rude(\"Cannot write to target directory \" + target);\n\n if (source.isDirectory()) {\n File[] filesInDirectory = source.listFiles();\n for (int i = 0; i < filesInDirectory.length; i++) {\n File file = filesInDirectory[i];\n String name = file.getName();\n int dot = name.lastIndexOf('.');\n String ext = null;\n if (-1 != dot)\n ext = name.substring(dot + 1);\n\n if (file.isDirectory()) {\n File newTarget = null;\n if (!noTarget) {\n StringTokenizer st = new StringTokenizer(\n file.getPath(), \"\\\\/\");\n String newdir = null;\n while (st.hasMoreTokens())\n newdir = st.nextToken();\n String targetName = maybeAppendSeparator(target\n .toString());\n newTarget = new File(targetName + newdir);\n if (!newTarget.mkdir())\n Utils.rude(\"Failed to create target directory \"\n + newTarget);\n }\n\n // recurse\n walkTree(file, newTarget, depth);\n } else if (file.isFile()\n && (extensions == null || (!file.isHidden() && extensions\n .contains(ext)))) {\n // this is a file and we need to add trace into it !\n actor.actOnFile(file, target, depth);\n }\n }\n } else {\n actor.actOnFile(source, target, depth);\n }\n }", "private void scanDirectory(final File directory) throws AnalyzerException {\n\t\tFile[] files = directory.listFiles();\n\t\tfor (File f : files) {\n\t\t\t// scan .class file\n\t\t\tif (f.isFile() && f.getName().toLowerCase().endsWith(\".class\")) {\n\t\t\t\tInputStream is = null;\n\t\t\t\ttry {\n\t\t\t\t\tis = new FileInputStream(f);\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\tthrow new AnalyzerException(\n\t\t\t\t\t\t\t\"Cannot read input stream from '\"\n\t\t\t\t\t\t\t\t\t+ f.getAbsolutePath() + \"'.\", e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tnew ClassReader(is).accept(scanVisitor,\n\t\t\t\t\t\t\tClassReader.SKIP_CODE);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new AnalyzerException(\n\t\t\t\t\t\t\t\"Cannot launch class visitor on the file '\"\n\t\t\t\t\t\t\t\t\t+ f.getAbsolutePath() + \"'.\", e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tis.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new AnalyzerException(\n\t\t\t\t\t\t\t\"Cannot close input stream on the file '\"\n\t\t\t\t\t\t\t\t\t+ f.getAbsolutePath() + \"'.\", e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// loop on childs\n\t\t\t\tif (f.isDirectory()) {\n\t\t\t\t\tscanDirectory(f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void checkThruFileTree(File f[], CachedUrlSet myCUS){\n String exclUrlStem = \"http://www.example.com/branch1/branch1/branch1/\";\n\n for (int ix=0; ix<f.length; ix++) {\n\t if (f[ix].isDirectory()) {\n\t // get all the files and links there and iterate\n\t checkThruFileTree(f[ix].listFiles(), myCUS);\n\t } else {\n\n\t // get the f[ix] 's level information\n\t String fileUrl = sau.mapContentFileNameToUrl(f[ix].getAbsolutePath());\n\t int fileLevel = sau.getLinkDepth(fileUrl);\n\t log.debug2(\"File: \" + fileUrl + \" in Level \" + fileLevel);\n\n\t CachedUrl cu = sau.makeCachedUrl(fileUrl);\n\t if (fileLevel <= maxDepth\n\t && !StringUtil.startsWithIgnoreCase(fileUrl, exclUrlStem)) {\n\t assertTrue(cu + \" has no content\", cu.hasContent());\n\t } else {\n\t assertFalse(cu + \" has content when it shouldn't\",\n\t\t\t cu.hasContent());\n\t }\n\t }\n }\n return; // when all \"File\" in the array are checked\n }", "private void getFiles() {\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(inputFileName);\n\t\t\tinputBuffer = new BufferedReader(fr);\n\n\t\t\tFileWriter fw = new FileWriter(outputFileName);\n\t\t\toutputBuffer = new BufferedWriter(fw);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File not found: \" + e.getMessage());\n\t\t\tSystem.exit(-2);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IOException \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-3);\n\t\t}\n\t}", "private static void getResults() {\n\t\t//Variables\n\t\tFile directoryOfChunks = new File(\"output\");\n\t\tFile[] files = directoryOfChunks.listFiles();\n\t\tArrayList<String> filesInFolder = new ArrayList<>();\n\t\tArrayList<String> chunkResults = new ArrayList<>();\n\t\tBufferedReader br = null;\n\t\tReadFromFile rf = new ReadFromFile();\n\n\t\t//Get files from output folder\n\t\tif(directoryOfChunks.exists() && directoryOfChunks.isDirectory()){\n\t\t\tdirectoryName = \"output\";\n\t\t\t//Copy file names into arraylist\n\t\t\tfor (File f: files) {\n\t\t\t\t//Save file names into arraylist.\n\t\t\t\tfilesInFolder.add(f.getName());\n\t\t\t}\n\t\t}\n\t\t//if not a file or directory print error message\n\t\telse{\n\t\t\tSystem.out.println(\"No such file/directory: \" + directoryOfChunks);\n\t\t}\n\n\t\t//for loop to open and read each individual file\n\t\tfor (String file : filesInFolder) {\n\t\t\ttry {\n\n\t\t\t\tFileReader reader = new FileReader(directoryName + \"\\\\\" + file);\n\t\t\t\tbr = new BufferedReader(reader);\n\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\tchunkResults.addAll(rf.readFromChunk(br));\n\t\t}\n\n\t\t//Call sanitizeAndSplit\n\t\tsanitizeAndSplit(chunkResults);\n\t}", "private ArrayList<char[]> subdirectoriesToFiles(String inputDir, ArrayList<char[]> fullFileList) throws IOException {\n\t\tArrayList<char[]> currentList =\n\t\t\t\tnew ArrayList<char[]>(Arrays.asList(new File(inputDir).listFiles()));\n\t\t\n\t\tfor (File file: currentList) {\n\t\t\tif (isJavaFile(file)) \n\t\t\t\tfullFileList.add(file);\n\t\t\t\n\t\t\telse if (file.isDirectory())\n\t\t\t\tsubdirectoriesToFiles(file.getPath(), fullFileList);\n\t\t\t\n\t\t\telse if (isJarFile(file))\n\t\t\t\tsubdirectoriesToFiles(jarToFile(file), fullFileList);\n\t\t}\n\t\treturn fullFileList;\n\t}", "public static void Java_tree(File dir, int depth, String sort_method) {\n recursive_tree(dir, depth, sort_method, 1);\n }", "private List<Path> listSourceFiles(Path dir) throws IOException {\n\t\tList<Path> result = new ArrayList<>();\n\t\ttry (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, \"*.json\")) {\n\t\t\tfor (Path entry: stream) {\n\t\t\t\tresult.add(entry);\n\t\t\t}\n\t\t} catch (DirectoryIteratorException ex) {\n\t\t\t// I/O error encounted during the iteration, the cause is an IOException\n\t\t\tthrow ex.getCause();\n\t\t}\n\t\treturn result;\n\t}", "List<File> list(String directory) throws FindException;", "private List<DMTFile> listFilesRecursive(String path) {\n\t\tList<DMTFile> list = new ArrayList<DMTFile>();\n\t\tDMTFile file = getFile(path); //Get the real file\n\t\t\n\t\tif (null != file ){ //It checks if the file exists\n\t\t\tif (! file.isDirectory()){\n\t\t\t\tlist.add(file);\n\t\t\t} else {\n\t\t\t\tDMTFile[] files = listFilesWithoutConsoleMessage(file.getPath());\n\t\t\t\tfor (int x = 0; x < files.length; x++) {\n\t\t\t\t\tDMTFile childFile = files[x];\t\t \n\t\t\t\t\tif (childFile.isDirectory()){\n\t\t\t\t\t\tlist.addAll(listFilesRecursive(childFile.getPath()));\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlist.add(childFile);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public ScanResult getFilesRecursively() {\n\n final ScanResult scanResult = new ScanResult();\n try {\n Files.walkFileTree(this.basePath, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n if (!attrs.isDirectory() && PICTURE_MATCHER.accept(file.toFile())) {\n scanResult.addEntry(convert(file));\n System.out.println(file.toFile());\n }\n return FileVisitResult.CONTINUE;\n }\n });\n } catch (IOException e) {\n // intentional fallthrough\n }\n\n return new ScanResult();\n }", "public static void listOfFiles(File dirPath){\n\t\tFile filesList[] = dirPath.listFiles();\r\n \r\n\t\t// For loop on each item in array \r\n for(File file : filesList) {\r\n if(file.isFile()) {\r\n System.out.println(file.getName());\r\n } else {\r\n \t // Run the method on each nested folder\r\n \t listOfFiles(file);\r\n }\r\n }\r\n }", "@Test\n public void testLsDirectory() {\n FileTree myTree = new FileTree();\n String[] paths = {\"file\"};\n try {\n myTree.mkdir(paths);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"Could not create file\");\n }\n String result = \"\";\n try {\n result = myTree.ls(false, paths);\n } catch (InvalidPathException e1) {\n fail(\"Could not find the directories\");\n }\n\n assertEquals(result, \"Path at file: \\n\");\n }", "private void FindFiles(Path findPath)\n {\n\n try (DirectoryStream<Path> stream = Files.newDirectoryStream(findPath))\n {\n\n for (Path thisPath : stream)\n {\n File file = new File(thisPath.toString());\n\n if (file.isDirectory())\n {\n dirCount++;\n\n if (HasMatch(thisPath.toString(), lineIncludePattern, lineExcludePattern))\n {\n dirLineMatchCount++;\n\n System.out.println(thisPath.toAbsolutePath().toString() + \",directory,none\");\n }\n\n if (HasMatch(thisPath.toString(), dirIncludePattern, dirExcludePattern))\n {\n dirMatchCount++;\n folderLevel++;\n //indentBuffer = String.join(\"\", Collections.nCopies(folderLevel * 3, \" \"));\n indentBuffer = \"\";\n\n //System.out.println(indentBuffer + thisPath.toString() + \" ...\");\n FindFiles(thisPath.toAbsolutePath());\n\n folderLevel--;\n //indentBuffer = String.join(\"\", Collections.nCopies(folderLevel * 3, \" \"));\n }\n }\n else\n {\n fileCount++;\n\n if (HasMatch(thisPath.getParent().toString(), lineIncludePattern, lineExcludePattern))\n {\n fileLineMatchCount++;\n\n System.out.println(thisPath.getParent().toString() + \",\" + thisPath.getFileName() + \",none\");\n }\n\n if (HasMatch(thisPath.toString(), fileIncludePattern, fileExcludePattern))\n {\n fileMatchCount++;\n\n File refFile;\n if (doReplace)\n {\n refFile = new File(thisPath.toString() + \"_bak\");\n file.renameTo(refFile);\n\n //System.out.println(indentBuffer + thisPath.toString());\n Scan(refFile.toPath().toAbsolutePath().toString(),thisPath.toAbsolutePath().toString());\n }\n else\n {\n //System.out.println(indentBuffer + thisPath.toString());\n Scan(file.toPath().toAbsolutePath().toString(),thisPath.toAbsolutePath().toString());\n }\n\n }\n }\n }\n }\n catch (Exception e)\n {\n System.err.format(\"Exception occurred trying to read '%s'.\", findPath);\n e.printStackTrace();\n }\n\n }", "GitFile[] getFilesImpl() throws Exception\n {\n TreeWalk twalk = new TreeWalk(getRepo()); twalk.addTree(_rev);\n List <GitFile> files = new ArrayList();\n while(twalk.next()) {\n ObjectId id = twalk.getObjectId(0);\n RevObject rid = getRevObject(id);\n String path = _path + (_path.length()>1? \"/\" : \"\") + twalk.getNameString();\n GitFile child = rid instanceof RevTree? new GitTree((RevTree)rid, path) : new GitBlob((RevBlob)rid, path);\n files.add(child);\n }\n return files.toArray(new GitFile[files.size()]);\n }", "public void testBasicTigerTree() throws Exception {\n assertTrue(file.exists());\n URN urn = URN.createSHA1Urn(file);\n assertEquals(sha1, urn.toString());\n \n InputStream in = new BufferedInputStream(new FileInputStream(file));\n try {\n hashTree = tigerTreeFactory.createHashTree(file.length(), in, urn);\n } finally {\n in.close();\n }\n\n // most important test:\n // if we get the root hash right, the rest will be working, too\n assertEquals(root32, hashTree.getRootHash());\n assertEquals(4, hashTree.getDepth());\n assertTrue(hashTree.isGoodDepth());\n assertEquals(\"/uri-res/N2X?\" + sha1, hashTree.getThexURI());\n assertEquals(\"/uri-res/N2X?\" + sha1 + \";\" + root32,\n hashTree.httpStringValue());\n\n List allNodes = tigerTreeNodeManager.getAllNodes(hashTree);\n assertEquals(5, allNodes.size());\n List one, two, three, four, five;\n one = (List)allNodes.get(0);\n two = (List)allNodes.get(1);\n three = (List)allNodes.get(2);\n four = (List)allNodes.get(3);\n five = (List)allNodes.get(4);\n assertEquals(five, hashTree.getNodes());\n \n // tree looks like:\n // u (root)\n // / \\\n // t s\n // / \\ \\\n // q r s\n // / \\ / \\ / \\\n // l m n o p k\n // /\\ /\\ /\\ /\\ /\\ \\ \n // a b c d e f g h i j k\n \n assertEquals(root32, Base32.encode((byte[])one.get(0)));\n assertEquals(2, two.size());\n assertEquals(3, three.size());\n assertEquals(6, four.size());\n assertEquals(11, five.size());\n assertEquals(1+2+3+6+11, hashTree.getNodeCount());\n }", "TreeStorage getTreeStorage();", "private ArrayList<char[]> subdirectoriesToFiles(ArrayList<char[]> currentList, ArrayList<char[]> fullFileList) throws IOException {\t\t\n\t\tfor (File file: currentList) {\n\t\t\tif (isJavaFile(file)) \n\t\t\t\tfullFileList.add(file);\n\t\t\telse if (file.isDirectory()){\n\t\t\t\t$.log(file.toString());\n\t\t\t\tsubdirectoriesToFiles(file.getAbsolutePath(), fullFileList);\n\t\t\t}\n\t\t\telse if (isJarFile(file))\n\t\t\t\tsubdirectoriesToFiles(jarToFile(file), fullFileList);\n\t\t}\n\t\treturn fullFileList;\n\t}" ]
[ "0.6380835", "0.6062753", "0.5987694", "0.5815023", "0.58138347", "0.5785236", "0.57468665", "0.57349825", "0.56953365", "0.5683674", "0.5675588", "0.5615325", "0.5580913", "0.55185777", "0.5490693", "0.547583", "0.54241973", "0.54194605", "0.54150903", "0.5409466", "0.536193", "0.5345592", "0.5343786", "0.5343461", "0.5341168", "0.53267", "0.53245246", "0.53192616", "0.5317119", "0.53148776", "0.5313167", "0.53055584", "0.53002393", "0.52885985", "0.52841693", "0.52691805", "0.5255785", "0.5241338", "0.522976", "0.5229474", "0.522571", "0.5215286", "0.52098", "0.5208936", "0.5203309", "0.52002376", "0.5173044", "0.51729506", "0.5171155", "0.5170928", "0.5170774", "0.516453", "0.5157528", "0.515038", "0.51477474", "0.51339155", "0.5120653", "0.5107334", "0.5105482", "0.51041824", "0.50899214", "0.50811356", "0.5080279", "0.50779283", "0.5074846", "0.5069031", "0.50636536", "0.50627697", "0.50542974", "0.5054165", "0.5051887", "0.5021169", "0.50083107", "0.5007804", "0.50071603", "0.5003679", "0.50015837", "0.49954098", "0.49946308", "0.4984989", "0.49792275", "0.49790904", "0.49784452", "0.4974451", "0.4972072", "0.49712586", "0.49690422", "0.49663702", "0.49626285", "0.4962047", "0.49593985", "0.49590182", "0.49568924", "0.49542227", "0.49457645", "0.49423927", "0.49401855", "0.49337247", "0.49305496", "0.49246544" ]
0.72739995
0
read file with trees, each in the Newick format
public static ArrayList<Tree> readTreesFromFile(File file) { ArrayList<Tree> trees = new ArrayList<Tree>(); BufferedReader br = null; try { br = new BufferedReader(new FileReader(file)); String line; while ((line = br.readLine()) != null) { if (!line.contains("(")) { continue; } Tree auxTree = new Tree(line); trees.add(auxTree); } br.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return trees; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static ArrayList<Node> getNodes(File path)\n {\n //log the event happining\n Start.log(\"Getting Nodes\");\n ArrayList<Node> tempNodes = new ArrayList<Node>();\n ArrayList<String> file = getFile(path);\n for (int i =0; i < file.size();i++)\n {\n //use scanner to pharse the string into the relivant bits for getting the node data\n Scanner parse = new Scanner(file.get(i));\n tempNodes.add(new Node(parse.nextInt(),CPType.valueOf(parse.next())));\n }\n return tempNodes;\n }", "private static DecisionTree loadTree(File file) throws FileNotFoundException {\r\n\t\tScanner scan = new Scanner(file); // Read from file\r\n\t\t// First line of file is question at root node\r\n\t\tDecisionTree dt = new DecisionTree(scan.nextLine());\r\n\t\tBinaryNode<String> root = dt.getRootNode();\r\n\t\tfillTree(Branch.LEFT, scan, root); // Fill left subtree using Scanner\r\n\t\tfillTree(Branch.RIGHT, scan, root); // Fill right subtree using Scanner\r\n\t\tscan.close(); // Close the file loaded from\r\n\t\treturn dt;\r\n\t}", "@SuppressFBWarnings({\"NP_NULL_PARAM_DEREF\", \"DM_DEFAULT_ENCODING\", \"NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE\"})\n public Tree getTreeFromFile(String path) {\n FileInputStream fileInputStream = null;\n try {\n fileInputStream = new FileInputStream(path);\n } catch (FileNotFoundException e) {\n \n }\n\n BufferedReader r = new BufferedReader(new InputStreamReader(fileInputStream));\n TreeParser tp = new TreeParser(r);\n\n String f = Paths.get(path).getFileName().toString();\n return tp.tokenize(f);\n }", "void readGraphFromFile();", "public TreeNode readTrainingFile() {\n\t\t// first, read the training data into some storage location\n\t\ttry {\n\t\t\tScanner s = new Scanner(new File(trainingFile));\n\t\t\t// took these lines from helper-code\n\t\t classifierNames = new ArrayList<String>();\n\t\t for (Scanner l = new Scanner(s.nextLine()); l.hasNext();) {\n\t\t \tclassifierNames.add(l.next());\n\t\t }\n\t\t\tif (attributeNames.size() == 0) {\n\t\t\t\tScanner line = new Scanner(s.nextLine());\n\t\t\t\twhile (line.hasNext()) {\n\t\t\t\t\tattributeNames.add(line.next());\n\t\t\t\t}\n\t\t\t\tline.close();\n\t\t\t}\n\t\t\treadFile(s,instances);\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.err.println(\"Training file not found, you should have put tests for this in main.\");\n\t\t\tSystem.err.println(\"Attempted to read \"+trainingFile+\".\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tsetDefaultNode();\n\t\tArrayList<Boolean> ar = new ArrayList<Boolean>();\n\t\tfor (int i = 0; i < attributeNames.size(); i++) {\n\t\t\tar.add(false);\n\t\t}\n\t\treturn BuildTree(instances, ar);\n\t}", "public void parseNewickTree(String newickTree) {\n\t\tTree<String> t = Tree.createNewickTree(newickTree);\n\t\tthis.setTreeList(Tree.iterateTree(t));\n\t\tfor(int i = 0; i < this.treeList.size(); i++) {\n\t\t\tthis.dialogueList.add(this.treeList.get(i).data);\n\t\t}\n\t\treturn;\n\t}", "public void readAll() throws FileNotFoundException{ \n b = new BinaryIn(this.filename);\n this.x = b.readShort();\n this.y = b.readShort();\n \n int count = (x * y) / (8 * 8);\n this.blocks = new double[count][8][8][3];\n \n Node juuri = readTree();\n readDataToBlocks(juuri);\n }", "public TreeNode readDataFile() {\n\t\tdata = new ArrayList<Instance>();\n\t\ttry {\n\t\t\tScanner s = new Scanner(new File(testFile));\n\t\t\t// took these lines from helper-code\n\t\t\tScanner l = new Scanner(s.nextLine());\n\t\t\tfor (int i = 0; l.hasNext(); i++) {\n\t\t\t\tif (!l.next().equals(classifierNames.get(i))) {\n\t\t\t\t\tSystem.err.println(\"This data file does not use the same category names as the training file.\");\n\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tl.close();\n\t\t\tl = new Scanner(s.nextLine());\n\t\t\tfor (int i = 0; l.hasNext(); i++) {\n\t\t\t\tif (!l.next().equals(attributeNames.get(i))) {\n\t\t\t\t\tSystem.err.println(\"This data file does not match the attributes of the training file.\");\n\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tl.close();\n\t\t\tSystem.out.println(\"Read attributes \"+attributeNames.toString()+\".\");\n\t\t\treadFile(s,data);\n\t\t\ts.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.err.println(\"Training file not found, you should have put tests for this in main.\");\n\t\t\tSystem.err.println(\"Attempted to read \"+testFile+\".\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tArrayList<Boolean> attrs = new ArrayList<Boolean>();\n\t\tfor (int i = 0; i < attributeNames.size(); i++) {\n\t\t\tattrs.add(false);\n\t\t}\n\t\tTreeNode root = BuildTree(instances, attrs);\n\t\treturn root;\n\t}", "public static void main(String [] args)\n\t{\n\t\tString newickStr=\"(Selaginella_uncinata:0.1,((Panax_ginseng:0.1,Daucus_carota:0.1):0.1,Liriodendron_tulipifera:0.1):0.1,Coffea_arabica:0.1);\";\n//\t\tString newickStr=\"((Liriodendron_tulipifera:0.100000,(Selaginella_uncinata:0.100000,Panax_ginseng:0.100000):0.100000):0.100000,Daucus_carota:0.100000,Coffea_arabica:0.100000);\";\n\t\tRootedTree rt=RootedTree.Util.fromNewickString(newickStr);\n\t System.out.println(rt);\n\t\t\n\t\t/*\n\t\t// debug:\n\t\tFile mrBayesTrees = new File(\"/Users/bouchard/w/ptychodus/data/mrBayesOnWalsIE/nAryCharacters-1m-iters/inMrBayesFolder/test.nex.run1.t\");\n\t\t// for (String line : i(mrBayesTrees))\n\t\t// System.out.println(line);\n\t\tprocessMrBayesTrees(mrBayesTrees, new RootedTreeProcessor() {\n\n\t\t\t@Override\n\t\t\tpublic void process(RootedTree rt)\n\t\t\t{\n\t\t\t\tSystem.out.println(rt);\n\t\t\t}\n\t\t});\n\t\t*/\n\t}", "private void readNodes() throws FileNotFoundException{\n\t\tScanner sc = new Scanner(new File(\"Resources\\\\ListOfNodes.csv\"));\n\t\tsc.nextLine(); //Skip first line of headers\n\t\twhile(sc.hasNext()) { \n\t\t\tCSVdata = sc.nextLine().split(\",\"); // Add contents of each row to String[]\n\t\t\tnodes.add(new GraphNode<String>(CSVdata[0], CSVdata[1])); // Add new node to object list\n\t\t}\n\t\tsc.close();\n\t}", "public static ArrayList<Tree> readTreesFromDir(File dir) {\n \n ArrayList<Tree> trees = new ArrayList<Tree>();\n File dirName = dir;\n File[] directory = dirName.listFiles();\n \n for (int p = 0; p < directory.length; p++) {\n trees.add(new Tree(directory[p]));\n }\n return trees;\n }", "private void parseTree(BufferedReader in, VssProject vssProject) {\r\n try {\r\n String line;\r\n boolean start = false;\r\n while ((line = in.readLine()) != null) {\r\n if (!start) {\r\n if (line.startsWith(\"$\") && line.endsWith(\":\")) {\r\n start = true;\r\n continue;\r\n }\r\n } else {\r\n if (line.length() == 0)\r\n break;\r\n if (line.startsWith(\"$\")) {\r\n \t\r\n String projectName = line.substring(1);\r\n if ( config.getProjectsToIgnore().contains( projectName ) )\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\t// Ignore list!\r\n \t\t\t\t\t\tLOG.warn( \"Ignore project \" + projectName + \" found in : \" + vssProject.getVssPath() );\r\n \t\t\t\t\t\tcontinue;\r\n \t\t\t\t\t}\r\n \r\n VssProject newProject = new VssProject();\r\n newProject.setName(projectName);\r\n newProject.setParent(vssProject);\r\n vssProject.addSubproject(newProject);\r\n \r\n } else \r\n {\r\n if (line.startsWith(\"No items found under $\")) {\r\n continue;\r\n } \r\n String filename = line;\r\n String parent = vssProject.getVssPath().substring(config.getProject().length());\r\n if (parent.length() > 0) {\r\n if (parent.startsWith(\"/\"))\r\n parent = parent.substring(1);\r\n if (!parent.endsWith(\"/\"))\r\n parent += \"/\";\r\n }\r\n String path = parent + filename;\r\n VssFile newFile = new VssFile(path, filename);\r\n newFile.setParent(vssProject);\r\n vssProject.addFile(newFile);\r\n }\r\n }\r\n }\r\n } catch (IOException e) {\r\n throw new VssException(\"readLine\", e);\r\n }\r\n }", "public void readIn() throws FileNotFoundException{\n\t\tScanner sc;\n\t\tif (species.equals(\"Human\")){\n\t\t\tsc= new Scanner(PhenoGeneNetwork.class.getResourceAsStream(\"/GenePhenoEdgeList\"));\t\n\t\t}\t\t\n\t\telse{\n\t\t\tsc= new Scanner(PhenoGeneNetwork.class.getResourceAsStream(\"/GenePhenoEdgeListMouse\"));\t\n\t\t}\n\t\tnodeNameMap = new HashMap<String, CyNode>();\n\t\tproteinNameMap = new HashMap<String, CyNode>();\n\t\tphenotypeNameMap = new HashMap<String, CyNode>();\n\t\twhile (sc.hasNextLine()){\n\t\t\tString line = sc.nextLine();\n\t\t\tString [] nodes = line.split(\"\\t\");\n\t\t\tCyNode node1 = null;\n\t\t\tCyNode node2 = null;\n\t\t\t// for Node1\n\t\t\tif (nodeNameMap.containsKey(nodes[0])){\n\t\t\t\t\n\t\t\t\tnode1 = (CyNode) nodeNameMap.get(nodes[0]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\tnode1 = network.addNode();\n\t\t\t\tCyRow attributes = network.getRow(node1);\n\t\t\t\tattributes.set(\"name\", nodes[0]);\n\t\t\t\tnodeNameMap.put(nodes[0], node1);\n\t\t\t\tphenotypeNameMap.put(nodes[0], node1);\t\t\t\t\n\t\t\t}\n\t\t\tif (nodeNameMap.containsKey(nodes[1])){\n\t\t\t\t\n\t\t\t\tnode2 = (CyNode) nodeNameMap.get(nodes[1]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\tnode2 = network.addNode();\n\t\t\t\tCyRow attributes = network.getRow(node2);\n\t\t\t\tattributes.set(\"name\", nodes[1]);\n\t\t\t\tnodeNameMap.put(nodes[1], node2);\n\t\t\t\tproteinNameMap.put(nodes[1], node2);\n\t\t\t}\n\t\t\tif (!network.containsEdge(node1, node2)){\n\t\t\t\t\n\t\t\t\tCyEdge myEdge =network.addEdge(node1, node2, true);\n\t\t\t\tnetwork.getRow(myEdge).set(\"interaction\", \"phenotype\");\n\t\t\t\tnetwork.getRow(myEdge).set(\"name\", nodes[0]+ \" (phenotype) \" +nodes[1]);\n\t\t\t}\n\t\t\t\n\n\n\t\t}\n\n\t\tsc.close();\n\n\t}", "public void readCliqueTreeFile(String cliqueTreeFilename) \n\t\t\tthrows IOException, NumberFormatException {\n\t\tif(DEBUG) System.out.println(\"reading clique tree from:\"+cliqueTreeFilename);\n\t\tBufferedReader br = new BufferedReader(new FileReader(cliqueTreeFilename));\n\t\tString line;\n\t\t// on the first line is the number of following lines that describe vertices\n\t\tint numCliques = -1;\n\t\tif((line = br.readLine()) != null){\n\t\t\tnumCliques = Integer.valueOf(line);\n\t\t}else{\n\t\t\tbr.close();\n\t\t\tthrow new IOException();\n\t\t}\n\t\t//num Cliques\n\t\tif(numCliques<0) {\n\t\t\tbr.close();\n\t\t\tthrow new NumberFormatException();\n\t\t}\n\t\t//cliques\n\t\tfor(int i = 0;i<numCliques;i++){\n\t\t\tif((line = br.readLine()) != null){\n\t\t\t\tString[] containedVars = line.split(\",\");\n//\t\t\t\tif(DEBUG) System.out.println(\"Adding VertexMax: \" + Factor.variableNamesToIndicies(containedVars) );\n\t\t\t\tVertex v = new Vertex(containedVars);\n\t\t\t\t_tree.addVertex(v);\n\t\t\t}else{\n\t\t\t\tbr.close();\n\t\t\t\tthrow new IOException(\"inconsistent network file.\");\n\t\t\t}\n\t\t}\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\t// edges\n\t\t\tString[] tokenized = line.split(\" \");\n\t\t\t\n\t\t\tString[] left_variables = tokenized[0].split(\",\");\n\t\t\tString[] right_variables = tokenized[2].split(\",\");\n\t\t\t\n\t\t\tArrayList<Integer> left = Factor.variableNamesToIndicies(left_variables);\n\t\t\tArrayList<Integer> right = Factor.variableNamesToIndicies(right_variables);\n\t\t\t\n\t\t\tCollections.sort(left);\n\t\t\tCollections.sort(right);\n\t\t\t\n\t\t\t_tree.addEdge(new Edge(\n\t\t\t\t\t_tree._vertices.get(left.toString()), \n\t\t\t\t\t_tree._vertices.get(right.toString())));\n\t\t}\n//\t\tif(DEBUG) System.out.println(\"\\nclique tree structure:\\n\"+_tree.toString());\n\t\tbr.close();\n\t}", "public void load()\r\n {\r\n \tfc.setAcceptAllFileFilterUsed(false);\r\n\t\tfc.setDialogTitle(\"Select the text file representing your organism!\");\r\n\t\tfc.setFileFilter(new FileNameExtensionFilter(\"Text Files (Organism)\", new String[]{\"txt\"}));\r\n\t\tif(fc.showOpenDialog(this)==JFileChooser.APPROVE_OPTION)\r\n\t\t\t//Try-Catch Block\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tbr=new BufferedReader(new FileReader(fc.getSelectedFile()));\r\n\t\t\t\tArrayList<Organism> treeTemp=new ArrayList<Organism>();\r\n\t\t \tString line=br.readLine();\r\n\t\t \tint x=0;\r\n\t\t \twhile(line!=null)\r\n\t\t \t{\r\n\t\t \t\t\tString[] genesSt=line.split(\" \");\r\n\t\t \t\t\tint[] genes=new int[genesSt.length];\r\n\t\t \t\t\tfor(int y=0; y<genesSt.length; y++)\r\n\t\t \t\t\t\tgenes[y]=Integer.parseInt(genesSt[y]);\r\n\t\t \t\t\t\t\r\n\t\t \t\t\ttreeTemp.add(new Organism(genes,x));\r\n\t\t \t\tline=br.readLine();\r\n\t\t \t\tx++;\r\n\t\t \t}\r\n\t\t \tbr.close();\r\n\t\t \te.setTree(treeTemp);\r\n\t\t \te.setParent(treeTemp.get(treeTemp.size()-1));\r\n\t\t\t\trepaint();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcatch(Exception ex)\r\n\t\t\t{\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n }", "void nikon_e900_load_raw()\n{\n int offset=0, irow, row, col;\n\n for (irow=0; irow < height; irow++) {\n row = irow * 2 % height;\n if (row == 1)\n offset = - (-offset & -4096);\n CTOJ.fseek (ifp, offset, CTOJ.SEEK_SET);\n offset += raw_width;\n getbits(-1);\n for (col=0; col < width; col++)\n BAYER(row,col, (short)getbits(10));\n }\n}", "private void openTreeML()\r\n {\r\n// // Create the file filter.\r\n// SimpleFileFilter[] filters = new SimpleFileFilter[] {\r\n// new SimpleFileFilter(\"xml\", \"Tree ML (*.xml)\")\r\n// };\r\n// \r\n// // Open the file.\r\n// String file = openFileChooser(true, filters);\r\n// \r\n// // Process the file. \r\n// if (file != null)\r\n// {\r\n// m_gtree = Loader.loadTreeML(file);\r\n// TreeDisplay disp = new TreeDisplay(m_gtree,0);\r\n// TreePanel panel = new TreePanel(disp, LEGEND, ORIENTATION_CONTROL_WIDGET);\r\n// m_tabbedPane.setComponentAt(1, panel);\r\n// }\r\n }", "public void readFromTxtFile(String filename){\n try{\n File graphFile = new File(filename); \n Scanner myReader = new Scanner(graphFile); \n parseFile(myReader);\n myReader.close();\n } \n catch(FileNotFoundException e){\n System.out.println(\"ERROR: DGraphEdges, readFromTxtFile: file not found.\");\n e.printStackTrace();\n } \n }", "public static DecisionTree loadTree(String filename) throws FileNotFoundException {\r\n\r\n\t\treturn loadTree(new File(filename));\r\n\t}", "public void readNetworkFromFile() {\r\n\t\tFileReader fr = null;\r\n\t\t// open file with name given by filename\r\n\t\ttry {\r\n\t\t\ttry {\r\n\t\t\t\tfr = new FileReader (filename);\r\n\t\t\t\tScanner in = new Scanner (fr);\r\n\r\n\t\t\t\t// get number of vertices\r\n\t\t\t\tString line = in.nextLine();\r\n\t\t\t\tint numVertices = Integer.parseInt(line);\r\n\r\n\t\t\t\t// create new network with desired number of vertices\r\n\t\t\t\tnet = new Network (numVertices);\r\n\r\n\t\t\t\t// now add the edges\r\n\t\t\t\twhile (in.hasNextLine()) {\r\n\t\t\t\t\tline = in.nextLine();\r\n\t\t\t\t\tString [] tokens = line.split(\"[( )]+\");\r\n\t\t\t\t\t// this line corresponds to add vertices adjacent to vertex u\r\n\t\t\t\t\tint u = Integer.parseInt(tokens[0]);\r\n\t\t\t\t\t// get corresponding Vertex object\r\n\t\t\t\t\tVertex uu = net.getVertexByIndex(u);\r\n\t\t\t\t\tint i=1;\r\n\t\t\t\t\twhile (i<tokens.length) {\r\n\t\t\t\t\t\t// get label of vertex v adjacent to u\r\n\t\t\t\t\t\tint v = Integer.parseInt(tokens[i++]);\r\n\t\t\t\t\t\t// get corresponding Vertex object\r\n\t\t\t\t\t\tVertex vv = net.getVertexByIndex(v);\r\n\t\t\t\t\t\t// get capacity c of (uu,vv)\r\n\t\t\t\t\t\tint c = Integer.parseInt(tokens[i++]);\r\n\t\t\t\t\t\t// add edge (uu,vv) with capacity c to network \r\n\t\t\t\t\t\tnet.addEdge(uu, vv, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinally { \r\n\t\t\t\tif (fr!=null) fr.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.err.println(\"IO error:\");\r\n\t\t\tSystem.err.println(e);\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}", "private void posRead() throws IOException {\n\t\tFile file = new File(fullFileName());\n\t\tString line;\n\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\n\t\tStringBuffer fileText = new StringBuffer();\n\t\twhile((line = reader.readLine()) != null) {\n\t\t\tStringTokenizer st = new StringTokenizer(line);\n\t\t\twhile (st.hasMoreTokens()) {\n \t\tString tokenAndPos = st.nextToken();\n \t\tint slashIndex = tokenAndPos.lastIndexOf('/');\n \t\tif (slashIndex <= 0) throw new IOException(\"invalid data\");\n \t\tString token = tokenAndPos.substring(0,slashIndex);\n \t\tString pos = tokenAndPos.substring(1+slashIndex).intern();\n \t\tint start = this.length();\n \t\tthis.append(token);\n \t\tif (st.hasMoreTokens())\n \t\t\tthis.append(\" \");\n \t\telse\n \t\t\tthis.append(\" \\n\");\n \t\tint end = this.length();\n \t\tSpan span = new Span(start,end);\n \t\tthis.annotate(\"token\", span, new FeatureSet());\n \t\tthis.annotate(\"constit\", span, new FeatureSet(\"cat\", pos));\n \t}\n\t\t}\n\t}", "protected void readOntology() {\r\n\t\ttry \r\n\t\t{\r\n\t\t\troot.removeAllChildren();\r\n\t\t\tIterator<String> rc = ob.listRootClasses();\r\n\t\t\twhile(rc.hasNext())\r\n\t\t\t{\r\n\t\t\t\tDefaultMutableTreeNode node = createNode(rc.next(), ob, 0);\r\n\t\t\t\troot.add(node);\r\n\t\t\t}\r\n\t\t\tontologyTree.setModel(new DefaultTreeModel(root));\r\n\t ontologyTree.expandRow(0);\r\n\t \r\n\t\t} catch (Exception e) {\r\n\t\t\torg.apache.commons.logging.LogFactory.getLog(this.getClass()).error(e);\r\n\t\t}\r\n\t}", "public Graph loadFile(){\r\n String path = \"\";\r\n JFileChooser choix = new JFileChooser();\r\n choix.setAcceptAllFileFilterUsed(false);\r\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"Only xml files\", \"xml\");\r\n choix.addChoosableFileFilter(filter);\r\n if (choix.showOpenDialog(null) == JFileChooser.APPROVE_OPTION){\r\n path = choix.getSelectedFile().getAbsolutePath();\r\n }\r\n Graph g = new Graph();\r\n boolean quit = false;\r\n int max = 0;\r\n try{\r\n BufferedReader br = new BufferedReader(new FileReader(path));\r\n do {\r\n String line = br.readLine();\r\n if (line.indexOf(\"<node\") != -1){\r\n String[] node_xml = line.split(\"\\\"\");\r\n Node node = new Node(Integer.parseInt(node_xml[1]),(int)Double.parseDouble(node_xml[3]),(int)Double.parseDouble(node_xml[5]),TypeNode.valueOf(node_xml[7]));\r\n max = Math.max(max, node.getId());\r\n if (node.getType() == TypeNode.INCENDIE){\r\n node.kindleFire((int)Double.parseDouble(node_xml[9]));\r\n }\r\n g.getListNodes().add(node);\r\n }\r\n if (line.indexOf(\"<edge\") != -1){\r\n String[] edge_xml = line.split(\"\\\"\");\r\n Edge edge = new Edge(findNode(g,Integer.parseInt(edge_xml[1])),findNode(g,Integer.parseInt(edge_xml[3])),TypeEdge.valueOf(edge_xml[5]));\r\n g.getListEdges().add(edge);\r\n }\r\n if (line.startsWith(\"</osm>\")){\r\n quit = true;\r\n } \r\n Node.setNb_node(max+1);\r\n } while (!quit);\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"File not found : \"+e.getMessage());\r\n } catch (IOException e) {\r\n System.out.println(\"Listening file error : \"+e.getMessage());\r\n }\r\n return g;\r\n }", "private static BST readDataFile(Scanner in)\n\t{\n\t\tBST tree=new BST();\n\t\t\n\t\t//read the file line by line\n\t\twhile(in.hasNextLine())\n\t\t{\n\t\t\t// Scanner to read 1 line; closed before end of while loop\n\t\t\tString currentLine=in.nextLine();\n\t\t\tScanner line=new Scanner(currentLine);\n\t\t\t\n\t\t\t// makes the scanner separate the information in the line by \",\" and \";\"\n\t\t\tline.useDelimiter(\",|;\");\n\t\t\t\n\t\t\t// create a profile from the line and insert it into the tree\n\t\t\tProfile p=createProfile(line);\n\t\t\ttree.insertProfile(p);\t\n\t\t\t\t\t\n\t\t\tline.close();\n\t\t}\n\t\t\n\t\tin.close();\n\t\treturn tree;\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic void readData(String fileName) {\n\t\ttry {\n\t\t\tFile file = new File(fileName);;\n\t\t\tif( !file.isFile() ) {\n\t\t\t\tSystem.out.println(\"ERRO\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\tBufferedReader buffer = new BufferedReader( new FileReader(file) );\n\t\t\t/* Reconhece o valor do numero de vertices */\n\t\t\tString line = buffer.readLine();\n\t\t\tStringTokenizer token = new StringTokenizer(line, \" \");\n\t\t\tthis.num_nodes = Integer.parseInt( token.nextToken() );\n\t\t\tthis.nodesWeigths = new int[this.num_nodes];\n\t\t\t\n\t\t\t/* Le valores dos pesos dos vertices */\n\t\t\tfor(int i=0; i<this.num_nodes; i++) { // Percorre todas a linhas onde seta valorado os pesos dos vertices\n\t\t\t\tif( (line = buffer.readLine()) == null ) // Verifica se existe a linha a ser lida\n\t\t\t\t\tbreak;\n\t\t\t\ttoken = new StringTokenizer(line, \" \");\n\t\t\t\tthis.nodesWeigths[i] = Integer.parseInt( token.nextToken() ); // Adiciona o peso de vertice a posicao do arranjo correspondente ao vertice\n\t\t\t}\n\t\t\t\n\t\t\t/* Mapeia em um array de lista todas as arestas */\n\t\t\tthis.edges = new LinkedList[this.num_nodes];\n\t\t\tint cont = 0; // Contador com o total de arestas identificadas\n\t\t\t\n\t\t\t/* Percorre todas as linhas */\n\t\t\tfor(int row=0, col; row<this.num_nodes; row++) {\n\t\t\t\tif( (line = buffer.readLine()) == null ) // Verifica se ha a nova linha no arquivo\n\t\t\t\t\tbreak;\n\t\t\t\tthis.edges[row] = new LinkedList<Integer>(); // Aloca nova lista no arranjo, representado a linha o novo vertice mapeado\n\t\t\t\tcol = 0;\n\t\t\t\ttoken = new StringTokenizer(line, \" \"); // Divide a linha pelos espacos em branco\n\t\t\t\t\n\t\t\t\t/* Percorre todas as colunas */\n\t\t\t\twhile( token.hasMoreTokens() ) { // Enquanto ouver mais colunas na linha\n\t\t\t\t\tif( token.nextToken().equals(\"1\") ) { // Na matriz binaria, onde possui 1, e onde ha arestas\n//\t\t\t\t\t\tif( row != col ) { // Ignora-se os lacos\n\t\t\t\t\t\t\t//System.out.println(cont + \" = \" + (row+1) + \" - \" + (col+1) );\n\t\t\t\t\t\t\tthis.edges[row].add(col); // Adiciona no arranjo de listas a aresta\n\t\t\t\t\t\t\tcont++; // Incrementa-se o total de arestas encontradas\n//\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcol++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.num_edges = cont; // Atribui o total de arestas encontradas\n\n\t\t\tif(true) {\n//\t\t\t\tfor(int i=0; i<this.num_nodes; i++) {\n//\t\t\t\t\tSystem.out.print(this.nodesWeigths[i] + \"\\n\");\n//\t\t\t\t}\n\t\t\t\tSystem.out.print(\"num edges = \" + cont + \"\\n\");\n\t\t\t}\n\t\t\t\n\t\t\tbuffer.close(); // Fecha o buffer\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Plain(String inputFileName) throws FileNotFoundException {\n File fileReader = new File(inputFileName);\n Scanner fileScanner = new Scanner(fileReader);\n while (fileScanner.hasNextLine()) {\n width++;\n fileScanner.nextLine();\n }\n fileScanner.close();\n Scanner scanner = new Scanner(fileReader);\n Plain plain = new Plain(width + 2);\n grid = new Living[width + 2][width + 2];\n System.out.println(\"... reading ...\");\n while (scanner.hasNext()) {\n for (int j = 1; j < grid.length - 1; j++) {\n for (int k = 1; k < grid[j].length - 1; k++) {\n String nextFileObj = scanner.next();\n char firstLetter = nextFileObj.charAt(0);\n int animalAge = 0;\n if (nextFileObj.length() == 2) {\n animalAge = Character.getNumericValue(nextFileObj.charAt(1));\n }\n switch (firstLetter) {\n case 'B':\n grid[j][k] = new Badger(plain, j, k, animalAge);\n break;\n case 'E':\n grid[j][k] = new Empty(plain, j, k);\n break;\n case 'F':\n grid[j][k] = new Fox(plain, j, k, animalAge);\n break;\n case 'G':\n grid[j][k] = new Grass(plain, j, k);\n break;\n case 'R':\n grid[j][k] = new Rabbit(plain, j, k, animalAge);\n break;\n default:\n grid[j][k] = null;\n break;\n }\n }\n }\n }\n scanner.close();\n System.out.println(\" reading complete \");\n }", "public void visit(TreeBuilder tree){\n\t\tString line;\n\t\twhile ((line = file.readLine(true)) != null)\n\t {\t\t \n \t\tString[] words = line.split(\" \");\n \t\tfor(String word : words){\n \t\t\tif(!word.equals(\"\")){\n \t\t\t\ttree.insertNode(word);\n \t\t\t}\n \t\t}\n \t}\n\t}", "public static TreeHistogram<String> readNGramsFromFile(String filename) throws IOException {\n BufferedReader reader = new BufferedReader(new FileReader(filename));\n TreeHistogram<String> histogram = new TreeHistogram<>();\n String line = null;\n while(reader.ready()) {\n line = reader.readLine();\n histogram.insert(line, 1);\n }\n return histogram;\n }", "public void createFullTree(String path) {\n String str = null;\n BufferedReader br = ExternalFunctions.getBufferedFile(path);\n\n try {\n while((str = br.readLine()) != null) { // Insert all the password to the tree by the algo. here the dog buried\n //str = str.toLowerCase();\n \tinsert(str);\n }\n br.close();\n }\n catch (IOException e) {\n System.out.println(\"File text is wrong\");\n }\n }", "public Node readTree() {\n boolean totuusarvo = b.readBoolean();\n if (totuusarvo == true) {\n return new Node(b.readShort(), -1, null, null);\n } else {\n return new Node(\"9000\", -1, readTree(), readTree());\n }\n }", "private void createTree() {\n\n // custom brown color\n Color brown = new Color(149, 99, 57);\n\n // trunk\n NscComponent trunk = new NscRectangle(49, 164, 13, 51);\n createShape(trunk, brown, true);\n\n // branches\n drawLine(50, 125, 50, 165, 10, brown);\n drawLine(25, 125, 50, 165, 10, brown);\n drawLine(75, 125, 50, 165, 10, brown);\n\n // branch outlines\n drawLine(49, 125, 49, 150, 1, Color.black);\n drawLine(60, 125, 60, 150, 1, Color.black);\n drawLine(24, 125, 49, 165, 1, Color.black);\n drawLine(35, 125, 50, 150, 1, Color.black);\n drawLine(85, 125, 60, 165, 1, Color.black);\n drawLine(74, 125, 60, 150, 1, Color.black);\n\n // leafs\n NscEllipse leafs2 = new NscEllipse(0, 5, 60, 122);\n NscEllipse leafs3 = new NscEllipse(50, 5, 60, 122);\n NscEllipse leafs = new NscEllipse(25, 0, 60, 127);\n NscEllipse leafs4 = new NscEllipse(25, 1, 60, 124);\n createShape(leafs2, treeColor, true);\n createShape(leafs3, treeColor, true);\n createShape(leafs, treeColor, true);\n createShape(leafs4, treeColor, false);\n\n repaint();\n }", "public void tree()\n\t{\n\t\tIterable<Position<FileElement>> toPrint = fileSystem.PreOrder();\n\t\tfor (Position<FileElement> p : toPrint)\n\t\t{\n\t\t\tint depth = fileSystem.getDepth(p);\n\t\t\tfor (int i = 0; i < depth; i++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tSystem.out.println(p.getValue());\n\t\t}\n\t}", "private void recoverINodes()\n {\n Map<String, DFSNode.SerializedDFSNode> serInodeMap = new HashMap<>();\n try (BufferedReader reader = new BufferedReader(new FileReader(dfsNodeFile)))\n {\n String line;\n while((line=reader.readLine())!=null)\n {\n DFSNode.SerializedDFSNode serializedINode = (DFSNode.SerializedDFSNode) JSONUtil.fromJSON(line, DFSNode.SerializedDFSNode.class);\n DFSNode inode = new DFSNode();\n inode.fqpn = serializedINode.fqpn;\n inode.dataBlockMetas = serializedINode.dataBlockMeta;\n inode.dirOrFile= serializedINode.dirOrFile;\n inodeMap.put(inode.fqpn,inode);\n\n\n serInodeMap.put(serializedINode.fqpn,serializedINode);\n if (NumberUtils.isCreatable(inode.fqpn))\n fileNodeCounter = Math.max(fileNodeCounter,Integer.valueOf(inode.fqpn));\n\n /* if (inode.dataBlockMetas!=null) {\n\n DFSDataBlockMeta meta = inode.dataBlockMetas.get(inode.dataBlockMetas.size()-1);\n\n meta.fileSystem = resolve(meta.fileSystemName);\n\n }*/\n\n\n }\n } catch (Exception ex) {\n ex.printStackTrace();}\n\n\n inodeMap.values().stream().forEach(inode->{\n\n DFSNode.SerializedDFSNode serializedINode = serInodeMap.get(inode.fqpn);\n\n // inode.next = inodeMap.get(serializedINode.nextNodeName);\n\n if (serializedINode.getNodeNames()!=null) {\n List<DFSNode> nodes = serializedINode.getNodeNames().stream().map(name -> {\n return inodeMap.get(name) ;\n }).collect(Collectors.toList());\n\n inode.setNodes(nodes);\n }\n });\n\n }", "public void testBasicTigerTree() throws Exception {\n assertTrue(file.exists());\n URN urn = URN.createSHA1Urn(file);\n assertEquals(sha1, urn.toString());\n \n InputStream in = new BufferedInputStream(new FileInputStream(file));\n try {\n hashTree = tigerTreeFactory.createHashTree(file.length(), in, urn);\n } finally {\n in.close();\n }\n\n // most important test:\n // if we get the root hash right, the rest will be working, too\n assertEquals(root32, hashTree.getRootHash());\n assertEquals(4, hashTree.getDepth());\n assertTrue(hashTree.isGoodDepth());\n assertEquals(\"/uri-res/N2X?\" + sha1, hashTree.getThexURI());\n assertEquals(\"/uri-res/N2X?\" + sha1 + \";\" + root32,\n hashTree.httpStringValue());\n\n List allNodes = tigerTreeNodeManager.getAllNodes(hashTree);\n assertEquals(5, allNodes.size());\n List one, two, three, four, five;\n one = (List)allNodes.get(0);\n two = (List)allNodes.get(1);\n three = (List)allNodes.get(2);\n four = (List)allNodes.get(3);\n five = (List)allNodes.get(4);\n assertEquals(five, hashTree.getNodes());\n \n // tree looks like:\n // u (root)\n // / \\\n // t s\n // / \\ \\\n // q r s\n // / \\ / \\ / \\\n // l m n o p k\n // /\\ /\\ /\\ /\\ /\\ \\ \n // a b c d e f g h i j k\n \n assertEquals(root32, Base32.encode((byte[])one.get(0)));\n assertEquals(2, two.size());\n assertEquals(3, three.size());\n assertEquals(6, four.size());\n assertEquals(11, five.size());\n assertEquals(1+2+3+6+11, hashTree.getNodeCount());\n }", "private void fileToPoSTags(String filePath,int version){\n Log.log(\"Reading TreeBank file <\" + filePath +\">\");\n\n FileReader fr = null;\n BufferedReader br = null;\n\n try{\n fr = new FileReader(filePath);\n br = new BufferedReader(fr);\n\n String currentLine;\n String[] columns;\n\n Tag tag1 = null;\n Tag tag2;\n String word;\n\n Integer numRow;\n while((currentLine = br.readLine()) != null){\n columns = currentLine.split(\"\\t\");\n numRow = getIntegerString(columns[0]);\n if(numRow != null && numRow >= 1){\n if(numRow == 1) {\n tag1 = Tag.valueOf(\"START\");\n saveTag(tag1);\n }\n try{\n tag2 = Tag.valueOf(columns[3]);\n saveTag(tag2);\n word = columns[1];\n switch (version){\n case 1:\n savePoSTag(new PoSTag(word.toLowerCase(),tag2));\n break;\n case 2:\n if(!tag2.equals(Tag.PROPN))\n savePoSTag(new PoSTag(word.toLowerCase(),tag2));\n else if(Character.isUpperCase(word.charAt(0)))\n savePoSTag(new PoSTag(word,tag2));\n break;\n case 3:\n\n if(tag2.equals(Tag.PROPN))\n savePoSTag(new PoSTag(word,tag2));\n else{\n if(Character.isUpperCase(word.charAt(0))){\n savePoSTag(new PoSTag(word,tag2));\n savePoSTag(new PoSTag(word.toLowerCase(),tag2));\n }else{\n savePoSTag(new PoSTag(word,tag2));\n savePoSTag(new PoSTag(\n word.substring(0,1).toUpperCase()\n +word.substring(1),tag2));\n }\n\n }\n\n break;\n case 4:\n\n if(!tag2.equals(Tag.PROPN))\n savePoSTag(new PoSTag(word,tag2));\n savePoSTag(new PoSTag(word,tag2));\n break;\n case 5:\n\n if(!tag2.equals(Tag.PROPN))\n savePoSTag(new PoSTag(word.toLowerCase(),tag2));\n savePoSTag(new PoSTag(word,tag2));\n break;\n\n }\n saveBigram(new BiGram(tag1,tag2));\n tag1 = tag2;\n }catch (IllegalArgumentException e){\n e.printStackTrace();\n }\n }\n }\n\n }catch (IOException e){\n e.printStackTrace();\n }finally {\n UtilitiesIO.closeFile(fr,br);\n }\n }", "private void getTreeShape() {\n int treeSizeInBytes = (int) (Math.ceil(treeSize / (double) Byte.SIZE));\n // converting tree shape in bytes to the bitset;\n BitSet bs = BitSet.valueOf(Arrays.copyOfRange(buffer.array(), bufferPosition, bufferPosition + treeSizeInBytes));\n bufferPosition += treeSizeInBytes;\n\n int treeLeavesAmount = 0;\n for (int i = 0; i < treeSize; i++) {\n boolean bit = bs.get(i);\n if (!bit) {\n treeLeavesAmount += 1;\n }\n treeShape.add(bit);\n }\n\n // adding tree leaves to the linked list;\n for (int i = bufferPosition; i < bufferPosition + treeLeavesAmount; i++) {\n treeLeaves.add(buffer.get(i));\n }\n // increasing buffer position for the amount of leaves(unique bytes);\n bufferPosition = bufferPosition + treeLeavesAmount;\n }", "public Tamagotchi read() throws IOException {\n String jsonData = readFile(source);\n JSONObject jsonObject = new JSONObject(jsonData);\n return tamagotchiToJson(jsonObject);\n }", "private LinkedList<Integer> loadLabels(int n){\n\t\tLinkedList<Integer> labels = new LinkedList<>();\n\t\ttry {\n\t\t\tFileInputStream in = new FileInputStream(\"labels\");\n\t\t\t//Skipping magic number and array size\n\t\t\tfor (int i = 0; i < 8; i++) {\n\t\t\t\tin.read();\t\n\t\t\t}\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tlabels.add(new Integer((int) in.read()));\n\t\t\t}\n\t\t\tin.close();\n\t\t}catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn labels;\n\t\t\n\t}", "private void parse() throws IOException {\r\n\t\tClassLoader cl = getClass().getClassLoader();\r\n\t\tFile file = new File(cl.getResource(\"./OBOfiles/go.obo\").getFile());\r\n\t\tFile file2 = new File(cl.getResource(\"./OBOfiles/go.obo\").getFile());\r\n\t FileReader fr = new FileReader(file);\r\n\t FileReader fr2 = new FileReader(file2);\r\n\t\tin=new BufferedReader(fr);\r\n\t\tin2=new BufferedReader(fr2);\r\n\t\tString line;\r\n\t\twhile((line=next(0))!=null) {\r\n\t\t\tif(line.equals(\"[Term]\")) parseTerm();\r\n\t\t}\r\n\t\tin.close();\r\n\t\tfr.close();\r\n\t\t\r\n\t\t//terms.printTerms();\r\n\t\tbuffer=null;\r\n\t\twhile((line=next(1))!=null) {\r\n\t\t\tif(line.equals(\"[Term]\")) createEdges();\r\n\t\t}\r\n\t\tin2.close();\r\n\t\tfr2.close();\r\n\t\tLOGGER.info(\"Finished Building DAGs!\");\r\n\t\t\r\n\t}", "Graph<V,E> load(String filename);", "void createTree() throws IOException {\n\n // create root\n rootTreeItem = createTreeRoot();\n\n // create tree structure recursively\n createTree(rootTreeItem);\n\n // sort tree structure by name\n rootTreeItem.getChildren()\n .sort(Comparator.comparing(new Function<TreeItem<FilePath>, String>() {\n @Override\n public String apply(TreeItem<FilePath> t) {\n return t.getValue().toString().toLowerCase();\n }\n }));\n\n }", "@SuppressWarnings(\"unchecked\")\n public Model(File file) throws IOException {\n this.root = file;\n existingTags = new ExistingTags();\n imageFiles = new ArrayList<>();\n File imageData = new File(IMAGE_DATA_PATH);\n if (imageData.exists()) {\n try {\n imageFiles = (ArrayList<ImageFile>) readObject(IMAGE_DATA_PATH);\n } catch (ClassNotFoundException | IOException |\n ClassCastException e) {\n // imageData.ser was corrupted\n Files.delete(imageData.toPath());\n }\n }\n File tagData = new File(EXISTING_TAGS_PATH);\n if (tagData.exists()) {\n try {\n existingTags = (ExistingTags) readObject(EXISTING_TAGS_PATH);\n } catch (ClassNotFoundException | IOException |\n ClassCastException e) {\n // existingTags.ser was corrupted\n Files.delete(tagData.toPath());\n }\n }\n // The FileVisitor to be used in Files.walkFileTree.\n FileVisitor<Path> fv = new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(Path file,\n BasicFileAttributes attrs)\n throws IOException {\n if (attrs.isRegularFile()) {\n String fileExtension = file.toString().substring(\n file.toString().lastIndexOf('.') + 1).toLowerCase();\n // Check if the file is a image by checking its extension.\n if (EXTENSIONS.contains(fileExtension)) {\n if (getImageFile(file.toFile()) == null) {\n imageFiles.add(new ImageFile(file.toFile()));\n } else {\n // Check imageFile for tags not in ExistingTags, and add them\n ImageFile im = getImageFile(file.toFile());\n if (!existingTags.getExistingTags().containsAll(\n im.getCurrentTags())) {\n for (Tag tag : im.getCurrentTags()) {\n existingTags.addTag(tag);\n }\n }\n }\n }\n }\n return FileVisitResult.CONTINUE;\n }\n };\n Files.walkFileTree(file.toPath(), fv);\n }", "public IGraph<String,Double> read(String filename) throws FileNotFoundException, IOException {\n // Open the file\n Graph r = new Graph;\n INode n = r.nodeMaker(value);\n INode s = new Node;\n INode d = new Node;\n double w;\n\n\n\n BufferedReader br = new BufferedReader(new FileReader(filename));\n String st;\n char col;\n while ((st = br.readLine()) != null) {\n String[] var = s.split(\":\");\n s = (V) var[0];\n d = (V) var[1];\n w = (double) var[2];\n r.addNode(s);\n r.addNode(d);\n r.addEdge(s, d, w);\n\n }\n\n // Parse the lines. If a line does not have exactly 3 fields, ignore the line\n // For each line, add the nodes and edge\n //How many feilds and what is in each fields\n //After i have the right fields, need make nodes, weights, and add to graphs\n //...making nodes could be tricky... Could get multiple nodes with the same value\n\n // Return the graph instance\n return r;\n }", "public static void main(String[] args) {\n\t\tif (args.length == 0) {\n\t\t\t System.err.println(\"Usage Error: the program expects a file name as an argument\");\n\t\t\t System.exit(-1);\n\t\t}\n\t\t\n\t\t// create a file with the entered file name\n\t\tFile file= new File(args[0]);\n\t\t\n\t\t// if the file does not exist inform the user and terminate the program\n\t\tif(file.exists()!=true){\n\t\t\t\tSystem.err.println(\"Usage Error: the file \"+args[0]+\" cannot be opened.\");\n\t\t\t\tSystem.exit(-1);\n\t\t}\n\t\t// if the file cannot be read inform the user and terminate the program\n\t\telse if(file.canRead()!=true){\n\t\t\t\t\tSystem.err.println(\"Usage Error: the file \"+args[0]+\" cannot be opened.\");\n\t\t\t\t\tSystem.exit(-1);\n\t\t}\n\t\t// if the file is not a file inform the user and terminate the program\n\t\telse if(file.isFile()!=true){\n\t\t\t\t\tSystem.err.println(\"Usage Error: the file \"+args[0]+\" cannot be opened.\");\n\t\t\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\t\n\t\t// create a list of type TreeList that will contain all the tree objects \n\t\tTreeList list= new TreeList();\n\t\t\t\n\t\ttry{\n\t\t\t// send the file to the scanner\n\t\t\tScanner inputFile = new Scanner(file);\n\t\t\t\n\t\t\t// create a boolean variable that is initially equal to true. \n\t\t\t// Since the first line does not contain info that can be parsed use the \n\t\t\t// variable to ensure the first line is skipped\n\t\t\tboolean firstLine=true;\n\t\t\t\n\t\t\t// while there is another line in the file continue the loop\n\t\t\twhile (inputFile.hasNextLine())\t{\n\t\t\t\t\n\t\t\t\t// create a string that represents a single line from the file\n\t\t\t\tString line= inputFile.nextLine();\n\t\t\t\t\n\t\t\t\t// send the line to have its information separated and entered into an\n\t\t\t\t// arrayList of strings\n\t\t\t\tArrayList<String> splitLine= splitCSVLine(line);\n\t\t\t\t\n\t\t\t\t\t// ensure the splitLine contains 41 elements, if not, skip it\n\t\t\t\t\tif (splitLine.size()==41){\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t// parse the information according to the needed information\n\t\t\t\t\t\t\t// about a tree that is sent to the tree class\n\t\t\t\t\t\t\tint id= Integer.parseInt(splitLine.get(0));\n\t\t\t\t\t\t\tint diam= Integer.parseInt(splitLine.get(3));\n\t\t\t\t\t\t\tString status= splitLine.get(6);\n\t\t\t\t\t\t\tString health= splitLine.get(7);\n\t\t\t\t\t\t\tString spc= splitLine.get(9);\n\t\t\t\t\t\t\tint zip= Integer.parseInt(splitLine.get(25));\n\t\t\t\t\t\t\tString boro= splitLine.get(29);\n\t\t\t\t\t\t\tdouble x= Double.parseDouble(splitLine.get(39));\n\t\t\t\t\t\t\tdouble y= Double.parseDouble(splitLine.get(40));\n\t\t\t\t\t\t\t// once information is parsed, use its information to create a \n\t\t\t\t\t\t\t// new tree\n\t\t\t\t\t\t\tTree tree= new Tree(id,diam,status,health,spc,zip,boro,x,y);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// ensure that the new tree does not have the same\n\t\t\t\t\t\t\t// ID, but a different species name from the other trees\n\t\t\t\t\t\t\t// in treeList\n\t\t\t\t\t\t\tfor (int i=0; i<list.size();i++){\n\t\t\t\t\t\t\t\ttree.equals(list.get(i));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// if the tree object is valid, add it to treeList list\n\t\t\t\t\t\t\tlist.add(tree);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// catch any invalid values sent to the constructor of the tree class\n\t\t\t\t\t\tcatch (IllegalArgumentException e){\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// throw a general exception in the case there is a parsing error\n\t\t\t\t\t\t// therefore the line will be ignored\n\t\t\t\t\t\tcatch (Exception e){\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t//}\n\t\t\t\t// after the first line passes through the loop set it equal\n\t\t\t\t// to false so the following information can be parsed and \n\t\t\t\t// sent to the tree class\n\t\t\t\tfirstLine=false;\n\t\t\t\n\t\t\t}\n\t\t\t// close the scanner\n\t\t\tinputFile.close();\n\t\t }\n\t\t\n\t\t// catch if the file cannot be found and send a message describing what happened\n\t\t// to the user. Exit the program.\n\t\tcatch (FileNotFoundException e){\n\t\t\tSystem.err.println(\"Usage Error: the file \"+args[0]+\" does not exist.\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\t// create an if statement to terminate the program if the file is empty or contains\n\t\t// no usable information\n\t\tif (list.size()==0){\n\t\t\tSystem.err.println(\"Usage Error: the file \"+args[0]+\" contains no usable information.\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\t// this portion of the program will handle user input and print the correct\n\t\t// tree information according to the tree species the user enters \n\t\t\n\t \t// create an exit word that will terminate the loop\n\t\tString exitWord=\"quit\";\n\t\t\n\t\t// create a string variable that represents the user's answer\n\t\tString answer;\n\t\t \n\t\t// open the scanner \n\t\tScanner input= new Scanner(System.in);\n\t\t// print a statement informing the user what to do\n\t\tSystem.out.println(\"Enter the tree species to learn more about it ('quit' to stop):\");\n\t\t// set the answer equal to the user's response\n answer= input.nextLine();\n \n // while the answer is not quit, keep prompting the user for a tree species\n\t\twhile (!(answer.equalsIgnoreCase(exitWord))){\n\t\t\t// if the tree species exists within the list of trees, print its matching species\n\t\t\t// and how many of that species exists within NYC and its boroughs\n\t\t\tif ((list.getCountByTreeSpecies(answer))>0){\n\t\t\t\tSystem.out.println(getMatchingSpecies(list,answer)+\"\\n\");\n\t\t\t\tSystem.out.println(getSpeciesInfo(list,answer));\n\t\t\t}\n\t\t\t\n\t\t\t// if the tree species is not within the list of trees, print a statement to \n\t\t\t// the user explaining it does not exist in NYC\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tSystem.out.println(\"There are no records of \"+answer+\" on NYC streets\");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t}\n\t\t\n\t\t// re-prompt the user to enter a tree species\n\t\t System.out.println(\"Enter the tree species to learn more about it ('quit' to stop):\");\n\t\t answer= input.nextLine();\n\t\t}\n\t\t\n\t\t//close the scanner\n\t\t input.close();\n\t\t \n\t\t \n\t}", "public static TreeBag<Golfer> loadDbFromFile(String dbFilename) \n {\n // used to store lines read from the database file\n String line;\n // create a new empty database\n TreeBag<Golfer> db = new TreeBag<Golfer>();\n // compile a regex pattern for parsing lines from the database file\n Pattern p = Pattern.compile(\"([\\\\w\\\\s-]+)(\\\\d+)\\\\s+(\\\\d+)\\\\s+(\\\\d+\\\\.?\\\\d*)\");\n // create file handle for the filename specified (in current directory)\n File f = new File(\".\"+ File.separator + dbFilename);\n\n // if the filename specified exists in the current directory,\n if (f.exists()) {\n System.out.println(\"\\nLoading golfers from database file '\"+ dbFilename +\"'...\");\n\n // try loading from the database file\n try {\n // create a new file reader using the file handle\n FileReader fr = new FileReader(f);\n // buffer the file reader\n BufferedReader buf = new BufferedReader(fr);\n\n // keep reading lines from the file buffer until we reach the end of file\n while ( (line = buf.readLine()) != null ) {\n // trim whitespace off the lines\n line = line.trim();\n //System.out.println(\"Read line:\\n\"+ line +\"\\n\");\n\n // create a matcher object using the pre-compiled regex pattern\n Matcher m = p.matcher(line);\n // if the matcher object found a match on the current line,\n if (m.find()) {\n // populate golfer data using match groups\n String name = m.group(1);\n int rounds = Integer.valueOf(m.group(2));\n int handicap = Integer.valueOf(m.group(3));\n double avg = Double.valueOf(m.group(4));\n // create a new golfer object\n Golfer g = new Golfer(name, rounds, handicap, avg);\n // add new golfer to the database\n db.add(g);\n /*\n System.out.println(\"Added golfer to database:\\n\"+ g +\"\\n\");\n System.out.println(\"Current database:\\n\"+ db);\n System.out.println(\"Tree view:\");\n db.displayAsTree();\n System.out.println(\"\\n\");\n */\n }\n }\n\n // at the end of the file, close the buffer\n buf.close();\n }\n // exception: specified file does not exist\n catch(FileNotFoundException e) {\n // print stack trace for debugging\n e.printStackTrace();\n System.out.println(\"File '\"+ dbFilename +\"' not found: \"+ e);\n }\n // exception: I/O error when reading from file\n catch(IOException e) {\n // print stack trace for debugging\n e.printStackTrace();\n System.out.println(\"Error reading file '\"+ dbFilename +\"': \"+ e);\n }\n }\n else\n System.out.println(\"Database file '\"+ dbFilename +\"' not found\");\n \n // return the newly compiled database\n return db;\n }", "public static List read(String path) throws IOException {\n\n List<HashMap> rows=new ArrayList<HashMap>();\n\n Configuration conf = NutchConfiguration.create();\n FileSystem fs = FileSystem.get(conf);\n\n Path file = new Path(path);\n\n SequenceFile.Reader reader = new SequenceFile.Reader(conf, SequenceFile.Reader.file(file));\n\n Writable key = (Writable)\n ReflectionUtils.newInstance(reader.getKeyClass(), conf);\n Node value = new Node();\n\n while(reader.next(key, value)) {\n try {\n HashMap<String, String> t_row = getNodeRow(key,value);\n rows.add(t_row);\n }\n catch (Exception e) {\n }\n }\n\n return rows;\n }", "private static TreeNode parseTreeNode(Scanner in)\n {\n int numberOfChildren = in.nextInt();\n int numberOfMetadata = in.nextInt();\n TreeNode newNode = new TreeNode(numberOfChildren, numberOfMetadata);\n\n // Recursively resolve children\n for (int i = 0; i < numberOfChildren; i++)\n {\n newNode.mChildren[i] = parseTreeNode(in);\n }\n\n // Now resolve the metadata by consuming tokens\n for (int i = 0; i < numberOfMetadata; i++)\n {\n newNode.mMetadata[i] = in.nextInt();\n }\n\n return newNode;\n }", "public void createGraphFromFile() {\n\t\t//如果图未初始化\n\t\tif(graph==null)\n\t\t{\n\t\t\tFileGetter fileGetter= new FileGetter();\n\t\t\ttry(BufferedReader bufferedReader=new BufferedReader(new FileReader(fileGetter.readFileFromClasspath())))\n\t\t\t{\n\t\t\t\tString line = null;\n\t\t\t\twhile((line=bufferedReader.readLine())!=null)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t}\n\t\t\t\t//create the graph from file\n\t\t\t\tgraph = new Graph();\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public final void readFile(final String filePath, final boolean printTree)\r\n {\r\n setNumberOfPivotalElements(0);\r\n clearFullTree();\r\n\r\n taggedDataListArray = new TaggedDataList[stdef.MAX_NUMBER_OF_PARTS];\r\n temporaryTaggedDataList = new TaggedDataList(stdef.MAX_NUMBER_OF_PARTS);\r\n pivotalElementName = new String[stdef.MAX_NUMBER_OF_PARTS];\r\n\r\n setPrintFullTree(printTree);\r\n loadData(filePath);\r\n }", "void read(IDevTree tree, Map options, boolean readOnly, boolean createNew) throws IOException;", "public void createGraphFromFile(String newDataFileName) throws IOException {\n\n File inFile = new File(newDataFileName); /* XML */\n\n Scanner sc = new Scanner(inFile);\n String line = sc.nextLine();/*Pass the first line */\n\n /* Until Start of the Edges */\n while (line.compareTo(\" <Edges>\") != 0) {\n /* Take the next line */\n line = sc.nextLine();\n }\n\n /* Take the next line */\n line = sc.nextLine();\n\n /* Until End of the Edges */\n while (line.compareTo(\" </Edges>\") != 0) {\n\n /* Add element in the Linked List */\n insert(loadEdgesFromString(line));\n\n /* Take the next line */\n line = sc.nextLine();\n }\n\n /* Close the file */\n sc.close();\n }", "public void readFromFile() {\n\n\t}", "private ArrayList loadfile(String file_path) throws Exception{\n\t\tFileInputStream fis = null;\n\t\tBufferedReader br = null;\n\t\tArrayList filedata = new ArrayList();\n\t\ttry {\n\t\t\tFile file = new File(file_path);\n\t\t\tfis = new FileInputStream(file);\n\t\t\tbr = new BufferedReader(new InputStreamReader(fis, charset));\n\t\t\tint i = 0;\n\t\t\twhile (br.ready()) {\n\t\t\t\tString line_data = br.readLine();\n\t\t\t\tif (line_data == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tnode_line_data nd = new node_line_data(line_data, i++);\n\t\t\t\tfiledata.add(nd);\n\t\t\t}\n\t\t\treturn filedata;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (br != null)\n\t\t\t\t\tbr.close();\n\t\t\t\tif (fis != null)\n\t\t\t\t\tfis.close();\n\t\t\t}\n\t\t\tcatch (IOException ex) {\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testAllConstructions() throws IOException, LexerException, ParseException {\n TreeNode<ASTNode> tree = getTree(\"all.txt\");\n System.out.println(tree);\n }", "NNode(String[] tokenized) {\r\n\t\tthis(NodeTypeEnum.valueOf(tokenized[3]), Integer.parseInt(tokenized[1]), NodeLabelEnum.valueOf(tokenized[4]));\t\t\r\n\t\tfType = NodeFuncEnum.valueOf(tokenized[2]);\r\n\t\tif (tokenized.length > 5) System.out.println(\"ERROR: Too many segments on reading node from file.\");\r\n\t}", "public static DSAGraph readFile(String filename)\n {\n DSAGraph graph = new DSAGraph();\n System.out.println(\"Reading file: \" + filename);\n try {\n File inFile = new File(filename);\n Scanner sc = new Scanner(inFile);\n sc.skip(\"#\"); //skips comment at beggining\n //sc.useDelimiter(\" \");\n\n while(sc.hasNextLine())\n {\n //sc.nextLine(); //currently always skipping the first line\n String command = sc.next();\n\n if(command.equals(\"Node\"))//case finds NODE\n {\n String label = sc.next();\n graph.addVertex(label);\n }\n else if(command.equals(\"Edge\")) //case finds EDGE\n {\n String l1 = sc.next();\n String l2 = sc.next();\n graph.addEdge(l1, l2);\n }\n // else if(command.equals(\"#\"))\n // {\n // System.out.println(\"Comment line\"); //may crash if there's a comment after the '#'\n // }\n\n }\n sc.close();\n } catch (Exception e) //file not found\n {\n throw new IllegalArgumentException(\"Unable to load object from file\" + e.getMessage());\n }\n\n return graph;\n\n\n }", "public static BST readProfiles(String filename)\n\t{\n\t\t\n\t\t// Opening file.\n\t\tFile inputFile=new File(PATH + filename);\n\t\t\n\t\t// create a Scanner to read from file\n\t\tScanner in=FileReader.createScanner(inputFile);\n\t\t\t\n\t\t// call readDataFile, which will construct a tree for us\n\t\treturn FileReader.readDataFile(in);\n\t}", "private static void fileRead(String file) {\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\tString line = \"\";\n\t\t\twhile((line=br.readLine())!=null) {\n\t\t\t\tString data[] = line.split(\"\\\\t\");\n\t\t\t\tint id = Integer.parseInt(data[0]);\n\t\t\t\tint groundTruth = Integer.parseInt(data[1]);\n\t\t\t\tactualClusters.put(id, groundTruth);\n\t\t\t\tArrayList<Double> temp = new ArrayList<>();\n\t\t\t\tfor(int i=2;i<data.length;i++) {\n\t\t\t\t\ttemp.add(Double.parseDouble(data[i]));\n\t\t\t\t}\n\t\t\t\tcols = data.length-2;\n\t\t\t\tgeneAttributes.put(id, temp);\n\t\t\t\tallClusters.add(id+\"\");\n\t\t\t\ttotalGenes++;\n\t\t\t}\n\t\t\ttotalCluster = totalGenes;\n\t\t\tbr.close();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void showTree(IGPProgram a_prog, String a_filename)\n throws InvalidConfigurationException {\n if (a_prog == null) {\n return;\n }\n TreeNode myTree = createTree(a_prog);\n if (myTree == null) {\n return;\n }\n TreeVisualizer tv = new TreeVisualizer();\n tv.setTreeBranchRenderer(new JGAPTreeBranchRenderer());\n tv.setTreeNodeRenderer(new JGAPTreeNodeRenderer());\n tv.setBranchStartWidth(18.0);\n tv.setArenaColor(Color.black);\n tv.setBkgndColor(Color.black);\n tv.setRenderNodes(true);\n tv.setSide(1024);\n tv.setCircleDiminishFactor(0.5);\n tv.writeImageFile(tv.renderTree(myTree), new File(a_filename));\n }", "public static Tree loadTree(String inFile) {\n\t\tif (inFile == null) throw new NullPointerException(\"inFile: null\");\n\t\tTreeBuilder tb = TreeBuilder.loadTree(inFile);\n\t\treturn tb == null ? null : new Tree(tb);\n\t}", "public static void main(String[] args) {\n KdTree tree = new KdTree();\n String filename = args[0];\n In in = new In(filename);\n while (!in.isEmpty()) {\n double x = in.readDouble();\n double y = in.readDouble();\n Point2D p = new Point2D(x, y);\n tree.insert(p);\n }\n tree.draw();\n // tree.info();\n // RectHV rect = new RectHV(0.793893, 0.345492, 1.0, 0.654508);\n // rect.draw();\n // Point2D point = new Point2D(0.5, 0.5);\n // point.draw();\n // StdDraw.show();\n // StdDraw.pause(40);\n // StdDraw.text(0.5, 0.5, \"ksdjlfjasdlfkjsadkflasdjfdaslkjfas\");\n // StdDraw.show();\n // while (true) {\n // System.out.println(StdDraw.mouseX());\n // StdDraw.show();\n // }\n // // Point2D point = new Point2D(0.5, 0.5);\n // // Point2D point2 = new Point2D(0.25, 0.25);\n // // Point2D point3 = new Point2D(0.75, 0.75);\n // // RectHV rect = new RectHV(0.0, 0.0, 0.3, 0.3);\n // // RectHV rect2 = new RectHV(0.0, 0.0, 0.3, 0.3);\n // tree.insert(new Point2D(0.5, 0.5));\n // tree.insert(new Point2D(0.0, 0.0));\n // tree.insert(new Point2D(0.75, 1.0));\n // tree.insert(new Point2D(0.75, 0.0));\n // tree.insert(new Point2D(1.0, 1.0));\n // tree.insert(new Point2D(0.25, 1.0));\n // tree.insert(new Point2D(0.75, 0.75));\n // tree.insert(new Point2D(1.0, 0.5));\n // tree.insert(new Point2D(1.0, 0.0));\n // tree.insert(new Point2D(1.0, 0.75));\n // // tree.insert(new Point2D(0.375, 1.0));\n // // Point2D point = new Point2D(0.375, 1.0);\n // // System.out.println(tree.get(point));\n // // A 0.5 0.5\n // // B 0.0 0.0\n // // C 0.75 1.0\n // // D 0.75 0.0\n // // E 1.0 1.0\n // // F 0.25 1.0\n // // G 0.75 0.75\n // // H 1.0 0.5\n // // I 1.0 0.0\n // // J 1.0 0.75\n // // System.out.println(tree.isEmpty());\n // // tree.insert(point);\n // // tree.insert(point2);\n // // tree.insert(point3);\n // // tree.insert(point);\n // // tree.insert(point);\n // // tree.insert(point);\n // // System.out.println(tree.isEmpty());\n // System.out.println(tree.size());\n // // System.out.println(tree.get(new Point2D(0.375, 1.0)));\n // System.out.println(tree.contains(new Point2D(1.0, 0.0)));\n // // System.out.println(tree.contains(new Point2D(0.5, 0.5)));\n // // tree.draw();\n // // for (Point2D points : tree.range(rect)) System.out.println(points);\n // // System.out.println();\n // // for (Point2D points : tree.range(rect2)) System.out.println(points);\n }", "public List<List<String>> levelsSplitter(java.io.Reader reader) throws Exception {\r\n BufferedReader bufferedReader = (BufferedReader) reader;\r\n String line;\r\n int fourChecks = 0;\r\n List<List<String>> levels = new ArrayList<>();\r\n List<String> level = new ArrayList<>();\r\n List<String> currentBlockLayOut = new ArrayList<>();\r\n boolean levelBool = false;\r\n boolean blocksBool = false;\r\n this.blocksLayOut = new ArrayList<>();\r\n try {\r\n while ((line = bufferedReader.readLine()) != null) {\r\n if (line.startsWith(\"#\") || line.startsWith(\" \")) { // empty lines and comments\r\n continue;\r\n }\r\n if (line.equals(\"START_LEVEL\")) {\r\n levelBool = true;\r\n fourChecks++;\r\n continue;\r\n }\r\n if (levelBool) {\r\n level.add(line);\r\n }\r\n if (line.equals(\"START_BLOCKS\") && !blocksBool) {\r\n blocksBool = true;\r\n fourChecks++;\r\n continue;\r\n }\r\n if (blocksBool) {\r\n currentBlockLayOut.add(line);\r\n }\r\n if (line.equals(\"END_BLOCKS\")) {\r\n blocksBool = false;\r\n blocksLayOut.add(currentBlockLayOut);\r\n fourChecks++;\r\n }\r\n if (line.equals(\"END_LEVEL\")) {\r\n levelBool = false;\r\n fourChecks++;\r\n if (fourChecks != 4) {\r\n throw new Exception(\"levels definition format is wrong!\");\r\n }\r\n fourChecks = 0;\r\n levels.add(level);\r\n level = new ArrayList<>();\r\n currentBlockLayOut = new ArrayList<>();\r\n }\r\n }\r\n } catch (Exception e) {\r\n throw new Exception(\"problems were found during reading the levels definition file\");\r\n } finally {\r\n if (bufferedReader != null) {\r\n try {\r\n bufferedReader.close();\r\n } catch (Exception e) {\r\n throw new Exception(\"problems were found while closing the levels definition file\");\r\n }\r\n }\r\n }\r\n return levels;\r\n }", "private Program02(String fileName) {\n BinaryTree bt = new BinaryTree();\n Stack expression = new Stack();\n\n try {\n Scanner scanner = new Scanner(new File(fileName));\n\n while (scanner.hasNext()) {\n String curChar = scanner.next();\n expression.push(curChar);\n }\n\n scanner.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n Node tree = createLevelOrder(expression, bt.getRoot(), 0, expression.length());\n\n // construct a binary tree to store parsed math expression\n bt.setRoot(tree);\n printInfo(bt);\n }", "public void showTree(IGPProgram a_prog, String a_filename,\n TreeBranchRenderer a_treeBranchRenderer,\n TreeNodeRenderer a_treeNodeRenderer)\n throws InvalidConfigurationException {\n TreeNode myTree = createTree(a_prog);\n if (myTree == null) {\n return;\n }\n TreeVisualizer tv = new TreeVisualizer();\n tv.setTreeBranchRenderer(a_treeBranchRenderer);\n tv.setTreeNodeRenderer(a_treeNodeRenderer);\n tv.setBranchStartWidth(18.0);\n tv.setArenaColor(Color.black);\n tv.setBkgndColor(Color.black);\n tv.setRenderNodes(true);\n tv.setSide(1024);\n tv.setCircleDiminishFactor(0.5);\n tv.writeImageFile(tv.renderTree(myTree), new File(a_filename));\n }", "private static RootedTree parseTree(String line,\n\t\t\tMap<String, String> translation)\n\t{\t\t\n\t\tString newickStr = StringUtils.selectFirstRegex(newickPattern, line);\t\t\t\t\n\t\tnewickStr=newickStr.substring(4); \t\n\t\t// hack (cannot translate in tree rep because of limitation of newick parser\t\t\n\t\tfor (String code : translation.keySet())\n\t\t{\n\t\t\tString codeCtx = StringUtils.selectFirstRegex(\"([,)(])\" + code + \"[:]\", newickStr);\t\t\t\n\t\t\tnewickStr = newickStr.replace(codeCtx + code + \":\", codeCtx + translation.get(code) + \":\");\n\t\t}\n\n\t\t// for (int i = translation.size(); i >= 1; i--)\n\t\t// newickStr = newickStr.replace(\"\" + i + \":\" , translation.get(\"\" + i) + \":\"); \n\n\t\tnewickStr = newickStr + \";\";\t\t\n\t\treturn RootedTree.Util.fromNewickString(newickStr);\n\t}", "private static void readAndWriteNodes(String name) throws IOException {\n System.out.println(name);\n Map<Long, Long> nodeMap = new HashMap<>();\n boolean firstLine = true;\n fileReader = new BufferedReader(new FileReader(PATH + name));\n fileWriter = new BufferedWriter(new FileWriter(PATH + \"/uid/\" + name));\n String line;\n while ((line = fileReader.readLine()) != null) {\n if (!firstLine) {\n long globalId = getGlobalId();\n String[] lineTokens = LINE_TOKEN_SEPARATOR.split(line);\n long ID = Long.parseLong(lineTokens[0]);\n nodeMap.put(ID, globalId);\n String writeLine = \"\";\n for (int i = 0; i < lineTokens.length; i++) {\n if (i == 0) {\n writeLine += globalId;\n } else {\n writeLine += lineTokens[i];\n }\n writeLine += \"|\";\n }\n fileWriter.write(writeLine);\n fileWriter.newLine();\n vertexCount++;\n globalVertexCount++;\n } else {\n fileWriter.write(line);\n fileWriter.newLine();\n firstLine = false;\n }\n }\n fileWriter.close();\n fileReader.close();\n counterMapNodes.put(name, vertexCount);\n vertexCount = 0;\n vertexList.add(nodeMap);\n }", "public Node createHuffmanTree(File f) throws FileNotFoundException {\r\n File file = f;\r\n FileInputStream fi = new FileInputStream(file);\r\n List<Node> nodes = new LinkedList<>();\r\n\r\n// Creating a map, where the key is characters and the values are the number of characters in the file\r\n Map<Character, Integer> charsMap = new LinkedHashMap<>();\r\n try (Reader reader = new InputStreamReader(fi);) {\r\n int r;\r\n while ((r = reader.read()) != -1) {\r\n char nextChar = (char) r;\r\n\r\n if (charsMap.containsKey(nextChar))\r\n charsMap.compute(nextChar, (k, v) -> v + 1);\r\n else\r\n charsMap.put(nextChar, 1);\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n//// Sort the map by value and create a list\r\n// charsMap = charsMap.entrySet().stream().sorted(Map.Entry.comparingByValue(Comparator.reverseOrder())).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));\r\n\r\n// Creating a list of Nodes from a map\r\n for (Character ch : charsMap.keySet()) {\r\n nodes.add(new Node(ch, charsMap.get(ch), null, null));\r\n }\r\n\r\n// Creating a Huffman tree\r\n while (nodes.size() > 1) {\r\n Node firstMin = nodes.stream().min(Comparator.comparingInt(n -> n.count)).get();\r\n nodes.remove(firstMin);\r\n Node secondMin = nodes.stream().min(Comparator.comparingInt(n -> n.count)).get();\r\n nodes.remove(secondMin);\r\n\r\n Node newNode = new Node(null, firstMin.count + secondMin.count, firstMin, secondMin);\r\n newNode.left.count = null;\r\n newNode.right.count = null;\r\n nodes.add(newNode);\r\n nodes.remove(firstMin);\r\n nodes.remove(secondMin);\r\n }\r\n\r\n// Why first? See algorithm!\r\n nodes.get(0).count = null;\r\n return nodes.get(0);\r\n }", "public void readFile(File file) {\n\ttry (BufferedReader br = new BufferedReader(new FileReader(file)))\n\t{\n\n\t\tString sCurrentLine;\n\t\tString [] lineElements;\n\t\t\n\t\t// read the headlines\n\t\tsCurrentLine = br.readLine();\n\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\tnumVertices = Integer.parseInt(lineElements[1]);\n\t\tsCurrentLine = br.readLine();\n\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\tnumPaths = Integer.parseInt(lineElements[1]);\n\t\tsCurrentLine = br.readLine();\n\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\ttmax = Double.parseDouble(lineElements[1]);\n\t\t\n//\t\tSystem.out.println(numVertices + \", \" + numPaths + \", \" + tmax);\n\n\t\t/* read benefits1 */\n\t\tint index = 0;\n\t\twhile ((sCurrentLine = br.readLine()) != null) {\n//\t\t\t\tSystem.out.println(sCurrentLine);\n\t\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\t\tdouble x = Double.parseDouble(lineElements[0]);\n\t\t\tdouble y = Double.parseDouble(lineElements[1]);\n\t\t\tList<Double> scores = new ArrayList<Double>();\n\t\t\tfor (int i = 2; i < lineElements.length; i++) {\n\t\t\t\tdouble score = Double.parseDouble(lineElements[i]);\n\t\t\t\tscores.add(new Double(score));\n\t\t\t}\n\t\t\tPOI POI = new POI(index, x, y, scores);\n\t\t\t//POI.printMe();\n\t\t\t\n\t\t\tvertices.add(POI);\n\t\t\tindex ++;\n\t\t}\n\t\t\n\t\t// create the arcs and the graph\n\t\tfor (int i = 0; i < vertices.size(); i++) {\n\t\t\tfor (int j = 0; j < vertices.size(); j++) {\n\t\t\t\tArc arc = new Arc(vertices.get(i), vertices.get(j));\n\t\t\t\tarcs.add(arc);\n\t\t\t\tgraph.put(new Tuple2<POI, POI>(vertices.get(i), vertices.get(j)), arc);\n\t\t\t}\n\t\t}\n\t} catch (IOException e) {\n\t\te.printStackTrace();\n\t}\n}", "@Override\r\n\tpublic void run() {\n \tFile in = new File(\"input.txt\");\r\n\t\t String strLine;\r\n\t\t int k;\r\n\t\t Tree mytree = new Tree();\r\n\t\t try {\r\n\t\t Scanner sc = new Scanner(in);\r\n\t\t while (sc.hasNext()) {\r\n\t\t mytree.insert(sc.nextInt());\r\n\t\t }\r\n\t\t } catch (FileNotFoundException e) {\r\n\t\t e.printStackTrace();\r\n\t\t }\r\n\t\t try(FileWriter fos=new FileWriter(\"output.txt\"))\r\n\t {\r\n\t \r\n\t\t\t mytree.PreOrderTraversal(mytree.root, fos);\r\n\t }\r\n\t catch(IOException ex){\r\n\t \tSystem.out.println(ex.getMessage());\r\n\t }\r\n \t\r\n\t}", "void visit(PetriNetFileName name);", "public GrafoNDNP(String archivo) {\n\t\tint fila, columna;\n\n\t\ttry {\n\t\t\tsc = new Scanner(new File(archivo));\n\n\t\t\tcantNodos = sc.nextInt();\n\t\t\tcantAristas = sc.nextInt();\n\t\t\tporcentAdy = Double.parseDouble(sc.next());\n\t\t\tgrMax = sc.nextInt();\n\t\t\tgrMin = sc.nextInt();\n\t\t\tthis.matriz = new MatrizSimetrica(cantNodos);\n\n\t\t\tfor (int i = 0; i < cantAristas; i++) {\n\t\t\t\tfila = sc.nextInt() - 1;\n\t\t\t\tcolumna = sc.nextInt() - 1;\n\t\t\t\tmatriz.setValor(fila, columna, true);\n\t\t\t}\n\n\t\t\tfor (int i = 0; i < matriz.getDimension(); i++) {\n\t\t\t\tint grado = 0;\n\t\t\t\tfor (int j = 0; j < matriz.getDimension(); j++) {\n\t\t\t\t\tif (matriz.getValor(i, j) && i != j) {\n\t\t\t\t\t\tgrado++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnodos.add(new Nodo(i + 1, 0, grado));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}", "private void createGenotypes(File inFile)\r\n\t\tthrows Exception\r\n\t{\n\t\tBufferedReader in = new BufferedReader(new FileReader(inFile));\r\n\t\t// And write back out in Flapjack format\r\n\t\tBufferedWriter out = new BufferedWriter(new FileWriter(new File(wrkDir, \"geno\")));\r\n\t\tout.write(\"# fjFile = GENOTYPE\");\r\n\t\tout.newLine();\r\n\r\n\t\t// Skip the first two lines; we'll just assume marker order...\r\n\t\tin.readLine(); in.readLine();\r\n\t\t// ...and use the data we already have from the map\r\n\t\tfor (Marker m: markers)\r\n\t\t\tout.write(\"\\t\" + m.name);\r\n\t\tout.newLine();\r\n\r\n\r\n\t\t// Now process each line\r\n\t\tint index = 0;\r\n\t\tString str = null;\r\n\t\twhile ((str = in.readLine()) != null)\r\n\t\t{\r\n\t\t\tif (str.isEmpty())\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (index == 0)\r\n\t\t\t\tout.write(\"RP\");\r\n\t\t\telse if (index == 1)\r\n\t\t\t\tout.write(\"DP\");\r\n\t\t\telse\r\n\t\t\t\tout.write(\"RP[1]/DP-\" + index);\r\n\r\n\t\t\tfor (String allele: str.split(\",\"))\r\n\t\t\t\tout.write(\"\\t\" + allele);\r\n\r\n\t\t\tout.newLine();\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tin.close();\r\n\t\tout.close();\r\n\t}", "public void loadNodes() {\n\t\tif (taxonomyMap.size() == 0) this.loadNames();\n\n\t\tBufferedReader nodesRdr = null;\n\t\ttry {\n\t\t\tnodesRdr = new BufferedReader(new InputStreamReader(nodesUrl.openStream()));\n\n\t\t\tString line;\n\t\t\twhile ((line = nodesRdr.readLine()) != null) {\n\t\t\t\tString[] parts = line.split(\"\\\\|\");\n\t\t\t\tInteger taxonId = Integer.valueOf(parts[0].trim());\n\t\t\t\tString pti = parts[1].trim();\n\t\t\t\tInteger parentTaxonId = (pti.length() > 0 && !(pti.equals(\"all\"))) ? new Integer(pti) : null;\n\n\t\t\t\t// Get our Taxon object\n\t\t\t\tTaxon t = taxonomyMap.get(taxonId);\n\n\t\t\t\t// Get our parent Taxon\n\t\t\t\tTaxon p = taxonomyMap.get(parentTaxonId);\n\n\t\t\t\t// Set the parent\n\t\t\t\tt.setParent(p);\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\n\t\t} finally {\n\t\t\tthis.close(nodesRdr);\n\t\t}\n\t}", "public Grid decode (File file) throws IOException\n {\n String currentLine;\n int width = 0, height = 0;\n Grid _grid = null;\n\n try (BufferedReader br = new BufferedReader(new FileReader(file)))\n {\n // skip all the lines that we are not using\n while ((currentLine = br.readLine()) != null) {\n if (currentLine.startsWith(\"#\")) { continue; }\n if (currentLine.startsWith(\"x = \"))\n {\n for (String s : currentLine.split(\",\"))\n {\n if (s.contains(\"x = \"))\n {\n width = Integer.valueOf(s.replaceAll(\"\\\\D+\", \"\"));\n }\n else if (s.contains(\"y = \"))\n {\n height = Integer.valueOf(s.replaceAll(\"\\\\D+\", \"\"));\n }\n else\n {\n break;\n }\n }\n break;\n }\n }\n _grid = new Grid(height, width, false);\n\n int currentY = 0;\n int currentX = 0;\n int startX = 0;\n int i = 0;\n\n String kNumber = \"\"; // The number of times block should be repeated.\n String board = \"\";\n\n // convert the board to a long string\n while ((currentLine = br.readLine()) != null)\n {\n board += currentLine;\n }\n\n for (char c : board.toCharArray())\n {\n if (c == DEAD)\n {\n currentX += (kNumber.equals(\"\") ? 1 : Integer.parseInt(kNumber));\n kNumber = \"\";\n }\n else if (c == LIVE)\n {\n int count = (kNumber.equals(\"\") ? 1 : Integer.parseInt(kNumber));\n for (int j = 0; j < count; j++)\n {\n if (currentY < height && currentX < width)\n {\n _grid.setCell(true, currentX, currentY);\n }\n currentX++;\n }\n kNumber = \"\";\n }\n else if (c == EOL)\n {\n currentX = startX;\n currentY += (kNumber.equals(\"\") ? 1 : Integer.parseInt(kNumber));\n kNumber = \"\";\n }\n else if (c == EOF)\n {\n break;\n }\n else\n {\n kNumber += Integer.parseInt(board.substring(i, i + 1));\n }\n i++;\n }\n\n }\n return _grid;\n }", "public Object readObject(File file, int format) throws IOException, FileNotFoundException;", "public List<List<String>> read () {\n List<List<String>> information = new ArrayList<>();\n try (BufferedReader br = new BufferedReader(new FileReader(path))) {\n int aux = 0;\n while ((line = br.readLine()) != null) {\n String[] data = line.split(split_on);\n List<String> helper = new ArrayList<>();\n helper.add(data[0]);\n helper.add(data[1]);\n information.add(helper);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return information;\n }", "public TreeNode deserialize(String data) {\n byte[] bytes = Base64.getDecoder().decode(data);\n IntBuffer intBuf = ByteBuffer.wrap(bytes)\n .order(ByteOrder.BIG_ENDIAN).asIntBuffer();\n int[] nums = new int[intBuf.remaining()];\n intBuf.get(nums);\n //for (int i = 0; i<nums.length;++i) System.out.print(nums[i]);\n return deserialize(new DataIterator(nums), false, 0);\n }", "List<String> getTrees();", "public TreeNode deserialize(StringBuilder data) {\r\n //分成两组\r\n \tHashMap<Integer,Integer> showMapAct = new HashMap<>();\r\n \tStringBuilder[] result = data.split(\"k\");\r\n \t//deal with showMapAct\r\n \tif(result.length==1 || result[1].length()==0){\r\n \t}\r\n \telse{\r\n \t\tStringBuilder[] extraInfo = result[1].split(\",\");\r\n \t\tfor(int i = 0; i < extraInfo.length;i++){\r\n \t\t\tStringBuilder[] temp = extraInfo[i].split(\":\");\r\n \t\t\tshowMapAct.put(Integer.valueOf(temp[0]),Integer.valueOf(temp[1]));\r\n \t\t}///////\r\n \t}\r\n \tStringBuilder[] nums = result[0].split(\",\");\r\n \tint[] preOrder = new int[nums.length/2];\r\n \tint[] inOrder = new int[nums.length/2];\r\n \tinitArray(preOrder,nums,0,nums.length/2);\r\n \tinitArray(inOrder,nums,nums.length/2,nums.length);\r\n \treturn constructTree(preOrder,0,preOrder.length,inOrder,0,inOrder.length,showMapAct);\r\n }", "private FileReader openLabelsFile() {\n FileReader file = null;\n try {\n file = new FileReader(riaaLabelsFile);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return file;\n }", "public void loadNodes(String nodeFile) throws Exception {\r\n \tBufferedReader br = new BufferedReader( new FileReader(nodeFile) );\r\n while(true) {\r\n String line = br.readLine();\r\n if(line == null)\r\n \tbreak;\r\n Scanner sr = new Scanner(line);\r\n if(!sr.hasNextLine())\r\n \tbreak;\r\n sr.useDelimiter(\"\\\\t\");\r\n int id = sr.nextInt(); // node id\r\n double weight = 1.0;\r\n String description = sr.next(); // description\r\n mNodes.add( new Node(id, weight, description) );\r\n }\r\n br.close();\r\n System.out.println(\"Loading graph nodes completed. Number of nodes:\" + getNodeCnt() );\r\n // initialize empty neighbor sets for each node\r\n for (int i = 0; i < getNodeCnt(); i++) {\r\n \tSet<Integer> outEdges = new HashSet<Integer> ();\r\n\t\t\tSet<Integer> inEdges = new HashSet<Integer> ();\r\n\t\t\tmOutEdges.add( outEdges );\r\n\t\t\tmInEdges.add( inEdges );\r\n\t\t}\r\n \r\n }", "public REparser (String input) throws IOException {\n fileIn = new FileReader(input);\n cout.printf(\"%nEchoing File: %s%n\", input);\n echoFile();\n fileIn = new FileReader(input);\n pbIn = new PushbackReader(fileIn);\n temp = new FileReader(input);\n currentLine = new BufferedReader(temp);\n curr_line = \"\";\n curr_line = currentLine.readLine();\n AbstractNode root;\n while(curr_line != null) {\n getToken();\n root = parse_re(0);\n printTree(root);\n curr_line = currentLine.readLine();\n }\n }", "private static void readGraph() throws FileNotFoundException{ \n\n @SuppressWarnings(\"resource\")\n\tScanner scan = new Scanner (new FileReader(file)); \n scan.nextLine();\n\n while (scan.hasNextLine()){\n \n String ligne = scan.nextLine();\n\n if (ligne.equals(\"$\")){break;}\n\n \n String num1=ligne.substring(0,4);\n String num2=ligne.substring(4,ligne.length());\n\n Station st = new Station (num1,num2);\n //remplir les stations voisines ds le tableau Array\n ParisMetro.voisins[Integer.parseInt(st.getStationNum())]= st;\n //remplir les stations \n ParisMetro.stations.add(st);\n \n }\n \n\n while(scan.hasNextLine()){\n String temp = scan.nextLine();\n \n StringTokenizer st; \n\t\t st=new StringTokenizer(temp);\n\t\t \n\t\t int num =Integer.parseInt(st.nextToken());\n\t\t int voisinNum =Integer.parseInt(st.nextToken());\n\t\t int time=Integer.parseInt(st.nextToken());\n\t\t\n \n Chemin che = new Chemin (ParisMetro.voisins[num],ParisMetro.voisins[voisinNum],time);//create a new edge\n \n \n //ajout des chemins\n ParisMetro.chemins.add(che); \n //ajout des sorties stations voisines\n ParisMetro.voisins[num].addSortie(che);\n //ajout des sorties stations voisines\n ParisMetro.voisins[voisinNum].addArrivee(che);\n }\n \n }", "public static void main(String[] args) throws IOException{\n Tree tree = new Tree(new DoubleString(0, \"M\"));\n \n for(int x = 0; x < fileCount; x ++) {\n \t//inserts every line from every input file into the tree\n \tBufferedReader input = new BufferedReader(new FileReader(x + \".txt\"));\n \t\n \tfor(int y = 0; y < 5; y ++) {\n \t\tinput.readLine();\n \t}\n \t\n \tString line = input.readLine();\n \t\n \twhile(line != null) {\n \t\tif(line.contains(\"----\")) {\n \t\t\tbreak;\n \t\t}\n \t\t\n \t\ttree.insert(new DoubleString(Double.parseDouble(betweenPipes(line, 3).trim().substring(0, betweenPipes(line, 3).trim().length() - 1)), betweenPipes(line, 2).trim()));\n \t\tline = input.readLine();\n \t}\n \t\n \tinput.close();\n }\n \n //converts the tree into an array and sorts the array\n DoubleString[] array = Tree.toArray(tree);\n DoubleString.sort(array, true);\n //creates (or overwrites, if it's already created) the output file\n PrintWriter output = new PrintWriter(new BufferedWriter(new FileWriter(\"output.txt\")));\n output.println(\"[hide=\" + format + \" stats)][code]Combined usage for \" + format + \" stats)\\n\" + \n \t\t\"+ ---- + ------------------ + ------- +\\n\" + \n \t\t\"| Rank | Pokemon | Percent |\\n\" + \n \t\t\"+ ---- + ------------------ + ------- +\");\n \n for(int i = 0; i < array.length; i ++) {\n \t//divides every stat from the array by the number of months and prints it into the output file\n \tarray[i].divideEquals(fileCount);\n \toutput.print(\"| \");\n \tString rank = i + \"\";\n \t\n \twhile(rank.length() < 3) {\n \t\trank = ' ' + rank;\n \t}\n \t\n \toutput.print(rank + \" | \");\n \tString name = array[i].toString();\n \t\n \twhile(name.length() < 19) {\n \t\tname = name + ' ';\n \t}\n \t\n \toutput.print(name + \"| \");\n \tString integer = (array[i].getNumber() + \"\").substring(0, (array[i].getNumber() + \"\").indexOf('.'));\n \tString fraction = (array[i].getNumber() + \"000\").substring((array[i].getNumber() + \"\").indexOf('.')).substring(0, 4);\n \t\n \twhile(integer.length() < 2) {\n \t\tinteger = ' ' + integer;\n \t}\n \t\n \toutput.println(integer + fraction + \"% |\");\n }\n \n //line of code I have to include to prevent weird things\n output.close();\n\t}", "private void readFromFile(String filename) {\n\t\ttry {\n\t\t Scanner read = new Scanner(new File(filename));\n\t\t String line;\n\t\t int counter = 0;\n\t\t String temp;\n\t\t line = read.nextLine();\n\t\t temp = line.substring(0);\n\t\t height = convertToInt(temp);\n\n\t\t line = read.nextLine();\n\t\t temp = line.substring(0);\n\n\t\t length = convertToInt(temp);\n\t\t size = height*length;\n\t\t \n\t\t squares = new Square[size][size];\n\n\t\t while(read.hasNextLine()) {\n\t\t\t\tline = read.nextLine();\n\t\t \tfor (int i = 0; i < line.length(); i++) {\n\t\t \t temp = line.substring(i, i+1);\n\n\t\t \t if (temp.equals(\".\")) {\n\t\t \t\t\tsquares[counter][i] = new FindValue(0);\n\t\t \t } \n\t\t \t else {\n\t\t\t\t\t\tsquares[counter][i] = new PreFilled(convertToInt(temp));\n\t\t\t \t\t}\n\t\t \t}\n\t\t \tcounter++;\n\t\t }\n\t\t} catch(IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n }", "public Graph load(String filename, Graph g, NumberEdgeValue nev) throws IOException\n {\n Reader reader = new FileReader(filename);\n Graph graph = load(reader, g, nev);\n reader.close();\n return graph;\n }", "public void loadGraph2(String path) throws FileNotFoundException, IOException {\n\n\t\ttry (BufferedReader br = new BufferedReader(\n\n\t\t\t\tnew InputStreamReader(new FileInputStream(path), StandardCharsets.UTF_8), 1024 * 1024)) {\n\n\t\t\tString line;\n\n\t\t\twhile ((line = br.readLine()) != null) {\n\n\t\t\t\tif (line == null) // end of file\n\t\t\t\t\tbreak;\n\n\n\t\t\t\tint a = 0;\n\t\t\t\tint left = -1;\n\t\t\t\tint right = -1;\n\n\t\t\t\tfor (int pos = 0; pos < line.length(); pos++) {\n\t\t\t\t\tchar c = line.charAt(pos);\n\t\t\t\t\tif (c == ' ' || c == '\\t') {\n\t\t\t\t\t\tif (left == -1)\n\t\t\t\t\t\t\tleft = a;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tright = a;\n\n\t\t\t\t\t\ta = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (c < '0' || c > '9') {\n\t\t\t\t\t\tSystem.out.println(\"Erreur format ligne \");\n\t\t\t\t\t\tSystem.exit(1);\n\t\t\t\t\t}\n\t\t\t\t\ta = 10 * a + c - '0';\n\t\t\t\t}\n\t\t\t\tright = a;\n\t\t\n\t\t\t\t// s'assurer qu'on a toujours de la place dans le tableau\n\t\t\t\tif (adjVertices.length <= left || adjVertices.length <= right) {\n\t\t\t\t\tensureCapacity(Math.max(left, right) + 1);\n\t\t\t\t}\n\n\t\t\t\tif (adjVertices[left] == null) {\n\t\t\t\t\tadjVertices[left] = new Sommet(left);\n\t\t\t\t}\n\n\t\t\t\tif (adjVertices[right] == null) {\n\t\t\t\t\tadjVertices[right] = new Sommet(right);\n\t\t\t\t}\n\n\t\t\t\tif (adjVertices[left].listeAdjacence.contains(adjVertices[right])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tadjVertices[left].listeAdjacence.add(adjVertices[right]);\n\t\t\t\t\tadjVertices[right].listeAdjacence.add(adjVertices[left]);\n\t\t\t\t\tnombreArrete++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < adjVertices.length; i++) {\n\t\t\tif (adjVertices[i] == null)\n\t\t\t\tnombreTrous++;\n\t\t}\n\t\tnumberOfNode = adjVertices.length - nombreTrous;\n\t\tSystem.out.println(\"-----------------------------------------------------------------\");\n\t\tSystem.out.println(\"Loading graph done !\");\n\t\tSystem.out.println(\"-----------------------------------------------------------------\");\n\n\t\tSystem.out.println(\"nombreTrous \" + nombreTrous);\n\t\tSystem.out.println(\"numberOfNode \" + numberOfNode);\n\t\t\n\t}", "public Graph load(String filename) throws IOException\n {\n return load(filename, new SparseGraph(), null);\n }", "public static void builtTree\n ( ArrayList<DefaultMutableTreeNode> treeArray , \n int recursion , DefaultMutableTreeNode selected , \n boolean enableDirs , boolean enableFiles )\n {\n int m;\n if (recursion<0) { m = DEFAULT_RECURSION_LIMIT; }\n else { m = recursion; }\n for ( int k=0; k<m; k++ )\n {\n boolean request = false;\n // Start cycle for entries\n int n = treeArray.size();\n for ( int i=0; i<n; i++ )\n {\n DefaultMutableTreeNode x1 = treeArray.get(i);\n // Support selective mode, skip if not selected\n if ( (selected != null) & ( selected != x1 ) ) continue;\n // Analyse current entry, skip if already handled\n ListEntry x2 = (ListEntry)x1.getUserObject();\n if ( x2.handled == true ) continue;\n request = true;\n x2.failed = false;\n // Start handling current entry\n String x3 = x2.path;\n File file1 = new File( x3 );\n boolean exists1 = file1.exists();\n boolean directory1=false;\n if (exists1) { directory1 = file1.isDirectory(); }\n // Handling directory: make list of childs directories/files\n if ( exists1 & directory1 )\n {\n String[] list = file1.list();\n int count=0;\n if ( list != null ) count = list.length;\n for ( int j=0; j<count; j++ )\n {\n String s1 = list[j];\n String s2 = x3+\"/\"+s1;\n File file2 = new File(s2);\n boolean dir = file2.isDirectory();\n if ( ( enableDirs & dir ) | ( enableFiles & !dir ) )\n {\n ListEntry y1 = \n new ListEntry ( s1, \"\", s2, false, false );\n DefaultMutableTreeNode y2 = \n new DefaultMutableTreeNode( y1 );\n treeArray.add( y2 );\n x1.add( y2 );\n x1.setAllowsChildren( true ); // this entry is DIRECTORY\n }\n }\n }\n // Handling file: read content\n if ( exists1 & !directory1 )\n {\n int readSize = 0;\n //\n StringBuilder data = new StringBuilder(\"\");\n FileInputStream fis;\n byte[] array = new byte[BUFFER_SIZE];\n try \n { \n fis = new FileInputStream(file1);\n readSize = fis.read(array); \n fis.close();\n }\n catch ( Exception e ) \n // { data = \"N/A : \" + e; x2.failed=true; }\n { data.append( \"N/A : \" + e ); x2.failed = true; }\n char c1;\n for (int j=0; j<readSize; j++)\n { \n c1 = (char)array[j];\n // if ( (c1=='\\n') | (c1=='\\r') ) { data = data + \" \"; }\n if ( ( c1 == '\\n' ) | (c1 == '\\r' ) ) { data.append( \" \" ); }\n else \n { \n if ( ( c1 < ' ' )|( c1 > 'z' ) ) { c1 = '_'; }\n // data = data + c1;\n data.append( c1 );\n }\n }\n x2.name2 = data.toString();\n x2.leaf = true;\n x1.setAllowsChildren( false ); // this entry is FILE\n }\n // End cycle for entries\n x2.handled = true;\n }\n // End cycle for recursion\n if (request==false) break;\n }\n }", "public static void graphTree(CommonTree tree){\n\t\tDOTTreeGenerator gen = new DOTTreeGenerator(); \n\t\tStringTemplate st = gen.toDOT(tree); \n\n\t\tString type = \"jpg\";\n\t\tGraphViz gv = new GraphViz();\n\t\tgv.addln(st.toString());\n\n\t\tSystem.out.println(\"Before\");\n\n\t\tImageIcon img = new ImageIcon(gv.getGraph(gv.getDotSource(), type));\n\n\t\tSystem.out.println(\"After\");\n\n\t\tint newHeight = 775, newWidth = 1255; \n\t\t/* This is for writing the image to disk*/\n\t\tFile out = new File(\"graph.\" + type); // Linux\n\t\tgv.writeGraphToFile( gv.getGraph( gv.getDotSource(), type ), out );\n\t\t//\t\tif (iw > newWidth){\n\t\t//\t\t\tnewHeight = newWidth * ih/iw ;\n\t\t//\t\t\tBufferedImage resizedImg = new BufferedImage(newWidth, newHeight, BufferedImage.TYPE_INT_RGB);\n\t\t//\t\t\tGraphics2D g2 = resizedImg.createGraphics();\n\t\t//\t\t\t\n\t\t//\t\t\tg2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n\t\t//\t\t\tg2.drawImage(img.getImage(), 0, 0, newWidth, newHeight, null);\n\t\t//\t\t\tg2.dispose();\n\t\t//\t\t\timg = new ImageIcon(resizedImg);\n\t\t//\t\t}\n\n\t\tJFrame jf = new JFrame(\"Abstract Syntax Tree\");\n\t\tjf.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n\t\tJLabel photographLabel = new JLabel();\n\t\tphotographLabel.setHorizontalAlignment(JLabel.CENTER);\n\t\t//private Image getScaledImage(Image srcImg, int w, int h){\n\n\n\t\tphotographLabel.setIcon(img);\n\t\tJScrollPane scrollPane = new JScrollPane(photographLabel);\n\t\tjf.add(scrollPane, BorderLayout.CENTER);\n\t\tjf.pack();\n\t\tjf.setSize(newWidth+50, newHeight+50);\n\t\tjf.setResizable(true);\n\t\tjf.setVisible(true);\n\t\t/*end graphical display*/\n\t}", "private Node constructParsedTree(Node[] nodes) {\n int rootIndex = 0;\n for (int i = 0; i < nodes.length; i++) {\n if (nodes[i].getFather() > 0)\n nodes[nodes[i].getFather() - 1].addChild(nodes[i]);\n else\n rootIndex = i;\n }\n return nodes[rootIndex];\n }", "public static List<LevelInformation> fromReader(Reader reader) {\r\n List<LevelInformation> levels = new ArrayList<LevelInformation>();\r\n SingleLevel level = null;\r\n LineNumberReader lineNumberReader = new LineNumberReader(reader);\r\n int counter = 0;\r\n String singleLine;\r\n int numOfLine;\r\n boolean isInBlockSection = false;\r\n blocksFromSymbolsFactory = null;\r\n try {\r\n while ((singleLine = lineNumberReader.readLine()) != null) {\r\n numOfLine = lineNumberReader.getLineNumber();\r\n singleLine = singleLine.trim();\r\n if (!singleLine.equals(\"\") && !singleLine.startsWith(\"#\")) {\r\n if (!isInBlockSection) {\r\n if (singleLine.equals(\"START_LEVEL\")) {\r\n level = new SingleLevel();\r\n } else if (singleLine.equals(\"END_LEVEL\")) {\r\n if (!level.checkLevelValues()) {\r\n System.out.println(\"Missing information about the check the text file\");\r\n System.exit(0);\r\n }\r\n levels.add(level);\r\n level = null;\r\n } else if (singleLine.equals(\"START_BLOCKS\")) {\r\n isInBlockSection = true;\r\n counter = 0;\r\n } else {\r\n parseRegularLine(singleLine, numOfLine, level);\r\n }\r\n } else if (singleLine.equals(\"END_BLOCKS\")) {\r\n isInBlockSection = false;\r\n blocksFromSymbolsFactory = null;\r\n } else {\r\n parseBlockSectionLine(singleLine, numOfLine, counter, level);\r\n counter++;\r\n }\r\n }\r\n }\r\n } catch (IOException e) {\r\n System.out.println(\"Can't read Level specification file\");\r\n System.exit(0);\r\n } finally {\r\n if (lineNumberReader != null) {\r\n try {\r\n lineNumberReader.close();\r\n } catch (IOException e) {\r\n System.out.println(\"Can't close Level specification file\");\r\n System.exit(0);\r\n }\r\n }\r\n }\r\n return levels;\r\n }", "@Test\n\tpublic void testTreeloading() throws IOException{\n\t\tFile pFile = getResource(\"PTHR10000.arbre\");\n\t\tPANTHERTree ptree = new PANTHERTree(pFile);\n\t\t\n//\t\t// Trivial\n//\t\tOWLShuntGraph g = ptree.getOWLShuntGraph();\n//\t\tassertNotNull(g);\n\n\t\tSet<String> aSet = ptree.associatedIdentifierSet();\n\t\t\t\n\t\tassertTrue(\"Contains A\", aSet.contains(\"TAIR:At1g18640\"));\n\t\tassertTrue(\"Contains B\", aSet.contains(\"ENTREZ:3405244\"));\n\t\tassertTrue(\"Contains C\", aSet.contains(\"UniProtKB:Q4Q8D0\"));\n\t\tassertTrue(\"Contains D\", aSet.contains(\"NCBI:XP_001671160\"));\n\t\tassertTrue(\"Contains E\", aSet.contains(\"ZFIN:ZDB-GENE-050809-127\"));\n\t\tassertTrue(\"Contains F\", aSet.contains(\"ENSEMBL:AGAP012247\"));\n\t\tassertFalse(\"Does not contain A\", aSet.contains(\"TAIR:locus:2033535\"));\n\t\tassertFalse(\"Does not contain B\", aSet.contains(\"TAIR=locus=2043535\"));\n\t\tassertFalse(\"Does not contain C\", aSet.contains(\"ZFIN=ZDB-GENE-050809-127\"));\n\t\tassertFalse(\"Does not contain D\", aSet.contains(\"\"));\n\t\tassertFalse(\"Does not contain E\", aSet.contains(\"AN7\"));\n\t\tassertFalse(\"Does not contain F\", aSet.contains(\":\"));\n\t\tassertFalse(\"Does not contain G\", aSet.contains(\"GO:0022008\"));\n\t\t\n\t\t// DEBUG: Okay, now let's look at the generated graph a little.\n\t\t//OWLShuntGraph sg = ptree.getOWLShuntGraph();\n\t\t//String sg_json = sg.toJSON();\n\t\t//LOG.info(sg_json.toString());\n\t}", "public static void buildShapesFromFile(String fileName, Shape [] cArray, Shape [] sArray , Shape [] rArray , Shape [] pArray, Shape [] tArray) {\n\r\n\t String path = System.getProperty(\"user.dir\");\r\n\t Shape sp = null; //buffer shape used to append into arrays from file\r\n\t String s; //holds line in file\r\n\r\n\t //try (BufferedReader br = new BufferedReader(new FileReader(\"./Root/\" + fileName))) { // code board\r\n\t // if you run locally on your environment use: new FileReader(path + \"/src/\" + fileName)\r\n\t \r\n\t try (BufferedReader br = new BufferedReader(new FileReader(path + \"/src/package1/\" + fileName))) {\r\n\t \t \r\n int circleIndex = 0;//Stores current available array index & used to count successful shapes created\r\n int squareIndex = 0;\r\n int rectangleIndex = 0;\r\n int parallelogramIndex = 0;\r\n int triangleIndex = 0;\r\n int badLine = 0;\r\n int badShape = 0;\r\n \r\n\t while ((s = br.readLine()) != null) {\r\n\t \t //System.out.println(s); //prints file contents for testing\r\n\t String[] tok = s.split(\",\"); //Split string \"s\" into tok string array using \",\" as delimiter\r\n\t \r\n\t // Second tryblock used to prevent entire method from terminating upon a single invalid line\r\n\t // Could replace second tryblock by catching exceptions within shape constructor instead, but wanted specify practice\r\n\t try{ \r\n\t\t switch(tok[0]){\r\n\t\t \r\n\t\t case \"Circle\": \r\n\t\t sp = new Circle( Double.parseDouble(tok[1]) ); //create shape\r\n\t\t cArray[circleIndex]= sp; //append shape to respective array\r\n\t\t System.out.println(cArray[circleIndex]); //print recently appended shape\r\n\t\t circleIndex++; //increment index \r\n\t\t break;\r\n\t\t \r\n\t\t case \"Square\": \r\n\t\t sp = new Square( Double.parseDouble(tok[1]) ); //create shape\r\n\t\t sArray[squareIndex]= sp; //append shape to respective array\r\n\t\t System.out.println(sArray[squareIndex]); //print recently appended shape\r\n\t\t squareIndex++; //increment index \r\n\t\t break;\r\n\t\t \r\n\t\t case \"Rectangle\": \r\n\t\t sp = new Rectangle( Double.parseDouble(tok[1]) , Double.parseDouble(tok[2]) ); //create shape\r\n\t\t rArray[rectangleIndex]= sp; //append shape to respective array\r\n\t\t System.out.println(rArray[rectangleIndex]); //print recently appended shape\r\n\t\t rectangleIndex++; //increment index \r\n\t\t break;\r\n\t\t \r\n\t\t case \"Parallelogram\":\r\n\t\t sp = new Parallelogram( Double.parseDouble(tok[1]) , Double.parseDouble(tok[2]) ); //create shape\r\n\t\t pArray[parallelogramIndex]= sp; //append shape to respective array\r\n\t\t System.out.println(pArray[parallelogramIndex]); //print recently appended shape\r\n\t\t parallelogramIndex++; //increment index \r\n\t\t break;\r\n\t\t \r\n\t\t case \"Triangle\":\r\n\t\t sp = new Triangle( Double.parseDouble(tok[1]) , Double.parseDouble(tok[2]), Double.parseDouble(tok[3]) ); //create shape\r\n\t\t tArray[triangleIndex]= sp; //append shape to respective array\r\n\t\t System.out.println(tArray[triangleIndex]); //print recently appended shape\r\n\t\t triangleIndex++; //increment index \r\n\t\t break;\r\n\t\t \r\n\t\t default: System.out.println(tok[0] + \" is not a valid shape\");\r\n\t\t \t \t\tbadShape++;\r\n\t\t break; \r\n\t\t }//End of Switch(tok[0])\r\n\t\t \r\n\t\t //prevent entire method from terminating by just reporting a bad line \r\n\t }catch(IllegalArgumentException e){\r\n\t \t badLine++;\r\n\t \t System.out.println(e.getMessage()); \r\n\t }\r\n\t \r\n\t }//While there are lines still being read \r\n\t \r\n\t System.out.println(\"Number of Circle's Created: \" + circleIndex);\r\n\t System.out.println(\"Number of Square's Created: \" + squareIndex);\r\n\t System.out.println(\"Number of Retangle's Created: \" + rectangleIndex);\r\n\t System.out.println(\"Number of Parallelogram's Created: \" + parallelogramIndex);\r\n\t System.out.println(\"Number of Triangle's Created: \" + triangleIndex);\r\n\t System.out.println(\"Number of Incorrect Arguments : \" + badLine);\r\n\t System.out.println(\"Number of Incorrect Shapes : \" + badShape);\r\n\t \r\n\t //catch exceptions related to BufferedReader and FileReader\r\n\t } catch (IOException e) {\r\n\t System.out.println(e.getMessage());\r\n\t }\r\n\r\n\t //void return\r\n\t}", "void readNutrients(String filename) throws FileNotFoundException {\n\t\t//reads the file, computes the number of unique nutrient objects\n\t\t//uses StringBuilder to append the unique Nutrient_Code\n\t\tScanner input=new Scanner(new File(filename));\n\t\tint numOfRow=0;\n\t\tStringBuilder uniqueNutrient=new StringBuilder();\n\t\twhile(input.hasNextLine()) {\n\t\t\tString row0=input.nextLine();\n\t\t\tString[] split0=row0.split(((char)34+\",\"+(char)34));\n\t\t\tif(!uniqueNutrient.toString().contains(split0[1]+\",\")) {\n\t\t\t\tuniqueNutrient=uniqueNutrient.append(split0[1]+\",\");\n\t\t\t\tnumOfRow++;\n\t\t\t}\n\t\t}\n\t\t//load the products array one by one, using constructor\n\t\t//keep only the unique nutrient objects\n\t\tnutrients=new Nutrient[numOfRow-1];\n\t\tScanner input2=new Scanner(new File(filename));\n\t\tinput2.nextLine();\n\t\tint i=0;\n\t\tStringBuilder uniqueNutrien2=new StringBuilder();\n\t\twhile(input2.hasNextLine()) {\n\t\t\tString row=input2.nextLine();\n\t\t\tString[] split1=row.split(((char)34+\",\"+(char)34));\n\t\t\tif(!uniqueNutrien2.toString().contains(split1[1]+\",\")) {\n\t\t\t\tuniqueNutrien2.append(split1[1]+\",\");\n\t\t\t\tnutrients[i++]=new Nutrient(split1[1], split1[2], split1[5]);\n\t\t\t}\n\t\t}\n\n\t\t//reads the file, computes the number of unique productNutrient objects\n\t\tScanner input3 =new Scanner(new File(filename));\n\t\tinput3.nextLine();\n\t\tint numOfRowProductNutrient=0;\n\t\twhile(input3.hasNextLine()) {\n\t\t\tnumOfRowProductNutrient++;\n\t\t\tinput3.nextLine();\n\t\t}\n\t\t//load the products array one by one, using constructor\n\t\tproductNutrients=new ProductNutrient[numOfRowProductNutrient];\n\t\tScanner input4=new Scanner(new File(filename));\n\t\tinput4.nextLine();\n\t\tint i2=0;\n\t\twhile(input4.hasNextLine()) {\n\t\t\tString row=input4.nextLine();\n\t\t\tString[] split1=row.split(((char)34+\",\"+(char)34));\n\t\t\tproductNutrients [i2++]=new ProductNutrient(split1[0].substring\n\t\t\t\t\t(1, split1[0].length()), split1[1], split1[2], \n\t\t\t\t\tFloat.parseFloat(split1[4]),split1[5].substring(0, split1[5].length()-1));\n\t\t}\n\t\t//close the input\n\t\tinput.close();\n\t\tinput2.close();\n\t\tinput3.close();\n\t\tinput4.close();\n\t}", "@Override\n public List<GraphNode> getNodes() {\n List<String> namesOfFiles = ProjectFileNamesUtil.getFileNamesFromProject(project.getBaseDir());\n this.relations = RelationsService.getRelations(project, namesOfFiles);\n List<GraphNode> nodes = new ArrayList<>();\n nodeHashTable = new Hashtable();\n nodeHashTable.clear();\n resultsOfRanTests = HashtableResultsUtil.copyHashtableTestResults(TestResultsCollector.getInstance().getTestResults());\n int i = 0;\n for (String nameOfFile : namesOfFiles){ //for each name of file\n String[] str = nameOfFile.split(\"/\");\n String file = str[str.length-1];\n Hashtable fileTestResults = (Hashtable) resultsOfRanTests.get(file.replace(\".py\",\"\"));\n if (nodeHashTable.get(file)!=null){ //a node with this name already exists\n file=file.concat(\" (\" + i++ + \")\");\n }\n CoverageNode node = new CoverageNode(file,nameOfFile);\n node.setCoverage(GetOnlyCoveragedFileNames.getCovForFile(file,project)); //get coverage\n node.getTypes().add(\"Coverage is: \" + node.getCoverage() + \"%.\");\n node.setColor(node.getCoverage()/10);\n if (fileTestResults != null) { //check for test changes in node\n node.setOutColorNumber(getNodeOutColor(fileTestResults));\n }\n HashMap<String, Object> properties = new HashMap<>();\n getPropertiesForNodes(properties, nameOfFile);\n ResultsPropertyContainer resultsPropertyContainer = new ResultsPropertyContainer(properties);\n node.setResultsPropertyContainer(resultsPropertyContainer);\n nodeHashTable.put(file, node);\n nodes.add(node);\n }\n if (HashtableResultsUtil.getInstance().getOnlyCoveraged()) { //this runs if we want only coveraged nodes\n nodes = doCleaning(nodes);\n }\n HashtableResultsUtil.getInstance().setNodes(nodes);\n return nodes;\n }", "public static List<File> splitData(String treeFileName, int foldSize) {\n ArrayList<File> tempFilePaths = new ArrayList<File>();\n Random random = new Random(100);\n for (int i = 0; i < foldSize+1; i++) {\n tempFilePaths.add(new File(String.valueOf(random.nextInt())));\n }\n URL treeResource = CommonUtils.class.getClassLoader().getResource(treeFileName);\n if (treeResource == null) {\n logger.error(\"Make sure the file is in the classpath of the project: \" + treeFileName);\n return null;\n }\n\n URL trainResource = null;\n\n File treeFile = new File(treeResource.getPath());\n ArrayList<String> tempAttributeList = new ArrayList<String>();\n try {\n FileReader treeFileInputStream = new FileReader(treeFile);\n BufferedReader bufferedReader = new BufferedReader(treeFileInputStream);\n String line = null;\n String line1 = null;\n int count = 0;\n try {\n while ((line = bufferedReader.readLine()) != null) {\n if (count == 0) {\n trainResource = CommonUtils.class.getClassLoader().getResource(line);\n if (trainResource == null) {\n logger.error(\"Make sure the file is in the classpath of the project: \" + line);\n return null;\n }\n FileReader fileReader = new FileReader(new File(trainResource.getPath()));\n BufferedReader bufferedReader1 = new BufferedReader(fileReader);\n int count1 = 0;\n while ((line1 = bufferedReader1.readLine()) != null) {\n if (count1 == 0) {\n BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(tempFilePaths.get(0)));\n bufferedWriter.write(line1);\n bufferedWriter.write(\"\\n\");\n bufferedWriter.flush();\n bufferedWriter.close();\n }else {\n tempAttributeList.add(line1);\n }\n count1++;\n }\n }\n count++;\n logger.info(line);\n }\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n }\n\n\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n }\n\n // now we randomly write data\n int fileIndex = 1;\n while(tempAttributeList.size()!=0) {\n int index0 = new Random(100).nextInt();\n if(index0<0){\n index0 = index0 * -1;\n }\n String s = tempAttributeList.get(index0 % tempAttributeList.size());\n\n try {\n BufferedWriter bufferedWriter1 = new BufferedWriter(new FileWriter(tempFilePaths.get(fileIndex),true));\n bufferedWriter1.write(s);\n bufferedWriter1.write(\"\\n\");\n bufferedWriter1.flush();\n bufferedWriter1.close();\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n }\n tempAttributeList.remove(s);\n if(fileIndex==foldSize){\n fileIndex=1;\n }else{\n fileIndex++;\n }\n }\n return tempFilePaths;\n }", "public void readFile(String name)\n\t{\n\t\tFileInputStream fis = null;\n\t\tObjectInputStream in = null;\n\t\ttry\n\t\t{\n\t\t\tfis = new FileInputStream(name);\n\t\t\tin = new ObjectInputStream(fis);\n\t\t\t// ind = (WebIndexer)in.readObject();\n\t\t\tTree xcd = (Tree)in.readObject();\n\t\t\tind = new WebIndexer(xcd);\n\t\t\tin.close();\n\t\t}\n\t\tcatch(IOException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tcatch(ClassNotFoundException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\t\t\n\t}", "private static void readFile(String filePath) {\n\t\ttry {\n\t\t\tString [] data; // Array of strings that contains the different cells.\n\t\t\t\n\t\t\t// Open the file and read it.\n\t\t\tBufferedReader bufferedReader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\t// Read the next line;\n\t\t\tdata = bufferedReader.readLine().split(ONE_SPACE);\n\t\t\t\n\t\t\t// Number of photos.\n\t\t\tSystem.out.println(\">> Reading number of photos...\");\n\t\t\tnumberPhotos = Integer.parseInt(data[0]);\n\t\t\t\n\t\t\tSystem.out.println(\">> Reading photos info...\");\n\t\t\tSystem.out.println(\"\");\n\t\t\tfor (int i = 0; i < numberPhotos; i++) {\n\t\t\t\tdata = bufferedReader.readLine().split(ONE_SPACE);\n\t\t\t\t\n\t\t\t\tList<String> tagList = new ArrayList<String>();\n\t\t\t\t\n\t\t\t\tfor (int j = 2; j < data.length; j++) {\n\t\t\t\t\ttagList.add(data[j]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (data[0].toUpperCase().equals(\"V\")) {\n\t\t\t\t\tphotoList.add(new Photo(true, i, tagList));\n\t\t\t\t} else {\n\t\t\t\t\tslideList.add(new Slide(i, i, tagList));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Close the file.\n\t\t\tbufferedReader.close();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error while reading the input file: \" + e);\n\t\t}\n\t}", "private static void decode() throws IOException{\n File file = new File(_encodedBinFile);\n String longStringAsFile;\n \n //DataInputStream dis;\n FileWriter w;\n try {\n //dis = new DataInputStream(new FileInputStream(file));\n longStringAsFile = getLongStringAsFile();\n //dis.close();\n w = new FileWriter(\"decoded.txt\");\n Node traverser = root;\n for(int i=0; i < longStringAsFile.length(); i++){\n if(longStringAsFile.charAt(i) == '0'){\n //go to left\n if (traverser.getLeftPtr() == null){\n //fallen off the tree. Print to file\n if (i == longStringAsFile.length() - 1 ){\n w.write(((LeafNode)traverser).getData());\n }\n else{\n w.write(((LeafNode)traverser).getData() + \"\\n\");\n traverser = root.getLeftPtr();\n }\n }\n else{\n traverser = traverser.getLeftPtr();\n }\n }\n else{\n //go to right of tree\n if (traverser.getRightPtr() == null){\n //fallen off the tree. PRint to file\n if (i == longStringAsFile.length() - 1){\n w.write(((LeafNode)traverser).getData() );\n }\n else{\n w.write(((LeafNode)traverser).getData() + \"\\n\");\n traverser = root.getRightPtr();\n }\n\n }\n else{\n traverser = traverser.getRightPtr();\n }\n }\n \n }\n //dis.close();\n w.close();\n } catch (IOException ex) {\n Logger.getLogger(decoder.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }" ]
[ "0.6033693", "0.594472", "0.5891924", "0.5855218", "0.58388555", "0.58180726", "0.5788774", "0.57561356", "0.57490444", "0.5649293", "0.5613857", "0.56", "0.5598977", "0.5593229", "0.5583022", "0.5577092", "0.5570659", "0.5557265", "0.5541208", "0.55390257", "0.5492079", "0.54919153", "0.54749936", "0.5472009", "0.54368365", "0.54029286", "0.5401993", "0.5397581", "0.53583795", "0.5357196", "0.53541994", "0.5353772", "0.53361994", "0.5326389", "0.5305122", "0.5293538", "0.52845514", "0.52790856", "0.52748024", "0.5263472", "0.526123", "0.5260408", "0.52109414", "0.5207225", "0.5203853", "0.51972586", "0.5194327", "0.51824135", "0.51751447", "0.5157595", "0.5150125", "0.51483035", "0.5136129", "0.51357937", "0.5127806", "0.51154214", "0.51093185", "0.510399", "0.5102183", "0.5086484", "0.5084652", "0.50737643", "0.5061411", "0.5055396", "0.504898", "0.50480676", "0.50311404", "0.5024896", "0.50190836", "0.50167006", "0.5015747", "0.5009933", "0.4999068", "0.49794286", "0.49760044", "0.49671575", "0.49626434", "0.4959654", "0.49593416", "0.4957769", "0.49567413", "0.49345347", "0.49343196", "0.4925461", "0.49178076", "0.49107063", "0.49014822", "0.49008906", "0.48983753", "0.48952594", "0.4894719", "0.48924837", "0.489219", "0.48886633", "0.4888551", "0.48873156", "0.48841113", "0.48826316", "0.48820677", "0.48738015" ]
0.6646959
0
finds the smallest index in a string 'string' after i, which contains a character from a string 'characters', if does not contains any, returns string.length
public static int nextIndexOf(String string, String characters, int index) { int retInd = string.length(); int auxIndex = -1; for (int i = 0; i < characters.length(); i++) { auxIndex = string.substring(index + 1).indexOf(characters.charAt(i)); if ((auxIndex > -1) && (auxIndex + index + 1 < retInd)) { retInd = auxIndex + index + 1; } } return retInd; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int solution(String s) {\n if (s == null || s.length() == 0) {\n return 0;\n }\n if (s.length() == 1) {\n return 1;\n }\n int result = 0;\n int index = 0;\n Map<Character, Integer> map = new HashMap<Character, Integer>();\n while (index < s.length()) {\n char temp = s.charAt(index);\n if (!map.containsKey(temp)) {\n map.put(temp, index);\n index++;\n } else {\n int start = map.get(temp);\n index = start + 1;\n if (map.size() > result) {\n result = map.size();\n }\n map.clear();\n }\n }\n if (map.size() > result) {\n result = map.size();\n }\n return result;\n }", "static int maxCharacter(String string) {\n\t\tchar[] ch = string.toCharArray();\n\t\t// create a hashmap for lookup using the char as a key\n\t\tMap<Character, int[]> map = new HashMap<Character, int[]>();\n\t\t// loop through string\n\t\tfor (int i = 0; i < ch.length; i++) {\n\t\t\t// if the character is already in the map increase occurrence value\n\t\t\tif (map.containsKey(ch[i])) {\n\t\t\t\t// get value array\n\t\t\t\t// increase occurrence\n\t\t\t\t// set new value\n\t\t\t\tint[] curArr = map.get(ch[i]);\n\t\t\t\tcurArr[1] = curArr[1] + 1;\n\t\t\t\tmap.put(ch[i], curArr);\n\t\t\t\t// if the character isn't in map, make a new entry\n\t\t\t} else {\n\t\t\t\t// create an array { index, occurrence vale}\n\t\t\t\tint[] newArr = { i, 1 };\n\t\t\t\tmap.put(ch[i], newArr);\n\t\t\t}\n\t\t}\n\t\tint max = 0;\n\t\tint index = 0;\n\t\t// loop through entries\n\t\tfor (Map.Entry<Character, int[]> e : map.entrySet()) {\n\t\t\t// find the largest occurrence value\n\t\t\tint[] maxArr = e.getValue();\n\t\t\tif (maxArr[1] > max) {\n\t\t\t\tmax = maxArr[1];\n\t\t\t\tindex = maxArr[0];\n\t\t\t}\n\t\t}\n\t\t// return the index of the first found character\n\t\treturn index;\n\t}", "private static int firstUniqChar3(String s) {\n if (s == null || s.isEmpty()) {\n return -1;\n }\n\n int idx = Integer.MAX_VALUE;\n for (char c = 'a'; c <= 'z'; c++) {\n int first = s.indexOf(c);\n int last = s.lastIndexOf(c);\n\n if (first != -1 && first == last) {\n idx = Math.min(idx, first);\n }\n }\n\n return idx == Integer.MAX_VALUE ? -1 : idx;\n }", "public int firstUniqChar(String s) {\r\n int res = s.length();\r\n for (char c = 'a'; c <= 'z'; c++) {\r\n int index = s.indexOf(c);\r\n if (index != -1 && index == s.lastIndexOf(c)) res = Math.min(res, index);\r\n }\r\n\r\n return res == s.length() ? -1 : res;\r\n }", "public int lengthOfLongestSubstring(String s) {\n // Sanitization\n // Create a hashmap to save the character and the index\n // fast pointer - Move until it didn't find the duplicate\n // slow pointer - If the fast pointer pointed the duplicate, get that index and\n // place it next to it.\n\n if (s == null || s.length() == 0)\n return 0;\n int slowPointer = 0;\n int fastPointer = 0;\n int result = 0;\n HashMap<Character, Integer> map = new HashMap();\n while (fastPointer < s.length()) {\n char currentChar = s.charAt(fastPointer);\n if (map.containsKey(currentChar)) {\n int currentIndedx = map.get(currentChar);\n if (slowPointer <= currentIndedx) {\n slowPointer = currentIndedx + 1;\n }\n }\n int difference = fastPointer - slowPointer;\n result = Math.max(result, difference + 1);\n map.put(currentChar, fastPointer);\n fastPointer++;\n }\n return result;\n }", "public static int lengthOfLongestSubstring(String s) {\n\t\tchar[] chars = s.toCharArray();\n\t\tint x = 0;\n\t\tint head = 0;\n\t\tHashMap<Character, Integer> map = new HashMap<Character, Integer>();\n\t\tfor (int i = 0; i < chars.length; i++) {\n\t\t\tif (!map.containsKey(chars[i])) {\n\t\t\t\tmap.put(chars[i], i);\n\t\t\t\tif (map.size() > x) {\n\t\t\t\t\tx = map.size();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (map.size() > x) {\n\t\t\t\t\tx = map.size();\n\t\t\t\t}\n\t\t\t\tint temp = map.get(chars[i]);\n\n\t\t\t\tfor (int j = head; j <= temp; j++) {\n\t\t\t\t\tmap.remove(chars[j]);\n\t\t\t\t}\n\t\t\t\thead = temp + 1;\n\t\t\t\tmap.put(chars[i], i);\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}", "public int firstUniqChar(String s) {\n Map<String, Integer> occurMap = new LinkedHashMap<>();\n for (int i = 0; i < s.length(); i++) {\n String si = s.substring(i, i + 1);\n if (occurMap.containsKey(si)) {\n if (occurMap.get(si) > -1) {\n occurMap.put(si, -1);\n }\n } else {\n occurMap.put(si, i);\n }\n }\n for (Integer idx : occurMap.values()) {\n if (idx > -1) {\n return idx;\n }\n }\n return -1;\n }", "public int lengthOfLongestSubstring(String s) {\n int len = s.length();\n HashMap map = new HashMap();\n int i = 0;\n for(; i<len; i++) {\n char c = s.charAt(i);\n // System.out.println(c);\n if (map.containsKey(c)) {\n return Math.max(i, lengthOfLongestSubstring(s.substring((int)map.get(c)+1, len)));\n }\n else {\n map.put(c, i);\n }\n }\n return i;\n }", "public int getCharaterPositionWithName(String s){\n int i;\n for(i = 0; i<alCharacter.size(); i++){\n String nameNextChar = alCharacter.get(i).getName();\n if(s.equals(nameNextChar)){\n break;\n }\n }\n return i;\n }", "public int minCut(String s) {\n boolean[][] isPal = new boolean[s.length()][s.length()];\n for (int r = 0; r < s.length(); r++) {\n for (int l = 0; l <= r; l++) {\n isPal[l][r] = s.charAt(l) == s.charAt(r) && (l + 1 > r - 1 || isPal[l + 1][r - 1]);\n }\n }\n\n int[] dp = new int[s.length() + 1];\n Arrays.fill(dp, Integer.MAX_VALUE);\n // base case. s.substring(0, 0); empty string. means this cut is\n // invalid/unnecessary.\n dp[0] = -1;\n // base case. s.substring(0, 1); the first character\n dp[1] = 0;\n\n for (int r = 1; r < s.length(); r++) {\n for (int l = 0; l <= r; l++) {\n if (isPal[l][r]) {\n dp[r + 1] = Math.min(dp[r + 1], 1 + dp[l]);\n }\n }\n }\n\n return dp[s.length()];\n }", "private int findFirstNotWhitespace(char[] characters) \n\t{\n\t\t//find starting position of token\n\t\tfor(int i=0; i<characters.length; i++)\n\t\t{\n\t\t\t//check if character is not whitespace.\n\t\t\tif(!Character.isWhitespace( characters[i]))\n\t\t\t{\n\t\t\t\t//non-whitespace found, return position \n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\t//no non-whitespace in char[].\n\t\treturn -1;\n\t}", "private static int solution4(String s) {\r\n int n = s.length(), ans = 0;\r\n Map<Character, Integer> map = new HashMap<>();\r\n for (int j = 0, i = 0; j < n; j++) {\r\n if (map.containsKey(s.charAt(j)))\r\n i = Math.max(map.get(s.charAt(j)), i);\r\n ans = Math.max(ans, j - i + 1);\r\n map.put(s.charAt(j), j + 1);\r\n }\r\n return ans;\r\n }", "public int firstUniqChar2(String s) {\n char[] chars = s.toCharArray();\n \n for (int i = 0; i < chars.length; i++) {\n char c = chars[i];\n if (s.indexOf(c) == s.lastIndexOf(c)) return i;\n }\n \n return -1;\n }", "public int firstUniqChar(String s) {\n int n = s.length();\n int[] cnt = new int[26];\n int[] index = new int[26];\n Arrays.fill(index, n+1);\n \n // Keep the index \n for(int i=0; i<n; i++){\n cnt[s.charAt(i) - 'a']++;\n index[s.charAt(i) - 'a'] = i;\n }\n \n int minIndex = n+1;\n for(int i=0; i<26; ++i){\n if(cnt[i] > 1)\n continue;\n minIndex = Math.min(minIndex, index[i]);\n }\n return minIndex == n+1 ? -1 : minIndex;\n }", "static int computeTheLongestSubstringWithMatchingParens(String string) {\n Deque<Integer> stack = new ArrayDeque<>();\n\n int length = 0;\n int endIndex = -1;\n\n for (int i = 0; i < string.length(); i++) {\n if (string.charAt(i) == '(') stack.push(i);\n else {\n if (stack.isEmpty()) {\n endIndex = i;\n } else {\n stack.pop();\n\n int start = stack.isEmpty() ? endIndex : stack.peek();\n length = Math.max(length, i - start);\n }\n }\n }\n\n return length;\n }", "public static int lengthOfLongestSubstring(String s) {\n\t int i = 0, j = 0, max = 0;\n\t Set<Character> set = new HashSet<>();\n\t while (j < s.length()) {\n\t \tSystem.out.println(j);\n\t \tSystem.out.println(set);\n\t \t// if set doesnot contain a character in string - add it to set\n\t if (!set.contains(s.charAt(j))) {\n\t set.add(s.charAt(j));\n\t j++;\n\t max = Math.max(max, set.size());\n\t } else {\n\t set.remove(s.charAt(i++));\n\t }\n\t }\n\t \n\t return max;\n\t}", "public int lengthOfLongestSubstring(String s) {\n int i = 0, j = 0, max = 0;\n Set<Character> set = new HashSet<>();\n \n while (j < s.length()) {\n if (!set.contains(s.charAt(j))) {\n set.add(s.charAt(j++));\n max = Math.max(max, set.size());\n } else {\n set.remove(s.charAt(i++));\n }\n }\n \n return max;\n}", "public static int firstUniqChar(String s) {\n Map<Character, Integer> map = new HashMap<>();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (map.containsKey(c)) {\n map.put(c, map.get(c) + 1);\n } else {\n map.put(c, 1);\n }\n }\n\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (map.get(c) == 1) {\n return i;\n }\n }\n return -1;\n\n }", "public int firstUniqChar2(String s) {\r\n \r\n char[] arr= s.toCharArray();\r\n int index = -1;\r\n HashMap<Character, Integer> map = new HashMap<>();\r\n \r\n for (int i=0;i<arr.length;i++){\r\n if (map.containsKey(arr[i])){\r\n map.put(arr[i], -1);\r\n } else {\r\n map.put(arr[i],i);\r\n }\r\n }\r\n \r\n for (int i : map.values()){\r\n if (i >-1){\r\n if (index == -1){\r\n index = i;\r\n } else if (i<index) {\r\n index = i; \r\n }\r\n \r\n }\r\n }\r\n \r\n return index;\r\n }", "public int lengthOfLongestSubstring(String s) {\n\n int res = 0;\n int len = s.length();\n int i = 0, j = 0;\n Set<Character> set = new HashSet<>();\n while (i < len && j < len) {\n if (!set.contains(s.charAt(j))) {\n set.add(s.charAt(j++)); // here s.set an ele then j already plus\n res = Math.max(res, j - i); // so use j-i\n } else {\n set.remove(s.charAt(i++));\n }\n }\n\n return res;\n }", "public int findSubstringInWraproundString(String p) {\n if(p == null || p.length() == 0) {\n return 0;\n }\n // count[i] is the maximum unique substring that ends with a...z\n int[] count = new int[26];\n // keep track of the number of consecutive letters ended with current letter\n int consecutiveCount = 1;\n for(int i = 0; i < p.length(); i++) {\n if(i > 0 && isConsecutive(p.charAt(i - 1), p.charAt(i))) {\n consecutiveCount++;\n } else {\n consecutiveCount = 1;\n }\n int index = p.charAt(i) - 'a';\n count[index] = Math.max(count[index], consecutiveCount);\n }\n int result = 0;\n for(int singleCount : count) {\n result += singleCount;\n }\n return result;\n }", "public int lengthOfLongestSubstring(String s) {\n HashMap<Character, Integer> charsVisit = new HashMap();\n int result = 0;\n int longest = 0;\n\n for (int i = 0; i < s.length(); i++) {\n\n if (charsVisit.containsKey(s.charAt(i))) {\n\n /* Start at repeat character to see if that is where the longest substring starts */\n i = charsVisit.get(s.charAt(i));\n\n charsVisit.clear(); // Clear hash map.\n result = 0;\n\n } else {\n result++;\n\n /* KEY/VALUE = char/index */\n charsVisit.put(s.charAt(i), i);\n }\n\n if (longest < result)\n longest = result;\n }\n return longest;\n }", "public static int findLength(String str) {\n flushMap();\n if (str==null || str.isEmpty()) return -1;\n int x = 0;\n int count = 0;\n int maxCount = 0;\n while (x<str.length()) {\n char letter = str.charAt(x);\n if (!isRepeating(letter)) count++;\n else {\n flushMap();\n maxCount = Math.max(maxCount, count);\n x--;\n count = 0;\n }\n x++;\n }\n return Math.max(maxCount, count);\n }", "public int lengthOfLongestSubstring2(String s) {\n int n = s.length(), ans = 0;\n int[] index = new int[128]; // current index of character\n // try to extend the range [i, j]\n for (int j = 0, i = 0; j < n; j++) {\n i = Math.max(index[s.charAt(j)], i);\n ans = Math.max(ans, j - i + 1);\n index[s.charAt(j)] = j + 1;\n }\n return ans;\n }", "public int minCut4(String s) {\n boolean[][] dp = new boolean[s.length()][s.length()];\n for (int len = 1; len <= s.length(); len++) {\n for (int i = 0; i <= s.length() - len; i++) {\n int j = i + len - 1;\n dp[i][j] = s.charAt(i) == s.charAt(j) && (len < 3 || dp[i + 1][j - 1]);\n }\n }\n\n Map<Integer, Integer> memo = new HashMap<>();\n\n int[] res = new int[1];\n res[0] = Integer.MAX_VALUE;\n\n helper3(s, 0, res, 0, dp, memo);\n return res[0];\n }", "public static int firstUniqChar(String s) {\n\n HashMap<String, Integer> hm = new HashMap<>();\n\n for(int i = 0; i < s.length(); i++) {\n if(hm.containsKey(s.substring(i, i+1))) {\n hm.put(s.substring(i,i+1), hm.get(s.substring(i,i+1))+1);\n }\n else {\n hm.put(s.substring(i,i+1), 1);\n }\n }\n\n for(int i = 0; i< s.length(); i++) {\n if(hm.get(s.substring(i,i+1)) == 1) {\n return i;\n }\n }\n //this means all the string is repeating\n return -1;\n }", "public static int lengthOfLongestSubstring(String s) {\n int[] dp=new int[256];\n for(int i=0;i<dp.length;i++){\n dp[i]=-1;\n }\n int start=0,result=0;\n for(int i=0;i<s.length();i++){\n start=Math.max(dp[s.charAt(i)]+1,start);\n dp[s.charAt(i)]=i;\n result=Math.max(result,i-start+1);\n }\n return result;\n }", "public int minCut3(String s) {\n boolean[][] dp = new boolean[s.length()][s.length()];\n for (int len = 1; len <= s.length(); len++) {\n for (int i = 0; i <= s.length() - len; i++) {\n int j = i + len - 1;\n dp[i][j] = s.charAt(i) == s.charAt(j) && (len < 3 || dp[i + 1][j - 1]);\n }\n }\n\n int[] memo = new int[s.length() + 1];\n Arrays.fill(memo, -1);\n\n int[] res = new int[1];\n res[0] = Integer.MAX_VALUE;\n\n helper3(s, 0, res, 0, dp, memo);\n return res[0];\n }", "public int lengthOfLongestSubstring(String s) {\n if(s == null || s.length() == 0){\n return 0;\n }\n int runner = 0;\n int walker = 0;\n int max = 0;\n HashSet<Character> set = new HashSet<Character>();\n while(runner < s.length()){\n if(set.contains(s.charAt(runner))){\n if(max < runner - walker){\n max = runner - walker;\n }\n while(s.charAt(walker) != s.charAt(runner)){\n set.remove(s.charAt(walker));\n walker++;\n }\n walker++;\n }else{\n set.add(s.charAt(runner));\n }\n runner++;\n }\n max = Math.max(max, runner - walker);\n return max;\n }", "public int lengthOfLongestSubstring(String s) {\n\t\tint n = s.length();\n\t\tint ans = 0;\n\t\tMap<Character, Integer> map = new HashMap<Character, Integer>();\n\t\tfor (int i = 0, j = 0; j < n; j++) {\n\t\t\tif (map.containsKey(s.charAt(j))) {\n\t\t\t\ti = Math.max(map.get(s.charAt(j)), i);\n\t\t\t}\n\t\t\tans = Math.max(ans, j - i + 1);\n\t\t\tmap.put(s.charAt(j), j + 1);\n\t\t}\n\t\treturn ans;\n\n\t}", "private static int solution3(String s) {\r\n int n = s.length();\r\n Set<Character> set = new HashSet<>();\r\n int ans = 0, i = 0, j = 0;\r\n while (i < n && j < n) {\r\n if (!set.contains(s.charAt(j))) {\r\n set.add(s.charAt(j++));\r\n ans = Math.max(ans, j - i);\r\n } else {\r\n set.remove(s.charAt(i++));\r\n }\r\n }\r\n return ans;\r\n }", "public int firstUniqChar(String s) {\n int[] isA=new int[128];\n \tfor(int i=0; i<s.length(); i++){\n \t\tisA[s.charAt(i)]++;\n \t}\n \t\n \tfor(int i=0; i<s.length(); i++){\n \t\tif(isA[s.charAt(i)]==1){\n \t\t\treturn i;\n \t\t}\n \t}\n \treturn -1;\n }", "public int minCut(String s) {\n boolean[][] b=table(s);\n int[] cut=new int[s.length()+1];\n cut[s.length()]=0;\n for(int i=s.length()-1;i>=0;i--){\n cut[i]=s.length()-i;\n for(int r=i;r<s.length();r++){\n if(b[i][r])\n cut[i]=Math.min(cut[r+1]+1,cut[i]);\n }\n }\n \n return cut[0]-1;\n }", "public static int lengthOfLongestSubstring(String s) \r\n {\r\n \tif (s.length()==0) \r\n \t\treturn 0;\r\n \t\r\n HashMap<Character, Integer> map = new HashMap<Character, Integer>();\r\n int length = 0;\r\n int start = 0;\r\n \r\n for (int end=0; end < s.length(); end++)\r\n {\r\n \t// When we have reached a repeated character, then the currently held string is potentially the largest string.\r\n \t// If the character is there in the map, start needs to be changed. \r\n \t// If it is not there, start remains the same so that it can increase the count\r\n if (map.containsKey(s.charAt(end)))\r\n {\r\n \t// Consider input as abba. For b[2], start < map.get(s.charAt(end)) + 1 \r\n \t// For b[3], start > map.get(s.charAt(end)) + 1. It means, if the character has occured towards the beginning, we dont want the start to be modified.\r\n \tstart = Math.max(start, map.get(s.charAt(end)) + 1);\r\n } \r\n \r\n map.put(s.charAt(end), end);\r\n \r\n // Why +1? Lets say start=2, end=5. Then the length will be 5-2=3. And, 3+1 = 4.\r\n length = Math.max(length, end-start+1);\r\n \r\n }\r\n return length;\r\n }", "public int find(String string) {\n\t\tif (string==null) {\n\t\t\treturn -1;\n\t\t}\n\t\tfor (int i=0;i!=m_stringOffsets.length;++i) {\n\t\t\tint offset=m_stringOffsets[i];\n\t\t\tint length=getShort(m_strings,offset);\n\t\t\tif (length!=string.length()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tint j=0;\n\t\t\tfor (;j!=length;++j) {\n\t\t\t\toffset+=2;\n\t\t\t\tif (string.charAt(j)!=getShort(m_strings,offset)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (j==length) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public static int solutionRef(String s) {\n int start = 0;\n int end = 0;\n int result = 0;\n Set<Character> set = new HashSet<Character>();\n while (start < s.length() && end < s.length()) {\n if (!set.contains(s.charAt(end))) {\n set.add(s.charAt(end));\n end++;\n result = Math.max(result, end - start);\n } else {\n set.remove(s.charAt(start));\n start++;\n }\n }\n return result;\n }", "public static int lengthOfLongestSubstring(String s) {\n if(s.length()==1)\n return 1;\n\n int sum=0;\n int left = 0, right = 0;\n boolean[] used = new boolean[128];\n\n while(right < s.length()){\n if(used[s.charAt(right)] == false){\n used[s.charAt(right)] = true;\n right++;\n }else{\n sum = Math.max(sum, right-left);\n while(left<right && s.charAt(right) != s.charAt(left)){\n used[s.charAt(left)] = false;\n left++;\n }\n left++;\n right++;\n }\n }\n sum = Math.max(sum, right - left);\n\n return sum;\n }", "public int minCut1(String s) {\n boolean[][] dp = new boolean[s.length()][s.length()];\n for (int len = 1; len <= s.length(); len++) {\n for (int i = 0; i <= s.length() - len; i++) {\n int j = i + len - 1;\n dp[i][j] = s.charAt(i) == s.charAt(j) && (len < 3 || dp[i + 1][j - 1]);\n }\n }\n\n int[] cut = new int[1];\n cut[0] = Integer.MAX_VALUE;\n List<List<String>> res = new ArrayList<>();\n helper1(s, 0, cut, dp, res, new ArrayList<>());\n // System.out.format(\"res: %s\\n\", res);\n return cut[0];\n }", "static int charOccurrenceCount(String s, char c, int startIndex) {\n\t\tif(startIndex == s.length()) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\tif(s.charAt(startIndex) == c) {\n\t\t\t\treturn 1 + charOccurrenceCount(s, c, startIndex + 1);\n\t\t\t} else {\n\t\t\t\treturn charOccurrenceCount(s, c, startIndex + 1);\n\t\t\t}\n\t\t}\n\t}", "public int lengthOfLongestSubstring1(String s) {\n\t\tint i = 0, j = 0, max = 0;\n\t\tSet<Character> set = new HashSet<>();\n\n\t\twhile (j < s.length()) {\n\t\t\tif (!set.contains(s.charAt(j))) {\n\t\t\t\tset.add(s.charAt(j++));\n\t\t\t\tmax = Math.max(max, set.size());\n\t\t\t} else {\n\t\t\t\tset.remove(s.charAt(i++));\n\t\t\t}\n\t\t}\n\n\t\treturn max;\n\t}", "public int lengthOfLongestSubstring(String s) {\r\n\r\n int answer = 0;\r\n int index = 0;\r\n while (index < s.length()) {\r\n String tmp = \"\";\r\n for (int i = index; i < s.length(); i++) {\r\n if (tmp.contains(String.valueOf(s.charAt(i)))) {\r\n break;\r\n } else {\r\n tmp += String.valueOf(s.charAt(i));\r\n }\r\n }\r\n if (tmp.length() > answer) {\r\n answer = tmp.length();\r\n }\r\n index++;\r\n }\r\n\r\n return answer;\r\n }", "public int lengthOfLongestSubstring(String s) {\n int[] chars = new int[128];\n\n int left = 0;\n int right = 0;\n\n int res = 0;\n while (right < s.length()) {\n char r = s.charAt(right);\n chars[r]++;\n\n while (chars[r] > 1) {\n char l = s.charAt(left);\n chars[l]--;\n left++;\n }\n\n res = Math.max(res, right - left + 1);\n\n right++;\n }\n return res;\n }", "public int lengthOfLongestSubstring(String s) {\n if (s == null || s.length() == 0) {\n return 0;\n }\n\n int n = s.length();\n\n int i=0, j=0, max=0;\n\n Set<Character> chars = new HashSet<>();\n while (i < n && j < n) {\n if (!chars.contains(s.charAt(j))) {\n chars.add(s.charAt(j));\n j++;\n max = Math.max(max, j - i);\n } else {\n chars.remove(s.charAt(i));\n i++;\n }\n }\n\n return max;\n }", "public static int lengthOfLongestSubstringUsingSet(String s) {\n\t\tif (s == null || s.length() == 0)\n\t\t\treturn 0;\n\n\t\tint n = s.length();\n\t\tSet<Character> set = new HashSet<>();\n\t\tint ans = 0, start = 0, end = 0;\n\t\twhile (start <= end && end < n) {\n\t\t\t// try to extend the range [i, j]\n\t\t\tif (!set.contains(s.charAt(end))) {\n\t\t\t\tset.add(s.charAt(end));\n\t\t\t\tend++;\n\n\t\t\t\tans = Math.max(ans, end - start); // Update ans\n\t\t\t} else {\n\t\t\t\tset.remove(s.charAt(start++));\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}", "public int minCut(String s) {\n if (s == null || s.length() < 2) return 0;\n int len = s.length();\n int[][] dp = new int[len][len];\n for (int i = 0; i < len; i++) {\n Arrays.fill(dp[i], len + 1);\n dp[i][i] = 0; // [i,i] is palindome, no need to cut\n }\n for (int l = 2; l <= len; l++) {\n for (int i = 0; i < len - l + 1; i++) {\n int j = l + i - 1;\n if (isPalindrome(i, j, s)) dp[i][j] = 0;\n else {\n for (int k = i; k < j; k++) {\n dp[i][j] = Math.min(dp[i][j], 1 + dp[i][k] + dp[k + 1][j]);\n }\n }\n }\n }\n\n return dp[0][len - 1];\n }", "public int findSubstringInWraproundString1(String p) {\n if(p == null || p.length() == 0) {\n return 0;\n }\n int pLength = p.length();\n // keep track of the number of consecutive letters for each substrings which starts from a...z\n int[] consecutiveNumberFrom = new int[26]; \n consecutiveNumberFrom[p.charAt(0) - 'a'] = 1;\n // keep track of the number of legacy consecutive letters\n int[] consecutiveCount = new int[pLength];\n consecutiveCount[0] = 1;\n int result = 1;\n for(int i = 1; i < pLength; i++) {\n consecutiveCount[i] = isConsecutive(p.charAt(i - 1), p.charAt(i))\n ? consecutiveCount[i - 1] + 1\n : 1;\n for(int j = i - consecutiveCount[i] + 1; j <= i; j++) {\n if(consecutiveNumberFrom[p.charAt(j) - 'a'] < i - j + 1) {\n result++;\n consecutiveNumberFrom[p.charAt(j) - 'a']++;\n } else {\n break;\n }\n }\n }\n return result;\n }", "int findLengthOfMatchingSubstring(String inputMorse, String dictionaryMorse) {\n int retVal = 0;\n for (int x=0; x<inputMorse.length(); x++) {\n if (inputMorse.length()>=(x+1) && dictionaryMorse.length()>=(x+1)) {\n return retVal;\n } else if (inputMorse.charAt(x)==dictionaryMorse.charAt(x)) {\n retVal++;\n } else {\n return retVal;\n }\n }\n return retVal;\n }", "public int lengthOfLongestSubstring(String s) {\n\t\tint max=0;\n\t\tif (s == null )\n\t\t\treturn max;\n\n\t\tchar[] aChars = s.toCharArray();\n\t\tSet<Character> set=new HashSet<Character>();\n\t\tString slidingWindow =\"\";\n\t\tfor (int i = 0; i < aChars.length; i++) {\n\t\t\tset.add(aChars[i]);\n\t\t\tfor(int j=i+1;j<=aChars.length;j++) {\n\t\t\t\tslidingWindow = s.substring(i,j);\n\t\t\t\tif(j==aChars.length || set.contains(aChars[j])) {\n\t\t\t\t\tmax = max>slidingWindow.length()?max:slidingWindow.length();\n\t\t\t\t\tset.clear();\n\t\t\t\t\tbreak;\n\t\t\t\t}else {\n\t\t\t\t\tset.add(aChars[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn max;\n\n\t}", "public static int findIndex(String string1, String string2) {\n char c;\n char d;\n int index = -1;\n boolean match = true;\n int count = 1;\n int counter = 0;\n boolean matchFound = false;\n for (int i = 0; i < string2.length(); i++) {\n c = string2.charAt(i);\n if (string2.length() > string1.length()) {\n match = false;\n break;\n }\n // Checks if the characters after the first of string 2 match in string 1\n if (matchFound == true) {\n for (int j = count + counter; j < string1.length(); j++) {\n d = string1.charAt(j);\n if (d != c) {\n \n match = false;\n } else {\n counter++;\n index = j -1;\n matchFound = true;\n break;\n }\n }\n } \n // Checks for the first character in string2 in string1\n if (matchFound == false) {\n for (int k = 0; k < string1.length(); k++) {\n d = string1.charAt(k); \n if (d != c) {\n count ++;\n \n matchFound = false;\n } else {\n index = k;\n matchFound = true;\n break;\n } \n match = true;\n } \n } \n }\n // returns the index number\n return index;\n \n \n }", "public static Character findLength(String str) {\n\n List<Character> list = new ArrayList<>();\n for (Character c : str.toCharArray()) {\n list.add(c);\n }\n\n Character result = '\\0';\n for (Character c : list) {\n if (Collections.frequency(list, c) == 1) {\n result = c;\n break;\n }\n }\n\n return result;\n }", "public String minWindow(String s, String t) {\n String res = \"\";\n if (t.length() > s.length()) return res;\n Map<Character, Integer> dict = new HashMap<>();\n int count=t.length();\n for (char ch : t.toCharArray()) {\n dict.put(ch, dict.getOrDefault(ch,0)+1);\n }\n int start=0, end=0, d=Integer.MAX_VALUE, head=0;\n while (end < s.length()) {\n if (dict.containsKey(s.charAt(end))) {\n if (dict.get(s.charAt(end)) > 0) {\n count--;\n }\n dict.put(s.charAt(end), dict.get(s.charAt(end)) - 1);\n }\n end++;\n while (count == 0) {\n if (end - start < d) {\n res = s.substring(start,end);\n d = end - start;\n }\n // make it invalid;\n // notice that we could seize the essence????\n // to make it invalid, we only care if the counter is positive or not;\n // we don't care about the char at end if it is changed;\n if (dict.containsKey(s.charAt(start))) {\n if (dict.get(s.charAt(start)) >= 0) {\n count++;\n }\n dict.put(s.charAt(start), dict.get(s.charAt(start)) + 1);\n }\n start++;\n }\n }\n return res;\n }", "public int lengthOfLongestSubstring(String s) {\n int longest = 0;\n Set<Character> set = new HashSet<>();\n int i = 0, j = 0;\n while (j < s.length()) {\n if (set.contains(s.charAt(j))) {\n longest = getMax(set.size(), longest);\n set.remove(s.charAt(i));\n i++;\n } else {\n set.add(s.charAt(j));\n j++;\n }\n }\n return getMax(longest, set.size());\n }", "public static int lengthOfLongestSubstring(String s) {\n int[] characters = new int[127];\n int longestSubstringLength = 0, subarrayStart = 0;\n \n for (int i = 0; i < s.length(); i++) {\n int characterValue = (int) s.charAt(i);\n if (characters[characterValue] != 0 && characters[characterValue] > subarrayStart) {\n subarrayStart = characters[characterValue];\n }\n\n characters[characterValue] = i + 1;\n\n int currentSubarrayLength = (i - subarrayStart) + 1;\n if (currentSubarrayLength > longestSubstringLength) {\n longestSubstringLength = currentSubarrayLength;\n }\n }\n \n return longestSubstringLength;\n }", "public int lengthOfLongestSubstring(String s) {\n if (s == null || s.length() == 0) {\n return 0;\n }\n int res = 0;\n boolean[] used = new boolean[128];//ASCII 表共能表示 256 个字符,但是由于键盘只能表示 128 个字符,所以用 128 也行\n int left = 0, right = 0; //维持[i, j) 滑动窗口\n while (right < s.length()) {\n if (!used[s.charAt(right)]) {\n used[s.charAt(right ++)] = true;\n } else {\n res = Math.max(res, right - left);\n while ( left < right && s.charAt(left) != s.charAt(right)) {\n used[s.charAt(left ++)] = false;\n }\n left ++;\n right ++;\n }\n }\n res = Math.max(res, right - left);\n return res;\n }", "public int lengthOfLSS(String s){\n HashMap<Character, Integer> m = new HashMap<>();\n int ans = 0;\n \n for(int i=0, j=0; j<s.length(); j++){\n if(m.containsKey(s.charAt(j))){\n i = Math.max(m.get(s.charAt(j)),i);\n }\n ans = Math.max(j-i+1,ans);\n m.put(s.charAt(j),j+1);\n }\n\n return ans;\n }", "public int lengthOfLongestSubstring(String s) {\n HashMap<Character, Integer> hm = new HashMap<Character, Integer>();\n int counter = 0;\n int max = 0;\n char[] charArray = s.toCharArray();\n for (int i = 0; i < charArray.length; i++) {\n if (!hm.containsKey(charArray[i])) {\n hm.put(charArray[i], i);\n counter++;\n } else {\n max = (max > counter) ? max : counter;\n int index = hm.get(charArray[i]);\n for (int j = 0; j <= index; j++)\n hm.remove(charArray[j]);\n hm.put(charArray[i], i);\n counter = hm.size();\n }\n }\n max = (max > counter) ? max : counter;\n return max;\n }", "public static int countCharacters(char[] characters, char c) {\r\n\t\tint n = 0;//before counting, the number of counts is 0\r\n\t\tfor(int i=0; i<characters.length; i++) {\r\n\t\t\tif(characters[i]==c) {\r\n\t\t\t\tn++;//while there's a character c in a row/column/diagonal, counts plus 1\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn n;//after running the loop, return the number of counts\r\n\t}", "public int firstUniqChar(String s) {\n int[] freq = new int[26];\n \n for (char c : s.toCharArray())\n freq[c - 'a']++;\n \n for (int i = 0; i < s.length(); i++)\n if (freq[s.charAt(i) - 'a'] == 1) return i;\n \n return -1;\n }", "public int lengthOfLongestSubstring(String s) {\n int l=s.length(),len=0,r=0;\n HashMap<Character,Integer> h=new HashMap<Character,Integer>();\n for(int i=0;i<l;) {\n char c=s.charAt(i);\n if(h.containsKey(c)) {\n i=h.get(c)+1; // we should restart and clear the hash map before the repeated c\n h.clear();\n len=0;\n }\n else {\n h.put(c,i);\n len++;\n r=Math.max(len,r);\n i++;\n }\n }\n return r;\n }", "public static int lengthOfLongestSubstring2(String s) {\n if(s.length()==1)\n return 1;\n\n int sum = 0;\n\n Map<Character, Integer> map = new HashMap<>();\n int i=0;\n\n while(i<s.length()){\n char c = s.charAt(i);\n\n // map exists char c\n if(map.containsKey(c)){\n if(map.keySet().size() > sum) // replace sum\n sum = map.keySet().size();\n i = map.get(c);\n map = new HashMap<>(); // clear map\n }\n // map doesn't exist char c\n else\n map.put(c, i);\n i++;\n }\n\n if(map.keySet().size() > sum)\n return map.keySet().size();\n return sum;\n }", "public char findFirstUniqueCharacter (String string) { // O(n*n)\n for (int i = 0; i < string.length(); i++) {\n char currentChar = string.charAt(i);\n\n if (i == string.lastIndexOf(currentChar)) {\n return currentChar;\n }\n }\n\n return '\\n';\n }", "private static int firstUniqChar1(String s) {\n int[] counts = new int[128];\n for (int i = 0; i < s.length(); i++) {\n int c = s.charAt(i);\n counts[c] = counts[c] + 1;\n }\n\n int uniqueIdx = -1;\n for (int i = 0; i < s.length(); i++) {\n if (counts[(int) s.charAt(i)] == 1) {\n uniqueIdx = i;\n break;\n }\n }\n\n return uniqueIdx;\n }", "public static int longerThanOriginalOne(String s){\n\n\t\tint count = 1;\n\t\tchar c = s.charAt(0);\n\n\t\tint total = 0;\n\n\t\tfor (int i = 1; i < s.length(); i++){\n\t\t\tif (s.charAt(i) == c){\n\t\t\t\tcount += 1;\n\t\t\t}else{\n\t\t\t\ttotal += 1 + Integer.toString(count).length();\n\t\t\t\tc = s.charAt(i);\n\t\t\t\tcount = 1;\n\n\t\t\t}\n\t\t}\n\t\ttotal += 1 + Integer.toString(count).length();\n\t return total;\n\n\n\t}", "private static int firstUniqChar2(String s) {\n Map<Character, Integer> seen = new HashMap<>();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n seen.put(c, seen.getOrDefault(c, 0) + 1);\n }\n\n int uniqueIdx = -1;\n for (int i = 0; i < s.length(); i++) {\n if (seen.get(s.charAt(i)) == 1) {\n uniqueIdx = i;\n break;\n }\n }\n\n return uniqueIdx;\n }", "public static Character getFirstUniqueCharacter( String stringToAnalyze ) {\n\n Character firstUniqueChar = null;\n\n // If the string provided is not null\n if( stringToAnalyze != null ) {\n\n // Store the length of the string\n int lenOfStr = stringToAnalyze.length();\n\n // If it's a valid string with at least one character, we can continue\n if( lenOfStr > 0 ) {\n\n // Create a TreeMap to hold the characters in the string and how often they appear\n TreeMap<Character, Integer> charCount = new TreeMap<Character, Integer>();\n\n // loop through the string\n for (int i = 0; i < lenOfStr; i++) {\n // Get the character at the current index\n char currentCharInStr = stringToAnalyze.charAt(i);\n // Put in the map, or increase the count if it's already in the map\n charCount.put(currentCharInStr, charCount.getOrDefault(currentCharInStr, 0) + 1);\n }\n\n // Go through the string once more\n for (int i = 0; i < lenOfStr; i++) {\n // Get the character at the current index\n char currentCharInStr = stringToAnalyze.charAt(i);\n // If it's a character that appears only once\n if (charCount.get(currentCharInStr) == 1) {\n // Set this as the first unique character\n firstUniqueChar = currentCharInStr;\n //Break out of the loop so that we don't replace this with future unique characters\n break;\n }\n }\n\n }\n\n }\n\n return firstUniqueChar;\n\n }", "public int minCut2(String s) {\n boolean[][] dp = new boolean[s.length()][s.length()];\n for (int len = 1; len <= s.length(); len++) {\n for (int i = 0; i <= s.length() - len; i++) {\n int j = i + len - 1;\n dp[i][j] = s.charAt(i) == s.charAt(j) && (len < 3 || dp[i + 1][j - 1]);\n }\n }\n\n int[] cut = new int[1];\n cut[0] = Integer.MAX_VALUE;\n // List<List<String>> res = new ArrayList<>();\n helper2(s, 0, cut, dp, 0);\n // System.out.format(\"res: %s\\n\", res);\n return cut[0];\n }", "public int lengthOfLongestSubstring(String s) {\n if(s.length()<=1) return s.length();\n HashMap<Character,Integer> h=new HashMap<Character,Integer>();\n int curmax=0,max=0;\n for(int i=0;i<s.length();i++) {\n char c=s.charAt(i);\n if(h.containsKey(c)) { \n if(i-h.get(c)<curmax) { // previous is in the middle of curmax, then restart from the previous next char\n curmax=1; // otherwise previous is the start of curmax, then simply replace current with previous\n i=h.get(c)+1; \n c=s.charAt(i);\n h.clear();\n }\n }\n else {\n curmax++;\n }\n h.put(c,i);\n max=curmax>max?curmax:max;\n }\n return max;\n }", "public static int getMin(String str){\n\t\tStack<Character> st = new Stack<>();\n\t\tint count = 0;\n\t\tfor(char c: str.toCharArray()){\n\t\t if(c == ')'){\n\t\t if(st.size() > 0){\n\t\t st.pop();\n\t\t }\n\t\t else{\n\t\t count++;\n\t\t }\n\t\t }\n\t\t else{\n\t\t st.push(c);\n\t\t }\n\t\t}\n\t\treturn count + st.size();\n\t}", "public int lengthOfLongestSubstring(String s) {\n\t\tif (s == null || s.length() == 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tint slow = 0, fast = 0;\n\t\tHashMap<Character, Integer> map = new HashMap<Character, Integer>();\n\t\tint maxLen = 0;\n\t\tint start = 0, end = 0;\n\t\twhile (fast < s.length()) {\n\t\t\tchar cur = s.charAt(fast);\n\t\t\tif (!map.containsKey(cur)) {\n\t\t\t\tmap.put(cur, 1);\n\t\t\t} else {\n\t\t\t\tmap.put(cur, map.get(cur) + 1);\n\t\t\t}\n\n\t\t\twhile (map.get(cur) > 1 && slow <= fast) {\n\t\t\t\tchar slow_char = s.charAt(slow);\n\t\t\t\tmap.put(slow_char, map.get(slow_char) - 1);\n\t\t\t\tslow++;\n\t\t\t}\n\t\t\tif (maxLen < fast - slow + 1) {\n\t\t\t\tmaxLen = fast - slow + 1;\n\t\t\t\tstart = slow;\n\t\t\t\tend = fast;\n\t\t\t}\n\t\t\tfast++;\n\t\t}\n\n\t\t// System.out.println(\"maxLen = \" + maxLen);\n\t\t// System.out.println(s.substring(start, end + 1));\n\t\treturn maxLen;\n\t}", "public int minCutII(String s) {\n if (s == null || s.length() < 2) return 0;\n int len = s.length();\n int[] cut = new int[len];\n boolean[][] palindrome = new boolean[len][len];\n for (int i = 0; i < len; i++) {\n int min = i;\n for (int j = 0; j <= i; j++) {\n if (s.charAt(i) == s.charAt(j) &&\n ((j + 1 > i - 1) || palindrome[j + 1][i - 1])) {\n palindrome[j][i] = true;\n min = j == 0 ? 0 : Math.min(min, cut[j - 1] + 1);\n }\n }\n cut[i] = min;\n }\n return cut[len - 1];\n }", "public int minInsertions(String s) {\n int n = s.length();\n //Initialising dp array. It will represent the longest common subsequence between first i characters of first string and first j characters of second string\n int[][] dp = new int[n+1][n+1];\n \n //Looping through start and end of the string. Thus dp will consider the string from start and string from end and then store the ans\n for (int i = 0; i < n; ++i){\n for (int j = 0; j < n; ++j){\n \n //If both the characters are equal, then we increment the previous dp value otherwise we take max of the next character considered for both strings\n dp[i + 1][j + 1] = s.charAt(i) == s.charAt(n - 1 - j) ? dp[i][j] + 1 : Math.max(dp[i][j + 1], dp[i + 1][j]);\n } \n }\n //Returning ans\n return n - dp[n][n];\n }", "public int lengthOfLongestSubstring(String s) {\n return sol2a(s); \n //return sol3_WRONG(s); //NO! D & C (unlike LC53)\n }", "@Override\n\tpublic int getLength() {\n\t\tint c = 0;\n\t\tfor (char c1 : theString.toCharArray()) {\n\t\t\tc++;\n\t\t}\n\t\treturn c;\n\t}", "public int lengthOfLongestSubstring2(String s) {\n\n int res = 0;\n int len = s.length();\n Map<Character, Integer> map = new HashMap<Character, Integer>();\n\n for (int i = 0, j = 0; j < len; j++) {\n if (map.containsKey(s.charAt(j))) {\n i = Math.max(map.get(s.charAt(j)), i);// use Max mesas never looking back\n }\n res = Math.max(res, j - i + 1); // j not plus yet, need add 1 to get a real length ( indicate j itself)\n map.put(s.charAt(j), j + 1); // (j+1) means skip duplicate\n System.out.println(map.toString()); // will update the value of key ( union key)\n }\n\n\n return res;\n }", "private static int lengthOfLongestSubstring2(String s) {\n int maxLength = 0;\n int currentlength = 0;\n int startIndex = -1;\n Map<Character, Integer> charMap = new HashMap<>();\n \n for(int index = 0; index < s.length(); index++){\n Character c = s.charAt(index);\n Integer currentIndex = charMap.get(c);\n if(currentIndex != null){\n \tcurrentlength = index - startIndex -1 ;\n if(maxLength < currentlength){\n maxLength = currentlength;\n }\n if(currentIndex > startIndex) {\n startIndex = currentIndex;\n }\n }\n charMap.put(c, index);\n }\n currentlength = s.length() - startIndex -1 ;\n if(maxLength < currentlength){\n maxLength = currentlength;\n }\n return maxLength;\n }", "public static int lookForCell(char[] characters) {\r\n\t\tint n = 0;//before counting, the number of the space is 0\r\n\t\tfor(int i=0; i<characters.length; i++) {\r\n\t\t\tif(characters[i]==' ') {\r\n\t\t\t\tn = i;//let n equals to the number of position of empty space\r\n\t\t\t\treturn n;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(n);\r\n\t\treturn n;\r\n\t}", "public int lengthOfLongestSubstring(String s)\n {\n\tif (s.length() < 2)\n\t return s.length();\n\n\tint max = 0, i = 0, j = 1;\n\n\tboolean[] cache = new boolean[128];\n\tcache[s.charAt(i) - ' '] = true;\n\n\twhile (i < s.length() && j < s.length())\n\t{\n\t while (cache[s.charAt(j)-' '])\n\t\t cache[s.charAt(i++)-' '] = false; \n\t cache[s.charAt(j++)-' '] = true;;\n\t max = Math.max(max, j - i);\n\t}\n\treturn max;\n }", "public static String minWindow(String s, String t) \n {\n String ans = \"\";\n int[] ascii = new int[128]; // fill the ascii, \n for(char e: t.toCharArray())\n {\n \t ascii[e]++; // letters in String T contribute positive value to the ascii array\n }\n \n int counter = t.length(), begin = 0, end = 0,minLen = Integer.MAX_VALUE, head = 0;\n// we need to keep track of the letter left in t, where it starts and where it end.\n while(end<s.length())\n {\n \t if(ascii[s.charAt(end)]>0) \n \t {\n \t\t counter--; // find one letter from String t in String s, counter--,\n \t }\n \t ascii[s.charAt(end)]--; // letters in String S contribute negative value to the ascii array\n\t\t end++; // keep moving end to the last index of String s. \n\t\t // end index records the last index of the possible window.\n \t\t \n/*\n * once the letters in t are all traversed, counter should be zero, and we have found a possible window\n * the while loop below is to update the begin index of the window\n * while ascii[char] is above 0, which means a letter in string T is found in string S\n * then counter++ and letters in String S \n * after a possible window is found now contribute positive values to ascii\n * while traverse each letter in String, update the length of minimum window. \n * \n */\n \t while(counter ==0) \n \t { \n \t\t if(end - begin < minLen)\n \t\t {\n \t\t\t head = begin;\n \t\t\t minLen = end-begin;\n \t\t }\n \t\t \n \t\t ascii[s.charAt(begin)]++;\n \t\t if(ascii[s.charAt(begin)]>0)\n \t\t {\n \t\t\t counter++;\n \t\t }\n \t\t begin++;\n \t }\n }\n \n if(minLen != Integer.MAX_VALUE)\n \t ans = s.substring(head, head+minLen);\n return ans;\n }", "public static int approach1(String str) {\n\t\tint strLength = str.length();\n\t\tfor(int i = 0; i < strLength; i++) {\n\t\t\tfor(int j = i+1; j < strLength; j++) {\n\t\t\t\tif(str.charAt(i) == str.charAt(j)) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public static int firstOccurrence(String s, String x) {\n int lens = s.length();\n int lenx = x.length();\n // base cases\n if (x.equals(s) || x.equals(\"*\")&&s.length()==1) return 0;\n if (x.isEmpty() || s.isEmpty()) return -1;\n\n int[][] dp = new int[lenx+1][lens+1];\n\n for(int i = 1;i<lenx+1;i++){\n for(int j = 1;j<lens+1;j++){\n //int max = Math.max(dp[i-1][j-1], Math.max(dp[i-1][j], dp[i][j-1]));\n int max= dp[i-1][j-1];\n if((s.charAt(j-1)==x.charAt(i-1))||x.charAt(i-1)=='*'){\n dp[i][j] = max+1;\n if(dp[i][j]==lenx){\n return j-lenx;\n }\n }else{\n dp[i][j]= max;\n }\n }\n }\n return -1;\n\n }", "public int lengthOfLongestSubstring(String s) {\n if(s.length() == 0) return 0;\r\n \r\n int windowEnd = 0;\r\n int windowStart = 0;\r\n int maxLen = 0;\r\n \r\n \r\n HashMap<Character, Integer> hm = new HashMap<>();\r\n \r\n for(windowEnd = 0;windowEnd < s.length(); windowEnd++){\r\n \r\n char ch = s.charAt(windowEnd);\r\n \r\n if(hm.containsKey(ch)){\r\n windowStart = Math.max(windowStart , hm.get(ch)+1);\r\n }\r\n \r\n hm.put(ch,windowEnd);\r\n maxLen = Math.max(maxLen, windowEnd-windowStart+1);\r\n }\r\n \r\n return maxLen; \r\n }", "public int lengthOfLongestSubstring(String str) {\n \n if(str.compareTo(\"\") == 0)\n {\n \treturn 0;\n }\n \n if(str.length() == 1)\n {\n \treturn 1;\n }\n \t\t\n\t\tboolean charSet[] = new boolean[256];\n\t\tint begin = 0;\n\t\tint end = 0;\n\t\tint maxBegin = 0;\n\t\tint maxEnd = 0;\n\t\t\n\t\tfor(int i = 0; i < str.length(); i++)\n\t\t{\n\t\t\tint value = str.charAt(i);\n\t\t\tif(charSet[value])\n\t\t\t{\t\t\t\t\n\t\t\t\tfor(int j = begin; j <= end; j++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tif(str.charAt(j) == str.charAt(i))\n\t\t\t\t\t{\n\t\t\t\t\t\tbegin = j + 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcharSet[j] = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//begin = i;\n\t\t\t\tend = i;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcharSet[value] = true;\n\t\t\t\tend = i;\n\t\t\t}\n\t\t\t\n\t\t\tif((maxEnd - maxBegin + 1) < (end - begin + 1))\n\t\t\t{\n\t\t\t\tmaxBegin = begin;\n\t\t\t\tmaxEnd = end;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\treturn (maxEnd - maxBegin + 1);\n\n }", "static int firstNonRepeating(String str) {\n getCharCountArray(str);\n int index = -1, i;\n\n for (i = 0; i < str.length(); i++) {\n if (count[str.charAt(i)] == 1) {\n index = i;\n break;\n }\n }\n\n return index;\n }", "public static int finder(String line){\n for (int i = 0; i < line.length(); i++) {//i is the current index \n char current_char = line.charAt(i);\n if(current_char == '+' || current_char == '-' || current_char == '*' || current_char == '/' ){\n return i;\n }\n }\n return line.length();\n}", "public int lengthOfLongestSubstring(String s){\n\t\tif(s == null || s.length() == 0){\n\t\t\treturn 0;\n\t\t}\n\n\t\tchar[] ch = s.toCharArray();\n\t\tint[] map = new int[128];\n\t\tint start = 0, end = 0, count = 0, maxLen = 0;\n\n\t\twhile(end < s.length()){\n\t\t\t// If map[ch[end]] > 0, it means ch[end] is duplicated now.\n\t\t\tif(map[ch[end]] > 0){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tmap[ch[end]]++;\n\t\t\tend++;\n\n\t\t\t// deal with the duplicated cases\n\t\t\twhile(count > 0){\n\t\t\t\tif(map[ch[start]] > 1){\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tmap[ch[start]]--;\n\t\t\t\tstart++;\n\t\t\t}\n\n\t\t\tmaxLen = Math.max(maxLen, end - start);\n\t\t}\n\t\treturn maxLen;\n\t}", "public static int distance(String s, String substring) {\n \tint first = s.indexOf(substring);\n \tint last = first;\n \twhile(s.indexOf(substring, last + substring.length()) > 0) {\n \t\tlast = s.indexOf(substring, last + substring.length());\n \t}\n return last - first - substring.length();\n }", "public static int approach3(String str) {\n\t\tint index = 256;\n\t\tint strLength = str.length();\n\t\tint result = Integer.MAX_VALUE;\n\t\tint[] indexArray = new int[index];\n\t\tfor(int i = 0; i < index; i++) {\n\t\t\tindexArray[i] = -1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < strLength; i++) {\n\t\t\tif(indexArray[str.charAt(i)] == -1) {\n\t\t\t\tindexArray[str.charAt(i)] = i;\n\t\t\t} else {\n\t\t\t\tresult = Math.min(result, indexArray[str.charAt(i)]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result == Integer.MAX_VALUE ? -1 : result;\n\t}", "public int minCuts(String input) {\n if (input.length() <= 1) {\n return 0;\n }\n int n = input.length();\n char[] arr = input.toCharArray();\n int[] minCut = new int[n + 1];\n\n // preproces, isP[start][end] represent if substring start - 1][end -1] is P\n // a string is P: single char; two char and same; same char at out + inner isP opp direction\n boolean [][] isP = new boolean[n + 1][n + 1];\n for (int e = 1; e < n + 1; e++) {\n minCut[e] = e - 1;\n for (int s = e; s > 0; s--) {\n if (arr[s - 1] == arr[e - 1]) {\n isP[s][e] = e - s < 2 || isP[s + 1][e - 1];\n }\n if (isP[s][e]) {\n minCut[e] = Math.min(minCut[e], minCut[s - 1] + 1);\n }\n }\n }\n return minCut[n];\n\n }", "public static Character findFirstNonRepetedCharacter(String str){\n Map<Character,Integer> map = new HashMap<>();\n\n char[] chars = str.toCharArray();\n for(Character ch: chars){\n //Terinery operator if chracter contains value increment by one\n var count = map.containsKey(ch) ? map.get(ch) : 0;\n map.put(ch,count +1);\n }\n\n //due to hashfunction map store these values in different places in memory( not sequentially)\n //now match the character in String from first to end corresponding to Map values\n for(Character ch: chars){\n //first non repeated value a green apple in string | in { =2, p=2, a=2, r=1, e=3, g=1, l=1, n=1}\n if(map.get(ch)==1) return ch; // ^\n }\n\n return Character.MIN_VALUE; // a default value when cant find any 1st repeated\n }", "static long substrCount(int n, String input) {\n List<String> result = new ArrayList<>();\n if (!isEmpty(input)) {\n for (int index = 0; index <= input.length(); index++) {\n for (int i = index; i <= input.length(); i++) {\n String temp = input.substring(index, i);\n if (valid(temp)) {\n result.add(temp);\n }\n }\n }\n }\n return result.size();\n\n }", "private static int palindromeIndex(String s) {\n int len = s.length();\n for (int i = 0; i < len / 2; i++) {\n int j = len-i-1;\n if (s.charAt(i) != s.charAt(j)) {\n if (isPalindrome(s.substring(0, i) + s.substring(i+1)))\n return i;\n else if (isPalindrome(s.substring(0, j) + s.substring(j+1)))\n return j;\n else\n return -1;\n }\n }\n return -1;\n }", "public static int longestStringWithNoRepeatingChars(String str) {\n\t\tif (str == null || str.length() == 0)\n\t\t\treturn 0;\n\n\t\tint ans = 0;\n\n\t\t// Map of character and index at which it was seen last\n\n\t\tint start = 0;\n\n\t\tint[] charFrequencyMap = new int[MAX_CHARS];\n\t\tArrays.fill(charFrequencyMap, -1);\n\n\t\tfor (int end = 0; end < str.length(); end++) {\n\t\t\tchar rightChar = str.charAt(end);\n\n\t\t\t// If this char of right was seen before, i.e its repeating\n\t\t\tif (charFrequencyMap[rightChar] != -1) {\n\t\t\t\t// +1 to ignore instance of right char last seen\n\t\t\t\tstart = Math.max(start, charFrequencyMap[rightChar]) + 1;\n\t\t\t}\n\n\t\t\tcharFrequencyMap[rightChar] = end; // Save indices of chars last\n\t\t\t\t\t\t\t\t\t\t\t\t// seen at\n\n\t\t\tans = Math.max(ans, end - start + 1);\n\t\t}\n\t\treturn ans;\n\t}", "public String minWindow(String s, String t) {\n if (t.length() > s.length()) {\n return \"\";\n }\n\n Map<Character, Integer> pattern = new HashMap<>();\n int count = 0;\n\n for (char c : t.toCharArray()) {\n if (!pattern.containsKey(c)) {\n count++;\n }\n pattern.put(c, pattern.getOrDefault(c, 0) + 1);\n }\n\n int right = 0, left = 0;\n int minStart = -1, minEnd = -1;\n int minLength = Integer.MAX_VALUE;\n\n while (right < s.length()) {\n char c = s.charAt(right);\n\n if (pattern.containsKey(c)) {\n pattern.put(c, pattern.get(c) - 1);\n if (pattern.get(c) == 0) {\n count--;\n }\n }\n\n while (left < right && count == 0) {\n // left == right || pattern.containsKey\n char cleft = s.charAt(left);\n if (right - left + 1 < minLength) {\n minStart = left;\n minEnd = right;\n minLength = right - left + 1;\n }\n\n if (pattern.containsKey(cleft)) {\n pattern.put(cleft, pattern.get(cleft) + 1);\n if (pattern.get(cleft) > 0) {\n count++;\n }\n }\n left++;\n }\n\n right++;\n }\n\n return minStart == -1 || minEnd == -1 ? \"\" : s.substring(minStart, minEnd + 1);\n }", "static String findSubString(String str) \n { \n int n = str.length(); \n \n // Count all distinct characters. \n int dist_count = 0; \n \n boolean[] visited = new boolean[MAX_CHARS]; \n Arrays.fill(visited, false); \n for (int i=0; i<n; i++) \n { \n if (visited[str.charAt(i)] == false) \n { \n visited[str.charAt(i)] = true; \n dist_count++; \n } \n } \n \n // We basically maintain a window of characters that contains all characters of given string. \n int start = 0, start_index = -1; \n int min_len = Integer.MAX_VALUE; \n \n int count = 0; \n int[] curr_count = new int[MAX_CHARS]; \n for (int j=0; j<n; j++) \n { \n // Count occurrence of characters of string \n curr_count[str.charAt(j)]++; \n \n // If any distinct character matched, then increment count \n if (curr_count[str.charAt(j)] == 1 ) \n count++; \n \n // if all the characters are matched \n if (count == dist_count) \n { \n // Try to minimize the window i.e., check if \n // any character is occurring more no. of times \n // than its occurrence in pattern, if yes \n // then remove it from starting and also remove \n // the useless characters. \n while (curr_count[str.charAt(start)] > 1) \n { \n if (curr_count[str.charAt(start)] > 1) \n curr_count[str.charAt(start)]--; \n start++; \n } \n \n // Update window size \n int len_window = j - start + 1; \n if (min_len > len_window) \n { \n min_len = len_window; \n start_index = start; \n } \n } \n } \n // Return substring starting from start_index \n // and length min_len \n return str.substring(start_index, start_index+min_len); \n }", "public static String minimumWindow_Map(String s, String t) {\n\t\tif(s==null || t==null || s.length()==0 || t.length()==0 || s.length()<t.length()) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tMap<Character, Integer> pmap = new HashMap<>();\n\t\t// initialize the pattern frequency map\n\t\tfor(int i=0;i<t.length();i++) {\n\t\t\tchar c = t.charAt(i);\n\t\t\tpmap.put(c, pmap.getOrDefault(c, 0)+1);\n\t\t}\n\n\t\tMap<Character,Integer> foundMap = new HashMap<>();\n\t\tint start = 0;\n\t\tint minLength = Integer.MAX_VALUE;\n\t\tint startIndex = -1;\n\t\tint count = 0;\n\t\t\n\t\tfor (int end = 0; end < s.length(); end++) {\n\t\t\tif (pmap.containsKey(s.charAt(end))) {\n\t\t\t\tfoundMap.put(s.charAt(end), foundMap.getOrDefault(s.charAt(end), 0) + 1);\n\t\t\t\tif (foundMap.get(s.charAt(end)) <= pmap.get(s.charAt(end))) {\n\t\t\t\t\t++count;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (count == t.length()) {\n\t\t\t\tchar c = s.charAt(start);\n\t\t\t\twhile (foundMap.getOrDefault(c, 0) > pmap.getOrDefault(c, 0) || !pmap.containsKey(c)) {\n\t\t\t\t\tif (foundMap.getOrDefault(c, 0) > pmap.getOrDefault(c, 0)) {\n\t\t\t\t\t\tfoundMap.put(c, foundMap.get(c) - 1);\n\t\t\t\t\t}\n\t\t\t\t\t++start;\n\t\t\t\t\tc = s.charAt(start);\n\t\t\t\t}\n\t\t\t\tint currentLength2 = end - start + 1;\n\t\t\t\tif (minLength > currentLength2) {\n\t\t\t\t\tminLength = currentLength2;\n\t\t\t\t\tstartIndex = start;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn startIndex==-1 ? \"\": s.substring(startIndex, startIndex+minLength) ;\n\t}", "public int countBinarySubstrings(String s) {\n\n int pre = 0, cur = 1, res = 0;\n for (int i = 1; i < s.length(); i++) {\n if (s.charAt(i) == s.charAt(i - 1)) {\n cur++;\n } else {\n res += Math.min(cur, pre);\n pre = cur;\n cur = 1;\n }\n }\n res += Math.min(cur, pre);\n return res;\n }", "public int minCut(String s) {\n \n if(s == null || s.length() == 0) {\n return 0;\n }\n return minCutHelper(s);\n \n }", "int getIndex(Character c)\n{\n int a = Character.getNumericValue('a');\n int z = Character.getNumericValue('z');\n int val = Character.getNumericValue(c);\n \n if (a <= val && val <= z) return val - a;\n return -1;\n}", "public int findLUSlength(String[] strs) { //O(n^2) time. O(1) space.\r\n\t\tif (strs.length == 0)\r\n\t\t\treturn 0;\r\n\t\tint max = -1;\r\n\t\tint i = 0;\r\n\t\t// Arrays.sort(strs, (a,b) -> b.length() - a.length());\r\n\t\tfor (int j = 0; j < strs.length; j++) {\r\n\t\t\tfor (i = 0; i < strs.length; i++) {\r\n\t\t\t\tif (j == i || !isSubsequence(strs[j], strs[i]))\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\telse\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (i == strs.length)\r\n\t\t\t\tmax = Math.max(strs[j].length(), max);\r\n\t\t}\r\n\t\treturn max;\r\n\t}", "public String findAllSubstring(String s) {\n Set<String> set = new HashSet<>();\n String res = \"\";\n int max = -1;\n\n for (int i = 0; i < s.length(); i++) {\n String cur = \"\";\n for (int j = i; j < s.length(); j++) {\n cur += s.charAt(j);\n if (set.contains(cur) && cur.length() > max) {\n res = cur;\n max = cur.length();\n } else {\n set.add(cur);\n }\n }\n }\n return res;\n }" ]
[ "0.6596731", "0.6522453", "0.65060407", "0.64430225", "0.6406211", "0.6397596", "0.6382855", "0.63503134", "0.63265574", "0.631831", "0.62703264", "0.62537587", "0.6253692", "0.62507045", "0.6239022", "0.6184696", "0.61834943", "0.61501205", "0.6144766", "0.6141337", "0.6121605", "0.610922", "0.60935485", "0.6090262", "0.608653", "0.6062158", "0.6061609", "0.60559857", "0.6055045", "0.6043198", "0.6035494", "0.6031778", "0.6025654", "0.6021942", "0.60195017", "0.6009752", "0.60096264", "0.6008798", "0.59995323", "0.59843475", "0.5980348", "0.5977418", "0.5966796", "0.59565187", "0.59529126", "0.59511465", "0.59286875", "0.59279865", "0.5923273", "0.5917781", "0.59097534", "0.59065", "0.5902501", "0.5899431", "0.58969086", "0.58945185", "0.58891654", "0.5885122", "0.58683026", "0.58659613", "0.5857352", "0.5856235", "0.584426", "0.5831776", "0.5824915", "0.58242244", "0.5811893", "0.5806329", "0.5805964", "0.58018965", "0.5782044", "0.57806134", "0.57754993", "0.57621706", "0.57580405", "0.5738049", "0.5725008", "0.5723697", "0.5721452", "0.5705193", "0.569949", "0.56990904", "0.5693695", "0.56891793", "0.5679931", "0.567046", "0.56516707", "0.5633798", "0.5628055", "0.5624963", "0.5622871", "0.5617987", "0.5614339", "0.5614273", "0.5610745", "0.56106025", "0.5600569", "0.55983263", "0.5597152", "0.5593923" ]
0.69198036
0
Gets the cEndButton.setVisible(true)ount trade cards.
public int getCountTradeCards() { return countTradeCards; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isCancelButtonVisible() {\r\n\t\tif (_cancelButton == null)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn _cancelButton.getVisible();\r\n\t}", "public JButton getDeclineButton() {\n\t\treturn declineButton;\n\t}", "private JCheckBox getEndCapCheckBox() {\n\t\tif (endCapCheckBox == null) {\n\t\t\tendCapCheckBox = new JCheckBox();\n\t\t\tendCapCheckBox.setBounds(new java.awt.Rectangle(209, 69, 235, 21));\n\t\t\tendCapCheckBox.setText(PluginServices.getText(this,\n\t\t\t\t\t\"No_usar_buffer_redondeado\"));\n\t\t}\n\t\treturn endCapCheckBox;\n\t}", "public boolean getUnselectedCloseVisible() {\n checkWidget();\n return showUnselectedClose;\n }", "public boolean visible_SensConfig_NxtBtn() {\r\n\t\treturn IsElementVisibleStatus(SensorConfiguration_Btn);\r\n\t}", "boolean isCloseButtonDisplayed();", "public JButton getCardsb() {\r\n\t\treturn cardsb;\r\n\t}", "private void initializeHideButton() {\n isHidden = false;\n hideButton = new JButton(\"Hide/Reveal\");\n hideButton.setBounds(800, 425, 100, 25);\n hideButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if (isHidden) {\n for (JButton button: cardButtons) {\n button.setVisible(true);\n }\n isHidden = false;\n } else {\n for (JButton button: cardButtons) {\n button.setVisible(false);\n }\n isHidden = true;\n }\n }\n });\n this.add(hideButton);\n }", "public boolean isSaveButtonVisible() {\r\n\t\tif (_saveButton == null)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn _saveButton.getVisible();\r\n\t}", "public void showStopButton(){\n\t((Button)findViewById(R.id.stopButton)).setVisibility(View.VISIBLE);\n\t((Button)findViewById(R.id.startButton)).setVisibility(View.GONE);\n\t((Button)findViewById(R.id.resetButton)).setVisibility(View.GONE);\n}", "public boolean getVisible() {\r\n return visible;\r\n }", "public void setButtonVisibility() {\n if (MankomaniaGame.getMankomaniaGame().getLocalClientPlayer().getPlayerIndex() == MankomaniaGame.getMankomaniaGame().getGameData().getCurrentPlayerTurnIndex()) {\n cheatButton.setText(\"Cheat\");\n playerAtTurn.setVisible(true);\n playerNotAtTurn.setVisible(false);\n } else {\n cheatButton.setText(\"Assume Cheating\");\n playerAtTurn.setVisible(false);\n playerNotAtTurn.setVisible(true);\n }\n }", "private void hideButton(){\n // Si onget Client\n if(numOnglet() == 0 ){\n jBtn_ProspectToClient.setVisible(false);\n if(jTable_Clients.getRowCount() == 0){\n jBtn_Modifier.setVisible(false);\n jBtn_Supprimer.setVisible(false);\n }\n }else{\n if(jTable_Prospects.getRowCount() == 0){\n jBtn_Modifier.setVisible(false);\n jBtn_Supprimer.setVisible(false);\n jBtn_ProspectToClient.setVisible(false);\n }\n }\n }", "public boolean getBButton() {\n\t\treturn getRawButton(B_Button);\n\t}", "public JButton getMarketButton() {\n\t\treturn market;\n\t}", "public boolean isVisible(){\n\t\treturn this.visible;\n\t}", "private void showHideButtons() {\n mBinding.ibPrev.setVisibility(vm.shouldShowPrevBtn() ? View.VISIBLE : View.INVISIBLE);\n mBinding.ibNext.setVisibility(vm.shouldShowNextBtn() ? View.VISIBLE : View.INVISIBLE);\n }", "public boolean isDisplayed_txt_Fuel_Rewards_Page_Button(){\r\n\t\tif(txt_Fuel_Rewards_Page_Button.isDisplayed()) { return true; } else { return false;} \r\n\t}", "public boolean isVisible()\n {\n return visible;\n }", "public boolean isVisible(){\n \t\treturn visible;\n \t}", "public boolean getVisible() {\n\t\treturn visible;\n\t}", "public boolean getVisible() {\n\t\treturn visible;\n\t}", "private boolean visible() {\r\n return NOT(GO() && CATS(Cc,Cn,Co,Cs,Zl,Zp)) && POINT();\r\n }", "public boolean isVisible () {\n return visible;\n }", "public boolean isVisible()\n {\n return visible;\n }", "boolean isVisible();", "boolean isVisible();", "public boolean get() {\n\t\t\tint i = 0; \n\t\t\twhile(i < buttons.length) {\n\t\t\t\tif (!buttons[i].get()) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "public boolean isVisible() {\r\n return visible;\r\n }", "ButEnd getEnd();", "private void hideNextButton(){\n\t\tif(nextButton != null){\n\t\t\tmainWindow.getContainer().remove(nextButton);\n\t\t\tshowSubmitBtn();\n\t\t}\n\t}", "public static boolean isVisible(int id){\n\t\treturn GlobalVariables.guiButtons.get(id).visible;\n\t}", "public boolean getYButton() {\n\t\treturn getRawButton(Y_Button);\n\t}", "public boolean isVisible() { return _visible; }", "public boolean isDisplayed_click_CloseModal_Button(){\r\n\t\tif(click_CloseModal_Button.isDisplayed()) { return true; } else { return false;} \r\n\t}", "private JButton getBcancel() {\n if( Bcancel == null ) {\n Bcancel = new JButton();\n Bcancel.setText(\"Cancel\");\n Bcancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n setVisible(false);\n dispose();\n }\n });\n }\n return Bcancel;\n }", "public void setCancelButtonVisible(boolean visible) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_cancelButton_propertyVisible\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_cancelButton_propertyVisible\", visible);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setCancelButtonVisible(\" + visible + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "private Boolean toggleCardButtonsPanel() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif (risk.getState() == RiskGameModel.REINFORCE || risk.getState() == RiskGameModel.START_TURN) {\r\n\t\t\tcardStatusLabel.setText(\"\");\r\n\t\t\tstatusPanel.repaint();\r\n\t\t\treturn true;\r\n\r\n\t\t} else {\r\n\t\t\tcardStatusLabel.setText(\"Card can be traded only during reinforcement.\");\r\n\t\t\tstatusPanel.repaint();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isAddButtonVisible() {\r\n\t\tif (_addButton == null)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn _addButton.getVisible();\r\n\t}", "private void checkButtonVisibility() {\n\n if (leftBlockIndex > 0) {\n buttonLeft.setVisibility(View.VISIBLE);\n } else {\n buttonLeft.setVisibility(View.INVISIBLE);\n }\n\n if (leftBlockIndex < blockCount - 2) {\n buttonRight.setVisibility(View.VISIBLE);\n } else {\n buttonRight.setVisibility(View.INVISIBLE);\n }\n\n }", "public boolean getBButton() {\n\t\treturn getRawButton(B_BUTTON);\n\t}", "boolean isVisible() {\r\n return this.isVisible;\r\n }", "public boolean getBorderVisible() {\n checkWidget();\n return borderLeft == 1;\n }", "public static native boolean _isVisible(Element elem) /*-{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (elem.style.display != 'none');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}-*/;", "public void setExitButton() {\n clickable = true;\n endButton.setVisibility(View.VISIBLE);\n }", "public boolean isVisible() {\n\t\treturn visible;\n\t}", "public boolean isShowing() {\n return visible;\n }", "private JButton getCmdStop() {\r\n\t\tif (cmdStop == null) {\r\n\t\t\tcmdStop = new JButton();\r\n\t\t\tcmdStop.setText(\"\");\r\n\t\t\tcmdStop.setIcon(new ImageIcon(getClass().getResource(\"/Stop-48.png\")));\r\n\t\t\tcmdStop.setToolTipText(\"Stop all current operation.\");\r\n\t\t\tcmdStop.setEnabled(false);\r\n\t\t\tcmdStop.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tchkproxy.cancel(true);\r\n\t\t\t\t\tcmdStart.setEnabled(true);\r\n\t\t\t\t\tcmdPause.setEnabled(false);\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn cmdStop;\r\n\t}", "public boolean isDeleteButtonVisible() {\r\n\t\tif (_deleteButton == null)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn _deleteButton.getVisible();\r\n\t}", "public final boolean isVisible() {\n return visible;\n }", "public boolean isDisplayed_click_Digital_coupons_button(){\r\n\t\tif(click_Digital_coupons_button.isDisplayed()) { return true; } else { return false;} \r\n\t}", "public void updateVisible(){\n if (serviceManager.isCustomerQueMode() == true && serviceManager.isManagerMode() == false) {\n this.setVisible(true);\n } else {\n this.setVisible(false);\n }\n// System.out.println(serviceManager.isCustomerQueMode());\n }", "public void setVisible(Button button) {\n setVisible(EnumSet.of(button));\n }", "public boolean hideClosedPorts(){\n return hideClosedP.isSelected();\n }", "private void showNextButton(){\n\t\tif(nextButton != null){\n\t\t\thideSubmitBtn();\n\t\t\tmainWindow.addLayer(nextButton, BUTTON_LAYER, submitBtnX, submitBtnY);\n\t\t}\n\t}", "public boolean isShown(){\r\n return shown;\r\n }", "public boolean isVisible(){ return visible; }", "public boolean getYButton() {\n\t\treturn getRawButton(Y_BUTTON);\n\t}", "private JButton getBtnPotvrdiIzbor() {\r\n\t\tif (btnPotvrdiIzbor == null) {\r\n\t\t\tbtnPotvrdiIzbor = new JButton(\"Potvrdi izbor\");\r\n\t\t\tbtnPotvrdiIzbor.addActionListener(new ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\tif(comboBoxDomaci.getSelectedIndex() == comboBoxGosti.getSelectedIndex()){\r\n\t\t\t\t\t\tlblEkipeMorajuBiti.setVisible(true);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tcentralPanel.setVisible(true);\r\n\t\t\t\t\t\tbtnPotvrdiUnos.setVisible(true);\r\n\t\t\t\t\t\tbtnPotvrdiIzbor.setVisible(false);\r\n\t\t\t\t\t\tlblOdaberite.setVisible(false);\r\n\t\t\t\t\t\tlblEkipeMorajuBiti.setVisible(false);\r\n\t\t\t\t\t\tcomboBoxDomaci.setEnabled(false);\r\n\t\t\t\t\t\tcomboBoxGosti.setEnabled(false);\r\n\t\t\t\t\t\ttextFieldDomaci.setText(comboBoxDomaci.getSelectedItem().toString());\r\n\t\t\t\t\t\ttextFieldGosti.setText(comboBoxGosti.getSelectedItem().toString());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn btnPotvrdiIzbor;\r\n\t}", "private JButton getOkButton() {\r\n\t\tif (okButton == null) {\r\n\t\t\ttry {\r\n\t\t\t\tokButton = new JButton();\r\n\t\t\t\tokButton.setText(\"OK\");\r\n\t\t\t\tokButton.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\t\tsetVisible(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t} catch (java.lang.Throwable e) {\r\n\t\t\t\t// TODO: Something\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn okButton;\r\n\t}", "private void setEndingButtons() {\n Button btnFinishEnable = (Button) findViewById(R.id.btnFinish);\n btnFinishEnable.setEnabled(true);\n Button btnNextEnable = (Button) findViewById(R.id.btnNext);\n btnNextEnable.setEnabled(false);\n }", "public static JButton getIncrBet(){\n\t\treturn incrBet;\n\t}", "public void enableEndTurnButton(){\n this.endTurnButton.setEnabled(true);\n }", "public boolean isVisible();", "public boolean isVisible();", "public boolean isVisible();", "boolean isSetEnd();", "public JButton getExitButton() {\n\t\treturn exitButton;\n\t}", "public boolean getEnd(){\n\t\treturn this.isEnd;\n\t}", "@Override\n\tpublic boolean isVisible() {\n\t\treturn this.isVisible;\n\t}", "public boolean shown();", "private void showPlayerButtons() {\n\n\t\tprevious.setVisibility(View.VISIBLE);\n\t\tplay.setVisibility(View.VISIBLE);\n\t\tnext.setVisibility(View.VISIBLE);\n\t}", "public Boolean isVisible();", "public Boolean isVisible();", "public boolean isDisplayed_click_ActivateCoupon_Button(){\r\n\t\tif(click_ActivateCoupon_Button.isDisplayed()) { return true; } else { return false;} \r\n\t}", "public boolean isCardClicked(){\n\t\treturn cardClicked;\n\t}", "public boolean isHidden();", "private boolean visibles() {\r\n return OPT(GO() && visible() && visibles());\r\n }", "public boolean isVisible() {\n\t\treturn true;\n\t}", "public boolean visible() {\n \treturn model.isVisible();\n }", "public boolean isVisible() {\n return true;\n }", "public static native void _setVisible(Element elem, boolean visible) /*-{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telem.style.display = visible ? '' : 'none';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}-*/;", "private JButton getJButton() {\r\n\t\tif (jButton == null) {\r\n\t\t\tjButton = new JButton();\r\n\t\t\tjButton.setText(\"Close\");\r\n\t\t\tjButton.setSize(new Dimension(90,30));\r\n\t\t\tjButton.setLocation(new Point(660, 520));\r\n\t\t\tjButton.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tsetVisible(false);\r\n\t\t\t\t\t_parent.addSelectFields(PageSelectDialog.this);\r\n\t\t\t\t\tUtils.removeWindow(PageSelectDialog.this);\r\n\t\t\t\t\t_parent.setVisible(true);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButton;\r\n\t}", "public JButtonOperator btClose() {\n if (_btClose==null) {\n _btClose = new JButtonOperator(this, \"Close\"); // NOI18N\n }\n return _btClose;\n }", "public boolean getCopilotButton(int button) {\n return copilot.getRawButton(button);\n }", "public boolean getCallCardFragmentVisible() {\n if (mInCallActivity != null && mInCallActivity.getCallCardFragment() != null) {\n return mInCallActivity.getCallCardFragment().isVisible();\n }\n return false;\n }", "public void displayTableHandUI() {\n\t\tList<PlayerCardArray> tableHandCards = gameLogic.getTableHand().getTableHand();\n\t\tdrawNoti(null);\n\t\tbtnCardA.setVisible(false);\n btnCardB.setVisible(false);\n btnCardC.setVisible(false);\n btnCardD.setVisible(false);\n\n\t\tfor (PlayerCardArray playerCard: tableHandCards){\n\t\t\tCard playedCard = playerCard.getPlayerCard();\n\t\t\t\n\t\t\tif (playerCard.getPlayerId() == 0){\n\t\t try {\n\t\t \tImageIcon cardImg = playedCard.getCardImage();\n\t\t \tbtnCardA.setIcon(new ImageIcon(cardImg.getImage().getScaledInstance(cardWidth, cardHeight, java.awt.Image.SCALE_SMOOTH)));\n\t\t } catch (NullPointerException e){\n\t\t \tSystem.out.println(\"Image not found\");\n\t\t \tbtnCardA.setText(\"Not found\");\n\t\t }\n\n\t\t btnCardA.setVisible(true);\n\n\t\t\t} else if (playerCard.getPlayerId() == 1){\n\t\t try {\n\t\t \tImageIcon cardImg = playedCard.getCardImage();\n\t\t \tbtnCardB.setIcon(new ImageIcon(cardImg.getImage().getScaledInstance(cardWidth, cardHeight, java.awt.Image.SCALE_SMOOTH)));\n\t\t } catch (NullPointerException e){\n\t\t \tSystem.out.println(\"Image not found\");\n\t\t \tbtnCardB.setText(\"Not found\");\n\t\t }\n\n\t\t btnCardB.setVisible(true);\n\t\t\t}\n\n\t\t\tif (playerCard.getPlayerId() == 2) {\n\t\t try {\n\t\t \tImageIcon cardImg = playedCard.getCardImage();\n\t\t \tbtnCardC.setIcon(new ImageIcon(cardImg.getImage().getScaledInstance(cardWidth, cardHeight, java.awt.Image.SCALE_SMOOTH)));\n\t\t } catch (NullPointerException e){\n\t\t \tSystem.out.println(\"Image not found\");\n\t\t \tbtnCardC.setText(\"Not found\");\n\t\t }\n\n\t\t btnCardC.setVisible(true);\n\t\t\t}\n\n\t\t\tif (playerCard.getPlayerId() == 3) {\n\t\t try {\n\t\t \tImageIcon cardImg = playedCard.getCardImage();\n\t\t \tbtnCardD.setIcon(new ImageIcon(cardImg.getImage().getScaledInstance(cardWidth, cardHeight, java.awt.Image.SCALE_SMOOTH)));\n\t\t } catch (NullPointerException e){\n\t\t \tSystem.out.println(\"Image not found\");\n\t\t \tbtnCardD.setText(\"Not found\");\n\t\t }\n\n\t\t btnCardD.setVisible(true);\n\t\t\t}\n\t\t}\n\t\testimationGame.validate();\n\t\testimationGame.repaint();\n\t}", "public boolean isCancelButtonPresent() {\r\n\t\treturn isElementPresent(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"Cancel\"), SHORTWAIT);\r\n\t}", "public boolean getVisibility() {\n return GtkEntry.getVisibility(this);\n }", "private BButton getBtnCancel() {\r\n\t\tif (btnCancel == null) {\r\n\t\t\tbtnCancel = new BButton();\r\n\t\t\tbtnCancel.setText(\"Cancel\");\r\n\t\t\tbtnCancel.setPreferredSize(new Dimension(100, 29));\r\n\t\t}\r\n\t\treturn btnCancel;\r\n\t}", "private Component getButtonPanel() {\r\n\r\n logger.entering(this.getClass().getName(), \"getButtonPanel\");\r\n\r\n JButton btnOK = new JButton(\"OK\");\r\n\r\n btnOK.addActionListener(new ActionListener() {\r\n\r\n public void actionPerformed(@SuppressWarnings(\"unused\")\r\n final ActionEvent e) {\r\n updateMsdtFilterMap();\r\n\t\t\t\tclosePanel();\r\n }\r\n });\r\n\r\n JButton btnApply = new JButton(\"Apply\");\r\n\r\n btnApply.addActionListener(new ActionListener() {\r\n\r\n public void actionPerformed(@SuppressWarnings(\"unused\")\r\n final ActionEvent e) {\r\n updateMsdtFilterMap();\r\n }\r\n });\r\n\r\n JButton btnCancel = new JButton(\"Cancel\");\r\n\r\n btnCancel.addActionListener(new ActionListener() {\r\n\r\n public void actionPerformed(@SuppressWarnings(\"unused\")\r\n final ActionEvent e) {\r\n\t\t\t\tclosePanel();\r\n }\r\n });\r\n\r\n JButton btnClearAll = new JButton(\"Clear all\");\r\n\r\n btnClearAll.addActionListener(new ActionListener() {\r\n\r\n @SuppressWarnings( {\"synthetic-access\", \"unqualified-field-access\"})\r\n public void actionPerformed(@SuppressWarnings(\"unused\")\r\n final ActionEvent e) {\r\n for (JCheckBox chkMsdt : chkMsdtSelection.values()) {\r\n chkMsdt.setSelected(false);\r\n }\r\n\r\n }\r\n });\r\n\r\n JButton btnRestore = new JButton(\"Restore\");\r\n\r\n btnRestore.addActionListener(new ActionListener() {\r\n\r\n public void actionPerformed(@SuppressWarnings(\"unused\")\r\n final ActionEvent e) {\r\n refreshCheckBoxes();\r\n\r\n }\r\n\r\n });\r\n\r\n JPanel pnlButtons = new JPanel();\r\n\r\n pnlButtons.add(btnRestore);\r\n\r\n pnlButtons.add(btnClearAll);\r\n\r\n pnlButtons.add(btnCancel);\r\n\r\n pnlButtons.add(btnApply);\r\n\r\n\t\tpnlButtons.add(btnOK);\r\n\r\n logger.exiting(this.getClass().getName(), \"getButtonPanel\", pnlButtons);\r\n\r\n return pnlButtons;\r\n }", "@Override\n public void onClick(View v) {\n if (v == ButtonCar1){\n if(red_line.isVisible()){\n red_line.setVisible(false);\n }\n if(yellow_line.isVisible()){\n yellow_line.setVisible(false);\n }\n else{\n yellow_line.setVisible(true);\n }\n }\n\n if( v == ButtonCar2) {\n if(yellow_line.isVisible()){\n yellow_line.setVisible(false);\n }\n if(red_line.isVisible()){\n red_line.setVisible(false);\n }\n else{\n red_line.setVisible(true);\n }\n }\n\n\n }", "public Component exitButton() {\n exitButton = new JButton(\"Exit\");\n setFocusable(false);\n return exitButton;\n }", "public WebElement get123BankingCancelBtn() {\n\t\tWebDriverWait wait = new WebDriverWait(driver, 20);\n\t\treturn wait.until(ExpectedConditions.elementToBeClickable(findElement(\n\t\t\t\trepositoryParser, PAGE_NAME, \"123BankingCancelBtn\")));\n\t}", "public void show() {\r\n\t\tfor (int id = 0; id <= maxId; id++) {\r\n\t\t\tif (buttonArray[id] != null)\r\n\r\n\t\t\t\tif (buttonArray[id].isVisible())\r\n\t\t\t\t\tbuttonArray[id].show();\r\n\t\t}\r\n\t}", "public void hideCreditsButton()\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.HIDE_CREDITS_BUTTON;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n }", "public boolean isIndicatorVisible() {\n return isIndicatorVisible;\n }", "public boolean isVisible() {\n return true;\n }", "public boolean isEditButtonPresent() {\r\n\t\treturn isElementVisible(\r\n\t\t\t\tuploadButton.replace(\"ant-btn uploadVehicleMarkerBtn\", \"ant-btn ant-btn-primary ant-btn-circle\"),\r\n\t\t\t\tSHORTWAIT);\r\n\t}", "public boolean isCenterDown() {\n return pm.pen.getButtonValue(PButton.Type.CENTER);\n }", "public boolean isVisible(Color c) {\n if(this.playerColor == c) \n isVisible = true;\n else\n isVisible = false; \n return isVisible;\n }" ]
[ "0.5930222", "0.5879484", "0.5859425", "0.5760267", "0.5707119", "0.5680217", "0.5676558", "0.5661946", "0.5587071", "0.55866104", "0.5510846", "0.54960424", "0.5448282", "0.54266214", "0.5413796", "0.5389736", "0.53748745", "0.5360074", "0.5359848", "0.53596073", "0.53594995", "0.53594995", "0.53495526", "0.53444695", "0.5338192", "0.53102684", "0.53102684", "0.5306344", "0.53024125", "0.5301659", "0.5287054", "0.528384", "0.52808523", "0.52783245", "0.526733", "0.5262995", "0.5258608", "0.5255671", "0.5234746", "0.52287394", "0.5226009", "0.5215617", "0.52120703", "0.521101", "0.5210016", "0.5200977", "0.52008224", "0.51914954", "0.51877403", "0.51749086", "0.51634085", "0.5162013", "0.5162012", "0.5138022", "0.5130195", "0.51296854", "0.51239043", "0.5117823", "0.51153857", "0.5114497", "0.5113287", "0.5108198", "0.5106284", "0.51005596", "0.51005596", "0.51005596", "0.5097094", "0.5093543", "0.5082277", "0.507928", "0.5074888", "0.5066046", "0.5059206", "0.5059206", "0.50498015", "0.50488555", "0.5047316", "0.50382817", "0.50374186", "0.5034927", "0.5032679", "0.5030964", "0.5030793", "0.503049", "0.5009208", "0.50077283", "0.5007613", "0.49965292", "0.49946782", "0.49895647", "0.49794385", "0.49762884", "0.49753776", "0.49720034", "0.49611732", "0.49609476", "0.4960748", "0.49577424", "0.49550205", "0.49518782", "0.49493918" ]
0.0
-1
Gets the risk current player.
public RiskPlayerModel getRiskCurPlayer() { return risk.curPlayer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getCurrentPlayer() {\n return player;\n }", "public int getCurrentPlayer() {\n\t\treturn player;\n\t}", "@Override\n public String getCurrentPlayer() {\n return godPower.getCurrentPlayer();\n }", "public Player getCurrentPlayer(){\n return this.currentPlayer;\n }", "public User getCurrentPlayer() {\n\t\treturn currentPlayer;\n\t}", "public Player getCurrentPlayer() {\n return currentPlayer;\n }", "public Player getCurrentPlayer() {\n return currentPlayer;\n }", "public String getCurrentPlayer() {\n\t\treturn _currentPlayer;\n\t}", "public final Player getPlayer() {\n return player;\n }", "public Player getCurrentPlayer()\n\t{\n\t\treturn current;\n\t}", "public Player getPlayer() {\r\n return world.getPlayer();\r\n }", "public Player getPlayer() {\n\t\treturn this.player;\r\n\t}", "public Player getPlayer() {\n\t\treturn this.player;\n\t}", "public String getCurrentPlayer() {\r\n return this.playerIds[this.currentPlayer];\r\n }", "public int getPlayer() {\r\n\t\treturn myPlayer;\r\n\t}", "public int getCurrentPlayer(){\n return this.currentPlayer;\n }", "public Player currentPlayer() {\n\t\treturn (currentPlayer);\n\t}", "public String getCurrentPlayer() {\n return currentPlayer;\n }", "public Player getCurrentPlayer(){\n String playerId = getUser().get_playerId();\n\n Player player = null;\n\n try {\n player = getCurrentGame().getPlayer(playerId);\n } catch(InvalidGameException e) {\n e.printStackTrace();\n System.out.println(\"This is the real Error\");\n }\n\n return player;\n }", "public int getPlayer() {\r\n\t\treturn player;\r\n\t}", "public Player getPlayer() {\r\n\t\treturn player;\r\n\t}", "public Player getPlayer() {\n\t\t\treturn player;\n\t\t}", "public Strider getPlayer() {\n return player;\n }", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public Player getPlayer() {\n\t\treturn player;\n\t}", "public ServerPlayer getCurrentPlayer() {\r\n\t\treturn this.currentPlayer;\r\n\t}", "public Player getPlayer()\r\n\t{\r\n\t\treturn mPlayer;\r\n\t}", "public Player getClientPlayer() {\n\t\treturn players.get(0);\n\t}", "public Player getPlayer(){\n\t\treturn this.player;\n\t}", "public Player getPlayer() {\n\t\treturn p;\n\t}", "protected Player getPlayer() {\n return getGame().getPlayers().get(0);\n }", "public Player getPlayer(){\r\n\t\treturn acquiredBy;\r\n\t}", "public int getPlayer()\n {\n return this.player;\n }", "public PlayerID getPlayer(){\n\t\treturn this.player;\n\t}", "Player getCurrentPlayer();", "Player getCurrentPlayer();", "public char getCurrentPlayer() {\n\t\treturn currentPlayer;\n\t}", "@Override\n public Player getWinningPlayer() {\n return wonGame ? currentPlayer : null;\n }", "public Player getPlayer() {\n return player;\n }", "public String getPlayer() {\r\n return player;\r\n }", "public static Player getCurrPlayer(){\n\t\treturn players.get(curr);\n\t}", "public Sprite getPlayer() {\n\t\treturn player;\n\t}", "public AbstractGameObject getPlayer() {\n return this.player;\n }", "public static EntityPlayer getPlayer() {\n\t\treturn ModLoader.getMinecraftInstance().thePlayer;\n\t}", "public Player getPlayer() {\r\n return player;\r\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer()\r\n {\r\n return player;\r\n }", "public Player getPlayer() {\n return (roomPlayer);\n }", "public Piece getCurrPlayer() {\n return this.currPlayer;\n }", "public Player getPlayer();", "public Player getPlayer();", "public int getActivePlayer() {\n return activePlayer;\n }", "public String getPlayer() {\n return p;\n }", "public Player getPlayer() {\n return p;\n }", "public PlayerEntity getPlayer() {\n return player;\n }", "public PlayerEntity getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return humanPlayer;\n }", "Player currentPlayer();", "@java.lang.Override\n public POGOProtos.Rpc.CombatProto.CombatPlayerProto getPlayer() {\n return player_ == null ? POGOProtos.Rpc.CombatProto.CombatPlayerProto.getDefaultInstance() : player_;\n }", "public Player getActivePlayer() {\r\n return activePlayer;\r\n }", "public PlayerCode getPlayerCode(){\n\t\treturn this.playerCode;\n\t}", "protected Player getPlayer() { return player; }", "public Player getActivePlayer() {\n return activePlayer;\n }", "@Override\n public int getWinner()\n {\n return currentPlayer;\n }", "public char getPlayer() {\n return player;\n }", "public Player getActivePlayer() {\n if (getActiveColor() == Piece.COLOR.RED)\n return getRedPlayer();\n else\n return getWhitePlayer();\n }", "Player getPlayer();", "public Dalek getPlayer() {\n return dalek;\n }", "String getPlayer();", "public Player getPlayer() {\n return me;\n }", "public Player getPlayer() { return player; }", "public Player getCurrent(){\n\t\tPlayer p;\n\t\ttry{\n\t\t\tp = this.players.get(this.currElem);\n\t\t\t\n\t\t} catch(IndexOutOfBoundsException e){\n\t\t\tSystem.out.println(\"There isn't any players.\");\n\t\t\tp = null;\n\t\t}\n\t\t\t\n\t\treturn p; \n\t}", "public int activePlayer() {\n return this.activePlayer;\n }", "public Player getOtherPlayer() {\n if (getCurrentPlayer().getNumber() == 1) {\n return joueur2;\n } else {\n return joueur1;\n }\n }", "public static int getPlayerScore()\r\n\t{\r\n\t\treturn playerScore;\r\n\t}", "public ViewerManager2 getPlayer() {\n return this.player;\n }", "public Player getRedPlayer() {\n return redPlayer;\n }", "public PlayerProfile getPlayer(P player){\n\n if(playerMap.containsKey(player)){\n //Player is safe to send\n return playerMap.get(player);\n } else {\n //Player isn't safe to send\n System.out.println(\"Tried to grab player \" + player.getName() + \"'s data, but it's not available\");\n return null;\n }\n }", "public POGOProtos.Rpc.CombatProto.CombatPlayerProto getPlayer() {\n if (playerBuilder_ == null) {\n return player_ == null ? POGOProtos.Rpc.CombatProto.CombatPlayerProto.getDefaultInstance() : player_;\n } else {\n return playerBuilder_.getMessage();\n }\n }", "public PlayerModel getOwnerPlayer() {\r\n\t\treturn ownerPlayer;\r\n\t}", "public Player getRedPlayer() {\n\t\treturn redPlayer;\n\t}", "public BufferedImage getPlayerImage() {\n return playerImg;\n }", "@Override\n\tpublic Player getPlayer() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getPlayer() {\n\t\treturn null;\n\t}", "public Player getPlayer() { return player;}", "public Player getInactivePlayer() {\n if (redPlayer.equals(getActivePlayer()))\n return whitePlayer;\n else\n return redPlayer;\n }", "public String getOtherPlayer() {\n return otherPlayer;\n }", "public Player getCurrentPlayer(Match match) {\r\n LOGGER.debug(\"--> getCurrentPlayer: match=\" + match);\r\n Player currentPlayer;\r\n\r\n if (match.getCurrentPlayer() == 1) {\r\n currentPlayer = match.getPlayer1();\r\n } else if (match.getCurrentPlayer() == 2) {\r\n currentPlayer = match.getPlayer2();\r\n } else if (match.getCurrentPlayer() == 0) {\r\n currentPlayer = match.getPlayer1();\r\n } else {\r\n throw new GeneralException(\"match has no defined currentPlayer!\");\r\n }\r\n\r\n LOGGER.debug(\"<-- getCurrentPlayer\");\r\n return currentPlayer;\r\n }", "public PlayerData getPlayerData() {\n return player;\n }", "public String getPlayerName() {\n return this.playerName;\n }" ]
[ "0.742934", "0.74052316", "0.7360435", "0.73102814", "0.7308852", "0.7301067", "0.7301067", "0.72198385", "0.72081816", "0.7207315", "0.71885186", "0.71748775", "0.71745586", "0.7163667", "0.71607774", "0.71577656", "0.71506095", "0.7140107", "0.7133595", "0.71034104", "0.7099707", "0.7092563", "0.7083311", "0.7080495", "0.7080495", "0.7080495", "0.7080495", "0.7080495", "0.7080495", "0.7080495", "0.70656085", "0.701539", "0.7006837", "0.70066285", "0.69954395", "0.6965395", "0.69435036", "0.6943478", "0.69401133", "0.69388837", "0.69388837", "0.6924794", "0.69168043", "0.69135654", "0.69119513", "0.69082296", "0.68981117", "0.68959165", "0.6837044", "0.6805656", "0.6787854", "0.67712986", "0.67712986", "0.67712986", "0.67712986", "0.67712986", "0.6763381", "0.67166847", "0.66920173", "0.6655006", "0.6655006", "0.6644767", "0.6632271", "0.6626762", "0.66220593", "0.66220593", "0.66161704", "0.6612556", "0.6609687", "0.6589566", "0.65828437", "0.6565236", "0.6564111", "0.65460604", "0.6546009", "0.6506132", "0.6505962", "0.64979184", "0.6490019", "0.6461976", "0.64376533", "0.64273244", "0.64033514", "0.6350994", "0.6332519", "0.6328709", "0.6324886", "0.63166237", "0.62887627", "0.62867653", "0.6283487", "0.62728405", "0.626985", "0.6268557", "0.6254387", "0.6235291", "0.62194777", "0.621852", "0.6188229", "0.6175967" ]
0.82878697
0
Sets the risk current player.
public void setRiskCurPlayer(RiskPlayerModel riskplayermodel) { risk.curPlayer = riskplayermodel; risk.curPlayer.setCard(new RiskCardModel(1, 39)); risk.curPlayer.setCard(new RiskCardModel(1, 39)); risk.curPlayer.setCard(new RiskCardModel(3, 11)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPlayer(Player player) {\n this.currentPlayer = player;\n }", "public void setCurrentPlayer(Player P){\n this.currentPlayer = P;\n }", "@Override\n\tpublic void setPlayer(Player player) {\n\n\t}", "public void setPlayer(Player player) {\n\t\tthis.player = player;\r\n\t}", "public void setPlayer(Player player) {\r\n this.player = player;\r\n }", "public void setPlayer(Player player) {\n this.player = player;\n }", "public void setPlayer(Player player) {\n this.player = player;\n }", "public void setPlayer(Player player) {\n\t\t\tthis.player = player;\n\t\t}", "public void setPlayer(Player player) {\n\t\tthis.player = player;\n\t}", "public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }", "public void setCurrentPlayer(String currentPlayer) {\n\t\t_currentPlayer = currentPlayer;\n\t}", "public void setPlayer(Player player){\r\n\t\tif (!hasBeenAcquired()){\r\n\t\t\tthis.acquiredBy = player;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthrow new IllegalArgumentException(\"Cannot acquire a plot that has already been acquired!\");\r\n\t\t}\r\n\t}", "public void setPlayer(Sprite player) {\n\t\tthis.player = player;\n\t}", "@Override\r\n\tpublic void betPlayValue(int play) {\n\t\trps.setPlay(play);\r\n\t}", "public void setCurrentPlayer(Match match, Integer currentPlayer) {\r\n LOGGER.debug(\"--> setCurrentPlayer\");\r\n\r\n if(currentPlayer < 1 || currentPlayer > 2) {\r\n throw new GeneralException(\"currentPlayer must be '1' or '2'!\");\r\n }\r\n match.setCurrentPlayer(currentPlayer);\r\n sendCurrentPlayerMessage(match);\r\n matchRepository.saveAndFlush(match);\r\n LOGGER.debug(\"--> setCurrentPlayer: \" + currentPlayer);\r\n }", "public void setPlayer(Player p) {\n\t\tplayer = p;\n\t}", "public void setPlayer(int play)\n {\n this.player=play;\n }", "public void setPlayer(Player newPlayer) {\n roomPlayer = newPlayer;\n }", "public void setPlayer(Player player) {\n\t\tthis.player = player;\n\t\tplayer.resetAllPlayerGuesses();\n\t}", "private void setPlayer()\t{\n\t\tgrid.setGameObject(spy, Spy.INITIAL_X, Spy.INITIAL_Y);\n\t}", "public void setPlayer(String player) {\r\n this.player = player;\r\n }", "private void changeCurrentPlayer() {\n switch (currentPlayer) {\n case 0: currentPlayer = 1;\n return;\n default: currentPlayer = 0;\n return;\n }\n }", "public void setCurrentPlayer(User newPlayer) {\n\n\t\tif (currentPlayer != null) {\n\t\t\tif (currentPlayer.equals(newPlayer))\n\t\t\t\treturn;\n\t\t\telse if (newPlayer == null)\n\t\t\t\tthrow new RuntimeException(\"Once a player has been assigned to a Level Pack, it cannot be nulled.\");\n\t\t\telse\n\t\t\t\tthrow new RuntimeException(\"Once a player has been assigned to a Level Pack, it cannot be changed.\");\n\t\t} else if (newPlayer == null)\n\t\t\treturn;\n\t\tcurrentPlayer = newPlayer;\n\t}", "public void setD_CurrentPlayer(Player p_CurrentPlayer) {\n d_CurrentPlayer = p_CurrentPlayer;\n }", "public RiskPlayerModel getRiskCurPlayer() {\r\n\t\treturn risk.curPlayer;\r\n\t}", "public void setPlayer(final AbstractGameObject player) {\n this.player = player;\n this.cameraHelper.setTarget(this.player);\n }", "public void setCurrentTurn(Player player) {\r\n\t\tthis.currentTurn = player;\r\n\t}", "public static void setPlayer(Player p) {\n\t\tUniverse.player = p;\n\t}", "@Override\n\tpublic void startGame(){\n\t\tsuper.currentPlayer = 1;\n\t}", "public void setRedPlayer(Player redPlayer) {\n\t\tthis.redPlayer = redPlayer;\n\t}", "public void setOwnerPlayer( final PlayerModel ownerPlayer ) {\r\n\t\tthis.ownerPlayer = ownerPlayer;\r\n\t}", "private void setPlayer() {\n player = Player.getInstance();\n }", "void setPlayerId(int playerId);", "public void setPlayer(Player player) {\n\n\t\tif (this.player != null) {\n\t\t\tthrow new IllegalStateException(\"The player for this PlayerGuiDisplay has already been set\");\n\t\t}\n\n\t\tthis.player = player;\n\t}", "public static void changePlayer() {\n\t\tvariableReset();\n\t\tif (curPlayer == 1)\n\t\t\tcurPlayer = player2;\n\t\telse\n\t\t\tcurPlayer = player1;\n\t}", "public static void setPlayerScore(int score)\r\n\t{\r\n\t\tGame.playerScore = score;\r\n\t}", "public void setCurrentScore(int currentScore) {\n this.currentScore = currentScore;\n }", "public void setPlayer(Player player) {\n if(humanPlayer != null) {\n throw new IllegalArgumentException(\"The player has already been set to \"\n + humanPlayer.getName() + \" with the game piece \" + humanPlayer.getPiece());\n }\n if(player == null) {\n throw new IllegalArgumentException(\"Player cannot be null.\");\n }\n humanPlayer = player;\n }", "@Override\r\n\tpublic void setTheOwner(Player owner) {\n\t\t\r\n\t}", "public void setOwner(Player player) {\n owner = player;\n }", "public void setCurrPlayer(int i) {\n if (currPlayer == -1) {\n currPlayer = i;\n }\n }", "public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}", "public void setControllable(Rowdy player) {\r\n\t\tthis.player = player;\r\n\t}", "public void setPlayer(Player _player) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n player = _player;\n }", "public void setNewScore(String player, int score) {\n\t\t\n\t}", "private void setJail(Player currentPlayer){\n currentPlayer.setCurrentPosition(10);\n currentPlayer.setJail(true);\n }", "private void setBlackPlayer(Player player) {\r\n\t\tthis.blackPlayer = player;\r\n\t}", "public void setWinner(Player winner) {\n this.winner = winner;\n }", "public void setObjectiveScore(String name, Player player, int value) {\n scoreboard.getObjective(name).getScore(player.getName()).setScore(value);\n }", "public void setPlayer(ViewerManager2 player) {\n this.player = player;\n // the player is needed to be existent befor starting up the remote Server\n //startRemoteServer();\n\n }", "public void setCurrent(ServerPlayer p) {\n\t\tthis.current = p;\n\t}", "public void setAiPlayer(Player player) {\n if(aiPlayer != null) {\n throw new IllegalArgumentException(\"The player has already been set to \"\n + aiPlayer.getName() + \" with the game piece \" + aiPlayer.getPiece());\n }\n if(player == null) {\n throw new IllegalArgumentException(\"Player cannot be null.\");\n }\n aiPlayer = player;\n }", "private void setPlayerScore(Player player, int newScore) {\n\t\tplayer.score = Math.max(newScore, 0);\n\t\tfor (ScoreMarker scoreMarker : playerScoreMarkers) {\n\t\t\tif (scoreMarker.getOwner() == player) {\n\t\t\t\tscoreMarker.value = String.valueOf(player.score);\n\t\t\t}\n\t\t}\n\t}", "private void setWhitePlayer(Player player) {\r\n\t\tthis.whitePlayer = player;\r\n\t}", "public void setOwner(Player owner) {\n\t\tthis.owner = owner;\n\t}", "public void setPlayerRating(long playerRating, IServerCallback callback) {\n\n try {\n JSONObject data = new JSONObject();\n data.put(Parameter.playerRating.name(), playerRating);\n\n ServerCall sc = new ServerCall(ServiceName.matchMaking, ServiceOperation.SET_PLAYER_RATING, data, callback);\n _client.sendRequest(sc);\n } catch (JSONException ignored) {\n }\n }", "public void win(int player)\r\n\t{\r\n\t\taccountValue[player]+=pool;\r\n\t\tendRund();\r\n\t}", "public void setCurrentPlayerName(String name)\n {\n currentPlayerName = name;\n startGame();\n }", "@Override\r\n\tpublic void set(final Player t) {\n\r\n\t}", "public void setPlayer(SuperMario mario){\r\n this.mario = mario;\r\n }", "public void setCurrentPlayerIs(int currentPlayerInt){\n\t\tcurrentPlayerIs = currentPlayerInt;\n\t\trepaint();\n\t}", "void setPlayerTurn() throws RemoteException;", "private void chance(Player currentPlayer) {\n Random rand = new Random();\n int randomNum = rand.nextInt((3 - 1) + 1) + 1;\n\n if(randomNum == 1){\n convertTextToSpeech(\"Advance to Bond Street\");\n currentPlayer.setCurrentPosition(34);\n }\n if(randomNum == 2){\n convertTextToSpeech(\"Unpaid charges. Go to jail\");\n setJail(currentPlayer);\n }\n if(randomNum == 3){\n convertTextToSpeech(\"Build a rooftop swimming pool on your apartment, pay 300\");\n if(m_manageFunds) {\n currentPlayer.subtractMoney(300);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n m_freeParking += 300;\n Log.d(\"chance subtract 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance free parking\", String.valueOf(m_freeParking));\n }\n }\n }", "public void setValue(Player player, T value) {\n\t\tsetValue(player.getUniqueId(), value);\n\t}", "@Override\n\tpublic void setPlayerOneScore(int playerOneScore) {\n\t\tsuper.setPlayerOneScore(playerOneScore);\n\t}", "private void SetCurrentPlayer() throws IOException\n {\n if( mTeamsComboBox.getSelectedItem() != null )\n {\n String team = mTeamsComboBox.getSelectedItem().toString();\n String position = mPositionComboBox.getSelectedItem().toString();\n String playerData = GetPlayerString(team, position);\n if( playerData != null )\n SetPlayerData(playerData);\n }\n }", "@Override\n\tpublic void setBukkitPlayer(final Player bukkitPlayer) {\n\t\tthis.bukkitPlayer = bukkitPlayer;\n\t}", "public void setScore(){\n\t\t//get player's score and change it to the string\n\t\tthis.scoreLabel.setSize(scoreLabel.getPreferredSize().width, \n\t\t\t\tscoreLabel.getPreferredSize().height);\n\t\tthis.scoreLabel.setText(String.valueOf(this.player.getScore()));\n\t}", "public void setxPlayer(Player xPlayer) {\n\t\tthis.xPlayer = xPlayer;\n\t}", "void setRank(KingdomUser user, KingdomRank rank);", "@Override\n\tpublic void setPlayerTurn(int playerTurn) {\n\t\tsuper.setPlayerTurn(playerTurn);\n\t}", "public void setBluePlayer(Player bluePlayer) {\n\t\tthis.bluePlayer = bluePlayer;\n\t}", "public void setPlayers(int theCompPlayer) throws Exception {\r\n\t\tswitch(theCompPlayer) {\r\n\t\t\tcase 1:\r\n\t\t\t\tcompPlayer = 1;\r\n\t\t\t\totherPlayer = 2;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tcompPlayer = 2;\r\n\t\t\t\totherPlayer = 1;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tthrow new Exception(\"That player number is invalid\");\r\n\t\t}\r\n\t}", "public void setStartingStudent(int playerIndex) {\n startingPlayer = playerIndex;\n }", "void setCurrentHP(final int newHP);", "public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }", "private void setPlayer(BoardSquaresState player){\n\t\tif(player == BoardSquaresState.CROSS){\n\t\t\tselectedPlayer = BoardSquaresState.CROSS;\n\t\t\tplayerSelectionButton.setText(R.id.button_title, \"Cross\");\n\t\t\tplayerSelectionButton.setText(R.id.button_subtitle, \"You go first!\");\n\t\t\tplayerSelectionButton.setImageResource(R.id.selector_button_image, R.drawable.cross_1);\n\t\t\tplayerSelectionButton.setImageResource(R.id.item_set_image, R.drawable.btn_check_on_focused_holo_light);\n\t\t}\n\t\telse{\n\t\t\tselectedPlayer = BoardSquaresState.NOUGHT;\n\t\t\tplayerSelectionButton.setText(R.id.button_title, \"Nought\");\n\t\t\tplayerSelectionButton.setText(R.id.button_subtitle, \"Computer goes first!\");\n\t\t\tplayerSelectionButton.setImageResource(R.id.selector_button_image, R.drawable.nought_1);\n\t\t\tplayerSelectionButton.setImageResource(R.id.item_set_image, R.drawable.btn_check_on_focused_holo_light);\n\t\t}\n\n\t}", "public void setFirstTrustedPlayer(@Nullable AnimalTamer player);", "public void setToPlayer(Player player)\n \t{\n \t\t// Define the inventory\n \t\tPlayerInventory inventory = player.getInventory();\n \n \t\t// Clear it all first\n \t\tinventory.clear();\n \t\tinventory.setHelmet(new ItemStack(Material.AIR));\n \t\tinventory.setChestplate(new ItemStack(Material.AIR));\n \t\tinventory.setLeggings(new ItemStack(Material.AIR));\n \t\tinventory.setBoots(new ItemStack(Material.AIR));\n \n \t\t// Set the armor contents\n \t\tif(this.helmet != null) inventory.setHelmet(this.helmet.toItemStack());\n \t\tif(this.chestplate != null) inventory.setChestplate(this.chestplate.toItemStack());\n \t\tif(this.leggings != null) inventory.setLeggings(this.leggings.toItemStack());\n \t\tif(this.boots != null) inventory.setBoots(this.boots.toItemStack());\n \n \t\t// Set items\n \t\tfor(int i = 0; i < 35; i++)\n \t\t{\n\t\t\tinventory.setItem(i, this.items[i].toItemStack());\n \t\t}\n \n \t\t// Delete\n \t\tDemigodsData.jOhm.delete(PlayerCharacterInventory.class, id);\n \t}", "@Override\n public void applyEffect(Player player) {\n\n player.add(mResourcesGains);\n\n }", "public void setFrame(BufferedImage frame) {\r\n\t\tplayer = frame;\r\n\t}", "public void addRock() {\n\t\trock = true;\n\t}", "public void setTriggererPlayer( final PlayerModel triggererPlayer ) {\r\n\t\tthis.triggererPlayer = triggererPlayer;\r\n\t}", "@Override\n\tpublic void applyEffect(Player player) {\n\t\tplayer.setSightRange(7);\n\t}", "public void setSecondTrustedPlayer(@Nullable AnimalTamer player);", "public void surrender() {\n playerCash += playerBet / 2;\n\n //Play dealer's turn\n dealerTurn();\n\n //End the game and change the views\n restartGame();\n }", "public Player(Level currentLevel) {\n\t\tthis.setCurrentLevel(currentLevel);\n\t\tsuper.getCurrentLevel().getInLevelLocation()[0][0].setHasPlayer(true);\n\t\tthis.setCurrentX(0);\n\t\tthis.setCurrentY(0);\n\t\tthis.attack = 10;\n\t\tthis.setHeath(1000);\n\t}", "public Player(int compatibilityScoreSet) {\n this.compatibilityScoreSet = compatibilityScoreSet;\n }", "public void setOpponent(Player opponent) {\n\t\tthis.opponent = opponent;\n\t}", "public void setCurrentPlayer(int index){\n this.currentPlayer=index%4;\n }", "private void setPlayerRoom(){\n player.setRoom(currentRoom);\n }", "public void setKills(Player player, int newCount) {\n\t\tsetStatsProperty(StatsProperty.KILLS, player, newCount);\n\t}", "public void setCurrentPlayerPokemon(int newID)\r\n {\r\n currentPlayerPokemon = newID;\r\n }", "public void setGameRank(Integer gameRank) {\n this.gameRank = gameRank;\n }", "public static void setPerson_to_play(int aPerson_to_play)\n {\n person_to_play = aPerson_to_play;\n }", "public static void setScoreBoard(Player p) {\n\t\n}", "@Override\r\n\tpublic void setComputerValue() {\n\t\trps.setCom((int) (Math.random() * 3 + 1));\r\n\t}", "Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}", "public static void setCurrentScore(Context context,int currentScore)\n {\n SharedPreferences preferences = context.getSharedPreferences(\n context.getString(R.string.preference_key),Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putInt(CURRENT_SCORE_KEY,currentScore);\n editor.apply();\n }", "public void setActivePlayer(int activePlayer)\n\t{\n\t\tthis.activePlayer = activePlayer;\n\t}" ]
[ "0.7032106", "0.68745", "0.6563626", "0.655064", "0.65437186", "0.6520166", "0.64852864", "0.6470748", "0.64332825", "0.64192796", "0.64038104", "0.6392389", "0.63827896", "0.63570595", "0.63280815", "0.63059914", "0.6256588", "0.62502986", "0.62440455", "0.62440324", "0.6243448", "0.62344074", "0.62065", "0.6200972", "0.6157014", "0.6147032", "0.6119488", "0.61185884", "0.61018676", "0.6094358", "0.60851455", "0.60770357", "0.59976", "0.5989866", "0.59699863", "0.59572315", "0.59407675", "0.5936095", "0.591062", "0.59097517", "0.5908746", "0.590649", "0.5898537", "0.58886397", "0.5886583", "0.5885927", "0.58678013", "0.58356255", "0.5827704", "0.57867557", "0.575796", "0.5729574", "0.5715264", "0.5686906", "0.5661483", "0.5659882", "0.5655968", "0.56480664", "0.563716", "0.5604099", "0.5603258", "0.5599974", "0.55885637", "0.55634654", "0.55614036", "0.5560188", "0.55580676", "0.5554589", "0.5543823", "0.55406743", "0.5518858", "0.55170655", "0.5506687", "0.55060965", "0.5499742", "0.5492668", "0.5488528", "0.5474157", "0.5472705", "0.54616666", "0.54543686", "0.5453852", "0.5432613", "0.54325217", "0.5428199", "0.5425251", "0.54247594", "0.5409278", "0.54008776", "0.53972954", "0.53678906", "0.5361614", "0.53560996", "0.53540343", "0.53531903", "0.53431827", "0.5341744", "0.5337098", "0.5334854", "0.53342235" ]
0.73941183
0
Instantiates a new risk controller.
public RiskController() { risk = new RiskGameModel(); initComponents(); initializePhaseView(risk); setLocationRelativeTo(null); setResizable(false); jPanel1.repaint(); jPanel1.addMouseListener(this); AttackButton.setVisible(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static CompanyController initializeController() {\n\n controller = new CompanyController();\n return controller;\n }", "@Override\r\n\tprotected ICardController createController() {\n\t\treturn new ClientCtrl();\r\n\t}", "PolicyController createPolicyController(String name, Properties properties);", "public ProvisioningEngineerController() {\n super();\n }", "public LicenciaController() {\n }", "public PlantillaController() {\n }", "public Controller() {\n super();\n }", "public Controller() {\n super();\n }", "public Controller()\n\t{\n\n\t}", "public ControllerProtagonista() {\n\t}", "public MainController() {\n\t\tcontroller = new Controller(this);\n\t}", "public CreateDocumentController() {\n }", "QualityRisk createQualityRisk();", "public Controller() {\n\t\tthis(null);\n\t}", "public TaxiInformationController() {\n }", "public ControllerEnfermaria() {\n }", "public PremiseController() {\n\t\tSystem.out.println(\"Class PremiseController()\");\n\t}", "public Controller()\r\n\t{\r\n\t\tview = new View();\r\n\t}", "public ProduktController() {\r\n }", "@Override\n\tprotected AbstractManageController createController() {\n\t\tif (m_ctrl == null)\n\t\t\tm_ctrl = new BankKeepController();\n\t\treturn m_ctrl;\n\t}", "public ControllerRol() {\n }", "public ClientController() {\n }", "SpawnController createSpawnController();", "public PersonasController() {\r\n }", "public abstract void initController();", "public EstadoProyectoController() {\n \n }", "Claim() {\n }", "private void initialize() {\n\t\tcontroller = Controller.getInstance();\n\t}", "private ClientController() {\n }", "public ClientAccountViewController() {\n }", "public ControllerTest()\r\n {\r\n }", "PersonalDetailsController(){\n hrDB=new HRDatabase();\n }", "public SearchedRecipeController() {\n }", "public Controller() {\n\t\tenabled = false;\n\t\tloop = new Notifier(new ControllerTask(this));\n\t\tloop.startPeriodic(DEFAULT_PERIOD);\n\t}", "public ProductOverviewController() {\n }", "public IfController()\n\t{\n\n\t}", "private void createGameController() {\n\t\tLog.i(LOG_TAG, \"createGameController\");\n\n\t\tBundle intent = this.getIntent().getExtras();\n\t\t\n\t\tthis.punchMode = intent.getString(\"punchMode\");\n\t\t\n\t\tthis.gameController = new TimeTrialGameController( this.timerTextView,\n\t\t\t\tthis.numberOfPunchesCounterTextView, this.punchMode);\n\t\t\n\t\tthis.gameController.addObserver(this);\n\t}", "public PersonLoginController() {\n }", "public AwTracingController() {\n mNativeAwTracingController = nativeInit();\n }", "public SMPFXController() {\n\n }", "public BankRegistrationController() {\n }", "public Controller(Terms termsConditon1) {\n termsConditon = termsConditon1;\n }", "public TipoInformazioniController() {\n\n\t}", "private Controller() {\n\t\tthis.gui = GUI.getInstance();\n\t\tthis.gui.setController(this);\n\t}", "public reporteController() {\n }", "private ClientController(){\n\n }", "public ProductCategoryController() {\n }", "private void initializeMedicalProfileControllers() {\n trAddNewPetVaccination = MedicalProfileControllersFactory.createTrAddNewVaccination();\n trObtainAllPetVaccinations = MedicalProfileControllersFactory.createTrObtainAllPetVaccinations();\n trUpdatePetVaccination = MedicalProfileControllersFactory.createTrUpdatePetVaccination();\n trDeletePetVaccination = MedicalProfileControllersFactory.createTrDeletePetVaccinations();\n trObtainAllPetIllness = MedicalProfileControllersFactory.createTrObtainAllPetIllnesses();\n trDeletePetIllness = MedicalProfileControllersFactory.createTrDeletePetIllness();\n trAddNewPetIllness = MedicalProfileControllersFactory.createTrAddNewIllness();\n trUpdatePetIllness = MedicalProfileControllersFactory.createTrPetIllness();\n }", "public PacienteController() {\n\t\t\n\t\tatualizarTela();\n\t\t}", "public GenericController() {\n }", "public static SinglController getController(){\n if (scl==null) {\n TemperatureSensor tmpsen = new TemperatureSensor(\"Kitchen\");\n LightSensor lsen = new LightSensor (\"Kitchen\");\n scl=new SinglController(tmpsen,lsen);\n }\n return scl;\n }", "public Controller(RegistryCreator registers,Printer printer) {\n registryCreator = registers;\n this.printer = printer;\n cashRegister = new CashRegister(startingBalance);\n }", "public InventoryController(Context context) {\n super();\n this.userController = new UserController(context);\n }", "public detalleInventarioController() {\n }", "public Controller(int n) {\r\n\t\t// Enhanced Mode\r\n\t\tif (n > 0) {\r\n\t\t\tenhanced = true;\r\n\r\n\t\t\t// keeps track of the number of times that the user has been given a new life\r\n\t\t\t// for reaching\r\n\t\t\t// a scoring threshold\r\n\t\t\tnumLiveUpdated = 0;\r\n\r\n\t\t\t// Initializes/opens the sound files for enhanced mode\r\n\r\n\t\t}\r\n\r\n\t\tinitializeSounds();\r\n\r\n\t\t// Initialize member variables for the new Controller object\r\n\t\thighScore = 0;\r\n\t\tflame = false;\r\n\t\tturnLeft = 0;\r\n\t\tturnRight = 0;\r\n\t\taccelerate = 0;\r\n\t\tshoot = 0;\r\n\t\tspeed = 3;\r\n\r\n\t\t// Record the game and screen objects\r\n\t\tdisplay = new Display(this);\r\n\t\tdisplay.setVisible(true);\r\n\r\n\t\t// Initialize the ParticipantState\r\n\t\tpstate = new ParticipantState();\r\n\r\n\t\t// Set up the refresh timer.\r\n\t\trefreshTimer = new Timer(FRAME_INTERVAL, this);\r\n\r\n\t\t// Clear the transitionTime\r\n\t\ttransitionTime = Long.MAX_VALUE;\r\n\r\n\t\t// Bring up the splash screen and start the refresh timer\r\n\t\tsplashScreen();\r\n\t\trefreshTimer.start();\r\n\t}", "public CustomerController() {\n\t\tsuper();\n\n\t}", "ClaimSoftgoal createClaimSoftgoal();", "public Controller(){\r\n\t\tthis.fabricaJogos = new JogoFactory();\r\n\t\tthis.loja = new Loja();\r\n\t\tthis.preco = 0;\r\n\t\tthis.desconto = 0;\r\n\t}", "private MissaJpaController() {\r\n }", "public PopulationfosaController() {\n }", "public InvoiceMenuBoundary()\n {\n invoiceController = new InvoiceController();\n }", "public ListaSEController() {\n }", "public Controller() {\n this.model = new ModelFacade();\n this.view = new ViewFacade();\n }", "public Controller() {\n\t\tthis.nextID = 0;\n\t\tthis.data = new HashMap<Integer, T>();\n\t}", "DefaultAgent(Controller controller) {\r\n\t\tthis.controller = controller;\r\n\t}", "public static void run(RobotController newRC) {\r\n\t\trc = newRC;\r\n\t\tRobotType rt = rc.getType();\r\n\t\tif (rt.equals(RobotType.ARCHON))\r\n\t\t\trobot = new Archon(rc);\r\n\t\telse if (rt.equals(RobotType.GUARD))\r\n\t\t\trobot = new Guard(rc);\r\n\t\telse if (rt.equals(RobotType.SCOUT))\r\n\t\t\trobot = new Scout(rc);\r\n\t\telse if (rt.equals(RobotType.SOLDIER))\r\n\t\t\trobot = new Soldier(rc);\r\n\t\telse if (rt.equals(RobotType.TTM) || rt.equals(RobotType.TURRET))\r\n\t\t\trobot = new Turret(rc);\r\n\t\telse\r\n\t\t\trobot = new Viper(rc);\r\n\t\twhile (true) {\r\n\t\t\ttry {\r\n\t\t\t\trobot.run();\r\n\t\t\t} catch (GameActionException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tClock.yield();\r\n\t\t}\r\n\t}", "public CreditPayuiController() {\n\t\tuserbl = new UserController();\n\t}", "public PortalController() {\n bank = new Bank();\n }", "public CancerRisk() { this(\"None\", 1.0); }", "private void initializeMedicationControllers() {\n trNewPetMedication = MedicationControllersFactory.createTrNewPetMedication();\n trObtainAllPetMedications = MedicationControllersFactory.createTrObtainAllPetMedications();\n trDeleteMedication = MedicationControllersFactory.createTrDeleteMedication();\n trUpdateMedication = MedicationControllersFactory.createTrUpdateMedication();\n }", "public static CompanyController getInstance() {\n\n if (controller == null)\n initializeController();\n\n return controller;\n }", "ABcontroller(){\n\t\tsuper(50);\n\t\ttimer = new Timer();\n\t}", "public static StudentController get() {\n\t\tif (instance == null) {\n\t\t\tinstance = new StudentController();\n\t\t}\t\t\n\t\treturn instance;\n\t}", "public Matricula_Controller(EntityManager entityManger) {\r\n super(entityManger);\r\n }", "private void initializeWashControllers() {\n trNewPetWash = WashesControllersFactory.createTrNewPetWash();\n trObtainAllPetWashes = WashesControllersFactory.createTrObtainAllPetWashes();\n trDeleteWash = WashesControllersFactory.createTrDeleteWash();\n trUpdateWash = WashesControllersFactory.createTrUpdateWash();\n }", "public ABTemaPropioController(){\n }", "public RegisterCostumerController() {\n this.costumerService = new CostumerService();\n }", "public void init() {\n\t\tkontrolleri1 = new KolikkoController(this);\n\t}", "public Controller()\r\n {\r\n fillBombs();\r\n fillBoard();\r\n scoreBoard = new ScoreBoard();\r\n }", "MatchController createMatchController();", "private CreationViewController getCreationBrowserController(){\n\n FXMLLoader loader = new FXMLLoader(\n getClass().getResource(\"/CreationView.fxml\")\n );\n stage = new Stage(StageStyle.DECORATED);\n try {\n stage.setScene(new Scene(loader.load(), 800, 600));\n } catch (IOException e) {\n return null;\n }\n\n CreationViewController controller = loader.getController();\n builder.ConfigureUIController(controller, stage);\n return controller;\n }", "CrawlController build(CrawlParameters parameters) throws Exception;", "public static Controller getInstance(Context _context) {\r\n if (sInstance == null) {\r\n sInstance = new Controller(_context);\r\n } else {\r\n \tsInstance.mContext = _context;\r\n }\r\n return sInstance;\r\n }", "public LoginController() {\r\n\r\n }", "public DetailPageController() {\n\t\tsuper();\n\t}", "public StudentInteraction() {\n//\t\tsuper();\n\t\tsfCon = new StudentFunctionalityController();\n\t}", "public ControllerException() {\n super();\n }", "public Controller(IView view) {\n\t\tengine = new Engine(this);\n\t\tclock = new Clock();\n\t\tsoundEmettor = new SoundEmettor();\n\t\tthis.view = view;\n\t}", "public BudgetSubAwardController() {\r\n setFunctionType(TypeConstants.DISPLAY_MODE);\r\n initComponents();\r\n registerComponents();\r\n }", "public BankRemittanceListController() {\n\t\t// Default empty constructor.\n\t}", "public DashboardController() {\n }", "public SessionController() {\n }", "public NatureController(final Resources aResources)\r\n\t{\r\n\t\tfinal List<Nature> natures = new ArrayList<Nature>();\r\n\t\tfor (final String natureAndBehavior : aResources.getStringArray(R.array.nature_and_behavior))\r\n\t\t{\r\n\t\t\tnatures.add(new Nature(natureAndBehavior));\r\n\t\t}\r\n\t\tinit(natures);\r\n\t}", "public void init(){\n this.controller = new StudentController();\n SetSection.displayLevelList(grade_comp);\n new DesignSection().designForm(this, editStudentMainPanel, \"mini\");\n }", "public FoodMoodStatsController(NavController navCntrl){\n System.out.println(\"FoodMoodStatsController Class Instantiated.\");\n this.navCntrl= navCntrl;\n }", "public HelloControllerSession() {\n }", "PickController(){\n restrictionList = RestrictionManager.getStandardRestriction();\n }", "protected RBNBControl createRBNBControl(){\r\n\t\tlog.write(\"createRBNBControl() called from \" + this.getClass().getName());\r\n\t\treturn new RBNBControl();\r\n\t}", "public GameRuleController(GuppyController guppyController, PiranhaController piranhaController, FoodController foodController, CoinController coinController, SnailController snailController) {\n this.guppyController = guppyController;\n this.piranhaController = piranhaController;\n this.foodController = foodController;\n this.coinController = coinController;\n this.snailController = snailController;\n }", "Cancion createCancion();" ]
[ "0.6209641", "0.59282666", "0.58700067", "0.58059484", "0.58022594", "0.5787507", "0.5763332", "0.5763332", "0.5727174", "0.5704684", "0.5683147", "0.55980825", "0.5580932", "0.5518774", "0.55049026", "0.5481323", "0.5463006", "0.5459218", "0.544074", "0.5437999", "0.5424871", "0.54092264", "0.5391641", "0.538911", "0.53876925", "0.53690064", "0.53602445", "0.530589", "0.53057694", "0.53055537", "0.529877", "0.52877057", "0.52644324", "0.5258164", "0.52328", "0.52294874", "0.52256763", "0.5222244", "0.5220704", "0.5208796", "0.52038676", "0.5198301", "0.5195248", "0.5164187", "0.5154513", "0.5143509", "0.5130527", "0.51197386", "0.51157355", "0.51122177", "0.5110101", "0.5104656", "0.5103111", "0.5100936", "0.5099548", "0.50926507", "0.5087163", "0.508422", "0.50815094", "0.5072838", "0.50695264", "0.50558686", "0.50469625", "0.5044284", "0.50329", "0.5030107", "0.50229615", "0.5000294", "0.49984598", "0.4996074", "0.49959716", "0.4992722", "0.49927154", "0.49915737", "0.4987643", "0.4983652", "0.49807385", "0.4977807", "0.49686408", "0.4964298", "0.49609685", "0.49605873", "0.49564648", "0.4944974", "0.49442405", "0.49428502", "0.49398056", "0.493891", "0.4936566", "0.4933124", "0.49265647", "0.49257496", "0.4924218", "0.49240798", "0.4919692", "0.49156982", "0.49137315", "0.49133766", "0.49066234", "0.48934993" ]
0.56260324
11
This method is called from within the constructor to initialize the form.
private void initComponents() { jPanel1 = new RiskMapPanelViewController(risk); jPanel3 = new RiskPlayerPanelViewController(risk); statusLabel = new javax.swing.JLabel(); AttackButton = new javax.swing.JButton(); EndButton = new javax.swing.JButton(); FortifyButton = new javax.swing.JButton(); CardButton = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance() .getContext().getResourceMap(RiskController.class); setTitle(resourceMap.getString("Form.title")); // NOI18N setBackground(resourceMap.getColor("Form.background")); // NOI18N setForeground(resourceMap.getColor("Form.foreground")); // NOI18N setName("Form"); // NOI18N jPanel1.setBackground(resourceMap.getColor("jPanel1.background")); // NOI18N jPanel1.setBorder(null); jPanel1.setName("jPanel1"); // NOI18N jPanel1.setLayout(null); jPanel3.setBackground(resourceMap.getColor("jPanel3.background")); // NOI18N jPanel3.setBorder(null); jPanel3.setForeground(resourceMap.getColor("jPanel3.foreground")); // NOI18N jPanel3.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); jPanel3.setName("jPanel3"); // NOI18N jPanel3.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); statusLabel.setFont(resourceMap.getFont("statusLabel.font")); // NOI18N statusLabel.setForeground(resourceMap.getColor("statusLabel.foreground")); // NOI18N statusLabel.setText("New Game"); // NOI18N statusLabel.setName("statusLabel"); // NOI18N jPanel3.add(statusLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(132, 63, 427, -1)); AttackButton.setFont(resourceMap.getFont("AttackButton.font")); // NOI18N AttackButton.setText("Attack"); // NOI18N AttackButton.setName("AttackButton"); // NOI18N AttackButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { AttackButtonMouseClicked(evt); } }); jPanel3.add(AttackButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 10, 89, -1)); EndButton.setVisible(true); EndButton.setFont(resourceMap.getFont("EndButton.font")); // NOI18N EndButton.setText("End"); // NOI18N EndButton.setName("EndButton"); // NOI18N EndButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { EndButtonMouseClicked(evt); } }); jPanel3.add(EndButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(770, 30, -1, 30)); FortifyButton.setVisible(false); FortifyButton.setFont(resourceMap.getFont("FortifyButton.font")); // NOI18N FortifyButton.setText("Fortify"); // NOI18N FortifyButton.setName("Fortify"); // NOI18N FortifyButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { FortifyButtonMouseClicked(evt); } }); jPanel3.add(FortifyButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(661, 30, 90, 30)); CardButton.setVisible(true); CardButton.setFont(resourceMap.getFont("CardButton.font")); // NOI18N CardButton.setText("Card"); // NOI18N CardButton.setName("CardButton"); // NOI18N CardButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { CardButtonMouseClicked(evt); } }); jPanel3.add(CardButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(438, 25, 220, 25)); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 988, Short.MAX_VALUE) .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, 988, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 533, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, 131, Short.MAX_VALUE))); Utility.writeLog("Build the Game Panel"); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public FormCompra() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public FormPemilihan() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public FormListRemarking() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public UploadForm() {\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public muveletek() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public ScheduleForm() {\n initComponents();\n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public form_for_bd() {\n initComponents();\n }", "public PDMRelationshipForm() {\r\n initComponents();\r\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public frmModelMainForm() {\n initComponents();\n }", "public FormCadastroAutomovel() {\n initComponents();\n }", "public PatientUI() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public ValidFrequencyForm() {\r\n initComponents();\r\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public formPrincipal() {\n initComponents();\n }", "public Formulario() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n Utility.centerScreen(this);\n myself = this;\n }", "public FrmMenu() {\n initComponents();\n }", "public AttributeForm() \n {\n initComponents();\n mJerseyNumberUpDown.setModel(new SpinnerNumberModel(0,0,99,1));\n \n m_Parser = new InputParser();\n m_Attributes = new JComboBox[8];\n m_Attributes[0] = m_RSBox;\n m_Attributes[1] = m_RPBox;\n m_Attributes[2] = m_MSBox;\n m_Attributes[3] = m_HPBox;\n m_Attributes[4] = m_PS_BC_PI_KABox;\n m_Attributes[5] = m_PC_REC_QU_KABox;\n m_Attributes[6] = m_ACCBox;\n m_Attributes[7] = m_APBBox;\n\n m_SimAttrs = new JSpinner[4];\n m_SimAttrs[0] = m_Sim1UpDown;\n m_SimAttrs[1] = m_Sim2UpDown;\n m_SimAttrs[2] = m_Sim3UpDown;\n m_SimAttrs[3] = m_Sim4UpDown;\n \n m_DoneInit = true;\n setCurrentState(StateEnum.QB);\n \n }", "public dokter() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public SpeciesForm() {\n initComponents();\n setTitle(Application.TITLE_APP + \" Species\");\n processor = new SpeciesProcessor();\n loadData(); \n \n \n }", "public MusteriEkle() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public JMCF() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public UI() {\n initComponents();\n }", "public FormMenu() {\n initComponents();\n menuController = new MenuController(this);\n menuController.nonAktif();\n }", "public frmPrincipal() {\n initComponents();\n }", "public JfrmPrincipal() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public form2() {\n initComponents();\n }", "public C_AdminForm() {\n initComponents();\n }", "public frmVenda() {\n initComponents();\n }", "public uitax() {\n initComponents();\n }", "public FrmMainVIEW() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public sinavlar2() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public FormPrincipal() {\n initComponents();\n setLocationRelativeTo( null );\n \n }", "public kunde() {\n initComponents();\n }", "private void initComponents() {\n\n\t\tsetName(\"Form\"); // NOI18N\n\t\tsetLayout(new java.awt.BorderLayout());\n\t}", "public RadioUI()\n {\n initComponents();\n }", "public LoginForm() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public PatientRegForm() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public AuditFunctionForm() {\n initComponents();\n init();\n }", "public ReportUi() {\n initComponents();\n }", "public frmAdminAccount() {\n initComponents();\n }", "public ManageStudentForm() {\n initComponents();\n \n initTable();\n \n fillTable();\n \n initMajor();\n setLocationRelativeTo(null);\n \n \n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public P0405() {\n initComponents();\n }", "private void initialize() {\n\t\tjLabel3 = new JLabel();\n\t\tjLabel = new JLabel();\n\t\tthis.setLayout(null);\n\t\tthis.setBounds(new java.awt.Rectangle(0, 0, 486, 377));\n\t\tjLabel.setText(PluginServices.getText(this,\n\t\t\t\t\"Areas_de_influencia._Introduccion_de_datos\") + \":\");\n\t\tjLabel.setBounds(5, 20, 343, 21);\n\t\tjLabel3.setText(PluginServices.getText(this, \"Cobertura_de_entrada\")\n\t\t\t\t+ \":\");\n\t\tjLabel3.setBounds(6, 63, 190, 21);\n\t\tthis.add(jLabel, null);\n\t\tthis.add(jLabel3, null);\n\t\tthis.add(getLayersComboBox(), null);\n\t\tthis.add(getSelectedOnlyCheckBox(), null);\n\t\tthis.add(getMethodSelectionPanel(), null);\n\t\tthis.add(getResultSelectionPanel(), null);\n\t\tthis.add(getExtendedOptionsPanel(), null);\n\t\tconfButtonGroup();\n\t\tlayersComboBox.setSelectedIndex(0);\n\t\tinitSelectedItemsJCheckBox();\n\t\tdistanceBufferRadioButton.setSelected(true);\n\t\tlayerFieldsComboBox.setEnabled(false);\n\t\tverifyTypeBufferComboEnabled();\n\t}", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public asignatura() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public Soru1() {\n initComponents();\n }", "public AnaPencere() {\n initComponents();\n }", "public rentForm() {\n initComponents();\n }", "public frmAfiliado() {\n initComponents();\n \n }", "public ZobrazUdalost() {\n initComponents();\n }", "public Cadastro() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public FrmWorkOn() {\n initComponents();\n }", "public FrmBus() {\n initComponents();\n }", "public Oddeven() {\n initComponents();\n }", "public Patient_Info() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}" ]
[ "0.81588364", "0.80849105", "0.8000614", "0.8000614", "0.8000614", "0.7995327", "0.7934466", "0.79136646", "0.7857457", "0.7804767", "0.778061", "0.77332973", "0.77161396", "0.7704091", "0.7672584", "0.764062", "0.75653464", "0.7549673", "0.75449437", "0.7534028", "0.75017565", "0.7479647", "0.7474375", "0.7467324", "0.74460584", "0.7427799", "0.7426144", "0.74231696", "0.7422431", "0.7416209", "0.7410954", "0.74102527", "0.7407707", "0.74044925", "0.7389169", "0.7387131", "0.73863876", "0.7385221", "0.73848027", "0.7383856", "0.7380838", "0.7379552", "0.73770505", "0.73645025", "0.7360102", "0.7335848", "0.73283", "0.73210907", "0.73170024", "0.7313512", "0.73020774", "0.7302039", "0.72925085", "0.7291159", "0.7278334", "0.7275644", "0.72749203", "0.72745085", "0.7273023", "0.7262423", "0.72557265", "0.7246669", "0.7241101", "0.7238333", "0.7237506", "0.7237506", "0.72356725", "0.7232819", "0.72314", "0.72311336", "0.7226983", "0.72265464", "0.7208158", "0.71981215", "0.7192151", "0.71907794", "0.7187063", "0.7186972", "0.7183249", "0.71674675", "0.7164312", "0.71581984", "0.7154031", "0.7149323", "0.71420175", "0.713832", "0.7138185", "0.71339947", "0.71323", "0.71287537", "0.7121908", "0.71218765", "0.7120753", "0.71185845", "0.7113888", "0.7111239", "0.71101236", "0.7109574", "0.7108957", "0.71046495", "0.71043915" ]
0.0
-1
Attack button mouse clicked.
private void AttackButtonMouseClicked(java.awt.event.MouseEvent evt) {// GEN-FIRST:event_AttackButtonMouseClicked Utility.writeLog("Attack Phase entered"); risk.setState(RiskGameModel.ATTACK); FortifyButton.setVisible(false); EndButton.setVisible(true); statusLabel.setText("Select a territory to attack with"); if (AttackButton.getText().equals("Retreat")) { risk.setState(RiskGameModel.ACTIVE_TURN); risk.aTerritory = null; risk.defenseTerritory = null; if (risk.active == risk.defender) risk.active = risk.curPlayer; risk.defenseNum = 0; risk.attackNum = 0; AttackButton.setText("Attack"); EndButton.setVisible(true); FortifyButton.setVisible(true); statusLabel.setText("What would you like to do?"); jPanel1.repaint(); Utility.writeLog("Attack operation cancelled"); } // AttackButton.setText("Retreat"); risk.notifyPhaseViewChange(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void mousePressed(MouseEvent e){\n String boton = W.detClick( e.getButton() );\n \n //System.out.println(\"->Mouse: Presionando Click \" + boton );\n }", "public void mouseClicked(int ex, int ey, int button) {\r\n\t}", "@Override\n public void mouseClicked(MouseEvent e){\n String boton = W.detClick( e.getButton() );\n \n System.out.println(\" Mouse: Click \" + boton ); \n }", "private void pressed(MouseEvent e)\r\n {\n }", "public void mousePressed() {\n\t\tif(detectCollision(this.p.mouseX,this.p.mouseY)) {\n\t\t\tthis.isPressed = true;\n\t\t\tclick();\n\t\t}\n\t}", "public void mouseClicked(int mouseX, int mouseY, int mouse) {}", "public void mouseClicked(MouseEvent event){}", "public void mouseClicked( MouseEvent event ){}", "void onMouseClicked(MouseEventContext mouseEvent);", "public void mousePressed(MouseEvent event){\n\t\t// We recognized pressing the mouse with a flag\n\t\tclickflag = true;\t\t\n\t}", "@Override\r\n public void mouseClicked(MouseEvent e) {\n System.out.println(e.getButton());\r\n\r\n // MouseEvent.BUTTON3 es el boton derecho\r\n }", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\tif(this.chance==1)\r\n\t\t{\r\n\t\t\tmouseX = arg0.getX();\r\n\t\t\tmouseY= arg0.getY();\r\n\t\t\tclick=1;\r\n\t\t}\r\n\t}", "void mouseClicked(MouseEvent mouseEvent);", "public void mousePressed(MouseEvent e) {}", "public void mousePressed(MouseEvent e) {}", "public void mousePressed(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "@Override\n public void mouseDown(MouseEvent me) {\n if (me.button > 3) {\n return;\n }\n OldFXCanvas.this.sendMouseEventToFX(me, AbstractEvents.MOUSEEVENT_PRESSED);\n }", "public void mouseClicked(MouseEvent mouseClick)\r\n\t{\r\n\t\tmouseClickX = mouseClick.getX();\r\n\t\tmouseClickY = mouseClick.getY();\r\n\t\tmouseClickedFlag = true;\r\n\t\tmouseClickedFlagForWeapon = true;\r\n\t\tmouseClickCount = mouseClick.getClickCount();\r\n\t\tmouseButtonNumber = mouseClick.getButton();\r\n\t\t//System.out.println(\"MouseClickX: \" + mouseClickX);\r\n\t\t//System.out.println(\"MouseClickY: \" + mouseClickY);\r\n\t\t\r\n\t\t\r\n\t}", "public void mousePressed( MouseEvent event ){}", "@Override\n\tpublic void mousePressed(MouseEvent e) {\n\t\tif(!mouseDown) {\n\t\t\tclickButton();\n\t\t}\n\t\tmouseDown = true;\n\t}", "protected void mouseClicked(int par1, int par2, int par3)\n {\n if (this.buttonId >= 0)\n {\n \t// no setting minimap keybinds to mouse button. Can do so if wanted if I change ZanMinimap to not send every input to Keyboard for processing. Check if it's mouse first\n // this.options.setKeyBinding(this.buttonId, -100 + par3);\n // ((GuiButton)this.controlList.get(this.buttonId)).displayString = this.options.getOptionDisplayString(this.buttonId);\n this.buttonId = -1;\n // KeyBinding.resetKeyBindingArrayAndHash();\n }\n else\n {\n super.mouseClicked(par1, par2, par3);\n }\n }", "@Override\n public void clicked(InputEvent e, float x, float y) {\n }", "public void mousePressed (MouseEvent event) {}", "@Override\r\n\tpublic void mousePressed(MouseEvent event ) {\n\t\t\r\n\t\tint whichButton =event.getButton();\r\n\t\tmsg=\"\";\r\n\t\tmsg =\"You Pressed Mouse \" ;\r\n\t\t\r\n\t\tif(whichButton==MouseEvent.BUTTON1)\r\n\t\t\tmsg+=\" BUTTON 1\";\r\n\t\telse if(whichButton==MouseEvent.BUTTON2)\r\n\t\t\tmsg+=\"Button 2\";\r\n\t\telse\r\n\t\t\tmsg+=\"Button 3\";\r\n\t\t\r\n\t\tmsg+=\"You are at position \"+\"<X \"+event.getX()+\" Y \"+event.getY()+\">\";\r\n\t\t\r\n\t\tif(event.getClickCount()==2)\r\n\t\t{\r\n\t\t\tmsg+=\" You double Clicked\";\r\n\t\t}\r\n\t\telse\r\n\t\t\tmsg+=\" You singel-Clicked\";\r\n\t\t\r\n\t\tlabel.setText(msg);\r\n\t\t\r\n\t}", "void mouseClicked(double x, double y, MouseEvent e );", "public void mouseClicked() {\n\t\tswitch(screen) {\n\t\t\n\t\t// Pantalla Home\n\t\tcase 0:\n\t\t\tif((mouseX > 529 && mouseY > 691) && (mouseX < 966 & mouseY < 867)) {\n\t\t\t\t//si hace click adentro del boton de jugar\n\t\t\t\tscreen = 1;\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t// Pantalla Instrucciones\n\t\tcase 1:\n\t\t\t//si hace click adentro de la pantalla\n\t\t\tscreen = 2;\n\t\t\tbreak;\n\t\t}\n\t}", "public void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "public void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "public void mousePressed() {\n }", "public abstract void mouseClicked(MouseEvent e);", "public void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "public void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"vai ficar clikando ai a toa? PATETA\");\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void mousePressed(MouseEvent me) {\r\n\t\tbuttonType = me.getButton();\r\n\t\tselect(me.getX(), me.getY());\r\n\t}", "public void mouseClicked(MouseEvent e) {\n \t\t\r\n \t}", "void mousePressed(double x, double y, MouseEvent e );", "public void mouseClicked(MouseEvent e)\n {}", "public void mousePressed(MouseEvent e) {\n }", "public void mousePressed(MouseEvent e) {\r\n }", "public void mousePressed(MouseEvent arg0) {\n\n }", "public void mousePressed(MouseEvent arg0) {\n\n }", "public void mousePressed(MouseEvent event)\n {\n mouseClicked = true;\n if(gameOver)\n {\n mouseClicked = false;\n gameOver = false;\n gameStarted = false;\n score = 0;\n restartGame();\n pipeTimer.stop();\n startGame.start();\n }\n }", "void mousePressed(MouseEvent mouseEvent);", "@Override\r\n\tpublic void mouseClicked(MouseEvent e)\r\n\t{\r\n\t\tjump();\r\n\t}", "public void mouseClicked(MouseEvent evt) {\r\n }", "public void mouseClicked(MouseEvent e) { \r\n }", "public void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseClicked(MouseEvent arg0) {\n }", "public void mousePressed(MouseEvent e) {\n \t\t\r\n \t}", "public void mousePressed(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mousePressed(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mousePressed(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mousePressed(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "public void mousePressed(MouseEvent event)\r\n {\n }", "public void mouseClicked(MouseEvent event) { \n\t\t\n\t}", "public void mouseClicked(MouseEvent evt) {\n }", "private void button1MousePressed(MouseEvent e) {\n }", "public boolean mouseClicked(gb gui, int mousex, int mousey, int button) {\n/* 233 */ if (button == 0)\n/* 234 */ return transferRect(gui, false); \n/* 235 */ if (button == 1) {\n/* 236 */ return transferRect(gui, true);\n/* */ }\n/* 238 */ return false;\n/* */ }", "public void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "public void mousePressed(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void mousePressed(MouseEvent e)\n { }", "@Override\n public void mouseClicked(MouseEvent e) {\n clicked = true;\n }", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\r\n\t}", "@Override\n public void mouseClicked(MouseEvent e) {\n System.out.println(\"MouseClicked\");\n //kwadrat.clicked();\n trojkat.clicked();\n //kolo.clicked();\n //square.clicked();\n }", "public void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "public void mouseClicked(MouseEvent event)\n\t\t{}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "public void mousePressed(MouseEvent e) {\n \t // Click gauche enfoncé\n \t if (e.getButton() == 1) {\n\t \t app.modifierCurseurVue(Cursor.MOVE_CURSOR);\n\t \t prevX = e.getX();\n\t \t prevY = e.getY();\n \t }\n }", "public void mouseClicked(MouseEvent e) {\n\n }", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\r\n\t\t\t\r\n\t\t}", "public void mousePressed(MouseEvent e) {\n\n }", "public void mouseClicked(MouseEvent event){\n\t\t//Don't do anything, click defined elsewhere\n\t\t//Java clicks are too picky\n\t}", "@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "public void mousePressed(MouseEvent e) {\n }", "public void mouseClicked(MouseEvent e) \t{\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}" ]
[ "0.7763265", "0.77509856", "0.7745663", "0.75806624", "0.75718313", "0.7558848", "0.741501", "0.7405755", "0.73996884", "0.7369248", "0.73355997", "0.73211914", "0.73204917", "0.72858155", "0.72858155", "0.72858155", "0.728392", "0.728392", "0.728392", "0.728392", "0.7283079", "0.7250123", "0.724593", "0.7245362", "0.72432417", "0.7236238", "0.72031164", "0.7178655", "0.71700245", "0.7159892", "0.71483994", "0.71483994", "0.71365625", "0.7133638", "0.7122018", "0.7122018", "0.71185863", "0.7117523", "0.7117446", "0.7116421", "0.7114745", "0.7109334", "0.7102411", "0.7101403", "0.7101403", "0.7096369", "0.7094609", "0.7090834", "0.70907295", "0.7089917", "0.7086968", "0.7086968", "0.70868576", "0.708244", "0.7082088", "0.7082088", "0.7082088", "0.7082088", "0.7081767", "0.7071706", "0.70682275", "0.7065019", "0.7061842", "0.7061659", "0.70603323", "0.7052775", "0.7027538", "0.7027538", "0.70264816", "0.70232743", "0.70223", "0.70200723", "0.7019723", "0.7018399", "0.7018399", "0.70128417", "0.7010043", "0.70098907", "0.7008196", "0.7007039", "0.700565", "0.6996673", "0.6993698", "0.69836396", "0.69836396", "0.69836396", "0.6980942", "0.6980108", "0.6976574", "0.6976574", "0.69764465", "0.69764465", "0.69764465", "0.69764465", "0.69764465", "0.69764465", "0.69764465", "0.69764465", "0.69764465", "0.69699234" ]
0.7038182
66
End button mouse clicked.
private void EndButtonMouseClicked(java.awt.event.MouseEvent evt) {// GEN-FIRST:event_EndButtonMouseClicked risk.nextPlayer(); risk.setState(RiskGameModel.START_TURN); risk.gamePhaseActive(0, 0); risk.active = risk.curPlayer; jPanel3.repaint(); statusLabel.setText("Recieved a bonus of " + risk.curPlayer.getNumberOfArmies()); AttackButton.setVisible(false); EndButton.setVisible(true); FortifyButton.setVisible(false); risk.drawn = false; Utility.writeLog("Current player turn ends"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void endPress();", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\texit_click(e);\r\n\t\t\t}", "public void cancel()\n\t{\n\t\t_buttonHit = true;\n\t}", "private void btnCerrarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCerrarMouseClicked\r\n \r\n System.exit(0);\r\n// TODO add your handling code here:\r\n }", "public void mouseReleased() {\n\t\tthis.isPressed = false;\n\t}", "private void closeBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_closeBtnMouseClicked\n System.exit(0);\n }", "@Override\n public void mouseReleased(MouseEvent e){\n String boton = W.detClick( e.getButton() );\n \n //Obtener cantidad de Clicks\n int clickCont = e.getClickCount();\n \n System.out.println(\"->Mouse: Has soltado Click \" + boton );\n System.out.println(\" Cantidad de Clicks: \" + clickCont );\n }", "public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n }", "@Override\n\tpublic void processExitButtonClick(ProcessButtonObjectEvent e) {\n\t\t\n\t}", "public void mouseExited(MouseEvent e) {}", "public void mouseExited(MouseEvent e) {}", "public void mouseExited(MouseEvent e) {}", "public void mouseExited(MouseEvent e) {}", "public void buttonEndTurn() {\n\t\tendTurn();\n\t\t}", "public void mouseExited(MouseEvent me) {\n endDrag();\n }", "public void mouseExited(MouseEvent event){\t\n\t\t// We left the card without releasing the mouse press, so we're not counting it as a click\n\t\tclickflag = false;\n\t}", "@Override\n protected void clickAction(int numClicks) {\n exit(true);\n }", "public void mouseReleased() {\n super.mouseReleased();\n pressed = false;\n properties.post_mouseReleased(1);\n }", "public void mouseExited (MouseEvent m) {}", "@Override\n public void mousePressed(MouseEvent e){\n String boton = W.detClick( e.getButton() );\n \n //System.out.println(\"->Mouse: Presionando Click \" + boton );\n }", "@Override\n\tpublic void mouseExited() {\n\t\t\n\t}", "void mouseExited(MouseEvent mouseEvent);", "public void mouseOut() {\n process(1);\n }", "public void mouseClicked(int ex, int ey, int button) {\r\n\t}", "@Override\n public void mouseClicked(MouseEvent e){\n String boton = W.detClick( e.getButton() );\n \n System.out.println(\" Mouse: Click \" + boton ); \n }", "public void mouseExited(MouseEvent e)\n {}", "@Override\n public void mouseExited(MouseEvent arg0) {\n \n }", "public void mouseExited(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextColour());//the colour of the text when the cursor is removed\n button.setBackground(coloursObject.getTitlePanelColour());\n }", "public void mouseExited(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "public void mouseExited(MouseEvent arg0) {\n\n }", "public void mouseExited(MouseEvent e)\n { }", "public void mouseExited(MouseEvent e) {\n }", "@Override\n\tpublic void mouseReleased(MouseEvent e) {\n\t\tmouseDown = false;\n\t}", "@Override\n public void done() {\n Toolkit.getDefaultToolkit().beep();\n //close_plan_btn.setEnabled(true);\n setCursor(null); //turn off the wait cursor\n JOptionPane.showMessageDialog(null, \"Plan released !\\n\");\n\n }", "public void mouseExited(MouseEvent e) {\n\n }", "public void mouseReleased(MouseEvent me) {\n endDrag();\n }", "public void mouseExited(MouseEvent evt) {\r\n }", "public void mouseExited(MouseEvent arg0) {\r\n\r\n\t\t/* interrupt sleep because mouse was moved away from the object */\r\n\t\targ0.consume();\r\n\t\tt.interrupt();\r\n\r\n\t\tif (!helpActive) {\r\n\t\t\tpopup.setVisible(false);\r\n\t\t}\r\n\t}", "public void mouseExited(MouseEvent arg0) {\n // TODO Auto-generated method stub\n\n }", "@Override\r\n public void mouseExited(MouseEvent e) {\n }", "@Override\r\n public void mouseExited(MouseEvent e) {\n }", "public void mouseExited(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n public void mouseExited(MouseEvent e){\n }", "private void EndButtonListener() {\n endButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (clickable) {\n Intent intent = createIntent();\n startActivity(intent);\n finish();\n }\n\n }\n });\n }", "@Override\n public void mouseExited(MouseEvent evt) {\n }", "public void mouseExited(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseExited(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseExited(MouseEvent e) {\n\t\t\t\n\t\t}", "private void botonSalirMouseClicked(MouseEvent e) {\n\t\tthis.dispose();\n\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tframe.dispose();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tframe.dispose();\r\n\t\t\t}", "@Override\r\n\tpublic void mouseExited(MouseEvent e) {\n\t\tl1.setText(\"You exited the mouse\");\r\n\t}", "@Override\n public void mouseExited(MouseEvent arg0) {\n\n }", "@Override\n public void mouseExited(MouseEvent e)\n {\n }", "@Override\n public void mouseExited(MouseEvent e)\n {\n }", "public void mouseExited(MouseEvent e) {\n }", "@Override\n public void mouseExited(MouseEvent e) {\n }", "@Override\r\n public void mouseExited(MouseEvent e) {\n }", "@Override\r\n\t\t public void mouseExited(MouseEvent arg0) {\n\t\t }", "@Override\n public void mouseExited(MouseEvent e) {\n }", "@Override\n public void mouseExited(MouseEvent e) {\n }", "@Override\n public void mouseExited(MouseEvent e) {\n }", "@Override\n public void mouseExited(MouseEvent e) {\n }", "@Override\n public void mouseExited(MouseEvent e) {\n }", "@Override\n\tprotected void cmdCloseWidgetSelected() {\n\t\tcmdCloseSelected();\n\t}", "public void mouseExited(MouseEvent e) {\n }", "public void mouseExited(MouseEvent e) {\n \t\t\r\n \t}", "public void mouseExited(MouseEvent e) {\r\n\t}", "public void mouseExited(MouseEvent e) {\n\n }", "@Override\n public void done() {\n Toolkit.getDefaultToolkit().beep();\n //release_plan_btn.setEnabled(true);\n setCursor(null); //turn off the wait cursor\n JOptionPane.showMessageDialog(null, \"Plan released !\\n\");\n\n }", "@Override\n public void mouseExited(MouseEvent e) {\n\n }", "@Override\n public void mouseExited(MouseEvent e) {\n\n }", "@Override\n public void mouseExited(MouseEvent e) {\n\n }", "@Override\n public void mouseExited(MouseEvent e) {\n\n }", "@Override\n public void mouseExited(MouseEvent e) {\n\n }", "@Override\r\n public void handleMouseUpEvent(Mouse.ButtonEvent buttonEvent) {\n }", "public void mouseExited(MouseEvent e) {\n\t\t\r\n\t}", "public void clickedQuitButton(Button button) {\r\n System.exit(0);\r\n }", "public void mouseExited(MouseEvent e) {\n\r\n\t}", "public void mouseExited(MouseEvent arg0) {\n\t\t\t\n\t\t}", "public void jBtnStop_actionPerformed(ActionEvent e3) {\n\t\tSystem.exit(0);\r\n\t\tcontentPane.setVisible(false);\r\n\t\t;\r\n\t}", "@Override\r\n\tpublic void mouseExited(MouseEvent e)\r\n\t{\n\r\n\t}", "public void mouseExited(MouseEvent e)\n\t{\n\t}", "@Override\n public void mouseExited(final MouseEvent event){}", "@Override\r\n\tpublic void mouseExited(MouseEvent arg0) {\n\r\n\t}", "@Override\r\n\tpublic void mouseExited(MouseEvent arg0) {\n\r\n\t}", "@Override\r\n\tpublic void mouseExited(MouseEvent arg0) {\n\r\n\t}", "@Override\r\n\tpublic void mouseExited(MouseEvent arg0) {\n\r\n\t}", "@Override\r\n\tpublic void mouseExited(MouseEvent arg0) {\n\r\n\t}", "@Override\r\n\tpublic void mouseExited(MouseEvent arg0) {\n\r\n\t}", "@Override\r\n\tpublic void mouseExited(MouseEvent arg0) {\n\r\n\t}", "@Override\r\n\tpublic void mouseExited(MouseEvent arg0) {\n\r\n\t}", "public void mouseExited(MouseEvent e)\r\n\t{\r\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tdialogExit();\r\n\t\t\t}", "@Override\r\n\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\r\n\t}" ]
[ "0.7154646", "0.70220137", "0.6989162", "0.69400156", "0.6880983", "0.67964154", "0.6790591", "0.67301905", "0.6720989", "0.67131525", "0.66836613", "0.66836613", "0.66836613", "0.66836613", "0.66707706", "0.6659691", "0.6649803", "0.6649036", "0.66399044", "0.66010404", "0.6595065", "0.6587324", "0.65855616", "0.65787685", "0.6546916", "0.65300107", "0.6528408", "0.6522228", "0.6515088", "0.651088", "0.6494135", "0.6493261", "0.6485382", "0.64824575", "0.64675593", "0.6455869", "0.6455409", "0.6455043", "0.64521", "0.64514506", "0.6449767", "0.6449767", "0.6447895", "0.6446299", "0.6444411", "0.6442346", "0.64372337", "0.64372337", "0.64372337", "0.64334416", "0.6422968", "0.6422968", "0.6421125", "0.6421085", "0.6420652", "0.6420652", "0.6415495", "0.64153445", "0.64121306", "0.64105815", "0.640596", "0.640596", "0.640596", "0.640596", "0.640596", "0.6402936", "0.6402018", "0.63966525", "0.6389909", "0.6385742", "0.6384452", "0.6383903", "0.6383903", "0.6383903", "0.6383903", "0.6383903", "0.6382625", "0.63796556", "0.63779414", "0.6376352", "0.6375758", "0.6375388", "0.6373812", "0.6362727", "0.6362602", "0.6361643", "0.6361643", "0.6361643", "0.6361643", "0.6361643", "0.6361643", "0.6361643", "0.6361643", "0.6361157", "0.63590276", "0.6355539", "0.6355539", "0.6355539", "0.6355539", "0.6355539" ]
0.73278004
0
Fortify button mouse clicked.
private void FortifyButtonMouseClicked(java.awt.event.MouseEvent evt) {// GEN-FIRST:event_FortifyButtonMouseClicked risk.setState(RiskGameModel.FORTIFY); risk.notifyPhaseViewChange(); statusLabel.setText("Select a country move armies from"); Utility.writeLog("Fortify Phase entered"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mouseClicked(int ex, int ey, int button) {\r\n\t}", "@Override\n public void mouseClicked(MouseEvent e){\n String boton = W.detClick( e.getButton() );\n \n System.out.println(\" Mouse: Click \" + boton ); \n }", "@Override\n public void mousePressed(MouseEvent e){\n String boton = W.detClick( e.getButton() );\n \n //System.out.println(\"->Mouse: Presionando Click \" + boton );\n }", "@Override\r\n public void mouseClicked(MouseEvent e) {\n System.out.println(e.getButton());\r\n\r\n // MouseEvent.BUTTON3 es el boton derecho\r\n }", "public void mouseClicked(MouseEvent event){}", "public void mouseClicked( MouseEvent event ){}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(int mouseX, int mouseY, int mouse) {}", "void mouseClicked(MouseEvent mouseEvent);", "private void pressed(MouseEvent e)\r\n {\n }", "void onMouseClicked(MouseEventContext mouseEvent);", "protected void mouseClicked(int par1, int par2, int par3)\n {\n if (this.buttonId >= 0)\n {\n \t// no setting minimap keybinds to mouse button. Can do so if wanted if I change ZanMinimap to not send every input to Keyboard for processing. Check if it's mouse first\n // this.options.setKeyBinding(this.buttonId, -100 + par3);\n // ((GuiButton)this.controlList.get(this.buttonId)).displayString = this.options.getOptionDisplayString(this.buttonId);\n this.buttonId = -1;\n // KeyBinding.resetKeyBindingArrayAndHash();\n }\n else\n {\n super.mouseClicked(par1, par2, par3);\n }\n }", "public void mousePressed(MouseEvent e) {}", "public void mousePressed(MouseEvent e) {}", "public void mousePressed(MouseEvent e) {}", "public void mouseClicked(MouseEvent evt) {\r\n }", "private void button1MousePressed(MouseEvent e) {\n }", "public abstract void mouseClicked(MouseEvent e);", "public void mouseClicked(MouseEvent e)\n {}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseClicked(MouseEvent evt) {\n }", "public void mouseClicked(MouseEvent event) { \n\t\t\n\t}", "public void mousePressed( MouseEvent event ){}", "public void mouseClicked(MouseEvent e) {\n \t\t\r\n \t}", "public void mouseClicked(MouseEvent e) { \r\n }", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "public void mousePressed (MouseEvent event) {}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\r\n\t}", "public void mouseClicked(MouseEvent arg0) {\n }", "public void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "void mouseClicked(double x, double y, MouseEvent e );", "private void button1MouseClicked(MouseEvent e) {\n }", "public void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "public void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\n public void mouseClicked(MouseEvent arg0) {\n \n }", "private void button1MouseClicked(MouseEvent e) {\n\t}", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\r\n\t\t\t\r\n\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t}", "public void mouseClicked(MouseEvent e) {\n\t}", "public void mouseClicked(MouseEvent e) {\n\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "public void mouseClicked(MouseEvent e) {\n\n }", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "public void mouseClicked(MouseEvent event)\n\t\t{}", "public boolean mouseClicked(gb gui, int mousex, int mousey, int button) {\n/* 233 */ if (button == 0)\n/* 234 */ return transferRect(gui, false); \n/* 235 */ if (button == 1) {\n/* 236 */ return transferRect(gui, true);\n/* */ }\n/* 238 */ return false;\n/* */ }", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "public void mouseClicked(MouseEvent e) {\n\n }", "public void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n public void mouseClicked(MouseEvent e) {}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t}" ]
[ "0.82006603", "0.8153724", "0.80696124", "0.79181015", "0.790863", "0.79006535", "0.78206164", "0.78206164", "0.78206164", "0.78206164", "0.778754", "0.77744484", "0.77298445", "0.7707193", "0.7655926", "0.7647068", "0.7647068", "0.7647068", "0.7646129", "0.763888", "0.76292384", "0.76257855", "0.76165086", "0.76165086", "0.761263", "0.7611952", "0.7607717", "0.76004124", "0.7600204", "0.759342", "0.7589295", "0.758468", "0.758468", "0.7572816", "0.75694066", "0.75650626", "0.75650626", "0.7558701", "0.7557481", "0.7557481", "0.7557397", "0.75558335", "0.7549086", "0.7549086", "0.75482327", "0.75461453", "0.75448585", "0.75431454", "0.75390804", "0.7530348", "0.7529335", "0.7529335", "0.7529335", "0.7528444", "0.7528444", "0.7528444", "0.7528338", "0.7528338", "0.7528338", "0.752766", "0.752766", "0.752766", "0.752766", "0.752766", "0.752766", "0.752766", "0.752766", "0.752766", "0.75188136", "0.75188136", "0.75188136", "0.75188136", "0.75188136", "0.75188136", "0.75188136", "0.75188136", "0.75188136", "0.75188136", "0.75188136", "0.75188136", "0.7515101", "0.7510075", "0.75083095", "0.75083095", "0.75083095", "0.75083095", "0.75083095", "0.75083095", "0.75083095", "0.750641", "0.7498696", "0.74969995", "0.74969995", "0.74969995", "0.74969995", "0.74969995", "0.74969995", "0.7491119", "0.7489714", "0.74868435", "0.7484924" ]
0.0
-1
Card button mouse clicked.
private void CardButtonMouseClicked(java.awt.event.MouseEvent evt) {// GEN-FIRST:event_CardButtonMouseClicked // risk.setState(RiskGameModel.TRADE_CARDS); GenerateCardPanel(); toggleCardButtonsPanel(); jPanel1.repaint(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void mouseClicked(MouseEvent e) {\n System.out.println(e.getButton());\r\n\r\n // MouseEvent.BUTTON3 es el boton derecho\r\n }", "public void mouseClicked(int ex, int ey, int button) {\r\n\t}", "@Override\n public void mousePressed(MouseEvent e){\n String boton = W.detClick( e.getButton() );\n \n //System.out.println(\"->Mouse: Presionando Click \" + boton );\n }", "@Override\n public void mouseClicked(MouseEvent e){\n String boton = W.detClick( e.getButton() );\n \n System.out.println(\" Mouse: Click \" + boton ); \n }", "public void mouseClicked(MouseEvent event){}", "public void mouseClicked( MouseEvent event ){}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "@Override\n public void clicked(InputEvent e, float x, float y) {\n }", "void mouseClicked(MouseEvent mouseEvent);", "private void pressed(MouseEvent e)\r\n {\n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "public void mouseClicked(MouseEvent e) { \r\n }", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "public void mousePressed(MouseEvent arg0) {\r\n\t\t//when I am clicked, I will tell the board that I was clicked!\r\n\t\tboard.clicked(this);\t\t\r\n\t}", "@Override\r\n\tpublic void mousePressed(MouseEvent me) {\r\n\t\tbuttonType = me.getButton();\r\n\t\tselect(me.getX(), me.getY());\r\n\t}", "public void mouseClicked(MouseEvent e) {\n \t\t\r\n \t}", "void onMouseClicked(MouseEventContext mouseEvent);", "@Override\n public void mouseClicked(MouseEvent arg0) {\n \n }", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {\n\n }", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "public void mouseClicked(MouseEvent event) { \n\t\t\n\t}", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\r\n\t\t\t\r\n\t\t}", "@Override\n public void mouseClicked(MouseEvent me) {\n }", "public void mouseClicked(MouseEvent e) {\n\n }", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t}", "public void mouseClicked(MouseEvent evt) {\r\n }", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "public abstract void mouseClicked(MouseEvent e);", "@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "public void mouseClicked(MouseEvent e) {\r\n\t}", "public void mousePressed( MouseEvent event ){}", "public void mouseClicked(int mouseX, int mouseY, int mouse) {}", "@Override\n\tpublic void mousePressed(MouseEvent e) {\n\t\tif(!mouseDown) {\n\t\t\tclickButton();\n\t\t}\n\t\tmouseDown = true;\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t}", "public void mousePressed(MouseEvent e) {}", "public void mousePressed(MouseEvent e) {}", "public void mousePressed(MouseEvent e) {}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t}", "private void button1MousePressed(MouseEvent e) {\n }", "@Override\n public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent evt) {\n }", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n public void mouseClicked(MouseEvent event) {\r\n System.out.println(\"clicked\");\r\n\r\n }", "public void mouseClicked(MouseEvent e) \t{\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\n\t}", "public void mouseClicked(MouseEvent e) {\n\t}", "public void mouseClicked(MouseEvent e) {\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "public void mouseClicked(MouseEvent e)\n {}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}" ]
[ "0.7595973", "0.7575885", "0.7448007", "0.744722", "0.7424393", "0.7420378", "0.7346284", "0.7346284", "0.7346284", "0.7346284", "0.73336506", "0.7291689", "0.7281291", "0.7270946", "0.7270946", "0.72636545", "0.72629416", "0.7260139", "0.72573745", "0.72573745", "0.72573745", "0.7244493", "0.7244493", "0.7244493", "0.7244493", "0.7244493", "0.7244493", "0.7244493", "0.72398245", "0.7234078", "0.72251016", "0.7220183", "0.7216951", "0.7204074", "0.7194425", "0.7194425", "0.71889627", "0.71889627", "0.71889627", "0.71889627", "0.71889627", "0.71889627", "0.71889627", "0.71889627", "0.71889627", "0.7186683", "0.71816754", "0.71793026", "0.71793026", "0.7177944", "0.71762884", "0.71762586", "0.7175596", "0.716727", "0.7166523", "0.7156223", "0.7155088", "0.71539164", "0.7152939", "0.7152939", "0.7152939", "0.7152939", "0.7152939", "0.7152939", "0.7149328", "0.7147627", "0.7145568", "0.7143518", "0.7142823", "0.7141967", "0.71408886", "0.71408886", "0.71408886", "0.71377426", "0.71350974", "0.713076", "0.713076", "0.713076", "0.7127034", "0.7127034", "0.71250206", "0.7123026", "0.71229064", "0.71218765", "0.71186054", "0.7108698", "0.7106619", "0.7106619", "0.7106619", "0.7106187", "0.7106187", "0.7106187", "0.71049863", "0.71049863", "0.7102025", "0.710075", "0.710075", "0.710075", "0.710075", "0.710075" ]
0.7566569
2
Toggle card buttons panel.
private Boolean toggleCardButtonsPanel() { // TODO Auto-generated method stub if (risk.getState() == RiskGameModel.REINFORCE || risk.getState() == RiskGameModel.START_TURN) { cardStatusLabel.setText(""); statusPanel.repaint(); return true; } else { cardStatusLabel.setText("Card can be traded only during reinforcement."); statusPanel.repaint(); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void panel_switch(int i)\n\t{\n\t\t\n\t\tthis.setVisible(false);\n\t\tif(i == 1)\n\t\t{\n\t\t\tcards.show(parent.getCards(), \"server\");\n\t\t\t\n\t\t}\n\t\telse if(i == 2)\n\t\t\tcards.show(parent.getCards(), \"profile\");\n\t\telse if(i == 3)\n\t\t\tcards.show(parent.getCards(), \"restrict\");\n\t\t\n\t}", "private void setToggleEvent(GridLayout mainGrid) {\n for (int i = 0; i < mainGrid.getChildCount(); i++) {\n //You can see , all child item is CardView , so we just cast object to CardView\n final CardView cardView = (CardView) mainGrid.getChildAt(i);\n cardView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if (cardView.getCardBackgroundColor().getDefaultColor() == -1) {\n //Change background color\n cardView.setCardBackgroundColor(Color.parseColor(\"#FF6F00\"));\n Toast.makeText(BuyChoose.this, \"State : True\", Toast.LENGTH_SHORT).show();\n\n } else {\n //Change background color\n cardView.setCardBackgroundColor(Color.parseColor(\"#FFFFFF\"));\n Toast.makeText(BuyChoose.this, \"State : False\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n }", "public void editBtnOnclick()\r\n\t{\r\n\t\tif(cardSet.getCards().size() != 0)\r\n\t\t\tMainRunner.getSceneSelector().switchToCardEditor();\r\n\t}", "@FXML\n public void toggle(ActionEvent actionEvent) {\n if (isToggled) {\n cardText.setText(current.getQuestion());\n isToggled = false;\n } else {\n cardText.setText(current.getAnswer());\n isToggled = true;\n }\n }", "public void displayCardUI() {\n\t\tfor (Player player: gameLogic.getArrayOfPlayers().getArrayOfPlayers()) {\n\t\t\tArrayList<Card> playerHandCards = player.getHand().getHand();\n\n\t\t\t/* Displays the card back for Computer 1 */\n\t\t\tif (player.getPlayerId() == 1) {\n\t\t\t\tfloat cardIndex = -1;\n\t\t\t\tint cardLeft = 55;\n\t\t\t\tint cardTop = 235;\n\n\t\t\t\tfor (JButton item: listButton1){\n\t\t\t\t\testimationGame.getContentPane().remove(item);\n\t\t\t\t}\n\t\t\t\tlistButton1.clear();\n\n\t\t\t\tfor (int i = 0; i < playerHandCards.size(); i++) {\n\t\t cardIndex++;\n\n\t\t\t\t\tJButton btnCard1 = new JButton();\n\n\t\t\t\t\tspringLayout.putConstraint(SpringLayout.WEST, btnCard1, (int) (cardLeft),\n\t\t\t SpringLayout.WEST, estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.EAST, btnCard1, (int) (cardLeft + cardHeight),\n\t\t\t SpringLayout.WEST, estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.NORTH, btnCard1, (int) (cardTop + cardIndex * cardWidth), SpringLayout.NORTH,\n\t\t\t estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.SOUTH, btnCard1, (int) (cardTop + (cardIndex + 1) * cardWidth), SpringLayout.NORTH,\n\t\t\t estimationGame.getContentPane());\n\n\t\t\t try {\n String path = GameUI.class.getProtectionDomain().getCodeSource().getLocation().getPath() + \"../images/cards/b.gif\";\n // System.out.println(path);\n \n\t\t ImageIcon img = new ImageIcon(path);\n\t\t btnCard1.setIcon(new ImageIcon(\n\t\t img.getImage().getScaledInstance(cardHeight, cardWidth, java.awt.Image.SCALE_SMOOTH)));\n\t\t } catch (NullPointerException e) {\n\t\t System.out.println(\"Image not found\");\n\t\t btnCard1.setText(\"Not found\");\n\t\t }\n\t\t listButton1.add(btnCard1);\n\t\t\t estimationGame.getContentPane().add(btnCard1);\n\t\t\t }\n\t\t\t}\n\n\t\t\t/* Displays the card back for Computer 2 */\n\t\t\tif (player.getPlayerId() == 2) {\n\t\t\t\tfloat cardIndex = -1;\n\t\t\t\tint cardLeft = 300;\n\t\t\t\tint cardTop = 30;\n\n\t\t\t\tfor (JButton item: listButton2) {\n\t\t\t\t\testimationGame.getContentPane().remove(item);\n\t\t\t\t}\n\t\t\t\tlistButton2.clear();\n\n\t\t\t\tfor (int i = 0; i < playerHandCards.size(); i++) {\n\t\t cardIndex++;\n\n\t\t\t\t\tJButton btnCard2 = new JButton();\n\n\t\t\t\t\tspringLayout.putConstraint(SpringLayout.WEST, btnCard2, (int) (cardLeft + cardIndex * cardWidth),\n\t\t\t SpringLayout.WEST, estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.EAST, btnCard2, (int) (cardLeft + (cardIndex + 1) * cardWidth),\n\t\t\t SpringLayout.WEST, estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.NORTH, btnCard2, cardTop, SpringLayout.NORTH,\n\t\t\t estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.SOUTH, btnCard2, cardTop + cardHeight, SpringLayout.NORTH,\n\t\t\t estimationGame.getContentPane());\n\n\t\t\t try {\n String path = GameUI.class.getProtectionDomain().getCodeSource().getLocation().getPath() + \"../images/cards/b.gif\";\n // System.out.println(path);\n \n\t\t ImageIcon img = new ImageIcon(path);\n\t\t // ImageIcon img = new ImageIcon(this.getClass().getResource(\"images/cards/b.gif\"));\n\t\t btnCard2.setIcon(new ImageIcon(\n\t\t img.getImage().getScaledInstance(cardWidth, cardHeight, java.awt.Image.SCALE_SMOOTH)));\n\t\t } catch (NullPointerException e) {\n\t\t System.out.println(\"Image not found\");\n\t\t btnCard2.setText(\"Not found\");\n\t\t }\n\n\t\t listButton2.add(btnCard2);\n\t\t\t estimationGame.getContentPane().add(btnCard2);\n\t\t \t}\n\t\t\t}\n\n\t\t\t/* Displays the card back for Computer 3 */\n\t\t\tif (player.getPlayerId() == 3) {\n\t\t\t\tfloat cardIndex = -1;\n\t\t\t\tint cardLeft = 750;\n\t\t\t\tint cardTop = 215;\n\n\t\t\t\tfor (JButton item: listButton3) {\n\t\t\t\t\testimationGame.getContentPane().remove(item);\n\t\t\t\t}\n\t\t\t\tlistButton3.clear();\n\n\t\t\t\tfor (int i = 0; i < playerHandCards.size(); i++) {\n\t\t cardIndex++;\n\n\t\t\t\t\tJButton btnCard3 = new JButton();\n\n\t\t\t springLayout.putConstraint(SpringLayout.WEST, btnCard3, (int) (cardLeft),\n\t\t\t SpringLayout.WEST, estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.EAST, btnCard3, (int) (cardLeft + cardHeight),\n\t\t\t SpringLayout.WEST, estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.NORTH, btnCard3, (int) (cardTop + cardIndex * cardWidth), SpringLayout.NORTH,\n\t\t\t estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.SOUTH, btnCard3, (int) (cardTop + (cardIndex + 1) * cardWidth), SpringLayout.NORTH,\n\t\t\t estimationGame.getContentPane());\n\n\t\t\t try {\n String path = GameUI.class.getProtectionDomain().getCodeSource().getLocation().getPath() + \"../images/cards/b.gif\";\n // System.out.println(path);\n ImageIcon img = new ImageIcon(path);\n\t\t // ImageIcon img = new ImageIcon(this.getClass().getResource(\"images/cards/b.gif\"));\n\t\t btnCard3.setIcon(new ImageIcon(\n\t\t img.getImage().getScaledInstance(cardHeight, cardWidth, java.awt.Image.SCALE_SMOOTH)));\n\t\t } catch (NullPointerException e) {\n\t\t System.out.println(\"Image not found\");\n\t\t btnCard3.setText(\"Not found\");\n\t\t }\n\n\t\t listButton3.add(btnCard3);\n\t\t\t estimationGame.getContentPane().add(btnCard3);\n\t\t \t}\n\t\t\t}\n\n\t\t\t/* Displays the cards for Player 0 */\n\t\t\tif (!(player instanceof Computer)) {\n\t\t\t\tSystem.out.println(\"PLAYERS HAND to PLAY: \" + playerHandCards);\n\t\t\t\tint cardLeft = 300;\n\t\t\t\tint cardTop = 675;\n\n\t\t\t\tfloat cardIndex = -1;\n\n\t\t\t\t// remove all UI card\n\t\t\t\tfor (JButton item: listButton){\n\t\t\t\t\testimationGame.getContentPane().remove(item);\n\t\t\t\t}\n\t\t\t\tlistButton.clear();\n\n\t\t\t\tArrayList<Card> listCard = playerHandCards;\n\t\t\t\tArrayList<Card> playableCards = getPlayableCards(player);\n\n\t\t\t\tfor (int i = 0; i < listCard.size(); i++) {\n\t\t cardIndex++;\n\n\t\t Card card = listCard.get(i);\n\t\t\t JButton btnCard = new JButton();\n\t\t\t btnCard.setFocusPainted(false);\n\t\t\t btnCard.setName(i + \"\");\n\n\t\t\t springLayout.putConstraint(SpringLayout.WEST, btnCard, (int) (cardLeft + cardIndex * cardWidth),\n\t\t\t SpringLayout.WEST, estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.EAST, btnCard, (int) (cardLeft + (cardIndex + 1) * cardWidth),\n\t\t\t SpringLayout.WEST, estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.NORTH, btnCard, cardTop, SpringLayout.NORTH,\n\t\t\t estimationGame.getContentPane());\n\t\t\t springLayout.putConstraint(SpringLayout.SOUTH, btnCard, cardTop + cardHeight, SpringLayout.NORTH,\n\t\t\t estimationGame.getContentPane());\n\n\t\t\t try {\n\t\t\t \tImageIcon cardImg = card.getCardImage();\n\t\t\t \tbtnCard.setIcon(new ImageIcon(cardImg.getImage().getScaledInstance(cardWidth, cardHeight, java.awt.Image.SCALE_SMOOTH)));\n\t\t\t } catch (NullPointerException e){\n\t\t\t \tSystem.out.println(\"Image not found\");\n\t\t\t \tbtnCard.setText(\"Not found\");\n\t\t\t }\n\n\t\t\t\t\t/* if the player is the first to play, allow all cards to be played */\n\t\t\t\t\tif (player.getPosition() != 0) {\n\t\t\t\t\t\tif (!(playableCards.contains(card))) {\n\t\t\t\t\t\t\tbtnCard.setEnabled(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t btnCard.addActionListener(new ActionListener() {\n\t\t\t \t@Override\n\t\t\t \tpublic void actionPerformed(ActionEvent e){\n\t\t\t \t\tif (waitingUser){\n\t\t\t \t\t\tint index = Integer.parseInt(btnCard.getName());\n\t\t\t \t\t\tSystem.out.println(\"CLICKING BUTTON CARD NOW: \" + index);\n\t\t\t \t\t\tpassSelectedCard(index);\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t });\n\n\t\t\t listButton.add(btnCard);\n\t \testimationGame.getContentPane().add(btnCard);\n\t\t\t }\n\t\t\t}\n }\n estimationGame.validate();\n estimationGame.repaint();\n\t}", "private void hexToggle() {\n\t\tJPanel content = (JPanel) frame.getContentPane();\n\t\tJPanel innerContent = (JPanel) content.getComponents()[1];\n\t\tComponent[] com = innerContent.getComponents();\n\n\t\tfor (Component button : com) {\n\t\t\tif (button instanceof JButton) {\n\t\t\t\tJButton hexButton = (JButton) button;\n\t\t\t\tif (hexButton.getText().matches(\"[A-F]\")) {\n\n\t\t\t\t\tif (hexButton.isVisible()) {\n\t\t\t\t\t\thexButton.setVisible(false);\n\t\t\t\t\t} else\n\t\t\t\t\t\thexButton.setVisible(true);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setupToggleButtons(){\n\t\ttoggle_textContacts.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n\t\t public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t if (isChecked) {\n\t\t // The toggle is enabled\n\t\t\t if(prefsHandler.getSettings().getIsFirstTextContacts())\n\t\t\t {\n\t\t\t \tshowTextContactsTutorialDialog();\n\t\t\t }\n\t\t\t \n\t\t \tLinearLayout.LayoutParams layout_desc = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n\t\t textContactsSmallFrame.setLayoutParams(layout_desc);\n\t\t } else {\n\t\t \t// resize the frame to just show the top button\n\t\t \tLinearLayout.LayoutParams layout_desc = new LinearLayout.LayoutParams(0, 0);\n\t\t textContactsSmallFrame.setLayoutParams(layout_desc);\n\t\t }\n\t\t }\n\t\t});\n\t\t\n\t\ttoggle_NFRadio.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n\t\t public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t if (!isChecked) {\n\t\t // The toggle is disabled\n\t\t\t if(prefsHandler.getSettings().getIsFirstMusic())\n\t\t\t {\n\t\t\t \tshowMusicTutorialDialog();\n\t\t\t }\n\t\t \t// resize the frame to just show the top button\n\t\t \tLinearLayout.LayoutParams layout_desc = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n\t\t NFRadioSmallFrame.setLayoutParams(layout_desc);\n\t\t } else {\n\t\t \t// the toggle is enabled\n\t\t\t if(prefsHandler.getSettings().getIsFirstNewsFeed())\n\t\t\t {\n\t\t\t \tshowNewsTutorialDialog();\n\t\t\t }\n\t\t\t \n\t\t \tLinearLayout.LayoutParams layout_desc = new LinearLayout.LayoutParams(0, 0);\n\t\t NFRadioSmallFrame.setLayoutParams(layout_desc);\n\t\t }\n\t\t }\n\t\t});\n\t\t\n\t\ttoggle_ShakeToWake.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n\t\t public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t \tif(isChecked&&prefsHandler.getSettings().getIsFirstShakeToWake())\n\t\t {\n\t\t \t\tshowShakeTutorialDialog();\n\t\t }\n\t\t }\n\t\t});\n\t}", "public void toggleButton(){\r\n\t\tImageIcon xImage = new ImageIcon(\"image/x.png\");\t//Inserting image to the button\r\n\t\tImageIcon oImage = new ImageIcon(\"image/o.png\");\t//Inserting image to the button\r\n\t\tfor(int i=0;i<3;i++){\t\t\t\t\t//Update the buttons' text base on array of state\r\n\t\t\tfor(int j=0;j<3;j++){\r\n\t\t\t\t this.b[i][j].setIcon(Exer10.state[i][j]==1?xImage:(Exer10.state[i][j]==2?oImage:null));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void cardsSelected(int button) {\n for (int i = 0; i < mCardsList.size(); i++) {\n if (mCardsList.get(i))\n mCardsList.set(i, false);\n }\n\n mCardsList.set(button, true);\n mClaimRouteView.setRadioButtons();\n mClaimRouteView.toggleChooseButton(true);\n }", "private void btnbckActionPerformed(java.awt.event.ActionEvent evt) {\n CardSequenceJPanel.remove(this);\n CardLayout layout = (CardLayout) CardSequenceJPanel.getLayout();\n layout.previous(CardSequenceJPanel);\n }", "public void switchToTalentPanel() {\r\n this.midPanelCards.show(this.flipPanel, \"TalentPanel\");\r\n }", "private void initializeHideButton() {\n isHidden = false;\n hideButton = new JButton(\"Hide/Reveal\");\n hideButton.setBounds(800, 425, 100, 25);\n hideButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if (isHidden) {\n for (JButton button: cardButtons) {\n button.setVisible(true);\n }\n isHidden = false;\n } else {\n for (JButton button: cardButtons) {\n button.setVisible(false);\n }\n isHidden = true;\n }\n }\n });\n this.add(hideButton);\n }", "public void displayTableHandUI() {\n\t\tList<PlayerCardArray> tableHandCards = gameLogic.getTableHand().getTableHand();\n\t\tdrawNoti(null);\n\t\tbtnCardA.setVisible(false);\n btnCardB.setVisible(false);\n btnCardC.setVisible(false);\n btnCardD.setVisible(false);\n\n\t\tfor (PlayerCardArray playerCard: tableHandCards){\n\t\t\tCard playedCard = playerCard.getPlayerCard();\n\t\t\t\n\t\t\tif (playerCard.getPlayerId() == 0){\n\t\t try {\n\t\t \tImageIcon cardImg = playedCard.getCardImage();\n\t\t \tbtnCardA.setIcon(new ImageIcon(cardImg.getImage().getScaledInstance(cardWidth, cardHeight, java.awt.Image.SCALE_SMOOTH)));\n\t\t } catch (NullPointerException e){\n\t\t \tSystem.out.println(\"Image not found\");\n\t\t \tbtnCardA.setText(\"Not found\");\n\t\t }\n\n\t\t btnCardA.setVisible(true);\n\n\t\t\t} else if (playerCard.getPlayerId() == 1){\n\t\t try {\n\t\t \tImageIcon cardImg = playedCard.getCardImage();\n\t\t \tbtnCardB.setIcon(new ImageIcon(cardImg.getImage().getScaledInstance(cardWidth, cardHeight, java.awt.Image.SCALE_SMOOTH)));\n\t\t } catch (NullPointerException e){\n\t\t \tSystem.out.println(\"Image not found\");\n\t\t \tbtnCardB.setText(\"Not found\");\n\t\t }\n\n\t\t btnCardB.setVisible(true);\n\t\t\t}\n\n\t\t\tif (playerCard.getPlayerId() == 2) {\n\t\t try {\n\t\t \tImageIcon cardImg = playedCard.getCardImage();\n\t\t \tbtnCardC.setIcon(new ImageIcon(cardImg.getImage().getScaledInstance(cardWidth, cardHeight, java.awt.Image.SCALE_SMOOTH)));\n\t\t } catch (NullPointerException e){\n\t\t \tSystem.out.println(\"Image not found\");\n\t\t \tbtnCardC.setText(\"Not found\");\n\t\t }\n\n\t\t btnCardC.setVisible(true);\n\t\t\t}\n\n\t\t\tif (playerCard.getPlayerId() == 3) {\n\t\t try {\n\t\t \tImageIcon cardImg = playedCard.getCardImage();\n\t\t \tbtnCardD.setIcon(new ImageIcon(cardImg.getImage().getScaledInstance(cardWidth, cardHeight, java.awt.Image.SCALE_SMOOTH)));\n\t\t } catch (NullPointerException e){\n\t\t \tSystem.out.println(\"Image not found\");\n\t\t \tbtnCardD.setText(\"Not found\");\n\t\t }\n\n\t\t btnCardD.setVisible(true);\n\t\t\t}\n\t\t}\n\t\testimationGame.validate();\n\t\testimationGame.repaint();\n\t}", "public void switchDeck(Button cardBtn, int i) {\n ActionListener change = new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n currentDeckID = i;\n Deck deck = decks.get(currentDeckID);\n\n titleField.setText(deck.getDeckName());\n titleField.setEditable(false);\n List<String> deckTags = new ArrayList<>(deck.getTags().values());\n tagField.setText(\"\");\n for(String tag : deckTags) {\n tagField.append(\"#\" + tag + \" \");\n }\n tagField.setEditable(false);\n editPanel.remove(saveBtn);\n editPanel.remove(cnclBtn);\n editPanel.remove(createBtn);\n editPanel.add(editBtn);\n editPanel.add(deleteBtn);\n editPanel.setComponentZOrder(editBtn, 0);\n editPanel.setComponentZOrder(deleteBtn, 1);\n editPanel.repaint();\n editPanel.revalidate();\n }\n };\n cardBtn.addActionListener(change);\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\tMenu.currentCard = 4;\r\n\t\t\tCardLayout cl = (CardLayout)(Menu.cardPanel.getLayout());\r\n\t\t\tSystem.out.println( ((JButton)evt.getSource()).getText() );\r\n\t\t\t\r\n\t\t\tcl.show(Menu.cardPanel, \"MATCH_SLIPS_SCREEN\");\r\n\t\t}", "void toggle();", "void toggleButton_actionPerformed(ActionEvent e) {\n this.togglePlot();\n }", "public abstract void toggle();", "@Override\n public void Toggle() {\n\t \n }", "@FXML public void handleToggleButtons() {\n\t\t\n\t\t// binarySplitButton\n\t\tif (binarySplitButton.isSelected()) {\n\t\t\tbinarySplitButton.setText(\"True\");\n\t\t} else {\n\t\t\tbinarySplitButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// collapseTreeButton\n\t\tif (collapseTreeButton.isSelected()) {\n\t\t\tcollapseTreeButton.setText(\"True\");\n\t\t} else {\n\t\t\tcollapseTreeButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// debugButton\n\t\tif (debugButton.isSelected()) {\n\t\t\tdebugButton.setText(\"True\");\n\t\t} else {\n\t\t\tdebugButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// doNotCheckCapabilitiesButton\n\t\tif (doNotCheckCapabilitiesButton.isSelected()) {\n\t\t\tdoNotCheckCapabilitiesButton.setText(\"True\");\n\t\t} else {\n\t\t\tdoNotCheckCapabilitiesButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// doNotMakeSplitPAVButton\n\t\tif (doNotMakeSplitPAVButton.isSelected()) {\n\t\t\tdoNotMakeSplitPAVButton.setText(\"True\");\n\t\t} else {\n\t\t\tdoNotMakeSplitPAVButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// reduceErrorPruningButton\n\t\tif (reduceErrorPruningButton.isSelected()) {\n\t\t\treduceErrorPruningButton.setText(\"True\");\n\t\t} else {\n\t\t\treduceErrorPruningButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// saveInstanceDataButton\n\t\tif (saveInstanceDataButton.isSelected()) {\n\t\t\tsaveInstanceDataButton.setText(\"True\");\n\t\t} else {\n\t\t\tsaveInstanceDataButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// subTreeRaisingButton\n\t\tif (subTreeRaisingButton.isSelected()) {\n\t\t\tsubTreeRaisingButton.setText(\"True\");\n\t\t} else {\n\t\t\tsubTreeRaisingButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// unprunedButton\n\t\tif (unprunedButton.isSelected()) {\n\t\t\tunprunedButton.setText(\"True\");\n\t\t} else {\n\t\t\tunprunedButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// useLaplaceButton\n\t\tif (useLaplaceButton.isSelected()) {\n\t\t\tuseLaplaceButton.setText(\"True\");\n\t\t} else {\n\t\t\tuseLaplaceButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// useMDLcorrectionButton\n\t\tif (useMDLcorrectionButton.isSelected()) {\n\t\t\tuseMDLcorrectionButton.setText(\"True\");\n\t\t} else {\n\t\t\tuseMDLcorrectionButton.setText(\"False\");\n\t\t}\n\t\t\n\t}", "public void putCardMode(){\n for(int i = 0; i<3 ; i++){\n productionButtons[i].setText(\"Put here\");\n ProductionCard card = gui.getViewController().getGame().getProductionCard(i);\n if (card != null && card.getLevel() == 3){\n setEnabled(false);\n } else {\n productionButtons[i].setEnabled(true);\n }\n Gui.removeAllListeners(productionButtons[i]);\n productionButtons[i].addActionListener(new PutCardButtonListener(gui,chosenDeckNumber,i));\n }\n baseProductionPanel.disableButton();\n }", "private void CardButtonMouseClicked(java.awt.event.MouseEvent evt) {// GEN-FIRST:event_CardButtonMouseClicked\r\n\t\t// risk.setState(RiskGameModel.TRADE_CARDS);\r\n\t\tGenerateCardPanel();\r\n\t\ttoggleCardButtonsPanel();\r\n\t\tjPanel1.repaint();\r\n\t}", "private void toggleButtons(boolean enableFlag)\r\n {\r\n for (JButton btn : btnList)\r\n {\r\n btn.setEnabled(enableFlag);\r\n }\r\n }", "private void toggleButtonsEnabled() {\r\n final Button headsBtn = findViewById(R.id.b_heads);\r\n final Button tailsBtn = findViewById(R.id.b_tails);\r\n final Button startBtn = findViewById(R.id.b_startGame);\r\n\r\n headsBtn.setEnabled(false);\r\n tailsBtn.setEnabled(false);\r\n startBtn.setEnabled(true);\r\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tmiddleCardLayout.show(centerPanel, \"1\");\n\t\t\t\t}", "public void Start()\r\n {\r\n \r\n \r\n panel2.setSize(300,500);\r\n \r\n this.setLayout(new BorderLayout());\r\n \r\n \r\n panel.setSize(100, 500);\r\n \r\n label = new JLabel(\"Player 1\");\r\n \r\n \r\n panel.add(label);\r\n \r\n \r\n Border compound = BorderFactory.createCompoundBorder(BorderFactory.createRaisedBevelBorder(), BorderFactory.createLoweredBevelBorder());\r\n panel.setBorder(compound);\r\n //panel2.setBorder(compound);\r\n \r\n \r\n \r\n cards = new ArrayList<Button_Cards>();\r\n \r\n ID = new ArrayList<Integer>();\r\n \r\n hs = new HashMap<Integer, String>();\r\n \r\n hs.put(0, \"bob.png\");\r\n hs.put(1, \"carl.jpg\");\r\n hs.put(2, \"dog.jpg\");\r\n hs.put(3, \"dude.jpg\");\r\n hs.put(4, \"fat.jpg\");\r\n hs.put(5, \"hood.jpg\");\r\n hs.put(6, \"pokerFace.jpg\");\r\n hs.put(7, \"prettyOne.jpg\");\r\n hs.put(8, \"sad_Lary.jpg\");\r\n hs.put(9, \"stickMan.jpg\");\r\n hs.put(10, \"skil.jpg\");\r\n hs.put(11, \"tsour.jpg\");\r\n \r\n for (int j =0;j<12; j++)\r\n {\r\n ID.add(j);\r\n ID.add(j);\r\n }\r\n \r\n Collections.shuffle(ID);\r\n \r\n ImageIcon icon ;\r\n icon = new ImageIcon(getClass().getResource(\"cardBack2.jpg\"));\r\n \r\n for (int i : ID)\r\n {\r\n Button_Cards c = new Button_Cards();\r\n \r\n c.setId(i);\r\n \r\n c.setIcon(icon);\r\n \r\n c.addActionListener(new ActionListener(){\r\n public void actionPerformed(ActionEvent e){\r\n selectedCard = c ; \r\n TurnCard();\r\n }\r\n });\r\n \r\n cards.add(c);\r\n }\r\n \r\n timer = new Timer(500, new ActionListener()\r\n {\r\n public void actionPerformed(ActionEvent ae)\r\n {\r\n Check();\r\n }\r\n });\r\n \r\n timer.setRepeats(false);\r\n \r\n for (Button_Cards c : cards)\r\n {\r\n panel2.add(c);\r\n }\r\n \r\n this.add(panel,BorderLayout.NORTH);\r\n this.add(panel2, BorderLayout.CENTER);\r\n }", "private void doButtons()\n {\n if (scopes.size()>1) addButtons();\n else hideButtons();\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\tMenu.currentCard = 0;\r\n\t\t\tCardLayout cl = (CardLayout)(Menu.cardPanel.getLayout());\r\n\t\t\tSystem.out.println( ((JButton)evt.getSource()).getText() );\r\n\t\t\tcl.show(Menu.cardPanel, \"MAIN_SCREEN\");\r\n\t\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\n\t\t\t\t\tmiddleCardLayout.show(centerPanel, \"2\");\n\t\t\t\t}", "@Override\n public void onClick(View theView) {\n --curIndex;\n curCard = deckOfCards.get(curIndex);\n refreshButtons();\n setFrontSide();\n\n }", "public static void onSwitch() {\n if (switchPanels) {\n //Insert Finanzpanel\n switchPanel.removeAll();\n PaFinance f = new PaFinance();\n switchPanel.add(f);\n switchPanel.updateUI();\n switchPanels = false;\n } else {\n //insert ActionPanel\n switchPanel.removeAll();\n switchPanel.add(paArticle);\n switchPanel.updateUI();\n switchPanels = true;\n //btnSwitch.setEnabled(false);\n }\n }", "void goToWhiteboardSelect(){\n CollaboardGUI.this.setSize(500,500);\n CardLayout layout = (CardLayout) panels.getLayout();\n layout.show(panels, \"whiteboard\");\n }", "public void switchToUpgradePanel() {\r\n this.midPanelCards.show(this.flipPanel, \"UpgradePanel\");\r\n }", "private void initializeCardButton(int index, Card card, ActionListener cardButtonListener) {\n // One layer can only contain 8 cards due to the size of the card button\n // If there are too many cards, the buttons will be placed on the next layer.\n int layer = index / 8;\n\n // cardButtons contains all card buttons of the current player\n cardButtons.add(new JButton());\n cardButtons.get(index).addActionListener(cardButtonListener);\n cardButtons.get(index).setBounds((index % 8) * 100, 350 + layer * 150, 100, 150);\n\n // set color and text of the card button\n switch (card.getColor()) {\n case GREEN:\n cardButtons.get(index).setBackground(java.awt.Color.green);\n break;\n case BLUE:\n cardButtons.get(index).setBackground(java.awt.Color.blue);\n break;\n case YELLOW:\n cardButtons.get(index).setBackground(java.awt.Color.yellow);\n break;\n case RED:\n cardButtons.get(index).setBackground(java.awt.Color.red);\n break;\n }\n if (card.getNumber() != -1) {\n cardButtons.get(index).setText(String.valueOf(card.getNumber()));\n cardButtons.get(index).setFont(new Font(\"Arial\", Font.PLAIN, 20));\n } else {\n String special = \"\";\n switch (card.getSpecial()) {\n case REVERSE:\n special = \"<html>REV- ERSE<html>\";\n break;\n case SKIP:\n special = \"SKIP\";\n break;\n case DRAWTWO:\n special = \"<html>DRAW TWO<html>\";\n break;\n case WILD:\n special = \"WILD\";\n break;\n case WILDDRAWFOUR:\n special = \"<html>WILD DRAW FOUR<html>\";\n }\n cardButtons.get(index).setText(special);\n cardButtons.get(index).setFont(new Font(\"Arial\", Font.PLAIN, 20));\n }\n this.add(cardButtons.get(index));\n }", "@Override\n public void putCardMode() {\n gameboardPanel.putCardMode();\n leaderCardsPanel.disableProductionButtons();\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\tMenu.currentCard = 1;\r\n\t\t\tCardLayout cl = (CardLayout)(Menu.cardPanel.getLayout());\r\n\t\t\tSystem.out.println( ((JButton)evt.getSource()).getText() );\r\n\t\t\tprintPairings();\r\n\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 1;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}", "public void showButtonsSettingsModeSwitch() {\n FloatingActionButton btn_settings = (FloatingActionButton)findViewById(R.id.btn_settings);\n btn_settings.setVisibility(View.VISIBLE);\n\n FloatingActionButton btn_mode_select = (FloatingActionButton)findViewById(R.id.btn_mode_select);\n btn_mode_select.setVisibility(View.VISIBLE);\n\n FloatingActionButton btn_mode_guide = (FloatingActionButton)findViewById(R.id.btn_guided);\n btn_mode_guide.setVisibility(View.VISIBLE);\n }", "@Override\n public void onClick(Card card) {\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 2;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\tcard.next(bootpanel);\n\t\t\tSystem.out.println(\"next\");\n\t\t}", "private void setupButtons() {\n final ButtonGroup btngrp = new ButtonGroup();\n\n for (final AbstractAction actn : myToolActions) {\n final JToggleButton btn = new JToggleButton(actn);\n btn.addActionListener(actn);\n btngrp.add(btn);\n add(btn);\n }\n\n btngrp.clearSelection();\n btngrp.getElements().nextElement().setSelected(true);\n\n }", "private void buttonsPanel(JPanel panel_buttons) {\n\t\t//BUTTON COMPONENETS\n\t\tJButton btnDraw = new JButton(\"DRAW\");\n\t\tbtnDraw.setMinimumSize(new Dimension(81, 34));\n\t\tbtnDraw.setMaximumSize(new Dimension(81, 34));\n\t\tbtnDraw.setOpaque(true);\n\t\tbtnDraw.setBorderPainted(false);\n\t\tbtnDraw.setHideActionText(true);\n\t\tbtnDraw.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\n\t\tbtnDraw.setSelected(true);\n\t\tbtnDraw.setRequestFocusEnabled(false);\n\t\tbtnDraw.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnDraw.setFont(UIManager.getFont(\"ColorChooser.font.green\"));\n\t\tbtnDraw.setBackground(Color.BLACK);\n\t\tbtnDraw.setForeground(Color.GREEN);\n\t\tbtnDraw.setFont(UIManager.getFont(\"ColorChooser.font.green\"));\n\t\t\n\t\tJButton btnReset = new JButton(\"RESET\");\n\t\tbtnReset.setForeground(Color.RED);\n\t\tbtnReset.setFont(UIManager.getFont(\"Button.font\"));\n\t\tbtnReset.setBorder(null);\n\t\tbtnReset.setOpaque(true);\n\t\tbtnReset.setBackground(Color.BLACK);\n\t\tbtnReset.setName(\"\");\n\t\t\n\t\tJButton btnQuit = new JButton(\"QUIT\");\n\t\tbtnQuit.setMaximumSize(new Dimension(81, 29));\n\t\tbtnQuit.setMinimumSize(new Dimension(81, 29));\n\t\tbtnQuit.setOpaque(true);\n\t\tbtnQuit.setBackground(Color.BLACK);\n\t\tbtnQuit.setBorderPainted(false);\n\t\tbtnQuit.setForeground(Color.WHITE);\n\t\tbtnQuit.setFont(UIManager.getFont(\"ColorChooser.font\"));\n\t\tbtnQuit.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t//PANEL LAYOUT FOR BUTTONS\n\t\tGroupLayout gl_panel_Buttons = new GroupLayout(panel_buttons);\n\t\tgl_panel_Buttons.setHorizontalGroup(\n\t\t\tgl_panel_Buttons.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t.addComponent(btnReset, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 106, Short.MAX_VALUE)\n\t\t\t\t.addComponent(btnQuit, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 106, Short.MAX_VALUE)\n\t\t\t\t.addComponent(btnDraw, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 106, Short.MAX_VALUE)\n\t\t);\n\t\tgl_panel_Buttons.setVerticalGroup(\n\t\t\tgl_panel_Buttons.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_Buttons.createSequentialGroup()\n\t\t\t\t\t.addComponent(btnDraw, GroupLayout.PREFERRED_SIZE, 78, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addComponent(btnReset, GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE)\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addComponent(btnQuit, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE))\n\t\t);\n\t\tpanel_buttons.setLayout(gl_panel_Buttons);\n\t}", "@FXML\n private void handleButtonAction(MouseEvent event)\n {\n\n if(event.getTarget() == btn_bcconfig)\n {\n pane_bcconf.setVisible(false);\n pane_rtread.setVisible(false);\n gp_bc.setVisible(false);\n }\n else if (event.getTarget() == btn_bcread)\n {\n pane_bcconf.setVisible(true);\n pane_rtread.setVisible(false);\n if (cb_bcrt.isSelected() == true)\n {\n gp_bc.setVisible(true);\n }\n else\n {\n \t gp_bc.setVisible(false);\n }\n }\n else if (event.getTarget() == btn_rtread)\n {\n pane_bcconf.setVisible(false);\n pane_rtread.setVisible(true);\n }\n }", "public void updateHandCard(ArrayList<Card> handCards, ActionListener cardButtonListener) {\n // first remove all card buttons of the last player\n for (int i = 0; i < cardButtons.size(); i++) {\n this.remove(cardButtons.get(i));\n }\n cardButtons = new ArrayList<JButton>();\n for (int i = 0; i < handCards.size(); i++) {\n initializeCardButton(i, handCards.get(i), cardButtonListener);\n }\n this.repaint();\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\tMenu.currentCard = 2;\r\n\t\t\tCardLayout cl = (CardLayout)(Menu.cardPanel.getLayout());\r\n\t\t\tSystem.out.println( ((JButton)evt.getSource()).getText() );\r\n\t\t\tcl.show(Menu.cardPanel, \"MATCH_RESULTS_SCREEN\");\r\n\t\t}", "private void initPanelDeck() {\r\n\t\tgsp.panelDeck = gsp.createPanel(100, 50, 50, 50, 0, 0, 400, 350);\r\n\t\t\r\n\t\tgsp.buttonDeck = new JButton();\r\n\t\tgsp.setImageIcon(\"Deck\", gsp.buttonDeck);\r\n\t\t\r\n\t\tgsp.labelLastCard = new JLabel();\r\n\t\tgsp.updateLastCardView();\r\n\t\t\r\n\t\tgsp.panelDeck.add(gsp.buttonDeck);\r\n\t\tgsp.panelDeck.add(gsp.labelLastCard);\r\n\t}", "public void switchToTowerPanel() {\r\n this.midPanelCards.show(this.flipPanel, \"TowerPanel\");\r\n }", "public void toggle() { this.isOpen = !this.isOpen; }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\n\t\t\t\t\tmiddleCardLayout.show(centerPanel, \"3\");\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}", "public void toggle() {\n if (isExpanded()) {\n collapse();\n } else {\n expand();\n }\n }", "void toggleToolboxButton(JButton button){\r\n // Reset Selections\r\n Selection.setSelected(false);\r\n Wire.setSelected(false);\r\n RotateRight.setEnabled(true);\r\n RotateLeft.setEnabled(true);\r\n InsertSubComponent.setSelected(false);\r\n\r\n // Select this button\r\n button.setSelected(true);\r\n \r\n optionsPanel.setVisible(false);\r\n circuitPanel.removeUnfixedComponents();\r\n }", "public void actionPerformed(ActionEvent e) {\n String action = e.getActionCommand();\n \n System.out.println(action);\n if (action.equals(\"Grid\")) {\n JToggleButton button = (JToggleButton)e.getSource();\n showGrid = button.isSelected();\n frame.repaint();\n }\n }", "@Override\n\tprotected void loadButtons() {\n\t\tList<Button> buttons = new ArrayList<>();\n\t\tfinal int square_size = 100;\n\t\tfinal int seperator_size = 20;\n\t\tfinal int numButtons = 2;\n\t\tint y = (getHeight() - 100) / 2;\n\t\tint x = (getWidth() - (square_size * numButtons) - (seperator_size * (numButtons - 1))) / 2;\n\t\tint sep = square_size + seperator_size;\n\t\t// Paint button.\n\t\ttry {\n\t\t\tbuttons.add(new Button(getImage(IconHandler.path_paint), \"Toggle paint\", x, y,\n\t\t\t\t\tsquare_size, square_size, new Runnable() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tsetUsingTextures(!isUsingTextures());\n\t\t\t\t\t\t\trepaint();\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\tbuttons.add(new Button(getImage(IconHandler.path_fullscreen), \"Toggle full-screen\", x + sep, y,\n\t\t\t\t\tsquare_size, square_size, new Runnable() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tgetFrame().toggleArrangeSide();\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsetButtons(buttons);\n\t}", "@SuppressLint(\"ResourceAsColor\")\n public void onClick(View view){\n swipe(cardView);\n save(view,FILE_NAME);\n //slideLeft(cardView);\n mButtonChoice1.setBackgroundColor(Color.TRANSPARENT);//brings back the color of each button\n mButtonChoice2.setBackgroundColor(Color.TRANSPARENT);//brings back the color of each button\n mButtonChoice3.setBackgroundColor(Color.TRANSPARENT);//brings back the color of each button\n mButtonChoice4.setBackgroundColor(Color.TRANSPARENT);//brings back the color of each button\n\n updateQuestion();\n\n\n }", "void updateCommonToggleStatus(boolean shown);", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tif (e.getActionCommand().equals(\"showPropertiesButton\")){\n\t\t\t\tCardLayout cl = (CardLayout)(cards.getLayout());\n\t\t cl.show(cards, \"showPropertiesPanel\");\n\t\t\t} else if (e.getActionCommand().equals(\"createLeaseButton\")){\n\t\t\t\tCardLayout cl = (CardLayout)(cards.getLayout());\n\t\t\t\tcl.show(cards, \"createLeasePanel\");\n\t\t\t} else if (e.getActionCommand().equals(\"showLeaseButton\")){\n\t\t\t\tCardLayout cl = (CardLayout)(cards.getLayout());\n\t\t\t\tcl.show(cards, \"showLeasePanel\");\n\t\t\t}\n\t\t\t\n\t\t\telse if(e.getActionCommand().equals(\"allProps\")){\n\t\t\t\tCardLayout cl = (CardLayout)(cards2.getLayout());\n\t\t\t\tString temp = start.genAllProps();\n\t\t\t\tdisplayController2.displayPanel.removeAll();\n\t\t\t\t//parse into arraylist\n\t\t\t\t//load properties into this array\n\t\t\t\tArrayList<String> properties = new ArrayList<String>();\n\t\t\t\tif(temp != null){\n\t\t\t\t\tString[] sup_props = temp.split(\"[;]+\");\n\t\t\t\t\tfor(int i = 0;i < sup_props.length; i++){\n\t\t\t\t\t\tproperties.add(sup_props[i]);\n\t\t\t\t\t\tSystem.out.println(sup_props[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdisplayController2.displayPanel.listView(properties, \"Available Properties by Branch\");\n\t\t\t\tdisplayController2.displayPanel.repaint();\n\t\t\t\tdisplayController2.displayPanel.revalidate();\n\t\t\t\t\n\t\t\t\tcl.show(cards2,\"displayPanel\");\n\t\t\t\t\n\t\t\t} else if(e.getActionCommand().equals(\"supsProps\")){\n\t\t\t\tCardLayout cl = (CardLayout)(cards2.getLayout());\n\t\t\t\tdisplayController2.displayPanel.removeAll();\n\t\t\t\tArrayList<String> properties = new ArrayList<String>();\n\t\t\t\tString temp = start.genSupervisors();\n\t\t\t\t//parse into arraylist SUPERVISORS empNAme (empNo): \n\t\t\t\tif(temp != null){\t\n\t\t\t\t\tString[] sup_props = temp.split(\"[;]+\");\n\t\t\t\t\tfor(int i = 0;i < sup_props.length; i++){\n\t\t\t\t\t\tproperties.add(sup_props[i]);\n\t\t\t\t\t\tSystem.out.println(sup_props[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//properties.add(\"garbage\");\n\t\t\t\tdisplayController2.displayPanel.listView(properties, \"List of Supervisors and Properties\");\n\t\t\t\tdisplayController2.displayPanel.repaint();\n\t\t\t\tdisplayController2.displayPanel.revalidate();\n\t\t\t\tcl.show(cards2, \"displayPanel\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else if(e.getActionCommand().equals(\"specOwnProps\")){\n\t\t\t\tCardLayout cl = (CardLayout)(cards2.getLayout());\n\t\t\t\tdisplayController2.branchPanel.inpField.label.setText(\"OwnerId: \");\n\t\t\t\tcl.show(cards2, \"branchPanel\");\n\t\t\t\t\n\t\t\t}else if(e.getActionCommand().equals(\"criteriaProps\")){\n\t\t\t\t// all the rest is done inside of the criteriaPanel's action listener in the \n\t\t\t\t//displayController\n\t\t\t\tCardLayout cl = (CardLayout)(cards2.getLayout());\n\t\t\t\tcl.show(cards2, \"criteriaPanel\");\n\t\t\t\t//displayController2.criteriaPanel.revalidate();\n\t\t\t}else if(e.getActionCommand().equals(\"numProps\")){\n\t\t\t\tdisplayController2.displayPanel.removeAll();\n\t\t\t\tCardLayout cl = (CardLayout)(cards2.getLayout());\n\t\t\t\tString temp = start.genPropPerBranch();\n\t\t\t\tArrayList<String> properties = new ArrayList<String>();\n\t\t\t\tString[] sup_props = temp.split(\"[;]+\");\n\t\t\t\t//parse temp into properties\n\t\t\t\tfor(int i = 0;i < sup_props.length; i++){\n\t\t\t\t\tproperties.add(sup_props[i]);\n\t\t\t\t\tSystem.out.println(sup_props[i]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdisplayController2.displayPanel.listView(properties, \"Number of Properties Per Branch\");\n\t\t\t\tdisplayController2.displayPanel.repaint();\n\t\t\t\tdisplayController2.displayPanel.revalidate();\n\t\t\t\tcl.show(cards2, \"displayPanel\");\n\t\t\t\t\n\t\t\t}\n\t\t\t//Show Lease Buttons\n\t\t\telse if (e.getActionCommand().equals(\"renterLease\")){\n\t\t\t\tCardLayout cl = (CardLayout)(cards3.getLayout());\n\t\t\t\tdisplayController3.branchPanel.displayPanel.removeAll();\n\t\t\t\tdisplayController3.branchPanel.inpField.label.setText(\"RenterId: \");\n\t\t\t\tdisplayController3.branchPanel.displayPanel.repaint();\n\t\t\t\tdisplayController3.branchPanel.displayPanel.revalidate();\n\t\t\t\tcl.show(cards3, \"branchPanel\");\n\t\t\t}else if (e.getActionCommand().equals(\"multRenters\")){\n\t\t\t\tdisplayController3.displayPanel.removeAll();\n\t\t\t\tCardLayout cl = (CardLayout)(cards3.getLayout());\n\t\t\t\tString temp = start.genMultLease();\n\t\t\t\tArrayList<String> properties = new ArrayList<String>();\n\t\t\t\t//parse temp into properties\n\t\t\t\tif(temp != null){\n\t\t\t\t\tString[] sup_props = temp.split(\"[;]+\");\n\t\t\t\t\t//parse temp into properties\n\t\t\t\t\tfor(int i = 0;i < sup_props.length; i++){\n\t\t\t\t\t\tproperties.add(sup_props[i]);\n\t\t\t\t\t\tSystem.out.println(sup_props[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdisplayController3.displayPanel.listView(properties, \"Renters with Multiple Properties:\");\n\t\t\t\tdisplayController3.displayPanel.repaint();\n\t\t\t\tdisplayController3.displayPanel.revalidate();\n\t\t\t\tcl.show(cards3, \"displayPanel\");\n\t\t\t}else if (e.getActionCommand().equals(\"avgRent\")){\n\t\t\t\tdisplayController3.branchPanel.displayPanel.removeAll();\n\t\t\t\tCardLayout cl = (CardLayout)(cards3.getLayout());\n\t\t\t\tdisplayController3.branchPanel.inpField.label.setText(\"City: \");\n\t\t\t\tdisplayController3.branchPanel.displayPanel.repaint();\n\t\t\t\tdisplayController3.branchPanel.displayPanel.revalidate();\n\t\t\t\tcl.show(cards3, \"branchPanel\");\n\t\t\t}else if (e.getActionCommand().equals(\"expLease\")){\n\t\t\t\tdisplayController3.displayPanel.removeAll();\n\n\t\t\t\tCardLayout cl = (CardLayout)(cards3.getLayout());\n\t\t\t\tString temp = start.genExpireSoon();\n\t\t\t\tArrayList<String> properties = new ArrayList<String>();\n\t\t\t\t//parse temp into properties\n\t\t\t\tif(temp != null){\n\t\t\t\t\tString[] sup_props = temp.split(\"[;]+\");\n\t\t\t\t\t//parse temp into properties\n\t\t\t\t\tfor(int i = 0;i < sup_props.length; i++){\n\t\t\t\t\t\tproperties.add(sup_props[i]);\n\t\t\t\t\t\tSystem.out.println(sup_props[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdisplayController3.displayPanel.listView(properties, \"Leases that Expire Soon:\");\n\t\t\t\tdisplayController3.displayPanel.repaint();\n\t\t\t\tdisplayController3.displayPanel.revalidate();\n\t\t\t\tcl.show(cards3, \"displayPanel\");\n\t\t\t}\n\t\t\t//Admin Buttons\n\t\t\telse if (e.getActionCommand().equals(\"addBranch\")){\n\t\t\t\t\n\t\t\t} else if (e.getActionCommand().equals(\"addEmployee\")){\n\t\t\t\t\n\t\t\t} else if (e.getActionCommand().equals(\"addPropOwner\")){\n\t\t\t\t\n\t\t\t} else if (e.getActionCommand().equals(\"addRenter\")){\n\t\t\t\t\n\t\t\t} else if (e.getActionCommand().equals(\"addRentalProp\")){\n\t\t\t\t\n\t\t\t} else if (e.getActionCommand().equals(\"addLease\")){\n\t\t\t\t\n\t\t\t}\n\t\t}", "public static void switchCard(String s){cl.show(cards,s);}", "public void enableProductionButtons(){\n for(int i = 0; i < 3; i++){\n productionButtons[i].setText(\"Activate\");\n if (gui.getViewController().getGame().getProductionCard(i) != null){\n productionButtons[i].setEnabled(true);\n } else {\n productionButtons[i].setEnabled(false);\n }\n productionButtons[i].setToken(true);\n Gui.removeAllListeners(productionButtons[i]);\n productionButtons[i].addActionListener(new ActivateProductionListener(gui,productionButtons[i], i));\n }\n\n baseProductionPanel.enableButton();\n }", "@Test\n public void panelButtonsShuffleTest() {\n expandPanel();\n\n onView(withId(R.id.shuffle)).perform(click());\n\n onView(isRoot()).perform(ViewActions.waitForView(R.id.shuffle, new ViewActions.CheckStatus() {\n @Override\n public boolean check(View v) {\n return ((HighlightButton) v).isHighlighted();\n }\n }, 10000));\n }", "private void showPlayerButtons() {\n\n\t\tprevious.setVisibility(View.VISIBLE);\n\t\tplay.setVisibility(View.VISIBLE);\n\t\tnext.setVisibility(View.VISIBLE);\n\t}", "public void toggleEnable();", "public void toggle()\n\t{\n\t\tsetVisible(!this.isShowing());\n\t}", "public boolean isCardClicked(){\n\t\treturn cardClicked;\n\t}", "public PlayerMainGUI(Player player_object) {\n player = player_object;\n player.setCurrentTurn(1); // new hand, so it is the first turn\n keepAll = false;\n diceButtons = new ArrayList<JToggleButton>();\n diceImages = new ArrayList<JToggleButton>();\n\n GridBagLayout layout = new GridBagLayout();\n setLayout(layout);\n JLabel instructionLabel = new JLabel(\n \"Click on the buttons that correspond to the dice you to want to keep, then click roll\");\n instructionLabel.setFont(new Font(\"Serif\", Font.BOLD, 24));\n SetConstraints.setConstraints(this,\n instructionLabel, 100, 100, 0, 0, 5, 2);\n\n // create the dice images and dice buttons components\n for (int i = 0; i < player.getPlayerHand().getSizeOfHand(); i++) {\n JToggleButton dieToggleButton = new JToggleButton(\n String.valueOf(player.getPlayerHand().getHand().get(i).getSideUp()));\n JToggleButton dieImageToggleButton = new JToggleButton(\n new ImageIcon(player.getPlayerHand().getHand().get(i).getSideUp()+\"up.png\"));\n dieImageToggleButton.setBorder(new LineBorder(Color.BLACK));\n diceImages.add(dieImageToggleButton);\n diceButtons.add(dieToggleButton);\n if (i < 5 ) { // this triple if block helps format the images since the number of images is dynamic\n SetConstraints.setConstraints(this,\n dieImageToggleButton, 100, 100, i, 2, 1, 1);\n SetConstraints.setConstraints(this,\n dieToggleButton, 100, 100, i, 3, 1, 1);\n } if (i >= 5 && i < 10) {\n SetConstraints.setConstraints(this,\n dieImageToggleButton, 100, 100, i - 5, 5, 1, 1);\n SetConstraints.setConstraints(this,\n dieToggleButton, 100, 100, i - 5, 6, 1, 1);\n } if (i >= 10) {\n SetConstraints.setConstraints(this,\n dieImageToggleButton, 100, 100, i - 10, 7, 1, 1);\n SetConstraints.setConstraints(this,\n dieToggleButton, 100, 100, i - 10, 8, 1, 1);\n }\n }\n\n // create roll and scorecard buttons\n rollButton = new JButton(\"Roll\");\n SetConstraints.setConstraints(this,\n rollButton, 100, 100, 0, 9, 1, 1);\n ActionListener listener = event -> updateDice();\n rollButton.addActionListener(listener);\n viewScorecardButton = new JButton(\"Scorecard\");\n SetConstraints.setConstraints(this,\n viewScorecardButton, 100, 100, 1, 9, 1, 1);\n ActionListener scorecardPressed = event -> makeScorecard();\n viewScorecardButton.addActionListener(scorecardPressed);\n setVisible(true);\n }", "public void displayMoveButtons(JPanel panel, GameState currentGS) {\n\n super.getContentPane().removeAll();\n\n Pokemon p2Pman = currentGS.player2CurrentPokemon;\n\n if (this.move1 == null) {\n\n Move move = p2Pman.moves.get(0);\n JButton moveB = makeMoveButton(move);\n moveB.setBounds(moveButtonStartingX,moveButtonStartingY,moveButtonXSize,moveButtonYSize);\n panel.add(moveB);\n this.move1 = new ActionButtonInner();\n this.move1.setButton(moveB);\n this.move1.setActionIndex(0);\n\n }\n else {\n\n Move move = p2Pman.moves.get(0);\n JButton button = this.move1.buttonObj;\n button.setText(move.moveName);\n this.move1.setActionIndex(0);\n panel.add(button);\n\n }\n\n if (this.move2 == null) {\n\n Move move = p2Pman.moves.get(1);\n JButton moveB = makeMoveButton(move);\n moveB.setBounds(moveButtonStartingX + (moveButtonXSize),moveButtonStartingY,moveButtonXSize,moveButtonYSize);\n panel.add(moveB);\n this.move2 = new ActionButtonInner();\n this.move2.setButton(moveB);\n this.move2.setActionIndex(1);\n\n }\n else {\n\n Move move = p2Pman.moves.get(1);\n JButton button = this.move2.buttonObj;\n button.setText(move.moveName);\n this.move2.setActionIndex(1);\n panel.add(button);\n\n }\n\n if (this.move3 == null) {\n\n Move move = p2Pman.moves.get(2);\n JButton moveB = makeMoveButton(move);\n moveB.setBounds(moveButtonStartingX + 2*(moveButtonXSize),moveButtonStartingY,moveButtonXSize,moveButtonYSize);\n panel.add(moveB);\n this.move3 = new ActionButtonInner();\n this.move3.setButton(moveB);\n this.move3.setActionIndex(2);\n\n }\n else {\n\n Move move = p2Pman.moves.get(2);\n JButton button = this.move3.buttonObj;\n button.setText(move.moveName);\n this.move3.setActionIndex(2);\n panel.add(button);\n\n }\n\n if (this.move4 == null) {\n\n Move move = p2Pman.moves.get(3);\n JButton moveB = makeMoveButton(move);\n moveB.setBounds(moveButtonStartingX + 3*(moveButtonXSize),moveButtonStartingY,moveButtonXSize,moveButtonYSize);\n panel.add(moveB);\n this.move4 = new ActionButtonInner();\n this.move4.setButton(moveB);\n this.move4.setActionIndex(3);\n\n }\n else {\n\n Move move = p2Pman.moves.get(3);\n JButton button = this.move4.buttonObj;\n button.setText(move.moveName);\n this.move4.setActionIndex(3);\n panel.add(button);\n\n }\n\n super.getContentPane().add(panel);\n super.revalidate();\n\n }", "private void showButtons(boolean show) {\n int visibility = show ? View.VISIBLE : View.GONE;\n mMuteBtn.setVisibility(visibility);\n mSwitchCameraBtn.setVisibility(visibility);\n }", "@Override\n public void enableProductionButtons() {\n gameboardPanel.disableEndTurnButton();\n gameboardPanel.disableEndOfProductionButton();\n gameboardPanel.enableProductionButtons();\n leaderCardsPanel.enableProductionButtons();\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 3;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}", "public void play() {\n\t\tpanel.remove(easy);\n\t\tpanel.remove(hard);\n\t\tdown.setVisible(true);\n\t\tmarket.setVisible(true);\n\t\tinfo.setVisible(true);\n\t}", "private void buttonEnable(){\n\t\t\taddC1.setEnabled(true);\n\t\t\taddC2.setEnabled(true);\n\t\t\taddC3.setEnabled(true);\n\t\t\taddC4.setEnabled(true);\n\t\t\taddC5.setEnabled(true);\n\t\t\taddC6.setEnabled(true);\n\t\t\taddC7.setEnabled(true);\n\t\t}", "@Override\n public void toggle(boolean active) {\n }", "public void toggle(){\r\n isDown = !isDown;\r\n }", "private void checkButton(ActionEvent e) {\n List<PuzzleButton> selectedButtons = buttons.stream()\n .filter(PuzzleButton::isSelectedButton)\n .collect(Collectors.toList());\n PuzzleButton currentButton = (PuzzleButton) e.getSource();// getting current button\n currentButton.setSelectedButton(true);\n int currentButtonIndex = buttons.indexOf(currentButton);\n //if no button are selected, do not update collection of PuzzleButton\n if (selectedButtons.size() == 1) {\n int lastClickedButtonIndex = 0;\n\n for (PuzzleButton button : buttons) {\n if (button.isSelectedButton() && !button.equals(currentButton)) {\n lastClickedButtonIndex = buttons.indexOf(button);\n }\n }\n Collections.swap(buttons, lastClickedButtonIndex, currentButtonIndex);\n updateButtons();\n }\n }", "public void onToggleClicked(View view) {\n\t boolean on = ((ToggleButton) view).isChecked();\n\t \n\t if (on) {\n\t \tairlineList.setVisibility(View.INVISIBLE);\n\t airportsList.setVisibility(View.VISIBLE);\n\t } else {\n\t airlineList.setVisibility(View.VISIBLE);\n\t airportsList.setVisibility(View.INVISIBLE);\n\t \n\t }\n\t}", "@Override\n public void onClick(View v) {\n if(!applicationWithdrawalFragment.financialCardCheck) {\n holder.radioButton.setVisibility(View.GONE);\n if (holder.ll_card_detail_view.getVisibility() != View.VISIBLE)\n holder.ll_card_detail_view.setVisibility(View.VISIBLE);\n else\n holder.ll_card_detail_view.setVisibility(View.GONE);\n }\n }", "@FXML\n void handle(ActionEvent event) {\n Media media = new Media(getClass().getResource(\"/sounds/click.wav\").toExternalForm());\n MediaPlayer click = new MediaPlayer(media);\n click.play();\n Button src = (Button) event.getSource();\n if (src == backButton) {\n // TODO update the user\n updateUser();\n Main.changeScene(\"MainMenu.fxml\");\n } else if (deckButtons.contains(src)) {\n if(allEnable()){\n return;\n }\n src.setDisable(true);\n int enables = 0;\n for (int i = 0; i < 8; i++) {\n if (upButtons.get(i).isDisabled()) {\n upButtons.get(i).setDisable(false);\n // set the up image\n // get Deck from below buttons\n images.get(i).setImage(Deck.deckToImage(getDeck(src)));\n chosenDecks.add(enables, getDeck(src));\n break;\n } else\n enables++;\n }\n } else if (upButtons.contains(src)) {\n int enable = 0;\n int i = 0;\n while (i < 8) {\n if (!upButtons.get(i).isDisable()) {\n if (upButtons.get(i) == src) {\n images.get(i).setImage(new Image(\"\\\\images\\\\EmptyCard.png\"));\n break;\n }\n enable++;\n }\n i++;\n }\n src.setDisable(true);\n updateDecks(enable);\n }\n\n }", "public void changePanel(String name) {\n\t\t((CardLayout)cardPanel.getLayout()).show(cardPanel, name);\n\t\trequestFocus();\n\t\t\n\t\t\n\t}", "public void updateDisplay()\r\n {\r\n boardpanel.removeAll();\r\n for(int i = 0; i < 3; i++)\r\n {\r\n for(int j = 0; j < 3; j++)\r\n {\r\n if(buttons[i][j].getText().charAt(0) == ' ') {\r\n buttons[i][j].setEnabled(true);\r\n }\r\n else\r\n {\r\n buttons[i][j].setEnabled(false);\r\n }\r\n boardpanel.add(buttons[i][j]);\r\n }\r\n }\r\n }", "private void setButtons(boolean en){\n btnQuit.setEnabled(!en);\n btnResign.setEnabled(en);\n btnNewGame.setEnabled(!en);\n }", "public void toggle(){\n isOn = !isOn;\n }", "public void enablePanel(boolean b);", "private void reviewCards(String filename) {\n //create main card button\n String filepath = \"./src/flashcards/\" + filename + \".txt\";\n CardSet cardDeck = new CardSet(filepath);\n BorderPane cardPane = new BorderPane();\n Button btnCardText = createBigButton(\"\", 48, 50);\n btnCardText.setBackground(new Background(new BackgroundFill(\n Color.SEASHELL, new CornerRadii(100), null)));\n btnCardText.setOnAction(e -> {\n front = !front;\n if (front) {\n btnCardText.setText(cardDeck.peekFront().getFront());\n } else {\n btnCardText.setText(cardDeck.peekFront().getBack());\n }\n });\n cardPane.setCenter(btnCardText);\n BorderPane.setMargin(btnCardText, new Insets(50, 0, 50, 50));\n //menu buttons and card count label\n String[] buttonNames = {\"Keep Card\", \"Toss Card\"};\n Button[] cardButtons = new Button[buttonNames.length];\n VBox buttonPane = setSelectionMenu(buttonNames, cardButtons);\n cardCount = new Label(\"Cards left: \" + cardDeck.getSize());\n cardCount.setFont(Font.font(TEXT_SIZE));\n buttonPane.getChildren().add(cardCount);\n //keep and clear button events\n front = true;\n cardButtons[0].setOnAction(e -> {\n front = true;\n cardDeck.keepFront();\n btnCardText.setText(cardDeck.peekFront().getFront());\n });\n cardButtons[1].setOnAction(e -> {\n front = true;\n btnCardText.setText(cardDeck.peekFront().getFront());\n cardDeck.tossFront();\n cardCount.setText(\"Cards left: \" + cardDeck.getSize());\n if (cardDeck.getSize() == 1) {\n cardButtons[1].setText(\"Finish\");\n cardButtons[0].setVisible(false);\n } else if (cardDeck.getSize() == 0) {\n returnHome();\n } else {\n btnCardText.setText(cardDeck.peekFront().getFront());\n }\n });\n //finalize\n parentPane.getChildren().clear();\n parentPane.setCenter(cardPane);\n parentPane.setRight(buttonPane);\n cardButtons[0].fire();\n }", "private void showHideButtons() {\n mBinding.ibPrev.setVisibility(vm.shouldShowPrevBtn() ? View.VISIBLE : View.INVISIBLE);\n mBinding.ibNext.setVisibility(vm.shouldShowNextBtn() ? View.VISIBLE : View.INVISIBLE);\n }", "public void setTurned(int index, boolean val){\n if (val == true) {\n if (selectedOption == 1) {\n if(cards.get(index).getNumber() == 1){\n cards.get(index).getPanel().setBorder(BorderFactory.createBevelBorder(1, Color.red, Color.blue));\n }\n cards.get(index).getPanel().setIcon(new ImageIcon(new ImageIcon(getClass().getResource(cards.get(index).getImgAnime())).getImage().getScaledInstance(cards.get(index).getPanel().getWidth(), cards.get(index).getPanel().getHeight(), Image.SCALE_SMOOTH)));\n } else {\n if (cards.get(index).getNumber() == 1) {\n cards.get(index).getPanel().setBorder(BorderFactory.createBevelBorder(1, Color.red, Color.blue));\n cards.get(index).getPanel().setIcon(new ImageIcon(new ImageIcon(getClass().getResource(cards.get(index).getImgAnime())).getImage().getScaledInstance(cards.get(index).getPanel().getWidth(), cards.get(index).getPanel().getHeight(), Image.SCALE_SMOOTH)));\n } else {\n cards.get(index).getPanel().setBackground(cards.get(index).getColor());\n cards.get(index).getPanel().setIcon(null);\n }\n }\n cards.get(index).setTurned(true);\n }\n if (val == false) {\n cards.get(index).getPanel().setIcon(new ImageIcon(new ImageIcon(getClass().getResource(\"img/Memory.png\")).getImage().getScaledInstance(cards.get(index).getPanel().getWidth(), cards.get(index).getPanel().getHeight(), Image.SCALE_SMOOTH)));\n cards.get(index).setTurned(false);\n cards.get(index).getPanel().setBorder(UIManager.getBorder(\"Button.border\"));\n }\n }", "private void modeToggleButtonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_modeToggleButtonMouseReleased\n if(this.modeToggleButton.isSelected()){\n this.controller.setAuto(true);\n slideAuto.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"on_slide.png\")));\n slideMan.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"of_slide.png\")));\n }\n else{\n this.controller.setAuto(false);\n slideAuto.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"of_slide.png\")));\n slideMan.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"on_slide.png\")));\n }\n }", "private void updateButtons() {\n\t\tif(buttonCount>1){\n\t\t\tremoveTableButton.setEnabled(true);\n\t\t}\n\t\telse{\n\t\t\tremoveTableButton.setEnabled(false);\n\t\t}\n\t\tif(buttonCount<tablesX.length){\n\t\t\taddTableButton.setEnabled(true);\n\t\t}\n\t\telse{\n\t\t\taddTableButton.setEnabled(false);\n\t\t}\n\t}", "protected void doScreenClick() {\r\n\t\tbtnColonyInfo.visible = btnButtons.down;\r\n\t\tbtnPlanet.visible = btnButtons.down;\r\n\t\tbtnStarmap.visible = btnButtons.down;\r\n\t\tbtnBridge.visible = btnButtons.down;\r\n\t\trepaint();\r\n\t}", "void togglePlay();", "public void updateComputerBoard()\r\n {\r\n boardpanel.removeAll();\r\n for (int i = 0; i < 3; i++) {\r\n for (int j = 0; j < 3; j++) {\r\n buttons[i][j].setEnabled(false);\r\n boardpanel.add(buttons[i][j]);\r\n }\r\n }\r\n }", "public void showCard()\n {\n ArrayList<Card> superCards = super.removeCards();\n super.addCard(hiddenCard);\n super.addCards(superCards.subList(1, superCards.size()));\n hidden = false;\n }", "private void sezmanagerListener(){\n\n CardLayout CL=(CardLayout) sez_managerview.getIntermedio1().getLayout();\n\n /*Avanti*/\n JButton sez_managerviewAvanti = sez_managerview.getAvantiButton();\n sez_managerviewAvanti.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n\n if (Pagine_Manager.getPagina_Corrente() < 3) {\n\n CL.next(sez_managerview.getIntermedio1());\n Pagine_Manager.addPagina_Corrente();\n\n }\n\n }\n\n });\n\n\n /*Indietro*/\n JButton sez_managerviewIndietro= sez_managerview.getIndietroButton();\n sez_managerviewIndietro.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n\n if (Pagine_Manager.getPagina_Corrente() > 1) {\n\n CL.previous(sez_managerview.getIntermedio1());\n Pagine_Manager.subctractPagina_Corrente();\n }\n\n }\n });\n\n\n /*PaginaLogin*/\n JButton PaginaLoginbutton = sez_managerview.getPaginaLoginButton();\n PaginaLoginbutton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n\n basicframe.setdestra(loginview.getIntermedio0());\n\n }\n });\n }", "public void flipCard() {\n if (jButton.getIcon() == null){//if the icon compares to null;\n switch (cardNumber) {//set the image of corresponding to the cardNumber\n case 1:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_1.jpg\"));\n break;\n case 2:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_2.jpg\"));\n break;\n case 3:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_3.jpg\"));\n break;\n case 4:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_4.jpg\"));\n break;\n case 5:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_5.jpg\"));\n break;\n case 6:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_6.jpg\"));\n break;\n case 7:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_7.jpg\"));\n break;\n case 8:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_8.jpg\"));\n break;\n }\n } else {//if the JButton icon does not compare to null;\n jButton.setIcon(null);//set the text to null;\n }\n\n\n\n }", "void toggleVisible (ActionEvent actionEvent) {\n element.visible = this.isSelected();\n }", "private void setShowAndShareButtonStatus(boolean isEnabled) {\n Button showBaby = (Button) findViewById(R.id.showBaby);\n Button share = (Button) findViewById(R.id.share);\n\n showBaby.setEnabled(isEnabled);\n share.setEnabled(isEnabled);\n }", "public void onClick(View v) {\n switch ((String) v.getTag()) {\n case \"price\":\n if (refinePriceToggle.isShown()) {\n slideUp(getActivity(), refinePriceToggle);\n refinePriceToggle.setVisibility(View.GONE);\n } else {\n refinePriceToggle.setVisibility(View.VISIBLE);\n slideDown(getActivity(), refinePriceToggle);\n\n slideUp(getActivity(), refineBedroomToggle);\n slideUp(getActivity(), refineBathroomToggle);\n slideUp(getActivity(), refinePropertyToggle);\n // Hider Other Toggles\n refineBedroomToggle.setVisibility(View.GONE);\n refineBathroomToggle.setVisibility(View.GONE);\n refinePropertyToggle.setVisibility(View.GONE);\n }\n break;\n case \"bed\":\n if (refineBedroomToggle.isShown()) {\n slideUp(getActivity(), refineBedroomToggle);\n refineBedroomToggle.setVisibility(View.GONE);\n } else {\n refineBedroomToggle.setVisibility(View.VISIBLE);\n slideDown(getActivity(), refineBedroomToggle);\n slideUp(getActivity(), refinePriceToggle);\n slideUp(getActivity(), refineBathroomToggle);\n slideUp(getActivity(), refinePropertyToggle);\n // Hider Other Toggles\n refinePriceToggle.setVisibility(View.GONE);\n refineBathroomToggle.setVisibility(View.GONE);\n refinePropertyToggle.setVisibility(View.GONE);\n }\n break;\n case \"bath\":\n if (refineBathroomToggle.isShown()) {\n slideUp(getActivity(), refineBathroomToggle);\n refineBathroomToggle.setVisibility(View.GONE);\n } else {\n refineBathroomToggle.setVisibility(View.VISIBLE);\n slideDown(getActivity(), refineBathroomToggle);\n slideUp(getActivity(), refineBedroomToggle);\n slideUp(getActivity(), refinePriceToggle);\n slideUp(getActivity(), refinePropertyToggle);\n // Hider Other Toggles\n refineBedroomToggle.setVisibility(View.GONE);\n refinePriceToggle.setVisibility(View.GONE);\n refinePropertyToggle.setVisibility(View.GONE);\n }\n break;\n case \"type\":\n if (refinePropertyToggle.isShown()) {\n slideUp(getActivity(), refinePropertyToggle);\n refinePropertyToggle.setVisibility(View.GONE);\n } else {\n refinePropertyToggle.setVisibility(View.VISIBLE);\n slideDown(getActivity(), refinePropertyToggle);\n slideUp(getActivity(), refineBedroomToggle);\n slideUp(getActivity(), refineBathroomToggle);\n slideUp(getActivity(), refinePriceToggle);\n // Hider Other Toggles\n refineBedroomToggle.setVisibility(View.GONE);\n refineBathroomToggle.setVisibility(View.GONE);\n refinePriceToggle.setVisibility(View.GONE);\n }\n break;\n }\n }", "public void show() {\r\n\t\tfor (int id = 0; id <= maxId; id++) {\r\n\t\t\tif (buttonArray[id] != null)\r\n\r\n\t\t\t\tif (buttonArray[id].isVisible())\r\n\t\t\t\t\tbuttonArray[id].show();\r\n\t\t}\r\n\t}", "@Override\n public void onClick(View v) {\n if (((ToggleButton) v).isChecked()) {\n ExpandAnimation animation = new ExpandAnimation(mailbox_setting_detail_layout, 250);\n mailbox_setting_detail_layout.startAnimation(animation);\n } else {\n ExpandAnimation animation = new ExpandAnimation(mailbox_setting_detail_layout, 250);\n mailbox_setting_detail_layout.startAnimation(animation);\n }\n }", "private void next()\r\n {\r\n if(currentCard != stack.getChildren().size()- 1) // if we are not at the last card\r\n {\r\n currentCard++; // make the next card the current card\r\n \r\n // move through the cards: show the current card, hide the others\r\n for(int i = 0; i <= stack.getChildren().size()- 1; i++)\r\n {\r\n if(i == currentCard)\r\n {\r\n stack.getChildren().get(i).setVisible(true);\r\n }\r\n else\r\n {\r\n stack.getChildren().get(i).setVisible(false);\r\n }\r\n }\r\n }\r\n }", "public static void openPCCompSCRBtnPressed() {\r\n PCNMClientStart.switchPanels(new PCCompSCR());\r\n }" ]
[ "0.62831086", "0.61898005", "0.61710703", "0.6131432", "0.60039127", "0.59723085", "0.5959608", "0.59533715", "0.59126866", "0.5911298", "0.5910433", "0.5907541", "0.5891673", "0.5884617", "0.5863982", "0.586103", "0.5852343", "0.58042276", "0.5762494", "0.5754212", "0.5734224", "0.57146746", "0.5703623", "0.57018334", "0.56689006", "0.56635225", "0.5638484", "0.56365204", "0.5633913", "0.56127363", "0.56010157", "0.55844426", "0.55763716", "0.5565097", "0.5561063", "0.5560061", "0.5547213", "0.5542422", "0.5540686", "0.55395144", "0.55230606", "0.55137765", "0.54810214", "0.5476225", "0.5476114", "0.5475055", "0.5469857", "0.5450434", "0.5446673", "0.543773", "0.5433333", "0.5431769", "0.5431694", "0.5429207", "0.54265296", "0.54194325", "0.54188126", "0.5413355", "0.5400759", "0.53965694", "0.5392152", "0.53854257", "0.53827447", "0.5382071", "0.53751504", "0.5373283", "0.536323", "0.5354237", "0.53443694", "0.53424406", "0.5334726", "0.5324482", "0.5321762", "0.5320329", "0.53185076", "0.52967286", "0.5295988", "0.528475", "0.5271936", "0.52681845", "0.5267796", "0.5262872", "0.5262148", "0.5261492", "0.524725", "0.5245383", "0.5240018", "0.52255285", "0.5222291", "0.5217552", "0.5215078", "0.52117974", "0.5208863", "0.5207733", "0.5201963", "0.5200505", "0.51998377", "0.51989806", "0.51966625", "0.51959854" ]
0.7283142
0
End of variables declaration//GENEND:variables
public void mouseClicked(MouseEvent me) { int x_coordinate = me.getX(); int y_coordinate = me.getY(); String name; String out; if (risk.getState() == RiskGameModel.NEW_GAME) { // 0 // startup System.out.println("status " + risk.getState()); risk.gamePhaseSetup(x_coordinate, y_coordinate); name = risk.curPlayer.getName(); statusLabel.setText("Place an army on a unoccupied territory"); } if (risk.getState() == RiskGameModel.INITIAL_REINFORCE) { // 1 // startup System.out.println("status " + risk.getState()); risk.gamePhaseSetup(x_coordinate, y_coordinate); name = risk.curPlayer.getName(); statusLabel.setText("Place an army on a territory you occupy"); Utility.writeLog("initial reinforcement stage"); } if (risk.getState() == RiskGameModel.ATTACK) { risk.notifyPhaseViewChange(); name = risk.curPlayer.getName(); out = risk.gamePhaseActive(x_coordinate, y_coordinate); risk.notifyPhaseViewChange(); } if (risk.getState() == RiskGameModel.START_TURN) { risk.gamePhaseActive(x_coordinate, y_coordinate); risk.active = risk.curPlayer; name = risk.curPlayer.getName(); statusLabel.setText("Recieved a bonus of " + risk.curPlayer.getNumberOfArmies()); Utility.writeLog(name + " got bonus armies"); } if (risk.getState() == RiskGameModel.REINFORCE) { name = risk.curPlayer.getName(); risk.gamePhaseActive(x_coordinate, y_coordinate); risk.notifyPhaseViewChange(); Utility.writeLog(name + " got" + risk.curPlayer.getNumberOfArmies() + " left to place"); statusLabel.setText("You have " + risk.curPlayer.getNumberOfArmies() + " left to place"); if (risk.curPlayer.getNumberOfArmies() == 0) { risk.setState(RiskGameModel.ACTIVE_TURN); Utility.writeLog(name + " entered active turn"); } } if (risk.getState() == RiskGameModel.START_TURN) { risk.gamePhaseActive(x_coordinate, y_coordinate); risk.active = risk.curPlayer; name = risk.curPlayer.getName(); statusLabel.setText("Recieved a bonus of " + risk.curPlayer.getNumberOfArmies()); } if (risk.getState() == RiskGameModel.ACTIVE_TURN) { name = risk.curPlayer.getName(); statusLabel.setText("What would you like to do?"); EndButton.setVisible(true); FortifyButton.setVisible(true); AttackButton.setText("Attack"); AttackButton.setVisible(true); } if (risk.getState() == RiskGameModel.ATTACKING) { name = risk.curPlayer.getName(); AttackButton.setText("Retreat"); statusLabel.setText("Select an opposing territory"); out = risk.gamePhaseActive(x_coordinate, y_coordinate); Utility.writeLog(name + " entered attacking phase."); // System.out.println(out); risk.notifyPhaseViewChange(); } if (risk.getState() == RiskGameModel.ATTACK_PHASE) { // jInternalFrame1.setVisible(true); int attackArmies = risk.aTerritory.getArmies(); int defenseArmies = risk.defenseTerritory.getArmies(); int numofatt = 0; // If attackers turn if (risk.active == risk.curPlayer) { if (attackArmies > 3) { if (y_coordinate > 250 && y_coordinate < 280) {// if in // y_coordinate // coord if (x_coordinate > 420 && x_coordinate < 460) // If dice // one numofatt = 1; if (x_coordinate > 480 && x_coordinate < 520) // if dice // two numofatt = 2; if (x_coordinate > 540 && x_coordinate < 580) numofatt = 3; } // in y_coordinate coord } // if attcking with 3 if (attackArmies == 3) {// if attakking with two if (y_coordinate > 250 && y_coordinate < 280) { if (x_coordinate > 460 && x_coordinate < 500) numofatt = 1; if (x_coordinate > 510 && x_coordinate < 550) numofatt = 2; } // in y_coordinate coord } // end if can attack with two if (attackArmies == 2) {// can only attack with one if (y_coordinate > 250 && y_coordinate < 280) { if (x_coordinate > 480 && x_coordinate < 520) numofatt = 1; } // in y_coordinate } // end only attack with one if (numofatt != 0) {// change player is num is selected risk.active = risk.defender; risk.setAttack(numofatt); Utility.writeLog(risk.getCurrentPlayer().getName() + " has " + attackArmies + " armies"); Utility.writeLog(risk.getCurrentPlayer().getName() + " attacking with " + numofatt + " armies"); } } // end attackers turn // If defenders turn else if (risk.active == risk.defender) { if (defenseArmies > 1 && risk.attackNum > 1) { if (y_coordinate > 250 && y_coordinate < 280) { if (x_coordinate > 460 && x_coordinate < 500) numofatt = 1; if (x_coordinate > 510 && x_coordinate < 550) numofatt = 2; } } else { if (y_coordinate > 250 && y_coordinate < 280) { if (x_coordinate > 480 && x_coordinate < 520) numofatt = 1; } } risk.notifyPhaseViewChange(); if (numofatt > 0) { risk.setDefend(numofatt); risk.engageBattle(); if (defenseArmies - risk.defenseTerritory.getArmies() == 1) { statusLabel.setText(risk.curPlayer.getName() + " has destroyed an army"); Utility.writeLog(risk.curPlayer.getName() + " has destroyed an army"); } else if (defenseArmies - risk.defenseTerritory.getArmies() == 2) { statusLabel.setText(risk.curPlayer.getName() + " has destroyed two armies"); Utility.writeLog(risk.curPlayer.getName() + " has destroyed two armies"); } else if (attackArmies - risk.aTerritory.getArmies() == 1) { statusLabel.setText(risk.curPlayer.getName() + " has lost an army"); Utility.writeLog(risk.curPlayer.getName() + " has lost an army"); } else if (attackArmies - risk.aTerritory.getArmies() == 2) { statusLabel.setText(risk.curPlayer.getName() + " has lost two armies"); Utility.writeLog(risk.curPlayer.getName() + " has lost two armies"); } if (risk.aTerritory.getArmies() == 1) { risk.setState(RiskGameModel.ACTIVE_TURN); statusLabel.setText(risk.curPlayer.getName() + " has lost the battle"); AttackButton.setText("Attack"); FortifyButton.setVisible(true); EndButton.setVisible(true); risk.defenseNum = 0; risk.attackNum = 0; risk.defenseTerritory = null; risk.aTerritory = null; } } } /// end if defenders turn } // End attackPhase if (risk.getState() == RiskGameModel.DEFEATED) { setState(RiskGameModel.ACTIVE_TURN); } if (risk.getState() == RiskGameModel.CAPTURE) { statusLabel.setText("Select number of armies to move to " + risk.defenseTerritory.getName()); AttackButton.setVisible(false); AttackButton.setText("Attack"); int max = risk.aTerritory.getArmies() - 1; int min = risk.attackNum; if (y_coordinate > 230 && y_coordinate < 257) {// if y_coordinate is // correct if (x_coordinate > 600 && x_coordinate < 650)// if max risk.defenseNum = risk.aTerritory.getArmies() - 1; // max if (x_coordinate > 520 && x_coordinate < 570) { // if inc if (risk.defenseNum < max) risk.defenseNum++; else statusLabel.setText("Maximum units already selected"); } // end if sub if (x_coordinate > 440 && x_coordinate < 490) {// if dec if (risk.defenseNum > min) risk.defenseNum--; else statusLabel.setText("Minimum units already selected"); } // end if add if (x_coordinate > 360 && x_coordinate < 410)// min risk.defenseNum = min; } // end if y_coordinate coord if (x_coordinate > 460 && x_coordinate < 545) {// move has ben // clicked if (y_coordinate > 325 && y_coordinate < 355) {// then occupy // the territory AttackButton.setVisible(true); if (risk.defenseNum == 1) statusLabel.setText("1 army moved to " + risk.defenseTerritory.getName()); else statusLabel.setText(risk.defenseNum + " armies moved to " + risk.defenseTerritory.getName()); risk.notifyPhaseViewChange(); risk.setAttackDieArray(new Integer[] {0,0,0}); risk.setDefenceDieArray(new Integer[] {0,0,0}); Utility.writeLog(risk.getCurrentPlayer().getName() + " has " + risk.defenseNum + " armies moved to " + risk.defenseTerritory.getName()); EndButton.setVisible(true); FortifyButton.setVisible(true); if (risk.capture()) { AttackButton.setVisible(false); FortifyButton.setVisible(false); CardButton.setVisible(false); EndButton.setVisible(false); statusLabel.setText(risk.getCurrentPlayer().getName() + " has won the game"); JOptionPane.showMessageDialog(null, risk.getCurrentPlayer().getName() + " has won the game", "Alert", JOptionPane.INFORMATION_MESSAGE); } } } // risk.notifyPhaseViewChange(); } // end capturing if (risk.getState() == RiskGameModel.FORTIFY) { risk.gamePhaseActive(x_coordinate, y_coordinate); statusLabel.setText("Select a country to move armies too"); } if (risk.getState() == RiskGameModel.FORTIFYING) { risk.gamePhaseActive(x_coordinate, y_coordinate); } if (risk.getState() == RiskGameModel.FORTIFY_PHASE) { int from = risk.aTerritory.getArmies(); if (y_coordinate > 230 && y_coordinate < 257) {// if y_coordinate is // correct if (x_coordinate > 600 && x_coordinate < 650)// if max if (risk.defenseNum == (from - 1)) statusLabel.setText("Maximum units already selected"); else risk.defenseNum = (from - 1);// all but one if (x_coordinate > 520 && x_coordinate < 570) { // if inc if (risk.defenseNum < (from - 1)) risk.defenseNum++; else statusLabel.setText("Maximum units already selected"); } // end if inc if (x_coordinate > 440 && x_coordinate < 490) {// if dec if (risk.defenseNum > (from - 1)) risk.defenseNum--; else statusLabel.setText("Minimum units already selected"); } // end if add if (x_coordinate > 360 && x_coordinate < 410)// min if (risk.defenseNum == 0) statusLabel.setText("Minimum units already selected"); else risk.defenseNum = 0; } // end if y_coordinate coord if (x_coordinate > 460 && x_coordinate < 545) {// move has ben // clicked if (y_coordinate > 325 && y_coordinate < 355) {// then occupy // the territory AttackButton.setVisible(false); if (risk.defenseNum == 1) statusLabel.setText("1 army moved to " + risk.defenseTerritory.getName()); else statusLabel.setText(risk.defenseNum + " armies moved to " + risk.defenseTerritory.getName()); risk.notifyPhaseViewChange(); Utility.writeLog(risk.getCurrentPlayer().getName() + " has " + risk.defenseNum + " armies moved to " + risk.defenseTerritory.getName()); EndButton.setVisible(true); FortifyButton.setVisible(false); risk.aTerritory.looseArmies(risk.defenseNum); risk.defenseTerritory.addArmies(risk.defenseNum); risk.setState(RiskGameModel.ACTIVE_TURN); } // end y_coordinate } // end x_coordinate for movwe } // ..fortify phase if (risk.getState() == RiskGameModel.TRADE_CARDS) { if (y_coordinate > 350 && y_coordinate < 380) { if (x_coordinate > 475 && x_coordinate < 525) { // if exxti // button pushed risk.setState(RiskGameModel.ACTIVE_TURN); System.out.println("exit"); } } // end exit risk.notifyPhaseViewChange(); } // end trade cards System.out.println("(" + x_coordinate + ", " + y_coordinate + ")"); jPanel1.repaint(); jPanel3.repaint(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void assignment() {\n\n\t\t\t}", "private void kk12() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public void mo21779D() {\n }", "public final void mo51373a() {\n }", "protected boolean func_70041_e_() { return false; }", "public void mo4359a() {\n }", "public void mo21782G() {\n }", "private void m50366E() {\n }", "public void mo12930a() {\n }", "public void mo115190b() {\n }", "public void method_4270() {}", "public void mo1403c() {\n }", "public void mo3376r() {\n }", "public void mo3749d() {\n }", "public void mo21793R() {\n }", "protected boolean func_70814_o() { return true; }", "public void mo21787L() {\n }", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo21780E() {\n }", "public void mo21792Q() {\n }", "public void mo21791P() {\n }", "public void mo12628c() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo97908d() {\n }", "public void mo21878t() {\n }", "public void mo9848a() {\n }", "public void mo21825b() {\n }", "public void mo23813b() {\n }", "public void mo3370l() {\n }", "public void mo21879u() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo21785J() {\n }", "public void mo21795T() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void m23075a() {\n }", "public void mo21789N() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo21794S() {\n }", "public final void mo12688e_() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "public void mo6944a() {\n }", "public static void listing5_14() {\n }", "public void mo1405e() {\n }", "public final void mo91715d() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo9137b() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void func_70295_k_() {}", "void mo57277b();", "public void mo21877s() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void Tyre() {\n\t\t\r\n\t}", "void berechneFlaeche() {\n\t}", "public void mo115188a() {\n }", "public void mo21880v() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo21784I() {\n }", "private stendhal() {\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void mo56167c() {\n }", "public void mo44053a() {\n }", "public void mo21781F() {\n }", "public void mo2740a() {\n }", "public void mo21783H() {\n }", "public void mo1531a() {\n }", "double defendre();", "private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }", "public void stg() {\n\n\t}", "void m1864a() {\r\n }", "private void poetries() {\n\n\t}", "public void skystonePos4() {\n }", "public void mo2471e() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "private void yy() {\n\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@AnyLogicInternalCodegenAPI\n private void setupPlainVariables_Main_xjal() {\n }", "static void feladat4() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }", "public void furyo ()\t{\n }", "public void verliesLeven() {\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "protected void mo6255a() {\n }" ]
[ "0.6359434", "0.6280371", "0.61868024", "0.6094568", "0.60925734", "0.6071678", "0.6052686", "0.60522056", "0.6003249", "0.59887564", "0.59705925", "0.59680873", "0.5967989", "0.5965816", "0.5962006", "0.5942372", "0.5909877", "0.5896588", "0.5891321", "0.5882983", "0.58814824", "0.5854075", "0.5851759", "0.58514243", "0.58418584", "0.58395296", "0.5835063", "0.582234", "0.58090156", "0.5802706", "0.5793836", "0.57862717", "0.5784062", "0.5783567", "0.5782131", "0.57758564", "0.5762871", "0.5759349", "0.5745087", "0.57427835", "0.573309", "0.573309", "0.573309", "0.573309", "0.573309", "0.573309", "0.573309", "0.57326084", "0.57301426", "0.57266665", "0.57229686", "0.57175463", "0.5705802", "0.5698347", "0.5697827", "0.569054", "0.5689405", "0.5686434", "0.56738997", "0.5662217", "0.56531453", "0.5645255", "0.5644223", "0.5642628", "0.5642476", "0.5640595", "0.56317437", "0.56294966", "0.56289655", "0.56220204", "0.56180173", "0.56134313", "0.5611337", "0.56112075", "0.56058615", "0.5604383", "0.5602629", "0.56002104", "0.5591573", "0.55856615", "0.5576992", "0.55707216", "0.5569681", "0.55570376", "0.55531484", "0.5551123", "0.5550893", "0.55482954", "0.5547471", "0.55469507", "0.5545719", "0.5543553", "0.55424106", "0.5542057", "0.55410767", "0.5537739", "0.55269134", "0.55236584", "0.55170715", "0.55035424", "0.55020875" ]
0.0
-1
Cards OK button pressed.
public void cardsOKButtonPressed() { // Logic to add armies! int count; if (toggleCardButtonsPanel()) if (isTradedCardSetValid()) { if (doesCardMatchCurrentPlayerTerritory() > 0) { count = risk.curPlayer.getArmiesRecivedByTradingCards() + RiskGameModel.fetchTradedArmiesCount() + 2; risk.curPlayer.setArmiesRecivedByTradingCards(count); risk.curPlayer.addArmies(count); } else { count = risk.curPlayer.getArmiesRecivedByTradingCards() + RiskGameModel.fetchTradedArmiesCount(); risk.curPlayer.setArmiesRecivedByTradingCards(count); risk.curPlayer.addArmies(count); } cardStatusLabel.setText("Success"); risk.setState(RiskGameModel.REINFORCE); // allowing the player risk.notifyPhaseViewChange(); // to // set the armies after // trading the card statusLabel.setText("You have " + risk.curPlayer.getNumberOfArmies() + " left to place"); jPanel3.repaint(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void okButtonClicked();", "protected abstract void pressedOKButton( );", "void onOkButtonPressed();", "protected abstract boolean onOkClicked();", "public void ok() {\n btOK().push();\n }", "@FXML\n\tprivate void handleOk() {\n\t\tif (isValidInput()) {\n\t\t\tsaveCurrentAcknowledgment();\n\t\t\t\n\t\t\tif (isNew) {\n\t\t\t\tmain.getDbHelper().insertAcknowledgment(acknowledgment);\n\t\t\t\tmain.getAcknowledgmentData().clear();\n\t\t\t\tmain.getAcknowledgmentData().addAll(main.getDbHelper().retrieveAcknowledgmentList());\n\t\t\t} else {\n\t\t\t\tmain.getDbHelper().updateAcknowledgment(acknowledgment);\n\t\t\t\tmain.getAcknowledgmentData().clear();\n\t\t\t\tmain.getAcknowledgmentData().addAll(main.getDbHelper().retrieveAcknowledgmentList());\t\n\t\t\t}\n\t\t\t\n\t\t\tokClicked = true;\n\t\t\tdialogStage.close();\n\t\t}\n\t}", "public void actionPerformed (ActionEvent e)\n\t\t\t\t{\n\t\t\t\talertOK();\n\t\t\t\t}", "private void onOK() {\n isOkClicked = true;\n dispose();\n }", "@FXML\r\n private void handleOk() {\r\n if (isInputValid()) {\r\n actualizarEntidad(this.entidad);\r\n\r\n okClicked = true;\r\n dialogStage.close();\r\n }\r\n }", "@FXML\n\tprivate void handleOk() {\n\n\t\tokClicked = true;\n\t\tdialogStage.close();\n\n\t}", "public void OnOkClick()\r\n {\r\n\r\n }", "@Override\r\n\tprotected void onOkSelection(SelectionEvent e) {\n\t\tSystem.out.println(\"Ok button implementation\");\r\n\t}", "public void cmdOk() {\n\n\t\tif (!m_actionscombo.isValueInModel()) {\n\t\t\tString msg = I18N.getLocalizedMessage(\"Invalid Action Name\");\n\t\t\tString title = I18N.getLocalizedMessage(\"Error\");\n\t\t\tJOptionPane.showMessageDialog(null, msg, title, JOptionPane.ERROR_MESSAGE);\n\t\t} else\n\t\t\tsuper.cmdOk();\n\t}", "private void okButtonActionPerformed() {\n\n saveConsoleText(consoleTextArea);\n\n setVisible(false);\n\n if (mainFrame == null && !isBasicUI) {\n System.exit(0);\n }\n }", "public void okPressed() {\r\n\t\t\r\n\t\tif (albumname.getText().trim().toString().equals(\"\")) {\r\n\t\t\t\r\n\t\t\tAlert alert = new Alert(AlertType.WARNING);\r\n\t\t\talert.setTitle(\"ALERT\");\r\n\t\t\talert.setHeaderText(\"Error\");\r\n\t\t\talert.setContentText(\"Must enter an album name.\");\r\n\t\t\talert.showAndWait();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\r\n\t\tString albumName = albumname.getText().trim().toString();\r\n\t\t\r\n\t\tif (checkForDuplicateAlbumNames(albumName)==true) {\r\n\t\t\tAlert alert = new Alert(AlertType.WARNING);\r\n\t\t\talert.setTitle(\"ALERT\");\r\n\t\t\talert.setHeaderText(\"Duplicate Names\");\r\n\t\t\talert.setContentText(\"An album already has that name. \\n Enter a new name.\");\r\n\t\t\talert.showAndWait();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\r\n\t\tAlbum newalbum = new Album(albumName);\r\n\t\tAlbumsController.getCurrentUser().addAlbumToUser(newalbum);\r\n\t\tLoginController.saveData(LoginController.users);\r\n\t\t\r\n\t\t\r\n\t\t//go to albums controller and load corresponding fxml\r\n\t\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"Albums.fxml\"));\r\n\t\t\t\ttry{\r\n\t\t\t\t\tParent parent = (Parent) loader.load();\r\n\t\t\t\t\tAlbumsController controller = loader.<AlbumsController>getController();\r\n\t\t\t\t\tScene scene = new Scene(parent);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// ok is the button pressed action event\r\n\t\t\t\t\tStage stage = (Stage) ((Node) ok).getScene().getWindow();\r\n\t\t\t\t\tcontroller.start(stage,AlbumsController.getCurrentUser());\r\n\t\t\t\t\tstage.setScene(scene);\r\n\t\t\t\t\tstage.centerOnScreen();\r\n\t\t\t\t\tstage.show();\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception exception) {\r\n\t\t\t\t\texception.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}", "public void handleActionOk() {\n\t\tsuper.handleActionOk();\n\t\tnewModeOkApply();\n\t\tthis.getDocumentView().close();\n\t}", "@Override\n\tpublic void okPressed() {\n\t\t_text = _noteTextField.getText();\n\t\tsetReturnCode(OK);\n\t\tclose();\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttext.setText(ok.getText());\n\t\t\t}", "protected void okPressed()\n\t{\n\t\t((NewProjectComposite) this.getDialogArea()).updateProject(project);\n\t\tsuper.okPressed();\n\t}", "protected void okPressed() {\n\t\tconfig.setExportThreadCount(txtThreadCount.getSelection());\n\t\tconfig.setImportThreadCount(txtMaxImportThreadCountPerTable.getSelection());\n\t\tconfig.setCommitCount(txtCommitCount.getSelection());\n\t\tif (txtPageCount != null) {\n\t\t\tconfig.setPageFetchCount(txtPageCount.getSelection());\n\t\t}\n\t\tif (txtFileMaxSize != null) {\n\t\t\tconfig.setMaxCountPerFile(txtFileMaxSize.getSelection());\n\t\t}\n\t\tconfig.setImplicitEstimate(btnImplicitEstimate.getSelection());\n\t\tsuper.okPressed();\n\t}", "@FXML\n private void handleOk() {\n if (isInputValid()) {\n gem.setGemName(gemNameField.getText());\n gem.setGemValue(Integer.parseInt(gemValueField.getText()));\n gem.setDescription(gemDescripField.getText());\n\n okClicked = true;\n dialogStage.close();\n }\n }", "protected Button getOkButton()\r\n\t{\r\n\t\treturn okButton;\r\n\t}", "@FXML public void handleOk() {\n\t\tSystem.out.println(\"OK clicked!\");\n\t\t\n\t\tif (checkParameters().equals(ErrorCode.BatchSize)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Batch Size]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.ConfidenceFactor)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Confidence Factor]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.MinNumObj)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Min Num Obj]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.NumDecimalPlaces)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Num Decimal Places]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.NumFolds)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Num Folds]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.Seed)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Seed]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.Fine)) {\n\t\t\tsaveParameters();\n\t\t\tClassifiersWindowsManager.stage.close();\n\t\t}\n\t}", "public boolean isOkClicked(){\n\t\treturn okClicked;\n\t}", "public boolean isOkClicked() {\r\n\t\treturn okClicked;\r\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\tcard.next(bootpanel);\n\t\t\tSystem.out.println(\"next\");\n\t\t}", "private void onOkButtonPressed() {\n\t\tconfirm = true;\n\t\tif (template.getAskDimension()) {\n\t\t\ttry {\n\t\t\t\twidth = Integer.parseInt(widthInputField.getFieldString());\n\t\t\t\twidthInputField.setFieldColor(GameFrame.getStandardFieldColor());\n\t\t\t} catch (Exception except) {\n\t\t\t\twidthInputField.setFieldColor(GameFrame.getWrongFieldColor());\n\t\t\t\tconfirm = false;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\theight = Integer.parseInt(heightInputField.getFieldString());\n\t\t\t\theightInputField.setFieldColor(GameFrame.getStandardFieldColor());\n\t\t\t} catch (Exception except) {\n\t\t\t\theightInputField.setFieldColor(GameFrame.getWrongFieldColor());\n\t\t\t\tconfirm = false;\n\t\t\t}\n\t\t\tif(!confirm)\n\t\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (template.getAskLoading()) {\n\t\t\tint result = savefileChooser.showOpenDialog(this);\n\t\t\tif (result != JFileChooser.APPROVE_OPTION) {\n\t\t\t\tconfirm = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tdispatchEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));\n\t}", "private void okEvent() {\n\t\tYAETMMainView.PRIVILEGE = (String)loginBox.getSelectedItem();\n\t\tshowMain();\n\t\tcloseDialog();\n\t}", "public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}", "public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}", "public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}", "public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}", "public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}", "private void jButtonOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOkActionPerformed\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showConfirmDialog(OverCounterForm.this, \"Check this\");\n }", "public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"Pressed OK\",\n Toast.LENGTH_SHORT).show();\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\tMenu.currentCard = 2;\r\n\t\t\tCardLayout cl = (CardLayout)(Menu.cardPanel.getLayout());\r\n\t\t\tSystem.out.println( ((JButton)evt.getSource()).getText() );\r\n\t\t\tcl.show(Menu.cardPanel, \"MATCH_RESULTS_SCREEN\");\r\n\t\t}", "@FXML\r\n private void handleOk() {\r\n if (isInputValid()) {\r\n video.setName(nameField.getText());\r\n video.setUrl(urlField.getText());\r\n\r\n okClicked = true;\r\n dialogStage.close();\r\n }\r\n }", "public static void okButtonAction(ActionContext actionContext){\n World world = World.getInstance();\n Thing form = actionContext.getObject(\"form\");\n Shell shell = actionContext.getObject(\"shell\");\n \n Thing dataObject = world.getThing(\"xworker.app.test.dataObject.thing.Sex\");\n form.doAction(\"setDataObject\", actionContext, \"dataObject\", dataObject);\n shell.pack();\n }", "public boolean isOkClicked() {\r\n return okClicked;\r\n }", "public boolean isOkClicked() {\r\n return okClicked;\r\n }", "public boolean isOkClicked() {\r\n return okClicked;\r\n }", "public boolean isOkClicked() {\r\n return okClicked;\r\n }", "@Override\n\tpublic boolean performOk() {\n\t\t// Get the preference store\n\t\tfinal IPreferenceStore preferenceStore = getPreferenceStore();\n\n\t\t// Set the values from the fields\n\t\tpreferenceStore.setValue(DEFAULT_PASSWORD_LENGTH, spiLength.getSelection());\n\t\tpreferenceStore.setValue(USE_LOWERCASE_LETTERS, btnUseLowercase.getSelection());\n\t\tpreferenceStore.setValue(USE_UPPERCASE_LETTERS, btnUserUppercase.getSelection());\n\t\tpreferenceStore.setValue(USE_DIGITS, btnUseDigits.getSelection());\n\t\tpreferenceStore.setValue(USE_SYMBOLS, btnUseSymbols.getSelection());\n\t\tpreferenceStore.setValue(USE_EASY_TO_READ, btnUseEaseToRead.getSelection());\n\t\tpreferenceStore.setValue(USE_HEX_ONLY, btnUseHexOnly.getSelection());\n\n\t\t// Return true to allow dialog to close\n\t\treturn true;\n\t}", "@FXML\n private void handleOk() {\n System.out.println(\"handleOk AdresEditController\");\n if (isInputValid()) {\n //aby udalo sie select\n adres.setPrev_adres_id(adres.getAdres_id());\n\n adres.setAdres_id(Integer.parseInt(adres_id_textField.getText()));\n adres.setWojewodztwo(wojewodztwo_textField.getText());\n adres.setMiejscowosc(miejscowosc_textField.getText());\n adres.setUlica(ulica_textField.getText());\n adres.setKraj(kraj_textField.getText());\n adres.setKod_pocztowy(kod_pocztowy_textField.getText());\n\n adres.update();\n\n okClicked = true;\n dialogStage.close();\n }\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showConfirmDialog(OverCounterForm.this, \"Check this out\");\n }", "public void clickOnSuccessOkBtn() throws Exception {\r\n\t\r\n\t\t\tclickOnButton(btnOKSuccess);\r\n\t\t\tlog(\"clicked on OK button and object is:-\" + btnOKSuccess.toString());\r\n\t\t\tThread.sleep(1000);\r\n\t}", "public boolean isOkClicked() {\n return okClicked;\n }", "public boolean isOkClicked() {\n return okClicked;\n }", "public void onYesButtonClicked() {\n changeAfterClientPick();\n }", "public boolean getOK() {\n return userAction.equals(OK);\n }", "public void actionPerformed(ActionEvent e) {\n\t\toptionPane.setValue(okString);\n\t}", "@Override\n\t\t\tpublic void handle(ActionEvent arg0) {\n\t\t\t\tcon.setResult(btnName);\n\t\t\t}", "public void buttonPress(ActionEvent event) {\r\n Button clickedButton = (Button) event.getSource();\r\n String selectedButton = clickedButton.getId();\r\n System.out.print(selectedButton);\r\n \r\n // If the user correctly guesses the winning button\r\n if (correctButtonName.equals(selectedButton)) {\r\n \r\n //Displays a popup alerting the user that they won the game.\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setTitle(\"You Win!\");\r\n alert.setHeaderText(\"Congratulations, you found the treasure!\");\r\n alert.setContentText(\"Would you like to play again?\");\r\n ButtonType okButton = new ButtonType(\"Play again\");\r\n ButtonType noThanksButton = new ButtonType(\"No Thanks!\");\r\n alert.getButtonTypes().setAll(okButton, noThanksButton);\r\n Optional<ButtonType> result = alert.showAndWait();\r\n \r\n //If the user selects \"Play again\" a new button will be randomly selected\r\n if (result.get() == okButton ){\r\n //Chooses a random button from the list of buttons\r\n correctButtonName = buttonList[(int)(Math.random() * buttonList.length)];\r\n }\r\n //If the user does not select \"Play again\", the application will be closed\r\n else {System.exit(0);}\r\n \r\n }\r\n \r\n //If the user chooses any button except for the winning button\r\n else if (!selectedButton.equals(correctButtonName)) {\r\n \r\n //Displays a popup alerting the user that they did not find the treasure.\r\n Alert alert2 = new Alert(Alert.AlertType.INFORMATION);\r\n alert2.setTitle(\"No treasure!\");\r\n alert2.setHeaderText(\"There was no treasure found on that island\");\r\n alert2.setContentText(\"Would you like to continue searching for treasure?\");\r\n ButtonType ayeCaptain = new ButtonType (\"Continue Searching\");\r\n ButtonType noCaptain = new ButtonType (\"Quit\");\r\n alert2.getButtonTypes().setAll(ayeCaptain,noCaptain);\r\n Optional<ButtonType> result2 = alert2.showAndWait();\r\n \r\n if (result2.get() == ayeCaptain){\r\n //The search for treasure continues!\r\n }\r\n else{ \r\n System.exit(0);\r\n }\r\n }\r\n }", "public void itemOkay() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void onCardComfrim() {\n\t\tdialog = MessageUtils.showCommonDialog(\n\t\t\t\tactivity, \n\t\t\t\tactivity.getText(R.string.common_cardno_comfirm).toString(),\n\t\t\t\tbean.getPan(), \n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t// 确认\n\t\t\t\t\t\tdissmiss();\n\t\t\t\t\t\tonSucess();\n\t\t\t\t\t}\n\t\t\t\t}, \n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t// 取消\n\t\t\t\t\t\tdissmiss();\n\t\t\t\t\t\tonFail();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t30,\n\t\t\t\tTimeOutOper.CANCEL\n\t\t\t\t);\n\t}", "public void clickYes ();", "protected void okPressed() {\r\n \t\tArrayList resources= new ArrayList(10);\r\n \t\tfindCheckedResources(resources, (IContainer)fTree.getInput());\r\n \t\tif (fWorkingSet == null)\r\n \t\t\tfWorkingSet= new WorkingSet(getText().getText(), resources.toArray());\r\n \t\telse if (fWorkingSet instanceof WorkingSet) {\r\n \t\t\t// Add not accessible resources\r\n \t\t\tIResource[] oldResources= fWorkingSet.getResources();\r\n \t\t\tfor (int i= 0; i < oldResources.length; i++)\r\n \t\t\t\tif (!oldResources[i].isAccessible())\r\n \t\t\t\t\tresources.add(oldResources[i]);\r\n \r\n \t\t\t((WorkingSet)fWorkingSet).setName(getText().getText());\r\n \t\t\t((WorkingSet)fWorkingSet).setResources(resources.toArray());\r\n \t\t}\r\n \t\tsuper.okPressed();\r\n \t}", "@Action\n public void acOk() {\n if (checkFormattedTextFieldNullNoSupposed(jftfCoord1, -1e5, 1e5)) {\n return;\n }\n if (checkFormattedTextFieldNullNoSupposed(jftfCoord2, -1e5, 1e5)) {\n return;\n }\n if (checkTextField(jtfName)) {\n return;\n }\n getTempObj().setType(jcbType.getSelectedIndex());\n getTempObj().setCoord1(getDoubleFromFormattedTextField(jftfCoord1));\n getTempObj().setCoord2(getDoubleFromFormattedTextField(jftfCoord2));\n getTempObj().setName(jtfName.getText());\n setChangeObj(true);\n }", "public void clickedOk(View view) {\n \t\n \t// validate the data set\n \tif (!getData()) return;\n \t\n \t// confirm values that are in range, but possibly wrong\n \tif (!confirmData(0)) return;\n \t\n \t// success\n \t\treturnResult(Activity.RESULT_OK);\n }", "@FXML\n\tprivate void handleOk() {\n\t\tif (isInputValid()) {\n\t\t\titem.setDate(DateUtil.parse(dateField.getText()));\n\t\t\titem.setCategory(categoryField.getSelectionModel().getSelectedItem());\n\t\t\titem.setUse(useField.getText());\n\t\t\t\n\t\t\tString textBefore = amountField.getText();\n\t\t\tString textAfter = null;\n\t\t\tif(textBefore.contains(\",\")) {\n\t\t\t\ttextAfter = textBefore.replace(\",\", \".\");\n\t\t\t} else {\n\t\t\t\ttextAfter = textBefore;\n\t\t\t}\n\t\t\titem.setAmount(Double.parseDouble(textAfter));\n\t\t\titem.setDistributionKind(distributionKindField.getText());\n\n\t\t\tokClicked = true;\n\t\t\tdialogStage.close();\n\t\t}\n\t}", "public void submitText() {\r\n \t\tthis.dialog.clickOK();\r\n \t}", "@Override\n\tpublic void onCardSucess() {\n\t\tLoggerUtils.d(\"onCardSucess Start!!!\");\n\t\tonSucess();\n\t}", "void okButton_actionPerformed(ActionEvent e) {\n setItskey(keyTextField.getText());\n setItsvalue(valueTextField.getText());\n setUserAction(OK);\n setVisible(false);\n }", "@FXML\n private void handleOKPressed() {\n\n if (Authenticator.validatePassword(accountId.getText(), password.getText())) {\n application.accountLogging(accountId.getText());\n confirmLogin = true;\n dialogStage.close();\n } else {\n errorMessage.setVisible(true);\n }\n }", "private void onConfirmButtonPressed() {\r\n disposeDialogAndCreateNewGame();\r\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tif (e.getActionCommand().equals(\"确定\"))\r\n\t\t\t\t\tonOK();\r\n\t\t\t\tif (e.getActionCommand().equals(\"取消\"))\r\n\t\t\t\t\tonCancel();\r\n\t\t\t\tif (e.getActionCommand().equals(\"应用\"))\r\n\t\t\t\t\tonApply();\r\n\t\t\t}", "@FXML\n\tprivate void handleOk(){\n\t\tif(isInputValid()){\n\t\t\tproduct.setName(nameField.getText());\n\t\t\tproduct.setAmountAvailable(Integer.parseInt(amountAvailableField.getText()));\n\t\t\tproduct.setAmountSold(Integer.parseInt(amountSoldField.getText()));\n\t\t\tproduct.setPriceEach(Integer.parseInt(priceEachField.getText()));\n\t\t\tproduct.setPriceMake(Integer.parseInt(priceMakeField.getText()));\n\t\t\t// Converts the values to ints and then subtracts\n\t\t\tproduct.setProfit(Integer.parseInt(priceEachField.getText())-Integer.parseInt(priceMakeField.getText()));\n\t\t\t// Converts the values to ints, subtracts, and then multiplies\n\t\t\tproduct.setMoney((Integer.parseInt(priceEachField.getText())-Integer.parseInt(priceMakeField.getText()))*Integer.parseInt(amountSoldField.getText()));\n\t\t\tokClicked = true;\n\t\t\tdialogStage.close();\t\n\t\t}\n\t}", "protected GuiTestObject okbutton() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"okbutton\"));\n\t}", "public void onEulaAction(boolean isAccepted);", "@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tupdateOkState();\r\n\t\t\t}", "public void proceedOnPopUp() {\n Controllers.button.click(proceedToCheckOutPopUp);\n }", "void setOk();", "@FXML\r\n private void handleOk() {\r\n if (isInputValid()) {\r\n \temployee.setId(Integer.parseInt(idLabel.getText()));\r\n \temployee.setFirstName(firstNameField.getText());\r\n \temployee.setLastName(lastNameField.getText());\r\n \temployee.setIndustry(industryField.getText());\r\n \temployee.setWorkType(workTypeField.getText());\r\n \temployee.setAddress(addressField.getText());\r\n \t\r\n\r\n okClicked = true;\r\n dialogStage.close();\r\n }\r\n }", "@Test\n\tpublic void testClickOnOkayButton() {\n\n\t\tvar prompt = openPrompt();\n\t\tprompt.getOkayButton().click();\n\t\tassertNoDisplayedModalDialog();\n\t\tassertPromptInputApplied();\n\t}", "@FXML\n\tprivate void handleOk() {\n\t\ttry {\n\t\t\ttypeDAO.supprimerType(new Type(listIdType.get(comboboxtype.getSelectionModel().getSelectedIndex()),\"\",\"\"));\n\t\t\tnew Popup(\"Type \"+comboboxtype.getValue()+\" supprimer !\");\n\t\t} catch (ConnexionBDException e) {\n\t\t\tnew Popup(e.getMessage());\n\t\t}\n\t\tokClicked = true;\n\t\tdialogStage.close();\n\t}", "public void clickCorrect(ActionEvent actionEvent) {\n current.getSelector().update(Selector.AnswerType.CORRECT);\n nextCard();\n }", "void CloseOkDialog();", "private void showReturnDialog(){\n final Dialog verificationDialog = new Dialog(this, R.style.DialogTheme);\n verificationDialog.setContentView(R.layout.dialog_verification);\n TextView verificationText = (TextView) verificationDialog.findViewById(R.id.verification_text);\n Button cancelButton = (Button) verificationDialog.findViewById(R.id.cancel_button);\n Button acceptButton = (Button) verificationDialog.findViewById(R.id.accept_button);\n verificationDialog.show();\n\n verificationText.setText(R.string.verification_return);\n\n // Setting up a listener for the Cancel Button:\n cancelButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n // Play a proper sound:\n if(mSoundStatus.equals(Constants.ON)) mPutPieceSound.start();\n\n // Dismiss dialog:\n verificationDialog.dismiss();\n\n }\n });\n\n // Setting up a listener for the Done Button:\n acceptButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n // Play a proper sound:\n if(mSoundStatus.equals(Constants.ON)) mPutPieceSound.start();\n\n // Dismiss dialog:\n verificationDialog.dismiss();\n\n // Go back to main menu:\n\n // Creating an intent:\n Intent mainIntent = new Intent(OfflineGameActivity.this , MainActivity.class);\n // Starting the Main Activity:\n startActivity(mainIntent);\n\n }\n });\n\n }", "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int button) {\n\t\t\t\t}", "private void successDialog() {\n AlertDialog dialog = _dialogFactory.createDialog(this, R.string.completed, R.string.success);\n\n dialog.setButton(DialogInterface.BUTTON_NEUTRAL, getString(R.string.ok), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n gotoGameEnd(IGameConstants.GAME_SUCCESS);\n }\n });\n\n dialog.setCancelable(false);\n _dialogActive = true;\n dialog.show();\n }", "public void onClick(DialogInterface dialog, int whichButton) {\n callbackContext.success(edittext.getText().toString());\n }", "public void ok() {\n\t\tstate.ok();\n\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int button) {\n\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e)\n\t\t{\n\t\t\tswitch( FinalJeopardyScreen.this.stage )\n\t\t\t{\n\t\t\t\tcase TITLE:\n\t\t\t\t\tFinalJeopardyScreen.this.stage = FinalJeopardyStage.CATEGORY;\n\t\t\t\t\tFinalJeopardyScreen.this.mainScreen.label = FinalJeopardyScreen.this.category.name;\n\t\t\t\t\tbreak;\n\t\t\t\tcase CATEGORY:\n\t\t\t\t\tFinalJeopardyScreen.this.stage = FinalJeopardyStage.CLUE;\n\t\t\t\t\tFinalJeopardyScreen.this.mainScreen.label = FinalJeopardyScreen.this.clue.text;\n\t\t\t\t\tbreak;\n\t\t\t\tcase CLUE:\n\t\t\t\t\tFinalJeopardyScreen.this.stage = FinalJeopardyStage.ANSWER;\n\t\t\t\t\tFinalJeopardyScreen.this.mainScreen.label = FinalJeopardyScreen.this.clue.answer;\n\t\t\t\t\tbreak;\n\t\t\t\tcase ANSWER:\n\t\t\t\t\tLogger.log( \"Final Jeopardy is complete!\");\n\t\t\t\t\tFinalJeopardyScreen.this.controller.startNextRound();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tClickOK();\n\t\t\t\tCursurIndex = 3;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t}", "protected void buttonPressed(\r\n\t\tint buttonId)\r\n\t{\r\n\t\tvalue = text.getText();\r\n\t\tif ( value != null && value.length() > 10 ) {\r\n\t\t\tint ret = FAILED;\r\n\t\t\tif ( buttonId == IDialogConstants.OK_ID ) {\r\n\t\t\t\tret = PASSED;\r\n\t\t\t} else if ( buttonId == IDialogConstants.CLOSE_ID ) {\r\n\t\t\t\tret = BLOCKED;\r\n\t\t\t}\r\n\t\t\tsetReturnCode(ret);\r\n\t\t\tclose();\r\n\t\t}\r\n\t}", "private int drawCards(){\n int input = JOptionPane.showConfirmDialog(null, FirstPlayer.showHand() + SecondPlayer.showHand() +\n \"Would you like to continue the game?\\n\", \"Draw another card?\", \n JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n return input;\n }", "public JButton getOkButton(){\n\t\treturn okButton;\n\t}", "public void buttonShowComplete(ActionEvent actionEvent) {\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n setOnVacationOk(atc, guiD, sm);\n }", "void okButton_actionPerformed(ActionEvent e)\n\t{\n\t\tpropertiesEditPanel.saveChanges();\n\t\tcloseDlg();\n\t\tokPressed = true;\n }", "@FXML\r\n private void handleOk() {\r\n if (isInputValid()) {\r\n environment.setName(nameField.getText());\r\n environment.setIP(hostField.getText());\r\n environment.setPort(Integer.parseInt(portField.getText()));\r\n environment.setLogin(loginField.getText());\r\n environment.setPassword(passwordField.getText());\r\n environment.setPathMOM(MOMPathField.getText());\r\n environment.setServer(serverField.getValue());\r\n environment.setService(serviceField.getValue());\r\n okClicked = true;\r\n dialogStage.close();\r\n }\r\n }", "public void actionPerformed (ActionEvent event) {\n RainRunGUI.c1.show(RainRunGUI.cards, RainRunGUI.MENUPANEL);\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tLibrarianSuccess.main(new String[]{});\r\n\t\t\t\tframe.dispose();\r\n\t\t\t\t\r\n\t\t\t}", "public void selectPressed() {\n\t\tif (edit) {\n\t\t\tdisplayCardHelp = !displayCardHelp;\n\t\t} else {\n\t\t\tSoundPlayer.playSound(SoundMap.MENU_ERROR);\n\t\t}\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tJOptionPane.showConfirmDialog(null, \"BOTAO CLICADO\", \"VALOR\", JOptionPane.PLAIN_MESSAGE);\n\n\t\t}", "@FXML private void okButtonAction() throws SQLException, IOException {\n String comment = commentTextField.getText();\n int score = Integer.parseInt(scoreBox.getValue());\n DatabaseConnection.createOpinion(activeUser.getUsername(), recipe.getId(),score, comment ,opinionLabel, opinionView);\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\tMenu.currentCard = 1;\r\n\t\t\tCardLayout cl = (CardLayout)(Menu.cardPanel.getLayout());\r\n\t\t\tSystem.out.println( ((JButton)evt.getSource()).getText() );\r\n\t\t\tprintPairings();\r\n\t\t}", "@Override\n public void handle(ActionEvent e)\n {\n Button button = (Button) e.getSource();\n //system.out.println(\"Button ID:\" + button.getId());\n\n boolean cardInMatchedDeck = false;\n \n if (gradeSelected == true)\n {\n // if the card selected by the player was already green, return it to null\n if(button.getStyle() == \"-fx-background-color: MediumSeaGreen\")\n {\n \t// determine if the clicked card exists in the matched deck so we can turn it back to blue if being de-selected\n \tfor(int i = 0; i < matchedDeck.size(); i++)\n \t{\n \t\t//tempCard = (Card) matchedDeck.get(i);\n \t\tif(Integer.parseInt(button.getId()) == matchedDeck.get(i).getCardId())\n \t\t{\n \t\t\tcardInMatchedDeck = true;\n \t\t\tbreak;\n \t\t}\n \t}\n \t\n \t// turn card back to blue as it has been previously purchased\n \tif(cardInMatchedDeck)\n \t{\n \t\tbutton.setStyle(\"-fx-background-color:#38ade3\");\n \t}\n \telse\n \t{\n \t\tbutton.setStyle(null);\n \t}\n \t\n playerDeck.remove(gameDeck.get(Integer.parseInt(button.getId())));\n showPlayerDeckInfo();\n numCardsSelected--;\n }\n else if (numCardsSelected < 4)\n {\n button.setStyle(\"-fx-background-color: MediumSeaGreen\");\n playerDeck.add(gameDeck.get(Integer.parseInt(button.getId())));\n showPlayerDeckInfo();\n numCardsSelected++;\n }\n }\n }" ]
[ "0.7750722", "0.7361753", "0.7159277", "0.711831", "0.7110268", "0.69717675", "0.6931043", "0.68824595", "0.6880335", "0.687609", "0.6850034", "0.68188775", "0.6795267", "0.67617244", "0.67148185", "0.67036664", "0.6686647", "0.6666124", "0.6655183", "0.6654883", "0.65814394", "0.65724844", "0.65192187", "0.65099055", "0.65074825", "0.6506856", "0.64988923", "0.6496054", "0.64624965", "0.64624965", "0.64624965", "0.64624965", "0.64624965", "0.64470106", "0.64375097", "0.643657", "0.64246285", "0.6418807", "0.6417097", "0.64029634", "0.64029634", "0.64029634", "0.64029634", "0.63736576", "0.6369979", "0.63613796", "0.6349222", "0.63478136", "0.63478136", "0.6331599", "0.6293867", "0.6287356", "0.6282994", "0.62651515", "0.62630826", "0.6248586", "0.6237145", "0.62316847", "0.6225106", "0.62186414", "0.62136585", "0.62115943", "0.6190547", "0.6190469", "0.61806667", "0.6175585", "0.61632055", "0.6154653", "0.6150411", "0.6139089", "0.613705", "0.61219305", "0.61182207", "0.6094279", "0.60920095", "0.6089354", "0.6075264", "0.60666203", "0.6064243", "0.6055829", "0.6046711", "0.6046022", "0.6042046", "0.6041609", "0.60408306", "0.6035821", "0.6030437", "0.60259086", "0.6024564", "0.6024517", "0.60226953", "0.601596", "0.6002743", "0.5999597", "0.5992624", "0.598466", "0.5980207", "0.5979586", "0.5976951", "0.5974923" ]
0.7187671
2
Does card match current player territory.
public int doesCardMatchCurrentPlayerTerritory() { int countMatchingCards = 0; for (RiskCardModel card : risk.curPlayer.getCard()) { for (RiskTerritoryModel territory : risk.curPlayer.getOccupiedTerritories()) { if (territory.getId() == card.territory) countMatchingCards++; } } return countMatchingCards; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasCardAndTerritory(Player player) {\r\n\t\tfor (int i = 0; i < player.playersHand().getCurrentDeck().size(); i++) {\r\n\t\t\tfor (int j = 0; j < player.getTerritories().size(); j++) {\r\n\t\t\t\tif (player.playersHand().getCurrentDeck().get(i).getID() == player\r\n\t\t\t\t\t\t.getTerritories().get(j).getUniqueID()) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean matches(Card otherCard) {\r\n if (suit==otherCard.suit() && pointValue == otherCard.pointValue() && rank == otherCard.rank())\r\n return true;\r\n else\r\n return false;\r\n }", "@Override\n public boolean match(Card card) {\n if (card.getColor().equals(\"BLACK\"))\n return true;\n\n return (card.getColor().equals(this.getColor())\n || card.getValue().equals(this.getValue()));\n }", "public boolean isWin_LordRust(){\r\n // player got LordSelachii card\r\n Player playerHoldCard = null;\r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(player.getPersonalityCardID() == 3){\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if(playerHoldCard != null){\r\n int numPlayers = discWorld.getPlayer_HASH().size();\r\n \r\n int numCityAreaCard = 0;\r\n \r\n for(Integer areaID : playerHoldCard.getCityAreaCardList()){\r\n Area area = discWorld.getArea_HASH().get(areaID);\r\n if(area.getDemonList().size() == 0){\r\n numCityAreaCard++;\r\n }\r\n }\r\n \r\n if (numPlayers == 2) {\r\n if(numCityAreaCard >= 7){\r\n return true;\r\n }\r\n } else if (numPlayers == 3) {\r\n if(numCityAreaCard >= 5){\r\n return true;\r\n }\r\n } else if (numPlayers == 4) {\r\n if(numCityAreaCard >= 4){\r\n return true;\r\n }\r\n }\r\n }\r\n \r\n return false;\r\n }", "public boolean playerCardCheck(Card card)\n {\n int diff = Card.valueOfCard(playerCard) - Card.valueOfCard(card);\n // If player wins\n if( diff == 1 || diff == -1)\n {\n return true;\n }\n return false;\n }", "public boolean isTerritoryBelongsCurrentPlayer() {\n if(selectedTerritoryByPlayer.getConquerID() == null)\n return false;\n return selectedTerritoryByPlayer.getConquerID().equals(currentPlayerTurn.getID());\n }", "public boolean belongsToSuit(Card card){\r\n return (suit == card.suit);\r\n }", "public boolean isWin_LordVetinari(){\r\n // player got lordVetinari card\r\n Player playerHoldCard = null;\r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(player.getPersonalityCardID() == 1){\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if (playerHoldCard != null) {\r\n int numPlayers = discWorld.getPlayer_HASH().size();\r\n\r\n Set<Integer> areaList = new HashSet<Integer>();\r\n for (Integer minionID : playerHoldCard.getMinionList()) {\r\n int minion_ID = minionID;\r\n MinionPiece minion = discWorld.getMinionPiece_HASH().get(minion_ID);\r\n if (minion.getAreaNumber() != ConstantField.DEFAULT_UNDEFINED_PLAYID) {\r\n int areaID = minion.getAreaNumber();\r\n Area area = discWorld.getArea_HASH().get(areaID);\r\n // make sure free of demon\r\n if (area.getDemonList().size() == 0) {\r\n areaList.add(minion.getAreaNumber());\r\n }\r\n }\r\n\r\n }\r\n\r\n if (numPlayers == 2) {\r\n\r\n if (areaList.size() >= 11) {\r\n return true;\r\n }\r\n\r\n } else if (numPlayers == 3) {\r\n\r\n if (areaList.size() >= 10) {\r\n return true;\r\n }\r\n\r\n } else if (numPlayers == 4) {\r\n\r\n if (areaList.size() >= 9) {\r\n return true;\r\n }\r\n\r\n }\r\n }\r\n\r\n return false;\r\n }", "public boolean isEqual(MatchingCardsTile other){\n return this.getNumber() == other.getNumber();\n }", "public boolean isWin_LordSelachii(){\r\n // player got LordSelachii card\r\n Player playerHoldCard = null;\r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(player.getPersonalityCardID() == 2){\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if(playerHoldCard != null){\r\n int numPlayers = discWorld.getPlayer_HASH().size();\r\n \r\n int numCityAreaCard = 0;\r\n \r\n for(Integer areaID : playerHoldCard.getCityAreaCardList()){\r\n Area area = discWorld.getArea_HASH().get(areaID);\r\n if(area.getDemonList().size() == 0){\r\n numCityAreaCard++;\r\n }\r\n }\r\n \r\n if (numPlayers == 2) {\r\n if(numCityAreaCard >= 7){\r\n return true;\r\n }\r\n } else if (numPlayers == 3) {\r\n if(numCityAreaCard >= 5){\r\n return true;\r\n }\r\n } else if (numPlayers == 4) {\r\n if(numCityAreaCard >= 4){\r\n return true;\r\n }\r\n }\r\n }\r\n \r\n return false;\r\n }", "public boolean lookAtWinCard(){\n boolean winCard = false;\n for(Card cards: playerHand){\n if(cards.getCardName().equals(\"Magnetite\")){\n winCard = true;\n }\n }\n return winCard;\n }", "public boolean canUseCard(Card card) {\r\n\t\tif (card.cardColor.contains(CardColor.GREEN)\r\n\t\t\t\t|| card.cardColor.contains(CardColor.GREY)) {\r\n\t\t\treturn false;\r\n\t\t} else if (this.blackTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.PURPLE)\r\n\t\t\t\t&& this.purpleTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.RED) && this.redTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.BLUE)\r\n\t\t\t\t&& this.blueTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.BROWN)\r\n\t\t\t\t&& this.brownTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else\r\n\t\t\treturn false;\r\n\t}", "public boolean computerCardCheck(Card card)\n {\n int diff = Card.valueOfCard(computerCard) - Card.valueOfCard(card);\n // If player wins\n if( diff == 1 || diff == -1)\n {\n return true;\n }\n return false;\n }", "public boolean equals(Card c)\n {\n if (rank == c.rank)\n return true;\n else\n return false;\n }", "public boolean isWin_LordDeWorde(){\r\n // player got LordSelachii card\r\n Player playerHoldCard = null;\r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(player.getPersonalityCardID() == 4){\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if(playerHoldCard != null){\r\n int numPlayers = discWorld.getPlayer_HASH().size();\r\n \r\n int numCityAreaCard = 0;\r\n \r\n for(Integer areaID : playerHoldCard.getCityAreaCardList()){\r\n Area area = discWorld.getArea_HASH().get(areaID);\r\n if(area.getDemonList().size() == 0){\r\n numCityAreaCard++;\r\n }\r\n }\r\n \r\n if (numPlayers == 2) {\r\n if(numCityAreaCard >= 7){\r\n return true;\r\n }\r\n } else if (numPlayers == 3) {\r\n if(numCityAreaCard >= 5){\r\n return true;\r\n }\r\n } else if (numPlayers == 4) {\r\n if(numCityAreaCard >= 4){\r\n return true;\r\n }\r\n }\r\n }\r\n \r\n return false;\r\n }", "private boolean inSameSuit() {\n for (int i = 0; i < cards.length-2; i++) {\n if (cards[i].charAt(1) != cards[i + 1].charAt(1)) {\n return false;\n }\n }\n \n return true;\n }", "public boolean isControlledByPlayer(Player player) {\r\n if (territories == null) {\r\n return false;\r\n }\r\n\r\n for (Territory territory : territories) {\r\n if (!territory.getPlayer().equals(player)) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }", "public boolean equals(Card other) {\n return this.compareTo(other) == 0;\n }", "@Override\n public boolean equals(Object otherObject) {\n if (this == otherObject) return true;\n if (!(otherObject instanceof Card)) return false;\n Card card = (Card) otherObject;\n return suit == card.suit &&\n rank == card.rank;\n }", "public static boolean sameCard(Card card1, Card card2){\r\n return (card1.rank == card2.rank && card1.suit == card2.suit);\r\n }", "public boolean equals(Card OtherCard){\n\t\treturn (this.equals(OtherCard));\n\t}", "public boolean equals(Card c) {\n if (this.getValue() == c.getValue() && this.getSuit() == c.getSuit())\n return true;\n return false;\n }", "public boolean isContinentCaptured(RiskPlayerModel p) {\n\t\tVector<Integer> t1 = new Vector<Integer>();\n\t\tVector<RiskTerritoryModel> t2 = p.getOccupiedTerritories();\n\n\t\tfor (int c = 0; c < t2.size(); c++)\n\t\t\tt1.add(t2.elementAt(c).getId());\n\t\tfor (int i = 0; i < territories.size(); i++) {\n\t\t\tif (!t1.contains(territories.elementAt(i)))\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private boolean isTargetTerritoryOneBlockAway() {\n for(Territory territory:getCurrentPlayerTerritories()) {\n if(Math.abs(territory.getID()-selectedTerritoryByPlayer.getID()) == 1) {\n int minID = Math.min(territory.getID(),selectedTerritoryByPlayer.getID());\n int maxID = Math.max(territory.getID(),selectedTerritoryByPlayer.getID());\n if(maxID % gameDescriptor.getColumns() == 0)\n return true;\n if((minID % gameDescriptor.getColumns() != 0 )\n && (minID / gameDescriptor.getColumns() == maxID / gameDescriptor.getColumns())) {\n return true;\n }\n }\n else if(Math.abs(territory.getID()-selectedTerritoryByPlayer.getID()) == gameDescriptor.getColumns())\n return true;\n }\n return false;\n }", "public boolean match(BoardSpace that);", "@Override\n public boolean shouldDrawCard(Card topPileCard, Card.Suit changedSuit) {\n topCard = topPileCard;\n boolean drawCard = true;\n for (Card card : cardsInHand) {\n if (card.getSuit().equals(changedSuit) || card.getRank().equals(topPileCard.getRank())) {\n drawCard = false;\n break;\n }\n }\n return drawCard;\n }", "public boolean isWin_DragonKingOfArms(){\r\n // player got LordSelachii card\r\n /*Player playerHoldCard = null;\r\n for (Player player : discWorld.getPlayer_HASH().values()) {\r\n if (player.getPersonalityCardID() == 5) {\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }*/\r\n int count = 0;\r\n for(TroubleMarker troubleMarker : discWorld.getTroubleMarker_HASH().values()){\r\n if(troubleMarker.getAreaNumber() != ConstantField.DEFAULT_PIECE_AREA_NUMBER){\r\n count++;\r\n }\r\n }\r\n \r\n if(count >= 8){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n \r\n }", "public boolean equals(Card card){\n return (this.getCardValue() == card.getCardValue());\n }", "public boolean isWin_CommanderVimes(){\r\n // player got LordSelachii card\r\n Player playerHoldCard = null;\r\n for (Player player : discWorld.getPlayer_HASH().values()) {\r\n if (player.getPersonalityCardID() == 7) {\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if(playerHoldCard != null){\r\n if(discWorld.getShuffled_PlayerCard().size() == 0){\r\n return true;\r\n }\r\n } \r\n \r\n return false;\r\n }", "boolean similarCard(Card c);", "@Override\n public boolean equals(Object o){\n if (o == this) { //True if it's this instance\n return true;\n }\n if (!(o instanceof LeaderCard))\n return false;\n\n //Check if same values\n LeaderCard c = (LeaderCard) o;\n return this.getId() == c.getId() && this.getVictoryPoints() == c.getVictoryPoints() && this.getRequirement().equals(c.getRequirement()) &&\n this.getSpecialAbility().equals(c.getSpecialAbility()) && this.inGame == c.inGame;\n }", "@Test\r\n public void testPlayer_getDumbStrategyCard_differentWinners() {\r\n player2 = new Player(\"\", true);\r\n player2.setHand(strategyHand.getAllCards());\r\n boolean differentLegalCardFound = false;\r\n Card firstDiscard = player2.getDumbStrategyCard(yellowSix, yellowSix.getColor());\r\n for(int i = 0; i < 25; i++) {\r\n Card loopCard = player2.getDumbStrategyCard(yellowSix, yellowSix.getColor());\r\n if(!loopCard.equals(firstDiscard)) {\r\n differentLegalCardFound = true;\r\n }\r\n }\r\n assertTrue(differentLegalCardFound);\r\n }", "public boolean rankIsEqualsTo(Card c) {\r\n\t\t//this method compares two card objects and if one is equal to the other then it return the value as true\r\n\t\tboolean rankIsEqualsTo = false;\r\n\t\t\r\n\t\tif(rank == c.getRank()) {\r\n\t\t\trankIsEqualsTo = true;\r\n\t\t}//if\r\n\t\treturn rankIsEqualsTo;\r\n\t\t\r\n\t}", "public boolean isWin() {\n if (chosen_door.getContains() == Contains.CAR) {\n return true;\n }\n return false;\n }", "public boolean canPlace(Card o, String c)\r\n {\r\n if (this.color == c)\r\n return true;\r\n else if (this.value == o.value)\r\n return true;\r\n else if (this.color == \"none\") // Wild cards\r\n return true;\r\n return false;\r\n }", "public boolean equals(Object object) {\n\n if (object == null || object.getClass() != this.getClass()) {\n return false;\n }\n\n Card other;\n other = (Card) object;\n\n return getRank() == other.getRank() && getSuit() == other.getSuit();\n }", "public boolean isPlayerInThisGame(Player player) {\n return player.equals(getRedPlayer()) || player.equals(getWhitePlayer());\n }", "private boolean canPlay(UnoCard topCard, UnoCard newCard) {\n\n\t\t// Color or value matches\n\t\tif (topCard.getColor().equals(newCard.getColor())\n\t\t\t\t|| topCard.getValue().equals(newCard.getValue()))\n\t\t\treturn true;\n\t\t// if chosen wild card color matches\n\t\telse if (topCard instanceof WildCard)\n\t\t\treturn ((WildCard) topCard).getWildColor().equals(newCard.getColor());\n\n\t\t// suppose the new card is a wild card\n\t\telse if (newCard instanceof WildCard)\n\t\t\treturn true;\n\n\t\t// else\n\t\treturn false;\n\t}", "public boolean checkForVictory() {\n // keep track of whether we have seen any pieces of either color.\n boolean anyWhitePieces = false;\n boolean anyRedPieces = false;\n // iterate through each row\n for (Row row : this.redBoard) {\n // whether we iterate through the red or white board does not matter; they contain the same pieces, just\n // in a different layout\n // iterate through each space in a row\n for (Space space : row) {\n // if there is a piece on this space\n if (space.getPiece() != null) {\n if (space.getPiece().getColor() == Piece.COLOR.RED) {\n // and if it's red, we have now seen at least one red piece\n anyRedPieces = true;\n } else if (space.getPiece().getColor() == Piece.COLOR.WHITE) {\n // and if it's white, we have now seen at least one white piece\n anyWhitePieces = true;\n }\n }\n }\n }\n // if we haven't seen any pieces of a color, then the other player has won\n if (!anyRedPieces) {\n // white player has won\n markGameAsDone(getWhitePlayer().getName() + \" has captured all the pieces.\");\n return true;\n } else if (!anyWhitePieces) {\n // red player has won\n markGameAsDone(getRedPlayer().getName() + \" has captured all the pieces.\");\n return true;\n }\n return false;\n }", "@Override\n public boolean anotherPlayIsPossible()\n {\n \t\n List<Integer> test = cardIndexes();\n return containsSum13(test) || containsK(test);\n \n }", "public boolean CheckForUnwinnableCondition(){\n int humanSize = GetSizeOfHumanHand();\n int computerSize = GetSizeOfComputerHand();\n\n for(int i = 0; i < humanSize; i++) {\n //Human can play a card\n String card = handHuman.get(i);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if (topCard.contains(\"8\")) {\n //Can play any card ontop to determine suite\n return true;\n }\n\n if (card.contains(\"8\")) {\n //valid because 8s are wild cards, human can place it\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if (firstLetter.equals(topFirstLetter)) {\n return true;\n }\n\n else {\n if (topFirstLetter.equals(\"c\")) {\n String temp = topCard.substring(5, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"h\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"d\")) {\n String temp = topCard.substring(8, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"s\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n }\n }\n }\n\n for(int i = 0; i < computerSize; i++){\n //Human can play a card\n String card = handComputer.get(i);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if (topCard.contains(\"8\")) {\n //Can play any card ontop to determine suite\n return true;\n }\n\n if (card.contains(\"8\")) {\n //valid because 8s are wild cards, human can place it\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if (firstLetter.equals(topFirstLetter)) {\n return true;\n }\n\n else {\n if (topFirstLetter.equals(\"c\")) {\n String temp = topCard.substring(5, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"h\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"d\")) {\n String temp = topCard.substring(8, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"s\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n }\n }\n }\n\n //Human and computer can't play a card\n return false;\n }", "public boolean compareRank(Card otherCard) {\n return rank == otherCard.rank;\n }", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n if (!(other instanceof Card)) {\n return false;\n }\n\n Card otherCard = (Card) other;\n return otherCard.getFrontFace().equals(getFrontFace())\n && otherCard.getBackFace().equals(getBackFace());\n }", "public boolean isPlayerOwned(int inputPlayerId, int territoryId) {\n\t\treturn getCountryArray()[territoryId].getCountryOwner()==inputPlayerId;\n\t}", "@Override\n\tpublic boolean equals(Card anotherCard){\n\t\t\n\t}", "private boolean canAcceptCard(Card card) {\n return cardSet.canAcceptCard(card);\n }", "public boolean playerWins(){\n return playerFoundTreasure(curPlayerRow, curPlayerCol);\n }", "public boolean isTerritoryOf(RiskTerritoryModel t) {\n\t\treturn (territories.contains(t.getId()));\n\t}", "private boolean playerFoundTreasure(int playerRow, int playerCol){\n return (playerRow == 7 && playerCol == 9);\n }", "protected abstract boolean isCardActivatable(Card card);", "public boolean canUseCard() {\n \t\tif (usedCard)\n \t\t\treturn false;\n \n \t\tfor (int i = 0; i < cards.length; i++) {\n \t\t\tif (cards[i] > 0)\n \t\t\t\treturn true;\n \t\t}\n \n \t\treturn false;\n \t}", "@Override\n public boolean isBlackjack() {\n return ( (countCards()==2) && (higherScore()==21) );\n }", "private boolean tieForCards(Card[] cards) {\n int largest = largestCard(cards);\n\n int count = 0;\n\n for (Card card : cards) {\n if (card.getDenomination() == cards[largest].getDenomination())\n count++;\n }\n\n return count > 1;\n }", "public boolean isCardToAccuse() {\n\t\treturn (getOwner() == CASE_FILE_PLAYER);\n\t}", "boolean hasCardType();", "@Override\r\n\tpublic boolean equals(Object card) {\r\n\t\tBlackjackCard c = (BlackjackCard)card;\r\n\t\treturn (this.suit == c.getSuit() && this.value == c.getValue());\r\n\t}", "private boolean accordingToRules(Card card, Card.Face face, Card.Suit suit){\n return card.getFace() == face || card.getSuit() == suit || card.getFace() == Card.Face.EIGHT;\n }", "@Override\n\tpublic boolean isIsTeamMatch() {\n\t\treturn _esfTournament.isIsTeamMatch();\n\t}", "@Test\n public void testCardCanPlay_TRUE() {\n System.out.println(\"cardCanPlay TRUE COLOUR\");\n UnoCard cardSelection = new UnoCard(UnoCardColour.BLUE, UnoCardValue.TWO);\n UnoCard drawCard = new UnoCard(UnoCardColour.BLUE, UnoCardValue.ONE);\n UnoCardColour wildColour = UnoCardColour.BLUE;\n boolean result = utils.cardCanPlay(cardSelection, drawCard, wildColour);\n assertEquals(true, result);\n }", "protected final boolean isSameSuit(Card cardOne, Card cardTwo)\n {\n return cardOne.getSuit().equals(cardTwo.getSuit());\n }", "boolean similarColorTo(Card c);", "@Override\n public boolean isWin() {\n for (Observer winner : winners) {\n if (winner.getName().equals(chosenHorse.getName())) {\n return true;\n }\n }\n return false;\n }", "public boolean isOver() {\n\t\t\n\t\tif(!dealer.hasCards()){\n\t\t\tisOver= true;\n\t\t\treturn isOver;\n\t\t}\n\t\t\n\t\tfor (Player p : players) {\n\t\t\tif (!p.hasCards()) {\n\t\t\t\tisOver = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn isOver;\n\t}", "boolean isGameFinished() {\n if (tiles.takenTilesNumber() < 3)\n return false;\n Symbol winningSymbol = tiles.getTile(1);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) {\n return true;\n }\n }\n if(tiles.getTile(2).equals(winningSymbol)) {\n if(tiles.getTile(3).equals(winningSymbol)) return true;\n }\n if(tiles.getTile(4).equals(winningSymbol)) {\n if(tiles.getTile(7).equals(winningSymbol)) return true;\n }\n }\n winningSymbol = tiles.getTile(2);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(8).equals(winningSymbol)) return true;\n }\n }\n\n winningSymbol = tiles.getTile(3);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(7).equals(winningSymbol)) return true;\n }\n if (tiles.getTile(6).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) return true;\n }\n }\n\n\n winningSymbol = tiles.getTile(4);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(7).equals(winningSymbol)) return true;\n }\n }\n\n winningSymbol = tiles.getTile(7);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(8).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) return true;\n }\n }\n return false;\n }", "public boolean equals(Object obj){\r\n\t\tif(!(obj instanceof BaseballCard))\r\n\t\t\treturn false;\r\n\t\tBaseballCard compareable = (BaseballCard) obj;\r\n\t\t\r\n\t\treturn(this.getPrice()==(compareable.getPrice())&&this.getYear()==\r\n\t\t\t\t(compareable.getYear())&&this.getSizeX()==(compareable.getSizeX())\r\n\t\t\t\t&&this.getSizeY()==(compareable.getSizeY())&&this.getName()==\r\n\t\t\t\tcompareable.getName()&&this.getManufacturer()==compareable.getManufacturer());\r\n\t\t\r\n\t}", "@Override\n\t\tboolean hasMatch(ArrayList<Card> hand) {\n\t\t\tint suitValue = hand.get(0).getSuit().getValue();\n\n\t\t\t// check all of the same suit\n\t\t\tfor (int i = 1; i < hand.size(); i++) {\n\t\t\t\tif (hand.get(i).getSuit().getValue() != suitValue)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "private void checkCardMatch(Card card1, Card card2) {\n if(card1.getColor().getColor() == card2.getColor().getColor()){\n card1.setCardState(CardState.MATCHED);\n card2.setCardState(CardState.MATCHED);\n\n playerManager.incrementScore();\n } else{\n card1.flipCard();\n card2.flipCard();\n }\n cardsClicked = new Card[2];\n switchPlayer();\n setRandomColors();\n checkGameOver();\n }", "public void testCanPlayOn() {\n \n DrawCard redDraw2 = new DrawCard(Card.COLOUR_RED, 2);\n \n // create another 4 normal cards\n \n Card card1 = new Card(Card.COLOUR_BLUE, 5);\n Card card2 = new Card(Card.COLOUR_BLUE,2);\n \n //card 1 and card 2 should yield false on the method\n assertFalse(redDraw2.canPlayOn(card1));\n assertFalse(redDraw2.canPlayOn(card2));\n \n Card card3 = new Card(Card.COLOUR_RED, 5);\n Card card4 = new Card(Card.COLOUR_RED,2);\n \n // card 3 and card 4 should gives true\n \n assertTrue(redDraw2.canPlayOn(card3));\n assertTrue(redDraw2.canPlayOn(card4));\n \n }", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof PersonCard)) {\n return false;\n }\n\n // state check\n PersonCard card = (PersonCard) other;\n return displayedIndex == card.getDisplayedIndex()\n && staff.equals(card.staff);\n }", "public boolean isValid() {\n\t\t\n\t\tif(this.size()!=2)\n\t\t\treturn false;\n\t\telse {\n\t\t\tint rank1=this.getCard(0).getRank();\n\t\t\tint rank2=this.getCard(1).getRank();\n\t\t\t\n\t\t\tif(rank1==rank2)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t}", "private boolean sameTeamCheck(char state)\r\n {\r\n if((state == 'b' && isHuman) || (state == 'p' && !isHuman))\r\n return true;\r\n return false;\r\n }", "public boolean winGame( char tL ){\r\n if( ((boardCells[0].getData() == tL) && (boardCells[1].getData() == tL) && (boardCells[2].getData() == tL)) ||\r\n ((boardCells[3].getData() == tL) && (boardCells[4].getData() == tL) && (boardCells[5].getData() == tL)) ||\r\n ((boardCells[6].getData() == tL) && (boardCells[7].getData() == tL) && (boardCells[8].getData() == tL)) ||\r\n ((boardCells[0].getData() == tL) && (boardCells[3].getData() == tL) && (boardCells[6].getData() == tL)) ||\r\n ((boardCells[1].getData() == tL) && (boardCells[4].getData() == tL) && (boardCells[7].getData() == tL)) ||\r\n ((boardCells[2].getData() == tL) && (boardCells[5].getData() == tL) && (boardCells[8].getData() == tL)) ||\r\n ((boardCells[0].getData() == tL) && (boardCells[4].getData() == tL) && (boardCells[8].getData() == tL)) ||\r\n ((boardCells[2].getData() == tL) && (boardCells[4].getData() == tL) && (boardCells[6].getData() == tL)) ){\r\n return true;\r\n }else {\r\n return false;\r\n }\r\n }", "public boolean isInDeck(String cardName){\n boolean status = false;\n ArrayList<Card> cardStatus = getCards();\n for(Card card: cardStatus){\n if(cardName.equals(card.getName())){\n status = true;\n }\n }\n return status;\n }", "public boolean playCard(Cards card, Players player) {\n boolean higher = false;\n int compare = 0;\n if (playedCards.size() == 0 || this.playAgain(player)) { //to check if it is a new game or this is a new round\n if (card instanceof TrumpCards) { //to check if the first played card is a supertrump card\n setCategory(((TrumpCards) card).cardEffect());\n }\n higher = true;\n } else {\n if (card instanceof NormCards) { //to check if the played card is a normal card\n if (getLastCard() instanceof NormCards) { //to check whether the last played card is a normal card or a supertrump card\n if (category.equals(\"H\")) {\n Float now = new Float(((NormCards) card).getHardness());\n Float last = new Float(((NormCards) getLastCard()).getHardness());\n compare = now.compareTo(last);\n } else if (category.equals(\"S\")) {\n Float now = new Float(((NormCards) card).getSpecGravity());\n Float last = new Float(((NormCards) getLastCard()).getSpecGravity());\n compare = now.compareTo(last);\n } else if (category.equals(\"C\")) {\n Float now = new Float(((NormCards) card).getCleavageValue());\n Float last = new Float(((NormCards) getLastCard()).getCleavageValue());\n compare = now.compareTo(last);\n } else if (category.equals(\"CA\")) {\n Float now = new Float(((NormCards) card).getCrustalAbunVal());\n Float last = new Float(((NormCards) getLastCard()).getCrustalAbunVal());\n compare = now.compareTo(last);\n } else if (category.equals(\"EV\")) {\n Float now = new Float(((NormCards) card).getEcoValueValue());\n Float last = new Float(((NormCards) getLastCard()).getEcoValueValue());\n compare = now.compareTo(last);\n\n }\n if (compare > 0) {\n higher = true;\n } else {\n System.out.println(\"The selected card does not has higher value!\");\n }\n } else { //or else, the last played card is a supertrump card\n higher = true;\n }\n } else { //or else, the played is a supertrump card\n setCategory(((TrumpCards) card).cardEffect());\n higher = true;\n }\n }\n return higher;\n }", "private boolean isCheckMate() {\n if (whitePlayer.getOccupiedSet().isEmpty()) {\n System.out.println(\"BLACK PLAYER WINS\");\n return true;\n }\n else if (blackPlayer.getOccupiedSet().isEmpty()) {\n System.out.println(\"WHITE PLAYER WINS\");\n return true;\n }\n else return false;\n }", "boolean contains(Card c);", "@Override\n public boolean equals( Object obj ) {\n if (this == obj) {\n return true;\n }\n\n if (obj == null) {\n return false;\n }\n\n if (getClass() != obj.getClass()) {\n return false;\n }\n\n Deck other = (Deck)obj;\n // Due to the possibility of duplicates, deck comparison is a notch trickier.\n // Our approach is to count the cards in each deck then ensure that the cards\n // and counts are the same.\n return tally().equals(other.tally());\n }", "@Override\n public boolean checkRequirement(PlayerContext playerContext) {\n int sumOfRightColourAndLevelCard = 0;\n for (DevelopmentCard developmentCard : playerContext.getAllDevelopmentCards()){\n if (developmentCard.getColour() == cardColour && developmentCard.getLevel() == cardLevel)\n sumOfRightColourAndLevelCard ++;\n }\n return sumOfRightColourAndLevelCard >= numberOfCards;\n }", "public Boolean isTradedCardSetValid() {\r\n\r\n\t\tif (lstTradedCards.size() == 3) {\r\n\r\n\t\t\tif (!isAWildCardSet()) {\r\n\t\t\t\t// If all the cards are same\r\n\t\t\t\tif (lstTradedCards.get(0).card_type.equals(lstTradedCards.get(1).card_type)\r\n\t\t\t\t\t\t&& lstTradedCards.get(1).card_type.equals(lstTradedCards.get(2).card_type)) {\r\n\t\t\t\t\tcardStatusLabel.setText(\"Success\");\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// all 3 are different\r\n\t\t\t\telse if (!lstTradedCards.get(0).card_type.equals(lstTradedCards.get(1).card_type)\r\n\t\t\t\t\t\t&& !lstTradedCards.get(1).card_type.equals(lstTradedCards.get(2).card_type)\r\n\t\t\t\t\t\t&& !lstTradedCards.get(0).card_type.equals(lstTradedCards.get(2).card_type)) {\r\n\t\t\t\t\tcardStatusLabel.setText(\"Success\");\r\n\t\t\t\t\tUtility.writeLog(\"card traded successfully\");\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (isValidCountWildCard()) {\r\n\t\t\t\t\tcardStatusLabel.setText(\"Success\");\r\n\t\t\t\t\tUtility.writeLog(\"card traded successfully\");\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcardStatusLabel.setText(\"Please select only/atleast three cards!\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcardStatusLabel.setText(\"Please select only/atleast three cards!\");\r\n\t\treturn false;\r\n\t}", "private static boolean isShuffleWorking(Deck deck,Card newCard,Card newCard2){\n\t\tdeck.shuffle();\n\t\tboolean isCorrect=true;\n\t\tif(newCard.getSuit().equals(newCard2.getSuit()) &&\n\t\t\t\tnewCard.getRank()==newCard2.getRank()){\n\t\t\t\t\tisCorrect=false;\n\t\t\t\t\treturn isCorrect;\n\t\t}\n\t\tfor(int i=0;i<53;i++){\n\t\t\tdeck.getOneCard();\n\t\t}\n\t\tif(deck.nUsed!=1){\n\t\t\tisCorrect=false;\n\t\t}\n\t\treturn isCorrect;\n\t}", "public boolean pickCard(String codename)\n {\n // Does the structure actually keep track of this Card?\n // Better check just to be sure\n Card card;\n if (this.cards.containsKey(codename))\n {\n card = this.cards.get(codename);\n }\n else\n {\n return false;\n }\n\n // Update the bookkeeping information for each clue that was associated with the picked card\n for (String relatedClue : card.getClues())\n {\n Clue clue = clues.get(relatedClue);\n if (clue != null)\n {\n // This clue can now be used!\n if (clue.word.equals(codename)) { clue.isActiveCodename = false; }\n\n // No longer associate a clue with a card that is not in play\n clue.removeCard(card);\n\n // If a clue only suggests the assassin or civilians or suggests nothing it is useless\n if (!clue.suggestsSomeCard() || clue.onlySuggestsAssassinOrCivilian())\n {\n clues.remove(clue.word);\n }\n }\n }\n return true;\n }", "private static boolean comparePlayerPosition(RSTile tile) {\n RSTile player_position = Player07.getPosition();\n if (tile == null || player_position == null) {\n return false;\n }\n return tile.equals(player_position);\n }", "public boolean VerifyHumanChoice(int value){\n String card = handHuman.get(value);\n System.out.print(\"CARD IN VERIFY HUMAN\" + card);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if(topCard.contains(\"8\")){\n //Can play any card ontop to determine suite\n topCard = card;\n return true;\n }\n\n if(card.contains(\"8\")){\n //valid because 8s are wild cards, human can place it\n topCard = card;\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if(firstLetter.equals(topFirstLetter)){\n topCard = card;\n return true;\n }\n\n else{\n if(topFirstLetter.equals(\"c\")){\n String temp = topCard.substring(5, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if(card.contains(temp)){\n topCard = card;\n return true;\n }\n\n }\n\n else if(topFirstLetter.equals(\"h\")){\n String temp = topCard.substring(6, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if(card.contains(temp)){\n topCard = card;\n return true;\n }\n\n }\n\n else if(topFirstLetter.equals(\"d\")){\n String temp = topCard.substring(8, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if(card.contains(temp)){\n topCard = card;\n return true;\n }\n\n }\n\n else if(topFirstLetter.equals(\"s\")){\n String temp = topCard.substring(6, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if(card.contains(temp)){\n topCard = card;\n return true;\n }\n\n }\n }\n\n //You can't play this card\n return false;\n }", "boolean hasAlreadFoldCard();", "private boolean canPut(Player player) {\n boolean haveValidCart = false;\n boolean can = false;\n for (Card temp: player.getCards()) {\n if(temp.isValidCard(currentCard) || temp instanceof WildCard) {\n haveValidCart = true;\n can = true;\n break;\n }\n }\n if (!haveValidCart) {\n player.addCard(cards.get(0));\n cards.remove(0);\n if (player.getCards().get(player.getCards().size()-1).isValidCard(currentCard)) {\n show();\n System.out.println(player.getName() + \"! You were given a card because you didn't have any valid choice.\");\n can = true;\n }\n else {\n show();\n System.out.println(player.getName() + \"! You were given a card but you don't have any valid choice yet.\");\n }\n }\n return can;\n }", "public boolean amIWinning(){\n if (playerScore > oppoScore) {\n return true;\n } else {\n return false;\n }\n }", "@Override\n public boolean equals(Object other) {\n if (null == other) {\n return false;\n }\n if (this == other) {\n return true;\n }\n if (!(other instanceof Card)) {\n return false;\n }\n Card that = (Card) other;\n return this.getName().equals(that.getName());\n }", "public boolean hasBlackjack()\n {\n return getSumOfCards(false) == 21;\n }", "public boolean checkO(Country c) {\n\t\tfor (Country ca : players.get(turnCounter).getCountries()) {\r\n\t\t\tif (c.equals(ca)) {\r\n\t\t\t\treturn true;\r\n\t\t\t} \t\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t\t\r\n\t}", "private boolean hasAce(ArrayList<Card> cards) {\r\n\t\tfor(Card card: cards) {\r\n\t\t\tif(card.getValue() == 1) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private static boolean isMatchingSuit(final Card card1, final Card card2, final Card card3, final Card card4, final Card card5)\r\n {\r\n //if the suit of one card does not match, return false\r\n if (!card1.hasSuit(card2) || !card1.hasSuit(card3) || !card1.hasSuit(card4) || !card1.hasSuit(card5))\r\n return false;\r\n if (!card2.hasSuit(card3) || !card2.hasSuit(card4) || !card2.hasSuit(card5))\r\n return false;\r\n if (!card3.hasSuit(card4) || !card3.hasSuit(card5))\r\n return false;\r\n if (!card4.hasSuit(card5))\r\n return false;\r\n \r\n //the suits match\r\n return true;\r\n }", "public boolean isValid() {\n\t\t\n\t\tif (this.size() == 2)\n\t\t\tif (this.getCard(0).getRank() == this.getCard(1).getRank())\n\t\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "public boolean hasCardsInCurrentHand(Rank rank) {\r\n boolean value = false;\r\n for (int i = 0; i < currentCards.size(); i++) {\r\n if (currentCards.get(i).getRank().equals(rank)) {\r\n value = true;\r\n break;\r\n } else {\r\n value = false;\r\n }\r\n }\r\n return value;\r\n }", "@Test\r\n public void testHasAtLeastTwoPlayableCards() {\n Player player2 = new Player(\"Three Playable Cards Test\", true);\r\n Hand threePlayableCardsHand = strategyHand;\r\n player2.setHand(threePlayableCardsHand.getAllCards());\r\n\r\n // Make it harder to find playable cards:\r\n player2.getHand().discard(new Card(Card.COLORLESS, Card.WILD, cvm));\r\n player2.getHand().discard(new Card(Card.COLORLESS, Card.WILD_DRAW_FOUR, cvm));\r\n\r\n Card currentPlayedCard_1 = new Card(Card.YELLOW, Card.ONE, cvm);\r\n assertTrue(player2.hasAtLeastTwoPlayableCards(currentPlayedCard_1, Card.BLUE));\r\n\r\n Card currentPlayedCard_2 = new Card(Card.BLUE, Card.SEVEN, cvm);\r\n assertFalse(player2.hasAtLeastTwoPlayableCards(currentPlayedCard_2, Card.BLUE));\r\n }", "public boolean isPickItUp(int playerID, Card discard){\n if(turn == playerID && gameStage == 1 && dealer == playerID){\n currentTrumpSuit = middleCardSuit;\n // make dealer discard a card and give them the middle card\n if(dealer == 0){\n //discard card that player taps\n if(player1Hand.get(0) == discard){\n player1Hand.remove(0);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(1) == discard){\n player1Hand.remove(1);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(2) == discard){\n player1Hand.remove(2);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(3) == discard){\n player1Hand.remove(3);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(4) == discard){\n player1Hand.remove(4);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n }\n }\n return false;\n }", "public boolean canCapture(Card otherCard) {\n return this.getRank().equals(Rank.JACK) || this.compareRank(otherCard);\n }", "private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}", "private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}", "@Override\n public boolean isLocalPlayersTurn() {\n return getTeam().equals(currentBoard.turn());\n }", "boolean gameOver() {\n return piecesContiguous(BLACK) || piecesContiguous(WHITE);\n }" ]
[ "0.7417656", "0.6919771", "0.67455214", "0.65934235", "0.65298676", "0.6486268", "0.64505756", "0.63395506", "0.63346744", "0.6263055", "0.6250524", "0.6246893", "0.61964256", "0.6185265", "0.61608547", "0.6155209", "0.6104444", "0.6087706", "0.6080438", "0.6076449", "0.60660046", "0.6040941", "0.60302263", "0.6027699", "0.60249925", "0.602382", "0.6009724", "0.60013276", "0.598276", "0.5977118", "0.5971457", "0.59683156", "0.59629476", "0.59607255", "0.5938098", "0.5920547", "0.59177715", "0.5895509", "0.58881795", "0.5879077", "0.5877866", "0.58682936", "0.5860457", "0.5815548", "0.5814432", "0.58048725", "0.57982135", "0.5781199", "0.57810634", "0.57751596", "0.5767087", "0.57499266", "0.57394654", "0.5738106", "0.57320297", "0.5721751", "0.57185096", "0.5711016", "0.5704921", "0.57031673", "0.56962866", "0.56946313", "0.5685209", "0.5679642", "0.56723964", "0.5652696", "0.565075", "0.56423086", "0.56412286", "0.56362367", "0.56357807", "0.5630887", "0.56280565", "0.5626126", "0.5622858", "0.56223345", "0.5617547", "0.56097776", "0.55895466", "0.55887747", "0.55870116", "0.5575682", "0.55680686", "0.55649936", "0.55597097", "0.55471104", "0.5545518", "0.5542268", "0.55361646", "0.5528539", "0.5524254", "0.5519589", "0.551876", "0.55170476", "0.55159396", "0.5500015", "0.5483578", "0.5483578", "0.5482393", "0.54810816" ]
0.81806636
0
Checks if is already added.
private boolean isAlreadyAdded(JButton jbn) { for (RiskCardModel card : lstTradedCards) { if (card.territory == Integer.valueOf(jbn.getName().split("-")[0]) && card.card_type.equals(jbn.getName().split("-")[1])) return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean isAdded() {\n return true;\n }", "public void checkNewAdded(Instance add) {\n List<Instance> keySet = new LinkedList<Instance>();\n keySet.addAll(backRelation.keySet());\n Boolean added = false;\n for (Instance inst : keySet) {\n if (inst.getName().equals(add.getName()) || inst.getMd5().equals(add.getMd5())) {\n added = true;\n ArrayList<Instance> tmp = backRelation.get(inst);\n tmp.add(add);\n backRelation.remove(inst);\n backRelation.put(inst, tmp);\n if (relatedInstances.containsKey(inst)) {\n ArrayList<Instance> tmpRI = relatedInstances.get(add);\n tmpRI.add(inst);\n relatedInstances.remove(add);\n relatedInstances.put(add, tmpRI);\n\n } else {\n ArrayList<Instance> tmpRI = new ArrayList<Instance>();\n tmpRI.add(inst);\n relatedInstances.put(add, tmpRI);\n }\n\n }\n }\n if (added) {\n instances.add(add);\n }\n }", "@Override\r\n\tpublic boolean isExisting() {\n\t\treturn false;\r\n\t}", "public boolean add(T entry) {\n return false;\n }", "public boolean add(E obj)\r\n {\r\n int originalSize = this.size();\r\n listIterator(originalSize).add(obj);\r\n return originalSize != this.size();\r\n }", "public void tryAdd() {\r\n\t\tif (isDataModified()) {\r\n\t\t\tscrollToMe();\r\n if (getValidator().getUseAlertsForErrors()) {\r\n addConfirmScript(_okToAddQuestion, _okToAddValue);\r\n }\r\n else {\r\n _validator.setErrorMessage(_okToAddQuestion, null, -1, _okToAdd);\r\n }\r\n\t\t}\r\n else {\r\n \t\tdoAdd();\r\n }\r\n\t}", "@Override\n\tpublic boolean add(E e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean add(Object obj) {\n\t\treturn util.add(obj);\n\t}", "public boolean isPossibleToadd() {\n if (capacity == storage) {\n return false;\n } else {\n return true;\n }\n }", "void checkLastItem() {\n if (!mItems.isEmpty() && !mItems.get(mItems.size() - 1).equals(ADD_NEW_ENTRY)) {\n // add last item again if missing\n mItems.add(ADD_NEW_ENTRY);\n // need to manually call, since this item is not in Db and hence ignored by DiffUtil\n notifyItemInserted(mItems.size() - 1);\n }\n }", "public boolean addEntry(@NotNull Entry<T> entry) {\n if (entries.contains(entry)) {\n return false;\n }\n\n entries.add(entry);\n entry.addValueChangedListener(entryValueChangedListener);\n return true;\n }", "@Override\n\tprotected boolean itemExists() {\n\t\treturn false;\n\t}", "private boolean checkValidateToAdd() {\n\n Long count;\n HttpServletRequest req = getRequest();\n\n String name = this.saleChannelTypeForm.getName().trim();\n\n Long status = this.saleChannelTypeForm.getStatus();\n\n\n if ((name == null) || name.equals(\"\")) {\n req.setAttribute(\"returnMsg\", \"channelType.error.invalidName\");\n return false;\n }\n if (status == null) {\n req.setAttribute(\"returnMsg\", \"channelType.error.invalidStatus\");\n return false;\n }\n\n String strQuery = \"select count(*) from ChannelType as model where model.name=?\";\n Query q = getSession().createQuery(strQuery);\n q.setParameter(0, name);\n count = (Long) q.list().get(0);\n\n if ((count != null) && (count.compareTo(0L) > 0)) {\n req.setAttribute(\"returnMsg\", \"channelType.add.duplicateName\");\n return false;\n }\n return true;\n\n }", "public boolean add(String newValue) {\n if (!collection.contains(newValue) && collection.add(newValue)) {\n return true;\n }\n return false;\n }", "public boolean add(E element){\n Object result = map.put(element, \"\");\n return (result == null);\n }", "@Override\n public boolean isValid() {\n return isAdded() && !isDetached();\n }", "public boolean add(Object o) {\n\t\treturn map.put(o, PRESENT) == null;\n\t}", "public boolean isExisting() throws Exception\r\n\t\t{\r\n\t\tRouteGroup myR = (RouteGroup) myRouteGroup.get();\r\n\t\tthis.UUID = myR.getUUID();\r\n\t\t\r\n\t\tVariables.getLogger().debug(\"Item \"+this.name+\" already exist in the CUCM\");\r\n\t\treturn true;\r\n\t\t}", "public boolean add(Element element) {\n if (addNoNotify(element)) {\n setChanged();\n Message message = Message.makeAdded(element);\n notifyObservers(message);\n return true;\n } else {\n return false;\n }\n\n }", "public void lockAdd(){\n\t\tthis.canAdd = false;\n\t}", "public boolean add(E key)\r\n {\r\n if(this.contains(key))\r\n {\r\n return false;\r\n }\r\n\r\n else\r\n {\r\n super.add(key);\r\n }\r\n return true;\r\n }", "public boolean addNew(Student st){\n for(Student stItem : listStudents){\r\n // check for duplicate id\r\n if(stItem.getId() == st.getId()) return false;\r\n \r\n// if(checkRule(stItem, st)) break;\r\n// else return false;\r\n \r\n }\r\n this.listStudents.add(st);\r\n return true;\r\n }", "public boolean addEvent(Event event)\n {\n for(Event temp: events)\n {\n if(temp.isTimeConflict(event))\n {\n return false;\n }\n }\n\n this.events.add(event);\n return true;\n }", "private boolean checkNameExistAdd(String userName) {\n\n\t\tUser user = this.userDAO.getUserByName(userName);\n\t\tif (null != user) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public boolean addTeam(T team){\n if (teams.contains(team)){\n System.out.println(\"Cant add team is allready in the league list.\");\n return false;\n }else{\n teams.add(team);\n return true;\n }\n }", "public boolean\tadd(String e) {\n\t\tboolean notExist = false;\n\t\tif (map.put(e, PRESENT)==null) {\n\t\t\tnotExist = true;\n\t\t}\n\t\treturn notExist;\n\t}", "private boolean addBook(Book book) {\n\t\tfor (int i = 0; i < items.size(); i++)\n\t\t\tif (items.get(i).keyEquals(book))\n\t\t\t\treturn false;\n\t\titems.add(book);\n\t\treturn true;\n\t}", "@Override\n public boolean callCheck() {\n return last == null;\n }", "@Override\n public boolean add(X x) {\n if (!allowElementsWithoutIdentification)\n throw new IllegalArgumentException(\"It is not allowed to put Elements without Identification in this Set\");\n\n return map.put(x, placeholder) == null;\n }", "public boolean AddSong(Song toAdd) {\n\t\t// Don't add if the song is already in the play list.\n\t\tif (songList.contains(toAdd))\n\t\t\treturn false;\n\n\t\tsongList.add(toAdd);\n\t\treturn true;\n\t}", "public boolean insertItem(MoviePanelBasicView item) {\r\n if (!this.contains(item)) {\r\n this.list.add(item);\r\n return true;\r\n } else {\r\n logger.debug(\"File \" + item.getFile() + \" is already in list!\");\r\n return false;\r\n }\r\n \r\n }", "public boolean add ( Object o ){\n\n try{\n\n String check = o.toString();\n if(!check.equals(o)){\n return false;\n }\n\n }\n\n catch(Exception e){\n return false;\n }\n\n if(o == null){\n return false;\n }\n\n else{\n\n \t try{\n String s = o.toString();\n list.add(s);\n return true;\n \t }\n \t\n \t catch (Exception e){\n \t\t return false;\n \t }\n\n }\n\n }", "public boolean add(@NonNull T object) {\n final boolean added = data.add(object);\n notifyItemInserted(data.size() + 1);\n return added;\n }", "@Override\n public boolean addItem(T item) {\n //Make sure the Set does not already contain the item\n if(!this.contains(item)) {\n //Make sure there is enough room for the item. If there isn't\n //resize the array\n if(numItems == arr.length)\n this.ensureCap();\n //Add the item to the end and increment numItems\n arr[numItems++] = item;\n //return true\n return true;\n }\n //if item was already in set, return false\n return false;\n }", "boolean alreadyAdded(char c) {\n for (char x :_chars) {\n if (x == c) {\n return true;\n }\n }\n return false;\n }", "@Override\n\tpublic boolean add(Building object) {\n\t\tif (contains(object)) {\n\t\t\tsuper.remove(object);\n\t\t}\n\t\tsuper.add(object);\n\t\treturn true;\n\t}", "public synchronized boolean add(ContentObject obj) {\n if (null == data) {\n this.data = obj;\n return true;\n } else {\n _stats.increment(StatsEnum.ContentObjectsIgnored);\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.WARNING)) Log.warning(Log.FAC_NETMANAGER, \"{0} is not handled - data already pending\", obj.name());\n return false;\n }\n }", "public boolean addNewContact(Contact contact){\n if(findContact(contact.getName()) >= 0){\n // recall, x >= 0, if x is true than x is in the index of contact\n // if false, x will return -1 meaning the same contact wasn't found\n System.out.println(\"Contact is already on file\");\n return false; //\n }\n myContacts.add(contact);\n return true;\n }", "public boolean add(T item) {\n\t\treturn list.add(item);\n\t}", "public boolean addProduct(Product p) {\n// products.add(p);\n boolean prodExists = false;\n for(Product prod: products){\n if(prod.getId() == p.getId()){\n prodExists = true;\n break;\n }\n }\n if(!prodExists){\n products.add(p);\n return true;\n }\n return false;\n }", "@Override\n\tpublic void addEntry(E entry) {\n\n\t\t// Determine if the entry already exists in the list\n\t\tE current = this.getHead();\n\t\twhile (current != null) {\n\t\t\tif (this.isEqual(current, entry)) {\n\t\t\t\t// Already in list\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcurrent = current.getNext();\n\t\t}\n\n\t\t// Not in list, so add the entry\n\t\tsuper.addEntry(entry);\n\t}", "@Override\n public boolean add(T e) {\n if (elements.add(e)) {\n ordered.add(e);\n return true;\n } else {\n return false;\n }\n }", "public boolean add(Object added)\n {\n boolean ret = super.add(added);\n normalize();\n return(ret);\n }", "public boolean add(BaseBean baseBean) throws Exception {\n\t\treturn false;\r\n\t}", "public boolean add(X x, Identification identification) {\n return map.put(x, identification) == null;\n }", "private boolean personAlreadyExists(AddPeopleRequest addPeopleRequest) {\n // query db for this user\n AddPeopleRequest matchingEntry =\n this.addPersonRequestMongoRepository\n .findPersonByFirstAndLastName(\n addPeopleRequest.getFirstName(),\n addPeopleRequest.getLastName());\n // if the value returned is null.. the value did not exist..\n if (matchingEntry == null) {\n return false;\n } else {\n return true;\n }\n }", "@Override\n\tpublic boolean add(Order bean) {\n\t\treturn false;\n\t}", "public boolean canAdd() {\r\n int temp = 0;\r\n for (int i = 0; i < elem.length; i++) {\r\n if (elem[i] == null) {\r\n temp++;\r\n }\r\n }\r\n if (temp > 1) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public boolean hasNewData() {\n if (hasNewData) {\n hasNewData = false;\n return true;\n }else{\n return false;\n }\n }", "@Override\r\n\tpublic boolean isExist() {\n\t\treturn false;\r\n\t}", "public boolean isAddNewHistoryRequired()\r\n {\r\n return addNewHistoryRequired_;\r\n }", "public boolean getAdded() {\r\n return this.added;\r\n }", "public boolean add(T item) {\n boolean addSuccessful = items.add(item);\n if (addSuccessful) {\n currentSize = -1.0;\n inCapacitySize = -1.0;\n }\n return addSuccessful;\n }", "public void validateAdd(Stock s){\n Set<String> stock_symbols_set = new HashSet<>();\n for(Stock stock: stockList){\n stock_symbols_set.add(stock.getStockSymbol());\n }\n if(stock_symbols_set.contains(s.getStockSymbol())){\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setIcon(R.drawable.baseline_warning_black_36);\n builder.setMessage(\"Stock Symbol \" + s.getStockSymbol() + \" is already displayed. \");\n builder.setTitle(\"Duplicate Stock\");\n AlertDialog dialog = builder.create();\n dialog.show();\n }\n else{\n stockList.add(s);\n //keep the list in alphabetical order\n Collections.sort(stockList, new Comparator<Stock>() {\n @Override\n public int compare(Stock t1, Stock t2) {\n return t1.getStockSymbol().compareTo(t2.getStockSymbol());\n }\n });\n\n writeJSONData();\n myAdapter.notifyDataSetChanged();\n }\n }", "private void add() {\n\n\t}", "public boolean add(E o) {\r\n if (o == null)\r\n return false;\r\n if (this.map.containsKey(o.hashCode())) {\r\n return false;\r\n }\r\n return this.map.put(o.hashCode(), o) == null;\r\n }", "@Override\r\n\tpublic boolean exists() {\n\t\treturn false;\r\n\t}", "@Test\r\n public void testAddDuplicateRecipe() {\r\n coffeeMaker.addRecipe(recipe1);\r\n assertFalse(coffeeMaker.addRecipe(recipe1));\r\n }", "private boolean isTransactionAlreadySeen(Transaction tx){\n return allTransactions.contains(tx);\n }", "@Override\n public boolean exists()\n {\n return orig.exists();\n }", "public boolean wasAddedByUser() {\n return alias.equals(Constants.OPTION_ALIAS_ADDED_BY_USER);\n }", "public static void checkMovieForAdd(MovieInfoObject movie, Playlist playlist) throws PlaylistExceptions {\n boolean flag = false;\n for (PlaylistMovieInfoObject log : playlist.getMovies()) {\n if (movie.getID() == log.getID()) {\n flag = true;\n break;\n }\n }\n if (flag) {\n throw new PlaylistExceptions(\"ohno the movie < \" + movie.getMovieTitle()\n + \" > has already been added to this playlist :( pls try again with another movie\");\n }\n }", "public boolean add(E x) {\n\t\taddLast(x);\n\t\treturn true;\n\t}", "public boolean isAlreadyAdd(Friend friend){\n List<Friend> friendList = Resources.owner.getFriendList();\n boolean isYou = Resources.owner.getUsername().equals(friend.getUsername());\n return friendList.contains(friend) || isYou;\n }", "public boolean addComponent(GComponent comp){\n\t\t\tif(comp == null)\n\t\t\t\treturn false;\n\t\t\tif(paControls.contains(comp)){\n\t\t\t\tGMessenger.message(ADD_DUPLICATE, comp ,null);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tpaControls.add(comp);\n\t\t\treturn true;\n\t\t}", "public boolean add(Contact contact) {\n /* first we determine if the contact is already present */\n boolean alreadyPresent = false;\n for (Contact c : contacts) {\n if (c.getContactID().equals(contact.getContactID())) {\n alreadyPresent = true;\n }\n }\n /* if the contact is not present then we add it, and return true */\n if (!alreadyPresent) {\n contacts.add(contact);\n System.out.println(\"Contact Added Successfully!\");\n return true;\n } else {\n System.out.println(\"Contact already present\");\n return false;\n }\n }", "private boolean remove() {\r\n\t\t\treturn removed = true;\r\n\t\t}", "public boolean addCard(VentraCard card){\n \tboolean isExist = true;\n \t\n \tfor(int i=0; i<allCards.size(); i++ ) {\n \t\tif(card.getCardNumber() == allCards.get(i).getCardNumber()\n \t \t&& card.getPhoneNumber().equals(allCards.get(i).getPhoneNumber())) {\n \t\t\tisExist = false;\n \t\t}\t\n \t}\n \tif(isExist == true) { // if(isExist)\n \t\tallCards.add(card);\t\n \t\treturn true;\n \t}\n \t\n return false;\n }", "@Override\n\tpublic boolean exists() {\n\t\treturn false;\n\t}", "@Override\n public boolean addItem(T item) {\n //Make sure the item is not already in the set\n if(!this.contains(item)){\n //create a new node with the item, and the current first node\n Node n = new Node(item, first);\n //update first node reference\n first = n;\n //increment numItems\n numItems++;\n return true;\n }\n //if item is already in the set return false\n return false;\n }", "public boolean add(Account account) {\n if (find(account) != -1) {\n return false;\n }\n if (size == accounts.length) {\n grow();\n }\n accounts[size] = account;\n size++;\n return true;\n }", "public void addSong(Song song)\n {\n if( !songs.contains(song)) {\n songs.add(song);\n System.out.println(\"song added successfully.\");\n }\n else\n System.out.println(\"this song is already in the collection.\");\n }", "public boolean add (T obj) {\r\n\t\tboolean result = _list.add (obj);\r\n\t\tHeapSet.siftUp (this, _list.size () - 1);\r\n\t\treturn result;\r\n\t}", "public boolean add(E anEntry){\n if (size == capacity){\n reallocate();\n }\n theData[size] = anEntry;\n size++;\n\n return true;\n }", "@Override\n\tpublic boolean addQuestion(QuestionObject question) {\n\t\tif (question != null && !questionComposite.checkExist(question)) {\n\t\t\tquestionComposite.add(question);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean add (Object o) {return addLast(o);}", "public boolean addNewItem(VendItem item) {\n if (itemCount < maxItems) {\n stock[itemCount] = item;\n itemCount++;\n return true;\n } else {\n return false;\n }\n }", "public boolean add(final Object obj) {\n maintain();\n\n SoftObject soft = SoftObject.create(obj, queue);\n \n return collection.add(soft);\n }", "boolean add(Object object) ;", "protected boolean addTeam(Team team) {\n\t\t//TODO\n\t\t// input check\n\t\tif (team == null)\n\t\t\treturn false;\n\t\t\n\t\t// checking if team exists already\n\t\tif (teams.contains(team))\n\t\t\treturn false;\n\t\t\t\n\t\treturn teams.add(team);\n\t}", "public boolean checkDuplicates() {\n List<Booking> dupbookings = new ArrayList<>();\n try {\n dupbookings = bookingHelper.checkDuplicates(b_facility.getId(), b_evdate, b_startTime, b_endTime);\n } catch (Exception e) {\n //facesMessage(\"No other bookings found for the day and time\");\n }\n return dupbookings.size() > 0;\n }", "protected boolean isDuplicate(ELesxUseCase useCase) {\n return false;\n }", "@Override\n public boolean hasDuplicates() {\n ArrayList<String> itemList = new ArrayList(Arrays.asList(\"\"));\n Node currNode = this.head;\n while(true){\n if(itemList.contains(currNode.getItem())){ // need to edit\n return true;\n }else{\n itemList.add(currNode.getItem());\n }\n if(currNode.getNextNode() == null){\n break;\n }\n currNode = currNode.getNextNode();\n }\n return false;\n }", "public boolean addGuppy(final Guppy guppy) {\n if (guppy == null) {\n return false;\n }\n guppiesInPool.add(guppy);\n return true;\n }", "protected void repeatedFoundWhenInsert(CntAVLTreeNode node) {\n System.out.println(\"添加失败:不允许添加相同的节点!\");\n }", "boolean add(Object obj);", "boolean add(Object obj);", "public Boolean add(Item item) {\n \tif (itemCollection.containsKey(item.getItemName())) {\r\n \tif (checkAvailability(item, 1)) {\r\n \t\titem.setQuatity(item.getQuatity() + 1);\r\n \t\titemCollection.put(item.getItemName(), item);\r\n \t\treturn true;\r\n \t} else return false;\r\n } else {\r\n \titemCollection.put(item.getItemName(), item);\r\n \treturn true;\r\n }\r\n \t\r\n }", "public Boolean addEntry(NameSurferEntry entry) {\r\n\t\tint index = indexOfNameSurfer(entry.getName());\r\n\t\t/* Prevent from adding a same name multiple times */\r\n\t\tif(index < 0) {\r\n\t\t\tnameInGraph.add(entry);\r\n\t\t\tnameColor.add(generateColor());\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean add(ElementType element){\n if(this.contains(element)){\n return false;\n }\n else{\n if(size==capacity){\n reallocate();\n }\n elements[size]=element;\n size++;\n }\n return true;\n }", "private boolean m125720o() {\n return isAdded() && !isDetached();\n }", "public final synchronized boolean isAddingFirstChild() {\n return addingFirstChild;\n }", "@Override\n public boolean isAlreadyInDb () {\n try {\n load( idDevice );\n } catch ( EntityNotFoundException e ) {\n return false;\n }\n return true;\n }", "public boolean add(String e) {\r\n \tSystem.out.println(e + \" \" + PRESENT);\r\n return map.put(e, PRESENT)==null;\r\n }", "public boolean insertBook(Book book) {\r\n books.add(book);\r\n return true;\r\n }", "public boolean add( T element )\n {\n // THIS IS AN APPEND TO THE LOGICAL END OF THE ARRAY AT INDEX count\n if (size() == theArray.length) upSize(); // DOUBLES PHYSICAL CAPACITY\n theArray[ count++] = element; // ADD IS THE \"setter\"\n return true; // success. it was added\n }", "@Override\n public final boolean add(Integer e) {\n if(definedOn.contains(e)){\n return super.add(e);\n } else {\n return false;\n }\n }", "private boolean addJournal(Journal journal) {\n\t\tfor (int i = 0; i < items.size(); i++)\n\t\t\tif (items.get(i).keyEquals(journal))\n\t\t\t\treturn false;\n\t\titems.add(journal);\n\t\treturn true;\n\t}", "@Override\n public boolean add(E e) {\n return offer(e);\n }", "public boolean add(AdressEntry e) {\r\n if (addressEntryList.contains(e)) {\r\n System.out.println(\"Record already exists!!\");\r\n System.out.println(addressEntryList.get((addressEntryList.indexOf(e))));\r\n System.out.println();\r\n return false;\r\n } else {\r\n addressEntryList.add(e);\r\n addressEntryList.sort(Comparator.comparing(AdressEntry::getLastName));\r\n System.out.print(\"Thank you the following contact has been added to your address book:\\n \");\r\n System.out.println(e);\r\n }\r\n System.out.println();\r\n return true;\r\n }" ]
[ "0.74078643", "0.6755006", "0.6691821", "0.65920514", "0.6577142", "0.6450298", "0.6448811", "0.6431952", "0.64081025", "0.63764334", "0.63505876", "0.6350543", "0.6316437", "0.6263701", "0.61818796", "0.6174524", "0.6170082", "0.61416256", "0.61283034", "0.6122517", "0.61031216", "0.6063846", "0.60610855", "0.6039238", "0.6033874", "0.6032793", "0.602804", "0.60048705", "0.5978863", "0.5977746", "0.5956276", "0.5946241", "0.59386295", "0.59346676", "0.5923401", "0.5922561", "0.5916314", "0.59134305", "0.5911757", "0.59081876", "0.59047586", "0.59004384", "0.5891684", "0.58899295", "0.587326", "0.5871939", "0.58700883", "0.5869385", "0.5868325", "0.586116", "0.5860464", "0.58572906", "0.585293", "0.5851548", "0.58504415", "0.58484846", "0.5845503", "0.58382404", "0.5834781", "0.582689", "0.5818883", "0.58143675", "0.5809846", "0.5801591", "0.5799537", "0.57984585", "0.57930946", "0.57879835", "0.57876474", "0.5784699", "0.57667845", "0.5763031", "0.57543635", "0.5749102", "0.57462627", "0.5741227", "0.57395947", "0.5735955", "0.5732554", "0.57319224", "0.5731838", "0.57285357", "0.57245404", "0.5723026", "0.57226753", "0.5721404", "0.5721404", "0.5720133", "0.57139057", "0.5706989", "0.5705271", "0.5701151", "0.569985", "0.56981236", "0.5692322", "0.56884974", "0.56879914", "0.56768197", "0.5674487", "0.5673652" ]
0.5994207
28
This method checks if the TradeCardSet is valid or not i.e. if the number of cards is 3, and then checks if all 3 are either the same or all three are of different types or one of the three is a wild card
public Boolean isTradedCardSetValid() { if (lstTradedCards.size() == 3) { if (!isAWildCardSet()) { // If all the cards are same if (lstTradedCards.get(0).card_type.equals(lstTradedCards.get(1).card_type) && lstTradedCards.get(1).card_type.equals(lstTradedCards.get(2).card_type)) { cardStatusLabel.setText("Success"); return true; } // all 3 are different else if (!lstTradedCards.get(0).card_type.equals(lstTradedCards.get(1).card_type) && !lstTradedCards.get(1).card_type.equals(lstTradedCards.get(2).card_type) && !lstTradedCards.get(0).card_type.equals(lstTradedCards.get(2).card_type)) { cardStatusLabel.setText("Success"); Utility.writeLog("card traded successfully"); return true; } } else { if (isValidCountWildCard()) { cardStatusLabel.setText("Success"); Utility.writeLog("card traded successfully"); return true; } else { cardStatusLabel.setText("Please select only/atleast three cards!"); return false; } } } cardStatusLabel.setText("Please select only/atleast three cards!"); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isValid() {\n\t\t//Check for size=3, then check if their ranks are same.\n\t\tif(this.size()==3) {\n\t\t\tif(this.getCard(0).getRank()==this.getCard(1).getRank()) {\n\t\t\t\tif(this.getCard(1).getRank()==this.getCard(2).getRank()){\n\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isThreeOfAKind(){\n \r\n List<PokerCard> threeCards;\r\n \r\n //First possibility: first three cards match\r\n threeCards = cards.subList(0, 3);\r\n if(haveSameValue(threeCards)){\r\n handValue = threeCards.get(0).getValue();\r\n return true;\r\n }\r\n \r\n //Second possibility: middle three cards match\r\n threeCards = cards.subList(1, 4);\r\n if(haveSameValue(threeCards)){\r\n handValue = threeCards.get(0).getValue();\r\n return true;\r\n }\r\n \r\n //Third possibility: last three cards match\r\n threeCards = cards.subList(2, 5);\r\n if(haveSameValue(threeCards)){\r\n handValue = threeCards.get(0).getValue();\r\n return true;\r\n }\r\n return false;\r\n }", "public Boolean isValidCountWildCard() {\r\n\t\tint count = 0;\r\n\t\tfor (RiskCardModel card : lstTradedCards) {\r\n\t\t\tif (card.card_type.equals(\"WILD\")) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (count > 1 ? false : true);\r\n\t}", "public boolean isValid() {\n //valid melds must have 3+ tile\n if (tiles.size() < 3) {\n //System.out.println(\"fail 1\");\n return false;\n }\n if (tiles.get(0).getColour() == tiles.get(1).getColour() &&\n\t\t\ttiles.get(0).getValue() != tiles.get(1).getValue()) { //test a run\n\t\t\tif (this.size() > 13) {\n //System.out.println(\"fail 2\");\n return false;\n }\n for (int i=1; i<tiles.size(); i++) {\n if (tiles.get(i).getColour() != tiles.get(0).getColour()) { //make sure all are same colour\n //System.out.println(\"fail 3\");\n return false;\n }\n if (tiles.get(i).getValue() != (tiles.get(0).getValue() + i)) { //make sure all values make a run\n //System.out.println(\"fail 4\");\n return false;\n }\n }\n } else { //test a set\n Set<Character> colours = new HashSet<>();\n for (int i=0; i<tiles.size(); i++) {\n if (tiles.get(i).getValue() != tiles.get(0).getValue()) { //all are same value\n //System.out.println(\"fail 5\");\n\t\t\t\t\treturn false;\n }\n\n if (colours.contains(tiles.get(i).getColour()) && tiles.get(i).getColour() != 'J') { //check for duplicate colours\n //System.out.println(\"fail 6\");\n\t\t\t\t\treturn false;\n } else {\n\t\t\t\t\tcolours.add(tiles.get(i).getColour()); //keep track of all the colours this set has\n }\n }\n if (this.size() > 4) { //only possible if there are 5 cards, including a joker\n //System.out.println(\"fail 7\");\n\t\t\t\treturn false;\n }\n }\n\n return true; \n }", "public boolean isValid() {\n\t\tif (this.size() != 5) return false;\n\t\tif (!((this.getCard(0).getSuit() == this.getCard(1).getSuit()) && (this.getCard(1).getSuit() == this.getCard(2).getSuit()) && (this.getCard(2).getSuit() == this.getCard(3).getSuit()) && (this.getCard(3).getSuit() == this.getCard(4).getSuit()))) return false;\n\t\t\n\t\tint[] cardsInHand= {this.getCard(0).getRank(), this.getCard(1).getRank(), this.getCard(2).getRank(), this.getCard(3).getRank(), this.getCard(4).getRank()};\n\t\t\n\t\tfor(int i=0;i<4;i++) {\n\t\t\tif (cardsInHand[i]==0) cardsInHand[i]=13;\n\t\t\telse if (cardsInHand[i]==1) cardsInHand[i]=14;\n\t\t}\n\t\t\n\t\tArrays.sort(cardsInHand);\n\t\tfor(int i=0;i<3;i++) {\n\t\t\tif(cardsInHand[i]!=cardsInHand[i+1]-1) return false;\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean isLegal(List<Integer> selectedCards)\n {\n //checks if the two cards selected added together equal 13\n if(selectedCards.size() == 2)\n {\n if(containsSum13(selectedCards))\n {\n \treturn true;\n }\n }\n \n //checks if the selected card is a K\n if(selectedCards.size() == 1)\n {\n \treturn containsK(selectedCards);\n }\n return false;\n \n }", "@Override\n\tboolean isValid(){\n\t\tif(size()==5) {\n\t\t\tint suite = getCard(0).suit;\n\t\t\tfor(int i = 1 ; i< size(); i++) {\n\t\t\t\tif(getCard(i).suit != suite) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tsort();\n\t\t\tint currRank = (getCard(0).rank +11)%13;\n\t\t\tfor(int i=0; i<size(); i++) {\n\t\t\t\tif((getCard(i).rank+11)%13 != currRank) return false;\n\t\t\t\tcurrRank++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isValid() {\r\n\t\tif (this.size() == 5) {\r\n\t\t\tthis.sort();\r\n\t\t\tif ((this.getCard(0).getRank() == this.getCard(1).getRank()) && (this.getCard(0).getRank() == this.getCard(2).getRank()) && (this.getCard(0).getRank() == this.getCard(3).getRank())) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if ((this.getCard(1).getRank() == this.getCard(2).getRank()) && (this.getCard(1).getRank() == this.getCard(3).getRank()) && (this.getCard(1).getRank() == this.getCard(4).getRank())) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean hasSet(ArrayList<Card> cards) {\r\n\t\tCollections.sort(cards);\r\n\t\t/*Once the cards are sorted, then the third card can be\r\n\t\t * used to compare with others\r\n\t\t */\r\n\t\tint compare = cards.get(2).getValue();\r\n\t\tint counter = 0;\r\n\t\tfor(int i = 0; i < 5 ; i++) {\r\n\t\t\tif(cards.get(i).getValue() == compare) {\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (counter == 3);\r\n\t}", "public boolean isValid() {\n\t\tif (this.size()!=5) {\n\t\t\treturn false;\n\t\t}\n\t\tthis.sort();\n\t\tif (this.getCard(2).getRank()==this.getCard(0).getRank() && this.getCard(3).getRank()==this.getCard(4).getRank()) {\n\t\t\treturn true;\n\t\t}\n\t\telse if (this.getCard(2).getRank()==this.getCard(4).getRank() && this.getCard(1).getRank()==this.getCard(0).getRank()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static boolean hasThreeOfAKind(Card[] cards) {\n\t\tint counter = 0;\n\t\tfor(int i = 0; i< cards.length; i++){\n\t\t\tfor(int j = i+1; j< cards.length; j++){\n\t\t\t\tif(cards[i].getValue() == cards[j].getValue()){\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(counter>=3){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean canPut(Player player) {\n boolean haveValidCart = false;\n boolean can = false;\n for (Card temp: player.getCards()) {\n if(temp.isValidCard(currentCard) || temp instanceof WildCard) {\n haveValidCart = true;\n can = true;\n break;\n }\n }\n if (!haveValidCart) {\n player.addCard(cards.get(0));\n cards.remove(0);\n if (player.getCards().get(player.getCards().size()-1).isValidCard(currentCard)) {\n show();\n System.out.println(player.getName() + \"! You were given a card because you didn't have any valid choice.\");\n can = true;\n }\n else {\n show();\n System.out.println(player.getName() + \"! You were given a card but you don't have any valid choice yet.\");\n }\n }\n return can;\n }", "private boolean allCardsAreNull(ArrayList<Card> set) {\r\n\t\tfor (Card c : set) {\r\n\t\t\tif (c != null) {\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 boolean checkChairSubset(ArrayList<Furniture> subset){\n boolean legs = false;\n boolean arms = false;\n boolean seat = false;\n boolean cushion = false;\n\n for(Furniture c : subset){\n if(c instanceof Chair){\n Chair chair = (Chair)c;\n if(chair.getLegs().equals(\"Y\")){\n legs = true;\n }\n if(chair.getArms().equals(\"Y\")){\n arms = true;\n }\n if(chair.getSeat().equals(\"Y\")){\n seat = true;\n }\n if(chair.getCushion().equals(\"Y\")){\n cushion = true;\n }\n }\n }\n // check if any of the chair pieces are missing and if so the combination is invalid\n if(!legs || !arms || !seat || !cushion){\n return false;\n }\n return true;\n }", "private boolean validInput(Player player, int choice) {\n if (0 <= choice && choice < player.getCards().size()) {\n if(state.getWildDrawPenalty() != 1 && player.getCards().get(choice) instanceof WildDrawCard) {\n return true;\n }\n if( state.getWildDrawPenalty() != 1 && !(player.getCards().get(choice) instanceof WildDrawCard)) {\n System.out.println(\"You should put WildDraw card.\");\n return false;\n }\n if( player.getCards().get(choice) instanceof WildDrawCard){\n boolean validWildDraw = true;\n for (Card temp: player.getCards()) {\n if(temp.isValidCard(currentCard)) {\n validWildDraw = false;\n }\n }\n if (validWildDraw) {\n return true;\n }\n else {\n System.out.println(\"You can't put WildDraw card.\");\n return false;\n }\n }\n if(state.getDrawPenalty() != 1 && player.getCards().get(choice) instanceof Draw2Card) {\n return true;\n }\n if (state.getDrawPenalty() != 1 && !(player.getCards().get(choice) instanceof Draw2Card)) {\n System.out.println(\"You should put Draw2 card.\");\n return false;\n }\n if ( player.getCards().get(choice).isValidCard(currentCard)) {\n return true;\n }\n System.out.println(\"Enter valid card.\");\n return false;\n }\n System.out.println(\"Enter a number between 1-\" + player.getCards().size() );\n return false;\n }", "public boolean isValid() {\n\t\t\n\t\tif(this.size()!=2)\n\t\t\treturn false;\n\t\telse {\n\t\t\tint rank1=this.getCard(0).getRank();\n\t\t\tint rank2=this.getCard(1).getRank();\n\t\t\t\n\t\t\tif(rank1==rank2)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t}", "@Test\n\tpublic void TestDeal() {\n\t\tArrayList<Player> testPlayers = game.getPlayers();\n\t\tArrayList<Card> allCards = new ArrayList<Card>();\n\t\tSet<Card> allCardsSet = new HashSet<Card>();\n\t\tint handSize = testPlayers.get(0).getCards().size();\n\t\tboolean correctSize = true;\n\t\t\n\t\tfor(Player p : testPlayers) {\n\t\t\tallCards.addAll(p.getCards());\n\t\t\tif(Math.abs(p.getCards().size() - handSize) > 1)\n\t\t\t\tcorrectSize = false;\n\t\t}\n\t\tallCardsSet.addAll(allCards);\n\t\t\n\t\tAssert.assertEquals(correctSize, true);\n\t\tAssert.assertEquals(allCards.size(), 21);\n\t\tAssert.assertEquals(allCards.size(), allCardsSet.size());\n\t}", "private boolean checkMatch(InventoryCrafting inventoryCrafting,IInventory schematic, int par2, int par3, boolean par4) {\r\n\t\tfor (int k = 0; k < 5; ++k) {\r\n\t\t\tfor (int l = 0; l < 5; ++l) {\r\n\t\t\t\tint i1 = k - par2;\r\n\t\t\t\tint j1 = l - par3;\r\n\t\t\t\tItemStack itemstack = null;\r\n\r\n\t\t\t\tif (i1 >= 0 && j1 >= 0 && i1 < this.recipeWidth && j1 < this.recipeHeight) {\r\n\t\t\t\t\tif (par4) {\r\n\t\t\t\t\t\titemstack = this.recipeItems[this.recipeWidth - i1 - 1 + j1 * this.recipeWidth];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\titemstack = this.recipeItems[i1 + j1 * this.recipeWidth];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tItemStack itemstack1 = inventoryCrafting.getStackInRowAndColumn(k, l);\r\n\r\n\t\t\t\tif (itemstack1 != null || itemstack != null) {\r\n\t\t\t\t\tif (itemstack1 == null && itemstack != null || itemstack1 != null && itemstack == null) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (itemstack.getItem() != itemstack1.getItem()) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (itemstack.getItemDamage() != 32767 && itemstack.getItemDamage() != itemstack1.getItemDamage()) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// for debugging\r\n\t\t/* if(schematicTypeNeeded != null)\r\n\t\t * System.out.println(schematicTypeNeeded.getUnlocalizedName());\r\n\t\t * else System.out.println(\"null type needed\"); */\r\n\r\n\t\t// if there is no specilness needed, just return true\r\n\t\tif (schematicTypeNeeded == null) return true;\r\n\r\n\t\tItemStack schematicStack = schematic.getStackInSlot(0);\r\n\t\t\r\n\t\tif (schematicStack == null) return false;\r\n\r\n\t\tSystem.out.println(schematicStack.getUnlocalizedName());\r\n\r\n\t\tSystem.out.println(\"[NausicaaMod] block that needs schematic\");\r\n\r\n\t\tif (!schematicStack.hasTagCompound()) {\r\n\t\t\tSystem.out.println(\"[NausicaaMod] crafting canceled: no tags\");\r\n\t\t\treturn false;\r\n\r\n\t\t} else if (!SchematicHolder.getCanCraft(schematicStack, schematicTypeNeeded)) {\r\n\t\t\tSystem.out.println(\"[NausicaaMod] crafting canceled\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\r\n\t}", "public Boolean isAWildCardSet() {\r\n\t\tfor (RiskCardModel card : lstTradedCards) {\r\n\t\t\tif (card.card_type.equals(\"WILD\"))\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public ErrorCode checkLegality(List<Card> cardList) {\n if (cardList == null || cardList.size()!=DECK_SIZE) {\n return ErrorCode.CARD_LIST_ERROR;\n }\n Set<Card> set = new HashSet<>(cardList);\n if(set.size() < cardList.size()){\n /* There are duplicates card */\n return ErrorCode.CARD_VALUE_ERROR;\n }\n return ErrorCode.SUCC;\n }", "public boolean isTradePossible(int inputPlayerID) {\n\t\t// If they have more than 4 cards they will have a valid combination to trade in\n\t\tif(playerArray[inputPlayerID].getCardsOwned().size()>4) { return true ;}\n\t\tif(playerArray[inputPlayerID].getCardsOwned().size()<2) { return false ;}\n\t\t\n\t\t// Contains the number of each insignia contained by players\n\t\tint[] insigniaCount = countInsigniaInHand(inputPlayerID);\n\t\t\n\t\t// any valid combination returns true \n\t\tif(insigniaCount[3]>1) {return true ;}\n\t\tif(insigniaCount[0]>0 && insigniaCount[1]>0 && insigniaCount[2]>0) { return true ;}\n\t\tif(insigniaCount[0]>=3 || (insigniaCount[1])>=3 || insigniaCount[2]>=3) {return true ;}\n\t\t\n\t\treturn false;\n\t}", "public boolean isPair(){\n \r\n List<PokerCard> pair;\r\n remainingCardValues = new ArrayList<>();\r\n \r\n //First possibility: first two cards\r\n pair = cards.subList(0, 2);\r\n if(haveSameValue(pair)){\r\n handValue = pair.get(0).getValue();\r\n \r\n //Store remaining card values for potential later comparison\r\n remainingCardValues.add(cards.get(4).getValue());\r\n remainingCardValues.add(cards.get(3).getValue());\r\n remainingCardValues.add(cards.get(2).getValue()); \r\n \r\n return true;\r\n }\r\n \r\n //Second possibility: cards 2 and 3\r\n pair = cards.subList(1, 3);\r\n if(haveSameValue(pair)){\r\n handValue = pair.get(0).getValue();\r\n \r\n //Store remaining card values for potential later comparison\r\n remainingCardValues.add(cards.get(4).getValue());\r\n remainingCardValues.add(cards.get(3).getValue());\r\n remainingCardValues.add(cards.get(0).getValue());\r\n \r\n return true;\r\n }\r\n \r\n //Third possibility: cards 3 and 4\r\n pair = cards.subList(2, 4);\r\n if(haveSameValue(pair)){\r\n handValue = pair.get(0).getValue();\r\n \r\n //Store remaining card values for potential later comparison\r\n remainingCardValues.add(cards.get(4).getValue());\r\n remainingCardValues.add(cards.get(1).getValue());\r\n remainingCardValues.add(cards.get(0).getValue());\r\n \r\n return true;\r\n }\r\n \r\n //Fourth possibility: last two cards\r\n pair = cards.subList(3, 5);\r\n if(haveSameValue(pair)){\r\n handValue = pair.get(0).getValue();\r\n \r\n //Store remaining card values for potential later comparison\r\n remainingCardValues.add(cards.get(2).getValue());\r\n remainingCardValues.add(cards.get(1).getValue());\r\n remainingCardValues.add(cards.get(0).getValue());\r\n \r\n return true;\r\n }\r\n return false;\r\n }", "public boolean CheckForUnwinnableCondition(){\n int humanSize = GetSizeOfHumanHand();\n int computerSize = GetSizeOfComputerHand();\n\n for(int i = 0; i < humanSize; i++) {\n //Human can play a card\n String card = handHuman.get(i);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if (topCard.contains(\"8\")) {\n //Can play any card ontop to determine suite\n return true;\n }\n\n if (card.contains(\"8\")) {\n //valid because 8s are wild cards, human can place it\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if (firstLetter.equals(topFirstLetter)) {\n return true;\n }\n\n else {\n if (topFirstLetter.equals(\"c\")) {\n String temp = topCard.substring(5, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"h\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"d\")) {\n String temp = topCard.substring(8, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"s\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n }\n }\n }\n\n for(int i = 0; i < computerSize; i++){\n //Human can play a card\n String card = handComputer.get(i);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if (topCard.contains(\"8\")) {\n //Can play any card ontop to determine suite\n return true;\n }\n\n if (card.contains(\"8\")) {\n //valid because 8s are wild cards, human can place it\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if (firstLetter.equals(topFirstLetter)) {\n return true;\n }\n\n else {\n if (topFirstLetter.equals(\"c\")) {\n String temp = topCard.substring(5, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"h\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"d\")) {\n String temp = topCard.substring(8, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"s\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n }\n }\n }\n\n //Human and computer can't play a card\n return false;\n }", "protected boolean isValid(List<Card> deck) {\r\n //Assume true\r\n boolean isValid = true;\r\n\r\n if (deck == null) {\r\n return false;\r\n }\r\n\r\n for (int i = 0; i < deck.size(); i++) {\r\n for (int j = i + 1; j < deck.size(); j++) {\r\n for (int k = j + 1; k < deck.size(); k++) {\r\n if (deck.get(i).equals(deck.get(j)) && deck.get(i).equals(deck.get(k))) {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n\r\n //if deck is valid, return true\r\n if (deck.size() != 104) {\r\n return false;\r\n }\r\n return isValid;\r\n }", "protected boolean isValidDeck(List<Card> deck) {\n if (deck.size() != 52) { // Deck must be 52 cards\n return false;\n }\n\n Set<Card> cards = new HashSet<Card>();\n cards.addAll(deck);\n return (cards.size() == 52);\n\n }", "@Override\n public boolean isValid() {\n return (27 - Inventory.getAll().length <= Inventory.find(\"Soft clay\").length)\n || (Inventory.find(\"Soft clay\").length < 1 || Inventory\n .find(\"Astral rune\").length < 1)\n && !Banking.isBankScreenOpen()\n && GlassBlower.antiban.canInteractObject();\n }", "public boolean isThreeOfAKind() {\n\t\treturn this.sameSet.size() == 1;\n\t}", "private static boolean isMatchingSuit(final Card card1, final Card card2, final Card card3, final Card card4, final Card card5)\r\n {\r\n //if the suit of one card does not match, return false\r\n if (!card1.hasSuit(card2) || !card1.hasSuit(card3) || !card1.hasSuit(card4) || !card1.hasSuit(card5))\r\n return false;\r\n if (!card2.hasSuit(card3) || !card2.hasSuit(card4) || !card2.hasSuit(card5))\r\n return false;\r\n if (!card3.hasSuit(card4) || !card3.hasSuit(card5))\r\n return false;\r\n if (!card4.hasSuit(card5))\r\n return false;\r\n \r\n //the suits match\r\n return true;\r\n }", "public boolean isValid() {\n\t\t\n\t\tif (this.size() == 2)\n\t\t\tif (this.getCard(0).getRank() == this.getCard(1).getRank())\n\t\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "public static final boolean isThreeOfKind(final Card card1, final Card card2, final Card card3, final Card card4, final Card card5) throws Exception\r\n {\r\n //get an ordered list of these cards\r\n List<Card> cards = getOrderedList(card1, card2, card3, card4, card5);\r\n \r\n //count the number of matches\r\n int count = 0;\r\n \r\n //now make sure the face values match accordingly\r\n for (int index = 1; index < cards.size(); index++)\r\n {\r\n //if the cards match increase the count\r\n if (cards.get(index - 1).hasValue(cards.get(index)))\r\n {\r\n count++;\r\n }\r\n else\r\n {\r\n //if the number of matches is three of kind return true\r\n if (count == THREE_OF_KIND_MATCH)\r\n return true;\r\n \r\n //reset the count\r\n count = 0;\r\n }\r\n }\r\n \r\n //check if the final count matches\r\n return (count == THREE_OF_KIND_MATCH);\r\n }", "public static boolean checkSequence(String cards){\r\n //split all the cards and store in card array\r\n String[] cardArray = cards.split(\",\");\r\n //convert card array into card object arrayList\r\n ArrayList<Card> cardList = new ArrayList<Card>();\r\n int numCards = cardArray.length;\r\n //if there is less than 3 cards eliminate deck\r\n if(numCards < 3) return false;\r\n //store suit and face value in card object\r\n for(int i=0;i<numCards;i++){\r\n Card c = new Card(cardArray[i].split(\"#\")[0].trim(),cardArray[i].split(\"#\")[1].trim());\r\n cardList.add(c);\r\n }\r\n int i=0;\r\n String cardSuit=\"\",nextCardSuit=\"\";\r\n int cardValue=-1,nextCardValue=-1,prevCardValue = -1;\r\n \r\n //loop till penultimate card\r\n for(i=0; i<numCards-1 ;i++){ \r\n \r\n cardValue = cardList.get(i).value;\r\n nextCardValue = cardList.get(i+1).value;\r\n cardSuit = cardList.get(i).suit;\r\n nextCardSuit = cardList.get(i+1).suit;\r\n \r\n //suit check\r\n if(!cardSuit.equals(nextCardSuit)) return false;\r\n \r\n //card check\r\n if(cardValue != nextCardValue-1){\r\n \r\n //exception only for queen followed by king followed by ace\r\n if(!(prevCardValue==11 && cardValue == 12 && nextCardValue ==0)){\r\n return false;\r\n }\r\n }\r\n //execption for king followed by ace followed by 2\r\n if(prevCardValue == 12 && cardValue == 0 && nextCardValue==1) return false;\r\n prevCardValue = cardValue;\r\n }\r\n \r\n return true;\r\n }", "private boolean isValidSuit(int suit) {\r\n if (suit < 0 || suit > 3) {\r\n return false;\r\n }\r\n return true;\r\n }", "private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}", "private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}", "private boolean isValid(){\n\n Set<ResourceSingle> checkSet = new HashSet<>();\n return shelves.stream()\n .map(Shelf::getCurrentType)\n .filter(Objects::nonNull)\n .allMatch(checkSet::add);\n }", "@Override\n public boolean anotherPlayIsPossible()\n {\n \t\n List<Integer> test = cardIndexes();\n return containsSum13(test) || containsK(test);\n \n }", "protected boolean canChoose(int n, Board gameBoard) {\n Card chosenCard = myCards.get(n);// get the chosenCard\n Card groundCard = gameBoard.getGroundCard();\n if (chosenCard.getColor() == groundCard.getColor()) { // if they had same color\n return true;\n }\n if (chosenCard instanceof NumericCard && groundCard instanceof NumericCard) {// if they had same number\n NumericCard tempChosen = (NumericCard) chosenCard; // change the static type\n NumericCard tempground = (NumericCard) groundCard; // change the static type\n if (tempChosen.getNumber() == tempground.getNumber()) {\n return true;\n }\n }\n\n if (groundCard.getClass().equals(chosenCard.getClass()) && !(groundCard instanceof NumericCard)\n && !(chosenCard instanceof NumericCard)) {// if they were sameInstance\n return true;\n }\n return false;\n }", "private boolean wellFormed() {\n\n\n\t\t\tGroup e = this;\n\n\t\t\tint i = 0;\n\t\t\tif(e.first == null && e.last == null && e.size == 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\n\t\t\tCard p = e.first;\n\t\t\tboolean check = false;\n\t\t\tif(e.first != null && e.last != null) {\n\t\t\t\tCard n = null;\n\t\t\t\tif(e.first.prev != null) return report(\"There is a loop\");\n\n\t\t\t\tfor(p = e.first; p.next != null; p = p.next) {\n\n\t\t\t\t\tn = p.next;\n\n\t\t\t\t\tif(n.prev != p) return report(\"p.next is null\");\n\t\t\t\t\tif(this != p.group) {\n\t\t\t\t\t\treturn report(\"this is not set to the group\");\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\n\t\t\t\tif(e.last.next != null) {\n\t\t\t\t\treturn report(\"Size is not equal to the amount of cards\");\n\t\t\t\t}\n\n\t\t\t\tfor(Card c = e.first; c.next != null; c = c.next) {\n\t\t\t\t\t++i;\n\t\t\t\t}\n\t\t\t\tif(i != this.size-1) {\n\t\t\t\t\treturn report(\"Size is not equal to the amount of cards\");\n\t\t\t\t}\n\t\t\t\tcheck = true;\n\t\t\t}\n\t\t\tif(check != true) {\n\t\t\t\tif(i != this.size) {\n\t\t\t\t\treturn report(\"Size is not equal to the amount of cards\");\n\t\t\t\t}\n\t\t\t\tif(e.first == null || e.last == null) {\n\t\t\t\t\treturn report(\"Error\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}", "public boolean canTrade(Type type, int[] trade) {\n \t\tint value = 0;\n \t\tfor (int i = 0; i < Hexagon.TYPES.length; i++) {\n \t\t\tif (Hexagon.TYPES[i] == Type.DESERT)\n \t\t\t\tcontinue;\n \n \t\t\t// check for specific 2:1 trader\n \t\t\tif (hasTrader(Hexagon.TYPES[i])\n \t\t\t\t\t&& getResources(Hexagon.TYPES[i]) >= 2 && trade[i] >= 2)\n \t\t\t\treturn true;\n \n \t\t\t// deduct from number of resource cards needed\n \t\t\tint number = getResources(Hexagon.TYPES[i]);\n \t\t\tif (number >= trade[i])\n \t\t\t\tvalue += trade[i];\n \t\t}\n \n \t\treturn (value >= tradeValue);\n \t}", "private boolean determineValid(){\n for(Integer val : group){\n if(!racers.containsKey(val)){\n WrongNumber = val;\n return false;\n }\n }\n return true;\n }", "public boolean isEmpty() {\r\n\t\treturn allCardsAreNull(set1) && allCardsAreNull(set2a)\r\n\t\t\t\t&& allCardsAreNull(set2b) && allCardsAreNull(set3a)\r\n\t\t\t\t&& allCardsAreNull(set3b);\r\n\t}", "@Override\n\t\tboolean hasMatch(ArrayList<Card> hand) {\n\t\t\tint suitValue = hand.get(0).getSuit().getValue();\n\n\t\t\t// check all of the same suit\n\t\t\tfor (int i = 1; i < hand.size(); i++) {\n\t\t\t\tif (hand.get(i).getSuit().getValue() != suitValue)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "private boolean isChoseFine(){\n if(freeSpaces.size()!=2 & freeSpaces.size()!=3){ //if the number of chosen spaces is not 3 or 2, that means it can't be good.\n return false;\n }\n else if(freeSpaces.size()==2){ //if there are 2.\n if(freeSpaces.elementAt(0).place.distance(freeSpaces.elementAt(1).place)==1)\n return true;\n else //if the distance between the spaces isn't 1, that means it can't be two suite spaces.\n return false;\n }\n else{ //if there are 3.\n //get the all 3 elements.\n int aX = freeSpaces.elementAt(0).place.x;\n int aY = freeSpaces.elementAt(0).place.y;\n int bX = freeSpaces.elementAt(1).place.x;\n int bY = freeSpaces.elementAt(1).place.y;\n int cX = freeSpaces.elementAt(2).place.x;\n int cY = freeSpaces.elementAt(2).place.y;\n if(aX==bX && bX==cX){ //if they are in the same column.\n int min = Math.min(aY, Math.min(bY, cY));\n int max = Math.max(aY, Math.max(bY, cY));\n return (max - min == 2); //if the distance between the max and the min is 2, that means they 3 suited.\n }\n else if(aY==bY && bY==cY){ //if they are in the same row.\n int min = Math.min(aX, Math.min(bX, cX));\n int max = Math.max(aX, Math.max(bX, cX));\n return (max - min == 2); //if the distance between the max and the min is 2, that means they 3 suited.\n }\n else //if they are in different rows and columns, so it isn't good.\n return false;\n }\n }", "public boolean CheckIfCardPlayedIsValid(UNOCard aCard) {\n\t\t\n\t\tif (discardPile.size() == 0) {\n\t\t\tdiscardPile.add(aCard);\n\t\t\treturn true;\n\t\t}\n\t\telse if (discardPile.get(discardPile.size() - 1).getName() == aCard.getName()) { // If card has the same value as last card played it is valid\n\t\t\tdiscardPile.add(aCard);\n\t\t\tcurrentTurnColor = aCard.getColor();\n\t\t\tif (aCard.getName() == \"Skip\" || aCard.getName() == \"Reverse\" || aCard.getName() == \"Draw Two\") { //if it is a special card it needs to have the action performed\n\t\t\t\tSpecialCardAction(aCard);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse if (currentTurnColor == aCard.getColor()) { // if card is the same color as last card played's color it is valid\n\t\t\tdiscardPile.add(aCard);\n\t\t\tif (aCard.getName() == \"Skip\" || aCard.getName() == \"Reverse\" || aCard.getName() == \"Draw Two\") { //if it is a special card it needs to have the action performed\n\t\t\t\tSpecialCardAction(aCard);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse if (aCard.getName() == \"Wild\" || aCard.getName() == \"Wild Draw Four\") { // if it is a wild or wild draw four card it is valid and performs its special action\n\t\t\tSpecialCardAction(aCard);\n\t\t\tdiscardPile.add(aCard);\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean isValidConnectors() {\n\n\t\tint countBoardCardInConnectors = 0;\n\n\t\tfor (CardModel cardModel : boardModel.getCards()) {\n\t\t\tif (connectors.contains(cardModel)) {\n\t\t\t\tcountBoardCardInConnectors++;\n\t\t\t}\n\t\t}\n\n\t\treturn (countBoardCardInConnectors == 2);\n\t}", "private boolean checkRaschModel(){\n ItemResponseModel irm = null;\n int count = 0;\n for(VariableName v : itemFormY.keySet()) {\n irm = itemFormY.get(v);\n\n if(irm.getType() == IrmType.L3 || irm.getType() == IrmType.L4) {\n if (irm.getGuessing() == 0 && irm.getDiscrimination() == 1.0 && irm.getSlipping() == 1.0) {\n count++;\n }\n }else if (irm.getType() == IrmType.PCM) {\n count++;\n }else {\n return false;\n }\n }\n return count==itemFormY.size();\n }", "public boolean hasThreeOfAKind(Hand handToCheck){\n\t\tHand hand = new FiveCardHand(handToCheck); //Make copy of the object so original doesn't get modified\n\t\tlog.debug(\"hasThreeOfAKind(hand = \"+hand+\")\");\n\t\tif(getThreeOfAKind(hand)!=null){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\n\t}", "private boolean canAcceptCard(Card card) {\n return cardSet.canAcceptCard(card);\n }", "private boolean validStraight() {\n Collections.sort(this.cards, Card.COMPARE_BY_VALUE);\n ArrayList<String> validHand = new ArrayList<>();\n boolean isStraight = false;\n for (int i = 0; i < this.cards.size(); i++) {\n //Check 5 cards from i to i + 5\n int j = i;\n validHand.add(this.cards.get(i).toString());\n while(j < i + 4 && j < this.cards.size() - 1) {\n Card c1 = this.cards.get(j);\n Card c2 = this.cards.get(j + 1);\n if(c1.isConsecutive(c2))\n validHand.add(c2.toString());\n j++;\n }\n if(j == i + 4 && validHand.size() == 5) {\n this.cardHand = new CardHand(validHand.toArray(new String[0]));\n isStraight = true;\n }\n validHand.clear();\n }\n return isStraight;\n }", "private boolean isValidCard(int index)\n {\n if (index >= cards.size() || index < 0)\n return false;\n \n for (int i = index; i < cards.size() - 1; i++)\n if (!isDifferentColor(cards.get(i), cards.get(i + 1)) ||\n !isOneLess(cards.get(i + 1), cards.get(i)))\n return false;\n\n return true;\n }", "@Test\r\n public void testPlayer_getDumbStrategyCard_differentWinners() {\r\n player2 = new Player(\"\", true);\r\n player2.setHand(strategyHand.getAllCards());\r\n boolean differentLegalCardFound = false;\r\n Card firstDiscard = player2.getDumbStrategyCard(yellowSix, yellowSix.getColor());\r\n for(int i = 0; i < 25; i++) {\r\n Card loopCard = player2.getDumbStrategyCard(yellowSix, yellowSix.getColor());\r\n if(!loopCard.equals(firstDiscard)) {\r\n differentLegalCardFound = true;\r\n }\r\n }\r\n assertTrue(differentLegalCardFound);\r\n }", "@Override\n\t\tboolean hasMatch(ArrayList<Card> hand) {\n\n\t\t\tint counter = 0;\n\t\t\tfor (int i = 0; i < hand.size(); i++) {\n\t\t\t\tif (i + 1 < hand.size()) {\n\t\t\t\t\tif (hand.get(i + 1).getCardValue().getValue()\n\t\t\t\t\t\t\t- hand.get(i).getCardValue().getValue() == 1)\n\t\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//if not straight, then do a final check of 5 unique cards\n\t\t\tHashMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n\t\t\tif (counter != 4) {\n\t\t\t\tfor (int i = 0; i < hand.size(); i++) {\n\t\t\t\t\tif (!map.containsKey(hand.get(i).getCardValue().getValue())) {\n\t\t\t\t\t\tmap.put(hand.get(i).getCardValue().getValue(), 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmap.put(hand.get(i).getCardValue().getValue(),\n\t\t\t\t\t\t\t\tmap.get(hand.get(i).getCardValue().getValue()) + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\treturn map.size() == 5;\n\t\t}", "private void validateTypes() {\r\n\t\tfor (int i = 0; i < types.length; i++) {\r\n\t\t\tString type = types[i];\r\n\t\t\tif (!TypedItem.isValidType(type))\r\n\t\t\t\tthrow new IllegalArgumentException(String.format(\"The monster type %s is invalid\", type));\r\n\t\t\tfor (int j = i + 1; j < types.length; j++) {\r\n\t\t\t\tif (type.equals(types[j])) {\r\n\t\t\t\t\tthrow new IllegalArgumentException(\"The monster cant have two similar types..\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public boolean checkCollection(Player player, PropertyCard card) {\n\t\tboolean almostComplete = false;\n\t\tfor(PropertyCard c: player.getCards()) {\n\t\t\tif(c.getTeam().equals(card.getTeam())) {\n\t\t\t\tif(countSameTeamCards(player, card) == card.getTeamSize()-1) {\n\t\t\t\t\talmostComplete = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn almostComplete;\n\t}", "public boolean istrianglevalid(double semiPer) {\n //declare variables\n boolean checkA = true;\n boolean checkB = true;\n boolean checkC = true;\n \n if (semiPer >= sideA && semiPer >= sideB && semiPer >= sideC) {\n return true;\n } else {\n return false;\n }\n }", "protected int checkForDuplicateGiftCards(Order order) {\r\n ArrayList paymentGroupClonedList = new ArrayList(order.getPaymentGroups());\r\n Iterator paymentGroupIterator = paymentGroupClonedList.iterator();;\r\n Iterator giftCardIterator = getGiftCardList().iterator();\r\n GiftCard tempGiftCard = null;\r\n String giftCardListCheckString = \"\";\r\n String paymentGroupListCheckString = \"\";\r\n int returnValue = NO_ERRORS;\r\n PaymentGroupImpl paymentGroup;\r\n \r\n while (paymentGroupIterator.hasNext()) {\r\n paymentGroup = (PaymentGroupImpl) paymentGroupIterator.next();\r\n if (paymentGroup instanceof NMCreditCard && ((NMCreditCard) paymentGroup).getCreditCardNumber() != null && ((NMCreditCard) paymentGroup).getCidTransient() != null) {\r\n paymentGroupListCheckString += ((NMCreditCard) paymentGroup).getCreditCardNumber().trim() + ((NMCreditCard) paymentGroup).getCidTransient().trim() + \"~\";\r\n }\r\n }\r\n \r\n while (giftCardIterator.hasNext()) {\r\n tempGiftCard = (GiftCard) giftCardIterator.next();\r\n \r\n if (!tempGiftCard.getIsBlank()) {\r\n if (paymentGroupListCheckString.indexOf(tempGiftCard.getCardNumber() + tempGiftCard.getCid()) != -1) {\r\n tempGiftCard.setIsValid(false);\r\n returnValue = DUPLICATE_CARD;\r\n }\r\n \r\n if (giftCardListCheckString.indexOf(tempGiftCard.getCardNumber() + tempGiftCard.getCid()) != -1) {\r\n tempGiftCard.setIsValid(false);\r\n Iterator giftCardIterator2 = getGiftCardList().iterator(); // another iterator to flag the other card that is a duplicate\r\n GiftCard tempGiftCard2 = null;\r\n while (giftCardIterator2.hasNext()) {\r\n tempGiftCard2 = (GiftCard) giftCardIterator2.next();\r\n if (tempGiftCard2.getCardNumber().trim().equalsIgnoreCase(tempGiftCard.getCardNumber()) && tempGiftCard2.getCid().trim().equalsIgnoreCase(tempGiftCard.getCid())) {\r\n tempGiftCard2.setIsValid(false);\r\n }\r\n }\r\n returnValue = DUPLICATE_CARD;\r\n }\r\n }\r\n giftCardListCheckString += tempGiftCard.getCardNumber() + tempGiftCard.getCid() + \"~\";\r\n }\r\n \r\n return returnValue;\r\n }", "@Test\r\n public void testHasAtLeastTwoPlayableCards() {\n Player player2 = new Player(\"Three Playable Cards Test\", true);\r\n Hand threePlayableCardsHand = strategyHand;\r\n player2.setHand(threePlayableCardsHand.getAllCards());\r\n\r\n // Make it harder to find playable cards:\r\n player2.getHand().discard(new Card(Card.COLORLESS, Card.WILD, cvm));\r\n player2.getHand().discard(new Card(Card.COLORLESS, Card.WILD_DRAW_FOUR, cvm));\r\n\r\n Card currentPlayedCard_1 = new Card(Card.YELLOW, Card.ONE, cvm);\r\n assertTrue(player2.hasAtLeastTwoPlayableCards(currentPlayedCard_1, Card.BLUE));\r\n\r\n Card currentPlayedCard_2 = new Card(Card.BLUE, Card.SEVEN, cvm);\r\n assertFalse(player2.hasAtLeastTwoPlayableCards(currentPlayedCard_2, Card.BLUE));\r\n }", "public static boolean isMeld(Card a, Card b, Card c) {\n\t\t// the three cards form a set\n\t\tif (a.rank == b.rank && b.rank == c.rank) return true;\n\n\t\t// if the three cards do not form a set, they must be the same suit\n\t\t// in order to form a run\n\t\tif (a.suit != b.suit || a.suit != c.suit || b.suit != c.suit)\n\t\t\treturn false;\n\n\t\t// check possible ascending runs\n\t\tif (a.rank == b.rank - 1 && b.rank == c.rank - 1) return true;\n\t\tif (a.rank == c.rank - 1 && c.rank == b.rank - 1) return true;\n\t\tif (b.rank == c.rank - 1 && c.rank == a.rank - 1) return true;\n\t\tif (b.rank == a.rank - 1 && a.rank == c.rank - 1) return true;\n\t\tif (c.rank == b.rank - 1 && b.rank == a.rank - 1) return true;\n\t\tif (c.rank == a.rank - 1 && a.rank == b.rank - 1) return true;\n\n\t\treturn false;\n\n\t}", "public boolean isFourOfAKind(){\n List<PokerCard> subList;\r\n \r\n //First possibility: first four cards are the same value\r\n subList = cards.subList(0, cards.size()-1);\r\n if(haveSameValue(subList)){\r\n handValue = subList.get(0).getValue();\r\n return true;\r\n }\r\n \r\n //Second possibility: last four cards are the same value\r\n subList = cards.subList(1, cards.size());\r\n if(haveSameValue(subList)){\r\n handValue = subList.get(0).getValue();\r\n return true;\r\n }\r\n \r\n return false;\r\n }", "public boolean checkDeskSubset(ArrayList<Furniture> subset){\n boolean legs = false;\n boolean top = false;\n boolean drawer = false;\n\n for(Furniture d : subset){\n if(d instanceof Desk){\n Desk desk = (Desk)d;\n if(desk.getLegs().equals(\"Y\")){\n legs = true;\n }\n if(desk.getTop().equals(\"Y\")){\n top = true;\n }\n if(desk.getDrawer().equals(\"Y\")){\n drawer = true;\n }\n }\n }\n // check if any of the desk pieces are missing and if so the combination is invalid\n if(!legs || !top || !drawer){\n return false;\n }\n return true;\n }", "@Test\n void pass3CardsRound99(){\n Dealer testDealer = new Dealer();\n testDealer.initDealer();\n testDealer.setRoundCount(99);\n \n List<Card> heartHand, spadeHand, clubHand, diamondHand,userPassedCards;\n\n heartHand = new ArrayList<Card>();\n spadeHand = new ArrayList<Card>();\n clubHand = new ArrayList<Card>();\n diamondHand = new ArrayList<Card>();\n userPassedCards = new ArrayList<Card>();\n \n userPassedCards.add(new Card(Suit.DIAMONDS, Rank.ACE, true));\n userPassedCards.add(new Card(Suit.DIAMONDS, Rank.KING, true));\n userPassedCards.add(new Card(Suit.DIAMONDS, Rank.QUEEN, true));\n\n \n for(Card c:userPassedCards) {\n c.setOwnerOfCard(\"user\");\n }\n\n for (Rank rank : Rank.values()) {\n heartHand.add(new Card(Suit.HEARTS, rank, true));\n }\n\n for (Rank rank : Rank.values()) {\n spadeHand.add(new Card(Suit.SPADES, rank, true));\n }\n\n for (Rank rank : Rank.values()) {\n clubHand.add(new Card(Suit.CLUBS, rank, true));\n }\n\n for (Rank rank : Rank.values()) {\n diamondHand.add(new Card(Suit.DIAMONDS, rank, true));\n }\n \n testDealer.getBotA().fillHandCards(heartHand);\n testDealer.getBotB().fillHandCards(spadeHand);\n testDealer.getBotC().fillHandCards(clubHand);\n testDealer.getUser().fillHandCards(diamondHand);\n\n testDealer.distributePassedCards(userPassedCards);\n\n assertEquals(13, testDealer.getUserHandCards().size());\n assertEquals(13, testDealer.getBotA().getHandCards().size());\n assertEquals(13, testDealer.getBotB().getHandCards().size());\n assertEquals(13, testDealer.getBotC().getHandCards().size());\n\n assertEquals(\"QUEEN of CLUBS[pickable by botA]\", testDealer.getBotA().getHandCards().get(0).toString());\n assertEquals(\"KING of CLUBS[pickable by botA]\", testDealer.getBotA().getHandCards().get(1).toString());\n assertEquals(\"ACE of CLUBS[pickable by botA]\", testDealer.getBotA().getHandCards().get(2).toString());\n\n assertEquals(\"QUEEN of DIAMONDS[pickable by botB]\", testDealer.getBotB().getHandCards().get(0).toString());\n assertEquals(\"KING of DIAMONDS[pickable by botB]\", testDealer.getBotB().getHandCards().get(1).toString());\n assertEquals(\"ACE of DIAMONDS[pickable by botB]\", testDealer.getBotB().getHandCards().get(2).toString());\n\n assertEquals(\"QUEEN of HEARTS[pickable by botC]\", testDealer.getBotC().getHandCards().get(10).toString());\n assertEquals(\"KING of HEARTS[pickable by botC]\", testDealer.getBotC().getHandCards().get(11).toString());\n assertEquals(\"ACE of HEARTS[pickable by botC]\", testDealer.getBotC().getHandCards().get(12).toString());\n\n assertEquals(\"QUEEN of SPADES[pickable by user]\", testDealer.getUser().getHandCards().get(10).toString());\n assertEquals(\"KING of SPADES[pickable by user]\", testDealer.getUser().getHandCards().get(11).toString());\n assertEquals(\"ACE of SPADES[pickable by user]\", testDealer.getUser().getHandCards().get(12).toString());\n }", "private boolean validFullHouse() {\n int highestTwo, highestThree;\n highestTwo = highestThree = -1;\n for (Integer key : this.cardOccurrence.keySet()) {\n int value = this.cardOccurrence.get(key);\n if (value == 2 && key > highestTwo)\n highestTwo = key;\n else if (value == 3 && key > highestThree) {\n //If there exists a higher 3 count, the old 3 count might be bigger than the twoCount\n if(highestThree > highestTwo)\n highestTwo = highestThree;\n highestThree = key;\n }\n }\n if (highestTwo == -1 || highestThree == -1) {\n return false;\n }\n //FullHouse only possible with 2s and 3s\n\n ArrayList<String> validHand = new ArrayList<>();\n int twosCount, threesCount;\n twosCount = threesCount = 0;\n for(int i = 0; i < this.cards.size(); i ++) {\n Card c = this.cards.get(i);\n if(c.sameValue(highestTwo) && twosCount < 2){\n twosCount++;\n validHand.add(c.toString());\n }\n else if(c.sameValue(highestThree) && threesCount < 3) {\n threesCount++;\n validHand.add(c.toString());\n }\n }\n //If above conditional didn't trigger, must be valid FullHouse of some sort\n this.cardHand = new CardHand(validHand.toArray(new String[0]));\n return true;\n }", "boolean haveGame(char suit){\n int suitNum = 0; // number of cards that follow suit\n for (int i=0; i<6; i++)\n if (hand.get(i).suit == suit)\n suitNum++;\n return (suitNum > 3);\n }", "boolean haveSuit(char suit){\n for (int i=0; i<6; i++)\n if (hand.get(i).suit != suit)\n return false;\n return true;\n }", "private boolean validatePlayerSettings(){\n if(playerAmount > 0) return true; //TODO: entfernen\n HashSet<Integer> hash = new HashSet<>();\n\n // check if alle colors different\n if (hash.add(P1color.getSelectedIndex()) && hash.add(P2color.getSelectedIndex()) && hash.add(P3color.getSelectedIndex())\n && hash.add(P4color.getSelectedIndex()) && hash.add(P5color.getSelectedIndex()) && hash.add(P6color.getSelectedIndex())){\n\n // check if all names different\n hash.clear();\n HashSet<String> hash2 = new HashSet<>();\n if (hash2.add(P1text.getText()) && hash2.add(P2text.getText()) && hash2.add(P3text.getText())\n && hash2.add(P4text.getText()) && hash2.add(P5text.getText()) && hash2.add(P6text.getText())){\n\n // check if all names are not empty\n hash2.clear();\n if (P1text.getText() != \"\" && P2text.getText() != \"\" && P3text.getText() != \"\" && P4text.getText() != \"\"\n && P5text.getText() != \"\" && P6text.getText() != \"\"){\n\n return true;\n }\n }\n }\n return false;\n }", "@Test\n void pass3CardsRound3(){\n Dealer testDealer = new Dealer();\n testDealer.initDealer();\n testDealer.setRoundCount(3);\n \n List<Card> heartHand, spadeHand, clubHand, diamondHand,userPassedCards;\n\n heartHand = new ArrayList<Card>();\n spadeHand = new ArrayList<Card>();\n clubHand = new ArrayList<Card>();\n diamondHand = new ArrayList<Card>();\n userPassedCards = new ArrayList<Card>();\n \n userPassedCards.add(new Card(Suit.DIAMONDS, Rank.ACE, true));\n userPassedCards.add(new Card(Suit.DIAMONDS, Rank.KING, true));\n userPassedCards.add(new Card(Suit.DIAMONDS, Rank.QUEEN, true));\n\n \n for(Card c:userPassedCards) {\n c.setOwnerOfCard(\"user\");\n }\n\n for (Rank rank : Rank.values()) {\n heartHand.add(new Card(Suit.HEARTS, rank, true));\n }\n\n for (Rank rank : Rank.values()) {\n spadeHand.add(new Card(Suit.SPADES, rank, true));\n }\n\n for (Rank rank : Rank.values()) {\n clubHand.add(new Card(Suit.CLUBS, rank, true));\n }\n\n for (Rank rank : Rank.values()) {\n diamondHand.add(new Card(Suit.DIAMONDS, rank, true));\n }\n \n testDealer.getBotA().fillHandCards(heartHand);\n testDealer.getBotB().fillHandCards(spadeHand);\n testDealer.getBotC().fillHandCards(clubHand);\n testDealer.getUser().fillHandCards(diamondHand);\n\n testDealer.distributePassedCards(userPassedCards);\n\n assertEquals(13, testDealer.getUserHandCards().size());\n assertEquals(13, testDealer.getBotA().getHandCards().size());\n assertEquals(13, testDealer.getBotB().getHandCards().size());\n assertEquals(13, testDealer.getBotC().getHandCards().size());\n\n assertEquals(\"QUEEN of CLUBS[pickable by botA]\", testDealer.getBotA().getHandCards().get(0).toString());\n assertEquals(\"KING of CLUBS[pickable by botA]\", testDealer.getBotA().getHandCards().get(1).toString());\n assertEquals(\"ACE of CLUBS[pickable by botA]\", testDealer.getBotA().getHandCards().get(2).toString());\n\n assertEquals(\"QUEEN of DIAMONDS[pickable by botB]\", testDealer.getBotB().getHandCards().get(0).toString());\n assertEquals(\"KING of DIAMONDS[pickable by botB]\", testDealer.getBotB().getHandCards().get(1).toString());\n assertEquals(\"ACE of DIAMONDS[pickable by botB]\", testDealer.getBotB().getHandCards().get(2).toString());\n\n assertEquals(\"QUEEN of HEARTS[pickable by botC]\", testDealer.getBotC().getHandCards().get(10).toString());\n assertEquals(\"KING of HEARTS[pickable by botC]\", testDealer.getBotC().getHandCards().get(11).toString());\n assertEquals(\"ACE of HEARTS[pickable by botC]\", testDealer.getBotC().getHandCards().get(12).toString());\n\n assertEquals(\"QUEEN of SPADES[pickable by user]\", testDealer.getUser().getHandCards().get(10).toString());\n assertEquals(\"KING of SPADES[pickable by user]\", testDealer.getUser().getHandCards().get(11).toString());\n assertEquals(\"ACE of SPADES[pickable by user]\", testDealer.getUser().getHandCards().get(12).toString());\n }", "@Test\n void pass3CardsRound1(){\n Dealer testDealer = new Dealer();\n testDealer.initDealer();\n testDealer.setRoundCount(1);\n \n List<Card> heartHand, spadeHand, clubHand, diamondHand,userPassedCards;\n\n heartHand = new ArrayList<Card>();\n spadeHand = new ArrayList<Card>();\n clubHand = new ArrayList<Card>();\n diamondHand = new ArrayList<Card>();\n userPassedCards = new ArrayList<Card>();\n \n userPassedCards.add(new Card(Suit.DIAMONDS, Rank.ACE, true));\n userPassedCards.add(new Card(Suit.DIAMONDS, Rank.KING, true));\n userPassedCards.add(new Card(Suit.DIAMONDS, Rank.QUEEN, true));\n\n for(Card c:userPassedCards) {\n c.setOwnerOfCard(\"user\");\n }\n\n for (Rank rank : Rank.values()) {\n heartHand.add(new Card(Suit.HEARTS, rank, true));\n }\n\n for (Rank rank : Rank.values()) {\n spadeHand.add(new Card(Suit.SPADES, rank, true));\n }\n\n for (Rank rank : Rank.values()) {\n clubHand.add(new Card(Suit.CLUBS, rank, true));\n }\n\n for (Rank rank : Rank.values()) {\n diamondHand.add(new Card(Suit.DIAMONDS, rank, true));\n }\n \n testDealer.getBotA().fillHandCards(heartHand);\n testDealer.getBotB().fillHandCards(spadeHand);\n testDealer.getBotC().fillHandCards(clubHand);\n testDealer.getUser().fillHandCards(diamondHand);\n\n testDealer.distributePassedCards(userPassedCards);\n\n assertEquals(13, testDealer.getUserHandCards().size());\n assertEquals(13, testDealer.getBotA().getHandCards().size());\n assertEquals(13, testDealer.getBotB().getHandCards().size());\n assertEquals(13, testDealer.getBotC().getHandCards().size());\n\n assertEquals(\"QUEEN of DIAMONDS[pickable by botA]\", testDealer.getBotA().getHandCards().get(0).toString());\n assertEquals(\"KING of DIAMONDS[pickable by botA]\", testDealer.getBotA().getHandCards().get(1).toString());\n assertEquals(\"ACE of DIAMONDS[pickable by botA]\", testDealer.getBotA().getHandCards().get(2).toString());\n\n assertEquals(\"QUEEN of HEARTS[pickable by botB]\", testDealer.getBotB().getHandCards().get(10).toString());\n assertEquals(\"KING of HEARTS[pickable by botB]\", testDealer.getBotB().getHandCards().get(11).toString());\n assertEquals(\"ACE of HEARTS[pickable by botB]\", testDealer.getBotB().getHandCards().get(12).toString());\n\n assertEquals(\"QUEEN of SPADES[pickable by botC]\", testDealer.getBotC().getHandCards().get(10).toString());\n assertEquals(\"KING of SPADES[pickable by botC]\", testDealer.getBotC().getHandCards().get(11).toString());\n assertEquals(\"ACE of SPADES[pickable by botC]\", testDealer.getBotC().getHandCards().get(12).toString());\n System.out.println(testDealer.getUser().getHandCards());\n System.out.println();\n assertEquals(\"QUEEN of CLUBS[pickable by user]\", testDealer.getUser().getHandCards().get(0).toString());\n assertEquals(\"KING of CLUBS[pickable by user]\", testDealer.getUser().getHandCards().get(1).toString());\n assertEquals(\"ACE of CLUBS[pickable by user]\", testDealer.getUser().getHandCards().get(2).toString());\n }", "@Override\n\t\tboolean hasMatch(ArrayList<Card> hand) {\n\t\t\tHashMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n\t\t\tfor (int i = 0; i < hand.size(); i++) {\n\t\t\t\tif (!map.containsKey(hand.get(i).getCardValue().getValue())) {\n\t\t\t\t\tmap.put(hand.get(i).getCardValue().getValue(), 1);\n\t\t\t\t} else {\n\t\t\t\t\tmap.put(hand.get(i).getCardValue().getValue(),\n\t\t\t\t\t\t\tmap.get(hand.get(i).getCardValue().getValue()) + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (Integer counter : map.values()) {\n\t\t\t\tif (map.size() == 3 && counter == 3)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public void validate() throws org.apache.thrift.TException {\n if (ctpTradeId != null) {\n ctpTradeId.validate();\n }\n if (esunny3TradeId != null) {\n esunny3TradeId.validate();\n }\n if (esunny9TradeId != null) {\n esunny9TradeId.validate();\n }\n }", "private boolean isCardValid(Card data) {\n // Check card if it valid to save isValid == true\n boolean isValid = (StringUtils.isEmpty(data.getName()) == false &&\n StringUtils.isEmpty(data.getAddress()) == false &&\n StringUtils.isEmpty(data.getPosition()) == false &&\n StringUtils.isEmpty(data.getGender()) == false);\n\n return isValid;\n }", "public boolean hasFourOfAKind(Hand handToCheck){\n\t\tHand hand = new FiveCardHand(handToCheck); //Make copy of the object so original doesn't get modified\n\t\tlog.debug(\"hasFourOfAKind(hand = \"+hand+\")\");\n\t\tif(hand == null){\n\t\t\tlog.debug(\"Hand was null. Returning false\");\n\t\t\treturn false;\n\t\t}\n\t\tArrayList<Card> cards = hand.getCards();\n\t\tif(cards == null){\n\t\t\tlog.debug(\"The ArrayLhast<Card> inside the Hand Object was NULL. Returning false\");\n\t\t\treturn false;\n\t\t}\n\t\tlog.trace(\"Number of cards in Hand: \"+cards.size());\n\t\tSet<CardNumber> set = new HashSet<CardNumber>(hand.getNumberValues());\n\t\tfor (CardNumber num : set){ \n\t\t\tint n = Collections.frequency(hand.getNumberValues(),num);\n\t\t\tlog.trace(\"There are \"+n+\" '\"+num+\"'s\");\n\t\t\tif(n>3){return true;}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "boolean hasCardType();", "public ArrayList<ArrayList<Furniture>> getValid(ArrayList<ArrayList<Furniture>> all){\n ArrayList<ArrayList<Furniture>> validSets = new ArrayList<ArrayList<Furniture>>();\n for(ArrayList<Furniture> subset : all){\n if(getFurnitureRequest().equalsIgnoreCase(\"Chair\")){\n if(checkChairSubset(subset)){\n validSets.add(subset);\n }\n }else if(getFurnitureRequest().equalsIgnoreCase(\"Desk\")){\n if(checkDeskSubset(subset)){\n validSets.add(subset);\n }\n }else if(getFurnitureRequest().equalsIgnoreCase(\"Lamp\")){\n if(checkLampSubset(subset)){\n validSets.add(subset);\n }\n }else if(getFurnitureRequest().equalsIgnoreCase(\"Filing\")){\n if(checkFilingSubset(subset)){\n validSets.add(subset);\n }\n }\n }\n return validSets;\n }", "public boolean handContainsTheseTwoCards_With_AtLeastOneFromPlayerOriginalHand(int val1, char suit, int val2) {\n int goUpToThisNumberForI = 2;//go up to < 2 // 0 1\n if (allCards.length == 2){//only two cards\n goUpToThisNumberForI = 1;\n }\n \n for (int j = 0; j < goUpToThisNumberForI; j++) {//iterate through just the players own first two cards --\n System.out.println(\"_______\" + j);\n for (int k = j + 1; k < allCards.length; k++) {//NOT SORTED\n System.out.println(\"..........\" + j);\n if ( (allCards[j].value == val1 && allCards[k].value == val2 )|| (allCards[j].value == val2 && allCards[k].value == val1)) {//left card is v1, right card is v2\n if (suit == 'x') {//suit doesn't matter\n return true;\n } else if (allCards[j].suit == allCards[k].suit) {\n return true;\n }\n } \n\n }\n\n }\n \n \n return false;\n }", "public boolean check(ArrayList<Card> cards){\n int val = cards.get(0).getVal();\n if(val == 2 || val == 10)\n return true;\n //sevens are special\n if(topCardVal() == 7)\n return (topCardVal() >= val);\n return (topCardVal() <= val);\n }", "public static boolean hasFourOfAKind(Card[] cards) {\n\t\tint counter = 0;\n\t\tfor(int i = 0; i< cards.length; i++){\n\t\t\tfor(int j = i+1; j< cards.length; j++){\n\t\t\t\tif(cards[i].getValue() == cards[j].getValue()){\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(counter==6){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean hasReqardTypeThree();", "public boolean VerifyHumanChoice(int value){\n String card = handHuman.get(value);\n System.out.print(\"CARD IN VERIFY HUMAN\" + card);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if(topCard.contains(\"8\")){\n //Can play any card ontop to determine suite\n topCard = card;\n return true;\n }\n\n if(card.contains(\"8\")){\n //valid because 8s are wild cards, human can place it\n topCard = card;\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if(firstLetter.equals(topFirstLetter)){\n topCard = card;\n return true;\n }\n\n else{\n if(topFirstLetter.equals(\"c\")){\n String temp = topCard.substring(5, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if(card.contains(temp)){\n topCard = card;\n return true;\n }\n\n }\n\n else if(topFirstLetter.equals(\"h\")){\n String temp = topCard.substring(6, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if(card.contains(temp)){\n topCard = card;\n return true;\n }\n\n }\n\n else if(topFirstLetter.equals(\"d\")){\n String temp = topCard.substring(8, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if(card.contains(temp)){\n topCard = card;\n return true;\n }\n\n }\n\n else if(topFirstLetter.equals(\"s\")){\n String temp = topCard.substring(6, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if(card.contains(temp)){\n topCard = card;\n return true;\n }\n\n }\n }\n\n //You can't play this card\n return false;\n }", "public boolean checkFilingSubset(ArrayList<Furniture> subset){\n boolean rails = false;\n boolean cabinet = false;\n boolean drawers = false;\n\n for(Furniture f : subset){\n if(f instanceof Filing){\n Filing filing = (Filing)f;\n if(filing.getRails().equals(\"Y\")){\n rails = true;\n }\n if(filing.getCabinet().equals(\"Y\")){\n cabinet = true;\n }\n if(filing.getDrawers().equals(\"Y\")){\n drawers = true;\n }\n }\n }\n // check if any of the filing pieces are missing and if so the combination is invalid\n if(!rails || !cabinet || !drawers){\n return false;\n }\n return true;\n }", "public static final boolean isOnePair(final Card card1, final Card card2, final Card card3, final Card card4, final Card card5) throws Exception\r\n {\r\n //get an ordered list of these cards\r\n List<Card> cards = getOrderedList(card1, card2, card3, card4, card5);\r\n \r\n //total number of pairs\r\n int pairTotal = 0;\r\n \r\n //count the number of matches\r\n int count = 0;\r\n \r\n //now make sure the face values match accordingly\r\n for (int index = 1; index < cards.size(); index++)\r\n {\r\n //if the cards match increase the count\r\n if (cards.get(index - 1).hasValue(cards.get(index)))\r\n {\r\n count++;\r\n }\r\n else\r\n {\r\n //if the number of matches is a pair add to total\r\n if (count == PAIR_MATCH)\r\n pairTotal++;\r\n \r\n //reset the count\r\n count = 0;\r\n }\r\n }\r\n \r\n //if the number of matches is a pair add to total\r\n if (count == PAIR_MATCH)\r\n pairTotal++;\r\n \r\n //check if the final count of pairs matches 1\r\n return (pairTotal == 1);\r\n }", "private void check3(){\n \n if (errorCode == 0){\n \n if (firstDigit * fifthDigit * ninthDigit != 24){\n valid = false;\n errorCode = 3;\n }\n }\n\t}", "private boolean checkMortgageCards(ArrayList<PropertyCard> soloCardsToMortgage,ArrayList<PropertyCard> almostCompleteCards, int debt) {\n\t\tboolean soldEnough = false;\n\t\tif(soloCardsToMortgage.size()>0)\n\t\t\tsoldEnough = mortgageCards(soloCardsToMortgage, debt);\n\t\t\n\t\tif(!soldEnough) {\n\t\t\t\n\t\t\tif(almostCompleteCards.size()>0)\n\t\t\t\tsoldEnough = mortgageCards(almostCompleteCards, debt);\n\t\t}\n\t\t\n\t\tif(!soldEnough) {\n\t\t\trevertMortgage(soloCardsToMortgage);\n\t\t\trevertMortgage(almostCompleteCards);\n\t\t}\n\t\t\n\t\treturn soldEnough;\n\t}", "private boolean makePair() {\n int pairs = -1;\n for (Integer key : this.cardOccurrence.keySet()) {\n int value = this.cardOccurrence.get(key);\n if (value == 2)\n pairs = key;\n }\n //Means no keys w/ occurrence 2\n if (pairs == -1)\n return false;\n ArrayList<String> validHands = new ArrayList<>();\n Collections.sort(this.cards, Card.COMPARE_BY_VALUE);\n int i = this.cards.size() - 1;\n\n //First find the pair and add them to the validHands\n while(i >= 0) {\n Card c = this.cards.get(i);\n if(c.sameValue(pairs))\n validHands.add(c.toString());\n i--;\n }\n\n //Then add kickers in order of magnitude\n i = this.cards.size() - 1;\n while(i >= 0 && validHands.size() < 5) {\n Card c = this.cards.get(i);\n if(!c.sameValue(pairs))\n validHands.add(c.toString());\n i--;\n }\n this.cardHand = new CardHand(validHands.toArray(new String[0]));\n return true;\n }", "@Override\n\t\tboolean hasMatch(ArrayList<Card> hand) {\n\t\t\tfor (int i = 0; i < hand.size(); i++) {\n\t\t\t\tif (i + 1 < hand.size()) {\n\t\t\t\t\tif (hand.get(i + 1).getCardValue().getValue()\n\t\t\t\t\t\t\t- hand.get(i).getCardValue().getValue() > 1)\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "public static boolean hasFlush(Card[] cards) {\n\t\tint counter = 0;\n\t\tfor(int i = 1; i< cards.length; i++){\n\t\t\tif(cards[0].getSuit() == cards[i].getSuit()){\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\tif(counter==4){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void validate_remainingItem_ShoppingCart() {\n System.out.println(\"List of remaining items ===>> \" + listOfShoppingCardItem);\n System.out.println(\"List of Deleted items =====>> \" + listOfDeletedItemNameShoppingCart);\n Assert.assertTrue(!(listOfShoppingCardItem.containsAll(listOfDeletedItemNameShoppingCart)));\n }", "public boolean checkLampSubset(ArrayList<Furniture> subset){\n boolean base = false;\n boolean bulb = false;\n\n for(Furniture l : subset){\n if(l instanceof Lamp){\n Lamp lamp = (Lamp)l;\n if(lamp.getBase().equals(\"Y\")){\n base = true;\n }\n if(lamp.getBulb().equals(\"Y\")){\n bulb = true;\n }\n }\n }\n // check if any of the lamp pieces are missing and if so the combination is invalid\n if(!base || !bulb){\n return false;\n }\n return true;\n }", "public boolean areThreeOrMorePossible(final Field[] line) {\n\t\t// Empty means interested generally\n\t\treturn this.areThreeOrMorePossible(line, Symbol.EMPTY);\n\t}", "@Test\n void pass3CardsRound2(){\n Dealer testDealer = new Dealer();\n testDealer.initDealer();\n testDealer.setRoundCount(2);\n \n List<Card> heartHand, spadeHand, clubHand, diamondHand,userPassedCards;\n\n heartHand = new ArrayList<Card>();\n spadeHand = new ArrayList<Card>();\n clubHand = new ArrayList<Card>();\n diamondHand = new ArrayList<Card>();\n userPassedCards = new ArrayList<Card>();\n \n userPassedCards.add(new Card(Suit.DIAMONDS, Rank.ACE, true));\n userPassedCards.add(new Card(Suit.DIAMONDS, Rank.KING, true));\n userPassedCards.add(new Card(Suit.DIAMONDS, Rank.QUEEN, true));\n\n \n for(Card c:userPassedCards) {\n c.setOwnerOfCard(\"user\");\n }\n\n for (Rank rank : Rank.values()) {\n heartHand.add(new Card(Suit.HEARTS, rank, true));\n }\n\n for (Rank rank : Rank.values()) {\n spadeHand.add(new Card(Suit.SPADES, rank, true));\n }\n\n for (Rank rank : Rank.values()) {\n clubHand.add(new Card(Suit.CLUBS, rank, true));\n }\n\n for (Rank rank : Rank.values()) {\n diamondHand.add(new Card(Suit.DIAMONDS, rank, true));\n }\n \n testDealer.getBotA().fillHandCards(heartHand);\n testDealer.getBotB().fillHandCards(spadeHand);\n testDealer.getBotC().fillHandCards(clubHand);\n testDealer.getUser().fillHandCards(diamondHand);\n\n testDealer.distributePassedCards(userPassedCards);\n\n assertEquals(13, testDealer.getUserHandCards().size());\n assertEquals(13, testDealer.getBotA().getHandCards().size());\n assertEquals(13, testDealer.getBotB().getHandCards().size());\n assertEquals(13, testDealer.getBotC().getHandCards().size());\n\n assertEquals(\"QUEEN of SPADES[pickable by botA]\", testDealer.getBotA().getHandCards().get(0).toString());\n assertEquals(\"KING of SPADES[pickable by botA]\", testDealer.getBotA().getHandCards().get(1).toString());\n assertEquals(\"ACE of SPADES[pickable by botA]\", testDealer.getBotA().getHandCards().get(2).toString());\n\n assertEquals(\"QUEEN of CLUBS[pickable by botB]\", testDealer.getBotB().getHandCards().get(0).toString());\n assertEquals(\"KING of CLUBS[pickable by botB]\", testDealer.getBotB().getHandCards().get(1).toString());\n assertEquals(\"ACE of CLUBS[pickable by botB]\", testDealer.getBotB().getHandCards().get(2).toString());\n System.out.println(testDealer.getBotC().getHandCards());\n assertEquals(\"QUEEN of DIAMONDS[pickable by botC]\", testDealer.getBotC().getHandCards().get(10).toString());\n assertEquals(\"KING of DIAMONDS[pickable by botC]\", testDealer.getBotC().getHandCards().get(11).toString());\n assertEquals(\"ACE of DIAMONDS[pickable by botC]\", testDealer.getBotC().getHandCards().get(12).toString());\n System.out.println(testDealer.getUser().getHandCards());\n assertEquals(\"QUEEN of HEARTS[pickable by user]\", testDealer.getUser().getHandCards().get(10).toString());\n assertEquals(\"KING of HEARTS[pickable by user]\", testDealer.getUser().getHandCards().get(11).toString());\n assertEquals(\"ACE of HEARTS[pickable by user]\", testDealer.getUser().getHandCards().get(12).toString());\n }", "private void makeTrips() {\n int highestThree, firstKicker, secondKicker;\n highestThree = firstKicker = secondKicker = -1;\n for (Integer key : this.cardOccurrence.keySet()) {\n int value = this.cardOccurrence.get(key);\n if(value == 3 && value > highestThree)\n highestThree = key;\n else {\n if(key > firstKicker) {\n secondKicker = firstKicker;\n firstKicker = key;\n }\n else if(key > secondKicker)\n secondKicker = key;\n }\n }\n\n //Go through Cards ArrayList to get the actual cards pertaining\n ArrayList<String> validHand = new ArrayList<>();\n for(int i = 0; i < this.cards.size(); i++) {\n Card c = this.cards.get(i);\n if(c.sameValue(highestThree))\n validHand.add(c.toString());\n else if(c.sameValue(firstKicker) || c.sameValue(secondKicker))\n validHand.add(c.toString());\n }\n this.cardHand = new CardHand(validHand.toArray(new String[0]));\n }", "@Test\n void pass3CardsRound4(){\n Dealer testDealer = new Dealer();\n testDealer.initDealer();\n testDealer.setRoundCount(4);\n \n List<Card> heartHand, spadeHand, clubHand, diamondHand,userPassedCards;\n\n heartHand = new ArrayList<Card>();\n spadeHand = new ArrayList<Card>();\n clubHand = new ArrayList<Card>();\n diamondHand = new ArrayList<Card>();\n userPassedCards = new ArrayList<Card>();\n \n userPassedCards.add(new Card(Suit.DIAMONDS, Rank.ACE, true));\n userPassedCards.add(new Card(Suit.DIAMONDS, Rank.KING, true));\n userPassedCards.add(new Card(Suit.DIAMONDS, Rank.QUEEN, true));\n\n \n for(Card c:userPassedCards) {\n c.setOwnerOfCard(\"user\");\n }\n\n for (Rank rank : Rank.values()) {\n heartHand.add(new Card(Suit.HEARTS, rank, true));\n }\n\n for (Rank rank : Rank.values()) {\n spadeHand.add(new Card(Suit.SPADES, rank, true));\n }\n\n for (Rank rank : Rank.values()) {\n clubHand.add(new Card(Suit.CLUBS, rank, true));\n }\n\n for (Rank rank : Rank.values()) {\n diamondHand.add(new Card(Suit.DIAMONDS, rank, true));\n }\n \n testDealer.getBotA().fillHandCards(heartHand);\n testDealer.getBotB().fillHandCards(spadeHand);\n testDealer.getBotC().fillHandCards(clubHand);\n testDealer.getUser().fillHandCards(diamondHand);\n\n testDealer.distributePassedCards(userPassedCards);\n\n assertEquals(13, testDealer.getUserHandCards().size());\n assertEquals(13, testDealer.getBotA().getHandCards().size());\n assertEquals(13, testDealer.getBotB().getHandCards().size());\n assertEquals(13, testDealer.getBotC().getHandCards().size());\n\n assertEquals(\"TWO of HEARTS[pickable by botA]\", testDealer.getBotA().getHandCards().get(0).toString());\n assertEquals(\"THREE of HEARTS[pickable by botA]\", testDealer.getBotA().getHandCards().get(1).toString());\n assertEquals(\"FOUR of HEARTS[pickable by botA]\", testDealer.getBotA().getHandCards().get(2).toString());\n\n assertEquals(\"TWO of SPADES[pickable by botB]\", testDealer.getBotB().getHandCards().get(0).toString());\n assertEquals(\"THREE of SPADES[pickable by botB]\", testDealer.getBotB().getHandCards().get(1).toString());\n assertEquals(\"FOUR of SPADES[pickable by botB]\", testDealer.getBotB().getHandCards().get(2).toString());\n\n assertEquals(\"QUEEN of CLUBS[pickable by botC]\", testDealer.getBotC().getHandCards().get(10).toString());\n assertEquals(\"KING of CLUBS[pickable by botC]\", testDealer.getBotC().getHandCards().get(11).toString());\n assertEquals(\"ACE of CLUBS[pickable by botC]\", testDealer.getBotC().getHandCards().get(12).toString());\n\n assertEquals(\"QUEEN of DIAMONDS[pickable by user]\", testDealer.getUser().getHandCards().get(10).toString());\n assertEquals(\"KING of DIAMONDS[pickable by user]\", testDealer.getUser().getHandCards().get(11).toString());\n assertEquals(\"ACE of DIAMONDS[pickable by user]\", testDealer.getUser().getHandCards().get(12).toString());\n }", "private boolean isValidSuit(char suit) {\n return (suit != 'H' && suit != 'D' && suit != 'S' && suit != 'C');\n }", "private boolean checkMatch(String first, String second, String third)\n {\n // First makes sure the given inputs aren't empty\n if (!first.isEmpty())\n {\n // Set the winner to be the current player\n return first.equals(second) && first.equals(third);\n }\n /*\n * If one or more of them are empty, set he current winner to -1 and\n * return false\n */\n return false;\n }", "@Override\n\tprotected boolean checkDataStructure(Data data) throws ImportitException {\n\t\tdata.setDatabase(39);\n\t\tdata.setGroup(3);\n\t\tboolean validDb = checkDatabaseName(data);\n\t\tboolean validHead = false;\n\t\tboolean validTable = false;\n\t\tboolean existImportantFields = false;\n\t\tif (validDb) {\n\t\t\tList<Field> headerFields = data.getHeaderFields();\n\t\t\tList<Field> tableFields = data.getTableFields();\n\t\t\tvalidHead = false;\n\t\t\tvalidTable = false;\n\t\t\ttry {\n\n\t\t\t\tvalidHead = checkWarehouseGroupProperties(headerFields, data.getOptionCode().useEnglishVariables());\n\t\t\t\tvalidTable = checkFieldList(tableFields, 39, 3, false, data.getOptionCode().useEnglishVariables());\n\t\t\t\tString[] checkDataCustomerPartProperties = checkDataWarehouseGroupProperties(data);\n\t\t\t\texistImportantFields = checkDataCustomerPartProperties.length == 2;\n\n\t\t\t} catch (ImportitException e) {\n\t\t\t\tlogger.error(e);\n\t\t\t\tdata.appendError(Util.getMessage(\"err.structure.check\", e.getMessage()));\n\t\t\t}\n\t\t}\n\t\tif (validTable && validHead && validDb & existImportantFields) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "@Test\n public void checkValidityTest2() {\n GenericStandardDeckGame g = new GenericStandardDeckGame();\n List<Card> deck = g.getDeck();\n deck.set(32, new Card(Card.number.four, Card.suit.club));\n assert (!g.checkValidity(deck));\n }", "public boolean isPickItUp(int playerID, Card discard){\n if(turn == playerID && gameStage == 1 && dealer == playerID){\n currentTrumpSuit = middleCardSuit;\n // make dealer discard a card and give them the middle card\n if(dealer == 0){\n //discard card that player taps\n if(player1Hand.get(0) == discard){\n player1Hand.remove(0);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(1) == discard){\n player1Hand.remove(1);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(2) == discard){\n player1Hand.remove(2);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(3) == discard){\n player1Hand.remove(3);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(4) == discard){\n player1Hand.remove(4);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n }\n }\n return false;\n }", "public boolean isWin_LordVetinari(){\r\n // player got lordVetinari card\r\n Player playerHoldCard = null;\r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(player.getPersonalityCardID() == 1){\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if (playerHoldCard != null) {\r\n int numPlayers = discWorld.getPlayer_HASH().size();\r\n\r\n Set<Integer> areaList = new HashSet<Integer>();\r\n for (Integer minionID : playerHoldCard.getMinionList()) {\r\n int minion_ID = minionID;\r\n MinionPiece minion = discWorld.getMinionPiece_HASH().get(minion_ID);\r\n if (minion.getAreaNumber() != ConstantField.DEFAULT_UNDEFINED_PLAYID) {\r\n int areaID = minion.getAreaNumber();\r\n Area area = discWorld.getArea_HASH().get(areaID);\r\n // make sure free of demon\r\n if (area.getDemonList().size() == 0) {\r\n areaList.add(minion.getAreaNumber());\r\n }\r\n }\r\n\r\n }\r\n\r\n if (numPlayers == 2) {\r\n\r\n if (areaList.size() >= 11) {\r\n return true;\r\n }\r\n\r\n } else if (numPlayers == 3) {\r\n\r\n if (areaList.size() >= 10) {\r\n return true;\r\n }\r\n\r\n } else if (numPlayers == 4) {\r\n\r\n if (areaList.size() >= 9) {\r\n return true;\r\n }\r\n\r\n }\r\n }\r\n\r\n return false;\r\n }", "public boolean hasFlush(ArrayList<Card>cards) {\r\n\t\tCollections.sort(cards);\r\n\t\tfor(int i = 0; i < 4 ; i++) {\r\n\t\t\tif(cards.get(i).getSuit() != cards.get(i+1).getSuit()) {\r\n\t\t\t\treturn false; \r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true; \r\n\t}", "final boolean isValidCartQty() {\n Map<Integer, ReturnedItemDTO> cartMap = returnTable.getIdAndQuantityMap();\n for (Entry<Integer, ReturnedItemDTO> entry : cartMap.entrySet()) {\n ReturnedItemDTO ret = entry.getValue();\n int qty = ret.qty;\n int damageStatus = ret.damageStatus;\n if (qty > 0 && damageStatus > 0) {\n return true;\n }\n }\n return false;\n\n }", "private boolean isEncapsulatingBet(BetSlipResponse betSlipResponse) {\n boolean result = betSlipResponse.getTransactions().size() > 0;\n\n for (TransactionResponse transactionResponse : betSlipResponse.getTransactions()) {\n result &= transactionResponse.getTransactionTypeId() == TransactionType.BET.getId();\n }\n\n return result;\n }" ]
[ "0.66185087", "0.64431065", "0.63153803", "0.6314365", "0.62699306", "0.6247175", "0.62123066", "0.61211336", "0.6091228", "0.59659153", "0.5958739", "0.59255016", "0.5894677", "0.58227843", "0.5819715", "0.58066136", "0.5803704", "0.57885337", "0.577157", "0.5741492", "0.56819606", "0.5676166", "0.5645956", "0.5616491", "0.55482227", "0.5525088", "0.55158305", "0.5512123", "0.5500652", "0.5499665", "0.54826003", "0.5471231", "0.54628015", "0.54628015", "0.54496914", "0.5433448", "0.5421153", "0.54143727", "0.53918946", "0.53892386", "0.5380955", "0.5362076", "0.5357213", "0.5339501", "0.53215116", "0.531593", "0.5296453", "0.5293628", "0.5275417", "0.5272175", "0.5265899", "0.5239432", "0.52234", "0.5218162", "0.5215907", "0.5205244", "0.52036023", "0.5196549", "0.5160069", "0.5155279", "0.514361", "0.514303", "0.5128594", "0.5123079", "0.51180637", "0.5111806", "0.5090559", "0.50841826", "0.50834614", "0.5080551", "0.50719166", "0.507171", "0.5066086", "0.50626016", "0.50548685", "0.5046039", "0.50433916", "0.5043105", "0.5039551", "0.50339496", "0.5030484", "0.50232184", "0.5020755", "0.5019761", "0.50183076", "0.50110847", "0.50012904", "0.49903408", "0.4984757", "0.49828568", "0.49813443", "0.49801418", "0.49785143", "0.49752268", "0.49711907", "0.49703607", "0.49697116", "0.49668825", "0.4964714", "0.49618286" ]
0.7253096
0
This method checks if the TradeCardSet is a WildCardSet or not.
public Boolean isAWildCardSet() { for (RiskCardModel card : lstTradedCards) { if (card.card_type.equals("WILD")) return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Boolean isValidCountWildCard() {\r\n\t\tint count = 0;\r\n\t\tfor (RiskCardModel card : lstTradedCards) {\r\n\t\t\tif (card.card_type.equals(\"WILD\")) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (count > 1 ? false : true);\r\n\t}", "public boolean isWildCard() {\n return (m_bWildCard);\n }", "public Boolean isTradedCardSetValid() {\r\n\r\n\t\tif (lstTradedCards.size() == 3) {\r\n\r\n\t\t\tif (!isAWildCardSet()) {\r\n\t\t\t\t// If all the cards are same\r\n\t\t\t\tif (lstTradedCards.get(0).card_type.equals(lstTradedCards.get(1).card_type)\r\n\t\t\t\t\t\t&& lstTradedCards.get(1).card_type.equals(lstTradedCards.get(2).card_type)) {\r\n\t\t\t\t\tcardStatusLabel.setText(\"Success\");\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// all 3 are different\r\n\t\t\t\telse if (!lstTradedCards.get(0).card_type.equals(lstTradedCards.get(1).card_type)\r\n\t\t\t\t\t\t&& !lstTradedCards.get(1).card_type.equals(lstTradedCards.get(2).card_type)\r\n\t\t\t\t\t\t&& !lstTradedCards.get(0).card_type.equals(lstTradedCards.get(2).card_type)) {\r\n\t\t\t\t\tcardStatusLabel.setText(\"Success\");\r\n\t\t\t\t\tUtility.writeLog(\"card traded successfully\");\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (isValidCountWildCard()) {\r\n\t\t\t\t\tcardStatusLabel.setText(\"Success\");\r\n\t\t\t\t\tUtility.writeLog(\"card traded successfully\");\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcardStatusLabel.setText(\"Please select only/atleast three cards!\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcardStatusLabel.setText(\"Please select only/atleast three cards!\");\r\n\t\treturn false;\r\n\t}", "private boolean allCardsAreNull(ArrayList<Card> set) {\r\n\t\tfor (Card c : set) {\r\n\t\t\tif (c != null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private boolean isValid(){\n\n Set<ResourceSingle> checkSet = new HashSet<>();\n return shelves.stream()\n .map(Shelf::getCurrentType)\n .filter(Objects::nonNull)\n .allMatch(checkSet::add);\n }", "public final boolean isWild() {\n/* 165 */ return this.m_wild;\n/* */ }", "private boolean canChooseWildDrawCardPenalty(Player nextPlayer) {\n boolean can = false;\n for (Card temp : nextPlayer.getCards()) {\n if (temp instanceof WildDrawCard) {\n can = true;\n break;\n }\n }\n if (!can) {\n System.out.println(\"The next player was fined.\");\n }\n return can;\n }", "boolean hasCardType();", "public boolean canDoBuySettlement(){\n\t\t if(resourceCardHand.canDoPayForSettlement() == false || playerPieces.hasAvailableSettlement() == false) {\n\t\t\t return false;\n\t\t }\n\t\t // If the player does not have a valid place to put a settlement on the map, we won't let the player buy one\n\t\t if(playerPieces.canPlaceASettlementOnTheMap() == false) {\n\t\t\t return false;\n\t\t }\n\t\t return true;\n\t }", "boolean findSpecialtyContainers(){\n\t\t\tif (this.receptacle != null)//checks and sees if there's any containers in the location.\n\t\t\t\tfor (int i = 0; i < this.receptacle.size(); i++)\n\t\t\t\t\tif ((this.receptacle.get(i) instanceof SpecialtyContainer))\n\t\t\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}", "public static boolean canTradeMixed() {\n \t\treturn mixedTrade;\n \t}", "protected boolean canPlay(Board gameBoard) {\n if (canPlayWithoutWild(gameBoard)) {\n return true;\n }\n Iterator<Card> it = myCards.iterator();\n while (it.hasNext()) { // check if the player has wild card\n Card temp = it.next();\n if (temp instanceof WildDrawCard || temp instanceof ColorChangeCard) {\n return true;\n }\n }\n return false;\n }", "public static boolean isType(PlayingCard[] hand){\n boolean flush = HandUtils.containsFlush(hand);\n boolean straight = HandUtils.containsStraight(hand);\n return straight && !flush;\n }", "private boolean canPut(Player player) {\n boolean haveValidCart = false;\n boolean can = false;\n for (Card temp: player.getCards()) {\n if(temp.isValidCard(currentCard) || temp instanceof WildCard) {\n haveValidCart = true;\n can = true;\n break;\n }\n }\n if (!haveValidCart) {\n player.addCard(cards.get(0));\n cards.remove(0);\n if (player.getCards().get(player.getCards().size()-1).isValidCard(currentCard)) {\n show();\n System.out.println(player.getName() + \"! You were given a card because you didn't have any valid choice.\");\n can = true;\n }\n else {\n show();\n System.out.println(player.getName() + \"! You were given a card but you don't have any valid choice yet.\");\n }\n }\n return can;\n }", "boolean isCustomiseSet();", "public boolean lookAtWinCard(){\n boolean winCard = false;\n for(Card cards: playerHand){\n if(cards.getCardName().equals(\"Magnetite\")){\n winCard = true;\n }\n }\n return winCard;\n }", "private boolean canAcceptCard(Card card) {\n return cardSet.canAcceptCard(card);\n }", "public boolean canBeSet() {\n if (this.equals(SquareType.CORRIDOR))\n return true;\n else\n return false;\n }", "public boolean isFlush() {\n Set<Suit> vari = new TreeSet<Suit>();\n for (Card c : cards) {\n \tvari.add(c.getSuit());\n }\n return(vari.size() == 1);\n }", "static boolean isFlush(ArrayList<Card> c)\n {\n Suit currentSuit = c.get(0).getSuit();\n \n for(int x = 1 ; x < Hand.HAND_LENGTH ; x++)\n {\n if(c.get(x).getSuit() != currentSuit)\n {\n return false;\n }\n }\n \n return true;\n }", "boolean isSetType();", "public boolean checkChairSubset(ArrayList<Furniture> subset){\n boolean legs = false;\n boolean arms = false;\n boolean seat = false;\n boolean cushion = false;\n\n for(Furniture c : subset){\n if(c instanceof Chair){\n Chair chair = (Chair)c;\n if(chair.getLegs().equals(\"Y\")){\n legs = true;\n }\n if(chair.getArms().equals(\"Y\")){\n arms = true;\n }\n if(chair.getSeat().equals(\"Y\")){\n seat = true;\n }\n if(chair.getCushion().equals(\"Y\")){\n cushion = true;\n }\n }\n }\n // check if any of the chair pieces are missing and if so the combination is invalid\n if(!legs || !arms || !seat || !cushion){\n return false;\n }\n return true;\n }", "public boolean isStandardDeck() {\n Deck jeff = new Deck () ;\n if (this.cards.length == jeff.cards.length) {\n for (int i = 0; i < this.cards.length; i++ ) {\n if (!this.cards[i].equals(jeff.cards[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n }", "public boolean isWool() {\n return this.type == Type.WOOL;\n }", "public boolean isSetWarrantytypes() {\n return this.warrantytypes != null;\n }", "public boolean isSetMediaType()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(MEDIATYPE$18) != null;\n }\n }", "public boolean checkLampSubset(ArrayList<Furniture> subset){\n boolean base = false;\n boolean bulb = false;\n\n for(Furniture l : subset){\n if(l instanceof Lamp){\n Lamp lamp = (Lamp)l;\n if(lamp.getBase().equals(\"Y\")){\n base = true;\n }\n if(lamp.getBulb().equals(\"Y\")){\n bulb = true;\n }\n }\n }\n // check if any of the lamp pieces are missing and if so the combination is invalid\n if(!base || !bulb){\n return false;\n }\n return true;\n }", "private boolean isEncapsulatingBet(BetSlipResponse betSlipResponse) {\n boolean result = betSlipResponse.getTransactions().size() > 0;\n\n for (TransactionResponse transactionResponse : betSlipResponse.getTransactions()) {\n result &= transactionResponse.getTransactionTypeId() == TransactionType.BET.getId();\n }\n\n return result;\n }", "@SuppressWarnings(\"unchecked\")\n \tpublic static boolean isCraftItemStack(final Object obj) {\n \t\treturn getCraftItemStackClass().isAssignableFrom(obj.getClass());\n \t}", "public boolean isNetherWart() {\n return this.type == Type.NETHERWART;\n }", "public static boolean isPlayerHoldingWrench(EntityPlayer player) {\n\t\tif(player.inventory.getCurrentItem() == null) { \n\t\t\treturn false;\n\t\t}\n\t\tItem currentItem = Item.itemsList[player.inventory.getCurrentItem().itemID];\n\t\treturn currentItem instanceof IToolWrench;\n\t}", "private boolean canSmelt()\n {\n ItemStack var1 = FurnaceRecipes.smelting().getSmeltingResult(this.furnaceItemStacks[0]);\n if (var1 == null) return false;\n if (this.furnaceItemStacks[2] == null) return true;\n if (!this.furnaceItemStacks[2].isItemEqual(var1)) return false;\n int result = furnaceItemStacks[2].stackSize + var1.stackSize;\n return (result <= getInventoryStackLimit() && result <= var1.getMaxStackSize());\n }", "Boolean checkEndGame() {\n for (WarPlayer player : players) {\n if (player.getHand().size() == 0)\n return true;\n }\n return false;\n }", "public boolean CheckForUnwinnableCondition(){\n int humanSize = GetSizeOfHumanHand();\n int computerSize = GetSizeOfComputerHand();\n\n for(int i = 0; i < humanSize; i++) {\n //Human can play a card\n String card = handHuman.get(i);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if (topCard.contains(\"8\")) {\n //Can play any card ontop to determine suite\n return true;\n }\n\n if (card.contains(\"8\")) {\n //valid because 8s are wild cards, human can place it\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if (firstLetter.equals(topFirstLetter)) {\n return true;\n }\n\n else {\n if (topFirstLetter.equals(\"c\")) {\n String temp = topCard.substring(5, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"h\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"d\")) {\n String temp = topCard.substring(8, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"s\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n }\n }\n }\n\n for(int i = 0; i < computerSize; i++){\n //Human can play a card\n String card = handComputer.get(i);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if (topCard.contains(\"8\")) {\n //Can play any card ontop to determine suite\n return true;\n }\n\n if (card.contains(\"8\")) {\n //valid because 8s are wild cards, human can place it\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if (firstLetter.equals(topFirstLetter)) {\n return true;\n }\n\n else {\n if (topFirstLetter.equals(\"c\")) {\n String temp = topCard.substring(5, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"h\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"d\")) {\n String temp = topCard.substring(8, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"s\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n }\n }\n }\n\n //Human and computer can't play a card\n return false;\n }", "public boolean checkFilingSubset(ArrayList<Furniture> subset){\n boolean rails = false;\n boolean cabinet = false;\n boolean drawers = false;\n\n for(Furniture f : subset){\n if(f instanceof Filing){\n Filing filing = (Filing)f;\n if(filing.getRails().equals(\"Y\")){\n rails = true;\n }\n if(filing.getCabinet().equals(\"Y\")){\n cabinet = true;\n }\n if(filing.getDrawers().equals(\"Y\")){\n drawers = true;\n }\n }\n }\n // check if any of the filing pieces are missing and if so the combination is invalid\n if(!rails || !cabinet || !drawers){\n return false;\n }\n return true;\n }", "private boolean canSelectCurWorldType() {\n WorldType worldtype = WorldType.WORLD_TYPES[this.selectedIndex];\n if (worldtype != null && worldtype.canBeCreated()) {\n return worldtype == WorldType.DEBUG_ALL_BLOCK_STATES ? hasShiftDown() : true;\n } else {\n return false;\n }\n }", "public boolean isWin_DragonKingOfArms(){\r\n // player got LordSelachii card\r\n /*Player playerHoldCard = null;\r\n for (Player player : discWorld.getPlayer_HASH().values()) {\r\n if (player.getPersonalityCardID() == 5) {\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }*/\r\n int count = 0;\r\n for(TroubleMarker troubleMarker : discWorld.getTroubleMarker_HASH().values()){\r\n if(troubleMarker.getAreaNumber() != ConstantField.DEFAULT_PIECE_AREA_NUMBER){\r\n count++;\r\n }\r\n }\r\n \r\n if(count >= 8){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n \r\n }", "boolean haveMBQuant()\n {\n return ((mbType & QUANT) != 0);\n }", "boolean hasReqardTypeThirty();", "public boolean checkDeskSubset(ArrayList<Furniture> subset){\n boolean legs = false;\n boolean top = false;\n boolean drawer = false;\n\n for(Furniture d : subset){\n if(d instanceof Desk){\n Desk desk = (Desk)d;\n if(desk.getLegs().equals(\"Y\")){\n legs = true;\n }\n if(desk.getTop().equals(\"Y\")){\n top = true;\n }\n if(desk.getDrawer().equals(\"Y\")){\n drawer = true;\n }\n }\n }\n // check if any of the desk pieces are missing and if so the combination is invalid\n if(!legs || !top || !drawer){\n return false;\n }\n return true;\n }", "public boolean isSetType() {\n return this.type != null;\n }", "public boolean isSetType() {\n return this.type != null;\n }", "public boolean isSetType() {\n return this.type != null;\n }", "private boolean wellFormed() {\n\n\n\t\t\tGroup e = this;\n\n\t\t\tint i = 0;\n\t\t\tif(e.first == null && e.last == null && e.size == 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\n\t\t\tCard p = e.first;\n\t\t\tboolean check = false;\n\t\t\tif(e.first != null && e.last != null) {\n\t\t\t\tCard n = null;\n\t\t\t\tif(e.first.prev != null) return report(\"There is a loop\");\n\n\t\t\t\tfor(p = e.first; p.next != null; p = p.next) {\n\n\t\t\t\t\tn = p.next;\n\n\t\t\t\t\tif(n.prev != p) return report(\"p.next is null\");\n\t\t\t\t\tif(this != p.group) {\n\t\t\t\t\t\treturn report(\"this is not set to the group\");\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\n\t\t\t\tif(e.last.next != null) {\n\t\t\t\t\treturn report(\"Size is not equal to the amount of cards\");\n\t\t\t\t}\n\n\t\t\t\tfor(Card c = e.first; c.next != null; c = c.next) {\n\t\t\t\t\t++i;\n\t\t\t\t}\n\t\t\t\tif(i != this.size-1) {\n\t\t\t\t\treturn report(\"Size is not equal to the amount of cards\");\n\t\t\t\t}\n\t\t\t\tcheck = true;\n\t\t\t}\n\t\t\tif(check != true) {\n\t\t\t\tif(i != this.size) {\n\t\t\t\t\treturn report(\"Size is not equal to the amount of cards\");\n\t\t\t\t}\n\t\t\t\tif(e.first == null || e.last == null) {\n\t\t\t\t\treturn report(\"Error\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}", "boolean hasFeedItemSet();", "private boolean isInwardType() {\n\t\tboolean isInward = false;\n\n\t\t//Booking Type\n\t\tif (cbBookingType.getText().equals(INWARD_TYPE))\n\t\t\tisInward = true;\n\n\t\treturn isInward;\n\t}", "public boolean isSetType() {\n return this.type != null;\n }", "public boolean isWin_CommanderVimes(){\r\n // player got LordSelachii card\r\n Player playerHoldCard = null;\r\n for (Player player : discWorld.getPlayer_HASH().values()) {\r\n if (player.getPersonalityCardID() == 7) {\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if(playerHoldCard != null){\r\n if(discWorld.getShuffled_PlayerCard().size() == 0){\r\n return true;\r\n }\r\n } \r\n \r\n return false;\r\n }", "private static boolean m879a(Set<String> set) {\n return set.isEmpty() || (set.size() == 1 && set.contains(\"\"));\n }", "public boolean hasOnlyHearts(){\n\t\t\n\t\tfor(int i=0; i<hand.size(); i++){\n\t\t\tif(hand.get(i).getSuit() != PlayingCard.HEARTS){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "boolean isHandled(Class<?> type);", "public boolean isWin_LordVetinari(){\r\n // player got lordVetinari card\r\n Player playerHoldCard = null;\r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(player.getPersonalityCardID() == 1){\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if (playerHoldCard != null) {\r\n int numPlayers = discWorld.getPlayer_HASH().size();\r\n\r\n Set<Integer> areaList = new HashSet<Integer>();\r\n for (Integer minionID : playerHoldCard.getMinionList()) {\r\n int minion_ID = minionID;\r\n MinionPiece minion = discWorld.getMinionPiece_HASH().get(minion_ID);\r\n if (minion.getAreaNumber() != ConstantField.DEFAULT_UNDEFINED_PLAYID) {\r\n int areaID = minion.getAreaNumber();\r\n Area area = discWorld.getArea_HASH().get(areaID);\r\n // make sure free of demon\r\n if (area.getDemonList().size() == 0) {\r\n areaList.add(minion.getAreaNumber());\r\n }\r\n }\r\n\r\n }\r\n\r\n if (numPlayers == 2) {\r\n\r\n if (areaList.size() >= 11) {\r\n return true;\r\n }\r\n\r\n } else if (numPlayers == 3) {\r\n\r\n if (areaList.size() >= 10) {\r\n return true;\r\n }\r\n\r\n } else if (numPlayers == 4) {\r\n\r\n if (areaList.size() >= 9) {\r\n return true;\r\n }\r\n\r\n }\r\n }\r\n\r\n return false;\r\n }", "private boolean isDiscarded(Object obj) {\n if (obj instanceof Item) {\n return isDiscardedStatus(((Item) obj).getStatus());\n } else if (obj instanceof Container) {\n return isDiscardedStatus(((Container) obj).getStatus());\n } else if (obj instanceof Space) {\n return isDiscardedStatus(((Space) obj).getStatus());\n } else if (obj instanceof MetadataProfile) {\n return isDiscardedStatus(((MetadataProfile) obj).getStatus());\n } else if (obj instanceof Person) {\n return false;\n } else if (obj instanceof Organization) {\n return false;\n }\n return false;\n }", "public boolean whitelist(int meta) throws FrameException {\n if (meta < 0)\n throw new FrameException(BedCraftBeyond.MOD_ID + \".frames.errors.invalid_meta\", id, meta);\n\n if (meta == OreDictionary.WILDCARD_VALUE) {\n reset();\n return true;\n }\n\n if (isWhitelisted(meta))\n throw new FrameException(I18n.translateToLocalFormatted(BedCraftBeyond.MOD_ID + \".frames.errors.already_added_meta\", id, meta, \"\"));\n\n return whitelist(Range.closed(meta, meta));\n }", "private boolean checkUnreachedClassesForContainersAndSubclasses() {\n Iterator<EClass> iterator = unreachedClasses.iterator();\n while (iterator.hasNext()) {\n EClass eClass = iterator.next();\n\n if (grabIncomingContainments && addIfContainer(eClass) || grabSubClasses && addIfContainedSubClass(eClass)) {\n iterator.remove();\n return true;\n }\n }\n return false;\n }", "public boolean isThreeOfAKind() {\n\t\treturn this.sameSet.size() == 1;\n\t}", "public boolean isWood() {\n return this.type == Type.WOOD;\n }", "private static boolean isRevealed(Element td) {\n Set<String> classList = td.getClassList();\n return classList.contains(CLASS_MINE)\n || classList.contains(CLASS_EMPTY);\n }", "public boolean isCard() {\n\t\treturn id > 0 && id < 53;\n\t}", "private static boolean isValidWrite(Class myClass) {\n if(myClass == null){\n L.m(\"Class used to write to the DB was null, please check passed params\");\n return false;\n }\n String className = myClass.getName();\n String masterDBObjectName = MasterDatabaseObject.class.getName();\n if(!StringUtilities.isNullOrEmpty(className) &&\n !StringUtilities.isNullOrEmpty(masterDBObjectName)) {\n if (masterDBObjectName.equalsIgnoreCase(className)) {\n L.m(\"You cannot modify this table from that method. If you want to access the \" +\n \"MasterDatabaseObject table, please use the persistObject / dePersistObject /\" +\n \" getPersistedObject / getAllPersistedObjects method calls.\");\n return false;\n }\n }\n if(myClass == RealmObject.class) {\n return true;\n }\n return myClass.isAssignableFrom(RealmObject.class);\n\n }", "public boolean isSetType() {\n return (this.type != null ? this.type.isSetValue() : false);\n }", "public CardSet getCardSet() {\n return cardSet;\n }", "public boolean isSetTypes() {\n return this.types != null;\n }", "public boolean isValid(LivingEntity casterIn, IMagicEffect spellIn)\r\n\t\t{\r\n\t\t\tif(casterIn == null) return true;\r\n\t\t\tswitch(this)\r\n\t\t\t{\r\n\t\t\t\tcase FOCUS:\r\n\t\t\t\t\tif(casterIn instanceof PlayerEntity && ((PlayerEntity)casterIn).isCreative()) return true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tboolean focusFound = false;\r\n\t\t\t\t\tfor(Hand hand : Hand.values())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tItemStack heldItem = casterIn.getHeldItem(hand);\r\n\t\t\t\t\t\tif(spellIn.itemMatchesFocus(heldItem))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tfocusFound = true;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!focusFound && casterIn instanceof PlayerEntity)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tPlayerEntity player = (PlayerEntity)casterIn;\r\n\t\t\t\t\t\tfor(int slot=0; slot<9; slot++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tItemStack heldItem = player.inventory.getStackInSlot(slot);\r\n\t\t\t\t\t\t\tif(spellIn.itemMatchesFocus(heldItem))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tfocusFound = true;\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\t\r\n\t\t\t\t\treturn focusFound;\r\n\t\t\t\tcase MATERIAL:\r\n\t\t\t\t\tif(casterIn instanceof PlayerEntity && ((PlayerEntity)casterIn).isCreative()) ;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tPlayerEntity player = casterIn instanceof PlayerEntity ? (PlayerEntity)casterIn : null;\r\n\t\t\t\t\t\tfor(ItemStack material : spellIn.getMaterialComponents())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint count = material.getCount();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Check player inventory\r\n\t\t\t\t\t\t\tif(player != null)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tfor(int slot=0; slot<player.inventory.getSizeInventory(); slot++)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tItemStack heldItem = player.inventory.getStackInSlot(slot);\r\n\t\t\t\t\t\t\t\t\tif(heldItem.isEmpty()) continue;\r\n\t\t\t\t\t\t\t\t\tif(isMatchingItem(heldItem, material)) count -= Math.min(count, heldItem.getCount());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t// Check held items\r\n\t\t\t\t\t\t\t\tfor(Hand hand : Hand.values())\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tItemStack heldItem = casterIn.getHeldItem(hand);\r\n\t\t\t\t\t\t\t\t\tif(heldItem.isEmpty()) continue;\r\n\t\t\t\t\t\t\t\t\tif(isMatchingItem(heldItem, material)) count -= Math.min(count, heldItem.getCount());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Check armour slots\r\n\t\t\t\t\t\t\t\tfor(EquipmentSlotType hand : EquipmentSlotType.values())\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tItemStack heldItem = casterIn.getItemStackFromSlot(hand);\r\n\t\t\t\t\t\t\t\t\tif(heldItem.isEmpty()) continue;\r\n\t\t\t\t\t\t\t\t\tif(isMatchingItem(heldItem, material)) count -= Math.min(count, heldItem.getCount());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(count > 0) return false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\tcase SOMATIC:\r\n\t\t\t\t\treturn !VOPotions.isParalysed(casterIn);\r\n\t\t\t\tcase VERBAL:\r\n\t\t\t\t\treturn !VOPotions.isSilenced(casterIn);\r\n\t\t\t\tdefault: return true;\r\n\t\t\t}\r\n\t\t}", "private boolean hasShadowedCompulationUnit(ICompilationUnit unit, String swcPath)\n {\n List<IDefinition> definitionPromises = unit.getDefinitionPromises(); \n if (definitionPromises == null || definitionPromises.size() == 0)\n return false;\n\n ASProjectScope scope = getScope();\n Set<IDefinition> toDefs = scope.getShadowedDefinitions(definitionPromises.get(0));\n if (toDefs != null)\n {\n for (IDefinition def : toDefs)\n {\n ICompilationUnit shadowedUnit = scope.getCompilationUnitForDefinition(def);\n \n // Test if a shadowed unit is in the same swc.\n if (swcPath.equals(shadowedUnit.getAbsoluteFilename()))\n {\n return true;\n }\n }\n }\n \n return false;\n }", "@Override\n\tpublic boolean checkTypes() {\n\t\treturn false;\n\t}", "public boolean isFilterOn() {\r\n\t\treturn !packageTypeSet.isEmpty();\r\n\t}", "private boolean validInput(Player player, int choice) {\n if (0 <= choice && choice < player.getCards().size()) {\n if(state.getWildDrawPenalty() != 1 && player.getCards().get(choice) instanceof WildDrawCard) {\n return true;\n }\n if( state.getWildDrawPenalty() != 1 && !(player.getCards().get(choice) instanceof WildDrawCard)) {\n System.out.println(\"You should put WildDraw card.\");\n return false;\n }\n if( player.getCards().get(choice) instanceof WildDrawCard){\n boolean validWildDraw = true;\n for (Card temp: player.getCards()) {\n if(temp.isValidCard(currentCard)) {\n validWildDraw = false;\n }\n }\n if (validWildDraw) {\n return true;\n }\n else {\n System.out.println(\"You can't put WildDraw card.\");\n return false;\n }\n }\n if(state.getDrawPenalty() != 1 && player.getCards().get(choice) instanceof Draw2Card) {\n return true;\n }\n if (state.getDrawPenalty() != 1 && !(player.getCards().get(choice) instanceof Draw2Card)) {\n System.out.println(\"You should put Draw2 card.\");\n return false;\n }\n if ( player.getCards().get(choice).isValidCard(currentCard)) {\n return true;\n }\n System.out.println(\"Enter valid card.\");\n return false;\n }\n System.out.println(\"Enter a number between 1-\" + player.getCards().size() );\n return false;\n }", "public boolean checkNaturals() {\n return getSize() == 2 && handValue() == 21;\n }", "public boolean isFlush(){\n \r\n if(haveSameSuit(cards)){\r\n handValue = cards.get(cards.size()-1).getValue();\r\n return true;\r\n }\r\n \r\n return false;\r\n }", "public boolean isWildcardClass()\r\n\t{\treturn this.wildcard;\t}", "public boolean isSetBuycardate() {\n return this.buycardate != null;\n }", "@SuppressWarnings(\"unchecked\")\n \tpublic static boolean isItemStack(final Object value) {\n \t\treturn getItemStackClass().isAssignableFrom(value.getClass());\n \t}", "protected boolean isInMultiWinWhiteList(String packageName) {\n if (packageName == null || sMultiWinWhiteListPkgNames.size() == 0 || !sMultiWinWhiteListPkgNames.contains(packageName.toLowerCase())) {\n return false;\n }\n return true;\n }", "public boolean isWin_LordDeWorde(){\r\n // player got LordSelachii card\r\n Player playerHoldCard = null;\r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(player.getPersonalityCardID() == 4){\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if(playerHoldCard != null){\r\n int numPlayers = discWorld.getPlayer_HASH().size();\r\n \r\n int numCityAreaCard = 0;\r\n \r\n for(Integer areaID : playerHoldCard.getCityAreaCardList()){\r\n Area area = discWorld.getArea_HASH().get(areaID);\r\n if(area.getDemonList().size() == 0){\r\n numCityAreaCard++;\r\n }\r\n }\r\n \r\n if (numPlayers == 2) {\r\n if(numCityAreaCard >= 7){\r\n return true;\r\n }\r\n } else if (numPlayers == 3) {\r\n if(numCityAreaCard >= 5){\r\n return true;\r\n }\r\n } else if (numPlayers == 4) {\r\n if(numCityAreaCard >= 4){\r\n return true;\r\n }\r\n }\r\n }\r\n \r\n return false;\r\n }", "default boolean canFit(ItemStack stack) {\n return !InvTools.isEmpty(stack) && stream().anyMatch(inv -> {\n InventoryManipulator im = InventoryManipulator.get(inv);\n return im.canAddStack(stack);\n });\n }", "public boolean hasStraightFlush(Hand handToCheck){\n\t\tHand hand = new FiveCardHand(handToCheck); //Make copy of the object so original doesn't get modified\n\t\tlog.debug(\"hasStraightFlush(hand = \"+hand+\")\");\n\t\tif(getStraightFlush(hand)==null){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "boolean isSetDSTSavings();", "private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}", "private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}", "private void checkBattleTypes(boolean entityLeft) {\n if (localBattle == null && entityLeft && (localBattle.getSideA().isEmpty() || localBattle.getSideB().isEmpty())) {\n return;\n }\n\n float percentage = 0.0f;\n if (sillyMusicCount == 0 && battleMusicCount == 0) {\n percentage = 0.0f;\n } else if (battleMusicCount == 0) {\n percentage = 100.0f;\n } else {\n percentage = 100.0f * (float) sillyMusicCount / (float) (sillyMusicCount + battleMusicCount);\n }\n\n if (percentage >= (float) getConfig().getSillyMusicThreshold()) {\n if (battleMusic.isPlaying()) {\n if (!battleMusic.isPlayingSilly() && battleMusic.hasSillyMusic()) {\n stopMusic(false);\n playSillyMusic();\n }\n } else if (battleMusic.hasSillyMusic()) {\n playSillyMusic();\n }\n } else {\n if (battleMusic.isPlaying()) {\n if (battleMusic.isPlayingSilly() && battleMusic.hasBattleMusic()) {\n stopMusic(false);\n playBattleMusic();\n }\n } else if (battleMusic.hasBattleMusic()) {\n playBattleMusic();\n }\n }\n }", "private boolean hasFilterClass(Set<OWLClassAxiom> axioms, Set<OWLClass> rootTerms) {\n if (axioms != null && !axioms.isEmpty()) {\n for (OWLClassAxiom ax : axioms) {\n if (ax instanceof OWLEquivalentClassesAxiom) {\n Set<OWLClass> signature = ax.getClassesInSignature();\n for (OWLClass sigCls : signature) {\n NodeSet<OWLClass> superClasses = reasoner.getSuperClasses(sigCls, false);\n for(OWLClass root : rootTerms) {\n if (superClasses.containsEntity(root)) {\n return true;\n }\n }\n }\n }\n }\n }\n return false;\n }", "public boolean isChest() {\n return this.type == Type.CHEST;\n }", "@Override\r\n public boolean isClef ()\r\n {\r\n return ShapeSet.Clefs.contains(getShape());\r\n }", "protected boolean excludeCardFromMixing(Card card) {\n Stack stack = card.getStack();\n\n if (!card.isUp()) {\n return false;\n }\n\n if (foundationStacksContain(stack.getId()) || stack == getDiscardStack()) {\n return true;\n }\n\n return stack.getId() < 24 && !stack.isEmpty() && validOrder(stack);\n }", "boolean haveSuit(char suit){\n for (int i=0; i<6; i++)\n if (hand.get(i).suit != suit)\n return false;\n return true;\n }", "public boolean canTradeResourcesToBank(ResourceType resourceType) {\n\t\tint neededAmount = getTradeRate(resourceType);\n\t\tint amountOwned = getNumberResourcesOfType(resourceType);\n\t\t// check if we have enough to trade \n\t\tif(neededAmount < amountOwned) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private static boolean m23477b(Set<String> set, boolean z, boolean z2, boolean z3, boolean z4) {\n C4208a aVar = f19236a;\n if (z != aVar.f19238c || z2 != aVar.f19239d || z3 != aVar.f19240e || z4 != aVar.f19241f) {\n return false;\n }\n if (set == null || set.size() == 0) {\n return true;\n }\n return false;\n }", "private boolean validStraight() {\n Collections.sort(this.cards, Card.COMPARE_BY_VALUE);\n ArrayList<String> validHand = new ArrayList<>();\n boolean isStraight = false;\n for (int i = 0; i < this.cards.size(); i++) {\n //Check 5 cards from i to i + 5\n int j = i;\n validHand.add(this.cards.get(i).toString());\n while(j < i + 4 && j < this.cards.size() - 1) {\n Card c1 = this.cards.get(j);\n Card c2 = this.cards.get(j + 1);\n if(c1.isConsecutive(c2))\n validHand.add(c2.toString());\n j++;\n }\n if(j == i + 4 && validHand.size() == 5) {\n this.cardHand = new CardHand(validHand.toArray(new String[0]));\n isStraight = true;\n }\n validHand.clear();\n }\n return isStraight;\n }", "private boolean hasFilterClass(OWLEquivalentClassesAxiom axiom, Set<OWLClass> rootTerms) {\n if (axiom != null) {\n Set<OWLClass> signature = axiom.getClassesInSignature();\n for (OWLClass sigCls : signature) {\n NodeSet<OWLClass> superClasses = reasoner.getSuperClasses(sigCls, false);\n for(OWLClass root : rootTerms) {\n if (superClasses.containsEntity(root)) {\n return true;\n }\n }\n }\n }\n return false;\n }", "public boolean hasFlush(Hand handToCheck){\n\t\tHand hand = new FiveCardHand(handToCheck); //Make copy of the object so original doesn't get modified\n\t\tlog.debug(\"hasFlush(hand = \"+hand+\")\");\n\t\tif(hand == null){\n\t\t\tlog.debug(\"Hand was null. Returning false\");\n\t\t\treturn false;\n\t\t}\n\t\tArrayList<Card> cards = hand.getCards();\n\t\tif(cards == null){\n\t\t\tlog.debug(\"The ArrayList<Card> inside the Hand Object was NULL. Returning false\");\n\t\t\treturn false;\n\t\t}\n\t\tlog.trace(\"Number of cards in Hand: \"+cards.size());\n\t\t\n\t\tList<CardSuit> sorted = CollectionHelper.asSortedList(hand.getSuitValues());\n\t\t\n\t\tint highestNumberInARowThusFar=0;\n\t\tint suitsInARow=0;\n\t\tif(sorted.size()>1){\n\t\t\tsuitsInARow=1;\n\t\t\tfor(int i=1; i<sorted.size();i++){\n\t\t\t\tif(sorted.get(i-1).equals(sorted.get(i))){\n\t\t\t\t\tsuitsInARow++;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(suitsInARow > highestNumberInARowThusFar){\n\t\t\t\t\t\thighestNumberInARowThusFar = suitsInARow;\n\t\t\t\t\t}\n\t\t\t\t\tsuitsInARow = 1;\n\t\t\t\t}\t\n\t\t\t}\n\t\t\tif(suitsInARow > highestNumberInARowThusFar){\n\t\t\t\thighestNumberInARowThusFar = suitsInARow;\n\t\t\t}\n\t\t}\n\t\tlog.debug(\"Max number of suits found in a row = \"+highestNumberInARowThusFar);\n\t\tif(highestNumberInARowThusFar>4){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isEmpty() {\r\n\t\treturn allCardsAreNull(set1) && allCardsAreNull(set2a)\r\n\t\t\t\t&& allCardsAreNull(set2b) && allCardsAreNull(set3a)\r\n\t\t\t\t&& allCardsAreNull(set3b);\r\n\t}", "protected boolean isValidDeck(List<Card> deck) {\n if (deck.size() != 52) { // Deck must be 52 cards\n return false;\n }\n\n Set<Card> cards = new HashSet<Card>();\n cards.addAll(deck);\n return (cards.size() == 52);\n\n }", "private boolean hasOnlyStandardUnit() {\n for (int i = 0; i < _elements.length; i++) {\n Unit<?> u = _elements[i]._unit;\n if (!u.isSI())\n return false;\n }\n return true;\n }", "public boolean canSmelt() {\n\t\tif (this.slots[0] == null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(\n\t\t\t\t\tthis.slots[0]);\n\n\t\t\tif (itemstack == null)\n\t\t\t\treturn false;\n\t\t\tif (this.slots[1] == null)\n\t\t\t\treturn true;\n\t\t\tif (!this.slots[1].isItemEqual(itemstack))\n\t\t\t\treturn false;\n\n\t\t\tint result = slots[1].stackSize + itemstack.stackSize;\n\n\t\t\treturn result <= getInventoryStackLimit()\n\t\t\t\t\t&& result <= itemstack.getMaxStackSize();\n\t\t}\n\t}", "private boolean isFlush(ArrayList<Card> hand) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn false;\r\n\t}", "boolean precondition(Skill castSkill, Creature performer, Item target) {\n/* 53 */ if (!target.isMailBox() && !target.isSpringFilled() && !target.isUnenchantedTurret() && \n/* 54 */ !target.isPuppet() && !target.isEnchantedTurret()) {\n/* */ \n/* 56 */ performer.getCommunicator().sendNormalServerMessage(\"The spell will not work on that.\", (byte)3);\n/* 57 */ return false;\n/* */ } \n/* */ \n/* */ \n/* 61 */ SpellEffect negatingEffect = EnchantUtil.hasNegatingEffect(target, getEnchantment());\n/* 62 */ if (negatingEffect != null) {\n/* 63 */ EnchantUtil.sendNegatingEffectMessage(getName(), performer, target, negatingEffect);\n/* 64 */ return false;\n/* */ } \n/* 66 */ return true;\n/* */ }", "private boolean hasAnyWeatherType(Thing thing, List<WeatherType> weatherTypes) {\n if (weatherTypes == null || weatherTypes.size() == 0) {\n return true;\n }\n\n for (String type : thing.getWeatherType()) {\n for (WeatherType weatherType : weatherTypes) {\n if (weatherType.getType().equals(type)) {\n return true;\n }\n }\n }\n return false;\n }", "private boolean roomShouldHaveMonsters() {\n return contents.contains(roomContents.MONSTERS)\n || contents.contains(roomContents.EXPLORATION)\n || contents.contains(roomContents.KEY)\n || contents.contains(roomContents.FINAL_KEY);\n }", "@Test\n public void testCardCanPlay_WILD() {\n System.out.println(\"cardCanPlay WILD\");\n UnoCard cardSelection = new UnoCard(UnoCardColour.WILD, UnoCardValue.ONE);\n UnoCard drawCard = new UnoCard(UnoCardColour.BLUE, UnoCardValue.THREE);\n UnoCardColour wildColour = UnoCardColour.BLUE;\n boolean result = utils.cardCanPlay(cardSelection, drawCard, wildColour);\n assertEquals(true, result);\n }" ]
[ "0.6068295", "0.5909743", "0.5641645", "0.562508", "0.54495704", "0.54493314", "0.54067004", "0.53965354", "0.5309819", "0.5257763", "0.5227668", "0.5207149", "0.51294297", "0.50687927", "0.50532335", "0.5002498", "0.49765694", "0.4949537", "0.49318635", "0.49216282", "0.4905716", "0.4902111", "0.48909485", "0.48878974", "0.4882633", "0.48799688", "0.48741257", "0.48728037", "0.48624265", "0.48495615", "0.48443133", "0.48323357", "0.4825064", "0.48050836", "0.47982493", "0.4797998", "0.47834873", "0.47623375", "0.4762325", "0.47575894", "0.4754966", "0.4754966", "0.4754966", "0.47356224", "0.47274223", "0.47049403", "0.46996826", "0.46976945", "0.46976656", "0.46967146", "0.4683199", "0.4681813", "0.46669582", "0.46663323", "0.4664209", "0.46591923", "0.46422723", "0.46360177", "0.46349502", "0.46341148", "0.46307415", "0.462716", "0.46168503", "0.4616181", "0.46094963", "0.4604013", "0.4603572", "0.4602222", "0.46007046", "0.45991057", "0.45966774", "0.45914102", "0.45788437", "0.45773253", "0.457437", "0.4573426", "0.45731768", "0.45678464", "0.454201", "0.454201", "0.4536682", "0.45364833", "0.4530792", "0.45304662", "0.45278248", "0.45270512", "0.45238128", "0.45208752", "0.45123747", "0.4508194", "0.4507851", "0.4505923", "0.45056978", "0.45026636", "0.45015332", "0.44997725", "0.4499241", "0.4497907", "0.44975826", "0.44961882" ]
0.7671464
0
Checks if is valid count wild card.
public Boolean isValidCountWildCard() { int count = 0; for (RiskCardModel card : lstTradedCards) { if (card.card_type.equals("WILD")) { count++; } } return (count > 1 ? false : true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean testWildcard(char c)\n {\n if(!acceptWildCards)\n return false;\n if(c != '.')\n return false;\n char ch2 = charAhead(1);\n if(ch2 == '?' || ch2 == '+' || ch2 == '*')\n ptr += 2; // ptr is on occ indicator\n else if(ch2 == '{') {\n int cp = ptr + 1;\n for(; cp < txtLength && txt[cp] != '}'; )\n ++ cp;\n// if(cp < txtLength)\n// ++ cp;\n if(cp >= txtLength || txt[cp] != '}') {\n ptr = cp;\n throw new PatternSyntaxException(\"missing closing '}'\",\n new String(txt), txtLength);\n }\n if(rangePattern == null)\n // \n rangePattern = new RegexMatchPattern(Pattern.compile(\"\\\\d+,\\\\d+?\"));\n String rex = new String(txt, ptr + 2, cp - ptr - 2);\n if (!rangePattern.matches(rex))\n throw new PatternSyntaxException(\"invalid wildcard repeat range\",\n rex, 0);\n ptr = cp;\n }\n else ++ptr;\n gotWildCard = true;\n return true;\n }", "private boolean isContainsCountBrackets(String withoutExtension){\n if (withoutExtension.contains(\"(\") && withoutExtension.contains(\")\")){\n int openBracket = withoutExtension.lastIndexOf(\"(\");\n int closeBracket = withoutExtension.lastIndexOf(\")\");\n if (closeBracket==withoutExtension.length()-1 && openBracket<closeBracket){\n try{\n Integer.parseInt(withoutExtension.substring(openBracket+1, closeBracket));\n return true;\n } catch (NumberFormatException ex){\n return false;\n }\n }\n }\n return false;\n }", "public int countIn(CharSequence sequence, CountMethod countMethod, UnicodeSet.SpanCondition spanCondition) {\n/* 115 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n\tpublic long countAnyMatching(Optional<String> filter) {\n\t\treturn 0;\n\t}", "int getResourcePatternsCount();", "static int getNumPatterns() { return 64; }", "private static int getValidSampleCount(String in){\n try{\n int n = Integer.parseInt(in);\n if(n <= 0 ){\n System.out.println(\"Invalid input. Please enter a positive number.\");\n String s = sc.nextLine();\n return getValidSampleCount(s);\n } else {\n return n;\n }\n } catch (Exception err){\n System.out.println(\"Invalid input. Please enter a positive number.\");\n String s = sc.nextLine();\n return getValidSampleCount(s);\n }\n }", "@Override\n protected Integer count() {\n Matcher matcher = UPPER.matcher(this.password);\n Integer score = 0;\n\n while (matcher.find()) {\n score++;\n }\n\n return score;\n }", "private int countLength ( StringBuffer sequence )\n{\n int bases = 0;\n\n // Count up the non-gap base characters.\n for ( int i = 0; i < sequence.length (); i++ )\n\n if ( sequence.charAt ( i ) != '*' ) bases++;\n\n return bases;\n}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString scStr;\n\t\twhile (true) {\n\t\t\tSystem.out.println(\"Please input the n: \");\n\t\t\tscStr = sc.next();\n\t\t\tif (validate(scStr))\n\t\t\t\tSystem.out.println(\"The count is: \\n\" + count(Integer.parseInt(scStr)));\n\t\t}\n\t}", "default long count() {\n\t\treturn select(Wildcard.count).fetchCount();\n\t}", "private static final boolean isNumeric(final char formatChar, final int count) {\n\t\tint i = NUMERIC_FORMAT_CHARS.indexOf(formatChar);\n\t\treturn (i > 0 || (i == 0 && count < 3));\n\t}", "boolean testCountAndSay(Tester t) {\n\t\treturn\n\t\tt.checkExpect(s.countAndSay(1), \"1\") &&\n\t\tt.checkExpect(s.countAndSay(3), \"21\") &&\n\t\tt.checkExpect(s.countAndSay(4), \"1211\");\n\t}", "public int count() {\n return count(\"\");\n }", "public static long count (List<String> lst, String pattern) {\n\t\t\n\t\tlong cpt = 0;\n\t\tfor(String st : lst) {\n\t\t\tif(st.equals(pattern)) {\n\t\t\t//if(st.contains(pattern)) {\n\t\t\t\tcpt++;\n\t\t\t}\n\t\t}\n\t\treturn cpt;\n\t\n\t}", "public int _count() {\n return _count(\"\");\n }", "boolean hasCount();", "public void checkRule() {\n if (s.matches(\"^\\\\d+$\"))\n System.out.println(\"I see a number. Rule 2 \");\n }", "public int countIn(CharSequence sequence, CountMethod countMethod) {\n/* 99 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void countNumberOfCharactersInWords() {\n final long count = 0; //TODO\n\n assertEquals(105, count);\n }", "@Override\r\n public boolean isValidParameterCount(int parameterCount) {\n return parameterCount> 0;\r\n }", "public int countIn(CharSequence sequence) {\n/* 87 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public int countPossibleColor(String res) {\n int count = 0;\n for (String c : res.split(\"\")) {\n if (c.equals(\"*\") || c.equals(\"+\")) { count++; }\n }\n return count;\n }", "private int searchCountByName(Object name) {\n\t\treturn 0;\r\n\t}", "public static boolean verifyNumberOfUsers(String s) {\n\n\t\tInteger i = Integer.parseInt(s);\n\t\tif (i >= 2) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "@Test\n public void charCount() {\n final int expectedEight = 8;\n final int expectedFour = 4;\n\n CharCount charCounter = new CharCount();\n assertEquals(expectedEight, charCounter.characterCounter(\"fizzbuzz FIZZBUZZ\", 'z'));\n assertEquals(expectedEight, charCounter.characterCounter(\"fizzbuzz FIZZBUZZ\", 'Z'));\n assertEquals(expectedFour, charCounter.characterCounter(\"FIZZBUZZ\", 'z'));\n assertEquals(0, charCounter.characterCounter(\"TEdff fdjfj 223\", '1'));\n assertEquals(expectedFour, charCounter.characterCounter(\"TE00df0f f0djfj 223\", '0'));\n assertEquals(0, charCounter.characterCounter(\"RRuyt 111000AAdda\", (char) 0));\n }", "@Then(\"^validate for the count of channels$\")\r\n\tpublic void validate_for_the_count_of_channels() throws Throwable \r\n\t{\n\t Assert.assertNotNull(publishers.getNumOfChannels());\r\n\t\t\r\n\t}", "private void verifySpecimensPresent(int aaa07Count, int controlCount, int baq00051Count)\r\n {\n assertTextPresent(\"AAA07\", aaa07Count * 2);\r\n assertTextPresent(\"AssayTestControl\", controlCount * 2);\r\n assertTextPresent(\"BAQ00051\", baq00051Count * 2);\r\n }", "public boolean checkInvalid2(String x) {\n for (int i = 0; i < x.length(); i++) {\n if (consonants.contains(String.valueOf(x.charAt(i)))) {\n count++;\n }\n }\n return count == x.length();\n\n }", "public static long count2(List<String> lst, String pattern) {\n\n\t\t return lst.stream()\n\t\t\t\t \n\t\t.filter(x -> x.equals(pattern))\n\t\t.count();\n\t\t\n\t}", "int findCount();", "private boolean checkSoThang(String soThang){\n String pattern = \"\\\\d+\"; \n return soThang.matches(pattern);\n }", "boolean isCounting();", "public abstract boolean isValid(DMYcount DMYcount);", "long count(String query);", "long count(String query);", "public int getCount() {\r\n\t\tif(!isValid)\r\n\t\t\treturn -1;\r\n\t\treturn count;\r\n\t}", "public static void validateFilteredCount(Response response, String filterName) throws JSONException {\n\t\tJSONObject JSONResponseBody = RestAssuredUtil.getJsonResponseBody(response);\n\n\t\t//Verify the source. In this case, it will always be Twitter but should be checked dynamically\n\t\tAssert.assertEquals(RestAssuredUtil.getSource(JSONResponseBody), Constants.FEED_SOURCE, \"Feed Source is Twitter\");\n\t\t\n\t\t//Posts count for any feed other than Twitter must be 0\n\t\tif (filterName.toLowerCase().contains(\"twitter\") || filterName.equalsIgnoreCase(\"\"))\n\t\t\tAssert.assertEquals(RestAssuredUtil.getItemsLength(JSONResponseBody) == 0, true,\n\t\t\t\t\t\"Number of posts for any feed other than twitter is 0\");\n\t\telse\n\t\t\tAssert.assertEquals(RestAssuredUtil.getItemsLength(JSONResponseBody) >= 0, true,\n\t\t\t\t\t\"Number of posts for twitter feed should be >= 0\");\n\t\t\n\t}", "private boolean tryCounterExample(BDD reachableStates){\n\t\tBDD counterExample = reachableStates.andWith(buildEndGame());\n\t\t\n\t\treturn counterExample.satCount(this.dimension * this.dimension - 1) == 0 ? true : false;\n\t}", "public boolean getCount(String type){\n if(type.equals(\"Zombie\") && zombieCounter!=0){\n return true;\n } else return type.equals(\"Sandwich\") && sandwichCounter != 0;\n }", "private String getCount(String count) {\n\t\tif (count == null || count.equals(\"0\")) {\n\t\t\tcount = SCROLL_SIZE_25;\n\t\t}\n\t\treturn count;\n\t}", "private boolean containsWildcard(final String min) {\n return min.contains(\"*\")\r\n || min.contains(\"+\")\r\n || min.contains(\"%\")\r\n || min.contains(\"_\");\r\n }", "public void checkFile(Character c) {\n\t\tSystem.out.println(\"Enter path: \");\n\t\ttry (Scanner input = new Scanner(System.in);\n\t\t\t\tFileReader fReader = new FileReader(input.nextLine());\n\t\t\t\tBufferedReader bReader = new BufferedReader(fReader)) {\n\t\t\tint readData;\n\t\t\tInteger count = 0;\n\t\t\tdo {\n\t\t\t\treadData = bReader.read();\n\t\t\t\tif (c == (char) readData)\n\t\t\t\t\tcount++;\n\t\t\t} while (readData != -1);\n\t\t\tSystem.out.println(\"Count \" + count + \" usages of \" + c + \" in file\");\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File not found\");\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "Boolean checkLength(String detail);", "@Override\n public boolean validateNotEmptyPartial (String partial)\n {\n return partial.replaceAll(\"[^/]\", \"\").length() < 3 && partial.replaceAll(\"[^0-9]\", \"\").length() < 9 &&\n partial.replaceAll(\"[0-9/]\", \"\").length() == 0;\n }", "@Override\n public int count(String txt) throws Exception {\n Connection con = null;\n ResultSet rs = null;\n PreparedStatement ps = null;\n // check connection of db if cannot connect, it will throw an object of Exception\n try {\n String query = \"select count(*) from digital \\n\"\n + \"where title like ?\";\n con = getConnection();\n ps = con.prepareStatement(query);\n ps.setString(1, \"%\" + txt + \"%\");\n rs = ps.executeQuery();\n int count = 0;\n while (rs.next()) {\n count = rs.getInt(1);\n }\n return count;\n } catch (Exception e) {\n throw e;\n } finally {\n // close ResultSet, PrepareStatement, Connection\n closeResultSet(rs);\n closePrepareStateMent(ps);\n closeConnection(con);\n }\n }", "private static int characterCount(String expr, Character c) {\n\t\tint count = 0;\n\t\tfor(Character ch : expr.toCharArray()) if(ch == c) count ++;\n\t\treturn count;\n\t}", "public int count(T instance, M matchCondition);", "private static boolean checkZero(int[] count) {\n\t\tfor (int i = 0; i < count.length; i++) {\n\t\t\tif (count[i] != 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private boolean haveMBPattern()\n {\n return ((mbType & PATTERN) !=0 );\n }", "public static void main(String[] args)\n{\n\tString str=\"like like rcb\";\n String[] Spl = str.split(\" \");\n\tint count=0;\n\tfor(int i=0;i<Spl.length;i++)\n\t{\n\t\tif(Spl[i].equals(\"like\"))\n\t\t{\n\t\tcount++;\n\t\t}\n\t}\n\tSystem.out.println(\"number of like present in given String are \"+count);\n}", "protected boolean isValidPattern(String pattern) {\n \t\t\tfor (int i= 0; i < pattern.length(); i++) {\n \t\t\t\tchar ch= pattern.charAt(i);\n \t\t\t\tif (!(ch == 9 || ch == 10 || ch == 13 || ch >= 32))\n \t\t\t\t\treturn false;\n \t\t\t}\n \t\t\treturn true;\n \t\t}", "private int getCount(String token, String content) {\n int index = 0;\n int count = 0;\n// String[] parts = token.split(\"\\\\s+\");\n// int size = parts.length;\n boolean hasPreview = false;\n while ((index = content.indexOf(token, index)) != -1) {\n if (!hasPreview) {\n int end = Math.min(content.length(), index + 200);\n while (end < content.length() && content.charAt(end) != ' ') {\n end++;\n }\n preview = content.substring(index, end);\n hasPreview = true;\n }\n count++;\n index += token.length();\n }\n return count;\n }", "int getDataScansCount();", "@Override\n\tpublic int countByName(String name) {\n\t\treturn 0;\n\t}", "private boolean validateHeaderCount(FileType type) {\r\n\t\tint count = 0;\r\n\t\tint col = 0;\r\n\t\tif(type == FileType.UNCAPTURED_AUTH) {\r\n\t\t\tcol = 1;\r\n\t\t}\r\n\t\tif(type == FileType.CAPTURED) {\r\n\t\t\tcol = 2;\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < ColumnData.getTableData().getRowCount(); i++) {\r\n\t\t\tif(ColumnData.getTableData().getValueAt(i, col) != null) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(count >= 3) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public XPath getCount()\n {\n return m_countMatchPattern;\n }", "public static int count(String s, char c) {\n // regex with negated char = removal of all but the char\n return s.replaceAll(\"[^\\\\Q\" + c + \"\\\\E]\", \"\").length();\n }", "public static boolean CountClause(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"CountClause\")) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, COUNT_CLAUSE, \"<count clause>\");\n r = consumeTokens(b, 1, K_COUNT, DOLLAR_SIGN);\n p = r; // pin = 1\n r = r && VarName(b, l + 1);\n exit_section_(b, l, m, r, p, FLWORExprRecover_parser_);\n return r || p;\n }", "public static boolean test (String s){\n\t\t// This pattern tests whether string s contains 3 numbers.\n\t Pattern pattern = Pattern.compile(\"\\\\d{3}\");\n\t Matcher matcher = pattern.matcher(s);\n\t if (matcher.find()){\n\t return true; \n\t } \n\t return false; \n\t }", "@Test\n public void findWithMaskIncorrectRegularExpression() throws Exception {\n List<File> fileList = fileFinder.find(path, \"?.txt\", fileFinder.getFILES());\n System.out.println(fileList.size());\n int sero = fileList.size();\n assertThat(sero == (fileList.size()), is(true));\n\n }", "public int countAbc(String str) {\n//Solution to problem coming soon\n}", "public int strCount(String str, String sub) {\n//Solution to problem coming soon\n}", "@Test\n\tpublic void test61() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//bug 10\n\t\tfor(int i =0;i<200;i++) {\n\t\t\tboolean dummy = RegExpMatcher.matches(String.valueOf(i), \"([0-9])+\");\n\t\t\tif(!dummy) {\n\t\t\t\t//System.err.print(i);\n \t\t\t\tassertTrue(dummy);\t\n\t\t\t\t}\n\t\t\telse {\n\t\t\t\t//System.out.println(\"no bug on index \"+i);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//System.out.println(\"hello\");\n\t\t//assertTrue(RegExpMatcher.matches(\"\", \"([0-9])+\"));\n\t}", "@Test\r\n void not_matches() {\n assertMatcherFalse(asList(\"1\", \"2\"), size(3));\r\n }", "@DISPID(11) //= 0xb. The runtime will prefer the VTID if present\r\n @VTID(18)\r\n int count();", "public int countSegments(String s) {\r\n int count = 0;\r\n boolean flag = true;\r\n if (s.length() == 0) return 0;\r\n \r\n for (char c : s.toCharArray()) {\r\n if (c == 32) {\r\n flag = true;\r\n } else if (c != 32 && flag) {\r\n flag = false;\r\n count++;\r\n }\r\n }\r\n \r\n return count;\r\n }", "private boolean isLogNumFieldValid() {\n String count = logFileCount.getText();\n logNumAlert.setText(\"\");\n try {\n int count_num = Integer.parseInt(count);\n if (count_num < 1) {\n logNumAlert.setText(Bundle.AutopsyOptionsPanel_logNumAlert_invalidInput_text());\n return false;\n }\n } catch (NumberFormatException e) {\n logNumAlert.setText(Bundle.AutopsyOptionsPanel_logNumAlert_invalidInput_text());\n return false;\n }\n return true; \n }", "public static int count() {\n\treturn errorCount;\n }", "public int doCount(String s){\r\n\t\tint count = 0;\r\n\t\tint i;\r\n\t\tfor(i = 0; i < s.length(); i++){\r\n\t\t\tif ( s.charAt(i) == Letter )\r\n\t\t\t\tcount++;\r\n\t\t}\r\n\t\t\r\n\t\treturn count;\r\n\t\t\r\n\t}", "private static boolean checkGenericPattern(String paramSaInput) {\r\n\t\tString saInput = paramSaInput;\r\n\t\tif (null != saInput) {\r\n\t\t\ttry {\r\n\t\t\t\tsaInput = URLDecoder.decode(saInput);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// LOGGER.error(\"Problem in URLDecode saInput is \" + saInput);\r\n\t\t\t\t// LOGGER.error(e);\r\n\t\t\t\tLOGGER.info(\"Exception:\" + e);\r\n\t\t\t}\r\n\r\n\t\t\tRegularExpression regex = null;\r\n\t\t\ttry {\r\n\t\t\t\tfor (int ilCounter = 0; ilCounter < lSqlFilters.length; ilCounter++) {\r\n\t\t\t\t\tregex = new RegularExpression(lSqlFilters[ilCounter], \"i\");\r\n\r\n\t\t\t\t\tif (regex.matches(saInput)) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// if\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// for\r\n\t\t\tcatch (Exception e) {\r\n\t\t\t\tLOGGER.info(\"Exception\" + e);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// if not null\r\n\r\n\t\treturn true;\r\n\t}", "private static boolean checkMatch(Pattern p, String s) {\n Matcher mat = p.matcher(s);\n return mat.matches();\n }", "public int checkCount(int pid) {\n\t\treturn dao.checkCount(pid);\r\n\t}", "int countByExample(SpecialCircumstanceExample example);", "@Test\r\n public void testCount() {\r\n System.out.println(\"count\");\r\n nc1.addNumber(n1);\r\n int expResult = 1;\r\n int result = nc1.count();\r\n assertEquals(expResult, result);\r\n \r\n }", "@Test\n\tpublic void test_ArgumentCount_0_InvalidInput() {\n\t\tString[] args = {};\n\t\tTypeFinder.main(args);\n\t\tString expected = TypeFinder.INVALID_ARGUMENT_ERROR_MESSAGE + FileManager.lineSeparator;\n\t\tString results = errContent.toString();\n\t\tassertEquals(expected, results);\n\t}", "private static boolean checkGenericPatternAll(String paramSaInput) {\r\n\t\tString saInput = paramSaInput;\r\n\t\tif (null != saInput) {\r\n\t\t\ttry {\r\n\t\t\t\tsaInput = URLDecoder.decode(saInput);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// LOGGER.error(\"Problem in URLDecode saInput is \" + saInput);\r\n\t\t\t\t// LOGGER.error(e);\r\n\t\t\t\tLOGGER.info(\"Exception:\" + e);\r\n\t\t\t}\r\n\r\n\t\t\tRegularExpression regex = null;\r\n\t\t\tint genLen = genSqlFilters.length;\r\n\t\t\ttry {\r\n\t\t\t\tfor (int ilCounter = 0; ilCounter < genLen; ilCounter++) {\r\n\t\t\t\t\tregex = new RegularExpression(genSqlFilters[ilCounter], \"i\");\r\n\r\n\t\t\t\t\tif (regex.matches(saInput)) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// if\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// for\r\n\t\t\tcatch (Exception e) {\r\n\t\t\t\tLOGGER.info(\"Exception\" + e);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// if not null\r\n\r\n\t\treturn true;\r\n\t}", "AvailableRegisterCountFilter(String ext) {\r\n\t\t\tthis.extension = ext;\r\n\t\t}", "private static int countForInitialization(String initialization) {\n return countStringMatches(initialization, \",\");\n }", "public void count() {\n APIlib.getInstance().addJSLine(jsBase + \".count();\");\n }", "public int count();", "public int count();", "public int count();", "public int count();", "Object countTAlgmntBussRules(SearchFilter<TAlgmntBussRule> searchFilter);", "private Count() {}", "private Count() {}", "private boolean isStringValid(String s){\n int[] result = getLeftRightCount(s);\n return result[0] == 0 && result[1] == 0;\n }", "public int check(){\r\n\r\n\treturn count ++;\r\n\t\r\n}", "public boolean ValidarCantidad(String c) {\n String numCuenta = c;\n int NOnum = 0;\n for (int i = 0; i < numCuenta.length(); i++) {\n if (!Character.isDigit(numCuenta.charAt(i))) {\n NOnum++;\n }\n }\n return NOnum == 0;\n }", "public boolean haveCount () ;", "private int validate(final String lcono) {\n\n if (lcono == null || lcono.isEmpty())\n return 1;\n else if (!lcono.matches(\"\\\\d*\\\\.?\\\\d+\"))\n return 2;\n\n return 0;\n }", "private void shouldCountTests(String fileName) {\n prepareScenarioWithTestFile(fileName);\n jasmineFile = new JasmineFile(getProject(), virtualFile);\n jasmineFile.buildTreeNodeSync();\n\n // When you count the tests.\n TestCounts testCounts = jasmineFile.getTestCounts();\n\n // Then ensure there are counts for all the items.\n assertEquals(2, testCounts.getIncludedCount());\n assertEquals(2, testCounts.getExcludedCount());\n assertEquals(6, testCounts.getTestCount());\n }", "int countByExample(BlacklistExample example);", "private void count(String[] arguments) {\n\t\ttry { \n\t int ID = Integer.parseInt(arguments[1]);\n\t Node curr = searchID(root, ID);\n\t if(curr != null)\n\t \tSystem.out.printf(\"%d\\n\", curr.count);\n\t else\n\t \tSystem.out.println(\"0\");\n\t } catch(NumberFormatException e) { \n\t System.out.println(\"Argument not an Integer\");; \n\t }\n\t}", "public static boolean patternExists(String pattern, String text, int times) {\r\n\t\t// YOUR CODE HERE\r\n\t\treturn false; // Dummy return\r\n\t}", "private static int countOccurrences(String input, char c) {\n int count = 0;\n for (int i = 0; i < input.length(); i++) {\n if (input.charAt(i) == c) {\n count++;\n }\n }\n return count;\n }", "public static void main(String[] args) {\n\r\n\t\tString password = \"$$ Welcome to 1st Automation Interview $$\" ;\r\n\t\t\r\n\t\tSystem.out.println(password.charAt(5));\r\n\r\n\t\tint lettercount = 0 , digitcount = 0 , specialcount = 0 ; \r\n\r\n\t\tPattern letter = Pattern.compile(\"[a-zA-z]\");\r\n\t\tPattern digit = Pattern.compile(\"[0-9]\");\r\n\t\tPattern special = Pattern.compile (\"[!@#$%&*()_+=|<>?{}\\\\[\\\\]~-]\");\r\n\t\t//Pattern eight = Pattern.compile (\".{8}\");\r\n\r\n\r\n\t\tMatcher hasLetter = letter.matcher(password);\r\n\t\tMatcher hasDigit = digit.matcher(password);\r\n\t\tMatcher hasSpecial = special.matcher(password);\r\n\r\n\r\n\t\tfor (int i = 0 ;password.length()<i ; i++) {\r\n\r\n\t\t\tif(hasLetter.find(password.charAt(i))) {\r\n\r\n\t\t\t\tlettercount++ ;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(lettercount);\r\n\r\n\t\t/*while ( hasLetter.find()) {\r\n\t\t\tlettercount++ ; \r\n\r\n\r\n\r\n\t\t} System.out.println(lettercount);\r\n\r\n\t\twhile (hasDigit.find()) {\r\n\t\t\tdigitcount++ ; \r\n\t\t\tSystem.out.println(hasDigit.group());\r\n\t\t} \r\n\t\tSystem.out.println(digitcount);\r\n\r\n\t\twhile ( hasSpecial.find()) {\r\n\t\t\tSystem.out.println(hasSpecial.group());\r\n\r\n\t\t\tspecialcount++;\r\n\t\t}System.out.println(specialcount);\r\n\t\t */\r\n\r\n\r\n\t}", "private int numberOfConstants() {\n return (int) Stream.of(this.template.split(\"\\\\.\"))\n .filter(s -> !s.equals(\"*\")).count();\n }", "private int countProblematicOccurrences(Choice choice, GenFeature feature, boolean foundStarOrOptionalBefore, boolean hasOptionalParent) {\n \t\tint occurences = 0;\n \t\t\n \t\tList<Sequence> choices = choice.getOptions();\n \t\tfor (Sequence sequence : choices) {\n \t\t\tList<Definition> definitions = sequence.getParts();\n \t\t\tfor (Definition definition : definitions) {\n \t\t\t\t// incorporate cardinality of the definition\n \t\t\t\tCardinality cardinality = null;\n\t\t\t\t\n\t\t\t\tboolean isStarOrOptional = hasOptionalParent;\n \t\t\t\tif (definition instanceof CardinalityDefinition) {\n \t\t\t\t\tcardinality = ((CardinalityDefinition) definition).getCardinality();\n\t\t\t\t\tisStarOrOptional |= cardinality instanceof STAR || cardinality instanceof QUESTIONMARK;\n \t\t\t\t}\n \t\t\t\tif (definition instanceof Terminal) {\n \t\t\t\t\tTerminal terminal = (Terminal) definition;\n \t\t\t\t\tif (terminal.getFeature() == feature) {\n \t\t\t\t\t\tif (isStarOrOptional || foundStarOrOptionalBefore) {\n \t\t\t\t\t\t\toccurences++;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t} else if (definition instanceof CompoundDefinition) {\n \t\t\t\t\tCompoundDefinition compound = (CompoundDefinition) definition;\n \t\t\t\t\tChoice subChoice = compound.getDefinition();\n \t\t\t\t\t// recursive method call\n\t\t\t\t\toccurences += countProblematicOccurrences(subChoice, feature, occurences > 0, isStarOrOptional);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn occurences;\n \t}" ]
[ "0.5927827", "0.5534244", "0.5524829", "0.55140054", "0.54658073", "0.53961265", "0.5380874", "0.5359923", "0.5350027", "0.5338322", "0.5309523", "0.5307341", "0.5299477", "0.5298765", "0.5280513", "0.52704537", "0.5260026", "0.52487063", "0.5237848", "0.5223927", "0.51881343", "0.51828974", "0.5182042", "0.5175888", "0.5170079", "0.515387", "0.51486963", "0.5140922", "0.51378244", "0.5114408", "0.51050085", "0.51040125", "0.5092922", "0.5091329", "0.5086636", "0.5086636", "0.5079202", "0.50779086", "0.5074745", "0.5052478", "0.5030599", "0.5003638", "0.50036377", "0.50029916", "0.5002954", "0.49787736", "0.4973128", "0.4970899", "0.49660277", "0.4964567", "0.4961105", "0.495944", "0.49541965", "0.49496284", "0.49487522", "0.4947592", "0.49449626", "0.49448422", "0.49447787", "0.49408135", "0.4934554", "0.49316517", "0.49277627", "0.49213314", "0.49201727", "0.49067616", "0.49043927", "0.48931593", "0.48926738", "0.4886587", "0.48762685", "0.48733842", "0.48724344", "0.48675394", "0.48588455", "0.48581657", "0.48572713", "0.48513675", "0.48507395", "0.48480606", "0.4843362", "0.4843362", "0.4843362", "0.4843362", "0.4835485", "0.48309082", "0.48309082", "0.4829037", "0.48277232", "0.48234454", "0.4816153", "0.4815575", "0.4813667", "0.481075", "0.48082876", "0.48070735", "0.48067287", "0.48055482", "0.4801005", "0.47990105" ]
0.6640901
0
jTextArea1.append(desc + " (" + e.getX() + "," + e.getY() + ")\n");
void saySomething(String desc, MouseEvent e) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void setTextMousePoint(int i,int j){tmpx=i;tmpy=j;}", "@Override\r\n\tpublic void mouseMoved(MouseEvent e) {\n\t\tl1.setText(\"You moved the mouse\"+e.getX()+\",\"+e.getY());\r\n\t}", "public void mousePrint(String eventDescription, MouseEvent e) {\n\t\ttextArea.append(\"Mouse \" + eventDescription + \" at (\" + \n\t\t\t\t\t e.getX() + \", \" + e.getY() + \")\" + \"\\n\");\n\t}", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\tx = e.getX();\r\n\t\t\ty = e.getY();\r\n\r\n\t\t\tsetTitle(\"x=\" + x + \",y=\" + y);\r\n\r\n\t\t\trepaint(); // paint()를 호출\r\n\t\t}", "@Override\n public void run() {\n if (mouseEvent.getSource()==updateButton && infoFrame==null){\n //JOptionPane.showMessageDialog(null,\"Test\\nTest2\\nTest3\\nlll\");\n\n JTextArea infoText = new JTextArea();\n\n infoText.setText(\"To get weather data for a city:\\n Enter its info into the text field\\n Choose type of location from dropdown menu \\n Click Update Button\\n Then click either daily or weekly weather \\n \\nMultiword cities and \\n Latitude and longitude coordinates\\n should be separated by a - symbol\\n\\n Examples\\n\\n San-Francisco (City example)\\n 59102 (Zip code example) \\n 524901 (City ID example) \\n 30-175 (Lat&Lon example)\\n\");\n infoText.setBounds(0,0,300,250);\n infoPane = new JScrollPane(infoText);\n\n infoFrame = new JFrame();\n infoFrame.getContentPane().add(infoText,BorderLayout.CENTER);\n infoFrame.setSize(300,250);\n\n infoFrame.setLocationRelativeTo(mouseEvent.getComponent());\n Rectangle rect = infoFrame.getBounds();\n //rect.x = rect.x +250;\n rect.y = rect.y - 200;\n infoFrame.setBounds(rect);\n infoFrame.add(infoPane);\n\n infoFrame.setLayout(null);\n infoFrame.setVisible(true);\n infoFrame.revalidate();\n infoFrame.repaint();\n\n };\n }", "@Override\n public void actionPerformed(ActionEvent e)\n {\n area2.setText(area1.getText());\n }", "public void showInfo(String data) {\r\n\t \r\n\t \r\n\ttextArea.append(data);\r\n\t try{\r\n\t\t int len=textArea.getText().length();\r\n\t\t textArea.setCaretPosition(len);\r\n\t\t }\r\n\t\t catch(Exception E){\r\n\t\t\t E.printStackTrace();\r\n\t\t }\r\n\t\r\n this.getContentPane().validate();\r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttextPane.insertIcon(new ImageIcon(\"images/yuzz.PNG\"));\n\t\t\t\ttry {\n\t\t\t\t\tdoc.insertString(doc.getLength(), \" \\n \", left);\n\t\t\t\t} catch (BadLocationException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t//\tpanel1_design();\n\n\t\t\t}", "@Override\r\n\tpublic String getToolTipText(MouseEvent event) {\r\n return toolTipWriter.write(getToolTipText(), event.getPoint());\r\n }", "public void paintComponent(Graphics g) {\n super.paintComponent(g);\n g.drawString(\"(\" + p.x + \", \" + p.y + \")\", p.x, p.y);\n }", "@Override\n\tpublic void mousePressed(MouseEvent e) {\n\t\t\n\t\tif(e.getSource()==b) {\n\t\t\ty = Double.parseDouble(tf.getText());\n\t\t\ty = (5.0/9.0)*(y-32.0);\n\t\t\tx = Double.toString(y);\n\t\t\tl1.setText(x);\n\t\t}\n\t\t\n\t\t\n\t}", "private void formMousePressed(java.awt.event.MouseEvent evt) {\n xx=evt.getX();\n xy=evt.getY();\n \n }", "private void formMousePressed(java.awt.event.MouseEvent evt) {\n xx=evt.getX();\n xy=evt.getY();\n \n }", "public MarcoAreaTexto() {\r\n \r\n super(\"Demostración JTextArea\");\r\n Box cuadro = Box.createHorizontalBox();\r\n String demo = \"Texto de ejemplo\\npara mostrar como\\n\" +\r\n \"se copia texto por\\neventoexterno (Salu2)\";\r\n \r\n areaTexto1 = new JTextArea(demo, 10, 15); \r\n cuadro.add(new JScrollPane(areaTexto1) );\r\n copiar = new JButton(\"Copiar >>> \");\r\n cuadro.add(copiar);\r\n copiar.addActionListener(\r\n \r\n new ActionListener() {\r\n \r\n public void actionPerformed(ActionEvent event) {\r\n \r\n areaTexto2.setText(areaTexto1.getSelectedText() );\r\n } //Fin del método actionPerformed\r\n } //Clase interna anónima\r\n ); //Clase interna anónima\r\n \r\n areaTexto2 = new JTextArea(10, 15);\r\n areaTexto2.setEditable(false);\r\n cuadro.add(new JScrollPane(areaTexto2) );\r\n add(cuadro);\r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttextPane.insertIcon(new ImageIcon(\"images/sasırma.PNG\"));\n\t\t\t\ttry {\n\t\t\t\t\tdoc.insertString(doc.getLength(), \" \\n \", left);\n\t\t\t\t} catch (BadLocationException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t//panel1_design();\n\n\t\t\t}", "@Override\npublic void mouseClicked(MouseEvent e)\n{\n\tSystem.out.println(e.getX() + \" :: \" + e.getY());\n}", "private void generateTextArea()\n {\n //Clear the textArea\n textArea.selectAll();\n textArea.replaceSelection(\"\");\n\n MyCircle circle = panel.getCircle();\n\n //Add all of the required information to the textarea\n textArea.append(String.format(\"AREA: %.2f %n\", circle.getArea()));\n textArea.append(\"RADIUS: \"+circle.getRadius()+\"\\n\");\n textArea.append(\"DIAMETER: \"+circle.getDiameter()+\"\\n\");\n textArea.append(String.format(\"CIRCUMFERENCE: %.2f %n\", circle.getCircumference()));\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n a = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n area = new javax.swing.JTextArea();\n B = new javax.swing.JButton();\n c = new javax.swing.JButton();\n d = new javax.swing.JButton();\n e = new javax.swing.JButton();\n y = new javax.swing.JButton();\n f = new javax.swing.JButton();\n g = new javax.swing.JButton();\n h = new javax.swing.JButton();\n i = new javax.swing.JButton();\n j = new javax.swing.JButton();\n k = new javax.swing.JButton();\n l = new javax.swing.JButton();\n m = new javax.swing.JButton();\n n = new javax.swing.JButton();\n n1 = new javax.swing.JButton();\n o = new javax.swing.JButton();\n p = new javax.swing.JButton();\n q = new javax.swing.JButton();\n r = new javax.swing.JButton();\n s = new javax.swing.JButton();\n t = new javax.swing.JButton();\n u = new javax.swing.JButton();\n v = new javax.swing.JButton();\n x = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n jButton1.setText(\"Clear\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton1);\n jButton1.setBounds(190, 480, 69, 29);\n\n a.setText(\"A\");\n a.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n aMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n aMouseExited(evt);\n }\n });\n a.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n aActionPerformed(evt);\n }\n });\n getContentPane().add(a);\n a.setBounds(140, 120, 50, 29);\n\n area.setColumns(20);\n area.setRows(5);\n jScrollPane1.setViewportView(area);\n\n getContentPane().add(jScrollPane1);\n jScrollPane1.setBounds(620, 170, 380, 270);\n\n B.setText(\"B\");\n B.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n BMouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n BMouseExited(evt);\n }\n });\n getContentPane().add(B);\n B.setBounds(190, 120, 50, 29);\n\n c.setText(\"C\");\n getContentPane().add(c);\n c.setBounds(240, 120, 50, 29);\n\n d.setText(\"D\");\n getContentPane().add(d);\n d.setBounds(290, 120, 50, 29);\n\n e.setText(\"E\");\n e.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n eActionPerformed(evt);\n }\n });\n getContentPane().add(e);\n e.setBounds(340, 120, 50, 29);\n\n y.setText(\"Y\");\n getContentPane().add(y);\n y.setBounds(340, 240, 50, 29);\n\n f.setText(\"F\");\n getContentPane().add(f);\n f.setBounds(140, 150, 50, 29);\n\n g.setText(\"G\");\n getContentPane().add(g);\n g.setBounds(190, 150, 50, 29);\n\n h.setText(\"H\");\n getContentPane().add(h);\n h.setBounds(240, 150, 50, 29);\n\n i.setText(\"I\");\n getContentPane().add(i);\n i.setBounds(290, 150, 50, 29);\n\n j.setText(\"J\");\n getContentPane().add(j);\n j.setBounds(340, 150, 50, 29);\n\n k.setText(\"K\");\n getContentPane().add(k);\n k.setBounds(140, 180, 50, 29);\n\n l.setText(\"L\");\n getContentPane().add(l);\n l.setBounds(190, 180, 50, 29);\n\n m.setText(\"M\");\n getContentPane().add(m);\n m.setBounds(240, 180, 50, 29);\n\n n.setText(\"N\");\n getContentPane().add(n);\n n.setBounds(290, 180, 50, 29);\n\n n1.setText(\"Ñ\");\n n1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n n1ActionPerformed(evt);\n }\n });\n getContentPane().add(n1);\n n1.setBounds(340, 180, 50, 29);\n\n o.setText(\"O\");\n getContentPane().add(o);\n o.setBounds(140, 210, 50, 29);\n\n p.setText(\"P\");\n getContentPane().add(p);\n p.setBounds(190, 210, 50, 29);\n\n q.setText(\"Q\");\n getContentPane().add(q);\n q.setBounds(240, 210, 50, 29);\n\n r.setText(\"R\");\n getContentPane().add(r);\n r.setBounds(290, 210, 50, 29);\n\n s.setText(\"S\");\n getContentPane().add(s);\n s.setBounds(340, 210, 50, 29);\n\n t.setText(\"T\");\n getContentPane().add(t);\n t.setBounds(140, 240, 50, 29);\n\n u.setText(\"U\");\n getContentPane().add(u);\n u.setBounds(190, 240, 50, 29);\n\n v.setText(\"V\");\n getContentPane().add(v);\n v.setBounds(240, 240, 50, 29);\n\n x.setText(\"X\");\n getContentPane().add(x);\n x.setBounds(290, 240, 50, 29);\n\n jLabel1.setIcon(new javax.swing.ImageIcon(\"C:\\\\Users\\\\jjlui\\\\Documents\\\\LITI\\\\3 semestre\\\\Programacion en Java\\\\FINAL\\\\EOYKfrx.jpg\")); // NOI18N\n getContentPane().add(jLabel1);\n jLabel1.setBounds(0, 0, 1360, 800);\n\n pack();\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJFrame frame = new JFrame();\r\n\t\t\t\tframe.setLayout(null);\r\n\t\t\t\tJTextArea area = new JTextArea();\r\n\t\t\t\tJScrollPane scrollPane = new JScrollPane(area);\r\n\t\t\t\tscrollPane.setBounds(10, 10, 410, 560);\r\n\t\t\t\tscrollPane.setHorizontalScrollBarPolicy(\r\n\t\t\t\tJScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);\r\n\t\t\t\tscrollPane.setVerticalScrollBarPolicy(\r\n\t\t\t\tJScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\t\t\tframe.add(scrollPane);\r\n\t\t\t\tarea.setBounds(10, 10, 1000, 1000);\r\n//\t\t\t\tframe.add(area);\r\n\t\t\t\t// 设置窗体参数\r\n\t\t\t\tframe.setResizable(false);// 窗体大小固定\r\n\t\t\t\tframe.setTitle(\"Note\");\r\n\t\t\t\tframe.setSize(430, 600);\r\n\t\t\t\tframe.setLocation(300, 100);// 初始位置\r\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\t\t\tframe.setVisible(true);\r\n\t\t\t\tString inPut = insertFileName.getText();\r\n\t\t\t\ttry {\r\n\t\t\t\t\trs = null;\r\n\t\t\t\t\tconn = DriverManager.getConnection(URL, USERNAME, PASSWORD);\r\n\t\t\t\t\tstmt = conn.createStatement();\r\n\t\t\t\t\tString sql = null;\r\n\t\t\t\t\tif(numb==1) {\r\n\t\t\t\t\t\tsql = \"select codeText from sqlTable where sqlTableName = '\"+inPut+\"'\";\r\n\t\t\t\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\t\t\tString str_show = \"\";\r\n\t\t\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\t\t\tstr_show += rs.getString(\"codeText\") + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tarea.setText(str_show);\r\n\t\t\t\t\t}else if(numb==2) {\r\n\t\t\t\t\t\tsql = \"select codeText from sqlSelect where sqlSelectName = '\"+inPut+\"'\";\r\n\t\t\t\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\t\t\tString str_show = \"\";\r\n\t\t\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\t\t\tstr_show += rs.getString(\"codeText\") + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tarea.setText(str_show);\r\n\t\t\t\t\t}else if(numb==3) {\r\n\t\t\t\t\t\tsql = \"select codeText from sqlInsert where sqlInsertName = '\"+inPut+\"'\";\r\n\t\t\t\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\t\t\tString str_show = \"\";\r\n\t\t\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\t\t\tstr_show += rs.getString(\"codeText\") + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tarea.setText(str_show);\r\n\t\t\t\t\t}else if(numb==4) {\r\n\t\t\t\t\t\tsql = \"select codeText from sqlDelete where sqlDeleteName = '\"+inPut+\"'\";\r\n\t\t\t\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\t\t\tString str_show = \"\";\r\n\t\t\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\t\t\tstr_show += rs.getString(\"codeText\") + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tarea.setText(str_show);\r\n\t\t\t\t\t}else if(numb==5) {\r\n\t\t\t\t\t\tsql = \"select codeText from signIn where signInName = '\"+inPut+\"'\";\r\n\t\t\t\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\t\t\tString str_show = \"\";\r\n\t\t\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\t\t\tstr_show += rs.getString(\"codeText\") + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tarea.setText(str_show);\r\n\t\t\t\t\t}else if(numb==6) {\r\n\t\t\t\t\t\tsql = \"select codeText from MyJPanel where JPanelName = '\"+inPut+\"'\";\r\n\t\t\t\t\t\tSystem.out.println(sql);\r\n\t\t\t\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\t\t\tString str_show = \"\";\r\n\t\t\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\t\t\tstr_show += rs.getString(\"codeText\") + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tarea.setText(str_show);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\tpublic void paint(Graphics e) {\n\t\tsuper.paint(e);\n\t\te.drawString(text, 20, 20);\n\t}", "public void mouseDragged(MouseEvent e) \n {\n recordLabel(e.getPoint()); \n }", "public void addTextArea(String text) throws BadLocationException {\n\t\tcurrentTextArea = new JTextArea(text == null ? \"\" : text);\n AbstractDocument document = (AbstractDocument) currentTextArea.getDocument();\n document.setDocumentFilter(new Filter());\n\t\tcurrentTextArea.setBorder(BorderFactory.createLineBorder(Color.white));\n\t\tcurrentTextArea.setSize(750,2);\n\t\tcontainer.add(currentTextArea);\n\t\tcurrentTextArea.requestFocusInWindow();\n\t\tcurrentTextArea.setCaretPosition(currentTextArea.getDocument().getLength());\n\n\t\tcurrentTextArea.addKeyListener(new java.awt.event.KeyAdapter() {\n\t\t\tpublic void keyPressed(java.awt.event.KeyEvent evt) {\n\t\t\t\ttry {\n\t\t\t\t\tjTextArea1WriteCommand(evt);\n\t\t\t\t} catch (BadLocationException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\trefreshView();\n\t}", "@Override\n public void mouseDragged(MouseEvent e){\n newLabel.setLocation(e.getXOnScreen() - x_pressed, e.getYOnScreen() - y_pressed);\n \n }", "public static void editTextArea(String context) {\r\n\t\ttextArea.append(context+\"\\n\");\r\n\t}", "@Override\t\r\n\t\tpublic void insertUpdate(DocumentEvent e) {\n\t\t\tMessage = t.getText();\r\n\t\t\t//t.getText().length()>\r\n\t\t\tcanvas.repaint();\r\n\t\t\t\r\n\t\t}", "public void handleMouseMove(final int x, final int y) {\r\n int width = displayPanel.getWidth() - 1;\r\n int height = displayPanel.getHeight() - 1;\r\n Bounds bounds = topBounds;\r\n if (bounds == null) {\r\n mouseOut = true;\r\n textArea.setText(\"\");\r\n return;\r\n }\r\n \r\n Rectangle b = bounds.bounds;\r\n double scale = Math.min(width / (double) b.width,\r\n height / (double) b.height);\r\n double xOffs = (width - b.width * scale) / 2.0;\r\n double yOffs = (height - b.height * scale) / 2.0;\r\n \r\n StringBuilder result = new StringBuilder();\r\n findComponents(x, y, xOffs, yOffs, scale, bounds, 0,\r\n result);\r\n String resultStr = result.toString();\r\n if (resultStr.length() > 0) {\r\n mouseOut = false;\r\n textArea.setText(resultStr);\r\n }\r\n else {\r\n mouseOut = true;\r\n textArea.setText(topBounds.toString());\r\n }\r\n }", "@FXML\r\n private void displayPostion(MouseEvent event) {\r\n status.setText(\"X = \" + event.getX() + \". Y = \" + event.getY() + \".\");\r\n }", "@Override\n public void mouseDragged(MouseEvent e){\n newerlabel.setLocation(e.getXOnScreen() - x_pressed, e.getYOnScreen() - y_pressed);\n \n }", "public void actionPerformed(ActionEvent e) {\n\t\tString name = ((JButton)e.getSource()).getText();\n\t\ttextArea.append(name + \"\\n\");\n\t}", "public JTextArea createText(JTextArea a, String name, Font newFont, int boundX, int boundY, int x, int y) {\r\n\t\ta = new JTextArea(name);\r\n\t\ta.setFont(newFont);\r\n\t\ta.setBounds(boundX, boundY, x, y);\r\n\t\ta.setBackground(Color.lightGray);\r\n\t\treturn a;\r\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tint x = e.getX();\n\t\tint y = e.getY();\n\t\tSystem.out.println(x);\n\t\tSystem.out.println(y);\n\t}", "public void Onwin2(){\r\n xPos=0;\r\n yPos=0;\r\n indice = rand.nextInt(11);\r\n if(indice==12){indice2= indice-1;}\r\n else{indice2= indice+1;};\r\n\r\n\r\n texto.setText(\"\");\r\n texto.append(expressions[indice2]);\r\n texto1.setText(\"\");\r\n texto1.append(expressions[indice]);\r\n\r\n matrix=generateMatrix(Alphat,expressions[indice]);\r\n textoG.setText(\"\");\r\n for(int i=0;i<matrix.length;i++){\r\n textoG.append(matrix[i]+\"\\n\");\r\n }\r\n\r\n }", "@Override\n public void mouseDragged(MouseEvent e){\n lblNewLabel.setLocation(e.getXOnScreen() - x_pressed, e.getYOnScreen() - y_pressed);\n \n }", "@Override\n public String toString() {\n return String.format(\"position X is='%s' ,position Y is='%s'\" , positionX , positionY);\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tString hight=\"0\";\n\t\t\t\t\tString width=\"0\";\n\t\t\t\t\ttry{\n\t\t\t\t\t\tJOptionPane pane=new JOptionPane();\n\t\t\t\t\t\twidth=pane.showInputDialog(\"insert width\"+\"(\"+\"Current Width=\"+Math.abs(area.getTemp().endX-area.getTemp().topLeftX)+\")\");\n\t\t\t\t\t\thight=pane.showInputDialog(\"insert hight\"+\"(\"+\"Current hight=\"+Math.abs(area.getTemp().endY-area.getTemp().topLeftY)+\")\");\n\t\t\t\t\t\tint h=Integer.parseInt(hight);\n\t\t\t\t\t\tint w=Integer.parseInt(width);\n\t\t\t\t\tif(area.getTemp()!=null){\n\t\t\t\t\t\tnew History().saveHistory(area.getTemp());\n\t\t\t\t\t\tarea.getTemp().resizeBottom(area.getTemp().endX+w,area.getTemp().endY+h);\n\t\t\t\t\t\tarea.repaint();\n\t\t\t\t\t}\n\t\t\t\t\t}catch(Exception e){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"invalid input\");\t\n\t\t\t\t\t}\n\t\t\t\t}", "public void Onwin(){\r\n xPos=0;\r\n yPos=0;\r\n indice = rand.nextInt(11);\r\n if(indice==12){indice2= indice-1;}\r\n else{indice2= indice+1;};\r\n\r\n\r\n texto.setText(\"\");\r\n texto.append(expressions[indice]);\r\n texto1.setText(\"\");\r\n texto1.append(expressions[indice2]);\r\n\r\n matrix=generateMatrix(Alphat,expressions[indice]);\r\n textoG.setText(\"\");\r\n for(int i=0;i<matrix.length;i++){\r\n textoG.append(matrix[i]+\"\\n\");\r\n }\r\n\r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n String text = tagIdInsertTextBox.getText();\n if (text != null && text.length() > 0) {\n jTextAreaId.setText(jTextAreaId.getText() + \"\\n\" + text);\n tagIdInsertTextBox.setText(\"\");\n jTextAreaId.setRows(jTextAreaId.getLineCount());\n //f1.validate();\n }\n }", "public void motif_zone(){\n\n JLabel lbl_Motif = new JLabel(\"Motif du Rapport :\");\n lbl_Motif.setBounds(40, 130, 119, 16);\n add(lbl_Motif);\n\n motif_content = new JTextField();\n motif_content.setBounds(200, 130, 200, 22);\n motif_content.setText(rapport_visite.elementAt(DAO_Rapport.indice)[4]);\n motif_content.setEditable(false);\n add(motif_content);\n\n\n\n }", "public void mouseMoved(MouseEvent e)\n\t{\n\t\tint x = e.getX(); int y = e.getY();\n\t\tlabel.setText(\"mouse moved to (\"+x+\", \"+y+\")\");\n\t}", "JTextArea getDisplay();", "private void putDataToTextArea() {\n jTextArea1.setEditable(false);\n jTextArea1.setText(selectedFoods);\n }", "public void mouseExited( MouseEvent event )\n\t {\n\t \t coords.setText( \"Outside\" );\n\t }", "private void labelEdit2MouseClicked(MouseEvent e) {\n }", "@Override\n\t\t\tpublic void mouseMove(MouseEvent e) {\n\t\t\t\tint x = e.x;\n\t\t\t\tint y = e.y;\n\t\t\t\t\n\t\t\t\tgc.setFont(new Font(mainFrame.getDisplay(),\"楷体\",40,SWT.BOLD));\n\t\t\t\tgc.setAlpha(255);\n\t\t\t\tgc.setForeground(new Color(mainFrame.getDisplay(),255,255,255));\n\t\t\t\t\n\t\t\t\tif(settingRect.contains(x,y)) {\n\t\t\t\t\t gc.drawString(\"设置选项\", 342, 285,true);\n\t\t\t\t\t changeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(helpRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"帮助信息\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(aboutRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"关于游戏\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(exitRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"退出游戏\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\telse if(onButton(classicP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"经典模式\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse if(onButton(timeP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"时间模式\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(onButton(levelP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"冒险闯关\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse if(onButton(onlineP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"联网对战\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcanvas.redraw();\n\t\t\t\t\tchangeCursor(false);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\n\t\tl1.setText(\"You dragged the mouse\");\r\n\t}", "public void addTextAreaValue(String str){\n\t\tcenterPanel.addTextAreaValue(str);\n\t}", "@Override\n\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\tint x = e.getX();\n\t\t\tint y = e.getY();\n\t\t\t//System.out.println(\"X: \" + x + \" Y: \" +y);\n\n\t\t}", "protected String getToolTip( MouseEvent event )\n {\n SmartText descr = new SmartText();\n int column = treeTable.columnAtPoint( event.getPoint() );\n if ( column == 0 )\n {\n int row = treeTable.rowAtPoint( event.getPoint() );\n if ( row == 0 )\n {\n descr.setText( componentModel.getTypeDescription() );\n }\n else\n {\n Object value = treeTable.getValueAt( row, 1 );\n if ( value instanceof Property )\n {\n Property p = ( Property )value;\n descr.setText( p.getToolTip() );\n }\n }\n\n // perform line wrapping now\n descr.setText( \"<html>\" + descr.insertBreaks( \"<br>\", toolTipWidth, true ) + \"</html>\" );\n return descr.toString();\n }\n return null;\n }", "public void mouseReleased(MouseEvent e) {\n DoActions da= new DoActions();\n txtIndex=0;\n txtCreasing=0;\n for(int c=0;c<30;c++)\n allText[c]=\"\";\n int st=0;\n boolean isStr = false;\n boolean isConvertable=false;\n String reStr=\"\";\n int lastCellR, lastCellC;// andise akharin khaneye entekhab shode ra darad.\n double def1=0,def2= 0;// ekhtelafe beyn khanehaye entekhabi.\n int bcc = 0;// yek harfe character adadi be integer tabdil mishawad.\n if(e.getSource()==jtf[mlp1][mlp2]){\n outerFor: for(int i=0;i<30;i++)\n for(int j=0;j<26;j++)\n if(jtf[i][j].getBackground()==Color.blue && !e.isControlDown()){\n lastCellR=i;\n lastCellC=j;\n bcc++;\n if(lastCellC==mlpp2 && lastCellR>=mlpp1){// aya yek sotun fagat entekhab shode ast.\n isStr=true;\n }\n else if(lastCellR==mlpp1 && lastCellC>=mlpp2){// aya yek radif entekhab shode ast.\n isStr=true;\n }\n else{// agar bish az yek radif waya sotun entekhab shawad, halge payan miyabad.\n isStr=false;\n break outerFor;\n }\n }// payane awalin if az bala, dakhele halge.\n if(isStr){\n for(int i=0;i<30;i++)\n for(int j=0;j<26;j++)\n if(jtf[i][j].getBackground()==Color.blue || jtf[i][j].getBackground()==Color.green){\n allText[txtIndex]=jtf[i][j].getText();\n txtIndex++;\n }\n outerFor: for(int t=0;t<txtIndex;t++){\n reStr=allText[t];\n for(int p=0;p<reStr.length();p++){\n if(p==0)\n if(reStr.charAt(p)=='-'){\n if(reStr.length()!=1){\n p=1;\n }else{\n setNotAutoCopy();\n break outerFor;\n }\n }\n if(reStr.charAt(p)>=48 && reStr.charAt(p)<=57){\n\n if(p==reStr.length()-1){\n isConvertable=true;\n }else{\n isConvertable=false;\n setNotAutoCopy();\n }\n }else{\n isConvertable=false;\n setNotAutoCopy();\n break outerFor;\n }\n }\n }\n if(isConvertable){\n da.convertToDigit();\n if(isAutoCopying){\n if(index==1){\n setNotAutoCopy();\n }else if(index==2){\n dfc=allNum[1]-allNum[0];\n }else{\n for(int f=index-1;f>1;f--){\n def1=allNum[f]-allNum[f-1];\n def2=allNum[f-1]-allNum[f-2];\n if(def1==def2){\n dfc=def1;\n setAutoCopy();\n }else{\n dfc=0;\n setNotAutoCopy();\n break;\n }\n }\n }\n }\n }\n }\n }// payane if(e.getSource()==jtf[mlp1][mlp2]).\n if ( e.isPopupTrigger() ) // baraye fa'al saziye menuye RightClick ya haman PopupMenu\n if (e.getSource()==jtf[mlp1][mlp2]){\n jpm.show( e.getComponent(), e.getX(), e.getY() );\n jtf[mlp1][mlp2].grabFocus(); // -khaneye morede nazar-\n jtf[mlp1][mlp2].setEnabled(true); // -gabele neweshtan mishawad-\n jtf[mlp1][mlp2].setBackground(Color.yellow);// -range an zard mishawad.\n setEdit();\n setNotSelected();\n setNotSaved();\n setTxp(mlp1, mlp2);\n }\n }", "@Override\r\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\tg.drawString(str, 10, 10);\r\n\t\tg.drawLine(10, 20, 110, 20);\r\n\t\tg.drawRect(pX, 30, 100, 100);\r\n\t\t\r\n\t}", "@Override\n\tpublic void mousePressed(MouseEvent e) {\n\n\t\tLabel_Selected((JLabel) e.getComponent());\n\t\t\n\t\tnow_x = e.getXOnScreen() - e.getComponent().getX();\n\t\tnow_y = e.getYOnScreen() - e.getComponent().getY();\n\t\tnow_w = e.getComponent().getWidth();\n\t\tnow_h = e.getComponent().getHeight();\n\t\tnow_L = e.getComponent().getX()+e.getComponent().getWidth();\n\t\tnow_D = e.getComponent().getY()+e.getComponent().getHeight();\n\t\t\n\t\tif(e.getX() > e.getComponent().getWidth()-5 && e.getX() < e.getComponent().getWidth() + 5) {\n\t\t\tnow_X = 'R';\n\t\t} else if(e.getX() > -5 && e.getX() < 5) {\n\t\t\tnow_X = 'L';\n\t\t}\n\t\tif(e.getY() > e.getComponent().getHeight()-5 && e.getY() < e.getComponent().getHeight() + 5) {\n\t\t\tnow_Y = 'D';\n\t\t} else if(e.getY() > -5 && e.getY() < 5) {\n\t\t\tnow_Y = 'U';\n\t\t}\n\t\t\n\t\tText_Set();\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n pn_mostrar = new javax.swing.JScrollPane();\n txt_mostrar = new javax.swing.JTextArea();\n\n setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n setClosable(true);\n setMaximizable(true);\n setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\n txt_mostrar.setEditable(false);\n txt_mostrar.setBackground(new java.awt.Color(51, 51, 51));\n txt_mostrar.setColumns(20);\n txt_mostrar.setFont(new java.awt.Font(\"Arial\", 0, 18)); // NOI18N\n txt_mostrar.setForeground(new java.awt.Color(255, 255, 255));\n txt_mostrar.setRows(5);\n txt_mostrar.setSelectionColor(new java.awt.Color(51, 255, 0));\n pn_mostrar.setViewportView(txt_mostrar);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(pn_mostrar, javax.swing.GroupLayout.DEFAULT_SIZE, 298, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(pn_mostrar, javax.swing.GroupLayout.DEFAULT_SIZE, 222, Short.MAX_VALUE)\n );\n\n pack();\n }", "public void mouseMoved(MouseEvent e)\n {\n int x=e.getX();\n int y=e.getY();\n }", "public void mouseMoved( MouseEvent event )\n\t {\n\t \t /*\n\t \t * Change one unit into pixels sx = width/(b-a)\n\t \t * X = (x-a)*sx\n\t \t * \n\t \t * sy = height/(ymax - ymin)\n\t \t * Y1 = height - (y-ymin)*sy\n\t \t * Y2 = (ymax-y)*sy\n\t \t * Y1=Y2(same expression)\n\t \t */\n\t \t double b = InputView.getEnd();\n\t \t\t double a = InputView.getStart();\n\t \t DecimalFormat df = new DecimalFormat(\"#.##\");\n\t \t double sx = 594/(b-a);\n\t \t double sy = 572/(PlotPoints.getMax()-PlotPoints.getMin());\n\t \t coords.setText( \"(\"+ df.format((event.getX()/sx)+a-.02) + \", \" + df.format((.17 + PlotPoints.getMax()) - (event.getY()/sy)) + \")\" );\n\t }", "public String getDetails()\n\t{\n\t return \"Point (\"+x+\",\"+y+\")\";\n\t}", "public void sug() {\n\r\n texttt.addMouseListener( new MouseAdapter()\r\n {\r\n public void mouseClicked(MouseEvent e)\r\n {\r\n if ( SwingUtilities.isLeftMouseButton(e) )\r\n {\r\n try\r\n {\r\n int offset = texttt.viewToModel( e.getPoint() );\r\n System.out.println( texttt.modelToView( offset ) );\r\n int start = Utilities.getWordStart(texttt, offset);\r\n int end = Utilities.getWordEnd(texttt, offset);\r\n String word = texttt.getDocument().getText(start, end-start);\r\n System.out.println( \"Selected word: \" + word);\r\n \r\n boolean trouver = false;\r\n \t\t\t\tfor(int i = 0; i < dictionnaire.length; i++) {\r\n \t\t\t\t\tif(word.equalsIgnoreCase(dictionnaire[i])) {\r\n \t\t\t\t\t\ttrouver = true;\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\t//Si le mot est inconnu, on affiche les cinq plus proches suggestions en distance.\r\n \t\t\t\tif(trouver == false) {\r\n \t\t\t\t\tint suggestions[][] = new int[dictionnaire.length][2];\r\n \t\t\t\t\tfor(int i = 0; i < dictionnaire.length; i++) {\r\n \t\t\t\t\t\tsuggestions[i][0] = i;\r\n \t\t\t\t\t\tsuggestions[i][1] = distance(word, dictionnaire[i]);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tArrays.sort(suggestions, (a, b) -> Integer.compare(a[1], b[1]));\r\n \t\t\t\t\tJPopupMenu popup = new JPopupMenu();\r\n \t\t\t\t\tfor(int i = 0; i < 5; i++) {\r\n \t\t\t\t\t\tJMenuItem suggestion = new JMenuItem(\"\" + dictionnaire[suggestions[i][0]]);\r\n \t\t\t\t\t\tsuggestion.addActionListener(new Suggestion(suggestion, start, end));\r\n \t\t\t\t\t\tpopup.add(suggestion);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tpopup.show(texttt, e.getX(), e.getY());\r\n \t\t\t\t}\r\n \t\t\t\t int rowStart = Utilities.getRowStart(texttt, offset);\r\n int rowEnd = Utilities.getRowEnd(texttt, offset);\r\n System.out.println( \"Row start offset: \" + rowStart );\r\n System.out.println( \"Row end offset: \" + rowEnd );\r\n texttt.select(rowStart, rowEnd);\r\n \t\t\t}\r\n \t\t\tcatch(BadLocationException e1) {\r\n \t\t\t\tSystem.err.println(\"On ne peut pas lire le texte à l'index indiqué.\");\r\n \t\t\t}\r\n \t\t}\r\n } \r\n });\r\n\r\ntexttt.addCaretListener( new CaretListener(){\r\n public void caretUpdate(CaretEvent e)\r\n {\r\n int caretPosition = texttt.getCaretPosition();\r\n Element root = texttt.getDocument().getDefaultRootElement();\r\n int row = root.getElementIndex( caretPosition );\r\n int column = caretPosition - root.getElement( row ).getStartOffset();\r\n System.out.println( \"Row : \" + ( row + 1 ) );\r\n System.out.println( \"Column: \" + ( column + 1 ) );\r\n }\r\n });\r\n\t\r\n\r\ntexttt.addKeyListener( new KeyAdapter()\r\n {\r\n public void keyPressed(KeyEvent e)\r\n {\r\n System.out.println( texttt.getDocument().getDefaultRootElement().getElementCount() );\r\n }\r\n });\r\n \r\n \r\n }", "private void setupTextArea() {\n\t\tcourseInfo = new JTextPane();\n\t\tinfoScrollPane = new JScrollPane(courseInfo);\n\t\tinfoScrollPane.setPreferredSize(new Dimension(350, 175));\n\t\tcourseInfo.setEditable(false);\n\t\tdisplay.add(infoScrollPane);\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n jLabel2 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel11 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n\n jTextArea1.setColumns(20);\n jTextArea1.setRows(5);\n jScrollPane1.setViewportView(jTextArea1);\n\n setClosable(true);\n setTitle(\"致谢\");\n try {\n setSelected(true);\n } catch (java.beans.PropertyVetoException e1) {\n e1.printStackTrace();\n }\n setVisible(true);\n\n jLabel2.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 102, 0));\n jLabel2.setText(\"可以肯定的是这门课终将在不经意的某一天发挥其作用!\");\n\n jLabel9.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel9.setForeground(new java.awt.Color(255, 102, 0));\n jLabel9.setText(\"也许未来我不一定会从事相关的行业,\");\n\n jLabel10.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel10.setForeground(new java.awt.Color(255, 102, 0));\n jLabel10.setText(\"最后非常感谢曹老师和助教学长一学期来的辛勤授课以及陪伴!\");\n\n jLabel11.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel11.setForeground(new java.awt.Color(255, 102, 51));\n jLabel11.setText(\"这门课让我对开发这一领域有了初步的涉猎,\");\n\n jLabel12.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel12.setForeground(new java.awt.Color(255, 102, 0));\n jLabel12.setText(\"但是这对于拓宽我的互联网视野大有好处,\");\n\n jLabel13.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel13.setForeground(new java.awt.Color(255, 102, 0));\n jLabel13.setText(\"万分感谢!!!\");\n\n jLabel14.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/view/icons/thanks1.jpg\"))); // NOI18N\n\n jLabel15.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/view/icons/thanks2.jpg\"))); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel13)\n .addComponent(jLabel11)\n .addComponent(jLabel12)\n .addComponent(jLabel9)\n .addComponent(jLabel2)\n .addComponent(jLabel10))\n .addGap(15, 15, 15)\n .addComponent(jLabel4))\n .addGroup(layout.createSequentialGroup()\n .addGap(100, 100, 100)\n .addComponent(jLabel15)\n .addGap(119, 119, 119)\n .addComponent(jLabel14)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel11)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel9)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel4)\n .addGap(380, 380, 380))\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(jLabel12)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel10)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel13)\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel15)\n .addComponent(jLabel14))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n );\n\n pack();\n }", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tif(e.getX()>46&&e.getX()<151){\n\t\t\tif(e.getY()<362&&e.getY()>321){\n\t\t\t\trunner.exitAction();\n\t\t\t\tSystem.out.println(\"dsd\");\n\t\t\t}\n\t\t\telse if(e.getY()<311&&e.getY()>270){\n\t\t\t\trunner.meanStartyAction();\n\t\t\t\tSystem.out.println(\"dssd\");\n\t\t\t}\n\t\t\telse if(e.getY()>219&&e.getY()<260){\n\t\t\t\trunner.meanOrderAction();\n\t\t\t\tSystem.out.println(\"dsssd\");\n\t\t\t}\n\t\t\telse if(e.getY()>168&&e.getY()<209){\n\t\t\t\trunner.meanInfoAction();\n\t\t\t\tSystem.out.println(\"dsdd\");\n\t\t\t}\n\t\t\telse if(e.getY()<158&&e.getY()>58){\n\t\t\t\trunner.showWelcome();\n\t\t\t\tSystem.out.println(\"d欢迎\");\n\t\t\t}\n\t\t}\n\t\telse if(e.getX()>580&&e.getX()<615&&e.getY()>70&&e.getY()<105){\n\t\t\trunner.getQuickHotel(hotelFrame.name.getText());\n\t\t}\n\t\telse if(e.getX()>190&&e.getX()<366&&e.getY()>125&&e.getY()<285){\n\t\t\trunner.getQuickHotel(\"北京\");\n\t\t}\n\t\telse if(e.getX()>375&&e.getX()<645&&e.getY()>125&&e.getY()<285){\n\t\t\trunner.getQuickHotel(\"南京\");\n\t\t}\n\t\telse if(e.getX()>190&&e.getX()<460&&e.getY()>290&&e.getY()<450){\n\t\t\trunner.getQuickHotel(\"香港\");\n\t\t}\n\t\telse if(e.getX()>465&&e.getX()<735&&e.getY()>290&&e.getY()<450){\n\t\t\trunner.getQuickHotel(\"上海\");\n\t\t}\n\t}", "@Override\n\tpublic void mousePressed(MouseEvent e) {\n\t\tpvo3 = getPosition(e.getPoint());\n\t\t// System.out.println(pvo1.getX()+\",\"+pvo1.getY());\n\t}", "public void getCoord(MouseEvent me){\n if(mapImage.getImage()!=null) {\n double xPos = me.getX();\n double yPos = me.getY();\n Main.ps.setTitle(xPos + \" \" + yPos);\n }\n }", "void addNote(int x, int y);", "@Override\r\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tx=e.x;\r\n\t\t\t\ty=e.y;\t\t\t\t\r\n\r\n\t\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextPane1 = new javax.swing.JTextPane();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jScrollPane2 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n jButton3 = new javax.swing.JButton();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n jMenuItem1 = new javax.swing.JMenuItem();\n jMenuItem2 = new javax.swing.JMenuItem();\n jMenuItem3 = new javax.swing.JMenuItem();\n jMenu2 = new javax.swing.JMenu();\n jMenuItem4 = new javax.swing.JMenuItem();\n jMenuItem7 = new javax.swing.JMenuItem();\n jMenu3 = new javax.swing.JMenu();\n jMenuItem6 = new javax.swing.JMenuItem();\n jMenuItem5 = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setUndecorated(true);\n\n jTextPane1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Texto de Entrada\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));\n jScrollPane1.setViewportView(jTextPane1);\n\n jButton1.setText(\"Generar Automatas\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Analizar Entradas\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jTextArea1.setEditable(false);\n jTextArea1.setColumns(20);\n jTextArea1.setRows(5);\n jTextArea1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Salida\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));\n jScrollPane2.setViewportView(jTextArea1);\n\n jButton3.setText(\"Cargar Imagen\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 501, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 220, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane2)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 404, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton2)\n .addComponent(jButton1)\n .addComponent(jButton3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 182, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n jMenu1.setText(\"Archivo\");\n\n jMenuItem1.setText(\"Abrir\");\n jMenuItem1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem1ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem1);\n\n jMenuItem2.setText(\"Guardar\");\n jMenuItem2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem2ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem2);\n\n jMenuItem3.setText(\"Guardar Como\");\n jMenuItem3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem3ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem3);\n\n jMenuBar1.add(jMenu1);\n\n jMenu2.setText(\"Reportes\");\n\n jMenuItem4.setText(\"Generar Reporte Lexico\");\n jMenuItem4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem4ActionPerformed(evt);\n }\n });\n jMenu2.add(jMenuItem4);\n\n jMenuItem7.setText(\"Generar Reporte Errores\");\n jMenuItem7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem7ActionPerformed(evt);\n }\n });\n jMenu2.add(jMenuItem7);\n\n jMenuBar1.add(jMenu2);\n\n jMenu3.setText(\"Otros\");\n\n jMenuItem6.setText(\"Limpiar \");\n jMenuItem6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem6ActionPerformed(evt);\n }\n });\n jMenu3.add(jMenuItem6);\n\n jMenuItem5.setText(\"Salir\");\n jMenuItem5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem5ActionPerformed(evt);\n }\n });\n jMenu3.add(jMenuItem5);\n\n jMenuBar1.add(jMenu3);\n\n setJMenuBar(jMenuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n pack();\n }", "public String toString(){\n return (\"TextShape \"+x+\" \"+y+\" \"+col.getRed()+\" \"+col.getGreen()+\" \"+col.getBlue()+\" \"+str);\n }", "private void addText(Graphics g, Font font, Color frontColor, Rectangle rectangle, Color backColor, String str, int xPos, int yPos) {\n g.setFont(font);\n g.setColor(frontColor);\n if (rectangle != null) {\n g.drawRect(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n }\n g.setColor(backColor);\n if (rectangle != null) {\n g.fillRect(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n }\n g.setColor(frontColor);\n g.drawString(str, xPos, yPos);\n }", "TEXTAREA createTEXTAREA();", "@Override\r\n public void draw(Canvas canvas) {\r\n if (text == null) {\r\n throw new IllegalStateException(\"Attempting to draw a null text.\");\r\n }\r\n\r\n // Draws the bounding box around the TextBlock.\r\n RectF rect = new RectF(text.getBoundingBox());\r\n rect.left = translateX(rect.left);\r\n rect.top = translateY(rect.top);\r\n rect.right = translateX(rect.right);\r\n rect.bottom = translateY(rect.bottom);\r\n canvas.drawRect(rect, rectPaint);\r\n\r\n // Log.d(\"area\", \"text: \" + text.getText() + \"\\nArea: \" + Area);\r\n /**Here we are defining a Map which takes a string(Text) and a Integer X_Axis.The text will act as key to the X_Axis.\r\n Once We Got the X_Axis we will pass its value to a SparseIntArray which will Assign X Axis To Y Axis\r\n .Then We might Create another Map which will Store Both The text and the coordinates*/\r\n int X_Axis = (int) rect.left;\r\n int Y_Axis = (int) rect.bottom;\r\n\r\n // Renders the text at the bottom of the box.\r\n Log.d(\"PositionXY\", \"x: \"+X_Axis +\" |Y: \"+ Y_Axis);\r\n canvas.drawText(text.getText(), rect.left, rect.bottom, textPaint); // rect.left and rect.bottom are the coordinates of the text they can be used for mapping puposes\r\n\r\n\r\n }", "public String getToolTipText(MouseEvent event) {\n\t\tjava.awt.Point loc = event.getPoint();\n\t\tint row = rowAtPoint(loc);\n\t\tFileTableModel model = (FileTableModel) getModel();\n\t\treturn model.getDescriptions()[row];\n\t}", "public void mousePressed(MouseEvent e) {\n setMlPresingPoit(mlp1, mlp2);// awalin khaneye entekhab shode jahate Draging , moshakhas mishawad.\n setTextMousePoint(e.getX(), e.getY());// mahale neshanegare mouse moshakhas mishawad.\n if(e.getSource()==jtf[mlp1][mlp2]){\n if(e.getButton()== e.BUTTON3)// jahate tashkhide click rast wa chap\n isRightClick();\n else\n isNotRightClick();\n if(!e.isControlDown()) // agar kelide Control paein nabashad-\n if(e.getSource()!=jtf[txp1][txp2] || !isEditing)//- khaneha geyre fa'al mishawand\n for(int i=0; i<30; i++)\n for(int j=0; j<26; j++){\n jtf[i][j].setEnabled(false);\n setNotEdit();\n jtf[i][j].setBackground(Color.white);\n cellSelCounter=1;\n }\n if(jtf[mlp1][mlp2].getBackground()!=Color.yellow){\n jtf[mlp1][mlp2].setBackground(Color.blue);\n setSelected();\n ++cellSelCounter;\n jp.grabFocus();// focus dar ekhtiyare Panel barname garar migirad.\n }\n if(jtf[txp1][txp2].getBackground()==Color.yellow && e.getSource()!=jtf[txp1][txp2]){// kaneye darhale neweshtan, abi mishawad\n jtf[txp1][txp2].setBackground(Color.blue);\n jtf[txp1][txp2].setEnabled(false);\n setNotEdit();\n setSelected();\n }\n }// payane press baraye khanehaye Excel\n }", "public void actionPerformed(ActionEvent e){\n\t\t\t\tempJTextArea.setText(null);\n\t\t\t\t\tif(employees.size() >= 1){\n\t\t\t\t\t\tfor(Employee employee: employees){\n\t\t\t\t\t\t\tempJTextArea.append(\"\\n Employee ID: \"+employee.getEmployeeId()\n\t\t\t\t\t\t\t+\"\\n Name: \" +employee.getEmployeeName() \n\t\t\t\t\t\t\t+\"\\n Access Level: \" +employee.getAccess()\n\t\t\t\t\t\t\t+\"\\n Password: \" +employee.getPassword()\n\t\t\t\t\t\t\t+\"\\n Salary: \" +employee.getSalary()+\"\\n\");\n\t\t\t\t\t\t\tempJTextArea.setCaretPosition(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"No Employees Found\");\n\t\t\t\t\t}\n\t\t\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 455, 236);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\ttextField1 = new JTextField();\n\t\ttextField1.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\ttextField1.setBounds(21, 24, 128, 48);\n\t\tframe.getContentPane().add(textField1);\n\t\ttextField1.setColumns(10);\n\t\ttextField1.setToolTipText(\"Please enter your number here\"); \n\t\t//hmm i can set html for tooltip. \n\t\t//textField.setToolTipText(\"<html><b><font color=red>\" + \"Please enter your number here\" + \"</font></b></html>\");\n\t\t\n\t\ttextField2 = new JTextField();\n\t\ttextField2.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\ttextField2.setBounds(176, 24, 128, 48);\n\t\tframe.getContentPane().add(textField2);\n\t\ttextField2.setColumns(10);\n\t\ttextField2.setToolTipText(\"Please enter your number here\");\n\t\t\n\t\ttextFieldansw = new JTextField();\n\t\ttextFieldansw.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\ttextFieldansw.setBounds(176, 128, 128, 48);\n\t\tframe.getContentPane().add(textFieldansw);\n\t\ttextFieldansw.setColumns(10);\n\t\ttextFieldansw.setEditable(false);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Answer: \");\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.BOLD | Font.ITALIC, 18));\n\t\tlblNewLabel.setBounds(62, 145, 87, 31);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\tJButton buttonSum = new JButton(\"+\");\n\t\tbuttonSum.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t//oke let's assign value from textfield to variables\n\t\t\t\t\tdouble num1,num2,answ;\t\t\t\t\t\n\t\t\t\t\tnum1=Double.parseDouble(textField1.getText());\n\t\t\t\t\tnum2=Double.parseDouble(textField2.getText());\n\t\t\t\t\tansw=num1+num2;\n\t\t\t\t\ttextFieldansw.setText(Double.toString(answ));\n\t\t\t\t\t//let's try ternary here | didn't worked here for now.\n\t\t\t\t\t//var =(answ % 2 ==0) ? case1 : case2;\n\t\t\t\t\t/*if (answ % 2 != 0) {\n\t\t\t\t\t\ttextFieldansw.setText(Double.toString(answ));}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ta = (int) answ;\n\t\t\t\t\t\t\ttextFieldansw.setText(Integer.toString(a));}\t*notifyAll();\n\t\t\t\t\t\t\tI simply wanted to drop down this .0 in answer...*/\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch(Exception e1){\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"Enter valid number or fill field with number\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbuttonSum.setBounds(323, 24, 89, 23);\n\t\tframe.getContentPane().add(buttonSum);\n\t\t\n\t\tJButton buttonMinus = new JButton(\"-\");\n\t\tbuttonMinus.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\t\t\t\tdouble num1,num2,answ;\t\t\t\t\n\t\t\t\tnum1=Double.parseDouble(textField1.getText());\n\t\t\t\tnum2=Double.parseDouble(textField2.getText());\n\t\t\t\tansw=num1-num2;\n\t\t\t\ttextFieldansw.setText(Double.toString(answ));\n\t\t\t}\n\t\t\tcatch(Exception e1){\n\t\t\t\tJOptionPane.showMessageDialog(null,\"Enter valid number or fill field with number\");\t\t\t\t\n\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbuttonMinus.setBounds(323, 66, 89, 23);\n\t\tframe.getContentPane().add(buttonMinus);\n\t\t\n\t\tJButton buttonMultiplication = new JButton(\"*\");\n\t\tbuttonMultiplication.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tdouble num1,num2,answ;\t\t\t\t\n\t\t\t\t\tnum1=Double.parseDouble(textField1.getText());\n\t\t\t\t\tnum2=Double.parseDouble(textField2.getText());\n\t\t\t\t\tansw=num1*num2;\n\t\t\t\t\ttextFieldansw.setText(Double.toString(answ));\n\t\t\t\t}\n\t\t\t\tcatch(Exception e1){\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"Enter valid number or fill field with number\");\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbuttonMultiplication.setBounds(323, 112, 89, 23);\n\t\tframe.getContentPane().add(buttonMultiplication);\n\t\t\n\t\tJButton buttonDivision = new JButton(\"/\");\n\t\tbuttonDivision.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tdouble num1,num2,answ;\t\t\t\t\n\t\t\t\t\tnum1=Double.parseDouble(textField1.getText());\n\t\t\t\t\tnum2=Double.parseDouble(textField2.getText());\n\t\t\t\t\tansw=num1/num2;\n\t\t\t\t\ttextFieldansw.setText(Double.toString(answ));\n\t\t\t\t}\n\t\t\t\tcatch(Exception e1){\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"Enter valid number or fill field with number\");\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbuttonDivision.setBounds(323, 152, 89, 23);\n\t\tframe.getContentPane().add(buttonDivision);\n\t}", "private void toolbarEmpMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_toolbarEmpMousePressed\n lastX = evt.getXOnScreen();\n lastY = evt.getYOnScreen();\n }", "private String getLabel(MouseEvent e) {\n \n final JFrame parent = new JFrame();\n JButton button = new JButton();\n\n button.setText(\"Click me to show dialog!\");\n parent.add(button);\n //button.doClick();\n parent.pack();\n parent.setVisible(true);\n //String name;\n //button.doClick();\n //button.doClick();\n button.addActionListener(new java.awt.event.ActionListener() {\n @Override\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n label = JOptionPane.showInputDialog(parent,\n \"Set label for this segment\", null); \n \n getLabels().add(label);\n parent.dispose();\n //System.exit(0);\n //setLabel(name);\n //System.out.println(\"rectangle sizes = \"+startDrag.x+\",\"+ startDrag.y+\",\"+ e.getX()+\",\"+ e.getY()+\" = \"+label);\n }\n \n });\n button.doClick();\n \n \n return label;\n }", "public static void EmployeeAddress() {\r\n\t\t\r\n\t\tJLabel e2 = new JLabel(\"Employee's Address:\");\r\n\t\te2.setFont(f);\r\n\t\tGUI1Panel.add(e2);\r\n\t\tGUI1Panel.add(employeeAddress);\r\n\t\te2.setHorizontalAlignment(JLabel.LEFT);\r\n\t\tGUI1Panel.add(Box.createHorizontalStrut(5));\r\n\t\t\t\r\n}", "public static void GenerateTextArea(int id)\n\t{\n\t\tareaHeight += 210;\n\t\tHome.createArticle.setPreferredSize(new Dimension(800, areaHeight));\n\t\ti++; \n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = i;\n\t\tgbc.gridwidth = 1;\n\t\tgbc.insets = new Insets(10, 0, 0, 5);\n\t\tgbc.anchor = GridBagConstraints.LINE_END;\n\t\tHome.createArticle.add(textLabels.get(id), gbc);\n\t\t\n\t\tgbc.gridx = 1;\n\t\tgbc.gridwidth = 3;\n\t\tgbc.insets = new Insets(10, 0, 0, 0);\n\t\tgbc.anchor = GridBagConstraints.LINE_START;\n\t\tgbc.weighty = 10;\n\t\tHome.createArticle.add(textAreas.get(id), gbc);\n\t}", "@Override\r\n\tpublic String toString(){\r\n\t\treturn \"[\" + this.getX()+ \" \" + this.getY()+ \"]\";\r\n\t}", "public void append(String text)\n{\n\ttextArea().append(text);\n}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\ttextArea.setText(textArea.getText()+\"\\n\"+s);\n\t\t\t}", "@Override\n public String getToolTipText (final MouseEvent mEvent) {\n return getText();\n }", "public void mouseClicked(MouseEvent e) {\n p.x = e.getX();\n p.y = e.getY();\n repaint();\n }", "public void paint(Graphics g)\r\n {\r\n // place content of current note in the text area\r\n text.setText(snp.getNote());\r\n }", "public void bilan_zone() {\n\n JLabel lbl_Bilan = new JLabel(\"BILAN :\");\n lbl_Bilan.setBounds(40, 170, 119, 16);\n add(lbl_Bilan);\n\n bilan_content = new JTextArea();\n bilan_content.setBounds(100, 170, 200, 150);\n bilan_content.setText(rapport_visite.elementAt(DAO_Rapport.indice)[3]);\n bilan_content.setLineWrap(true);\n bilan_content.setWrapStyleWord(true);\n bilan_content.setEditable(false);\n add(bilan_content);\n\n\n }", "public void mouseClicked(MouseEvent e) {\r\n\r\n\t\t\tPoint2D origin = computeLayoutOrigin();\r\n\r\n\t\t\t// Compute the mouse click location relative to\r\n\t\t\t// textLayout's origin.\r\n\t\t\tfloat clickX = (float) (e.getX() - origin.getX());\r\n\t\t\tfloat clickY = (float) (e.getY() - origin.getY());\r\n\r\n\t\t\t// Get the character position of the mouse click.\r\n\t\t\tTextHitInfo currentHit = textLayout.hitTestChar(clickX, clickY);\r\n\t\t\tint i = currentHit.getCharIndex();\r\n\t\t\t\r\n\t\t\tSelectionTree.Subelement stm;\r\n\t\t\tif (i >= start0 && i <= end0) {\r\n\t\t\t\tlevel++;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tlevel--;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tstm = term.getSubelement(i, level);\r\n\t\t\tstart0 = stm.start;\r\n\t\t\tend0 = stm.end;\r\n\t\t\tlevel = stm.level;\r\n\t\t\t\r\n\t\t\tselectedTerm.setText(level + \": \" + Printer.print(stm.element).toString());\r\n\t\t\tmouseMoved(e);\r\n\t\t\t\r\n\t\t\trepaint();\r\n\t\t}", "private void writeTextArea(){\r\n try\r\n {\r\n //Fill in \"textArea\" with club names and results\r\n textArea.appendText(\"OK: \" + choiceHomeTeam.getValue() + \" - \" + choiceAwayTeam.getValue() + \" \" \r\n + Integer.valueOf(finalTimeHomeScore.getText()) + \":\"\r\n + Integer.valueOf(finalTimeAwayScore.getText()) + \"(\" \r\n + Integer.valueOf(halfTimeHomeScore.getText()) + \":\" \r\n + Integer.valueOf(halfTimeAwayScore.getText()) + \")\\n\");\r\n textArea.setWrapText(true);\r\n //the letters will be green\r\n textArea.setStyle(\"-fx-text-fill: #4F8A10;\"); \r\n }\r\n //Fill in \"textArea\" with erros\r\n catch(NumberFormatException e)\r\n {\r\n textArea.appendText(\"Error: \" + e.getMessage() + \"\\n\");\r\n textArea.setWrapText(true);\r\n //the letters will be red\r\n textArea.setStyle(\"-fx-text-fill: RED;\"); \r\n } \r\n }", "public TextArea getInputPane();", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n startTextField = new javax.swing.JTextField();\n stopTextField = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n nameTextField = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n textPane = new javax.swing.JTextPane();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n nameTextField1 = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setResizable(false);\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Custom Annotation\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));\n\n jLabel1.setText(\"Start\");\n\n jLabel2.setText(\"Stop\");\n\n startTextField.setEditable(false);\n\n stopTextField.setEditable(false);\n\n jLabel3.setText(\"Name\");\n\n jLabel4.setText(\"Notes\");\n\n textPane.setEditable(false);\n jScrollPane1.setViewportView(textPane);\n\n jButton1.setText(\"Add\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Cancel\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)\n .add(jPanel1Layout.createSequentialGroup()\n .add(jLabel2)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(stopTextField))\n .add(jPanel1Layout.createSequentialGroup()\n .add(jLabel1)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(startTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 60, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))\n .add(47, 47, 47)\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jLabel3)\n .add(jLabel4))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(nameTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 185, Short.MAX_VALUE)\n .add(nameTextField))\n .addContainerGap())\n .add(jScrollPane1)\n .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()\n .add(0, 0, Short.MAX_VALUE)\n .add(jButton2)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jButton1))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel1Layout.createSequentialGroup()\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jLabel1)\n .add(startTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(jLabel3)\n .add(nameTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(stopTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(jLabel2)\n .add(jLabel4)\n .add(nameTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(12, 12, 12)\n .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 129, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 7, Short.MAX_VALUE)\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jButton1)\n .add(jButton2)))\n );\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "public void report_number_zone(){\n\n JLabel lbl_num = new JLabel(\"Num\\u00E9ro du Rapport :\");\n lbl_num.setBounds(40, 10, 129, 16);\n add(lbl_num);\n\n num_content = new JTextField();\n num_content.setHorizontalAlignment(SwingConstants.RIGHT);\n num_content.setEditable(false);\n num_content.setBounds(200, 7, 116, 22);\n num_content.setColumns(10);\n num_content.setText(rapport_visite.elementAt(DAO_Rapport.indice)[0]);\n add(num_content);\n\n\n\n\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t\tSystem.out.println(textA1.getText());\n\t\t\t\n\t\t}", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\tSystem.out.println(\"Clicked on: \" + x + \",\" + y);\r\n\t\t\tif (lastSelected != null) {\r\n\t\t\t\tlastSelected.setBorder(null);\r\n\t\t\t}\r\n\t\t\tsetBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));\r\n\t\t\tGCollector.getInstance().getEnv().setAgentPosTextFields(x, y);\r\n\t\t\tGCollector.getInstance().getEnv().setModifyPosTextFields(x, y);\r\n\r\n\t\t\tlastSelected = (JLabel) e.getComponent();\r\n\t\t}", "public Ventana() {\n initComponents();\n this.tipos.add(GD_C);\n this.tipos.add(GD_S);\n this.tipos.add(GND_C);\n this.tipos.add(GND_S);\n this.panel.setArea_text(text);\n\n }", "@Override\n\tpublic void insertUpdate(DocumentEvent e) {\n\t\tif(!listenChange) return;\n\t\tdisplaySelf = false;\n\t\tDocument doc = e.getDocument();\n\t\ttry {\n\t\t\tint offset = e.getOffset();\n\t\t\tString text = doc.getText(0, doc.getLength());\n\t\t\tfor(int i = 0; i < e.getLength(); ++i) {\n\t\t\t\tthis.processInsert(offset+i, text.charAt(offset+i));\n\t\t\t}\n\t\t\t//System.out.println(text.substring(offset, offset+e.getLength()));\n\t\t} catch (BadLocationException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n jList1 = new javax.swing.JList();\n jLabel1 = new javax.swing.JLabel();\n jcheck = new javax.swing.JLabel();\n jmark = new javax.swing.JLabel();\n jtick = new javax.swing.JLabel();\n jques = new javax.swing.JLabel();\n jcross = new javax.swing.JLabel();\n jcircle = new javax.swing.JLabel();\n jScrollPane2 = new javax.swing.JScrollPane();\n jcomm = new javax.swing.JTextArea();\n jScrollPane3 = new javax.swing.JScrollPane();\n jhigh = new javax.swing.JTextArea();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jList1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jList1MouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(jList1);\n\n jLabel1.setText(\"Questions\");\n\n jcheck.setText(\"Checked By:\");\n\n jmark.setText(\"Marks :\");\n\n jtick.setText(\"Ticks\");\n\n jques.setText(\"Quesmarks\");\n\n jcross.setText(\"Cross\");\n\n jcircle.setText(\"Circles\");\n\n jcomm.setColumns(20);\n jcomm.setRows(5);\n jScrollPane2.setViewportView(jcomm);\n\n jhigh.setColumns(20);\n jhigh.setRows(5);\n jScrollPane3.setViewportView(jhigh);\n\n jLabel2.setText(\"Comments\");\n\n jLabel3.setText(\"Highlighted Text\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(97, 97, 97)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jmark)\n .addComponent(jcheck)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jtick, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jques, javax.swing.GroupLayout.Alignment.LEADING))\n .addGap(176, 176, 176)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jcircle)\n .addComponent(jcross)))))\n .addGroup(layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(86, 86, 86)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))))\n .addGap(159, 159, 159))\n .addGroup(layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addComponent(jLabel1)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 458, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(35, 35, 35)\n .addComponent(jcheck)\n .addGap(18, 18, 18)\n .addComponent(jmark)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jcross)\n .addGap(18, 18, 18)\n .addComponent(jcircle))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jtick)\n .addGap(18, 18, 18)\n .addComponent(jques)))\n .addGap(41, 41, 41)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jLabel3))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jScrollPane2)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE))\n .addGap(51, 51, 51))\n );\n\n pack();\n }", "public void createWindow(){\n JFrame frame = new JFrame(\"Baser Aps sick leave prototype\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setSize(screenSize.width,screenSize.height);\n frame.setExtendedState(JFrame.MAXIMIZED_BOTH);\n\n /**\n * Setting up the main layout\n */\n Container allContent = frame.getContentPane();\n allContent.setLayout(new BorderLayout()); //main layout is BorderLayout\n\n /**\n * Stuff in the content pane\n */\n JButton button = new JButton(\"Press\");\n JTextPane text = new JTextPane();\n text.setText(\"POTATO TEST\");\n text.setEditable(false);\n JMenuBar menuBar = new JMenuBar();\n JMenu file = new JMenu(\"File\");\n JMenu help = new JMenu(\"Help\");\n JMenuItem open = new JMenuItem(\"Open...\");\n JMenuItem saveAs = new JMenuItem(\"Save as\");\n open.addMouseListener(new MouseListener() {\n @Override\n public void mouseClicked(MouseEvent e) {\n fileChooser.showOpenDialog(frame);\n }\n\n @Override\n public void mousePressed(MouseEvent e) {\n\n }\n\n @Override\n public void mouseReleased(MouseEvent e) {\n\n }\n\n @Override\n public void mouseEntered(MouseEvent e) {\n\n }\n\n @Override\n public void mouseExited(MouseEvent e) {\n\n }\n });\n file.add(open);\n file.add(saveAs);\n menuBar.add(file);\n menuBar.add(help);\n\n allContent.add(button, LINE_START); // Adds Button to content pane of frame at position LINE_START\n allContent.add(text, LINE_END); // Adds the text to the frame, at position LINE_END\n allContent.add(menuBar, PAGE_START);\n\n\n\n frame.setVisible(true);\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t\tif (e.getSource() == this.openFile) {\r\n\t\t\tJFileChooser open = new JFileChooser();\r\n\t\t\tint option = open.showOpenDialog(this); // optiuni posibile selectate: approve sau cancel\r\n\t\t\t\r\n\t\t\tif (option == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\tthis.textArea.setText(\"\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tScanner scan = new Scanner(new FileReader(open.getSelectedFile().getPath()));\r\n\t\t\t\t\twhile (scan.hasNext()) {\r\n\t\t\t\t\t\tthis.textArea.append(scan.nextLine() + \"\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscan.close();\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tSystem.out.println(ex.getMessage());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telse if (e.getSource() == this.saveFile) {\r\n\t\t\tJFileChooser save = new JFileChooser();\r\n\t\t\tint option = save.showSaveDialog(this); // atentie, e showSAVEdialog, nu ca sus, cu OPEN\r\n\t\t\t\r\n\t\t\tif (option == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tBufferedWriter out = new BufferedWriter(new FileWriter(save.getSelectedFile().getPath()));\r\n\t\t\t\t\tout.write(this.textArea.getText());\r\n\t\t\t\t\tout.close();\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tSystem.out.println(ex.getMessage());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telse if (e.getSource() == this.exit) {\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\t\r\n\t\telse if (e.getSource() == this.about) {\r\n\t\t\tJOptionPane.showMessageDialog(this, \"Dragos' Notepad v0.2\\nPerju Dragoș-Ștefan\");\r\n\t\t}\r\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\tdouble[] pointLocation = new double[3];\n\t\tdouble x = e.getX();\n\t\tdouble y = e.getY();\n\t\t\n\t\tplotContent.Click(x, y, pointLocation);\n\t\tif(pointLocation[0]==0.0&&pointLocation[1]==0.0&&pointLocation[2]==0.0) {\n\t\t\t\n\t\t}else {\n\t\t\ttradedetail.setText(\"\\n\"+\"Yield = \"+pointLocation[0]+\"\\n\"+\"Days_To_Maturity = \"+pointLocation[1]+\"\\n\"+\"Amount_CHF = \"+pointLocation[2]);\n\t\t}\n\t}", "@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\t\n\t\tif(now_X == 'X' && now_Y == 'X') {\n\t\t\tselected_Label.setLocation(e.getXOnScreen()-now_x, e.getYOnScreen()-now_y);\n\t\t} else {\n\t\t\tif(now_X == 'R') {\n\t\t\t\tselected_Label.setSize(now_w-now_x+e.getXOnScreen() - selected_Label.getX(), selected_Label.getHeight());;\n\t\t\t} else if(now_X == 'L') {\n\t\t\t\tselected_Label.setBounds(e.getXOnScreen()-now_x, selected_Label.getY(), now_L - e.getXOnScreen() + now_x, selected_Label.getHeight());\n\t\t\t}\n\t\t\t\n\t\t\tif(now_Y == 'D') {\n\t\t\t\tselected_Label.setSize(selected_Label.getWidth(), now_h-now_y+e.getYOnScreen() - selected_Label.getY());;\n\t\t\t} else if(now_Y == 'U') {\n\t\t\t\tselected_Label.setBounds(selected_Label.getX(), e.getYOnScreen()-now_y, selected_Label.getWidth(), now_D - e.getYOnScreen() + now_y);\n\t\t\t}\n\t\t}\n\t\t\n\t\tText_Set();\n\t\t\n\t\tLine_set();\n\t\t\n\t\trepaint();\n\t}", "private void setupFeedbackDisplayTextArea(){\n\t\tfeedback_display = new JTextArea();\n\t\tfeedback_display.setFont(new Font(\"Calibri Light\", Font.PLAIN, 25));\n\t\tfeedback_display.setEditable(false);\n\t\tfeedback_display.setLineWrap(true);\n\t\tfeedback_display.setWrapStyleWord(true);\n\t\tfeedback_display.setOpaque(true);\n\n\t\tJScrollPane scrolling_pane = new JScrollPane(feedback_display);\n\t\tadd(scrolling_pane);\n\t\tscrolling_pane.setBounds(32, 222, 1284, 252);\n\t\tscrolling_pane.setBackground(Color.WHITE);\n\t}", "@Override\n\tpublic void mouseReleased(MouseEvent e) {\n\t\tnow_X = 'X';\n\t\tnow_Y = 'X';\n\t\trepaint();\n\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tdisplayArea.append(messageToDisplay);\r\n\t\t\t\tdisplayArea.setCaretPosition(displayArea.getText().length());\t//把文本区域中的输入光标定位到文本区域中最后一个字符之后\r\n\t\t\t}" ]
[ "0.6747963", "0.6334159", "0.622209", "0.6209748", "0.6150997", "0.6096403", "0.6043288", "0.5945086", "0.59213024", "0.588468", "0.5830317", "0.5815294", "0.5815294", "0.57903516", "0.57838297", "0.5736253", "0.57334536", "0.57217443", "0.57214034", "0.57132477", "0.56979275", "0.567658", "0.56740445", "0.56729835", "0.56575996", "0.5635302", "0.5634812", "0.5612943", "0.56028366", "0.55807304", "0.55789006", "0.5577193", "0.55696356", "0.5562833", "0.5562522", "0.5535456", "0.5532072", "0.55091983", "0.5506481", "0.55056536", "0.5498328", "0.5491372", "0.54871607", "0.54831064", "0.54530793", "0.54500103", "0.5448743", "0.54467946", "0.5446589", "0.5441953", "0.5435115", "0.54317546", "0.5427646", "0.54264885", "0.5424539", "0.54208636", "0.5420762", "0.54154605", "0.53996366", "0.5397044", "0.539589", "0.5389822", "0.53889495", "0.53872395", "0.5382807", "0.53785646", "0.5365275", "0.53546953", "0.53463167", "0.53455156", "0.53449506", "0.5341197", "0.5319884", "0.5318786", "0.5316755", "0.53063625", "0.5299671", "0.528859", "0.5287743", "0.5282288", "0.52773094", "0.5272702", "0.52702016", "0.5263539", "0.5251687", "0.52482504", "0.52362806", "0.5231514", "0.523096", "0.52259666", "0.5225365", "0.5225309", "0.52215946", "0.52163523", "0.5213706", "0.5212822", "0.5208235", "0.52069354", "0.5204034", "0.5201917" ]
0.5565954
33